vendor.js 213 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],{
  2. /***/ 1:
  3. /*!************************************************************!*\
  4. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  5. \************************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. "use strict";
  9. Object.defineProperty(exports, "__esModule", { value: true });exports.createApp = createApp;exports.createComponent = createComponent;exports.createPage = createPage;exports.default = void 0;var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _slicedToArray(arr, i) {return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(arr, i) {if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"] != null) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}function _arrayWithHoles(arr) {if (Array.isArray(arr)) return arr;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _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;}
  10. var _toString = Object.prototype.toString;
  11. var hasOwnProperty = Object.prototype.hasOwnProperty;
  12. function isFn(fn) {
  13. return typeof fn === 'function';
  14. }
  15. function isStr(str) {
  16. return typeof str === 'string';
  17. }
  18. function isPlainObject(obj) {
  19. return _toString.call(obj) === '[object Object]';
  20. }
  21. function hasOwn(obj, key) {
  22. return hasOwnProperty.call(obj, key);
  23. }
  24. function noop() {}
  25. /**
  26. * Create a cached version of a pure function.
  27. */
  28. function cached(fn) {
  29. var cache = Object.create(null);
  30. return function cachedFn(str) {
  31. var hit = cache[str];
  32. return hit || (cache[str] = fn(str));
  33. };
  34. }
  35. /**
  36. * Camelize a hyphen-delimited string.
  37. */
  38. var camelizeRE = /-(\w)/g;
  39. var camelize = cached(function (str) {
  40. return str.replace(camelizeRE, function (_, c) {return c ? c.toUpperCase() : '';});
  41. });
  42. var HOOKS = [
  43. 'invoke',
  44. 'success',
  45. 'fail',
  46. 'complete',
  47. 'returnValue'];
  48. var globalInterceptors = {};
  49. var scopedInterceptors = {};
  50. function mergeHook(parentVal, childVal) {
  51. var res = childVal ?
  52. parentVal ?
  53. parentVal.concat(childVal) :
  54. Array.isArray(childVal) ?
  55. childVal : [childVal] :
  56. parentVal;
  57. return res ?
  58. dedupeHooks(res) :
  59. res;
  60. }
  61. function dedupeHooks(hooks) {
  62. var res = [];
  63. for (var i = 0; i < hooks.length; i++) {
  64. if (res.indexOf(hooks[i]) === -1) {
  65. res.push(hooks[i]);
  66. }
  67. }
  68. return res;
  69. }
  70. function removeHook(hooks, hook) {
  71. var index = hooks.indexOf(hook);
  72. if (index !== -1) {
  73. hooks.splice(index, 1);
  74. }
  75. }
  76. function mergeInterceptorHook(interceptor, option) {
  77. Object.keys(option).forEach(function (hook) {
  78. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  79. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  80. }
  81. });
  82. }
  83. function removeInterceptorHook(interceptor, option) {
  84. if (!interceptor || !option) {
  85. return;
  86. }
  87. Object.keys(option).forEach(function (hook) {
  88. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  89. removeHook(interceptor[hook], option[hook]);
  90. }
  91. });
  92. }
  93. function addInterceptor(method, option) {
  94. if (typeof method === 'string' && isPlainObject(option)) {
  95. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  96. } else if (isPlainObject(method)) {
  97. mergeInterceptorHook(globalInterceptors, method);
  98. }
  99. }
  100. function removeInterceptor(method, option) {
  101. if (typeof method === 'string') {
  102. if (isPlainObject(option)) {
  103. removeInterceptorHook(scopedInterceptors[method], option);
  104. } else {
  105. delete scopedInterceptors[method];
  106. }
  107. } else if (isPlainObject(method)) {
  108. removeInterceptorHook(globalInterceptors, method);
  109. }
  110. }
  111. function wrapperHook(hook) {
  112. return function (data) {
  113. return hook(data) || data;
  114. };
  115. }
  116. function isPromise(obj) {
  117. return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  118. }
  119. function queue(hooks, data) {
  120. var promise = false;
  121. for (var i = 0; i < hooks.length; i++) {
  122. var hook = hooks[i];
  123. if (promise) {
  124. promise = Promise.resolve(wrapperHook(hook));
  125. } else {
  126. var res = hook(data);
  127. if (isPromise(res)) {
  128. promise = Promise.resolve(res);
  129. }
  130. if (res === false) {
  131. return {
  132. then: function then() {} };
  133. }
  134. }
  135. }
  136. return promise || {
  137. then: function then(callback) {
  138. return callback(data);
  139. } };
  140. }
  141. function wrapperOptions(interceptor) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  142. ['success', 'fail', 'complete'].forEach(function (name) {
  143. if (Array.isArray(interceptor[name])) {
  144. var oldCallback = options[name];
  145. options[name] = function callbackInterceptor(res) {
  146. queue(interceptor[name], res).then(function (res) {
  147. /* eslint-disable no-mixed-operators */
  148. return isFn(oldCallback) && oldCallback(res) || res;
  149. });
  150. };
  151. }
  152. });
  153. return options;
  154. }
  155. function wrapperReturnValue(method, returnValue) {
  156. var returnValueHooks = [];
  157. if (Array.isArray(globalInterceptors.returnValue)) {
  158. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(globalInterceptors.returnValue));
  159. }
  160. var interceptor = scopedInterceptors[method];
  161. if (interceptor && Array.isArray(interceptor.returnValue)) {
  162. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(interceptor.returnValue));
  163. }
  164. returnValueHooks.forEach(function (hook) {
  165. returnValue = hook(returnValue) || returnValue;
  166. });
  167. return returnValue;
  168. }
  169. function getApiInterceptorHooks(method) {
  170. var interceptor = Object.create(null);
  171. Object.keys(globalInterceptors).forEach(function (hook) {
  172. if (hook !== 'returnValue') {
  173. interceptor[hook] = globalInterceptors[hook].slice();
  174. }
  175. });
  176. var scopedInterceptor = scopedInterceptors[method];
  177. if (scopedInterceptor) {
  178. Object.keys(scopedInterceptor).forEach(function (hook) {
  179. if (hook !== 'returnValue') {
  180. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  181. }
  182. });
  183. }
  184. return interceptor;
  185. }
  186. function invokeApi(method, api, options) {for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {params[_key - 3] = arguments[_key];}
  187. var interceptor = getApiInterceptorHooks(method);
  188. if (interceptor && Object.keys(interceptor).length) {
  189. if (Array.isArray(interceptor.invoke)) {
  190. var res = queue(interceptor.invoke, options);
  191. return res.then(function (options) {
  192. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  193. });
  194. } else {
  195. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  196. }
  197. }
  198. return api.apply(void 0, [options].concat(params));
  199. }
  200. var promiseInterceptor = {
  201. returnValue: function returnValue(res) {
  202. if (!isPromise(res)) {
  203. return res;
  204. }
  205. return res.then(function (res) {
  206. return res[1];
  207. }).catch(function (res) {
  208. return res[0];
  209. });
  210. } };
  211. var SYNC_API_RE =
  212. /^\$|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/;
  213. var CONTEXT_API_RE = /^create|Manager$/;
  214. // Context例外情况
  215. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  216. // 同步例外情况
  217. var ASYNC_API = ['createBLEConnection'];
  218. var CALLBACK_API_RE = /^on|^off/;
  219. function isContextApi(name) {
  220. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  221. }
  222. function isSyncApi(name) {
  223. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  224. }
  225. function isCallbackApi(name) {
  226. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  227. }
  228. function handlePromise(promise) {
  229. return promise.then(function (data) {
  230. return [null, data];
  231. }).
  232. catch(function (err) {return [err];});
  233. }
  234. function shouldPromise(name) {
  235. if (
  236. isContextApi(name) ||
  237. isSyncApi(name) ||
  238. isCallbackApi(name))
  239. {
  240. return false;
  241. }
  242. return true;
  243. }
  244. /* eslint-disable no-extend-native */
  245. if (!Promise.prototype.finally) {
  246. Promise.prototype.finally = function (callback) {
  247. var promise = this.constructor;
  248. return this.then(
  249. function (value) {return promise.resolve(callback()).then(function () {return value;});},
  250. function (reason) {return promise.resolve(callback()).then(function () {
  251. throw reason;
  252. });});
  253. };
  254. }
  255. function promisify(name, api) {
  256. if (!shouldPromise(name)) {
  257. return api;
  258. }
  259. return function promiseApi() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {params[_key2 - 1] = arguments[_key2];}
  260. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  261. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  262. }
  263. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  264. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  265. success: resolve,
  266. fail: reject })].concat(
  267. params));
  268. })));
  269. };
  270. }
  271. var EPS = 1e-4;
  272. var BASE_DEVICE_WIDTH = 750;
  273. var isIOS = false;
  274. var deviceWidth = 0;
  275. var deviceDPR = 0;
  276. function checkDeviceWidth() {var _wx$getSystemInfoSync =
  277. wx.getSystemInfoSync(),platform = _wx$getSystemInfoSync.platform,pixelRatio = _wx$getSystemInfoSync.pixelRatio,windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  278. deviceWidth = windowWidth;
  279. deviceDPR = pixelRatio;
  280. isIOS = platform === 'ios';
  281. }
  282. function upx2px(number, newDeviceWidth) {
  283. if (deviceWidth === 0) {
  284. checkDeviceWidth();
  285. }
  286. number = Number(number);
  287. if (number === 0) {
  288. return 0;
  289. }
  290. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  291. if (result < 0) {
  292. result = -result;
  293. }
  294. result = Math.floor(result + EPS);
  295. if (result === 0) {
  296. if (deviceDPR === 1 || !isIOS) {
  297. result = 1;
  298. } else {
  299. result = 0.5;
  300. }
  301. }
  302. return number < 0 ? -result : result;
  303. }
  304. var interceptors = {
  305. promiseInterceptor: promiseInterceptor };
  306. var baseApi = /*#__PURE__*/Object.freeze({
  307. __proto__: null,
  308. upx2px: upx2px,
  309. addInterceptor: addInterceptor,
  310. removeInterceptor: removeInterceptor,
  311. interceptors: interceptors });var
  312. EventChannel = /*#__PURE__*/function () {
  313. function EventChannel(id, events) {var _this = this;_classCallCheck(this, EventChannel);
  314. this.id = id;
  315. this.listener = {};
  316. this.emitCache = {};
  317. if (events) {
  318. Object.keys(events).forEach(function (name) {
  319. _this.on(name, events[name]);
  320. });
  321. }
  322. }_createClass(EventChannel, [{ key: "emit", value: function emit(
  323. eventName) {for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {args[_key3 - 1] = arguments[_key3];}
  324. var fns = this.listener[eventName];
  325. if (!fns) {
  326. return (this.emitCache[eventName] || (this.emitCache[eventName] = [])).push(args);
  327. }
  328. fns.forEach(function (opt) {
  329. opt.fn.apply(opt.fn, args);
  330. });
  331. this.listener[eventName] = fns.filter(function (opt) {return opt.type !== 'once';});
  332. } }, { key: "on", value: function on(
  333. eventName, fn) {
  334. this._addListener(eventName, 'on', fn);
  335. this._clearCache(eventName);
  336. } }, { key: "once", value: function once(
  337. eventName, fn) {
  338. this._addListener(eventName, 'once', fn);
  339. this._clearCache(eventName);
  340. } }, { key: "off", value: function off(
  341. eventName, fn) {
  342. var fns = this.listener[eventName];
  343. if (!fns) {
  344. return;
  345. }
  346. if (fn) {
  347. for (var i = 0; i < fns.length;) {
  348. if (fns[i].fn === fn) {
  349. fns.splice(i, 1);
  350. i--;
  351. }
  352. i++;
  353. }
  354. } else {
  355. delete this.listener[eventName];
  356. }
  357. } }, { key: "_clearCache", value: function _clearCache(
  358. eventName) {
  359. var cacheArgs = this.emitCache[eventName];
  360. if (cacheArgs) {
  361. for (; cacheArgs.length > 0;) {
  362. this.emit.apply(this, [eventName].concat(cacheArgs.shift()));
  363. }
  364. }
  365. } }, { key: "_addListener", value: function _addListener(
  366. eventName, type, fn) {
  367. (this.listener[eventName] || (this.listener[eventName] = [])).push({
  368. fn: fn,
  369. type: type });
  370. } }]);return EventChannel;}();
  371. var eventChannels = {};
  372. var eventChannelStack = [];
  373. var id = 0;
  374. function initEventChannel(events) {var cache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  375. id++;
  376. var eventChannel = new EventChannel(id, events);
  377. if (cache) {
  378. eventChannels[id] = eventChannel;
  379. eventChannelStack.push(eventChannel);
  380. }
  381. return eventChannel;
  382. }
  383. function getEventChannel(id) {
  384. if (id) {
  385. var eventChannel = eventChannels[id];
  386. delete eventChannels[id];
  387. return eventChannel;
  388. }
  389. return eventChannelStack.shift();
  390. }
  391. var navigateTo = {
  392. args: function args(fromArgs, toArgs) {
  393. var id = initEventChannel(fromArgs.events).id;
  394. if (fromArgs.url) {
  395. fromArgs.url = fromArgs.url + (fromArgs.url.indexOf('?') === -1 ? '?' : '&') + '__id__=' + id;
  396. }
  397. },
  398. returnValue: function returnValue(fromRes, toRes) {
  399. fromRes.eventChannel = getEventChannel();
  400. } };
  401. function findExistsPageIndex(url) {
  402. var pages = getCurrentPages();
  403. var len = pages.length;
  404. while (len--) {
  405. var page = pages[len];
  406. if (page.$page && page.$page.fullPath === url) {
  407. return len;
  408. }
  409. }
  410. return -1;
  411. }
  412. var redirectTo = {
  413. name: function name(fromArgs) {
  414. if (fromArgs.exists === 'back' && fromArgs.delta) {
  415. return 'navigateBack';
  416. }
  417. return 'redirectTo';
  418. },
  419. args: function args(fromArgs) {
  420. if (fromArgs.exists === 'back' && fromArgs.url) {
  421. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  422. if (existsPageIndex !== -1) {
  423. var delta = getCurrentPages().length - 1 - existsPageIndex;
  424. if (delta > 0) {
  425. fromArgs.delta = delta;
  426. }
  427. }
  428. }
  429. } };
  430. var previewImage = {
  431. args: function args(fromArgs) {
  432. var currentIndex = parseInt(fromArgs.current);
  433. if (isNaN(currentIndex)) {
  434. return;
  435. }
  436. var urls = fromArgs.urls;
  437. if (!Array.isArray(urls)) {
  438. return;
  439. }
  440. var len = urls.length;
  441. if (!len) {
  442. return;
  443. }
  444. if (currentIndex < 0) {
  445. currentIndex = 0;
  446. } else if (currentIndex >= len) {
  447. currentIndex = len - 1;
  448. }
  449. if (currentIndex > 0) {
  450. fromArgs.current = urls[currentIndex];
  451. fromArgs.urls = urls.filter(
  452. function (item, index) {return index < currentIndex ? item !== urls[currentIndex] : true;});
  453. } else {
  454. fromArgs.current = urls[0];
  455. }
  456. return {
  457. indicator: false,
  458. loop: false };
  459. } };
  460. function addSafeAreaInsets(result) {
  461. if (result.safeArea) {
  462. var safeArea = result.safeArea;
  463. result.safeAreaInsets = {
  464. top: safeArea.top,
  465. left: safeArea.left,
  466. right: result.windowWidth - safeArea.right,
  467. bottom: result.windowHeight - safeArea.bottom };
  468. }
  469. }
  470. var protocols = {
  471. redirectTo: redirectTo,
  472. navigateTo: navigateTo,
  473. previewImage: previewImage,
  474. getSystemInfo: {
  475. returnValue: addSafeAreaInsets },
  476. getSystemInfoSync: {
  477. returnValue: addSafeAreaInsets } };
  478. var todos = [
  479. 'vibrate',
  480. 'preloadPage',
  481. 'unPreloadPage',
  482. 'loadSubPackage'];
  483. var canIUses = [];
  484. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  485. function processCallback(methodName, method, returnValue) {
  486. return function (res) {
  487. return method(processReturnValue(methodName, res, returnValue));
  488. };
  489. }
  490. 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;
  491. if (isPlainObject(fromArgs)) {// 一般 api 的参数解析
  492. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  493. if (isFn(argsOption)) {
  494. argsOption = argsOption(fromArgs, toArgs) || {};
  495. }
  496. for (var key in fromArgs) {
  497. if (hasOwn(argsOption, key)) {
  498. var keyOption = argsOption[key];
  499. if (isFn(keyOption)) {
  500. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  501. }
  502. if (!keyOption) {// 不支持的参数
  503. console.warn("\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F ".concat(methodName, "\u6682\u4E0D\u652F\u6301").concat(key));
  504. } else if (isStr(keyOption)) {// 重写参数 key
  505. toArgs[keyOption] = fromArgs[key];
  506. } else if (isPlainObject(keyOption)) {// {name:newName,value:value}可重新指定参数 key:value
  507. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  508. }
  509. } else if (CALLBACKS.indexOf(key) !== -1) {
  510. if (isFn(fromArgs[key])) {
  511. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  512. }
  513. } else {
  514. if (!keepFromArgs) {
  515. toArgs[key] = fromArgs[key];
  516. }
  517. }
  518. }
  519. return toArgs;
  520. } else if (isFn(fromArgs)) {
  521. fromArgs = processCallback(methodName, fromArgs, returnValue);
  522. }
  523. return fromArgs;
  524. }
  525. function processReturnValue(methodName, res, returnValue) {var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  526. if (isFn(protocols.returnValue)) {// 处理通用 returnValue
  527. res = protocols.returnValue(methodName, res);
  528. }
  529. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  530. }
  531. function wrapper(methodName, method) {
  532. if (hasOwn(protocols, methodName)) {
  533. var protocol = protocols[methodName];
  534. if (!protocol) {// 暂不支持的 api
  535. return function () {
  536. console.error("\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F \u6682\u4E0D\u652F\u6301".concat(methodName));
  537. };
  538. }
  539. return function (arg1, arg2) {// 目前 api 最多两个参数
  540. var options = protocol;
  541. if (isFn(protocol)) {
  542. options = protocol(arg1);
  543. }
  544. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  545. var args = [arg1];
  546. if (typeof arg2 !== 'undefined') {
  547. args.push(arg2);
  548. }
  549. if (isFn(options.name)) {
  550. methodName = options.name(arg1);
  551. } else if (isStr(options.name)) {
  552. methodName = options.name;
  553. }
  554. var returnValue = wx[methodName].apply(wx, args);
  555. if (isSyncApi(methodName)) {// 同步 api
  556. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  557. }
  558. return returnValue;
  559. };
  560. }
  561. return method;
  562. }
  563. var todoApis = Object.create(null);
  564. var TODOS = [
  565. 'onTabBarMidButtonTap',
  566. 'subscribePush',
  567. 'unsubscribePush',
  568. 'onPush',
  569. 'offPush',
  570. 'share'];
  571. function createTodoApi(name) {
  572. return function todoApi(_ref)
  573. {var fail = _ref.fail,complete = _ref.complete;
  574. var res = {
  575. errMsg: "".concat(name, ":fail:\u6682\u4E0D\u652F\u6301 ").concat(name, " \u65B9\u6CD5") };
  576. isFn(fail) && fail(res);
  577. isFn(complete) && complete(res);
  578. };
  579. }
  580. TODOS.forEach(function (name) {
  581. todoApis[name] = createTodoApi(name);
  582. });
  583. var providers = {
  584. oauth: ['weixin'],
  585. share: ['weixin'],
  586. payment: ['wxpay'],
  587. push: ['weixin'] };
  588. function getProvider(_ref2)
  589. {var service = _ref2.service,success = _ref2.success,fail = _ref2.fail,complete = _ref2.complete;
  590. var res = false;
  591. if (providers[service]) {
  592. res = {
  593. errMsg: 'getProvider:ok',
  594. service: service,
  595. provider: providers[service] };
  596. isFn(success) && success(res);
  597. } else {
  598. res = {
  599. errMsg: 'getProvider:fail:服务[' + service + ']不存在' };
  600. isFn(fail) && fail(res);
  601. }
  602. isFn(complete) && complete(res);
  603. }
  604. var extraApi = /*#__PURE__*/Object.freeze({
  605. __proto__: null,
  606. getProvider: getProvider });
  607. var getEmitter = function () {
  608. var Emitter;
  609. return function getUniEmitter() {
  610. if (!Emitter) {
  611. Emitter = new _vue.default();
  612. }
  613. return Emitter;
  614. };
  615. }();
  616. function apply(ctx, method, args) {
  617. return ctx[method].apply(ctx, args);
  618. }
  619. function $on() {
  620. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  621. }
  622. function $off() {
  623. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  624. }
  625. function $once() {
  626. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  627. }
  628. function $emit() {
  629. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  630. }
  631. var eventApi = /*#__PURE__*/Object.freeze({
  632. __proto__: null,
  633. $on: $on,
  634. $off: $off,
  635. $once: $once,
  636. $emit: $emit });
  637. var api = /*#__PURE__*/Object.freeze({
  638. __proto__: null });
  639. var MPPage = Page;
  640. var MPComponent = Component;
  641. var customizeRE = /:/g;
  642. var customize = cached(function (str) {
  643. return camelize(str.replace(customizeRE, '-'));
  644. });
  645. function initTriggerEvent(mpInstance) {
  646. {
  647. if (!wx.canIUse('nextTick')) {
  648. return;
  649. }
  650. }
  651. var oldTriggerEvent = mpInstance.triggerEvent;
  652. mpInstance.triggerEvent = function (event) {for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {args[_key4 - 1] = arguments[_key4];}
  653. return oldTriggerEvent.apply(mpInstance, [customize(event)].concat(args));
  654. };
  655. }
  656. function initHook(name, options) {
  657. var oldHook = options[name];
  658. if (!oldHook) {
  659. options[name] = function () {
  660. initTriggerEvent(this);
  661. };
  662. } else {
  663. options[name] = function () {
  664. initTriggerEvent(this);for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {args[_key5] = arguments[_key5];}
  665. return oldHook.apply(this, args);
  666. };
  667. }
  668. }
  669. Page = function Page() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  670. initHook('onLoad', options);
  671. return MPPage(options);
  672. };
  673. Component = function Component() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  674. initHook('created', options);
  675. return MPComponent(options);
  676. };
  677. var PAGE_EVENT_HOOKS = [
  678. 'onPullDownRefresh',
  679. 'onReachBottom',
  680. 'onAddToFavorites',
  681. 'onShareTimeline',
  682. 'onShareAppMessage',
  683. 'onPageScroll',
  684. 'onResize',
  685. 'onTabItemTap'];
  686. function initMocks(vm, mocks) {
  687. var mpInstance = vm.$mp[vm.mpType];
  688. mocks.forEach(function (mock) {
  689. if (hasOwn(mpInstance, mock)) {
  690. vm[mock] = mpInstance[mock];
  691. }
  692. });
  693. }
  694. function hasHook(hook, vueOptions) {
  695. if (!vueOptions) {
  696. return true;
  697. }
  698. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  699. return true;
  700. }
  701. vueOptions = vueOptions.default || vueOptions;
  702. if (isFn(vueOptions)) {
  703. if (isFn(vueOptions.extendOptions[hook])) {
  704. return true;
  705. }
  706. if (vueOptions.super &&
  707. vueOptions.super.options &&
  708. Array.isArray(vueOptions.super.options[hook])) {
  709. return true;
  710. }
  711. return false;
  712. }
  713. if (isFn(vueOptions[hook])) {
  714. return true;
  715. }
  716. var mixins = vueOptions.mixins;
  717. if (Array.isArray(mixins)) {
  718. return !!mixins.find(function (mixin) {return hasHook(hook, mixin);});
  719. }
  720. }
  721. function initHooks(mpOptions, hooks, vueOptions) {
  722. hooks.forEach(function (hook) {
  723. if (hasHook(hook, vueOptions)) {
  724. mpOptions[hook] = function (args) {
  725. return this.$vm && this.$vm.__call_hook(hook, args);
  726. };
  727. }
  728. });
  729. }
  730. function initVueComponent(Vue, vueOptions) {
  731. vueOptions = vueOptions.default || vueOptions;
  732. var VueComponent;
  733. if (isFn(vueOptions)) {
  734. VueComponent = vueOptions;
  735. } else {
  736. VueComponent = Vue.extend(vueOptions);
  737. }
  738. vueOptions = VueComponent.options;
  739. return [VueComponent, vueOptions];
  740. }
  741. function initSlots(vm, vueSlots) {
  742. if (Array.isArray(vueSlots) && vueSlots.length) {
  743. var $slots = Object.create(null);
  744. vueSlots.forEach(function (slotName) {
  745. $slots[slotName] = true;
  746. });
  747. vm.$scopedSlots = vm.$slots = $slots;
  748. }
  749. }
  750. function initVueIds(vueIds, mpInstance) {
  751. vueIds = (vueIds || '').split(',');
  752. var len = vueIds.length;
  753. if (len === 1) {
  754. mpInstance._$vueId = vueIds[0];
  755. } else if (len === 2) {
  756. mpInstance._$vueId = vueIds[0];
  757. mpInstance._$vuePid = vueIds[1];
  758. }
  759. }
  760. function initData(vueOptions, context) {
  761. var data = vueOptions.data || {};
  762. var methods = vueOptions.methods || {};
  763. if (typeof data === 'function') {
  764. try {
  765. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  766. } catch (e) {
  767. if (Object({"VUE_APP_NAME":"bigDataa","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  768. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  769. }
  770. }
  771. } else {
  772. try {
  773. // 对 data 格式化
  774. data = JSON.parse(JSON.stringify(data));
  775. } catch (e) {}
  776. }
  777. if (!isPlainObject(data)) {
  778. data = {};
  779. }
  780. Object.keys(methods).forEach(function (methodName) {
  781. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  782. data[methodName] = methods[methodName];
  783. }
  784. });
  785. return data;
  786. }
  787. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  788. function createObserver(name) {
  789. return function observer(newVal, oldVal) {
  790. if (this.$vm) {
  791. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  792. }
  793. };
  794. }
  795. function initBehaviors(vueOptions, initBehavior) {
  796. var vueBehaviors = vueOptions.behaviors;
  797. var vueExtends = vueOptions.extends;
  798. var vueMixins = vueOptions.mixins;
  799. var vueProps = vueOptions.props;
  800. if (!vueProps) {
  801. vueOptions.props = vueProps = [];
  802. }
  803. var behaviors = [];
  804. if (Array.isArray(vueBehaviors)) {
  805. vueBehaviors.forEach(function (behavior) {
  806. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  807. if (behavior === 'uni://form-field') {
  808. if (Array.isArray(vueProps)) {
  809. vueProps.push('name');
  810. vueProps.push('value');
  811. } else {
  812. vueProps.name = {
  813. type: String,
  814. default: '' };
  815. vueProps.value = {
  816. type: [String, Number, Boolean, Array, Object, Date],
  817. default: '' };
  818. }
  819. }
  820. });
  821. }
  822. if (isPlainObject(vueExtends) && vueExtends.props) {
  823. behaviors.push(
  824. initBehavior({
  825. properties: initProperties(vueExtends.props, true) }));
  826. }
  827. if (Array.isArray(vueMixins)) {
  828. vueMixins.forEach(function (vueMixin) {
  829. if (isPlainObject(vueMixin) && vueMixin.props) {
  830. behaviors.push(
  831. initBehavior({
  832. properties: initProperties(vueMixin.props, true) }));
  833. }
  834. });
  835. }
  836. return behaviors;
  837. }
  838. function parsePropType(key, type, defaultValue, file) {
  839. // [String]=>String
  840. if (Array.isArray(type) && type.length === 1) {
  841. return type[0];
  842. }
  843. return type;
  844. }
  845. function initProperties(props) {var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  846. var properties = {};
  847. if (!isBehavior) {
  848. properties.vueId = {
  849. type: String,
  850. value: '' };
  851. // 用于字节跳动小程序模拟抽象节点
  852. properties.generic = {
  853. type: Object,
  854. value: null };
  855. properties.vueSlots = { // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  856. type: null,
  857. value: [],
  858. observer: function observer(newVal, oldVal) {
  859. var $slots = Object.create(null);
  860. newVal.forEach(function (slotName) {
  861. $slots[slotName] = true;
  862. });
  863. this.setData({
  864. $slots: $slots });
  865. } };
  866. }
  867. if (Array.isArray(props)) {// ['title']
  868. props.forEach(function (key) {
  869. properties[key] = {
  870. type: null,
  871. observer: createObserver(key) };
  872. });
  873. } else if (isPlainObject(props)) {// {title:{type:String,default:''},content:String}
  874. Object.keys(props).forEach(function (key) {
  875. var opts = props[key];
  876. if (isPlainObject(opts)) {// title:{type:String,default:''}
  877. var value = opts.default;
  878. if (isFn(value)) {
  879. value = value();
  880. }
  881. opts.type = parsePropType(key, opts.type);
  882. properties[key] = {
  883. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  884. value: value,
  885. observer: createObserver(key) };
  886. } else {// content:String
  887. var type = parsePropType(key, opts);
  888. properties[key] = {
  889. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  890. observer: createObserver(key) };
  891. }
  892. });
  893. }
  894. return properties;
  895. }
  896. function wrapper$1(event) {
  897. // TODO 又得兼容 mpvue 的 mp 对象
  898. try {
  899. event.mp = JSON.parse(JSON.stringify(event));
  900. } catch (e) {}
  901. event.stopPropagation = noop;
  902. event.preventDefault = noop;
  903. event.target = event.target || {};
  904. if (!hasOwn(event, 'detail')) {
  905. event.detail = {};
  906. }
  907. if (hasOwn(event, 'markerId')) {
  908. event.detail = typeof event.detail === 'object' ? event.detail : {};
  909. event.detail.markerId = event.markerId;
  910. }
  911. if (isPlainObject(event.detail)) {
  912. event.target = Object.assign({}, event.target, event.detail);
  913. }
  914. return event;
  915. }
  916. function getExtraValue(vm, dataPathsArray) {
  917. var context = vm;
  918. dataPathsArray.forEach(function (dataPathArray) {
  919. var dataPath = dataPathArray[0];
  920. var value = dataPathArray[2];
  921. if (dataPath || typeof value !== 'undefined') {// ['','',index,'disable']
  922. var propPath = dataPathArray[1];
  923. var valuePath = dataPathArray[3];
  924. var vFor;
  925. if (Number.isInteger(dataPath)) {
  926. vFor = dataPath;
  927. } else if (!dataPath) {
  928. vFor = context;
  929. } else if (typeof dataPath === 'string' && dataPath) {
  930. if (dataPath.indexOf('#s#') === 0) {
  931. vFor = dataPath.substr(3);
  932. } else {
  933. vFor = vm.__get_value(dataPath, context);
  934. }
  935. }
  936. if (Number.isInteger(vFor)) {
  937. context = value;
  938. } else if (!propPath) {
  939. context = vFor[value];
  940. } else {
  941. if (Array.isArray(vFor)) {
  942. context = vFor.find(function (vForItem) {
  943. return vm.__get_value(propPath, vForItem) === value;
  944. });
  945. } else if (isPlainObject(vFor)) {
  946. context = Object.keys(vFor).find(function (vForKey) {
  947. return vm.__get_value(propPath, vFor[vForKey]) === value;
  948. });
  949. } else {
  950. console.error('v-for 暂不支持循环数据:', vFor);
  951. }
  952. }
  953. if (valuePath) {
  954. context = vm.__get_value(valuePath, context);
  955. }
  956. }
  957. });
  958. return context;
  959. }
  960. function processEventExtra(vm, extra, event) {
  961. var extraObj = {};
  962. if (Array.isArray(extra) && extra.length) {
  963. /**
  964. *[
  965. * ['data.items', 'data.id', item.data.id],
  966. * ['metas', 'id', meta.id]
  967. *],
  968. *[
  969. * ['data.items', 'data.id', item.data.id],
  970. * ['metas', 'id', meta.id]
  971. *],
  972. *'test'
  973. */
  974. extra.forEach(function (dataPath, index) {
  975. if (typeof dataPath === 'string') {
  976. if (!dataPath) {// model,prop.sync
  977. extraObj['$' + index] = vm;
  978. } else {
  979. if (dataPath === '$event') {// $event
  980. extraObj['$' + index] = event;
  981. } else if (dataPath === 'arguments') {
  982. if (event.detail && event.detail.__args__) {
  983. extraObj['$' + index] = event.detail.__args__;
  984. } else {
  985. extraObj['$' + index] = [event];
  986. }
  987. } else if (dataPath.indexOf('$event.') === 0) {// $event.target.value
  988. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  989. } else {
  990. extraObj['$' + index] = vm.__get_value(dataPath);
  991. }
  992. }
  993. } else {
  994. extraObj['$' + index] = getExtraValue(vm, dataPath);
  995. }
  996. });
  997. }
  998. return extraObj;
  999. }
  1000. function getObjByArray(arr) {
  1001. var obj = {};
  1002. for (var i = 1; i < arr.length; i++) {
  1003. var element = arr[i];
  1004. obj[element[0]] = element[1];
  1005. }
  1006. return obj;
  1007. }
  1008. 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;
  1009. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  1010. if (isCustom) {// 自定义事件
  1011. isCustomMPEvent = event.currentTarget &&
  1012. event.currentTarget.dataset &&
  1013. event.currentTarget.dataset.comType === 'wx';
  1014. if (!args.length) {// 无参数,直接传入 event 或 detail 数组
  1015. if (isCustomMPEvent) {
  1016. return [event];
  1017. }
  1018. return event.detail.__args__ || event.detail;
  1019. }
  1020. }
  1021. var extraObj = processEventExtra(vm, extra, event);
  1022. var ret = [];
  1023. args.forEach(function (arg) {
  1024. if (arg === '$event') {
  1025. if (methodName === '__set_model' && !isCustom) {// input v-model value
  1026. ret.push(event.target.value);
  1027. } else {
  1028. if (isCustom && !isCustomMPEvent) {
  1029. ret.push(event.detail.__args__[0]);
  1030. } else {// wxcomponent 组件或内置组件
  1031. ret.push(event);
  1032. }
  1033. }
  1034. } else {
  1035. if (Array.isArray(arg) && arg[0] === 'o') {
  1036. ret.push(getObjByArray(arg));
  1037. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  1038. ret.push(extraObj[arg]);
  1039. } else {
  1040. ret.push(arg);
  1041. }
  1042. }
  1043. });
  1044. return ret;
  1045. }
  1046. var ONCE = '~';
  1047. var CUSTOM = '^';
  1048. function isMatchEventType(eventType, optType) {
  1049. return eventType === optType ||
  1050. optType === 'regionchange' && (
  1051. eventType === 'begin' ||
  1052. eventType === 'end');
  1053. }
  1054. function getContextVm(vm) {
  1055. var $parent = vm.$parent;
  1056. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  1057. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  1058. $parent = $parent.$parent;
  1059. }
  1060. return $parent && $parent.$parent;
  1061. }
  1062. function handleEvent(event) {var _this2 = this;
  1063. event = wrapper$1(event);
  1064. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  1065. var dataset = (event.currentTarget || event.target).dataset;
  1066. if (!dataset) {
  1067. return console.warn('事件信息不存在');
  1068. }
  1069. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  1070. if (!eventOpts) {
  1071. return console.warn('事件信息不存在');
  1072. }
  1073. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  1074. var eventType = event.type;
  1075. var ret = [];
  1076. eventOpts.forEach(function (eventOpt) {
  1077. var type = eventOpt[0];
  1078. var eventsArray = eventOpt[1];
  1079. var isCustom = type.charAt(0) === CUSTOM;
  1080. type = isCustom ? type.slice(1) : type;
  1081. var isOnce = type.charAt(0) === ONCE;
  1082. type = isOnce ? type.slice(1) : type;
  1083. if (eventsArray && isMatchEventType(eventType, type)) {
  1084. eventsArray.forEach(function (eventArray) {
  1085. var methodName = eventArray[0];
  1086. if (methodName) {
  1087. var handlerCtx = _this2.$vm;
  1088. if (handlerCtx.$options.generic) {// mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  1089. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  1090. }
  1091. if (methodName === '$emit') {
  1092. handlerCtx.$emit.apply(handlerCtx,
  1093. processEventArgs(
  1094. _this2.$vm,
  1095. event,
  1096. eventArray[1],
  1097. eventArray[2],
  1098. isCustom,
  1099. methodName));
  1100. return;
  1101. }
  1102. var handler = handlerCtx[methodName];
  1103. if (!isFn(handler)) {
  1104. throw new Error(" _vm.".concat(methodName, " is not a function"));
  1105. }
  1106. if (isOnce) {
  1107. if (handler.once) {
  1108. return;
  1109. }
  1110. handler.once = true;
  1111. }
  1112. var params = processEventArgs(
  1113. _this2.$vm,
  1114. event,
  1115. eventArray[1],
  1116. eventArray[2],
  1117. isCustom,
  1118. methodName);
  1119. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  1120. // eslint-disable-next-line no-sparse-arrays
  1121. ret.push(handler.apply(handlerCtx, (Array.isArray(params) ? params : []).concat([,,,,,,,,,, event])));
  1122. }
  1123. });
  1124. }
  1125. });
  1126. if (
  1127. eventType === 'input' &&
  1128. ret.length === 1 &&
  1129. typeof ret[0] !== 'undefined')
  1130. {
  1131. return ret[0];
  1132. }
  1133. }
  1134. var hooks = [
  1135. 'onShow',
  1136. 'onHide',
  1137. 'onError',
  1138. 'onPageNotFound',
  1139. 'onThemeChange',
  1140. 'onUnhandledRejection'];
  1141. function parseBaseApp(vm, _ref3)
  1142. {var mocks = _ref3.mocks,initRefs = _ref3.initRefs;
  1143. if (vm.$options.store) {
  1144. _vue.default.prototype.$store = vm.$options.store;
  1145. }
  1146. _vue.default.prototype.mpHost = "mp-weixin";
  1147. _vue.default.mixin({
  1148. beforeCreate: function beforeCreate() {
  1149. if (!this.$options.mpType) {
  1150. return;
  1151. }
  1152. this.mpType = this.$options.mpType;
  1153. this.$mp = _defineProperty({
  1154. data: {} },
  1155. this.mpType, this.$options.mpInstance);
  1156. this.$scope = this.$options.mpInstance;
  1157. delete this.$options.mpType;
  1158. delete this.$options.mpInstance;
  1159. if (this.mpType !== 'app') {
  1160. initRefs(this);
  1161. initMocks(this, mocks);
  1162. }
  1163. } });
  1164. var appOptions = {
  1165. onLaunch: function onLaunch(args) {
  1166. if (this.$vm) {// 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  1167. return;
  1168. }
  1169. {
  1170. if (!wx.canIUse('nextTick')) {// 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  1171. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  1172. }
  1173. }
  1174. this.$vm = vm;
  1175. this.$vm.$mp = {
  1176. app: this };
  1177. this.$vm.$scope = this;
  1178. // vm 上也挂载 globalData
  1179. this.$vm.globalData = this.globalData;
  1180. this.$vm._isMounted = true;
  1181. this.$vm.__call_hook('mounted', args);
  1182. this.$vm.__call_hook('onLaunch', args);
  1183. } };
  1184. // 兼容旧版本 globalData
  1185. appOptions.globalData = vm.$options.globalData || {};
  1186. // 将 methods 中的方法挂在 getApp() 中
  1187. var methods = vm.$options.methods;
  1188. if (methods) {
  1189. Object.keys(methods).forEach(function (name) {
  1190. appOptions[name] = methods[name];
  1191. });
  1192. }
  1193. initHooks(appOptions, hooks);
  1194. return appOptions;
  1195. }
  1196. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1197. function findVmByVueId(vm, vuePid) {
  1198. var $children = vm.$children;
  1199. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1200. for (var i = $children.length - 1; i >= 0; i--) {
  1201. var childVm = $children[i];
  1202. if (childVm.$scope._$vueId === vuePid) {
  1203. return childVm;
  1204. }
  1205. }
  1206. // 反向递归查找
  1207. var parentVm;
  1208. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1209. parentVm = findVmByVueId($children[_i], vuePid);
  1210. if (parentVm) {
  1211. return parentVm;
  1212. }
  1213. }
  1214. }
  1215. function initBehavior(options) {
  1216. return Behavior(options);
  1217. }
  1218. function isPage() {
  1219. return !!this.route;
  1220. }
  1221. function initRelation(detail) {
  1222. this.triggerEvent('__l', detail);
  1223. }
  1224. function initRefs(vm) {
  1225. var mpInstance = vm.$scope;
  1226. Object.defineProperty(vm, '$refs', {
  1227. get: function get() {
  1228. var $refs = {};
  1229. var components = mpInstance.selectAllComponents('.vue-ref');
  1230. components.forEach(function (component) {
  1231. var ref = component.dataset.ref;
  1232. $refs[ref] = component.$vm || component;
  1233. });
  1234. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for');
  1235. forComponents.forEach(function (component) {
  1236. var ref = component.dataset.ref;
  1237. if (!$refs[ref]) {
  1238. $refs[ref] = [];
  1239. }
  1240. $refs[ref].push(component.$vm || component);
  1241. });
  1242. return $refs;
  1243. } });
  1244. }
  1245. function handleLink(event) {var _ref4 =
  1246. event.detail || event.value,vuePid = _ref4.vuePid,vueOptions = _ref4.vueOptions; // detail 是微信,value 是百度(dipatch)
  1247. var parentVm;
  1248. if (vuePid) {
  1249. parentVm = findVmByVueId(this.$vm, vuePid);
  1250. }
  1251. if (!parentVm) {
  1252. parentVm = this.$vm;
  1253. }
  1254. vueOptions.parent = parentVm;
  1255. }
  1256. function parseApp(vm) {
  1257. return parseBaseApp(vm, {
  1258. mocks: mocks,
  1259. initRefs: initRefs });
  1260. }
  1261. function createApp(vm) {
  1262. _vue.default.prototype.getOpenerEventChannel = function () {
  1263. if (!this.__eventChannel__) {
  1264. this.__eventChannel__ = new EventChannel();
  1265. }
  1266. return this.__eventChannel__;
  1267. };
  1268. var callHook = _vue.default.prototype.__call_hook;
  1269. _vue.default.prototype.__call_hook = function (hook, args) {
  1270. if (hook === 'onLoad' && args && args.__id__) {
  1271. this.__eventChannel__ = getEventChannel(args.__id__);
  1272. delete args.__id__;
  1273. }
  1274. return callHook.call(this, hook, args);
  1275. };
  1276. App(parseApp(vm));
  1277. return vm;
  1278. }
  1279. var encodeReserveRE = /[!'()*]/g;
  1280. var encodeReserveReplacer = function encodeReserveReplacer(c) {return '%' + c.charCodeAt(0).toString(16);};
  1281. var commaRE = /%2C/g;
  1282. // fixed encodeURIComponent which is more conformant to RFC3986:
  1283. // - escapes [!'()*]
  1284. // - preserve commas
  1285. var encode = function encode(str) {return encodeURIComponent(str).
  1286. replace(encodeReserveRE, encodeReserveReplacer).
  1287. replace(commaRE, ',');};
  1288. function stringifyQuery(obj) {var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  1289. var res = obj ? Object.keys(obj).map(function (key) {
  1290. var val = obj[key];
  1291. if (val === undefined) {
  1292. return '';
  1293. }
  1294. if (val === null) {
  1295. return encodeStr(key);
  1296. }
  1297. if (Array.isArray(val)) {
  1298. var result = [];
  1299. val.forEach(function (val2) {
  1300. if (val2 === undefined) {
  1301. return;
  1302. }
  1303. if (val2 === null) {
  1304. result.push(encodeStr(key));
  1305. } else {
  1306. result.push(encodeStr(key) + '=' + encodeStr(val2));
  1307. }
  1308. });
  1309. return result.join('&');
  1310. }
  1311. return encodeStr(key) + '=' + encodeStr(val);
  1312. }).filter(function (x) {return x.length > 0;}).join('&') : null;
  1313. return res ? "?".concat(res) : '';
  1314. }
  1315. function parseBaseComponent(vueComponentOptions)
  1316. {var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},isPage = _ref5.isPage,initRelation = _ref5.initRelation;var _initVueComponent =
  1317. initVueComponent(_vue.default, vueComponentOptions),_initVueComponent2 = _slicedToArray(_initVueComponent, 2),VueComponent = _initVueComponent2[0],vueOptions = _initVueComponent2[1];
  1318. var options = _objectSpread({
  1319. multipleSlots: true,
  1320. addGlobalClass: true },
  1321. vueOptions.options || {});
  1322. {
  1323. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  1324. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  1325. Object.assign(options, vueOptions['mp-weixin'].options);
  1326. }
  1327. }
  1328. var componentOptions = {
  1329. options: options,
  1330. data: initData(vueOptions, _vue.default.prototype),
  1331. behaviors: initBehaviors(vueOptions, initBehavior),
  1332. properties: initProperties(vueOptions.props, false, vueOptions.__file),
  1333. lifetimes: {
  1334. attached: function attached() {
  1335. var properties = this.properties;
  1336. var options = {
  1337. mpType: isPage.call(this) ? 'page' : 'component',
  1338. mpInstance: this,
  1339. propsData: properties };
  1340. initVueIds(properties.vueId, this);
  1341. // 处理父子关系
  1342. initRelation.call(this, {
  1343. vuePid: this._$vuePid,
  1344. vueOptions: options });
  1345. // 初始化 vue 实例
  1346. this.$vm = new VueComponent(options);
  1347. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  1348. initSlots(this.$vm, properties.vueSlots);
  1349. // 触发首次 setData
  1350. this.$vm.$mount();
  1351. },
  1352. ready: function ready() {
  1353. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  1354. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  1355. if (this.$vm) {
  1356. this.$vm._isMounted = true;
  1357. this.$vm.__call_hook('mounted');
  1358. this.$vm.__call_hook('onReady');
  1359. }
  1360. },
  1361. detached: function detached() {
  1362. this.$vm && this.$vm.$destroy();
  1363. } },
  1364. pageLifetimes: {
  1365. show: function show(args) {
  1366. this.$vm && this.$vm.__call_hook('onPageShow', args);
  1367. },
  1368. hide: function hide() {
  1369. this.$vm && this.$vm.__call_hook('onPageHide');
  1370. },
  1371. resize: function resize(size) {
  1372. this.$vm && this.$vm.__call_hook('onPageResize', size);
  1373. } },
  1374. methods: {
  1375. __l: handleLink,
  1376. __e: handleEvent } };
  1377. // externalClasses
  1378. if (vueOptions.externalClasses) {
  1379. componentOptions.externalClasses = vueOptions.externalClasses;
  1380. }
  1381. if (Array.isArray(vueOptions.wxsCallMethods)) {
  1382. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  1383. componentOptions.methods[callMethod] = function (args) {
  1384. return this.$vm[callMethod](args);
  1385. };
  1386. });
  1387. }
  1388. if (isPage) {
  1389. return componentOptions;
  1390. }
  1391. return [componentOptions, VueComponent];
  1392. }
  1393. function parseComponent(vueComponentOptions) {
  1394. return parseBaseComponent(vueComponentOptions, {
  1395. isPage: isPage,
  1396. initRelation: initRelation });
  1397. }
  1398. var hooks$1 = [
  1399. 'onShow',
  1400. 'onHide',
  1401. 'onUnload'];
  1402. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  1403. function parseBasePage(vuePageOptions, _ref6)
  1404. {var isPage = _ref6.isPage,initRelation = _ref6.initRelation;
  1405. var pageOptions = parseComponent(vuePageOptions);
  1406. initHooks(pageOptions.methods, hooks$1, vuePageOptions);
  1407. pageOptions.methods.onLoad = function (query) {
  1408. this.options = query;
  1409. var copyQuery = Object.assign({}, query);
  1410. delete copyQuery.__id__;
  1411. this.$page = {
  1412. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery) };
  1413. this.$vm.$mp.query = query; // 兼容 mpvue
  1414. this.$vm.__call_hook('onLoad', query);
  1415. };
  1416. return pageOptions;
  1417. }
  1418. function parsePage(vuePageOptions) {
  1419. return parseBasePage(vuePageOptions, {
  1420. isPage: isPage,
  1421. initRelation: initRelation });
  1422. }
  1423. function createPage(vuePageOptions) {
  1424. {
  1425. return Component(parsePage(vuePageOptions));
  1426. }
  1427. }
  1428. function createComponent(vueOptions) {
  1429. {
  1430. return Component(parseComponent(vueOptions));
  1431. }
  1432. }
  1433. todos.forEach(function (todoApi) {
  1434. protocols[todoApi] = false;
  1435. });
  1436. canIUses.forEach(function (canIUseApi) {
  1437. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name :
  1438. canIUseApi;
  1439. if (!wx.canIUse(apiName)) {
  1440. protocols[canIUseApi] = false;
  1441. }
  1442. });
  1443. var uni = {};
  1444. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  1445. uni = new Proxy({}, {
  1446. get: function get(target, name) {
  1447. if (hasOwn(target, name)) {
  1448. return target[name];
  1449. }
  1450. if (baseApi[name]) {
  1451. return baseApi[name];
  1452. }
  1453. if (api[name]) {
  1454. return promisify(name, api[name]);
  1455. }
  1456. {
  1457. if (extraApi[name]) {
  1458. return promisify(name, extraApi[name]);
  1459. }
  1460. if (todoApis[name]) {
  1461. return promisify(name, todoApis[name]);
  1462. }
  1463. }
  1464. if (eventApi[name]) {
  1465. return eventApi[name];
  1466. }
  1467. if (!hasOwn(wx, name) && !hasOwn(protocols, name)) {
  1468. return;
  1469. }
  1470. return promisify(name, wrapper(name, wx[name]));
  1471. },
  1472. set: function set(target, name, value) {
  1473. target[name] = value;
  1474. return true;
  1475. } });
  1476. } else {
  1477. Object.keys(baseApi).forEach(function (name) {
  1478. uni[name] = baseApi[name];
  1479. });
  1480. {
  1481. Object.keys(todoApis).forEach(function (name) {
  1482. uni[name] = promisify(name, todoApis[name]);
  1483. });
  1484. Object.keys(extraApi).forEach(function (name) {
  1485. uni[name] = promisify(name, todoApis[name]);
  1486. });
  1487. }
  1488. Object.keys(eventApi).forEach(function (name) {
  1489. uni[name] = eventApi[name];
  1490. });
  1491. Object.keys(api).forEach(function (name) {
  1492. uni[name] = promisify(name, api[name]);
  1493. });
  1494. Object.keys(wx).forEach(function (name) {
  1495. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  1496. uni[name] = promisify(name, wrapper(name, wx[name]));
  1497. }
  1498. });
  1499. }
  1500. wx.createApp = createApp;
  1501. wx.createPage = createPage;
  1502. wx.createComponent = createComponent;
  1503. var uni$1 = uni;var _default =
  1504. uni$1;exports.default = _default;
  1505. /***/ }),
  1506. /***/ 10:
  1507. /*!**********************************************************************************************************!*\
  1508. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  1509. \**********************************************************************************************************/
  1510. /*! exports provided: default */
  1511. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1512. "use strict";
  1513. __webpack_require__.r(__webpack_exports__);
  1514. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  1515. /* globals __VUE_SSR_CONTEXT__ */
  1516. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  1517. // This module is a runtime utility for cleaner component module output and will
  1518. // be included in the final webpack user bundle.
  1519. function normalizeComponent (
  1520. scriptExports,
  1521. render,
  1522. staticRenderFns,
  1523. functionalTemplate,
  1524. injectStyles,
  1525. scopeId,
  1526. moduleIdentifier, /* server only */
  1527. shadowMode, /* vue-cli only */
  1528. components, // fixed by xxxxxx auto components
  1529. renderjs // fixed by xxxxxx renderjs
  1530. ) {
  1531. // Vue.extend constructor export interop
  1532. var options = typeof scriptExports === 'function'
  1533. ? scriptExports.options
  1534. : scriptExports
  1535. // fixed by xxxxxx auto components
  1536. if (components) {
  1537. if (!options.components) {
  1538. options.components = {}
  1539. }
  1540. var hasOwn = Object.prototype.hasOwnProperty
  1541. for (var name in components) {
  1542. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  1543. options.components[name] = components[name]
  1544. }
  1545. }
  1546. }
  1547. // fixed by xxxxxx renderjs
  1548. if (renderjs) {
  1549. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  1550. this[renderjs.__module] = this
  1551. });
  1552. (options.mixins || (options.mixins = [])).push(renderjs)
  1553. }
  1554. // render functions
  1555. if (render) {
  1556. options.render = render
  1557. options.staticRenderFns = staticRenderFns
  1558. options._compiled = true
  1559. }
  1560. // functional template
  1561. if (functionalTemplate) {
  1562. options.functional = true
  1563. }
  1564. // scopedId
  1565. if (scopeId) {
  1566. options._scopeId = 'data-v-' + scopeId
  1567. }
  1568. var hook
  1569. if (moduleIdentifier) { // server build
  1570. hook = function (context) {
  1571. // 2.3 injection
  1572. context =
  1573. context || // cached call
  1574. (this.$vnode && this.$vnode.ssrContext) || // stateful
  1575. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  1576. // 2.2 with runInNewContext: true
  1577. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  1578. context = __VUE_SSR_CONTEXT__
  1579. }
  1580. // inject component styles
  1581. if (injectStyles) {
  1582. injectStyles.call(this, context)
  1583. }
  1584. // register component module identifier for async chunk inferrence
  1585. if (context && context._registeredComponents) {
  1586. context._registeredComponents.add(moduleIdentifier)
  1587. }
  1588. }
  1589. // used by ssr in case component is cached and beforeCreate
  1590. // never gets called
  1591. options._ssrRegister = hook
  1592. } else if (injectStyles) {
  1593. hook = shadowMode
  1594. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  1595. : injectStyles
  1596. }
  1597. if (hook) {
  1598. if (options.functional) {
  1599. // for template-only hot-reload because in that case the render fn doesn't
  1600. // go through the normalizer
  1601. options._injectStyles = hook
  1602. // register for functioal component in vue file
  1603. var originalRender = options.render
  1604. options.render = function renderWithStyleInjection (h, context) {
  1605. hook.call(context)
  1606. return originalRender(h, context)
  1607. }
  1608. } else {
  1609. // inject component registration as beforeCreate hook
  1610. var existing = options.beforeCreate
  1611. options.beforeCreate = existing
  1612. ? [].concat(existing, hook)
  1613. : [hook]
  1614. }
  1615. }
  1616. return {
  1617. exports: scriptExports,
  1618. options: options
  1619. }
  1620. }
  1621. /***/ }),
  1622. /***/ 2:
  1623. /*!******************************************************************************************!*\
  1624. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  1625. \******************************************************************************************/
  1626. /*! exports provided: default */
  1627. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1628. "use strict";
  1629. __webpack_require__.r(__webpack_exports__);
  1630. /* WEBPACK VAR INJECTION */(function(global) {/*!
  1631. * Vue.js v2.6.11
  1632. * (c) 2014-2020 Evan You
  1633. * Released under the MIT License.
  1634. */
  1635. /* */
  1636. var emptyObject = Object.freeze({});
  1637. // These helpers produce better VM code in JS engines due to their
  1638. // explicitness and function inlining.
  1639. function isUndef (v) {
  1640. return v === undefined || v === null
  1641. }
  1642. function isDef (v) {
  1643. return v !== undefined && v !== null
  1644. }
  1645. function isTrue (v) {
  1646. return v === true
  1647. }
  1648. function isFalse (v) {
  1649. return v === false
  1650. }
  1651. /**
  1652. * Check if value is primitive.
  1653. */
  1654. function isPrimitive (value) {
  1655. return (
  1656. typeof value === 'string' ||
  1657. typeof value === 'number' ||
  1658. // $flow-disable-line
  1659. typeof value === 'symbol' ||
  1660. typeof value === 'boolean'
  1661. )
  1662. }
  1663. /**
  1664. * Quick object check - this is primarily used to tell
  1665. * Objects from primitive values when we know the value
  1666. * is a JSON-compliant type.
  1667. */
  1668. function isObject (obj) {
  1669. return obj !== null && typeof obj === 'object'
  1670. }
  1671. /**
  1672. * Get the raw type string of a value, e.g., [object Object].
  1673. */
  1674. var _toString = Object.prototype.toString;
  1675. function toRawType (value) {
  1676. return _toString.call(value).slice(8, -1)
  1677. }
  1678. /**
  1679. * Strict object type check. Only returns true
  1680. * for plain JavaScript objects.
  1681. */
  1682. function isPlainObject (obj) {
  1683. return _toString.call(obj) === '[object Object]'
  1684. }
  1685. function isRegExp (v) {
  1686. return _toString.call(v) === '[object RegExp]'
  1687. }
  1688. /**
  1689. * Check if val is a valid array index.
  1690. */
  1691. function isValidArrayIndex (val) {
  1692. var n = parseFloat(String(val));
  1693. return n >= 0 && Math.floor(n) === n && isFinite(val)
  1694. }
  1695. function isPromise (val) {
  1696. return (
  1697. isDef(val) &&
  1698. typeof val.then === 'function' &&
  1699. typeof val.catch === 'function'
  1700. )
  1701. }
  1702. /**
  1703. * Convert a value to a string that is actually rendered.
  1704. */
  1705. function toString (val) {
  1706. return val == null
  1707. ? ''
  1708. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  1709. ? JSON.stringify(val, null, 2)
  1710. : String(val)
  1711. }
  1712. /**
  1713. * Convert an input value to a number for persistence.
  1714. * If the conversion fails, return original string.
  1715. */
  1716. function toNumber (val) {
  1717. var n = parseFloat(val);
  1718. return isNaN(n) ? val : n
  1719. }
  1720. /**
  1721. * Make a map and return a function for checking if a key
  1722. * is in that map.
  1723. */
  1724. function makeMap (
  1725. str,
  1726. expectsLowerCase
  1727. ) {
  1728. var map = Object.create(null);
  1729. var list = str.split(',');
  1730. for (var i = 0; i < list.length; i++) {
  1731. map[list[i]] = true;
  1732. }
  1733. return expectsLowerCase
  1734. ? function (val) { return map[val.toLowerCase()]; }
  1735. : function (val) { return map[val]; }
  1736. }
  1737. /**
  1738. * Check if a tag is a built-in tag.
  1739. */
  1740. var isBuiltInTag = makeMap('slot,component', true);
  1741. /**
  1742. * Check if an attribute is a reserved attribute.
  1743. */
  1744. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  1745. /**
  1746. * Remove an item from an array.
  1747. */
  1748. function remove (arr, item) {
  1749. if (arr.length) {
  1750. var index = arr.indexOf(item);
  1751. if (index > -1) {
  1752. return arr.splice(index, 1)
  1753. }
  1754. }
  1755. }
  1756. /**
  1757. * Check whether an object has the property.
  1758. */
  1759. var hasOwnProperty = Object.prototype.hasOwnProperty;
  1760. function hasOwn (obj, key) {
  1761. return hasOwnProperty.call(obj, key)
  1762. }
  1763. /**
  1764. * Create a cached version of a pure function.
  1765. */
  1766. function cached (fn) {
  1767. var cache = Object.create(null);
  1768. return (function cachedFn (str) {
  1769. var hit = cache[str];
  1770. return hit || (cache[str] = fn(str))
  1771. })
  1772. }
  1773. /**
  1774. * Camelize a hyphen-delimited string.
  1775. */
  1776. var camelizeRE = /-(\w)/g;
  1777. var camelize = cached(function (str) {
  1778. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  1779. });
  1780. /**
  1781. * Capitalize a string.
  1782. */
  1783. var capitalize = cached(function (str) {
  1784. return str.charAt(0).toUpperCase() + str.slice(1)
  1785. });
  1786. /**
  1787. * Hyphenate a camelCase string.
  1788. */
  1789. var hyphenateRE = /\B([A-Z])/g;
  1790. var hyphenate = cached(function (str) {
  1791. return str.replace(hyphenateRE, '-$1').toLowerCase()
  1792. });
  1793. /**
  1794. * Simple bind polyfill for environments that do not support it,
  1795. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  1796. * since native bind is now performant enough in most browsers.
  1797. * But removing it would mean breaking code that was able to run in
  1798. * PhantomJS 1.x, so this must be kept for backward compatibility.
  1799. */
  1800. /* istanbul ignore next */
  1801. function polyfillBind (fn, ctx) {
  1802. function boundFn (a) {
  1803. var l = arguments.length;
  1804. return l
  1805. ? l > 1
  1806. ? fn.apply(ctx, arguments)
  1807. : fn.call(ctx, a)
  1808. : fn.call(ctx)
  1809. }
  1810. boundFn._length = fn.length;
  1811. return boundFn
  1812. }
  1813. function nativeBind (fn, ctx) {
  1814. return fn.bind(ctx)
  1815. }
  1816. var bind = Function.prototype.bind
  1817. ? nativeBind
  1818. : polyfillBind;
  1819. /**
  1820. * Convert an Array-like object to a real Array.
  1821. */
  1822. function toArray (list, start) {
  1823. start = start || 0;
  1824. var i = list.length - start;
  1825. var ret = new Array(i);
  1826. while (i--) {
  1827. ret[i] = list[i + start];
  1828. }
  1829. return ret
  1830. }
  1831. /**
  1832. * Mix properties into target object.
  1833. */
  1834. function extend (to, _from) {
  1835. for (var key in _from) {
  1836. to[key] = _from[key];
  1837. }
  1838. return to
  1839. }
  1840. /**
  1841. * Merge an Array of Objects into a single Object.
  1842. */
  1843. function toObject (arr) {
  1844. var res = {};
  1845. for (var i = 0; i < arr.length; i++) {
  1846. if (arr[i]) {
  1847. extend(res, arr[i]);
  1848. }
  1849. }
  1850. return res
  1851. }
  1852. /* eslint-disable no-unused-vars */
  1853. /**
  1854. * Perform no operation.
  1855. * Stubbing args to make Flow happy without leaving useless transpiled code
  1856. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  1857. */
  1858. function noop (a, b, c) {}
  1859. /**
  1860. * Always return false.
  1861. */
  1862. var no = function (a, b, c) { return false; };
  1863. /* eslint-enable no-unused-vars */
  1864. /**
  1865. * Return the same value.
  1866. */
  1867. var identity = function (_) { return _; };
  1868. /**
  1869. * Check if two values are loosely equal - that is,
  1870. * if they are plain objects, do they have the same shape?
  1871. */
  1872. function looseEqual (a, b) {
  1873. if (a === b) { return true }
  1874. var isObjectA = isObject(a);
  1875. var isObjectB = isObject(b);
  1876. if (isObjectA && isObjectB) {
  1877. try {
  1878. var isArrayA = Array.isArray(a);
  1879. var isArrayB = Array.isArray(b);
  1880. if (isArrayA && isArrayB) {
  1881. return a.length === b.length && a.every(function (e, i) {
  1882. return looseEqual(e, b[i])
  1883. })
  1884. } else if (a instanceof Date && b instanceof Date) {
  1885. return a.getTime() === b.getTime()
  1886. } else if (!isArrayA && !isArrayB) {
  1887. var keysA = Object.keys(a);
  1888. var keysB = Object.keys(b);
  1889. return keysA.length === keysB.length && keysA.every(function (key) {
  1890. return looseEqual(a[key], b[key])
  1891. })
  1892. } else {
  1893. /* istanbul ignore next */
  1894. return false
  1895. }
  1896. } catch (e) {
  1897. /* istanbul ignore next */
  1898. return false
  1899. }
  1900. } else if (!isObjectA && !isObjectB) {
  1901. return String(a) === String(b)
  1902. } else {
  1903. return false
  1904. }
  1905. }
  1906. /**
  1907. * Return the first index at which a loosely equal value can be
  1908. * found in the array (if value is a plain object, the array must
  1909. * contain an object of the same shape), or -1 if it is not present.
  1910. */
  1911. function looseIndexOf (arr, val) {
  1912. for (var i = 0; i < arr.length; i++) {
  1913. if (looseEqual(arr[i], val)) { return i }
  1914. }
  1915. return -1
  1916. }
  1917. /**
  1918. * Ensure a function is called only once.
  1919. */
  1920. function once (fn) {
  1921. var called = false;
  1922. return function () {
  1923. if (!called) {
  1924. called = true;
  1925. fn.apply(this, arguments);
  1926. }
  1927. }
  1928. }
  1929. var ASSET_TYPES = [
  1930. 'component',
  1931. 'directive',
  1932. 'filter'
  1933. ];
  1934. var LIFECYCLE_HOOKS = [
  1935. 'beforeCreate',
  1936. 'created',
  1937. 'beforeMount',
  1938. 'mounted',
  1939. 'beforeUpdate',
  1940. 'updated',
  1941. 'beforeDestroy',
  1942. 'destroyed',
  1943. 'activated',
  1944. 'deactivated',
  1945. 'errorCaptured',
  1946. 'serverPrefetch'
  1947. ];
  1948. /* */
  1949. var config = ({
  1950. /**
  1951. * Option merge strategies (used in core/util/options)
  1952. */
  1953. // $flow-disable-line
  1954. optionMergeStrategies: Object.create(null),
  1955. /**
  1956. * Whether to suppress warnings.
  1957. */
  1958. silent: false,
  1959. /**
  1960. * Show production mode tip message on boot?
  1961. */
  1962. productionTip: "development" !== 'production',
  1963. /**
  1964. * Whether to enable devtools
  1965. */
  1966. devtools: "development" !== 'production',
  1967. /**
  1968. * Whether to record perf
  1969. */
  1970. performance: false,
  1971. /**
  1972. * Error handler for watcher errors
  1973. */
  1974. errorHandler: null,
  1975. /**
  1976. * Warn handler for watcher warns
  1977. */
  1978. warnHandler: null,
  1979. /**
  1980. * Ignore certain custom elements
  1981. */
  1982. ignoredElements: [],
  1983. /**
  1984. * Custom user key aliases for v-on
  1985. */
  1986. // $flow-disable-line
  1987. keyCodes: Object.create(null),
  1988. /**
  1989. * Check if a tag is reserved so that it cannot be registered as a
  1990. * component. This is platform-dependent and may be overwritten.
  1991. */
  1992. isReservedTag: no,
  1993. /**
  1994. * Check if an attribute is reserved so that it cannot be used as a component
  1995. * prop. This is platform-dependent and may be overwritten.
  1996. */
  1997. isReservedAttr: no,
  1998. /**
  1999. * Check if a tag is an unknown element.
  2000. * Platform-dependent.
  2001. */
  2002. isUnknownElement: no,
  2003. /**
  2004. * Get the namespace of an element
  2005. */
  2006. getTagNamespace: noop,
  2007. /**
  2008. * Parse the real tag name for the specific platform.
  2009. */
  2010. parsePlatformTagName: identity,
  2011. /**
  2012. * Check if an attribute must be bound using property, e.g. value
  2013. * Platform-dependent.
  2014. */
  2015. mustUseProp: no,
  2016. /**
  2017. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  2018. * This will significantly reduce performance if set to false.
  2019. */
  2020. async: true,
  2021. /**
  2022. * Exposed for legacy reasons
  2023. */
  2024. _lifecycleHooks: LIFECYCLE_HOOKS
  2025. });
  2026. /* */
  2027. /**
  2028. * unicode letters used for parsing html tags, component names and property paths.
  2029. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  2030. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  2031. */
  2032. 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/;
  2033. /**
  2034. * Check if a string starts with $ or _
  2035. */
  2036. function isReserved (str) {
  2037. var c = (str + '').charCodeAt(0);
  2038. return c === 0x24 || c === 0x5F
  2039. }
  2040. /**
  2041. * Define a property.
  2042. */
  2043. function def (obj, key, val, enumerable) {
  2044. Object.defineProperty(obj, key, {
  2045. value: val,
  2046. enumerable: !!enumerable,
  2047. writable: true,
  2048. configurable: true
  2049. });
  2050. }
  2051. /**
  2052. * Parse simple path.
  2053. */
  2054. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  2055. function parsePath (path) {
  2056. if (bailRE.test(path)) {
  2057. return
  2058. }
  2059. var segments = path.split('.');
  2060. return function (obj) {
  2061. for (var i = 0; i < segments.length; i++) {
  2062. if (!obj) { return }
  2063. obj = obj[segments[i]];
  2064. }
  2065. return obj
  2066. }
  2067. }
  2068. /* */
  2069. // can we use __proto__?
  2070. var hasProto = '__proto__' in {};
  2071. // Browser environment sniffing
  2072. var inBrowser = typeof window !== 'undefined';
  2073. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  2074. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  2075. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  2076. var isIE = UA && /msie|trident/.test(UA);
  2077. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  2078. var isEdge = UA && UA.indexOf('edge/') > 0;
  2079. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  2080. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  2081. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  2082. var isPhantomJS = UA && /phantomjs/.test(UA);
  2083. var isFF = UA && UA.match(/firefox\/(\d+)/);
  2084. // Firefox has a "watch" function on Object.prototype...
  2085. var nativeWatch = ({}).watch;
  2086. if (inBrowser) {
  2087. try {
  2088. var opts = {};
  2089. Object.defineProperty(opts, 'passive', ({
  2090. get: function get () {
  2091. }
  2092. })); // https://github.com/facebook/flow/issues/285
  2093. window.addEventListener('test-passive', null, opts);
  2094. } catch (e) {}
  2095. }
  2096. // this needs to be lazy-evaled because vue may be required before
  2097. // vue-server-renderer can set VUE_ENV
  2098. var _isServer;
  2099. var isServerRendering = function () {
  2100. if (_isServer === undefined) {
  2101. /* istanbul ignore if */
  2102. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  2103. // detect presence of vue-server-renderer and avoid
  2104. // Webpack shimming the process
  2105. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  2106. } else {
  2107. _isServer = false;
  2108. }
  2109. }
  2110. return _isServer
  2111. };
  2112. // detect devtools
  2113. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  2114. /* istanbul ignore next */
  2115. function isNative (Ctor) {
  2116. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  2117. }
  2118. var hasSymbol =
  2119. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  2120. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  2121. var _Set;
  2122. /* istanbul ignore if */ // $flow-disable-line
  2123. if (typeof Set !== 'undefined' && isNative(Set)) {
  2124. // use native Set when available.
  2125. _Set = Set;
  2126. } else {
  2127. // a non-standard Set polyfill that only works with primitive keys.
  2128. _Set = /*@__PURE__*/(function () {
  2129. function Set () {
  2130. this.set = Object.create(null);
  2131. }
  2132. Set.prototype.has = function has (key) {
  2133. return this.set[key] === true
  2134. };
  2135. Set.prototype.add = function add (key) {
  2136. this.set[key] = true;
  2137. };
  2138. Set.prototype.clear = function clear () {
  2139. this.set = Object.create(null);
  2140. };
  2141. return Set;
  2142. }());
  2143. }
  2144. /* */
  2145. var warn = noop;
  2146. var tip = noop;
  2147. var generateComponentTrace = (noop); // work around flow check
  2148. var formatComponentName = (noop);
  2149. if (true) {
  2150. var hasConsole = typeof console !== 'undefined';
  2151. var classifyRE = /(?:^|[-_])(\w)/g;
  2152. var classify = function (str) { return str
  2153. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  2154. .replace(/[-_]/g, ''); };
  2155. warn = function (msg, vm) {
  2156. var trace = vm ? generateComponentTrace(vm) : '';
  2157. if (config.warnHandler) {
  2158. config.warnHandler.call(null, msg, vm, trace);
  2159. } else if (hasConsole && (!config.silent)) {
  2160. console.error(("[Vue warn]: " + msg + trace));
  2161. }
  2162. };
  2163. tip = function (msg, vm) {
  2164. if (hasConsole && (!config.silent)) {
  2165. console.warn("[Vue tip]: " + msg + (
  2166. vm ? generateComponentTrace(vm) : ''
  2167. ));
  2168. }
  2169. };
  2170. formatComponentName = function (vm, includeFile) {
  2171. if (vm.$root === vm) {
  2172. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  2173. return ('') + vm.$options.__file
  2174. }
  2175. return '<Root>'
  2176. }
  2177. var options = typeof vm === 'function' && vm.cid != null
  2178. ? vm.options
  2179. : vm._isVue
  2180. ? vm.$options || vm.constructor.options
  2181. : vm;
  2182. var name = options.name || options._componentTag;
  2183. var file = options.__file;
  2184. if (!name && file) {
  2185. var match = file.match(/([^/\\]+)\.vue$/);
  2186. name = match && match[1];
  2187. }
  2188. return (
  2189. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  2190. (file && includeFile !== false ? (" at " + file) : '')
  2191. )
  2192. };
  2193. var repeat = function (str, n) {
  2194. var res = '';
  2195. while (n) {
  2196. if (n % 2 === 1) { res += str; }
  2197. if (n > 1) { str += str; }
  2198. n >>= 1;
  2199. }
  2200. return res
  2201. };
  2202. generateComponentTrace = function (vm) {
  2203. if (vm._isVue && vm.$parent) {
  2204. var tree = [];
  2205. var currentRecursiveSequence = 0;
  2206. while (vm && vm.$options.name !== 'PageBody') {
  2207. if (tree.length > 0) {
  2208. var last = tree[tree.length - 1];
  2209. if (last.constructor === vm.constructor) {
  2210. currentRecursiveSequence++;
  2211. vm = vm.$parent;
  2212. continue
  2213. } else if (currentRecursiveSequence > 0) {
  2214. tree[tree.length - 1] = [last, currentRecursiveSequence];
  2215. currentRecursiveSequence = 0;
  2216. }
  2217. }
  2218. !vm.$options.isReserved && tree.push(vm);
  2219. vm = vm.$parent;
  2220. }
  2221. return '\n\nfound in\n\n' + tree
  2222. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  2223. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  2224. : formatComponentName(vm))); })
  2225. .join('\n')
  2226. } else {
  2227. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  2228. }
  2229. };
  2230. }
  2231. /* */
  2232. var uid = 0;
  2233. /**
  2234. * A dep is an observable that can have multiple
  2235. * directives subscribing to it.
  2236. */
  2237. var Dep = function Dep () {
  2238. this.id = uid++;
  2239. this.subs = [];
  2240. };
  2241. Dep.prototype.addSub = function addSub (sub) {
  2242. this.subs.push(sub);
  2243. };
  2244. Dep.prototype.removeSub = function removeSub (sub) {
  2245. remove(this.subs, sub);
  2246. };
  2247. Dep.prototype.depend = function depend () {
  2248. if (Dep.SharedObject.target) {
  2249. Dep.SharedObject.target.addDep(this);
  2250. }
  2251. };
  2252. Dep.prototype.notify = function notify () {
  2253. // stabilize the subscriber list first
  2254. var subs = this.subs.slice();
  2255. if ( true && !config.async) {
  2256. // subs aren't sorted in scheduler if not running async
  2257. // we need to sort them now to make sure they fire in correct
  2258. // order
  2259. subs.sort(function (a, b) { return a.id - b.id; });
  2260. }
  2261. for (var i = 0, l = subs.length; i < l; i++) {
  2262. subs[i].update();
  2263. }
  2264. };
  2265. // The current target watcher being evaluated.
  2266. // This is globally unique because only one watcher
  2267. // can be evaluated at a time.
  2268. // fixed by xxxxxx (nvue shared vuex)
  2269. /* eslint-disable no-undef */
  2270. Dep.SharedObject = {};
  2271. Dep.SharedObject.target = null;
  2272. Dep.SharedObject.targetStack = [];
  2273. function pushTarget (target) {
  2274. Dep.SharedObject.targetStack.push(target);
  2275. Dep.SharedObject.target = target;
  2276. Dep.target = target;
  2277. }
  2278. function popTarget () {
  2279. Dep.SharedObject.targetStack.pop();
  2280. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  2281. Dep.target = Dep.SharedObject.target;
  2282. }
  2283. /* */
  2284. var VNode = function VNode (
  2285. tag,
  2286. data,
  2287. children,
  2288. text,
  2289. elm,
  2290. context,
  2291. componentOptions,
  2292. asyncFactory
  2293. ) {
  2294. this.tag = tag;
  2295. this.data = data;
  2296. this.children = children;
  2297. this.text = text;
  2298. this.elm = elm;
  2299. this.ns = undefined;
  2300. this.context = context;
  2301. this.fnContext = undefined;
  2302. this.fnOptions = undefined;
  2303. this.fnScopeId = undefined;
  2304. this.key = data && data.key;
  2305. this.componentOptions = componentOptions;
  2306. this.componentInstance = undefined;
  2307. this.parent = undefined;
  2308. this.raw = false;
  2309. this.isStatic = false;
  2310. this.isRootInsert = true;
  2311. this.isComment = false;
  2312. this.isCloned = false;
  2313. this.isOnce = false;
  2314. this.asyncFactory = asyncFactory;
  2315. this.asyncMeta = undefined;
  2316. this.isAsyncPlaceholder = false;
  2317. };
  2318. var prototypeAccessors = { child: { configurable: true } };
  2319. // DEPRECATED: alias for componentInstance for backwards compat.
  2320. /* istanbul ignore next */
  2321. prototypeAccessors.child.get = function () {
  2322. return this.componentInstance
  2323. };
  2324. Object.defineProperties( VNode.prototype, prototypeAccessors );
  2325. var createEmptyVNode = function (text) {
  2326. if ( text === void 0 ) text = '';
  2327. var node = new VNode();
  2328. node.text = text;
  2329. node.isComment = true;
  2330. return node
  2331. };
  2332. function createTextVNode (val) {
  2333. return new VNode(undefined, undefined, undefined, String(val))
  2334. }
  2335. // optimized shallow clone
  2336. // used for static nodes and slot nodes because they may be reused across
  2337. // multiple renders, cloning them avoids errors when DOM manipulations rely
  2338. // on their elm reference.
  2339. function cloneVNode (vnode) {
  2340. var cloned = new VNode(
  2341. vnode.tag,
  2342. vnode.data,
  2343. // #7975
  2344. // clone children array to avoid mutating original in case of cloning
  2345. // a child.
  2346. vnode.children && vnode.children.slice(),
  2347. vnode.text,
  2348. vnode.elm,
  2349. vnode.context,
  2350. vnode.componentOptions,
  2351. vnode.asyncFactory
  2352. );
  2353. cloned.ns = vnode.ns;
  2354. cloned.isStatic = vnode.isStatic;
  2355. cloned.key = vnode.key;
  2356. cloned.isComment = vnode.isComment;
  2357. cloned.fnContext = vnode.fnContext;
  2358. cloned.fnOptions = vnode.fnOptions;
  2359. cloned.fnScopeId = vnode.fnScopeId;
  2360. cloned.asyncMeta = vnode.asyncMeta;
  2361. cloned.isCloned = true;
  2362. return cloned
  2363. }
  2364. /*
  2365. * not type checking this file because flow doesn't play well with
  2366. * dynamically accessing methods on Array prototype
  2367. */
  2368. var arrayProto = Array.prototype;
  2369. var arrayMethods = Object.create(arrayProto);
  2370. var methodsToPatch = [
  2371. 'push',
  2372. 'pop',
  2373. 'shift',
  2374. 'unshift',
  2375. 'splice',
  2376. 'sort',
  2377. 'reverse'
  2378. ];
  2379. /**
  2380. * Intercept mutating methods and emit events
  2381. */
  2382. methodsToPatch.forEach(function (method) {
  2383. // cache original method
  2384. var original = arrayProto[method];
  2385. def(arrayMethods, method, function mutator () {
  2386. var args = [], len = arguments.length;
  2387. while ( len-- ) args[ len ] = arguments[ len ];
  2388. var result = original.apply(this, args);
  2389. var ob = this.__ob__;
  2390. var inserted;
  2391. switch (method) {
  2392. case 'push':
  2393. case 'unshift':
  2394. inserted = args;
  2395. break
  2396. case 'splice':
  2397. inserted = args.slice(2);
  2398. break
  2399. }
  2400. if (inserted) { ob.observeArray(inserted); }
  2401. // notify change
  2402. ob.dep.notify();
  2403. return result
  2404. });
  2405. });
  2406. /* */
  2407. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  2408. /**
  2409. * In some cases we may want to disable observation inside a component's
  2410. * update computation.
  2411. */
  2412. var shouldObserve = true;
  2413. function toggleObserving (value) {
  2414. shouldObserve = value;
  2415. }
  2416. /**
  2417. * Observer class that is attached to each observed
  2418. * object. Once attached, the observer converts the target
  2419. * object's property keys into getter/setters that
  2420. * collect dependencies and dispatch updates.
  2421. */
  2422. var Observer = function Observer (value) {
  2423. this.value = value;
  2424. this.dep = new Dep();
  2425. this.vmCount = 0;
  2426. def(value, '__ob__', this);
  2427. if (Array.isArray(value)) {
  2428. if (hasProto) {
  2429. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  2430. if(value.push !== value.__proto__.push){
  2431. copyAugment(value, arrayMethods, arrayKeys);
  2432. } else {
  2433. protoAugment(value, arrayMethods);
  2434. }
  2435. }
  2436. } else {
  2437. copyAugment(value, arrayMethods, arrayKeys);
  2438. }
  2439. this.observeArray(value);
  2440. } else {
  2441. this.walk(value);
  2442. }
  2443. };
  2444. /**
  2445. * Walk through all properties and convert them into
  2446. * getter/setters. This method should only be called when
  2447. * value type is Object.
  2448. */
  2449. Observer.prototype.walk = function walk (obj) {
  2450. var keys = Object.keys(obj);
  2451. for (var i = 0; i < keys.length; i++) {
  2452. defineReactive$$1(obj, keys[i]);
  2453. }
  2454. };
  2455. /**
  2456. * Observe a list of Array items.
  2457. */
  2458. Observer.prototype.observeArray = function observeArray (items) {
  2459. for (var i = 0, l = items.length; i < l; i++) {
  2460. observe(items[i]);
  2461. }
  2462. };
  2463. // helpers
  2464. /**
  2465. * Augment a target Object or Array by intercepting
  2466. * the prototype chain using __proto__
  2467. */
  2468. function protoAugment (target, src) {
  2469. /* eslint-disable no-proto */
  2470. target.__proto__ = src;
  2471. /* eslint-enable no-proto */
  2472. }
  2473. /**
  2474. * Augment a target Object or Array by defining
  2475. * hidden properties.
  2476. */
  2477. /* istanbul ignore next */
  2478. function copyAugment (target, src, keys) {
  2479. for (var i = 0, l = keys.length; i < l; i++) {
  2480. var key = keys[i];
  2481. def(target, key, src[key]);
  2482. }
  2483. }
  2484. /**
  2485. * Attempt to create an observer instance for a value,
  2486. * returns the new observer if successfully observed,
  2487. * or the existing observer if the value already has one.
  2488. */
  2489. function observe (value, asRootData) {
  2490. if (!isObject(value) || value instanceof VNode) {
  2491. return
  2492. }
  2493. var ob;
  2494. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  2495. ob = value.__ob__;
  2496. } else if (
  2497. shouldObserve &&
  2498. !isServerRendering() &&
  2499. (Array.isArray(value) || isPlainObject(value)) &&
  2500. Object.isExtensible(value) &&
  2501. !value._isVue
  2502. ) {
  2503. ob = new Observer(value);
  2504. }
  2505. if (asRootData && ob) {
  2506. ob.vmCount++;
  2507. }
  2508. return ob
  2509. }
  2510. /**
  2511. * Define a reactive property on an Object.
  2512. */
  2513. function defineReactive$$1 (
  2514. obj,
  2515. key,
  2516. val,
  2517. customSetter,
  2518. shallow
  2519. ) {
  2520. var dep = new Dep();
  2521. var property = Object.getOwnPropertyDescriptor(obj, key);
  2522. if (property && property.configurable === false) {
  2523. return
  2524. }
  2525. // cater for pre-defined getter/setters
  2526. var getter = property && property.get;
  2527. var setter = property && property.set;
  2528. if ((!getter || setter) && arguments.length === 2) {
  2529. val = obj[key];
  2530. }
  2531. var childOb = !shallow && observe(val);
  2532. Object.defineProperty(obj, key, {
  2533. enumerable: true,
  2534. configurable: true,
  2535. get: function reactiveGetter () {
  2536. var value = getter ? getter.call(obj) : val;
  2537. if (Dep.SharedObject.target) { // fixed by xxxxxx
  2538. dep.depend();
  2539. if (childOb) {
  2540. childOb.dep.depend();
  2541. if (Array.isArray(value)) {
  2542. dependArray(value);
  2543. }
  2544. }
  2545. }
  2546. return value
  2547. },
  2548. set: function reactiveSetter (newVal) {
  2549. var value = getter ? getter.call(obj) : val;
  2550. /* eslint-disable no-self-compare */
  2551. if (newVal === value || (newVal !== newVal && value !== value)) {
  2552. return
  2553. }
  2554. /* eslint-enable no-self-compare */
  2555. if ( true && customSetter) {
  2556. customSetter();
  2557. }
  2558. // #7981: for accessor properties without setter
  2559. if (getter && !setter) { return }
  2560. if (setter) {
  2561. setter.call(obj, newVal);
  2562. } else {
  2563. val = newVal;
  2564. }
  2565. childOb = !shallow && observe(newVal);
  2566. dep.notify();
  2567. }
  2568. });
  2569. }
  2570. /**
  2571. * Set a property on an object. Adds the new property and
  2572. * triggers change notification if the property doesn't
  2573. * already exist.
  2574. */
  2575. function set (target, key, val) {
  2576. if ( true &&
  2577. (isUndef(target) || isPrimitive(target))
  2578. ) {
  2579. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  2580. }
  2581. if (Array.isArray(target) && isValidArrayIndex(key)) {
  2582. target.length = Math.max(target.length, key);
  2583. target.splice(key, 1, val);
  2584. return val
  2585. }
  2586. if (key in target && !(key in Object.prototype)) {
  2587. target[key] = val;
  2588. return val
  2589. }
  2590. var ob = (target).__ob__;
  2591. if (target._isVue || (ob && ob.vmCount)) {
  2592. true && warn(
  2593. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  2594. 'at runtime - declare it upfront in the data option.'
  2595. );
  2596. return val
  2597. }
  2598. if (!ob) {
  2599. target[key] = val;
  2600. return val
  2601. }
  2602. defineReactive$$1(ob.value, key, val);
  2603. ob.dep.notify();
  2604. return val
  2605. }
  2606. /**
  2607. * Delete a property and trigger change if necessary.
  2608. */
  2609. function del (target, key) {
  2610. if ( true &&
  2611. (isUndef(target) || isPrimitive(target))
  2612. ) {
  2613. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  2614. }
  2615. if (Array.isArray(target) && isValidArrayIndex(key)) {
  2616. target.splice(key, 1);
  2617. return
  2618. }
  2619. var ob = (target).__ob__;
  2620. if (target._isVue || (ob && ob.vmCount)) {
  2621. true && warn(
  2622. 'Avoid deleting properties on a Vue instance or its root $data ' +
  2623. '- just set it to null.'
  2624. );
  2625. return
  2626. }
  2627. if (!hasOwn(target, key)) {
  2628. return
  2629. }
  2630. delete target[key];
  2631. if (!ob) {
  2632. return
  2633. }
  2634. ob.dep.notify();
  2635. }
  2636. /**
  2637. * Collect dependencies on array elements when the array is touched, since
  2638. * we cannot intercept array element access like property getters.
  2639. */
  2640. function dependArray (value) {
  2641. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  2642. e = value[i];
  2643. e && e.__ob__ && e.__ob__.dep.depend();
  2644. if (Array.isArray(e)) {
  2645. dependArray(e);
  2646. }
  2647. }
  2648. }
  2649. /* */
  2650. /**
  2651. * Option overwriting strategies are functions that handle
  2652. * how to merge a parent option value and a child option
  2653. * value into the final value.
  2654. */
  2655. var strats = config.optionMergeStrategies;
  2656. /**
  2657. * Options with restrictions
  2658. */
  2659. if (true) {
  2660. strats.el = strats.propsData = function (parent, child, vm, key) {
  2661. if (!vm) {
  2662. warn(
  2663. "option \"" + key + "\" can only be used during instance " +
  2664. 'creation with the `new` keyword.'
  2665. );
  2666. }
  2667. return defaultStrat(parent, child)
  2668. };
  2669. }
  2670. /**
  2671. * Helper that recursively merges two data objects together.
  2672. */
  2673. function mergeData (to, from) {
  2674. if (!from) { return to }
  2675. var key, toVal, fromVal;
  2676. var keys = hasSymbol
  2677. ? Reflect.ownKeys(from)
  2678. : Object.keys(from);
  2679. for (var i = 0; i < keys.length; i++) {
  2680. key = keys[i];
  2681. // in case the object is already observed...
  2682. if (key === '__ob__') { continue }
  2683. toVal = to[key];
  2684. fromVal = from[key];
  2685. if (!hasOwn(to, key)) {
  2686. set(to, key, fromVal);
  2687. } else if (
  2688. toVal !== fromVal &&
  2689. isPlainObject(toVal) &&
  2690. isPlainObject(fromVal)
  2691. ) {
  2692. mergeData(toVal, fromVal);
  2693. }
  2694. }
  2695. return to
  2696. }
  2697. /**
  2698. * Data
  2699. */
  2700. function mergeDataOrFn (
  2701. parentVal,
  2702. childVal,
  2703. vm
  2704. ) {
  2705. if (!vm) {
  2706. // in a Vue.extend merge, both should be functions
  2707. if (!childVal) {
  2708. return parentVal
  2709. }
  2710. if (!parentVal) {
  2711. return childVal
  2712. }
  2713. // when parentVal & childVal are both present,
  2714. // we need to return a function that returns the
  2715. // merged result of both functions... no need to
  2716. // check if parentVal is a function here because
  2717. // it has to be a function to pass previous merges.
  2718. return function mergedDataFn () {
  2719. return mergeData(
  2720. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  2721. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  2722. )
  2723. }
  2724. } else {
  2725. return function mergedInstanceDataFn () {
  2726. // instance merge
  2727. var instanceData = typeof childVal === 'function'
  2728. ? childVal.call(vm, vm)
  2729. : childVal;
  2730. var defaultData = typeof parentVal === 'function'
  2731. ? parentVal.call(vm, vm)
  2732. : parentVal;
  2733. if (instanceData) {
  2734. return mergeData(instanceData, defaultData)
  2735. } else {
  2736. return defaultData
  2737. }
  2738. }
  2739. }
  2740. }
  2741. strats.data = function (
  2742. parentVal,
  2743. childVal,
  2744. vm
  2745. ) {
  2746. if (!vm) {
  2747. if (childVal && typeof childVal !== 'function') {
  2748. true && warn(
  2749. 'The "data" option should be a function ' +
  2750. 'that returns a per-instance value in component ' +
  2751. 'definitions.',
  2752. vm
  2753. );
  2754. return parentVal
  2755. }
  2756. return mergeDataOrFn(parentVal, childVal)
  2757. }
  2758. return mergeDataOrFn(parentVal, childVal, vm)
  2759. };
  2760. /**
  2761. * Hooks and props are merged as arrays.
  2762. */
  2763. function mergeHook (
  2764. parentVal,
  2765. childVal
  2766. ) {
  2767. var res = childVal
  2768. ? parentVal
  2769. ? parentVal.concat(childVal)
  2770. : Array.isArray(childVal)
  2771. ? childVal
  2772. : [childVal]
  2773. : parentVal;
  2774. return res
  2775. ? dedupeHooks(res)
  2776. : res
  2777. }
  2778. function dedupeHooks (hooks) {
  2779. var res = [];
  2780. for (var i = 0; i < hooks.length; i++) {
  2781. if (res.indexOf(hooks[i]) === -1) {
  2782. res.push(hooks[i]);
  2783. }
  2784. }
  2785. return res
  2786. }
  2787. LIFECYCLE_HOOKS.forEach(function (hook) {
  2788. strats[hook] = mergeHook;
  2789. });
  2790. /**
  2791. * Assets
  2792. *
  2793. * When a vm is present (instance creation), we need to do
  2794. * a three-way merge between constructor options, instance
  2795. * options and parent options.
  2796. */
  2797. function mergeAssets (
  2798. parentVal,
  2799. childVal,
  2800. vm,
  2801. key
  2802. ) {
  2803. var res = Object.create(parentVal || null);
  2804. if (childVal) {
  2805. true && assertObjectType(key, childVal, vm);
  2806. return extend(res, childVal)
  2807. } else {
  2808. return res
  2809. }
  2810. }
  2811. ASSET_TYPES.forEach(function (type) {
  2812. strats[type + 's'] = mergeAssets;
  2813. });
  2814. /**
  2815. * Watchers.
  2816. *
  2817. * Watchers hashes should not overwrite one
  2818. * another, so we merge them as arrays.
  2819. */
  2820. strats.watch = function (
  2821. parentVal,
  2822. childVal,
  2823. vm,
  2824. key
  2825. ) {
  2826. // work around Firefox's Object.prototype.watch...
  2827. if (parentVal === nativeWatch) { parentVal = undefined; }
  2828. if (childVal === nativeWatch) { childVal = undefined; }
  2829. /* istanbul ignore if */
  2830. if (!childVal) { return Object.create(parentVal || null) }
  2831. if (true) {
  2832. assertObjectType(key, childVal, vm);
  2833. }
  2834. if (!parentVal) { return childVal }
  2835. var ret = {};
  2836. extend(ret, parentVal);
  2837. for (var key$1 in childVal) {
  2838. var parent = ret[key$1];
  2839. var child = childVal[key$1];
  2840. if (parent && !Array.isArray(parent)) {
  2841. parent = [parent];
  2842. }
  2843. ret[key$1] = parent
  2844. ? parent.concat(child)
  2845. : Array.isArray(child) ? child : [child];
  2846. }
  2847. return ret
  2848. };
  2849. /**
  2850. * Other object hashes.
  2851. */
  2852. strats.props =
  2853. strats.methods =
  2854. strats.inject =
  2855. strats.computed = function (
  2856. parentVal,
  2857. childVal,
  2858. vm,
  2859. key
  2860. ) {
  2861. if (childVal && "development" !== 'production') {
  2862. assertObjectType(key, childVal, vm);
  2863. }
  2864. if (!parentVal) { return childVal }
  2865. var ret = Object.create(null);
  2866. extend(ret, parentVal);
  2867. if (childVal) { extend(ret, childVal); }
  2868. return ret
  2869. };
  2870. strats.provide = mergeDataOrFn;
  2871. /**
  2872. * Default strategy.
  2873. */
  2874. var defaultStrat = function (parentVal, childVal) {
  2875. return childVal === undefined
  2876. ? parentVal
  2877. : childVal
  2878. };
  2879. /**
  2880. * Validate component names
  2881. */
  2882. function checkComponents (options) {
  2883. for (var key in options.components) {
  2884. validateComponentName(key);
  2885. }
  2886. }
  2887. function validateComponentName (name) {
  2888. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  2889. warn(
  2890. 'Invalid component name: "' + name + '". Component names ' +
  2891. 'should conform to valid custom element name in html5 specification.'
  2892. );
  2893. }
  2894. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  2895. warn(
  2896. 'Do not use built-in or reserved HTML elements as component ' +
  2897. 'id: ' + name
  2898. );
  2899. }
  2900. }
  2901. /**
  2902. * Ensure all props option syntax are normalized into the
  2903. * Object-based format.
  2904. */
  2905. function normalizeProps (options, vm) {
  2906. var props = options.props;
  2907. if (!props) { return }
  2908. var res = {};
  2909. var i, val, name;
  2910. if (Array.isArray(props)) {
  2911. i = props.length;
  2912. while (i--) {
  2913. val = props[i];
  2914. if (typeof val === 'string') {
  2915. name = camelize(val);
  2916. res[name] = { type: null };
  2917. } else if (true) {
  2918. warn('props must be strings when using array syntax.');
  2919. }
  2920. }
  2921. } else if (isPlainObject(props)) {
  2922. for (var key in props) {
  2923. val = props[key];
  2924. name = camelize(key);
  2925. res[name] = isPlainObject(val)
  2926. ? val
  2927. : { type: val };
  2928. }
  2929. } else if (true) {
  2930. warn(
  2931. "Invalid value for option \"props\": expected an Array or an Object, " +
  2932. "but got " + (toRawType(props)) + ".",
  2933. vm
  2934. );
  2935. }
  2936. options.props = res;
  2937. }
  2938. /**
  2939. * Normalize all injections into Object-based format
  2940. */
  2941. function normalizeInject (options, vm) {
  2942. var inject = options.inject;
  2943. if (!inject) { return }
  2944. var normalized = options.inject = {};
  2945. if (Array.isArray(inject)) {
  2946. for (var i = 0; i < inject.length; i++) {
  2947. normalized[inject[i]] = { from: inject[i] };
  2948. }
  2949. } else if (isPlainObject(inject)) {
  2950. for (var key in inject) {
  2951. var val = inject[key];
  2952. normalized[key] = isPlainObject(val)
  2953. ? extend({ from: key }, val)
  2954. : { from: val };
  2955. }
  2956. } else if (true) {
  2957. warn(
  2958. "Invalid value for option \"inject\": expected an Array or an Object, " +
  2959. "but got " + (toRawType(inject)) + ".",
  2960. vm
  2961. );
  2962. }
  2963. }
  2964. /**
  2965. * Normalize raw function directives into object format.
  2966. */
  2967. function normalizeDirectives (options) {
  2968. var dirs = options.directives;
  2969. if (dirs) {
  2970. for (var key in dirs) {
  2971. var def$$1 = dirs[key];
  2972. if (typeof def$$1 === 'function') {
  2973. dirs[key] = { bind: def$$1, update: def$$1 };
  2974. }
  2975. }
  2976. }
  2977. }
  2978. function assertObjectType (name, value, vm) {
  2979. if (!isPlainObject(value)) {
  2980. warn(
  2981. "Invalid value for option \"" + name + "\": expected an Object, " +
  2982. "but got " + (toRawType(value)) + ".",
  2983. vm
  2984. );
  2985. }
  2986. }
  2987. /**
  2988. * Merge two option objects into a new one.
  2989. * Core utility used in both instantiation and inheritance.
  2990. */
  2991. function mergeOptions (
  2992. parent,
  2993. child,
  2994. vm
  2995. ) {
  2996. if (true) {
  2997. checkComponents(child);
  2998. }
  2999. if (typeof child === 'function') {
  3000. child = child.options;
  3001. }
  3002. normalizeProps(child, vm);
  3003. normalizeInject(child, vm);
  3004. normalizeDirectives(child);
  3005. // Apply extends and mixins on the child options,
  3006. // but only if it is a raw options object that isn't
  3007. // the result of another mergeOptions call.
  3008. // Only merged options has the _base property.
  3009. if (!child._base) {
  3010. if (child.extends) {
  3011. parent = mergeOptions(parent, child.extends, vm);
  3012. }
  3013. if (child.mixins) {
  3014. for (var i = 0, l = child.mixins.length; i < l; i++) {
  3015. parent = mergeOptions(parent, child.mixins[i], vm);
  3016. }
  3017. }
  3018. }
  3019. var options = {};
  3020. var key;
  3021. for (key in parent) {
  3022. mergeField(key);
  3023. }
  3024. for (key in child) {
  3025. if (!hasOwn(parent, key)) {
  3026. mergeField(key);
  3027. }
  3028. }
  3029. function mergeField (key) {
  3030. var strat = strats[key] || defaultStrat;
  3031. options[key] = strat(parent[key], child[key], vm, key);
  3032. }
  3033. return options
  3034. }
  3035. /**
  3036. * Resolve an asset.
  3037. * This function is used because child instances need access
  3038. * to assets defined in its ancestor chain.
  3039. */
  3040. function resolveAsset (
  3041. options,
  3042. type,
  3043. id,
  3044. warnMissing
  3045. ) {
  3046. /* istanbul ignore if */
  3047. if (typeof id !== 'string') {
  3048. return
  3049. }
  3050. var assets = options[type];
  3051. // check local registration variations first
  3052. if (hasOwn(assets, id)) { return assets[id] }
  3053. var camelizedId = camelize(id);
  3054. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  3055. var PascalCaseId = capitalize(camelizedId);
  3056. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  3057. // fallback to prototype chain
  3058. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  3059. if ( true && warnMissing && !res) {
  3060. warn(
  3061. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  3062. options
  3063. );
  3064. }
  3065. return res
  3066. }
  3067. /* */
  3068. function validateProp (
  3069. key,
  3070. propOptions,
  3071. propsData,
  3072. vm
  3073. ) {
  3074. var prop = propOptions[key];
  3075. var absent = !hasOwn(propsData, key);
  3076. var value = propsData[key];
  3077. // boolean casting
  3078. var booleanIndex = getTypeIndex(Boolean, prop.type);
  3079. if (booleanIndex > -1) {
  3080. if (absent && !hasOwn(prop, 'default')) {
  3081. value = false;
  3082. } else if (value === '' || value === hyphenate(key)) {
  3083. // only cast empty string / same name to boolean if
  3084. // boolean has higher priority
  3085. var stringIndex = getTypeIndex(String, prop.type);
  3086. if (stringIndex < 0 || booleanIndex < stringIndex) {
  3087. value = true;
  3088. }
  3089. }
  3090. }
  3091. // check default value
  3092. if (value === undefined) {
  3093. value = getPropDefaultValue(vm, prop, key);
  3094. // since the default value is a fresh copy,
  3095. // make sure to observe it.
  3096. var prevShouldObserve = shouldObserve;
  3097. toggleObserving(true);
  3098. observe(value);
  3099. toggleObserving(prevShouldObserve);
  3100. }
  3101. if (
  3102. true
  3103. ) {
  3104. assertProp(prop, key, value, vm, absent);
  3105. }
  3106. return value
  3107. }
  3108. /**
  3109. * Get the default value of a prop.
  3110. */
  3111. function getPropDefaultValue (vm, prop, key) {
  3112. // no default, return undefined
  3113. if (!hasOwn(prop, 'default')) {
  3114. return undefined
  3115. }
  3116. var def = prop.default;
  3117. // warn against non-factory defaults for Object & Array
  3118. if ( true && isObject(def)) {
  3119. warn(
  3120. 'Invalid default value for prop "' + key + '": ' +
  3121. 'Props with type Object/Array must use a factory function ' +
  3122. 'to return the default value.',
  3123. vm
  3124. );
  3125. }
  3126. // the raw prop value was also undefined from previous render,
  3127. // return previous default value to avoid unnecessary watcher trigger
  3128. if (vm && vm.$options.propsData &&
  3129. vm.$options.propsData[key] === undefined &&
  3130. vm._props[key] !== undefined
  3131. ) {
  3132. return vm._props[key]
  3133. }
  3134. // call factory function for non-Function types
  3135. // a value is Function if its prototype is function even across different execution context
  3136. return typeof def === 'function' && getType(prop.type) !== 'Function'
  3137. ? def.call(vm)
  3138. : def
  3139. }
  3140. /**
  3141. * Assert whether a prop is valid.
  3142. */
  3143. function assertProp (
  3144. prop,
  3145. name,
  3146. value,
  3147. vm,
  3148. absent
  3149. ) {
  3150. if (prop.required && absent) {
  3151. warn(
  3152. 'Missing required prop: "' + name + '"',
  3153. vm
  3154. );
  3155. return
  3156. }
  3157. if (value == null && !prop.required) {
  3158. return
  3159. }
  3160. var type = prop.type;
  3161. var valid = !type || type === true;
  3162. var expectedTypes = [];
  3163. if (type) {
  3164. if (!Array.isArray(type)) {
  3165. type = [type];
  3166. }
  3167. for (var i = 0; i < type.length && !valid; i++) {
  3168. var assertedType = assertType(value, type[i]);
  3169. expectedTypes.push(assertedType.expectedType || '');
  3170. valid = assertedType.valid;
  3171. }
  3172. }
  3173. if (!valid) {
  3174. warn(
  3175. getInvalidTypeMessage(name, value, expectedTypes),
  3176. vm
  3177. );
  3178. return
  3179. }
  3180. var validator = prop.validator;
  3181. if (validator) {
  3182. if (!validator(value)) {
  3183. warn(
  3184. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  3185. vm
  3186. );
  3187. }
  3188. }
  3189. }
  3190. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  3191. function assertType (value, type) {
  3192. var valid;
  3193. var expectedType = getType(type);
  3194. if (simpleCheckRE.test(expectedType)) {
  3195. var t = typeof value;
  3196. valid = t === expectedType.toLowerCase();
  3197. // for primitive wrapper objects
  3198. if (!valid && t === 'object') {
  3199. valid = value instanceof type;
  3200. }
  3201. } else if (expectedType === 'Object') {
  3202. valid = isPlainObject(value);
  3203. } else if (expectedType === 'Array') {
  3204. valid = Array.isArray(value);
  3205. } else {
  3206. valid = value instanceof type;
  3207. }
  3208. return {
  3209. valid: valid,
  3210. expectedType: expectedType
  3211. }
  3212. }
  3213. /**
  3214. * Use function string name to check built-in types,
  3215. * because a simple equality check will fail when running
  3216. * across different vms / iframes.
  3217. */
  3218. function getType (fn) {
  3219. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  3220. return match ? match[1] : ''
  3221. }
  3222. function isSameType (a, b) {
  3223. return getType(a) === getType(b)
  3224. }
  3225. function getTypeIndex (type, expectedTypes) {
  3226. if (!Array.isArray(expectedTypes)) {
  3227. return isSameType(expectedTypes, type) ? 0 : -1
  3228. }
  3229. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  3230. if (isSameType(expectedTypes[i], type)) {
  3231. return i
  3232. }
  3233. }
  3234. return -1
  3235. }
  3236. function getInvalidTypeMessage (name, value, expectedTypes) {
  3237. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  3238. " Expected " + (expectedTypes.map(capitalize).join(', '));
  3239. var expectedType = expectedTypes[0];
  3240. var receivedType = toRawType(value);
  3241. var expectedValue = styleValue(value, expectedType);
  3242. var receivedValue = styleValue(value, receivedType);
  3243. // check if we need to specify expected value
  3244. if (expectedTypes.length === 1 &&
  3245. isExplicable(expectedType) &&
  3246. !isBoolean(expectedType, receivedType)) {
  3247. message += " with value " + expectedValue;
  3248. }
  3249. message += ", got " + receivedType + " ";
  3250. // check if we need to specify received value
  3251. if (isExplicable(receivedType)) {
  3252. message += "with value " + receivedValue + ".";
  3253. }
  3254. return message
  3255. }
  3256. function styleValue (value, type) {
  3257. if (type === 'String') {
  3258. return ("\"" + value + "\"")
  3259. } else if (type === 'Number') {
  3260. return ("" + (Number(value)))
  3261. } else {
  3262. return ("" + value)
  3263. }
  3264. }
  3265. function isExplicable (value) {
  3266. var explicitTypes = ['string', 'number', 'boolean'];
  3267. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  3268. }
  3269. function isBoolean () {
  3270. var args = [], len = arguments.length;
  3271. while ( len-- ) args[ len ] = arguments[ len ];
  3272. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  3273. }
  3274. /* */
  3275. function handleError (err, vm, info) {
  3276. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  3277. // See: https://github.com/vuejs/vuex/issues/1505
  3278. pushTarget();
  3279. try {
  3280. if (vm) {
  3281. var cur = vm;
  3282. while ((cur = cur.$parent)) {
  3283. var hooks = cur.$options.errorCaptured;
  3284. if (hooks) {
  3285. for (var i = 0; i < hooks.length; i++) {
  3286. try {
  3287. var capture = hooks[i].call(cur, err, vm, info) === false;
  3288. if (capture) { return }
  3289. } catch (e) {
  3290. globalHandleError(e, cur, 'errorCaptured hook');
  3291. }
  3292. }
  3293. }
  3294. }
  3295. }
  3296. globalHandleError(err, vm, info);
  3297. } finally {
  3298. popTarget();
  3299. }
  3300. }
  3301. function invokeWithErrorHandling (
  3302. handler,
  3303. context,
  3304. args,
  3305. vm,
  3306. info
  3307. ) {
  3308. var res;
  3309. try {
  3310. res = args ? handler.apply(context, args) : handler.call(context);
  3311. if (res && !res._isVue && isPromise(res) && !res._handled) {
  3312. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  3313. // issue #9511
  3314. // avoid catch triggering multiple times when nested calls
  3315. res._handled = true;
  3316. }
  3317. } catch (e) {
  3318. handleError(e, vm, info);
  3319. }
  3320. return res
  3321. }
  3322. function globalHandleError (err, vm, info) {
  3323. if (config.errorHandler) {
  3324. try {
  3325. return config.errorHandler.call(null, err, vm, info)
  3326. } catch (e) {
  3327. // if the user intentionally throws the original error in the handler,
  3328. // do not log it twice
  3329. if (e !== err) {
  3330. logError(e, null, 'config.errorHandler');
  3331. }
  3332. }
  3333. }
  3334. logError(err, vm, info);
  3335. }
  3336. function logError (err, vm, info) {
  3337. if (true) {
  3338. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  3339. }
  3340. /* istanbul ignore else */
  3341. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  3342. console.error(err);
  3343. } else {
  3344. throw err
  3345. }
  3346. }
  3347. /* */
  3348. var callbacks = [];
  3349. var pending = false;
  3350. function flushCallbacks () {
  3351. pending = false;
  3352. var copies = callbacks.slice(0);
  3353. callbacks.length = 0;
  3354. for (var i = 0; i < copies.length; i++) {
  3355. copies[i]();
  3356. }
  3357. }
  3358. // Here we have async deferring wrappers using microtasks.
  3359. // In 2.5 we used (macro) tasks (in combination with microtasks).
  3360. // However, it has subtle problems when state is changed right before repaint
  3361. // (e.g. #6813, out-in transitions).
  3362. // Also, using (macro) tasks in event handler would cause some weird behaviors
  3363. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  3364. // So we now use microtasks everywhere, again.
  3365. // A major drawback of this tradeoff is that there are some scenarios
  3366. // where microtasks have too high a priority and fire in between supposedly
  3367. // sequential events (e.g. #4521, #6690, which have workarounds)
  3368. // or even between bubbling of the same event (#6566).
  3369. var timerFunc;
  3370. // The nextTick behavior leverages the microtask queue, which can be accessed
  3371. // via either native Promise.then or MutationObserver.
  3372. // MutationObserver has wider support, however it is seriously bugged in
  3373. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  3374. // completely stops working after triggering a few times... so, if native
  3375. // Promise is available, we will use it:
  3376. /* istanbul ignore next, $flow-disable-line */
  3377. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  3378. var p = Promise.resolve();
  3379. timerFunc = function () {
  3380. p.then(flushCallbacks);
  3381. // In problematic UIWebViews, Promise.then doesn't completely break, but
  3382. // it can get stuck in a weird state where callbacks are pushed into the
  3383. // microtask queue but the queue isn't being flushed, until the browser
  3384. // needs to do some other work, e.g. handle a timer. Therefore we can
  3385. // "force" the microtask queue to be flushed by adding an empty timer.
  3386. if (isIOS) { setTimeout(noop); }
  3387. };
  3388. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  3389. isNative(MutationObserver) ||
  3390. // PhantomJS and iOS 7.x
  3391. MutationObserver.toString() === '[object MutationObserverConstructor]'
  3392. )) {
  3393. // Use MutationObserver where native Promise is not available,
  3394. // e.g. PhantomJS, iOS7, Android 4.4
  3395. // (#6466 MutationObserver is unreliable in IE11)
  3396. var counter = 1;
  3397. var observer = new MutationObserver(flushCallbacks);
  3398. var textNode = document.createTextNode(String(counter));
  3399. observer.observe(textNode, {
  3400. characterData: true
  3401. });
  3402. timerFunc = function () {
  3403. counter = (counter + 1) % 2;
  3404. textNode.data = String(counter);
  3405. };
  3406. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  3407. // Fallback to setImmediate.
  3408. // Technically it leverages the (macro) task queue,
  3409. // but it is still a better choice than setTimeout.
  3410. timerFunc = function () {
  3411. setImmediate(flushCallbacks);
  3412. };
  3413. } else {
  3414. // Fallback to setTimeout.
  3415. timerFunc = function () {
  3416. setTimeout(flushCallbacks, 0);
  3417. };
  3418. }
  3419. function nextTick (cb, ctx) {
  3420. var _resolve;
  3421. callbacks.push(function () {
  3422. if (cb) {
  3423. try {
  3424. cb.call(ctx);
  3425. } catch (e) {
  3426. handleError(e, ctx, 'nextTick');
  3427. }
  3428. } else if (_resolve) {
  3429. _resolve(ctx);
  3430. }
  3431. });
  3432. if (!pending) {
  3433. pending = true;
  3434. timerFunc();
  3435. }
  3436. // $flow-disable-line
  3437. if (!cb && typeof Promise !== 'undefined') {
  3438. return new Promise(function (resolve) {
  3439. _resolve = resolve;
  3440. })
  3441. }
  3442. }
  3443. /* */
  3444. /* not type checking this file because flow doesn't play well with Proxy */
  3445. var initProxy;
  3446. if (true) {
  3447. var allowedGlobals = makeMap(
  3448. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  3449. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  3450. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  3451. 'require' // for Webpack/Browserify
  3452. );
  3453. var warnNonPresent = function (target, key) {
  3454. warn(
  3455. "Property or method \"" + key + "\" is not defined on the instance but " +
  3456. 'referenced during render. Make sure that this property is reactive, ' +
  3457. 'either in the data option, or for class-based components, by ' +
  3458. 'initializing the property. ' +
  3459. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  3460. target
  3461. );
  3462. };
  3463. var warnReservedPrefix = function (target, key) {
  3464. warn(
  3465. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  3466. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  3467. 'prevent conflicts with Vue internals. ' +
  3468. 'See: https://vuejs.org/v2/api/#data',
  3469. target
  3470. );
  3471. };
  3472. var hasProxy =
  3473. typeof Proxy !== 'undefined' && isNative(Proxy);
  3474. if (hasProxy) {
  3475. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  3476. config.keyCodes = new Proxy(config.keyCodes, {
  3477. set: function set (target, key, value) {
  3478. if (isBuiltInModifier(key)) {
  3479. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  3480. return false
  3481. } else {
  3482. target[key] = value;
  3483. return true
  3484. }
  3485. }
  3486. });
  3487. }
  3488. var hasHandler = {
  3489. has: function has (target, key) {
  3490. var has = key in target;
  3491. var isAllowed = allowedGlobals(key) ||
  3492. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  3493. if (!has && !isAllowed) {
  3494. if (key in target.$data) { warnReservedPrefix(target, key); }
  3495. else { warnNonPresent(target, key); }
  3496. }
  3497. return has || !isAllowed
  3498. }
  3499. };
  3500. var getHandler = {
  3501. get: function get (target, key) {
  3502. if (typeof key === 'string' && !(key in target)) {
  3503. if (key in target.$data) { warnReservedPrefix(target, key); }
  3504. else { warnNonPresent(target, key); }
  3505. }
  3506. return target[key]
  3507. }
  3508. };
  3509. initProxy = function initProxy (vm) {
  3510. if (hasProxy) {
  3511. // determine which proxy handler to use
  3512. var options = vm.$options;
  3513. var handlers = options.render && options.render._withStripped
  3514. ? getHandler
  3515. : hasHandler;
  3516. vm._renderProxy = new Proxy(vm, handlers);
  3517. } else {
  3518. vm._renderProxy = vm;
  3519. }
  3520. };
  3521. }
  3522. /* */
  3523. var seenObjects = new _Set();
  3524. /**
  3525. * Recursively traverse an object to evoke all converted
  3526. * getters, so that every nested property inside the object
  3527. * is collected as a "deep" dependency.
  3528. */
  3529. function traverse (val) {
  3530. _traverse(val, seenObjects);
  3531. seenObjects.clear();
  3532. }
  3533. function _traverse (val, seen) {
  3534. var i, keys;
  3535. var isA = Array.isArray(val);
  3536. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  3537. return
  3538. }
  3539. if (val.__ob__) {
  3540. var depId = val.__ob__.dep.id;
  3541. if (seen.has(depId)) {
  3542. return
  3543. }
  3544. seen.add(depId);
  3545. }
  3546. if (isA) {
  3547. i = val.length;
  3548. while (i--) { _traverse(val[i], seen); }
  3549. } else {
  3550. keys = Object.keys(val);
  3551. i = keys.length;
  3552. while (i--) { _traverse(val[keys[i]], seen); }
  3553. }
  3554. }
  3555. var mark;
  3556. var measure;
  3557. if (true) {
  3558. var perf = inBrowser && window.performance;
  3559. /* istanbul ignore if */
  3560. if (
  3561. perf &&
  3562. perf.mark &&
  3563. perf.measure &&
  3564. perf.clearMarks &&
  3565. perf.clearMeasures
  3566. ) {
  3567. mark = function (tag) { return perf.mark(tag); };
  3568. measure = function (name, startTag, endTag) {
  3569. perf.measure(name, startTag, endTag);
  3570. perf.clearMarks(startTag);
  3571. perf.clearMarks(endTag);
  3572. // perf.clearMeasures(name)
  3573. };
  3574. }
  3575. }
  3576. /* */
  3577. var normalizeEvent = cached(function (name) {
  3578. var passive = name.charAt(0) === '&';
  3579. name = passive ? name.slice(1) : name;
  3580. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  3581. name = once$$1 ? name.slice(1) : name;
  3582. var capture = name.charAt(0) === '!';
  3583. name = capture ? name.slice(1) : name;
  3584. return {
  3585. name: name,
  3586. once: once$$1,
  3587. capture: capture,
  3588. passive: passive
  3589. }
  3590. });
  3591. function createFnInvoker (fns, vm) {
  3592. function invoker () {
  3593. var arguments$1 = arguments;
  3594. var fns = invoker.fns;
  3595. if (Array.isArray(fns)) {
  3596. var cloned = fns.slice();
  3597. for (var i = 0; i < cloned.length; i++) {
  3598. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  3599. }
  3600. } else {
  3601. // return handler return value for single handlers
  3602. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  3603. }
  3604. }
  3605. invoker.fns = fns;
  3606. return invoker
  3607. }
  3608. function updateListeners (
  3609. on,
  3610. oldOn,
  3611. add,
  3612. remove$$1,
  3613. createOnceHandler,
  3614. vm
  3615. ) {
  3616. var name, def$$1, cur, old, event;
  3617. for (name in on) {
  3618. def$$1 = cur = on[name];
  3619. old = oldOn[name];
  3620. event = normalizeEvent(name);
  3621. if (isUndef(cur)) {
  3622. true && warn(
  3623. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  3624. vm
  3625. );
  3626. } else if (isUndef(old)) {
  3627. if (isUndef(cur.fns)) {
  3628. cur = on[name] = createFnInvoker(cur, vm);
  3629. }
  3630. if (isTrue(event.once)) {
  3631. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  3632. }
  3633. add(event.name, cur, event.capture, event.passive, event.params);
  3634. } else if (cur !== old) {
  3635. old.fns = cur;
  3636. on[name] = old;
  3637. }
  3638. }
  3639. for (name in oldOn) {
  3640. if (isUndef(on[name])) {
  3641. event = normalizeEvent(name);
  3642. remove$$1(event.name, oldOn[name], event.capture);
  3643. }
  3644. }
  3645. }
  3646. /* */
  3647. /* */
  3648. // fixed by xxxxxx (mp properties)
  3649. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  3650. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  3651. if (isUndef(propOptions)) {
  3652. return res
  3653. }
  3654. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  3655. var attrs = data.attrs;
  3656. var props = data.props;
  3657. if (isDef(attrs) || isDef(props)) {
  3658. for (var key in propOptions) {
  3659. var altKey = hyphenate(key);
  3660. var result = checkProp(res, props, key, altKey, true) ||
  3661. checkProp(res, attrs, key, altKey, false);
  3662. // externalClass
  3663. if (
  3664. result &&
  3665. res[key] &&
  3666. externalClasses.indexOf(altKey) !== -1 &&
  3667. context[camelize(res[key])]
  3668. ) {
  3669. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  3670. res[key] = context[camelize(res[key])];
  3671. }
  3672. }
  3673. }
  3674. return res
  3675. }
  3676. function extractPropsFromVNodeData (
  3677. data,
  3678. Ctor,
  3679. tag,
  3680. context// fixed by xxxxxx
  3681. ) {
  3682. // we are only extracting raw values here.
  3683. // validation and default values are handled in the child
  3684. // component itself.
  3685. var propOptions = Ctor.options.props;
  3686. if (isUndef(propOptions)) {
  3687. // fixed by xxxxxx
  3688. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  3689. }
  3690. var res = {};
  3691. var attrs = data.attrs;
  3692. var props = data.props;
  3693. if (isDef(attrs) || isDef(props)) {
  3694. for (var key in propOptions) {
  3695. var altKey = hyphenate(key);
  3696. if (true) {
  3697. var keyInLowerCase = key.toLowerCase();
  3698. if (
  3699. key !== keyInLowerCase &&
  3700. attrs && hasOwn(attrs, keyInLowerCase)
  3701. ) {
  3702. tip(
  3703. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  3704. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  3705. " \"" + key + "\". " +
  3706. "Note that HTML attributes are case-insensitive and camelCased " +
  3707. "props need to use their kebab-case equivalents when using in-DOM " +
  3708. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  3709. );
  3710. }
  3711. }
  3712. checkProp(res, props, key, altKey, true) ||
  3713. checkProp(res, attrs, key, altKey, false);
  3714. }
  3715. }
  3716. // fixed by xxxxxx
  3717. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  3718. }
  3719. function checkProp (
  3720. res,
  3721. hash,
  3722. key,
  3723. altKey,
  3724. preserve
  3725. ) {
  3726. if (isDef(hash)) {
  3727. if (hasOwn(hash, key)) {
  3728. res[key] = hash[key];
  3729. if (!preserve) {
  3730. delete hash[key];
  3731. }
  3732. return true
  3733. } else if (hasOwn(hash, altKey)) {
  3734. res[key] = hash[altKey];
  3735. if (!preserve) {
  3736. delete hash[altKey];
  3737. }
  3738. return true
  3739. }
  3740. }
  3741. return false
  3742. }
  3743. /* */
  3744. // The template compiler attempts to minimize the need for normalization by
  3745. // statically analyzing the template at compile time.
  3746. //
  3747. // For plain HTML markup, normalization can be completely skipped because the
  3748. // generated render function is guaranteed to return Array<VNode>. There are
  3749. // two cases where extra normalization is needed:
  3750. // 1. When the children contains components - because a functional component
  3751. // may return an Array instead of a single root. In this case, just a simple
  3752. // normalization is needed - if any child is an Array, we flatten the whole
  3753. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  3754. // because functional components already normalize their own children.
  3755. function simpleNormalizeChildren (children) {
  3756. for (var i = 0; i < children.length; i++) {
  3757. if (Array.isArray(children[i])) {
  3758. return Array.prototype.concat.apply([], children)
  3759. }
  3760. }
  3761. return children
  3762. }
  3763. // 2. When the children contains constructs that always generated nested Arrays,
  3764. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  3765. // with hand-written render functions / JSX. In such cases a full normalization
  3766. // is needed to cater to all possible types of children values.
  3767. function normalizeChildren (children) {
  3768. return isPrimitive(children)
  3769. ? [createTextVNode(children)]
  3770. : Array.isArray(children)
  3771. ? normalizeArrayChildren(children)
  3772. : undefined
  3773. }
  3774. function isTextNode (node) {
  3775. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  3776. }
  3777. function normalizeArrayChildren (children, nestedIndex) {
  3778. var res = [];
  3779. var i, c, lastIndex, last;
  3780. for (i = 0; i < children.length; i++) {
  3781. c = children[i];
  3782. if (isUndef(c) || typeof c === 'boolean') { continue }
  3783. lastIndex = res.length - 1;
  3784. last = res[lastIndex];
  3785. // nested
  3786. if (Array.isArray(c)) {
  3787. if (c.length > 0) {
  3788. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  3789. // merge adjacent text nodes
  3790. if (isTextNode(c[0]) && isTextNode(last)) {
  3791. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  3792. c.shift();
  3793. }
  3794. res.push.apply(res, c);
  3795. }
  3796. } else if (isPrimitive(c)) {
  3797. if (isTextNode(last)) {
  3798. // merge adjacent text nodes
  3799. // this is necessary for SSR hydration because text nodes are
  3800. // essentially merged when rendered to HTML strings
  3801. res[lastIndex] = createTextVNode(last.text + c);
  3802. } else if (c !== '') {
  3803. // convert primitive to vnode
  3804. res.push(createTextVNode(c));
  3805. }
  3806. } else {
  3807. if (isTextNode(c) && isTextNode(last)) {
  3808. // merge adjacent text nodes
  3809. res[lastIndex] = createTextVNode(last.text + c.text);
  3810. } else {
  3811. // default key for nested array children (likely generated by v-for)
  3812. if (isTrue(children._isVList) &&
  3813. isDef(c.tag) &&
  3814. isUndef(c.key) &&
  3815. isDef(nestedIndex)) {
  3816. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  3817. }
  3818. res.push(c);
  3819. }
  3820. }
  3821. }
  3822. return res
  3823. }
  3824. /* */
  3825. function initProvide (vm) {
  3826. var provide = vm.$options.provide;
  3827. if (provide) {
  3828. vm._provided = typeof provide === 'function'
  3829. ? provide.call(vm)
  3830. : provide;
  3831. }
  3832. }
  3833. function initInjections (vm) {
  3834. var result = resolveInject(vm.$options.inject, vm);
  3835. if (result) {
  3836. toggleObserving(false);
  3837. Object.keys(result).forEach(function (key) {
  3838. /* istanbul ignore else */
  3839. if (true) {
  3840. defineReactive$$1(vm, key, result[key], function () {
  3841. warn(
  3842. "Avoid mutating an injected value directly since the changes will be " +
  3843. "overwritten whenever the provided component re-renders. " +
  3844. "injection being mutated: \"" + key + "\"",
  3845. vm
  3846. );
  3847. });
  3848. } else {}
  3849. });
  3850. toggleObserving(true);
  3851. }
  3852. }
  3853. function resolveInject (inject, vm) {
  3854. if (inject) {
  3855. // inject is :any because flow is not smart enough to figure out cached
  3856. var result = Object.create(null);
  3857. var keys = hasSymbol
  3858. ? Reflect.ownKeys(inject)
  3859. : Object.keys(inject);
  3860. for (var i = 0; i < keys.length; i++) {
  3861. var key = keys[i];
  3862. // #6574 in case the inject object is observed...
  3863. if (key === '__ob__') { continue }
  3864. var provideKey = inject[key].from;
  3865. var source = vm;
  3866. while (source) {
  3867. if (source._provided && hasOwn(source._provided, provideKey)) {
  3868. result[key] = source._provided[provideKey];
  3869. break
  3870. }
  3871. source = source.$parent;
  3872. }
  3873. if (!source) {
  3874. if ('default' in inject[key]) {
  3875. var provideDefault = inject[key].default;
  3876. result[key] = typeof provideDefault === 'function'
  3877. ? provideDefault.call(vm)
  3878. : provideDefault;
  3879. } else if (true) {
  3880. warn(("Injection \"" + key + "\" not found"), vm);
  3881. }
  3882. }
  3883. }
  3884. return result
  3885. }
  3886. }
  3887. /* */
  3888. /**
  3889. * Runtime helper for resolving raw children VNodes into a slot object.
  3890. */
  3891. function resolveSlots (
  3892. children,
  3893. context
  3894. ) {
  3895. if (!children || !children.length) {
  3896. return {}
  3897. }
  3898. var slots = {};
  3899. for (var i = 0, l = children.length; i < l; i++) {
  3900. var child = children[i];
  3901. var data = child.data;
  3902. // remove slot attribute if the node is resolved as a Vue slot node
  3903. if (data && data.attrs && data.attrs.slot) {
  3904. delete data.attrs.slot;
  3905. }
  3906. // named slots should only be respected if the vnode was rendered in the
  3907. // same context.
  3908. if ((child.context === context || child.fnContext === context) &&
  3909. data && data.slot != null
  3910. ) {
  3911. var name = data.slot;
  3912. var slot = (slots[name] || (slots[name] = []));
  3913. if (child.tag === 'template') {
  3914. slot.push.apply(slot, child.children || []);
  3915. } else {
  3916. slot.push(child);
  3917. }
  3918. } else {
  3919. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  3920. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  3921. (slots['page'] || (slots['page'] = [])).push(child);
  3922. }else{
  3923. (slots.default || (slots.default = [])).push(child);
  3924. }
  3925. }
  3926. }
  3927. // ignore slots that contains only whitespace
  3928. for (var name$1 in slots) {
  3929. if (slots[name$1].every(isWhitespace)) {
  3930. delete slots[name$1];
  3931. }
  3932. }
  3933. return slots
  3934. }
  3935. function isWhitespace (node) {
  3936. return (node.isComment && !node.asyncFactory) || node.text === ' '
  3937. }
  3938. /* */
  3939. function normalizeScopedSlots (
  3940. slots,
  3941. normalSlots,
  3942. prevSlots
  3943. ) {
  3944. var res;
  3945. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  3946. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  3947. var key = slots && slots.$key;
  3948. if (!slots) {
  3949. res = {};
  3950. } else if (slots._normalized) {
  3951. // fast path 1: child component re-render only, parent did not change
  3952. return slots._normalized
  3953. } else if (
  3954. isStable &&
  3955. prevSlots &&
  3956. prevSlots !== emptyObject &&
  3957. key === prevSlots.$key &&
  3958. !hasNormalSlots &&
  3959. !prevSlots.$hasNormal
  3960. ) {
  3961. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  3962. // only need to normalize once
  3963. return prevSlots
  3964. } else {
  3965. res = {};
  3966. for (var key$1 in slots) {
  3967. if (slots[key$1] && key$1[0] !== '$') {
  3968. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  3969. }
  3970. }
  3971. }
  3972. // expose normal slots on scopedSlots
  3973. for (var key$2 in normalSlots) {
  3974. if (!(key$2 in res)) {
  3975. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  3976. }
  3977. }
  3978. // avoriaz seems to mock a non-extensible $scopedSlots object
  3979. // and when that is passed down this would cause an error
  3980. if (slots && Object.isExtensible(slots)) {
  3981. (slots)._normalized = res;
  3982. }
  3983. def(res, '$stable', isStable);
  3984. def(res, '$key', key);
  3985. def(res, '$hasNormal', hasNormalSlots);
  3986. return res
  3987. }
  3988. function normalizeScopedSlot(normalSlots, key, fn) {
  3989. var normalized = function () {
  3990. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  3991. res = res && typeof res === 'object' && !Array.isArray(res)
  3992. ? [res] // single vnode
  3993. : normalizeChildren(res);
  3994. return res && (
  3995. res.length === 0 ||
  3996. (res.length === 1 && res[0].isComment) // #9658
  3997. ) ? undefined
  3998. : res
  3999. };
  4000. // this is a slot using the new v-slot syntax without scope. although it is
  4001. // compiled as a scoped slot, render fn users would expect it to be present
  4002. // on this.$slots because the usage is semantically a normal slot.
  4003. if (fn.proxy) {
  4004. Object.defineProperty(normalSlots, key, {
  4005. get: normalized,
  4006. enumerable: true,
  4007. configurable: true
  4008. });
  4009. }
  4010. return normalized
  4011. }
  4012. function proxyNormalSlot(slots, key) {
  4013. return function () { return slots[key]; }
  4014. }
  4015. /* */
  4016. /**
  4017. * Runtime helper for rendering v-for lists.
  4018. */
  4019. function renderList (
  4020. val,
  4021. render
  4022. ) {
  4023. var ret, i, l, keys, key;
  4024. if (Array.isArray(val) || typeof val === 'string') {
  4025. ret = new Array(val.length);
  4026. for (i = 0, l = val.length; i < l; i++) {
  4027. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  4028. }
  4029. } else if (typeof val === 'number') {
  4030. ret = new Array(val);
  4031. for (i = 0; i < val; i++) {
  4032. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  4033. }
  4034. } else if (isObject(val)) {
  4035. if (hasSymbol && val[Symbol.iterator]) {
  4036. ret = [];
  4037. var iterator = val[Symbol.iterator]();
  4038. var result = iterator.next();
  4039. while (!result.done) {
  4040. ret.push(render(result.value, ret.length, i++, i)); // fixed by xxxxxx
  4041. result = iterator.next();
  4042. }
  4043. } else {
  4044. keys = Object.keys(val);
  4045. ret = new Array(keys.length);
  4046. for (i = 0, l = keys.length; i < l; i++) {
  4047. key = keys[i];
  4048. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  4049. }
  4050. }
  4051. }
  4052. if (!isDef(ret)) {
  4053. ret = [];
  4054. }
  4055. (ret)._isVList = true;
  4056. return ret
  4057. }
  4058. /* */
  4059. /**
  4060. * Runtime helper for rendering <slot>
  4061. */
  4062. function renderSlot (
  4063. name,
  4064. fallback,
  4065. props,
  4066. bindObject
  4067. ) {
  4068. var scopedSlotFn = this.$scopedSlots[name];
  4069. var nodes;
  4070. if (scopedSlotFn) { // scoped slot
  4071. props = props || {};
  4072. if (bindObject) {
  4073. if ( true && !isObject(bindObject)) {
  4074. warn(
  4075. 'slot v-bind without argument expects an Object',
  4076. this
  4077. );
  4078. }
  4079. props = extend(extend({}, bindObject), props);
  4080. }
  4081. // fixed by xxxxxx app-plus scopedSlot
  4082. nodes = scopedSlotFn(props, this, props._i) || fallback;
  4083. } else {
  4084. nodes = this.$slots[name] || fallback;
  4085. }
  4086. var target = props && props.slot;
  4087. if (target) {
  4088. return this.$createElement('template', { slot: target }, nodes)
  4089. } else {
  4090. return nodes
  4091. }
  4092. }
  4093. /* */
  4094. /**
  4095. * Runtime helper for resolving filters
  4096. */
  4097. function resolveFilter (id) {
  4098. return resolveAsset(this.$options, 'filters', id, true) || identity
  4099. }
  4100. /* */
  4101. function isKeyNotMatch (expect, actual) {
  4102. if (Array.isArray(expect)) {
  4103. return expect.indexOf(actual) === -1
  4104. } else {
  4105. return expect !== actual
  4106. }
  4107. }
  4108. /**
  4109. * Runtime helper for checking keyCodes from config.
  4110. * exposed as Vue.prototype._k
  4111. * passing in eventKeyName as last argument separately for backwards compat
  4112. */
  4113. function checkKeyCodes (
  4114. eventKeyCode,
  4115. key,
  4116. builtInKeyCode,
  4117. eventKeyName,
  4118. builtInKeyName
  4119. ) {
  4120. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  4121. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  4122. return isKeyNotMatch(builtInKeyName, eventKeyName)
  4123. } else if (mappedKeyCode) {
  4124. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  4125. } else if (eventKeyName) {
  4126. return hyphenate(eventKeyName) !== key
  4127. }
  4128. }
  4129. /* */
  4130. /**
  4131. * Runtime helper for merging v-bind="object" into a VNode's data.
  4132. */
  4133. function bindObjectProps (
  4134. data,
  4135. tag,
  4136. value,
  4137. asProp,
  4138. isSync
  4139. ) {
  4140. if (value) {
  4141. if (!isObject(value)) {
  4142. true && warn(
  4143. 'v-bind without argument expects an Object or Array value',
  4144. this
  4145. );
  4146. } else {
  4147. if (Array.isArray(value)) {
  4148. value = toObject(value);
  4149. }
  4150. var hash;
  4151. var loop = function ( key ) {
  4152. if (
  4153. key === 'class' ||
  4154. key === 'style' ||
  4155. isReservedAttribute(key)
  4156. ) {
  4157. hash = data;
  4158. } else {
  4159. var type = data.attrs && data.attrs.type;
  4160. hash = asProp || config.mustUseProp(tag, type, key)
  4161. ? data.domProps || (data.domProps = {})
  4162. : data.attrs || (data.attrs = {});
  4163. }
  4164. var camelizedKey = camelize(key);
  4165. var hyphenatedKey = hyphenate(key);
  4166. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  4167. hash[key] = value[key];
  4168. if (isSync) {
  4169. var on = data.on || (data.on = {});
  4170. on[("update:" + key)] = function ($event) {
  4171. value[key] = $event;
  4172. };
  4173. }
  4174. }
  4175. };
  4176. for (var key in value) loop( key );
  4177. }
  4178. }
  4179. return data
  4180. }
  4181. /* */
  4182. /**
  4183. * Runtime helper for rendering static trees.
  4184. */
  4185. function renderStatic (
  4186. index,
  4187. isInFor
  4188. ) {
  4189. var cached = this._staticTrees || (this._staticTrees = []);
  4190. var tree = cached[index];
  4191. // if has already-rendered static tree and not inside v-for,
  4192. // we can reuse the same tree.
  4193. if (tree && !isInFor) {
  4194. return tree
  4195. }
  4196. // otherwise, render a fresh tree.
  4197. tree = cached[index] = this.$options.staticRenderFns[index].call(
  4198. this._renderProxy,
  4199. null,
  4200. this // for render fns generated for functional component templates
  4201. );
  4202. markStatic(tree, ("__static__" + index), false);
  4203. return tree
  4204. }
  4205. /**
  4206. * Runtime helper for v-once.
  4207. * Effectively it means marking the node as static with a unique key.
  4208. */
  4209. function markOnce (
  4210. tree,
  4211. index,
  4212. key
  4213. ) {
  4214. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  4215. return tree
  4216. }
  4217. function markStatic (
  4218. tree,
  4219. key,
  4220. isOnce
  4221. ) {
  4222. if (Array.isArray(tree)) {
  4223. for (var i = 0; i < tree.length; i++) {
  4224. if (tree[i] && typeof tree[i] !== 'string') {
  4225. markStaticNode(tree[i], (key + "_" + i), isOnce);
  4226. }
  4227. }
  4228. } else {
  4229. markStaticNode(tree, key, isOnce);
  4230. }
  4231. }
  4232. function markStaticNode (node, key, isOnce) {
  4233. node.isStatic = true;
  4234. node.key = key;
  4235. node.isOnce = isOnce;
  4236. }
  4237. /* */
  4238. function bindObjectListeners (data, value) {
  4239. if (value) {
  4240. if (!isPlainObject(value)) {
  4241. true && warn(
  4242. 'v-on without argument expects an Object value',
  4243. this
  4244. );
  4245. } else {
  4246. var on = data.on = data.on ? extend({}, data.on) : {};
  4247. for (var key in value) {
  4248. var existing = on[key];
  4249. var ours = value[key];
  4250. on[key] = existing ? [].concat(existing, ours) : ours;
  4251. }
  4252. }
  4253. }
  4254. return data
  4255. }
  4256. /* */
  4257. function resolveScopedSlots (
  4258. fns, // see flow/vnode
  4259. res,
  4260. // the following are added in 2.6
  4261. hasDynamicKeys,
  4262. contentHashKey
  4263. ) {
  4264. res = res || { $stable: !hasDynamicKeys };
  4265. for (var i = 0; i < fns.length; i++) {
  4266. var slot = fns[i];
  4267. if (Array.isArray(slot)) {
  4268. resolveScopedSlots(slot, res, hasDynamicKeys);
  4269. } else if (slot) {
  4270. // marker for reverse proxying v-slot without scope on this.$slots
  4271. if (slot.proxy) {
  4272. slot.fn.proxy = true;
  4273. }
  4274. res[slot.key] = slot.fn;
  4275. }
  4276. }
  4277. if (contentHashKey) {
  4278. (res).$key = contentHashKey;
  4279. }
  4280. return res
  4281. }
  4282. /* */
  4283. function bindDynamicKeys (baseObj, values) {
  4284. for (var i = 0; i < values.length; i += 2) {
  4285. var key = values[i];
  4286. if (typeof key === 'string' && key) {
  4287. baseObj[values[i]] = values[i + 1];
  4288. } else if ( true && key !== '' && key !== null) {
  4289. // null is a special value for explicitly removing a binding
  4290. warn(
  4291. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  4292. this
  4293. );
  4294. }
  4295. }
  4296. return baseObj
  4297. }
  4298. // helper to dynamically append modifier runtime markers to event names.
  4299. // ensure only append when value is already string, otherwise it will be cast
  4300. // to string and cause the type check to miss.
  4301. function prependModifier (value, symbol) {
  4302. return typeof value === 'string' ? symbol + value : value
  4303. }
  4304. /* */
  4305. function installRenderHelpers (target) {
  4306. target._o = markOnce;
  4307. target._n = toNumber;
  4308. target._s = toString;
  4309. target._l = renderList;
  4310. target._t = renderSlot;
  4311. target._q = looseEqual;
  4312. target._i = looseIndexOf;
  4313. target._m = renderStatic;
  4314. target._f = resolveFilter;
  4315. target._k = checkKeyCodes;
  4316. target._b = bindObjectProps;
  4317. target._v = createTextVNode;
  4318. target._e = createEmptyVNode;
  4319. target._u = resolveScopedSlots;
  4320. target._g = bindObjectListeners;
  4321. target._d = bindDynamicKeys;
  4322. target._p = prependModifier;
  4323. }
  4324. /* */
  4325. function FunctionalRenderContext (
  4326. data,
  4327. props,
  4328. children,
  4329. parent,
  4330. Ctor
  4331. ) {
  4332. var this$1 = this;
  4333. var options = Ctor.options;
  4334. // ensure the createElement function in functional components
  4335. // gets a unique context - this is necessary for correct named slot check
  4336. var contextVm;
  4337. if (hasOwn(parent, '_uid')) {
  4338. contextVm = Object.create(parent);
  4339. // $flow-disable-line
  4340. contextVm._original = parent;
  4341. } else {
  4342. // the context vm passed in is a functional context as well.
  4343. // in this case we want to make sure we are able to get a hold to the
  4344. // real context instance.
  4345. contextVm = parent;
  4346. // $flow-disable-line
  4347. parent = parent._original;
  4348. }
  4349. var isCompiled = isTrue(options._compiled);
  4350. var needNormalization = !isCompiled;
  4351. this.data = data;
  4352. this.props = props;
  4353. this.children = children;
  4354. this.parent = parent;
  4355. this.listeners = data.on || emptyObject;
  4356. this.injections = resolveInject(options.inject, parent);
  4357. this.slots = function () {
  4358. if (!this$1.$slots) {
  4359. normalizeScopedSlots(
  4360. data.scopedSlots,
  4361. this$1.$slots = resolveSlots(children, parent)
  4362. );
  4363. }
  4364. return this$1.$slots
  4365. };
  4366. Object.defineProperty(this, 'scopedSlots', ({
  4367. enumerable: true,
  4368. get: function get () {
  4369. return normalizeScopedSlots(data.scopedSlots, this.slots())
  4370. }
  4371. }));
  4372. // support for compiled functional template
  4373. if (isCompiled) {
  4374. // exposing $options for renderStatic()
  4375. this.$options = options;
  4376. // pre-resolve slots for renderSlot()
  4377. this.$slots = this.slots();
  4378. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  4379. }
  4380. if (options._scopeId) {
  4381. this._c = function (a, b, c, d) {
  4382. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  4383. if (vnode && !Array.isArray(vnode)) {
  4384. vnode.fnScopeId = options._scopeId;
  4385. vnode.fnContext = parent;
  4386. }
  4387. return vnode
  4388. };
  4389. } else {
  4390. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  4391. }
  4392. }
  4393. installRenderHelpers(FunctionalRenderContext.prototype);
  4394. function createFunctionalComponent (
  4395. Ctor,
  4396. propsData,
  4397. data,
  4398. contextVm,
  4399. children
  4400. ) {
  4401. var options = Ctor.options;
  4402. var props = {};
  4403. var propOptions = options.props;
  4404. if (isDef(propOptions)) {
  4405. for (var key in propOptions) {
  4406. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  4407. }
  4408. } else {
  4409. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  4410. if (isDef(data.props)) { mergeProps(props, data.props); }
  4411. }
  4412. var renderContext = new FunctionalRenderContext(
  4413. data,
  4414. props,
  4415. children,
  4416. contextVm,
  4417. Ctor
  4418. );
  4419. var vnode = options.render.call(null, renderContext._c, renderContext);
  4420. if (vnode instanceof VNode) {
  4421. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  4422. } else if (Array.isArray(vnode)) {
  4423. var vnodes = normalizeChildren(vnode) || [];
  4424. var res = new Array(vnodes.length);
  4425. for (var i = 0; i < vnodes.length; i++) {
  4426. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  4427. }
  4428. return res
  4429. }
  4430. }
  4431. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  4432. // #7817 clone node before setting fnContext, otherwise if the node is reused
  4433. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  4434. // that should not be matched to match.
  4435. var clone = cloneVNode(vnode);
  4436. clone.fnContext = contextVm;
  4437. clone.fnOptions = options;
  4438. if (true) {
  4439. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  4440. }
  4441. if (data.slot) {
  4442. (clone.data || (clone.data = {})).slot = data.slot;
  4443. }
  4444. return clone
  4445. }
  4446. function mergeProps (to, from) {
  4447. for (var key in from) {
  4448. to[camelize(key)] = from[key];
  4449. }
  4450. }
  4451. /* */
  4452. /* */
  4453. /* */
  4454. /* */
  4455. // inline hooks to be invoked on component VNodes during patch
  4456. var componentVNodeHooks = {
  4457. init: function init (vnode, hydrating) {
  4458. if (
  4459. vnode.componentInstance &&
  4460. !vnode.componentInstance._isDestroyed &&
  4461. vnode.data.keepAlive
  4462. ) {
  4463. // kept-alive components, treat as a patch
  4464. var mountedNode = vnode; // work around flow
  4465. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  4466. } else {
  4467. var child = vnode.componentInstance = createComponentInstanceForVnode(
  4468. vnode,
  4469. activeInstance
  4470. );
  4471. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  4472. }
  4473. },
  4474. prepatch: function prepatch (oldVnode, vnode) {
  4475. var options = vnode.componentOptions;
  4476. var child = vnode.componentInstance = oldVnode.componentInstance;
  4477. updateChildComponent(
  4478. child,
  4479. options.propsData, // updated props
  4480. options.listeners, // updated listeners
  4481. vnode, // new parent vnode
  4482. options.children // new children
  4483. );
  4484. },
  4485. insert: function insert (vnode) {
  4486. var context = vnode.context;
  4487. var componentInstance = vnode.componentInstance;
  4488. if (!componentInstance._isMounted) {
  4489. callHook(componentInstance, 'onServiceCreated');
  4490. callHook(componentInstance, 'onServiceAttached');
  4491. componentInstance._isMounted = true;
  4492. callHook(componentInstance, 'mounted');
  4493. }
  4494. if (vnode.data.keepAlive) {
  4495. if (context._isMounted) {
  4496. // vue-router#1212
  4497. // During updates, a kept-alive component's child components may
  4498. // change, so directly walking the tree here may call activated hooks
  4499. // on incorrect children. Instead we push them into a queue which will
  4500. // be processed after the whole patch process ended.
  4501. queueActivatedComponent(componentInstance);
  4502. } else {
  4503. activateChildComponent(componentInstance, true /* direct */);
  4504. }
  4505. }
  4506. },
  4507. destroy: function destroy (vnode) {
  4508. var componentInstance = vnode.componentInstance;
  4509. if (!componentInstance._isDestroyed) {
  4510. if (!vnode.data.keepAlive) {
  4511. componentInstance.$destroy();
  4512. } else {
  4513. deactivateChildComponent(componentInstance, true /* direct */);
  4514. }
  4515. }
  4516. }
  4517. };
  4518. var hooksToMerge = Object.keys(componentVNodeHooks);
  4519. function createComponent (
  4520. Ctor,
  4521. data,
  4522. context,
  4523. children,
  4524. tag
  4525. ) {
  4526. if (isUndef(Ctor)) {
  4527. return
  4528. }
  4529. var baseCtor = context.$options._base;
  4530. // plain options object: turn it into a constructor
  4531. if (isObject(Ctor)) {
  4532. Ctor = baseCtor.extend(Ctor);
  4533. }
  4534. // if at this stage it's not a constructor or an async component factory,
  4535. // reject.
  4536. if (typeof Ctor !== 'function') {
  4537. if (true) {
  4538. warn(("Invalid Component definition: " + (String(Ctor))), context);
  4539. }
  4540. return
  4541. }
  4542. // async component
  4543. var asyncFactory;
  4544. if (isUndef(Ctor.cid)) {
  4545. asyncFactory = Ctor;
  4546. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  4547. if (Ctor === undefined) {
  4548. // return a placeholder node for async component, which is rendered
  4549. // as a comment node but preserves all the raw information for the node.
  4550. // the information will be used for async server-rendering and hydration.
  4551. return createAsyncPlaceholder(
  4552. asyncFactory,
  4553. data,
  4554. context,
  4555. children,
  4556. tag
  4557. )
  4558. }
  4559. }
  4560. data = data || {};
  4561. // resolve constructor options in case global mixins are applied after
  4562. // component constructor creation
  4563. resolveConstructorOptions(Ctor);
  4564. // transform component v-model data into props & events
  4565. if (isDef(data.model)) {
  4566. transformModel(Ctor.options, data);
  4567. }
  4568. // extract props
  4569. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  4570. // functional component
  4571. if (isTrue(Ctor.options.functional)) {
  4572. return createFunctionalComponent(Ctor, propsData, data, context, children)
  4573. }
  4574. // extract listeners, since these needs to be treated as
  4575. // child component listeners instead of DOM listeners
  4576. var listeners = data.on;
  4577. // replace with listeners with .native modifier
  4578. // so it gets processed during parent component patch.
  4579. data.on = data.nativeOn;
  4580. if (isTrue(Ctor.options.abstract)) {
  4581. // abstract components do not keep anything
  4582. // other than props & listeners & slot
  4583. // work around flow
  4584. var slot = data.slot;
  4585. data = {};
  4586. if (slot) {
  4587. data.slot = slot;
  4588. }
  4589. }
  4590. // install component management hooks onto the placeholder node
  4591. installComponentHooks(data);
  4592. // return a placeholder vnode
  4593. var name = Ctor.options.name || tag;
  4594. var vnode = new VNode(
  4595. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  4596. data, undefined, undefined, undefined, context,
  4597. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  4598. asyncFactory
  4599. );
  4600. return vnode
  4601. }
  4602. function createComponentInstanceForVnode (
  4603. vnode, // we know it's MountedComponentVNode but flow doesn't
  4604. parent // activeInstance in lifecycle state
  4605. ) {
  4606. var options = {
  4607. _isComponent: true,
  4608. _parentVnode: vnode,
  4609. parent: parent
  4610. };
  4611. // check inline-template render functions
  4612. var inlineTemplate = vnode.data.inlineTemplate;
  4613. if (isDef(inlineTemplate)) {
  4614. options.render = inlineTemplate.render;
  4615. options.staticRenderFns = inlineTemplate.staticRenderFns;
  4616. }
  4617. return new vnode.componentOptions.Ctor(options)
  4618. }
  4619. function installComponentHooks (data) {
  4620. var hooks = data.hook || (data.hook = {});
  4621. for (var i = 0; i < hooksToMerge.length; i++) {
  4622. var key = hooksToMerge[i];
  4623. var existing = hooks[key];
  4624. var toMerge = componentVNodeHooks[key];
  4625. if (existing !== toMerge && !(existing && existing._merged)) {
  4626. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  4627. }
  4628. }
  4629. }
  4630. function mergeHook$1 (f1, f2) {
  4631. var merged = function (a, b) {
  4632. // flow complains about extra args which is why we use any
  4633. f1(a, b);
  4634. f2(a, b);
  4635. };
  4636. merged._merged = true;
  4637. return merged
  4638. }
  4639. // transform component v-model info (value and callback) into
  4640. // prop and event handler respectively.
  4641. function transformModel (options, data) {
  4642. var prop = (options.model && options.model.prop) || 'value';
  4643. var event = (options.model && options.model.event) || 'input'
  4644. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  4645. var on = data.on || (data.on = {});
  4646. var existing = on[event];
  4647. var callback = data.model.callback;
  4648. if (isDef(existing)) {
  4649. if (
  4650. Array.isArray(existing)
  4651. ? existing.indexOf(callback) === -1
  4652. : existing !== callback
  4653. ) {
  4654. on[event] = [callback].concat(existing);
  4655. }
  4656. } else {
  4657. on[event] = callback;
  4658. }
  4659. }
  4660. /* */
  4661. var SIMPLE_NORMALIZE = 1;
  4662. var ALWAYS_NORMALIZE = 2;
  4663. // wrapper function for providing a more flexible interface
  4664. // without getting yelled at by flow
  4665. function createElement (
  4666. context,
  4667. tag,
  4668. data,
  4669. children,
  4670. normalizationType,
  4671. alwaysNormalize
  4672. ) {
  4673. if (Array.isArray(data) || isPrimitive(data)) {
  4674. normalizationType = children;
  4675. children = data;
  4676. data = undefined;
  4677. }
  4678. if (isTrue(alwaysNormalize)) {
  4679. normalizationType = ALWAYS_NORMALIZE;
  4680. }
  4681. return _createElement(context, tag, data, children, normalizationType)
  4682. }
  4683. function _createElement (
  4684. context,
  4685. tag,
  4686. data,
  4687. children,
  4688. normalizationType
  4689. ) {
  4690. if (isDef(data) && isDef((data).__ob__)) {
  4691. true && warn(
  4692. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  4693. 'Always create fresh vnode data objects in each render!',
  4694. context
  4695. );
  4696. return createEmptyVNode()
  4697. }
  4698. // object syntax in v-bind
  4699. if (isDef(data) && isDef(data.is)) {
  4700. tag = data.is;
  4701. }
  4702. if (!tag) {
  4703. // in case of component :is set to falsy value
  4704. return createEmptyVNode()
  4705. }
  4706. // warn against non-primitive key
  4707. if ( true &&
  4708. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  4709. ) {
  4710. {
  4711. warn(
  4712. 'Avoid using non-primitive value as key, ' +
  4713. 'use string/number value instead.',
  4714. context
  4715. );
  4716. }
  4717. }
  4718. // support single function children as default scoped slot
  4719. if (Array.isArray(children) &&
  4720. typeof children[0] === 'function'
  4721. ) {
  4722. data = data || {};
  4723. data.scopedSlots = { default: children[0] };
  4724. children.length = 0;
  4725. }
  4726. if (normalizationType === ALWAYS_NORMALIZE) {
  4727. children = normalizeChildren(children);
  4728. } else if (normalizationType === SIMPLE_NORMALIZE) {
  4729. children = simpleNormalizeChildren(children);
  4730. }
  4731. var vnode, ns;
  4732. if (typeof tag === 'string') {
  4733. var Ctor;
  4734. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  4735. if (config.isReservedTag(tag)) {
  4736. // platform built-in elements
  4737. if ( true && isDef(data) && isDef(data.nativeOn)) {
  4738. warn(
  4739. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  4740. context
  4741. );
  4742. }
  4743. vnode = new VNode(
  4744. config.parsePlatformTagName(tag), data, children,
  4745. undefined, undefined, context
  4746. );
  4747. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  4748. // component
  4749. vnode = createComponent(Ctor, data, context, children, tag);
  4750. } else {
  4751. // unknown or unlisted namespaced elements
  4752. // check at runtime because it may get assigned a namespace when its
  4753. // parent normalizes children
  4754. vnode = new VNode(
  4755. tag, data, children,
  4756. undefined, undefined, context
  4757. );
  4758. }
  4759. } else {
  4760. // direct component options / constructor
  4761. vnode = createComponent(tag, data, context, children);
  4762. }
  4763. if (Array.isArray(vnode)) {
  4764. return vnode
  4765. } else if (isDef(vnode)) {
  4766. if (isDef(ns)) { applyNS(vnode, ns); }
  4767. if (isDef(data)) { registerDeepBindings(data); }
  4768. return vnode
  4769. } else {
  4770. return createEmptyVNode()
  4771. }
  4772. }
  4773. function applyNS (vnode, ns, force) {
  4774. vnode.ns = ns;
  4775. if (vnode.tag === 'foreignObject') {
  4776. // use default namespace inside foreignObject
  4777. ns = undefined;
  4778. force = true;
  4779. }
  4780. if (isDef(vnode.children)) {
  4781. for (var i = 0, l = vnode.children.length; i < l; i++) {
  4782. var child = vnode.children[i];
  4783. if (isDef(child.tag) && (
  4784. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  4785. applyNS(child, ns, force);
  4786. }
  4787. }
  4788. }
  4789. }
  4790. // ref #5318
  4791. // necessary to ensure parent re-render when deep bindings like :style and
  4792. // :class are used on slot nodes
  4793. function registerDeepBindings (data) {
  4794. if (isObject(data.style)) {
  4795. traverse(data.style);
  4796. }
  4797. if (isObject(data.class)) {
  4798. traverse(data.class);
  4799. }
  4800. }
  4801. /* */
  4802. function initRender (vm) {
  4803. vm._vnode = null; // the root of the child tree
  4804. vm._staticTrees = null; // v-once cached trees
  4805. var options = vm.$options;
  4806. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  4807. var renderContext = parentVnode && parentVnode.context;
  4808. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  4809. vm.$scopedSlots = emptyObject;
  4810. // bind the createElement fn to this instance
  4811. // so that we get proper render context inside it.
  4812. // args order: tag, data, children, normalizationType, alwaysNormalize
  4813. // internal version is used by render functions compiled from templates
  4814. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  4815. // normalization is always applied for the public version, used in
  4816. // user-written render functions.
  4817. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  4818. // $attrs & $listeners are exposed for easier HOC creation.
  4819. // they need to be reactive so that HOCs using them are always updated
  4820. var parentData = parentVnode && parentVnode.data;
  4821. /* istanbul ignore else */
  4822. if (true) {
  4823. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  4824. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  4825. }, true);
  4826. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  4827. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  4828. }, true);
  4829. } else {}
  4830. }
  4831. var currentRenderingInstance = null;
  4832. function renderMixin (Vue) {
  4833. // install runtime convenience helpers
  4834. installRenderHelpers(Vue.prototype);
  4835. Vue.prototype.$nextTick = function (fn) {
  4836. return nextTick(fn, this)
  4837. };
  4838. Vue.prototype._render = function () {
  4839. var vm = this;
  4840. var ref = vm.$options;
  4841. var render = ref.render;
  4842. var _parentVnode = ref._parentVnode;
  4843. if (_parentVnode) {
  4844. vm.$scopedSlots = normalizeScopedSlots(
  4845. _parentVnode.data.scopedSlots,
  4846. vm.$slots,
  4847. vm.$scopedSlots
  4848. );
  4849. }
  4850. // set parent vnode. this allows render functions to have access
  4851. // to the data on the placeholder node.
  4852. vm.$vnode = _parentVnode;
  4853. // render self
  4854. var vnode;
  4855. try {
  4856. // There's no need to maintain a stack because all render fns are called
  4857. // separately from one another. Nested component's render fns are called
  4858. // when parent component is patched.
  4859. currentRenderingInstance = vm;
  4860. vnode = render.call(vm._renderProxy, vm.$createElement);
  4861. } catch (e) {
  4862. handleError(e, vm, "render");
  4863. // return error render result,
  4864. // or previous vnode to prevent render error causing blank component
  4865. /* istanbul ignore else */
  4866. if ( true && vm.$options.renderError) {
  4867. try {
  4868. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  4869. } catch (e) {
  4870. handleError(e, vm, "renderError");
  4871. vnode = vm._vnode;
  4872. }
  4873. } else {
  4874. vnode = vm._vnode;
  4875. }
  4876. } finally {
  4877. currentRenderingInstance = null;
  4878. }
  4879. // if the returned array contains only a single node, allow it
  4880. if (Array.isArray(vnode) && vnode.length === 1) {
  4881. vnode = vnode[0];
  4882. }
  4883. // return empty vnode in case the render function errored out
  4884. if (!(vnode instanceof VNode)) {
  4885. if ( true && Array.isArray(vnode)) {
  4886. warn(
  4887. 'Multiple root nodes returned from render function. Render function ' +
  4888. 'should return a single root node.',
  4889. vm
  4890. );
  4891. }
  4892. vnode = createEmptyVNode();
  4893. }
  4894. // set parent
  4895. vnode.parent = _parentVnode;
  4896. return vnode
  4897. };
  4898. }
  4899. /* */
  4900. function ensureCtor (comp, base) {
  4901. if (
  4902. comp.__esModule ||
  4903. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  4904. ) {
  4905. comp = comp.default;
  4906. }
  4907. return isObject(comp)
  4908. ? base.extend(comp)
  4909. : comp
  4910. }
  4911. function createAsyncPlaceholder (
  4912. factory,
  4913. data,
  4914. context,
  4915. children,
  4916. tag
  4917. ) {
  4918. var node = createEmptyVNode();
  4919. node.asyncFactory = factory;
  4920. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  4921. return node
  4922. }
  4923. function resolveAsyncComponent (
  4924. factory,
  4925. baseCtor
  4926. ) {
  4927. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  4928. return factory.errorComp
  4929. }
  4930. if (isDef(factory.resolved)) {
  4931. return factory.resolved
  4932. }
  4933. var owner = currentRenderingInstance;
  4934. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  4935. // already pending
  4936. factory.owners.push(owner);
  4937. }
  4938. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  4939. return factory.loadingComp
  4940. }
  4941. if (owner && !isDef(factory.owners)) {
  4942. var owners = factory.owners = [owner];
  4943. var sync = true;
  4944. var timerLoading = null;
  4945. var timerTimeout = null
  4946. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  4947. var forceRender = function (renderCompleted) {
  4948. for (var i = 0, l = owners.length; i < l; i++) {
  4949. (owners[i]).$forceUpdate();
  4950. }
  4951. if (renderCompleted) {
  4952. owners.length = 0;
  4953. if (timerLoading !== null) {
  4954. clearTimeout(timerLoading);
  4955. timerLoading = null;
  4956. }
  4957. if (timerTimeout !== null) {
  4958. clearTimeout(timerTimeout);
  4959. timerTimeout = null;
  4960. }
  4961. }
  4962. };
  4963. var resolve = once(function (res) {
  4964. // cache resolved
  4965. factory.resolved = ensureCtor(res, baseCtor);
  4966. // invoke callbacks only if this is not a synchronous resolve
  4967. // (async resolves are shimmed as synchronous during SSR)
  4968. if (!sync) {
  4969. forceRender(true);
  4970. } else {
  4971. owners.length = 0;
  4972. }
  4973. });
  4974. var reject = once(function (reason) {
  4975. true && warn(
  4976. "Failed to resolve async component: " + (String(factory)) +
  4977. (reason ? ("\nReason: " + reason) : '')
  4978. );
  4979. if (isDef(factory.errorComp)) {
  4980. factory.error = true;
  4981. forceRender(true);
  4982. }
  4983. });
  4984. var res = factory(resolve, reject);
  4985. if (isObject(res)) {
  4986. if (isPromise(res)) {
  4987. // () => Promise
  4988. if (isUndef(factory.resolved)) {
  4989. res.then(resolve, reject);
  4990. }
  4991. } else if (isPromise(res.component)) {
  4992. res.component.then(resolve, reject);
  4993. if (isDef(res.error)) {
  4994. factory.errorComp = ensureCtor(res.error, baseCtor);
  4995. }
  4996. if (isDef(res.loading)) {
  4997. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  4998. if (res.delay === 0) {
  4999. factory.loading = true;
  5000. } else {
  5001. timerLoading = setTimeout(function () {
  5002. timerLoading = null;
  5003. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  5004. factory.loading = true;
  5005. forceRender(false);
  5006. }
  5007. }, res.delay || 200);
  5008. }
  5009. }
  5010. if (isDef(res.timeout)) {
  5011. timerTimeout = setTimeout(function () {
  5012. timerTimeout = null;
  5013. if (isUndef(factory.resolved)) {
  5014. reject(
  5015. true
  5016. ? ("timeout (" + (res.timeout) + "ms)")
  5017. : undefined
  5018. );
  5019. }
  5020. }, res.timeout);
  5021. }
  5022. }
  5023. }
  5024. sync = false;
  5025. // return in case resolved synchronously
  5026. return factory.loading
  5027. ? factory.loadingComp
  5028. : factory.resolved
  5029. }
  5030. }
  5031. /* */
  5032. function isAsyncPlaceholder (node) {
  5033. return node.isComment && node.asyncFactory
  5034. }
  5035. /* */
  5036. function getFirstComponentChild (children) {
  5037. if (Array.isArray(children)) {
  5038. for (var i = 0; i < children.length; i++) {
  5039. var c = children[i];
  5040. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  5041. return c
  5042. }
  5043. }
  5044. }
  5045. }
  5046. /* */
  5047. /* */
  5048. function initEvents (vm) {
  5049. vm._events = Object.create(null);
  5050. vm._hasHookEvent = false;
  5051. // init parent attached events
  5052. var listeners = vm.$options._parentListeners;
  5053. if (listeners) {
  5054. updateComponentListeners(vm, listeners);
  5055. }
  5056. }
  5057. var target;
  5058. function add (event, fn) {
  5059. target.$on(event, fn);
  5060. }
  5061. function remove$1 (event, fn) {
  5062. target.$off(event, fn);
  5063. }
  5064. function createOnceHandler (event, fn) {
  5065. var _target = target;
  5066. return function onceHandler () {
  5067. var res = fn.apply(null, arguments);
  5068. if (res !== null) {
  5069. _target.$off(event, onceHandler);
  5070. }
  5071. }
  5072. }
  5073. function updateComponentListeners (
  5074. vm,
  5075. listeners,
  5076. oldListeners
  5077. ) {
  5078. target = vm;
  5079. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  5080. target = undefined;
  5081. }
  5082. function eventsMixin (Vue) {
  5083. var hookRE = /^hook:/;
  5084. Vue.prototype.$on = function (event, fn) {
  5085. var vm = this;
  5086. if (Array.isArray(event)) {
  5087. for (var i = 0, l = event.length; i < l; i++) {
  5088. vm.$on(event[i], fn);
  5089. }
  5090. } else {
  5091. (vm._events[event] || (vm._events[event] = [])).push(fn);
  5092. // optimize hook:event cost by using a boolean flag marked at registration
  5093. // instead of a hash lookup
  5094. if (hookRE.test(event)) {
  5095. vm._hasHookEvent = true;
  5096. }
  5097. }
  5098. return vm
  5099. };
  5100. Vue.prototype.$once = function (event, fn) {
  5101. var vm = this;
  5102. function on () {
  5103. vm.$off(event, on);
  5104. fn.apply(vm, arguments);
  5105. }
  5106. on.fn = fn;
  5107. vm.$on(event, on);
  5108. return vm
  5109. };
  5110. Vue.prototype.$off = function (event, fn) {
  5111. var vm = this;
  5112. // all
  5113. if (!arguments.length) {
  5114. vm._events = Object.create(null);
  5115. return vm
  5116. }
  5117. // array of events
  5118. if (Array.isArray(event)) {
  5119. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  5120. vm.$off(event[i$1], fn);
  5121. }
  5122. return vm
  5123. }
  5124. // specific event
  5125. var cbs = vm._events[event];
  5126. if (!cbs) {
  5127. return vm
  5128. }
  5129. if (!fn) {
  5130. vm._events[event] = null;
  5131. return vm
  5132. }
  5133. // specific handler
  5134. var cb;
  5135. var i = cbs.length;
  5136. while (i--) {
  5137. cb = cbs[i];
  5138. if (cb === fn || cb.fn === fn) {
  5139. cbs.splice(i, 1);
  5140. break
  5141. }
  5142. }
  5143. return vm
  5144. };
  5145. Vue.prototype.$emit = function (event) {
  5146. var vm = this;
  5147. if (true) {
  5148. var lowerCaseEvent = event.toLowerCase();
  5149. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  5150. tip(
  5151. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  5152. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  5153. "Note that HTML attributes are case-insensitive and you cannot use " +
  5154. "v-on to listen to camelCase events when using in-DOM templates. " +
  5155. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  5156. );
  5157. }
  5158. }
  5159. var cbs = vm._events[event];
  5160. if (cbs) {
  5161. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  5162. var args = toArray(arguments, 1);
  5163. var info = "event handler for \"" + event + "\"";
  5164. for (var i = 0, l = cbs.length; i < l; i++) {
  5165. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  5166. }
  5167. }
  5168. return vm
  5169. };
  5170. }
  5171. /* */
  5172. var activeInstance = null;
  5173. var isUpdatingChildComponent = false;
  5174. function setActiveInstance(vm) {
  5175. var prevActiveInstance = activeInstance;
  5176. activeInstance = vm;
  5177. return function () {
  5178. activeInstance = prevActiveInstance;
  5179. }
  5180. }
  5181. function initLifecycle (vm) {
  5182. var options = vm.$options;
  5183. // locate first non-abstract parent
  5184. var parent = options.parent;
  5185. if (parent && !options.abstract) {
  5186. while (parent.$options.abstract && parent.$parent) {
  5187. parent = parent.$parent;
  5188. }
  5189. parent.$children.push(vm);
  5190. }
  5191. vm.$parent = parent;
  5192. vm.$root = parent ? parent.$root : vm;
  5193. vm.$children = [];
  5194. vm.$refs = {};
  5195. vm._watcher = null;
  5196. vm._inactive = null;
  5197. vm._directInactive = false;
  5198. vm._isMounted = false;
  5199. vm._isDestroyed = false;
  5200. vm._isBeingDestroyed = false;
  5201. }
  5202. function lifecycleMixin (Vue) {
  5203. Vue.prototype._update = function (vnode, hydrating) {
  5204. var vm = this;
  5205. var prevEl = vm.$el;
  5206. var prevVnode = vm._vnode;
  5207. var restoreActiveInstance = setActiveInstance(vm);
  5208. vm._vnode = vnode;
  5209. // Vue.prototype.__patch__ is injected in entry points
  5210. // based on the rendering backend used.
  5211. if (!prevVnode) {
  5212. // initial render
  5213. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  5214. } else {
  5215. // updates
  5216. vm.$el = vm.__patch__(prevVnode, vnode);
  5217. }
  5218. restoreActiveInstance();
  5219. // update __vue__ reference
  5220. if (prevEl) {
  5221. prevEl.__vue__ = null;
  5222. }
  5223. if (vm.$el) {
  5224. vm.$el.__vue__ = vm;
  5225. }
  5226. // if parent is an HOC, update its $el as well
  5227. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  5228. vm.$parent.$el = vm.$el;
  5229. }
  5230. // updated hook is called by the scheduler to ensure that children are
  5231. // updated in a parent's updated hook.
  5232. };
  5233. Vue.prototype.$forceUpdate = function () {
  5234. var vm = this;
  5235. if (vm._watcher) {
  5236. vm._watcher.update();
  5237. }
  5238. };
  5239. Vue.prototype.$destroy = function () {
  5240. var vm = this;
  5241. if (vm._isBeingDestroyed) {
  5242. return
  5243. }
  5244. callHook(vm, 'beforeDestroy');
  5245. vm._isBeingDestroyed = true;
  5246. // remove self from parent
  5247. var parent = vm.$parent;
  5248. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  5249. remove(parent.$children, vm);
  5250. }
  5251. // teardown watchers
  5252. if (vm._watcher) {
  5253. vm._watcher.teardown();
  5254. }
  5255. var i = vm._watchers.length;
  5256. while (i--) {
  5257. vm._watchers[i].teardown();
  5258. }
  5259. // remove reference from data ob
  5260. // frozen object may not have observer.
  5261. if (vm._data.__ob__) {
  5262. vm._data.__ob__.vmCount--;
  5263. }
  5264. // call the last hook...
  5265. vm._isDestroyed = true;
  5266. // invoke destroy hooks on current rendered tree
  5267. vm.__patch__(vm._vnode, null);
  5268. // fire destroyed hook
  5269. callHook(vm, 'destroyed');
  5270. // turn off all instance listeners.
  5271. vm.$off();
  5272. // remove __vue__ reference
  5273. if (vm.$el) {
  5274. vm.$el.__vue__ = null;
  5275. }
  5276. // release circular reference (#6759)
  5277. if (vm.$vnode) {
  5278. vm.$vnode.parent = null;
  5279. }
  5280. };
  5281. }
  5282. function updateChildComponent (
  5283. vm,
  5284. propsData,
  5285. listeners,
  5286. parentVnode,
  5287. renderChildren
  5288. ) {
  5289. if (true) {
  5290. isUpdatingChildComponent = true;
  5291. }
  5292. // determine whether component has slot children
  5293. // we need to do this before overwriting $options._renderChildren.
  5294. // check if there are dynamic scopedSlots (hand-written or compiled but with
  5295. // dynamic slot names). Static scoped slots compiled from template has the
  5296. // "$stable" marker.
  5297. var newScopedSlots = parentVnode.data.scopedSlots;
  5298. var oldScopedSlots = vm.$scopedSlots;
  5299. var hasDynamicScopedSlot = !!(
  5300. (newScopedSlots && !newScopedSlots.$stable) ||
  5301. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  5302. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  5303. );
  5304. // Any static slot children from the parent may have changed during parent's
  5305. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  5306. // update is necessary to ensure correctness.
  5307. var needsForceUpdate = !!(
  5308. renderChildren || // has new static slots
  5309. vm.$options._renderChildren || // has old static slots
  5310. hasDynamicScopedSlot
  5311. );
  5312. vm.$options._parentVnode = parentVnode;
  5313. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  5314. if (vm._vnode) { // update child tree's parent
  5315. vm._vnode.parent = parentVnode;
  5316. }
  5317. vm.$options._renderChildren = renderChildren;
  5318. // update $attrs and $listeners hash
  5319. // these are also reactive so they may trigger child update if the child
  5320. // used them during render
  5321. vm.$attrs = parentVnode.data.attrs || emptyObject;
  5322. vm.$listeners = listeners || emptyObject;
  5323. // update props
  5324. if (propsData && vm.$options.props) {
  5325. toggleObserving(false);
  5326. var props = vm._props;
  5327. var propKeys = vm.$options._propKeys || [];
  5328. for (var i = 0; i < propKeys.length; i++) {
  5329. var key = propKeys[i];
  5330. var propOptions = vm.$options.props; // wtf flow?
  5331. props[key] = validateProp(key, propOptions, propsData, vm);
  5332. }
  5333. toggleObserving(true);
  5334. // keep a copy of raw propsData
  5335. vm.$options.propsData = propsData;
  5336. }
  5337. // fixed by xxxxxx update properties(mp runtime)
  5338. vm._$updateProperties && vm._$updateProperties(vm);
  5339. // update listeners
  5340. listeners = listeners || emptyObject;
  5341. var oldListeners = vm.$options._parentListeners;
  5342. vm.$options._parentListeners = listeners;
  5343. updateComponentListeners(vm, listeners, oldListeners);
  5344. // resolve slots + force update if has children
  5345. if (needsForceUpdate) {
  5346. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  5347. vm.$forceUpdate();
  5348. }
  5349. if (true) {
  5350. isUpdatingChildComponent = false;
  5351. }
  5352. }
  5353. function isInInactiveTree (vm) {
  5354. while (vm && (vm = vm.$parent)) {
  5355. if (vm._inactive) { return true }
  5356. }
  5357. return false
  5358. }
  5359. function activateChildComponent (vm, direct) {
  5360. if (direct) {
  5361. vm._directInactive = false;
  5362. if (isInInactiveTree(vm)) {
  5363. return
  5364. }
  5365. } else if (vm._directInactive) {
  5366. return
  5367. }
  5368. if (vm._inactive || vm._inactive === null) {
  5369. vm._inactive = false;
  5370. for (var i = 0; i < vm.$children.length; i++) {
  5371. activateChildComponent(vm.$children[i]);
  5372. }
  5373. callHook(vm, 'activated');
  5374. }
  5375. }
  5376. function deactivateChildComponent (vm, direct) {
  5377. if (direct) {
  5378. vm._directInactive = true;
  5379. if (isInInactiveTree(vm)) {
  5380. return
  5381. }
  5382. }
  5383. if (!vm._inactive) {
  5384. vm._inactive = true;
  5385. for (var i = 0; i < vm.$children.length; i++) {
  5386. deactivateChildComponent(vm.$children[i]);
  5387. }
  5388. callHook(vm, 'deactivated');
  5389. }
  5390. }
  5391. function callHook (vm, hook) {
  5392. // #7573 disable dep collection when invoking lifecycle hooks
  5393. pushTarget();
  5394. var handlers = vm.$options[hook];
  5395. var info = hook + " hook";
  5396. if (handlers) {
  5397. for (var i = 0, j = handlers.length; i < j; i++) {
  5398. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  5399. }
  5400. }
  5401. if (vm._hasHookEvent) {
  5402. vm.$emit('hook:' + hook);
  5403. }
  5404. popTarget();
  5405. }
  5406. /* */
  5407. var MAX_UPDATE_COUNT = 100;
  5408. var queue = [];
  5409. var activatedChildren = [];
  5410. var has = {};
  5411. var circular = {};
  5412. var waiting = false;
  5413. var flushing = false;
  5414. var index = 0;
  5415. /**
  5416. * Reset the scheduler's state.
  5417. */
  5418. function resetSchedulerState () {
  5419. index = queue.length = activatedChildren.length = 0;
  5420. has = {};
  5421. if (true) {
  5422. circular = {};
  5423. }
  5424. waiting = flushing = false;
  5425. }
  5426. // Async edge case #6566 requires saving the timestamp when event listeners are
  5427. // attached. However, calling performance.now() has a perf overhead especially
  5428. // if the page has thousands of event listeners. Instead, we take a timestamp
  5429. // every time the scheduler flushes and use that for all event listeners
  5430. // attached during that flush.
  5431. var currentFlushTimestamp = 0;
  5432. // Async edge case fix requires storing an event listener's attach timestamp.
  5433. var getNow = Date.now;
  5434. // Determine what event timestamp the browser is using. Annoyingly, the
  5435. // timestamp can either be hi-res (relative to page load) or low-res
  5436. // (relative to UNIX epoch), so in order to compare time we have to use the
  5437. // same timestamp type when saving the flush timestamp.
  5438. // All IE versions use low-res event timestamps, and have problematic clock
  5439. // implementations (#9632)
  5440. if (inBrowser && !isIE) {
  5441. var performance = window.performance;
  5442. if (
  5443. performance &&
  5444. typeof performance.now === 'function' &&
  5445. getNow() > document.createEvent('Event').timeStamp
  5446. ) {
  5447. // if the event timestamp, although evaluated AFTER the Date.now(), is
  5448. // smaller than it, it means the event is using a hi-res timestamp,
  5449. // and we need to use the hi-res version for event listener timestamps as
  5450. // well.
  5451. getNow = function () { return performance.now(); };
  5452. }
  5453. }
  5454. /**
  5455. * Flush both queues and run the watchers.
  5456. */
  5457. function flushSchedulerQueue () {
  5458. currentFlushTimestamp = getNow();
  5459. flushing = true;
  5460. var watcher, id;
  5461. // Sort queue before flush.
  5462. // This ensures that:
  5463. // 1. Components are updated from parent to child. (because parent is always
  5464. // created before the child)
  5465. // 2. A component's user watchers are run before its render watcher (because
  5466. // user watchers are created before the render watcher)
  5467. // 3. If a component is destroyed during a parent component's watcher run,
  5468. // its watchers can be skipped.
  5469. queue.sort(function (a, b) { return a.id - b.id; });
  5470. // do not cache length because more watchers might be pushed
  5471. // as we run existing watchers
  5472. for (index = 0; index < queue.length; index++) {
  5473. watcher = queue[index];
  5474. if (watcher.before) {
  5475. watcher.before();
  5476. }
  5477. id = watcher.id;
  5478. has[id] = null;
  5479. watcher.run();
  5480. // in dev build, check and stop circular updates.
  5481. if ( true && has[id] != null) {
  5482. circular[id] = (circular[id] || 0) + 1;
  5483. if (circular[id] > MAX_UPDATE_COUNT) {
  5484. warn(
  5485. 'You may have an infinite update loop ' + (
  5486. watcher.user
  5487. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  5488. : "in a component render function."
  5489. ),
  5490. watcher.vm
  5491. );
  5492. break
  5493. }
  5494. }
  5495. }
  5496. // keep copies of post queues before resetting state
  5497. var activatedQueue = activatedChildren.slice();
  5498. var updatedQueue = queue.slice();
  5499. resetSchedulerState();
  5500. // call component updated and activated hooks
  5501. callActivatedHooks(activatedQueue);
  5502. callUpdatedHooks(updatedQueue);
  5503. // devtool hook
  5504. /* istanbul ignore if */
  5505. if (devtools && config.devtools) {
  5506. devtools.emit('flush');
  5507. }
  5508. }
  5509. function callUpdatedHooks (queue) {
  5510. var i = queue.length;
  5511. while (i--) {
  5512. var watcher = queue[i];
  5513. var vm = watcher.vm;
  5514. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  5515. callHook(vm, 'updated');
  5516. }
  5517. }
  5518. }
  5519. /**
  5520. * Queue a kept-alive component that was activated during patch.
  5521. * The queue will be processed after the entire tree has been patched.
  5522. */
  5523. function queueActivatedComponent (vm) {
  5524. // setting _inactive to false here so that a render function can
  5525. // rely on checking whether it's in an inactive tree (e.g. router-view)
  5526. vm._inactive = false;
  5527. activatedChildren.push(vm);
  5528. }
  5529. function callActivatedHooks (queue) {
  5530. for (var i = 0; i < queue.length; i++) {
  5531. queue[i]._inactive = true;
  5532. activateChildComponent(queue[i], true /* true */);
  5533. }
  5534. }
  5535. /**
  5536. * Push a watcher into the watcher queue.
  5537. * Jobs with duplicate IDs will be skipped unless it's
  5538. * pushed when the queue is being flushed.
  5539. */
  5540. function queueWatcher (watcher) {
  5541. var id = watcher.id;
  5542. if (has[id] == null) {
  5543. has[id] = true;
  5544. if (!flushing) {
  5545. queue.push(watcher);
  5546. } else {
  5547. // if already flushing, splice the watcher based on its id
  5548. // if already past its id, it will be run next immediately.
  5549. var i = queue.length - 1;
  5550. while (i > index && queue[i].id > watcher.id) {
  5551. i--;
  5552. }
  5553. queue.splice(i + 1, 0, watcher);
  5554. }
  5555. // queue the flush
  5556. if (!waiting) {
  5557. waiting = true;
  5558. if ( true && !config.async) {
  5559. flushSchedulerQueue();
  5560. return
  5561. }
  5562. nextTick(flushSchedulerQueue);
  5563. }
  5564. }
  5565. }
  5566. /* */
  5567. var uid$2 = 0;
  5568. /**
  5569. * A watcher parses an expression, collects dependencies,
  5570. * and fires callback when the expression value changes.
  5571. * This is used for both the $watch() api and directives.
  5572. */
  5573. var Watcher = function Watcher (
  5574. vm,
  5575. expOrFn,
  5576. cb,
  5577. options,
  5578. isRenderWatcher
  5579. ) {
  5580. this.vm = vm;
  5581. if (isRenderWatcher) {
  5582. vm._watcher = this;
  5583. }
  5584. vm._watchers.push(this);
  5585. // options
  5586. if (options) {
  5587. this.deep = !!options.deep;
  5588. this.user = !!options.user;
  5589. this.lazy = !!options.lazy;
  5590. this.sync = !!options.sync;
  5591. this.before = options.before;
  5592. } else {
  5593. this.deep = this.user = this.lazy = this.sync = false;
  5594. }
  5595. this.cb = cb;
  5596. this.id = ++uid$2; // uid for batching
  5597. this.active = true;
  5598. this.dirty = this.lazy; // for lazy watchers
  5599. this.deps = [];
  5600. this.newDeps = [];
  5601. this.depIds = new _Set();
  5602. this.newDepIds = new _Set();
  5603. this.expression = true
  5604. ? expOrFn.toString()
  5605. : undefined;
  5606. // parse expression for getter
  5607. if (typeof expOrFn === 'function') {
  5608. this.getter = expOrFn;
  5609. } else {
  5610. this.getter = parsePath(expOrFn);
  5611. if (!this.getter) {
  5612. this.getter = noop;
  5613. true && warn(
  5614. "Failed watching path: \"" + expOrFn + "\" " +
  5615. 'Watcher only accepts simple dot-delimited paths. ' +
  5616. 'For full control, use a function instead.',
  5617. vm
  5618. );
  5619. }
  5620. }
  5621. this.value = this.lazy
  5622. ? undefined
  5623. : this.get();
  5624. };
  5625. /**
  5626. * Evaluate the getter, and re-collect dependencies.
  5627. */
  5628. Watcher.prototype.get = function get () {
  5629. pushTarget(this);
  5630. var value;
  5631. var vm = this.vm;
  5632. try {
  5633. value = this.getter.call(vm, vm);
  5634. } catch (e) {
  5635. if (this.user) {
  5636. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  5637. } else {
  5638. throw e
  5639. }
  5640. } finally {
  5641. // "touch" every property so they are all tracked as
  5642. // dependencies for deep watching
  5643. if (this.deep) {
  5644. traverse(value);
  5645. }
  5646. popTarget();
  5647. this.cleanupDeps();
  5648. }
  5649. return value
  5650. };
  5651. /**
  5652. * Add a dependency to this directive.
  5653. */
  5654. Watcher.prototype.addDep = function addDep (dep) {
  5655. var id = dep.id;
  5656. if (!this.newDepIds.has(id)) {
  5657. this.newDepIds.add(id);
  5658. this.newDeps.push(dep);
  5659. if (!this.depIds.has(id)) {
  5660. dep.addSub(this);
  5661. }
  5662. }
  5663. };
  5664. /**
  5665. * Clean up for dependency collection.
  5666. */
  5667. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  5668. var i = this.deps.length;
  5669. while (i--) {
  5670. var dep = this.deps[i];
  5671. if (!this.newDepIds.has(dep.id)) {
  5672. dep.removeSub(this);
  5673. }
  5674. }
  5675. var tmp = this.depIds;
  5676. this.depIds = this.newDepIds;
  5677. this.newDepIds = tmp;
  5678. this.newDepIds.clear();
  5679. tmp = this.deps;
  5680. this.deps = this.newDeps;
  5681. this.newDeps = tmp;
  5682. this.newDeps.length = 0;
  5683. };
  5684. /**
  5685. * Subscriber interface.
  5686. * Will be called when a dependency changes.
  5687. */
  5688. Watcher.prototype.update = function update () {
  5689. /* istanbul ignore else */
  5690. if (this.lazy) {
  5691. this.dirty = true;
  5692. } else if (this.sync) {
  5693. this.run();
  5694. } else {
  5695. queueWatcher(this);
  5696. }
  5697. };
  5698. /**
  5699. * Scheduler job interface.
  5700. * Will be called by the scheduler.
  5701. */
  5702. Watcher.prototype.run = function run () {
  5703. if (this.active) {
  5704. var value = this.get();
  5705. if (
  5706. value !== this.value ||
  5707. // Deep watchers and watchers on Object/Arrays should fire even
  5708. // when the value is the same, because the value may
  5709. // have mutated.
  5710. isObject(value) ||
  5711. this.deep
  5712. ) {
  5713. // set new value
  5714. var oldValue = this.value;
  5715. this.value = value;
  5716. if (this.user) {
  5717. try {
  5718. this.cb.call(this.vm, value, oldValue);
  5719. } catch (e) {
  5720. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  5721. }
  5722. } else {
  5723. this.cb.call(this.vm, value, oldValue);
  5724. }
  5725. }
  5726. }
  5727. };
  5728. /**
  5729. * Evaluate the value of the watcher.
  5730. * This only gets called for lazy watchers.
  5731. */
  5732. Watcher.prototype.evaluate = function evaluate () {
  5733. this.value = this.get();
  5734. this.dirty = false;
  5735. };
  5736. /**
  5737. * Depend on all deps collected by this watcher.
  5738. */
  5739. Watcher.prototype.depend = function depend () {
  5740. var i = this.deps.length;
  5741. while (i--) {
  5742. this.deps[i].depend();
  5743. }
  5744. };
  5745. /**
  5746. * Remove self from all dependencies' subscriber list.
  5747. */
  5748. Watcher.prototype.teardown = function teardown () {
  5749. if (this.active) {
  5750. // remove self from vm's watcher list
  5751. // this is a somewhat expensive operation so we skip it
  5752. // if the vm is being destroyed.
  5753. if (!this.vm._isBeingDestroyed) {
  5754. remove(this.vm._watchers, this);
  5755. }
  5756. var i = this.deps.length;
  5757. while (i--) {
  5758. this.deps[i].removeSub(this);
  5759. }
  5760. this.active = false;
  5761. }
  5762. };
  5763. /* */
  5764. var sharedPropertyDefinition = {
  5765. enumerable: true,
  5766. configurable: true,
  5767. get: noop,
  5768. set: noop
  5769. };
  5770. function proxy (target, sourceKey, key) {
  5771. sharedPropertyDefinition.get = function proxyGetter () {
  5772. return this[sourceKey][key]
  5773. };
  5774. sharedPropertyDefinition.set = function proxySetter (val) {
  5775. this[sourceKey][key] = val;
  5776. };
  5777. Object.defineProperty(target, key, sharedPropertyDefinition);
  5778. }
  5779. function initState (vm) {
  5780. vm._watchers = [];
  5781. var opts = vm.$options;
  5782. if (opts.props) { initProps(vm, opts.props); }
  5783. if (opts.methods) { initMethods(vm, opts.methods); }
  5784. if (opts.data) {
  5785. initData(vm);
  5786. } else {
  5787. observe(vm._data = {}, true /* asRootData */);
  5788. }
  5789. if (opts.computed) { initComputed(vm, opts.computed); }
  5790. if (opts.watch && opts.watch !== nativeWatch) {
  5791. initWatch(vm, opts.watch);
  5792. }
  5793. }
  5794. function initProps (vm, propsOptions) {
  5795. var propsData = vm.$options.propsData || {};
  5796. var props = vm._props = {};
  5797. // cache prop keys so that future props updates can iterate using Array
  5798. // instead of dynamic object key enumeration.
  5799. var keys = vm.$options._propKeys = [];
  5800. var isRoot = !vm.$parent;
  5801. // root instance props should be converted
  5802. if (!isRoot) {
  5803. toggleObserving(false);
  5804. }
  5805. var loop = function ( key ) {
  5806. keys.push(key);
  5807. var value = validateProp(key, propsOptions, propsData, vm);
  5808. /* istanbul ignore else */
  5809. if (true) {
  5810. var hyphenatedKey = hyphenate(key);
  5811. if (isReservedAttribute(hyphenatedKey) ||
  5812. config.isReservedAttr(hyphenatedKey)) {
  5813. warn(
  5814. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  5815. vm
  5816. );
  5817. }
  5818. defineReactive$$1(props, key, value, function () {
  5819. if (!isRoot && !isUpdatingChildComponent) {
  5820. {
  5821. if(vm.mpHost === 'mp-baidu'){//百度 observer 在 setData callback 之后触发,直接忽略该 warn
  5822. return
  5823. }
  5824. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  5825. if(
  5826. key === 'value' &&
  5827. Array.isArray(vm.$options.behaviors) &&
  5828. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  5829. ){
  5830. return
  5831. }
  5832. if(vm._getFormData){
  5833. return
  5834. }
  5835. var $parent = vm.$parent;
  5836. while($parent){
  5837. if($parent.__next_tick_pending){
  5838. return
  5839. }
  5840. $parent = $parent.$parent;
  5841. }
  5842. }
  5843. warn(
  5844. "Avoid mutating a prop directly since the value will be " +
  5845. "overwritten whenever the parent component re-renders. " +
  5846. "Instead, use a data or computed property based on the prop's " +
  5847. "value. Prop being mutated: \"" + key + "\"",
  5848. vm
  5849. );
  5850. }
  5851. });
  5852. } else {}
  5853. // static props are already proxied on the component's prototype
  5854. // during Vue.extend(). We only need to proxy props defined at
  5855. // instantiation here.
  5856. if (!(key in vm)) {
  5857. proxy(vm, "_props", key);
  5858. }
  5859. };
  5860. for (var key in propsOptions) loop( key );
  5861. toggleObserving(true);
  5862. }
  5863. function initData (vm) {
  5864. var data = vm.$options.data;
  5865. data = vm._data = typeof data === 'function'
  5866. ? getData(data, vm)
  5867. : data || {};
  5868. if (!isPlainObject(data)) {
  5869. data = {};
  5870. true && warn(
  5871. 'data functions should return an object:\n' +
  5872. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  5873. vm
  5874. );
  5875. }
  5876. // proxy data on instance
  5877. var keys = Object.keys(data);
  5878. var props = vm.$options.props;
  5879. var methods = vm.$options.methods;
  5880. var i = keys.length;
  5881. while (i--) {
  5882. var key = keys[i];
  5883. if (true) {
  5884. if (methods && hasOwn(methods, key)) {
  5885. warn(
  5886. ("Method \"" + key + "\" has already been defined as a data property."),
  5887. vm
  5888. );
  5889. }
  5890. }
  5891. if (props && hasOwn(props, key)) {
  5892. true && warn(
  5893. "The data property \"" + key + "\" is already declared as a prop. " +
  5894. "Use prop default value instead.",
  5895. vm
  5896. );
  5897. } else if (!isReserved(key)) {
  5898. proxy(vm, "_data", key);
  5899. }
  5900. }
  5901. // observe data
  5902. observe(data, true /* asRootData */);
  5903. }
  5904. function getData (data, vm) {
  5905. // #7573 disable dep collection when invoking data getters
  5906. pushTarget();
  5907. try {
  5908. return data.call(vm, vm)
  5909. } catch (e) {
  5910. handleError(e, vm, "data()");
  5911. return {}
  5912. } finally {
  5913. popTarget();
  5914. }
  5915. }
  5916. var computedWatcherOptions = { lazy: true };
  5917. function initComputed (vm, computed) {
  5918. // $flow-disable-line
  5919. var watchers = vm._computedWatchers = Object.create(null);
  5920. // computed properties are just getters during SSR
  5921. var isSSR = isServerRendering();
  5922. for (var key in computed) {
  5923. var userDef = computed[key];
  5924. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  5925. if ( true && getter == null) {
  5926. warn(
  5927. ("Getter is missing for computed property \"" + key + "\"."),
  5928. vm
  5929. );
  5930. }
  5931. if (!isSSR) {
  5932. // create internal watcher for the computed property.
  5933. watchers[key] = new Watcher(
  5934. vm,
  5935. getter || noop,
  5936. noop,
  5937. computedWatcherOptions
  5938. );
  5939. }
  5940. // component-defined computed properties are already defined on the
  5941. // component prototype. We only need to define computed properties defined
  5942. // at instantiation here.
  5943. if (!(key in vm)) {
  5944. defineComputed(vm, key, userDef);
  5945. } else if (true) {
  5946. if (key in vm.$data) {
  5947. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  5948. } else if (vm.$options.props && key in vm.$options.props) {
  5949. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  5950. }
  5951. }
  5952. }
  5953. }
  5954. function defineComputed (
  5955. target,
  5956. key,
  5957. userDef
  5958. ) {
  5959. var shouldCache = !isServerRendering();
  5960. if (typeof userDef === 'function') {
  5961. sharedPropertyDefinition.get = shouldCache
  5962. ? createComputedGetter(key)
  5963. : createGetterInvoker(userDef);
  5964. sharedPropertyDefinition.set = noop;
  5965. } else {
  5966. sharedPropertyDefinition.get = userDef.get
  5967. ? shouldCache && userDef.cache !== false
  5968. ? createComputedGetter(key)
  5969. : createGetterInvoker(userDef.get)
  5970. : noop;
  5971. sharedPropertyDefinition.set = userDef.set || noop;
  5972. }
  5973. if ( true &&
  5974. sharedPropertyDefinition.set === noop) {
  5975. sharedPropertyDefinition.set = function () {
  5976. warn(
  5977. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  5978. this
  5979. );
  5980. };
  5981. }
  5982. Object.defineProperty(target, key, sharedPropertyDefinition);
  5983. }
  5984. function createComputedGetter (key) {
  5985. return function computedGetter () {
  5986. var watcher = this._computedWatchers && this._computedWatchers[key];
  5987. if (watcher) {
  5988. if (watcher.dirty) {
  5989. watcher.evaluate();
  5990. }
  5991. if (Dep.SharedObject.target) {// fixed by xxxxxx
  5992. watcher.depend();
  5993. }
  5994. return watcher.value
  5995. }
  5996. }
  5997. }
  5998. function createGetterInvoker(fn) {
  5999. return function computedGetter () {
  6000. return fn.call(this, this)
  6001. }
  6002. }
  6003. function initMethods (vm, methods) {
  6004. var props = vm.$options.props;
  6005. for (var key in methods) {
  6006. if (true) {
  6007. if (typeof methods[key] !== 'function') {
  6008. warn(
  6009. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  6010. "Did you reference the function correctly?",
  6011. vm
  6012. );
  6013. }
  6014. if (props && hasOwn(props, key)) {
  6015. warn(
  6016. ("Method \"" + key + "\" has already been defined as a prop."),
  6017. vm
  6018. );
  6019. }
  6020. if ((key in vm) && isReserved(key)) {
  6021. warn(
  6022. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  6023. "Avoid defining component methods that start with _ or $."
  6024. );
  6025. }
  6026. }
  6027. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  6028. }
  6029. }
  6030. function initWatch (vm, watch) {
  6031. for (var key in watch) {
  6032. var handler = watch[key];
  6033. if (Array.isArray(handler)) {
  6034. for (var i = 0; i < handler.length; i++) {
  6035. createWatcher(vm, key, handler[i]);
  6036. }
  6037. } else {
  6038. createWatcher(vm, key, handler);
  6039. }
  6040. }
  6041. }
  6042. function createWatcher (
  6043. vm,
  6044. expOrFn,
  6045. handler,
  6046. options
  6047. ) {
  6048. if (isPlainObject(handler)) {
  6049. options = handler;
  6050. handler = handler.handler;
  6051. }
  6052. if (typeof handler === 'string') {
  6053. handler = vm[handler];
  6054. }
  6055. return vm.$watch(expOrFn, handler, options)
  6056. }
  6057. function stateMixin (Vue) {
  6058. // flow somehow has problems with directly declared definition object
  6059. // when using Object.defineProperty, so we have to procedurally build up
  6060. // the object here.
  6061. var dataDef = {};
  6062. dataDef.get = function () { return this._data };
  6063. var propsDef = {};
  6064. propsDef.get = function () { return this._props };
  6065. if (true) {
  6066. dataDef.set = function () {
  6067. warn(
  6068. 'Avoid replacing instance root $data. ' +
  6069. 'Use nested data properties instead.',
  6070. this
  6071. );
  6072. };
  6073. propsDef.set = function () {
  6074. warn("$props is readonly.", this);
  6075. };
  6076. }
  6077. Object.defineProperty(Vue.prototype, '$data', dataDef);
  6078. Object.defineProperty(Vue.prototype, '$props', propsDef);
  6079. Vue.prototype.$set = set;
  6080. Vue.prototype.$delete = del;
  6081. Vue.prototype.$watch = function (
  6082. expOrFn,
  6083. cb,
  6084. options
  6085. ) {
  6086. var vm = this;
  6087. if (isPlainObject(cb)) {
  6088. return createWatcher(vm, expOrFn, cb, options)
  6089. }
  6090. options = options || {};
  6091. options.user = true;
  6092. var watcher = new Watcher(vm, expOrFn, cb, options);
  6093. if (options.immediate) {
  6094. try {
  6095. cb.call(vm, watcher.value);
  6096. } catch (error) {
  6097. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  6098. }
  6099. }
  6100. return function unwatchFn () {
  6101. watcher.teardown();
  6102. }
  6103. };
  6104. }
  6105. /* */
  6106. var uid$3 = 0;
  6107. function initMixin (Vue) {
  6108. Vue.prototype._init = function (options) {
  6109. var vm = this;
  6110. // a uid
  6111. vm._uid = uid$3++;
  6112. var startTag, endTag;
  6113. /* istanbul ignore if */
  6114. if ( true && config.performance && mark) {
  6115. startTag = "vue-perf-start:" + (vm._uid);
  6116. endTag = "vue-perf-end:" + (vm._uid);
  6117. mark(startTag);
  6118. }
  6119. // a flag to avoid this being observed
  6120. vm._isVue = true;
  6121. // merge options
  6122. if (options && options._isComponent) {
  6123. // optimize internal component instantiation
  6124. // since dynamic options merging is pretty slow, and none of the
  6125. // internal component options needs special treatment.
  6126. initInternalComponent(vm, options);
  6127. } else {
  6128. vm.$options = mergeOptions(
  6129. resolveConstructorOptions(vm.constructor),
  6130. options || {},
  6131. vm
  6132. );
  6133. }
  6134. /* istanbul ignore else */
  6135. if (true) {
  6136. initProxy(vm);
  6137. } else {}
  6138. // expose real self
  6139. vm._self = vm;
  6140. initLifecycle(vm);
  6141. initEvents(vm);
  6142. initRender(vm);
  6143. callHook(vm, 'beforeCreate');
  6144. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  6145. initState(vm);
  6146. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  6147. !vm._$fallback && callHook(vm, 'created');
  6148. /* istanbul ignore if */
  6149. if ( true && config.performance && mark) {
  6150. vm._name = formatComponentName(vm, false);
  6151. mark(endTag);
  6152. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  6153. }
  6154. if (vm.$options.el) {
  6155. vm.$mount(vm.$options.el);
  6156. }
  6157. };
  6158. }
  6159. function initInternalComponent (vm, options) {
  6160. var opts = vm.$options = Object.create(vm.constructor.options);
  6161. // doing this because it's faster than dynamic enumeration.
  6162. var parentVnode = options._parentVnode;
  6163. opts.parent = options.parent;
  6164. opts._parentVnode = parentVnode;
  6165. var vnodeComponentOptions = parentVnode.componentOptions;
  6166. opts.propsData = vnodeComponentOptions.propsData;
  6167. opts._parentListeners = vnodeComponentOptions.listeners;
  6168. opts._renderChildren = vnodeComponentOptions.children;
  6169. opts._componentTag = vnodeComponentOptions.tag;
  6170. if (options.render) {
  6171. opts.render = options.render;
  6172. opts.staticRenderFns = options.staticRenderFns;
  6173. }
  6174. }
  6175. function resolveConstructorOptions (Ctor) {
  6176. var options = Ctor.options;
  6177. if (Ctor.super) {
  6178. var superOptions = resolveConstructorOptions(Ctor.super);
  6179. var cachedSuperOptions = Ctor.superOptions;
  6180. if (superOptions !== cachedSuperOptions) {
  6181. // super option changed,
  6182. // need to resolve new options.
  6183. Ctor.superOptions = superOptions;
  6184. // check if there are any late-modified/attached options (#4976)
  6185. var modifiedOptions = resolveModifiedOptions(Ctor);
  6186. // update base extend options
  6187. if (modifiedOptions) {
  6188. extend(Ctor.extendOptions, modifiedOptions);
  6189. }
  6190. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  6191. if (options.name) {
  6192. options.components[options.name] = Ctor;
  6193. }
  6194. }
  6195. }
  6196. return options
  6197. }
  6198. function resolveModifiedOptions (Ctor) {
  6199. var modified;
  6200. var latest = Ctor.options;
  6201. var sealed = Ctor.sealedOptions;
  6202. for (var key in latest) {
  6203. if (latest[key] !== sealed[key]) {
  6204. if (!modified) { modified = {}; }
  6205. modified[key] = latest[key];
  6206. }
  6207. }
  6208. return modified
  6209. }
  6210. function Vue (options) {
  6211. if ( true &&
  6212. !(this instanceof Vue)
  6213. ) {
  6214. warn('Vue is a constructor and should be called with the `new` keyword');
  6215. }
  6216. this._init(options);
  6217. }
  6218. initMixin(Vue);
  6219. stateMixin(Vue);
  6220. eventsMixin(Vue);
  6221. lifecycleMixin(Vue);
  6222. renderMixin(Vue);
  6223. /* */
  6224. function initUse (Vue) {
  6225. Vue.use = function (plugin) {
  6226. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  6227. if (installedPlugins.indexOf(plugin) > -1) {
  6228. return this
  6229. }
  6230. // additional parameters
  6231. var args = toArray(arguments, 1);
  6232. args.unshift(this);
  6233. if (typeof plugin.install === 'function') {
  6234. plugin.install.apply(plugin, args);
  6235. } else if (typeof plugin === 'function') {
  6236. plugin.apply(null, args);
  6237. }
  6238. installedPlugins.push(plugin);
  6239. return this
  6240. };
  6241. }
  6242. /* */
  6243. function initMixin$1 (Vue) {
  6244. Vue.mixin = function (mixin) {
  6245. this.options = mergeOptions(this.options, mixin);
  6246. return this
  6247. };
  6248. }
  6249. /* */
  6250. function initExtend (Vue) {
  6251. /**
  6252. * Each instance constructor, including Vue, has a unique
  6253. * cid. This enables us to create wrapped "child
  6254. * constructors" for prototypal inheritance and cache them.
  6255. */
  6256. Vue.cid = 0;
  6257. var cid = 1;
  6258. /**
  6259. * Class inheritance
  6260. */
  6261. Vue.extend = function (extendOptions) {
  6262. extendOptions = extendOptions || {};
  6263. var Super = this;
  6264. var SuperId = Super.cid;
  6265. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  6266. if (cachedCtors[SuperId]) {
  6267. return cachedCtors[SuperId]
  6268. }
  6269. var name = extendOptions.name || Super.options.name;
  6270. if ( true && name) {
  6271. validateComponentName(name);
  6272. }
  6273. var Sub = function VueComponent (options) {
  6274. this._init(options);
  6275. };
  6276. Sub.prototype = Object.create(Super.prototype);
  6277. Sub.prototype.constructor = Sub;
  6278. Sub.cid = cid++;
  6279. Sub.options = mergeOptions(
  6280. Super.options,
  6281. extendOptions
  6282. );
  6283. Sub['super'] = Super;
  6284. // For props and computed properties, we define the proxy getters on
  6285. // the Vue instances at extension time, on the extended prototype. This
  6286. // avoids Object.defineProperty calls for each instance created.
  6287. if (Sub.options.props) {
  6288. initProps$1(Sub);
  6289. }
  6290. if (Sub.options.computed) {
  6291. initComputed$1(Sub);
  6292. }
  6293. // allow further extension/mixin/plugin usage
  6294. Sub.extend = Super.extend;
  6295. Sub.mixin = Super.mixin;
  6296. Sub.use = Super.use;
  6297. // create asset registers, so extended classes
  6298. // can have their private assets too.
  6299. ASSET_TYPES.forEach(function (type) {
  6300. Sub[type] = Super[type];
  6301. });
  6302. // enable recursive self-lookup
  6303. if (name) {
  6304. Sub.options.components[name] = Sub;
  6305. }
  6306. // keep a reference to the super options at extension time.
  6307. // later at instantiation we can check if Super's options have
  6308. // been updated.
  6309. Sub.superOptions = Super.options;
  6310. Sub.extendOptions = extendOptions;
  6311. Sub.sealedOptions = extend({}, Sub.options);
  6312. // cache constructor
  6313. cachedCtors[SuperId] = Sub;
  6314. return Sub
  6315. };
  6316. }
  6317. function initProps$1 (Comp) {
  6318. var props = Comp.options.props;
  6319. for (var key in props) {
  6320. proxy(Comp.prototype, "_props", key);
  6321. }
  6322. }
  6323. function initComputed$1 (Comp) {
  6324. var computed = Comp.options.computed;
  6325. for (var key in computed) {
  6326. defineComputed(Comp.prototype, key, computed[key]);
  6327. }
  6328. }
  6329. /* */
  6330. function initAssetRegisters (Vue) {
  6331. /**
  6332. * Create asset registration methods.
  6333. */
  6334. ASSET_TYPES.forEach(function (type) {
  6335. Vue[type] = function (
  6336. id,
  6337. definition
  6338. ) {
  6339. if (!definition) {
  6340. return this.options[type + 's'][id]
  6341. } else {
  6342. /* istanbul ignore if */
  6343. if ( true && type === 'component') {
  6344. validateComponentName(id);
  6345. }
  6346. if (type === 'component' && isPlainObject(definition)) {
  6347. definition.name = definition.name || id;
  6348. definition = this.options._base.extend(definition);
  6349. }
  6350. if (type === 'directive' && typeof definition === 'function') {
  6351. definition = { bind: definition, update: definition };
  6352. }
  6353. this.options[type + 's'][id] = definition;
  6354. return definition
  6355. }
  6356. };
  6357. });
  6358. }
  6359. /* */
  6360. function getComponentName (opts) {
  6361. return opts && (opts.Ctor.options.name || opts.tag)
  6362. }
  6363. function matches (pattern, name) {
  6364. if (Array.isArray(pattern)) {
  6365. return pattern.indexOf(name) > -1
  6366. } else if (typeof pattern === 'string') {
  6367. return pattern.split(',').indexOf(name) > -1
  6368. } else if (isRegExp(pattern)) {
  6369. return pattern.test(name)
  6370. }
  6371. /* istanbul ignore next */
  6372. return false
  6373. }
  6374. function pruneCache (keepAliveInstance, filter) {
  6375. var cache = keepAliveInstance.cache;
  6376. var keys = keepAliveInstance.keys;
  6377. var _vnode = keepAliveInstance._vnode;
  6378. for (var key in cache) {
  6379. var cachedNode = cache[key];
  6380. if (cachedNode) {
  6381. var name = getComponentName(cachedNode.componentOptions);
  6382. if (name && !filter(name)) {
  6383. pruneCacheEntry(cache, key, keys, _vnode);
  6384. }
  6385. }
  6386. }
  6387. }
  6388. function pruneCacheEntry (
  6389. cache,
  6390. key,
  6391. keys,
  6392. current
  6393. ) {
  6394. var cached$$1 = cache[key];
  6395. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  6396. cached$$1.componentInstance.$destroy();
  6397. }
  6398. cache[key] = null;
  6399. remove(keys, key);
  6400. }
  6401. var patternTypes = [String, RegExp, Array];
  6402. var KeepAlive = {
  6403. name: 'keep-alive',
  6404. abstract: true,
  6405. props: {
  6406. include: patternTypes,
  6407. exclude: patternTypes,
  6408. max: [String, Number]
  6409. },
  6410. created: function created () {
  6411. this.cache = Object.create(null);
  6412. this.keys = [];
  6413. },
  6414. destroyed: function destroyed () {
  6415. for (var key in this.cache) {
  6416. pruneCacheEntry(this.cache, key, this.keys);
  6417. }
  6418. },
  6419. mounted: function mounted () {
  6420. var this$1 = this;
  6421. this.$watch('include', function (val) {
  6422. pruneCache(this$1, function (name) { return matches(val, name); });
  6423. });
  6424. this.$watch('exclude', function (val) {
  6425. pruneCache(this$1, function (name) { return !matches(val, name); });
  6426. });
  6427. },
  6428. render: function render () {
  6429. var slot = this.$slots.default;
  6430. var vnode = getFirstComponentChild(slot);
  6431. var componentOptions = vnode && vnode.componentOptions;
  6432. if (componentOptions) {
  6433. // check pattern
  6434. var name = getComponentName(componentOptions);
  6435. var ref = this;
  6436. var include = ref.include;
  6437. var exclude = ref.exclude;
  6438. if (
  6439. // not included
  6440. (include && (!name || !matches(include, name))) ||
  6441. // excluded
  6442. (exclude && name && matches(exclude, name))
  6443. ) {
  6444. return vnode
  6445. }
  6446. var ref$1 = this;
  6447. var cache = ref$1.cache;
  6448. var keys = ref$1.keys;
  6449. var key = vnode.key == null
  6450. // same constructor may get registered as different local components
  6451. // so cid alone is not enough (#3269)
  6452. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  6453. : vnode.key;
  6454. if (cache[key]) {
  6455. vnode.componentInstance = cache[key].componentInstance;
  6456. // make current key freshest
  6457. remove(keys, key);
  6458. keys.push(key);
  6459. } else {
  6460. cache[key] = vnode;
  6461. keys.push(key);
  6462. // prune oldest entry
  6463. if (this.max && keys.length > parseInt(this.max)) {
  6464. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  6465. }
  6466. }
  6467. vnode.data.keepAlive = true;
  6468. }
  6469. return vnode || (slot && slot[0])
  6470. }
  6471. };
  6472. var builtInComponents = {
  6473. KeepAlive: KeepAlive
  6474. };
  6475. /* */
  6476. function initGlobalAPI (Vue) {
  6477. // config
  6478. var configDef = {};
  6479. configDef.get = function () { return config; };
  6480. if (true) {
  6481. configDef.set = function () {
  6482. warn(
  6483. 'Do not replace the Vue.config object, set individual fields instead.'
  6484. );
  6485. };
  6486. }
  6487. Object.defineProperty(Vue, 'config', configDef);
  6488. // exposed util methods.
  6489. // NOTE: these are not considered part of the public API - avoid relying on
  6490. // them unless you are aware of the risk.
  6491. Vue.util = {
  6492. warn: warn,
  6493. extend: extend,
  6494. mergeOptions: mergeOptions,
  6495. defineReactive: defineReactive$$1
  6496. };
  6497. Vue.set = set;
  6498. Vue.delete = del;
  6499. Vue.nextTick = nextTick;
  6500. // 2.6 explicit observable API
  6501. Vue.observable = function (obj) {
  6502. observe(obj);
  6503. return obj
  6504. };
  6505. Vue.options = Object.create(null);
  6506. ASSET_TYPES.forEach(function (type) {
  6507. Vue.options[type + 's'] = Object.create(null);
  6508. });
  6509. // this is used to identify the "base" constructor to extend all plain-object
  6510. // components with in Weex's multi-instance scenarios.
  6511. Vue.options._base = Vue;
  6512. extend(Vue.options.components, builtInComponents);
  6513. initUse(Vue);
  6514. initMixin$1(Vue);
  6515. initExtend(Vue);
  6516. initAssetRegisters(Vue);
  6517. }
  6518. initGlobalAPI(Vue);
  6519. Object.defineProperty(Vue.prototype, '$isServer', {
  6520. get: isServerRendering
  6521. });
  6522. Object.defineProperty(Vue.prototype, '$ssrContext', {
  6523. get: function get () {
  6524. /* istanbul ignore next */
  6525. return this.$vnode && this.$vnode.ssrContext
  6526. }
  6527. });
  6528. // expose FunctionalRenderContext for ssr runtime helper installation
  6529. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  6530. value: FunctionalRenderContext
  6531. });
  6532. Vue.version = '2.6.11';
  6533. /**
  6534. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  6535. */
  6536. var ARRAYTYPE = '[object Array]';
  6537. var OBJECTTYPE = '[object Object]';
  6538. // const FUNCTIONTYPE = '[object Function]'
  6539. function diff(current, pre) {
  6540. var result = {};
  6541. syncKeys(current, pre);
  6542. _diff(current, pre, '', result);
  6543. return result
  6544. }
  6545. function syncKeys(current, pre) {
  6546. if (current === pre) { return }
  6547. var rootCurrentType = type(current);
  6548. var rootPreType = type(pre);
  6549. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  6550. if(Object.keys(current).length >= Object.keys(pre).length){
  6551. for (var key in pre) {
  6552. var currentValue = current[key];
  6553. if (currentValue === undefined) {
  6554. current[key] = null;
  6555. } else {
  6556. syncKeys(currentValue, pre[key]);
  6557. }
  6558. }
  6559. }
  6560. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  6561. if (current.length >= pre.length) {
  6562. pre.forEach(function (item, index) {
  6563. syncKeys(current[index], item);
  6564. });
  6565. }
  6566. }
  6567. }
  6568. function _diff(current, pre, path, result) {
  6569. if (current === pre) { return }
  6570. var rootCurrentType = type(current);
  6571. var rootPreType = type(pre);
  6572. if (rootCurrentType == OBJECTTYPE) {
  6573. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  6574. setResult(result, path, current);
  6575. } else {
  6576. var loop = function ( key ) {
  6577. var currentValue = current[key];
  6578. var preValue = pre[key];
  6579. var currentType = type(currentValue);
  6580. var preType = type(preValue);
  6581. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  6582. if (currentValue != pre[key]) {
  6583. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  6584. }
  6585. } else if (currentType == ARRAYTYPE) {
  6586. if (preType != ARRAYTYPE) {
  6587. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  6588. } else {
  6589. if (currentValue.length < preValue.length) {
  6590. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  6591. } else {
  6592. currentValue.forEach(function (item, index) {
  6593. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  6594. });
  6595. }
  6596. }
  6597. } else if (currentType == OBJECTTYPE) {
  6598. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  6599. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  6600. } else {
  6601. for (var subKey in currentValue) {
  6602. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  6603. }
  6604. }
  6605. }
  6606. };
  6607. for (var key in current) loop( key );
  6608. }
  6609. } else if (rootCurrentType == ARRAYTYPE) {
  6610. if (rootPreType != ARRAYTYPE) {
  6611. setResult(result, path, current);
  6612. } else {
  6613. if (current.length < pre.length) {
  6614. setResult(result, path, current);
  6615. } else {
  6616. current.forEach(function (item, index) {
  6617. _diff(item, pre[index], path + '[' + index + ']', result);
  6618. });
  6619. }
  6620. }
  6621. } else {
  6622. setResult(result, path, current);
  6623. }
  6624. }
  6625. function setResult(result, k, v) {
  6626. // if (type(v) != FUNCTIONTYPE) {
  6627. result[k] = v;
  6628. // }
  6629. }
  6630. function type(obj) {
  6631. return Object.prototype.toString.call(obj)
  6632. }
  6633. /* */
  6634. function flushCallbacks$1(vm) {
  6635. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  6636. if (Object({"VUE_APP_NAME":"bigDataa","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  6637. var mpInstance = vm.$scope;
  6638. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  6639. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  6640. }
  6641. var copies = vm.__next_tick_callbacks.slice(0);
  6642. vm.__next_tick_callbacks.length = 0;
  6643. for (var i = 0; i < copies.length; i++) {
  6644. copies[i]();
  6645. }
  6646. }
  6647. }
  6648. function hasRenderWatcher(vm) {
  6649. return queue.find(function (watcher) { return vm._watcher === watcher; })
  6650. }
  6651. function nextTick$1(vm, cb) {
  6652. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  6653. //2.nextTick 之前存在 render watcher
  6654. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  6655. if(Object({"VUE_APP_NAME":"bigDataa","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  6656. var mpInstance = vm.$scope;
  6657. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  6658. ']:nextVueTick');
  6659. }
  6660. return nextTick(cb, vm)
  6661. }else{
  6662. if(Object({"VUE_APP_NAME":"bigDataa","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  6663. var mpInstance$1 = vm.$scope;
  6664. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  6665. ']:nextMPTick');
  6666. }
  6667. }
  6668. var _resolve;
  6669. if (!vm.__next_tick_callbacks) {
  6670. vm.__next_tick_callbacks = [];
  6671. }
  6672. vm.__next_tick_callbacks.push(function () {
  6673. if (cb) {
  6674. try {
  6675. cb.call(vm);
  6676. } catch (e) {
  6677. handleError(e, vm, 'nextTick');
  6678. }
  6679. } else if (_resolve) {
  6680. _resolve(vm);
  6681. }
  6682. });
  6683. // $flow-disable-line
  6684. if (!cb && typeof Promise !== 'undefined') {
  6685. return new Promise(function (resolve) {
  6686. _resolve = resolve;
  6687. })
  6688. }
  6689. }
  6690. /* */
  6691. function cloneWithData(vm) {
  6692. // 确保当前 vm 所有数据被同步
  6693. var ret = Object.create(null);
  6694. var dataKeys = [].concat(
  6695. Object.keys(vm._data || {}),
  6696. Object.keys(vm._computedWatchers || {}));
  6697. dataKeys.reduce(function(ret, key) {
  6698. ret[key] = vm[key];
  6699. return ret
  6700. }, ret);
  6701. // vue-composition-api
  6702. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  6703. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  6704. if (rawBindings) {
  6705. Object.keys(rawBindings).forEach(function (key) {
  6706. ret[key] = vm[key];
  6707. });
  6708. }
  6709. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  6710. Object.assign(ret, vm.$mp.data || {});
  6711. if (
  6712. Array.isArray(vm.$options.behaviors) &&
  6713. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  6714. ) { //form-field
  6715. ret['name'] = vm.name;
  6716. ret['value'] = vm.value;
  6717. }
  6718. return JSON.parse(JSON.stringify(ret))
  6719. }
  6720. var patch = function(oldVnode, vnode) {
  6721. var this$1 = this;
  6722. if (vnode === null) { //destroy
  6723. return
  6724. }
  6725. if (this.mpType === 'page' || this.mpType === 'component') {
  6726. var mpInstance = this.$scope;
  6727. var data = Object.create(null);
  6728. try {
  6729. data = cloneWithData(this);
  6730. } catch (err) {
  6731. console.error(err);
  6732. }
  6733. data.__webviewId__ = mpInstance.data.__webviewId__;
  6734. var mpData = Object.create(null);
  6735. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  6736. mpData[key] = mpInstance.data[key];
  6737. });
  6738. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  6739. if (Object.keys(diffData).length) {
  6740. if (Object({"VUE_APP_NAME":"bigDataa","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  6741. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  6742. ']差量更新',
  6743. JSON.stringify(diffData));
  6744. }
  6745. this.__next_tick_pending = true;
  6746. mpInstance.setData(diffData, function () {
  6747. this$1.__next_tick_pending = false;
  6748. flushCallbacks$1(this$1);
  6749. });
  6750. } else {
  6751. flushCallbacks$1(this);
  6752. }
  6753. }
  6754. };
  6755. /* */
  6756. function createEmptyRender() {
  6757. }
  6758. function mountComponent$1(
  6759. vm,
  6760. el,
  6761. hydrating
  6762. ) {
  6763. if (!vm.mpType) {//main.js 中的 new Vue
  6764. return vm
  6765. }
  6766. if (vm.mpType === 'app') {
  6767. vm.$options.render = createEmptyRender;
  6768. }
  6769. if (!vm.$options.render) {
  6770. vm.$options.render = createEmptyRender;
  6771. if (true) {
  6772. /* istanbul ignore if */
  6773. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  6774. vm.$options.el || el) {
  6775. warn(
  6776. 'You are using the runtime-only build of Vue where the template ' +
  6777. 'compiler is not available. Either pre-compile the templates into ' +
  6778. 'render functions, or use the compiler-included build.',
  6779. vm
  6780. );
  6781. } else {
  6782. warn(
  6783. 'Failed to mount component: template or render function not defined.',
  6784. vm
  6785. );
  6786. }
  6787. }
  6788. }
  6789. !vm._$fallback && callHook(vm, 'beforeMount');
  6790. var updateComponent = function () {
  6791. vm._update(vm._render(), hydrating);
  6792. };
  6793. // we set this to vm._watcher inside the watcher's constructor
  6794. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  6795. // component's mounted hook), which relies on vm._watcher being already defined
  6796. new Watcher(vm, updateComponent, noop, {
  6797. before: function before() {
  6798. if (vm._isMounted && !vm._isDestroyed) {
  6799. callHook(vm, 'beforeUpdate');
  6800. }
  6801. }
  6802. }, true /* isRenderWatcher */);
  6803. hydrating = false;
  6804. return vm
  6805. }
  6806. /* */
  6807. function renderClass (
  6808. staticClass,
  6809. dynamicClass
  6810. ) {
  6811. if (isDef(staticClass) || isDef(dynamicClass)) {
  6812. return concat(staticClass, stringifyClass(dynamicClass))
  6813. }
  6814. /* istanbul ignore next */
  6815. return ''
  6816. }
  6817. function concat (a, b) {
  6818. return a ? b ? (a + ' ' + b) : a : (b || '')
  6819. }
  6820. function stringifyClass (value) {
  6821. if (Array.isArray(value)) {
  6822. return stringifyArray(value)
  6823. }
  6824. if (isObject(value)) {
  6825. return stringifyObject(value)
  6826. }
  6827. if (typeof value === 'string') {
  6828. return value
  6829. }
  6830. /* istanbul ignore next */
  6831. return ''
  6832. }
  6833. function stringifyArray (value) {
  6834. var res = '';
  6835. var stringified;
  6836. for (var i = 0, l = value.length; i < l; i++) {
  6837. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  6838. if (res) { res += ' '; }
  6839. res += stringified;
  6840. }
  6841. }
  6842. return res
  6843. }
  6844. function stringifyObject (value) {
  6845. var res = '';
  6846. for (var key in value) {
  6847. if (value[key]) {
  6848. if (res) { res += ' '; }
  6849. res += key;
  6850. }
  6851. }
  6852. return res
  6853. }
  6854. /* */
  6855. var parseStyleText = cached(function (cssText) {
  6856. var res = {};
  6857. var listDelimiter = /;(?![^(]*\))/g;
  6858. var propertyDelimiter = /:(.+)/;
  6859. cssText.split(listDelimiter).forEach(function (item) {
  6860. if (item) {
  6861. var tmp = item.split(propertyDelimiter);
  6862. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  6863. }
  6864. });
  6865. return res
  6866. });
  6867. // normalize possible array / string values into Object
  6868. function normalizeStyleBinding (bindingStyle) {
  6869. if (Array.isArray(bindingStyle)) {
  6870. return toObject(bindingStyle)
  6871. }
  6872. if (typeof bindingStyle === 'string') {
  6873. return parseStyleText(bindingStyle)
  6874. }
  6875. return bindingStyle
  6876. }
  6877. /* */
  6878. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  6879. function getTarget(obj, path) {
  6880. var parts = path.split('.');
  6881. var key = parts[0];
  6882. if (key.indexOf('__$n') === 0) { //number index
  6883. key = parseInt(key.replace('__$n', ''));
  6884. }
  6885. if (parts.length === 1) {
  6886. return obj[key]
  6887. }
  6888. return getTarget(obj[key], parts.slice(1).join('.'))
  6889. }
  6890. function internalMixin(Vue) {
  6891. Vue.config.errorHandler = function(err, vm, info) {
  6892. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  6893. console.error(err);
  6894. /* eslint-disable no-undef */
  6895. var app = getApp();
  6896. if (app && app.onError) {
  6897. app.onError(err);
  6898. }
  6899. };
  6900. var oldEmit = Vue.prototype.$emit;
  6901. Vue.prototype.$emit = function(event) {
  6902. if (this.$scope && event) {
  6903. this.$scope['triggerEvent'](event, {
  6904. __args__: toArray(arguments, 1)
  6905. });
  6906. }
  6907. return oldEmit.apply(this, arguments)
  6908. };
  6909. Vue.prototype.$nextTick = function(fn) {
  6910. return nextTick$1(this, fn)
  6911. };
  6912. MP_METHODS.forEach(function (method) {
  6913. Vue.prototype[method] = function(args) {
  6914. if (this.$scope && this.$scope[method]) {
  6915. return this.$scope[method](args)
  6916. }
  6917. // mp-alipay
  6918. if (typeof my === 'undefined') {
  6919. return
  6920. }
  6921. if (method === 'createSelectorQuery') {
  6922. /* eslint-disable no-undef */
  6923. return my.createSelectorQuery(args)
  6924. } else if (method === 'createIntersectionObserver') {
  6925. /* eslint-disable no-undef */
  6926. return my.createIntersectionObserver(args)
  6927. }
  6928. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  6929. };
  6930. });
  6931. Vue.prototype.__init_provide = initProvide;
  6932. Vue.prototype.__init_injections = initInjections;
  6933. Vue.prototype.__call_hook = function(hook, args) {
  6934. var vm = this;
  6935. // #7573 disable dep collection when invoking lifecycle hooks
  6936. pushTarget();
  6937. var handlers = vm.$options[hook];
  6938. var info = hook + " hook";
  6939. var ret;
  6940. if (handlers) {
  6941. for (var i = 0, j = handlers.length; i < j; i++) {
  6942. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  6943. }
  6944. }
  6945. if (vm._hasHookEvent) {
  6946. vm.$emit('hook:' + hook, args);
  6947. }
  6948. popTarget();
  6949. return ret
  6950. };
  6951. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  6952. if (Array.isArray(modifiers)) {
  6953. if (modifiers.indexOf('trim') !== -1) {
  6954. value = value.trim();
  6955. }
  6956. if (modifiers.indexOf('number') !== -1) {
  6957. value = this._n(value);
  6958. }
  6959. }
  6960. if (!target) {
  6961. target = this;
  6962. }
  6963. target[key] = value;
  6964. };
  6965. Vue.prototype.__set_sync = function(target, key, value) {
  6966. if (!target) {
  6967. target = this;
  6968. }
  6969. target[key] = value;
  6970. };
  6971. Vue.prototype.__get_orig = function(item) {
  6972. if (isPlainObject(item)) {
  6973. return item['$orig'] || item
  6974. }
  6975. return item
  6976. };
  6977. Vue.prototype.__get_value = function(dataPath, target) {
  6978. return getTarget(target || this, dataPath)
  6979. };
  6980. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  6981. return renderClass(staticClass, dynamicClass)
  6982. };
  6983. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  6984. if (!dynamicStyle && !staticStyle) {
  6985. return ''
  6986. }
  6987. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  6988. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  6989. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  6990. };
  6991. Vue.prototype.__map = function(val, iteratee) {
  6992. //TODO 暂不考虑 string
  6993. var ret, i, l, keys, key;
  6994. if (Array.isArray(val)) {
  6995. ret = new Array(val.length);
  6996. for (i = 0, l = val.length; i < l; i++) {
  6997. ret[i] = iteratee(val[i], i);
  6998. }
  6999. return ret
  7000. } else if (isObject(val)) {
  7001. keys = Object.keys(val);
  7002. ret = Object.create(null);
  7003. for (i = 0, l = keys.length; i < l; i++) {
  7004. key = keys[i];
  7005. ret[key] = iteratee(val[key], key, i);
  7006. }
  7007. return ret
  7008. } else if (typeof val === 'number') {
  7009. ret = new Array(val);
  7010. for (i = 0, l = val; i < l; i++) {
  7011. // 第一个参数暂时仍和小程序一致
  7012. ret[i] = iteratee(i, i);
  7013. }
  7014. return ret
  7015. }
  7016. return []
  7017. };
  7018. }
  7019. /* */
  7020. var LIFECYCLE_HOOKS$1 = [
  7021. //App
  7022. 'onLaunch',
  7023. 'onShow',
  7024. 'onHide',
  7025. 'onUniNViewMessage',
  7026. 'onPageNotFound',
  7027. 'onThemeChange',
  7028. 'onError',
  7029. 'onUnhandledRejection',
  7030. //Page
  7031. 'onLoad',
  7032. // 'onShow',
  7033. 'onReady',
  7034. // 'onHide',
  7035. 'onUnload',
  7036. 'onPullDownRefresh',
  7037. 'onReachBottom',
  7038. 'onTabItemTap',
  7039. 'onAddToFavorites',
  7040. 'onShareTimeline',
  7041. 'onShareAppMessage',
  7042. 'onResize',
  7043. 'onPageScroll',
  7044. 'onNavigationBarButtonTap',
  7045. 'onBackPress',
  7046. 'onNavigationBarSearchInputChanged',
  7047. 'onNavigationBarSearchInputConfirmed',
  7048. 'onNavigationBarSearchInputClicked',
  7049. //Component
  7050. // 'onReady', // 兼容旧版本,应该移除该事件
  7051. 'onPageShow',
  7052. 'onPageHide',
  7053. 'onPageResize'
  7054. ];
  7055. function lifecycleMixin$1(Vue) {
  7056. //fixed vue-class-component
  7057. var oldExtend = Vue.extend;
  7058. Vue.extend = function(extendOptions) {
  7059. extendOptions = extendOptions || {};
  7060. var methods = extendOptions.methods;
  7061. if (methods) {
  7062. Object.keys(methods).forEach(function (methodName) {
  7063. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  7064. extendOptions[methodName] = methods[methodName];
  7065. delete methods[methodName];
  7066. }
  7067. });
  7068. }
  7069. return oldExtend.call(this, extendOptions)
  7070. };
  7071. var strategies = Vue.config.optionMergeStrategies;
  7072. var mergeHook = strategies.created;
  7073. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  7074. strategies[hook] = mergeHook;
  7075. });
  7076. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  7077. }
  7078. /* */
  7079. // install platform patch function
  7080. Vue.prototype.__patch__ = patch;
  7081. // public mount method
  7082. Vue.prototype.$mount = function(
  7083. el ,
  7084. hydrating
  7085. ) {
  7086. return mountComponent$1(this, el, hydrating)
  7087. };
  7088. lifecycleMixin$1(Vue);
  7089. internalMixin(Vue);
  7090. /* */
  7091. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  7092. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  7093. /***/ }),
  7094. /***/ 3:
  7095. /*!***********************************!*\
  7096. !*** (webpack)/buildin/global.js ***!
  7097. \***********************************/
  7098. /*! no static exports found */
  7099. /***/ (function(module, exports) {
  7100. var g;
  7101. // This works in non-strict mode
  7102. g = (function() {
  7103. return this;
  7104. })();
  7105. try {
  7106. // This works if eval is allowed (see CSP)
  7107. g = g || new Function("return this")();
  7108. } catch (e) {
  7109. // This works if the window reference is available
  7110. if (typeof window === "object") g = window;
  7111. }
  7112. // g can still be undefined, but nothing to do about it...
  7113. // We return undefined, instead of nothing here, so it's
  7114. // easier to handle this case. if(!global) { ...}
  7115. module.exports = g;
  7116. /***/ }),
  7117. /***/ 4:
  7118. /*!*****************************!*\
  7119. !*** E:/bigData/pages.json ***!
  7120. \*****************************/
  7121. /*! no static exports found */
  7122. /***/ (function(module, exports) {
  7123. /***/ }),
  7124. /***/ 84:
  7125. /*!************************************************!*\
  7126. !*** E:/bigData/components/uni-icons/icons.js ***!
  7127. \************************************************/
  7128. /*! no static exports found */
  7129. /***/ (function(module, exports, __webpack_require__) {
  7130. "use strict";
  7131. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  7132. 'contact': "\uE100",
  7133. 'person': "\uE101",
  7134. 'personadd': "\uE102",
  7135. 'contact-filled': "\uE130",
  7136. 'person-filled': "\uE131",
  7137. 'personadd-filled': "\uE132",
  7138. 'phone': "\uE200",
  7139. 'email': "\uE201",
  7140. 'chatbubble': "\uE202",
  7141. 'chatboxes': "\uE203",
  7142. 'phone-filled': "\uE230",
  7143. 'email-filled': "\uE231",
  7144. 'chatbubble-filled': "\uE232",
  7145. 'chatboxes-filled': "\uE233",
  7146. 'weibo': "\uE260",
  7147. 'weixin': "\uE261",
  7148. 'pengyouquan': "\uE262",
  7149. 'chat': "\uE263",
  7150. 'qq': "\uE264",
  7151. 'videocam': "\uE300",
  7152. 'camera': "\uE301",
  7153. 'mic': "\uE302",
  7154. 'location': "\uE303",
  7155. 'mic-filled': "\uE332",
  7156. 'speech': "\uE332",
  7157. 'location-filled': "\uE333",
  7158. 'micoff': "\uE360",
  7159. 'image': "\uE363",
  7160. 'map': "\uE364",
  7161. 'compose': "\uE400",
  7162. 'trash': "\uE401",
  7163. 'upload': "\uE402",
  7164. 'download': "\uE403",
  7165. 'close': "\uE404",
  7166. 'redo': "\uE405",
  7167. 'undo': "\uE406",
  7168. 'refresh': "\uE407",
  7169. 'star': "\uE408",
  7170. 'plus': "\uE409",
  7171. 'minus': "\uE410",
  7172. 'circle': "\uE411",
  7173. 'checkbox': "\uE411",
  7174. 'close-filled': "\uE434",
  7175. 'clear': "\uE434",
  7176. 'refresh-filled': "\uE437",
  7177. 'star-filled': "\uE438",
  7178. 'plus-filled': "\uE439",
  7179. 'minus-filled': "\uE440",
  7180. 'circle-filled': "\uE441",
  7181. 'checkbox-filled': "\uE442",
  7182. 'closeempty': "\uE460",
  7183. 'refreshempty': "\uE461",
  7184. 'reload': "\uE462",
  7185. 'starhalf': "\uE463",
  7186. 'spinner': "\uE464",
  7187. 'spinner-cycle': "\uE465",
  7188. 'search': "\uE466",
  7189. 'plusempty': "\uE468",
  7190. 'forward': "\uE470",
  7191. 'back': "\uE471",
  7192. 'left-nav': "\uE471",
  7193. 'checkmarkempty': "\uE472",
  7194. 'home': "\uE500",
  7195. 'navigate': "\uE501",
  7196. 'gear': "\uE502",
  7197. 'paperplane': "\uE503",
  7198. 'info': "\uE504",
  7199. 'help': "\uE505",
  7200. 'locked': "\uE506",
  7201. 'more': "\uE507",
  7202. 'flag': "\uE508",
  7203. 'home-filled': "\uE530",
  7204. 'gear-filled': "\uE532",
  7205. 'info-filled': "\uE534",
  7206. 'help-filled': "\uE535",
  7207. 'more-filled': "\uE537",
  7208. 'settings': "\uE560",
  7209. 'list': "\uE562",
  7210. 'bars': "\uE563",
  7211. 'loop': "\uE565",
  7212. 'paperclip': "\uE567",
  7213. 'eye': "\uE568",
  7214. 'arrowup': "\uE580",
  7215. 'arrowdown': "\uE581",
  7216. 'arrowleft': "\uE582",
  7217. 'arrowright': "\uE583",
  7218. 'arrowthinup': "\uE584",
  7219. 'arrowthindown': "\uE585",
  7220. 'arrowthinleft': "\uE586",
  7221. 'arrowthinright': "\uE587",
  7222. 'pulldown': "\uE588",
  7223. 'closefill': "\uE589",
  7224. 'sound': "\uE590",
  7225. 'scan': "\uE612" };exports.default = _default;
  7226. /***/ })
  7227. }]);
  7228. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map