vendor.js 383 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],{
  2. /***/ 1:
  3. /*!************************************************************!*\
  4. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  5. \************************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. "use strict";
  9. Object.defineProperty(exports, "__esModule", { value: true });exports.createApp = createApp;exports.createComponent = createComponent;exports.createPage = createPage;exports.default = void 0;var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _slicedToArray(arr, i) {return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(arr, i) {if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"] != null) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}function _arrayWithHoles(arr) {if (Array.isArray(arr)) return arr;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toConsumableArray(arr) {return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();}function _nonIterableSpread() {throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o, minLen) {if (!o) return;if (typeof o === "string") return _arrayLikeToArray(o, minLen);var n = Object.prototype.toString.call(o).slice(8, -1);if (n === "Object" && o.constructor) n = o.constructor.name;if (n === "Map" || n === "Set") return Array.from(n);if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);}function _iterableToArray(iter) {if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);}function _arrayWithoutHoles(arr) {if (Array.isArray(arr)) return _arrayLikeToArray(arr);}function _arrayLikeToArray(arr, len) {if (len == null || len > arr.length) len = arr.length;for (var i = 0, arr2 = new Array(len); i < len; i++) {arr2[i] = arr[i];}return arr2;}
  10. var _toString = Object.prototype.toString;
  11. var hasOwnProperty = Object.prototype.hasOwnProperty;
  12. function isFn(fn) {
  13. return typeof fn === 'function';
  14. }
  15. function isStr(str) {
  16. return typeof str === 'string';
  17. }
  18. function isPlainObject(obj) {
  19. return _toString.call(obj) === '[object Object]';
  20. }
  21. function hasOwn(obj, key) {
  22. return hasOwnProperty.call(obj, key);
  23. }
  24. function noop() {}
  25. /**
  26. * Create a cached version of a pure function.
  27. */
  28. function cached(fn) {
  29. var cache = Object.create(null);
  30. return function cachedFn(str) {
  31. var hit = cache[str];
  32. return hit || (cache[str] = fn(str));
  33. };
  34. }
  35. /**
  36. * Camelize a hyphen-delimited string.
  37. */
  38. var camelizeRE = /-(\w)/g;
  39. var camelize = cached(function (str) {
  40. return str.replace(camelizeRE, function (_, c) {return c ? c.toUpperCase() : '';});
  41. });
  42. var HOOKS = [
  43. 'invoke',
  44. 'success',
  45. 'fail',
  46. 'complete',
  47. 'returnValue'];
  48. var globalInterceptors = {};
  49. var scopedInterceptors = {};
  50. function mergeHook(parentVal, childVal) {
  51. var res = childVal ?
  52. parentVal ?
  53. parentVal.concat(childVal) :
  54. Array.isArray(childVal) ?
  55. childVal : [childVal] :
  56. parentVal;
  57. return res ?
  58. dedupeHooks(res) :
  59. res;
  60. }
  61. function dedupeHooks(hooks) {
  62. var res = [];
  63. for (var i = 0; i < hooks.length; i++) {
  64. if (res.indexOf(hooks[i]) === -1) {
  65. res.push(hooks[i]);
  66. }
  67. }
  68. return res;
  69. }
  70. function removeHook(hooks, hook) {
  71. var index = hooks.indexOf(hook);
  72. if (index !== -1) {
  73. hooks.splice(index, 1);
  74. }
  75. }
  76. function mergeInterceptorHook(interceptor, option) {
  77. Object.keys(option).forEach(function (hook) {
  78. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  79. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  80. }
  81. });
  82. }
  83. function removeInterceptorHook(interceptor, option) {
  84. if (!interceptor || !option) {
  85. return;
  86. }
  87. Object.keys(option).forEach(function (hook) {
  88. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  89. removeHook(interceptor[hook], option[hook]);
  90. }
  91. });
  92. }
  93. function addInterceptor(method, option) {
  94. if (typeof method === 'string' && isPlainObject(option)) {
  95. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  96. } else if (isPlainObject(method)) {
  97. mergeInterceptorHook(globalInterceptors, method);
  98. }
  99. }
  100. function removeInterceptor(method, option) {
  101. if (typeof method === 'string') {
  102. if (isPlainObject(option)) {
  103. removeInterceptorHook(scopedInterceptors[method], option);
  104. } else {
  105. delete scopedInterceptors[method];
  106. }
  107. } else if (isPlainObject(method)) {
  108. removeInterceptorHook(globalInterceptors, method);
  109. }
  110. }
  111. function wrapperHook(hook) {
  112. return function (data) {
  113. return hook(data) || data;
  114. };
  115. }
  116. function isPromise(obj) {
  117. return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  118. }
  119. function queue(hooks, data) {
  120. var promise = false;
  121. for (var i = 0; i < hooks.length; i++) {
  122. var hook = hooks[i];
  123. if (promise) {
  124. promise = Promise.resolve(wrapperHook(hook));
  125. } else {
  126. var res = hook(data);
  127. if (isPromise(res)) {
  128. promise = Promise.resolve(res);
  129. }
  130. if (res === false) {
  131. return {
  132. then: function then() {} };
  133. }
  134. }
  135. }
  136. return promise || {
  137. then: function then(callback) {
  138. return callback(data);
  139. } };
  140. }
  141. function wrapperOptions(interceptor) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  142. ['success', 'fail', 'complete'].forEach(function (name) {
  143. if (Array.isArray(interceptor[name])) {
  144. var oldCallback = options[name];
  145. options[name] = function callbackInterceptor(res) {
  146. queue(interceptor[name], res).then(function (res) {
  147. /* eslint-disable no-mixed-operators */
  148. return isFn(oldCallback) && oldCallback(res) || res;
  149. });
  150. };
  151. }
  152. });
  153. return options;
  154. }
  155. function wrapperReturnValue(method, returnValue) {
  156. var returnValueHooks = [];
  157. if (Array.isArray(globalInterceptors.returnValue)) {
  158. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(globalInterceptors.returnValue));
  159. }
  160. var interceptor = scopedInterceptors[method];
  161. if (interceptor && Array.isArray(interceptor.returnValue)) {
  162. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(interceptor.returnValue));
  163. }
  164. returnValueHooks.forEach(function (hook) {
  165. returnValue = hook(returnValue) || returnValue;
  166. });
  167. return returnValue;
  168. }
  169. function getApiInterceptorHooks(method) {
  170. var interceptor = Object.create(null);
  171. Object.keys(globalInterceptors).forEach(function (hook) {
  172. if (hook !== 'returnValue') {
  173. interceptor[hook] = globalInterceptors[hook].slice();
  174. }
  175. });
  176. var scopedInterceptor = scopedInterceptors[method];
  177. if (scopedInterceptor) {
  178. Object.keys(scopedInterceptor).forEach(function (hook) {
  179. if (hook !== 'returnValue') {
  180. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  181. }
  182. });
  183. }
  184. return interceptor;
  185. }
  186. function invokeApi(method, api, options) {for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {params[_key - 3] = arguments[_key];}
  187. var interceptor = getApiInterceptorHooks(method);
  188. if (interceptor && Object.keys(interceptor).length) {
  189. if (Array.isArray(interceptor.invoke)) {
  190. var res = queue(interceptor.invoke, options);
  191. return res.then(function (options) {
  192. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  193. });
  194. } else {
  195. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  196. }
  197. }
  198. return api.apply(void 0, [options].concat(params));
  199. }
  200. var promiseInterceptor = {
  201. returnValue: function returnValue(res) {
  202. if (!isPromise(res)) {
  203. return res;
  204. }
  205. return res.then(function (res) {
  206. return res[1];
  207. }).catch(function (res) {
  208. return res[0];
  209. });
  210. } };
  211. var SYNC_API_RE =
  212. /^\$|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/;
  213. var CONTEXT_API_RE = /^create|Manager$/;
  214. // Context例外情况
  215. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  216. // 同步例外情况
  217. var ASYNC_API = ['createBLEConnection'];
  218. var CALLBACK_API_RE = /^on|^off/;
  219. function isContextApi(name) {
  220. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  221. }
  222. function isSyncApi(name) {
  223. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  224. }
  225. function isCallbackApi(name) {
  226. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  227. }
  228. function handlePromise(promise) {
  229. return promise.then(function (data) {
  230. return [null, data];
  231. }).
  232. catch(function (err) {return [err];});
  233. }
  234. function shouldPromise(name) {
  235. if (
  236. isContextApi(name) ||
  237. isSyncApi(name) ||
  238. isCallbackApi(name))
  239. {
  240. return false;
  241. }
  242. return true;
  243. }
  244. /* eslint-disable no-extend-native */
  245. if (!Promise.prototype.finally) {
  246. Promise.prototype.finally = function (callback) {
  247. var promise = this.constructor;
  248. return this.then(
  249. function (value) {return promise.resolve(callback()).then(function () {return value;});},
  250. function (reason) {return promise.resolve(callback()).then(function () {
  251. throw reason;
  252. });});
  253. };
  254. }
  255. function promisify(name, api) {
  256. if (!shouldPromise(name)) {
  257. return api;
  258. }
  259. return function promiseApi() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {params[_key2 - 1] = arguments[_key2];}
  260. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  261. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  262. }
  263. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  264. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  265. success: resolve,
  266. fail: reject })].concat(
  267. params));
  268. })));
  269. };
  270. }
  271. var EPS = 1e-4;
  272. var BASE_DEVICE_WIDTH = 750;
  273. var isIOS = false;
  274. var deviceWidth = 0;
  275. var deviceDPR = 0;
  276. function checkDeviceWidth() {var _wx$getSystemInfoSync =
  277. wx.getSystemInfoSync(),platform = _wx$getSystemInfoSync.platform,pixelRatio = _wx$getSystemInfoSync.pixelRatio,windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  278. deviceWidth = windowWidth;
  279. deviceDPR = pixelRatio;
  280. isIOS = platform === 'ios';
  281. }
  282. function upx2px(number, newDeviceWidth) {
  283. if (deviceWidth === 0) {
  284. checkDeviceWidth();
  285. }
  286. number = Number(number);
  287. if (number === 0) {
  288. return 0;
  289. }
  290. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  291. if (result < 0) {
  292. result = -result;
  293. }
  294. result = Math.floor(result + EPS);
  295. if (result === 0) {
  296. if (deviceDPR === 1 || !isIOS) {
  297. result = 1;
  298. } else {
  299. result = 0.5;
  300. }
  301. }
  302. return number < 0 ? -result : result;
  303. }
  304. var interceptors = {
  305. promiseInterceptor: promiseInterceptor };
  306. var baseApi = /*#__PURE__*/Object.freeze({
  307. __proto__: null,
  308. upx2px: upx2px,
  309. addInterceptor: addInterceptor,
  310. removeInterceptor: removeInterceptor,
  311. interceptors: interceptors });
  312. var previewImage = {
  313. args: function args(fromArgs) {
  314. var currentIndex = parseInt(fromArgs.current);
  315. if (isNaN(currentIndex)) {
  316. return;
  317. }
  318. var urls = fromArgs.urls;
  319. if (!Array.isArray(urls)) {
  320. return;
  321. }
  322. var len = urls.length;
  323. if (!len) {
  324. return;
  325. }
  326. if (currentIndex < 0) {
  327. currentIndex = 0;
  328. } else if (currentIndex >= len) {
  329. currentIndex = len - 1;
  330. }
  331. if (currentIndex > 0) {
  332. fromArgs.current = urls[currentIndex];
  333. fromArgs.urls = urls.filter(
  334. function (item, index) {return index < currentIndex ? item !== urls[currentIndex] : true;});
  335. } else {
  336. fromArgs.current = urls[0];
  337. }
  338. return {
  339. indicator: false,
  340. loop: false };
  341. } };
  342. function addSafeAreaInsets(result) {
  343. if (result.safeArea) {
  344. var safeArea = result.safeArea;
  345. result.safeAreaInsets = {
  346. top: safeArea.top,
  347. left: safeArea.left,
  348. right: result.windowWidth - safeArea.right,
  349. bottom: result.windowHeight - safeArea.bottom };
  350. }
  351. }
  352. var protocols = {
  353. previewImage: previewImage,
  354. getSystemInfo: {
  355. returnValue: addSafeAreaInsets },
  356. getSystemInfoSync: {
  357. returnValue: addSafeAreaInsets } };
  358. var todos = [
  359. 'vibrate',
  360. 'preloadPage',
  361. 'unPreloadPage',
  362. 'loadSubPackage'];
  363. var canIUses = [];
  364. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  365. function processCallback(methodName, method, returnValue) {
  366. return function (res) {
  367. return method(processReturnValue(methodName, res, returnValue));
  368. };
  369. }
  370. 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;
  371. if (isPlainObject(fromArgs)) {// 一般 api 的参数解析
  372. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  373. if (isFn(argsOption)) {
  374. argsOption = argsOption(fromArgs, toArgs) || {};
  375. }
  376. for (var key in fromArgs) {
  377. if (hasOwn(argsOption, key)) {
  378. var keyOption = argsOption[key];
  379. if (isFn(keyOption)) {
  380. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  381. }
  382. if (!keyOption) {// 不支持的参数
  383. console.warn("\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F ".concat(methodName, "\u6682\u4E0D\u652F\u6301").concat(key));
  384. } else if (isStr(keyOption)) {// 重写参数 key
  385. toArgs[keyOption] = fromArgs[key];
  386. } else if (isPlainObject(keyOption)) {// {name:newName,value:value}可重新指定参数 key:value
  387. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  388. }
  389. } else if (CALLBACKS.indexOf(key) !== -1) {
  390. if (isFn(fromArgs[key])) {
  391. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  392. }
  393. } else {
  394. if (!keepFromArgs) {
  395. toArgs[key] = fromArgs[key];
  396. }
  397. }
  398. }
  399. return toArgs;
  400. } else if (isFn(fromArgs)) {
  401. fromArgs = processCallback(methodName, fromArgs, returnValue);
  402. }
  403. return fromArgs;
  404. }
  405. function processReturnValue(methodName, res, returnValue) {var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  406. if (isFn(protocols.returnValue)) {// 处理通用 returnValue
  407. res = protocols.returnValue(methodName, res);
  408. }
  409. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  410. }
  411. function wrapper(methodName, method) {
  412. if (hasOwn(protocols, methodName)) {
  413. var protocol = protocols[methodName];
  414. if (!protocol) {// 暂不支持的 api
  415. return function () {
  416. console.error("\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F \u6682\u4E0D\u652F\u6301".concat(methodName));
  417. };
  418. }
  419. return function (arg1, arg2) {// 目前 api 最多两个参数
  420. var options = protocol;
  421. if (isFn(protocol)) {
  422. options = protocol(arg1);
  423. }
  424. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  425. var args = [arg1];
  426. if (typeof arg2 !== 'undefined') {
  427. args.push(arg2);
  428. }
  429. var returnValue = wx[options.name || methodName].apply(wx, args);
  430. if (isSyncApi(methodName)) {// 同步 api
  431. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  432. }
  433. return returnValue;
  434. };
  435. }
  436. return method;
  437. }
  438. var todoApis = Object.create(null);
  439. var TODOS = [
  440. 'onTabBarMidButtonTap',
  441. 'subscribePush',
  442. 'unsubscribePush',
  443. 'onPush',
  444. 'offPush',
  445. 'share'];
  446. function createTodoApi(name) {
  447. return function todoApi(_ref)
  448. {var fail = _ref.fail,complete = _ref.complete;
  449. var res = {
  450. errMsg: "".concat(name, ":fail:\u6682\u4E0D\u652F\u6301 ").concat(name, " \u65B9\u6CD5") };
  451. isFn(fail) && fail(res);
  452. isFn(complete) && complete(res);
  453. };
  454. }
  455. TODOS.forEach(function (name) {
  456. todoApis[name] = createTodoApi(name);
  457. });
  458. var providers = {
  459. oauth: ['weixin'],
  460. share: ['weixin'],
  461. payment: ['wxpay'],
  462. push: ['weixin'] };
  463. function getProvider(_ref2)
  464. {var service = _ref2.service,success = _ref2.success,fail = _ref2.fail,complete = _ref2.complete;
  465. var res = false;
  466. if (providers[service]) {
  467. res = {
  468. errMsg: 'getProvider:ok',
  469. service: service,
  470. provider: providers[service] };
  471. isFn(success) && success(res);
  472. } else {
  473. res = {
  474. errMsg: 'getProvider:fail:服务[' + service + ']不存在' };
  475. isFn(fail) && fail(res);
  476. }
  477. isFn(complete) && complete(res);
  478. }
  479. var extraApi = /*#__PURE__*/Object.freeze({
  480. __proto__: null,
  481. getProvider: getProvider });
  482. var getEmitter = function () {
  483. var Emitter;
  484. return function getUniEmitter() {
  485. if (!Emitter) {
  486. Emitter = new _vue.default();
  487. }
  488. return Emitter;
  489. };
  490. }();
  491. function apply(ctx, method, args) {
  492. return ctx[method].apply(ctx, args);
  493. }
  494. function $on() {
  495. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  496. }
  497. function $off() {
  498. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  499. }
  500. function $once() {
  501. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  502. }
  503. function $emit() {
  504. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  505. }
  506. var eventApi = /*#__PURE__*/Object.freeze({
  507. __proto__: null,
  508. $on: $on,
  509. $off: $off,
  510. $once: $once,
  511. $emit: $emit });
  512. var api = /*#__PURE__*/Object.freeze({
  513. __proto__: null });
  514. var MPPage = Page;
  515. var MPComponent = Component;
  516. var customizeRE = /:/g;
  517. var customize = cached(function (str) {
  518. return camelize(str.replace(customizeRE, '-'));
  519. });
  520. function initTriggerEvent(mpInstance) {
  521. {
  522. if (!wx.canIUse('nextTick')) {
  523. return;
  524. }
  525. }
  526. var oldTriggerEvent = mpInstance.triggerEvent;
  527. mpInstance.triggerEvent = function (event) {for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {args[_key3 - 1] = arguments[_key3];}
  528. return oldTriggerEvent.apply(mpInstance, [customize(event)].concat(args));
  529. };
  530. }
  531. function initHook(name, options) {
  532. var oldHook = options[name];
  533. if (!oldHook) {
  534. options[name] = function () {
  535. initTriggerEvent(this);
  536. };
  537. } else {
  538. options[name] = function () {
  539. initTriggerEvent(this);for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {args[_key4] = arguments[_key4];}
  540. return oldHook.apply(this, args);
  541. };
  542. }
  543. }
  544. Page = function Page() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  545. initHook('onLoad', options);
  546. return MPPage(options);
  547. };
  548. Component = function Component() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  549. initHook('created', options);
  550. return MPComponent(options);
  551. };
  552. var PAGE_EVENT_HOOKS = [
  553. 'onPullDownRefresh',
  554. 'onReachBottom',
  555. 'onAddToFavorites',
  556. 'onShareTimeline',
  557. 'onShareAppMessage',
  558. 'onPageScroll',
  559. 'onResize',
  560. 'onTabItemTap'];
  561. function initMocks(vm, mocks) {
  562. var mpInstance = vm.$mp[vm.mpType];
  563. mocks.forEach(function (mock) {
  564. if (hasOwn(mpInstance, mock)) {
  565. vm[mock] = mpInstance[mock];
  566. }
  567. });
  568. }
  569. function hasHook(hook, vueOptions) {
  570. if (!vueOptions) {
  571. return true;
  572. }
  573. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  574. return true;
  575. }
  576. vueOptions = vueOptions.default || vueOptions;
  577. if (isFn(vueOptions)) {
  578. if (isFn(vueOptions.extendOptions[hook])) {
  579. return true;
  580. }
  581. if (vueOptions.super &&
  582. vueOptions.super.options &&
  583. Array.isArray(vueOptions.super.options[hook])) {
  584. return true;
  585. }
  586. return false;
  587. }
  588. if (isFn(vueOptions[hook])) {
  589. return true;
  590. }
  591. var mixins = vueOptions.mixins;
  592. if (Array.isArray(mixins)) {
  593. return !!mixins.find(function (mixin) {return hasHook(hook, mixin);});
  594. }
  595. }
  596. function initHooks(mpOptions, hooks, vueOptions) {
  597. hooks.forEach(function (hook) {
  598. if (hasHook(hook, vueOptions)) {
  599. mpOptions[hook] = function (args) {
  600. return this.$vm && this.$vm.__call_hook(hook, args);
  601. };
  602. }
  603. });
  604. }
  605. function initVueComponent(Vue, vueOptions) {
  606. vueOptions = vueOptions.default || vueOptions;
  607. var VueComponent;
  608. if (isFn(vueOptions)) {
  609. VueComponent = vueOptions;
  610. } else {
  611. VueComponent = Vue.extend(vueOptions);
  612. }
  613. vueOptions = VueComponent.options;
  614. return [VueComponent, vueOptions];
  615. }
  616. function initSlots(vm, vueSlots) {
  617. if (Array.isArray(vueSlots) && vueSlots.length) {
  618. var $slots = Object.create(null);
  619. vueSlots.forEach(function (slotName) {
  620. $slots[slotName] = true;
  621. });
  622. vm.$scopedSlots = vm.$slots = $slots;
  623. }
  624. }
  625. function initVueIds(vueIds, mpInstance) {
  626. vueIds = (vueIds || '').split(',');
  627. var len = vueIds.length;
  628. if (len === 1) {
  629. mpInstance._$vueId = vueIds[0];
  630. } else if (len === 2) {
  631. mpInstance._$vueId = vueIds[0];
  632. mpInstance._$vuePid = vueIds[1];
  633. }
  634. }
  635. function initData(vueOptions, context) {
  636. var data = vueOptions.data || {};
  637. var methods = vueOptions.methods || {};
  638. if (typeof data === 'function') {
  639. try {
  640. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  641. } catch (e) {
  642. if (Object({"NODE_ENV":"development","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  643. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  644. }
  645. }
  646. } else {
  647. try {
  648. // 对 data 格式化
  649. data = JSON.parse(JSON.stringify(data));
  650. } catch (e) {}
  651. }
  652. if (!isPlainObject(data)) {
  653. data = {};
  654. }
  655. Object.keys(methods).forEach(function (methodName) {
  656. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  657. data[methodName] = methods[methodName];
  658. }
  659. });
  660. return data;
  661. }
  662. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  663. function createObserver(name) {
  664. return function observer(newVal, oldVal) {
  665. if (this.$vm) {
  666. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  667. }
  668. };
  669. }
  670. function initBehaviors(vueOptions, initBehavior) {
  671. var vueBehaviors = vueOptions.behaviors;
  672. var vueExtends = vueOptions.extends;
  673. var vueMixins = vueOptions.mixins;
  674. var vueProps = vueOptions.props;
  675. if (!vueProps) {
  676. vueOptions.props = vueProps = [];
  677. }
  678. var behaviors = [];
  679. if (Array.isArray(vueBehaviors)) {
  680. vueBehaviors.forEach(function (behavior) {
  681. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  682. if (behavior === 'uni://form-field') {
  683. if (Array.isArray(vueProps)) {
  684. vueProps.push('name');
  685. vueProps.push('value');
  686. } else {
  687. vueProps.name = {
  688. type: String,
  689. default: '' };
  690. vueProps.value = {
  691. type: [String, Number, Boolean, Array, Object, Date],
  692. default: '' };
  693. }
  694. }
  695. });
  696. }
  697. if (isPlainObject(vueExtends) && vueExtends.props) {
  698. behaviors.push(
  699. initBehavior({
  700. properties: initProperties(vueExtends.props, true) }));
  701. }
  702. if (Array.isArray(vueMixins)) {
  703. vueMixins.forEach(function (vueMixin) {
  704. if (isPlainObject(vueMixin) && vueMixin.props) {
  705. behaviors.push(
  706. initBehavior({
  707. properties: initProperties(vueMixin.props, true) }));
  708. }
  709. });
  710. }
  711. return behaviors;
  712. }
  713. function parsePropType(key, type, defaultValue, file) {
  714. // [String]=>String
  715. if (Array.isArray(type) && type.length === 1) {
  716. return type[0];
  717. }
  718. return type;
  719. }
  720. function initProperties(props) {var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  721. var properties = {};
  722. if (!isBehavior) {
  723. properties.vueId = {
  724. type: String,
  725. value: '' };
  726. properties.vueSlots = { // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  727. type: null,
  728. value: [],
  729. observer: function observer(newVal, oldVal) {
  730. var $slots = Object.create(null);
  731. newVal.forEach(function (slotName) {
  732. $slots[slotName] = true;
  733. });
  734. this.setData({
  735. $slots: $slots });
  736. } };
  737. }
  738. if (Array.isArray(props)) {// ['title']
  739. props.forEach(function (key) {
  740. properties[key] = {
  741. type: null,
  742. observer: createObserver(key) };
  743. });
  744. } else if (isPlainObject(props)) {// {title:{type:String,default:''},content:String}
  745. Object.keys(props).forEach(function (key) {
  746. var opts = props[key];
  747. if (isPlainObject(opts)) {// title:{type:String,default:''}
  748. var value = opts.default;
  749. if (isFn(value)) {
  750. value = value();
  751. }
  752. opts.type = parsePropType(key, opts.type);
  753. properties[key] = {
  754. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  755. value: value,
  756. observer: createObserver(key) };
  757. } else {// content:String
  758. var type = parsePropType(key, opts);
  759. properties[key] = {
  760. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  761. observer: createObserver(key) };
  762. }
  763. });
  764. }
  765. return properties;
  766. }
  767. function wrapper$1(event) {
  768. // TODO 又得兼容 mpvue 的 mp 对象
  769. try {
  770. event.mp = JSON.parse(JSON.stringify(event));
  771. } catch (e) {}
  772. event.stopPropagation = noop;
  773. event.preventDefault = noop;
  774. event.target = event.target || {};
  775. if (!hasOwn(event, 'detail')) {
  776. event.detail = {};
  777. }
  778. if (hasOwn(event, 'markerId')) {
  779. event.detail = typeof event.detail === 'object' ? event.detail : {};
  780. event.detail.markerId = event.markerId;
  781. }
  782. if (isPlainObject(event.detail)) {
  783. event.target = Object.assign({}, event.target, event.detail);
  784. }
  785. return event;
  786. }
  787. function getExtraValue(vm, dataPathsArray) {
  788. var context = vm;
  789. dataPathsArray.forEach(function (dataPathArray) {
  790. var dataPath = dataPathArray[0];
  791. var value = dataPathArray[2];
  792. if (dataPath || typeof value !== 'undefined') {// ['','',index,'disable']
  793. var propPath = dataPathArray[1];
  794. var valuePath = dataPathArray[3];
  795. var vFor;
  796. if (Number.isInteger(dataPath)) {
  797. vFor = dataPath;
  798. } else if (!dataPath) {
  799. vFor = context;
  800. } else if (typeof dataPath === 'string' && dataPath) {
  801. if (dataPath.indexOf('#s#') === 0) {
  802. vFor = dataPath.substr(3);
  803. } else {
  804. vFor = vm.__get_value(dataPath, context);
  805. }
  806. }
  807. if (Number.isInteger(vFor)) {
  808. context = value;
  809. } else if (!propPath) {
  810. context = vFor[value];
  811. } else {
  812. if (Array.isArray(vFor)) {
  813. context = vFor.find(function (vForItem) {
  814. return vm.__get_value(propPath, vForItem) === value;
  815. });
  816. } else if (isPlainObject(vFor)) {
  817. context = Object.keys(vFor).find(function (vForKey) {
  818. return vm.__get_value(propPath, vFor[vForKey]) === value;
  819. });
  820. } else {
  821. console.error('v-for 暂不支持循环数据:', vFor);
  822. }
  823. }
  824. if (valuePath) {
  825. context = vm.__get_value(valuePath, context);
  826. }
  827. }
  828. });
  829. return context;
  830. }
  831. function processEventExtra(vm, extra, event) {
  832. var extraObj = {};
  833. if (Array.isArray(extra) && extra.length) {
  834. /**
  835. *[
  836. * ['data.items', 'data.id', item.data.id],
  837. * ['metas', 'id', meta.id]
  838. *],
  839. *[
  840. * ['data.items', 'data.id', item.data.id],
  841. * ['metas', 'id', meta.id]
  842. *],
  843. *'test'
  844. */
  845. extra.forEach(function (dataPath, index) {
  846. if (typeof dataPath === 'string') {
  847. if (!dataPath) {// model,prop.sync
  848. extraObj['$' + index] = vm;
  849. } else {
  850. if (dataPath === '$event') {// $event
  851. extraObj['$' + index] = event;
  852. } else if (dataPath === 'arguments') {
  853. if (event.detail && event.detail.__args__) {
  854. extraObj['$' + index] = event.detail.__args__;
  855. } else {
  856. extraObj['$' + index] = [event];
  857. }
  858. } else if (dataPath.indexOf('$event.') === 0) {// $event.target.value
  859. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  860. } else {
  861. extraObj['$' + index] = vm.__get_value(dataPath);
  862. }
  863. }
  864. } else {
  865. extraObj['$' + index] = getExtraValue(vm, dataPath);
  866. }
  867. });
  868. }
  869. return extraObj;
  870. }
  871. function getObjByArray(arr) {
  872. var obj = {};
  873. for (var i = 1; i < arr.length; i++) {
  874. var element = arr[i];
  875. obj[element[0]] = element[1];
  876. }
  877. return obj;
  878. }
  879. 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;
  880. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  881. if (isCustom) {// 自定义事件
  882. isCustomMPEvent = event.currentTarget &&
  883. event.currentTarget.dataset &&
  884. event.currentTarget.dataset.comType === 'wx';
  885. if (!args.length) {// 无参数,直接传入 event 或 detail 数组
  886. if (isCustomMPEvent) {
  887. return [event];
  888. }
  889. return event.detail.__args__ || event.detail;
  890. }
  891. }
  892. var extraObj = processEventExtra(vm, extra, event);
  893. var ret = [];
  894. args.forEach(function (arg) {
  895. if (arg === '$event') {
  896. if (methodName === '__set_model' && !isCustom) {// input v-model value
  897. ret.push(event.target.value);
  898. } else {
  899. if (isCustom && !isCustomMPEvent) {
  900. ret.push(event.detail.__args__[0]);
  901. } else {// wxcomponent 组件或内置组件
  902. ret.push(event);
  903. }
  904. }
  905. } else {
  906. if (Array.isArray(arg) && arg[0] === 'o') {
  907. ret.push(getObjByArray(arg));
  908. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  909. ret.push(extraObj[arg]);
  910. } else {
  911. ret.push(arg);
  912. }
  913. }
  914. });
  915. return ret;
  916. }
  917. var ONCE = '~';
  918. var CUSTOM = '^';
  919. function isMatchEventType(eventType, optType) {
  920. return eventType === optType ||
  921. optType === 'regionchange' && (
  922. eventType === 'begin' ||
  923. eventType === 'end');
  924. }
  925. function getContextVm(vm) {
  926. var $parent = vm.$parent;
  927. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  928. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  929. $parent = $parent.$parent;
  930. }
  931. return $parent && $parent.$parent;
  932. }
  933. function handleEvent(event) {var _this = this;
  934. event = wrapper$1(event);
  935. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  936. var dataset = (event.currentTarget || event.target).dataset;
  937. if (!dataset) {
  938. return console.warn('事件信息不存在');
  939. }
  940. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  941. if (!eventOpts) {
  942. return console.warn('事件信息不存在');
  943. }
  944. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  945. var eventType = event.type;
  946. var ret = [];
  947. eventOpts.forEach(function (eventOpt) {
  948. var type = eventOpt[0];
  949. var eventsArray = eventOpt[1];
  950. var isCustom = type.charAt(0) === CUSTOM;
  951. type = isCustom ? type.slice(1) : type;
  952. var isOnce = type.charAt(0) === ONCE;
  953. type = isOnce ? type.slice(1) : type;
  954. if (eventsArray && isMatchEventType(eventType, type)) {
  955. eventsArray.forEach(function (eventArray) {
  956. var methodName = eventArray[0];
  957. if (methodName) {
  958. var handlerCtx = _this.$vm;
  959. if (handlerCtx.$options.generic) {// mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  960. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  961. }
  962. if (methodName === '$emit') {
  963. handlerCtx.$emit.apply(handlerCtx,
  964. processEventArgs(
  965. _this.$vm,
  966. event,
  967. eventArray[1],
  968. eventArray[2],
  969. isCustom,
  970. methodName));
  971. return;
  972. }
  973. var handler = handlerCtx[methodName];
  974. if (!isFn(handler)) {
  975. throw new Error(" _vm.".concat(methodName, " is not a function"));
  976. }
  977. if (isOnce) {
  978. if (handler.once) {
  979. return;
  980. }
  981. handler.once = true;
  982. }
  983. ret.push(handler.apply(handlerCtx, processEventArgs(
  984. _this.$vm,
  985. event,
  986. eventArray[1],
  987. eventArray[2],
  988. isCustom,
  989. methodName)));
  990. }
  991. });
  992. }
  993. });
  994. if (
  995. eventType === 'input' &&
  996. ret.length === 1 &&
  997. typeof ret[0] !== 'undefined')
  998. {
  999. return ret[0];
  1000. }
  1001. }
  1002. var hooks = [
  1003. 'onShow',
  1004. 'onHide',
  1005. 'onError',
  1006. 'onPageNotFound',
  1007. 'onThemeChange',
  1008. 'onUnhandledRejection'];
  1009. function parseBaseApp(vm, _ref3)
  1010. {var mocks = _ref3.mocks,initRefs = _ref3.initRefs;
  1011. if (vm.$options.store) {
  1012. _vue.default.prototype.$store = vm.$options.store;
  1013. }
  1014. _vue.default.prototype.mpHost = "mp-weixin";
  1015. _vue.default.mixin({
  1016. beforeCreate: function beforeCreate() {
  1017. if (!this.$options.mpType) {
  1018. return;
  1019. }
  1020. this.mpType = this.$options.mpType;
  1021. this.$mp = _defineProperty({
  1022. data: {} },
  1023. this.mpType, this.$options.mpInstance);
  1024. this.$scope = this.$options.mpInstance;
  1025. delete this.$options.mpType;
  1026. delete this.$options.mpInstance;
  1027. if (this.mpType !== 'app') {
  1028. initRefs(this);
  1029. initMocks(this, mocks);
  1030. }
  1031. } });
  1032. var appOptions = {
  1033. onLaunch: function onLaunch(args) {
  1034. if (this.$vm) {// 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  1035. return;
  1036. }
  1037. {
  1038. if (!wx.canIUse('nextTick')) {// 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  1039. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  1040. }
  1041. }
  1042. this.$vm = vm;
  1043. this.$vm.$mp = {
  1044. app: this };
  1045. this.$vm.$scope = this;
  1046. // vm 上也挂载 globalData
  1047. this.$vm.globalData = this.globalData;
  1048. this.$vm._isMounted = true;
  1049. this.$vm.__call_hook('mounted', args);
  1050. this.$vm.__call_hook('onLaunch', args);
  1051. } };
  1052. // 兼容旧版本 globalData
  1053. appOptions.globalData = vm.$options.globalData || {};
  1054. // 将 methods 中的方法挂在 getApp() 中
  1055. var methods = vm.$options.methods;
  1056. if (methods) {
  1057. Object.keys(methods).forEach(function (name) {
  1058. appOptions[name] = methods[name];
  1059. });
  1060. }
  1061. initHooks(appOptions, hooks);
  1062. return appOptions;
  1063. }
  1064. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1065. function findVmByVueId(vm, vuePid) {
  1066. var $children = vm.$children;
  1067. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1068. for (var i = $children.length - 1; i >= 0; i--) {
  1069. var childVm = $children[i];
  1070. if (childVm.$scope._$vueId === vuePid) {
  1071. return childVm;
  1072. }
  1073. }
  1074. // 反向递归查找
  1075. var parentVm;
  1076. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1077. parentVm = findVmByVueId($children[_i], vuePid);
  1078. if (parentVm) {
  1079. return parentVm;
  1080. }
  1081. }
  1082. }
  1083. function initBehavior(options) {
  1084. return Behavior(options);
  1085. }
  1086. function isPage() {
  1087. return !!this.route;
  1088. }
  1089. function initRelation(detail) {
  1090. this.triggerEvent('__l', detail);
  1091. }
  1092. function initRefs(vm) {
  1093. var mpInstance = vm.$scope;
  1094. Object.defineProperty(vm, '$refs', {
  1095. get: function get() {
  1096. var $refs = {};
  1097. var components = mpInstance.selectAllComponents('.vue-ref');
  1098. components.forEach(function (component) {
  1099. var ref = component.dataset.ref;
  1100. $refs[ref] = component.$vm || component;
  1101. });
  1102. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for');
  1103. forComponents.forEach(function (component) {
  1104. var ref = component.dataset.ref;
  1105. if (!$refs[ref]) {
  1106. $refs[ref] = [];
  1107. }
  1108. $refs[ref].push(component.$vm || component);
  1109. });
  1110. return $refs;
  1111. } });
  1112. }
  1113. function handleLink(event) {var _ref4 =
  1114. event.detail || event.value,vuePid = _ref4.vuePid,vueOptions = _ref4.vueOptions; // detail 是微信,value 是百度(dipatch)
  1115. var parentVm;
  1116. if (vuePid) {
  1117. parentVm = findVmByVueId(this.$vm, vuePid);
  1118. }
  1119. if (!parentVm) {
  1120. parentVm = this.$vm;
  1121. }
  1122. vueOptions.parent = parentVm;
  1123. }
  1124. function parseApp(vm) {
  1125. return parseBaseApp(vm, {
  1126. mocks: mocks,
  1127. initRefs: initRefs });
  1128. }
  1129. function createApp(vm) {
  1130. App(parseApp(vm));
  1131. return vm;
  1132. }
  1133. function parseBaseComponent(vueComponentOptions)
  1134. {var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},isPage = _ref5.isPage,initRelation = _ref5.initRelation;var _initVueComponent =
  1135. initVueComponent(_vue.default, vueComponentOptions),_initVueComponent2 = _slicedToArray(_initVueComponent, 2),VueComponent = _initVueComponent2[0],vueOptions = _initVueComponent2[1];
  1136. var options = _objectSpread({
  1137. multipleSlots: true,
  1138. addGlobalClass: true },
  1139. vueOptions.options || {});
  1140. {
  1141. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  1142. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  1143. Object.assign(options, vueOptions['mp-weixin'].options);
  1144. }
  1145. }
  1146. var componentOptions = {
  1147. options: options,
  1148. data: initData(vueOptions, _vue.default.prototype),
  1149. behaviors: initBehaviors(vueOptions, initBehavior),
  1150. properties: initProperties(vueOptions.props, false, vueOptions.__file),
  1151. lifetimes: {
  1152. attached: function attached() {
  1153. var properties = this.properties;
  1154. var options = {
  1155. mpType: isPage.call(this) ? 'page' : 'component',
  1156. mpInstance: this,
  1157. propsData: properties };
  1158. initVueIds(properties.vueId, this);
  1159. // 处理父子关系
  1160. initRelation.call(this, {
  1161. vuePid: this._$vuePid,
  1162. vueOptions: options });
  1163. // 初始化 vue 实例
  1164. this.$vm = new VueComponent(options);
  1165. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  1166. initSlots(this.$vm, properties.vueSlots);
  1167. // 触发首次 setData
  1168. this.$vm.$mount();
  1169. },
  1170. ready: function ready() {
  1171. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  1172. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  1173. if (this.$vm) {
  1174. this.$vm._isMounted = true;
  1175. this.$vm.__call_hook('mounted');
  1176. this.$vm.__call_hook('onReady');
  1177. }
  1178. },
  1179. detached: function detached() {
  1180. this.$vm && this.$vm.$destroy();
  1181. } },
  1182. pageLifetimes: {
  1183. show: function show(args) {
  1184. this.$vm && this.$vm.__call_hook('onPageShow', args);
  1185. },
  1186. hide: function hide() {
  1187. this.$vm && this.$vm.__call_hook('onPageHide');
  1188. },
  1189. resize: function resize(size) {
  1190. this.$vm && this.$vm.__call_hook('onPageResize', size);
  1191. } },
  1192. methods: {
  1193. __l: handleLink,
  1194. __e: handleEvent } };
  1195. // externalClasses
  1196. if (vueOptions.externalClasses) {
  1197. componentOptions.externalClasses = vueOptions.externalClasses;
  1198. }
  1199. if (Array.isArray(vueOptions.wxsCallMethods)) {
  1200. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  1201. componentOptions.methods[callMethod] = function (args) {
  1202. return this.$vm[callMethod](args);
  1203. };
  1204. });
  1205. }
  1206. if (isPage) {
  1207. return componentOptions;
  1208. }
  1209. return [componentOptions, VueComponent];
  1210. }
  1211. function parseComponent(vueComponentOptions) {
  1212. return parseBaseComponent(vueComponentOptions, {
  1213. isPage: isPage,
  1214. initRelation: initRelation });
  1215. }
  1216. var hooks$1 = [
  1217. 'onShow',
  1218. 'onHide',
  1219. 'onUnload'];
  1220. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  1221. function parseBasePage(vuePageOptions, _ref6)
  1222. {var isPage = _ref6.isPage,initRelation = _ref6.initRelation;
  1223. var pageOptions = parseComponent(vuePageOptions);
  1224. initHooks(pageOptions.methods, hooks$1, vuePageOptions);
  1225. pageOptions.methods.onLoad = function (args) {
  1226. this.$vm.$mp.query = args; // 兼容 mpvue
  1227. this.$vm.__call_hook('onLoad', args);
  1228. };
  1229. return pageOptions;
  1230. }
  1231. function parsePage(vuePageOptions) {
  1232. return parseBasePage(vuePageOptions, {
  1233. isPage: isPage,
  1234. initRelation: initRelation });
  1235. }
  1236. function createPage(vuePageOptions) {
  1237. {
  1238. return Component(parsePage(vuePageOptions));
  1239. }
  1240. }
  1241. function createComponent(vueOptions) {
  1242. {
  1243. return Component(parseComponent(vueOptions));
  1244. }
  1245. }
  1246. todos.forEach(function (todoApi) {
  1247. protocols[todoApi] = false;
  1248. });
  1249. canIUses.forEach(function (canIUseApi) {
  1250. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name :
  1251. canIUseApi;
  1252. if (!wx.canIUse(apiName)) {
  1253. protocols[canIUseApi] = false;
  1254. }
  1255. });
  1256. var uni = {};
  1257. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  1258. uni = new Proxy({}, {
  1259. get: function get(target, name) {
  1260. if (hasOwn(target, name)) {
  1261. return target[name];
  1262. }
  1263. if (baseApi[name]) {
  1264. return baseApi[name];
  1265. }
  1266. if (api[name]) {
  1267. return promisify(name, api[name]);
  1268. }
  1269. {
  1270. if (extraApi[name]) {
  1271. return promisify(name, extraApi[name]);
  1272. }
  1273. if (todoApis[name]) {
  1274. return promisify(name, todoApis[name]);
  1275. }
  1276. }
  1277. if (eventApi[name]) {
  1278. return eventApi[name];
  1279. }
  1280. if (!hasOwn(wx, name) && !hasOwn(protocols, name)) {
  1281. return;
  1282. }
  1283. return promisify(name, wrapper(name, wx[name]));
  1284. },
  1285. set: function set(target, name, value) {
  1286. target[name] = value;
  1287. return true;
  1288. } });
  1289. } else {
  1290. Object.keys(baseApi).forEach(function (name) {
  1291. uni[name] = baseApi[name];
  1292. });
  1293. {
  1294. Object.keys(todoApis).forEach(function (name) {
  1295. uni[name] = promisify(name, todoApis[name]);
  1296. });
  1297. Object.keys(extraApi).forEach(function (name) {
  1298. uni[name] = promisify(name, todoApis[name]);
  1299. });
  1300. }
  1301. Object.keys(eventApi).forEach(function (name) {
  1302. uni[name] = eventApi[name];
  1303. });
  1304. Object.keys(api).forEach(function (name) {
  1305. uni[name] = promisify(name, api[name]);
  1306. });
  1307. Object.keys(wx).forEach(function (name) {
  1308. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  1309. uni[name] = promisify(name, wrapper(name, wx[name]));
  1310. }
  1311. });
  1312. }
  1313. wx.createApp = createApp;
  1314. wx.createPage = createPage;
  1315. wx.createComponent = createComponent;
  1316. var uni$1 = uni;var _default =
  1317. uni$1;exports.default = _default;
  1318. /***/ }),
  1319. /***/ 13:
  1320. /*!**********************************************************************************************************!*\
  1321. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  1322. \**********************************************************************************************************/
  1323. /*! exports provided: default */
  1324. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1325. "use strict";
  1326. __webpack_require__.r(__webpack_exports__);
  1327. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  1328. /* globals __VUE_SSR_CONTEXT__ */
  1329. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  1330. // This module is a runtime utility for cleaner component module output and will
  1331. // be included in the final webpack user bundle.
  1332. function normalizeComponent (
  1333. scriptExports,
  1334. render,
  1335. staticRenderFns,
  1336. functionalTemplate,
  1337. injectStyles,
  1338. scopeId,
  1339. moduleIdentifier, /* server only */
  1340. shadowMode, /* vue-cli only */
  1341. components, // fixed by xxxxxx auto components
  1342. renderjs // fixed by xxxxxx renderjs
  1343. ) {
  1344. // Vue.extend constructor export interop
  1345. var options = typeof scriptExports === 'function'
  1346. ? scriptExports.options
  1347. : scriptExports
  1348. // fixed by xxxxxx auto components
  1349. if (components) {
  1350. if (!options.components) {
  1351. options.components = {}
  1352. }
  1353. var hasOwn = Object.prototype.hasOwnProperty
  1354. for (var name in components) {
  1355. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  1356. options.components[name] = components[name]
  1357. }
  1358. }
  1359. }
  1360. // fixed by xxxxxx renderjs
  1361. if (renderjs) {
  1362. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  1363. this[renderjs.__module] = this
  1364. });
  1365. (options.mixins || (options.mixins = [])).push(renderjs)
  1366. }
  1367. // render functions
  1368. if (render) {
  1369. options.render = render
  1370. options.staticRenderFns = staticRenderFns
  1371. options._compiled = true
  1372. }
  1373. // functional template
  1374. if (functionalTemplate) {
  1375. options.functional = true
  1376. }
  1377. // scopedId
  1378. if (scopeId) {
  1379. options._scopeId = 'data-v-' + scopeId
  1380. }
  1381. var hook
  1382. if (moduleIdentifier) { // server build
  1383. hook = function (context) {
  1384. // 2.3 injection
  1385. context =
  1386. context || // cached call
  1387. (this.$vnode && this.$vnode.ssrContext) || // stateful
  1388. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  1389. // 2.2 with runInNewContext: true
  1390. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  1391. context = __VUE_SSR_CONTEXT__
  1392. }
  1393. // inject component styles
  1394. if (injectStyles) {
  1395. injectStyles.call(this, context)
  1396. }
  1397. // register component module identifier for async chunk inferrence
  1398. if (context && context._registeredComponents) {
  1399. context._registeredComponents.add(moduleIdentifier)
  1400. }
  1401. }
  1402. // used by ssr in case component is cached and beforeCreate
  1403. // never gets called
  1404. options._ssrRegister = hook
  1405. } else if (injectStyles) {
  1406. hook = shadowMode
  1407. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  1408. : injectStyles
  1409. }
  1410. if (hook) {
  1411. if (options.functional) {
  1412. // for template-only hot-reload because in that case the render fn doesn't
  1413. // go through the normalizer
  1414. options._injectStyles = hook
  1415. // register for functioal component in vue file
  1416. var originalRender = options.render
  1417. options.render = function renderWithStyleInjection (h, context) {
  1418. hook.call(context)
  1419. return originalRender(h, context)
  1420. }
  1421. } else {
  1422. // inject component registration as beforeCreate hook
  1423. var existing = options.beforeCreate
  1424. options.beforeCreate = existing
  1425. ? [].concat(existing, hook)
  1426. : [hook]
  1427. }
  1428. }
  1429. return {
  1430. exports: scriptExports,
  1431. options: options
  1432. }
  1433. }
  1434. /***/ }),
  1435. /***/ 165:
  1436. /*!*****************************************************************!*\
  1437. !*** /Users/wanglili/Documents/work/GitHub/huaihua/api/info.js ***!
  1438. \*****************************************************************/
  1439. /*! no static exports found */
  1440. /***/ (function(module, exports, __webpack_require__) {
  1441. "use strict";
  1442. Object.defineProperty(exports, "__esModule", { value: true });exports.articletop = articletop;exports.articledel = articledel;exports.details = details;exports.deconstructArticle = deconstructArticle;var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 21));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  1443. // 置顶 取消置顶
  1444. function articletop(data) {
  1445. return (0, _request.default)({
  1446. url: '/api/circle/articletop',
  1447. method: 'post',
  1448. data: data });
  1449. }
  1450. // 删除贴子
  1451. function articledel(data) {
  1452. return (0, _request.default)({
  1453. url: '/api/circle/articledel',
  1454. method: 'post',
  1455. data: data });
  1456. }
  1457. // 文章详情
  1458. function details(data, id) {
  1459. return (0, _request.default)({
  1460. url: '/api/article/details/' + id,
  1461. method: 'get',
  1462. data: data });
  1463. }
  1464. //处理文章详情页
  1465. function deconstructArticle(data) {
  1466. if (data) {
  1467. data = data.replace(/<img/g, '<img style="width: 100% !important;height:auto"').replace(
  1468. /<p>\S*<img/g, '<p style="line-height: 0;"><img');
  1469. }
  1470. return data;
  1471. }
  1472. /***/ }),
  1473. /***/ 174:
  1474. /*!******************************************************************!*\
  1475. !*** /Users/wanglili/Documents/work/GitHub/huaihua/api/login.js ***!
  1476. \******************************************************************/
  1477. /*! no static exports found */
  1478. /***/ (function(module, exports, __webpack_require__) {
  1479. "use strict";
  1480. Object.defineProperty(exports, "__esModule", { value: true });exports.login = login;exports.register = register;exports.verify = verify;exports.getUserInfo = getUserInfo;exports.loginMobile = loginMobile;var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 21));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  1481. // 登录
  1482. function login(data) {
  1483. return (0, _request.default)({
  1484. url: '/api/login',
  1485. method: 'post',
  1486. data: data });
  1487. }
  1488. // 注册
  1489. function register(data) {
  1490. return (0, _request.default)({
  1491. url: '/api/register',
  1492. method: 'post',
  1493. data: data });
  1494. }
  1495. // 验证码
  1496. function verify(data) {
  1497. // type=register为注册
  1498. // type=login为登录
  1499. return (0, _request.default)({
  1500. url: '/api/register/verify',
  1501. method: 'post',
  1502. data: data });
  1503. }
  1504. // 获取用户信息
  1505. function getUserInfo(data) {
  1506. return (0, _request.default)({
  1507. url: '/api/userinfo',
  1508. method: 'get',
  1509. data: data });
  1510. }
  1511. // 短信登录
  1512. function loginMobile(data) {
  1513. return (0, _request.default)({
  1514. url: '/api/login/mobile',
  1515. method: 'post',
  1516. data: data });
  1517. }
  1518. /***/ }),
  1519. /***/ 183:
  1520. /*!***************************************************************!*\
  1521. !*** /Users/wanglili/Documents/work/GitHub/huaihua/api/wx.js ***!
  1522. \***************************************************************/
  1523. /*! no static exports found */
  1524. /***/ (function(module, exports, __webpack_require__) {
  1525. "use strict";
  1526. Object.defineProperty(exports, "__esModule", { value: true });exports.wechatMpAuth = wechatMpAuth;var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 21));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  1527. // 微信code地址
  1528. function wechatMpAuth(data) {
  1529. return (0, _request.default)({
  1530. url: '/api/wechat/mp_auth',
  1531. method: 'post',
  1532. data: data });
  1533. }
  1534. /***/ }),
  1535. /***/ 198:
  1536. /*!***************************************************************************!*\
  1537. !*** /Users/wanglili/Documents/work/GitHub/huaihua/utils/wxMinProgram.js ***!
  1538. \***************************************************************************/
  1539. /*! no static exports found */
  1540. /***/ (function(module, exports, __webpack_require__) {
  1541. "use strict";
  1542. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.loginWinxinMp = loginWinxinMp;var _store = _interopRequireDefault(__webpack_require__(/*! ../store */ 5));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  1543. //微信登录
  1544. /**
  1545. * @param {string} 当前页面地址信息
  1546. */
  1547. function loginWinxinMp() {
  1548. var pages = getCurrentPages();
  1549. // 获取跳转前页面
  1550. var page = pages[pages.length - 2];
  1551. var queryUrl = '';
  1552. for (var key in page.options) {
  1553. queryUrl += key + '=' + page.options[key] + "&";
  1554. }
  1555. // 获取当页面路由地址
  1556. var path = '/' + page.route + '?' + queryUrl;
  1557. // 保存跳转前页面
  1558. uni.setStorageSync('present', path);
  1559. return new Promise(function (resolve, reject) {
  1560. wx.login({
  1561. success: function success(e) {
  1562. console.log(e);
  1563. resolve(e);
  1564. },
  1565. fill: function fill(e) {
  1566. reject(e);
  1567. } });
  1568. });
  1569. };
  1570. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  1571. /***/ }),
  1572. /***/ 2:
  1573. /*!******************************************************************************************!*\
  1574. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  1575. \******************************************************************************************/
  1576. /*! exports provided: default */
  1577. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1578. "use strict";
  1579. __webpack_require__.r(__webpack_exports__);
  1580. /* WEBPACK VAR INJECTION */(function(global) {/*!
  1581. * Vue.js v2.6.11
  1582. * (c) 2014-2020 Evan You
  1583. * Released under the MIT License.
  1584. */
  1585. /* */
  1586. var emptyObject = Object.freeze({});
  1587. // These helpers produce better VM code in JS engines due to their
  1588. // explicitness and function inlining.
  1589. function isUndef (v) {
  1590. return v === undefined || v === null
  1591. }
  1592. function isDef (v) {
  1593. return v !== undefined && v !== null
  1594. }
  1595. function isTrue (v) {
  1596. return v === true
  1597. }
  1598. function isFalse (v) {
  1599. return v === false
  1600. }
  1601. /**
  1602. * Check if value is primitive.
  1603. */
  1604. function isPrimitive (value) {
  1605. return (
  1606. typeof value === 'string' ||
  1607. typeof value === 'number' ||
  1608. // $flow-disable-line
  1609. typeof value === 'symbol' ||
  1610. typeof value === 'boolean'
  1611. )
  1612. }
  1613. /**
  1614. * Quick object check - this is primarily used to tell
  1615. * Objects from primitive values when we know the value
  1616. * is a JSON-compliant type.
  1617. */
  1618. function isObject (obj) {
  1619. return obj !== null && typeof obj === 'object'
  1620. }
  1621. /**
  1622. * Get the raw type string of a value, e.g., [object Object].
  1623. */
  1624. var _toString = Object.prototype.toString;
  1625. function toRawType (value) {
  1626. return _toString.call(value).slice(8, -1)
  1627. }
  1628. /**
  1629. * Strict object type check. Only returns true
  1630. * for plain JavaScript objects.
  1631. */
  1632. function isPlainObject (obj) {
  1633. return _toString.call(obj) === '[object Object]'
  1634. }
  1635. function isRegExp (v) {
  1636. return _toString.call(v) === '[object RegExp]'
  1637. }
  1638. /**
  1639. * Check if val is a valid array index.
  1640. */
  1641. function isValidArrayIndex (val) {
  1642. var n = parseFloat(String(val));
  1643. return n >= 0 && Math.floor(n) === n && isFinite(val)
  1644. }
  1645. function isPromise (val) {
  1646. return (
  1647. isDef(val) &&
  1648. typeof val.then === 'function' &&
  1649. typeof val.catch === 'function'
  1650. )
  1651. }
  1652. /**
  1653. * Convert a value to a string that is actually rendered.
  1654. */
  1655. function toString (val) {
  1656. return val == null
  1657. ? ''
  1658. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  1659. ? JSON.stringify(val, null, 2)
  1660. : String(val)
  1661. }
  1662. /**
  1663. * Convert an input value to a number for persistence.
  1664. * If the conversion fails, return original string.
  1665. */
  1666. function toNumber (val) {
  1667. var n = parseFloat(val);
  1668. return isNaN(n) ? val : n
  1669. }
  1670. /**
  1671. * Make a map and return a function for checking if a key
  1672. * is in that map.
  1673. */
  1674. function makeMap (
  1675. str,
  1676. expectsLowerCase
  1677. ) {
  1678. var map = Object.create(null);
  1679. var list = str.split(',');
  1680. for (var i = 0; i < list.length; i++) {
  1681. map[list[i]] = true;
  1682. }
  1683. return expectsLowerCase
  1684. ? function (val) { return map[val.toLowerCase()]; }
  1685. : function (val) { return map[val]; }
  1686. }
  1687. /**
  1688. * Check if a tag is a built-in tag.
  1689. */
  1690. var isBuiltInTag = makeMap('slot,component', true);
  1691. /**
  1692. * Check if an attribute is a reserved attribute.
  1693. */
  1694. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  1695. /**
  1696. * Remove an item from an array.
  1697. */
  1698. function remove (arr, item) {
  1699. if (arr.length) {
  1700. var index = arr.indexOf(item);
  1701. if (index > -1) {
  1702. return arr.splice(index, 1)
  1703. }
  1704. }
  1705. }
  1706. /**
  1707. * Check whether an object has the property.
  1708. */
  1709. var hasOwnProperty = Object.prototype.hasOwnProperty;
  1710. function hasOwn (obj, key) {
  1711. return hasOwnProperty.call(obj, key)
  1712. }
  1713. /**
  1714. * Create a cached version of a pure function.
  1715. */
  1716. function cached (fn) {
  1717. var cache = Object.create(null);
  1718. return (function cachedFn (str) {
  1719. var hit = cache[str];
  1720. return hit || (cache[str] = fn(str))
  1721. })
  1722. }
  1723. /**
  1724. * Camelize a hyphen-delimited string.
  1725. */
  1726. var camelizeRE = /-(\w)/g;
  1727. var camelize = cached(function (str) {
  1728. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  1729. });
  1730. /**
  1731. * Capitalize a string.
  1732. */
  1733. var capitalize = cached(function (str) {
  1734. return str.charAt(0).toUpperCase() + str.slice(1)
  1735. });
  1736. /**
  1737. * Hyphenate a camelCase string.
  1738. */
  1739. var hyphenateRE = /\B([A-Z])/g;
  1740. var hyphenate = cached(function (str) {
  1741. return str.replace(hyphenateRE, '-$1').toLowerCase()
  1742. });
  1743. /**
  1744. * Simple bind polyfill for environments that do not support it,
  1745. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  1746. * since native bind is now performant enough in most browsers.
  1747. * But removing it would mean breaking code that was able to run in
  1748. * PhantomJS 1.x, so this must be kept for backward compatibility.
  1749. */
  1750. /* istanbul ignore next */
  1751. function polyfillBind (fn, ctx) {
  1752. function boundFn (a) {
  1753. var l = arguments.length;
  1754. return l
  1755. ? l > 1
  1756. ? fn.apply(ctx, arguments)
  1757. : fn.call(ctx, a)
  1758. : fn.call(ctx)
  1759. }
  1760. boundFn._length = fn.length;
  1761. return boundFn
  1762. }
  1763. function nativeBind (fn, ctx) {
  1764. return fn.bind(ctx)
  1765. }
  1766. var bind = Function.prototype.bind
  1767. ? nativeBind
  1768. : polyfillBind;
  1769. /**
  1770. * Convert an Array-like object to a real Array.
  1771. */
  1772. function toArray (list, start) {
  1773. start = start || 0;
  1774. var i = list.length - start;
  1775. var ret = new Array(i);
  1776. while (i--) {
  1777. ret[i] = list[i + start];
  1778. }
  1779. return ret
  1780. }
  1781. /**
  1782. * Mix properties into target object.
  1783. */
  1784. function extend (to, _from) {
  1785. for (var key in _from) {
  1786. to[key] = _from[key];
  1787. }
  1788. return to
  1789. }
  1790. /**
  1791. * Merge an Array of Objects into a single Object.
  1792. */
  1793. function toObject (arr) {
  1794. var res = {};
  1795. for (var i = 0; i < arr.length; i++) {
  1796. if (arr[i]) {
  1797. extend(res, arr[i]);
  1798. }
  1799. }
  1800. return res
  1801. }
  1802. /* eslint-disable no-unused-vars */
  1803. /**
  1804. * Perform no operation.
  1805. * Stubbing args to make Flow happy without leaving useless transpiled code
  1806. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  1807. */
  1808. function noop (a, b, c) {}
  1809. /**
  1810. * Always return false.
  1811. */
  1812. var no = function (a, b, c) { return false; };
  1813. /* eslint-enable no-unused-vars */
  1814. /**
  1815. * Return the same value.
  1816. */
  1817. var identity = function (_) { return _; };
  1818. /**
  1819. * Check if two values are loosely equal - that is,
  1820. * if they are plain objects, do they have the same shape?
  1821. */
  1822. function looseEqual (a, b) {
  1823. if (a === b) { return true }
  1824. var isObjectA = isObject(a);
  1825. var isObjectB = isObject(b);
  1826. if (isObjectA && isObjectB) {
  1827. try {
  1828. var isArrayA = Array.isArray(a);
  1829. var isArrayB = Array.isArray(b);
  1830. if (isArrayA && isArrayB) {
  1831. return a.length === b.length && a.every(function (e, i) {
  1832. return looseEqual(e, b[i])
  1833. })
  1834. } else if (a instanceof Date && b instanceof Date) {
  1835. return a.getTime() === b.getTime()
  1836. } else if (!isArrayA && !isArrayB) {
  1837. var keysA = Object.keys(a);
  1838. var keysB = Object.keys(b);
  1839. return keysA.length === keysB.length && keysA.every(function (key) {
  1840. return looseEqual(a[key], b[key])
  1841. })
  1842. } else {
  1843. /* istanbul ignore next */
  1844. return false
  1845. }
  1846. } catch (e) {
  1847. /* istanbul ignore next */
  1848. return false
  1849. }
  1850. } else if (!isObjectA && !isObjectB) {
  1851. return String(a) === String(b)
  1852. } else {
  1853. return false
  1854. }
  1855. }
  1856. /**
  1857. * Return the first index at which a loosely equal value can be
  1858. * found in the array (if value is a plain object, the array must
  1859. * contain an object of the same shape), or -1 if it is not present.
  1860. */
  1861. function looseIndexOf (arr, val) {
  1862. for (var i = 0; i < arr.length; i++) {
  1863. if (looseEqual(arr[i], val)) { return i }
  1864. }
  1865. return -1
  1866. }
  1867. /**
  1868. * Ensure a function is called only once.
  1869. */
  1870. function once (fn) {
  1871. var called = false;
  1872. return function () {
  1873. if (!called) {
  1874. called = true;
  1875. fn.apply(this, arguments);
  1876. }
  1877. }
  1878. }
  1879. var ASSET_TYPES = [
  1880. 'component',
  1881. 'directive',
  1882. 'filter'
  1883. ];
  1884. var LIFECYCLE_HOOKS = [
  1885. 'beforeCreate',
  1886. 'created',
  1887. 'beforeMount',
  1888. 'mounted',
  1889. 'beforeUpdate',
  1890. 'updated',
  1891. 'beforeDestroy',
  1892. 'destroyed',
  1893. 'activated',
  1894. 'deactivated',
  1895. 'errorCaptured',
  1896. 'serverPrefetch'
  1897. ];
  1898. /* */
  1899. var config = ({
  1900. /**
  1901. * Option merge strategies (used in core/util/options)
  1902. */
  1903. // $flow-disable-line
  1904. optionMergeStrategies: Object.create(null),
  1905. /**
  1906. * Whether to suppress warnings.
  1907. */
  1908. silent: false,
  1909. /**
  1910. * Show production mode tip message on boot?
  1911. */
  1912. productionTip: "development" !== 'production',
  1913. /**
  1914. * Whether to enable devtools
  1915. */
  1916. devtools: "development" !== 'production',
  1917. /**
  1918. * Whether to record perf
  1919. */
  1920. performance: false,
  1921. /**
  1922. * Error handler for watcher errors
  1923. */
  1924. errorHandler: null,
  1925. /**
  1926. * Warn handler for watcher warns
  1927. */
  1928. warnHandler: null,
  1929. /**
  1930. * Ignore certain custom elements
  1931. */
  1932. ignoredElements: [],
  1933. /**
  1934. * Custom user key aliases for v-on
  1935. */
  1936. // $flow-disable-line
  1937. keyCodes: Object.create(null),
  1938. /**
  1939. * Check if a tag is reserved so that it cannot be registered as a
  1940. * component. This is platform-dependent and may be overwritten.
  1941. */
  1942. isReservedTag: no,
  1943. /**
  1944. * Check if an attribute is reserved so that it cannot be used as a component
  1945. * prop. This is platform-dependent and may be overwritten.
  1946. */
  1947. isReservedAttr: no,
  1948. /**
  1949. * Check if a tag is an unknown element.
  1950. * Platform-dependent.
  1951. */
  1952. isUnknownElement: no,
  1953. /**
  1954. * Get the namespace of an element
  1955. */
  1956. getTagNamespace: noop,
  1957. /**
  1958. * Parse the real tag name for the specific platform.
  1959. */
  1960. parsePlatformTagName: identity,
  1961. /**
  1962. * Check if an attribute must be bound using property, e.g. value
  1963. * Platform-dependent.
  1964. */
  1965. mustUseProp: no,
  1966. /**
  1967. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  1968. * This will significantly reduce performance if set to false.
  1969. */
  1970. async: true,
  1971. /**
  1972. * Exposed for legacy reasons
  1973. */
  1974. _lifecycleHooks: LIFECYCLE_HOOKS
  1975. });
  1976. /* */
  1977. /**
  1978. * unicode letters used for parsing html tags, component names and property paths.
  1979. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  1980. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  1981. */
  1982. 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/;
  1983. /**
  1984. * Check if a string starts with $ or _
  1985. */
  1986. function isReserved (str) {
  1987. var c = (str + '').charCodeAt(0);
  1988. return c === 0x24 || c === 0x5F
  1989. }
  1990. /**
  1991. * Define a property.
  1992. */
  1993. function def (obj, key, val, enumerable) {
  1994. Object.defineProperty(obj, key, {
  1995. value: val,
  1996. enumerable: !!enumerable,
  1997. writable: true,
  1998. configurable: true
  1999. });
  2000. }
  2001. /**
  2002. * Parse simple path.
  2003. */
  2004. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  2005. function parsePath (path) {
  2006. if (bailRE.test(path)) {
  2007. return
  2008. }
  2009. var segments = path.split('.');
  2010. return function (obj) {
  2011. for (var i = 0; i < segments.length; i++) {
  2012. if (!obj) { return }
  2013. obj = obj[segments[i]];
  2014. }
  2015. return obj
  2016. }
  2017. }
  2018. /* */
  2019. // can we use __proto__?
  2020. var hasProto = '__proto__' in {};
  2021. // Browser environment sniffing
  2022. var inBrowser = typeof window !== 'undefined';
  2023. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  2024. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  2025. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  2026. var isIE = UA && /msie|trident/.test(UA);
  2027. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  2028. var isEdge = UA && UA.indexOf('edge/') > 0;
  2029. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  2030. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  2031. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  2032. var isPhantomJS = UA && /phantomjs/.test(UA);
  2033. var isFF = UA && UA.match(/firefox\/(\d+)/);
  2034. // Firefox has a "watch" function on Object.prototype...
  2035. var nativeWatch = ({}).watch;
  2036. if (inBrowser) {
  2037. try {
  2038. var opts = {};
  2039. Object.defineProperty(opts, 'passive', ({
  2040. get: function get () {
  2041. }
  2042. })); // https://github.com/facebook/flow/issues/285
  2043. window.addEventListener('test-passive', null, opts);
  2044. } catch (e) {}
  2045. }
  2046. // this needs to be lazy-evaled because vue may be required before
  2047. // vue-server-renderer can set VUE_ENV
  2048. var _isServer;
  2049. var isServerRendering = function () {
  2050. if (_isServer === undefined) {
  2051. /* istanbul ignore if */
  2052. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  2053. // detect presence of vue-server-renderer and avoid
  2054. // Webpack shimming the process
  2055. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  2056. } else {
  2057. _isServer = false;
  2058. }
  2059. }
  2060. return _isServer
  2061. };
  2062. // detect devtools
  2063. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  2064. /* istanbul ignore next */
  2065. function isNative (Ctor) {
  2066. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  2067. }
  2068. var hasSymbol =
  2069. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  2070. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  2071. var _Set;
  2072. /* istanbul ignore if */ // $flow-disable-line
  2073. if (typeof Set !== 'undefined' && isNative(Set)) {
  2074. // use native Set when available.
  2075. _Set = Set;
  2076. } else {
  2077. // a non-standard Set polyfill that only works with primitive keys.
  2078. _Set = /*@__PURE__*/(function () {
  2079. function Set () {
  2080. this.set = Object.create(null);
  2081. }
  2082. Set.prototype.has = function has (key) {
  2083. return this.set[key] === true
  2084. };
  2085. Set.prototype.add = function add (key) {
  2086. this.set[key] = true;
  2087. };
  2088. Set.prototype.clear = function clear () {
  2089. this.set = Object.create(null);
  2090. };
  2091. return Set;
  2092. }());
  2093. }
  2094. /* */
  2095. var warn = noop;
  2096. var tip = noop;
  2097. var generateComponentTrace = (noop); // work around flow check
  2098. var formatComponentName = (noop);
  2099. if (true) {
  2100. var hasConsole = typeof console !== 'undefined';
  2101. var classifyRE = /(?:^|[-_])(\w)/g;
  2102. var classify = function (str) { return str
  2103. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  2104. .replace(/[-_]/g, ''); };
  2105. warn = function (msg, vm) {
  2106. var trace = vm ? generateComponentTrace(vm) : '';
  2107. if (config.warnHandler) {
  2108. config.warnHandler.call(null, msg, vm, trace);
  2109. } else if (hasConsole && (!config.silent)) {
  2110. console.error(("[Vue warn]: " + msg + trace));
  2111. }
  2112. };
  2113. tip = function (msg, vm) {
  2114. if (hasConsole && (!config.silent)) {
  2115. console.warn("[Vue tip]: " + msg + (
  2116. vm ? generateComponentTrace(vm) : ''
  2117. ));
  2118. }
  2119. };
  2120. formatComponentName = function (vm, includeFile) {
  2121. if (vm.$root === vm) {
  2122. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  2123. return ('') + vm.$options.__file
  2124. }
  2125. return '<Root>'
  2126. }
  2127. var options = typeof vm === 'function' && vm.cid != null
  2128. ? vm.options
  2129. : vm._isVue
  2130. ? vm.$options || vm.constructor.options
  2131. : vm;
  2132. var name = options.name || options._componentTag;
  2133. var file = options.__file;
  2134. if (!name && file) {
  2135. var match = file.match(/([^/\\]+)\.vue$/);
  2136. name = match && match[1];
  2137. }
  2138. return (
  2139. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  2140. (file && includeFile !== false ? (" at " + file) : '')
  2141. )
  2142. };
  2143. var repeat = function (str, n) {
  2144. var res = '';
  2145. while (n) {
  2146. if (n % 2 === 1) { res += str; }
  2147. if (n > 1) { str += str; }
  2148. n >>= 1;
  2149. }
  2150. return res
  2151. };
  2152. generateComponentTrace = function (vm) {
  2153. if (vm._isVue && vm.$parent) {
  2154. var tree = [];
  2155. var currentRecursiveSequence = 0;
  2156. while (vm && vm.$options.name !== 'PageBody') {
  2157. if (tree.length > 0) {
  2158. var last = tree[tree.length - 1];
  2159. if (last.constructor === vm.constructor) {
  2160. currentRecursiveSequence++;
  2161. vm = vm.$parent;
  2162. continue
  2163. } else if (currentRecursiveSequence > 0) {
  2164. tree[tree.length - 1] = [last, currentRecursiveSequence];
  2165. currentRecursiveSequence = 0;
  2166. }
  2167. }
  2168. !vm.$options.isReserved && tree.push(vm);
  2169. vm = vm.$parent;
  2170. }
  2171. return '\n\nfound in\n\n' + tree
  2172. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  2173. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  2174. : formatComponentName(vm))); })
  2175. .join('\n')
  2176. } else {
  2177. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  2178. }
  2179. };
  2180. }
  2181. /* */
  2182. var uid = 0;
  2183. /**
  2184. * A dep is an observable that can have multiple
  2185. * directives subscribing to it.
  2186. */
  2187. var Dep = function Dep () {
  2188. this.id = uid++;
  2189. this.subs = [];
  2190. };
  2191. Dep.prototype.addSub = function addSub (sub) {
  2192. this.subs.push(sub);
  2193. };
  2194. Dep.prototype.removeSub = function removeSub (sub) {
  2195. remove(this.subs, sub);
  2196. };
  2197. Dep.prototype.depend = function depend () {
  2198. if (Dep.SharedObject.target) {
  2199. Dep.SharedObject.target.addDep(this);
  2200. }
  2201. };
  2202. Dep.prototype.notify = function notify () {
  2203. // stabilize the subscriber list first
  2204. var subs = this.subs.slice();
  2205. if ( true && !config.async) {
  2206. // subs aren't sorted in scheduler if not running async
  2207. // we need to sort them now to make sure they fire in correct
  2208. // order
  2209. subs.sort(function (a, b) { return a.id - b.id; });
  2210. }
  2211. for (var i = 0, l = subs.length; i < l; i++) {
  2212. subs[i].update();
  2213. }
  2214. };
  2215. // The current target watcher being evaluated.
  2216. // This is globally unique because only one watcher
  2217. // can be evaluated at a time.
  2218. // fixed by xxxxxx (nvue shared vuex)
  2219. /* eslint-disable no-undef */
  2220. Dep.SharedObject = {};
  2221. Dep.SharedObject.target = null;
  2222. Dep.SharedObject.targetStack = [];
  2223. function pushTarget (target) {
  2224. Dep.SharedObject.targetStack.push(target);
  2225. Dep.SharedObject.target = target;
  2226. }
  2227. function popTarget () {
  2228. Dep.SharedObject.targetStack.pop();
  2229. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  2230. }
  2231. /* */
  2232. var VNode = function VNode (
  2233. tag,
  2234. data,
  2235. children,
  2236. text,
  2237. elm,
  2238. context,
  2239. componentOptions,
  2240. asyncFactory
  2241. ) {
  2242. this.tag = tag;
  2243. this.data = data;
  2244. this.children = children;
  2245. this.text = text;
  2246. this.elm = elm;
  2247. this.ns = undefined;
  2248. this.context = context;
  2249. this.fnContext = undefined;
  2250. this.fnOptions = undefined;
  2251. this.fnScopeId = undefined;
  2252. this.key = data && data.key;
  2253. this.componentOptions = componentOptions;
  2254. this.componentInstance = undefined;
  2255. this.parent = undefined;
  2256. this.raw = false;
  2257. this.isStatic = false;
  2258. this.isRootInsert = true;
  2259. this.isComment = false;
  2260. this.isCloned = false;
  2261. this.isOnce = false;
  2262. this.asyncFactory = asyncFactory;
  2263. this.asyncMeta = undefined;
  2264. this.isAsyncPlaceholder = false;
  2265. };
  2266. var prototypeAccessors = { child: { configurable: true } };
  2267. // DEPRECATED: alias for componentInstance for backwards compat.
  2268. /* istanbul ignore next */
  2269. prototypeAccessors.child.get = function () {
  2270. return this.componentInstance
  2271. };
  2272. Object.defineProperties( VNode.prototype, prototypeAccessors );
  2273. var createEmptyVNode = function (text) {
  2274. if ( text === void 0 ) text = '';
  2275. var node = new VNode();
  2276. node.text = text;
  2277. node.isComment = true;
  2278. return node
  2279. };
  2280. function createTextVNode (val) {
  2281. return new VNode(undefined, undefined, undefined, String(val))
  2282. }
  2283. // optimized shallow clone
  2284. // used for static nodes and slot nodes because they may be reused across
  2285. // multiple renders, cloning them avoids errors when DOM manipulations rely
  2286. // on their elm reference.
  2287. function cloneVNode (vnode) {
  2288. var cloned = new VNode(
  2289. vnode.tag,
  2290. vnode.data,
  2291. // #7975
  2292. // clone children array to avoid mutating original in case of cloning
  2293. // a child.
  2294. vnode.children && vnode.children.slice(),
  2295. vnode.text,
  2296. vnode.elm,
  2297. vnode.context,
  2298. vnode.componentOptions,
  2299. vnode.asyncFactory
  2300. );
  2301. cloned.ns = vnode.ns;
  2302. cloned.isStatic = vnode.isStatic;
  2303. cloned.key = vnode.key;
  2304. cloned.isComment = vnode.isComment;
  2305. cloned.fnContext = vnode.fnContext;
  2306. cloned.fnOptions = vnode.fnOptions;
  2307. cloned.fnScopeId = vnode.fnScopeId;
  2308. cloned.asyncMeta = vnode.asyncMeta;
  2309. cloned.isCloned = true;
  2310. return cloned
  2311. }
  2312. /*
  2313. * not type checking this file because flow doesn't play well with
  2314. * dynamically accessing methods on Array prototype
  2315. */
  2316. var arrayProto = Array.prototype;
  2317. var arrayMethods = Object.create(arrayProto);
  2318. var methodsToPatch = [
  2319. 'push',
  2320. 'pop',
  2321. 'shift',
  2322. 'unshift',
  2323. 'splice',
  2324. 'sort',
  2325. 'reverse'
  2326. ];
  2327. /**
  2328. * Intercept mutating methods and emit events
  2329. */
  2330. methodsToPatch.forEach(function (method) {
  2331. // cache original method
  2332. var original = arrayProto[method];
  2333. def(arrayMethods, method, function mutator () {
  2334. var args = [], len = arguments.length;
  2335. while ( len-- ) args[ len ] = arguments[ len ];
  2336. var result = original.apply(this, args);
  2337. var ob = this.__ob__;
  2338. var inserted;
  2339. switch (method) {
  2340. case 'push':
  2341. case 'unshift':
  2342. inserted = args;
  2343. break
  2344. case 'splice':
  2345. inserted = args.slice(2);
  2346. break
  2347. }
  2348. if (inserted) { ob.observeArray(inserted); }
  2349. // notify change
  2350. ob.dep.notify();
  2351. return result
  2352. });
  2353. });
  2354. /* */
  2355. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  2356. /**
  2357. * In some cases we may want to disable observation inside a component's
  2358. * update computation.
  2359. */
  2360. var shouldObserve = true;
  2361. function toggleObserving (value) {
  2362. shouldObserve = value;
  2363. }
  2364. /**
  2365. * Observer class that is attached to each observed
  2366. * object. Once attached, the observer converts the target
  2367. * object's property keys into getter/setters that
  2368. * collect dependencies and dispatch updates.
  2369. */
  2370. var Observer = function Observer (value) {
  2371. this.value = value;
  2372. this.dep = new Dep();
  2373. this.vmCount = 0;
  2374. def(value, '__ob__', this);
  2375. if (Array.isArray(value)) {
  2376. if (hasProto) {
  2377. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  2378. if(value.push !== value.__proto__.push){
  2379. copyAugment(value, arrayMethods, arrayKeys);
  2380. } else {
  2381. protoAugment(value, arrayMethods);
  2382. }
  2383. }
  2384. } else {
  2385. copyAugment(value, arrayMethods, arrayKeys);
  2386. }
  2387. this.observeArray(value);
  2388. } else {
  2389. this.walk(value);
  2390. }
  2391. };
  2392. /**
  2393. * Walk through all properties and convert them into
  2394. * getter/setters. This method should only be called when
  2395. * value type is Object.
  2396. */
  2397. Observer.prototype.walk = function walk (obj) {
  2398. var keys = Object.keys(obj);
  2399. for (var i = 0; i < keys.length; i++) {
  2400. defineReactive$$1(obj, keys[i]);
  2401. }
  2402. };
  2403. /**
  2404. * Observe a list of Array items.
  2405. */
  2406. Observer.prototype.observeArray = function observeArray (items) {
  2407. for (var i = 0, l = items.length; i < l; i++) {
  2408. observe(items[i]);
  2409. }
  2410. };
  2411. // helpers
  2412. /**
  2413. * Augment a target Object or Array by intercepting
  2414. * the prototype chain using __proto__
  2415. */
  2416. function protoAugment (target, src) {
  2417. /* eslint-disable no-proto */
  2418. target.__proto__ = src;
  2419. /* eslint-enable no-proto */
  2420. }
  2421. /**
  2422. * Augment a target Object or Array by defining
  2423. * hidden properties.
  2424. */
  2425. /* istanbul ignore next */
  2426. function copyAugment (target, src, keys) {
  2427. for (var i = 0, l = keys.length; i < l; i++) {
  2428. var key = keys[i];
  2429. def(target, key, src[key]);
  2430. }
  2431. }
  2432. /**
  2433. * Attempt to create an observer instance for a value,
  2434. * returns the new observer if successfully observed,
  2435. * or the existing observer if the value already has one.
  2436. */
  2437. function observe (value, asRootData) {
  2438. if (!isObject(value) || value instanceof VNode) {
  2439. return
  2440. }
  2441. var ob;
  2442. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  2443. ob = value.__ob__;
  2444. } else if (
  2445. shouldObserve &&
  2446. !isServerRendering() &&
  2447. (Array.isArray(value) || isPlainObject(value)) &&
  2448. Object.isExtensible(value) &&
  2449. !value._isVue
  2450. ) {
  2451. ob = new Observer(value);
  2452. }
  2453. if (asRootData && ob) {
  2454. ob.vmCount++;
  2455. }
  2456. return ob
  2457. }
  2458. /**
  2459. * Define a reactive property on an Object.
  2460. */
  2461. function defineReactive$$1 (
  2462. obj,
  2463. key,
  2464. val,
  2465. customSetter,
  2466. shallow
  2467. ) {
  2468. var dep = new Dep();
  2469. var property = Object.getOwnPropertyDescriptor(obj, key);
  2470. if (property && property.configurable === false) {
  2471. return
  2472. }
  2473. // cater for pre-defined getter/setters
  2474. var getter = property && property.get;
  2475. var setter = property && property.set;
  2476. if ((!getter || setter) && arguments.length === 2) {
  2477. val = obj[key];
  2478. }
  2479. var childOb = !shallow && observe(val);
  2480. Object.defineProperty(obj, key, {
  2481. enumerable: true,
  2482. configurable: true,
  2483. get: function reactiveGetter () {
  2484. var value = getter ? getter.call(obj) : val;
  2485. if (Dep.SharedObject.target) { // fixed by xxxxxx
  2486. dep.depend();
  2487. if (childOb) {
  2488. childOb.dep.depend();
  2489. if (Array.isArray(value)) {
  2490. dependArray(value);
  2491. }
  2492. }
  2493. }
  2494. return value
  2495. },
  2496. set: function reactiveSetter (newVal) {
  2497. var value = getter ? getter.call(obj) : val;
  2498. /* eslint-disable no-self-compare */
  2499. if (newVal === value || (newVal !== newVal && value !== value)) {
  2500. return
  2501. }
  2502. /* eslint-enable no-self-compare */
  2503. if ( true && customSetter) {
  2504. customSetter();
  2505. }
  2506. // #7981: for accessor properties without setter
  2507. if (getter && !setter) { return }
  2508. if (setter) {
  2509. setter.call(obj, newVal);
  2510. } else {
  2511. val = newVal;
  2512. }
  2513. childOb = !shallow && observe(newVal);
  2514. dep.notify();
  2515. }
  2516. });
  2517. }
  2518. /**
  2519. * Set a property on an object. Adds the new property and
  2520. * triggers change notification if the property doesn't
  2521. * already exist.
  2522. */
  2523. function set (target, key, val) {
  2524. if ( true &&
  2525. (isUndef(target) || isPrimitive(target))
  2526. ) {
  2527. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  2528. }
  2529. if (Array.isArray(target) && isValidArrayIndex(key)) {
  2530. target.length = Math.max(target.length, key);
  2531. target.splice(key, 1, val);
  2532. return val
  2533. }
  2534. if (key in target && !(key in Object.prototype)) {
  2535. target[key] = val;
  2536. return val
  2537. }
  2538. var ob = (target).__ob__;
  2539. if (target._isVue || (ob && ob.vmCount)) {
  2540. true && warn(
  2541. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  2542. 'at runtime - declare it upfront in the data option.'
  2543. );
  2544. return val
  2545. }
  2546. if (!ob) {
  2547. target[key] = val;
  2548. return val
  2549. }
  2550. defineReactive$$1(ob.value, key, val);
  2551. ob.dep.notify();
  2552. return val
  2553. }
  2554. /**
  2555. * Delete a property and trigger change if necessary.
  2556. */
  2557. function del (target, key) {
  2558. if ( true &&
  2559. (isUndef(target) || isPrimitive(target))
  2560. ) {
  2561. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  2562. }
  2563. if (Array.isArray(target) && isValidArrayIndex(key)) {
  2564. target.splice(key, 1);
  2565. return
  2566. }
  2567. var ob = (target).__ob__;
  2568. if (target._isVue || (ob && ob.vmCount)) {
  2569. true && warn(
  2570. 'Avoid deleting properties on a Vue instance or its root $data ' +
  2571. '- just set it to null.'
  2572. );
  2573. return
  2574. }
  2575. if (!hasOwn(target, key)) {
  2576. return
  2577. }
  2578. delete target[key];
  2579. if (!ob) {
  2580. return
  2581. }
  2582. ob.dep.notify();
  2583. }
  2584. /**
  2585. * Collect dependencies on array elements when the array is touched, since
  2586. * we cannot intercept array element access like property getters.
  2587. */
  2588. function dependArray (value) {
  2589. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  2590. e = value[i];
  2591. e && e.__ob__ && e.__ob__.dep.depend();
  2592. if (Array.isArray(e)) {
  2593. dependArray(e);
  2594. }
  2595. }
  2596. }
  2597. /* */
  2598. /**
  2599. * Option overwriting strategies are functions that handle
  2600. * how to merge a parent option value and a child option
  2601. * value into the final value.
  2602. */
  2603. var strats = config.optionMergeStrategies;
  2604. /**
  2605. * Options with restrictions
  2606. */
  2607. if (true) {
  2608. strats.el = strats.propsData = function (parent, child, vm, key) {
  2609. if (!vm) {
  2610. warn(
  2611. "option \"" + key + "\" can only be used during instance " +
  2612. 'creation with the `new` keyword.'
  2613. );
  2614. }
  2615. return defaultStrat(parent, child)
  2616. };
  2617. }
  2618. /**
  2619. * Helper that recursively merges two data objects together.
  2620. */
  2621. function mergeData (to, from) {
  2622. if (!from) { return to }
  2623. var key, toVal, fromVal;
  2624. var keys = hasSymbol
  2625. ? Reflect.ownKeys(from)
  2626. : Object.keys(from);
  2627. for (var i = 0; i < keys.length; i++) {
  2628. key = keys[i];
  2629. // in case the object is already observed...
  2630. if (key === '__ob__') { continue }
  2631. toVal = to[key];
  2632. fromVal = from[key];
  2633. if (!hasOwn(to, key)) {
  2634. set(to, key, fromVal);
  2635. } else if (
  2636. toVal !== fromVal &&
  2637. isPlainObject(toVal) &&
  2638. isPlainObject(fromVal)
  2639. ) {
  2640. mergeData(toVal, fromVal);
  2641. }
  2642. }
  2643. return to
  2644. }
  2645. /**
  2646. * Data
  2647. */
  2648. function mergeDataOrFn (
  2649. parentVal,
  2650. childVal,
  2651. vm
  2652. ) {
  2653. if (!vm) {
  2654. // in a Vue.extend merge, both should be functions
  2655. if (!childVal) {
  2656. return parentVal
  2657. }
  2658. if (!parentVal) {
  2659. return childVal
  2660. }
  2661. // when parentVal & childVal are both present,
  2662. // we need to return a function that returns the
  2663. // merged result of both functions... no need to
  2664. // check if parentVal is a function here because
  2665. // it has to be a function to pass previous merges.
  2666. return function mergedDataFn () {
  2667. return mergeData(
  2668. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  2669. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  2670. )
  2671. }
  2672. } else {
  2673. return function mergedInstanceDataFn () {
  2674. // instance merge
  2675. var instanceData = typeof childVal === 'function'
  2676. ? childVal.call(vm, vm)
  2677. : childVal;
  2678. var defaultData = typeof parentVal === 'function'
  2679. ? parentVal.call(vm, vm)
  2680. : parentVal;
  2681. if (instanceData) {
  2682. return mergeData(instanceData, defaultData)
  2683. } else {
  2684. return defaultData
  2685. }
  2686. }
  2687. }
  2688. }
  2689. strats.data = function (
  2690. parentVal,
  2691. childVal,
  2692. vm
  2693. ) {
  2694. if (!vm) {
  2695. if (childVal && typeof childVal !== 'function') {
  2696. true && warn(
  2697. 'The "data" option should be a function ' +
  2698. 'that returns a per-instance value in component ' +
  2699. 'definitions.',
  2700. vm
  2701. );
  2702. return parentVal
  2703. }
  2704. return mergeDataOrFn(parentVal, childVal)
  2705. }
  2706. return mergeDataOrFn(parentVal, childVal, vm)
  2707. };
  2708. /**
  2709. * Hooks and props are merged as arrays.
  2710. */
  2711. function mergeHook (
  2712. parentVal,
  2713. childVal
  2714. ) {
  2715. var res = childVal
  2716. ? parentVal
  2717. ? parentVal.concat(childVal)
  2718. : Array.isArray(childVal)
  2719. ? childVal
  2720. : [childVal]
  2721. : parentVal;
  2722. return res
  2723. ? dedupeHooks(res)
  2724. : res
  2725. }
  2726. function dedupeHooks (hooks) {
  2727. var res = [];
  2728. for (var i = 0; i < hooks.length; i++) {
  2729. if (res.indexOf(hooks[i]) === -1) {
  2730. res.push(hooks[i]);
  2731. }
  2732. }
  2733. return res
  2734. }
  2735. LIFECYCLE_HOOKS.forEach(function (hook) {
  2736. strats[hook] = mergeHook;
  2737. });
  2738. /**
  2739. * Assets
  2740. *
  2741. * When a vm is present (instance creation), we need to do
  2742. * a three-way merge between constructor options, instance
  2743. * options and parent options.
  2744. */
  2745. function mergeAssets (
  2746. parentVal,
  2747. childVal,
  2748. vm,
  2749. key
  2750. ) {
  2751. var res = Object.create(parentVal || null);
  2752. if (childVal) {
  2753. true && assertObjectType(key, childVal, vm);
  2754. return extend(res, childVal)
  2755. } else {
  2756. return res
  2757. }
  2758. }
  2759. ASSET_TYPES.forEach(function (type) {
  2760. strats[type + 's'] = mergeAssets;
  2761. });
  2762. /**
  2763. * Watchers.
  2764. *
  2765. * Watchers hashes should not overwrite one
  2766. * another, so we merge them as arrays.
  2767. */
  2768. strats.watch = function (
  2769. parentVal,
  2770. childVal,
  2771. vm,
  2772. key
  2773. ) {
  2774. // work around Firefox's Object.prototype.watch...
  2775. if (parentVal === nativeWatch) { parentVal = undefined; }
  2776. if (childVal === nativeWatch) { childVal = undefined; }
  2777. /* istanbul ignore if */
  2778. if (!childVal) { return Object.create(parentVal || null) }
  2779. if (true) {
  2780. assertObjectType(key, childVal, vm);
  2781. }
  2782. if (!parentVal) { return childVal }
  2783. var ret = {};
  2784. extend(ret, parentVal);
  2785. for (var key$1 in childVal) {
  2786. var parent = ret[key$1];
  2787. var child = childVal[key$1];
  2788. if (parent && !Array.isArray(parent)) {
  2789. parent = [parent];
  2790. }
  2791. ret[key$1] = parent
  2792. ? parent.concat(child)
  2793. : Array.isArray(child) ? child : [child];
  2794. }
  2795. return ret
  2796. };
  2797. /**
  2798. * Other object hashes.
  2799. */
  2800. strats.props =
  2801. strats.methods =
  2802. strats.inject =
  2803. strats.computed = function (
  2804. parentVal,
  2805. childVal,
  2806. vm,
  2807. key
  2808. ) {
  2809. if (childVal && "development" !== 'production') {
  2810. assertObjectType(key, childVal, vm);
  2811. }
  2812. if (!parentVal) { return childVal }
  2813. var ret = Object.create(null);
  2814. extend(ret, parentVal);
  2815. if (childVal) { extend(ret, childVal); }
  2816. return ret
  2817. };
  2818. strats.provide = mergeDataOrFn;
  2819. /**
  2820. * Default strategy.
  2821. */
  2822. var defaultStrat = function (parentVal, childVal) {
  2823. return childVal === undefined
  2824. ? parentVal
  2825. : childVal
  2826. };
  2827. /**
  2828. * Validate component names
  2829. */
  2830. function checkComponents (options) {
  2831. for (var key in options.components) {
  2832. validateComponentName(key);
  2833. }
  2834. }
  2835. function validateComponentName (name) {
  2836. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  2837. warn(
  2838. 'Invalid component name: "' + name + '". Component names ' +
  2839. 'should conform to valid custom element name in html5 specification.'
  2840. );
  2841. }
  2842. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  2843. warn(
  2844. 'Do not use built-in or reserved HTML elements as component ' +
  2845. 'id: ' + name
  2846. );
  2847. }
  2848. }
  2849. /**
  2850. * Ensure all props option syntax are normalized into the
  2851. * Object-based format.
  2852. */
  2853. function normalizeProps (options, vm) {
  2854. var props = options.props;
  2855. if (!props) { return }
  2856. var res = {};
  2857. var i, val, name;
  2858. if (Array.isArray(props)) {
  2859. i = props.length;
  2860. while (i--) {
  2861. val = props[i];
  2862. if (typeof val === 'string') {
  2863. name = camelize(val);
  2864. res[name] = { type: null };
  2865. } else if (true) {
  2866. warn('props must be strings when using array syntax.');
  2867. }
  2868. }
  2869. } else if (isPlainObject(props)) {
  2870. for (var key in props) {
  2871. val = props[key];
  2872. name = camelize(key);
  2873. res[name] = isPlainObject(val)
  2874. ? val
  2875. : { type: val };
  2876. }
  2877. } else if (true) {
  2878. warn(
  2879. "Invalid value for option \"props\": expected an Array or an Object, " +
  2880. "but got " + (toRawType(props)) + ".",
  2881. vm
  2882. );
  2883. }
  2884. options.props = res;
  2885. }
  2886. /**
  2887. * Normalize all injections into Object-based format
  2888. */
  2889. function normalizeInject (options, vm) {
  2890. var inject = options.inject;
  2891. if (!inject) { return }
  2892. var normalized = options.inject = {};
  2893. if (Array.isArray(inject)) {
  2894. for (var i = 0; i < inject.length; i++) {
  2895. normalized[inject[i]] = { from: inject[i] };
  2896. }
  2897. } else if (isPlainObject(inject)) {
  2898. for (var key in inject) {
  2899. var val = inject[key];
  2900. normalized[key] = isPlainObject(val)
  2901. ? extend({ from: key }, val)
  2902. : { from: val };
  2903. }
  2904. } else if (true) {
  2905. warn(
  2906. "Invalid value for option \"inject\": expected an Array or an Object, " +
  2907. "but got " + (toRawType(inject)) + ".",
  2908. vm
  2909. );
  2910. }
  2911. }
  2912. /**
  2913. * Normalize raw function directives into object format.
  2914. */
  2915. function normalizeDirectives (options) {
  2916. var dirs = options.directives;
  2917. if (dirs) {
  2918. for (var key in dirs) {
  2919. var def$$1 = dirs[key];
  2920. if (typeof def$$1 === 'function') {
  2921. dirs[key] = { bind: def$$1, update: def$$1 };
  2922. }
  2923. }
  2924. }
  2925. }
  2926. function assertObjectType (name, value, vm) {
  2927. if (!isPlainObject(value)) {
  2928. warn(
  2929. "Invalid value for option \"" + name + "\": expected an Object, " +
  2930. "but got " + (toRawType(value)) + ".",
  2931. vm
  2932. );
  2933. }
  2934. }
  2935. /**
  2936. * Merge two option objects into a new one.
  2937. * Core utility used in both instantiation and inheritance.
  2938. */
  2939. function mergeOptions (
  2940. parent,
  2941. child,
  2942. vm
  2943. ) {
  2944. if (true) {
  2945. checkComponents(child);
  2946. }
  2947. if (typeof child === 'function') {
  2948. child = child.options;
  2949. }
  2950. normalizeProps(child, vm);
  2951. normalizeInject(child, vm);
  2952. normalizeDirectives(child);
  2953. // Apply extends and mixins on the child options,
  2954. // but only if it is a raw options object that isn't
  2955. // the result of another mergeOptions call.
  2956. // Only merged options has the _base property.
  2957. if (!child._base) {
  2958. if (child.extends) {
  2959. parent = mergeOptions(parent, child.extends, vm);
  2960. }
  2961. if (child.mixins) {
  2962. for (var i = 0, l = child.mixins.length; i < l; i++) {
  2963. parent = mergeOptions(parent, child.mixins[i], vm);
  2964. }
  2965. }
  2966. }
  2967. var options = {};
  2968. var key;
  2969. for (key in parent) {
  2970. mergeField(key);
  2971. }
  2972. for (key in child) {
  2973. if (!hasOwn(parent, key)) {
  2974. mergeField(key);
  2975. }
  2976. }
  2977. function mergeField (key) {
  2978. var strat = strats[key] || defaultStrat;
  2979. options[key] = strat(parent[key], child[key], vm, key);
  2980. }
  2981. return options
  2982. }
  2983. /**
  2984. * Resolve an asset.
  2985. * This function is used because child instances need access
  2986. * to assets defined in its ancestor chain.
  2987. */
  2988. function resolveAsset (
  2989. options,
  2990. type,
  2991. id,
  2992. warnMissing
  2993. ) {
  2994. /* istanbul ignore if */
  2995. if (typeof id !== 'string') {
  2996. return
  2997. }
  2998. var assets = options[type];
  2999. // check local registration variations first
  3000. if (hasOwn(assets, id)) { return assets[id] }
  3001. var camelizedId = camelize(id);
  3002. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  3003. var PascalCaseId = capitalize(camelizedId);
  3004. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  3005. // fallback to prototype chain
  3006. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  3007. if ( true && warnMissing && !res) {
  3008. warn(
  3009. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  3010. options
  3011. );
  3012. }
  3013. return res
  3014. }
  3015. /* */
  3016. function validateProp (
  3017. key,
  3018. propOptions,
  3019. propsData,
  3020. vm
  3021. ) {
  3022. var prop = propOptions[key];
  3023. var absent = !hasOwn(propsData, key);
  3024. var value = propsData[key];
  3025. // boolean casting
  3026. var booleanIndex = getTypeIndex(Boolean, prop.type);
  3027. if (booleanIndex > -1) {
  3028. if (absent && !hasOwn(prop, 'default')) {
  3029. value = false;
  3030. } else if (value === '' || value === hyphenate(key)) {
  3031. // only cast empty string / same name to boolean if
  3032. // boolean has higher priority
  3033. var stringIndex = getTypeIndex(String, prop.type);
  3034. if (stringIndex < 0 || booleanIndex < stringIndex) {
  3035. value = true;
  3036. }
  3037. }
  3038. }
  3039. // check default value
  3040. if (value === undefined) {
  3041. value = getPropDefaultValue(vm, prop, key);
  3042. // since the default value is a fresh copy,
  3043. // make sure to observe it.
  3044. var prevShouldObserve = shouldObserve;
  3045. toggleObserving(true);
  3046. observe(value);
  3047. toggleObserving(prevShouldObserve);
  3048. }
  3049. if (
  3050. true
  3051. ) {
  3052. assertProp(prop, key, value, vm, absent);
  3053. }
  3054. return value
  3055. }
  3056. /**
  3057. * Get the default value of a prop.
  3058. */
  3059. function getPropDefaultValue (vm, prop, key) {
  3060. // no default, return undefined
  3061. if (!hasOwn(prop, 'default')) {
  3062. return undefined
  3063. }
  3064. var def = prop.default;
  3065. // warn against non-factory defaults for Object & Array
  3066. if ( true && isObject(def)) {
  3067. warn(
  3068. 'Invalid default value for prop "' + key + '": ' +
  3069. 'Props with type Object/Array must use a factory function ' +
  3070. 'to return the default value.',
  3071. vm
  3072. );
  3073. }
  3074. // the raw prop value was also undefined from previous render,
  3075. // return previous default value to avoid unnecessary watcher trigger
  3076. if (vm && vm.$options.propsData &&
  3077. vm.$options.propsData[key] === undefined &&
  3078. vm._props[key] !== undefined
  3079. ) {
  3080. return vm._props[key]
  3081. }
  3082. // call factory function for non-Function types
  3083. // a value is Function if its prototype is function even across different execution context
  3084. return typeof def === 'function' && getType(prop.type) !== 'Function'
  3085. ? def.call(vm)
  3086. : def
  3087. }
  3088. /**
  3089. * Assert whether a prop is valid.
  3090. */
  3091. function assertProp (
  3092. prop,
  3093. name,
  3094. value,
  3095. vm,
  3096. absent
  3097. ) {
  3098. if (prop.required && absent) {
  3099. warn(
  3100. 'Missing required prop: "' + name + '"',
  3101. vm
  3102. );
  3103. return
  3104. }
  3105. if (value == null && !prop.required) {
  3106. return
  3107. }
  3108. var type = prop.type;
  3109. var valid = !type || type === true;
  3110. var expectedTypes = [];
  3111. if (type) {
  3112. if (!Array.isArray(type)) {
  3113. type = [type];
  3114. }
  3115. for (var i = 0; i < type.length && !valid; i++) {
  3116. var assertedType = assertType(value, type[i]);
  3117. expectedTypes.push(assertedType.expectedType || '');
  3118. valid = assertedType.valid;
  3119. }
  3120. }
  3121. if (!valid) {
  3122. warn(
  3123. getInvalidTypeMessage(name, value, expectedTypes),
  3124. vm
  3125. );
  3126. return
  3127. }
  3128. var validator = prop.validator;
  3129. if (validator) {
  3130. if (!validator(value)) {
  3131. warn(
  3132. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  3133. vm
  3134. );
  3135. }
  3136. }
  3137. }
  3138. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  3139. function assertType (value, type) {
  3140. var valid;
  3141. var expectedType = getType(type);
  3142. if (simpleCheckRE.test(expectedType)) {
  3143. var t = typeof value;
  3144. valid = t === expectedType.toLowerCase();
  3145. // for primitive wrapper objects
  3146. if (!valid && t === 'object') {
  3147. valid = value instanceof type;
  3148. }
  3149. } else if (expectedType === 'Object') {
  3150. valid = isPlainObject(value);
  3151. } else if (expectedType === 'Array') {
  3152. valid = Array.isArray(value);
  3153. } else {
  3154. valid = value instanceof type;
  3155. }
  3156. return {
  3157. valid: valid,
  3158. expectedType: expectedType
  3159. }
  3160. }
  3161. /**
  3162. * Use function string name to check built-in types,
  3163. * because a simple equality check will fail when running
  3164. * across different vms / iframes.
  3165. */
  3166. function getType (fn) {
  3167. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  3168. return match ? match[1] : ''
  3169. }
  3170. function isSameType (a, b) {
  3171. return getType(a) === getType(b)
  3172. }
  3173. function getTypeIndex (type, expectedTypes) {
  3174. if (!Array.isArray(expectedTypes)) {
  3175. return isSameType(expectedTypes, type) ? 0 : -1
  3176. }
  3177. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  3178. if (isSameType(expectedTypes[i], type)) {
  3179. return i
  3180. }
  3181. }
  3182. return -1
  3183. }
  3184. function getInvalidTypeMessage (name, value, expectedTypes) {
  3185. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  3186. " Expected " + (expectedTypes.map(capitalize).join(', '));
  3187. var expectedType = expectedTypes[0];
  3188. var receivedType = toRawType(value);
  3189. var expectedValue = styleValue(value, expectedType);
  3190. var receivedValue = styleValue(value, receivedType);
  3191. // check if we need to specify expected value
  3192. if (expectedTypes.length === 1 &&
  3193. isExplicable(expectedType) &&
  3194. !isBoolean(expectedType, receivedType)) {
  3195. message += " with value " + expectedValue;
  3196. }
  3197. message += ", got " + receivedType + " ";
  3198. // check if we need to specify received value
  3199. if (isExplicable(receivedType)) {
  3200. message += "with value " + receivedValue + ".";
  3201. }
  3202. return message
  3203. }
  3204. function styleValue (value, type) {
  3205. if (type === 'String') {
  3206. return ("\"" + value + "\"")
  3207. } else if (type === 'Number') {
  3208. return ("" + (Number(value)))
  3209. } else {
  3210. return ("" + value)
  3211. }
  3212. }
  3213. function isExplicable (value) {
  3214. var explicitTypes = ['string', 'number', 'boolean'];
  3215. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  3216. }
  3217. function isBoolean () {
  3218. var args = [], len = arguments.length;
  3219. while ( len-- ) args[ len ] = arguments[ len ];
  3220. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  3221. }
  3222. /* */
  3223. function handleError (err, vm, info) {
  3224. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  3225. // See: https://github.com/vuejs/vuex/issues/1505
  3226. pushTarget();
  3227. try {
  3228. if (vm) {
  3229. var cur = vm;
  3230. while ((cur = cur.$parent)) {
  3231. var hooks = cur.$options.errorCaptured;
  3232. if (hooks) {
  3233. for (var i = 0; i < hooks.length; i++) {
  3234. try {
  3235. var capture = hooks[i].call(cur, err, vm, info) === false;
  3236. if (capture) { return }
  3237. } catch (e) {
  3238. globalHandleError(e, cur, 'errorCaptured hook');
  3239. }
  3240. }
  3241. }
  3242. }
  3243. }
  3244. globalHandleError(err, vm, info);
  3245. } finally {
  3246. popTarget();
  3247. }
  3248. }
  3249. function invokeWithErrorHandling (
  3250. handler,
  3251. context,
  3252. args,
  3253. vm,
  3254. info
  3255. ) {
  3256. var res;
  3257. try {
  3258. res = args ? handler.apply(context, args) : handler.call(context);
  3259. if (res && !res._isVue && isPromise(res) && !res._handled) {
  3260. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  3261. // issue #9511
  3262. // avoid catch triggering multiple times when nested calls
  3263. res._handled = true;
  3264. }
  3265. } catch (e) {
  3266. handleError(e, vm, info);
  3267. }
  3268. return res
  3269. }
  3270. function globalHandleError (err, vm, info) {
  3271. if (config.errorHandler) {
  3272. try {
  3273. return config.errorHandler.call(null, err, vm, info)
  3274. } catch (e) {
  3275. // if the user intentionally throws the original error in the handler,
  3276. // do not log it twice
  3277. if (e !== err) {
  3278. logError(e, null, 'config.errorHandler');
  3279. }
  3280. }
  3281. }
  3282. logError(err, vm, info);
  3283. }
  3284. function logError (err, vm, info) {
  3285. if (true) {
  3286. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  3287. }
  3288. /* istanbul ignore else */
  3289. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  3290. console.error(err);
  3291. } else {
  3292. throw err
  3293. }
  3294. }
  3295. /* */
  3296. var callbacks = [];
  3297. var pending = false;
  3298. function flushCallbacks () {
  3299. pending = false;
  3300. var copies = callbacks.slice(0);
  3301. callbacks.length = 0;
  3302. for (var i = 0; i < copies.length; i++) {
  3303. copies[i]();
  3304. }
  3305. }
  3306. // Here we have async deferring wrappers using microtasks.
  3307. // In 2.5 we used (macro) tasks (in combination with microtasks).
  3308. // However, it has subtle problems when state is changed right before repaint
  3309. // (e.g. #6813, out-in transitions).
  3310. // Also, using (macro) tasks in event handler would cause some weird behaviors
  3311. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  3312. // So we now use microtasks everywhere, again.
  3313. // A major drawback of this tradeoff is that there are some scenarios
  3314. // where microtasks have too high a priority and fire in between supposedly
  3315. // sequential events (e.g. #4521, #6690, which have workarounds)
  3316. // or even between bubbling of the same event (#6566).
  3317. var timerFunc;
  3318. // The nextTick behavior leverages the microtask queue, which can be accessed
  3319. // via either native Promise.then or MutationObserver.
  3320. // MutationObserver has wider support, however it is seriously bugged in
  3321. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  3322. // completely stops working after triggering a few times... so, if native
  3323. // Promise is available, we will use it:
  3324. /* istanbul ignore next, $flow-disable-line */
  3325. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  3326. var p = Promise.resolve();
  3327. timerFunc = function () {
  3328. p.then(flushCallbacks);
  3329. // In problematic UIWebViews, Promise.then doesn't completely break, but
  3330. // it can get stuck in a weird state where callbacks are pushed into the
  3331. // microtask queue but the queue isn't being flushed, until the browser
  3332. // needs to do some other work, e.g. handle a timer. Therefore we can
  3333. // "force" the microtask queue to be flushed by adding an empty timer.
  3334. if (isIOS) { setTimeout(noop); }
  3335. };
  3336. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  3337. isNative(MutationObserver) ||
  3338. // PhantomJS and iOS 7.x
  3339. MutationObserver.toString() === '[object MutationObserverConstructor]'
  3340. )) {
  3341. // Use MutationObserver where native Promise is not available,
  3342. // e.g. PhantomJS, iOS7, Android 4.4
  3343. // (#6466 MutationObserver is unreliable in IE11)
  3344. var counter = 1;
  3345. var observer = new MutationObserver(flushCallbacks);
  3346. var textNode = document.createTextNode(String(counter));
  3347. observer.observe(textNode, {
  3348. characterData: true
  3349. });
  3350. timerFunc = function () {
  3351. counter = (counter + 1) % 2;
  3352. textNode.data = String(counter);
  3353. };
  3354. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  3355. // Fallback to setImmediate.
  3356. // Technically it leverages the (macro) task queue,
  3357. // but it is still a better choice than setTimeout.
  3358. timerFunc = function () {
  3359. setImmediate(flushCallbacks);
  3360. };
  3361. } else {
  3362. // Fallback to setTimeout.
  3363. timerFunc = function () {
  3364. setTimeout(flushCallbacks, 0);
  3365. };
  3366. }
  3367. function nextTick (cb, ctx) {
  3368. var _resolve;
  3369. callbacks.push(function () {
  3370. if (cb) {
  3371. try {
  3372. cb.call(ctx);
  3373. } catch (e) {
  3374. handleError(e, ctx, 'nextTick');
  3375. }
  3376. } else if (_resolve) {
  3377. _resolve(ctx);
  3378. }
  3379. });
  3380. if (!pending) {
  3381. pending = true;
  3382. timerFunc();
  3383. }
  3384. // $flow-disable-line
  3385. if (!cb && typeof Promise !== 'undefined') {
  3386. return new Promise(function (resolve) {
  3387. _resolve = resolve;
  3388. })
  3389. }
  3390. }
  3391. /* */
  3392. /* not type checking this file because flow doesn't play well with Proxy */
  3393. var initProxy;
  3394. if (true) {
  3395. var allowedGlobals = makeMap(
  3396. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  3397. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  3398. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  3399. 'require' // for Webpack/Browserify
  3400. );
  3401. var warnNonPresent = function (target, key) {
  3402. warn(
  3403. "Property or method \"" + key + "\" is not defined on the instance but " +
  3404. 'referenced during render. Make sure that this property is reactive, ' +
  3405. 'either in the data option, or for class-based components, by ' +
  3406. 'initializing the property. ' +
  3407. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  3408. target
  3409. );
  3410. };
  3411. var warnReservedPrefix = function (target, key) {
  3412. warn(
  3413. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  3414. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  3415. 'prevent conflicts with Vue internals. ' +
  3416. 'See: https://vuejs.org/v2/api/#data',
  3417. target
  3418. );
  3419. };
  3420. var hasProxy =
  3421. typeof Proxy !== 'undefined' && isNative(Proxy);
  3422. if (hasProxy) {
  3423. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  3424. config.keyCodes = new Proxy(config.keyCodes, {
  3425. set: function set (target, key, value) {
  3426. if (isBuiltInModifier(key)) {
  3427. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  3428. return false
  3429. } else {
  3430. target[key] = value;
  3431. return true
  3432. }
  3433. }
  3434. });
  3435. }
  3436. var hasHandler = {
  3437. has: function has (target, key) {
  3438. var has = key in target;
  3439. var isAllowed = allowedGlobals(key) ||
  3440. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  3441. if (!has && !isAllowed) {
  3442. if (key in target.$data) { warnReservedPrefix(target, key); }
  3443. else { warnNonPresent(target, key); }
  3444. }
  3445. return has || !isAllowed
  3446. }
  3447. };
  3448. var getHandler = {
  3449. get: function get (target, key) {
  3450. if (typeof key === 'string' && !(key in target)) {
  3451. if (key in target.$data) { warnReservedPrefix(target, key); }
  3452. else { warnNonPresent(target, key); }
  3453. }
  3454. return target[key]
  3455. }
  3456. };
  3457. initProxy = function initProxy (vm) {
  3458. if (hasProxy) {
  3459. // determine which proxy handler to use
  3460. var options = vm.$options;
  3461. var handlers = options.render && options.render._withStripped
  3462. ? getHandler
  3463. : hasHandler;
  3464. vm._renderProxy = new Proxy(vm, handlers);
  3465. } else {
  3466. vm._renderProxy = vm;
  3467. }
  3468. };
  3469. }
  3470. /* */
  3471. var seenObjects = new _Set();
  3472. /**
  3473. * Recursively traverse an object to evoke all converted
  3474. * getters, so that every nested property inside the object
  3475. * is collected as a "deep" dependency.
  3476. */
  3477. function traverse (val) {
  3478. _traverse(val, seenObjects);
  3479. seenObjects.clear();
  3480. }
  3481. function _traverse (val, seen) {
  3482. var i, keys;
  3483. var isA = Array.isArray(val);
  3484. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  3485. return
  3486. }
  3487. if (val.__ob__) {
  3488. var depId = val.__ob__.dep.id;
  3489. if (seen.has(depId)) {
  3490. return
  3491. }
  3492. seen.add(depId);
  3493. }
  3494. if (isA) {
  3495. i = val.length;
  3496. while (i--) { _traverse(val[i], seen); }
  3497. } else {
  3498. keys = Object.keys(val);
  3499. i = keys.length;
  3500. while (i--) { _traverse(val[keys[i]], seen); }
  3501. }
  3502. }
  3503. var mark;
  3504. var measure;
  3505. if (true) {
  3506. var perf = inBrowser && window.performance;
  3507. /* istanbul ignore if */
  3508. if (
  3509. perf &&
  3510. perf.mark &&
  3511. perf.measure &&
  3512. perf.clearMarks &&
  3513. perf.clearMeasures
  3514. ) {
  3515. mark = function (tag) { return perf.mark(tag); };
  3516. measure = function (name, startTag, endTag) {
  3517. perf.measure(name, startTag, endTag);
  3518. perf.clearMarks(startTag);
  3519. perf.clearMarks(endTag);
  3520. // perf.clearMeasures(name)
  3521. };
  3522. }
  3523. }
  3524. /* */
  3525. var normalizeEvent = cached(function (name) {
  3526. var passive = name.charAt(0) === '&';
  3527. name = passive ? name.slice(1) : name;
  3528. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  3529. name = once$$1 ? name.slice(1) : name;
  3530. var capture = name.charAt(0) === '!';
  3531. name = capture ? name.slice(1) : name;
  3532. return {
  3533. name: name,
  3534. once: once$$1,
  3535. capture: capture,
  3536. passive: passive
  3537. }
  3538. });
  3539. function createFnInvoker (fns, vm) {
  3540. function invoker () {
  3541. var arguments$1 = arguments;
  3542. var fns = invoker.fns;
  3543. if (Array.isArray(fns)) {
  3544. var cloned = fns.slice();
  3545. for (var i = 0; i < cloned.length; i++) {
  3546. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  3547. }
  3548. } else {
  3549. // return handler return value for single handlers
  3550. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  3551. }
  3552. }
  3553. invoker.fns = fns;
  3554. return invoker
  3555. }
  3556. function updateListeners (
  3557. on,
  3558. oldOn,
  3559. add,
  3560. remove$$1,
  3561. createOnceHandler,
  3562. vm
  3563. ) {
  3564. var name, def$$1, cur, old, event;
  3565. for (name in on) {
  3566. def$$1 = cur = on[name];
  3567. old = oldOn[name];
  3568. event = normalizeEvent(name);
  3569. if (isUndef(cur)) {
  3570. true && warn(
  3571. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  3572. vm
  3573. );
  3574. } else if (isUndef(old)) {
  3575. if (isUndef(cur.fns)) {
  3576. cur = on[name] = createFnInvoker(cur, vm);
  3577. }
  3578. if (isTrue(event.once)) {
  3579. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  3580. }
  3581. add(event.name, cur, event.capture, event.passive, event.params);
  3582. } else if (cur !== old) {
  3583. old.fns = cur;
  3584. on[name] = old;
  3585. }
  3586. }
  3587. for (name in oldOn) {
  3588. if (isUndef(on[name])) {
  3589. event = normalizeEvent(name);
  3590. remove$$1(event.name, oldOn[name], event.capture);
  3591. }
  3592. }
  3593. }
  3594. /* */
  3595. /* */
  3596. // fixed by xxxxxx (mp properties)
  3597. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  3598. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  3599. if (isUndef(propOptions)) {
  3600. return res
  3601. }
  3602. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  3603. var attrs = data.attrs;
  3604. var props = data.props;
  3605. if (isDef(attrs) || isDef(props)) {
  3606. for (var key in propOptions) {
  3607. var altKey = hyphenate(key);
  3608. var result = checkProp(res, props, key, altKey, true) ||
  3609. checkProp(res, attrs, key, altKey, false);
  3610. // externalClass
  3611. if (
  3612. result &&
  3613. res[key] &&
  3614. externalClasses.indexOf(altKey) !== -1 &&
  3615. context[camelize(res[key])]
  3616. ) {
  3617. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  3618. res[key] = context[camelize(res[key])];
  3619. }
  3620. }
  3621. }
  3622. return res
  3623. }
  3624. function extractPropsFromVNodeData (
  3625. data,
  3626. Ctor,
  3627. tag,
  3628. context// fixed by xxxxxx
  3629. ) {
  3630. // we are only extracting raw values here.
  3631. // validation and default values are handled in the child
  3632. // component itself.
  3633. var propOptions = Ctor.options.props;
  3634. if (isUndef(propOptions)) {
  3635. // fixed by xxxxxx
  3636. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  3637. }
  3638. var res = {};
  3639. var attrs = data.attrs;
  3640. var props = data.props;
  3641. if (isDef(attrs) || isDef(props)) {
  3642. for (var key in propOptions) {
  3643. var altKey = hyphenate(key);
  3644. if (true) {
  3645. var keyInLowerCase = key.toLowerCase();
  3646. if (
  3647. key !== keyInLowerCase &&
  3648. attrs && hasOwn(attrs, keyInLowerCase)
  3649. ) {
  3650. tip(
  3651. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  3652. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  3653. " \"" + key + "\". " +
  3654. "Note that HTML attributes are case-insensitive and camelCased " +
  3655. "props need to use their kebab-case equivalents when using in-DOM " +
  3656. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  3657. );
  3658. }
  3659. }
  3660. checkProp(res, props, key, altKey, true) ||
  3661. checkProp(res, attrs, key, altKey, false);
  3662. }
  3663. }
  3664. // fixed by xxxxxx
  3665. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  3666. }
  3667. function checkProp (
  3668. res,
  3669. hash,
  3670. key,
  3671. altKey,
  3672. preserve
  3673. ) {
  3674. if (isDef(hash)) {
  3675. if (hasOwn(hash, key)) {
  3676. res[key] = hash[key];
  3677. if (!preserve) {
  3678. delete hash[key];
  3679. }
  3680. return true
  3681. } else if (hasOwn(hash, altKey)) {
  3682. res[key] = hash[altKey];
  3683. if (!preserve) {
  3684. delete hash[altKey];
  3685. }
  3686. return true
  3687. }
  3688. }
  3689. return false
  3690. }
  3691. /* */
  3692. // The template compiler attempts to minimize the need for normalization by
  3693. // statically analyzing the template at compile time.
  3694. //
  3695. // For plain HTML markup, normalization can be completely skipped because the
  3696. // generated render function is guaranteed to return Array<VNode>. There are
  3697. // two cases where extra normalization is needed:
  3698. // 1. When the children contains components - because a functional component
  3699. // may return an Array instead of a single root. In this case, just a simple
  3700. // normalization is needed - if any child is an Array, we flatten the whole
  3701. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  3702. // because functional components already normalize their own children.
  3703. function simpleNormalizeChildren (children) {
  3704. for (var i = 0; i < children.length; i++) {
  3705. if (Array.isArray(children[i])) {
  3706. return Array.prototype.concat.apply([], children)
  3707. }
  3708. }
  3709. return children
  3710. }
  3711. // 2. When the children contains constructs that always generated nested Arrays,
  3712. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  3713. // with hand-written render functions / JSX. In such cases a full normalization
  3714. // is needed to cater to all possible types of children values.
  3715. function normalizeChildren (children) {
  3716. return isPrimitive(children)
  3717. ? [createTextVNode(children)]
  3718. : Array.isArray(children)
  3719. ? normalizeArrayChildren(children)
  3720. : undefined
  3721. }
  3722. function isTextNode (node) {
  3723. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  3724. }
  3725. function normalizeArrayChildren (children, nestedIndex) {
  3726. var res = [];
  3727. var i, c, lastIndex, last;
  3728. for (i = 0; i < children.length; i++) {
  3729. c = children[i];
  3730. if (isUndef(c) || typeof c === 'boolean') { continue }
  3731. lastIndex = res.length - 1;
  3732. last = res[lastIndex];
  3733. // nested
  3734. if (Array.isArray(c)) {
  3735. if (c.length > 0) {
  3736. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  3737. // merge adjacent text nodes
  3738. if (isTextNode(c[0]) && isTextNode(last)) {
  3739. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  3740. c.shift();
  3741. }
  3742. res.push.apply(res, c);
  3743. }
  3744. } else if (isPrimitive(c)) {
  3745. if (isTextNode(last)) {
  3746. // merge adjacent text nodes
  3747. // this is necessary for SSR hydration because text nodes are
  3748. // essentially merged when rendered to HTML strings
  3749. res[lastIndex] = createTextVNode(last.text + c);
  3750. } else if (c !== '') {
  3751. // convert primitive to vnode
  3752. res.push(createTextVNode(c));
  3753. }
  3754. } else {
  3755. if (isTextNode(c) && isTextNode(last)) {
  3756. // merge adjacent text nodes
  3757. res[lastIndex] = createTextVNode(last.text + c.text);
  3758. } else {
  3759. // default key for nested array children (likely generated by v-for)
  3760. if (isTrue(children._isVList) &&
  3761. isDef(c.tag) &&
  3762. isUndef(c.key) &&
  3763. isDef(nestedIndex)) {
  3764. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  3765. }
  3766. res.push(c);
  3767. }
  3768. }
  3769. }
  3770. return res
  3771. }
  3772. /* */
  3773. function initProvide (vm) {
  3774. var provide = vm.$options.provide;
  3775. if (provide) {
  3776. vm._provided = typeof provide === 'function'
  3777. ? provide.call(vm)
  3778. : provide;
  3779. }
  3780. }
  3781. function initInjections (vm) {
  3782. var result = resolveInject(vm.$options.inject, vm);
  3783. if (result) {
  3784. toggleObserving(false);
  3785. Object.keys(result).forEach(function (key) {
  3786. /* istanbul ignore else */
  3787. if (true) {
  3788. defineReactive$$1(vm, key, result[key], function () {
  3789. warn(
  3790. "Avoid mutating an injected value directly since the changes will be " +
  3791. "overwritten whenever the provided component re-renders. " +
  3792. "injection being mutated: \"" + key + "\"",
  3793. vm
  3794. );
  3795. });
  3796. } else {}
  3797. });
  3798. toggleObserving(true);
  3799. }
  3800. }
  3801. function resolveInject (inject, vm) {
  3802. if (inject) {
  3803. // inject is :any because flow is not smart enough to figure out cached
  3804. var result = Object.create(null);
  3805. var keys = hasSymbol
  3806. ? Reflect.ownKeys(inject)
  3807. : Object.keys(inject);
  3808. for (var i = 0; i < keys.length; i++) {
  3809. var key = keys[i];
  3810. // #6574 in case the inject object is observed...
  3811. if (key === '__ob__') { continue }
  3812. var provideKey = inject[key].from;
  3813. var source = vm;
  3814. while (source) {
  3815. if (source._provided && hasOwn(source._provided, provideKey)) {
  3816. result[key] = source._provided[provideKey];
  3817. break
  3818. }
  3819. source = source.$parent;
  3820. }
  3821. if (!source) {
  3822. if ('default' in inject[key]) {
  3823. var provideDefault = inject[key].default;
  3824. result[key] = typeof provideDefault === 'function'
  3825. ? provideDefault.call(vm)
  3826. : provideDefault;
  3827. } else if (true) {
  3828. warn(("Injection \"" + key + "\" not found"), vm);
  3829. }
  3830. }
  3831. }
  3832. return result
  3833. }
  3834. }
  3835. /* */
  3836. /**
  3837. * Runtime helper for resolving raw children VNodes into a slot object.
  3838. */
  3839. function resolveSlots (
  3840. children,
  3841. context
  3842. ) {
  3843. if (!children || !children.length) {
  3844. return {}
  3845. }
  3846. var slots = {};
  3847. for (var i = 0, l = children.length; i < l; i++) {
  3848. var child = children[i];
  3849. var data = child.data;
  3850. // remove slot attribute if the node is resolved as a Vue slot node
  3851. if (data && data.attrs && data.attrs.slot) {
  3852. delete data.attrs.slot;
  3853. }
  3854. // named slots should only be respected if the vnode was rendered in the
  3855. // same context.
  3856. if ((child.context === context || child.fnContext === context) &&
  3857. data && data.slot != null
  3858. ) {
  3859. var name = data.slot;
  3860. var slot = (slots[name] || (slots[name] = []));
  3861. if (child.tag === 'template') {
  3862. slot.push.apply(slot, child.children || []);
  3863. } else {
  3864. slot.push(child);
  3865. }
  3866. } else {
  3867. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  3868. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  3869. (slots['page'] || (slots['page'] = [])).push(child);
  3870. }else{
  3871. (slots.default || (slots.default = [])).push(child);
  3872. }
  3873. }
  3874. }
  3875. // ignore slots that contains only whitespace
  3876. for (var name$1 in slots) {
  3877. if (slots[name$1].every(isWhitespace)) {
  3878. delete slots[name$1];
  3879. }
  3880. }
  3881. return slots
  3882. }
  3883. function isWhitespace (node) {
  3884. return (node.isComment && !node.asyncFactory) || node.text === ' '
  3885. }
  3886. /* */
  3887. function normalizeScopedSlots (
  3888. slots,
  3889. normalSlots,
  3890. prevSlots
  3891. ) {
  3892. var res;
  3893. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  3894. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  3895. var key = slots && slots.$key;
  3896. if (!slots) {
  3897. res = {};
  3898. } else if (slots._normalized) {
  3899. // fast path 1: child component re-render only, parent did not change
  3900. return slots._normalized
  3901. } else if (
  3902. isStable &&
  3903. prevSlots &&
  3904. prevSlots !== emptyObject &&
  3905. key === prevSlots.$key &&
  3906. !hasNormalSlots &&
  3907. !prevSlots.$hasNormal
  3908. ) {
  3909. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  3910. // only need to normalize once
  3911. return prevSlots
  3912. } else {
  3913. res = {};
  3914. for (var key$1 in slots) {
  3915. if (slots[key$1] && key$1[0] !== '$') {
  3916. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  3917. }
  3918. }
  3919. }
  3920. // expose normal slots on scopedSlots
  3921. for (var key$2 in normalSlots) {
  3922. if (!(key$2 in res)) {
  3923. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  3924. }
  3925. }
  3926. // avoriaz seems to mock a non-extensible $scopedSlots object
  3927. // and when that is passed down this would cause an error
  3928. if (slots && Object.isExtensible(slots)) {
  3929. (slots)._normalized = res;
  3930. }
  3931. def(res, '$stable', isStable);
  3932. def(res, '$key', key);
  3933. def(res, '$hasNormal', hasNormalSlots);
  3934. return res
  3935. }
  3936. function normalizeScopedSlot(normalSlots, key, fn) {
  3937. var normalized = function () {
  3938. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  3939. res = res && typeof res === 'object' && !Array.isArray(res)
  3940. ? [res] // single vnode
  3941. : normalizeChildren(res);
  3942. return res && (
  3943. res.length === 0 ||
  3944. (res.length === 1 && res[0].isComment) // #9658
  3945. ) ? undefined
  3946. : res
  3947. };
  3948. // this is a slot using the new v-slot syntax without scope. although it is
  3949. // compiled as a scoped slot, render fn users would expect it to be present
  3950. // on this.$slots because the usage is semantically a normal slot.
  3951. if (fn.proxy) {
  3952. Object.defineProperty(normalSlots, key, {
  3953. get: normalized,
  3954. enumerable: true,
  3955. configurable: true
  3956. });
  3957. }
  3958. return normalized
  3959. }
  3960. function proxyNormalSlot(slots, key) {
  3961. return function () { return slots[key]; }
  3962. }
  3963. /* */
  3964. /**
  3965. * Runtime helper for rendering v-for lists.
  3966. */
  3967. function renderList (
  3968. val,
  3969. render
  3970. ) {
  3971. var ret, i, l, keys, key;
  3972. if (Array.isArray(val) || typeof val === 'string') {
  3973. ret = new Array(val.length);
  3974. for (i = 0, l = val.length; i < l; i++) {
  3975. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  3976. }
  3977. } else if (typeof val === 'number') {
  3978. ret = new Array(val);
  3979. for (i = 0; i < val; i++) {
  3980. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  3981. }
  3982. } else if (isObject(val)) {
  3983. if (hasSymbol && val[Symbol.iterator]) {
  3984. ret = [];
  3985. var iterator = val[Symbol.iterator]();
  3986. var result = iterator.next();
  3987. while (!result.done) {
  3988. ret.push(render(result.value, ret.length, i++, i)); // fixed by xxxxxx
  3989. result = iterator.next();
  3990. }
  3991. } else {
  3992. keys = Object.keys(val);
  3993. ret = new Array(keys.length);
  3994. for (i = 0, l = keys.length; i < l; i++) {
  3995. key = keys[i];
  3996. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  3997. }
  3998. }
  3999. }
  4000. if (!isDef(ret)) {
  4001. ret = [];
  4002. }
  4003. (ret)._isVList = true;
  4004. return ret
  4005. }
  4006. /* */
  4007. /**
  4008. * Runtime helper for rendering <slot>
  4009. */
  4010. function renderSlot (
  4011. name,
  4012. fallback,
  4013. props,
  4014. bindObject
  4015. ) {
  4016. var scopedSlotFn = this.$scopedSlots[name];
  4017. var nodes;
  4018. if (scopedSlotFn) { // scoped slot
  4019. props = props || {};
  4020. if (bindObject) {
  4021. if ( true && !isObject(bindObject)) {
  4022. warn(
  4023. 'slot v-bind without argument expects an Object',
  4024. this
  4025. );
  4026. }
  4027. props = extend(extend({}, bindObject), props);
  4028. }
  4029. // fixed by xxxxxx app-plus scopedSlot
  4030. nodes = scopedSlotFn(props, this, props._i) || fallback;
  4031. } else {
  4032. nodes = this.$slots[name] || fallback;
  4033. }
  4034. var target = props && props.slot;
  4035. if (target) {
  4036. return this.$createElement('template', { slot: target }, nodes)
  4037. } else {
  4038. return nodes
  4039. }
  4040. }
  4041. /* */
  4042. /**
  4043. * Runtime helper for resolving filters
  4044. */
  4045. function resolveFilter (id) {
  4046. return resolveAsset(this.$options, 'filters', id, true) || identity
  4047. }
  4048. /* */
  4049. function isKeyNotMatch (expect, actual) {
  4050. if (Array.isArray(expect)) {
  4051. return expect.indexOf(actual) === -1
  4052. } else {
  4053. return expect !== actual
  4054. }
  4055. }
  4056. /**
  4057. * Runtime helper for checking keyCodes from config.
  4058. * exposed as Vue.prototype._k
  4059. * passing in eventKeyName as last argument separately for backwards compat
  4060. */
  4061. function checkKeyCodes (
  4062. eventKeyCode,
  4063. key,
  4064. builtInKeyCode,
  4065. eventKeyName,
  4066. builtInKeyName
  4067. ) {
  4068. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  4069. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  4070. return isKeyNotMatch(builtInKeyName, eventKeyName)
  4071. } else if (mappedKeyCode) {
  4072. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  4073. } else if (eventKeyName) {
  4074. return hyphenate(eventKeyName) !== key
  4075. }
  4076. }
  4077. /* */
  4078. /**
  4079. * Runtime helper for merging v-bind="object" into a VNode's data.
  4080. */
  4081. function bindObjectProps (
  4082. data,
  4083. tag,
  4084. value,
  4085. asProp,
  4086. isSync
  4087. ) {
  4088. if (value) {
  4089. if (!isObject(value)) {
  4090. true && warn(
  4091. 'v-bind without argument expects an Object or Array value',
  4092. this
  4093. );
  4094. } else {
  4095. if (Array.isArray(value)) {
  4096. value = toObject(value);
  4097. }
  4098. var hash;
  4099. var loop = function ( key ) {
  4100. if (
  4101. key === 'class' ||
  4102. key === 'style' ||
  4103. isReservedAttribute(key)
  4104. ) {
  4105. hash = data;
  4106. } else {
  4107. var type = data.attrs && data.attrs.type;
  4108. hash = asProp || config.mustUseProp(tag, type, key)
  4109. ? data.domProps || (data.domProps = {})
  4110. : data.attrs || (data.attrs = {});
  4111. }
  4112. var camelizedKey = camelize(key);
  4113. var hyphenatedKey = hyphenate(key);
  4114. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  4115. hash[key] = value[key];
  4116. if (isSync) {
  4117. var on = data.on || (data.on = {});
  4118. on[("update:" + key)] = function ($event) {
  4119. value[key] = $event;
  4120. };
  4121. }
  4122. }
  4123. };
  4124. for (var key in value) loop( key );
  4125. }
  4126. }
  4127. return data
  4128. }
  4129. /* */
  4130. /**
  4131. * Runtime helper for rendering static trees.
  4132. */
  4133. function renderStatic (
  4134. index,
  4135. isInFor
  4136. ) {
  4137. var cached = this._staticTrees || (this._staticTrees = []);
  4138. var tree = cached[index];
  4139. // if has already-rendered static tree and not inside v-for,
  4140. // we can reuse the same tree.
  4141. if (tree && !isInFor) {
  4142. return tree
  4143. }
  4144. // otherwise, render a fresh tree.
  4145. tree = cached[index] = this.$options.staticRenderFns[index].call(
  4146. this._renderProxy,
  4147. null,
  4148. this // for render fns generated for functional component templates
  4149. );
  4150. markStatic(tree, ("__static__" + index), false);
  4151. return tree
  4152. }
  4153. /**
  4154. * Runtime helper for v-once.
  4155. * Effectively it means marking the node as static with a unique key.
  4156. */
  4157. function markOnce (
  4158. tree,
  4159. index,
  4160. key
  4161. ) {
  4162. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  4163. return tree
  4164. }
  4165. function markStatic (
  4166. tree,
  4167. key,
  4168. isOnce
  4169. ) {
  4170. if (Array.isArray(tree)) {
  4171. for (var i = 0; i < tree.length; i++) {
  4172. if (tree[i] && typeof tree[i] !== 'string') {
  4173. markStaticNode(tree[i], (key + "_" + i), isOnce);
  4174. }
  4175. }
  4176. } else {
  4177. markStaticNode(tree, key, isOnce);
  4178. }
  4179. }
  4180. function markStaticNode (node, key, isOnce) {
  4181. node.isStatic = true;
  4182. node.key = key;
  4183. node.isOnce = isOnce;
  4184. }
  4185. /* */
  4186. function bindObjectListeners (data, value) {
  4187. if (value) {
  4188. if (!isPlainObject(value)) {
  4189. true && warn(
  4190. 'v-on without argument expects an Object value',
  4191. this
  4192. );
  4193. } else {
  4194. var on = data.on = data.on ? extend({}, data.on) : {};
  4195. for (var key in value) {
  4196. var existing = on[key];
  4197. var ours = value[key];
  4198. on[key] = existing ? [].concat(existing, ours) : ours;
  4199. }
  4200. }
  4201. }
  4202. return data
  4203. }
  4204. /* */
  4205. function resolveScopedSlots (
  4206. fns, // see flow/vnode
  4207. res,
  4208. // the following are added in 2.6
  4209. hasDynamicKeys,
  4210. contentHashKey
  4211. ) {
  4212. res = res || { $stable: !hasDynamicKeys };
  4213. for (var i = 0; i < fns.length; i++) {
  4214. var slot = fns[i];
  4215. if (Array.isArray(slot)) {
  4216. resolveScopedSlots(slot, res, hasDynamicKeys);
  4217. } else if (slot) {
  4218. // marker for reverse proxying v-slot without scope on this.$slots
  4219. if (slot.proxy) {
  4220. slot.fn.proxy = true;
  4221. }
  4222. res[slot.key] = slot.fn;
  4223. }
  4224. }
  4225. if (contentHashKey) {
  4226. (res).$key = contentHashKey;
  4227. }
  4228. return res
  4229. }
  4230. /* */
  4231. function bindDynamicKeys (baseObj, values) {
  4232. for (var i = 0; i < values.length; i += 2) {
  4233. var key = values[i];
  4234. if (typeof key === 'string' && key) {
  4235. baseObj[values[i]] = values[i + 1];
  4236. } else if ( true && key !== '' && key !== null) {
  4237. // null is a special value for explicitly removing a binding
  4238. warn(
  4239. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  4240. this
  4241. );
  4242. }
  4243. }
  4244. return baseObj
  4245. }
  4246. // helper to dynamically append modifier runtime markers to event names.
  4247. // ensure only append when value is already string, otherwise it will be cast
  4248. // to string and cause the type check to miss.
  4249. function prependModifier (value, symbol) {
  4250. return typeof value === 'string' ? symbol + value : value
  4251. }
  4252. /* */
  4253. function installRenderHelpers (target) {
  4254. target._o = markOnce;
  4255. target._n = toNumber;
  4256. target._s = toString;
  4257. target._l = renderList;
  4258. target._t = renderSlot;
  4259. target._q = looseEqual;
  4260. target._i = looseIndexOf;
  4261. target._m = renderStatic;
  4262. target._f = resolveFilter;
  4263. target._k = checkKeyCodes;
  4264. target._b = bindObjectProps;
  4265. target._v = createTextVNode;
  4266. target._e = createEmptyVNode;
  4267. target._u = resolveScopedSlots;
  4268. target._g = bindObjectListeners;
  4269. target._d = bindDynamicKeys;
  4270. target._p = prependModifier;
  4271. }
  4272. /* */
  4273. function FunctionalRenderContext (
  4274. data,
  4275. props,
  4276. children,
  4277. parent,
  4278. Ctor
  4279. ) {
  4280. var this$1 = this;
  4281. var options = Ctor.options;
  4282. // ensure the createElement function in functional components
  4283. // gets a unique context - this is necessary for correct named slot check
  4284. var contextVm;
  4285. if (hasOwn(parent, '_uid')) {
  4286. contextVm = Object.create(parent);
  4287. // $flow-disable-line
  4288. contextVm._original = parent;
  4289. } else {
  4290. // the context vm passed in is a functional context as well.
  4291. // in this case we want to make sure we are able to get a hold to the
  4292. // real context instance.
  4293. contextVm = parent;
  4294. // $flow-disable-line
  4295. parent = parent._original;
  4296. }
  4297. var isCompiled = isTrue(options._compiled);
  4298. var needNormalization = !isCompiled;
  4299. this.data = data;
  4300. this.props = props;
  4301. this.children = children;
  4302. this.parent = parent;
  4303. this.listeners = data.on || emptyObject;
  4304. this.injections = resolveInject(options.inject, parent);
  4305. this.slots = function () {
  4306. if (!this$1.$slots) {
  4307. normalizeScopedSlots(
  4308. data.scopedSlots,
  4309. this$1.$slots = resolveSlots(children, parent)
  4310. );
  4311. }
  4312. return this$1.$slots
  4313. };
  4314. Object.defineProperty(this, 'scopedSlots', ({
  4315. enumerable: true,
  4316. get: function get () {
  4317. return normalizeScopedSlots(data.scopedSlots, this.slots())
  4318. }
  4319. }));
  4320. // support for compiled functional template
  4321. if (isCompiled) {
  4322. // exposing $options for renderStatic()
  4323. this.$options = options;
  4324. // pre-resolve slots for renderSlot()
  4325. this.$slots = this.slots();
  4326. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  4327. }
  4328. if (options._scopeId) {
  4329. this._c = function (a, b, c, d) {
  4330. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  4331. if (vnode && !Array.isArray(vnode)) {
  4332. vnode.fnScopeId = options._scopeId;
  4333. vnode.fnContext = parent;
  4334. }
  4335. return vnode
  4336. };
  4337. } else {
  4338. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  4339. }
  4340. }
  4341. installRenderHelpers(FunctionalRenderContext.prototype);
  4342. function createFunctionalComponent (
  4343. Ctor,
  4344. propsData,
  4345. data,
  4346. contextVm,
  4347. children
  4348. ) {
  4349. var options = Ctor.options;
  4350. var props = {};
  4351. var propOptions = options.props;
  4352. if (isDef(propOptions)) {
  4353. for (var key in propOptions) {
  4354. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  4355. }
  4356. } else {
  4357. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  4358. if (isDef(data.props)) { mergeProps(props, data.props); }
  4359. }
  4360. var renderContext = new FunctionalRenderContext(
  4361. data,
  4362. props,
  4363. children,
  4364. contextVm,
  4365. Ctor
  4366. );
  4367. var vnode = options.render.call(null, renderContext._c, renderContext);
  4368. if (vnode instanceof VNode) {
  4369. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  4370. } else if (Array.isArray(vnode)) {
  4371. var vnodes = normalizeChildren(vnode) || [];
  4372. var res = new Array(vnodes.length);
  4373. for (var i = 0; i < vnodes.length; i++) {
  4374. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  4375. }
  4376. return res
  4377. }
  4378. }
  4379. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  4380. // #7817 clone node before setting fnContext, otherwise if the node is reused
  4381. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  4382. // that should not be matched to match.
  4383. var clone = cloneVNode(vnode);
  4384. clone.fnContext = contextVm;
  4385. clone.fnOptions = options;
  4386. if (true) {
  4387. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  4388. }
  4389. if (data.slot) {
  4390. (clone.data || (clone.data = {})).slot = data.slot;
  4391. }
  4392. return clone
  4393. }
  4394. function mergeProps (to, from) {
  4395. for (var key in from) {
  4396. to[camelize(key)] = from[key];
  4397. }
  4398. }
  4399. /* */
  4400. /* */
  4401. /* */
  4402. /* */
  4403. // inline hooks to be invoked on component VNodes during patch
  4404. var componentVNodeHooks = {
  4405. init: function init (vnode, hydrating) {
  4406. if (
  4407. vnode.componentInstance &&
  4408. !vnode.componentInstance._isDestroyed &&
  4409. vnode.data.keepAlive
  4410. ) {
  4411. // kept-alive components, treat as a patch
  4412. var mountedNode = vnode; // work around flow
  4413. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  4414. } else {
  4415. var child = vnode.componentInstance = createComponentInstanceForVnode(
  4416. vnode,
  4417. activeInstance
  4418. );
  4419. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  4420. }
  4421. },
  4422. prepatch: function prepatch (oldVnode, vnode) {
  4423. var options = vnode.componentOptions;
  4424. var child = vnode.componentInstance = oldVnode.componentInstance;
  4425. updateChildComponent(
  4426. child,
  4427. options.propsData, // updated props
  4428. options.listeners, // updated listeners
  4429. vnode, // new parent vnode
  4430. options.children // new children
  4431. );
  4432. },
  4433. insert: function insert (vnode) {
  4434. var context = vnode.context;
  4435. var componentInstance = vnode.componentInstance;
  4436. if (!componentInstance._isMounted) {
  4437. callHook(componentInstance, 'onServiceCreated');
  4438. callHook(componentInstance, 'onServiceAttached');
  4439. componentInstance._isMounted = true;
  4440. callHook(componentInstance, 'mounted');
  4441. }
  4442. if (vnode.data.keepAlive) {
  4443. if (context._isMounted) {
  4444. // vue-router#1212
  4445. // During updates, a kept-alive component's child components may
  4446. // change, so directly walking the tree here may call activated hooks
  4447. // on incorrect children. Instead we push them into a queue which will
  4448. // be processed after the whole patch process ended.
  4449. queueActivatedComponent(componentInstance);
  4450. } else {
  4451. activateChildComponent(componentInstance, true /* direct */);
  4452. }
  4453. }
  4454. },
  4455. destroy: function destroy (vnode) {
  4456. var componentInstance = vnode.componentInstance;
  4457. if (!componentInstance._isDestroyed) {
  4458. if (!vnode.data.keepAlive) {
  4459. componentInstance.$destroy();
  4460. } else {
  4461. deactivateChildComponent(componentInstance, true /* direct */);
  4462. }
  4463. }
  4464. }
  4465. };
  4466. var hooksToMerge = Object.keys(componentVNodeHooks);
  4467. function createComponent (
  4468. Ctor,
  4469. data,
  4470. context,
  4471. children,
  4472. tag
  4473. ) {
  4474. if (isUndef(Ctor)) {
  4475. return
  4476. }
  4477. var baseCtor = context.$options._base;
  4478. // plain options object: turn it into a constructor
  4479. if (isObject(Ctor)) {
  4480. Ctor = baseCtor.extend(Ctor);
  4481. }
  4482. // if at this stage it's not a constructor or an async component factory,
  4483. // reject.
  4484. if (typeof Ctor !== 'function') {
  4485. if (true) {
  4486. warn(("Invalid Component definition: " + (String(Ctor))), context);
  4487. }
  4488. return
  4489. }
  4490. // async component
  4491. var asyncFactory;
  4492. if (isUndef(Ctor.cid)) {
  4493. asyncFactory = Ctor;
  4494. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  4495. if (Ctor === undefined) {
  4496. // return a placeholder node for async component, which is rendered
  4497. // as a comment node but preserves all the raw information for the node.
  4498. // the information will be used for async server-rendering and hydration.
  4499. return createAsyncPlaceholder(
  4500. asyncFactory,
  4501. data,
  4502. context,
  4503. children,
  4504. tag
  4505. )
  4506. }
  4507. }
  4508. data = data || {};
  4509. // resolve constructor options in case global mixins are applied after
  4510. // component constructor creation
  4511. resolveConstructorOptions(Ctor);
  4512. // transform component v-model data into props & events
  4513. if (isDef(data.model)) {
  4514. transformModel(Ctor.options, data);
  4515. }
  4516. // extract props
  4517. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  4518. // functional component
  4519. if (isTrue(Ctor.options.functional)) {
  4520. return createFunctionalComponent(Ctor, propsData, data, context, children)
  4521. }
  4522. // extract listeners, since these needs to be treated as
  4523. // child component listeners instead of DOM listeners
  4524. var listeners = data.on;
  4525. // replace with listeners with .native modifier
  4526. // so it gets processed during parent component patch.
  4527. data.on = data.nativeOn;
  4528. if (isTrue(Ctor.options.abstract)) {
  4529. // abstract components do not keep anything
  4530. // other than props & listeners & slot
  4531. // work around flow
  4532. var slot = data.slot;
  4533. data = {};
  4534. if (slot) {
  4535. data.slot = slot;
  4536. }
  4537. }
  4538. // install component management hooks onto the placeholder node
  4539. installComponentHooks(data);
  4540. // return a placeholder vnode
  4541. var name = Ctor.options.name || tag;
  4542. var vnode = new VNode(
  4543. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  4544. data, undefined, undefined, undefined, context,
  4545. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  4546. asyncFactory
  4547. );
  4548. return vnode
  4549. }
  4550. function createComponentInstanceForVnode (
  4551. vnode, // we know it's MountedComponentVNode but flow doesn't
  4552. parent // activeInstance in lifecycle state
  4553. ) {
  4554. var options = {
  4555. _isComponent: true,
  4556. _parentVnode: vnode,
  4557. parent: parent
  4558. };
  4559. // check inline-template render functions
  4560. var inlineTemplate = vnode.data.inlineTemplate;
  4561. if (isDef(inlineTemplate)) {
  4562. options.render = inlineTemplate.render;
  4563. options.staticRenderFns = inlineTemplate.staticRenderFns;
  4564. }
  4565. return new vnode.componentOptions.Ctor(options)
  4566. }
  4567. function installComponentHooks (data) {
  4568. var hooks = data.hook || (data.hook = {});
  4569. for (var i = 0; i < hooksToMerge.length; i++) {
  4570. var key = hooksToMerge[i];
  4571. var existing = hooks[key];
  4572. var toMerge = componentVNodeHooks[key];
  4573. if (existing !== toMerge && !(existing && existing._merged)) {
  4574. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  4575. }
  4576. }
  4577. }
  4578. function mergeHook$1 (f1, f2) {
  4579. var merged = function (a, b) {
  4580. // flow complains about extra args which is why we use any
  4581. f1(a, b);
  4582. f2(a, b);
  4583. };
  4584. merged._merged = true;
  4585. return merged
  4586. }
  4587. // transform component v-model info (value and callback) into
  4588. // prop and event handler respectively.
  4589. function transformModel (options, data) {
  4590. var prop = (options.model && options.model.prop) || 'value';
  4591. var event = (options.model && options.model.event) || 'input'
  4592. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  4593. var on = data.on || (data.on = {});
  4594. var existing = on[event];
  4595. var callback = data.model.callback;
  4596. if (isDef(existing)) {
  4597. if (
  4598. Array.isArray(existing)
  4599. ? existing.indexOf(callback) === -1
  4600. : existing !== callback
  4601. ) {
  4602. on[event] = [callback].concat(existing);
  4603. }
  4604. } else {
  4605. on[event] = callback;
  4606. }
  4607. }
  4608. /* */
  4609. var SIMPLE_NORMALIZE = 1;
  4610. var ALWAYS_NORMALIZE = 2;
  4611. // wrapper function for providing a more flexible interface
  4612. // without getting yelled at by flow
  4613. function createElement (
  4614. context,
  4615. tag,
  4616. data,
  4617. children,
  4618. normalizationType,
  4619. alwaysNormalize
  4620. ) {
  4621. if (Array.isArray(data) || isPrimitive(data)) {
  4622. normalizationType = children;
  4623. children = data;
  4624. data = undefined;
  4625. }
  4626. if (isTrue(alwaysNormalize)) {
  4627. normalizationType = ALWAYS_NORMALIZE;
  4628. }
  4629. return _createElement(context, tag, data, children, normalizationType)
  4630. }
  4631. function _createElement (
  4632. context,
  4633. tag,
  4634. data,
  4635. children,
  4636. normalizationType
  4637. ) {
  4638. if (isDef(data) && isDef((data).__ob__)) {
  4639. true && warn(
  4640. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  4641. 'Always create fresh vnode data objects in each render!',
  4642. context
  4643. );
  4644. return createEmptyVNode()
  4645. }
  4646. // object syntax in v-bind
  4647. if (isDef(data) && isDef(data.is)) {
  4648. tag = data.is;
  4649. }
  4650. if (!tag) {
  4651. // in case of component :is set to falsy value
  4652. return createEmptyVNode()
  4653. }
  4654. // warn against non-primitive key
  4655. if ( true &&
  4656. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  4657. ) {
  4658. {
  4659. warn(
  4660. 'Avoid using non-primitive value as key, ' +
  4661. 'use string/number value instead.',
  4662. context
  4663. );
  4664. }
  4665. }
  4666. // support single function children as default scoped slot
  4667. if (Array.isArray(children) &&
  4668. typeof children[0] === 'function'
  4669. ) {
  4670. data = data || {};
  4671. data.scopedSlots = { default: children[0] };
  4672. children.length = 0;
  4673. }
  4674. if (normalizationType === ALWAYS_NORMALIZE) {
  4675. children = normalizeChildren(children);
  4676. } else if (normalizationType === SIMPLE_NORMALIZE) {
  4677. children = simpleNormalizeChildren(children);
  4678. }
  4679. var vnode, ns;
  4680. if (typeof tag === 'string') {
  4681. var Ctor;
  4682. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  4683. if (config.isReservedTag(tag)) {
  4684. // platform built-in elements
  4685. if ( true && isDef(data) && isDef(data.nativeOn)) {
  4686. warn(
  4687. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  4688. context
  4689. );
  4690. }
  4691. vnode = new VNode(
  4692. config.parsePlatformTagName(tag), data, children,
  4693. undefined, undefined, context
  4694. );
  4695. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  4696. // component
  4697. vnode = createComponent(Ctor, data, context, children, tag);
  4698. } else {
  4699. // unknown or unlisted namespaced elements
  4700. // check at runtime because it may get assigned a namespace when its
  4701. // parent normalizes children
  4702. vnode = new VNode(
  4703. tag, data, children,
  4704. undefined, undefined, context
  4705. );
  4706. }
  4707. } else {
  4708. // direct component options / constructor
  4709. vnode = createComponent(tag, data, context, children);
  4710. }
  4711. if (Array.isArray(vnode)) {
  4712. return vnode
  4713. } else if (isDef(vnode)) {
  4714. if (isDef(ns)) { applyNS(vnode, ns); }
  4715. if (isDef(data)) { registerDeepBindings(data); }
  4716. return vnode
  4717. } else {
  4718. return createEmptyVNode()
  4719. }
  4720. }
  4721. function applyNS (vnode, ns, force) {
  4722. vnode.ns = ns;
  4723. if (vnode.tag === 'foreignObject') {
  4724. // use default namespace inside foreignObject
  4725. ns = undefined;
  4726. force = true;
  4727. }
  4728. if (isDef(vnode.children)) {
  4729. for (var i = 0, l = vnode.children.length; i < l; i++) {
  4730. var child = vnode.children[i];
  4731. if (isDef(child.tag) && (
  4732. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  4733. applyNS(child, ns, force);
  4734. }
  4735. }
  4736. }
  4737. }
  4738. // ref #5318
  4739. // necessary to ensure parent re-render when deep bindings like :style and
  4740. // :class are used on slot nodes
  4741. function registerDeepBindings (data) {
  4742. if (isObject(data.style)) {
  4743. traverse(data.style);
  4744. }
  4745. if (isObject(data.class)) {
  4746. traverse(data.class);
  4747. }
  4748. }
  4749. /* */
  4750. function initRender (vm) {
  4751. vm._vnode = null; // the root of the child tree
  4752. vm._staticTrees = null; // v-once cached trees
  4753. var options = vm.$options;
  4754. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  4755. var renderContext = parentVnode && parentVnode.context;
  4756. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  4757. vm.$scopedSlots = emptyObject;
  4758. // bind the createElement fn to this instance
  4759. // so that we get proper render context inside it.
  4760. // args order: tag, data, children, normalizationType, alwaysNormalize
  4761. // internal version is used by render functions compiled from templates
  4762. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  4763. // normalization is always applied for the public version, used in
  4764. // user-written render functions.
  4765. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  4766. // $attrs & $listeners are exposed for easier HOC creation.
  4767. // they need to be reactive so that HOCs using them are always updated
  4768. var parentData = parentVnode && parentVnode.data;
  4769. /* istanbul ignore else */
  4770. if (true) {
  4771. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  4772. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  4773. }, true);
  4774. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  4775. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  4776. }, true);
  4777. } else {}
  4778. }
  4779. var currentRenderingInstance = null;
  4780. function renderMixin (Vue) {
  4781. // install runtime convenience helpers
  4782. installRenderHelpers(Vue.prototype);
  4783. Vue.prototype.$nextTick = function (fn) {
  4784. return nextTick(fn, this)
  4785. };
  4786. Vue.prototype._render = function () {
  4787. var vm = this;
  4788. var ref = vm.$options;
  4789. var render = ref.render;
  4790. var _parentVnode = ref._parentVnode;
  4791. if (_parentVnode) {
  4792. vm.$scopedSlots = normalizeScopedSlots(
  4793. _parentVnode.data.scopedSlots,
  4794. vm.$slots,
  4795. vm.$scopedSlots
  4796. );
  4797. }
  4798. // set parent vnode. this allows render functions to have access
  4799. // to the data on the placeholder node.
  4800. vm.$vnode = _parentVnode;
  4801. // render self
  4802. var vnode;
  4803. try {
  4804. // There's no need to maintain a stack because all render fns are called
  4805. // separately from one another. Nested component's render fns are called
  4806. // when parent component is patched.
  4807. currentRenderingInstance = vm;
  4808. vnode = render.call(vm._renderProxy, vm.$createElement);
  4809. } catch (e) {
  4810. handleError(e, vm, "render");
  4811. // return error render result,
  4812. // or previous vnode to prevent render error causing blank component
  4813. /* istanbul ignore else */
  4814. if ( true && vm.$options.renderError) {
  4815. try {
  4816. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  4817. } catch (e) {
  4818. handleError(e, vm, "renderError");
  4819. vnode = vm._vnode;
  4820. }
  4821. } else {
  4822. vnode = vm._vnode;
  4823. }
  4824. } finally {
  4825. currentRenderingInstance = null;
  4826. }
  4827. // if the returned array contains only a single node, allow it
  4828. if (Array.isArray(vnode) && vnode.length === 1) {
  4829. vnode = vnode[0];
  4830. }
  4831. // return empty vnode in case the render function errored out
  4832. if (!(vnode instanceof VNode)) {
  4833. if ( true && Array.isArray(vnode)) {
  4834. warn(
  4835. 'Multiple root nodes returned from render function. Render function ' +
  4836. 'should return a single root node.',
  4837. vm
  4838. );
  4839. }
  4840. vnode = createEmptyVNode();
  4841. }
  4842. // set parent
  4843. vnode.parent = _parentVnode;
  4844. return vnode
  4845. };
  4846. }
  4847. /* */
  4848. function ensureCtor (comp, base) {
  4849. if (
  4850. comp.__esModule ||
  4851. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  4852. ) {
  4853. comp = comp.default;
  4854. }
  4855. return isObject(comp)
  4856. ? base.extend(comp)
  4857. : comp
  4858. }
  4859. function createAsyncPlaceholder (
  4860. factory,
  4861. data,
  4862. context,
  4863. children,
  4864. tag
  4865. ) {
  4866. var node = createEmptyVNode();
  4867. node.asyncFactory = factory;
  4868. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  4869. return node
  4870. }
  4871. function resolveAsyncComponent (
  4872. factory,
  4873. baseCtor
  4874. ) {
  4875. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  4876. return factory.errorComp
  4877. }
  4878. if (isDef(factory.resolved)) {
  4879. return factory.resolved
  4880. }
  4881. var owner = currentRenderingInstance;
  4882. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  4883. // already pending
  4884. factory.owners.push(owner);
  4885. }
  4886. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  4887. return factory.loadingComp
  4888. }
  4889. if (owner && !isDef(factory.owners)) {
  4890. var owners = factory.owners = [owner];
  4891. var sync = true;
  4892. var timerLoading = null;
  4893. var timerTimeout = null
  4894. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  4895. var forceRender = function (renderCompleted) {
  4896. for (var i = 0, l = owners.length; i < l; i++) {
  4897. (owners[i]).$forceUpdate();
  4898. }
  4899. if (renderCompleted) {
  4900. owners.length = 0;
  4901. if (timerLoading !== null) {
  4902. clearTimeout(timerLoading);
  4903. timerLoading = null;
  4904. }
  4905. if (timerTimeout !== null) {
  4906. clearTimeout(timerTimeout);
  4907. timerTimeout = null;
  4908. }
  4909. }
  4910. };
  4911. var resolve = once(function (res) {
  4912. // cache resolved
  4913. factory.resolved = ensureCtor(res, baseCtor);
  4914. // invoke callbacks only if this is not a synchronous resolve
  4915. // (async resolves are shimmed as synchronous during SSR)
  4916. if (!sync) {
  4917. forceRender(true);
  4918. } else {
  4919. owners.length = 0;
  4920. }
  4921. });
  4922. var reject = once(function (reason) {
  4923. true && warn(
  4924. "Failed to resolve async component: " + (String(factory)) +
  4925. (reason ? ("\nReason: " + reason) : '')
  4926. );
  4927. if (isDef(factory.errorComp)) {
  4928. factory.error = true;
  4929. forceRender(true);
  4930. }
  4931. });
  4932. var res = factory(resolve, reject);
  4933. if (isObject(res)) {
  4934. if (isPromise(res)) {
  4935. // () => Promise
  4936. if (isUndef(factory.resolved)) {
  4937. res.then(resolve, reject);
  4938. }
  4939. } else if (isPromise(res.component)) {
  4940. res.component.then(resolve, reject);
  4941. if (isDef(res.error)) {
  4942. factory.errorComp = ensureCtor(res.error, baseCtor);
  4943. }
  4944. if (isDef(res.loading)) {
  4945. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  4946. if (res.delay === 0) {
  4947. factory.loading = true;
  4948. } else {
  4949. timerLoading = setTimeout(function () {
  4950. timerLoading = null;
  4951. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  4952. factory.loading = true;
  4953. forceRender(false);
  4954. }
  4955. }, res.delay || 200);
  4956. }
  4957. }
  4958. if (isDef(res.timeout)) {
  4959. timerTimeout = setTimeout(function () {
  4960. timerTimeout = null;
  4961. if (isUndef(factory.resolved)) {
  4962. reject(
  4963. true
  4964. ? ("timeout (" + (res.timeout) + "ms)")
  4965. : undefined
  4966. );
  4967. }
  4968. }, res.timeout);
  4969. }
  4970. }
  4971. }
  4972. sync = false;
  4973. // return in case resolved synchronously
  4974. return factory.loading
  4975. ? factory.loadingComp
  4976. : factory.resolved
  4977. }
  4978. }
  4979. /* */
  4980. function isAsyncPlaceholder (node) {
  4981. return node.isComment && node.asyncFactory
  4982. }
  4983. /* */
  4984. function getFirstComponentChild (children) {
  4985. if (Array.isArray(children)) {
  4986. for (var i = 0; i < children.length; i++) {
  4987. var c = children[i];
  4988. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  4989. return c
  4990. }
  4991. }
  4992. }
  4993. }
  4994. /* */
  4995. /* */
  4996. function initEvents (vm) {
  4997. vm._events = Object.create(null);
  4998. vm._hasHookEvent = false;
  4999. // init parent attached events
  5000. var listeners = vm.$options._parentListeners;
  5001. if (listeners) {
  5002. updateComponentListeners(vm, listeners);
  5003. }
  5004. }
  5005. var target;
  5006. function add (event, fn) {
  5007. target.$on(event, fn);
  5008. }
  5009. function remove$1 (event, fn) {
  5010. target.$off(event, fn);
  5011. }
  5012. function createOnceHandler (event, fn) {
  5013. var _target = target;
  5014. return function onceHandler () {
  5015. var res = fn.apply(null, arguments);
  5016. if (res !== null) {
  5017. _target.$off(event, onceHandler);
  5018. }
  5019. }
  5020. }
  5021. function updateComponentListeners (
  5022. vm,
  5023. listeners,
  5024. oldListeners
  5025. ) {
  5026. target = vm;
  5027. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  5028. target = undefined;
  5029. }
  5030. function eventsMixin (Vue) {
  5031. var hookRE = /^hook:/;
  5032. Vue.prototype.$on = function (event, fn) {
  5033. var vm = this;
  5034. if (Array.isArray(event)) {
  5035. for (var i = 0, l = event.length; i < l; i++) {
  5036. vm.$on(event[i], fn);
  5037. }
  5038. } else {
  5039. (vm._events[event] || (vm._events[event] = [])).push(fn);
  5040. // optimize hook:event cost by using a boolean flag marked at registration
  5041. // instead of a hash lookup
  5042. if (hookRE.test(event)) {
  5043. vm._hasHookEvent = true;
  5044. }
  5045. }
  5046. return vm
  5047. };
  5048. Vue.prototype.$once = function (event, fn) {
  5049. var vm = this;
  5050. function on () {
  5051. vm.$off(event, on);
  5052. fn.apply(vm, arguments);
  5053. }
  5054. on.fn = fn;
  5055. vm.$on(event, on);
  5056. return vm
  5057. };
  5058. Vue.prototype.$off = function (event, fn) {
  5059. var vm = this;
  5060. // all
  5061. if (!arguments.length) {
  5062. vm._events = Object.create(null);
  5063. return vm
  5064. }
  5065. // array of events
  5066. if (Array.isArray(event)) {
  5067. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  5068. vm.$off(event[i$1], fn);
  5069. }
  5070. return vm
  5071. }
  5072. // specific event
  5073. var cbs = vm._events[event];
  5074. if (!cbs) {
  5075. return vm
  5076. }
  5077. if (!fn) {
  5078. vm._events[event] = null;
  5079. return vm
  5080. }
  5081. // specific handler
  5082. var cb;
  5083. var i = cbs.length;
  5084. while (i--) {
  5085. cb = cbs[i];
  5086. if (cb === fn || cb.fn === fn) {
  5087. cbs.splice(i, 1);
  5088. break
  5089. }
  5090. }
  5091. return vm
  5092. };
  5093. Vue.prototype.$emit = function (event) {
  5094. var vm = this;
  5095. if (true) {
  5096. var lowerCaseEvent = event.toLowerCase();
  5097. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  5098. tip(
  5099. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  5100. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  5101. "Note that HTML attributes are case-insensitive and you cannot use " +
  5102. "v-on to listen to camelCase events when using in-DOM templates. " +
  5103. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  5104. );
  5105. }
  5106. }
  5107. var cbs = vm._events[event];
  5108. if (cbs) {
  5109. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  5110. var args = toArray(arguments, 1);
  5111. var info = "event handler for \"" + event + "\"";
  5112. for (var i = 0, l = cbs.length; i < l; i++) {
  5113. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  5114. }
  5115. }
  5116. return vm
  5117. };
  5118. }
  5119. /* */
  5120. var activeInstance = null;
  5121. var isUpdatingChildComponent = false;
  5122. function setActiveInstance(vm) {
  5123. var prevActiveInstance = activeInstance;
  5124. activeInstance = vm;
  5125. return function () {
  5126. activeInstance = prevActiveInstance;
  5127. }
  5128. }
  5129. function initLifecycle (vm) {
  5130. var options = vm.$options;
  5131. // locate first non-abstract parent
  5132. var parent = options.parent;
  5133. if (parent && !options.abstract) {
  5134. while (parent.$options.abstract && parent.$parent) {
  5135. parent = parent.$parent;
  5136. }
  5137. parent.$children.push(vm);
  5138. }
  5139. vm.$parent = parent;
  5140. vm.$root = parent ? parent.$root : vm;
  5141. vm.$children = [];
  5142. vm.$refs = {};
  5143. vm._watcher = null;
  5144. vm._inactive = null;
  5145. vm._directInactive = false;
  5146. vm._isMounted = false;
  5147. vm._isDestroyed = false;
  5148. vm._isBeingDestroyed = false;
  5149. }
  5150. function lifecycleMixin (Vue) {
  5151. Vue.prototype._update = function (vnode, hydrating) {
  5152. var vm = this;
  5153. var prevEl = vm.$el;
  5154. var prevVnode = vm._vnode;
  5155. var restoreActiveInstance = setActiveInstance(vm);
  5156. vm._vnode = vnode;
  5157. // Vue.prototype.__patch__ is injected in entry points
  5158. // based on the rendering backend used.
  5159. if (!prevVnode) {
  5160. // initial render
  5161. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  5162. } else {
  5163. // updates
  5164. vm.$el = vm.__patch__(prevVnode, vnode);
  5165. }
  5166. restoreActiveInstance();
  5167. // update __vue__ reference
  5168. if (prevEl) {
  5169. prevEl.__vue__ = null;
  5170. }
  5171. if (vm.$el) {
  5172. vm.$el.__vue__ = vm;
  5173. }
  5174. // if parent is an HOC, update its $el as well
  5175. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  5176. vm.$parent.$el = vm.$el;
  5177. }
  5178. // updated hook is called by the scheduler to ensure that children are
  5179. // updated in a parent's updated hook.
  5180. };
  5181. Vue.prototype.$forceUpdate = function () {
  5182. var vm = this;
  5183. if (vm._watcher) {
  5184. vm._watcher.update();
  5185. }
  5186. };
  5187. Vue.prototype.$destroy = function () {
  5188. var vm = this;
  5189. if (vm._isBeingDestroyed) {
  5190. return
  5191. }
  5192. callHook(vm, 'beforeDestroy');
  5193. vm._isBeingDestroyed = true;
  5194. // remove self from parent
  5195. var parent = vm.$parent;
  5196. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  5197. remove(parent.$children, vm);
  5198. }
  5199. // teardown watchers
  5200. if (vm._watcher) {
  5201. vm._watcher.teardown();
  5202. }
  5203. var i = vm._watchers.length;
  5204. while (i--) {
  5205. vm._watchers[i].teardown();
  5206. }
  5207. // remove reference from data ob
  5208. // frozen object may not have observer.
  5209. if (vm._data.__ob__) {
  5210. vm._data.__ob__.vmCount--;
  5211. }
  5212. // call the last hook...
  5213. vm._isDestroyed = true;
  5214. // invoke destroy hooks on current rendered tree
  5215. vm.__patch__(vm._vnode, null);
  5216. // fire destroyed hook
  5217. callHook(vm, 'destroyed');
  5218. // turn off all instance listeners.
  5219. vm.$off();
  5220. // remove __vue__ reference
  5221. if (vm.$el) {
  5222. vm.$el.__vue__ = null;
  5223. }
  5224. // release circular reference (#6759)
  5225. if (vm.$vnode) {
  5226. vm.$vnode.parent = null;
  5227. }
  5228. };
  5229. }
  5230. function updateChildComponent (
  5231. vm,
  5232. propsData,
  5233. listeners,
  5234. parentVnode,
  5235. renderChildren
  5236. ) {
  5237. if (true) {
  5238. isUpdatingChildComponent = true;
  5239. }
  5240. // determine whether component has slot children
  5241. // we need to do this before overwriting $options._renderChildren.
  5242. // check if there are dynamic scopedSlots (hand-written or compiled but with
  5243. // dynamic slot names). Static scoped slots compiled from template has the
  5244. // "$stable" marker.
  5245. var newScopedSlots = parentVnode.data.scopedSlots;
  5246. var oldScopedSlots = vm.$scopedSlots;
  5247. var hasDynamicScopedSlot = !!(
  5248. (newScopedSlots && !newScopedSlots.$stable) ||
  5249. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  5250. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  5251. );
  5252. // Any static slot children from the parent may have changed during parent's
  5253. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  5254. // update is necessary to ensure correctness.
  5255. var needsForceUpdate = !!(
  5256. renderChildren || // has new static slots
  5257. vm.$options._renderChildren || // has old static slots
  5258. hasDynamicScopedSlot
  5259. );
  5260. vm.$options._parentVnode = parentVnode;
  5261. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  5262. if (vm._vnode) { // update child tree's parent
  5263. vm._vnode.parent = parentVnode;
  5264. }
  5265. vm.$options._renderChildren = renderChildren;
  5266. // update $attrs and $listeners hash
  5267. // these are also reactive so they may trigger child update if the child
  5268. // used them during render
  5269. vm.$attrs = parentVnode.data.attrs || emptyObject;
  5270. vm.$listeners = listeners || emptyObject;
  5271. // update props
  5272. if (propsData && vm.$options.props) {
  5273. toggleObserving(false);
  5274. var props = vm._props;
  5275. var propKeys = vm.$options._propKeys || [];
  5276. for (var i = 0; i < propKeys.length; i++) {
  5277. var key = propKeys[i];
  5278. var propOptions = vm.$options.props; // wtf flow?
  5279. props[key] = validateProp(key, propOptions, propsData, vm);
  5280. }
  5281. toggleObserving(true);
  5282. // keep a copy of raw propsData
  5283. vm.$options.propsData = propsData;
  5284. }
  5285. // fixed by xxxxxx update properties(mp runtime)
  5286. vm._$updateProperties && vm._$updateProperties(vm);
  5287. // update listeners
  5288. listeners = listeners || emptyObject;
  5289. var oldListeners = vm.$options._parentListeners;
  5290. vm.$options._parentListeners = listeners;
  5291. updateComponentListeners(vm, listeners, oldListeners);
  5292. // resolve slots + force update if has children
  5293. if (needsForceUpdate) {
  5294. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  5295. vm.$forceUpdate();
  5296. }
  5297. if (true) {
  5298. isUpdatingChildComponent = false;
  5299. }
  5300. }
  5301. function isInInactiveTree (vm) {
  5302. while (vm && (vm = vm.$parent)) {
  5303. if (vm._inactive) { return true }
  5304. }
  5305. return false
  5306. }
  5307. function activateChildComponent (vm, direct) {
  5308. if (direct) {
  5309. vm._directInactive = false;
  5310. if (isInInactiveTree(vm)) {
  5311. return
  5312. }
  5313. } else if (vm._directInactive) {
  5314. return
  5315. }
  5316. if (vm._inactive || vm._inactive === null) {
  5317. vm._inactive = false;
  5318. for (var i = 0; i < vm.$children.length; i++) {
  5319. activateChildComponent(vm.$children[i]);
  5320. }
  5321. callHook(vm, 'activated');
  5322. }
  5323. }
  5324. function deactivateChildComponent (vm, direct) {
  5325. if (direct) {
  5326. vm._directInactive = true;
  5327. if (isInInactiveTree(vm)) {
  5328. return
  5329. }
  5330. }
  5331. if (!vm._inactive) {
  5332. vm._inactive = true;
  5333. for (var i = 0; i < vm.$children.length; i++) {
  5334. deactivateChildComponent(vm.$children[i]);
  5335. }
  5336. callHook(vm, 'deactivated');
  5337. }
  5338. }
  5339. function callHook (vm, hook) {
  5340. // #7573 disable dep collection when invoking lifecycle hooks
  5341. pushTarget();
  5342. var handlers = vm.$options[hook];
  5343. var info = hook + " hook";
  5344. if (handlers) {
  5345. for (var i = 0, j = handlers.length; i < j; i++) {
  5346. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  5347. }
  5348. }
  5349. if (vm._hasHookEvent) {
  5350. vm.$emit('hook:' + hook);
  5351. }
  5352. popTarget();
  5353. }
  5354. /* */
  5355. var MAX_UPDATE_COUNT = 100;
  5356. var queue = [];
  5357. var activatedChildren = [];
  5358. var has = {};
  5359. var circular = {};
  5360. var waiting = false;
  5361. var flushing = false;
  5362. var index = 0;
  5363. /**
  5364. * Reset the scheduler's state.
  5365. */
  5366. function resetSchedulerState () {
  5367. index = queue.length = activatedChildren.length = 0;
  5368. has = {};
  5369. if (true) {
  5370. circular = {};
  5371. }
  5372. waiting = flushing = false;
  5373. }
  5374. // Async edge case #6566 requires saving the timestamp when event listeners are
  5375. // attached. However, calling performance.now() has a perf overhead especially
  5376. // if the page has thousands of event listeners. Instead, we take a timestamp
  5377. // every time the scheduler flushes and use that for all event listeners
  5378. // attached during that flush.
  5379. var currentFlushTimestamp = 0;
  5380. // Async edge case fix requires storing an event listener's attach timestamp.
  5381. var getNow = Date.now;
  5382. // Determine what event timestamp the browser is using. Annoyingly, the
  5383. // timestamp can either be hi-res (relative to page load) or low-res
  5384. // (relative to UNIX epoch), so in order to compare time we have to use the
  5385. // same timestamp type when saving the flush timestamp.
  5386. // All IE versions use low-res event timestamps, and have problematic clock
  5387. // implementations (#9632)
  5388. if (inBrowser && !isIE) {
  5389. var performance = window.performance;
  5390. if (
  5391. performance &&
  5392. typeof performance.now === 'function' &&
  5393. getNow() > document.createEvent('Event').timeStamp
  5394. ) {
  5395. // if the event timestamp, although evaluated AFTER the Date.now(), is
  5396. // smaller than it, it means the event is using a hi-res timestamp,
  5397. // and we need to use the hi-res version for event listener timestamps as
  5398. // well.
  5399. getNow = function () { return performance.now(); };
  5400. }
  5401. }
  5402. /**
  5403. * Flush both queues and run the watchers.
  5404. */
  5405. function flushSchedulerQueue () {
  5406. currentFlushTimestamp = getNow();
  5407. flushing = true;
  5408. var watcher, id;
  5409. // Sort queue before flush.
  5410. // This ensures that:
  5411. // 1. Components are updated from parent to child. (because parent is always
  5412. // created before the child)
  5413. // 2. A component's user watchers are run before its render watcher (because
  5414. // user watchers are created before the render watcher)
  5415. // 3. If a component is destroyed during a parent component's watcher run,
  5416. // its watchers can be skipped.
  5417. queue.sort(function (a, b) { return a.id - b.id; });
  5418. // do not cache length because more watchers might be pushed
  5419. // as we run existing watchers
  5420. for (index = 0; index < queue.length; index++) {
  5421. watcher = queue[index];
  5422. if (watcher.before) {
  5423. watcher.before();
  5424. }
  5425. id = watcher.id;
  5426. has[id] = null;
  5427. watcher.run();
  5428. // in dev build, check and stop circular updates.
  5429. if ( true && has[id] != null) {
  5430. circular[id] = (circular[id] || 0) + 1;
  5431. if (circular[id] > MAX_UPDATE_COUNT) {
  5432. warn(
  5433. 'You may have an infinite update loop ' + (
  5434. watcher.user
  5435. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  5436. : "in a component render function."
  5437. ),
  5438. watcher.vm
  5439. );
  5440. break
  5441. }
  5442. }
  5443. }
  5444. // keep copies of post queues before resetting state
  5445. var activatedQueue = activatedChildren.slice();
  5446. var updatedQueue = queue.slice();
  5447. resetSchedulerState();
  5448. // call component updated and activated hooks
  5449. callActivatedHooks(activatedQueue);
  5450. callUpdatedHooks(updatedQueue);
  5451. // devtool hook
  5452. /* istanbul ignore if */
  5453. if (devtools && config.devtools) {
  5454. devtools.emit('flush');
  5455. }
  5456. }
  5457. function callUpdatedHooks (queue) {
  5458. var i = queue.length;
  5459. while (i--) {
  5460. var watcher = queue[i];
  5461. var vm = watcher.vm;
  5462. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  5463. callHook(vm, 'updated');
  5464. }
  5465. }
  5466. }
  5467. /**
  5468. * Queue a kept-alive component that was activated during patch.
  5469. * The queue will be processed after the entire tree has been patched.
  5470. */
  5471. function queueActivatedComponent (vm) {
  5472. // setting _inactive to false here so that a render function can
  5473. // rely on checking whether it's in an inactive tree (e.g. router-view)
  5474. vm._inactive = false;
  5475. activatedChildren.push(vm);
  5476. }
  5477. function callActivatedHooks (queue) {
  5478. for (var i = 0; i < queue.length; i++) {
  5479. queue[i]._inactive = true;
  5480. activateChildComponent(queue[i], true /* true */);
  5481. }
  5482. }
  5483. /**
  5484. * Push a watcher into the watcher queue.
  5485. * Jobs with duplicate IDs will be skipped unless it's
  5486. * pushed when the queue is being flushed.
  5487. */
  5488. function queueWatcher (watcher) {
  5489. var id = watcher.id;
  5490. if (has[id] == null) {
  5491. has[id] = true;
  5492. if (!flushing) {
  5493. queue.push(watcher);
  5494. } else {
  5495. // if already flushing, splice the watcher based on its id
  5496. // if already past its id, it will be run next immediately.
  5497. var i = queue.length - 1;
  5498. while (i > index && queue[i].id > watcher.id) {
  5499. i--;
  5500. }
  5501. queue.splice(i + 1, 0, watcher);
  5502. }
  5503. // queue the flush
  5504. if (!waiting) {
  5505. waiting = true;
  5506. if ( true && !config.async) {
  5507. flushSchedulerQueue();
  5508. return
  5509. }
  5510. nextTick(flushSchedulerQueue);
  5511. }
  5512. }
  5513. }
  5514. /* */
  5515. var uid$2 = 0;
  5516. /**
  5517. * A watcher parses an expression, collects dependencies,
  5518. * and fires callback when the expression value changes.
  5519. * This is used for both the $watch() api and directives.
  5520. */
  5521. var Watcher = function Watcher (
  5522. vm,
  5523. expOrFn,
  5524. cb,
  5525. options,
  5526. isRenderWatcher
  5527. ) {
  5528. this.vm = vm;
  5529. if (isRenderWatcher) {
  5530. vm._watcher = this;
  5531. }
  5532. vm._watchers.push(this);
  5533. // options
  5534. if (options) {
  5535. this.deep = !!options.deep;
  5536. this.user = !!options.user;
  5537. this.lazy = !!options.lazy;
  5538. this.sync = !!options.sync;
  5539. this.before = options.before;
  5540. } else {
  5541. this.deep = this.user = this.lazy = this.sync = false;
  5542. }
  5543. this.cb = cb;
  5544. this.id = ++uid$2; // uid for batching
  5545. this.active = true;
  5546. this.dirty = this.lazy; // for lazy watchers
  5547. this.deps = [];
  5548. this.newDeps = [];
  5549. this.depIds = new _Set();
  5550. this.newDepIds = new _Set();
  5551. this.expression = true
  5552. ? expOrFn.toString()
  5553. : undefined;
  5554. // parse expression for getter
  5555. if (typeof expOrFn === 'function') {
  5556. this.getter = expOrFn;
  5557. } else {
  5558. this.getter = parsePath(expOrFn);
  5559. if (!this.getter) {
  5560. this.getter = noop;
  5561. true && warn(
  5562. "Failed watching path: \"" + expOrFn + "\" " +
  5563. 'Watcher only accepts simple dot-delimited paths. ' +
  5564. 'For full control, use a function instead.',
  5565. vm
  5566. );
  5567. }
  5568. }
  5569. this.value = this.lazy
  5570. ? undefined
  5571. : this.get();
  5572. };
  5573. /**
  5574. * Evaluate the getter, and re-collect dependencies.
  5575. */
  5576. Watcher.prototype.get = function get () {
  5577. pushTarget(this);
  5578. var value;
  5579. var vm = this.vm;
  5580. try {
  5581. value = this.getter.call(vm, vm);
  5582. } catch (e) {
  5583. if (this.user) {
  5584. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  5585. } else {
  5586. throw e
  5587. }
  5588. } finally {
  5589. // "touch" every property so they are all tracked as
  5590. // dependencies for deep watching
  5591. if (this.deep) {
  5592. traverse(value);
  5593. }
  5594. popTarget();
  5595. this.cleanupDeps();
  5596. }
  5597. return value
  5598. };
  5599. /**
  5600. * Add a dependency to this directive.
  5601. */
  5602. Watcher.prototype.addDep = function addDep (dep) {
  5603. var id = dep.id;
  5604. if (!this.newDepIds.has(id)) {
  5605. this.newDepIds.add(id);
  5606. this.newDeps.push(dep);
  5607. if (!this.depIds.has(id)) {
  5608. dep.addSub(this);
  5609. }
  5610. }
  5611. };
  5612. /**
  5613. * Clean up for dependency collection.
  5614. */
  5615. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  5616. var i = this.deps.length;
  5617. while (i--) {
  5618. var dep = this.deps[i];
  5619. if (!this.newDepIds.has(dep.id)) {
  5620. dep.removeSub(this);
  5621. }
  5622. }
  5623. var tmp = this.depIds;
  5624. this.depIds = this.newDepIds;
  5625. this.newDepIds = tmp;
  5626. this.newDepIds.clear();
  5627. tmp = this.deps;
  5628. this.deps = this.newDeps;
  5629. this.newDeps = tmp;
  5630. this.newDeps.length = 0;
  5631. };
  5632. /**
  5633. * Subscriber interface.
  5634. * Will be called when a dependency changes.
  5635. */
  5636. Watcher.prototype.update = function update () {
  5637. /* istanbul ignore else */
  5638. if (this.lazy) {
  5639. this.dirty = true;
  5640. } else if (this.sync) {
  5641. this.run();
  5642. } else {
  5643. queueWatcher(this);
  5644. }
  5645. };
  5646. /**
  5647. * Scheduler job interface.
  5648. * Will be called by the scheduler.
  5649. */
  5650. Watcher.prototype.run = function run () {
  5651. if (this.active) {
  5652. var value = this.get();
  5653. if (
  5654. value !== this.value ||
  5655. // Deep watchers and watchers on Object/Arrays should fire even
  5656. // when the value is the same, because the value may
  5657. // have mutated.
  5658. isObject(value) ||
  5659. this.deep
  5660. ) {
  5661. // set new value
  5662. var oldValue = this.value;
  5663. this.value = value;
  5664. if (this.user) {
  5665. try {
  5666. this.cb.call(this.vm, value, oldValue);
  5667. } catch (e) {
  5668. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  5669. }
  5670. } else {
  5671. this.cb.call(this.vm, value, oldValue);
  5672. }
  5673. }
  5674. }
  5675. };
  5676. /**
  5677. * Evaluate the value of the watcher.
  5678. * This only gets called for lazy watchers.
  5679. */
  5680. Watcher.prototype.evaluate = function evaluate () {
  5681. this.value = this.get();
  5682. this.dirty = false;
  5683. };
  5684. /**
  5685. * Depend on all deps collected by this watcher.
  5686. */
  5687. Watcher.prototype.depend = function depend () {
  5688. var i = this.deps.length;
  5689. while (i--) {
  5690. this.deps[i].depend();
  5691. }
  5692. };
  5693. /**
  5694. * Remove self from all dependencies' subscriber list.
  5695. */
  5696. Watcher.prototype.teardown = function teardown () {
  5697. if (this.active) {
  5698. // remove self from vm's watcher list
  5699. // this is a somewhat expensive operation so we skip it
  5700. // if the vm is being destroyed.
  5701. if (!this.vm._isBeingDestroyed) {
  5702. remove(this.vm._watchers, this);
  5703. }
  5704. var i = this.deps.length;
  5705. while (i--) {
  5706. this.deps[i].removeSub(this);
  5707. }
  5708. this.active = false;
  5709. }
  5710. };
  5711. /* */
  5712. var sharedPropertyDefinition = {
  5713. enumerable: true,
  5714. configurable: true,
  5715. get: noop,
  5716. set: noop
  5717. };
  5718. function proxy (target, sourceKey, key) {
  5719. sharedPropertyDefinition.get = function proxyGetter () {
  5720. return this[sourceKey][key]
  5721. };
  5722. sharedPropertyDefinition.set = function proxySetter (val) {
  5723. this[sourceKey][key] = val;
  5724. };
  5725. Object.defineProperty(target, key, sharedPropertyDefinition);
  5726. }
  5727. function initState (vm) {
  5728. vm._watchers = [];
  5729. var opts = vm.$options;
  5730. if (opts.props) { initProps(vm, opts.props); }
  5731. if (opts.methods) { initMethods(vm, opts.methods); }
  5732. if (opts.data) {
  5733. initData(vm);
  5734. } else {
  5735. observe(vm._data = {}, true /* asRootData */);
  5736. }
  5737. if (opts.computed) { initComputed(vm, opts.computed); }
  5738. if (opts.watch && opts.watch !== nativeWatch) {
  5739. initWatch(vm, opts.watch);
  5740. }
  5741. }
  5742. function initProps (vm, propsOptions) {
  5743. var propsData = vm.$options.propsData || {};
  5744. var props = vm._props = {};
  5745. // cache prop keys so that future props updates can iterate using Array
  5746. // instead of dynamic object key enumeration.
  5747. var keys = vm.$options._propKeys = [];
  5748. var isRoot = !vm.$parent;
  5749. // root instance props should be converted
  5750. if (!isRoot) {
  5751. toggleObserving(false);
  5752. }
  5753. var loop = function ( key ) {
  5754. keys.push(key);
  5755. var value = validateProp(key, propsOptions, propsData, vm);
  5756. /* istanbul ignore else */
  5757. if (true) {
  5758. var hyphenatedKey = hyphenate(key);
  5759. if (isReservedAttribute(hyphenatedKey) ||
  5760. config.isReservedAttr(hyphenatedKey)) {
  5761. warn(
  5762. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  5763. vm
  5764. );
  5765. }
  5766. defineReactive$$1(props, key, value, function () {
  5767. if (!isRoot && !isUpdatingChildComponent) {
  5768. {
  5769. if(vm.mpHost === 'mp-baidu'){//百度 observer 在 setData callback 之后触发,直接忽略该 warn
  5770. return
  5771. }
  5772. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  5773. if(
  5774. key === 'value' &&
  5775. Array.isArray(vm.$options.behaviors) &&
  5776. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  5777. ){
  5778. return
  5779. }
  5780. if(vm._getFormData){
  5781. return
  5782. }
  5783. var $parent = vm.$parent;
  5784. while($parent){
  5785. if($parent.__next_tick_pending){
  5786. return
  5787. }
  5788. $parent = $parent.$parent;
  5789. }
  5790. }
  5791. warn(
  5792. "Avoid mutating a prop directly since the value will be " +
  5793. "overwritten whenever the parent component re-renders. " +
  5794. "Instead, use a data or computed property based on the prop's " +
  5795. "value. Prop being mutated: \"" + key + "\"",
  5796. vm
  5797. );
  5798. }
  5799. });
  5800. } else {}
  5801. // static props are already proxied on the component's prototype
  5802. // during Vue.extend(). We only need to proxy props defined at
  5803. // instantiation here.
  5804. if (!(key in vm)) {
  5805. proxy(vm, "_props", key);
  5806. }
  5807. };
  5808. for (var key in propsOptions) loop( key );
  5809. toggleObserving(true);
  5810. }
  5811. function initData (vm) {
  5812. var data = vm.$options.data;
  5813. data = vm._data = typeof data === 'function'
  5814. ? getData(data, vm)
  5815. : data || {};
  5816. if (!isPlainObject(data)) {
  5817. data = {};
  5818. true && warn(
  5819. 'data functions should return an object:\n' +
  5820. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  5821. vm
  5822. );
  5823. }
  5824. // proxy data on instance
  5825. var keys = Object.keys(data);
  5826. var props = vm.$options.props;
  5827. var methods = vm.$options.methods;
  5828. var i = keys.length;
  5829. while (i--) {
  5830. var key = keys[i];
  5831. if (true) {
  5832. if (methods && hasOwn(methods, key)) {
  5833. warn(
  5834. ("Method \"" + key + "\" has already been defined as a data property."),
  5835. vm
  5836. );
  5837. }
  5838. }
  5839. if (props && hasOwn(props, key)) {
  5840. true && warn(
  5841. "The data property \"" + key + "\" is already declared as a prop. " +
  5842. "Use prop default value instead.",
  5843. vm
  5844. );
  5845. } else if (!isReserved(key)) {
  5846. proxy(vm, "_data", key);
  5847. }
  5848. }
  5849. // observe data
  5850. observe(data, true /* asRootData */);
  5851. }
  5852. function getData (data, vm) {
  5853. // #7573 disable dep collection when invoking data getters
  5854. pushTarget();
  5855. try {
  5856. return data.call(vm, vm)
  5857. } catch (e) {
  5858. handleError(e, vm, "data()");
  5859. return {}
  5860. } finally {
  5861. popTarget();
  5862. }
  5863. }
  5864. var computedWatcherOptions = { lazy: true };
  5865. function initComputed (vm, computed) {
  5866. // $flow-disable-line
  5867. var watchers = vm._computedWatchers = Object.create(null);
  5868. // computed properties are just getters during SSR
  5869. var isSSR = isServerRendering();
  5870. for (var key in computed) {
  5871. var userDef = computed[key];
  5872. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  5873. if ( true && getter == null) {
  5874. warn(
  5875. ("Getter is missing for computed property \"" + key + "\"."),
  5876. vm
  5877. );
  5878. }
  5879. if (!isSSR) {
  5880. // create internal watcher for the computed property.
  5881. watchers[key] = new Watcher(
  5882. vm,
  5883. getter || noop,
  5884. noop,
  5885. computedWatcherOptions
  5886. );
  5887. }
  5888. // component-defined computed properties are already defined on the
  5889. // component prototype. We only need to define computed properties defined
  5890. // at instantiation here.
  5891. if (!(key in vm)) {
  5892. defineComputed(vm, key, userDef);
  5893. } else if (true) {
  5894. if (key in vm.$data) {
  5895. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  5896. } else if (vm.$options.props && key in vm.$options.props) {
  5897. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  5898. }
  5899. }
  5900. }
  5901. }
  5902. function defineComputed (
  5903. target,
  5904. key,
  5905. userDef
  5906. ) {
  5907. var shouldCache = !isServerRendering();
  5908. if (typeof userDef === 'function') {
  5909. sharedPropertyDefinition.get = shouldCache
  5910. ? createComputedGetter(key)
  5911. : createGetterInvoker(userDef);
  5912. sharedPropertyDefinition.set = noop;
  5913. } else {
  5914. sharedPropertyDefinition.get = userDef.get
  5915. ? shouldCache && userDef.cache !== false
  5916. ? createComputedGetter(key)
  5917. : createGetterInvoker(userDef.get)
  5918. : noop;
  5919. sharedPropertyDefinition.set = userDef.set || noop;
  5920. }
  5921. if ( true &&
  5922. sharedPropertyDefinition.set === noop) {
  5923. sharedPropertyDefinition.set = function () {
  5924. warn(
  5925. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  5926. this
  5927. );
  5928. };
  5929. }
  5930. Object.defineProperty(target, key, sharedPropertyDefinition);
  5931. }
  5932. function createComputedGetter (key) {
  5933. return function computedGetter () {
  5934. var watcher = this._computedWatchers && this._computedWatchers[key];
  5935. if (watcher) {
  5936. if (watcher.dirty) {
  5937. watcher.evaluate();
  5938. }
  5939. if (Dep.SharedObject.target) {// fixed by xxxxxx
  5940. watcher.depend();
  5941. }
  5942. return watcher.value
  5943. }
  5944. }
  5945. }
  5946. function createGetterInvoker(fn) {
  5947. return function computedGetter () {
  5948. return fn.call(this, this)
  5949. }
  5950. }
  5951. function initMethods (vm, methods) {
  5952. var props = vm.$options.props;
  5953. for (var key in methods) {
  5954. if (true) {
  5955. if (typeof methods[key] !== 'function') {
  5956. warn(
  5957. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  5958. "Did you reference the function correctly?",
  5959. vm
  5960. );
  5961. }
  5962. if (props && hasOwn(props, key)) {
  5963. warn(
  5964. ("Method \"" + key + "\" has already been defined as a prop."),
  5965. vm
  5966. );
  5967. }
  5968. if ((key in vm) && isReserved(key)) {
  5969. warn(
  5970. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  5971. "Avoid defining component methods that start with _ or $."
  5972. );
  5973. }
  5974. }
  5975. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  5976. }
  5977. }
  5978. function initWatch (vm, watch) {
  5979. for (var key in watch) {
  5980. var handler = watch[key];
  5981. if (Array.isArray(handler)) {
  5982. for (var i = 0; i < handler.length; i++) {
  5983. createWatcher(vm, key, handler[i]);
  5984. }
  5985. } else {
  5986. createWatcher(vm, key, handler);
  5987. }
  5988. }
  5989. }
  5990. function createWatcher (
  5991. vm,
  5992. expOrFn,
  5993. handler,
  5994. options
  5995. ) {
  5996. if (isPlainObject(handler)) {
  5997. options = handler;
  5998. handler = handler.handler;
  5999. }
  6000. if (typeof handler === 'string') {
  6001. handler = vm[handler];
  6002. }
  6003. return vm.$watch(expOrFn, handler, options)
  6004. }
  6005. function stateMixin (Vue) {
  6006. // flow somehow has problems with directly declared definition object
  6007. // when using Object.defineProperty, so we have to procedurally build up
  6008. // the object here.
  6009. var dataDef = {};
  6010. dataDef.get = function () { return this._data };
  6011. var propsDef = {};
  6012. propsDef.get = function () { return this._props };
  6013. if (true) {
  6014. dataDef.set = function () {
  6015. warn(
  6016. 'Avoid replacing instance root $data. ' +
  6017. 'Use nested data properties instead.',
  6018. this
  6019. );
  6020. };
  6021. propsDef.set = function () {
  6022. warn("$props is readonly.", this);
  6023. };
  6024. }
  6025. Object.defineProperty(Vue.prototype, '$data', dataDef);
  6026. Object.defineProperty(Vue.prototype, '$props', propsDef);
  6027. Vue.prototype.$set = set;
  6028. Vue.prototype.$delete = del;
  6029. Vue.prototype.$watch = function (
  6030. expOrFn,
  6031. cb,
  6032. options
  6033. ) {
  6034. var vm = this;
  6035. if (isPlainObject(cb)) {
  6036. return createWatcher(vm, expOrFn, cb, options)
  6037. }
  6038. options = options || {};
  6039. options.user = true;
  6040. var watcher = new Watcher(vm, expOrFn, cb, options);
  6041. if (options.immediate) {
  6042. try {
  6043. cb.call(vm, watcher.value);
  6044. } catch (error) {
  6045. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  6046. }
  6047. }
  6048. return function unwatchFn () {
  6049. watcher.teardown();
  6050. }
  6051. };
  6052. }
  6053. /* */
  6054. var uid$3 = 0;
  6055. function initMixin (Vue) {
  6056. Vue.prototype._init = function (options) {
  6057. var vm = this;
  6058. // a uid
  6059. vm._uid = uid$3++;
  6060. var startTag, endTag;
  6061. /* istanbul ignore if */
  6062. if ( true && config.performance && mark) {
  6063. startTag = "vue-perf-start:" + (vm._uid);
  6064. endTag = "vue-perf-end:" + (vm._uid);
  6065. mark(startTag);
  6066. }
  6067. // a flag to avoid this being observed
  6068. vm._isVue = true;
  6069. // merge options
  6070. if (options && options._isComponent) {
  6071. // optimize internal component instantiation
  6072. // since dynamic options merging is pretty slow, and none of the
  6073. // internal component options needs special treatment.
  6074. initInternalComponent(vm, options);
  6075. } else {
  6076. vm.$options = mergeOptions(
  6077. resolveConstructorOptions(vm.constructor),
  6078. options || {},
  6079. vm
  6080. );
  6081. }
  6082. /* istanbul ignore else */
  6083. if (true) {
  6084. initProxy(vm);
  6085. } else {}
  6086. // expose real self
  6087. vm._self = vm;
  6088. initLifecycle(vm);
  6089. initEvents(vm);
  6090. initRender(vm);
  6091. callHook(vm, 'beforeCreate');
  6092. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  6093. initState(vm);
  6094. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  6095. !vm._$fallback && callHook(vm, 'created');
  6096. /* istanbul ignore if */
  6097. if ( true && config.performance && mark) {
  6098. vm._name = formatComponentName(vm, false);
  6099. mark(endTag);
  6100. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  6101. }
  6102. if (vm.$options.el) {
  6103. vm.$mount(vm.$options.el);
  6104. }
  6105. };
  6106. }
  6107. function initInternalComponent (vm, options) {
  6108. var opts = vm.$options = Object.create(vm.constructor.options);
  6109. // doing this because it's faster than dynamic enumeration.
  6110. var parentVnode = options._parentVnode;
  6111. opts.parent = options.parent;
  6112. opts._parentVnode = parentVnode;
  6113. var vnodeComponentOptions = parentVnode.componentOptions;
  6114. opts.propsData = vnodeComponentOptions.propsData;
  6115. opts._parentListeners = vnodeComponentOptions.listeners;
  6116. opts._renderChildren = vnodeComponentOptions.children;
  6117. opts._componentTag = vnodeComponentOptions.tag;
  6118. if (options.render) {
  6119. opts.render = options.render;
  6120. opts.staticRenderFns = options.staticRenderFns;
  6121. }
  6122. }
  6123. function resolveConstructorOptions (Ctor) {
  6124. var options = Ctor.options;
  6125. if (Ctor.super) {
  6126. var superOptions = resolveConstructorOptions(Ctor.super);
  6127. var cachedSuperOptions = Ctor.superOptions;
  6128. if (superOptions !== cachedSuperOptions) {
  6129. // super option changed,
  6130. // need to resolve new options.
  6131. Ctor.superOptions = superOptions;
  6132. // check if there are any late-modified/attached options (#4976)
  6133. var modifiedOptions = resolveModifiedOptions(Ctor);
  6134. // update base extend options
  6135. if (modifiedOptions) {
  6136. extend(Ctor.extendOptions, modifiedOptions);
  6137. }
  6138. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  6139. if (options.name) {
  6140. options.components[options.name] = Ctor;
  6141. }
  6142. }
  6143. }
  6144. return options
  6145. }
  6146. function resolveModifiedOptions (Ctor) {
  6147. var modified;
  6148. var latest = Ctor.options;
  6149. var sealed = Ctor.sealedOptions;
  6150. for (var key in latest) {
  6151. if (latest[key] !== sealed[key]) {
  6152. if (!modified) { modified = {}; }
  6153. modified[key] = latest[key];
  6154. }
  6155. }
  6156. return modified
  6157. }
  6158. function Vue (options) {
  6159. if ( true &&
  6160. !(this instanceof Vue)
  6161. ) {
  6162. warn('Vue is a constructor and should be called with the `new` keyword');
  6163. }
  6164. this._init(options);
  6165. }
  6166. initMixin(Vue);
  6167. stateMixin(Vue);
  6168. eventsMixin(Vue);
  6169. lifecycleMixin(Vue);
  6170. renderMixin(Vue);
  6171. /* */
  6172. function initUse (Vue) {
  6173. Vue.use = function (plugin) {
  6174. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  6175. if (installedPlugins.indexOf(plugin) > -1) {
  6176. return this
  6177. }
  6178. // additional parameters
  6179. var args = toArray(arguments, 1);
  6180. args.unshift(this);
  6181. if (typeof plugin.install === 'function') {
  6182. plugin.install.apply(plugin, args);
  6183. } else if (typeof plugin === 'function') {
  6184. plugin.apply(null, args);
  6185. }
  6186. installedPlugins.push(plugin);
  6187. return this
  6188. };
  6189. }
  6190. /* */
  6191. function initMixin$1 (Vue) {
  6192. Vue.mixin = function (mixin) {
  6193. this.options = mergeOptions(this.options, mixin);
  6194. return this
  6195. };
  6196. }
  6197. /* */
  6198. function initExtend (Vue) {
  6199. /**
  6200. * Each instance constructor, including Vue, has a unique
  6201. * cid. This enables us to create wrapped "child
  6202. * constructors" for prototypal inheritance and cache them.
  6203. */
  6204. Vue.cid = 0;
  6205. var cid = 1;
  6206. /**
  6207. * Class inheritance
  6208. */
  6209. Vue.extend = function (extendOptions) {
  6210. extendOptions = extendOptions || {};
  6211. var Super = this;
  6212. var SuperId = Super.cid;
  6213. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  6214. if (cachedCtors[SuperId]) {
  6215. return cachedCtors[SuperId]
  6216. }
  6217. var name = extendOptions.name || Super.options.name;
  6218. if ( true && name) {
  6219. validateComponentName(name);
  6220. }
  6221. var Sub = function VueComponent (options) {
  6222. this._init(options);
  6223. };
  6224. Sub.prototype = Object.create(Super.prototype);
  6225. Sub.prototype.constructor = Sub;
  6226. Sub.cid = cid++;
  6227. Sub.options = mergeOptions(
  6228. Super.options,
  6229. extendOptions
  6230. );
  6231. Sub['super'] = Super;
  6232. // For props and computed properties, we define the proxy getters on
  6233. // the Vue instances at extension time, on the extended prototype. This
  6234. // avoids Object.defineProperty calls for each instance created.
  6235. if (Sub.options.props) {
  6236. initProps$1(Sub);
  6237. }
  6238. if (Sub.options.computed) {
  6239. initComputed$1(Sub);
  6240. }
  6241. // allow further extension/mixin/plugin usage
  6242. Sub.extend = Super.extend;
  6243. Sub.mixin = Super.mixin;
  6244. Sub.use = Super.use;
  6245. // create asset registers, so extended classes
  6246. // can have their private assets too.
  6247. ASSET_TYPES.forEach(function (type) {
  6248. Sub[type] = Super[type];
  6249. });
  6250. // enable recursive self-lookup
  6251. if (name) {
  6252. Sub.options.components[name] = Sub;
  6253. }
  6254. // keep a reference to the super options at extension time.
  6255. // later at instantiation we can check if Super's options have
  6256. // been updated.
  6257. Sub.superOptions = Super.options;
  6258. Sub.extendOptions = extendOptions;
  6259. Sub.sealedOptions = extend({}, Sub.options);
  6260. // cache constructor
  6261. cachedCtors[SuperId] = Sub;
  6262. return Sub
  6263. };
  6264. }
  6265. function initProps$1 (Comp) {
  6266. var props = Comp.options.props;
  6267. for (var key in props) {
  6268. proxy(Comp.prototype, "_props", key);
  6269. }
  6270. }
  6271. function initComputed$1 (Comp) {
  6272. var computed = Comp.options.computed;
  6273. for (var key in computed) {
  6274. defineComputed(Comp.prototype, key, computed[key]);
  6275. }
  6276. }
  6277. /* */
  6278. function initAssetRegisters (Vue) {
  6279. /**
  6280. * Create asset registration methods.
  6281. */
  6282. ASSET_TYPES.forEach(function (type) {
  6283. Vue[type] = function (
  6284. id,
  6285. definition
  6286. ) {
  6287. if (!definition) {
  6288. return this.options[type + 's'][id]
  6289. } else {
  6290. /* istanbul ignore if */
  6291. if ( true && type === 'component') {
  6292. validateComponentName(id);
  6293. }
  6294. if (type === 'component' && isPlainObject(definition)) {
  6295. definition.name = definition.name || id;
  6296. definition = this.options._base.extend(definition);
  6297. }
  6298. if (type === 'directive' && typeof definition === 'function') {
  6299. definition = { bind: definition, update: definition };
  6300. }
  6301. this.options[type + 's'][id] = definition;
  6302. return definition
  6303. }
  6304. };
  6305. });
  6306. }
  6307. /* */
  6308. function getComponentName (opts) {
  6309. return opts && (opts.Ctor.options.name || opts.tag)
  6310. }
  6311. function matches (pattern, name) {
  6312. if (Array.isArray(pattern)) {
  6313. return pattern.indexOf(name) > -1
  6314. } else if (typeof pattern === 'string') {
  6315. return pattern.split(',').indexOf(name) > -1
  6316. } else if (isRegExp(pattern)) {
  6317. return pattern.test(name)
  6318. }
  6319. /* istanbul ignore next */
  6320. return false
  6321. }
  6322. function pruneCache (keepAliveInstance, filter) {
  6323. var cache = keepAliveInstance.cache;
  6324. var keys = keepAliveInstance.keys;
  6325. var _vnode = keepAliveInstance._vnode;
  6326. for (var key in cache) {
  6327. var cachedNode = cache[key];
  6328. if (cachedNode) {
  6329. var name = getComponentName(cachedNode.componentOptions);
  6330. if (name && !filter(name)) {
  6331. pruneCacheEntry(cache, key, keys, _vnode);
  6332. }
  6333. }
  6334. }
  6335. }
  6336. function pruneCacheEntry (
  6337. cache,
  6338. key,
  6339. keys,
  6340. current
  6341. ) {
  6342. var cached$$1 = cache[key];
  6343. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  6344. cached$$1.componentInstance.$destroy();
  6345. }
  6346. cache[key] = null;
  6347. remove(keys, key);
  6348. }
  6349. var patternTypes = [String, RegExp, Array];
  6350. var KeepAlive = {
  6351. name: 'keep-alive',
  6352. abstract: true,
  6353. props: {
  6354. include: patternTypes,
  6355. exclude: patternTypes,
  6356. max: [String, Number]
  6357. },
  6358. created: function created () {
  6359. this.cache = Object.create(null);
  6360. this.keys = [];
  6361. },
  6362. destroyed: function destroyed () {
  6363. for (var key in this.cache) {
  6364. pruneCacheEntry(this.cache, key, this.keys);
  6365. }
  6366. },
  6367. mounted: function mounted () {
  6368. var this$1 = this;
  6369. this.$watch('include', function (val) {
  6370. pruneCache(this$1, function (name) { return matches(val, name); });
  6371. });
  6372. this.$watch('exclude', function (val) {
  6373. pruneCache(this$1, function (name) { return !matches(val, name); });
  6374. });
  6375. },
  6376. render: function render () {
  6377. var slot = this.$slots.default;
  6378. var vnode = getFirstComponentChild(slot);
  6379. var componentOptions = vnode && vnode.componentOptions;
  6380. if (componentOptions) {
  6381. // check pattern
  6382. var name = getComponentName(componentOptions);
  6383. var ref = this;
  6384. var include = ref.include;
  6385. var exclude = ref.exclude;
  6386. if (
  6387. // not included
  6388. (include && (!name || !matches(include, name))) ||
  6389. // excluded
  6390. (exclude && name && matches(exclude, name))
  6391. ) {
  6392. return vnode
  6393. }
  6394. var ref$1 = this;
  6395. var cache = ref$1.cache;
  6396. var keys = ref$1.keys;
  6397. var key = vnode.key == null
  6398. // same constructor may get registered as different local components
  6399. // so cid alone is not enough (#3269)
  6400. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  6401. : vnode.key;
  6402. if (cache[key]) {
  6403. vnode.componentInstance = cache[key].componentInstance;
  6404. // make current key freshest
  6405. remove(keys, key);
  6406. keys.push(key);
  6407. } else {
  6408. cache[key] = vnode;
  6409. keys.push(key);
  6410. // prune oldest entry
  6411. if (this.max && keys.length > parseInt(this.max)) {
  6412. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  6413. }
  6414. }
  6415. vnode.data.keepAlive = true;
  6416. }
  6417. return vnode || (slot && slot[0])
  6418. }
  6419. };
  6420. var builtInComponents = {
  6421. KeepAlive: KeepAlive
  6422. };
  6423. /* */
  6424. function initGlobalAPI (Vue) {
  6425. // config
  6426. var configDef = {};
  6427. configDef.get = function () { return config; };
  6428. if (true) {
  6429. configDef.set = function () {
  6430. warn(
  6431. 'Do not replace the Vue.config object, set individual fields instead.'
  6432. );
  6433. };
  6434. }
  6435. Object.defineProperty(Vue, 'config', configDef);
  6436. // exposed util methods.
  6437. // NOTE: these are not considered part of the public API - avoid relying on
  6438. // them unless you are aware of the risk.
  6439. Vue.util = {
  6440. warn: warn,
  6441. extend: extend,
  6442. mergeOptions: mergeOptions,
  6443. defineReactive: defineReactive$$1
  6444. };
  6445. Vue.set = set;
  6446. Vue.delete = del;
  6447. Vue.nextTick = nextTick;
  6448. // 2.6 explicit observable API
  6449. Vue.observable = function (obj) {
  6450. observe(obj);
  6451. return obj
  6452. };
  6453. Vue.options = Object.create(null);
  6454. ASSET_TYPES.forEach(function (type) {
  6455. Vue.options[type + 's'] = Object.create(null);
  6456. });
  6457. // this is used to identify the "base" constructor to extend all plain-object
  6458. // components with in Weex's multi-instance scenarios.
  6459. Vue.options._base = Vue;
  6460. extend(Vue.options.components, builtInComponents);
  6461. initUse(Vue);
  6462. initMixin$1(Vue);
  6463. initExtend(Vue);
  6464. initAssetRegisters(Vue);
  6465. }
  6466. initGlobalAPI(Vue);
  6467. Object.defineProperty(Vue.prototype, '$isServer', {
  6468. get: isServerRendering
  6469. });
  6470. Object.defineProperty(Vue.prototype, '$ssrContext', {
  6471. get: function get () {
  6472. /* istanbul ignore next */
  6473. return this.$vnode && this.$vnode.ssrContext
  6474. }
  6475. });
  6476. // expose FunctionalRenderContext for ssr runtime helper installation
  6477. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  6478. value: FunctionalRenderContext
  6479. });
  6480. Vue.version = '2.6.11';
  6481. /**
  6482. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  6483. */
  6484. var ARRAYTYPE = '[object Array]';
  6485. var OBJECTTYPE = '[object Object]';
  6486. // const FUNCTIONTYPE = '[object Function]'
  6487. function diff(current, pre) {
  6488. var result = {};
  6489. syncKeys(current, pre);
  6490. _diff(current, pre, '', result);
  6491. return result
  6492. }
  6493. function syncKeys(current, pre) {
  6494. if (current === pre) { return }
  6495. var rootCurrentType = type(current);
  6496. var rootPreType = type(pre);
  6497. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  6498. if(Object.keys(current).length >= Object.keys(pre).length){
  6499. for (var key in pre) {
  6500. var currentValue = current[key];
  6501. if (currentValue === undefined) {
  6502. current[key] = null;
  6503. } else {
  6504. syncKeys(currentValue, pre[key]);
  6505. }
  6506. }
  6507. }
  6508. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  6509. if (current.length >= pre.length) {
  6510. pre.forEach(function (item, index) {
  6511. syncKeys(current[index], item);
  6512. });
  6513. }
  6514. }
  6515. }
  6516. function _diff(current, pre, path, result) {
  6517. if (current === pre) { return }
  6518. var rootCurrentType = type(current);
  6519. var rootPreType = type(pre);
  6520. if (rootCurrentType == OBJECTTYPE) {
  6521. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  6522. setResult(result, path, current);
  6523. } else {
  6524. var loop = function ( key ) {
  6525. var currentValue = current[key];
  6526. var preValue = pre[key];
  6527. var currentType = type(currentValue);
  6528. var preType = type(preValue);
  6529. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  6530. if (currentValue != pre[key]) {
  6531. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  6532. }
  6533. } else if (currentType == ARRAYTYPE) {
  6534. if (preType != ARRAYTYPE) {
  6535. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  6536. } else {
  6537. if (currentValue.length < preValue.length) {
  6538. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  6539. } else {
  6540. currentValue.forEach(function (item, index) {
  6541. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  6542. });
  6543. }
  6544. }
  6545. } else if (currentType == OBJECTTYPE) {
  6546. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  6547. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  6548. } else {
  6549. for (var subKey in currentValue) {
  6550. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  6551. }
  6552. }
  6553. }
  6554. };
  6555. for (var key in current) loop( key );
  6556. }
  6557. } else if (rootCurrentType == ARRAYTYPE) {
  6558. if (rootPreType != ARRAYTYPE) {
  6559. setResult(result, path, current);
  6560. } else {
  6561. if (current.length < pre.length) {
  6562. setResult(result, path, current);
  6563. } else {
  6564. current.forEach(function (item, index) {
  6565. _diff(item, pre[index], path + '[' + index + ']', result);
  6566. });
  6567. }
  6568. }
  6569. } else {
  6570. setResult(result, path, current);
  6571. }
  6572. }
  6573. function setResult(result, k, v) {
  6574. // if (type(v) != FUNCTIONTYPE) {
  6575. result[k] = v;
  6576. // }
  6577. }
  6578. function type(obj) {
  6579. return Object.prototype.toString.call(obj)
  6580. }
  6581. /* */
  6582. function flushCallbacks$1(vm) {
  6583. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  6584. if (Object({"NODE_ENV":"development","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  6585. var mpInstance = vm.$scope;
  6586. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  6587. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  6588. }
  6589. var copies = vm.__next_tick_callbacks.slice(0);
  6590. vm.__next_tick_callbacks.length = 0;
  6591. for (var i = 0; i < copies.length; i++) {
  6592. copies[i]();
  6593. }
  6594. }
  6595. }
  6596. function hasRenderWatcher(vm) {
  6597. return queue.find(function (watcher) { return vm._watcher === watcher; })
  6598. }
  6599. function nextTick$1(vm, cb) {
  6600. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  6601. //2.nextTick 之前存在 render watcher
  6602. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  6603. if(Object({"NODE_ENV":"development","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  6604. var mpInstance = vm.$scope;
  6605. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  6606. ']:nextVueTick');
  6607. }
  6608. return nextTick(cb, vm)
  6609. }else{
  6610. if(Object({"NODE_ENV":"development","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  6611. var mpInstance$1 = vm.$scope;
  6612. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  6613. ']:nextMPTick');
  6614. }
  6615. }
  6616. var _resolve;
  6617. if (!vm.__next_tick_callbacks) {
  6618. vm.__next_tick_callbacks = [];
  6619. }
  6620. vm.__next_tick_callbacks.push(function () {
  6621. if (cb) {
  6622. try {
  6623. cb.call(vm);
  6624. } catch (e) {
  6625. handleError(e, vm, 'nextTick');
  6626. }
  6627. } else if (_resolve) {
  6628. _resolve(vm);
  6629. }
  6630. });
  6631. // $flow-disable-line
  6632. if (!cb && typeof Promise !== 'undefined') {
  6633. return new Promise(function (resolve) {
  6634. _resolve = resolve;
  6635. })
  6636. }
  6637. }
  6638. /* */
  6639. function cloneWithData(vm) {
  6640. // 确保当前 vm 所有数据被同步
  6641. var ret = Object.create(null);
  6642. var dataKeys = [].concat(
  6643. Object.keys(vm._data || {}),
  6644. Object.keys(vm._computedWatchers || {}));
  6645. dataKeys.reduce(function(ret, key) {
  6646. ret[key] = vm[key];
  6647. return ret
  6648. }, ret);
  6649. // vue-composition-api
  6650. var rawBindings = vm.__secret_vfa_state__ && vm.__secret_vfa_state__.rawBindings;
  6651. if (rawBindings) {
  6652. Object.keys(rawBindings).forEach(function (key) {
  6653. ret[key] = vm[key];
  6654. });
  6655. }
  6656. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  6657. Object.assign(ret, vm.$mp.data || {});
  6658. if (
  6659. Array.isArray(vm.$options.behaviors) &&
  6660. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  6661. ) { //form-field
  6662. ret['name'] = vm.name;
  6663. ret['value'] = vm.value;
  6664. }
  6665. return JSON.parse(JSON.stringify(ret))
  6666. }
  6667. var patch = function(oldVnode, vnode) {
  6668. var this$1 = this;
  6669. if (vnode === null) { //destroy
  6670. return
  6671. }
  6672. if (this.mpType === 'page' || this.mpType === 'component') {
  6673. var mpInstance = this.$scope;
  6674. var data = Object.create(null);
  6675. try {
  6676. data = cloneWithData(this);
  6677. } catch (err) {
  6678. console.error(err);
  6679. }
  6680. data.__webviewId__ = mpInstance.data.__webviewId__;
  6681. var mpData = Object.create(null);
  6682. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  6683. mpData[key] = mpInstance.data[key];
  6684. });
  6685. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  6686. if (Object.keys(diffData).length) {
  6687. if (Object({"NODE_ENV":"development","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  6688. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  6689. ']差量更新',
  6690. JSON.stringify(diffData));
  6691. }
  6692. this.__next_tick_pending = true;
  6693. mpInstance.setData(diffData, function () {
  6694. this$1.__next_tick_pending = false;
  6695. flushCallbacks$1(this$1);
  6696. });
  6697. } else {
  6698. flushCallbacks$1(this);
  6699. }
  6700. }
  6701. };
  6702. /* */
  6703. function createEmptyRender() {
  6704. }
  6705. function mountComponent$1(
  6706. vm,
  6707. el,
  6708. hydrating
  6709. ) {
  6710. if (!vm.mpType) {//main.js 中的 new Vue
  6711. return vm
  6712. }
  6713. if (vm.mpType === 'app') {
  6714. vm.$options.render = createEmptyRender;
  6715. }
  6716. if (!vm.$options.render) {
  6717. vm.$options.render = createEmptyRender;
  6718. if (true) {
  6719. /* istanbul ignore if */
  6720. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  6721. vm.$options.el || el) {
  6722. warn(
  6723. 'You are using the runtime-only build of Vue where the template ' +
  6724. 'compiler is not available. Either pre-compile the templates into ' +
  6725. 'render functions, or use the compiler-included build.',
  6726. vm
  6727. );
  6728. } else {
  6729. warn(
  6730. 'Failed to mount component: template or render function not defined.',
  6731. vm
  6732. );
  6733. }
  6734. }
  6735. }
  6736. !vm._$fallback && callHook(vm, 'beforeMount');
  6737. var updateComponent = function () {
  6738. vm._update(vm._render(), hydrating);
  6739. };
  6740. // we set this to vm._watcher inside the watcher's constructor
  6741. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  6742. // component's mounted hook), which relies on vm._watcher being already defined
  6743. new Watcher(vm, updateComponent, noop, {
  6744. before: function before() {
  6745. if (vm._isMounted && !vm._isDestroyed) {
  6746. callHook(vm, 'beforeUpdate');
  6747. }
  6748. }
  6749. }, true /* isRenderWatcher */);
  6750. hydrating = false;
  6751. return vm
  6752. }
  6753. /* */
  6754. function renderClass (
  6755. staticClass,
  6756. dynamicClass
  6757. ) {
  6758. if (isDef(staticClass) || isDef(dynamicClass)) {
  6759. return concat(staticClass, stringifyClass(dynamicClass))
  6760. }
  6761. /* istanbul ignore next */
  6762. return ''
  6763. }
  6764. function concat (a, b) {
  6765. return a ? b ? (a + ' ' + b) : a : (b || '')
  6766. }
  6767. function stringifyClass (value) {
  6768. if (Array.isArray(value)) {
  6769. return stringifyArray(value)
  6770. }
  6771. if (isObject(value)) {
  6772. return stringifyObject(value)
  6773. }
  6774. if (typeof value === 'string') {
  6775. return value
  6776. }
  6777. /* istanbul ignore next */
  6778. return ''
  6779. }
  6780. function stringifyArray (value) {
  6781. var res = '';
  6782. var stringified;
  6783. for (var i = 0, l = value.length; i < l; i++) {
  6784. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  6785. if (res) { res += ' '; }
  6786. res += stringified;
  6787. }
  6788. }
  6789. return res
  6790. }
  6791. function stringifyObject (value) {
  6792. var res = '';
  6793. for (var key in value) {
  6794. if (value[key]) {
  6795. if (res) { res += ' '; }
  6796. res += key;
  6797. }
  6798. }
  6799. return res
  6800. }
  6801. /* */
  6802. var parseStyleText = cached(function (cssText) {
  6803. var res = {};
  6804. var listDelimiter = /;(?![^(]*\))/g;
  6805. var propertyDelimiter = /:(.+)/;
  6806. cssText.split(listDelimiter).forEach(function (item) {
  6807. if (item) {
  6808. var tmp = item.split(propertyDelimiter);
  6809. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  6810. }
  6811. });
  6812. return res
  6813. });
  6814. // normalize possible array / string values into Object
  6815. function normalizeStyleBinding (bindingStyle) {
  6816. if (Array.isArray(bindingStyle)) {
  6817. return toObject(bindingStyle)
  6818. }
  6819. if (typeof bindingStyle === 'string') {
  6820. return parseStyleText(bindingStyle)
  6821. }
  6822. return bindingStyle
  6823. }
  6824. /* */
  6825. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  6826. function getTarget(obj, path) {
  6827. var parts = path.split('.');
  6828. var key = parts[0];
  6829. if (key.indexOf('__$n') === 0) { //number index
  6830. key = parseInt(key.replace('__$n', ''));
  6831. }
  6832. if (parts.length === 1) {
  6833. return obj[key]
  6834. }
  6835. return getTarget(obj[key], parts.slice(1).join('.'))
  6836. }
  6837. function internalMixin(Vue) {
  6838. Vue.config.errorHandler = function(err, vm, info) {
  6839. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  6840. console.error(err);
  6841. /* eslint-disable no-undef */
  6842. var app = getApp();
  6843. if (app && app.onError) {
  6844. app.onError(err);
  6845. }
  6846. };
  6847. var oldEmit = Vue.prototype.$emit;
  6848. Vue.prototype.$emit = function(event) {
  6849. if (this.$scope && event) {
  6850. this.$scope['triggerEvent'](event, {
  6851. __args__: toArray(arguments, 1)
  6852. });
  6853. }
  6854. return oldEmit.apply(this, arguments)
  6855. };
  6856. Vue.prototype.$nextTick = function(fn) {
  6857. return nextTick$1(this, fn)
  6858. };
  6859. MP_METHODS.forEach(function (method) {
  6860. Vue.prototype[method] = function(args) {
  6861. if (this.$scope && this.$scope[method]) {
  6862. return this.$scope[method](args)
  6863. }
  6864. // mp-alipay
  6865. if (typeof my === 'undefined') {
  6866. return
  6867. }
  6868. if (method === 'createSelectorQuery') {
  6869. /* eslint-disable no-undef */
  6870. return my.createSelectorQuery(args)
  6871. } else if (method === 'createIntersectionObserver') {
  6872. /* eslint-disable no-undef */
  6873. return my.createIntersectionObserver(args)
  6874. }
  6875. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  6876. };
  6877. });
  6878. Vue.prototype.__init_provide = initProvide;
  6879. Vue.prototype.__init_injections = initInjections;
  6880. Vue.prototype.__call_hook = function(hook, args) {
  6881. var vm = this;
  6882. // #7573 disable dep collection when invoking lifecycle hooks
  6883. pushTarget();
  6884. var handlers = vm.$options[hook];
  6885. var info = hook + " hook";
  6886. var ret;
  6887. if (handlers) {
  6888. for (var i = 0, j = handlers.length; i < j; i++) {
  6889. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  6890. }
  6891. }
  6892. if (vm._hasHookEvent) {
  6893. vm.$emit('hook:' + hook, args);
  6894. }
  6895. popTarget();
  6896. return ret
  6897. };
  6898. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  6899. if (Array.isArray(modifiers)) {
  6900. if (modifiers.indexOf('trim') !== -1) {
  6901. value = value.trim();
  6902. }
  6903. if (modifiers.indexOf('number') !== -1) {
  6904. value = this._n(value);
  6905. }
  6906. }
  6907. if (!target) {
  6908. target = this;
  6909. }
  6910. target[key] = value;
  6911. };
  6912. Vue.prototype.__set_sync = function(target, key, value) {
  6913. if (!target) {
  6914. target = this;
  6915. }
  6916. target[key] = value;
  6917. };
  6918. Vue.prototype.__get_orig = function(item) {
  6919. if (isPlainObject(item)) {
  6920. return item['$orig'] || item
  6921. }
  6922. return item
  6923. };
  6924. Vue.prototype.__get_value = function(dataPath, target) {
  6925. return getTarget(target || this, dataPath)
  6926. };
  6927. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  6928. return renderClass(staticClass, dynamicClass)
  6929. };
  6930. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  6931. if (!dynamicStyle && !staticStyle) {
  6932. return ''
  6933. }
  6934. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  6935. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  6936. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  6937. };
  6938. Vue.prototype.__map = function(val, iteratee) {
  6939. //TODO 暂不考虑 string,number
  6940. var ret, i, l, keys, key;
  6941. if (Array.isArray(val)) {
  6942. ret = new Array(val.length);
  6943. for (i = 0, l = val.length; i < l; i++) {
  6944. ret[i] = iteratee(val[i], i);
  6945. }
  6946. return ret
  6947. } else if (isObject(val)) {
  6948. keys = Object.keys(val);
  6949. ret = Object.create(null);
  6950. for (i = 0, l = keys.length; i < l; i++) {
  6951. key = keys[i];
  6952. ret[key] = iteratee(val[key], key, i);
  6953. }
  6954. return ret
  6955. }
  6956. return []
  6957. };
  6958. }
  6959. /* */
  6960. var LIFECYCLE_HOOKS$1 = [
  6961. //App
  6962. 'onLaunch',
  6963. 'onShow',
  6964. 'onHide',
  6965. 'onUniNViewMessage',
  6966. 'onPageNotFound',
  6967. 'onThemeChange',
  6968. 'onError',
  6969. 'onUnhandledRejection',
  6970. //Page
  6971. 'onLoad',
  6972. // 'onShow',
  6973. 'onReady',
  6974. // 'onHide',
  6975. 'onUnload',
  6976. 'onPullDownRefresh',
  6977. 'onReachBottom',
  6978. 'onTabItemTap',
  6979. 'onAddToFavorites',
  6980. 'onShareTimeline',
  6981. 'onShareAppMessage',
  6982. 'onResize',
  6983. 'onPageScroll',
  6984. 'onNavigationBarButtonTap',
  6985. 'onBackPress',
  6986. 'onNavigationBarSearchInputChanged',
  6987. 'onNavigationBarSearchInputConfirmed',
  6988. 'onNavigationBarSearchInputClicked',
  6989. //Component
  6990. // 'onReady', // 兼容旧版本,应该移除该事件
  6991. 'onPageShow',
  6992. 'onPageHide',
  6993. 'onPageResize'
  6994. ];
  6995. function lifecycleMixin$1(Vue) {
  6996. //fixed vue-class-component
  6997. var oldExtend = Vue.extend;
  6998. Vue.extend = function(extendOptions) {
  6999. extendOptions = extendOptions || {};
  7000. var methods = extendOptions.methods;
  7001. if (methods) {
  7002. Object.keys(methods).forEach(function (methodName) {
  7003. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  7004. extendOptions[methodName] = methods[methodName];
  7005. delete methods[methodName];
  7006. }
  7007. });
  7008. }
  7009. return oldExtend.call(this, extendOptions)
  7010. };
  7011. var strategies = Vue.config.optionMergeStrategies;
  7012. var mergeHook = strategies.created;
  7013. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  7014. strategies[hook] = mergeHook;
  7015. });
  7016. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  7017. }
  7018. /* */
  7019. // install platform patch function
  7020. Vue.prototype.__patch__ = patch;
  7021. // public mount method
  7022. Vue.prototype.$mount = function(
  7023. el ,
  7024. hydrating
  7025. ) {
  7026. return mountComponent$1(this, el, hydrating)
  7027. };
  7028. lifecycleMixin$1(Vue);
  7029. internalMixin(Vue);
  7030. /* */
  7031. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  7032. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  7033. /***/ }),
  7034. /***/ 20:
  7035. /*!******************************************************************!*\
  7036. !*** /Users/wanglili/Documents/work/GitHub/huaihua/api/index.js ***!
  7037. \******************************************************************/
  7038. /*! no static exports found */
  7039. /***/ (function(module, exports, __webpack_require__) {
  7040. "use strict";
  7041. Object.defineProperty(exports, "__esModule", { value: true });exports.loadIndexs = loadIndexs;exports.bannerlist = bannerlist;exports.groom4 = groom4;exports.groom1 = groom1;exports.groom3 = groom3;exports.myCreateCircle = myCreateCircle;exports.getList = getList;exports.getNumber = getNumber;exports.joinSec = joinSec;exports.getdis = getdis;exports.tocall = tocall;exports.getseek = getseek;exports.getrescue = getrescue;exports.change_rescue = change_rescue;var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 21));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  7042. // 获取轮播图
  7043. function loadIndexs(data) {
  7044. return (0, _request.default)({
  7045. url: '/api/index',
  7046. method: 'get',
  7047. data: data });
  7048. }
  7049. // 获取文章列表
  7050. function bannerlist(data) {
  7051. return (0, _request.default)({
  7052. url: '/api/article/list/1',
  7053. method: 'get',
  7054. data: data });
  7055. }
  7056. // 促销商品
  7057. function groom4(data) {
  7058. return (0, _request.default)({
  7059. url: '/api/groom/list/4',
  7060. method: 'get',
  7061. data: data });
  7062. }
  7063. // 精品推荐
  7064. function groom1(data) {
  7065. return (0, _request.default)({
  7066. url: '/api/groom/list/1',
  7067. method: 'get',
  7068. data: data });
  7069. }
  7070. // 新品首发
  7071. function groom3(data) {
  7072. return (0, _request.default)({
  7073. url: '/api/groom/list/3',
  7074. method: 'get',
  7075. data: data });
  7076. }
  7077. // 获取我创建的圈子
  7078. function myCreateCircle(data) {
  7079. return (0, _request.default)({
  7080. url: '/api/circle/mycreate',
  7081. method: 'post',
  7082. data: data });
  7083. }
  7084. // 造血干细胞捐献
  7085. function getList(data) {
  7086. return (0, _request.default)({
  7087. url: '/api/sign_cell',
  7088. method: 'post',
  7089. data: data });
  7090. }
  7091. // 救护者页面获取参与人数
  7092. function getNumber(data) {
  7093. return (0, _request.default)({
  7094. url: '/api/get_rescuer',
  7095. method: 'get',
  7096. data: data });
  7097. }
  7098. // joinSec
  7099. function joinSec(data) {
  7100. return (0, _request.default)({
  7101. url: '/api/add_volunteers ',
  7102. method: 'post',
  7103. data: data });
  7104. }
  7105. // 获取定位
  7106. function getdis(data) {
  7107. return (0, _request.default)({
  7108. url: '/api/getdis',
  7109. method: 'get',
  7110. data: data });
  7111. }
  7112. function tocall(data) {
  7113. return (0, _request.default)({
  7114. url: '/api/do_getdis',
  7115. method: 'get',
  7116. data: data });
  7117. }
  7118. // 求助记录 getsee
  7119. function getseek(data) {
  7120. return (0, _request.default)({
  7121. url: '/api/seek',
  7122. method: 'get',
  7123. data: data });
  7124. }
  7125. // 救援记录 rescue
  7126. function getrescue(data) {
  7127. return (0, _request.default)({
  7128. url: '/api/rescueee',
  7129. method: 'get',
  7130. data: data });
  7131. }
  7132. function change_rescue(data) {
  7133. return (0, _request.default)({
  7134. url: '/api/change_rescue',
  7135. method: 'get',
  7136. data: data });
  7137. }
  7138. /***/ }),
  7139. /***/ 206:
  7140. /*!***********************************************************************************!*\
  7141. !*** /Users/wanglili/Documents/work/GitHub/huaihua/components/uni-popup/popup.js ***!
  7142. \***********************************************************************************/
  7143. /*! no static exports found */
  7144. /***/ (function(module, exports, __webpack_require__) {
  7145. "use strict";
  7146. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _message = _interopRequireDefault(__webpack_require__(/*! ./message.js */ 207));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  7147. // 定义 type 类型:弹出类型:top/bottom/center
  7148. var config = {
  7149. // 顶部弹出
  7150. top: 'top',
  7151. // 底部弹出
  7152. bottom: 'bottom',
  7153. // 居中弹出
  7154. center: 'center',
  7155. // 消息提示
  7156. message: 'top',
  7157. // 对话框
  7158. dialog: 'center',
  7159. // 分享
  7160. share: 'bottom' };var _default =
  7161. {
  7162. data: function data() {
  7163. return {
  7164. config: config };
  7165. },
  7166. mixins: [_message.default] };exports.default = _default;
  7167. /***/ }),
  7168. /***/ 207:
  7169. /*!*************************************************************************************!*\
  7170. !*** /Users/wanglili/Documents/work/GitHub/huaihua/components/uni-popup/message.js ***!
  7171. \*************************************************************************************/
  7172. /*! no static exports found */
  7173. /***/ (function(module, exports, __webpack_require__) {
  7174. "use strict";
  7175. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  7176. created: function created() {
  7177. if (this.type === 'message') {
  7178. // 不显示遮罩
  7179. this.maskShow = false;
  7180. // 获取子组件对象
  7181. this.childrenMsg = null;
  7182. }
  7183. },
  7184. methods: {
  7185. customOpen: function customOpen() {
  7186. if (this.childrenMsg) {
  7187. this.childrenMsg.open();
  7188. }
  7189. },
  7190. customClose: function customClose() {
  7191. if (this.childrenMsg) {
  7192. this.childrenMsg.close();
  7193. }
  7194. } } };exports.default = _default;
  7195. /***/ }),
  7196. /***/ 21:
  7197. /*!**********************************************************************!*\
  7198. !*** /Users/wanglili/Documents/work/GitHub/huaihua/utils/request.js ***!
  7199. \**********************************************************************/
  7200. /*! no static exports found */
  7201. /***/ (function(module, exports, __webpack_require__) {
  7202. "use strict";
  7203. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = exports.upFilse = void 0;var _newRequest = _interopRequireDefault(__webpack_require__(/*! ./newRequest.js */ 22));
  7204. var _store = _interopRequireDefault(__webpack_require__(/*! ../store */ 5));
  7205. var _loginUtils = __webpack_require__(/*! @/utils/loginUtils.js */ 26);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  7206. // 请求完成后拦截
  7207. _newRequest.default.interceptors.response(
  7208. function (response) {
  7209. try {
  7210. var res = response.data;
  7211. // 解析字符串为数字
  7212. if (res.status !== 200) {
  7213. if (res.status == 410000) {
  7214. // 存储当前地址
  7215. (0, _loginUtils.saveUrl)();
  7216. // 调用退出登录方法清空用户信息
  7217. _store.default.commit('user/logout');
  7218. // 判断是否开启强制登录
  7219. // 跳转页面
  7220. (0, _loginUtils.interceptor)();
  7221. uni.showModal({
  7222. title: "您未登录!是否马上登录?",
  7223. success: function success(e) {
  7224. if (e.confirm) {
  7225. // 保存当前页面地址
  7226. }
  7227. } });
  7228. } else {
  7229. if (res.msg != '系统出现异常') {
  7230. uni.showToast({
  7231. title: res.msg,
  7232. duration: 1500,
  7233. mask: false,
  7234. icon: 'none' });
  7235. }
  7236. }
  7237. console.log(res);
  7238. //return Promise.reject(new Error(res.msg || 'Error'))
  7239. } else {
  7240. return res;
  7241. }
  7242. } catch (e) {
  7243. console.log(e);
  7244. }
  7245. },
  7246. function (error) {
  7247. uni.showToast({
  7248. title: "加载错误请重试",
  7249. duration: 1500,
  7250. mask: false,
  7251. icon: 'none' });
  7252. return Promise.reject(error);
  7253. });
  7254. // 请求前拦截器
  7255. _newRequest.default.interceptors.request(
  7256. function (config) {
  7257. // config.data.token = getToken();
  7258. // console.log(config);
  7259. var token = uni.getStorageSync('token');
  7260. // console.log(token);
  7261. if (!config.header) {
  7262. config.header = {
  7263. "Authori-zation": 'Bearer ' + token };
  7264. } else {
  7265. // 添加key请求头
  7266. config.header["Authori-zation"] = 'Bearer ' + token;
  7267. }
  7268. return config;
  7269. },
  7270. function (error) {
  7271. // 错误处理
  7272. console.log(error);
  7273. return Promise.reject(error);
  7274. });
  7275. var upFilse = _newRequest.default.upFilse;exports.upFilse = upFilse;var _default =
  7276. _newRequest.default.open;exports.default = _default;
  7277. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  7278. /***/ }),
  7279. /***/ 22:
  7280. /*!*************************************************************************!*\
  7281. !*** /Users/wanglili/Documents/work/GitHub/huaihua/utils/newRequest.js ***!
  7282. \*************************************************************************/
  7283. /*! no static exports found */
  7284. /***/ (function(module, exports, __webpack_require__) {
  7285. "use strict";
  7286. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _regenerator = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@vue/babel-preset-app/node_modules/@babel/runtime/regenerator */ 23));var _store = _interopRequireDefault(__webpack_require__(/*! ../store */ 5));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {try {var info = gen[key](arg);var value = info.value;} catch (error) {reject(error);return;}if (info.done) {resolve(value);} else {Promise.resolve(value).then(_next, _throw);}}function _asyncToGenerator(fn) {return function () {var self = this,args = arguments;return new Promise(function (resolve, reject) {var gen = fn.apply(self, args);function _next(value) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);}function _throw(err) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);}_next(undefined);});};}
  7287. var service = {
  7288. baseURL: _store.default.state.baseURL, // 请求头
  7289. header: {
  7290. 'Content-Type': "application/x-www-form-urlencoded" },
  7291. // 请求拦截器
  7292. interceptors: {
  7293. // 安装请求前拦截
  7294. request: function request(success, iserror) {
  7295. service.request.success = success;
  7296. service.request.error = iserror;
  7297. },
  7298. // 安装请求完成后拦截
  7299. response: function response(success, iserror) {
  7300. service.response.success = success;
  7301. service.response.error = iserror;
  7302. } },
  7303. // 请求前拦截
  7304. request: {
  7305. // 回调成功执行方法
  7306. success: function success(e) {
  7307. return e;
  7308. },
  7309. // 回调失败
  7310. error: function error(e) {
  7311. return e;
  7312. } },
  7313. // 请求完成后拦截
  7314. response: {
  7315. // 回调成功执行方法
  7316. success: function success(e) {
  7317. return e;
  7318. },
  7319. // 回调失败
  7320. error: function error(e) {
  7321. return e;
  7322. } },
  7323. // 开始请求
  7324. open: function () {var _open = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee(data) {return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:_context.next = 2;return (
  7325. new Promise(function (resolve, reject) {
  7326. var requestData = ''; //保存处理完成后请求数据
  7327. //console.log(data);
  7328. // 请求前数据处理
  7329. requestData = service.request.success(data);
  7330. // 保存请求地址;
  7331. var url;
  7332. if (requestData.url.indexOf('http') > -1) {
  7333. url = requestData.url;
  7334. } else {
  7335. url = service.baseURL + requestData.url;
  7336. }
  7337. // 数据复制用于请求
  7338. uni.request({
  7339. url: url,
  7340. method: requestData.method || 'GET',
  7341. data: requestData.data,
  7342. header: data.header || service.header,
  7343. success: function success(res) {
  7344. if (res.statusCode == 200) {
  7345. try {
  7346. resolve(service.response.success(res));
  7347. } catch (e) {
  7348. service.response.error(e);
  7349. }
  7350. }
  7351. },
  7352. // 请求失败数据处理
  7353. fail: function fail(err) {
  7354. service.response.error(err);
  7355. } });
  7356. }));case 2:return _context.abrupt("return", _context.sent);case 3:case "end":return _context.stop();}}}, _callee);}));function open(_x) {return _open.apply(this, arguments);}return open;}(),
  7357. // 上传文件
  7358. upFilse: function () {var _upFilse = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee4(data) {return _regenerator.default.wrap(function _callee4$(_context4) {while (1) {switch (_context4.prev = _context4.next) {case 0:_context4.next = 2;return (
  7359. new Promise(function (resolve, reject) {
  7360. var requestData = ''; //保存处理完成后请求数据
  7361. try {
  7362. // 请求前数据处理
  7363. requestData = service.request.success(data);
  7364. } catch (e) {
  7365. // 请求报错拦截
  7366. service.request.error(e);
  7367. }
  7368. var config = {
  7369. // 上传图片的API
  7370. upload_img_url: service.baseURL + requestData.url };
  7371. var Uploader = {
  7372. // 选择图片
  7373. choose: function choose(num) {
  7374. return new Promise(function (resolve, reject) {
  7375. uni.chooseImage({
  7376. count: num,
  7377. sourceType: ['album'],
  7378. sizeType: ['compressed'],
  7379. success: function success(res) {
  7380. // console.log(res);
  7381. // 缓存文件路径
  7382. resolve(res.tempFilePaths);
  7383. },
  7384. fail: function fail(err) {
  7385. console.log(err);
  7386. reject(err);
  7387. } });
  7388. });
  7389. },
  7390. // 上传图片
  7391. upload_one: function upload_one(path) {
  7392. return new Promise(function (resolve, reject) {
  7393. uni.showLoading({
  7394. title: '上传中' });
  7395. uni.uploadFile({
  7396. url: config.upload_img_url, //仅为示例,非真实的接口地址
  7397. filePath: path,
  7398. name: 'file',
  7399. header: {
  7400. "Authori-zation": 'Bearer ' + uni.getStorageSync('token') },
  7401. success: function success(uploadFileRes) {
  7402. if ("string" === typeof uploadFileRes.data) {
  7403. resolve(JSON.parse(uploadFileRes.data).data);
  7404. } else {
  7405. resolve(uploadFileRes.data.data);
  7406. }
  7407. },
  7408. complete: function complete() {
  7409. uni.hideLoading();
  7410. } });
  7411. });
  7412. },
  7413. // 上传多个图片
  7414. upload: function upload(path_arr) {var _this = this;
  7415. var num = path_arr.length;
  7416. return new Promise( /*#__PURE__*/function () {var _ref = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee2(resolve, reject) {var img_urls, i, img_url;return _regenerator.default.wrap(function _callee2$(_context2) {while (1) {switch (_context2.prev = _context2.next) {case 0:
  7417. img_urls = [];
  7418. i = 0;case 2:if (!(i < num)) {_context2.next = 10;break;}_context2.next = 5;return (
  7419. _this.upload_one(path_arr[i]));case 5:img_url = _context2.sent;
  7420. img_urls.push(img_url);case 7:i++;_context2.next = 2;break;case 10:
  7421. ;
  7422. resolve(img_urls);case 12:case "end":return _context2.stop();}}}, _callee2);}));return function (_x3, _x4) {return _ref.apply(this, arguments);};}());
  7423. },
  7424. // 触发上传图片事件
  7425. choose_and_upload: function choose_and_upload(num) {var _this2 = this;
  7426. return new Promise( /*#__PURE__*/function () {var _ref2 = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee3(resolve, reject) {var path_arr;return _regenerator.default.wrap(function _callee3$(_context3) {while (1) {switch (_context3.prev = _context3.next) {case 0:_context3.next = 2;return (
  7427. _this2.choose(num));case 2:path_arr = _context3.sent;_context3.next = 5;return (
  7428. _this2.upload(path_arr).then(function (e) {
  7429. resolve(e);
  7430. }).catch(function (e) {
  7431. reject(e);
  7432. }));case 5:case "end":return _context3.stop();}}}, _callee3);}));return function (_x5, _x6) {return _ref2.apply(this, arguments);};}());
  7433. } };
  7434. Uploader.choose_and_upload(1).then(function (e) {
  7435. resolve(e);
  7436. }).catch(function (e) {
  7437. console.log(e);
  7438. });
  7439. }));case 2:return _context4.abrupt("return", _context4.sent);case 3:case "end":return _context4.stop();}}}, _callee4);}));function upFilse(_x2) {return _upFilse.apply(this, arguments);}return upFilse;}() };var _default =
  7440. service;exports.default = _default;
  7441. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  7442. /***/ }),
  7443. /***/ 222:
  7444. /*!***********************************************************************************************!*\
  7445. !*** /Users/wanglili/Documents/work/GitHub/huaihua/components/wangding-pickerAddress/data.js ***!
  7446. \***********************************************************************************************/
  7447. /*! no static exports found */
  7448. /***/ (function(module, exports, __webpack_require__) {
  7449. "use strict";
  7450. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = [
  7451. {
  7452. "name": "北京市",
  7453. "city": [
  7454. {
  7455. "name": "北京市",
  7456. "area": [
  7457. "东城区",
  7458. "西城区",
  7459. "崇文区",
  7460. "宣武区",
  7461. "朝阳区",
  7462. "丰台区",
  7463. "石景山区",
  7464. "海淀区",
  7465. "门头沟区",
  7466. "房山区",
  7467. "通州区",
  7468. "顺义区",
  7469. "昌平区",
  7470. "大兴区",
  7471. "平谷区",
  7472. "怀柔区",
  7473. "密云县",
  7474. "延庆县"] }] },
  7475. {
  7476. "name": "天津市",
  7477. "city": [
  7478. {
  7479. "name": "天津市",
  7480. "area": [
  7481. "和平区",
  7482. "河东区",
  7483. "河西区",
  7484. "南开区",
  7485. "河北区",
  7486. "红桥区",
  7487. "塘沽区",
  7488. "汉沽区",
  7489. "大港区",
  7490. "东丽区",
  7491. "西青区",
  7492. "津南区",
  7493. "北辰区",
  7494. "武清区",
  7495. "宝坻区",
  7496. "宁河县",
  7497. "静海县",
  7498. "蓟 县"] }] },
  7499. {
  7500. "name": "河北省",
  7501. "city": [
  7502. {
  7503. "name": "石家庄市",
  7504. "area": [
  7505. "长安区",
  7506. "桥东区",
  7507. "桥西区",
  7508. "新华区",
  7509. "郊 区",
  7510. "井陉矿区",
  7511. "井陉县",
  7512. "正定县",
  7513. "栾城县",
  7514. "行唐县",
  7515. "灵寿县",
  7516. "高邑县",
  7517. "深泽县",
  7518. "赞皇县",
  7519. "无极县",
  7520. "平山县",
  7521. "元氏县",
  7522. "赵 县",
  7523. "辛集市",
  7524. "藁",
  7525. "晋州市",
  7526. "新乐市",
  7527. "鹿泉市"] },
  7528. {
  7529. "name": "唐山市",
  7530. "area": [
  7531. "路南区",
  7532. "路北区",
  7533. "古冶区",
  7534. "开平区",
  7535. "新 区",
  7536. "丰润县",
  7537. "滦 县",
  7538. "滦南县",
  7539. "乐亭县",
  7540. "迁西县",
  7541. "玉田县",
  7542. "唐海县",
  7543. "遵化市",
  7544. "丰南市",
  7545. "迁安市"] },
  7546. {
  7547. "name": "秦皇岛市",
  7548. "area": [
  7549. "海港区",
  7550. "山海关区",
  7551. "北戴河区",
  7552. "青龙满族自治县",
  7553. "昌黎县",
  7554. "抚宁县",
  7555. "卢龙县"] },
  7556. {
  7557. "name": "邯郸市",
  7558. "area": [
  7559. "邯山区",
  7560. "丛台区",
  7561. "复兴区",
  7562. "峰峰矿区",
  7563. "邯郸县",
  7564. "临漳县",
  7565. "成安县",
  7566. "大名县",
  7567. "涉 县",
  7568. "磁 县",
  7569. "肥乡县",
  7570. "永年县",
  7571. "邱 县",
  7572. "鸡泽县",
  7573. "广平县",
  7574. "馆陶县",
  7575. "魏 县",
  7576. "曲周县",
  7577. "武安市"] },
  7578. {
  7579. "name": "邢台市",
  7580. "area": [
  7581. "桥东区",
  7582. "桥西区",
  7583. "邢台县",
  7584. "临城县",
  7585. "内丘县",
  7586. "柏乡县",
  7587. "隆尧县",
  7588. "任 县",
  7589. "南和县",
  7590. "宁晋县",
  7591. "巨鹿县",
  7592. "新河县",
  7593. "广宗县",
  7594. "平乡县",
  7595. "威 县",
  7596. "清河县",
  7597. "临西县",
  7598. "南宫市",
  7599. "沙河市"] },
  7600. {
  7601. "name": "保定市",
  7602. "area": [
  7603. "新市区",
  7604. "北市区",
  7605. "南市区",
  7606. "满城县",
  7607. "清苑县",
  7608. "涞水县",
  7609. "阜平县",
  7610. "徐水县",
  7611. "定兴县",
  7612. "唐 县",
  7613. "高阳县",
  7614. "容城县",
  7615. "涞源县",
  7616. "望都县",
  7617. "安新县",
  7618. "易 县",
  7619. "曲阳县",
  7620. "蠡 县",
  7621. "顺平县",
  7622. "博野",
  7623. "雄县",
  7624. "涿州市",
  7625. "定州市",
  7626. "安国市",
  7627. "高碑店市"] },
  7628. {
  7629. "name": "张家口",
  7630. "area": [
  7631. "桥东区",
  7632. "桥西区",
  7633. "宣化区",
  7634. "下花园区",
  7635. "宣化县",
  7636. "张北县",
  7637. "康保县",
  7638. "沽源县",
  7639. "尚义县",
  7640. "蔚 县",
  7641. "阳原县",
  7642. "怀安县",
  7643. "万全县",
  7644. "怀来县",
  7645. "涿鹿县",
  7646. "赤城县",
  7647. "崇礼县"] },
  7648. {
  7649. "name": "承德市",
  7650. "area": [
  7651. "双桥区",
  7652. "双滦区",
  7653. "鹰手营子矿区",
  7654. "承德县",
  7655. "兴隆县",
  7656. "平泉县",
  7657. "滦平县",
  7658. "隆化县",
  7659. "丰宁满族自治县",
  7660. "宽城满族自治县",
  7661. "围场满族蒙古族自治县"] },
  7662. {
  7663. "name": "沧州市",
  7664. "area": [
  7665. "新华区",
  7666. "运河区",
  7667. "沧 县",
  7668. "青 县",
  7669. "东光县",
  7670. "海兴县",
  7671. "盐山县",
  7672. "肃宁县",
  7673. "南皮县",
  7674. "吴桥县",
  7675. "献 县",
  7676. "孟村回族自治县",
  7677. "泊头市",
  7678. "任丘市",
  7679. "黄骅市",
  7680. "河间市"] },
  7681. {
  7682. "name": "廊坊市",
  7683. "area": [
  7684. "安次区",
  7685. "固安县",
  7686. "永清县",
  7687. "香河县",
  7688. "大城县",
  7689. "文安县",
  7690. "大厂回族自治县",
  7691. "霸州市",
  7692. "三河市"] },
  7693. {
  7694. "name": "衡水市",
  7695. "area": [
  7696. "桃城区",
  7697. "枣强县",
  7698. "武邑县",
  7699. "武强县",
  7700. "饶阳县",
  7701. "安平县",
  7702. "故城县",
  7703. "景 县",
  7704. "阜城县",
  7705. "冀州市",
  7706. "深州市"] }] },
  7707. {
  7708. "name": "山西省",
  7709. "city": [
  7710. {
  7711. "name": "太原市",
  7712. "area": [
  7713. "小店区",
  7714. "迎泽区",
  7715. "杏花岭区",
  7716. "尖草坪区",
  7717. "万柏林区",
  7718. "晋源区",
  7719. "清徐县",
  7720. "阳曲县",
  7721. "娄烦县",
  7722. "古交市"] },
  7723. {
  7724. "name": "大同市",
  7725. "area": [
  7726. "城 区",
  7727. "矿 区",
  7728. "南郊区",
  7729. "新荣区",
  7730. "阳高县",
  7731. "天镇县",
  7732. "广灵县",
  7733. "灵丘县",
  7734. "浑源县",
  7735. "左云县",
  7736. "大同县"] },
  7737. {
  7738. "name": "阳泉市",
  7739. "area": [
  7740. "城 区",
  7741. "矿 区",
  7742. "郊 区",
  7743. "平定县",
  7744. "盂 县"] },
  7745. {
  7746. "name": "长治市",
  7747. "area": [
  7748. "城 区",
  7749. "郊 区",
  7750. "长治县",
  7751. "襄垣县",
  7752. "屯留县",
  7753. "平顺县",
  7754. "黎城县",
  7755. "壶关县",
  7756. "长子县",
  7757. "武乡县",
  7758. "沁 县",
  7759. "沁源县",
  7760. "潞城市"] },
  7761. {
  7762. "name": "晋城市",
  7763. "area": [
  7764. "城 区",
  7765. "沁水县",
  7766. "阳城县",
  7767. "陵川县",
  7768. "泽州县",
  7769. "高平市"] },
  7770. {
  7771. "name": "朔州市",
  7772. "area": [
  7773. "朔城区",
  7774. "平鲁区",
  7775. "山阴县",
  7776. "应 县",
  7777. "右玉县",
  7778. "怀仁县"] },
  7779. {
  7780. "name": "忻州市",
  7781. "area": [
  7782. "忻府区",
  7783. "原平市",
  7784. "定襄县",
  7785. "五台县",
  7786. "代 县",
  7787. "繁峙县",
  7788. "宁武县",
  7789. "静乐县",
  7790. "神池县",
  7791. "五寨县",
  7792. "岢岚县",
  7793. "河曲县",
  7794. "保德县",
  7795. "偏关县"] },
  7796. {
  7797. "name": "吕梁市",
  7798. "area": [
  7799. "离石区",
  7800. "孝义市",
  7801. "汾阳市",
  7802. "文水县",
  7803. "交城县",
  7804. "兴 县",
  7805. "临 县",
  7806. "柳林县",
  7807. "石楼县",
  7808. "岚 县",
  7809. "方山县",
  7810. "中阳县",
  7811. "交口县"] },
  7812. {
  7813. "name": "晋中市",
  7814. "area": [
  7815. "榆次市",
  7816. "介休市",
  7817. "榆社县",
  7818. "左权县",
  7819. "和顺县",
  7820. "昔阳县",
  7821. "寿阳县",
  7822. "太谷县",
  7823. "祁 县",
  7824. "平遥县",
  7825. "灵石县"] },
  7826. {
  7827. "name": "临汾市",
  7828. "area": [
  7829. "临汾市",
  7830. "侯马市",
  7831. "霍州市",
  7832. "曲沃县",
  7833. "翼城县",
  7834. "襄汾县",
  7835. "洪洞县",
  7836. "古 县",
  7837. "安泽县",
  7838. "浮山县",
  7839. "吉 县",
  7840. "乡宁县",
  7841. "蒲 县",
  7842. "大宁县",
  7843. "永和县",
  7844. "隰 县",
  7845. "汾西县"] },
  7846. {
  7847. "name": "运城市",
  7848. "area": [
  7849. "运城市",
  7850. "永济市",
  7851. "河津市",
  7852. "芮城县",
  7853. "临猗县",
  7854. "万荣县",
  7855. "新绛县",
  7856. "稷山县",
  7857. "闻喜县",
  7858. "夏 县",
  7859. "绛 县",
  7860. "平陆县",
  7861. "垣曲县"] }] },
  7862. {
  7863. "name": "内蒙古",
  7864. "city": [
  7865. {
  7866. "name": "呼和浩特市",
  7867. "area": [
  7868. "新城区",
  7869. "回民区",
  7870. "玉泉区",
  7871. "郊 区",
  7872. "土默特左旗",
  7873. "托克托县",
  7874. "和林格尔县",
  7875. "清水河县",
  7876. "武川县"] },
  7877. {
  7878. "name": "包头市",
  7879. "area": [
  7880. "东河区",
  7881. "昆都伦区",
  7882. "青山区",
  7883. "石拐矿区",
  7884. "白云矿区",
  7885. "郊 区",
  7886. "土默特右旗",
  7887. "固阳县",
  7888. "达尔罕茂明安联合旗"] },
  7889. {
  7890. "name": "乌海市",
  7891. "area": [
  7892. "海勃湾区",
  7893. "海南区",
  7894. "乌达区"] },
  7895. {
  7896. "name": "赤峰市",
  7897. "area": [
  7898. "红山区",
  7899. "元宝山区",
  7900. "松山区",
  7901. "阿鲁科尔沁旗",
  7902. "巴林左旗",
  7903. "巴林右旗",
  7904. "林西县",
  7905. "克什克腾旗",
  7906. "翁牛特旗",
  7907. "喀喇沁旗",
  7908. "宁城县",
  7909. "敖汉旗"] },
  7910. {
  7911. "name": "呼伦贝尔市",
  7912. "area": [
  7913. "海拉尔市",
  7914. "满洲里市",
  7915. "扎兰屯市",
  7916. "牙克石市",
  7917. "根河市",
  7918. "额尔古纳市",
  7919. "阿荣旗",
  7920. "莫力达瓦达斡尔族自治旗",
  7921. "鄂伦春自治旗",
  7922. "鄂温克族自治旗",
  7923. "新巴尔虎右旗",
  7924. "新巴尔虎左旗",
  7925. "陈巴尔虎旗"] },
  7926. {
  7927. "name": "兴安盟",
  7928. "area": [
  7929. "乌兰浩特市",
  7930. "阿尔山市",
  7931. "科尔沁右翼前旗",
  7932. "科尔沁右翼中旗",
  7933. "扎赉特旗",
  7934. "突泉县"] },
  7935. {
  7936. "name": "通辽市",
  7937. "area": [
  7938. "科尔沁区",
  7939. "霍林郭勒市",
  7940. "科尔沁左翼中旗",
  7941. "科尔沁左翼后旗",
  7942. "开鲁县",
  7943. "库伦旗",
  7944. "奈曼旗",
  7945. "扎鲁特旗"] },
  7946. {
  7947. "name": "锡林郭勒盟",
  7948. "area": [
  7949. "二连浩特市",
  7950. "锡林浩特市",
  7951. "阿巴嘎旗",
  7952. "苏尼特左旗",
  7953. "苏尼特右旗",
  7954. "东乌珠穆沁旗",
  7955. "西乌珠穆沁旗",
  7956. "太仆寺旗",
  7957. "镶黄旗",
  7958. "正镶白旗",
  7959. "正蓝旗",
  7960. "多伦县"] },
  7961. {
  7962. "name": "乌兰察布盟",
  7963. "area": [
  7964. "集宁市",
  7965. "丰镇市",
  7966. "卓资县",
  7967. "化德县",
  7968. "商都县",
  7969. "兴和县",
  7970. "凉城县",
  7971. "察哈尔右翼前旗",
  7972. "察哈尔右翼中旗",
  7973. "察哈尔右翼后旗",
  7974. "四子王旗"] },
  7975. {
  7976. "name": "伊克昭盟",
  7977. "area": [
  7978. "东胜市",
  7979. "达拉特旗",
  7980. "准格尔旗",
  7981. "鄂托克前旗",
  7982. "鄂托克旗",
  7983. "杭锦旗",
  7984. "乌审旗",
  7985. "伊金霍洛旗"] },
  7986. {
  7987. "name": "巴彦淖尔盟",
  7988. "area": [
  7989. "临河市",
  7990. "五原县",
  7991. "磴口县",
  7992. "乌拉特前旗",
  7993. "乌拉特中旗",
  7994. "乌拉特后旗",
  7995. "杭锦后旗"] },
  7996. {
  7997. "name": "阿拉善盟",
  7998. "area": [
  7999. "阿拉善左旗",
  8000. "阿拉善右旗",
  8001. "额济纳旗"] }] },
  8002. {
  8003. "name": "辽宁省",
  8004. "city": [
  8005. {
  8006. "name": "沈阳市",
  8007. "area": [
  8008. "沈河区",
  8009. "皇姑区",
  8010. "和平区",
  8011. "大东区",
  8012. "铁西区",
  8013. "苏家屯区",
  8014. "东陵区",
  8015. "于洪区",
  8016. "新民市",
  8017. "法库县",
  8018. "辽中县",
  8019. "康平县",
  8020. "新城子区"] },
  8021. {
  8022. "name": "大连市",
  8023. "area": [
  8024. "西岗区",
  8025. "中山区",
  8026. "沙河口区",
  8027. "甘井子区",
  8028. "旅顺口区",
  8029. "金州区",
  8030. "瓦房店市",
  8031. "普兰店市",
  8032. "庄河市",
  8033. "长海县"] },
  8034. {
  8035. "name": "鞍山市",
  8036. "area": [
  8037. "铁东区",
  8038. "铁西区",
  8039. "立山区",
  8040. "千山区",
  8041. "海城市",
  8042. "台安县",
  8043. "岫岩满族自治县"] },
  8044. {
  8045. "name": "抚顺市",
  8046. "area": [
  8047. "顺城区",
  8048. "新抚区",
  8049. "东洲区",
  8050. "望花区",
  8051. "抚顺县",
  8052. "清原满族自治县",
  8053. "新宾满族自治县"] },
  8054. {
  8055. "name": "本溪市",
  8056. "area": [
  8057. "平山区",
  8058. "明山区",
  8059. "溪湖区",
  8060. "南芬区",
  8061. "本溪满族自治县",
  8062. "桓仁满族自治县"] },
  8063. {
  8064. "name": "丹东市",
  8065. "area": [
  8066. "振兴区",
  8067. "元宝区",
  8068. "振安区",
  8069. "东港市",
  8070. "凤城市",
  8071. "宽甸满族自治县"] },
  8072. {
  8073. "name": "锦州市",
  8074. "area": [
  8075. "太和区",
  8076. "古塔区",
  8077. "凌河区",
  8078. "凌海市",
  8079. "黑山县",
  8080. "义县",
  8081. "北宁市"] },
  8082. {
  8083. "name": "营口市",
  8084. "area": [
  8085. "站前区",
  8086. "西市区",
  8087. "鲅鱼圈区",
  8088. "老边区",
  8089. "大石桥市",
  8090. "盖州市"] },
  8091. {
  8092. "name": "阜新市",
  8093. "area": [
  8094. "海州区",
  8095. "新邱区",
  8096. "太平区",
  8097. "清河门区",
  8098. "细河区",
  8099. "彰武县",
  8100. "阜新蒙古族自治县"] },
  8101. {
  8102. "name": "辽阳市",
  8103. "area": [
  8104. "白塔区",
  8105. "文圣区",
  8106. "宏伟区",
  8107. "太子河区",
  8108. "弓长岭区",
  8109. "灯塔市",
  8110. "辽阳县"] },
  8111. {
  8112. "name": "盘锦",
  8113. "area": [
  8114. "双台子区",
  8115. "兴隆台区",
  8116. "盘山县",
  8117. "大洼县"] },
  8118. {
  8119. "name": "铁岭市",
  8120. "area": [
  8121. "银州区",
  8122. "清河区",
  8123. "调兵山市",
  8124. "开原市",
  8125. "铁岭县",
  8126. "昌图县",
  8127. "西丰县"] },
  8128. {
  8129. "name": "朝阳市",
  8130. "area": [
  8131. "双塔区",
  8132. "龙城区",
  8133. "凌源市",
  8134. "北票市",
  8135. "朝阳县",
  8136. "建平县",
  8137. "喀喇沁左翼蒙古族自治县"] },
  8138. {
  8139. "name": "葫芦岛市",
  8140. "area": [
  8141. "龙港区",
  8142. "南票区",
  8143. "连山区",
  8144. "兴城市",
  8145. "绥中县",
  8146. "建昌县"] }] },
  8147. {
  8148. "name": "吉林省",
  8149. "city": [
  8150. {
  8151. "name": "长春市",
  8152. "area": [
  8153. "朝阳区",
  8154. "宽城区",
  8155. "二道区",
  8156. "南关区",
  8157. "绿园区",
  8158. "双阳区",
  8159. "九台市",
  8160. "榆树市",
  8161. "德惠市",
  8162. "农安县"] },
  8163. {
  8164. "name": "吉林市",
  8165. "area": [
  8166. "船营区",
  8167. "昌邑区",
  8168. "龙潭区",
  8169. "丰满区",
  8170. "舒兰市",
  8171. "桦甸市",
  8172. "蛟河市",
  8173. "磐石市",
  8174. "永吉县"] },
  8175. {
  8176. "name": "四平",
  8177. "area": [
  8178. "铁西区",
  8179. "铁东区",
  8180. "公主岭市",
  8181. "双辽市",
  8182. "梨树县",
  8183. "伊通满族自治县"] },
  8184. {
  8185. "name": "辽源市",
  8186. "area": [
  8187. "龙山区",
  8188. "西安区",
  8189. "东辽县",
  8190. "东丰县"] },
  8191. {
  8192. "name": "通化市",
  8193. "area": [
  8194. "东昌区",
  8195. "二道江区",
  8196. "梅河口市",
  8197. "集安市",
  8198. "通化县",
  8199. "辉南县",
  8200. "柳河县"] },
  8201. {
  8202. "name": "白山市",
  8203. "area": [
  8204. "八道江区",
  8205. "江源区",
  8206. "临江市",
  8207. "靖宇县",
  8208. "抚松县",
  8209. "长白朝鲜族自治县"] },
  8210. {
  8211. "name": "松原市",
  8212. "area": [
  8213. "宁江区",
  8214. "乾安县",
  8215. "长岭县",
  8216. "扶余县",
  8217. "前郭尔罗斯蒙古族自治县"] },
  8218. {
  8219. "name": "白城市",
  8220. "area": [
  8221. "洮北区",
  8222. "大安市",
  8223. "洮南市",
  8224. "镇赉县",
  8225. "通榆县"] },
  8226. {
  8227. "name": "延边朝鲜族自治州",
  8228. "area": [
  8229. "延吉市",
  8230. "图们市",
  8231. "敦化市",
  8232. "龙井市",
  8233. "珲春市",
  8234. "和龙市",
  8235. "安图县",
  8236. "汪清县"] }] },
  8237. {
  8238. "name": "黑龙江省",
  8239. "city": [
  8240. {
  8241. "name": "哈尔滨市",
  8242. "area": [
  8243. "松北区",
  8244. "道里区",
  8245. "南岗区",
  8246. "平房区",
  8247. "香坊区",
  8248. "道外区",
  8249. "呼兰区",
  8250. "阿城区",
  8251. "双城市",
  8252. "尚志市",
  8253. "五常市",
  8254. "宾县",
  8255. "方正县",
  8256. "通河县",
  8257. "巴彦县",
  8258. "延寿县",
  8259. "木兰县",
  8260. "依兰县"] },
  8261. {
  8262. "name": "齐齐哈尔市",
  8263. "area": [
  8264. "龙沙区",
  8265. "昂昂溪区",
  8266. "铁锋区",
  8267. "建华区",
  8268. "富拉尔基区",
  8269. "碾子山区",
  8270. "梅里斯达斡尔族区",
  8271. "讷河市",
  8272. "富裕县",
  8273. "拜泉县",
  8274. "甘南县",
  8275. "依安县",
  8276. "克山县",
  8277. "泰来县",
  8278. "克东县",
  8279. "龙江县"] },
  8280. {
  8281. "name": "鹤岗市",
  8282. "area": [
  8283. "兴山区",
  8284. "工农区",
  8285. "南山区",
  8286. "兴安区",
  8287. "向阳区",
  8288. "东山区",
  8289. "萝北县",
  8290. "绥滨县"] },
  8291. {
  8292. "name": "双鸭山",
  8293. "area": [
  8294. "尖山区",
  8295. "岭东区",
  8296. "四方台区",
  8297. "宝山区",
  8298. "集贤县",
  8299. "宝清县",
  8300. "友谊县",
  8301. "饶河县"] },
  8302. {
  8303. "name": "鸡西市",
  8304. "area": [
  8305. "鸡冠区",
  8306. "恒山区",
  8307. "城子河区",
  8308. "滴道区",
  8309. "梨树区",
  8310. "麻山区",
  8311. "密山市",
  8312. "虎林市",
  8313. "鸡东县"] },
  8314. {
  8315. "name": "大庆市",
  8316. "area": [
  8317. "萨尔图区",
  8318. "红岗区",
  8319. "龙凤区",
  8320. "让胡路区",
  8321. "大同区",
  8322. "林甸县",
  8323. "肇州县",
  8324. "肇源县",
  8325. "杜尔伯特蒙古族自治县"] },
  8326. {
  8327. "name": "伊春市",
  8328. "area": [
  8329. "伊春区",
  8330. "带岭区",
  8331. "南岔区",
  8332. "金山屯区",
  8333. "西林区",
  8334. "美溪区",
  8335. "乌马河区",
  8336. "翠峦区",
  8337. "友好区",
  8338. "上甘岭区",
  8339. "五营区",
  8340. "红星区",
  8341. "新青区",
  8342. "汤旺河区",
  8343. "乌伊岭区",
  8344. "铁力市",
  8345. "嘉荫县"] },
  8346. {
  8347. "name": "牡丹江市",
  8348. "area": [
  8349. "爱民区",
  8350. "东安区",
  8351. "阳明区",
  8352. "西安区",
  8353. "绥芬河市",
  8354. "宁安市",
  8355. "海林市",
  8356. "穆棱市",
  8357. "林口县",
  8358. "东宁县"] },
  8359. {
  8360. "name": "佳木斯市",
  8361. "area": [
  8362. "向阳区",
  8363. "前进区",
  8364. "东风区",
  8365. "郊区",
  8366. "同江市",
  8367. "富锦市",
  8368. "桦川县",
  8369. "抚远县",
  8370. "桦南县",
  8371. "汤原县"] },
  8372. {
  8373. "name": "七台河市",
  8374. "area": [
  8375. "桃山区",
  8376. "新兴区",
  8377. "茄子河区",
  8378. "勃利县"] },
  8379. {
  8380. "name": "黑河市",
  8381. "area": [
  8382. "爱辉区",
  8383. "北安市",
  8384. "五大连池市",
  8385. "逊克县",
  8386. "嫩江县",
  8387. "孙吴县"] },
  8388. {
  8389. "name": "绥化市",
  8390. "area": [
  8391. "北林区",
  8392. "安达市",
  8393. "肇东市",
  8394. "海伦市",
  8395. "绥棱县",
  8396. "兰西县",
  8397. "明水县",
  8398. "青冈县",
  8399. "庆安县",
  8400. "望奎县"] },
  8401. {
  8402. "name": "大兴安岭地区",
  8403. "area": [
  8404. "呼玛县",
  8405. "塔河县",
  8406. "漠河县",
  8407. "大兴安岭辖区"] }] },
  8408. {
  8409. "name": "上海市",
  8410. "city": [
  8411. {
  8412. "name": "上海市",
  8413. "area": [
  8414. "黄浦区",
  8415. "卢湾区",
  8416. "徐汇区",
  8417. "长宁区",
  8418. "静安区",
  8419. "普陀区",
  8420. "闸北区",
  8421. "虹口区",
  8422. "杨浦区",
  8423. "宝山区",
  8424. "闵行区",
  8425. "嘉定区",
  8426. "松江区",
  8427. "金山区",
  8428. "青浦区",
  8429. "南汇区",
  8430. "奉贤区",
  8431. "浦东新区",
  8432. "崇明县"] }] },
  8433. {
  8434. "name": "江苏省",
  8435. "city": [
  8436. {
  8437. "name": "南京市",
  8438. "area": [
  8439. "玄武区",
  8440. "白下区",
  8441. "秦淮区",
  8442. "建邺区",
  8443. "鼓楼区",
  8444. "下关区",
  8445. "栖霞区",
  8446. "雨花台区",
  8447. "浦口区",
  8448. "江宁区",
  8449. "六合区",
  8450. "溧水县",
  8451. "高淳县"] },
  8452. {
  8453. "name": "苏州市",
  8454. "area": [
  8455. "金阊区",
  8456. "平江区",
  8457. "沧浪区",
  8458. "虎丘区",
  8459. "吴中区",
  8460. "相城区",
  8461. "常熟市",
  8462. "张家港市",
  8463. "昆山市",
  8464. "吴江市",
  8465. "太仓市"] },
  8466. {
  8467. "name": "无锡市",
  8468. "area": [
  8469. "崇安区",
  8470. "南长区",
  8471. "北塘区",
  8472. "滨湖区",
  8473. "锡山区",
  8474. "惠山区",
  8475. "江阴市",
  8476. "宜兴市"] },
  8477. {
  8478. "name": "常州市",
  8479. "area": [
  8480. "钟楼区",
  8481. "天宁区",
  8482. "戚墅堰区",
  8483. "新北区",
  8484. "武进区",
  8485. "金坛市",
  8486. "溧阳市"] },
  8487. {
  8488. "name": "镇江市",
  8489. "area": [
  8490. "京口区",
  8491. "润州区",
  8492. "丹徒区",
  8493. "丹阳市",
  8494. "扬中市",
  8495. "句容市"] },
  8496. {
  8497. "name": "南通市",
  8498. "area": [
  8499. "崇川区",
  8500. "港闸区",
  8501. "通州市",
  8502. "如皋市",
  8503. "海门市",
  8504. "启东市",
  8505. "海安县",
  8506. "如东县"] },
  8507. {
  8508. "name": "泰州市",
  8509. "area": [
  8510. "海陵区",
  8511. "高港区",
  8512. "姜堰市",
  8513. "泰兴市",
  8514. "靖江市",
  8515. "兴化市"] },
  8516. {
  8517. "name": "扬州市",
  8518. "area": [
  8519. "广陵区",
  8520. "维扬区",
  8521. "邗江区",
  8522. "江都市",
  8523. "仪征市",
  8524. "高邮市",
  8525. "宝应县"] },
  8526. {
  8527. "name": "盐城市",
  8528. "area": [
  8529. "亭湖区",
  8530. "盐都区",
  8531. "大丰市",
  8532. "东台市",
  8533. "建湖县",
  8534. "射阳县",
  8535. "阜宁县",
  8536. "滨海县",
  8537. "响水县"] },
  8538. {
  8539. "name": "连云港市",
  8540. "area": [
  8541. "新浦区",
  8542. "海州区",
  8543. "连云区",
  8544. "东海县",
  8545. "灌云县",
  8546. "赣榆县",
  8547. "灌南县"] },
  8548. {
  8549. "name": "徐州市",
  8550. "area": [
  8551. "云龙区",
  8552. "鼓楼区",
  8553. "九里区",
  8554. "泉山区",
  8555. "贾汪区",
  8556. "邳州市",
  8557. "新沂市",
  8558. "铜山县",
  8559. "睢宁县",
  8560. "沛县",
  8561. "丰县"] },
  8562. {
  8563. "name": "淮安市",
  8564. "area": [
  8565. "清河区",
  8566. "清浦区",
  8567. "楚州区",
  8568. "淮阴区",
  8569. "涟水县",
  8570. "洪泽县",
  8571. "金湖县",
  8572. "盱眙县"] },
  8573. {
  8574. "name": "宿迁市",
  8575. "area": [
  8576. "宿城区",
  8577. "宿豫区",
  8578. "沭阳县",
  8579. "泗阳县",
  8580. "泗洪县"] }] },
  8581. {
  8582. "name": "浙江省",
  8583. "city": [
  8584. {
  8585. "name": "杭州市",
  8586. "area": [
  8587. "拱墅区",
  8588. "西湖区",
  8589. "上城区",
  8590. "下城区",
  8591. "江干区",
  8592. "滨江区",
  8593. "余杭区",
  8594. "萧山区",
  8595. "建德市",
  8596. "富阳市",
  8597. "临安市",
  8598. "桐庐县",
  8599. "淳安县"] },
  8600. {
  8601. "name": "宁波市",
  8602. "area": [
  8603. "海曙区",
  8604. "江东区",
  8605. "江北区",
  8606. "镇海区",
  8607. "北仑区",
  8608. "鄞州区",
  8609. "余姚市",
  8610. "慈溪市",
  8611. "奉化市",
  8612. "宁海县",
  8613. "象山县"] },
  8614. {
  8615. "name": "温州市",
  8616. "area": [
  8617. "鹿城区",
  8618. "龙湾区",
  8619. "瓯海区",
  8620. "瑞安市",
  8621. "乐清市",
  8622. "永嘉县",
  8623. "洞头县",
  8624. "平阳县",
  8625. "苍南县",
  8626. "文成县",
  8627. "泰顺县"] },
  8628. {
  8629. "name": "嘉兴市",
  8630. "area": [
  8631. "秀城区",
  8632. "秀洲区",
  8633. "海宁市",
  8634. "平湖市",
  8635. "桐乡市",
  8636. "嘉善县",
  8637. "海盐县"] },
  8638. {
  8639. "name": "湖州市",
  8640. "area": [
  8641. "吴兴区",
  8642. "南浔区",
  8643. "长兴县",
  8644. "德清县",
  8645. "安吉县"] },
  8646. {
  8647. "name": "绍兴市",
  8648. "area": [
  8649. "越城区",
  8650. "诸暨市",
  8651. "上虞市",
  8652. "嵊州市",
  8653. "绍兴县",
  8654. "新昌县"] },
  8655. {
  8656. "name": "金华市",
  8657. "area": [
  8658. "婺城区",
  8659. "金东区",
  8660. "兰溪市",
  8661. "义乌市",
  8662. "东阳市",
  8663. "永康市",
  8664. "武义县",
  8665. "浦江县",
  8666. "磐安县"] },
  8667. {
  8668. "name": "衢州市",
  8669. "area": [
  8670. "柯城区",
  8671. "衢江区",
  8672. "江山市",
  8673. "龙游县",
  8674. "常山县",
  8675. "开化县"] },
  8676. {
  8677. "name": "舟山市",
  8678. "area": [
  8679. "定海区",
  8680. "普陀区",
  8681. "岱山县",
  8682. "嵊泗县"] },
  8683. {
  8684. "name": "台州市",
  8685. "area": [
  8686. "椒江区",
  8687. "黄岩区",
  8688. "路桥区",
  8689. "临海市",
  8690. "温岭市",
  8691. "玉环县",
  8692. "天台县",
  8693. "仙居县",
  8694. "三门县"] },
  8695. {
  8696. "name": "丽水市",
  8697. "area": [
  8698. "莲都区",
  8699. "龙泉市",
  8700. "缙云县",
  8701. "青田县",
  8702. "云和县",
  8703. "遂昌县",
  8704. "松阳县",
  8705. "庆元县",
  8706. "景宁畲族自治县"] }] },
  8707. {
  8708. "name": "安徽省",
  8709. "city": [
  8710. {
  8711. "name": "合肥市",
  8712. "area": [
  8713. "庐阳区",
  8714. "瑶海区",
  8715. "蜀山区",
  8716. "包河区",
  8717. "长丰县",
  8718. "肥东县",
  8719. "肥西县"] },
  8720. {
  8721. "name": "芜湖市",
  8722. "area": [
  8723. "镜湖区",
  8724. "弋江区",
  8725. "鸠江区",
  8726. "三山区",
  8727. "芜湖县",
  8728. "南陵县",
  8729. "繁昌县"] },
  8730. {
  8731. "name": "蚌埠市",
  8732. "area": [
  8733. "蚌山区",
  8734. "龙子湖区",
  8735. "禹会区",
  8736. "淮上区",
  8737. "怀远县",
  8738. "固镇县",
  8739. "五河县"] },
  8740. {
  8741. "name": "淮南市",
  8742. "area": [
  8743. "田家庵区",
  8744. "大通区",
  8745. "谢家集区",
  8746. "八公山区",
  8747. "潘集区",
  8748. "凤台县"] },
  8749. {
  8750. "name": "马鞍山市",
  8751. "area": [
  8752. "雨山区",
  8753. "花山区",
  8754. "金家庄区",
  8755. "当涂县"] },
  8756. {
  8757. "name": "淮北市",
  8758. "area": [
  8759. "相山区",
  8760. "杜集区",
  8761. "烈山区",
  8762. "濉溪县"] },
  8763. {
  8764. "name": "铜陵市",
  8765. "area": [
  8766. "铜官山区",
  8767. "狮子山区",
  8768. "郊区",
  8769. "铜陵县"] },
  8770. {
  8771. "name": "安庆市",
  8772. "area": [
  8773. "迎江区",
  8774. "大观区",
  8775. "宜秀区",
  8776. "桐城市",
  8777. "宿松县",
  8778. "枞阳县",
  8779. "太湖县",
  8780. "怀宁县",
  8781. "岳西县",
  8782. "望江县",
  8783. "潜山县"] },
  8784. {
  8785. "name": "黄山市",
  8786. "area": [
  8787. "屯溪区",
  8788. "黄山区",
  8789. "徽州区",
  8790. "休宁县",
  8791. "歙县",
  8792. "祁门县",
  8793. "黟县"] },
  8794. {
  8795. "name": "滁州市",
  8796. "area": [
  8797. "琅琊区",
  8798. "南谯区",
  8799. "天长市",
  8800. "明光市",
  8801. "全椒县",
  8802. "来安县",
  8803. "定远县",
  8804. "凤阳县"] },
  8805. {
  8806. "name": "阜阳市",
  8807. "area": [
  8808. "颍州区",
  8809. "颍东区",
  8810. "颍泉区",
  8811. "界首市",
  8812. "临泉县",
  8813. "颍上县",
  8814. "阜南县",
  8815. "太和县"] },
  8816. {
  8817. "name": "宿州市",
  8818. "area": [
  8819. "埇桥区",
  8820. "萧县",
  8821. "泗县",
  8822. "砀山县",
  8823. "灵璧县"] },
  8824. {
  8825. "name": "巢湖市",
  8826. "area": [
  8827. "居巢区",
  8828. "含山县",
  8829. "无为县",
  8830. "庐江县",
  8831. "和县"] },
  8832. {
  8833. "name": "六安市",
  8834. "area": [
  8835. "金安区",
  8836. "裕安区",
  8837. "寿县",
  8838. "霍山县",
  8839. "霍邱县",
  8840. "舒城县",
  8841. "金寨县"] },
  8842. {
  8843. "name": "亳州市",
  8844. "area": [
  8845. "谯城区",
  8846. "利辛县",
  8847. "涡阳县",
  8848. "蒙城县"] },
  8849. {
  8850. "name": "池州市",
  8851. "area": [
  8852. "贵池区",
  8853. "东至县",
  8854. "石台县",
  8855. "青阳县"] },
  8856. {
  8857. "name": "宣城市",
  8858. "area": [
  8859. "宣州区",
  8860. "宁国市",
  8861. "广德县",
  8862. "郎溪县",
  8863. "泾县",
  8864. "旌德县",
  8865. "绩溪县"] }] },
  8866. {
  8867. "name": "福建省",
  8868. "city": [
  8869. {
  8870. "name": "福州市",
  8871. "area": [
  8872. "鼓楼区",
  8873. "台江区",
  8874. "仓山区",
  8875. "马尾区",
  8876. "晋安区",
  8877. "福清市",
  8878. "长乐市",
  8879. "闽侯县",
  8880. "闽清县",
  8881. "永泰县",
  8882. "连江县",
  8883. "罗源县",
  8884. "平潭县"] },
  8885. {
  8886. "name": "厦门市",
  8887. "area": [
  8888. "思明区",
  8889. "海沧区",
  8890. "湖里区",
  8891. "集美区",
  8892. "同安区",
  8893. "翔安区"] },
  8894. {
  8895. "name": "莆田市",
  8896. "area": [
  8897. "城厢区",
  8898. "涵江区",
  8899. "荔城区",
  8900. "秀屿区",
  8901. "仙游县"] },
  8902. {
  8903. "name": "三明市",
  8904. "area": [
  8905. "梅列区",
  8906. "三元区",
  8907. "永安市",
  8908. "明溪县",
  8909. "将乐县",
  8910. "大田县",
  8911. "宁化县",
  8912. "建宁县",
  8913. "沙县",
  8914. "尤溪县",
  8915. "清流县",
  8916. "泰宁县"] },
  8917. {
  8918. "name": "泉州市",
  8919. "area": [
  8920. "鲤城区",
  8921. "丰泽区",
  8922. "洛江区",
  8923. "泉港区",
  8924. "石狮市",
  8925. "晋江市",
  8926. "南安市",
  8927. "惠安县",
  8928. "永春县",
  8929. "安溪县",
  8930. "德化县",
  8931. "金门县"] },
  8932. {
  8933. "name": "漳州市",
  8934. "area": [
  8935. "芗城区",
  8936. "龙文区",
  8937. "龙海市",
  8938. "平和县",
  8939. "南靖县",
  8940. "诏安县",
  8941. "漳浦县",
  8942. "华安县",
  8943. "东山县",
  8944. "长泰县",
  8945. "云霄县"] },
  8946. {
  8947. "name": "南平市",
  8948. "area": [
  8949. "延平区",
  8950. "建瓯市",
  8951. "邵武市",
  8952. "武夷山市",
  8953. "建阳市",
  8954. "松溪县",
  8955. "光泽县",
  8956. "顺昌县",
  8957. "浦城县",
  8958. "政和县"] },
  8959. {
  8960. "name": "龙岩市",
  8961. "area": [
  8962. "新罗区",
  8963. "漳平市",
  8964. "长汀县",
  8965. "武平县",
  8966. "上杭县",
  8967. "永定县",
  8968. "连城县"] },
  8969. {
  8970. "name": "宁德市",
  8971. "area": [
  8972. "蕉城区",
  8973. "福安市",
  8974. "福鼎市",
  8975. "寿宁县",
  8976. "霞浦县",
  8977. "柘荣县",
  8978. "屏南县",
  8979. "古田县",
  8980. "周宁县"] }] },
  8981. {
  8982. "name": "江西省",
  8983. "city": [
  8984. {
  8985. "name": "南昌市",
  8986. "area": [
  8987. "东湖区",
  8988. "西湖区",
  8989. "青云谱区",
  8990. "湾里区",
  8991. "青山湖区",
  8992. "新建县",
  8993. "南昌县",
  8994. "进贤县",
  8995. "安义县"] },
  8996. {
  8997. "name": "景德镇市",
  8998. "area": [
  8999. "珠山区",
  9000. "昌江区",
  9001. "乐平市",
  9002. "浮梁县"] },
  9003. {
  9004. "name": "萍乡市",
  9005. "area": [
  9006. "安源区",
  9007. "湘东区",
  9008. "莲花县",
  9009. "上栗县",
  9010. "芦溪县"] },
  9011. {
  9012. "name": "九江市",
  9013. "area": [
  9014. "浔阳区",
  9015. "庐山区",
  9016. "瑞昌市",
  9017. "九江县",
  9018. "星子县",
  9019. "武宁县",
  9020. "彭泽县",
  9021. "永修县",
  9022. "修水县",
  9023. "湖口县",
  9024. "德安县",
  9025. "都昌县"] },
  9026. {
  9027. "name": "新余市",
  9028. "area": [
  9029. "渝水区",
  9030. "分宜县"] },
  9031. {
  9032. "name": "鹰潭市",
  9033. "area": [
  9034. "月湖区",
  9035. "贵溪市",
  9036. "余江县"] },
  9037. {
  9038. "name": "赣州市",
  9039. "area": [
  9040. "章贡区",
  9041. "瑞金市",
  9042. "南康市",
  9043. "石城县",
  9044. "安远县",
  9045. "赣县",
  9046. "宁都县",
  9047. "寻乌县",
  9048. "兴国县",
  9049. "定南县",
  9050. "上犹县",
  9051. "于都县",
  9052. "龙南县",
  9053. "崇义县",
  9054. "信丰县",
  9055. "全南县",
  9056. "大余县",
  9057. "会昌县"] },
  9058. {
  9059. "name": "吉安市",
  9060. "area": [
  9061. "吉州区",
  9062. "青原区",
  9063. "井冈山市",
  9064. "吉安县",
  9065. "永丰县",
  9066. "永新县",
  9067. "新干县",
  9068. "泰和县",
  9069. "峡江县",
  9070. "遂川县",
  9071. "安福县",
  9072. "吉水县",
  9073. "万安县"] },
  9074. {
  9075. "name": "宜春市",
  9076. "area": [
  9077. "袁州区",
  9078. "丰城市",
  9079. "樟树市",
  9080. "高安市",
  9081. "铜鼓县",
  9082. "靖安县",
  9083. "宜丰县",
  9084. "奉新县",
  9085. "万载县",
  9086. "上高县"] },
  9087. {
  9088. "name": "抚州市",
  9089. "area": [
  9090. "临川区",
  9091. "南丰县",
  9092. "乐安县",
  9093. "金溪县",
  9094. "南城县",
  9095. "东乡县",
  9096. "资溪县",
  9097. "宜黄县",
  9098. "广昌县",
  9099. "黎川县",
  9100. "崇仁县"] },
  9101. {
  9102. "name": "上饶市",
  9103. "area": [
  9104. "信州区",
  9105. "德兴市",
  9106. "上饶县",
  9107. "广丰县",
  9108. "鄱阳县",
  9109. "婺源县",
  9110. "铅山县",
  9111. "余干县",
  9112. "横峰县",
  9113. "弋阳县",
  9114. "玉山县",
  9115. "万年县"] }] },
  9116. {
  9117. "name": "山东省",
  9118. "city": [
  9119. {
  9120. "name": "济南市",
  9121. "area": [
  9122. "市中区",
  9123. "历下区",
  9124. "天桥区",
  9125. "槐荫区",
  9126. "历城区",
  9127. "长清区",
  9128. "章丘市",
  9129. "平阴县",
  9130. "济阳县",
  9131. "商河县"] },
  9132. {
  9133. "name": "青岛市",
  9134. "area": [
  9135. "市南区",
  9136. "市北区",
  9137. "城阳区",
  9138. "四方区",
  9139. "李沧区",
  9140. "黄岛区",
  9141. "崂山区",
  9142. "胶南市",
  9143. "胶州市",
  9144. "平度市",
  9145. "莱西市",
  9146. "即墨市"] },
  9147. {
  9148. "name": "淄博市",
  9149. "area": [
  9150. "张店区",
  9151. "临淄区",
  9152. "淄川区",
  9153. "博山区",
  9154. "周村区",
  9155. "桓台县",
  9156. "高青县",
  9157. "沂源县"] },
  9158. {
  9159. "name": "枣庄市",
  9160. "area": [
  9161. "市中区",
  9162. "山亭区",
  9163. "峄城区",
  9164. "台儿庄区",
  9165. "薛城区",
  9166. "滕州市"] },
  9167. {
  9168. "name": "东营市",
  9169. "area": [
  9170. "东营区",
  9171. "河口区",
  9172. "垦利县",
  9173. "广饶县",
  9174. "利津县"] },
  9175. {
  9176. "name": "烟台市",
  9177. "area": [
  9178. "芝罘区",
  9179. "福山区",
  9180. "牟平区",
  9181. "莱山区",
  9182. "龙口市",
  9183. "莱阳市",
  9184. "莱州市",
  9185. "招远市",
  9186. "蓬莱市",
  9187. "栖霞市",
  9188. "海阳市",
  9189. "长岛县"] },
  9190. {
  9191. "name": "潍坊市",
  9192. "area": [
  9193. "潍城区",
  9194. "寒亭区",
  9195. "坊子区",
  9196. "奎文区",
  9197. "青州市",
  9198. "诸城市",
  9199. "寿光市",
  9200. "安丘市",
  9201. "高密市",
  9202. "昌邑市",
  9203. "昌乐县",
  9204. "临朐县"] },
  9205. {
  9206. "name": "济宁市",
  9207. "area": [
  9208. "市中区",
  9209. "任城区",
  9210. "曲阜市",
  9211. "兖州市",
  9212. "邹城市",
  9213. "鱼台县",
  9214. "金乡县",
  9215. "嘉祥县",
  9216. "微山县",
  9217. "汶上县",
  9218. "泗水县",
  9219. "梁山县"] },
  9220. {
  9221. "name": "泰安市",
  9222. "area": [
  9223. "泰山区",
  9224. "岱岳区",
  9225. "新泰市",
  9226. "肥城市",
  9227. "宁阳县",
  9228. "东平县"] },
  9229. {
  9230. "name": "威海市",
  9231. "area": [
  9232. "环翠区",
  9233. "乳山市",
  9234. "文登市",
  9235. "荣成市"] },
  9236. {
  9237. "name": "日照市",
  9238. "area": [
  9239. "东港区",
  9240. "岚山区",
  9241. "五莲县",
  9242. "莒县"] },
  9243. {
  9244. "name": "莱芜市",
  9245. "area": [
  9246. "莱城区",
  9247. "钢城区"] },
  9248. {
  9249. "name": "临沂市",
  9250. "area": [
  9251. "兰山区",
  9252. "罗庄区",
  9253. "河东区",
  9254. "沂南县",
  9255. "郯城县",
  9256. "沂水县",
  9257. "苍山县",
  9258. "费县",
  9259. "平邑县",
  9260. "莒南县",
  9261. "蒙阴县",
  9262. "临沭县"] },
  9263. {
  9264. "name": "德州市",
  9265. "area": [
  9266. "德城区",
  9267. "乐陵市",
  9268. "禹城市",
  9269. "陵县",
  9270. "宁津县",
  9271. "齐河县",
  9272. "武城县",
  9273. "庆云县",
  9274. "平原县",
  9275. "夏津县",
  9276. "临邑县"] },
  9277. {
  9278. "name": "聊城市",
  9279. "area": [
  9280. "东昌府区",
  9281. "临清市",
  9282. "高唐县",
  9283. "阳谷县",
  9284. "茌平县",
  9285. "莘县",
  9286. "东阿县",
  9287. "冠县"] },
  9288. {
  9289. "name": "滨州市",
  9290. "area": [
  9291. "滨城区",
  9292. "邹平县",
  9293. "沾化县",
  9294. "惠民县",
  9295. "博兴县",
  9296. "阳信县",
  9297. "无棣县"] },
  9298. {
  9299. "name": "菏泽市",
  9300. "area": [
  9301. "牡丹区",
  9302. "鄄城县",
  9303. "单县",
  9304. "郓城县",
  9305. "曹县",
  9306. "定陶县",
  9307. "巨野县",
  9308. "东明县",
  9309. "成武县"] }] },
  9310. {
  9311. "name": "河南省",
  9312. "city": [
  9313. {
  9314. "name": "郑州市",
  9315. "area": [
  9316. "中原区",
  9317. "金水区",
  9318. "二七区",
  9319. "管城回族区",
  9320. "上街区",
  9321. "惠济区",
  9322. "巩义市",
  9323. "新郑市",
  9324. "新密市",
  9325. "登封市",
  9326. "荥阳市",
  9327. "中牟县"] },
  9328. {
  9329. "name": "开封市",
  9330. "area": [
  9331. "鼓楼区",
  9332. "龙亭区",
  9333. "顺河回族区",
  9334. "禹王台区",
  9335. "金明区",
  9336. "开封县",
  9337. "尉氏县",
  9338. "兰考县",
  9339. "杞县",
  9340. "通许县"] },
  9341. {
  9342. "name": "洛阳市",
  9343. "area": [
  9344. "西工区",
  9345. "老城区",
  9346. "涧西区",
  9347. "瀍河回族区",
  9348. "洛龙区",
  9349. "吉利区",
  9350. "偃师市",
  9351. "孟津县",
  9352. "汝阳县",
  9353. "伊川县",
  9354. "洛宁县",
  9355. "嵩县",
  9356. "宜阳县",
  9357. "新安县",
  9358. "栾川县"] },
  9359. {
  9360. "name": "平顶山市",
  9361. "area": [
  9362. "新华区",
  9363. "卫东区",
  9364. "湛河区",
  9365. "石龙区",
  9366. "汝州市",
  9367. "舞钢市",
  9368. "宝丰县",
  9369. "叶县",
  9370. "郏县",
  9371. "鲁山县"] },
  9372. {
  9373. "name": "安阳市",
  9374. "area": [
  9375. "北关区",
  9376. "文峰区",
  9377. "殷都区",
  9378. "龙安区",
  9379. "林州市",
  9380. "安阳县",
  9381. "滑县",
  9382. "内黄县",
  9383. "汤阴县"] },
  9384. {
  9385. "name": "鹤壁市",
  9386. "area": [
  9387. "淇滨区",
  9388. "山城区",
  9389. "鹤山区",
  9390. "浚县",
  9391. "淇县"] },
  9392. {
  9393. "name": "新乡市",
  9394. "area": [
  9395. "卫滨区",
  9396. "红旗区",
  9397. "凤泉区",
  9398. "牧野区",
  9399. "卫辉市",
  9400. "辉县市",
  9401. "新乡县",
  9402. "获嘉县",
  9403. "原阳县",
  9404. "长垣县",
  9405. "封丘县",
  9406. "延津县"] },
  9407. {
  9408. "name": "焦作市",
  9409. "area": [
  9410. "解放区",
  9411. "中站区",
  9412. "马村区",
  9413. "山阳区",
  9414. "沁阳市",
  9415. "孟州市",
  9416. "修武县",
  9417. "温县",
  9418. "武陟县",
  9419. "博爱县"] },
  9420. {
  9421. "name": "濮阳市",
  9422. "area": [
  9423. "华龙区",
  9424. "濮阳县",
  9425. "南乐县",
  9426. "台前县",
  9427. "清丰县",
  9428. "范县"] },
  9429. {
  9430. "name": "许昌市",
  9431. "area": [
  9432. "魏都区",
  9433. "禹州市",
  9434. "长葛市",
  9435. "许昌县",
  9436. "鄢陵县",
  9437. "襄城县"] },
  9438. {
  9439. "name": "漯河市",
  9440. "area": [
  9441. "源汇区",
  9442. "郾城区",
  9443. "召陵区",
  9444. "临颍县",
  9445. "舞阳县"] },
  9446. {
  9447. "name": "三门峡市",
  9448. "area": [
  9449. "湖滨区",
  9450. "义马市",
  9451. "灵宝市",
  9452. "渑池县",
  9453. "卢氏县",
  9454. "陕县"] },
  9455. {
  9456. "name": "南阳市",
  9457. "area": [
  9458. "卧龙区",
  9459. "宛城区",
  9460. "邓州市",
  9461. "桐柏县",
  9462. "方城县",
  9463. "淅川县",
  9464. "镇平县",
  9465. "唐河县",
  9466. "南召县",
  9467. "内乡县",
  9468. "新野县",
  9469. "社旗县",
  9470. "西峡县"] },
  9471. {
  9472. "name": "商丘市",
  9473. "area": [
  9474. "梁园区",
  9475. "睢阳区",
  9476. "永城市",
  9477. "宁陵县",
  9478. "虞城县",
  9479. "民权县",
  9480. "夏邑县",
  9481. "柘城县",
  9482. "睢县"] },
  9483. {
  9484. "name": "信阳市",
  9485. "area": [
  9486. "浉河区",
  9487. "平桥区",
  9488. "潢川县",
  9489. "淮滨县",
  9490. "息县",
  9491. "新县",
  9492. "商城县",
  9493. "固始县",
  9494. "罗山县",
  9495. "光山县"] },
  9496. {
  9497. "name": "周口市",
  9498. "area": [
  9499. "川汇区",
  9500. "项城市",
  9501. "商水县",
  9502. "淮阳县",
  9503. "太康县",
  9504. "鹿邑县",
  9505. "西华县",
  9506. "扶沟县",
  9507. "沈丘县",
  9508. "郸城县"] },
  9509. {
  9510. "name": "驻马店市",
  9511. "area": [
  9512. "驿城区",
  9513. "确山县",
  9514. "新蔡县",
  9515. "上蔡县",
  9516. "西平县",
  9517. "泌阳县",
  9518. "平舆县",
  9519. "汝南县",
  9520. "遂平县",
  9521. "正阳县"] },
  9522. {
  9523. "name": "焦作市",
  9524. "area": [
  9525. "济源市"] }] },
  9526. {
  9527. "name": "湖北省",
  9528. "city": [
  9529. {
  9530. "name": "武汉市",
  9531. "area": [
  9532. "江岸区",
  9533. "武昌区",
  9534. "江汉区",
  9535. "硚口区",
  9536. "汉阳区",
  9537. "青山区",
  9538. "洪山区",
  9539. "东西湖区",
  9540. "汉南区",
  9541. "蔡甸区",
  9542. "江夏区",
  9543. "黄陂区",
  9544. "新洲区"] },
  9545. {
  9546. "name": "黄石市",
  9547. "area": [
  9548. "黄石港区",
  9549. "西塞山区",
  9550. "下陆区",
  9551. "铁山区",
  9552. "大冶市",
  9553. "阳新县"] },
  9554. {
  9555. "name": "十堰市",
  9556. "area": [
  9557. "张湾区",
  9558. "茅箭区",
  9559. "丹江口市",
  9560. "郧县",
  9561. "竹山县",
  9562. "房县",
  9563. "郧西县",
  9564. "竹溪县"] },
  9565. {
  9566. "name": "荆州市",
  9567. "area": [
  9568. "沙市区",
  9569. "荆州区",
  9570. "洪湖市",
  9571. "石首市",
  9572. "松滋市",
  9573. "监利县",
  9574. "公安县",
  9575. "江陵县"] },
  9576. {
  9577. "name": "宜昌市",
  9578. "area": [
  9579. "西陵区",
  9580. "伍家岗区",
  9581. "点军区",
  9582. "猇亭区",
  9583. "夷陵区",
  9584. "宜都市",
  9585. "当阳市",
  9586. "枝江市",
  9587. "秭归县",
  9588. "远安县",
  9589. "兴山县",
  9590. "五峰土家族自治县",
  9591. "长阳土家族自治县"] },
  9592. {
  9593. "name": "襄樊市",
  9594. "area": [
  9595. "襄城区",
  9596. "樊城区",
  9597. "襄阳区",
  9598. "老河口市",
  9599. "枣阳市",
  9600. "宜城市",
  9601. "南漳县",
  9602. "谷城县",
  9603. "保康县"] },
  9604. {
  9605. "name": "鄂州市",
  9606. "area": [
  9607. "鄂城区",
  9608. "华容区",
  9609. "梁子湖区"] },
  9610. {
  9611. "name": "荆门市",
  9612. "area": [
  9613. "东宝区",
  9614. "掇刀区",
  9615. "钟祥市",
  9616. "京山县",
  9617. "沙洋县"] },
  9618. {
  9619. "name": "孝感市",
  9620. "area": [
  9621. "孝南区",
  9622. "应城市",
  9623. "安陆市",
  9624. "汉川市",
  9625. "云梦县",
  9626. "大悟县",
  9627. "孝昌县"] },
  9628. {
  9629. "name": "黄冈市",
  9630. "area": [
  9631. "黄州区",
  9632. "麻城市",
  9633. "武穴市",
  9634. "红安县",
  9635. "罗田县",
  9636. "浠水县",
  9637. "蕲春县",
  9638. "黄梅县",
  9639. "英山县",
  9640. "团风县"] },
  9641. {
  9642. "name": "咸宁市",
  9643. "area": [
  9644. "咸安区",
  9645. "赤壁市",
  9646. "嘉鱼县",
  9647. "通山县",
  9648. "崇阳县",
  9649. "通城县"] },
  9650. {
  9651. "name": "随州市",
  9652. "area": [
  9653. "曾都区",
  9654. "广水市"] },
  9655. {
  9656. "name": "恩施土家族苗族自治州",
  9657. "area": [
  9658. "恩施市",
  9659. "利川市",
  9660. "建始县",
  9661. "来凤县",
  9662. "巴东县",
  9663. "鹤峰县",
  9664. "宣恩县",
  9665. "咸丰县"] },
  9666. {
  9667. "name": "仙桃市",
  9668. "area": [
  9669. "仙桃"] },
  9670. {
  9671. "name": "天门市",
  9672. "area": [
  9673. "天门"] },
  9674. {
  9675. "name": "潜江市",
  9676. "area": [
  9677. "潜江"] },
  9678. {
  9679. "name": "神农架林区",
  9680. "area": [
  9681. "神农架林区"] }] },
  9682. {
  9683. "name": "湖南省",
  9684. "city": [
  9685. {
  9686. "name": "长沙市",
  9687. "area": [
  9688. "岳麓区",
  9689. "芙蓉区",
  9690. "天心区",
  9691. "开福区",
  9692. "雨花区",
  9693. "浏阳市",
  9694. "长沙县",
  9695. "望城县",
  9696. "宁乡县"] },
  9697. {
  9698. "name": "株洲市",
  9699. "area": [
  9700. "天元区",
  9701. "荷塘区",
  9702. "芦淞区",
  9703. "石峰区",
  9704. "醴陵市",
  9705. "株洲县",
  9706. "炎陵县",
  9707. "茶陵县",
  9708. "攸县"] },
  9709. {
  9710. "name": "湘潭市",
  9711. "area": [
  9712. "岳塘区",
  9713. "雨湖区",
  9714. "湘乡市",
  9715. "韶山市",
  9716. "湘潭县"] },
  9717. {
  9718. "name": "衡阳市",
  9719. "area": [
  9720. "雁峰区",
  9721. "珠晖区",
  9722. "石鼓区",
  9723. "蒸湘区",
  9724. "南岳区",
  9725. "耒阳市",
  9726. "常宁市",
  9727. "衡阳县",
  9728. "衡东县",
  9729. "衡山县",
  9730. "衡南县",
  9731. "祁东县"] },
  9732. {
  9733. "name": "邵阳市",
  9734. "area": [
  9735. "双清区",
  9736. "大祥区",
  9737. "北塔区",
  9738. "武冈市",
  9739. "邵东县",
  9740. "洞口县",
  9741. "新邵县",
  9742. "绥宁县",
  9743. "新宁县",
  9744. "邵阳县",
  9745. "隆回县",
  9746. "城步苗族自治县"] },
  9747. {
  9748. "name": "岳阳市",
  9749. "area": [
  9750. "岳阳楼区",
  9751. "云溪区",
  9752. "君山区",
  9753. "临湘市",
  9754. "汨罗市",
  9755. "岳阳县",
  9756. "湘阴县",
  9757. "平江县",
  9758. "华容县"] },
  9759. {
  9760. "name": "常德市",
  9761. "area": [
  9762. "武陵区",
  9763. "鼎城区",
  9764. "津市市",
  9765. "澧县",
  9766. "临澧县",
  9767. "桃源县",
  9768. "汉寿县",
  9769. "安乡县",
  9770. "石门县"] },
  9771. {
  9772. "name": "张家界市",
  9773. "area": [
  9774. "永定区",
  9775. "武陵源区",
  9776. "慈利县",
  9777. "桑植县"] },
  9778. {
  9779. "name": "益阳市",
  9780. "area": [
  9781. "赫山区",
  9782. "资阳区",
  9783. "沅江市",
  9784. "桃江县",
  9785. "南县",
  9786. "安化县"] },
  9787. {
  9788. "name": "郴州市",
  9789. "area": [
  9790. "北湖区",
  9791. "苏仙区",
  9792. "资兴市",
  9793. "宜章县",
  9794. "汝城县",
  9795. "安仁县",
  9796. "嘉禾县",
  9797. "临武县",
  9798. "桂东县",
  9799. "永兴县",
  9800. "桂阳县"] },
  9801. {
  9802. "name": "永州市",
  9803. "area": [
  9804. "冷水滩区",
  9805. "零陵区",
  9806. "祁阳县",
  9807. "蓝山县",
  9808. "宁远县",
  9809. "新田县",
  9810. "东安县",
  9811. "江永县",
  9812. "道县",
  9813. "双牌县",
  9814. "江华瑶族自治县"] },
  9815. {
  9816. "name": "怀化市",
  9817. "area": [
  9818. "鹤城区",
  9819. "洪江市",
  9820. "会同县",
  9821. "沅陵县",
  9822. "辰溪县",
  9823. "溆浦县",
  9824. "中方县",
  9825. "新晃侗族自治县",
  9826. "芷江侗族自治县",
  9827. "通道侗族自治县",
  9828. "靖州苗族侗族自治县",
  9829. "麻阳苗族自治县"] },
  9830. {
  9831. "name": "娄底市",
  9832. "area": [
  9833. "娄星区",
  9834. "冷水江市",
  9835. "涟源市",
  9836. "新化县",
  9837. "双峰县"] },
  9838. {
  9839. "name": "湘西土家族苗族自治州",
  9840. "area": [
  9841. "吉首市",
  9842. "古丈县",
  9843. "龙山县",
  9844. "永顺县",
  9845. "凤凰县",
  9846. "泸溪县",
  9847. "保靖县",
  9848. "花垣县"] }] },
  9849. {
  9850. "name": "广东省",
  9851. "city": [
  9852. {
  9853. "name": "广州市",
  9854. "area": [
  9855. "越秀区",
  9856. "荔湾区",
  9857. "海珠区",
  9858. "天河区",
  9859. "白云区",
  9860. "黄埔区",
  9861. "番禺区",
  9862. "花都区",
  9863. "南沙区",
  9864. "萝岗区",
  9865. "增城市",
  9866. "从化市"] },
  9867. {
  9868. "name": "深圳市",
  9869. "area": [
  9870. "福田区",
  9871. "罗湖区",
  9872. "南山区",
  9873. "宝安区",
  9874. "龙岗区",
  9875. "盐田区"] },
  9876. {
  9877. "name": "东莞市",
  9878. "area": [
  9879. "莞城",
  9880. "常平",
  9881. "塘厦",
  9882. "塘厦",
  9883. "塘厦"] },
  9884. {
  9885. "name": "中山市",
  9886. "area": [
  9887. "中山"] },
  9888. {
  9889. "name": "潮州市",
  9890. "area": [
  9891. "湘桥区",
  9892. "潮安县",
  9893. "饶平县"] },
  9894. {
  9895. "name": "揭阳市",
  9896. "area": [
  9897. "榕城区",
  9898. "揭东县",
  9899. "揭西县",
  9900. "惠来县",
  9901. "普宁市"] },
  9902. {
  9903. "name": "云浮市",
  9904. "area": [
  9905. "云城区",
  9906. "新兴县",
  9907. "郁南县",
  9908. "云安县",
  9909. "罗定市"] },
  9910. {
  9911. "name": "珠海市",
  9912. "area": [
  9913. "香洲区",
  9914. "斗门区",
  9915. "金湾区"] },
  9916. {
  9917. "name": "汕头市",
  9918. "area": [
  9919. "金平区",
  9920. "濠江区",
  9921. "龙湖区",
  9922. "潮阳区",
  9923. "潮南区",
  9924. "澄海区",
  9925. "南澳县"] },
  9926. {
  9927. "name": "韶关市",
  9928. "area": [
  9929. "浈江区",
  9930. "武江区",
  9931. "曲江区",
  9932. "乐昌市",
  9933. "南雄市",
  9934. "始兴县",
  9935. "仁化县",
  9936. "翁源县",
  9937. "新丰县",
  9938. "乳源瑶族自治县"] },
  9939. {
  9940. "name": "佛山市",
  9941. "area": [
  9942. "禅城区",
  9943. "南海区",
  9944. "顺德区",
  9945. "三水区",
  9946. "高明区"] },
  9947. {
  9948. "name": "江门市",
  9949. "area": [
  9950. "蓬江区",
  9951. "江海区",
  9952. "新会区",
  9953. "恩平市",
  9954. "台山市",
  9955. "开平市",
  9956. "鹤山市"] },
  9957. {
  9958. "name": "湛江市",
  9959. "area": [
  9960. "赤坎区",
  9961. "霞山区",
  9962. "坡头区",
  9963. "麻章区",
  9964. "吴川市",
  9965. "廉江市",
  9966. "雷州市",
  9967. "遂溪县",
  9968. "徐闻县"] },
  9969. {
  9970. "name": "茂名市",
  9971. "area": [
  9972. "茂南区",
  9973. "茂港区",
  9974. "化州市",
  9975. "信宜市",
  9976. "高州市",
  9977. "电白县"] },
  9978. {
  9979. "name": "肇庆市",
  9980. "area": [
  9981. "端州区",
  9982. "鼎湖区",
  9983. "高要市",
  9984. "四会市",
  9985. "广宁县",
  9986. "怀集县",
  9987. "封开县",
  9988. "德庆县"] },
  9989. {
  9990. "name": "惠州市",
  9991. "area": [
  9992. "惠城区",
  9993. "惠阳区",
  9994. "博罗县",
  9995. "惠东县",
  9996. "龙门县"] },
  9997. {
  9998. "name": "梅州市",
  9999. "area": [
  10000. "梅江区",
  10001. "兴宁市",
  10002. "梅县",
  10003. "大埔县",
  10004. "丰顺县",
  10005. "五华县",
  10006. "平远县",
  10007. "蕉岭县"] },
  10008. {
  10009. "name": "汕尾市",
  10010. "area": [
  10011. "城区",
  10012. "陆丰市",
  10013. "海丰县",
  10014. "陆河县"] },
  10015. {
  10016. "name": "河源市",
  10017. "area": [
  10018. "源城区",
  10019. "紫金县",
  10020. "龙川县",
  10021. "连平县",
  10022. "和平县",
  10023. "东源县"] },
  10024. {
  10025. "name": "阳江市",
  10026. "area": [
  10027. "江城区",
  10028. "阳春市",
  10029. "阳西县",
  10030. "阳东县"] },
  10031. {
  10032. "name": "清远市",
  10033. "area": [
  10034. "清城区",
  10035. "英德市",
  10036. "连州市",
  10037. "佛冈县",
  10038. "阳山县",
  10039. "清新县",
  10040. "连山壮族瑶族自治县",
  10041. "连南瑶族自治县"] }] },
  10042. {
  10043. "name": "广西",
  10044. "city": [
  10045. {
  10046. "name": "南宁市",
  10047. "area": [
  10048. "青秀区",
  10049. "兴宁区",
  10050. "西乡塘区",
  10051. "良庆区",
  10052. "江南区",
  10053. "邕宁区",
  10054. "武鸣县",
  10055. "隆安县",
  10056. "马山县",
  10057. "上林县",
  10058. "宾阳县",
  10059. "横县"] },
  10060. {
  10061. "name": "柳州市",
  10062. "area": [
  10063. "城中区",
  10064. "鱼峰区",
  10065. "柳北区",
  10066. "柳南区",
  10067. "柳江县",
  10068. "柳城县",
  10069. "鹿寨县",
  10070. "融安县",
  10071. "融水苗族自治县",
  10072. "三江侗族自治县"] },
  10073. {
  10074. "name": "桂林市",
  10075. "area": [
  10076. "象山区",
  10077. "秀峰区",
  10078. "叠彩区",
  10079. "七星区",
  10080. "雁山区",
  10081. "阳朔县",
  10082. "临桂县",
  10083. "灵川县",
  10084. "全州县",
  10085. "平乐县",
  10086. "兴安县",
  10087. "灌阳县",
  10088. "荔浦县",
  10089. "资源县",
  10090. "永福县",
  10091. "龙胜各族自治县",
  10092. "恭城瑶族自治县"] },
  10093. {
  10094. "name": "梧州市",
  10095. "area": [
  10096. "万秀区",
  10097. "蝶山区",
  10098. "长洲区",
  10099. "岑溪市",
  10100. "苍梧县",
  10101. "藤县",
  10102. "蒙山县"] },
  10103. {
  10104. "name": "北海市",
  10105. "area": [
  10106. "海城区",
  10107. "银海区",
  10108. "铁山港区",
  10109. "合浦县"] },
  10110. {
  10111. "name": "防城港市",
  10112. "area": [
  10113. "港口区",
  10114. "防城区",
  10115. "东兴市",
  10116. "上思县"] },
  10117. {
  10118. "name": "钦州市",
  10119. "area": [
  10120. "钦南区",
  10121. "钦北区",
  10122. "灵山县",
  10123. "浦北县"] },
  10124. {
  10125. "name": "贵港市",
  10126. "area": [
  10127. "港北区",
  10128. "港南区",
  10129. "覃塘区",
  10130. "桂平市",
  10131. "平南县"] },
  10132. {
  10133. "name": "玉林市",
  10134. "area": [
  10135. "玉州区",
  10136. "北流市",
  10137. "容县",
  10138. "陆川县",
  10139. "博白县",
  10140. "兴业县"] },
  10141. {
  10142. "name": "百色市",
  10143. "area": [
  10144. "右江区",
  10145. "凌云县",
  10146. "平果县",
  10147. "西林县",
  10148. "乐业县",
  10149. "德保县",
  10150. "田林县",
  10151. "田阳县",
  10152. "靖西县",
  10153. "田东县",
  10154. "那坡县",
  10155. "隆林各族自治县"] },
  10156. {
  10157. "name": "贺州市",
  10158. "area": [
  10159. "八步区",
  10160. "钟山县",
  10161. "昭平县",
  10162. "富川瑶族自治县"] },
  10163. {
  10164. "name": "河池市",
  10165. "area": [
  10166. "金城江区",
  10167. "宜州市",
  10168. "天峨县",
  10169. "凤山县",
  10170. "南丹县",
  10171. "东兰县",
  10172. "都安瑶族自治县",
  10173. "罗城仫佬族自治县",
  10174. "巴马瑶族自治县",
  10175. "环江毛南族自治县",
  10176. "大化瑶族自治县"] },
  10177. {
  10178. "name": "来宾市",
  10179. "area": [
  10180. "兴宾区",
  10181. "合山市",
  10182. "象州县",
  10183. "武宣县",
  10184. "忻城县",
  10185. "金秀瑶族自治县"] },
  10186. {
  10187. "name": "崇左市",
  10188. "area": [
  10189. "江州区",
  10190. "凭祥市",
  10191. "宁明县",
  10192. "扶绥县",
  10193. "龙州县",
  10194. "大新县",
  10195. "天等县"] }] },
  10196. {
  10197. "name": "海南省",
  10198. "city": [
  10199. {
  10200. "name": "海口市",
  10201. "area": [
  10202. "龙华区",
  10203. "秀英区",
  10204. "琼山区",
  10205. "美兰区"] },
  10206. {
  10207. "name": "三亚市",
  10208. "area": [
  10209. "三亚市"] },
  10210. {
  10211. "name": "五指山市",
  10212. "area": [
  10213. "五指山"] },
  10214. {
  10215. "name": "琼海市",
  10216. "area": [
  10217. "琼海"] },
  10218. {
  10219. "name": "儋州市",
  10220. "area": [
  10221. "儋州"] },
  10222. {
  10223. "name": "文昌市",
  10224. "area": [
  10225. "文昌"] },
  10226. {
  10227. "name": "万宁市",
  10228. "area": [
  10229. "万宁"] },
  10230. {
  10231. "name": "东方市",
  10232. "area": [
  10233. "东方"] },
  10234. {
  10235. "name": "澄迈县",
  10236. "area": [
  10237. "澄迈县"] },
  10238. {
  10239. "name": "定安县",
  10240. "area": [
  10241. "定安县"] },
  10242. {
  10243. "name": "屯昌县",
  10244. "area": [
  10245. "屯昌县"] },
  10246. {
  10247. "name": "临高县",
  10248. "area": [
  10249. "临高县"] },
  10250. {
  10251. "name": "白沙黎族自治县",
  10252. "area": [
  10253. "白沙黎族自治县"] },
  10254. {
  10255. "name": "昌江黎族自治县",
  10256. "area": [
  10257. "昌江黎族自治县"] },
  10258. {
  10259. "name": "乐东黎族自治县",
  10260. "area": [
  10261. "乐东黎族自治县"] },
  10262. {
  10263. "name": "陵水黎族自治县",
  10264. "area": [
  10265. "陵水黎族自治县"] },
  10266. {
  10267. "name": "保亭黎族苗族自治县",
  10268. "area": [
  10269. "保亭黎族苗族自治县"] },
  10270. {
  10271. "name": "琼中黎族苗族自治县",
  10272. "area": [
  10273. "琼中黎族苗族自治县"] }] },
  10274. {
  10275. "name": "重庆市",
  10276. "city": [
  10277. {
  10278. "name": "重庆市",
  10279. "area": [
  10280. "渝中区",
  10281. "大渡口区",
  10282. "江北区",
  10283. "南岸区",
  10284. "北碚区",
  10285. "渝北区",
  10286. "巴南区",
  10287. "长寿区",
  10288. "双桥区",
  10289. "沙坪坝区",
  10290. "万盛区",
  10291. "万州区",
  10292. "涪陵区",
  10293. "黔江区",
  10294. "永川区",
  10295. "合川区",
  10296. "江津区",
  10297. "九龙坡区",
  10298. "南川区",
  10299. "綦江县",
  10300. "潼南县",
  10301. "荣昌县",
  10302. "璧山县",
  10303. "大足县",
  10304. "铜梁县",
  10305. "梁平县",
  10306. "开县",
  10307. "忠县",
  10308. "城口县",
  10309. "垫江县",
  10310. "武隆县",
  10311. "丰都县",
  10312. "奉节县",
  10313. "云阳县",
  10314. "巫溪县",
  10315. "巫山县",
  10316. "石柱土家族自治县",
  10317. "秀山土家族苗族自治县",
  10318. "酉阳土家族苗族自治县",
  10319. "彭水苗族土家族自治县"] }] },
  10320. {
  10321. "name": "四川省",
  10322. "city": [
  10323. {
  10324. "name": "成都市",
  10325. "area": [
  10326. "青羊区",
  10327. "锦江区",
  10328. "金牛区",
  10329. "武侯区",
  10330. "成华区",
  10331. "龙泉驿区",
  10332. "青白江区",
  10333. "新都区",
  10334. "温江区",
  10335. "都江堰市",
  10336. "彭州市",
  10337. "邛崃市",
  10338. "崇州市",
  10339. "金堂县",
  10340. "郫县",
  10341. "新津县",
  10342. "双流县",
  10343. "蒲江县",
  10344. "大邑县"] },
  10345. {
  10346. "name": "自贡市",
  10347. "area": [
  10348. "大安区",
  10349. "自流井区",
  10350. "贡井区",
  10351. "沿滩区",
  10352. "荣县",
  10353. "富顺县"] },
  10354. {
  10355. "name": "攀枝花市",
  10356. "area": [
  10357. "仁和区",
  10358. "米易县",
  10359. "盐边县",
  10360. "东区",
  10361. "西区"] },
  10362. {
  10363. "name": "泸州市",
  10364. "area": [
  10365. "江阳区",
  10366. "纳溪区",
  10367. "龙马潭区",
  10368. "泸县",
  10369. "合江县",
  10370. "叙永县",
  10371. "古蔺县"] },
  10372. {
  10373. "name": "德阳市",
  10374. "area": [
  10375. "旌阳区",
  10376. "广汉市",
  10377. "什邡市",
  10378. "绵竹市",
  10379. "罗江县",
  10380. "中江县"] },
  10381. {
  10382. "name": "绵阳市",
  10383. "area": [
  10384. "涪城区",
  10385. "游仙区",
  10386. "江油市",
  10387. "盐亭县",
  10388. "三台县",
  10389. "平武县",
  10390. "安县",
  10391. "梓潼县",
  10392. "北川羌族自治县"] },
  10393. {
  10394. "name": "广元市",
  10395. "area": [
  10396. "元坝区",
  10397. "朝天区",
  10398. "青川县",
  10399. "旺苍县",
  10400. "剑阁县",
  10401. "苍溪县",
  10402. "市中区"] },
  10403. {
  10404. "name": "遂宁市",
  10405. "area": [
  10406. "船山区",
  10407. "安居区",
  10408. "射洪县",
  10409. "蓬溪县",
  10410. "大英县"] },
  10411. {
  10412. "name": "内江市",
  10413. "area": [
  10414. "市中区",
  10415. "东兴区",
  10416. "资中县",
  10417. "隆昌县",
  10418. "威远县"] },
  10419. {
  10420. "name": "乐山市",
  10421. "area": [
  10422. "市中区",
  10423. "五通桥区",
  10424. "沙湾区",
  10425. "金口河区",
  10426. "峨眉山市",
  10427. "夹江县",
  10428. "井研县",
  10429. "犍为县",
  10430. "沐川县",
  10431. "马边彝族自治县",
  10432. "峨边彝族自治县"] },
  10433. {
  10434. "name": "南充",
  10435. "area": [
  10436. "顺庆区",
  10437. "高坪区",
  10438. "嘉陵区",
  10439. "阆中市",
  10440. "营山县",
  10441. "蓬安县",
  10442. "仪陇县",
  10443. "南部县",
  10444. "西充县"] },
  10445. {
  10446. "name": "眉山市",
  10447. "area": [
  10448. "东坡区",
  10449. "仁寿县",
  10450. "彭山县",
  10451. "洪雅县",
  10452. "丹棱县",
  10453. "青神县"] },
  10454. {
  10455. "name": "宜宾市",
  10456. "area": [
  10457. "翠屏区",
  10458. "宜宾县",
  10459. "兴文县",
  10460. "南溪县",
  10461. "珙县",
  10462. "长宁县",
  10463. "高县",
  10464. "江安县",
  10465. "筠连县",
  10466. "屏山县"] },
  10467. {
  10468. "name": "广安市",
  10469. "area": [
  10470. "广安区",
  10471. "华蓥市",
  10472. "岳池县",
  10473. "邻水县",
  10474. "武胜县"] },
  10475. {
  10476. "name": "达州市",
  10477. "area": [
  10478. "通川区",
  10479. "万源市",
  10480. "达县",
  10481. "渠县",
  10482. "宣汉县",
  10483. "开江县",
  10484. "大竹县"] },
  10485. {
  10486. "name": "雅安市",
  10487. "area": [
  10488. "雨城区",
  10489. "芦山县",
  10490. "石棉县",
  10491. "名山县",
  10492. "天全县",
  10493. "荥经县",
  10494. "宝兴县",
  10495. "汉源县"] },
  10496. {
  10497. "name": "巴中市",
  10498. "area": [
  10499. "巴州区",
  10500. "南江县",
  10501. "平昌县",
  10502. "通江县"] },
  10503. {
  10504. "name": "资阳市",
  10505. "area": [
  10506. "雁江区",
  10507. "简阳市",
  10508. "安岳县",
  10509. "乐至县"] },
  10510. {
  10511. "name": "阿坝藏族羌族自治州",
  10512. "area": [
  10513. "马尔康县",
  10514. "九寨沟县",
  10515. "红原县",
  10516. "汶川县",
  10517. "阿坝县",
  10518. "理县",
  10519. "若尔盖县",
  10520. "小金县",
  10521. "黑水县",
  10522. "金川县",
  10523. "松潘县",
  10524. "壤塘县",
  10525. "茂县"] },
  10526. {
  10527. "name": "甘孜藏族自治州",
  10528. "area": [
  10529. "康定县",
  10530. "丹巴县",
  10531. "炉霍县",
  10532. "九龙县",
  10533. "甘孜县",
  10534. "雅江县",
  10535. "新龙县",
  10536. "道孚县",
  10537. "白玉县",
  10538. "理塘县",
  10539. "德格县",
  10540. "乡城县",
  10541. "石渠县",
  10542. "稻城县",
  10543. "色达县",
  10544. "巴塘县",
  10545. "泸定县",
  10546. "得荣县"] },
  10547. {
  10548. "name": "凉山彝族自治州",
  10549. "area": [
  10550. "西昌市",
  10551. "美姑县",
  10552. "昭觉县",
  10553. "金阳县",
  10554. "甘洛县",
  10555. "布拖县",
  10556. "雷波县",
  10557. "普格县",
  10558. "宁南县",
  10559. "喜德县",
  10560. "会东县",
  10561. "越西县",
  10562. "会理县",
  10563. "盐源县",
  10564. "德昌县",
  10565. "冕宁县",
  10566. "木里藏族自治县"] }] },
  10567. {
  10568. "name": "贵州省",
  10569. "city": [
  10570. {
  10571. "name": "贵阳市",
  10572. "area": [
  10573. "南明区",
  10574. "云岩区",
  10575. "花溪区",
  10576. "乌当区",
  10577. "白云区",
  10578. "小河区",
  10579. "清镇市",
  10580. "开阳县",
  10581. "修文县",
  10582. "息烽县"] },
  10583. {
  10584. "name": "六盘水市",
  10585. "area": [
  10586. "钟山区",
  10587. "水城县",
  10588. "盘县",
  10589. "六枝特区"] },
  10590. {
  10591. "name": "遵义市",
  10592. "area": [
  10593. "红花岗区",
  10594. "汇川区",
  10595. "赤水市",
  10596. "仁怀市",
  10597. "遵义县",
  10598. "绥阳县",
  10599. "桐梓县",
  10600. "习水县",
  10601. "凤冈县",
  10602. "正安县",
  10603. "余庆县",
  10604. "湄潭县",
  10605. "道真仡佬族苗族自治县",
  10606. "务川仡佬族苗族自治县"] },
  10607. {
  10608. "name": "安顺市",
  10609. "area": [
  10610. "西秀区",
  10611. "普定县",
  10612. "平坝县",
  10613. "镇宁布依族苗族自治县",
  10614. "紫云苗族布依族自治县",
  10615. "关岭布依族苗族自治县"] },
  10616. {
  10617. "name": "铜仁地区",
  10618. "area": [
  10619. "铜仁市",
  10620. "德江县",
  10621. "江口县",
  10622. "思南县",
  10623. "石阡县",
  10624. "玉屏侗族自治县",
  10625. "松桃苗族自治县",
  10626. "印江土家族苗族自治县",
  10627. "沿河土家族自治县",
  10628. "万山特区"] },
  10629. {
  10630. "name": "毕节地区",
  10631. "area": [
  10632. "毕节市",
  10633. "黔西县",
  10634. "大方县",
  10635. "织金县",
  10636. "金沙县",
  10637. "赫章县",
  10638. "纳雍县",
  10639. "威宁彝族回族苗族自治县"] },
  10640. {
  10641. "name": "黔西南布依族苗族自治州",
  10642. "area": [
  10643. "兴义市",
  10644. "望谟县",
  10645. "兴仁县",
  10646. "普安县",
  10647. "册亨县",
  10648. "晴隆县",
  10649. "贞丰县",
  10650. "安龙县"] },
  10651. {
  10652. "name": "黔东南苗族侗族自治州",
  10653. "area": [
  10654. "凯里市",
  10655. "施秉县",
  10656. "从江县",
  10657. "锦屏县",
  10658. "镇远县",
  10659. "麻江县",
  10660. "台江县",
  10661. "天柱县",
  10662. "黄平县",
  10663. "榕江县",
  10664. "剑河县",
  10665. "三穗县",
  10666. "雷山县",
  10667. "黎平县",
  10668. "岑巩县",
  10669. "丹寨县"] },
  10670. {
  10671. "name": "黔南布依族苗族自治州",
  10672. "area": [
  10673. "都匀市",
  10674. "福泉市",
  10675. "贵定县",
  10676. "惠水县",
  10677. "罗甸县",
  10678. "瓮安县",
  10679. "荔波县",
  10680. "龙里县",
  10681. "平塘县",
  10682. "长顺县",
  10683. "独山县",
  10684. "三都水族自治县"] }] },
  10685. {
  10686. "name": "云南省",
  10687. "city": [
  10688. {
  10689. "name": "昆明市",
  10690. "area": [
  10691. "盘龙区",
  10692. "五华区",
  10693. "官渡区",
  10694. "西山区",
  10695. "东川区",
  10696. "安宁市",
  10697. "呈贡县",
  10698. "晋宁县",
  10699. "富民县",
  10700. "宜良县",
  10701. "嵩明县",
  10702. "石林彝族自治县",
  10703. "禄劝彝族苗族自治县",
  10704. "寻甸回族彝族自治县"] },
  10705. {
  10706. "name": "曲靖市",
  10707. "area": [
  10708. "麒麟区",
  10709. "宣威市",
  10710. "马龙县",
  10711. "沾益县",
  10712. "富源县",
  10713. "罗平县",
  10714. "师宗县",
  10715. "陆良县",
  10716. "会泽县"] },
  10717. {
  10718. "name": "玉溪市",
  10719. "area": [
  10720. "红塔区",
  10721. "江川县",
  10722. "澄江县",
  10723. "通海县",
  10724. "华宁县",
  10725. "易门县",
  10726. "峨山彝族自治县",
  10727. "新平彝族傣族自治县",
  10728. "元江哈尼族彝族傣族自治县"] },
  10729. {
  10730. "name": "保山市",
  10731. "area": [
  10732. "隆阳区",
  10733. "施甸县",
  10734. "腾冲县",
  10735. "龙陵县",
  10736. "昌宁县"] },
  10737. {
  10738. "name": "昭通市",
  10739. "area": [
  10740. "昭阳区",
  10741. "鲁甸县",
  10742. "巧家县",
  10743. "盐津县",
  10744. "大关县",
  10745. "永善县",
  10746. "绥江县",
  10747. "镇雄县",
  10748. "彝良县",
  10749. "威信县",
  10750. "水富县"] },
  10751. {
  10752. "name": "丽江市",
  10753. "area": [
  10754. "古城区",
  10755. "永胜县",
  10756. "华坪县",
  10757. "玉龙纳西族自治县",
  10758. "宁蒗彝族自治县"] },
  10759. {
  10760. "name": "普洱市",
  10761. "area": [
  10762. "思茅区",
  10763. "普洱哈尼族彝族自治县",
  10764. "墨江哈尼族自治县",
  10765. "景东彝族自治县",
  10766. "景谷傣族彝族自治县",
  10767. "镇沅彝族哈尼族拉祜族自治县",
  10768. "江城哈尼族彝族自治县",
  10769. "孟连傣族拉祜族佤族自治县",
  10770. "澜沧拉祜族自治县",
  10771. "西盟佤族自治县"] },
  10772. {
  10773. "name": "临沧市",
  10774. "area": [
  10775. "临翔区",
  10776. "凤庆县",
  10777. "云县",
  10778. "永德县",
  10779. "镇康县",
  10780. "双江拉祜族佤族布朗族傣族自治县",
  10781. "耿马傣族佤族自治县",
  10782. "沧源佤族自治县"] },
  10783. {
  10784. "name": "德宏傣族景颇族自治州",
  10785. "area": [
  10786. "潞西市",
  10787. "瑞丽市",
  10788. "梁河县",
  10789. "盈江县",
  10790. "陇川县"] },
  10791. {
  10792. "name": "怒江傈僳族自治州",
  10793. "area": [
  10794. "泸水县",
  10795. "福贡县",
  10796. "贡山独龙族怒族自治县",
  10797. "兰坪白族普米族自治县"] },
  10798. {
  10799. "name": "迪庆藏族自治州",
  10800. "area": [
  10801. "香格里拉县",
  10802. "德钦县",
  10803. "维西傈僳族自治县"] },
  10804. {
  10805. "name": "大理白族自治州",
  10806. "area": [
  10807. "大理市",
  10808. "祥云县",
  10809. "宾川县",
  10810. "弥渡县",
  10811. "永平县",
  10812. "云龙县",
  10813. "洱源县",
  10814. "剑川县",
  10815. "鹤庆县",
  10816. "漾濞彝族自治县",
  10817. "南涧彝族自治县",
  10818. "巍山彝族回族自治县"] },
  10819. {
  10820. "name": "楚雄彝族自治州",
  10821. "area": [
  10822. "楚雄市",
  10823. "双柏县",
  10824. "牟定县",
  10825. "南华县",
  10826. "姚安县",
  10827. "大姚县",
  10828. "永仁县",
  10829. "元谋县",
  10830. "武定县",
  10831. "禄丰县"] },
  10832. {
  10833. "name": "红河哈尼族彝族自治州",
  10834. "area": [
  10835. "蒙自县",
  10836. "个旧市",
  10837. "开远市",
  10838. "绿春县",
  10839. "建水县",
  10840. "石屏县",
  10841. "弥勒县",
  10842. "泸西县",
  10843. "元阳县",
  10844. "红河县",
  10845. "金平苗族瑶族傣族自治县",
  10846. "河口瑶族自治县",
  10847. "屏边苗族自治县"] },
  10848. {
  10849. "name": "文山壮族苗族自治州",
  10850. "area": [
  10851. "文山县",
  10852. "砚山县",
  10853. "西畴县",
  10854. "麻栗坡县",
  10855. "马关县",
  10856. "丘北县",
  10857. "广南县",
  10858. "富宁县"] },
  10859. {
  10860. "name": "西双版纳傣族自治州",
  10861. "area": [
  10862. "景洪市",
  10863. "勐海县",
  10864. "勐腊县"] }] },
  10865. {
  10866. "name": "西藏",
  10867. "city": [
  10868. {
  10869. "name": "拉萨市",
  10870. "area": [
  10871. "城关区",
  10872. "林周县",
  10873. "当雄县",
  10874. "尼木县",
  10875. "曲水县",
  10876. "堆龙德庆县",
  10877. "达孜县",
  10878. "墨竹工卡县"] },
  10879. {
  10880. "name": "那曲地区",
  10881. "area": [
  10882. "那曲县",
  10883. "嘉黎县",
  10884. "比如县",
  10885. "聂荣县",
  10886. "安多县",
  10887. "申扎县",
  10888. "索县",
  10889. "班戈县",
  10890. "巴青县",
  10891. "尼玛县"] },
  10892. {
  10893. "name": "昌都地区",
  10894. "area": [
  10895. "昌都县",
  10896. "江达县",
  10897. "贡觉县",
  10898. "类乌齐县",
  10899. "丁青县",
  10900. "察雅县",
  10901. "八宿县",
  10902. "左贡县",
  10903. "芒康县",
  10904. "洛隆县",
  10905. "边坝县"] },
  10906. {
  10907. "name": "林芝地区",
  10908. "area": [
  10909. "林芝县",
  10910. "工布江达县",
  10911. "米林县",
  10912. "墨脱县",
  10913. "波密县",
  10914. "察隅县",
  10915. "朗县"] },
  10916. {
  10917. "name": "山南地区",
  10918. "area": [
  10919. "乃东县",
  10920. "扎囊县",
  10921. "贡嘎县",
  10922. "桑日县",
  10923. "琼结县",
  10924. "曲松县",
  10925. "措美县",
  10926. "洛扎县",
  10927. "加查县",
  10928. "隆子县",
  10929. "错那县",
  10930. "浪卡子县"] },
  10931. {
  10932. "name": "日喀则地区",
  10933. "area": [
  10934. "日喀则市",
  10935. "南木林县",
  10936. "江孜县",
  10937. "定日县",
  10938. "萨迦县",
  10939. "拉孜县",
  10940. "昂仁县",
  10941. "谢通门县",
  10942. "白朗县",
  10943. "仁布县",
  10944. "康马县",
  10945. "定结县",
  10946. "仲巴县",
  10947. "亚东县",
  10948. "吉隆县",
  10949. "聂拉木县",
  10950. "萨嘎县",
  10951. "岗巴县"] },
  10952. {
  10953. "name": "阿里地区",
  10954. "area": [
  10955. "噶尔县",
  10956. "普兰县",
  10957. "札达县",
  10958. "日土县",
  10959. "革吉县",
  10960. "改则县",
  10961. "措勤县"] }] },
  10962. {
  10963. "name": "陕西省",
  10964. "city": [
  10965. {
  10966. "name": "西安市",
  10967. "area": [
  10968. "莲湖区",
  10969. "新城区",
  10970. "碑林区",
  10971. "雁塔区",
  10972. "灞桥区",
  10973. "未央区",
  10974. "阎良区",
  10975. "临潼区",
  10976. "长安区",
  10977. "高陵县",
  10978. "蓝田县",
  10979. "户县",
  10980. "周至县"] },
  10981. {
  10982. "name": "铜川市",
  10983. "area": [
  10984. "耀州区",
  10985. "王益区",
  10986. "印台区",
  10987. "宜君县"] },
  10988. {
  10989. "name": "宝鸡市",
  10990. "area": [
  10991. "渭滨区",
  10992. "金台区",
  10993. "陈仓区",
  10994. "岐山县",
  10995. "凤翔县",
  10996. "陇县",
  10997. "太白县",
  10998. "麟游县",
  10999. "扶风县",
  11000. "千阳县",
  11001. "眉县",
  11002. "凤县"] },
  11003. {
  11004. "name": "咸阳市",
  11005. "area": [
  11006. "秦都区",
  11007. "渭城区",
  11008. "杨陵区",
  11009. "兴平市",
  11010. "礼泉县",
  11011. "泾阳县",
  11012. "永寿县",
  11013. "三原县",
  11014. "彬县",
  11015. "旬邑县",
  11016. "长武县",
  11017. "乾县",
  11018. "武功县",
  11019. "淳化县"] },
  11020. {
  11021. "name": "渭南市",
  11022. "area": [
  11023. "临渭区",
  11024. "韩城市",
  11025. "华阴市",
  11026. "蒲城县",
  11027. "潼关县",
  11028. "白水县",
  11029. "澄城县",
  11030. "华县",
  11031. "合阳县",
  11032. "富平县",
  11033. "大荔县"] },
  11034. {
  11035. "name": "延安市",
  11036. "area": [
  11037. "宝塔区",
  11038. "安塞县",
  11039. "洛川县",
  11040. "子长县",
  11041. "黄陵县",
  11042. "延川县",
  11043. "富县",
  11044. "延长县",
  11045. "甘泉县",
  11046. "宜川县",
  11047. "志丹县",
  11048. "黄龙县",
  11049. "吴起县"] },
  11050. {
  11051. "name": "汉中市",
  11052. "area": [
  11053. "汉台区",
  11054. "留坝县",
  11055. "镇巴县",
  11056. "城固县",
  11057. "南郑县",
  11058. "洋县",
  11059. "宁强县",
  11060. "佛坪县",
  11061. "勉县",
  11062. "西乡县",
  11063. "略阳县"] },
  11064. {
  11065. "name": "榆林市",
  11066. "area": [
  11067. "榆阳区",
  11068. "清涧县",
  11069. "绥德县",
  11070. "神木县",
  11071. "佳县",
  11072. "府谷县",
  11073. "子洲县",
  11074. "靖边县",
  11075. "横山县",
  11076. "米脂县",
  11077. "吴堡县",
  11078. "定边县"] },
  11079. {
  11080. "name": "安康市",
  11081. "area": [
  11082. "汉滨区",
  11083. "紫阳县",
  11084. "岚皋县",
  11085. "旬阳县",
  11086. "镇坪县",
  11087. "平利县",
  11088. "石泉县",
  11089. "宁陕县",
  11090. "白河县",
  11091. "汉阴县"] },
  11092. {
  11093. "name": "商洛市",
  11094. "area": [
  11095. "商州区",
  11096. "镇安县",
  11097. "山阳县",
  11098. "洛南县",
  11099. "商南县",
  11100. "丹凤县",
  11101. "柞水县"] }] },
  11102. {
  11103. "name": "甘肃省",
  11104. "city": [
  11105. {
  11106. "name": "兰州市",
  11107. "area": [
  11108. "城关区",
  11109. "七里河区",
  11110. "西固区",
  11111. "安宁区",
  11112. "红古区",
  11113. "永登县",
  11114. "皋兰县",
  11115. "榆中县"] },
  11116. {
  11117. "name": "嘉峪关市",
  11118. "area": [
  11119. "嘉峪关市"] },
  11120. {
  11121. "name": "金昌市",
  11122. "area": [
  11123. "金川区",
  11124. "永昌县"] },
  11125. {
  11126. "name": "白银市",
  11127. "area": [
  11128. "白银区",
  11129. "平川区",
  11130. "靖远县",
  11131. "会宁县",
  11132. "景泰县"] },
  11133. {
  11134. "name": "天水市",
  11135. "area": [
  11136. "清水县",
  11137. "秦安县",
  11138. "甘谷县",
  11139. "武山县",
  11140. "张家川回族自治县",
  11141. "北道区",
  11142. "秦城区"] },
  11143. {
  11144. "name": "武威市",
  11145. "area": [
  11146. "凉州区",
  11147. "民勤县",
  11148. "古浪县",
  11149. "天祝藏族自治县"] },
  11150. {
  11151. "name": "酒泉市",
  11152. "area": [
  11153. "肃州区",
  11154. "玉门市",
  11155. "敦煌市",
  11156. "金塔县",
  11157. "肃北蒙古族自治县",
  11158. "阿克塞哈萨克族自治县",
  11159. "安西县"] },
  11160. {
  11161. "name": "张掖市",
  11162. "area": [
  11163. "甘州区",
  11164. "民乐县",
  11165. "临泽县",
  11166. "高台县",
  11167. "山丹县",
  11168. "肃南裕固族自治县"] },
  11169. {
  11170. "name": "庆阳市",
  11171. "area": [
  11172. "西峰区",
  11173. "庆城县",
  11174. "环县",
  11175. "华池县",
  11176. "合水县",
  11177. "正宁县",
  11178. "宁县",
  11179. "镇原县"] },
  11180. {
  11181. "name": "平凉市",
  11182. "area": [
  11183. "崆峒区",
  11184. "泾川县",
  11185. "灵台县",
  11186. "崇信县",
  11187. "华亭县",
  11188. "庄浪县",
  11189. "静宁县"] },
  11190. {
  11191. "name": "定西市",
  11192. "area": [
  11193. "安定区",
  11194. "通渭县",
  11195. "临洮县",
  11196. "漳县",
  11197. "岷县",
  11198. "渭源县",
  11199. "陇西县"] },
  11200. {
  11201. "name": "陇南市",
  11202. "area": [
  11203. "武都区",
  11204. "成县",
  11205. "宕昌县",
  11206. "康县",
  11207. "文县",
  11208. "西和县",
  11209. "礼县",
  11210. "两当县",
  11211. "徽县"] },
  11212. {
  11213. "name": "临夏回族自治州",
  11214. "area": [
  11215. "临夏市",
  11216. "临夏县",
  11217. "康乐县",
  11218. "永靖县",
  11219. "广河县",
  11220. "和政县",
  11221. "东乡族自治县",
  11222. "积石山保安族东乡族撒拉族自治县"] },
  11223. {
  11224. "name": "甘南藏族自治州",
  11225. "area": [
  11226. "合作市",
  11227. "临潭县",
  11228. "卓尼县",
  11229. "舟曲县",
  11230. "迭部县",
  11231. "玛曲县",
  11232. "碌曲县",
  11233. "夏河县"] }] },
  11234. {
  11235. "name": "青海省",
  11236. "city": [
  11237. {
  11238. "name": "西宁市",
  11239. "area": [
  11240. "城中区",
  11241. "城东区",
  11242. "城西区",
  11243. "城北区",
  11244. "湟源县",
  11245. "湟中县",
  11246. "大通回族土族自治县"] },
  11247. {
  11248. "name": "海东地区",
  11249. "area": [
  11250. "平安县",
  11251. "乐都县",
  11252. "民和回族土族自治县",
  11253. "互助土族自治县",
  11254. "化隆回族自治县",
  11255. "循化撒拉族自治县"] },
  11256. {
  11257. "name": "海北藏族自治州",
  11258. "area": [
  11259. "海晏县",
  11260. "祁连县",
  11261. "刚察县",
  11262. "门源回族自治县"] },
  11263. {
  11264. "name": "海南藏族自治州",
  11265. "area": [
  11266. "共和县",
  11267. "同德县",
  11268. "贵德县",
  11269. "兴海县",
  11270. "贵南县"] },
  11271. {
  11272. "name": "黄南藏族自治州",
  11273. "area": [
  11274. "同仁县",
  11275. "尖扎县",
  11276. "泽库县",
  11277. "河南蒙古族自治县"] },
  11278. {
  11279. "name": "果洛藏族自治州",
  11280. "area": [
  11281. "玛沁县",
  11282. "班玛县",
  11283. "甘德县",
  11284. "达日县",
  11285. "久治县",
  11286. "玛多县"] },
  11287. {
  11288. "name": "玉树藏族自治州",
  11289. "area": [
  11290. "玉树县",
  11291. "杂多县",
  11292. "称多县",
  11293. "治多县",
  11294. "囊谦县",
  11295. "曲麻莱县"] },
  11296. {
  11297. "name": "海西蒙古族藏族自治州",
  11298. "area": [
  11299. "德令哈市",
  11300. "格尔木市",
  11301. "乌兰县",
  11302. "都兰县",
  11303. "天峻县"] }] },
  11304. {
  11305. "name": "宁夏",
  11306. "city": [
  11307. {
  11308. "name": "银川市",
  11309. "area": [
  11310. "兴庆区",
  11311. "西夏区",
  11312. "金凤区",
  11313. "灵武市",
  11314. "永宁县",
  11315. "贺兰县"] },
  11316. {
  11317. "name": "石嘴山市",
  11318. "area": [
  11319. "大武口区",
  11320. "惠农区",
  11321. "平罗县"] },
  11322. {
  11323. "name": "吴忠市",
  11324. "area": [
  11325. "利通区",
  11326. "青铜峡市",
  11327. "盐池县",
  11328. "同心县"] },
  11329. {
  11330. "name": "固原市",
  11331. "area": [
  11332. "原州区",
  11333. "西吉县",
  11334. "隆德县",
  11335. "泾源县",
  11336. "彭阳县"] },
  11337. {
  11338. "name": "中卫市",
  11339. "area": [
  11340. "沙坡头区",
  11341. "中宁县",
  11342. "海原县"] }] },
  11343. {
  11344. "name": "新疆",
  11345. "city": [
  11346. {
  11347. "name": "乌鲁木齐市",
  11348. "area": [
  11349. "天山区",
  11350. "沙依巴克区",
  11351. "新市区",
  11352. "水磨沟区",
  11353. "头屯河区",
  11354. "达坂城区",
  11355. "东山区",
  11356. "乌鲁木齐县"] },
  11357. {
  11358. "name": "克拉玛依市",
  11359. "area": [
  11360. "克拉玛依区",
  11361. "独山子区",
  11362. "白碱滩区",
  11363. "乌尔禾区"] },
  11364. {
  11365. "name": "吐鲁番地区",
  11366. "area": [
  11367. "吐鲁番市",
  11368. "托克逊县",
  11369. "鄯善县"] },
  11370. {
  11371. "name": "哈密地区",
  11372. "area": [
  11373. "哈密市",
  11374. "伊吾县",
  11375. "巴里坤哈萨克自治县"] },
  11376. {
  11377. "name": "和田地区",
  11378. "area": [
  11379. "和田市",
  11380. "和田县",
  11381. "洛浦县",
  11382. "民丰县",
  11383. "皮山县",
  11384. "策勒县",
  11385. "于田县",
  11386. "墨玉县"] },
  11387. {
  11388. "name": "阿克苏地区",
  11389. "area": [
  11390. "阿克苏市",
  11391. "温宿县",
  11392. "沙雅县",
  11393. "拜城县",
  11394. "阿瓦提县",
  11395. "库车县",
  11396. "柯坪县",
  11397. "新和县",
  11398. "乌什县"] },
  11399. {
  11400. "name": "喀什地区",
  11401. "area": [
  11402. "喀什市",
  11403. "巴楚县",
  11404. "泽普县",
  11405. "伽师县",
  11406. "叶城县",
  11407. "岳普湖县",
  11408. "疏勒县",
  11409. "麦盖提县",
  11410. "英吉沙县",
  11411. "莎车县",
  11412. "疏附县",
  11413. "塔什库尔干塔吉克自治县"] },
  11414. {
  11415. "name": "克孜勒苏柯尔克孜自治州",
  11416. "area": [
  11417. "阿图什市",
  11418. "阿合奇县",
  11419. "乌恰县",
  11420. "阿克陶县"] },
  11421. {
  11422. "name": "巴音郭楞蒙古自治州",
  11423. "area": [
  11424. "库尔勒市",
  11425. "和静县",
  11426. "尉犁县",
  11427. "和硕县",
  11428. "且末县",
  11429. "博湖县",
  11430. "轮台县",
  11431. "若羌县",
  11432. "焉耆回族自治县"] },
  11433. {
  11434. "name": "昌吉回族自治州",
  11435. "area": [
  11436. "昌吉市",
  11437. "阜康市",
  11438. "奇台县",
  11439. "玛纳斯县",
  11440. "吉木萨尔县",
  11441. "呼图壁县",
  11442. "木垒哈萨克自治县",
  11443. "米泉市"] },
  11444. {
  11445. "name": "博尔塔拉蒙古自治州",
  11446. "area": [
  11447. "博乐市",
  11448. "精河县",
  11449. "温泉县"] },
  11450. {
  11451. "name": "石河子",
  11452. "area": [
  11453. "石河子"] },
  11454. {
  11455. "name": "阿拉尔",
  11456. "area": [
  11457. "阿拉尔"] },
  11458. {
  11459. "name": "图木舒克",
  11460. "area": [
  11461. "图木舒克"] },
  11462. {
  11463. "name": "五家渠",
  11464. "area": [
  11465. "五家渠"] },
  11466. {
  11467. "name": "伊犁哈萨克自治州",
  11468. "area": [
  11469. "伊宁市",
  11470. "奎屯市",
  11471. "伊宁县",
  11472. "特克斯县",
  11473. "尼勒克县",
  11474. "昭苏县",
  11475. "新源县",
  11476. "霍城县",
  11477. "巩留县",
  11478. "察布查尔锡伯自治县",
  11479. "塔城地区",
  11480. "阿勒泰地区"] }] },
  11481. {
  11482. "name": "台湾省",
  11483. "city": [
  11484. {
  11485. "name": "台北市",
  11486. "area": [
  11487. "内湖区",
  11488. "南港区",
  11489. "中正区",
  11490. "万华区",
  11491. "大同区",
  11492. "中山区",
  11493. "松山区",
  11494. "大安区",
  11495. "信义区",
  11496. "文山区",
  11497. "士林区",
  11498. "北投区"] },
  11499. {
  11500. "name": "新北市",
  11501. "area": [
  11502. "板桥区",
  11503. "汐止区",
  11504. "新店区"] },
  11505. {
  11506. "name": "桃园市",
  11507. "area": [
  11508. "其他"] },
  11509. {
  11510. "name": "台中市",
  11511. "area": [
  11512. "其他"] },
  11513. {
  11514. "name": "台南市",
  11515. "area": [
  11516. "其他"] },
  11517. {
  11518. "name": "高雄市",
  11519. "area": [
  11520. "其他"] }] },
  11521. {
  11522. "name": "澳门",
  11523. "city": [
  11524. {
  11525. "name": "澳门",
  11526. "area": [
  11527. "花地玛堂区",
  11528. "圣安多尼堂区",
  11529. "大堂区",
  11530. "望德堂区",
  11531. "风顺堂区",
  11532. "嘉模堂区",
  11533. "圣方济各堂区",
  11534. "路凼"] }] },
  11535. {
  11536. "name": "香港",
  11537. "city": [
  11538. {
  11539. "name": "香港",
  11540. "area": [
  11541. "深水埗区",
  11542. "油尖旺区",
  11543. "九龙城区",
  11544. "黄大仙区",
  11545. "观塘区",
  11546. "北区",
  11547. "大埔区",
  11548. "沙田区",
  11549. "西贡区",
  11550. "元朗区",
  11551. "屯门区",
  11552. "荃湾区",
  11553. "葵青区",
  11554. "离岛区",
  11555. "中西区",
  11556. "湾仔区",
  11557. "东区",
  11558. "南区"] }] }];exports.default = _default;
  11559. /***/ }),
  11560. /***/ 228:
  11561. /*!************************************************************************************************!*\
  11562. !*** /Users/wanglili/Documents/work/GitHub/huaihua/components/jyf-parser/libs/MpHtmlParser.js ***!
  11563. \************************************************************************************************/
  11564. /*! no static exports found */
  11565. /***/ (function(module, exports, __webpack_require__) {
  11566. /* WEBPACK VAR INJECTION */(function(uni) {/**
  11567. * html 解析器
  11568. * @tutorial https://github.com/jin-yufeng/Parser
  11569. * @version 20200728
  11570. * @author JinYufeng
  11571. * @listens MIT
  11572. */
  11573. var cfg = __webpack_require__(/*! ./config.js */ 229),
  11574. blankChar = cfg.blankChar,
  11575. CssHandler = __webpack_require__(/*! ./CssHandler.js */ 230),
  11576. windowWidth = uni.getSystemInfoSync().windowWidth;
  11577. var emoji;
  11578. function MpHtmlParser(data) {var _this = this;var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  11579. this.attrs = {};
  11580. this.CssHandler = new CssHandler(options.tagStyle, windowWidth);
  11581. this.data = data;
  11582. this.domain = options.domain;
  11583. this.DOM = [];
  11584. this.i = this.start = this.audioNum = this.imgNum = this.videoNum = 0;
  11585. options.prot = (this.domain || '').includes('://') ? this.domain.split('://')[0] : 'http';
  11586. this.options = options;
  11587. this.state = this.Text;
  11588. this.STACK = [];
  11589. // 工具函数
  11590. this.bubble = function () {
  11591. for (var i = _this.STACK.length, item; item = _this.STACK[--i];) {
  11592. if (cfg.richOnlyTags[item.name]) {
  11593. if (item.name == 'table' && !Object.hasOwnProperty.call(item, 'c')) item.c = 1;
  11594. return false;
  11595. }
  11596. item.c = 1;
  11597. }
  11598. return true;
  11599. };
  11600. this.decode = function (val, amp) {
  11601. var i = -1,
  11602. j,en;
  11603. while (1) {
  11604. if ((i = val.indexOf('&', i + 1)) == -1) break;
  11605. if ((j = val.indexOf(';', i + 2)) == -1) break;
  11606. if (val[i + 1] == '#') {
  11607. en = parseInt((val[i + 2] == 'x' ? '0' : '') + val.substring(i + 2, j));
  11608. if (!isNaN(en)) val = val.substr(0, i) + String.fromCharCode(en) + val.substr(j + 1);
  11609. } else {
  11610. en = val.substring(i + 1, j);
  11611. if (cfg.entities[en] || en == amp)
  11612. val = val.substr(0, i) + (cfg.entities[en] || '&') + val.substr(j + 1);
  11613. }
  11614. }
  11615. return val;
  11616. };
  11617. this.getUrl = function (url) {
  11618. if (url[0] == '/') {
  11619. if (url[1] == '/') url = _this.options.prot + ':' + url;else
  11620. if (_this.domain) url = _this.domain + url;
  11621. } else if (_this.domain && url.indexOf('data:') != 0 && !url.includes('://'))
  11622. url = _this.domain + '/' + url;
  11623. return url;
  11624. };
  11625. this.isClose = function () {return _this.data[_this.i] == '>' || _this.data[_this.i] == '/' && _this.data[_this.i + 1] == '>';};
  11626. this.section = function () {return _this.data.substring(_this.start, _this.i);};
  11627. this.parent = function () {return _this.STACK[_this.STACK.length - 1];};
  11628. this.siblings = function () {return _this.STACK.length ? _this.parent().children : _this.DOM;};
  11629. }
  11630. MpHtmlParser.prototype.parse = function () {
  11631. if (emoji) this.data = emoji.parseEmoji(this.data);
  11632. for (var c; c = this.data[this.i]; this.i++) {
  11633. this.state(c);}
  11634. if (this.state == this.Text) this.setText();
  11635. while (this.STACK.length) {this.popNode(this.STACK.pop());}
  11636. return this.DOM;
  11637. };
  11638. // 设置属性
  11639. MpHtmlParser.prototype.setAttr = function () {
  11640. var name = this.attrName.toLowerCase(),
  11641. val = this.attrVal;
  11642. if (cfg.boolAttrs[name]) this.attrs[name] = 'T';else
  11643. if (val) {
  11644. if (name == 'src' || name == 'data-src' && !this.attrs.src) this.attrs.src = this.getUrl(this.decode(val, 'amp'));else
  11645. if (name == 'href' || name == 'style') this.attrs[name] = this.decode(val, 'amp');else
  11646. if (name.substr(0, 5) != 'data-') this.attrs[name] = val;
  11647. }
  11648. this.attrVal = '';
  11649. while (blankChar[this.data[this.i]]) {this.i++;}
  11650. if (this.isClose()) this.setNode();else
  11651. {
  11652. this.start = this.i;
  11653. this.state = this.AttrName;
  11654. }
  11655. };
  11656. // 设置文本节点
  11657. MpHtmlParser.prototype.setText = function () {
  11658. var back,text = this.section();
  11659. if (!text) return;
  11660. text = cfg.onText && cfg.onText(text, function () {return back = true;}) || text;
  11661. if (back) {
  11662. this.data = this.data.substr(0, this.start) + text + this.data.substr(this.i);
  11663. var j = this.start + text.length;
  11664. for (this.i = this.start; this.i < j; this.i++) {this.state(this.data[this.i]);}
  11665. return;
  11666. }
  11667. if (!this.pre) {
  11668. // 合并空白符
  11669. var flag,tmp = [];
  11670. for (var i = text.length, c; c = text[--i];) {
  11671. if (!blankChar[c]) {
  11672. tmp.unshift(c);
  11673. if (!flag) flag = 1;
  11674. } else {
  11675. if (tmp[0] != ' ') tmp.unshift(' ');
  11676. if (c == '\n' && flag == void 0) flag = 0;
  11677. }}
  11678. if (flag == 0) return;
  11679. text = tmp.join('');
  11680. }
  11681. this.siblings().push({
  11682. type: 'text',
  11683. text: this.decode(text) });
  11684. };
  11685. // 设置元素节点
  11686. MpHtmlParser.prototype.setNode = function () {
  11687. var node = {
  11688. name: this.tagName.toLowerCase(),
  11689. attrs: this.attrs },
  11690. close = cfg.selfClosingTags[node.name];
  11691. if (this.options.nodes.length) node.type = 'node';
  11692. this.attrs = {};
  11693. if (!cfg.ignoreTags[node.name]) {
  11694. // 处理属性
  11695. var attrs = node.attrs,
  11696. style = this.CssHandler.match(node.name, attrs, node) + (attrs.style || ''),
  11697. styleObj = {};
  11698. if (attrs.id) {
  11699. if (this.options.compress & 1) attrs.id = void 0;else
  11700. if (this.options.useAnchor) this.bubble();
  11701. }
  11702. if (this.options.compress & 2 && attrs.class) attrs.class = void 0;
  11703. switch (node.name) {
  11704. case 'a':
  11705. case 'ad':
  11706. this.bubble();
  11707. break;
  11708. case 'font':
  11709. if (attrs.color) {
  11710. styleObj['color'] = attrs.color;
  11711. attrs.color = void 0;
  11712. }
  11713. if (attrs.face) {
  11714. styleObj['font-family'] = attrs.face;
  11715. attrs.face = void 0;
  11716. }
  11717. if (attrs.size) {
  11718. var size = parseInt(attrs.size);
  11719. if (size < 1) size = 1;else
  11720. if (size > 7) size = 7;
  11721. var map = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'];
  11722. styleObj['font-size'] = map[size - 1];
  11723. attrs.size = void 0;
  11724. }
  11725. break;
  11726. case 'embed':
  11727. var src = node.attrs.src || '',
  11728. type = node.attrs.type || '';
  11729. if (type.includes('video') || src.includes('.mp4') || src.includes('.3gp') || src.includes('.m3u8'))
  11730. node.name = 'video';else
  11731. if (type.includes('audio') || src.includes('.m4a') || src.includes('.wav') || src.includes('.mp3') || src.includes(
  11732. '.aac'))
  11733. node.name = 'audio';else
  11734. break;
  11735. if (node.attrs.autostart)
  11736. node.attrs.autoplay = 'T';
  11737. node.attrs.controls = 'T';
  11738. case 'video':
  11739. case 'audio':
  11740. if (!attrs.id) attrs.id = node.name + ++this["".concat(node.name, "Num")];else
  11741. this["".concat(node.name, "Num")]++;
  11742. if (node.name == 'video') {
  11743. if (this.videoNum > 3)
  11744. node.lazyLoad = 1;
  11745. if (attrs.width) {
  11746. styleObj.width = parseFloat(attrs.width) + (attrs.width.includes('%') ? '%' : 'px');
  11747. attrs.width = void 0;
  11748. }
  11749. if (attrs.height) {
  11750. styleObj.height = parseFloat(attrs.height) + (attrs.height.includes('%') ? '%' : 'px');
  11751. attrs.height = void 0;
  11752. }
  11753. }
  11754. if (!attrs.controls && !attrs.autoplay) attrs.controls = 'T';
  11755. attrs.source = [];
  11756. if (attrs.src) {
  11757. attrs.source.push(attrs.src);
  11758. attrs.src = void 0;
  11759. }
  11760. this.bubble();
  11761. break;
  11762. case 'td':
  11763. case 'th':
  11764. if (attrs.colspan || attrs.rowspan)
  11765. for (var k = this.STACK.length, item; item = this.STACK[--k];) {
  11766. if (item.name == 'table') {
  11767. item.c = void 0;
  11768. break;
  11769. }}}
  11770. if (attrs.align) {
  11771. styleObj['text-align'] = attrs.align;
  11772. attrs.align = void 0;
  11773. }
  11774. // 压缩 style
  11775. var styles = style.split(';');
  11776. style = '';
  11777. for (var i = 0, len = styles.length; i < len; i++) {
  11778. var info = styles[i].split(':');
  11779. if (info.length < 2) continue;
  11780. var _key = info[0].trim().toLowerCase(),
  11781. _value = info.slice(1).join(':').trim();
  11782. if (_value[0] == '-' || _value.includes('safe'))
  11783. style += ";".concat(_key, ":").concat(_value);else
  11784. if (!styleObj[_key] || _value.includes('import') || !styleObj[_key].includes('import'))
  11785. styleObj[_key] = _value;
  11786. }
  11787. if (node.name == 'img') {
  11788. if (attrs.src && !attrs.ignore) {
  11789. if (this.bubble())
  11790. attrs.i = (this.imgNum++).toString();else
  11791. attrs.ignore = 'T';
  11792. }
  11793. if (attrs.ignore) {
  11794. style += ';-webkit-touch-callout:none';
  11795. styleObj['max-width'] = '100%';
  11796. }
  11797. var width;
  11798. if (styleObj.width) width = styleObj.width;else
  11799. if (attrs.width) width = attrs.width.includes('%') ? attrs.width : attrs.width + 'px';
  11800. if (width) {
  11801. styleObj.width = width;
  11802. attrs.width = '100%';
  11803. if (parseInt(width) > windowWidth) {
  11804. styleObj.height = '';
  11805. if (attrs.height) attrs.height = void 0;
  11806. }
  11807. }
  11808. if (styleObj.height) {
  11809. attrs.height = styleObj.height;
  11810. styleObj.height = '';
  11811. } else if (attrs.height && !attrs.height.includes('%'))
  11812. attrs.height += 'px';
  11813. }
  11814. for (var key in styleObj) {
  11815. var value = styleObj[key];
  11816. if (!value) continue;
  11817. if (key.includes('flex') || key == 'order' || key == 'self-align') node.c = 1;
  11818. // 填充链接
  11819. if (value.includes('url')) {
  11820. var j = value.indexOf('(');
  11821. if (j++ != -1) {
  11822. while (value[j] == '"' || value[j] == "'" || blankChar[value[j]]) {j++;}
  11823. value = value.substr(0, j) + this.getUrl(value.substr(j));
  11824. }
  11825. }
  11826. // 转换 rpx
  11827. else if (value.includes('rpx'))
  11828. value = value.replace(/[0-9.]+\s*rpx/g, function ($) {return parseFloat($) * windowWidth / 750 + 'px';});else
  11829. if (key == 'white-space' && value.includes('pre') && !close)
  11830. this.pre = node.pre = true;
  11831. style += ";".concat(key, ":").concat(value);
  11832. }
  11833. style = style.substr(1);
  11834. if (style) attrs.style = style;
  11835. if (!close) {
  11836. node.children = [];
  11837. if (node.name == 'pre' && cfg.highlight) {
  11838. this.remove(node);
  11839. this.pre = node.pre = true;
  11840. }
  11841. this.siblings().push(node);
  11842. this.STACK.push(node);
  11843. } else if (!cfg.filter || cfg.filter(node, this) != false)
  11844. this.siblings().push(node);
  11845. } else {
  11846. if (!close) this.remove(node);else
  11847. if (node.name == 'source') {
  11848. var parent = this.parent();
  11849. if (parent && (parent.name == 'video' || parent.name == 'audio') && node.attrs.src)
  11850. parent.attrs.source.push(node.attrs.src);
  11851. } else if (node.name == 'base' && !this.domain) this.domain = node.attrs.href;
  11852. }
  11853. if (this.data[this.i] == '/') this.i++;
  11854. this.start = this.i + 1;
  11855. this.state = this.Text;
  11856. };
  11857. // 移除标签
  11858. MpHtmlParser.prototype.remove = function (node) {var _this2 = this;
  11859. var name = node.name,
  11860. j = this.i;
  11861. // 处理 svg
  11862. var handleSvg = function handleSvg() {
  11863. var src = _this2.data.substring(j, _this2.i + 1);
  11864. if (!node.attrs.xmlns) src = ' xmlns="http://www.w3.org/2000/svg"' + src;
  11865. var i = j;
  11866. while (_this2.data[j] != '<') {j--;}
  11867. src = _this2.data.substring(j, i).replace("viewbox", "viewBox") + src;
  11868. var parent = _this2.parent();
  11869. if (node.attrs.width == '100%' && parent && (parent.attrs.style || '').includes('inline'))
  11870. parent.attrs.style = 'width:300px;max-width:100%;' + parent.attrs.style;
  11871. _this2.siblings().push({
  11872. name: 'img',
  11873. attrs: {
  11874. src: 'data:image/svg+xml;utf8,' + src.replace(/#/g, '%23'),
  11875. style: (/vertical[^;]+/.exec(node.attrs.style) || []).shift(),
  11876. ignore: 'T' } });
  11877. };
  11878. if (node.name == 'svg' && this.data[j] == '/') return handleSvg(this.i++);
  11879. while (1) {
  11880. if ((this.i = this.data.indexOf('</', this.i + 1)) == -1) {
  11881. if (name == 'pre' || name == 'svg') this.i = j;else
  11882. this.i = this.data.length;
  11883. return;
  11884. }
  11885. this.start = this.i += 2;
  11886. while (!blankChar[this.data[this.i]] && !this.isClose()) {this.i++;}
  11887. if (this.section().toLowerCase() == name) {
  11888. // 代码块高亮
  11889. if (name == 'pre') {
  11890. this.data = this.data.substr(0, j + 1) + cfg.highlight(this.data.substring(j + 1, this.i - 5), node.attrs) + this.data.
  11891. substr(this.i - 5);
  11892. return this.i = j;
  11893. } else if (name == 'style')
  11894. this.CssHandler.getStyle(this.data.substring(j + 1, this.i - 7));else
  11895. if (name == 'title')
  11896. this.DOM.title = this.data.substring(j + 1, this.i - 7);
  11897. if ((this.i = this.data.indexOf('>', this.i)) == -1) this.i = this.data.length;
  11898. if (name == 'svg') handleSvg();
  11899. return;
  11900. }
  11901. }
  11902. };
  11903. // 节点出栈处理
  11904. MpHtmlParser.prototype.popNode = function (node) {
  11905. // 空白符处理
  11906. if (node.pre) {
  11907. node.pre = this.pre = void 0;
  11908. for (var i = this.STACK.length; i--;) {
  11909. if (this.STACK[i].pre)
  11910. this.pre = true;}
  11911. }
  11912. var siblings = this.siblings(),
  11913. len = siblings.length,
  11914. childs = node.children;
  11915. if (node.name == 'head' || cfg.filter && cfg.filter(node, this) == false)
  11916. return siblings.pop();
  11917. var attrs = node.attrs;
  11918. // 替换一些标签名
  11919. if (cfg.blockTags[node.name]) node.name = 'div';else
  11920. if (!cfg.trustTags[node.name]) node.name = 'span';
  11921. // 处理列表
  11922. if (node.c && (node.name == 'ul' || node.name == 'ol')) {
  11923. if ((node.attrs.style || '').includes('list-style:none')) {
  11924. for (var _i = 0, child; child = childs[_i++];) {
  11925. if (child.name == 'li')
  11926. child.name = 'div';}
  11927. } else if (node.name == 'ul') {
  11928. var floor = 1;
  11929. for (var _i2 = this.STACK.length; _i2--;) {
  11930. if (this.STACK[_i2].name == 'ul') floor++;}
  11931. if (floor != 1)
  11932. for (var _i3 = childs.length; _i3--;) {
  11933. childs[_i3].floor = floor;}
  11934. } else {
  11935. for (var _i4 = 0, num = 1, _child; _child = childs[_i4++];) {
  11936. if (_child.name == 'li') {
  11937. _child.type = 'ol';
  11938. _child.num = function (num, type) {
  11939. if (type == 'a') return String.fromCharCode(97 + (num - 1) % 26);
  11940. if (type == 'A') return String.fromCharCode(65 + (num - 1) % 26);
  11941. if (type == 'i' || type == 'I') {
  11942. num = (num - 1) % 99 + 1;
  11943. var one = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX'],
  11944. ten = ['X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC'],
  11945. res = (ten[Math.floor(num / 10) - 1] || '') + (one[num % 10 - 1] || '');
  11946. if (type == 'i') return res.toLowerCase();
  11947. return res;
  11948. }
  11949. return num;
  11950. }(num++, attrs.type) + '.';
  11951. }}
  11952. }
  11953. }
  11954. // 处理表格的边框
  11955. if (node.name == 'table') {
  11956. var padding = attrs.cellpadding,
  11957. spacing = attrs.cellspacing,
  11958. border = attrs.border;
  11959. if (node.c) {
  11960. this.bubble();
  11961. attrs.style = (attrs.style || '') + ';display:table';
  11962. if (!padding) padding = 2;
  11963. if (!spacing) spacing = 2;
  11964. }
  11965. if (border) attrs.style = "border:".concat(border, "px solid gray;").concat(attrs.style || '');
  11966. if (spacing) attrs.style = "border-spacing:".concat(spacing, "px;").concat(attrs.style || '');
  11967. if (border || padding || node.c)
  11968. (function f(ns) {
  11969. for (var i = 0, n; n = ns[i]; i++) {
  11970. if (n.type == 'text') continue;
  11971. var style = n.attrs.style || '';
  11972. if (node.c && n.name[0] == 't') {
  11973. n.c = 1;
  11974. style += ';display:table-' + (n.name == 'th' || n.name == 'td' ? 'cell' : n.name == 'tr' ? 'row' : 'row-group');
  11975. }
  11976. if (n.name == 'th' || n.name == 'td') {
  11977. if (border) style = "border:".concat(border, "px solid gray;").concat(style);
  11978. if (padding) style = "padding:".concat(padding, "px;").concat(style);
  11979. } else f(n.children || []);
  11980. if (style) n.attrs.style = style;
  11981. }
  11982. })(childs);
  11983. if (this.options.autoscroll) {
  11984. var table = Object.assign({}, node);
  11985. node.name = 'div';
  11986. node.attrs = {
  11987. style: 'overflow:scroll' };
  11988. node.children = [table];
  11989. }
  11990. }
  11991. this.CssHandler.pop && this.CssHandler.pop(node);
  11992. // 自动压缩
  11993. if (node.name == 'div' && !Object.keys(attrs).length && childs.length == 1 && childs[0].name == 'div')
  11994. siblings[len - 1] = childs[0];
  11995. };
  11996. // 状态机
  11997. MpHtmlParser.prototype.Text = function (c) {
  11998. if (c == '<') {
  11999. var next = this.data[this.i + 1],
  12000. isLetter = function isLetter(c) {return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z';};
  12001. if (isLetter(next)) {
  12002. this.setText();
  12003. this.start = this.i + 1;
  12004. this.state = this.TagName;
  12005. } else if (next == '/') {
  12006. this.setText();
  12007. if (isLetter(this.data[++this.i + 1])) {
  12008. this.start = this.i + 1;
  12009. this.state = this.EndTag;
  12010. } else this.Comment();
  12011. } else if (next == '!' || next == '?') {
  12012. this.setText();
  12013. this.Comment();
  12014. }
  12015. }
  12016. };
  12017. MpHtmlParser.prototype.Comment = function () {
  12018. var key;
  12019. if (this.data.substring(this.i + 2, this.i + 4) == '--') key = '-->';else
  12020. if (this.data.substring(this.i + 2, this.i + 9) == '[CDATA[') key = ']]>';else
  12021. key = '>';
  12022. if ((this.i = this.data.indexOf(key, this.i + 2)) == -1) this.i = this.data.length;else
  12023. this.i += key.length - 1;
  12024. this.start = this.i + 1;
  12025. this.state = this.Text;
  12026. };
  12027. MpHtmlParser.prototype.TagName = function (c) {
  12028. if (blankChar[c]) {
  12029. this.tagName = this.section();
  12030. while (blankChar[this.data[this.i]]) {this.i++;}
  12031. if (this.isClose()) this.setNode();else
  12032. {
  12033. this.start = this.i;
  12034. this.state = this.AttrName;
  12035. }
  12036. } else if (this.isClose()) {
  12037. this.tagName = this.section();
  12038. this.setNode();
  12039. }
  12040. };
  12041. MpHtmlParser.prototype.AttrName = function (c) {
  12042. if (c == '=' || blankChar[c] || this.isClose()) {
  12043. this.attrName = this.section();
  12044. if (blankChar[c])
  12045. while (blankChar[this.data[++this.i]]) {;}
  12046. if (this.data[this.i] == '=') {
  12047. while (blankChar[this.data[++this.i]]) {;}
  12048. this.start = this.i--;
  12049. this.state = this.AttrValue;
  12050. } else this.setAttr();
  12051. }
  12052. };
  12053. MpHtmlParser.prototype.AttrValue = function (c) {
  12054. if (c == '"' || c == "'") {
  12055. this.start++;
  12056. if ((this.i = this.data.indexOf(c, this.i + 1)) == -1) return this.i = this.data.length;
  12057. this.attrVal = this.section();
  12058. this.i++;
  12059. } else {
  12060. for (; !blankChar[this.data[this.i]] && !this.isClose(); this.i++) {;}
  12061. this.attrVal = this.section();
  12062. }
  12063. this.setAttr();
  12064. };
  12065. MpHtmlParser.prototype.EndTag = function (c) {
  12066. if (blankChar[c] || c == '>' || c == '/') {
  12067. var name = this.section().toLowerCase();
  12068. for (var i = this.STACK.length; i--;) {
  12069. if (this.STACK[i].name == name) break;}
  12070. if (i != -1) {
  12071. var node;
  12072. while ((node = this.STACK.pop()).name != name) {this.popNode(node);}
  12073. this.popNode(node);
  12074. } else if (name == 'p' || name == 'br')
  12075. this.siblings().push({
  12076. name: name,
  12077. attrs: {} });
  12078. this.i = this.data.indexOf('>', this.i);
  12079. this.start = this.i + 1;
  12080. if (this.i == -1) this.i = this.data.length;else
  12081. this.state = this.Text;
  12082. }
  12083. };
  12084. module.exports = MpHtmlParser;
  12085. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  12086. /***/ }),
  12087. /***/ 229:
  12088. /*!******************************************************************************************!*\
  12089. !*** /Users/wanglili/Documents/work/GitHub/huaihua/components/jyf-parser/libs/config.js ***!
  12090. \******************************************************************************************/
  12091. /*! no static exports found */
  12092. /***/ (function(module, exports) {
  12093. /* 配置文件 */
  12094. var cfg = {
  12095. // 出错占位图
  12096. errorImg: null,
  12097. // 过滤器函数
  12098. filter: null,
  12099. // 代码高亮函数
  12100. highlight: null,
  12101. // 文本处理函数
  12102. onText: null,
  12103. // 实体编码列表
  12104. entities: {
  12105. quot: '"',
  12106. apos: "'",
  12107. semi: ';',
  12108. nbsp: '\xA0',
  12109. ensp: "\u2002",
  12110. emsp: "\u2003",
  12111. ndash: '–',
  12112. mdash: '—',
  12113. middot: '·',
  12114. lsquo: '‘',
  12115. rsquo: '’',
  12116. ldquo: '“',
  12117. rdquo: '”',
  12118. bull: '•',
  12119. hellip: '…' },
  12120. blankChar: makeMap(' ,\xA0,\t,\r,\n,\f'),
  12121. boolAttrs: makeMap('allowfullscreen,autoplay,autostart,controls,ignore,loop,muted'),
  12122. // 块级标签,将被转为 div
  12123. blockTags: makeMap('address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section'),
  12124. // 将被移除的标签
  12125. ignoreTags: makeMap('area,base,canvas,frame,iframe,input,link,map,meta,param,script,source,style,svg,textarea,title,track,wbr'),
  12126. // 只能被 rich-text 显示的标签
  12127. richOnlyTags: makeMap('a,colgroup,fieldset,legend,table'),
  12128. // 自闭合的标签
  12129. selfClosingTags: makeMap('area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr'),
  12130. // 信任的标签
  12131. trustTags: makeMap('a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video'),
  12132. // 默认的标签样式
  12133. userAgentStyles: {
  12134. address: 'font-style:italic',
  12135. big: 'display:inline;font-size:1.2em',
  12136. blockquote: 'background-color:#f6f6f6;border-left:3px solid #dbdbdb;color:#6c6c6c;padding:5px 0 5px 10px',
  12137. caption: 'display:table-caption;text-align:center',
  12138. center: 'text-align:center',
  12139. cite: 'font-style:italic',
  12140. dd: 'margin-left:40px',
  12141. mark: 'background-color:yellow',
  12142. pre: 'font-family:monospace;white-space:pre;overflow:scroll',
  12143. s: 'text-decoration:line-through',
  12144. small: 'display:inline;font-size:0.8em',
  12145. u: 'text-decoration:underline' } };
  12146. function makeMap(str) {
  12147. var map = Object.create(null),
  12148. list = str.split(',');
  12149. for (var i = list.length; i--;) {
  12150. map[list[i]] = true;}
  12151. return map;
  12152. }
  12153. if (wx.canIUse('editor')) {
  12154. cfg.blockTags.pre = void 0;
  12155. cfg.ignoreTags.rp = true;
  12156. Object.assign(cfg.richOnlyTags, makeMap('bdi,bdo,caption,rt,ruby'));
  12157. Object.assign(cfg.trustTags, makeMap('bdi,bdo,caption,pre,rt,ruby'));
  12158. }
  12159. module.exports = cfg;
  12160. /***/ }),
  12161. /***/ 23:
  12162. /*!*********************************************************************************************!*\
  12163. !*** ./node_modules/@vue/babel-preset-app/node_modules/@babel/runtime/regenerator/index.js ***!
  12164. \*********************************************************************************************/
  12165. /*! no static exports found */
  12166. /***/ (function(module, exports, __webpack_require__) {
  12167. module.exports = __webpack_require__(/*! regenerator-runtime */ 24);
  12168. /***/ }),
  12169. /***/ 230:
  12170. /*!**********************************************************************************************!*\
  12171. !*** /Users/wanglili/Documents/work/GitHub/huaihua/components/jyf-parser/libs/CssHandler.js ***!
  12172. \**********************************************************************************************/
  12173. /*! no static exports found */
  12174. /***/ (function(module, exports, __webpack_require__) {
  12175. var cfg = __webpack_require__(/*! ./config.js */ 229),
  12176. isLetter = function isLetter(c) {return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z';};
  12177. function CssHandler(tagStyle) {
  12178. var styles = Object.assign(Object.create(null), cfg.userAgentStyles);
  12179. for (var item in tagStyle) {
  12180. styles[item] = (styles[item] ? styles[item] + ';' : '') + tagStyle[item];}
  12181. this.styles = styles;
  12182. }
  12183. CssHandler.prototype.getStyle = function (data) {
  12184. this.styles = new parser(data, this.styles).parse();
  12185. };
  12186. CssHandler.prototype.match = function (name, attrs) {
  12187. var tmp,matched = (tmp = this.styles[name]) ? tmp + ';' : '';
  12188. if (attrs.class) {
  12189. var items = attrs.class.split(' ');
  12190. for (var i = 0, item; item = items[i]; i++) {
  12191. if (tmp = this.styles['.' + item])
  12192. matched += tmp + ';';}
  12193. }
  12194. if (tmp = this.styles['#' + attrs.id])
  12195. matched += tmp + ';';
  12196. return matched;
  12197. };
  12198. module.exports = CssHandler;
  12199. function parser(data, init) {
  12200. this.data = data;
  12201. this.floor = 0;
  12202. this.i = 0;
  12203. this.list = [];
  12204. this.res = init;
  12205. this.state = this.Space;
  12206. }
  12207. parser.prototype.parse = function () {
  12208. for (var c; c = this.data[this.i]; this.i++) {
  12209. this.state(c);}
  12210. return this.res;
  12211. };
  12212. parser.prototype.section = function () {
  12213. return this.data.substring(this.start, this.i);
  12214. };
  12215. // 状态机
  12216. parser.prototype.Space = function (c) {
  12217. if (c == '.' || c == '#' || isLetter(c)) {
  12218. this.start = this.i;
  12219. this.state = this.Name;
  12220. } else if (c == '/' && this.data[this.i + 1] == '*')
  12221. this.Comment();else
  12222. if (!cfg.blankChar[c] && c != ';')
  12223. this.state = this.Ignore;
  12224. };
  12225. parser.prototype.Comment = function () {
  12226. this.i = this.data.indexOf('*/', this.i) + 1;
  12227. if (!this.i) this.i = this.data.length;
  12228. this.state = this.Space;
  12229. };
  12230. parser.prototype.Ignore = function (c) {
  12231. if (c == '{') this.floor++;else
  12232. if (c == '}' && ! --this.floor) this.state = this.Space;
  12233. };
  12234. parser.prototype.Name = function (c) {
  12235. if (cfg.blankChar[c]) {
  12236. this.list.push(this.section());
  12237. this.state = this.NameSpace;
  12238. } else if (c == '{') {
  12239. this.list.push(this.section());
  12240. this.Content();
  12241. } else if (c == ',') {
  12242. this.list.push(this.section());
  12243. this.Comma();
  12244. } else if (!isLetter(c) && (c < '0' || c > '9') && c != '-' && c != '_')
  12245. this.state = this.Ignore;
  12246. };
  12247. parser.prototype.NameSpace = function (c) {
  12248. if (c == '{') this.Content();else
  12249. if (c == ',') this.Comma();else
  12250. if (!cfg.blankChar[c]) this.state = this.Ignore;
  12251. };
  12252. parser.prototype.Comma = function () {
  12253. while (cfg.blankChar[this.data[++this.i]]) {;}
  12254. if (this.data[this.i] == '{') this.Content();else
  12255. {
  12256. this.start = this.i--;
  12257. this.state = this.Name;
  12258. }
  12259. };
  12260. parser.prototype.Content = function () {
  12261. this.start = ++this.i;
  12262. if ((this.i = this.data.indexOf('}', this.i)) == -1) this.i = this.data.length;
  12263. var content = this.section();
  12264. for (var i = 0, item; item = this.list[i++];) {
  12265. if (this.res[item]) this.res[item] += ';' + content;else
  12266. this.res[item] = content;}
  12267. this.list = [];
  12268. this.state = this.Space;
  12269. };
  12270. /***/ }),
  12271. /***/ 24:
  12272. /*!************************************************************!*\
  12273. !*** ./node_modules/regenerator-runtime/runtime-module.js ***!
  12274. \************************************************************/
  12275. /*! no static exports found */
  12276. /***/ (function(module, exports, __webpack_require__) {
  12277. /**
  12278. * Copyright (c) 2014-present, Facebook, Inc.
  12279. *
  12280. * This source code is licensed under the MIT license found in the
  12281. * LICENSE file in the root directory of this source tree.
  12282. */
  12283. // This method of obtaining a reference to the global object needs to be
  12284. // kept identical to the way it is obtained in runtime.js
  12285. var g = (function() {
  12286. return this || (typeof self === "object" && self);
  12287. })() || Function("return this")();
  12288. // Use `getOwnPropertyNames` because not all browsers support calling
  12289. // `hasOwnProperty` on the global `self` object in a worker. See #183.
  12290. var hadRuntime = g.regeneratorRuntime &&
  12291. Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0;
  12292. // Save the old regeneratorRuntime in case it needs to be restored later.
  12293. var oldRuntime = hadRuntime && g.regeneratorRuntime;
  12294. // Force reevalutation of runtime.js.
  12295. g.regeneratorRuntime = undefined;
  12296. module.exports = __webpack_require__(/*! ./runtime */ 25);
  12297. if (hadRuntime) {
  12298. // Restore the original runtime.
  12299. g.regeneratorRuntime = oldRuntime;
  12300. } else {
  12301. // Remove the global property added by runtime.js.
  12302. try {
  12303. delete g.regeneratorRuntime;
  12304. } catch(e) {
  12305. g.regeneratorRuntime = undefined;
  12306. }
  12307. }
  12308. /***/ }),
  12309. /***/ 25:
  12310. /*!*****************************************************!*\
  12311. !*** ./node_modules/regenerator-runtime/runtime.js ***!
  12312. \*****************************************************/
  12313. /*! no static exports found */
  12314. /***/ (function(module, exports) {
  12315. /**
  12316. * Copyright (c) 2014-present, Facebook, Inc.
  12317. *
  12318. * This source code is licensed under the MIT license found in the
  12319. * LICENSE file in the root directory of this source tree.
  12320. */
  12321. !(function(global) {
  12322. "use strict";
  12323. var Op = Object.prototype;
  12324. var hasOwn = Op.hasOwnProperty;
  12325. var undefined; // More compressible than void 0.
  12326. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  12327. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  12328. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  12329. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  12330. var inModule = typeof module === "object";
  12331. var runtime = global.regeneratorRuntime;
  12332. if (runtime) {
  12333. if (inModule) {
  12334. // If regeneratorRuntime is defined globally and we're in a module,
  12335. // make the exports object identical to regeneratorRuntime.
  12336. module.exports = runtime;
  12337. }
  12338. // Don't bother evaluating the rest of this file if the runtime was
  12339. // already defined globally.
  12340. return;
  12341. }
  12342. // Define the runtime globally (as expected by generated code) as either
  12343. // module.exports (if we're in a module) or a new, empty object.
  12344. runtime = global.regeneratorRuntime = inModule ? module.exports : {};
  12345. function wrap(innerFn, outerFn, self, tryLocsList) {
  12346. // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
  12347. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  12348. var generator = Object.create(protoGenerator.prototype);
  12349. var context = new Context(tryLocsList || []);
  12350. // The ._invoke method unifies the implementations of the .next,
  12351. // .throw, and .return methods.
  12352. generator._invoke = makeInvokeMethod(innerFn, self, context);
  12353. return generator;
  12354. }
  12355. runtime.wrap = wrap;
  12356. // Try/catch helper to minimize deoptimizations. Returns a completion
  12357. // record like context.tryEntries[i].completion. This interface could
  12358. // have been (and was previously) designed to take a closure to be
  12359. // invoked without arguments, but in all the cases we care about we
  12360. // already have an existing method we want to call, so there's no need
  12361. // to create a new function object. We can even get away with assuming
  12362. // the method takes exactly one argument, since that happens to be true
  12363. // in every case, so we don't have to touch the arguments object. The
  12364. // only additional allocation required is the completion record, which
  12365. // has a stable shape and so hopefully should be cheap to allocate.
  12366. function tryCatch(fn, obj, arg) {
  12367. try {
  12368. return { type: "normal", arg: fn.call(obj, arg) };
  12369. } catch (err) {
  12370. return { type: "throw", arg: err };
  12371. }
  12372. }
  12373. var GenStateSuspendedStart = "suspendedStart";
  12374. var GenStateSuspendedYield = "suspendedYield";
  12375. var GenStateExecuting = "executing";
  12376. var GenStateCompleted = "completed";
  12377. // Returning this object from the innerFn has the same effect as
  12378. // breaking out of the dispatch switch statement.
  12379. var ContinueSentinel = {};
  12380. // Dummy constructor functions that we use as the .constructor and
  12381. // .constructor.prototype properties for functions that return Generator
  12382. // objects. For full spec compliance, you may wish to configure your
  12383. // minifier not to mangle the names of these two functions.
  12384. function Generator() {}
  12385. function GeneratorFunction() {}
  12386. function GeneratorFunctionPrototype() {}
  12387. // This is a polyfill for %IteratorPrototype% for environments that
  12388. // don't natively support it.
  12389. var IteratorPrototype = {};
  12390. IteratorPrototype[iteratorSymbol] = function () {
  12391. return this;
  12392. };
  12393. var getProto = Object.getPrototypeOf;
  12394. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  12395. if (NativeIteratorPrototype &&
  12396. NativeIteratorPrototype !== Op &&
  12397. hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  12398. // This environment has a native %IteratorPrototype%; use it instead
  12399. // of the polyfill.
  12400. IteratorPrototype = NativeIteratorPrototype;
  12401. }
  12402. var Gp = GeneratorFunctionPrototype.prototype =
  12403. Generator.prototype = Object.create(IteratorPrototype);
  12404. GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  12405. GeneratorFunctionPrototype.constructor = GeneratorFunction;
  12406. GeneratorFunctionPrototype[toStringTagSymbol] =
  12407. GeneratorFunction.displayName = "GeneratorFunction";
  12408. // Helper for defining the .next, .throw, and .return methods of the
  12409. // Iterator interface in terms of a single ._invoke method.
  12410. function defineIteratorMethods(prototype) {
  12411. ["next", "throw", "return"].forEach(function(method) {
  12412. prototype[method] = function(arg) {
  12413. return this._invoke(method, arg);
  12414. };
  12415. });
  12416. }
  12417. runtime.isGeneratorFunction = function(genFun) {
  12418. var ctor = typeof genFun === "function" && genFun.constructor;
  12419. return ctor
  12420. ? ctor === GeneratorFunction ||
  12421. // For the native GeneratorFunction constructor, the best we can
  12422. // do is to check its .name property.
  12423. (ctor.displayName || ctor.name) === "GeneratorFunction"
  12424. : false;
  12425. };
  12426. runtime.mark = function(genFun) {
  12427. if (Object.setPrototypeOf) {
  12428. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  12429. } else {
  12430. genFun.__proto__ = GeneratorFunctionPrototype;
  12431. if (!(toStringTagSymbol in genFun)) {
  12432. genFun[toStringTagSymbol] = "GeneratorFunction";
  12433. }
  12434. }
  12435. genFun.prototype = Object.create(Gp);
  12436. return genFun;
  12437. };
  12438. // Within the body of any async function, `await x` is transformed to
  12439. // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  12440. // `hasOwn.call(value, "__await")` to determine if the yielded value is
  12441. // meant to be awaited.
  12442. runtime.awrap = function(arg) {
  12443. return { __await: arg };
  12444. };
  12445. function AsyncIterator(generator) {
  12446. function invoke(method, arg, resolve, reject) {
  12447. var record = tryCatch(generator[method], generator, arg);
  12448. if (record.type === "throw") {
  12449. reject(record.arg);
  12450. } else {
  12451. var result = record.arg;
  12452. var value = result.value;
  12453. if (value &&
  12454. typeof value === "object" &&
  12455. hasOwn.call(value, "__await")) {
  12456. return Promise.resolve(value.__await).then(function(value) {
  12457. invoke("next", value, resolve, reject);
  12458. }, function(err) {
  12459. invoke("throw", err, resolve, reject);
  12460. });
  12461. }
  12462. return Promise.resolve(value).then(function(unwrapped) {
  12463. // When a yielded Promise is resolved, its final value becomes
  12464. // the .value of the Promise<{value,done}> result for the
  12465. // current iteration.
  12466. result.value = unwrapped;
  12467. resolve(result);
  12468. }, function(error) {
  12469. // If a rejected Promise was yielded, throw the rejection back
  12470. // into the async generator function so it can be handled there.
  12471. return invoke("throw", error, resolve, reject);
  12472. });
  12473. }
  12474. }
  12475. var previousPromise;
  12476. function enqueue(method, arg) {
  12477. function callInvokeWithMethodAndArg() {
  12478. return new Promise(function(resolve, reject) {
  12479. invoke(method, arg, resolve, reject);
  12480. });
  12481. }
  12482. return previousPromise =
  12483. // If enqueue has been called before, then we want to wait until
  12484. // all previous Promises have been resolved before calling invoke,
  12485. // so that results are always delivered in the correct order. If
  12486. // enqueue has not been called before, then it is important to
  12487. // call invoke immediately, without waiting on a callback to fire,
  12488. // so that the async generator function has the opportunity to do
  12489. // any necessary setup in a predictable way. This predictability
  12490. // is why the Promise constructor synchronously invokes its
  12491. // executor callback, and why async functions synchronously
  12492. // execute code before the first await. Since we implement simple
  12493. // async functions in terms of async generators, it is especially
  12494. // important to get this right, even though it requires care.
  12495. previousPromise ? previousPromise.then(
  12496. callInvokeWithMethodAndArg,
  12497. // Avoid propagating failures to Promises returned by later
  12498. // invocations of the iterator.
  12499. callInvokeWithMethodAndArg
  12500. ) : callInvokeWithMethodAndArg();
  12501. }
  12502. // Define the unified helper method that is used to implement .next,
  12503. // .throw, and .return (see defineIteratorMethods).
  12504. this._invoke = enqueue;
  12505. }
  12506. defineIteratorMethods(AsyncIterator.prototype);
  12507. AsyncIterator.prototype[asyncIteratorSymbol] = function () {
  12508. return this;
  12509. };
  12510. runtime.AsyncIterator = AsyncIterator;
  12511. // Note that simple async functions are implemented on top of
  12512. // AsyncIterator objects; they just return a Promise for the value of
  12513. // the final result produced by the iterator.
  12514. runtime.async = function(innerFn, outerFn, self, tryLocsList) {
  12515. var iter = new AsyncIterator(
  12516. wrap(innerFn, outerFn, self, tryLocsList)
  12517. );
  12518. return runtime.isGeneratorFunction(outerFn)
  12519. ? iter // If outerFn is a generator, return the full iterator.
  12520. : iter.next().then(function(result) {
  12521. return result.done ? result.value : iter.next();
  12522. });
  12523. };
  12524. function makeInvokeMethod(innerFn, self, context) {
  12525. var state = GenStateSuspendedStart;
  12526. return function invoke(method, arg) {
  12527. if (state === GenStateExecuting) {
  12528. throw new Error("Generator is already running");
  12529. }
  12530. if (state === GenStateCompleted) {
  12531. if (method === "throw") {
  12532. throw arg;
  12533. }
  12534. // Be forgiving, per 25.3.3.3.3 of the spec:
  12535. // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
  12536. return doneResult();
  12537. }
  12538. context.method = method;
  12539. context.arg = arg;
  12540. while (true) {
  12541. var delegate = context.delegate;
  12542. if (delegate) {
  12543. var delegateResult = maybeInvokeDelegate(delegate, context);
  12544. if (delegateResult) {
  12545. if (delegateResult === ContinueSentinel) continue;
  12546. return delegateResult;
  12547. }
  12548. }
  12549. if (context.method === "next") {
  12550. // Setting context._sent for legacy support of Babel's
  12551. // function.sent implementation.
  12552. context.sent = context._sent = context.arg;
  12553. } else if (context.method === "throw") {
  12554. if (state === GenStateSuspendedStart) {
  12555. state = GenStateCompleted;
  12556. throw context.arg;
  12557. }
  12558. context.dispatchException(context.arg);
  12559. } else if (context.method === "return") {
  12560. context.abrupt("return", context.arg);
  12561. }
  12562. state = GenStateExecuting;
  12563. var record = tryCatch(innerFn, self, context);
  12564. if (record.type === "normal") {
  12565. // If an exception is thrown from innerFn, we leave state ===
  12566. // GenStateExecuting and loop back for another invocation.
  12567. state = context.done
  12568. ? GenStateCompleted
  12569. : GenStateSuspendedYield;
  12570. if (record.arg === ContinueSentinel) {
  12571. continue;
  12572. }
  12573. return {
  12574. value: record.arg,
  12575. done: context.done
  12576. };
  12577. } else if (record.type === "throw") {
  12578. state = GenStateCompleted;
  12579. // Dispatch the exception by looping back around to the
  12580. // context.dispatchException(context.arg) call above.
  12581. context.method = "throw";
  12582. context.arg = record.arg;
  12583. }
  12584. }
  12585. };
  12586. }
  12587. // Call delegate.iterator[context.method](context.arg) and handle the
  12588. // result, either by returning a { value, done } result from the
  12589. // delegate iterator, or by modifying context.method and context.arg,
  12590. // setting context.delegate to null, and returning the ContinueSentinel.
  12591. function maybeInvokeDelegate(delegate, context) {
  12592. var method = delegate.iterator[context.method];
  12593. if (method === undefined) {
  12594. // A .throw or .return when the delegate iterator has no .throw
  12595. // method always terminates the yield* loop.
  12596. context.delegate = null;
  12597. if (context.method === "throw") {
  12598. if (delegate.iterator.return) {
  12599. // If the delegate iterator has a return method, give it a
  12600. // chance to clean up.
  12601. context.method = "return";
  12602. context.arg = undefined;
  12603. maybeInvokeDelegate(delegate, context);
  12604. if (context.method === "throw") {
  12605. // If maybeInvokeDelegate(context) changed context.method from
  12606. // "return" to "throw", let that override the TypeError below.
  12607. return ContinueSentinel;
  12608. }
  12609. }
  12610. context.method = "throw";
  12611. context.arg = new TypeError(
  12612. "The iterator does not provide a 'throw' method");
  12613. }
  12614. return ContinueSentinel;
  12615. }
  12616. var record = tryCatch(method, delegate.iterator, context.arg);
  12617. if (record.type === "throw") {
  12618. context.method = "throw";
  12619. context.arg = record.arg;
  12620. context.delegate = null;
  12621. return ContinueSentinel;
  12622. }
  12623. var info = record.arg;
  12624. if (! info) {
  12625. context.method = "throw";
  12626. context.arg = new TypeError("iterator result is not an object");
  12627. context.delegate = null;
  12628. return ContinueSentinel;
  12629. }
  12630. if (info.done) {
  12631. // Assign the result of the finished delegate to the temporary
  12632. // variable specified by delegate.resultName (see delegateYield).
  12633. context[delegate.resultName] = info.value;
  12634. // Resume execution at the desired location (see delegateYield).
  12635. context.next = delegate.nextLoc;
  12636. // If context.method was "throw" but the delegate handled the
  12637. // exception, let the outer generator proceed normally. If
  12638. // context.method was "next", forget context.arg since it has been
  12639. // "consumed" by the delegate iterator. If context.method was
  12640. // "return", allow the original .return call to continue in the
  12641. // outer generator.
  12642. if (context.method !== "return") {
  12643. context.method = "next";
  12644. context.arg = undefined;
  12645. }
  12646. } else {
  12647. // Re-yield the result returned by the delegate method.
  12648. return info;
  12649. }
  12650. // The delegate iterator is finished, so forget it and continue with
  12651. // the outer generator.
  12652. context.delegate = null;
  12653. return ContinueSentinel;
  12654. }
  12655. // Define Generator.prototype.{next,throw,return} in terms of the
  12656. // unified ._invoke helper method.
  12657. defineIteratorMethods(Gp);
  12658. Gp[toStringTagSymbol] = "Generator";
  12659. // A Generator should always return itself as the iterator object when the
  12660. // @@iterator function is called on it. Some browsers' implementations of the
  12661. // iterator prototype chain incorrectly implement this, causing the Generator
  12662. // object to not be returned from this call. This ensures that doesn't happen.
  12663. // See https://github.com/facebook/regenerator/issues/274 for more details.
  12664. Gp[iteratorSymbol] = function() {
  12665. return this;
  12666. };
  12667. Gp.toString = function() {
  12668. return "[object Generator]";
  12669. };
  12670. function pushTryEntry(locs) {
  12671. var entry = { tryLoc: locs[0] };
  12672. if (1 in locs) {
  12673. entry.catchLoc = locs[1];
  12674. }
  12675. if (2 in locs) {
  12676. entry.finallyLoc = locs[2];
  12677. entry.afterLoc = locs[3];
  12678. }
  12679. this.tryEntries.push(entry);
  12680. }
  12681. function resetTryEntry(entry) {
  12682. var record = entry.completion || {};
  12683. record.type = "normal";
  12684. delete record.arg;
  12685. entry.completion = record;
  12686. }
  12687. function Context(tryLocsList) {
  12688. // The root entry object (effectively a try statement without a catch
  12689. // or a finally block) gives us a place to store values thrown from
  12690. // locations where there is no enclosing try statement.
  12691. this.tryEntries = [{ tryLoc: "root" }];
  12692. tryLocsList.forEach(pushTryEntry, this);
  12693. this.reset(true);
  12694. }
  12695. runtime.keys = function(object) {
  12696. var keys = [];
  12697. for (var key in object) {
  12698. keys.push(key);
  12699. }
  12700. keys.reverse();
  12701. // Rather than returning an object with a next method, we keep
  12702. // things simple and return the next function itself.
  12703. return function next() {
  12704. while (keys.length) {
  12705. var key = keys.pop();
  12706. if (key in object) {
  12707. next.value = key;
  12708. next.done = false;
  12709. return next;
  12710. }
  12711. }
  12712. // To avoid creating an additional object, we just hang the .value
  12713. // and .done properties off the next function object itself. This
  12714. // also ensures that the minifier will not anonymize the function.
  12715. next.done = true;
  12716. return next;
  12717. };
  12718. };
  12719. function values(iterable) {
  12720. if (iterable) {
  12721. var iteratorMethod = iterable[iteratorSymbol];
  12722. if (iteratorMethod) {
  12723. return iteratorMethod.call(iterable);
  12724. }
  12725. if (typeof iterable.next === "function") {
  12726. return iterable;
  12727. }
  12728. if (!isNaN(iterable.length)) {
  12729. var i = -1, next = function next() {
  12730. while (++i < iterable.length) {
  12731. if (hasOwn.call(iterable, i)) {
  12732. next.value = iterable[i];
  12733. next.done = false;
  12734. return next;
  12735. }
  12736. }
  12737. next.value = undefined;
  12738. next.done = true;
  12739. return next;
  12740. };
  12741. return next.next = next;
  12742. }
  12743. }
  12744. // Return an iterator with no values.
  12745. return { next: doneResult };
  12746. }
  12747. runtime.values = values;
  12748. function doneResult() {
  12749. return { value: undefined, done: true };
  12750. }
  12751. Context.prototype = {
  12752. constructor: Context,
  12753. reset: function(skipTempReset) {
  12754. this.prev = 0;
  12755. this.next = 0;
  12756. // Resetting context._sent for legacy support of Babel's
  12757. // function.sent implementation.
  12758. this.sent = this._sent = undefined;
  12759. this.done = false;
  12760. this.delegate = null;
  12761. this.method = "next";
  12762. this.arg = undefined;
  12763. this.tryEntries.forEach(resetTryEntry);
  12764. if (!skipTempReset) {
  12765. for (var name in this) {
  12766. // Not sure about the optimal order of these conditions:
  12767. if (name.charAt(0) === "t" &&
  12768. hasOwn.call(this, name) &&
  12769. !isNaN(+name.slice(1))) {
  12770. this[name] = undefined;
  12771. }
  12772. }
  12773. }
  12774. },
  12775. stop: function() {
  12776. this.done = true;
  12777. var rootEntry = this.tryEntries[0];
  12778. var rootRecord = rootEntry.completion;
  12779. if (rootRecord.type === "throw") {
  12780. throw rootRecord.arg;
  12781. }
  12782. return this.rval;
  12783. },
  12784. dispatchException: function(exception) {
  12785. if (this.done) {
  12786. throw exception;
  12787. }
  12788. var context = this;
  12789. function handle(loc, caught) {
  12790. record.type = "throw";
  12791. record.arg = exception;
  12792. context.next = loc;
  12793. if (caught) {
  12794. // If the dispatched exception was caught by a catch block,
  12795. // then let that catch block handle the exception normally.
  12796. context.method = "next";
  12797. context.arg = undefined;
  12798. }
  12799. return !! caught;
  12800. }
  12801. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  12802. var entry = this.tryEntries[i];
  12803. var record = entry.completion;
  12804. if (entry.tryLoc === "root") {
  12805. // Exception thrown outside of any try block that could handle
  12806. // it, so set the completion value of the entire function to
  12807. // throw the exception.
  12808. return handle("end");
  12809. }
  12810. if (entry.tryLoc <= this.prev) {
  12811. var hasCatch = hasOwn.call(entry, "catchLoc");
  12812. var hasFinally = hasOwn.call(entry, "finallyLoc");
  12813. if (hasCatch && hasFinally) {
  12814. if (this.prev < entry.catchLoc) {
  12815. return handle(entry.catchLoc, true);
  12816. } else if (this.prev < entry.finallyLoc) {
  12817. return handle(entry.finallyLoc);
  12818. }
  12819. } else if (hasCatch) {
  12820. if (this.prev < entry.catchLoc) {
  12821. return handle(entry.catchLoc, true);
  12822. }
  12823. } else if (hasFinally) {
  12824. if (this.prev < entry.finallyLoc) {
  12825. return handle(entry.finallyLoc);
  12826. }
  12827. } else {
  12828. throw new Error("try statement without catch or finally");
  12829. }
  12830. }
  12831. }
  12832. },
  12833. abrupt: function(type, arg) {
  12834. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  12835. var entry = this.tryEntries[i];
  12836. if (entry.tryLoc <= this.prev &&
  12837. hasOwn.call(entry, "finallyLoc") &&
  12838. this.prev < entry.finallyLoc) {
  12839. var finallyEntry = entry;
  12840. break;
  12841. }
  12842. }
  12843. if (finallyEntry &&
  12844. (type === "break" ||
  12845. type === "continue") &&
  12846. finallyEntry.tryLoc <= arg &&
  12847. arg <= finallyEntry.finallyLoc) {
  12848. // Ignore the finally entry if control is not jumping to a
  12849. // location outside the try/catch block.
  12850. finallyEntry = null;
  12851. }
  12852. var record = finallyEntry ? finallyEntry.completion : {};
  12853. record.type = type;
  12854. record.arg = arg;
  12855. if (finallyEntry) {
  12856. this.method = "next";
  12857. this.next = finallyEntry.finallyLoc;
  12858. return ContinueSentinel;
  12859. }
  12860. return this.complete(record);
  12861. },
  12862. complete: function(record, afterLoc) {
  12863. if (record.type === "throw") {
  12864. throw record.arg;
  12865. }
  12866. if (record.type === "break" ||
  12867. record.type === "continue") {
  12868. this.next = record.arg;
  12869. } else if (record.type === "return") {
  12870. this.rval = this.arg = record.arg;
  12871. this.method = "return";
  12872. this.next = "end";
  12873. } else if (record.type === "normal" && afterLoc) {
  12874. this.next = afterLoc;
  12875. }
  12876. return ContinueSentinel;
  12877. },
  12878. finish: function(finallyLoc) {
  12879. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  12880. var entry = this.tryEntries[i];
  12881. if (entry.finallyLoc === finallyLoc) {
  12882. this.complete(entry.completion, entry.afterLoc);
  12883. resetTryEntry(entry);
  12884. return ContinueSentinel;
  12885. }
  12886. }
  12887. },
  12888. "catch": function(tryLoc) {
  12889. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  12890. var entry = this.tryEntries[i];
  12891. if (entry.tryLoc === tryLoc) {
  12892. var record = entry.completion;
  12893. if (record.type === "throw") {
  12894. var thrown = record.arg;
  12895. resetTryEntry(entry);
  12896. }
  12897. return thrown;
  12898. }
  12899. }
  12900. // The context.catch method must only be called with a location
  12901. // argument that corresponds to a known catch block.
  12902. throw new Error("illegal catch attempt");
  12903. },
  12904. delegateYield: function(iterable, resultName, nextLoc) {
  12905. this.delegate = {
  12906. iterator: values(iterable),
  12907. resultName: resultName,
  12908. nextLoc: nextLoc
  12909. };
  12910. if (this.method === "next") {
  12911. // Deliberately forget the last sent value so that we don't
  12912. // accidentally pass it on to the delegate.
  12913. this.arg = undefined;
  12914. }
  12915. return ContinueSentinel;
  12916. }
  12917. };
  12918. })(
  12919. // In sloppy mode, unbound `this` refers to the global object, fallback to
  12920. // Function constructor if we're in global strict mode. That is sadly a form
  12921. // of indirect eval which violates Content Security Policy.
  12922. (function() {
  12923. return this || (typeof self === "object" && self);
  12924. })() || Function("return this")()
  12925. );
  12926. /***/ }),
  12927. /***/ 26:
  12928. /*!*************************************************************************!*\
  12929. !*** /Users/wanglili/Documents/work/GitHub/huaihua/utils/loginUtils.js ***!
  12930. \*************************************************************************/
  12931. /*! no static exports found */
  12932. /***/ (function(module, exports, __webpack_require__) {
  12933. "use strict";
  12934. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.getActionPage = getActionPage;exports.getPageUrl = getPageUrl;exports.interceptor = interceptor;exports.saveUrl = saveUrl; // 获取当前页面
  12935. function getActionPage() {
  12936. var pages = getCurrentPages();
  12937. return pages[pages.length - 1];
  12938. }
  12939. // 处理分享链接地址
  12940. function getPageUrl(config) {
  12941. var page = getActionPage();
  12942. var path = '/' + page.route;
  12943. var url = '';
  12944. // 获取对象可枚举键值列表
  12945. var objKeys = Object.keys(page.options);
  12946. // 判断有无传值
  12947. if (objKeys.length > 0) {
  12948. // 循环赋值对象数据
  12949. for (var a in page.options) {
  12950. // 判断有无邀请人
  12951. if (a != 'spread') {
  12952. url += a + "=" + page.options[a] + "&";
  12953. }
  12954. }
  12955. path += '?' + url.substr(0, url.length - 1);
  12956. }
  12957. // 返回处理邀请人后的邀请地址
  12958. return path;
  12959. }
  12960. //登录拦截
  12961. function interceptor() {
  12962. var pages = getActionPage();
  12963. // 获取当前页面
  12964. var pageUrl = '/' + pages.route;
  12965. var url = '/pages/login/login';
  12966. url = '/pages/public/wxLogin';
  12967. if (pageUrl != url) {
  12968. uni.navigateTo({
  12969. url: url });
  12970. }
  12971. }
  12972. // 保存页面
  12973. function saveUrl() {
  12974. // 获取当前页面
  12975. var page = getActionPage();
  12976. // 获取跳转前路由地址
  12977. var path = '/' + page.route;
  12978. var url = '';
  12979. // 获取对象可枚举键值列表
  12980. var objKeys = Object.keys(page.options);
  12981. // 判断有无传值
  12982. if (objKeys.length > 0) {
  12983. // 循环赋值对象数据
  12984. for (var a in page.options) {
  12985. url += a + "=" + page.options[a] + "&";
  12986. }
  12987. path += '?' + url.substr(0, url.length - 1);
  12988. }
  12989. // uni.showModal({
  12990. // title: '地址',
  12991. // content: path,
  12992. // fail: function (res) {
  12993. // console.log(res.errMsg);
  12994. // uni.showModal({
  12995. // title: 'error',
  12996. // content: res.errMsg
  12997. // })
  12998. // }
  12999. // })
  13000. uni.setStorageSync('present', path);
  13001. // // 获取当前页面
  13002. // let page = getActionPage();
  13003. // // 获取跳转前路由地址
  13004. // let path = '/' + page.route;
  13005. // let url = '';
  13006. // // 获取对象可枚举键值列表
  13007. // let objKeys = Object.keys(page.options);
  13008. // // 判断有无传值
  13009. // if (objKeys.length > 0) {
  13010. // // 循环赋值对象数据
  13011. // for (let a in page.options) {
  13012. // url += a + "=" + page.options[a] + "&"
  13013. // }
  13014. // path += '?' + url.substr(0, url.length - 1);
  13015. // }
  13016. // console.log(path,1)
  13017. // uni.setStorageSync('present', path);
  13018. }
  13019. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  13020. /***/ }),
  13021. /***/ 27:
  13022. /*!*****************************************************************!*\
  13023. !*** /Users/wanglili/Documents/work/GitHub/huaihua/api/user.js ***!
  13024. \*****************************************************************/
  13025. /*! no static exports found */
  13026. /***/ (function(module, exports, __webpack_require__) {
  13027. "use strict";
  13028. Object.defineProperty(exports, "__esModule", { value: true });exports.orderData = orderData;exports.userinfo = userinfo;exports.userinfoid = userinfoid;var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 21));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  13029. // 订单统计信息
  13030. function orderData(data) {
  13031. return (0, _request.default)({
  13032. url: '/api/order/data',
  13033. method: 'get',
  13034. data: data });
  13035. }
  13036. // 获取用户信息
  13037. function userinfo(data) {
  13038. return (0, _request.default)({
  13039. url: '/api/userinfo',
  13040. method: 'get',
  13041. data: data });
  13042. }
  13043. //获取名片信息
  13044. function userinfoid(data) {
  13045. return (0, _request.default)({
  13046. url: '/api/level/recharge',
  13047. method: 'post',
  13048. data: data });
  13049. }
  13050. /***/ }),
  13051. /***/ 3:
  13052. /*!***********************************!*\
  13053. !*** (webpack)/buildin/global.js ***!
  13054. \***********************************/
  13055. /*! no static exports found */
  13056. /***/ (function(module, exports) {
  13057. var g;
  13058. // This works in non-strict mode
  13059. g = (function() {
  13060. return this;
  13061. })();
  13062. try {
  13063. // This works if eval is allowed (see CSP)
  13064. g = g || new Function("return this")();
  13065. } catch (e) {
  13066. // This works if the window reference is available
  13067. if (typeof window === "object") g = window;
  13068. }
  13069. // g can still be undefined, but nothing to do about it...
  13070. // We return undefined, instead of nothing here, so it's
  13071. // easier to handle this case. if(!global) { ...}
  13072. module.exports = g;
  13073. /***/ }),
  13074. /***/ 4:
  13075. /*!****************************************************************!*\
  13076. !*** /Users/wanglili/Documents/work/GitHub/huaihua/pages.json ***!
  13077. \****************************************************************/
  13078. /*! no static exports found */
  13079. /***/ (function(module, exports) {
  13080. /***/ }),
  13081. /***/ 44:
  13082. /*!****************************************************************!*\
  13083. !*** /Users/wanglili/Documents/work/GitHub/huaihua/api/ask.js ***!
  13084. \****************************************************************/
  13085. /*! no static exports found */
  13086. /***/ (function(module, exports, __webpack_require__) {
  13087. "use strict";
  13088. Object.defineProperty(exports, "__esModule", { value: true });exports.addrescuer = addrescuer;exports.upload = upload;exports.articlesave = articlesave;exports.myarticle = myarticle;exports.replyask = replyask;exports.replylist = replylist;exports.myreplylist = myreplylist;var _request = _interopRequireWildcard(__webpack_require__(/*! @/utils/request */ 21));function _getRequireWildcardCache() {if (typeof WeakMap !== "function") return null;var cache = new WeakMap();_getRequireWildcardCache = function _getRequireWildcardCache() {return cache;};return cache;}function _interopRequireWildcard(obj) {if (obj && obj.__esModule) {return obj;}if (obj === null || typeof obj !== "object" && typeof obj !== "function") {return { default: obj };}var cache = _getRequireWildcardCache();if (cache && cache.has(obj)) {return cache.get(obj);}var newObj = {};var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;for (var key in obj) {if (Object.prototype.hasOwnProperty.call(obj, key)) {var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;if (desc && (desc.get || desc.set)) {Object.defineProperty(newObj, key, desc);} else {newObj[key] = obj[key];}}}newObj.default = obj;if (cache) {cache.set(obj, newObj);}return newObj;}
  13089. //上传救护者信息
  13090. function addrescuer(data) {
  13091. return (0, _request.default)({
  13092. url: '/api/add_rescuer',
  13093. method: 'post',
  13094. data: data });
  13095. }
  13096. //上传图片
  13097. function upload(data) {
  13098. return (0, _request.upFilse)({
  13099. url: '/api/upload/image',
  13100. method: 'post',
  13101. data: data });
  13102. }
  13103. //发表文章
  13104. function articlesave(data) {
  13105. return (0, _request.default)({
  13106. url: '/api/circle/articlesave',
  13107. method: 'post',
  13108. data: data });
  13109. }
  13110. //我发表的文章
  13111. function myarticle(data) {
  13112. return (0, _request.default)({
  13113. url: '/api/circle/myarticle',
  13114. method: 'post',
  13115. data: data });
  13116. }
  13117. //发表评论
  13118. function replyask(data) {
  13119. return (0, _request.default)({
  13120. url: '/api/add_a',
  13121. method: 'post',
  13122. data: data });
  13123. }
  13124. //问答详情
  13125. function replylist(data) {
  13126. return (0, _request.default)({
  13127. url: '/api/q_list',
  13128. method: 'get',
  13129. data: data });
  13130. }
  13131. //评论列表
  13132. function myreplylist(data) {
  13133. return (0, _request.default)({
  13134. url: '/api/a_list',
  13135. method: 'get',
  13136. data: data });
  13137. }
  13138. /***/ }),
  13139. /***/ 5:
  13140. /*!********************************************************************!*\
  13141. !*** /Users/wanglili/Documents/work/GitHub/huaihua/store/index.js ***!
  13142. \********************************************************************/
  13143. /*! no static exports found */
  13144. /***/ (function(module, exports, __webpack_require__) {
  13145. "use strict";
  13146. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));
  13147. var _vuex = _interopRequireDefault(__webpack_require__(/*! vuex */ 6));
  13148. var _user = _interopRequireDefault(__webpack_require__(/*! ./model/user */ 7));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  13149. _vue.default.use(_vuex.default);
  13150. var store = new _vuex.default.Store({
  13151. state: {
  13152. baseURL: 'http://hhred.igxys.com', //请求地址配置
  13153. // baseURL: 'http://yrh.liuniu946.com', //请求地址配置
  13154. urlFile: '/index', //项目部署所在文件夹
  13155. loginInterceptor: false, //是否打开强制登录
  13156. token: ''
  13157. // shareData:'',//分享信息
  13158. },
  13159. mutations: {},
  13160. modules: {
  13161. user: _user.default },
  13162. actions: {} });var _default =
  13163. store;exports.default = _default;
  13164. /***/ }),
  13165. /***/ 6:
  13166. /*!********************************************!*\
  13167. !*** ./node_modules/vuex/dist/vuex.esm.js ***!
  13168. \********************************************/
  13169. /*! exports provided: Store, install, mapState, mapMutations, mapGetters, mapActions, createNamespacedHelpers, default */
  13170. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  13171. "use strict";
  13172. __webpack_require__.r(__webpack_exports__);
  13173. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Store", function() { return Store; });
  13174. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "install", function() { return install; });
  13175. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapState", function() { return mapState; });
  13176. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapMutations", function() { return mapMutations; });
  13177. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapGetters", function() { return mapGetters; });
  13178. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapActions", function() { return mapActions; });
  13179. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createNamespacedHelpers", function() { return createNamespacedHelpers; });
  13180. /**
  13181. * vuex v3.0.1
  13182. * (c) 2017 Evan You
  13183. * @license MIT
  13184. */
  13185. var applyMixin = function (Vue) {
  13186. var version = Number(Vue.version.split('.')[0]);
  13187. if (version >= 2) {
  13188. Vue.mixin({ beforeCreate: vuexInit });
  13189. } else {
  13190. // override init and inject vuex init procedure
  13191. // for 1.x backwards compatibility.
  13192. var _init = Vue.prototype._init;
  13193. Vue.prototype._init = function (options) {
  13194. if ( options === void 0 ) options = {};
  13195. options.init = options.init
  13196. ? [vuexInit].concat(options.init)
  13197. : vuexInit;
  13198. _init.call(this, options);
  13199. };
  13200. }
  13201. /**
  13202. * Vuex init hook, injected into each instances init hooks list.
  13203. */
  13204. function vuexInit () {
  13205. var options = this.$options;
  13206. // store injection
  13207. if (options.store) {
  13208. this.$store = typeof options.store === 'function'
  13209. ? options.store()
  13210. : options.store;
  13211. } else if (options.parent && options.parent.$store) {
  13212. this.$store = options.parent.$store;
  13213. }
  13214. }
  13215. };
  13216. var devtoolHook =
  13217. typeof window !== 'undefined' &&
  13218. window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  13219. function devtoolPlugin (store) {
  13220. if (!devtoolHook) { return }
  13221. store._devtoolHook = devtoolHook;
  13222. devtoolHook.emit('vuex:init', store);
  13223. devtoolHook.on('vuex:travel-to-state', function (targetState) {
  13224. store.replaceState(targetState);
  13225. });
  13226. store.subscribe(function (mutation, state) {
  13227. devtoolHook.emit('vuex:mutation', mutation, state);
  13228. });
  13229. }
  13230. /**
  13231. * Get the first item that pass the test
  13232. * by second argument function
  13233. *
  13234. * @param {Array} list
  13235. * @param {Function} f
  13236. * @return {*}
  13237. */
  13238. /**
  13239. * Deep copy the given object considering circular structure.
  13240. * This function caches all nested objects and its copies.
  13241. * If it detects circular structure, use cached copy to avoid infinite loop.
  13242. *
  13243. * @param {*} obj
  13244. * @param {Array<Object>} cache
  13245. * @return {*}
  13246. */
  13247. /**
  13248. * forEach for object
  13249. */
  13250. function forEachValue (obj, fn) {
  13251. Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });
  13252. }
  13253. function isObject (obj) {
  13254. return obj !== null && typeof obj === 'object'
  13255. }
  13256. function isPromise (val) {
  13257. return val && typeof val.then === 'function'
  13258. }
  13259. function assert (condition, msg) {
  13260. if (!condition) { throw new Error(("[vuex] " + msg)) }
  13261. }
  13262. var Module = function Module (rawModule, runtime) {
  13263. this.runtime = runtime;
  13264. this._children = Object.create(null);
  13265. this._rawModule = rawModule;
  13266. var rawState = rawModule.state;
  13267. this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
  13268. };
  13269. var prototypeAccessors$1 = { namespaced: { configurable: true } };
  13270. prototypeAccessors$1.namespaced.get = function () {
  13271. return !!this._rawModule.namespaced
  13272. };
  13273. Module.prototype.addChild = function addChild (key, module) {
  13274. this._children[key] = module;
  13275. };
  13276. Module.prototype.removeChild = function removeChild (key) {
  13277. delete this._children[key];
  13278. };
  13279. Module.prototype.getChild = function getChild (key) {
  13280. return this._children[key]
  13281. };
  13282. Module.prototype.update = function update (rawModule) {
  13283. this._rawModule.namespaced = rawModule.namespaced;
  13284. if (rawModule.actions) {
  13285. this._rawModule.actions = rawModule.actions;
  13286. }
  13287. if (rawModule.mutations) {
  13288. this._rawModule.mutations = rawModule.mutations;
  13289. }
  13290. if (rawModule.getters) {
  13291. this._rawModule.getters = rawModule.getters;
  13292. }
  13293. };
  13294. Module.prototype.forEachChild = function forEachChild (fn) {
  13295. forEachValue(this._children, fn);
  13296. };
  13297. Module.prototype.forEachGetter = function forEachGetter (fn) {
  13298. if (this._rawModule.getters) {
  13299. forEachValue(this._rawModule.getters, fn);
  13300. }
  13301. };
  13302. Module.prototype.forEachAction = function forEachAction (fn) {
  13303. if (this._rawModule.actions) {
  13304. forEachValue(this._rawModule.actions, fn);
  13305. }
  13306. };
  13307. Module.prototype.forEachMutation = function forEachMutation (fn) {
  13308. if (this._rawModule.mutations) {
  13309. forEachValue(this._rawModule.mutations, fn);
  13310. }
  13311. };
  13312. Object.defineProperties( Module.prototype, prototypeAccessors$1 );
  13313. var ModuleCollection = function ModuleCollection (rawRootModule) {
  13314. // register root module (Vuex.Store options)
  13315. this.register([], rawRootModule, false);
  13316. };
  13317. ModuleCollection.prototype.get = function get (path) {
  13318. return path.reduce(function (module, key) {
  13319. return module.getChild(key)
  13320. }, this.root)
  13321. };
  13322. ModuleCollection.prototype.getNamespace = function getNamespace (path) {
  13323. var module = this.root;
  13324. return path.reduce(function (namespace, key) {
  13325. module = module.getChild(key);
  13326. return namespace + (module.namespaced ? key + '/' : '')
  13327. }, '')
  13328. };
  13329. ModuleCollection.prototype.update = function update$1 (rawRootModule) {
  13330. update([], this.root, rawRootModule);
  13331. };
  13332. ModuleCollection.prototype.register = function register (path, rawModule, runtime) {
  13333. var this$1 = this;
  13334. if ( runtime === void 0 ) runtime = true;
  13335. if (true) {
  13336. assertRawModule(path, rawModule);
  13337. }
  13338. var newModule = new Module(rawModule, runtime);
  13339. if (path.length === 0) {
  13340. this.root = newModule;
  13341. } else {
  13342. var parent = this.get(path.slice(0, -1));
  13343. parent.addChild(path[path.length - 1], newModule);
  13344. }
  13345. // register nested modules
  13346. if (rawModule.modules) {
  13347. forEachValue(rawModule.modules, function (rawChildModule, key) {
  13348. this$1.register(path.concat(key), rawChildModule, runtime);
  13349. });
  13350. }
  13351. };
  13352. ModuleCollection.prototype.unregister = function unregister (path) {
  13353. var parent = this.get(path.slice(0, -1));
  13354. var key = path[path.length - 1];
  13355. if (!parent.getChild(key).runtime) { return }
  13356. parent.removeChild(key);
  13357. };
  13358. function update (path, targetModule, newModule) {
  13359. if (true) {
  13360. assertRawModule(path, newModule);
  13361. }
  13362. // update target module
  13363. targetModule.update(newModule);
  13364. // update nested modules
  13365. if (newModule.modules) {
  13366. for (var key in newModule.modules) {
  13367. if (!targetModule.getChild(key)) {
  13368. if (true) {
  13369. console.warn(
  13370. "[vuex] trying to add a new module '" + key + "' on hot reloading, " +
  13371. 'manual reload is needed'
  13372. );
  13373. }
  13374. return
  13375. }
  13376. update(
  13377. path.concat(key),
  13378. targetModule.getChild(key),
  13379. newModule.modules[key]
  13380. );
  13381. }
  13382. }
  13383. }
  13384. var functionAssert = {
  13385. assert: function (value) { return typeof value === 'function'; },
  13386. expected: 'function'
  13387. };
  13388. var objectAssert = {
  13389. assert: function (value) { return typeof value === 'function' ||
  13390. (typeof value === 'object' && typeof value.handler === 'function'); },
  13391. expected: 'function or object with "handler" function'
  13392. };
  13393. var assertTypes = {
  13394. getters: functionAssert,
  13395. mutations: functionAssert,
  13396. actions: objectAssert
  13397. };
  13398. function assertRawModule (path, rawModule) {
  13399. Object.keys(assertTypes).forEach(function (key) {
  13400. if (!rawModule[key]) { return }
  13401. var assertOptions = assertTypes[key];
  13402. forEachValue(rawModule[key], function (value, type) {
  13403. assert(
  13404. assertOptions.assert(value),
  13405. makeAssertionMessage(path, key, type, value, assertOptions.expected)
  13406. );
  13407. });
  13408. });
  13409. }
  13410. function makeAssertionMessage (path, key, type, value, expected) {
  13411. var buf = key + " should be " + expected + " but \"" + key + "." + type + "\"";
  13412. if (path.length > 0) {
  13413. buf += " in module \"" + (path.join('.')) + "\"";
  13414. }
  13415. buf += " is " + (JSON.stringify(value)) + ".";
  13416. return buf
  13417. }
  13418. var Vue; // bind on install
  13419. var Store = function Store (options) {
  13420. var this$1 = this;
  13421. if ( options === void 0 ) options = {};
  13422. // Auto install if it is not done yet and `window` has `Vue`.
  13423. // To allow users to avoid auto-installation in some cases,
  13424. // this code should be placed here. See #731
  13425. if (!Vue && typeof window !== 'undefined' && window.Vue) {
  13426. install(window.Vue);
  13427. }
  13428. if (true) {
  13429. assert(Vue, "must call Vue.use(Vuex) before creating a store instance.");
  13430. assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser.");
  13431. assert(this instanceof Store, "Store must be called with the new operator.");
  13432. }
  13433. var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];
  13434. var strict = options.strict; if ( strict === void 0 ) strict = false;
  13435. var state = options.state; if ( state === void 0 ) state = {};
  13436. if (typeof state === 'function') {
  13437. state = state() || {};
  13438. }
  13439. // store internal state
  13440. this._committing = false;
  13441. this._actions = Object.create(null);
  13442. this._actionSubscribers = [];
  13443. this._mutations = Object.create(null);
  13444. this._wrappedGetters = Object.create(null);
  13445. this._modules = new ModuleCollection(options);
  13446. this._modulesNamespaceMap = Object.create(null);
  13447. this._subscribers = [];
  13448. this._watcherVM = new Vue();
  13449. // bind commit and dispatch to self
  13450. var store = this;
  13451. var ref = this;
  13452. var dispatch = ref.dispatch;
  13453. var commit = ref.commit;
  13454. this.dispatch = function boundDispatch (type, payload) {
  13455. return dispatch.call(store, type, payload)
  13456. };
  13457. this.commit = function boundCommit (type, payload, options) {
  13458. return commit.call(store, type, payload, options)
  13459. };
  13460. // strict mode
  13461. this.strict = strict;
  13462. // init root module.
  13463. // this also recursively registers all sub-modules
  13464. // and collects all module getters inside this._wrappedGetters
  13465. installModule(this, state, [], this._modules.root);
  13466. // initialize the store vm, which is responsible for the reactivity
  13467. // (also registers _wrappedGetters as computed properties)
  13468. resetStoreVM(this, state);
  13469. // apply plugins
  13470. plugins.forEach(function (plugin) { return plugin(this$1); });
  13471. if (Vue.config.devtools) {
  13472. devtoolPlugin(this);
  13473. }
  13474. };
  13475. var prototypeAccessors = { state: { configurable: true } };
  13476. prototypeAccessors.state.get = function () {
  13477. return this._vm._data.$$state
  13478. };
  13479. prototypeAccessors.state.set = function (v) {
  13480. if (true) {
  13481. assert(false, "Use store.replaceState() to explicit replace store state.");
  13482. }
  13483. };
  13484. Store.prototype.commit = function commit (_type, _payload, _options) {
  13485. var this$1 = this;
  13486. // check object-style commit
  13487. var ref = unifyObjectStyle(_type, _payload, _options);
  13488. var type = ref.type;
  13489. var payload = ref.payload;
  13490. var options = ref.options;
  13491. var mutation = { type: type, payload: payload };
  13492. var entry = this._mutations[type];
  13493. if (!entry) {
  13494. if (true) {
  13495. console.error(("[vuex] unknown mutation type: " + type));
  13496. }
  13497. return
  13498. }
  13499. this._withCommit(function () {
  13500. entry.forEach(function commitIterator (handler) {
  13501. handler(payload);
  13502. });
  13503. });
  13504. this._subscribers.forEach(function (sub) { return sub(mutation, this$1.state); });
  13505. if (
  13506. true &&
  13507. options && options.silent
  13508. ) {
  13509. console.warn(
  13510. "[vuex] mutation type: " + type + ". Silent option has been removed. " +
  13511. 'Use the filter functionality in the vue-devtools'
  13512. );
  13513. }
  13514. };
  13515. Store.prototype.dispatch = function dispatch (_type, _payload) {
  13516. var this$1 = this;
  13517. // check object-style dispatch
  13518. var ref = unifyObjectStyle(_type, _payload);
  13519. var type = ref.type;
  13520. var payload = ref.payload;
  13521. var action = { type: type, payload: payload };
  13522. var entry = this._actions[type];
  13523. if (!entry) {
  13524. if (true) {
  13525. console.error(("[vuex] unknown action type: " + type));
  13526. }
  13527. return
  13528. }
  13529. this._actionSubscribers.forEach(function (sub) { return sub(action, this$1.state); });
  13530. return entry.length > 1
  13531. ? Promise.all(entry.map(function (handler) { return handler(payload); }))
  13532. : entry[0](payload)
  13533. };
  13534. Store.prototype.subscribe = function subscribe (fn) {
  13535. return genericSubscribe(fn, this._subscribers)
  13536. };
  13537. Store.prototype.subscribeAction = function subscribeAction (fn) {
  13538. return genericSubscribe(fn, this._actionSubscribers)
  13539. };
  13540. Store.prototype.watch = function watch (getter, cb, options) {
  13541. var this$1 = this;
  13542. if (true) {
  13543. assert(typeof getter === 'function', "store.watch only accepts a function.");
  13544. }
  13545. return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)
  13546. };
  13547. Store.prototype.replaceState = function replaceState (state) {
  13548. var this$1 = this;
  13549. this._withCommit(function () {
  13550. this$1._vm._data.$$state = state;
  13551. });
  13552. };
  13553. Store.prototype.registerModule = function registerModule (path, rawModule, options) {
  13554. if ( options === void 0 ) options = {};
  13555. if (typeof path === 'string') { path = [path]; }
  13556. if (true) {
  13557. assert(Array.isArray(path), "module path must be a string or an Array.");
  13558. assert(path.length > 0, 'cannot register the root module by using registerModule.');
  13559. }
  13560. this._modules.register(path, rawModule);
  13561. installModule(this, this.state, path, this._modules.get(path), options.preserveState);
  13562. // reset store to update getters...
  13563. resetStoreVM(this, this.state);
  13564. };
  13565. Store.prototype.unregisterModule = function unregisterModule (path) {
  13566. var this$1 = this;
  13567. if (typeof path === 'string') { path = [path]; }
  13568. if (true) {
  13569. assert(Array.isArray(path), "module path must be a string or an Array.");
  13570. }
  13571. this._modules.unregister(path);
  13572. this._withCommit(function () {
  13573. var parentState = getNestedState(this$1.state, path.slice(0, -1));
  13574. Vue.delete(parentState, path[path.length - 1]);
  13575. });
  13576. resetStore(this);
  13577. };
  13578. Store.prototype.hotUpdate = function hotUpdate (newOptions) {
  13579. this._modules.update(newOptions);
  13580. resetStore(this, true);
  13581. };
  13582. Store.prototype._withCommit = function _withCommit (fn) {
  13583. var committing = this._committing;
  13584. this._committing = true;
  13585. fn();
  13586. this._committing = committing;
  13587. };
  13588. Object.defineProperties( Store.prototype, prototypeAccessors );
  13589. function genericSubscribe (fn, subs) {
  13590. if (subs.indexOf(fn) < 0) {
  13591. subs.push(fn);
  13592. }
  13593. return function () {
  13594. var i = subs.indexOf(fn);
  13595. if (i > -1) {
  13596. subs.splice(i, 1);
  13597. }
  13598. }
  13599. }
  13600. function resetStore (store, hot) {
  13601. store._actions = Object.create(null);
  13602. store._mutations = Object.create(null);
  13603. store._wrappedGetters = Object.create(null);
  13604. store._modulesNamespaceMap = Object.create(null);
  13605. var state = store.state;
  13606. // init all modules
  13607. installModule(store, state, [], store._modules.root, true);
  13608. // reset vm
  13609. resetStoreVM(store, state, hot);
  13610. }
  13611. function resetStoreVM (store, state, hot) {
  13612. var oldVm = store._vm;
  13613. // bind store public getters
  13614. store.getters = {};
  13615. var wrappedGetters = store._wrappedGetters;
  13616. var computed = {};
  13617. forEachValue(wrappedGetters, function (fn, key) {
  13618. // use computed to leverage its lazy-caching mechanism
  13619. computed[key] = function () { return fn(store); };
  13620. Object.defineProperty(store.getters, key, {
  13621. get: function () { return store._vm[key]; },
  13622. enumerable: true // for local getters
  13623. });
  13624. });
  13625. // use a Vue instance to store the state tree
  13626. // suppress warnings just in case the user has added
  13627. // some funky global mixins
  13628. var silent = Vue.config.silent;
  13629. Vue.config.silent = true;
  13630. store._vm = new Vue({
  13631. data: {
  13632. $$state: state
  13633. },
  13634. computed: computed
  13635. });
  13636. Vue.config.silent = silent;
  13637. // enable strict mode for new vm
  13638. if (store.strict) {
  13639. enableStrictMode(store);
  13640. }
  13641. if (oldVm) {
  13642. if (hot) {
  13643. // dispatch changes in all subscribed watchers
  13644. // to force getter re-evaluation for hot reloading.
  13645. store._withCommit(function () {
  13646. oldVm._data.$$state = null;
  13647. });
  13648. }
  13649. Vue.nextTick(function () { return oldVm.$destroy(); });
  13650. }
  13651. }
  13652. function installModule (store, rootState, path, module, hot) {
  13653. var isRoot = !path.length;
  13654. var namespace = store._modules.getNamespace(path);
  13655. // register in namespace map
  13656. if (module.namespaced) {
  13657. store._modulesNamespaceMap[namespace] = module;
  13658. }
  13659. // set state
  13660. if (!isRoot && !hot) {
  13661. var parentState = getNestedState(rootState, path.slice(0, -1));
  13662. var moduleName = path[path.length - 1];
  13663. store._withCommit(function () {
  13664. Vue.set(parentState, moduleName, module.state);
  13665. });
  13666. }
  13667. var local = module.context = makeLocalContext(store, namespace, path);
  13668. module.forEachMutation(function (mutation, key) {
  13669. var namespacedType = namespace + key;
  13670. registerMutation(store, namespacedType, mutation, local);
  13671. });
  13672. module.forEachAction(function (action, key) {
  13673. var type = action.root ? key : namespace + key;
  13674. var handler = action.handler || action;
  13675. registerAction(store, type, handler, local);
  13676. });
  13677. module.forEachGetter(function (getter, key) {
  13678. var namespacedType = namespace + key;
  13679. registerGetter(store, namespacedType, getter, local);
  13680. });
  13681. module.forEachChild(function (child, key) {
  13682. installModule(store, rootState, path.concat(key), child, hot);
  13683. });
  13684. }
  13685. /**
  13686. * make localized dispatch, commit, getters and state
  13687. * if there is no namespace, just use root ones
  13688. */
  13689. function makeLocalContext (store, namespace, path) {
  13690. var noNamespace = namespace === '';
  13691. var local = {
  13692. dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
  13693. var args = unifyObjectStyle(_type, _payload, _options);
  13694. var payload = args.payload;
  13695. var options = args.options;
  13696. var type = args.type;
  13697. if (!options || !options.root) {
  13698. type = namespace + type;
  13699. if ( true && !store._actions[type]) {
  13700. console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type));
  13701. return
  13702. }
  13703. }
  13704. return store.dispatch(type, payload)
  13705. },
  13706. commit: noNamespace ? store.commit : function (_type, _payload, _options) {
  13707. var args = unifyObjectStyle(_type, _payload, _options);
  13708. var payload = args.payload;
  13709. var options = args.options;
  13710. var type = args.type;
  13711. if (!options || !options.root) {
  13712. type = namespace + type;
  13713. if ( true && !store._mutations[type]) {
  13714. console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type));
  13715. return
  13716. }
  13717. }
  13718. store.commit(type, payload, options);
  13719. }
  13720. };
  13721. // getters and state object must be gotten lazily
  13722. // because they will be changed by vm update
  13723. Object.defineProperties(local, {
  13724. getters: {
  13725. get: noNamespace
  13726. ? function () { return store.getters; }
  13727. : function () { return makeLocalGetters(store, namespace); }
  13728. },
  13729. state: {
  13730. get: function () { return getNestedState(store.state, path); }
  13731. }
  13732. });
  13733. return local
  13734. }
  13735. function makeLocalGetters (store, namespace) {
  13736. var gettersProxy = {};
  13737. var splitPos = namespace.length;
  13738. Object.keys(store.getters).forEach(function (type) {
  13739. // skip if the target getter is not match this namespace
  13740. if (type.slice(0, splitPos) !== namespace) { return }
  13741. // extract local getter type
  13742. var localType = type.slice(splitPos);
  13743. // Add a port to the getters proxy.
  13744. // Define as getter property because
  13745. // we do not want to evaluate the getters in this time.
  13746. Object.defineProperty(gettersProxy, localType, {
  13747. get: function () { return store.getters[type]; },
  13748. enumerable: true
  13749. });
  13750. });
  13751. return gettersProxy
  13752. }
  13753. function registerMutation (store, type, handler, local) {
  13754. var entry = store._mutations[type] || (store._mutations[type] = []);
  13755. entry.push(function wrappedMutationHandler (payload) {
  13756. handler.call(store, local.state, payload);
  13757. });
  13758. }
  13759. function registerAction (store, type, handler, local) {
  13760. var entry = store._actions[type] || (store._actions[type] = []);
  13761. entry.push(function wrappedActionHandler (payload, cb) {
  13762. var res = handler.call(store, {
  13763. dispatch: local.dispatch,
  13764. commit: local.commit,
  13765. getters: local.getters,
  13766. state: local.state,
  13767. rootGetters: store.getters,
  13768. rootState: store.state
  13769. }, payload, cb);
  13770. if (!isPromise(res)) {
  13771. res = Promise.resolve(res);
  13772. }
  13773. if (store._devtoolHook) {
  13774. return res.catch(function (err) {
  13775. store._devtoolHook.emit('vuex:error', err);
  13776. throw err
  13777. })
  13778. } else {
  13779. return res
  13780. }
  13781. });
  13782. }
  13783. function registerGetter (store, type, rawGetter, local) {
  13784. if (store._wrappedGetters[type]) {
  13785. if (true) {
  13786. console.error(("[vuex] duplicate getter key: " + type));
  13787. }
  13788. return
  13789. }
  13790. store._wrappedGetters[type] = function wrappedGetter (store) {
  13791. return rawGetter(
  13792. local.state, // local state
  13793. local.getters, // local getters
  13794. store.state, // root state
  13795. store.getters // root getters
  13796. )
  13797. };
  13798. }
  13799. function enableStrictMode (store) {
  13800. store._vm.$watch(function () { return this._data.$$state }, function () {
  13801. if (true) {
  13802. assert(store._committing, "Do not mutate vuex store state outside mutation handlers.");
  13803. }
  13804. }, { deep: true, sync: true });
  13805. }
  13806. function getNestedState (state, path) {
  13807. return path.length
  13808. ? path.reduce(function (state, key) { return state[key]; }, state)
  13809. : state
  13810. }
  13811. function unifyObjectStyle (type, payload, options) {
  13812. if (isObject(type) && type.type) {
  13813. options = payload;
  13814. payload = type;
  13815. type = type.type;
  13816. }
  13817. if (true) {
  13818. assert(typeof type === 'string', ("Expects string as the type, but found " + (typeof type) + "."));
  13819. }
  13820. return { type: type, payload: payload, options: options }
  13821. }
  13822. function install (_Vue) {
  13823. if (Vue && _Vue === Vue) {
  13824. if (true) {
  13825. console.error(
  13826. '[vuex] already installed. Vue.use(Vuex) should be called only once.'
  13827. );
  13828. }
  13829. return
  13830. }
  13831. Vue = _Vue;
  13832. applyMixin(Vue);
  13833. }
  13834. var mapState = normalizeNamespace(function (namespace, states) {
  13835. var res = {};
  13836. normalizeMap(states).forEach(function (ref) {
  13837. var key = ref.key;
  13838. var val = ref.val;
  13839. res[key] = function mappedState () {
  13840. var state = this.$store.state;
  13841. var getters = this.$store.getters;
  13842. if (namespace) {
  13843. var module = getModuleByNamespace(this.$store, 'mapState', namespace);
  13844. if (!module) {
  13845. return
  13846. }
  13847. state = module.context.state;
  13848. getters = module.context.getters;
  13849. }
  13850. return typeof val === 'function'
  13851. ? val.call(this, state, getters)
  13852. : state[val]
  13853. };
  13854. // mark vuex getter for devtools
  13855. res[key].vuex = true;
  13856. });
  13857. return res
  13858. });
  13859. var mapMutations = normalizeNamespace(function (namespace, mutations) {
  13860. var res = {};
  13861. normalizeMap(mutations).forEach(function (ref) {
  13862. var key = ref.key;
  13863. var val = ref.val;
  13864. res[key] = function mappedMutation () {
  13865. var args = [], len = arguments.length;
  13866. while ( len-- ) args[ len ] = arguments[ len ];
  13867. var commit = this.$store.commit;
  13868. if (namespace) {
  13869. var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
  13870. if (!module) {
  13871. return
  13872. }
  13873. commit = module.context.commit;
  13874. }
  13875. return typeof val === 'function'
  13876. ? val.apply(this, [commit].concat(args))
  13877. : commit.apply(this.$store, [val].concat(args))
  13878. };
  13879. });
  13880. return res
  13881. });
  13882. var mapGetters = normalizeNamespace(function (namespace, getters) {
  13883. var res = {};
  13884. normalizeMap(getters).forEach(function (ref) {
  13885. var key = ref.key;
  13886. var val = ref.val;
  13887. val = namespace + val;
  13888. res[key] = function mappedGetter () {
  13889. if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
  13890. return
  13891. }
  13892. if ( true && !(val in this.$store.getters)) {
  13893. console.error(("[vuex] unknown getter: " + val));
  13894. return
  13895. }
  13896. return this.$store.getters[val]
  13897. };
  13898. // mark vuex getter for devtools
  13899. res[key].vuex = true;
  13900. });
  13901. return res
  13902. });
  13903. var mapActions = normalizeNamespace(function (namespace, actions) {
  13904. var res = {};
  13905. normalizeMap(actions).forEach(function (ref) {
  13906. var key = ref.key;
  13907. var val = ref.val;
  13908. res[key] = function mappedAction () {
  13909. var args = [], len = arguments.length;
  13910. while ( len-- ) args[ len ] = arguments[ len ];
  13911. var dispatch = this.$store.dispatch;
  13912. if (namespace) {
  13913. var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
  13914. if (!module) {
  13915. return
  13916. }
  13917. dispatch = module.context.dispatch;
  13918. }
  13919. return typeof val === 'function'
  13920. ? val.apply(this, [dispatch].concat(args))
  13921. : dispatch.apply(this.$store, [val].concat(args))
  13922. };
  13923. });
  13924. return res
  13925. });
  13926. var createNamespacedHelpers = function (namespace) { return ({
  13927. mapState: mapState.bind(null, namespace),
  13928. mapGetters: mapGetters.bind(null, namespace),
  13929. mapMutations: mapMutations.bind(null, namespace),
  13930. mapActions: mapActions.bind(null, namespace)
  13931. }); };
  13932. function normalizeMap (map) {
  13933. return Array.isArray(map)
  13934. ? map.map(function (key) { return ({ key: key, val: key }); })
  13935. : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })
  13936. }
  13937. function normalizeNamespace (fn) {
  13938. return function (namespace, map) {
  13939. if (typeof namespace !== 'string') {
  13940. map = namespace;
  13941. namespace = '';
  13942. } else if (namespace.charAt(namespace.length - 1) !== '/') {
  13943. namespace += '/';
  13944. }
  13945. return fn(namespace, map)
  13946. }
  13947. }
  13948. function getModuleByNamespace (store, helper, namespace) {
  13949. var module = store._modulesNamespaceMap[namespace];
  13950. if ( true && !module) {
  13951. console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace));
  13952. }
  13953. return module
  13954. }
  13955. var index_esm = {
  13956. Store: Store,
  13957. install: install,
  13958. version: '3.0.1',
  13959. mapState: mapState,
  13960. mapMutations: mapMutations,
  13961. mapGetters: mapGetters,
  13962. mapActions: mapActions,
  13963. createNamespacedHelpers: createNamespacedHelpers
  13964. };
  13965. /* harmony default export */ __webpack_exports__["default"] = (index_esm);
  13966. /***/ }),
  13967. /***/ 7:
  13968. /*!*************************************************************************!*\
  13969. !*** /Users/wanglili/Documents/work/GitHub/huaihua/store/model/user.js ***!
  13970. \*************************************************************************/
  13971. /*! no static exports found */
  13972. /***/ (function(module, exports, __webpack_require__) {
  13973. "use strict";
  13974. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var state = {
  13975. userInfo: {}, //用户信息
  13976. orderInfo: {
  13977. complete_count: 0, //完成
  13978. received_count: 0, //待收货
  13979. unshipped_count: 0, //待发货
  13980. order_count: 0, //订单总数
  13981. unpaid_count: 0 //待付款
  13982. }, //订单信息
  13983. hasLogin: false //是否登录
  13984. };
  13985. var mutations = {
  13986. // 登录
  13987. login: function login(state) {
  13988. state.hasLogin = true;
  13989. },
  13990. // 退出登录
  13991. logout: function logout(state, provider) {
  13992. state.hasLogin = false;
  13993. // 清空基础信息
  13994. state.userInfo = {};
  13995. state.orderInfo = {
  13996. complete_count: 0, //完成
  13997. received_count: 0, //待收货
  13998. unshipped_count: 0, //待发货
  13999. order_count: 0, //订单总数
  14000. unpaid_count: 0 //待付款
  14001. };
  14002. // 清除缓存用户信息
  14003. uni.removeStorage({
  14004. key: 'userInfo' });
  14005. // 清除缓存token
  14006. uni.removeStorage({
  14007. key: 'token' });
  14008. },
  14009. // 保存用户信息
  14010. setUserInfo: function setUserInfo(state, provider) {
  14011. state.userInfo = provider;
  14012. uni.setStorage({ //缓存用户登陆状态
  14013. key: 'userInfo',
  14014. data: provider });
  14015. },
  14016. // 保存订单信息
  14017. setOrderInfo: function setOrderInfo(state, provider) {
  14018. state.orderInfo = provider;
  14019. } };
  14020. var getters = {};var _default =
  14021. {
  14022. namespaced: true,
  14023. state: state,
  14024. mutations: mutations,
  14025. getters: getters };exports.default = _default;
  14026. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  14027. /***/ })
  14028. }]);
  14029. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map