vendor.js 652 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490
  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. /* WEBPACK VAR INJECTION */(function(global) {Object.defineProperty(exports, "__esModule", { value: true });exports.createApp = createApp;exports.createComponent = createComponent;exports.createPage = createPage;exports.createPlugin = createPlugin;exports.createSubpackageApp = createSubpackageApp;exports.default = void 0;var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 3));
  10. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 4);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _slicedToArray(arr, i) {return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(arr, i) {if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"] != null) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}function _arrayWithHoles(arr) {if (Array.isArray(arr)) return arr;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toConsumableArray(arr) {return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();}function _nonIterableSpread() {throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o, minLen) {if (!o) return;if (typeof o === "string") return _arrayLikeToArray(o, minLen);var n = Object.prototype.toString.call(o).slice(8, -1);if (n === "Object" && o.constructor) n = o.constructor.name;if (n === "Map" || n === "Set") return Array.from(o);if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);}function _iterableToArray(iter) {if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);}function _arrayWithoutHoles(arr) {if (Array.isArray(arr)) return _arrayLikeToArray(arr);}function _arrayLikeToArray(arr, len) {if (len == null || len > arr.length) len = arr.length;for (var i = 0, arr2 = new Array(len); i < len; i++) {arr2[i] = arr[i];}return arr2;}
  11. var realAtob;
  12. var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  13. var b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  14. if (typeof atob !== 'function') {
  15. realAtob = function realAtob(str) {
  16. str = String(str).replace(/[\t\n\f\r ]+/g, '');
  17. if (!b64re.test(str)) {throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");}
  18. // Adding the padding if missing, for semplicity
  19. str += '=='.slice(2 - (str.length & 3));
  20. var bitmap;var result = '';var r1;var r2;var i = 0;
  21. for (; i < str.length;) {
  22. bitmap = b64.indexOf(str.charAt(i++)) << 18 | b64.indexOf(str.charAt(i++)) << 12 |
  23. (r1 = b64.indexOf(str.charAt(i++))) << 6 | (r2 = b64.indexOf(str.charAt(i++)));
  24. result += r1 === 64 ? String.fromCharCode(bitmap >> 16 & 255) :
  25. r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255) :
  26. String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255);
  27. }
  28. return result;
  29. };
  30. } else {
  31. // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
  32. realAtob = atob;
  33. }
  34. function b64DecodeUnicode(str) {
  35. return decodeURIComponent(realAtob(str).split('').map(function (c) {
  36. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  37. }).join(''));
  38. }
  39. function getCurrentUserInfo() {
  40. var token = wx.getStorageSync('uni_id_token') || '';
  41. var tokenArr = token.split('.');
  42. if (!token || tokenArr.length !== 3) {
  43. return {
  44. uid: null,
  45. role: [],
  46. permission: [],
  47. tokenExpired: 0 };
  48. }
  49. var userInfo;
  50. try {
  51. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  52. } catch (error) {
  53. throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
  54. }
  55. userInfo.tokenExpired = userInfo.exp * 1000;
  56. delete userInfo.exp;
  57. delete userInfo.iat;
  58. return userInfo;
  59. }
  60. function uniIdMixin(Vue) {
  61. Vue.prototype.uniIDHasRole = function (roleId) {var _getCurrentUserInfo =
  62. getCurrentUserInfo(),role = _getCurrentUserInfo.role;
  63. return role.indexOf(roleId) > -1;
  64. };
  65. Vue.prototype.uniIDHasPermission = function (permissionId) {var _getCurrentUserInfo2 =
  66. getCurrentUserInfo(),permission = _getCurrentUserInfo2.permission;
  67. return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
  68. };
  69. Vue.prototype.uniIDTokenValid = function () {var _getCurrentUserInfo3 =
  70. getCurrentUserInfo(),tokenExpired = _getCurrentUserInfo3.tokenExpired;
  71. return tokenExpired > Date.now();
  72. };
  73. }
  74. var _toString = Object.prototype.toString;
  75. var hasOwnProperty = Object.prototype.hasOwnProperty;
  76. function isFn(fn) {
  77. return typeof fn === 'function';
  78. }
  79. function isStr(str) {
  80. return typeof str === 'string';
  81. }
  82. function isPlainObject(obj) {
  83. return _toString.call(obj) === '[object Object]';
  84. }
  85. function hasOwn(obj, key) {
  86. return hasOwnProperty.call(obj, key);
  87. }
  88. function noop() {}
  89. /**
  90. * Create a cached version of a pure function.
  91. */
  92. function cached(fn) {
  93. var cache = Object.create(null);
  94. return function cachedFn(str) {
  95. var hit = cache[str];
  96. return hit || (cache[str] = fn(str));
  97. };
  98. }
  99. /**
  100. * Camelize a hyphen-delimited string.
  101. */
  102. var camelizeRE = /-(\w)/g;
  103. var camelize = cached(function (str) {
  104. return str.replace(camelizeRE, function (_, c) {return c ? c.toUpperCase() : '';});
  105. });
  106. var HOOKS = [
  107. 'invoke',
  108. 'success',
  109. 'fail',
  110. 'complete',
  111. 'returnValue'];
  112. var globalInterceptors = {};
  113. var scopedInterceptors = {};
  114. function mergeHook(parentVal, childVal) {
  115. var res = childVal ?
  116. parentVal ?
  117. parentVal.concat(childVal) :
  118. Array.isArray(childVal) ?
  119. childVal : [childVal] :
  120. parentVal;
  121. return res ?
  122. dedupeHooks(res) :
  123. res;
  124. }
  125. function dedupeHooks(hooks) {
  126. var res = [];
  127. for (var i = 0; i < hooks.length; i++) {
  128. if (res.indexOf(hooks[i]) === -1) {
  129. res.push(hooks[i]);
  130. }
  131. }
  132. return res;
  133. }
  134. function removeHook(hooks, hook) {
  135. var index = hooks.indexOf(hook);
  136. if (index !== -1) {
  137. hooks.splice(index, 1);
  138. }
  139. }
  140. function mergeInterceptorHook(interceptor, option) {
  141. Object.keys(option).forEach(function (hook) {
  142. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  143. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  144. }
  145. });
  146. }
  147. function removeInterceptorHook(interceptor, option) {
  148. if (!interceptor || !option) {
  149. return;
  150. }
  151. Object.keys(option).forEach(function (hook) {
  152. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  153. removeHook(interceptor[hook], option[hook]);
  154. }
  155. });
  156. }
  157. function addInterceptor(method, option) {
  158. if (typeof method === 'string' && isPlainObject(option)) {
  159. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  160. } else if (isPlainObject(method)) {
  161. mergeInterceptorHook(globalInterceptors, method);
  162. }
  163. }
  164. function removeInterceptor(method, option) {
  165. if (typeof method === 'string') {
  166. if (isPlainObject(option)) {
  167. removeInterceptorHook(scopedInterceptors[method], option);
  168. } else {
  169. delete scopedInterceptors[method];
  170. }
  171. } else if (isPlainObject(method)) {
  172. removeInterceptorHook(globalInterceptors, method);
  173. }
  174. }
  175. function wrapperHook(hook) {
  176. return function (data) {
  177. return hook(data) || data;
  178. };
  179. }
  180. function isPromise(obj) {
  181. return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  182. }
  183. function queue(hooks, data) {
  184. var promise = false;
  185. for (var i = 0; i < hooks.length; i++) {
  186. var hook = hooks[i];
  187. if (promise) {
  188. promise = Promise.resolve(wrapperHook(hook));
  189. } else {
  190. var res = hook(data);
  191. if (isPromise(res)) {
  192. promise = Promise.resolve(res);
  193. }
  194. if (res === false) {
  195. return {
  196. then: function then() {} };
  197. }
  198. }
  199. }
  200. return promise || {
  201. then: function then(callback) {
  202. return callback(data);
  203. } };
  204. }
  205. function wrapperOptions(interceptor) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  206. ['success', 'fail', 'complete'].forEach(function (name) {
  207. if (Array.isArray(interceptor[name])) {
  208. var oldCallback = options[name];
  209. options[name] = function callbackInterceptor(res) {
  210. queue(interceptor[name], res).then(function (res) {
  211. /* eslint-disable no-mixed-operators */
  212. return isFn(oldCallback) && oldCallback(res) || res;
  213. });
  214. };
  215. }
  216. });
  217. return options;
  218. }
  219. function wrapperReturnValue(method, returnValue) {
  220. var returnValueHooks = [];
  221. if (Array.isArray(globalInterceptors.returnValue)) {
  222. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(globalInterceptors.returnValue));
  223. }
  224. var interceptor = scopedInterceptors[method];
  225. if (interceptor && Array.isArray(interceptor.returnValue)) {
  226. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(interceptor.returnValue));
  227. }
  228. returnValueHooks.forEach(function (hook) {
  229. returnValue = hook(returnValue) || returnValue;
  230. });
  231. return returnValue;
  232. }
  233. function getApiInterceptorHooks(method) {
  234. var interceptor = Object.create(null);
  235. Object.keys(globalInterceptors).forEach(function (hook) {
  236. if (hook !== 'returnValue') {
  237. interceptor[hook] = globalInterceptors[hook].slice();
  238. }
  239. });
  240. var scopedInterceptor = scopedInterceptors[method];
  241. if (scopedInterceptor) {
  242. Object.keys(scopedInterceptor).forEach(function (hook) {
  243. if (hook !== 'returnValue') {
  244. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  245. }
  246. });
  247. }
  248. return interceptor;
  249. }
  250. 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];}
  251. var interceptor = getApiInterceptorHooks(method);
  252. if (interceptor && Object.keys(interceptor).length) {
  253. if (Array.isArray(interceptor.invoke)) {
  254. var res = queue(interceptor.invoke, options);
  255. return res.then(function (options) {
  256. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  257. });
  258. } else {
  259. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  260. }
  261. }
  262. return api.apply(void 0, [options].concat(params));
  263. }
  264. var promiseInterceptor = {
  265. returnValue: function returnValue(res) {
  266. if (!isPromise(res)) {
  267. return res;
  268. }
  269. return new Promise(function (resolve, reject) {
  270. res.then(function (res) {
  271. if (res[0]) {
  272. reject(res[0]);
  273. } else {
  274. resolve(res[1]);
  275. }
  276. });
  277. });
  278. } };
  279. var SYNC_API_RE =
  280. /^\$|Window$|WindowStyle$|sendHostEvent|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getLocale|setLocale/;
  281. var CONTEXT_API_RE = /^create|Manager$/;
  282. // Context例外情况
  283. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  284. // 同步例外情况
  285. var ASYNC_API = ['createBLEConnection'];
  286. var CALLBACK_API_RE = /^on|^off/;
  287. function isContextApi(name) {
  288. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  289. }
  290. function isSyncApi(name) {
  291. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  292. }
  293. function isCallbackApi(name) {
  294. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  295. }
  296. function handlePromise(promise) {
  297. return promise.then(function (data) {
  298. return [null, data];
  299. }).
  300. catch(function (err) {return [err];});
  301. }
  302. function shouldPromise(name) {
  303. if (
  304. isContextApi(name) ||
  305. isSyncApi(name) ||
  306. isCallbackApi(name))
  307. {
  308. return false;
  309. }
  310. return true;
  311. }
  312. /* eslint-disable no-extend-native */
  313. if (!Promise.prototype.finally) {
  314. Promise.prototype.finally = function (callback) {
  315. var promise = this.constructor;
  316. return this.then(
  317. function (value) {return promise.resolve(callback()).then(function () {return value;});},
  318. function (reason) {return promise.resolve(callback()).then(function () {
  319. throw reason;
  320. });});
  321. };
  322. }
  323. function promisify(name, api) {
  324. if (!shouldPromise(name)) {
  325. return api;
  326. }
  327. 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];}
  328. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  329. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  330. }
  331. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  332. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  333. success: resolve,
  334. fail: reject })].concat(
  335. params));
  336. })));
  337. };
  338. }
  339. var EPS = 1e-4;
  340. var BASE_DEVICE_WIDTH = 750;
  341. var isIOS = false;
  342. var deviceWidth = 0;
  343. var deviceDPR = 0;
  344. function checkDeviceWidth() {var _wx$getSystemInfoSync =
  345. wx.getSystemInfoSync(),platform = _wx$getSystemInfoSync.platform,pixelRatio = _wx$getSystemInfoSync.pixelRatio,windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  346. deviceWidth = windowWidth;
  347. deviceDPR = pixelRatio;
  348. isIOS = platform === 'ios';
  349. }
  350. function upx2px(number, newDeviceWidth) {
  351. if (deviceWidth === 0) {
  352. checkDeviceWidth();
  353. }
  354. number = Number(number);
  355. if (number === 0) {
  356. return 0;
  357. }
  358. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  359. if (result < 0) {
  360. result = -result;
  361. }
  362. result = Math.floor(result + EPS);
  363. if (result === 0) {
  364. if (deviceDPR === 1 || !isIOS) {
  365. result = 1;
  366. } else {
  367. result = 0.5;
  368. }
  369. }
  370. return number < 0 ? -result : result;
  371. }
  372. function getLocale() {
  373. // 优先使用 $locale
  374. var app = getApp({
  375. allowDefault: true });
  376. if (app && app.$vm) {
  377. return app.$vm.$locale;
  378. }
  379. return wx.getSystemInfoSync().language || 'zh-Hans';
  380. }
  381. function setLocale(locale) {
  382. var app = getApp();
  383. if (!app) {
  384. return false;
  385. }
  386. var oldLocale = app.$vm.$locale;
  387. if (oldLocale !== locale) {
  388. app.$vm.$locale = locale;
  389. onLocaleChangeCallbacks.forEach(function (fn) {return fn({
  390. locale: locale });});
  391. return true;
  392. }
  393. return false;
  394. }
  395. var onLocaleChangeCallbacks = [];
  396. function onLocaleChange(fn) {
  397. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  398. onLocaleChangeCallbacks.push(fn);
  399. }
  400. }
  401. if (typeof global !== 'undefined') {
  402. global.getLocale = getLocale;
  403. }
  404. var interceptors = {
  405. promiseInterceptor: promiseInterceptor };
  406. var baseApi = /*#__PURE__*/Object.freeze({
  407. __proto__: null,
  408. upx2px: upx2px,
  409. getLocale: getLocale,
  410. setLocale: setLocale,
  411. onLocaleChange: onLocaleChange,
  412. addInterceptor: addInterceptor,
  413. removeInterceptor: removeInterceptor,
  414. interceptors: interceptors });
  415. function findExistsPageIndex(url) {
  416. var pages = getCurrentPages();
  417. var len = pages.length;
  418. while (len--) {
  419. var page = pages[len];
  420. if (page.$page && page.$page.fullPath === url) {
  421. return len;
  422. }
  423. }
  424. return -1;
  425. }
  426. var redirectTo = {
  427. name: function name(fromArgs) {
  428. if (fromArgs.exists === 'back' && fromArgs.delta) {
  429. return 'navigateBack';
  430. }
  431. return 'redirectTo';
  432. },
  433. args: function args(fromArgs) {
  434. if (fromArgs.exists === 'back' && fromArgs.url) {
  435. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  436. if (existsPageIndex !== -1) {
  437. var delta = getCurrentPages().length - 1 - existsPageIndex;
  438. if (delta > 0) {
  439. fromArgs.delta = delta;
  440. }
  441. }
  442. }
  443. } };
  444. var previewImage = {
  445. args: function args(fromArgs) {
  446. var currentIndex = parseInt(fromArgs.current);
  447. if (isNaN(currentIndex)) {
  448. return;
  449. }
  450. var urls = fromArgs.urls;
  451. if (!Array.isArray(urls)) {
  452. return;
  453. }
  454. var len = urls.length;
  455. if (!len) {
  456. return;
  457. }
  458. if (currentIndex < 0) {
  459. currentIndex = 0;
  460. } else if (currentIndex >= len) {
  461. currentIndex = len - 1;
  462. }
  463. if (currentIndex > 0) {
  464. fromArgs.current = urls[currentIndex];
  465. fromArgs.urls = urls.filter(
  466. function (item, index) {return index < currentIndex ? item !== urls[currentIndex] : true;});
  467. } else {
  468. fromArgs.current = urls[0];
  469. }
  470. return {
  471. indicator: false,
  472. loop: false };
  473. } };
  474. var UUID_KEY = '__DC_STAT_UUID';
  475. var deviceId;
  476. function addUuid(result) {
  477. deviceId = deviceId || wx.getStorageSync(UUID_KEY);
  478. if (!deviceId) {
  479. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  480. wx.setStorage({
  481. key: UUID_KEY,
  482. data: deviceId });
  483. }
  484. result.deviceId = deviceId;
  485. }
  486. function addSafeAreaInsets(result) {
  487. if (result.safeArea) {
  488. var safeArea = result.safeArea;
  489. result.safeAreaInsets = {
  490. top: safeArea.top,
  491. left: safeArea.left,
  492. right: result.windowWidth - safeArea.right,
  493. bottom: result.windowHeight - safeArea.bottom };
  494. }
  495. }
  496. var getSystemInfo = {
  497. returnValue: function returnValue(result) {
  498. addUuid(result);
  499. addSafeAreaInsets(result);
  500. } };
  501. // import navigateTo from 'uni-helpers/navigate-to'
  502. var protocols = {
  503. redirectTo: redirectTo,
  504. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  505. previewImage: previewImage,
  506. getSystemInfo: getSystemInfo,
  507. getSystemInfoSync: getSystemInfo };
  508. var todos = [
  509. 'vibrate',
  510. 'preloadPage',
  511. 'unPreloadPage',
  512. 'loadSubPackage'];
  513. var canIUses = [];
  514. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  515. function processCallback(methodName, method, returnValue) {
  516. return function (res) {
  517. return method(processReturnValue(methodName, res, returnValue));
  518. };
  519. }
  520. 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;
  521. if (isPlainObject(fromArgs)) {// 一般 api 的参数解析
  522. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  523. if (isFn(argsOption)) {
  524. argsOption = argsOption(fromArgs, toArgs) || {};
  525. }
  526. for (var key in fromArgs) {
  527. if (hasOwn(argsOption, key)) {
  528. var keyOption = argsOption[key];
  529. if (isFn(keyOption)) {
  530. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  531. }
  532. if (!keyOption) {// 不支持的参数
  533. console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  534. } else if (isStr(keyOption)) {// 重写参数 key
  535. toArgs[keyOption] = fromArgs[key];
  536. } else if (isPlainObject(keyOption)) {// {name:newName,value:value}可重新指定参数 key:value
  537. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  538. }
  539. } else if (CALLBACKS.indexOf(key) !== -1) {
  540. if (isFn(fromArgs[key])) {
  541. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  542. }
  543. } else {
  544. if (!keepFromArgs) {
  545. toArgs[key] = fromArgs[key];
  546. }
  547. }
  548. }
  549. return toArgs;
  550. } else if (isFn(fromArgs)) {
  551. fromArgs = processCallback(methodName, fromArgs, returnValue);
  552. }
  553. return fromArgs;
  554. }
  555. function processReturnValue(methodName, res, returnValue) {var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  556. if (isFn(protocols.returnValue)) {// 处理通用 returnValue
  557. res = protocols.returnValue(methodName, res);
  558. }
  559. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  560. }
  561. function wrapper(methodName, method) {
  562. if (hasOwn(protocols, methodName)) {
  563. var protocol = protocols[methodName];
  564. if (!protocol) {// 暂不支持的 api
  565. return function () {
  566. console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  567. };
  568. }
  569. return function (arg1, arg2) {// 目前 api 最多两个参数
  570. var options = protocol;
  571. if (isFn(protocol)) {
  572. options = protocol(arg1);
  573. }
  574. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  575. var args = [arg1];
  576. if (typeof arg2 !== 'undefined') {
  577. args.push(arg2);
  578. }
  579. if (isFn(options.name)) {
  580. methodName = options.name(arg1);
  581. } else if (isStr(options.name)) {
  582. methodName = options.name;
  583. }
  584. var returnValue = wx[methodName].apply(wx, args);
  585. if (isSyncApi(methodName)) {// 同步 api
  586. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  587. }
  588. return returnValue;
  589. };
  590. }
  591. return method;
  592. }
  593. var todoApis = Object.create(null);
  594. var TODOS = [
  595. 'onTabBarMidButtonTap',
  596. 'subscribePush',
  597. 'unsubscribePush',
  598. 'onPush',
  599. 'offPush',
  600. 'share'];
  601. function createTodoApi(name) {
  602. return function todoApi(_ref)
  603. {var fail = _ref.fail,complete = _ref.complete;
  604. var res = {
  605. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported") };
  606. isFn(fail) && fail(res);
  607. isFn(complete) && complete(res);
  608. };
  609. }
  610. TODOS.forEach(function (name) {
  611. todoApis[name] = createTodoApi(name);
  612. });
  613. var providers = {
  614. oauth: ['weixin'],
  615. share: ['weixin'],
  616. payment: ['wxpay'],
  617. push: ['weixin'] };
  618. function getProvider(_ref2)
  619. {var service = _ref2.service,success = _ref2.success,fail = _ref2.fail,complete = _ref2.complete;
  620. var res = false;
  621. if (providers[service]) {
  622. res = {
  623. errMsg: 'getProvider:ok',
  624. service: service,
  625. provider: providers[service] };
  626. isFn(success) && success(res);
  627. } else {
  628. res = {
  629. errMsg: 'getProvider:fail service not found' };
  630. isFn(fail) && fail(res);
  631. }
  632. isFn(complete) && complete(res);
  633. }
  634. var extraApi = /*#__PURE__*/Object.freeze({
  635. __proto__: null,
  636. getProvider: getProvider });
  637. var getEmitter = function () {
  638. var Emitter;
  639. return function getUniEmitter() {
  640. if (!Emitter) {
  641. Emitter = new _vue.default();
  642. }
  643. return Emitter;
  644. };
  645. }();
  646. function apply(ctx, method, args) {
  647. return ctx[method].apply(ctx, args);
  648. }
  649. function $on() {
  650. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  651. }
  652. function $off() {
  653. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  654. }
  655. function $once() {
  656. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  657. }
  658. function $emit() {
  659. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  660. }
  661. var eventApi = /*#__PURE__*/Object.freeze({
  662. __proto__: null,
  663. $on: $on,
  664. $off: $off,
  665. $once: $once,
  666. $emit: $emit });
  667. var api = /*#__PURE__*/Object.freeze({
  668. __proto__: null });
  669. var MPPage = Page;
  670. var MPComponent = Component;
  671. var customizeRE = /:/g;
  672. var customize = cached(function (str) {
  673. return camelize(str.replace(customizeRE, '-'));
  674. });
  675. function initTriggerEvent(mpInstance) {
  676. var oldTriggerEvent = mpInstance.triggerEvent;
  677. var newTriggerEvent = function newTriggerEvent(event) {for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {args[_key3 - 1] = arguments[_key3];}
  678. return oldTriggerEvent.apply(mpInstance, [customize(event)].concat(args));
  679. };
  680. try {
  681. // 京东小程序 triggerEvent 为只读
  682. mpInstance.triggerEvent = newTriggerEvent;
  683. } catch (error) {
  684. mpInstance._triggerEvent = newTriggerEvent;
  685. }
  686. }
  687. function initHook(name, options, isComponent) {
  688. var oldHook = options[name];
  689. if (!oldHook) {
  690. options[name] = function () {
  691. initTriggerEvent(this);
  692. };
  693. } else {
  694. options[name] = function () {
  695. initTriggerEvent(this);for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {args[_key4] = arguments[_key4];}
  696. return oldHook.apply(this, args);
  697. };
  698. }
  699. }
  700. if (!MPPage.__$wrappered) {
  701. MPPage.__$wrappered = true;
  702. Page = function Page() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  703. initHook('onLoad', options);
  704. return MPPage(options);
  705. };
  706. Page.after = MPPage.after;
  707. Component = function Component() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  708. initHook('created', options);
  709. return MPComponent(options);
  710. };
  711. }
  712. var PAGE_EVENT_HOOKS = [
  713. 'onPullDownRefresh',
  714. 'onReachBottom',
  715. 'onAddToFavorites',
  716. 'onShareTimeline',
  717. 'onShareAppMessage',
  718. 'onPageScroll',
  719. 'onResize',
  720. 'onTabItemTap'];
  721. function initMocks(vm, mocks) {
  722. var mpInstance = vm.$mp[vm.mpType];
  723. mocks.forEach(function (mock) {
  724. if (hasOwn(mpInstance, mock)) {
  725. vm[mock] = mpInstance[mock];
  726. }
  727. });
  728. }
  729. function hasHook(hook, vueOptions) {
  730. if (!vueOptions) {
  731. return true;
  732. }
  733. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  734. return true;
  735. }
  736. vueOptions = vueOptions.default || vueOptions;
  737. if (isFn(vueOptions)) {
  738. if (isFn(vueOptions.extendOptions[hook])) {
  739. return true;
  740. }
  741. if (vueOptions.super &&
  742. vueOptions.super.options &&
  743. Array.isArray(vueOptions.super.options[hook])) {
  744. return true;
  745. }
  746. return false;
  747. }
  748. if (isFn(vueOptions[hook])) {
  749. return true;
  750. }
  751. var mixins = vueOptions.mixins;
  752. if (Array.isArray(mixins)) {
  753. return !!mixins.find(function (mixin) {return hasHook(hook, mixin);});
  754. }
  755. }
  756. function initHooks(mpOptions, hooks, vueOptions) {
  757. hooks.forEach(function (hook) {
  758. if (hasHook(hook, vueOptions)) {
  759. mpOptions[hook] = function (args) {
  760. return this.$vm && this.$vm.__call_hook(hook, args);
  761. };
  762. }
  763. });
  764. }
  765. function initVueComponent(Vue, vueOptions) {
  766. vueOptions = vueOptions.default || vueOptions;
  767. var VueComponent;
  768. if (isFn(vueOptions)) {
  769. VueComponent = vueOptions;
  770. } else {
  771. VueComponent = Vue.extend(vueOptions);
  772. }
  773. vueOptions = VueComponent.options;
  774. return [VueComponent, vueOptions];
  775. }
  776. function initSlots(vm, vueSlots) {
  777. if (Array.isArray(vueSlots) && vueSlots.length) {
  778. var $slots = Object.create(null);
  779. vueSlots.forEach(function (slotName) {
  780. $slots[slotName] = true;
  781. });
  782. vm.$scopedSlots = vm.$slots = $slots;
  783. }
  784. }
  785. function initVueIds(vueIds, mpInstance) {
  786. vueIds = (vueIds || '').split(',');
  787. var len = vueIds.length;
  788. if (len === 1) {
  789. mpInstance._$vueId = vueIds[0];
  790. } else if (len === 2) {
  791. mpInstance._$vueId = vueIds[0];
  792. mpInstance._$vuePid = vueIds[1];
  793. }
  794. }
  795. function initData(vueOptions, context) {
  796. var data = vueOptions.data || {};
  797. var methods = vueOptions.methods || {};
  798. if (typeof data === 'function') {
  799. try {
  800. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  801. } catch (e) {
  802. if (Object({"NODE_ENV":"development","VUE_APP_NAME":"uView UI已发布Sketch和Axure设计资源示例","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  803. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  804. }
  805. }
  806. } else {
  807. try {
  808. // 对 data 格式化
  809. data = JSON.parse(JSON.stringify(data));
  810. } catch (e) {}
  811. }
  812. if (!isPlainObject(data)) {
  813. data = {};
  814. }
  815. Object.keys(methods).forEach(function (methodName) {
  816. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  817. data[methodName] = methods[methodName];
  818. }
  819. });
  820. return data;
  821. }
  822. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  823. function createObserver(name) {
  824. return function observer(newVal, oldVal) {
  825. if (this.$vm) {
  826. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  827. }
  828. };
  829. }
  830. function initBehaviors(vueOptions, initBehavior) {
  831. var vueBehaviors = vueOptions.behaviors;
  832. var vueExtends = vueOptions.extends;
  833. var vueMixins = vueOptions.mixins;
  834. var vueProps = vueOptions.props;
  835. if (!vueProps) {
  836. vueOptions.props = vueProps = [];
  837. }
  838. var behaviors = [];
  839. if (Array.isArray(vueBehaviors)) {
  840. vueBehaviors.forEach(function (behavior) {
  841. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  842. if (behavior === 'uni://form-field') {
  843. if (Array.isArray(vueProps)) {
  844. vueProps.push('name');
  845. vueProps.push('value');
  846. } else {
  847. vueProps.name = {
  848. type: String,
  849. default: '' };
  850. vueProps.value = {
  851. type: [String, Number, Boolean, Array, Object, Date],
  852. default: '' };
  853. }
  854. }
  855. });
  856. }
  857. if (isPlainObject(vueExtends) && vueExtends.props) {
  858. behaviors.push(
  859. initBehavior({
  860. properties: initProperties(vueExtends.props, true) }));
  861. }
  862. if (Array.isArray(vueMixins)) {
  863. vueMixins.forEach(function (vueMixin) {
  864. if (isPlainObject(vueMixin) && vueMixin.props) {
  865. behaviors.push(
  866. initBehavior({
  867. properties: initProperties(vueMixin.props, true) }));
  868. }
  869. });
  870. }
  871. return behaviors;
  872. }
  873. function parsePropType(key, type, defaultValue, file) {
  874. // [String]=>String
  875. if (Array.isArray(type) && type.length === 1) {
  876. return type[0];
  877. }
  878. return type;
  879. }
  880. function initProperties(props) {var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  881. var properties = {};
  882. if (!isBehavior) {
  883. properties.vueId = {
  884. type: String,
  885. value: '' };
  886. // 用于字节跳动小程序模拟抽象节点
  887. properties.generic = {
  888. type: Object,
  889. value: null };
  890. // scopedSlotsCompiler auto
  891. properties.scopedSlotsCompiler = {
  892. type: String,
  893. value: '' };
  894. properties.vueSlots = { // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  895. type: null,
  896. value: [],
  897. observer: function observer(newVal, oldVal) {
  898. var $slots = Object.create(null);
  899. newVal.forEach(function (slotName) {
  900. $slots[slotName] = true;
  901. });
  902. this.setData({
  903. $slots: $slots });
  904. } };
  905. }
  906. if (Array.isArray(props)) {// ['title']
  907. props.forEach(function (key) {
  908. properties[key] = {
  909. type: null,
  910. observer: createObserver(key) };
  911. });
  912. } else if (isPlainObject(props)) {// {title:{type:String,default:''},content:String}
  913. Object.keys(props).forEach(function (key) {
  914. var opts = props[key];
  915. if (isPlainObject(opts)) {// title:{type:String,default:''}
  916. var value = opts.default;
  917. if (isFn(value)) {
  918. value = value();
  919. }
  920. opts.type = parsePropType(key, opts.type);
  921. properties[key] = {
  922. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  923. value: value,
  924. observer: createObserver(key) };
  925. } else {// content:String
  926. var type = parsePropType(key, opts);
  927. properties[key] = {
  928. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  929. observer: createObserver(key) };
  930. }
  931. });
  932. }
  933. return properties;
  934. }
  935. function wrapper$1(event) {
  936. // TODO 又得兼容 mpvue 的 mp 对象
  937. try {
  938. event.mp = JSON.parse(JSON.stringify(event));
  939. } catch (e) {}
  940. event.stopPropagation = noop;
  941. event.preventDefault = noop;
  942. event.target = event.target || {};
  943. if (!hasOwn(event, 'detail')) {
  944. event.detail = {};
  945. }
  946. if (hasOwn(event, 'markerId')) {
  947. event.detail = typeof event.detail === 'object' ? event.detail : {};
  948. event.detail.markerId = event.markerId;
  949. }
  950. if (isPlainObject(event.detail)) {
  951. event.target = Object.assign({}, event.target, event.detail);
  952. }
  953. return event;
  954. }
  955. function getExtraValue(vm, dataPathsArray) {
  956. var context = vm;
  957. dataPathsArray.forEach(function (dataPathArray) {
  958. var dataPath = dataPathArray[0];
  959. var value = dataPathArray[2];
  960. if (dataPath || typeof value !== 'undefined') {// ['','',index,'disable']
  961. var propPath = dataPathArray[1];
  962. var valuePath = dataPathArray[3];
  963. var vFor;
  964. if (Number.isInteger(dataPath)) {
  965. vFor = dataPath;
  966. } else if (!dataPath) {
  967. vFor = context;
  968. } else if (typeof dataPath === 'string' && dataPath) {
  969. if (dataPath.indexOf('#s#') === 0) {
  970. vFor = dataPath.substr(3);
  971. } else {
  972. vFor = vm.__get_value(dataPath, context);
  973. }
  974. }
  975. if (Number.isInteger(vFor)) {
  976. context = value;
  977. } else if (!propPath) {
  978. context = vFor[value];
  979. } else {
  980. if (Array.isArray(vFor)) {
  981. context = vFor.find(function (vForItem) {
  982. return vm.__get_value(propPath, vForItem) === value;
  983. });
  984. } else if (isPlainObject(vFor)) {
  985. context = Object.keys(vFor).find(function (vForKey) {
  986. return vm.__get_value(propPath, vFor[vForKey]) === value;
  987. });
  988. } else {
  989. console.error('v-for 暂不支持循环数据:', vFor);
  990. }
  991. }
  992. if (valuePath) {
  993. context = vm.__get_value(valuePath, context);
  994. }
  995. }
  996. });
  997. return context;
  998. }
  999. function processEventExtra(vm, extra, event) {
  1000. var extraObj = {};
  1001. if (Array.isArray(extra) && extra.length) {
  1002. /**
  1003. *[
  1004. * ['data.items', 'data.id', item.data.id],
  1005. * ['metas', 'id', meta.id]
  1006. *],
  1007. *[
  1008. * ['data.items', 'data.id', item.data.id],
  1009. * ['metas', 'id', meta.id]
  1010. *],
  1011. *'test'
  1012. */
  1013. extra.forEach(function (dataPath, index) {
  1014. if (typeof dataPath === 'string') {
  1015. if (!dataPath) {// model,prop.sync
  1016. extraObj['$' + index] = vm;
  1017. } else {
  1018. if (dataPath === '$event') {// $event
  1019. extraObj['$' + index] = event;
  1020. } else if (dataPath === 'arguments') {
  1021. if (event.detail && event.detail.__args__) {
  1022. extraObj['$' + index] = event.detail.__args__;
  1023. } else {
  1024. extraObj['$' + index] = [event];
  1025. }
  1026. } else if (dataPath.indexOf('$event.') === 0) {// $event.target.value
  1027. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  1028. } else {
  1029. extraObj['$' + index] = vm.__get_value(dataPath);
  1030. }
  1031. }
  1032. } else {
  1033. extraObj['$' + index] = getExtraValue(vm, dataPath);
  1034. }
  1035. });
  1036. }
  1037. return extraObj;
  1038. }
  1039. function getObjByArray(arr) {
  1040. var obj = {};
  1041. for (var i = 1; i < arr.length; i++) {
  1042. var element = arr[i];
  1043. obj[element[0]] = element[1];
  1044. }
  1045. return obj;
  1046. }
  1047. 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;
  1048. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  1049. if (isCustom) {// 自定义事件
  1050. isCustomMPEvent = event.currentTarget &&
  1051. event.currentTarget.dataset &&
  1052. event.currentTarget.dataset.comType === 'wx';
  1053. if (!args.length) {// 无参数,直接传入 event 或 detail 数组
  1054. if (isCustomMPEvent) {
  1055. return [event];
  1056. }
  1057. return event.detail.__args__ || event.detail;
  1058. }
  1059. }
  1060. var extraObj = processEventExtra(vm, extra, event);
  1061. var ret = [];
  1062. args.forEach(function (arg) {
  1063. if (arg === '$event') {
  1064. if (methodName === '__set_model' && !isCustom) {// input v-model value
  1065. ret.push(event.target.value);
  1066. } else {
  1067. if (isCustom && !isCustomMPEvent) {
  1068. ret.push(event.detail.__args__[0]);
  1069. } else {// wxcomponent 组件或内置组件
  1070. ret.push(event);
  1071. }
  1072. }
  1073. } else {
  1074. if (Array.isArray(arg) && arg[0] === 'o') {
  1075. ret.push(getObjByArray(arg));
  1076. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  1077. ret.push(extraObj[arg]);
  1078. } else {
  1079. ret.push(arg);
  1080. }
  1081. }
  1082. });
  1083. return ret;
  1084. }
  1085. var ONCE = '~';
  1086. var CUSTOM = '^';
  1087. function isMatchEventType(eventType, optType) {
  1088. return eventType === optType ||
  1089. optType === 'regionchange' && (
  1090. eventType === 'begin' ||
  1091. eventType === 'end');
  1092. }
  1093. function getContextVm(vm) {
  1094. var $parent = vm.$parent;
  1095. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  1096. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  1097. $parent = $parent.$parent;
  1098. }
  1099. return $parent && $parent.$parent;
  1100. }
  1101. function handleEvent(event) {var _this = this;
  1102. event = wrapper$1(event);
  1103. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  1104. var dataset = (event.currentTarget || event.target).dataset;
  1105. if (!dataset) {
  1106. return console.warn('事件信息不存在');
  1107. }
  1108. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  1109. if (!eventOpts) {
  1110. return console.warn('事件信息不存在');
  1111. }
  1112. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  1113. var eventType = event.type;
  1114. var ret = [];
  1115. eventOpts.forEach(function (eventOpt) {
  1116. var type = eventOpt[0];
  1117. var eventsArray = eventOpt[1];
  1118. var isCustom = type.charAt(0) === CUSTOM;
  1119. type = isCustom ? type.slice(1) : type;
  1120. var isOnce = type.charAt(0) === ONCE;
  1121. type = isOnce ? type.slice(1) : type;
  1122. if (eventsArray && isMatchEventType(eventType, type)) {
  1123. eventsArray.forEach(function (eventArray) {
  1124. var methodName = eventArray[0];
  1125. if (methodName) {
  1126. var handlerCtx = _this.$vm;
  1127. if (handlerCtx.$options.generic) {// mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  1128. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  1129. }
  1130. if (methodName === '$emit') {
  1131. handlerCtx.$emit.apply(handlerCtx,
  1132. processEventArgs(
  1133. _this.$vm,
  1134. event,
  1135. eventArray[1],
  1136. eventArray[2],
  1137. isCustom,
  1138. methodName));
  1139. return;
  1140. }
  1141. var handler = handlerCtx[methodName];
  1142. if (!isFn(handler)) {
  1143. throw new Error(" _vm.".concat(methodName, " is not a function"));
  1144. }
  1145. if (isOnce) {
  1146. if (handler.once) {
  1147. return;
  1148. }
  1149. handler.once = true;
  1150. }
  1151. var params = processEventArgs(
  1152. _this.$vm,
  1153. event,
  1154. eventArray[1],
  1155. eventArray[2],
  1156. isCustom,
  1157. methodName);
  1158. params = Array.isArray(params) ? params : [];
  1159. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  1160. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  1161. // eslint-disable-next-line no-sparse-arrays
  1162. params = params.concat([,,,,,,,,,, event]);
  1163. }
  1164. ret.push(handler.apply(handlerCtx, params));
  1165. }
  1166. });
  1167. }
  1168. });
  1169. if (
  1170. eventType === 'input' &&
  1171. ret.length === 1 &&
  1172. typeof ret[0] !== 'undefined')
  1173. {
  1174. return ret[0];
  1175. }
  1176. }
  1177. var messages = {};
  1178. var locale;
  1179. {
  1180. locale = wx.getSystemInfoSync().language;
  1181. }
  1182. function initI18nMessages() {
  1183. if (!isEnableLocale()) {
  1184. return;
  1185. }
  1186. var localeKeys = Object.keys(__uniConfig.locales);
  1187. if (localeKeys.length) {
  1188. localeKeys.forEach(function (locale) {
  1189. var curMessages = messages[locale];
  1190. var userMessages = __uniConfig.locales[locale];
  1191. if (curMessages) {
  1192. Object.assign(curMessages, userMessages);
  1193. } else {
  1194. messages[locale] = userMessages;
  1195. }
  1196. });
  1197. }
  1198. }
  1199. initI18nMessages();
  1200. var i18n = (0, _uniI18n.initVueI18n)(
  1201. locale,
  1202. {});
  1203. var t = i18n.t;
  1204. var i18nMixin = i18n.mixin = {
  1205. beforeCreate: function beforeCreate() {var _this2 = this;
  1206. var unwatch = i18n.i18n.watchLocale(function () {
  1207. _this2.$forceUpdate();
  1208. });
  1209. this.$once('hook:beforeDestroy', function () {
  1210. unwatch();
  1211. });
  1212. },
  1213. methods: {
  1214. $$t: function $$t(key, values) {
  1215. return t(key, values);
  1216. } } };
  1217. var setLocale$1 = i18n.setLocale;
  1218. var getLocale$1 = i18n.getLocale;
  1219. function initAppLocale(Vue, appVm, locale) {
  1220. var state = Vue.observable({
  1221. locale: locale || i18n.getLocale() });
  1222. var localeWatchers = [];
  1223. appVm.$watchLocale = function (fn) {
  1224. localeWatchers.push(fn);
  1225. };
  1226. Object.defineProperty(appVm, '$locale', {
  1227. get: function get() {
  1228. return state.locale;
  1229. },
  1230. set: function set(v) {
  1231. state.locale = v;
  1232. localeWatchers.forEach(function (watch) {return watch(v);});
  1233. } });
  1234. }
  1235. function isEnableLocale() {
  1236. return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length;
  1237. }
  1238. // export function initI18n() {
  1239. // const localeKeys = Object.keys(__uniConfig.locales || {})
  1240. // if (localeKeys.length) {
  1241. // localeKeys.forEach((locale) =>
  1242. // i18n.add(locale, __uniConfig.locales[locale])
  1243. // )
  1244. // }
  1245. // }
  1246. var eventChannels = {};
  1247. var eventChannelStack = [];
  1248. function getEventChannel(id) {
  1249. if (id) {
  1250. var eventChannel = eventChannels[id];
  1251. delete eventChannels[id];
  1252. return eventChannel;
  1253. }
  1254. return eventChannelStack.shift();
  1255. }
  1256. var hooks = [
  1257. 'onShow',
  1258. 'onHide',
  1259. 'onError',
  1260. 'onPageNotFound',
  1261. 'onThemeChange',
  1262. 'onUnhandledRejection'];
  1263. function initEventChannel() {
  1264. _vue.default.prototype.getOpenerEventChannel = function () {
  1265. // 微信小程序使用自身getOpenerEventChannel
  1266. {
  1267. return this.$scope.getOpenerEventChannel();
  1268. }
  1269. };
  1270. var callHook = _vue.default.prototype.__call_hook;
  1271. _vue.default.prototype.__call_hook = function (hook, args) {
  1272. if (hook === 'onLoad' && args && args.__id__) {
  1273. this.__eventChannel__ = getEventChannel(args.__id__);
  1274. delete args.__id__;
  1275. }
  1276. return callHook.call(this, hook, args);
  1277. };
  1278. }
  1279. function initScopedSlotsParams() {
  1280. var center = {};
  1281. var parents = {};
  1282. _vue.default.prototype.$hasScopedSlotsParams = function (vueId) {
  1283. var has = center[vueId];
  1284. if (!has) {
  1285. parents[vueId] = this;
  1286. this.$on('hook:destroyed', function () {
  1287. delete parents[vueId];
  1288. });
  1289. }
  1290. return has;
  1291. };
  1292. _vue.default.prototype.$getScopedSlotsParams = function (vueId, name, key) {
  1293. var data = center[vueId];
  1294. if (data) {
  1295. var object = data[name] || {};
  1296. return key ? object[key] : object;
  1297. } else {
  1298. parents[vueId] = this;
  1299. this.$on('hook:destroyed', function () {
  1300. delete parents[vueId];
  1301. });
  1302. }
  1303. };
  1304. _vue.default.prototype.$setScopedSlotsParams = function (name, value) {
  1305. var vueIds = this.$options.propsData.vueId;
  1306. if (vueIds) {
  1307. var vueId = vueIds.split(',')[0];
  1308. var object = center[vueId] = center[vueId] || {};
  1309. object[name] = value;
  1310. if (parents[vueId]) {
  1311. parents[vueId].$forceUpdate();
  1312. }
  1313. }
  1314. };
  1315. _vue.default.mixin({
  1316. destroyed: function destroyed() {
  1317. var propsData = this.$options.propsData;
  1318. var vueId = propsData && propsData.vueId;
  1319. if (vueId) {
  1320. delete center[vueId];
  1321. delete parents[vueId];
  1322. }
  1323. } });
  1324. }
  1325. function parseBaseApp(vm, _ref3)
  1326. {var mocks = _ref3.mocks,initRefs = _ref3.initRefs;
  1327. initEventChannel();
  1328. {
  1329. initScopedSlotsParams();
  1330. }
  1331. if (vm.$options.store) {
  1332. _vue.default.prototype.$store = vm.$options.store;
  1333. }
  1334. uniIdMixin(_vue.default);
  1335. _vue.default.prototype.mpHost = "mp-weixin";
  1336. _vue.default.mixin({
  1337. beforeCreate: function beforeCreate() {
  1338. if (!this.$options.mpType) {
  1339. return;
  1340. }
  1341. this.mpType = this.$options.mpType;
  1342. this.$mp = _defineProperty({
  1343. data: {} },
  1344. this.mpType, this.$options.mpInstance);
  1345. this.$scope = this.$options.mpInstance;
  1346. delete this.$options.mpType;
  1347. delete this.$options.mpInstance;
  1348. if (this.mpType === 'page' && typeof getApp === 'function') {// hack vue-i18n
  1349. var app = getApp();
  1350. if (app.$vm && app.$vm.$i18n) {
  1351. this._i18n = app.$vm.$i18n;
  1352. }
  1353. }
  1354. if (this.mpType !== 'app') {
  1355. initRefs(this);
  1356. initMocks(this, mocks);
  1357. }
  1358. } });
  1359. var appOptions = {
  1360. onLaunch: function onLaunch(args) {
  1361. if (this.$vm) {// 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  1362. return;
  1363. }
  1364. {
  1365. if (wx.canIUse && !wx.canIUse('nextTick')) {// 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  1366. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  1367. }
  1368. }
  1369. this.$vm = vm;
  1370. this.$vm.$mp = {
  1371. app: this };
  1372. this.$vm.$scope = this;
  1373. // vm 上也挂载 globalData
  1374. this.$vm.globalData = this.globalData;
  1375. this.$vm._isMounted = true;
  1376. this.$vm.__call_hook('mounted', args);
  1377. this.$vm.__call_hook('onLaunch', args);
  1378. } };
  1379. // 兼容旧版本 globalData
  1380. appOptions.globalData = vm.$options.globalData || {};
  1381. // 将 methods 中的方法挂在 getApp() 中
  1382. var methods = vm.$options.methods;
  1383. if (methods) {
  1384. Object.keys(methods).forEach(function (name) {
  1385. appOptions[name] = methods[name];
  1386. });
  1387. }
  1388. initAppLocale(_vue.default, vm, wx.getSystemInfoSync().language || 'zh-Hans');
  1389. initHooks(appOptions, hooks);
  1390. return appOptions;
  1391. }
  1392. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1393. function findVmByVueId(vm, vuePid) {
  1394. var $children = vm.$children;
  1395. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1396. for (var i = $children.length - 1; i >= 0; i--) {
  1397. var childVm = $children[i];
  1398. if (childVm.$scope._$vueId === vuePid) {
  1399. return childVm;
  1400. }
  1401. }
  1402. // 反向递归查找
  1403. var parentVm;
  1404. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1405. parentVm = findVmByVueId($children[_i], vuePid);
  1406. if (parentVm) {
  1407. return parentVm;
  1408. }
  1409. }
  1410. }
  1411. function initBehavior(options) {
  1412. return Behavior(options);
  1413. }
  1414. function isPage() {
  1415. return !!this.route;
  1416. }
  1417. function initRelation(detail) {
  1418. this.triggerEvent('__l', detail);
  1419. }
  1420. function selectAllComponents(mpInstance, selector, $refs) {
  1421. var components = mpInstance.selectAllComponents(selector);
  1422. components.forEach(function (component) {
  1423. var ref = component.dataset.ref;
  1424. $refs[ref] = component.$vm || component;
  1425. {
  1426. if (component.dataset.vueGeneric === 'scoped') {
  1427. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  1428. selectAllComponents(scopedComponent, selector, $refs);
  1429. });
  1430. }
  1431. }
  1432. });
  1433. }
  1434. function initRefs(vm) {
  1435. var mpInstance = vm.$scope;
  1436. Object.defineProperty(vm, '$refs', {
  1437. get: function get() {
  1438. var $refs = {};
  1439. selectAllComponents(mpInstance, '.vue-ref', $refs);
  1440. // TODO 暂不考虑 for 中的 scoped
  1441. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for');
  1442. forComponents.forEach(function (component) {
  1443. var ref = component.dataset.ref;
  1444. if (!$refs[ref]) {
  1445. $refs[ref] = [];
  1446. }
  1447. $refs[ref].push(component.$vm || component);
  1448. });
  1449. return $refs;
  1450. } });
  1451. }
  1452. function handleLink(event) {var _ref4 =
  1453. event.detail || event.value,vuePid = _ref4.vuePid,vueOptions = _ref4.vueOptions; // detail 是微信,value 是百度(dipatch)
  1454. var parentVm;
  1455. if (vuePid) {
  1456. parentVm = findVmByVueId(this.$vm, vuePid);
  1457. }
  1458. if (!parentVm) {
  1459. parentVm = this.$vm;
  1460. }
  1461. vueOptions.parent = parentVm;
  1462. }
  1463. function parseApp(vm) {
  1464. return parseBaseApp(vm, {
  1465. mocks: mocks,
  1466. initRefs: initRefs });
  1467. }
  1468. function createApp(vm) {
  1469. App(parseApp(vm));
  1470. return vm;
  1471. }
  1472. var encodeReserveRE = /[!'()*]/g;
  1473. var encodeReserveReplacer = function encodeReserveReplacer(c) {return '%' + c.charCodeAt(0).toString(16);};
  1474. var commaRE = /%2C/g;
  1475. // fixed encodeURIComponent which is more conformant to RFC3986:
  1476. // - escapes [!'()*]
  1477. // - preserve commas
  1478. var encode = function encode(str) {return encodeURIComponent(str).
  1479. replace(encodeReserveRE, encodeReserveReplacer).
  1480. replace(commaRE, ',');};
  1481. function stringifyQuery(obj) {var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  1482. var res = obj ? Object.keys(obj).map(function (key) {
  1483. var val = obj[key];
  1484. if (val === undefined) {
  1485. return '';
  1486. }
  1487. if (val === null) {
  1488. return encodeStr(key);
  1489. }
  1490. if (Array.isArray(val)) {
  1491. var result = [];
  1492. val.forEach(function (val2) {
  1493. if (val2 === undefined) {
  1494. return;
  1495. }
  1496. if (val2 === null) {
  1497. result.push(encodeStr(key));
  1498. } else {
  1499. result.push(encodeStr(key) + '=' + encodeStr(val2));
  1500. }
  1501. });
  1502. return result.join('&');
  1503. }
  1504. return encodeStr(key) + '=' + encodeStr(val);
  1505. }).filter(function (x) {return x.length > 0;}).join('&') : null;
  1506. return res ? "?".concat(res) : '';
  1507. }
  1508. function parseBaseComponent(vueComponentOptions)
  1509. {var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},isPage = _ref5.isPage,initRelation = _ref5.initRelation;var _initVueComponent =
  1510. initVueComponent(_vue.default, vueComponentOptions),_initVueComponent2 = _slicedToArray(_initVueComponent, 2),VueComponent = _initVueComponent2[0],vueOptions = _initVueComponent2[1];
  1511. var options = _objectSpread({
  1512. multipleSlots: true,
  1513. addGlobalClass: true },
  1514. vueOptions.options || {});
  1515. {
  1516. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  1517. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  1518. Object.assign(options, vueOptions['mp-weixin'].options);
  1519. }
  1520. }
  1521. var componentOptions = {
  1522. options: options,
  1523. data: initData(vueOptions, _vue.default.prototype),
  1524. behaviors: initBehaviors(vueOptions, initBehavior),
  1525. properties: initProperties(vueOptions.props, false, vueOptions.__file),
  1526. lifetimes: {
  1527. attached: function attached() {
  1528. var properties = this.properties;
  1529. var options = {
  1530. mpType: isPage.call(this) ? 'page' : 'component',
  1531. mpInstance: this,
  1532. propsData: properties };
  1533. initVueIds(properties.vueId, this);
  1534. // 处理父子关系
  1535. initRelation.call(this, {
  1536. vuePid: this._$vuePid,
  1537. vueOptions: options });
  1538. // 初始化 vue 实例
  1539. this.$vm = new VueComponent(options);
  1540. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  1541. initSlots(this.$vm, properties.vueSlots);
  1542. // 触发首次 setData
  1543. this.$vm.$mount();
  1544. },
  1545. ready: function ready() {
  1546. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  1547. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  1548. if (this.$vm) {
  1549. this.$vm._isMounted = true;
  1550. this.$vm.__call_hook('mounted');
  1551. this.$vm.__call_hook('onReady');
  1552. }
  1553. },
  1554. detached: function detached() {
  1555. this.$vm && this.$vm.$destroy();
  1556. } },
  1557. pageLifetimes: {
  1558. show: function show(args) {
  1559. this.$vm && this.$vm.__call_hook('onPageShow', args);
  1560. },
  1561. hide: function hide() {
  1562. this.$vm && this.$vm.__call_hook('onPageHide');
  1563. },
  1564. resize: function resize(size) {
  1565. this.$vm && this.$vm.__call_hook('onPageResize', size);
  1566. } },
  1567. methods: {
  1568. __l: handleLink,
  1569. __e: handleEvent } };
  1570. // externalClasses
  1571. if (vueOptions.externalClasses) {
  1572. componentOptions.externalClasses = vueOptions.externalClasses;
  1573. }
  1574. if (Array.isArray(vueOptions.wxsCallMethods)) {
  1575. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  1576. componentOptions.methods[callMethod] = function (args) {
  1577. return this.$vm[callMethod](args);
  1578. };
  1579. });
  1580. }
  1581. if (isPage) {
  1582. return componentOptions;
  1583. }
  1584. return [componentOptions, VueComponent];
  1585. }
  1586. function parseComponent(vueComponentOptions) {
  1587. return parseBaseComponent(vueComponentOptions, {
  1588. isPage: isPage,
  1589. initRelation: initRelation });
  1590. }
  1591. var hooks$1 = [
  1592. 'onShow',
  1593. 'onHide',
  1594. 'onUnload'];
  1595. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  1596. function parseBasePage(vuePageOptions, _ref6)
  1597. {var isPage = _ref6.isPage,initRelation = _ref6.initRelation;
  1598. var pageOptions = parseComponent(vuePageOptions);
  1599. initHooks(pageOptions.methods, hooks$1, vuePageOptions);
  1600. pageOptions.methods.onLoad = function (query) {
  1601. this.options = query;
  1602. var copyQuery = Object.assign({}, query);
  1603. delete copyQuery.__id__;
  1604. this.$page = {
  1605. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery) };
  1606. this.$vm.$mp.query = query; // 兼容 mpvue
  1607. this.$vm.__call_hook('onLoad', query);
  1608. };
  1609. return pageOptions;
  1610. }
  1611. function parsePage(vuePageOptions) {
  1612. return parseBasePage(vuePageOptions, {
  1613. isPage: isPage,
  1614. initRelation: initRelation });
  1615. }
  1616. function createPage(vuePageOptions) {
  1617. {
  1618. return Component(parsePage(vuePageOptions));
  1619. }
  1620. }
  1621. function createComponent(vueOptions) {
  1622. {
  1623. return Component(parseComponent(vueOptions));
  1624. }
  1625. }
  1626. function createSubpackageApp(vm) {
  1627. var appOptions = parseApp(vm);
  1628. var app = getApp({
  1629. allowDefault: true });
  1630. vm.$scope = app;
  1631. var globalData = app.globalData;
  1632. if (globalData) {
  1633. Object.keys(appOptions.globalData).forEach(function (name) {
  1634. if (!hasOwn(globalData, name)) {
  1635. globalData[name] = appOptions.globalData[name];
  1636. }
  1637. });
  1638. }
  1639. Object.keys(appOptions).forEach(function (name) {
  1640. if (!hasOwn(app, name)) {
  1641. app[name] = appOptions[name];
  1642. }
  1643. });
  1644. if (isFn(appOptions.onShow) && wx.onAppShow) {
  1645. wx.onAppShow(function () {for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {args[_key5] = arguments[_key5];}
  1646. vm.__call_hook('onShow', args);
  1647. });
  1648. }
  1649. if (isFn(appOptions.onHide) && wx.onAppHide) {
  1650. wx.onAppHide(function () {for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {args[_key6] = arguments[_key6];}
  1651. vm.__call_hook('onHide', args);
  1652. });
  1653. }
  1654. if (isFn(appOptions.onLaunch)) {
  1655. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  1656. vm.__call_hook('onLaunch', args);
  1657. }
  1658. return vm;
  1659. }
  1660. function createPlugin(vm) {
  1661. var appOptions = parseApp(vm);
  1662. if (isFn(appOptions.onShow) && wx.onAppShow) {
  1663. wx.onAppShow(function () {for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {args[_key7] = arguments[_key7];}
  1664. vm.__call_hook('onShow', args);
  1665. });
  1666. }
  1667. if (isFn(appOptions.onHide) && wx.onAppHide) {
  1668. wx.onAppHide(function () {for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {args[_key8] = arguments[_key8];}
  1669. vm.__call_hook('onHide', args);
  1670. });
  1671. }
  1672. if (isFn(appOptions.onLaunch)) {
  1673. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  1674. vm.__call_hook('onLaunch', args);
  1675. }
  1676. return vm;
  1677. }
  1678. todos.forEach(function (todoApi) {
  1679. protocols[todoApi] = false;
  1680. });
  1681. canIUses.forEach(function (canIUseApi) {
  1682. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name :
  1683. canIUseApi;
  1684. if (!wx.canIUse(apiName)) {
  1685. protocols[canIUseApi] = false;
  1686. }
  1687. });
  1688. var uni = {};
  1689. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  1690. uni = new Proxy({}, {
  1691. get: function get(target, name) {
  1692. if (hasOwn(target, name)) {
  1693. return target[name];
  1694. }
  1695. if (baseApi[name]) {
  1696. return baseApi[name];
  1697. }
  1698. if (api[name]) {
  1699. return promisify(name, api[name]);
  1700. }
  1701. {
  1702. if (extraApi[name]) {
  1703. return promisify(name, extraApi[name]);
  1704. }
  1705. if (todoApis[name]) {
  1706. return promisify(name, todoApis[name]);
  1707. }
  1708. }
  1709. if (eventApi[name]) {
  1710. return eventApi[name];
  1711. }
  1712. if (!hasOwn(wx, name) && !hasOwn(protocols, name)) {
  1713. return;
  1714. }
  1715. return promisify(name, wrapper(name, wx[name]));
  1716. },
  1717. set: function set(target, name, value) {
  1718. target[name] = value;
  1719. return true;
  1720. } });
  1721. } else {
  1722. Object.keys(baseApi).forEach(function (name) {
  1723. uni[name] = baseApi[name];
  1724. });
  1725. {
  1726. Object.keys(todoApis).forEach(function (name) {
  1727. uni[name] = promisify(name, todoApis[name]);
  1728. });
  1729. Object.keys(extraApi).forEach(function (name) {
  1730. uni[name] = promisify(name, todoApis[name]);
  1731. });
  1732. }
  1733. Object.keys(eventApi).forEach(function (name) {
  1734. uni[name] = eventApi[name];
  1735. });
  1736. Object.keys(api).forEach(function (name) {
  1737. uni[name] = promisify(name, api[name]);
  1738. });
  1739. Object.keys(wx).forEach(function (name) {
  1740. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  1741. uni[name] = promisify(name, wrapper(name, wx[name]));
  1742. }
  1743. });
  1744. }
  1745. wx.createApp = createApp;
  1746. wx.createPage = createPage;
  1747. wx.createComponent = createComponent;
  1748. wx.createSubpackageApp = createSubpackageApp;
  1749. wx.createPlugin = createPlugin;
  1750. var uni$1 = uni;var _default =
  1751. uni$1;exports.default = _default;
  1752. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 2)))
  1753. /***/ }),
  1754. /***/ 11:
  1755. /*!**********************************************************************************************************!*\
  1756. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  1757. \**********************************************************************************************************/
  1758. /*! exports provided: default */
  1759. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1760. "use strict";
  1761. __webpack_require__.r(__webpack_exports__);
  1762. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  1763. /* globals __VUE_SSR_CONTEXT__ */
  1764. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  1765. // This module is a runtime utility for cleaner component module output and will
  1766. // be included in the final webpack user bundle.
  1767. function normalizeComponent (
  1768. scriptExports,
  1769. render,
  1770. staticRenderFns,
  1771. functionalTemplate,
  1772. injectStyles,
  1773. scopeId,
  1774. moduleIdentifier, /* server only */
  1775. shadowMode, /* vue-cli only */
  1776. components, // fixed by xxxxxx auto components
  1777. renderjs // fixed by xxxxxx renderjs
  1778. ) {
  1779. // Vue.extend constructor export interop
  1780. var options = typeof scriptExports === 'function'
  1781. ? scriptExports.options
  1782. : scriptExports
  1783. // fixed by xxxxxx auto components
  1784. if (components) {
  1785. if (!options.components) {
  1786. options.components = {}
  1787. }
  1788. var hasOwn = Object.prototype.hasOwnProperty
  1789. for (var name in components) {
  1790. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  1791. options.components[name] = components[name]
  1792. }
  1793. }
  1794. }
  1795. // fixed by xxxxxx renderjs
  1796. if (renderjs) {
  1797. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  1798. this[renderjs.__module] = this
  1799. });
  1800. (options.mixins || (options.mixins = [])).push(renderjs)
  1801. }
  1802. // render functions
  1803. if (render) {
  1804. options.render = render
  1805. options.staticRenderFns = staticRenderFns
  1806. options._compiled = true
  1807. }
  1808. // functional template
  1809. if (functionalTemplate) {
  1810. options.functional = true
  1811. }
  1812. // scopedId
  1813. if (scopeId) {
  1814. options._scopeId = 'data-v-' + scopeId
  1815. }
  1816. var hook
  1817. if (moduleIdentifier) { // server build
  1818. hook = function (context) {
  1819. // 2.3 injection
  1820. context =
  1821. context || // cached call
  1822. (this.$vnode && this.$vnode.ssrContext) || // stateful
  1823. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  1824. // 2.2 with runInNewContext: true
  1825. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  1826. context = __VUE_SSR_CONTEXT__
  1827. }
  1828. // inject component styles
  1829. if (injectStyles) {
  1830. injectStyles.call(this, context)
  1831. }
  1832. // register component module identifier for async chunk inferrence
  1833. if (context && context._registeredComponents) {
  1834. context._registeredComponents.add(moduleIdentifier)
  1835. }
  1836. }
  1837. // used by ssr in case component is cached and beforeCreate
  1838. // never gets called
  1839. options._ssrRegister = hook
  1840. } else if (injectStyles) {
  1841. hook = shadowMode
  1842. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  1843. : injectStyles
  1844. }
  1845. if (hook) {
  1846. if (options.functional) {
  1847. // for template-only hot-reload because in that case the render fn doesn't
  1848. // go through the normalizer
  1849. options._injectStyles = hook
  1850. // register for functioal component in vue file
  1851. var originalRender = options.render
  1852. options.render = function renderWithStyleInjection (h, context) {
  1853. hook.call(context)
  1854. return originalRender(h, context)
  1855. }
  1856. } else {
  1857. // inject component registration as beforeCreate hook
  1858. var existing = options.beforeCreate
  1859. options.beforeCreate = existing
  1860. ? [].concat(existing, hook)
  1861. : [hook]
  1862. }
  1863. }
  1864. return {
  1865. exports: scriptExports,
  1866. options: options
  1867. }
  1868. }
  1869. /***/ }),
  1870. /***/ 12:
  1871. /*!**********************************************************************************!*\
  1872. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/index.js ***!
  1873. \**********************************************************************************/
  1874. /*! no static exports found */
  1875. /***/ (function(module, exports, __webpack_require__) {
  1876. "use strict";
  1877. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;
  1878. var _mixin = _interopRequireDefault(__webpack_require__(/*! ./libs/mixin/mixin.js */ 13));
  1879. var _request = _interopRequireDefault(__webpack_require__(/*! ./libs/request */ 14));
  1880. var _queryParams = _interopRequireDefault(__webpack_require__(/*! ./libs/function/queryParams.js */ 18));
  1881. var _route = _interopRequireDefault(__webpack_require__(/*! ./libs/function/route.js */ 19));
  1882. var _timeFormat = _interopRequireDefault(__webpack_require__(/*! ./libs/function/timeFormat.js */ 23));
  1883. var _timeFrom = _interopRequireDefault(__webpack_require__(/*! ./libs/function/timeFrom.js */ 24));
  1884. var _colorGradient = _interopRequireDefault(__webpack_require__(/*! ./libs/function/colorGradient.js */ 25));
  1885. var _guid = _interopRequireDefault(__webpack_require__(/*! ./libs/function/guid.js */ 26));
  1886. var _color = _interopRequireDefault(__webpack_require__(/*! ./libs/function/color.js */ 27));
  1887. var _type2icon = _interopRequireDefault(__webpack_require__(/*! ./libs/function/type2icon.js */ 28));
  1888. var _randomArray = _interopRequireDefault(__webpack_require__(/*! ./libs/function/randomArray.js */ 29));
  1889. var _deepClone = _interopRequireDefault(__webpack_require__(/*! ./libs/function/deepClone.js */ 16));
  1890. var _deepMerge = _interopRequireDefault(__webpack_require__(/*! ./libs/function/deepMerge.js */ 15));
  1891. var _addUnit = _interopRequireDefault(__webpack_require__(/*! ./libs/function/addUnit.js */ 30));
  1892. var _test = _interopRequireDefault(__webpack_require__(/*! ./libs/function/test.js */ 17));
  1893. var _random = _interopRequireDefault(__webpack_require__(/*! ./libs/function/random.js */ 31));
  1894. var _trim = _interopRequireDefault(__webpack_require__(/*! ./libs/function/trim.js */ 32));
  1895. var _toast = _interopRequireDefault(__webpack_require__(/*! ./libs/function/toast.js */ 33));
  1896. var _getParent = _interopRequireDefault(__webpack_require__(/*! ./libs/function/getParent.js */ 34));
  1897. var _$parent = _interopRequireDefault(__webpack_require__(/*! ./libs/function/$parent.js */ 35));
  1898. var _sys = __webpack_require__(/*! ./libs/function/sys.js */ 36);
  1899. var _debounce = _interopRequireDefault(__webpack_require__(/*! ./libs/function/debounce.js */ 37));
  1900. var _throttle = _interopRequireDefault(__webpack_require__(/*! ./libs/function/throttle.js */ 38));
  1901. var _config = _interopRequireDefault(__webpack_require__(/*! ./libs/config/config.js */ 39));
  1902. var _zIndex = _interopRequireDefault(__webpack_require__(/*! ./libs/config/zIndex.js */ 40));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} // 引入全局mixin
  1903. // 引入关于是否mixin集成小程序分享的配置
  1904. // import wxshare from './libs/mixin/mpShare.js'
  1905. // 全局挂载引入http相关请求拦截插件
  1906. function wranning(str) {// 开发环境进行信息输出,主要是一些报错信息
  1907. // 这个环境的来由是在程序编写时候,点击hx编辑器运行调试代码的时候,详见:
  1908. // https://uniapp.dcloud.io/frame?id=%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%e5%92%8c%e7%94%9f%e4%ba%a7%e7%8e%af%e5%a2%83
  1909. if (true) {console.warn(str);}} // 尝试判断在根目录的/store中是否有$u.mixin.js,此文件uView默认为需要挂在到全局的vuex的state变量
  1910. // HX2.6.11版本,放到try中,控制台依然会警告,暂时不用此方式,
  1911. // let vuexStore = {};
  1912. // try {
  1913. // vuexStore = require("@/store/$u.mixin.js");
  1914. // } catch (e) {
  1915. // //TODO handle the exception
  1916. // }
  1917. // post类型对象参数转为get类型url参数
  1918. var $u = { queryParams: _queryParams.default, route: _route.default, timeFormat: _timeFormat.default, date: _timeFormat.default, // 另名date
  1919. timeFrom: _timeFrom.default, colorGradient: _colorGradient.default.colorGradient, colorToRgba: _colorGradient.default.colorToRgba, guid: _guid.default, color: _color.default, sys: _sys.sys, os: _sys.os, type2icon: _type2icon.default, randomArray: _randomArray.default, wranning: wranning, get: _request.default.get,
  1920. post: _request.default.post,
  1921. put: _request.default.put,
  1922. 'delete': _request.default.delete,
  1923. hexToRgb: _colorGradient.default.hexToRgb,
  1924. rgbToHex: _colorGradient.default.rgbToHex,
  1925. test: _test.default,
  1926. random: _random.default,
  1927. deepClone: _deepClone.default,
  1928. deepMerge: _deepMerge.default,
  1929. getParent: _getParent.default,
  1930. $parent: _$parent.default,
  1931. addUnit: _addUnit.default,
  1932. trim: _trim.default,
  1933. type: ['primary', 'success', 'error', 'warning', 'info'],
  1934. http: _request.default,
  1935. toast: _toast.default,
  1936. config: _config.default, // uView配置信息相关,比如版本号
  1937. zIndex: _zIndex.default,
  1938. debounce: _debounce.default,
  1939. throttle: _throttle.default };
  1940. // $u挂载到uni对象上
  1941. uni.$u = $u;
  1942. var install = function install(Vue) {
  1943. Vue.mixin(_mixin.default);
  1944. if (Vue.prototype.openShare) {
  1945. Vue.mixin(mpShare);
  1946. }
  1947. // Vue.mixin(vuexStore);
  1948. // 时间格式化,同时两个名称,date和timeFormat
  1949. Vue.filter('timeFormat', function (timestamp, format) {
  1950. return (0, _timeFormat.default)(timestamp, format);
  1951. });
  1952. Vue.filter('date', function (timestamp, format) {
  1953. return (0, _timeFormat.default)(timestamp, format);
  1954. });
  1955. // 将多久以前的方法,注入到全局过滤器
  1956. Vue.filter('timeFrom', function (timestamp, format) {
  1957. return (0, _timeFrom.default)(timestamp, format);
  1958. });
  1959. Vue.prototype.$u = $u;
  1960. };var _default =
  1961. {
  1962. install: install };exports.default = _default;
  1963. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  1964. /***/ }),
  1965. /***/ 13:
  1966. /*!*********************************************************************************************!*\
  1967. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/libs/mixin/mixin.js ***!
  1968. \*********************************************************************************************/
  1969. /*! no static exports found */
  1970. /***/ (function(module, exports, __webpack_require__) {
  1971. /* WEBPACK VAR INJECTION */(function(uni) {module.exports = {
  1972. data: function data() {
  1973. return {};
  1974. },
  1975. onLoad: function onLoad() {
  1976. // getRect挂载到$u上,因为这方法需要使用in(this),所以无法把它独立成一个单独的文件导出
  1977. this.$u.getRect = this.$uGetRect;
  1978. },
  1979. methods: {
  1980. // 查询节点信息
  1981. // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
  1982. // 解决办法为在组件根部再套一个没有任何作用的view元素
  1983. $uGetRect: function $uGetRect(selector, all) {var _this = this;
  1984. return new Promise(function (resolve) {
  1985. uni.createSelectorQuery().
  1986. in(_this)[all ? 'selectAll' : 'select'](selector).
  1987. boundingClientRect(function (rect) {
  1988. if (all && Array.isArray(rect) && rect.length) {
  1989. resolve(rect);
  1990. }
  1991. if (!all && rect) {
  1992. resolve(rect);
  1993. }
  1994. }).
  1995. exec();
  1996. });
  1997. },
  1998. getParentData: function getParentData() {var _this2 = this;var parentName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  1999. // 避免在created中去定义parent变量
  2000. if (!this.parent) this.parent = false;
  2001. // 这里的本质原理是,通过获取父组件实例(也即u-radio-group的this)
  2002. // 将父组件this中对应的参数,赋值给本组件(u-radio的this)的parentData对象中对应的属性
  2003. // 之所以需要这么做,是因为所有端中,头条小程序不支持通过this.parent.xxx去监听父组件参数的变化
  2004. this.parent = this.$u.$parent.call(this, parentName);
  2005. if (this.parent) {
  2006. // 历遍parentData中的属性,将parent中的同名属性赋值给parentData
  2007. Object.keys(this.parentData).map(function (key) {
  2008. _this2.parentData[key] = _this2.parent[key];
  2009. });
  2010. }
  2011. },
  2012. // 阻止事件冒泡
  2013. preventEvent: function preventEvent(e) {
  2014. e && e.stopPropagation && e.stopPropagation();
  2015. } },
  2016. onReachBottom: function onReachBottom() {
  2017. uni.$emit('uOnReachBottom');
  2018. },
  2019. beforeDestroy: function beforeDestroy() {var _this3 = this;
  2020. // 判断当前页面是否存在parent和chldren,一般在checkbox和checkbox-group父子联动的场景会有此情况
  2021. // 组件销毁时,移除子组件在父组件children数组中的实例,释放资源,避免数据混乱
  2022. if (this.parent && uni.$u.test.array(this.parent.children)) {
  2023. // 组件销毁时,移除父组件中的children数组中对应的实例
  2024. var childrenList = this.parent.children;
  2025. childrenList.map(function (child, index) {
  2026. // 如果相等,则移除
  2027. if (child === _this3) {
  2028. childrenList.splice(index, 1);
  2029. }
  2030. });
  2031. }
  2032. } };
  2033. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  2034. /***/ }),
  2035. /***/ 14:
  2036. /*!***********************************************************************************************!*\
  2037. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/libs/request/index.js ***!
  2038. \***********************************************************************************************/
  2039. /*! no static exports found */
  2040. /***/ (function(module, exports, __webpack_require__) {
  2041. "use strict";
  2042. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _deepMerge = _interopRequireDefault(__webpack_require__(/*! ../function/deepMerge */ 15));
  2043. var _test = _interopRequireDefault(__webpack_require__(/*! ../function/test */ 17));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}function _createClass(Constructor, protoProps, staticProps) {if (protoProps) _defineProperties(Constructor.prototype, protoProps);if (staticProps) _defineProperties(Constructor, staticProps);return Constructor;}var
  2044. Request = /*#__PURE__*/function () {_createClass(Request, [{ key: "setConfig",
  2045. // 设置全局默认配置
  2046. value: function setConfig(customConfig) {
  2047. // 深度合并对象,否则会造成对象深层属性丢失
  2048. this.config = (0, _deepMerge.default)(this.config, customConfig);
  2049. }
  2050. // 主要请求部分
  2051. }, { key: "request", value: function request() {var _this = this;var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  2052. // 检查请求拦截
  2053. if (this.interceptor.request && typeof this.interceptor.request === 'function') {
  2054. var tmpConfig = {};
  2055. var interceptorRequest = this.interceptor.request(options);
  2056. if (interceptorRequest === false) {
  2057. // 返回一个处于pending状态中的Promise,来取消原promise,避免进入then()回调
  2058. return new Promise(function () {});
  2059. }
  2060. this.options = interceptorRequest;
  2061. }
  2062. options.dataType = options.dataType || this.config.dataType;
  2063. options.responseType = options.responseType || this.config.responseType;
  2064. options.url = options.url || '';
  2065. options.params = options.params || {};
  2066. options.header = Object.assign({}, this.config.header, options.header);
  2067. options.method = options.method || this.config.method;
  2068. return new Promise(function (resolve, reject) {
  2069. options.complete = function (response) {
  2070. // 请求返回后,隐藏loading(如果请求返回快的话,可能会没有loading)
  2071. uni.hideLoading();
  2072. // 清除定时器,如果请求回来了,就无需loading
  2073. clearTimeout(_this.config.timer);
  2074. _this.config.timer = null;
  2075. // 判断用户对拦截返回数据的要求,如果originalData为true,返回所有的数据(response)到拦截器,否则只返回response.data
  2076. if (_this.config.originalData) {
  2077. // 判断是否存在拦截器
  2078. if (_this.interceptor.response && typeof _this.interceptor.response === 'function') {
  2079. var resInterceptors = _this.interceptor.response(response);
  2080. // 如果拦截器不返回false,就将拦截器返回的内容给this.$u.post的then回调
  2081. if (resInterceptors !== false) {
  2082. resolve(resInterceptors);
  2083. } else {
  2084. // 如果拦截器返回false,意味着拦截器定义者认为返回有问题,直接接入catch回调
  2085. reject(response);
  2086. }
  2087. } else {
  2088. // 如果要求返回原始数据,就算没有拦截器,也返回最原始的数据
  2089. resolve(response);
  2090. }
  2091. } else {
  2092. if (response.statusCode == 200) {
  2093. if (_this.interceptor.response && typeof _this.interceptor.response === 'function') {
  2094. var _resInterceptors = _this.interceptor.response(response.data);
  2095. if (_resInterceptors !== false) {
  2096. resolve(_resInterceptors);
  2097. } else {
  2098. reject(response.data);
  2099. }
  2100. } else {
  2101. // 如果不是返回原始数据(originalData=false),且没有拦截器的情况下,返回纯数据给then回调
  2102. resolve(response.data);
  2103. }
  2104. } else {
  2105. // 不返回原始数据的情况下,服务器状态码不为200,modal弹框提示
  2106. // if(response.errMsg) {
  2107. // uni.showModal({
  2108. // title: response.errMsg
  2109. // });
  2110. // }
  2111. reject(response);
  2112. }
  2113. }
  2114. };
  2115. // 判断用户传递的URL是否/开头,如果不是,加上/,这里使用了uView的test.js验证库的url()方法
  2116. options.url = _test.default.url(options.url) ? options.url : _this.config.baseUrl + (options.url.indexOf('/') == 0 ?
  2117. options.url : '/' + options.url);
  2118. // 是否显示loading
  2119. // 加一个是否已有timer定时器的判断,否则有两个同时请求的时候,后者会清除前者的定时器id
  2120. // 而没有清除前者的定时器,导致前者超时,一直显示loading
  2121. if (_this.config.showLoading && !_this.config.timer) {
  2122. _this.config.timer = setTimeout(function () {
  2123. uni.showLoading({
  2124. title: _this.config.loadingText,
  2125. mask: _this.config.loadingMask });
  2126. _this.config.timer = null;
  2127. }, _this.config.loadingTime);
  2128. }
  2129. uni.request(options);
  2130. });
  2131. // .catch(res => {
  2132. // // 如果返回reject(),不让其进入this.$u.post().then().catch()后面的catct()
  2133. // // 因为很多人都会忘了写后面的catch(),导致报错捕获不到catch
  2134. // return new Promise(()=>{});
  2135. // })
  2136. } }]);
  2137. function Request() {var _this2 = this;_classCallCheck(this, Request);
  2138. this.config = {
  2139. baseUrl: '', // 请求的根域名
  2140. // 默认的请求头
  2141. header: {},
  2142. method: 'POST',
  2143. // 设置为json,返回后uni.request会对数据进行一次JSON.parse
  2144. dataType: 'json',
  2145. // 此参数无需处理,因为5+和支付宝小程序不支持,默认为text即可
  2146. responseType: 'text',
  2147. showLoading: true, // 是否显示请求中的loading
  2148. loadingText: '请求中...',
  2149. loadingTime: 800, // 在此时间内,请求还没回来的话,就显示加载中动画,单位ms
  2150. timer: null, // 定时器
  2151. originalData: false, // 是否在拦截器中返回服务端的原始数据,见文档说明
  2152. loadingMask: true // 展示loading的时候,是否给一个透明的蒙层,防止触摸穿透
  2153. };
  2154. // 拦截器
  2155. this.interceptor = {
  2156. // 请求前的拦截
  2157. request: null,
  2158. // 请求后的拦截
  2159. response: null };
  2160. // get请求
  2161. this.get = function (url) {var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  2162. return _this2.request({
  2163. method: 'GET',
  2164. url: url,
  2165. header: header,
  2166. data: data });
  2167. };
  2168. // post请求
  2169. this.post = function (url) {var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  2170. return _this2.request({
  2171. url: url,
  2172. method: 'POST',
  2173. header: header,
  2174. data: data });
  2175. };
  2176. // put请求,不支持支付宝小程序(HX2.6.15)
  2177. this.put = function (url) {var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  2178. return _this2.request({
  2179. url: url,
  2180. method: 'PUT',
  2181. header: header,
  2182. data: data });
  2183. };
  2184. // delete请求,不支持支付宝和头条小程序(HX2.6.15)
  2185. this.delete = function (url) {var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  2186. return _this2.request({
  2187. url: url,
  2188. method: 'DELETE',
  2189. header: header,
  2190. data: data });
  2191. };
  2192. }return Request;}();var _default =
  2193. new Request();exports.default = _default;
  2194. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  2195. /***/ }),
  2196. /***/ 15:
  2197. /*!****************************************************************************************************!*\
  2198. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/libs/function/deepMerge.js ***!
  2199. \****************************************************************************************************/
  2200. /*! no static exports found */
  2201. /***/ (function(module, exports, __webpack_require__) {
  2202. "use strict";
  2203. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _deepClone = _interopRequireDefault(__webpack_require__(/*! ./deepClone */ 16));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  2204. // JS对象深度合并
  2205. function deepMerge() {var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  2206. target = (0, _deepClone.default)(target);
  2207. if (typeof target !== 'object' || typeof source !== 'object') return false;
  2208. for (var prop in source) {
  2209. if (!source.hasOwnProperty(prop)) continue;
  2210. if (prop in target) {
  2211. if (typeof target[prop] !== 'object') {
  2212. target[prop] = source[prop];
  2213. } else {
  2214. if (typeof source[prop] !== 'object') {
  2215. target[prop] = source[prop];
  2216. } else {
  2217. if (target[prop].concat && source[prop].concat) {
  2218. target[prop] = target[prop].concat(source[prop]);
  2219. } else {
  2220. target[prop] = deepMerge(target[prop], source[prop]);
  2221. }
  2222. }
  2223. }
  2224. } else {
  2225. target[prop] = source[prop];
  2226. }
  2227. }
  2228. return target;
  2229. }var _default =
  2230. deepMerge;exports.default = _default;
  2231. /***/ }),
  2232. /***/ 16:
  2233. /*!****************************************************************************************************!*\
  2234. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/libs/function/deepClone.js ***!
  2235. \****************************************************************************************************/
  2236. /*! no static exports found */
  2237. /***/ (function(module, exports, __webpack_require__) {
  2238. "use strict";
  2239. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // 判断arr是否为一个数组,返回一个bool值
  2240. function isArray(arr) {
  2241. return Object.prototype.toString.call(arr) === '[object Array]';
  2242. }
  2243. // 深度克隆
  2244. function deepClone(obj) {
  2245. // 对常见的“非”值,直接返回原来值
  2246. if ([null, undefined, NaN, false].includes(obj)) return obj;
  2247. if (typeof obj !== "object" && typeof obj !== 'function') {
  2248. //原始类型直接返回
  2249. return obj;
  2250. }
  2251. var o = isArray(obj) ? [] : {};
  2252. for (var i in obj) {
  2253. if (obj.hasOwnProperty(i)) {
  2254. o[i] = typeof obj[i] === "object" ? deepClone(obj[i]) : obj[i];
  2255. }
  2256. }
  2257. return o;
  2258. }var _default =
  2259. deepClone;exports.default = _default;
  2260. /***/ }),
  2261. /***/ 17:
  2262. /*!***********************************************************************************************!*\
  2263. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/libs/function/test.js ***!
  2264. \***********************************************************************************************/
  2265. /*! no static exports found */
  2266. /***/ (function(module, exports, __webpack_require__) {
  2267. "use strict";
  2268. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; /**
  2269. * 验证电子邮箱格式
  2270. */
  2271. function email(value) {
  2272. return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value);
  2273. }
  2274. /**
  2275. * 验证手机格式
  2276. */
  2277. function mobile(value) {
  2278. return /^1[3-9]\d{9}$/.test(value);
  2279. }
  2280. /**
  2281. * 验证URL格式
  2282. */
  2283. function url(value) {
  2284. return /http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w-.\/?%&=]*)?/.test(value);
  2285. }
  2286. /**
  2287. * 验证日期格式
  2288. */
  2289. function date(value) {
  2290. return !/Invalid|NaN/.test(new Date(value).toString());
  2291. }
  2292. /**
  2293. * 验证ISO类型的日期格式
  2294. */
  2295. function dateISO(value) {
  2296. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value);
  2297. }
  2298. /**
  2299. * 验证十进制数字
  2300. */
  2301. function number(value) {
  2302. return /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(value);
  2303. }
  2304. /**
  2305. * 验证整数
  2306. */
  2307. function digits(value) {
  2308. return /^\d+$/.test(value);
  2309. }
  2310. /**
  2311. * 验证身份证号码
  2312. */
  2313. function idCard(value) {
  2314. return /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(
  2315. value);
  2316. }
  2317. /**
  2318. * 是否车牌号
  2319. */
  2320. function carNo(value) {
  2321. // 新能源车牌
  2322. var xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  2323. // 旧车牌
  2324. var creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  2325. if (value.length === 7) {
  2326. return creg.test(value);
  2327. } else if (value.length === 8) {
  2328. return xreg.test(value);
  2329. } else {
  2330. return false;
  2331. }
  2332. }
  2333. /**
  2334. * 金额,只允许2位小数
  2335. */
  2336. function amount(value) {
  2337. //金额,只允许保留两位小数
  2338. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value);
  2339. }
  2340. /**
  2341. * 中文
  2342. */
  2343. function chinese(value) {
  2344. var reg = /^[\u4e00-\u9fa5]+$/gi;
  2345. return reg.test(value);
  2346. }
  2347. /**
  2348. * 只能输入字母
  2349. */
  2350. function letter(value) {
  2351. return /^[a-zA-Z]*$/.test(value);
  2352. }
  2353. /**
  2354. * 只能是字母或者数字
  2355. */
  2356. function enOrNum(value) {
  2357. //英文或者数字
  2358. var reg = /^[0-9a-zA-Z]*$/g;
  2359. return reg.test(value);
  2360. }
  2361. /**
  2362. * 验证是否包含某个值
  2363. */
  2364. function contains(value, param) {
  2365. return value.indexOf(param) >= 0;
  2366. }
  2367. /**
  2368. * 验证一个值范围[min, max]
  2369. */
  2370. function range(value, param) {
  2371. return value >= param[0] && value <= param[1];
  2372. }
  2373. /**
  2374. * 验证一个长度范围[min, max]
  2375. */
  2376. function rangeLength(value, param) {
  2377. return value.length >= param[0] && value.length <= param[1];
  2378. }
  2379. /**
  2380. * 是否固定电话
  2381. */
  2382. function landline(value) {
  2383. var reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  2384. return reg.test(value);
  2385. }
  2386. /**
  2387. * 判断是否为空
  2388. */
  2389. function empty(value) {
  2390. switch (typeof value) {
  2391. case 'undefined':
  2392. return true;
  2393. case 'string':
  2394. if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, '').length == 0) return true;
  2395. break;
  2396. case 'boolean':
  2397. if (!value) return true;
  2398. break;
  2399. case 'number':
  2400. if (0 === value || isNaN(value)) return true;
  2401. break;
  2402. case 'object':
  2403. if (null === value || value.length === 0) return true;
  2404. for (var i in value) {
  2405. return false;
  2406. }
  2407. return true;}
  2408. return false;
  2409. }
  2410. /**
  2411. * 是否json字符串
  2412. */
  2413. function jsonString(value) {
  2414. if (typeof value == 'string') {
  2415. try {
  2416. var obj = JSON.parse(value);
  2417. if (typeof obj == 'object' && obj) {
  2418. return true;
  2419. } else {
  2420. return false;
  2421. }
  2422. } catch (e) {
  2423. return false;
  2424. }
  2425. }
  2426. return false;
  2427. }
  2428. /**
  2429. * 是否数组
  2430. */
  2431. function array(value) {
  2432. if (typeof Array.isArray === "function") {
  2433. return Array.isArray(value);
  2434. } else {
  2435. return Object.prototype.toString.call(value) === "[object Array]";
  2436. }
  2437. }
  2438. /**
  2439. * 是否对象
  2440. */
  2441. function object(value) {
  2442. return Object.prototype.toString.call(value) === '[object Object]';
  2443. }
  2444. /**
  2445. * 是否短信验证码
  2446. */
  2447. function code(value) {var len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 6;
  2448. return new RegExp("^\\d{".concat(len, "}$")).test(value);
  2449. }var _default =
  2450. {
  2451. email: email,
  2452. mobile: mobile,
  2453. url: url,
  2454. date: date,
  2455. dateISO: dateISO,
  2456. number: number,
  2457. digits: digits,
  2458. idCard: idCard,
  2459. carNo: carNo,
  2460. amount: amount,
  2461. chinese: chinese,
  2462. letter: letter,
  2463. enOrNum: enOrNum,
  2464. contains: contains,
  2465. range: range,
  2466. rangeLength: rangeLength,
  2467. empty: empty,
  2468. isEmpty: empty,
  2469. jsonString: jsonString,
  2470. landline: landline,
  2471. object: object,
  2472. array: array,
  2473. code: code };exports.default = _default;
  2474. /***/ }),
  2475. /***/ 18:
  2476. /*!******************************************************************************************************!*\
  2477. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/libs/function/queryParams.js ***!
  2478. \******************************************************************************************************/
  2479. /*! no static exports found */
  2480. /***/ (function(module, exports, __webpack_require__) {
  2481. "use strict";
  2482. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; /**
  2483. * 对象转url参数
  2484. * @param {*} data,对象
  2485. * @param {*} isPrefix,是否自动加上"?"
  2486. */
  2487. function queryParams() {var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};var isPrefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;var arrayFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'brackets';
  2488. var prefix = isPrefix ? '?' : '';
  2489. var _result = [];
  2490. if (['indices', 'brackets', 'repeat', 'comma'].indexOf(arrayFormat) == -1) arrayFormat = 'brackets';var _loop = function _loop(
  2491. key) {
  2492. var value = data[key];
  2493. // 去掉为空的参数
  2494. if (['', undefined, null].indexOf(value) >= 0) {
  2495. return "continue";
  2496. }
  2497. // 如果值为数组,另行处理
  2498. if (value.constructor === Array) {
  2499. // e.g. {ids: [1, 2, 3]}
  2500. switch (arrayFormat) {
  2501. case 'indices':
  2502. // 结果: ids[0]=1&ids[1]=2&ids[2]=3
  2503. for (var i = 0; i < value.length; i++) {
  2504. _result.push(key + '[' + i + ']=' + value[i]);
  2505. }
  2506. break;
  2507. case 'brackets':
  2508. // 结果: ids[]=1&ids[]=2&ids[]=3
  2509. value.forEach(function (_value) {
  2510. _result.push(key + '[]=' + _value);
  2511. });
  2512. break;
  2513. case 'repeat':
  2514. // 结果: ids=1&ids=2&ids=3
  2515. value.forEach(function (_value) {
  2516. _result.push(key + '=' + _value);
  2517. });
  2518. break;
  2519. case 'comma':
  2520. // 结果: ids=1,2,3
  2521. var commaStr = "";
  2522. value.forEach(function (_value) {
  2523. commaStr += (commaStr ? "," : "") + _value;
  2524. });
  2525. _result.push(key + '=' + commaStr);
  2526. break;
  2527. default:
  2528. value.forEach(function (_value) {
  2529. _result.push(key + '[]=' + _value);
  2530. });}
  2531. } else {
  2532. _result.push(key + '=' + value);
  2533. }};for (var key in data) {var _ret = _loop(key);if (_ret === "continue") continue;
  2534. }
  2535. return _result.length ? prefix + _result.join('&') : '';
  2536. }var _default =
  2537. queryParams;exports.default = _default;
  2538. /***/ }),
  2539. /***/ 19:
  2540. /*!************************************************************************************************!*\
  2541. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/libs/function/route.js ***!
  2542. \************************************************************************************************/
  2543. /*! no static exports found */
  2544. /***/ (function(module, exports, __webpack_require__) {
  2545. "use strict";
  2546. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _regenerator = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@babel/runtime/regenerator */ 20));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {try {var info = gen[key](arg);var value = info.value;} catch (error) {reject(error);return;}if (info.done) {resolve(value);} else {Promise.resolve(value).then(_next, _throw);}}function _asyncToGenerator(fn) {return function () {var self = this,args = arguments;return new Promise(function (resolve, reject) {var gen = fn.apply(self, args);function _next(value) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);}function _throw(err) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);}_next(undefined);});};}function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}function _createClass(Constructor, protoProps, staticProps) {if (protoProps) _defineProperties(Constructor.prototype, protoProps);if (staticProps) _defineProperties(Constructor, staticProps);return Constructor;} /**
  2547. * 路由跳转方法,该方法相对于直接使用uni.xxx的好处是使用更加简单快捷
  2548. * 并且带有路由拦截功能
  2549. */var
  2550. Router = /*#__PURE__*/function () {
  2551. function Router() {_classCallCheck(this, Router);
  2552. // 原始属性定义
  2553. this.config = {
  2554. type: 'navigateTo',
  2555. url: '',
  2556. delta: 1, // navigateBack页面后退时,回退的层数
  2557. params: {}, // 传递的参数
  2558. animationType: 'pop-in', // 窗口动画,只在APP有效
  2559. animationDuration: 300, // 窗口动画持续时间,单位毫秒,只在APP有效
  2560. intercept: false // 是否需要拦截
  2561. };
  2562. // 因为route方法是需要对外赋值给另外的对象使用,同时route内部有使用this,会导致route失去上下文
  2563. // 这里在构造函数中进行this绑定
  2564. this.route = this.route.bind(this);
  2565. }
  2566. // 判断url前面是否有"/",如果没有则加上,否则无法跳转
  2567. _createClass(Router, [{ key: "addRootPath", value: function addRootPath(url) {
  2568. return url[0] === '/' ? url : "/".concat(url);
  2569. }
  2570. // 整合路由参数
  2571. }, { key: "mixinParam", value: function mixinParam(url, params) {
  2572. url = url && this.addRootPath(url);
  2573. // 使用正则匹配,主要依据是判断是否有"/","?","="等,如“/page/index/index?name=mary"
  2574. // 如果有url中有get参数,转换后无需带上"?"
  2575. var query = '';
  2576. if (/.*\/.*\?.*=.*/.test(url)) {
  2577. // object对象转为get类型的参数
  2578. query = uni.$u.queryParams(params, false);
  2579. // 因为已有get参数,所以后面拼接的参数需要带上"&"隔开
  2580. return url += "&" + query;
  2581. } else {
  2582. // 直接拼接参数,因为此处url中没有后面的query参数,也就没有"?/&"之类的符号
  2583. query = uni.$u.queryParams(params);
  2584. return url += query;
  2585. }
  2586. }
  2587. // 对外的方法名称
  2588. }, { key: "route", value: function () {var _route = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee() {var options,params,mergeConfig,isNext,_args = arguments;return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};params = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
  2589. // 合并用户的配置和内部的默认配置
  2590. mergeConfig = {};
  2591. if (typeof options === 'string') {
  2592. // 如果options为字符串,则为route(url, params)的形式
  2593. mergeConfig.url = this.mixinParam(options, params);
  2594. mergeConfig.type = 'navigateTo';
  2595. } else {
  2596. mergeConfig = uni.$u.deepClone(options, this.config);
  2597. // 否则正常使用mergeConfig中的url和params进行拼接
  2598. mergeConfig.url = this.mixinParam(options.url, options.params);
  2599. }
  2600. if (params.intercept) {
  2601. this.config.intercept = params.intercept;
  2602. }
  2603. // params参数也带给拦截器
  2604. mergeConfig.params = params;
  2605. // 合并内外部参数
  2606. mergeConfig = uni.$u.deepMerge(this.config, mergeConfig);
  2607. // 判断用户是否定义了拦截器
  2608. if (!(typeof uni.$u.routeIntercept === 'function')) {_context.next = 14;break;}_context.next = 10;return (
  2609. new Promise(function (resolve, reject) {
  2610. uni.$u.routeIntercept(mergeConfig, resolve);
  2611. }));case 10:isNext = _context.sent;
  2612. // 如果isNext为true,则执行路由跳转
  2613. isNext && this.openPage(mergeConfig);_context.next = 15;break;case 14:
  2614. this.openPage(mergeConfig);case 15:case "end":return _context.stop();}}}, _callee, this);}));function route() {return _route.apply(this, arguments);}return route;}()
  2615. // 执行路由跳转
  2616. }, { key: "openPage", value: function openPage(config) {
  2617. // 解构参数
  2618. var
  2619. url =
  2620. config.url,type = config.type,delta = config.delta,animationType = config.animationType,animationDuration = config.animationDuration;
  2621. if (config.type == 'navigateTo' || config.type == 'to') {
  2622. uni.navigateTo({
  2623. url: url,
  2624. animationType: animationType,
  2625. animationDuration: animationDuration });
  2626. }
  2627. if (config.type == 'redirectTo' || config.type == 'redirect') {
  2628. uni.redirectTo({
  2629. url: url });
  2630. }
  2631. if (config.type == 'switchTab' || config.type == 'tab') {
  2632. uni.switchTab({
  2633. url: url });
  2634. }
  2635. if (config.type == 'reLaunch' || config.type == 'launch') {
  2636. uni.reLaunch({
  2637. url: url });
  2638. }
  2639. if (config.type == 'navigateBack' || config.type == 'back') {
  2640. uni.navigateBack({
  2641. delta: delta });
  2642. }
  2643. } }]);return Router;}();var _default =
  2644. new Router().route;exports.default = _default;
  2645. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  2646. /***/ }),
  2647. /***/ 2:
  2648. /*!***********************************!*\
  2649. !*** (webpack)/buildin/global.js ***!
  2650. \***********************************/
  2651. /*! no static exports found */
  2652. /***/ (function(module, exports) {
  2653. var g;
  2654. // This works in non-strict mode
  2655. g = (function() {
  2656. return this;
  2657. })();
  2658. try {
  2659. // This works if eval is allowed (see CSP)
  2660. g = g || new Function("return this")();
  2661. } catch (e) {
  2662. // This works if the window reference is available
  2663. if (typeof window === "object") g = window;
  2664. }
  2665. // g can still be undefined, but nothing to do about it...
  2666. // We return undefined, instead of nothing here, so it's
  2667. // easier to handle this case. if(!global) { ...}
  2668. module.exports = g;
  2669. /***/ }),
  2670. /***/ 20:
  2671. /*!**********************************************************!*\
  2672. !*** ./node_modules/@babel/runtime/regenerator/index.js ***!
  2673. \**********************************************************/
  2674. /*! no static exports found */
  2675. /***/ (function(module, exports, __webpack_require__) {
  2676. module.exports = __webpack_require__(/*! regenerator-runtime */ 21);
  2677. /***/ }),
  2678. /***/ 21:
  2679. /*!************************************************************!*\
  2680. !*** ./node_modules/regenerator-runtime/runtime-module.js ***!
  2681. \************************************************************/
  2682. /*! no static exports found */
  2683. /***/ (function(module, exports, __webpack_require__) {
  2684. /**
  2685. * Copyright (c) 2014-present, Facebook, Inc.
  2686. *
  2687. * This source code is licensed under the MIT license found in the
  2688. * LICENSE file in the root directory of this source tree.
  2689. */
  2690. // This method of obtaining a reference to the global object needs to be
  2691. // kept identical to the way it is obtained in runtime.js
  2692. var g = (function() {
  2693. return this || (typeof self === "object" && self);
  2694. })() || Function("return this")();
  2695. // Use `getOwnPropertyNames` because not all browsers support calling
  2696. // `hasOwnProperty` on the global `self` object in a worker. See #183.
  2697. var hadRuntime = g.regeneratorRuntime &&
  2698. Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0;
  2699. // Save the old regeneratorRuntime in case it needs to be restored later.
  2700. var oldRuntime = hadRuntime && g.regeneratorRuntime;
  2701. // Force reevalutation of runtime.js.
  2702. g.regeneratorRuntime = undefined;
  2703. module.exports = __webpack_require__(/*! ./runtime */ 22);
  2704. if (hadRuntime) {
  2705. // Restore the original runtime.
  2706. g.regeneratorRuntime = oldRuntime;
  2707. } else {
  2708. // Remove the global property added by runtime.js.
  2709. try {
  2710. delete g.regeneratorRuntime;
  2711. } catch(e) {
  2712. g.regeneratorRuntime = undefined;
  2713. }
  2714. }
  2715. /***/ }),
  2716. /***/ 22:
  2717. /*!*****************************************************!*\
  2718. !*** ./node_modules/regenerator-runtime/runtime.js ***!
  2719. \*****************************************************/
  2720. /*! no static exports found */
  2721. /***/ (function(module, exports) {
  2722. /**
  2723. * Copyright (c) 2014-present, Facebook, Inc.
  2724. *
  2725. * This source code is licensed under the MIT license found in the
  2726. * LICENSE file in the root directory of this source tree.
  2727. */
  2728. !(function(global) {
  2729. "use strict";
  2730. var Op = Object.prototype;
  2731. var hasOwn = Op.hasOwnProperty;
  2732. var undefined; // More compressible than void 0.
  2733. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  2734. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  2735. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  2736. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  2737. var inModule = typeof module === "object";
  2738. var runtime = global.regeneratorRuntime;
  2739. if (runtime) {
  2740. if (inModule) {
  2741. // If regeneratorRuntime is defined globally and we're in a module,
  2742. // make the exports object identical to regeneratorRuntime.
  2743. module.exports = runtime;
  2744. }
  2745. // Don't bother evaluating the rest of this file if the runtime was
  2746. // already defined globally.
  2747. return;
  2748. }
  2749. // Define the runtime globally (as expected by generated code) as either
  2750. // module.exports (if we're in a module) or a new, empty object.
  2751. runtime = global.regeneratorRuntime = inModule ? module.exports : {};
  2752. function wrap(innerFn, outerFn, self, tryLocsList) {
  2753. // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
  2754. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  2755. var generator = Object.create(protoGenerator.prototype);
  2756. var context = new Context(tryLocsList || []);
  2757. // The ._invoke method unifies the implementations of the .next,
  2758. // .throw, and .return methods.
  2759. generator._invoke = makeInvokeMethod(innerFn, self, context);
  2760. return generator;
  2761. }
  2762. runtime.wrap = wrap;
  2763. // Try/catch helper to minimize deoptimizations. Returns a completion
  2764. // record like context.tryEntries[i].completion. This interface could
  2765. // have been (and was previously) designed to take a closure to be
  2766. // invoked without arguments, but in all the cases we care about we
  2767. // already have an existing method we want to call, so there's no need
  2768. // to create a new function object. We can even get away with assuming
  2769. // the method takes exactly one argument, since that happens to be true
  2770. // in every case, so we don't have to touch the arguments object. The
  2771. // only additional allocation required is the completion record, which
  2772. // has a stable shape and so hopefully should be cheap to allocate.
  2773. function tryCatch(fn, obj, arg) {
  2774. try {
  2775. return { type: "normal", arg: fn.call(obj, arg) };
  2776. } catch (err) {
  2777. return { type: "throw", arg: err };
  2778. }
  2779. }
  2780. var GenStateSuspendedStart = "suspendedStart";
  2781. var GenStateSuspendedYield = "suspendedYield";
  2782. var GenStateExecuting = "executing";
  2783. var GenStateCompleted = "completed";
  2784. // Returning this object from the innerFn has the same effect as
  2785. // breaking out of the dispatch switch statement.
  2786. var ContinueSentinel = {};
  2787. // Dummy constructor functions that we use as the .constructor and
  2788. // .constructor.prototype properties for functions that return Generator
  2789. // objects. For full spec compliance, you may wish to configure your
  2790. // minifier not to mangle the names of these two functions.
  2791. function Generator() {}
  2792. function GeneratorFunction() {}
  2793. function GeneratorFunctionPrototype() {}
  2794. // This is a polyfill for %IteratorPrototype% for environments that
  2795. // don't natively support it.
  2796. var IteratorPrototype = {};
  2797. IteratorPrototype[iteratorSymbol] = function () {
  2798. return this;
  2799. };
  2800. var getProto = Object.getPrototypeOf;
  2801. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  2802. if (NativeIteratorPrototype &&
  2803. NativeIteratorPrototype !== Op &&
  2804. hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  2805. // This environment has a native %IteratorPrototype%; use it instead
  2806. // of the polyfill.
  2807. IteratorPrototype = NativeIteratorPrototype;
  2808. }
  2809. var Gp = GeneratorFunctionPrototype.prototype =
  2810. Generator.prototype = Object.create(IteratorPrototype);
  2811. GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  2812. GeneratorFunctionPrototype.constructor = GeneratorFunction;
  2813. GeneratorFunctionPrototype[toStringTagSymbol] =
  2814. GeneratorFunction.displayName = "GeneratorFunction";
  2815. // Helper for defining the .next, .throw, and .return methods of the
  2816. // Iterator interface in terms of a single ._invoke method.
  2817. function defineIteratorMethods(prototype) {
  2818. ["next", "throw", "return"].forEach(function(method) {
  2819. prototype[method] = function(arg) {
  2820. return this._invoke(method, arg);
  2821. };
  2822. });
  2823. }
  2824. runtime.isGeneratorFunction = function(genFun) {
  2825. var ctor = typeof genFun === "function" && genFun.constructor;
  2826. return ctor
  2827. ? ctor === GeneratorFunction ||
  2828. // For the native GeneratorFunction constructor, the best we can
  2829. // do is to check its .name property.
  2830. (ctor.displayName || ctor.name) === "GeneratorFunction"
  2831. : false;
  2832. };
  2833. runtime.mark = function(genFun) {
  2834. if (Object.setPrototypeOf) {
  2835. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  2836. } else {
  2837. genFun.__proto__ = GeneratorFunctionPrototype;
  2838. if (!(toStringTagSymbol in genFun)) {
  2839. genFun[toStringTagSymbol] = "GeneratorFunction";
  2840. }
  2841. }
  2842. genFun.prototype = Object.create(Gp);
  2843. return genFun;
  2844. };
  2845. // Within the body of any async function, `await x` is transformed to
  2846. // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  2847. // `hasOwn.call(value, "__await")` to determine if the yielded value is
  2848. // meant to be awaited.
  2849. runtime.awrap = function(arg) {
  2850. return { __await: arg };
  2851. };
  2852. function AsyncIterator(generator) {
  2853. function invoke(method, arg, resolve, reject) {
  2854. var record = tryCatch(generator[method], generator, arg);
  2855. if (record.type === "throw") {
  2856. reject(record.arg);
  2857. } else {
  2858. var result = record.arg;
  2859. var value = result.value;
  2860. if (value &&
  2861. typeof value === "object" &&
  2862. hasOwn.call(value, "__await")) {
  2863. return Promise.resolve(value.__await).then(function(value) {
  2864. invoke("next", value, resolve, reject);
  2865. }, function(err) {
  2866. invoke("throw", err, resolve, reject);
  2867. });
  2868. }
  2869. return Promise.resolve(value).then(function(unwrapped) {
  2870. // When a yielded Promise is resolved, its final value becomes
  2871. // the .value of the Promise<{value,done}> result for the
  2872. // current iteration.
  2873. result.value = unwrapped;
  2874. resolve(result);
  2875. }, function(error) {
  2876. // If a rejected Promise was yielded, throw the rejection back
  2877. // into the async generator function so it can be handled there.
  2878. return invoke("throw", error, resolve, reject);
  2879. });
  2880. }
  2881. }
  2882. var previousPromise;
  2883. function enqueue(method, arg) {
  2884. function callInvokeWithMethodAndArg() {
  2885. return new Promise(function(resolve, reject) {
  2886. invoke(method, arg, resolve, reject);
  2887. });
  2888. }
  2889. return previousPromise =
  2890. // If enqueue has been called before, then we want to wait until
  2891. // all previous Promises have been resolved before calling invoke,
  2892. // so that results are always delivered in the correct order. If
  2893. // enqueue has not been called before, then it is important to
  2894. // call invoke immediately, without waiting on a callback to fire,
  2895. // so that the async generator function has the opportunity to do
  2896. // any necessary setup in a predictable way. This predictability
  2897. // is why the Promise constructor synchronously invokes its
  2898. // executor callback, and why async functions synchronously
  2899. // execute code before the first await. Since we implement simple
  2900. // async functions in terms of async generators, it is especially
  2901. // important to get this right, even though it requires care.
  2902. previousPromise ? previousPromise.then(
  2903. callInvokeWithMethodAndArg,
  2904. // Avoid propagating failures to Promises returned by later
  2905. // invocations of the iterator.
  2906. callInvokeWithMethodAndArg
  2907. ) : callInvokeWithMethodAndArg();
  2908. }
  2909. // Define the unified helper method that is used to implement .next,
  2910. // .throw, and .return (see defineIteratorMethods).
  2911. this._invoke = enqueue;
  2912. }
  2913. defineIteratorMethods(AsyncIterator.prototype);
  2914. AsyncIterator.prototype[asyncIteratorSymbol] = function () {
  2915. return this;
  2916. };
  2917. runtime.AsyncIterator = AsyncIterator;
  2918. // Note that simple async functions are implemented on top of
  2919. // AsyncIterator objects; they just return a Promise for the value of
  2920. // the final result produced by the iterator.
  2921. runtime.async = function(innerFn, outerFn, self, tryLocsList) {
  2922. var iter = new AsyncIterator(
  2923. wrap(innerFn, outerFn, self, tryLocsList)
  2924. );
  2925. return runtime.isGeneratorFunction(outerFn)
  2926. ? iter // If outerFn is a generator, return the full iterator.
  2927. : iter.next().then(function(result) {
  2928. return result.done ? result.value : iter.next();
  2929. });
  2930. };
  2931. function makeInvokeMethod(innerFn, self, context) {
  2932. var state = GenStateSuspendedStart;
  2933. return function invoke(method, arg) {
  2934. if (state === GenStateExecuting) {
  2935. throw new Error("Generator is already running");
  2936. }
  2937. if (state === GenStateCompleted) {
  2938. if (method === "throw") {
  2939. throw arg;
  2940. }
  2941. // Be forgiving, per 25.3.3.3.3 of the spec:
  2942. // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
  2943. return doneResult();
  2944. }
  2945. context.method = method;
  2946. context.arg = arg;
  2947. while (true) {
  2948. var delegate = context.delegate;
  2949. if (delegate) {
  2950. var delegateResult = maybeInvokeDelegate(delegate, context);
  2951. if (delegateResult) {
  2952. if (delegateResult === ContinueSentinel) continue;
  2953. return delegateResult;
  2954. }
  2955. }
  2956. if (context.method === "next") {
  2957. // Setting context._sent for legacy support of Babel's
  2958. // function.sent implementation.
  2959. context.sent = context._sent = context.arg;
  2960. } else if (context.method === "throw") {
  2961. if (state === GenStateSuspendedStart) {
  2962. state = GenStateCompleted;
  2963. throw context.arg;
  2964. }
  2965. context.dispatchException(context.arg);
  2966. } else if (context.method === "return") {
  2967. context.abrupt("return", context.arg);
  2968. }
  2969. state = GenStateExecuting;
  2970. var record = tryCatch(innerFn, self, context);
  2971. if (record.type === "normal") {
  2972. // If an exception is thrown from innerFn, we leave state ===
  2973. // GenStateExecuting and loop back for another invocation.
  2974. state = context.done
  2975. ? GenStateCompleted
  2976. : GenStateSuspendedYield;
  2977. if (record.arg === ContinueSentinel) {
  2978. continue;
  2979. }
  2980. return {
  2981. value: record.arg,
  2982. done: context.done
  2983. };
  2984. } else if (record.type === "throw") {
  2985. state = GenStateCompleted;
  2986. // Dispatch the exception by looping back around to the
  2987. // context.dispatchException(context.arg) call above.
  2988. context.method = "throw";
  2989. context.arg = record.arg;
  2990. }
  2991. }
  2992. };
  2993. }
  2994. // Call delegate.iterator[context.method](context.arg) and handle the
  2995. // result, either by returning a { value, done } result from the
  2996. // delegate iterator, or by modifying context.method and context.arg,
  2997. // setting context.delegate to null, and returning the ContinueSentinel.
  2998. function maybeInvokeDelegate(delegate, context) {
  2999. var method = delegate.iterator[context.method];
  3000. if (method === undefined) {
  3001. // A .throw or .return when the delegate iterator has no .throw
  3002. // method always terminates the yield* loop.
  3003. context.delegate = null;
  3004. if (context.method === "throw") {
  3005. if (delegate.iterator.return) {
  3006. // If the delegate iterator has a return method, give it a
  3007. // chance to clean up.
  3008. context.method = "return";
  3009. context.arg = undefined;
  3010. maybeInvokeDelegate(delegate, context);
  3011. if (context.method === "throw") {
  3012. // If maybeInvokeDelegate(context) changed context.method from
  3013. // "return" to "throw", let that override the TypeError below.
  3014. return ContinueSentinel;
  3015. }
  3016. }
  3017. context.method = "throw";
  3018. context.arg = new TypeError(
  3019. "The iterator does not provide a 'throw' method");
  3020. }
  3021. return ContinueSentinel;
  3022. }
  3023. var record = tryCatch(method, delegate.iterator, context.arg);
  3024. if (record.type === "throw") {
  3025. context.method = "throw";
  3026. context.arg = record.arg;
  3027. context.delegate = null;
  3028. return ContinueSentinel;
  3029. }
  3030. var info = record.arg;
  3031. if (! info) {
  3032. context.method = "throw";
  3033. context.arg = new TypeError("iterator result is not an object");
  3034. context.delegate = null;
  3035. return ContinueSentinel;
  3036. }
  3037. if (info.done) {
  3038. // Assign the result of the finished delegate to the temporary
  3039. // variable specified by delegate.resultName (see delegateYield).
  3040. context[delegate.resultName] = info.value;
  3041. // Resume execution at the desired location (see delegateYield).
  3042. context.next = delegate.nextLoc;
  3043. // If context.method was "throw" but the delegate handled the
  3044. // exception, let the outer generator proceed normally. If
  3045. // context.method was "next", forget context.arg since it has been
  3046. // "consumed" by the delegate iterator. If context.method was
  3047. // "return", allow the original .return call to continue in the
  3048. // outer generator.
  3049. if (context.method !== "return") {
  3050. context.method = "next";
  3051. context.arg = undefined;
  3052. }
  3053. } else {
  3054. // Re-yield the result returned by the delegate method.
  3055. return info;
  3056. }
  3057. // The delegate iterator is finished, so forget it and continue with
  3058. // the outer generator.
  3059. context.delegate = null;
  3060. return ContinueSentinel;
  3061. }
  3062. // Define Generator.prototype.{next,throw,return} in terms of the
  3063. // unified ._invoke helper method.
  3064. defineIteratorMethods(Gp);
  3065. Gp[toStringTagSymbol] = "Generator";
  3066. // A Generator should always return itself as the iterator object when the
  3067. // @@iterator function is called on it. Some browsers' implementations of the
  3068. // iterator prototype chain incorrectly implement this, causing the Generator
  3069. // object to not be returned from this call. This ensures that doesn't happen.
  3070. // See https://github.com/facebook/regenerator/issues/274 for more details.
  3071. Gp[iteratorSymbol] = function() {
  3072. return this;
  3073. };
  3074. Gp.toString = function() {
  3075. return "[object Generator]";
  3076. };
  3077. function pushTryEntry(locs) {
  3078. var entry = { tryLoc: locs[0] };
  3079. if (1 in locs) {
  3080. entry.catchLoc = locs[1];
  3081. }
  3082. if (2 in locs) {
  3083. entry.finallyLoc = locs[2];
  3084. entry.afterLoc = locs[3];
  3085. }
  3086. this.tryEntries.push(entry);
  3087. }
  3088. function resetTryEntry(entry) {
  3089. var record = entry.completion || {};
  3090. record.type = "normal";
  3091. delete record.arg;
  3092. entry.completion = record;
  3093. }
  3094. function Context(tryLocsList) {
  3095. // The root entry object (effectively a try statement without a catch
  3096. // or a finally block) gives us a place to store values thrown from
  3097. // locations where there is no enclosing try statement.
  3098. this.tryEntries = [{ tryLoc: "root" }];
  3099. tryLocsList.forEach(pushTryEntry, this);
  3100. this.reset(true);
  3101. }
  3102. runtime.keys = function(object) {
  3103. var keys = [];
  3104. for (var key in object) {
  3105. keys.push(key);
  3106. }
  3107. keys.reverse();
  3108. // Rather than returning an object with a next method, we keep
  3109. // things simple and return the next function itself.
  3110. return function next() {
  3111. while (keys.length) {
  3112. var key = keys.pop();
  3113. if (key in object) {
  3114. next.value = key;
  3115. next.done = false;
  3116. return next;
  3117. }
  3118. }
  3119. // To avoid creating an additional object, we just hang the .value
  3120. // and .done properties off the next function object itself. This
  3121. // also ensures that the minifier will not anonymize the function.
  3122. next.done = true;
  3123. return next;
  3124. };
  3125. };
  3126. function values(iterable) {
  3127. if (iterable) {
  3128. var iteratorMethod = iterable[iteratorSymbol];
  3129. if (iteratorMethod) {
  3130. return iteratorMethod.call(iterable);
  3131. }
  3132. if (typeof iterable.next === "function") {
  3133. return iterable;
  3134. }
  3135. if (!isNaN(iterable.length)) {
  3136. var i = -1, next = function next() {
  3137. while (++i < iterable.length) {
  3138. if (hasOwn.call(iterable, i)) {
  3139. next.value = iterable[i];
  3140. next.done = false;
  3141. return next;
  3142. }
  3143. }
  3144. next.value = undefined;
  3145. next.done = true;
  3146. return next;
  3147. };
  3148. return next.next = next;
  3149. }
  3150. }
  3151. // Return an iterator with no values.
  3152. return { next: doneResult };
  3153. }
  3154. runtime.values = values;
  3155. function doneResult() {
  3156. return { value: undefined, done: true };
  3157. }
  3158. Context.prototype = {
  3159. constructor: Context,
  3160. reset: function(skipTempReset) {
  3161. this.prev = 0;
  3162. this.next = 0;
  3163. // Resetting context._sent for legacy support of Babel's
  3164. // function.sent implementation.
  3165. this.sent = this._sent = undefined;
  3166. this.done = false;
  3167. this.delegate = null;
  3168. this.method = "next";
  3169. this.arg = undefined;
  3170. this.tryEntries.forEach(resetTryEntry);
  3171. if (!skipTempReset) {
  3172. for (var name in this) {
  3173. // Not sure about the optimal order of these conditions:
  3174. if (name.charAt(0) === "t" &&
  3175. hasOwn.call(this, name) &&
  3176. !isNaN(+name.slice(1))) {
  3177. this[name] = undefined;
  3178. }
  3179. }
  3180. }
  3181. },
  3182. stop: function() {
  3183. this.done = true;
  3184. var rootEntry = this.tryEntries[0];
  3185. var rootRecord = rootEntry.completion;
  3186. if (rootRecord.type === "throw") {
  3187. throw rootRecord.arg;
  3188. }
  3189. return this.rval;
  3190. },
  3191. dispatchException: function(exception) {
  3192. if (this.done) {
  3193. throw exception;
  3194. }
  3195. var context = this;
  3196. function handle(loc, caught) {
  3197. record.type = "throw";
  3198. record.arg = exception;
  3199. context.next = loc;
  3200. if (caught) {
  3201. // If the dispatched exception was caught by a catch block,
  3202. // then let that catch block handle the exception normally.
  3203. context.method = "next";
  3204. context.arg = undefined;
  3205. }
  3206. return !! caught;
  3207. }
  3208. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  3209. var entry = this.tryEntries[i];
  3210. var record = entry.completion;
  3211. if (entry.tryLoc === "root") {
  3212. // Exception thrown outside of any try block that could handle
  3213. // it, so set the completion value of the entire function to
  3214. // throw the exception.
  3215. return handle("end");
  3216. }
  3217. if (entry.tryLoc <= this.prev) {
  3218. var hasCatch = hasOwn.call(entry, "catchLoc");
  3219. var hasFinally = hasOwn.call(entry, "finallyLoc");
  3220. if (hasCatch && hasFinally) {
  3221. if (this.prev < entry.catchLoc) {
  3222. return handle(entry.catchLoc, true);
  3223. } else if (this.prev < entry.finallyLoc) {
  3224. return handle(entry.finallyLoc);
  3225. }
  3226. } else if (hasCatch) {
  3227. if (this.prev < entry.catchLoc) {
  3228. return handle(entry.catchLoc, true);
  3229. }
  3230. } else if (hasFinally) {
  3231. if (this.prev < entry.finallyLoc) {
  3232. return handle(entry.finallyLoc);
  3233. }
  3234. } else {
  3235. throw new Error("try statement without catch or finally");
  3236. }
  3237. }
  3238. }
  3239. },
  3240. abrupt: function(type, arg) {
  3241. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  3242. var entry = this.tryEntries[i];
  3243. if (entry.tryLoc <= this.prev &&
  3244. hasOwn.call(entry, "finallyLoc") &&
  3245. this.prev < entry.finallyLoc) {
  3246. var finallyEntry = entry;
  3247. break;
  3248. }
  3249. }
  3250. if (finallyEntry &&
  3251. (type === "break" ||
  3252. type === "continue") &&
  3253. finallyEntry.tryLoc <= arg &&
  3254. arg <= finallyEntry.finallyLoc) {
  3255. // Ignore the finally entry if control is not jumping to a
  3256. // location outside the try/catch block.
  3257. finallyEntry = null;
  3258. }
  3259. var record = finallyEntry ? finallyEntry.completion : {};
  3260. record.type = type;
  3261. record.arg = arg;
  3262. if (finallyEntry) {
  3263. this.method = "next";
  3264. this.next = finallyEntry.finallyLoc;
  3265. return ContinueSentinel;
  3266. }
  3267. return this.complete(record);
  3268. },
  3269. complete: function(record, afterLoc) {
  3270. if (record.type === "throw") {
  3271. throw record.arg;
  3272. }
  3273. if (record.type === "break" ||
  3274. record.type === "continue") {
  3275. this.next = record.arg;
  3276. } else if (record.type === "return") {
  3277. this.rval = this.arg = record.arg;
  3278. this.method = "return";
  3279. this.next = "end";
  3280. } else if (record.type === "normal" && afterLoc) {
  3281. this.next = afterLoc;
  3282. }
  3283. return ContinueSentinel;
  3284. },
  3285. finish: function(finallyLoc) {
  3286. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  3287. var entry = this.tryEntries[i];
  3288. if (entry.finallyLoc === finallyLoc) {
  3289. this.complete(entry.completion, entry.afterLoc);
  3290. resetTryEntry(entry);
  3291. return ContinueSentinel;
  3292. }
  3293. }
  3294. },
  3295. "catch": function(tryLoc) {
  3296. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  3297. var entry = this.tryEntries[i];
  3298. if (entry.tryLoc === tryLoc) {
  3299. var record = entry.completion;
  3300. if (record.type === "throw") {
  3301. var thrown = record.arg;
  3302. resetTryEntry(entry);
  3303. }
  3304. return thrown;
  3305. }
  3306. }
  3307. // The context.catch method must only be called with a location
  3308. // argument that corresponds to a known catch block.
  3309. throw new Error("illegal catch attempt");
  3310. },
  3311. delegateYield: function(iterable, resultName, nextLoc) {
  3312. this.delegate = {
  3313. iterator: values(iterable),
  3314. resultName: resultName,
  3315. nextLoc: nextLoc
  3316. };
  3317. if (this.method === "next") {
  3318. // Deliberately forget the last sent value so that we don't
  3319. // accidentally pass it on to the delegate.
  3320. this.arg = undefined;
  3321. }
  3322. return ContinueSentinel;
  3323. }
  3324. };
  3325. })(
  3326. // In sloppy mode, unbound `this` refers to the global object, fallback to
  3327. // Function constructor if we're in global strict mode. That is sadly a form
  3328. // of indirect eval which violates Content Security Policy.
  3329. (function() {
  3330. return this || (typeof self === "object" && self);
  3331. })() || Function("return this")()
  3332. );
  3333. /***/ }),
  3334. /***/ 23:
  3335. /*!*****************************************************************************************************!*\
  3336. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/libs/function/timeFormat.js ***!
  3337. \*****************************************************************************************************/
  3338. /*! no static exports found */
  3339. /***/ (function(module, exports, __webpack_require__) {
  3340. "use strict";
  3341. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // padStart 的 polyfill,因为某些机型或情况,还无法支持es7的padStart,比如电脑版的微信小程序
  3342. // 所以这里做一个兼容polyfill的兼容处理
  3343. if (!String.prototype.padStart) {
  3344. // 为了方便表示这里 fillString 用了ES6 的默认参数,不影响理解
  3345. String.prototype.padStart = function (maxLength) {var fillString = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ' ';
  3346. if (Object.prototype.toString.call(fillString) !== "[object String]") throw new TypeError(
  3347. 'fillString must be String');
  3348. var str = this;
  3349. // 返回 String(str) 这里是为了使返回的值是字符串字面量,在控制台中更符合直觉
  3350. if (str.length >= maxLength) return String(str);
  3351. var fillLength = maxLength - str.length,
  3352. times = Math.ceil(fillLength / fillString.length);
  3353. while (times >>= 1) {
  3354. fillString += fillString;
  3355. if (times === 1) {
  3356. fillString += fillString;
  3357. }
  3358. }
  3359. return fillString.slice(0, fillLength) + str;
  3360. };
  3361. }
  3362. // 其他更多是格式化有如下:
  3363. // yyyy:mm:dd|yyyy:mm|yyyy年mm月dd日|yyyy年mm月dd日 hh时MM分等,可自定义组合
  3364. function timeFormat() {var dateTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;var fmt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  3365. // 如果为null,则格式化当前时间
  3366. if (!dateTime) dateTime = Number(new Date());
  3367. // 如果dateTime长度为10或者13,则为秒和毫秒的时间戳,如果超过13位,则为其他的时间格式
  3368. if (dateTime.toString().length == 10) dateTime *= 1000;
  3369. var date = new Date(dateTime);
  3370. var ret;
  3371. var opt = {
  3372. "y+": date.getFullYear().toString(), // 年
  3373. "m+": (date.getMonth() + 1).toString(), // 月
  3374. "d+": date.getDate().toString(), // 日
  3375. "h+": date.getHours().toString(), // 时
  3376. "M+": date.getMinutes().toString(), // 分
  3377. "s+": date.getSeconds().toString() // 秒
  3378. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  3379. };
  3380. for (var k in opt) {
  3381. ret = new RegExp("(" + k + ")").exec(fmt);
  3382. if (ret) {
  3383. fmt = fmt.replace(ret[1], ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, "0"));
  3384. };
  3385. };
  3386. return fmt;
  3387. }var _default =
  3388. timeFormat;exports.default = _default;
  3389. /***/ }),
  3390. /***/ 24:
  3391. /*!***************************************************************************************************!*\
  3392. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/libs/function/timeFrom.js ***!
  3393. \***************************************************************************************************/
  3394. /*! no static exports found */
  3395. /***/ (function(module, exports, __webpack_require__) {
  3396. "use strict";
  3397. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _timeFormat = _interopRequireDefault(__webpack_require__(/*! ../../libs/function/timeFormat.js */ 23));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  3398. /**
  3399. * 时间戳转为多久之前
  3400. * @param String timestamp 时间戳
  3401. * @param String | Boolean format 如果为时间格式字符串,超出一定时间范围,返回固定的时间格式;
  3402. * 如果为布尔值false,无论什么时间,都返回多久以前的格式
  3403. */
  3404. function timeFrom() {var dateTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  3405. // 如果为null,则格式化当前时间
  3406. if (!dateTime) dateTime = Number(new Date());
  3407. // 如果dateTime长度为10或者13,则为秒和毫秒的时间戳,如果超过13位,则为其他的时间格式
  3408. if (dateTime.toString().length == 10) dateTime *= 1000;
  3409. var timestamp = +new Date(Number(dateTime));
  3410. var timer = (Number(new Date()) - timestamp) / 1000;
  3411. // 如果小于5分钟,则返回"刚刚",其他以此类推
  3412. var tips = '';
  3413. switch (true) {
  3414. case timer < 300:
  3415. tips = '刚刚';
  3416. break;
  3417. case timer >= 300 && timer < 3600:
  3418. tips = parseInt(timer / 60) + '分钟前';
  3419. break;
  3420. case timer >= 3600 && timer < 86400:
  3421. tips = parseInt(timer / 3600) + '小时前';
  3422. break;
  3423. case timer >= 86400 && timer < 2592000:
  3424. tips = parseInt(timer / 86400) + '天前';
  3425. break;
  3426. default:
  3427. // 如果format为false,则无论什么时间戳,都显示xx之前
  3428. if (format === false) {
  3429. if (timer >= 2592000 && timer < 365 * 86400) {
  3430. tips = parseInt(timer / (86400 * 30)) + '个月前';
  3431. } else {
  3432. tips = parseInt(timer / (86400 * 365)) + '年前';
  3433. }
  3434. } else {
  3435. tips = (0, _timeFormat.default)(timestamp, format);
  3436. }}
  3437. return tips;
  3438. }var _default =
  3439. timeFrom;exports.default = _default;
  3440. /***/ }),
  3441. /***/ 25:
  3442. /*!********************************************************************************************************!*\
  3443. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/libs/function/colorGradient.js ***!
  3444. \********************************************************************************************************/
  3445. /*! no static exports found */
  3446. /***/ (function(module, exports, __webpack_require__) {
  3447. "use strict";
  3448. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; /**
  3449. * 求两个颜色之间的渐变值
  3450. * @param {string} startColor 开始的颜色
  3451. * @param {string} endColor 结束的颜色
  3452. * @param {number} step 颜色等分的份额
  3453. * */
  3454. function colorGradient() {var startColor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'rgb(0, 0, 0)';var endColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'rgb(255, 255, 255)';var step = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
  3455. var startRGB = hexToRgb(startColor, false); //转换为rgb数组模式
  3456. var startR = startRGB[0];
  3457. var startG = startRGB[1];
  3458. var startB = startRGB[2];
  3459. var endRGB = hexToRgb(endColor, false);
  3460. var endR = endRGB[0];
  3461. var endG = endRGB[1];
  3462. var endB = endRGB[2];
  3463. var sR = (endR - startR) / step; //总差值
  3464. var sG = (endG - startG) / step;
  3465. var sB = (endB - startB) / step;
  3466. var colorArr = [];
  3467. for (var i = 0; i < step; i++) {
  3468. //计算每一步的hex值
  3469. var hex = rgbToHex('rgb(' + Math.round(sR * i + startR) + ',' + Math.round(sG * i + startG) + ',' + Math.round(sB *
  3470. i + startB) + ')');
  3471. colorArr.push(hex);
  3472. }
  3473. return colorArr;
  3474. }
  3475. // 将hex表示方式转换为rgb表示方式(这里返回rgb数组模式)
  3476. function hexToRgb(sColor) {var str = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  3477. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  3478. sColor = sColor.toLowerCase();
  3479. if (sColor && reg.test(sColor)) {
  3480. if (sColor.length === 4) {
  3481. var sColorNew = "#";
  3482. for (var i = 1; i < 4; i += 1) {
  3483. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  3484. }
  3485. sColor = sColorNew;
  3486. }
  3487. //处理六位的颜色值
  3488. var sColorChange = [];
  3489. for (var _i = 1; _i < 7; _i += 2) {
  3490. sColorChange.push(parseInt("0x" + sColor.slice(_i, _i + 2)));
  3491. }
  3492. if (!str) {
  3493. return sColorChange;
  3494. } else {
  3495. return "rgb(".concat(sColorChange[0], ",").concat(sColorChange[1], ",").concat(sColorChange[2], ")");
  3496. }
  3497. } else if (/^(rgb|RGB)/.test(sColor)) {
  3498. var arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  3499. return arr.map(function (val) {return Number(val);});
  3500. } else {
  3501. return sColor;
  3502. }
  3503. };
  3504. // 将rgb表示方式转换为hex表示方式
  3505. function rgbToHex(rgb) {
  3506. var _this = rgb;
  3507. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  3508. if (/^(rgb|RGB)/.test(_this)) {
  3509. var aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  3510. var strHex = "#";
  3511. for (var i = 0; i < aColor.length; i++) {
  3512. var hex = Number(aColor[i]).toString(16);
  3513. hex = String(hex).length == 1 ? 0 + '' + hex : hex; // 保证每个rgb的值为2位
  3514. if (hex === "0") {
  3515. hex += hex;
  3516. }
  3517. strHex += hex;
  3518. }
  3519. if (strHex.length !== 7) {
  3520. strHex = _this;
  3521. }
  3522. return strHex;
  3523. } else if (reg.test(_this)) {
  3524. var aNum = _this.replace(/#/, "").split("");
  3525. if (aNum.length === 6) {
  3526. return _this;
  3527. } else if (aNum.length === 3) {
  3528. var numHex = "#";
  3529. for (var _i2 = 0; _i2 < aNum.length; _i2 += 1) {
  3530. numHex += aNum[_i2] + aNum[_i2];
  3531. }
  3532. return numHex;
  3533. }
  3534. } else {
  3535. return _this;
  3536. }
  3537. }
  3538. /**
  3539. * JS颜色十六进制转换为rgb或rgba,返回的格式为 rgba(255,255,255,0.5)字符串
  3540. * sHex为传入的十六进制的色值
  3541. * alpha为rgba的透明度
  3542. */
  3543. function colorToRgba(color) {var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.3;
  3544. color = rgbToHex(color);
  3545. // 十六进制颜色值的正则表达式
  3546. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  3547. /* 16进制颜色转为RGB格式 */
  3548. var sColor = color.toLowerCase();
  3549. if (sColor && reg.test(sColor)) {
  3550. if (sColor.length === 4) {
  3551. var sColorNew = '#';
  3552. for (var i = 1; i < 4; i += 1) {
  3553. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  3554. }
  3555. sColor = sColorNew;
  3556. }
  3557. // 处理六位的颜色值
  3558. var sColorChange = [];
  3559. for (var _i3 = 1; _i3 < 7; _i3 += 2) {
  3560. sColorChange.push(parseInt('0x' + sColor.slice(_i3, _i3 + 2)));
  3561. }
  3562. // return sColorChange.join(',')
  3563. return 'rgba(' + sColorChange.join(',') + ',' + alpha + ')';
  3564. } else
  3565. {
  3566. return sColor;
  3567. }
  3568. }var _default =
  3569. {
  3570. colorGradient: colorGradient,
  3571. hexToRgb: hexToRgb,
  3572. rgbToHex: rgbToHex,
  3573. colorToRgba: colorToRgba };exports.default = _default;
  3574. /***/ }),
  3575. /***/ 26:
  3576. /*!***********************************************************************************************!*\
  3577. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/libs/function/guid.js ***!
  3578. \***********************************************************************************************/
  3579. /*! no static exports found */
  3580. /***/ (function(module, exports, __webpack_require__) {
  3581. "use strict";
  3582. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; /**
  3583. * 本算法来源于简书开源代码,详见:https://www.jianshu.com/p/fdbf293d0a85
  3584. * 全局唯一标识符(uuid,Globally Unique Identifier),也称作 uuid(Universally Unique IDentifier)
  3585. * 一般用于多个组件之间,给它一个唯一的标识符,或者v-for循环的时候,如果使用数组的index可能会导致更新列表出现问题
  3586. * 最可能的情况是左滑删除item或者对某条信息流"不喜欢"并去掉它的时候,会导致组件内的数据可能出现错乱
  3587. * v-for的时候,推荐使用后端返回的id而不是循环的index
  3588. * @param {Number} len uuid的长度
  3589. * @param {Boolean} firstU 将返回的首字母置为"u"
  3590. * @param {Nubmer} radix 生成uuid的基数(意味着返回的字符串都是这个基数),2-二进制,8-八进制,10-十进制,16-十六进制
  3591. */
  3592. function guid() {var len = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 32;var firstU = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;var radix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  3593. var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
  3594. var uuid = [];
  3595. radix = radix || chars.length;
  3596. if (len) {
  3597. // 如果指定uuid长度,只是取随机的字符,0|x为位运算,能去掉x的小数位,返回整数位
  3598. for (var i = 0; i < len; i++) {uuid[i] = chars[0 | Math.random() * radix];}
  3599. } else {
  3600. var r;
  3601. // rfc4122标准要求返回的uuid中,某些位为固定的字符
  3602. uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
  3603. uuid[14] = '4';
  3604. for (var _i = 0; _i < 36; _i++) {
  3605. if (!uuid[_i]) {
  3606. r = 0 | Math.random() * 16;
  3607. uuid[_i] = chars[_i == 19 ? r & 0x3 | 0x8 : r];
  3608. }
  3609. }
  3610. }
  3611. // 移除第一个字符,并用u替代,因为第一个字符为数值时,该guuid不能用作id或者class
  3612. if (firstU) {
  3613. uuid.shift();
  3614. return 'u' + uuid.join('');
  3615. } else {
  3616. return uuid.join('');
  3617. }
  3618. }var _default =
  3619. guid;exports.default = _default;
  3620. /***/ }),
  3621. /***/ 27:
  3622. /*!************************************************************************************************!*\
  3623. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/libs/function/color.js ***!
  3624. \************************************************************************************************/
  3625. /*! no static exports found */
  3626. /***/ (function(module, exports, __webpack_require__) {
  3627. "use strict";
  3628. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // 为了让用户能够自定义主题,会逐步弃用此文件,各颜色通过css提供
  3629. // 为了给某些特殊场景使用和向后兼容,无需删除此文件(2020-06-20)
  3630. var color = {
  3631. primary: "#2979ff",
  3632. primaryDark: "#2b85e4",
  3633. primaryDisabled: "#a0cfff",
  3634. primaryLight: "#ecf5ff",
  3635. bgColor: "#f3f4f6",
  3636. info: "#909399",
  3637. infoDark: "#82848a",
  3638. infoDisabled: "#c8c9cc",
  3639. infoLight: "#f4f4f5",
  3640. warning: "#ff9900",
  3641. warningDark: "#f29100",
  3642. warningDisabled: "#fcbd71",
  3643. warningLight: "#fdf6ec",
  3644. error: "#fa3534",
  3645. errorDark: "#dd6161",
  3646. errorDisabled: "#fab6b6",
  3647. errorLight: "#fef0f0",
  3648. success: "#19be6b",
  3649. successDark: "#18b566",
  3650. successDisabled: "#71d5a1",
  3651. successLight: "#dbf1e1",
  3652. mainColor: "#303133",
  3653. contentColor: "#606266",
  3654. tipsColor: "#909399",
  3655. lightColor: "#c0c4cc",
  3656. borderColor: "#e4e7ed" };var _default =
  3657. color;exports.default = _default;
  3658. /***/ }),
  3659. /***/ 272:
  3660. /*!***********************************************************************************************!*\
  3661. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/libs/util/province.js ***!
  3662. \***********************************************************************************************/
  3663. /*! no static exports found */
  3664. /***/ (function(module, exports, __webpack_require__) {
  3665. "use strict";
  3666. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var provinceData = [{ "label": "北京市", "value": "11" }, { "label": "天津市", "value": "12" }, { "label": "河北省", "value": "13" }, { "label": "山西省", "value": "14" }, { "label": "内蒙古自治区", "value": "15" }, { "label": "辽宁省", "value": "21" }, { "label": "吉林省", "value": "22" }, { "label": "黑龙江省", "value": "23" }, { "label": "上海市", "value": "31" }, { "label": "江苏省", "value": "32" }, { "label": "浙江省", "value": "33" }, { "label": "安徽省", "value": "34" }, { "label": "福建省", "value": "35" }, { "label": "江西省", "value": "36" }, { "label": "山东省", "value": "37" }, { "label": "河南省", "value": "41" }, { "label": "湖北省", "value": "42" }, { "label": "湖南省", "value": "43" }, { "label": "广东省", "value": "44" }, { "label": "广西壮族自治区", "value": "45" }, { "label": "海南省", "value": "46" }, { "label": "重庆市", "value": "50" }, { "label": "四川省", "value": "51" }, { "label": "贵州省", "value": "52" }, { "label": "云南省", "value": "53" }, { "label": "西藏自治区", "value": "54" }, { "label": "陕西省", "value": "61" }, { "label": "甘肃省", "value": "62" }, { "label": "青海省", "value": "63" }, { "label": "宁夏回族自治区", "value": "64" }, { "label": "新疆维吾尔自治区", "value": "65" }, { "label": "台湾", "value": "66" }, { "label": "香港", "value": "67" }, { "label": "澳门", "value": "68" }];var _default = provinceData;exports.default = _default;
  3667. /***/ }),
  3668. /***/ 273:
  3669. /*!*******************************************************************************************!*\
  3670. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/libs/util/city.js ***!
  3671. \*******************************************************************************************/
  3672. /*! no static exports found */
  3673. /***/ (function(module, exports, __webpack_require__) {
  3674. "use strict";
  3675. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var cityData = [[{ "label": "市辖区", "value": "1101" }], [{ "label": "市辖区", "value": "1201" }], [{ "label": "石家庄市", "value": "1301" }, { "label": "唐山市", "value": "1302" }, { "label": "秦皇岛市", "value": "1303" }, { "label": "邯郸市", "value": "1304" }, { "label": "邢台市", "value": "1305" }, { "label": "保定市", "value": "1306" }, { "label": "张家口市", "value": "1307" }, { "label": "承德市", "value": "1308" }, { "label": "沧州市", "value": "1309" }, { "label": "廊坊市", "value": "1310" }, { "label": "衡水市", "value": "1311" }], [{ "label": "太原市", "value": "1401" }, { "label": "大同市", "value": "1402" }, { "label": "阳泉市", "value": "1403" }, { "label": "长治市", "value": "1404" }, { "label": "晋城市", "value": "1405" }, { "label": "朔州市", "value": "1406" }, { "label": "晋中市", "value": "1407" }, { "label": "运城市", "value": "1408" }, { "label": "忻州市", "value": "1409" }, { "label": "临汾市", "value": "1410" }, { "label": "吕梁市", "value": "1411" }], [{ "label": "呼和浩特市", "value": "1501" }, { "label": "包头市", "value": "1502" }, { "label": "乌海市", "value": "1503" }, { "label": "赤峰市", "value": "1504" }, { "label": "通辽市", "value": "1505" }, { "label": "鄂尔多斯市", "value": "1506" }, { "label": "呼伦贝尔市", "value": "1507" }, { "label": "巴彦淖尔市", "value": "1508" }, { "label": "乌兰察布市", "value": "1509" }, { "label": "兴安盟", "value": "1522" }, { "label": "锡林郭勒盟", "value": "1525" }, { "label": "阿拉善盟", "value": "1529" }], [{ "label": "沈阳市", "value": "2101" }, { "label": "大连市", "value": "2102" }, { "label": "鞍山市", "value": "2103" }, { "label": "抚顺市", "value": "2104" }, { "label": "本溪市", "value": "2105" }, { "label": "丹东市", "value": "2106" }, { "label": "锦州市", "value": "2107" }, { "label": "营口市", "value": "2108" }, { "label": "阜新市", "value": "2109" }, { "label": "辽阳市", "value": "2110" }, { "label": "盘锦市", "value": "2111" }, { "label": "铁岭市", "value": "2112" }, { "label": "朝阳市", "value": "2113" }, { "label": "葫芦岛市", "value": "2114" }], [{ "label": "长春市", "value": "2201" }, { "label": "吉林市", "value": "2202" }, { "label": "四平市", "value": "2203" }, { "label": "辽源市", "value": "2204" }, { "label": "通化市", "value": "2205" }, { "label": "白山市", "value": "2206" }, { "label": "松原市", "value": "2207" }, { "label": "白城市", "value": "2208" }, { "label": "延边朝鲜族自治州", "value": "2224" }], [{ "label": "哈尔滨市", "value": "2301" }, { "label": "齐齐哈尔市", "value": "2302" }, { "label": "鸡西市", "value": "2303" }, { "label": "鹤岗市", "value": "2304" }, { "label": "双鸭山市", "value": "2305" }, { "label": "大庆市", "value": "2306" }, { "label": "伊春市", "value": "2307" }, { "label": "佳木斯市", "value": "2308" }, { "label": "七台河市", "value": "2309" }, { "label": "牡丹江市", "value": "2310" }, { "label": "黑河市", "value": "2311" }, { "label": "绥化市", "value": "2312" }, { "label": "大兴安岭地区", "value": "2327" }], [{ "label": "市辖区", "value": "3101" }], [{ "label": "南京市", "value": "3201" }, { "label": "无锡市", "value": "3202" }, { "label": "徐州市", "value": "3203" }, { "label": "常州市", "value": "3204" }, { "label": "苏州市", "value": "3205" }, { "label": "南通市", "value": "3206" }, { "label": "连云港市", "value": "3207" }, { "label": "淮安市", "value": "3208" }, { "label": "盐城市", "value": "3209" }, { "label": "扬州市", "value": "3210" }, { "label": "镇江市", "value": "3211" }, { "label": "泰州市", "value": "3212" }, { "label": "宿迁市", "value": "3213" }], [{ "label": "杭州市", "value": "3301" }, { "label": "宁波市", "value": "3302" }, { "label": "温州市", "value": "3303" }, { "label": "嘉兴市", "value": "3304" }, { "label": "湖州市", "value": "3305" }, { "label": "绍兴市", "value": "3306" }, { "label": "金华市", "value": "3307" }, { "label": "衢州市", "value": "3308" }, { "label": "舟山市", "value": "3309" }, { "label": "台州市", "value": "3310" }, { "label": "丽水市", "value": "3311" }], [{ "label": "合肥市", "value": "3401" }, { "label": "芜湖市", "value": "3402" }, { "label": "蚌埠市", "value": "3403" }, { "label": "淮南市", "value": "3404" }, { "label": "马鞍山市", "value": "3405" }, { "label": "淮北市", "value": "3406" }, { "label": "铜陵市", "value": "3407" }, { "label": "安庆市", "value": "3408" }, { "label": "黄山市", "value": "3410" }, { "label": "滁州市", "value": "3411" }, { "label": "阜阳市", "value": "3412" }, { "label": "宿州市", "value": "3413" }, { "label": "六安市", "value": "3415" }, { "label": "亳州市", "value": "3416" }, { "label": "池州市", "value": "3417" }, { "label": "宣城市", "value": "3418" }], [{ "label": "福州市", "value": "3501" }, { "label": "厦门市", "value": "3502" }, { "label": "莆田市", "value": "3503" }, { "label": "三明市", "value": "3504" }, { "label": "泉州市", "value": "3505" }, { "label": "漳州市", "value": "3506" }, { "label": "南平市", "value": "3507" }, { "label": "龙岩市", "value": "3508" }, { "label": "宁德市", "value": "3509" }], [{ "label": "南昌市", "value": "3601" }, { "label": "景德镇市", "value": "3602" }, { "label": "萍乡市", "value": "3603" }, { "label": "九江市", "value": "3604" }, { "label": "新余市", "value": "3605" }, { "label": "鹰潭市", "value": "3606" }, { "label": "赣州市", "value": "3607" }, { "label": "吉安市", "value": "3608" }, { "label": "宜春市", "value": "3609" }, { "label": "抚州市", "value": "3610" }, { "label": "上饶市", "value": "3611" }], [{ "label": "济南市", "value": "3701" }, { "label": "青岛市", "value": "3702" }, { "label": "淄博市", "value": "3703" }, { "label": "枣庄市", "value": "3704" }, { "label": "东营市", "value": "3705" }, { "label": "烟台市", "value": "3706" }, { "label": "潍坊市", "value": "3707" }, { "label": "济宁市", "value": "3708" }, { "label": "泰安市", "value": "3709" }, { "label": "威海市", "value": "3710" }, { "label": "日照市", "value": "3711" }, { "label": "莱芜市", "value": "3712" }, { "label": "临沂市", "value": "3713" }, { "label": "德州市", "value": "3714" }, { "label": "聊城市", "value": "3715" }, { "label": "滨州市", "value": "3716" }, { "label": "菏泽市", "value": "3717" }], [{ "label": "郑州市", "value": "4101" }, { "label": "开封市", "value": "4102" }, { "label": "洛阳市", "value": "4103" }, { "label": "平顶山市", "value": "4104" }, { "label": "安阳市", "value": "4105" }, { "label": "鹤壁市", "value": "4106" }, { "label": "新乡市", "value": "4107" }, { "label": "焦作市", "value": "4108" }, { "label": "濮阳市", "value": "4109" }, { "label": "许昌市", "value": "4110" }, { "label": "漯河市", "value": "4111" }, { "label": "三门峡市", "value": "4112" }, { "label": "南阳市", "value": "4113" }, { "label": "商丘市", "value": "4114" }, { "label": "信阳市", "value": "4115" }, { "label": "周口市", "value": "4116" }, { "label": "驻马店市", "value": "4117" }, { "label": "省直辖县级行政区划", "value": "4190" }], [{ "label": "武汉市", "value": "4201" }, { "label": "黄石市", "value": "4202" }, { "label": "十堰市", "value": "4203" }, { "label": "宜昌市", "value": "4205" }, { "label": "襄阳市", "value": "4206" }, { "label": "鄂州市", "value": "4207" }, { "label": "荆门市", "value": "4208" }, { "label": "孝感市", "value": "4209" }, { "label": "荆州市", "value": "4210" }, { "label": "黄冈市", "value": "4211" }, { "label": "咸宁市", "value": "4212" }, { "label": "随州市", "value": "4213" }, { "label": "恩施土家族苗族自治州", "value": "4228" }, { "label": "省直辖县级行政区划", "value": "4290" }], [{ "label": "长沙市", "value": "4301" }, { "label": "株洲市", "value": "4302" }, { "label": "湘潭市", "value": "4303" }, { "label": "衡阳市", "value": "4304" }, { "label": "邵阳市", "value": "4305" }, { "label": "岳阳市", "value": "4306" }, { "label": "常德市", "value": "4307" }, { "label": "张家界市", "value": "4308" }, { "label": "益阳市", "value": "4309" }, { "label": "郴州市", "value": "4310" }, { "label": "永州市", "value": "4311" }, { "label": "怀化市", "value": "4312" }, { "label": "娄底市", "value": "4313" }, { "label": "湘西土家族苗族自治州", "value": "4331" }], [{ "label": "广州市", "value": "4401" }, { "label": "韶关市", "value": "4402" }, { "label": "深圳市", "value": "4403" }, { "label": "珠海市", "value": "4404" }, { "label": "汕头市", "value": "4405" }, { "label": "佛山市", "value": "4406" }, { "label": "江门市", "value": "4407" }, { "label": "湛江市", "value": "4408" }, { "label": "茂名市", "value": "4409" }, { "label": "肇庆市", "value": "4412" }, { "label": "惠州市", "value": "4413" }, { "label": "梅州市", "value": "4414" }, { "label": "汕尾市", "value": "4415" }, { "label": "河源市", "value": "4416" }, { "label": "阳江市", "value": "4417" }, { "label": "清远市", "value": "4418" }, { "label": "东莞市", "value": "4419" }, { "label": "中山市", "value": "4420" }, { "label": "潮州市", "value": "4451" }, { "label": "揭阳市", "value": "4452" }, { "label": "云浮市", "value": "4453" }], [{ "label": "南宁市", "value": "4501" }, { "label": "柳州市", "value": "4502" }, { "label": "桂林市", "value": "4503" }, { "label": "梧州市", "value": "4504" }, { "label": "北海市", "value": "4505" }, { "label": "防城港市", "value": "4506" }, { "label": "钦州市", "value": "4507" }, { "label": "贵港市", "value": "4508" }, { "label": "玉林市", "value": "4509" }, { "label": "百色市", "value": "4510" }, { "label": "贺州市", "value": "4511" }, { "label": "河池市", "value": "4512" }, { "label": "来宾市", "value": "4513" }, { "label": "崇左市", "value": "4514" }], [{ "label": "海口市", "value": "4601" }, { "label": "三亚市", "value": "4602" }, { "label": "三沙市", "value": "4603" }, { "label": "儋州市", "value": "4604" }, { "label": "省直辖县级行政区划", "value": "4690" }], [{ "label": "市辖区", "value": "5001" }, { "label": "县", "value": "5002" }], [{ "label": "成都市", "value": "5101" }, { "label": "自贡市", "value": "5103" }, { "label": "攀枝花市", "value": "5104" }, { "label": "泸州市", "value": "5105" }, { "label": "德阳市", "value": "5106" }, { "label": "绵阳市", "value": "5107" }, { "label": "广元市", "value": "5108" }, { "label": "遂宁市", "value": "5109" }, { "label": "内江市", "value": "5110" }, { "label": "乐山市", "value": "5111" }, { "label": "南充市", "value": "5113" }, { "label": "眉山市", "value": "5114" }, { "label": "宜宾市", "value": "5115" }, { "label": "广安市", "value": "5116" }, { "label": "达州市", "value": "5117" }, { "label": "雅安市", "value": "5118" }, { "label": "巴中市", "value": "5119" }, { "label": "资阳市", "value": "5120" }, { "label": "阿坝藏族羌族自治州", "value": "5132" }, { "label": "甘孜藏族自治州", "value": "5133" }, { "label": "凉山彝族自治州", "value": "5134" }], [{ "label": "贵阳市", "value": "5201" }, { "label": "六盘水市", "value": "5202" }, { "label": "遵义市", "value": "5203" }, { "label": "安顺市", "value": "5204" }, { "label": "毕节市", "value": "5205" }, { "label": "铜仁市", "value": "5206" }, { "label": "黔西南布依族苗族自治州", "value": "5223" }, { "label": "黔东南苗族侗族自治州", "value": "5226" }, { "label": "黔南布依族苗族自治州", "value": "5227" }], [{ "label": "昆明市", "value": "5301" }, { "label": "曲靖市", "value": "5303" }, { "label": "玉溪市", "value": "5304" }, { "label": "保山市", "value": "5305" }, { "label": "昭通市", "value": "5306" }, { "label": "丽江市", "value": "5307" }, { "label": "普洱市", "value": "5308" }, { "label": "临沧市", "value": "5309" }, { "label": "楚雄彝族自治州", "value": "5323" }, { "label": "红河哈尼族彝族自治州", "value": "5325" }, { "label": "文山壮族苗族自治州", "value": "5326" }, { "label": "西双版纳傣族自治州", "value": "5328" }, { "label": "大理白族自治州", "value": "5329" }, { "label": "德宏傣族景颇族自治州", "value": "5331" }, { "label": "怒江傈僳族自治州", "value": "5333" }, { "label": "迪庆藏族自治州", "value": "5334" }], [{ "label": "拉萨市", "value": "5401" }, { "label": "日喀则市", "value": "5402" }, { "label": "昌都市", "value": "5403" }, { "label": "林芝市", "value": "5404" }, { "label": "山南市", "value": "5405" }, { "label": "那曲地区", "value": "5424" }, { "label": "阿里地区", "value": "5425" }], [{ "label": "西安市", "value": "6101" }, { "label": "铜川市", "value": "6102" }, { "label": "宝鸡市", "value": "6103" }, { "label": "咸阳市", "value": "6104" }, { "label": "渭南市", "value": "6105" }, { "label": "延安市", "value": "6106" }, { "label": "汉中市", "value": "6107" }, { "label": "榆林市", "value": "6108" }, { "label": "安康市", "value": "6109" }, { "label": "商洛市", "value": "6110" }], [{ "label": "兰州市", "value": "6201" }, { "label": "嘉峪关市", "value": "6202" }, { "label": "金昌市", "value": "6203" }, { "label": "白银市", "value": "6204" }, { "label": "天水市", "value": "6205" }, { "label": "武威市", "value": "6206" }, { "label": "张掖市", "value": "6207" }, { "label": "平凉市", "value": "6208" }, { "label": "酒泉市", "value": "6209" }, { "label": "庆阳市", "value": "6210" }, { "label": "定西市", "value": "6211" }, { "label": "陇南市", "value": "6212" }, { "label": "临夏回族自治州", "value": "6229" }, { "label": "甘南藏族自治州", "value": "6230" }], [{ "label": "西宁市", "value": "6301" }, { "label": "海东市", "value": "6302" }, { "label": "海北藏族自治州", "value": "6322" }, { "label": "黄南藏族自治州", "value": "6323" }, { "label": "海南藏族自治州", "value": "6325" }, { "label": "果洛藏族自治州", "value": "6326" }, { "label": "玉树藏族自治州", "value": "6327" }, { "label": "海西蒙古族藏族自治州", "value": "6328" }], [{ "label": "银川市", "value": "6401" }, { "label": "石嘴山市", "value": "6402" }, { "label": "吴忠市", "value": "6403" }, { "label": "固原市", "value": "6404" }, { "label": "中卫市", "value": "6405" }], [{ "label": "乌鲁木齐市", "value": "6501" }, { "label": "克拉玛依市", "value": "6502" }, { "label": "吐鲁番市", "value": "6504" }, { "label": "哈密市", "value": "6505" }, { "label": "昌吉回族自治州", "value": "6523" }, { "label": "博尔塔拉蒙古自治州", "value": "6527" }, { "label": "巴音郭楞蒙古自治州", "value": "6528" }, { "label": "阿克苏地区", "value": "6529" }, { "label": "克孜勒苏柯尔克孜自治州", "value": "6530" }, { "label": "喀什地区", "value": "6531" }, { "label": "和田地区", "value": "6532" }, { "label": "伊犁哈萨克自治州", "value": "6540" }, { "label": "塔城地区", "value": "6542" }, { "label": "阿勒泰地区", "value": "6543" }, { "label": "自治区直辖县级行政区划", "value": "6590" }], [{ "label": "台北", "value": "6601" }, { "label": "高雄", "value": "6602" }, { "label": "基隆", "value": "6603" }, { "label": "台中", "value": "6604" }, { "label": "台南", "value": "6605" }, { "label": "新竹", "value": "6606" }, { "label": "嘉义", "value": "6607" }, { "label": "宜兰", "value": "6608" }, { "label": "桃园", "value": "6609" }, { "label": "苗栗", "value": "6610" }, { "label": "彰化", "value": "6611" }, { "label": "南投", "value": "6612" }, { "label": "云林", "value": "6613" }, { "label": "屏东", "value": "6614" }, { "label": "台东", "value": "6615" }, { "label": "花莲", "value": "6616" }, { "label": "澎湖", "value": "6617" }], [{ "label": "香港岛", "value": "6701" }, { "label": "九龙", "value": "6702" }, { "label": "新界", "value": "6703" }], [{ "label": "澳门半岛", "value": "6801" }, { "label": "氹仔岛", "value": "6802" }, { "label": "路环岛", "value": "6803" }, { "label": "路氹城", "value": "6804" }]];var _default = cityData;exports.default = _default;
  3676. /***/ }),
  3677. /***/ 274:
  3678. /*!*******************************************************************************************!*\
  3679. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/libs/util/area.js ***!
  3680. \*******************************************************************************************/
  3681. /*! no static exports found */
  3682. /***/ (function(module, exports, __webpack_require__) {
  3683. "use strict";
  3684. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var areaData = [[[{ "label": "东城区", "value": "110101" }, { "label": "西城区", "value": "110102" }, { "label": "朝阳区", "value": "110105" }, { "label": "丰台区", "value": "110106" }, { "label": "石景山区", "value": "110107" }, { "label": "海淀区", "value": "110108" }, { "label": "门头沟区", "value": "110109" }, { "label": "房山区", "value": "110111" }, { "label": "通州区", "value": "110112" }, { "label": "顺义区", "value": "110113" }, { "label": "昌平区", "value": "110114" }, { "label": "大兴区", "value": "110115" }, { "label": "怀柔区", "value": "110116" }, { "label": "平谷区", "value": "110117" }, { "label": "密云区", "value": "110118" }, { "label": "延庆区", "value": "110119" }]], [[{ "label": "和平区", "value": "120101" }, { "label": "河东区", "value": "120102" }, { "label": "河西区", "value": "120103" }, { "label": "南开区", "value": "120104" }, { "label": "河北区", "value": "120105" }, { "label": "红桥区", "value": "120106" }, { "label": "东丽区", "value": "120110" }, { "label": "西青区", "value": "120111" }, { "label": "津南区", "value": "120112" }, { "label": "北辰区", "value": "120113" }, { "label": "武清区", "value": "120114" }, { "label": "宝坻区", "value": "120115" }, { "label": "滨海新区", "value": "120116" }, { "label": "宁河区", "value": "120117" }, { "label": "静海区", "value": "120118" }, { "label": "蓟州区", "value": "120119" }]], [[{ "label": "长安区", "value": "130102" }, { "label": "桥西区", "value": "130104" }, { "label": "新华区", "value": "130105" }, { "label": "井陉矿区", "value": "130107" }, { "label": "裕华区", "value": "130108" }, { "label": "藁城区", "value": "130109" }, { "label": "鹿泉区", "value": "130110" }, { "label": "栾城区", "value": "130111" }, { "label": "井陉县", "value": "130121" }, { "label": "正定县", "value": "130123" }, { "label": "行唐县", "value": "130125" }, { "label": "灵寿县", "value": "130126" }, { "label": "高邑县", "value": "130127" }, { "label": "深泽县", "value": "130128" }, { "label": "赞皇县", "value": "130129" }, { "label": "无极县", "value": "130130" }, { "label": "平山县", "value": "130131" }, { "label": "元氏县", "value": "130132" }, { "label": "赵县", "value": "130133" }, { "label": "石家庄高新技术产业开发区", "value": "130171" }, { "label": "石家庄循环化工园区", "value": "130172" }, { "label": "辛集市", "value": "130181" }, { "label": "晋州市", "value": "130183" }, { "label": "新乐市", "value": "130184" }], [{ "label": "路南区", "value": "130202" }, { "label": "路北区", "value": "130203" }, { "label": "古冶区", "value": "130204" }, { "label": "开平区", "value": "130205" }, { "label": "丰南区", "value": "130207" }, { "label": "丰润区", "value": "130208" }, { "label": "曹妃甸区", "value": "130209" }, { "label": "滦县", "value": "130223" }, { "label": "滦南县", "value": "130224" }, { "label": "乐亭县", "value": "130225" }, { "label": "迁西县", "value": "130227" }, { "label": "玉田县", "value": "130229" }, { "label": "唐山市芦台经济技术开发区", "value": "130271" }, { "label": "唐山市汉沽管理区", "value": "130272" }, { "label": "唐山高新技术产业开发区", "value": "130273" }, { "label": "河北唐山海港经济开发区", "value": "130274" }, { "label": "遵化市", "value": "130281" }, { "label": "迁安市", "value": "130283" }], [{ "label": "海港区", "value": "130302" }, { "label": "山海关区", "value": "130303" }, { "label": "北戴河区", "value": "130304" }, { "label": "抚宁区", "value": "130306" }, { "label": "青龙满族自治县", "value": "130321" }, { "label": "昌黎县", "value": "130322" }, { "label": "卢龙县", "value": "130324" }, { "label": "秦皇岛市经济技术开发区", "value": "130371" }, { "label": "北戴河新区", "value": "130372" }], [{ "label": "邯山区", "value": "130402" }, { "label": "丛台区", "value": "130403" }, { "label": "复兴区", "value": "130404" }, { "label": "峰峰矿区", "value": "130406" }, { "label": "肥乡区", "value": "130407" }, { "label": "永年区", "value": "130408" }, { "label": "临漳县", "value": "130423" }, { "label": "成安县", "value": "130424" }, { "label": "大名县", "value": "130425" }, { "label": "涉县", "value": "130426" }, { "label": "磁县", "value": "130427" }, { "label": "邱县", "value": "130430" }, { "label": "鸡泽县", "value": "130431" }, { "label": "广平县", "value": "130432" }, { "label": "馆陶县", "value": "130433" }, { "label": "魏县", "value": "130434" }, { "label": "曲周县", "value": "130435" }, { "label": "邯郸经济技术开发区", "value": "130471" }, { "label": "邯郸冀南新区", "value": "130473" }, { "label": "武安市", "value": "130481" }], [{ "label": "桥东区", "value": "130502" }, { "label": "桥西区", "value": "130503" }, { "label": "邢台县", "value": "130521" }, { "label": "临城县", "value": "130522" }, { "label": "内丘县", "value": "130523" }, { "label": "柏乡县", "value": "130524" }, { "label": "隆尧县", "value": "130525" }, { "label": "任县", "value": "130526" }, { "label": "南和县", "value": "130527" }, { "label": "宁晋县", "value": "130528" }, { "label": "巨鹿县", "value": "130529" }, { "label": "新河县", "value": "130530" }, { "label": "广宗县", "value": "130531" }, { "label": "平乡县", "value": "130532" }, { "label": "威县", "value": "130533" }, { "label": "清河县", "value": "130534" }, { "label": "临西县", "value": "130535" }, { "label": "河北邢台经济开发区", "value": "130571" }, { "label": "南宫市", "value": "130581" }, { "label": "沙河市", "value": "130582" }], [{ "label": "竞秀区", "value": "130602" }, { "label": "莲池区", "value": "130606" }, { "label": "满城区", "value": "130607" }, { "label": "清苑区", "value": "130608" }, { "label": "徐水区", "value": "130609" }, { "label": "涞水县", "value": "130623" }, { "label": "阜平县", "value": "130624" }, { "label": "定兴县", "value": "130626" }, { "label": "唐县", "value": "130627" }, { "label": "高阳县", "value": "130628" }, { "label": "容城县", "value": "130629" }, { "label": "涞源县", "value": "130630" }, { "label": "望都县", "value": "130631" }, { "label": "安新县", "value": "130632" }, { "label": "易县", "value": "130633" }, { "label": "曲阳县", "value": "130634" }, { "label": "蠡县", "value": "130635" }, { "label": "顺平县", "value": "130636" }, { "label": "博野县", "value": "130637" }, { "label": "雄县", "value": "130638" }, { "label": "保定高新技术产业开发区", "value": "130671" }, { "label": "保定白沟新城", "value": "130672" }, { "label": "涿州市", "value": "130681" }, { "label": "定州市", "value": "130682" }, { "label": "安国市", "value": "130683" }, { "label": "高碑店市", "value": "130684" }], [{ "label": "桥东区", "value": "130702" }, { "label": "桥西区", "value": "130703" }, { "label": "宣化区", "value": "130705" }, { "label": "下花园区", "value": "130706" }, { "label": "万全区", "value": "130708" }, { "label": "崇礼区", "value": "130709" }, { "label": "张北县", "value": "130722" }, { "label": "康保县", "value": "130723" }, { "label": "沽源县", "value": "130724" }, { "label": "尚义县", "value": "130725" }, { "label": "蔚县", "value": "130726" }, { "label": "阳原县", "value": "130727" }, { "label": "怀安县", "value": "130728" }, { "label": "怀来县", "value": "130730" }, { "label": "涿鹿县", "value": "130731" }, { "label": "赤城县", "value": "130732" }, { "label": "张家口市高新技术产业开发区", "value": "130771" }, { "label": "张家口市察北管理区", "value": "130772" }, { "label": "张家口市塞北管理区", "value": "130773" }], [{ "label": "双桥区", "value": "130802" }, { "label": "双滦区", "value": "130803" }, { "label": "鹰手营子矿区", "value": "130804" }, { "label": "承德县", "value": "130821" }, { "label": "兴隆县", "value": "130822" }, { "label": "滦平县", "value": "130824" }, { "label": "隆化县", "value": "130825" }, { "label": "丰宁满族自治县", "value": "130826" }, { "label": "宽城满族自治县", "value": "130827" }, { "label": "围场满族蒙古族自治县", "value": "130828" }, { "label": "承德高新技术产业开发区", "value": "130871" }, { "label": "平泉市", "value": "130881" }], [{ "label": "新华区", "value": "130902" }, { "label": "运河区", "value": "130903" }, { "label": "沧县", "value": "130921" }, { "label": "青县", "value": "130922" }, { "label": "东光县", "value": "130923" }, { "label": "海兴县", "value": "130924" }, { "label": "盐山县", "value": "130925" }, { "label": "肃宁县", "value": "130926" }, { "label": "南皮县", "value": "130927" }, { "label": "吴桥县", "value": "130928" }, { "label": "献县", "value": "130929" }, { "label": "孟村回族自治县", "value": "130930" }, { "label": "河北沧州经济开发区", "value": "130971" }, { "label": "沧州高新技术产业开发区", "value": "130972" }, { "label": "沧州渤海新区", "value": "130973" }, { "label": "泊头市", "value": "130981" }, { "label": "任丘市", "value": "130982" }, { "label": "黄骅市", "value": "130983" }, { "label": "河间市", "value": "130984" }], [{ "label": "安次区", "value": "131002" }, { "label": "广阳区", "value": "131003" }, { "label": "固安县", "value": "131022" }, { "label": "永清县", "value": "131023" }, { "label": "香河县", "value": "131024" }, { "label": "大城县", "value": "131025" }, { "label": "文安县", "value": "131026" }, { "label": "大厂回族自治县", "value": "131028" }, { "label": "廊坊经济技术开发区", "value": "131071" }, { "label": "霸州市", "value": "131081" }, { "label": "三河市", "value": "131082" }], [{ "label": "桃城区", "value": "131102" }, { "label": "冀州区", "value": "131103" }, { "label": "枣强县", "value": "131121" }, { "label": "武邑县", "value": "131122" }, { "label": "武强县", "value": "131123" }, { "label": "饶阳县", "value": "131124" }, { "label": "安平县", "value": "131125" }, { "label": "故城县", "value": "131126" }, { "label": "景县", "value": "131127" }, { "label": "阜城县", "value": "131128" }, { "label": "河北衡水经济开发区", "value": "131171" }, { "label": "衡水滨湖新区", "value": "131172" }, { "label": "深州市", "value": "131182" }]], [[{ "label": "小店区", "value": "140105" }, { "label": "迎泽区", "value": "140106" }, { "label": "杏花岭区", "value": "140107" }, { "label": "尖草坪区", "value": "140108" }, { "label": "万柏林区", "value": "140109" }, { "label": "晋源区", "value": "140110" }, { "label": "清徐县", "value": "140121" }, { "label": "阳曲县", "value": "140122" }, { "label": "娄烦县", "value": "140123" }, { "label": "山西转型综合改革示范区", "value": "140171" }, { "label": "古交市", "value": "140181" }], [{ "label": "城区", "value": "140202" }, { "label": "矿区", "value": "140203" }, { "label": "南郊区", "value": "140211" }, { "label": "新荣区", "value": "140212" }, { "label": "阳高县", "value": "140221" }, { "label": "天镇县", "value": "140222" }, { "label": "广灵县", "value": "140223" }, { "label": "灵丘县", "value": "140224" }, { "label": "浑源县", "value": "140225" }, { "label": "左云县", "value": "140226" }, { "label": "大同县", "value": "140227" }, { "label": "山西大同经济开发区", "value": "140271" }], [{ "label": "城区", "value": "140302" }, { "label": "矿区", "value": "140303" }, { "label": "郊区", "value": "140311" }, { "label": "平定县", "value": "140321" }, { "label": "盂县", "value": "140322" }, { "label": "山西阳泉经济开发区", "value": "140371" }], [{ "label": "城区", "value": "140402" }, { "label": "郊区", "value": "140411" }, { "label": "长治县", "value": "140421" }, { "label": "襄垣县", "value": "140423" }, { "label": "屯留县", "value": "140424" }, { "label": "平顺县", "value": "140425" }, { "label": "黎城县", "value": "140426" }, { "label": "壶关县", "value": "140427" }, { "label": "长子县", "value": "140428" }, { "label": "武乡县", "value": "140429" }, { "label": "沁县", "value": "140430" }, { "label": "沁源县", "value": "140431" }, { "label": "山西长治高新技术产业园区", "value": "140471" }, { "label": "潞城市", "value": "140481" }], [{ "label": "城区", "value": "140502" }, { "label": "沁水县", "value": "140521" }, { "label": "阳城县", "value": "140522" }, { "label": "陵川县", "value": "140524" }, { "label": "泽州县", "value": "140525" }, { "label": "高平市", "value": "140581" }], [{ "label": "朔城区", "value": "140602" }, { "label": "平鲁区", "value": "140603" }, { "label": "山阴县", "value": "140621" }, { "label": "应县", "value": "140622" }, { "label": "右玉县", "value": "140623" }, { "label": "怀仁县", "value": "140624" }, { "label": "山西朔州经济开发区", "value": "140671" }], [{ "label": "榆次区", "value": "140702" }, { "label": "榆社县", "value": "140721" }, { "label": "左权县", "value": "140722" }, { "label": "和顺县", "value": "140723" }, { "label": "昔阳县", "value": "140724" }, { "label": "寿阳县", "value": "140725" }, { "label": "太谷县", "value": "140726" }, { "label": "祁县", "value": "140727" }, { "label": "平遥县", "value": "140728" }, { "label": "灵石县", "value": "140729" }, { "label": "介休市", "value": "140781" }], [{ "label": "盐湖区", "value": "140802" }, { "label": "临猗县", "value": "140821" }, { "label": "万荣县", "value": "140822" }, { "label": "闻喜县", "value": "140823" }, { "label": "稷山县", "value": "140824" }, { "label": "新绛县", "value": "140825" }, { "label": "绛县", "value": "140826" }, { "label": "垣曲县", "value": "140827" }, { "label": "夏县", "value": "140828" }, { "label": "平陆县", "value": "140829" }, { "label": "芮城县", "value": "140830" }, { "label": "永济市", "value": "140881" }, { "label": "河津市", "value": "140882" }], [{ "label": "忻府区", "value": "140902" }, { "label": "定襄县", "value": "140921" }, { "label": "五台县", "value": "140922" }, { "label": "代县", "value": "140923" }, { "label": "繁峙县", "value": "140924" }, { "label": "宁武县", "value": "140925" }, { "label": "静乐县", "value": "140926" }, { "label": "神池县", "value": "140927" }, { "label": "五寨县", "value": "140928" }, { "label": "岢岚县", "value": "140929" }, { "label": "河曲县", "value": "140930" }, { "label": "保德县", "value": "140931" }, { "label": "偏关县", "value": "140932" }, { "label": "五台山风景名胜区", "value": "140971" }, { "label": "原平市", "value": "140981" }], [{ "label": "尧都区", "value": "141002" }, { "label": "曲沃县", "value": "141021" }, { "label": "翼城县", "value": "141022" }, { "label": "襄汾县", "value": "141023" }, { "label": "洪洞县", "value": "141024" }, { "label": "古县", "value": "141025" }, { "label": "安泽县", "value": "141026" }, { "label": "浮山县", "value": "141027" }, { "label": "吉县", "value": "141028" }, { "label": "乡宁县", "value": "141029" }, { "label": "大宁县", "value": "141030" }, { "label": "隰县", "value": "141031" }, { "label": "永和县", "value": "141032" }, { "label": "蒲县", "value": "141033" }, { "label": "汾西县", "value": "141034" }, { "label": "侯马市", "value": "141081" }, { "label": "霍州市", "value": "141082" }], [{ "label": "离石区", "value": "141102" }, { "label": "文水县", "value": "141121" }, { "label": "交城县", "value": "141122" }, { "label": "兴县", "value": "141123" }, { "label": "临县", "value": "141124" }, { "label": "柳林县", "value": "141125" }, { "label": "石楼县", "value": "141126" }, { "label": "岚县", "value": "141127" }, { "label": "方山县", "value": "141128" }, { "label": "中阳县", "value": "141129" }, { "label": "交口县", "value": "141130" }, { "label": "孝义市", "value": "141181" }, { "label": "汾阳市", "value": "141182" }]], [[{ "label": "新城区", "value": "150102" }, { "label": "回民区", "value": "150103" }, { "label": "玉泉区", "value": "150104" }, { "label": "赛罕区", "value": "150105" }, { "label": "土默特左旗", "value": "150121" }, { "label": "托克托县", "value": "150122" }, { "label": "和林格尔县", "value": "150123" }, { "label": "清水河县", "value": "150124" }, { "label": "武川县", "value": "150125" }, { "label": "呼和浩特金海工业园区", "value": "150171" }, { "label": "呼和浩特经济技术开发区", "value": "150172" }], [{ "label": "东河区", "value": "150202" }, { "label": "昆都仑区", "value": "150203" }, { "label": "青山区", "value": "150204" }, { "label": "石拐区", "value": "150205" }, { "label": "白云鄂博矿区", "value": "150206" }, { "label": "九原区", "value": "150207" }, { "label": "土默特右旗", "value": "150221" }, { "label": "固阳县", "value": "150222" }, { "label": "达尔罕茂明安联合旗", "value": "150223" }, { "label": "包头稀土高新技术产业开发区", "value": "150271" }], [{ "label": "海勃湾区", "value": "150302" }, { "label": "海南区", "value": "150303" }, { "label": "乌达区", "value": "150304" }], [{ "label": "红山区", "value": "150402" }, { "label": "元宝山区", "value": "150403" }, { "label": "松山区", "value": "150404" }, { "label": "阿鲁科尔沁旗", "value": "150421" }, { "label": "巴林左旗", "value": "150422" }, { "label": "巴林右旗", "value": "150423" }, { "label": "林西县", "value": "150424" }, { "label": "克什克腾旗", "value": "150425" }, { "label": "翁牛特旗", "value": "150426" }, { "label": "喀喇沁旗", "value": "150428" }, { "label": "宁城县", "value": "150429" }, { "label": "敖汉旗", "value": "150430" }], [{ "label": "科尔沁区", "value": "150502" }, { "label": "科尔沁左翼中旗", "value": "150521" }, { "label": "科尔沁左翼后旗", "value": "150522" }, { "label": "开鲁县", "value": "150523" }, { "label": "库伦旗", "value": "150524" }, { "label": "奈曼旗", "value": "150525" }, { "label": "扎鲁特旗", "value": "150526" }, { "label": "通辽经济技术开发区", "value": "150571" }, { "label": "霍林郭勒市", "value": "150581" }], [{ "label": "东胜区", "value": "150602" }, { "label": "康巴什区", "value": "150603" }, { "label": "达拉特旗", "value": "150621" }, { "label": "准格尔旗", "value": "150622" }, { "label": "鄂托克前旗", "value": "150623" }, { "label": "鄂托克旗", "value": "150624" }, { "label": "杭锦旗", "value": "150625" }, { "label": "乌审旗", "value": "150626" }, { "label": "伊金霍洛旗", "value": "150627" }], [{ "label": "海拉尔区", "value": "150702" }, { "label": "扎赉诺尔区", "value": "150703" }, { "label": "阿荣旗", "value": "150721" }, { "label": "莫力达瓦达斡尔族自治旗", "value": "150722" }, { "label": "鄂伦春自治旗", "value": "150723" }, { "label": "鄂温克族自治旗", "value": "150724" }, { "label": "陈巴尔虎旗", "value": "150725" }, { "label": "新巴尔虎左旗", "value": "150726" }, { "label": "新巴尔虎右旗", "value": "150727" }, { "label": "满洲里市", "value": "150781" }, { "label": "牙克石市", "value": "150782" }, { "label": "扎兰屯市", "value": "150783" }, { "label": "额尔古纳市", "value": "150784" }, { "label": "根河市", "value": "150785" }], [{ "label": "临河区", "value": "150802" }, { "label": "五原县", "value": "150821" }, { "label": "磴口县", "value": "150822" }, { "label": "乌拉特前旗", "value": "150823" }, { "label": "乌拉特中旗", "value": "150824" }, { "label": "乌拉特后旗", "value": "150825" }, { "label": "杭锦后旗", "value": "150826" }], [{ "label": "集宁区", "value": "150902" }, { "label": "卓资县", "value": "150921" }, { "label": "化德县", "value": "150922" }, { "label": "商都县", "value": "150923" }, { "label": "兴和县", "value": "150924" }, { "label": "凉城县", "value": "150925" }, { "label": "察哈尔右翼前旗", "value": "150926" }, { "label": "察哈尔右翼中旗", "value": "150927" }, { "label": "察哈尔右翼后旗", "value": "150928" }, { "label": "四子王旗", "value": "150929" }, { "label": "丰镇市", "value": "150981" }], [{ "label": "乌兰浩特市", "value": "152201" }, { "label": "阿尔山市", "value": "152202" }, { "label": "科尔沁右翼前旗", "value": "152221" }, { "label": "科尔沁右翼中旗", "value": "152222" }, { "label": "扎赉特旗", "value": "152223" }, { "label": "突泉县", "value": "152224" }], [{ "label": "二连浩特市", "value": "152501" }, { "label": "锡林浩特市", "value": "152502" }, { "label": "阿巴嘎旗", "value": "152522" }, { "label": "苏尼特左旗", "value": "152523" }, { "label": "苏尼特右旗", "value": "152524" }, { "label": "东乌珠穆沁旗", "value": "152525" }, { "label": "西乌珠穆沁旗", "value": "152526" }, { "label": "太仆寺旗", "value": "152527" }, { "label": "镶黄旗", "value": "152528" }, { "label": "正镶白旗", "value": "152529" }, { "label": "正蓝旗", "value": "152530" }, { "label": "多伦县", "value": "152531" }, { "label": "乌拉盖管委会", "value": "152571" }], [{ "label": "阿拉善左旗", "value": "152921" }, { "label": "阿拉善右旗", "value": "152922" }, { "label": "额济纳旗", "value": "152923" }, { "label": "内蒙古阿拉善经济开发区", "value": "152971" }]], [[{ "label": "和平区", "value": "210102" }, { "label": "沈河区", "value": "210103" }, { "label": "大东区", "value": "210104" }, { "label": "皇姑区", "value": "210105" }, { "label": "铁西区", "value": "210106" }, { "label": "苏家屯区", "value": "210111" }, { "label": "浑南区", "value": "210112" }, { "label": "沈北新区", "value": "210113" }, { "label": "于洪区", "value": "210114" }, { "label": "辽中区", "value": "210115" }, { "label": "康平县", "value": "210123" }, { "label": "法库县", "value": "210124" }, { "label": "新民市", "value": "210181" }], [{ "label": "中山区", "value": "210202" }, { "label": "西岗区", "value": "210203" }, { "label": "沙河口区", "value": "210204" }, { "label": "甘井子区", "value": "210211" }, { "label": "旅顺口区", "value": "210212" }, { "label": "金州区", "value": "210213" }, { "label": "普兰店区", "value": "210214" }, { "label": "长海县", "value": "210224" }, { "label": "瓦房店市", "value": "210281" }, { "label": "庄河市", "value": "210283" }], [{ "label": "铁东区", "value": "210302" }, { "label": "铁西区", "value": "210303" }, { "label": "立山区", "value": "210304" }, { "label": "千山区", "value": "210311" }, { "label": "台安县", "value": "210321" }, { "label": "岫岩满族自治县", "value": "210323" }, { "label": "海城市", "value": "210381" }], [{ "label": "新抚区", "value": "210402" }, { "label": "东洲区", "value": "210403" }, { "label": "望花区", "value": "210404" }, { "label": "顺城区", "value": "210411" }, { "label": "抚顺县", "value": "210421" }, { "label": "新宾满族自治县", "value": "210422" }, { "label": "清原满族自治县", "value": "210423" }], [{ "label": "平山区", "value": "210502" }, { "label": "溪湖区", "value": "210503" }, { "label": "明山区", "value": "210504" }, { "label": "南芬区", "value": "210505" }, { "label": "本溪满族自治县", "value": "210521" }, { "label": "桓仁满族自治县", "value": "210522" }], [{ "label": "元宝区", "value": "210602" }, { "label": "振兴区", "value": "210603" }, { "label": "振安区", "value": "210604" }, { "label": "宽甸满族自治县", "value": "210624" }, { "label": "东港市", "value": "210681" }, { "label": "凤城市", "value": "210682" }], [{ "label": "古塔区", "value": "210702" }, { "label": "凌河区", "value": "210703" }, { "label": "太和区", "value": "210711" }, { "label": "黑山县", "value": "210726" }, { "label": "义县", "value": "210727" }, { "label": "凌海市", "value": "210781" }, { "label": "北镇市", "value": "210782" }], [{ "label": "站前区", "value": "210802" }, { "label": "西市区", "value": "210803" }, { "label": "鲅鱼圈区", "value": "210804" }, { "label": "老边区", "value": "210811" }, { "label": "盖州市", "value": "210881" }, { "label": "大石桥市", "value": "210882" }], [{ "label": "海州区", "value": "210902" }, { "label": "新邱区", "value": "210903" }, { "label": "太平区", "value": "210904" }, { "label": "清河门区", "value": "210905" }, { "label": "细河区", "value": "210911" }, { "label": "阜新蒙古族自治县", "value": "210921" }, { "label": "彰武县", "value": "210922" }], [{ "label": "白塔区", "value": "211002" }, { "label": "文圣区", "value": "211003" }, { "label": "宏伟区", "value": "211004" }, { "label": "弓长岭区", "value": "211005" }, { "label": "太子河区", "value": "211011" }, { "label": "辽阳县", "value": "211021" }, { "label": "灯塔市", "value": "211081" }], [{ "label": "双台子区", "value": "211102" }, { "label": "兴隆台区", "value": "211103" }, { "label": "大洼区", "value": "211104" }, { "label": "盘山县", "value": "211122" }], [{ "label": "银州区", "value": "211202" }, { "label": "清河区", "value": "211204" }, { "label": "铁岭县", "value": "211221" }, { "label": "西丰县", "value": "211223" }, { "label": "昌图县", "value": "211224" }, { "label": "调兵山市", "value": "211281" }, { "label": "开原市", "value": "211282" }], [{ "label": "双塔区", "value": "211302" }, { "label": "龙城区", "value": "211303" }, { "label": "朝阳县", "value": "211321" }, { "label": "建平县", "value": "211322" }, { "label": "喀喇沁左翼蒙古族自治县", "value": "211324" }, { "label": "北票市", "value": "211381" }, { "label": "凌源市", "value": "211382" }], [{ "label": "连山区", "value": "211402" }, { "label": "龙港区", "value": "211403" }, { "label": "南票区", "value": "211404" }, { "label": "绥中县", "value": "211421" }, { "label": "建昌县", "value": "211422" }, { "label": "兴城市", "value": "211481" }]], [[{ "label": "南关区", "value": "220102" }, { "label": "宽城区", "value": "220103" }, { "label": "朝阳区", "value": "220104" }, { "label": "二道区", "value": "220105" }, { "label": "绿园区", "value": "220106" }, { "label": "双阳区", "value": "220112" }, { "label": "九台区", "value": "220113" }, { "label": "农安县", "value": "220122" }, { "label": "长春经济技术开发区", "value": "220171" }, { "label": "长春净月高新技术产业开发区", "value": "220172" }, { "label": "长春高新技术产业开发区", "value": "220173" }, { "label": "长春汽车经济技术开发区", "value": "220174" }, { "label": "榆树市", "value": "220182" }, { "label": "德惠市", "value": "220183" }], [{ "label": "昌邑区", "value": "220202" }, { "label": "龙潭区", "value": "220203" }, { "label": "船营区", "value": "220204" }, { "label": "丰满区", "value": "220211" }, { "label": "永吉县", "value": "220221" }, { "label": "吉林经济开发区", "value": "220271" }, { "label": "吉林高新技术产业开发区", "value": "220272" }, { "label": "吉林中国新加坡食品区", "value": "220273" }, { "label": "蛟河市", "value": "220281" }, { "label": "桦甸市", "value": "220282" }, { "label": "舒兰市", "value": "220283" }, { "label": "磐石市", "value": "220284" }], [{ "label": "铁西区", "value": "220302" }, { "label": "铁东区", "value": "220303" }, { "label": "梨树县", "value": "220322" }, { "label": "伊通满族自治县", "value": "220323" }, { "label": "公主岭市", "value": "220381" }, { "label": "双辽市", "value": "220382" }], [{ "label": "龙山区", "value": "220402" }, { "label": "西安区", "value": "220403" }, { "label": "东丰县", "value": "220421" }, { "label": "东辽县", "value": "220422" }], [{ "label": "东昌区", "value": "220502" }, { "label": "二道江区", "value": "220503" }, { "label": "通化县", "value": "220521" }, { "label": "辉南县", "value": "220523" }, { "label": "柳河县", "value": "220524" }, { "label": "梅河口市", "value": "220581" }, { "label": "集安市", "value": "220582" }], [{ "label": "浑江区", "value": "220602" }, { "label": "江源区", "value": "220605" }, { "label": "抚松县", "value": "220621" }, { "label": "靖宇县", "value": "220622" }, { "label": "长白朝鲜族自治县", "value": "220623" }, { "label": "临江市", "value": "220681" }], [{ "label": "宁江区", "value": "220702" }, { "label": "前郭尔罗斯蒙古族自治县", "value": "220721" }, { "label": "长岭县", "value": "220722" }, { "label": "乾安县", "value": "220723" }, { "label": "吉林松原经济开发区", "value": "220771" }, { "label": "扶余市", "value": "220781" }], [{ "label": "洮北区", "value": "220802" }, { "label": "镇赉县", "value": "220821" }, { "label": "通榆县", "value": "220822" }, { "label": "吉林白城经济开发区", "value": "220871" }, { "label": "洮南市", "value": "220881" }, { "label": "大安市", "value": "220882" }], [{ "label": "延吉市", "value": "222401" }, { "label": "图们市", "value": "222402" }, { "label": "敦化市", "value": "222403" }, { "label": "珲春市", "value": "222404" }, { "label": "龙井市", "value": "222405" }, { "label": "和龙市", "value": "222406" }, { "label": "汪清县", "value": "222424" }, { "label": "安图县", "value": "222426" }]], [[{ "label": "道里区", "value": "230102" }, { "label": "南岗区", "value": "230103" }, { "label": "道外区", "value": "230104" }, { "label": "平房区", "value": "230108" }, { "label": "松北区", "value": "230109" }, { "label": "香坊区", "value": "230110" }, { "label": "呼兰区", "value": "230111" }, { "label": "阿城区", "value": "230112" }, { "label": "双城区", "value": "230113" }, { "label": "依兰县", "value": "230123" }, { "label": "方正县", "value": "230124" }, { "label": "宾县", "value": "230125" }, { "label": "巴彦县", "value": "230126" }, { "label": "木兰县", "value": "230127" }, { "label": "通河县", "value": "230128" }, { "label": "延寿县", "value": "230129" }, { "label": "尚志市", "value": "230183" }, { "label": "五常市", "value": "230184" }], [{ "label": "龙沙区", "value": "230202" }, { "label": "建华区", "value": "230203" }, { "label": "铁锋区", "value": "230204" }, { "label": "昂昂溪区", "value": "230205" }, { "label": "富拉尔基区", "value": "230206" }, { "label": "碾子山区", "value": "230207" }, { "label": "梅里斯达斡尔族区", "value": "230208" }, { "label": "龙江县", "value": "230221" }, { "label": "依安县", "value": "230223" }, { "label": "泰来县", "value": "230224" }, { "label": "甘南县", "value": "230225" }, { "label": "富裕县", "value": "230227" }, { "label": "克山县", "value": "230229" }, { "label": "克东县", "value": "230230" }, { "label": "拜泉县", "value": "230231" }, { "label": "讷河市", "value": "230281" }], [{ "label": "鸡冠区", "value": "230302" }, { "label": "恒山区", "value": "230303" }, { "label": "滴道区", "value": "230304" }, { "label": "梨树区", "value": "230305" }, { "label": "城子河区", "value": "230306" }, { "label": "麻山区", "value": "230307" }, { "label": "鸡东县", "value": "230321" }, { "label": "虎林市", "value": "230381" }, { "label": "密山市", "value": "230382" }], [{ "label": "向阳区", "value": "230402" }, { "label": "工农区", "value": "230403" }, { "label": "南山区", "value": "230404" }, { "label": "兴安区", "value": "230405" }, { "label": "东山区", "value": "230406" }, { "label": "兴山区", "value": "230407" }, { "label": "萝北县", "value": "230421" }, { "label": "绥滨县", "value": "230422" }], [{ "label": "尖山区", "value": "230502" }, { "label": "岭东区", "value": "230503" }, { "label": "四方台区", "value": "230505" }, { "label": "宝山区", "value": "230506" }, { "label": "集贤县", "value": "230521" }, { "label": "友谊县", "value": "230522" }, { "label": "宝清县", "value": "230523" }, { "label": "饶河县", "value": "230524" }], [{ "label": "萨尔图区", "value": "230602" }, { "label": "龙凤区", "value": "230603" }, { "label": "让胡路区", "value": "230604" }, { "label": "红岗区", "value": "230605" }, { "label": "大同区", "value": "230606" }, { "label": "肇州县", "value": "230621" }, { "label": "肇源县", "value": "230622" }, { "label": "林甸县", "value": "230623" }, { "label": "杜尔伯特蒙古族自治县", "value": "230624" }, { "label": "大庆高新技术产业开发区", "value": "230671" }], [{ "label": "伊春区", "value": "230702" }, { "label": "南岔区", "value": "230703" }, { "label": "友好区", "value": "230704" }, { "label": "西林区", "value": "230705" }, { "label": "翠峦区", "value": "230706" }, { "label": "新青区", "value": "230707" }, { "label": "美溪区", "value": "230708" }, { "label": "金山屯区", "value": "230709" }, { "label": "五营区", "value": "230710" }, { "label": "乌马河区", "value": "230711" }, { "label": "汤旺河区", "value": "230712" }, { "label": "带岭区", "value": "230713" }, { "label": "乌伊岭区", "value": "230714" }, { "label": "红星区", "value": "230715" }, { "label": "上甘岭区", "value": "230716" }, { "label": "嘉荫县", "value": "230722" }, { "label": "铁力市", "value": "230781" }], [{ "label": "向阳区", "value": "230803" }, { "label": "前进区", "value": "230804" }, { "label": "东风区", "value": "230805" }, { "label": "郊区", "value": "230811" }, { "label": "桦南县", "value": "230822" }, { "label": "桦川县", "value": "230826" }, { "label": "汤原县", "value": "230828" }, { "label": "同江市", "value": "230881" }, { "label": "富锦市", "value": "230882" }, { "label": "抚远市", "value": "230883" }], [{ "label": "新兴区", "value": "230902" }, { "label": "桃山区", "value": "230903" }, { "label": "茄子河区", "value": "230904" }, { "label": "勃利县", "value": "230921" }], [{ "label": "东安区", "value": "231002" }, { "label": "阳明区", "value": "231003" }, { "label": "爱民区", "value": "231004" }, { "label": "西安区", "value": "231005" }, { "label": "林口县", "value": "231025" }, { "label": "牡丹江经济技术开发区", "value": "231071" }, { "label": "绥芬河市", "value": "231081" }, { "label": "海林市", "value": "231083" }, { "label": "宁安市", "value": "231084" }, { "label": "穆棱市", "value": "231085" }, { "label": "东宁市", "value": "231086" }], [{ "label": "爱辉区", "value": "231102" }, { "label": "嫩江县", "value": "231121" }, { "label": "逊克县", "value": "231123" }, { "label": "孙吴县", "value": "231124" }, { "label": "北安市", "value": "231181" }, { "label": "五大连池市", "value": "231182" }], [{ "label": "北林区", "value": "231202" }, { "label": "望奎县", "value": "231221" }, { "label": "兰西县", "value": "231222" }, { "label": "青冈县", "value": "231223" }, { "label": "庆安县", "value": "231224" }, { "label": "明水县", "value": "231225" }, { "label": "绥棱县", "value": "231226" }, { "label": "安达市", "value": "231281" }, { "label": "肇东市", "value": "231282" }, { "label": "海伦市", "value": "231283" }], [{ "label": "加格达奇区", "value": "232701" }, { "label": "松岭区", "value": "232702" }, { "label": "新林区", "value": "232703" }, { "label": "呼中区", "value": "232704" }, { "label": "呼玛县", "value": "232721" }, { "label": "塔河县", "value": "232722" }, { "label": "漠河县", "value": "232723" }]], [[{ "label": "黄浦区", "value": "310101" }, { "label": "徐汇区", "value": "310104" }, { "label": "长宁区", "value": "310105" }, { "label": "静安区", "value": "310106" }, { "label": "普陀区", "value": "310107" }, { "label": "虹口区", "value": "310109" }, { "label": "杨浦区", "value": "310110" }, { "label": "闵行区", "value": "310112" }, { "label": "宝山区", "value": "310113" }, { "label": "嘉定区", "value": "310114" }, { "label": "浦东新区", "value": "310115" }, { "label": "金山区", "value": "310116" }, { "label": "松江区", "value": "310117" }, { "label": "青浦区", "value": "310118" }, { "label": "奉贤区", "value": "310120" }, { "label": "崇明区", "value": "310151" }]], [[{ "label": "玄武区", "value": "320102" }, { "label": "秦淮区", "value": "320104" }, { "label": "建邺区", "value": "320105" }, { "label": "鼓楼区", "value": "320106" }, { "label": "浦口区", "value": "320111" }, { "label": "栖霞区", "value": "320113" }, { "label": "雨花台区", "value": "320114" }, { "label": "江宁区", "value": "320115" }, { "label": "六合区", "value": "320116" }, { "label": "溧水区", "value": "320117" }, { "label": "高淳区", "value": "320118" }], [{ "label": "锡山区", "value": "320205" }, { "label": "惠山区", "value": "320206" }, { "label": "滨湖区", "value": "320211" }, { "label": "梁溪区", "value": "320213" }, { "label": "新吴区", "value": "320214" }, { "label": "江阴市", "value": "320281" }, { "label": "宜兴市", "value": "320282" }], [{ "label": "鼓楼区", "value": "320302" }, { "label": "云龙区", "value": "320303" }, { "label": "贾汪区", "value": "320305" }, { "label": "泉山区", "value": "320311" }, { "label": "铜山区", "value": "320312" }, { "label": "丰县", "value": "320321" }, { "label": "沛县", "value": "320322" }, { "label": "睢宁县", "value": "320324" }, { "label": "徐州经济技术开发区", "value": "320371" }, { "label": "新沂市", "value": "320381" }, { "label": "邳州市", "value": "320382" }], [{ "label": "天宁区", "value": "320402" }, { "label": "钟楼区", "value": "320404" }, { "label": "新北区", "value": "320411" }, { "label": "武进区", "value": "320412" }, { "label": "金坛区", "value": "320413" }, { "label": "溧阳市", "value": "320481" }], [{ "label": "虎丘区", "value": "320505" }, { "label": "吴中区", "value": "320506" }, { "label": "相城区", "value": "320507" }, { "label": "姑苏区", "value": "320508" }, { "label": "吴江区", "value": "320509" }, { "label": "苏州工业园区", "value": "320571" }, { "label": "常熟市", "value": "320581" }, { "label": "张家港市", "value": "320582" }, { "label": "昆山市", "value": "320583" }, { "label": "太仓市", "value": "320585" }], [{ "label": "崇川区", "value": "320602" }, { "label": "港闸区", "value": "320611" }, { "label": "通州区", "value": "320612" }, { "label": "海安县", "value": "320621" }, { "label": "如东县", "value": "320623" }, { "label": "南通经济技术开发区", "value": "320671" }, { "label": "启东市", "value": "320681" }, { "label": "如皋市", "value": "320682" }, { "label": "海门市", "value": "320684" }], [{ "label": "连云区", "value": "320703" }, { "label": "海州区", "value": "320706" }, { "label": "赣榆区", "value": "320707" }, { "label": "东海县", "value": "320722" }, { "label": "灌云县", "value": "320723" }, { "label": "灌南县", "value": "320724" }, { "label": "连云港经济技术开发区", "value": "320771" }, { "label": "连云港高新技术产业开发区", "value": "320772" }], [{ "label": "淮安区", "value": "320803" }, { "label": "淮阴区", "value": "320804" }, { "label": "清江浦区", "value": "320812" }, { "label": "洪泽区", "value": "320813" }, { "label": "涟水县", "value": "320826" }, { "label": "盱眙县", "value": "320830" }, { "label": "金湖县", "value": "320831" }, { "label": "淮安经济技术开发区", "value": "320871" }], [{ "label": "亭湖区", "value": "320902" }, { "label": "盐都区", "value": "320903" }, { "label": "大丰区", "value": "320904" }, { "label": "响水县", "value": "320921" }, { "label": "滨海县", "value": "320922" }, { "label": "阜宁县", "value": "320923" }, { "label": "射阳县", "value": "320924" }, { "label": "建湖县", "value": "320925" }, { "label": "盐城经济技术开发区", "value": "320971" }, { "label": "东台市", "value": "320981" }], [{ "label": "广陵区", "value": "321002" }, { "label": "邗江区", "value": "321003" }, { "label": "江都区", "value": "321012" }, { "label": "宝应县", "value": "321023" }, { "label": "扬州经济技术开发区", "value": "321071" }, { "label": "仪征市", "value": "321081" }, { "label": "高邮市", "value": "321084" }], [{ "label": "京口区", "value": "321102" }, { "label": "润州区", "value": "321111" }, { "label": "丹徒区", "value": "321112" }, { "label": "镇江新区", "value": "321171" }, { "label": "丹阳市", "value": "321181" }, { "label": "扬中市", "value": "321182" }, { "label": "句容市", "value": "321183" }], [{ "label": "海陵区", "value": "321202" }, { "label": "高港区", "value": "321203" }, { "label": "姜堰区", "value": "321204" }, { "label": "泰州医药高新技术产业开发区", "value": "321271" }, { "label": "兴化市", "value": "321281" }, { "label": "靖江市", "value": "321282" }, { "label": "泰兴市", "value": "321283" }], [{ "label": "宿城区", "value": "321302" }, { "label": "宿豫区", "value": "321311" }, { "label": "沭阳县", "value": "321322" }, { "label": "泗阳县", "value": "321323" }, { "label": "泗洪县", "value": "321324" }, { "label": "宿迁经济技术开发区", "value": "321371" }]], [[{ "label": "上城区", "value": "330102" }, { "label": "下城区", "value": "330103" }, { "label": "江干区", "value": "330104" }, { "label": "拱墅区", "value": "330105" }, { "label": "西湖区", "value": "330106" }, { "label": "滨江区", "value": "330108" }, { "label": "萧山区", "value": "330109" }, { "label": "余杭区", "value": "330110" }, { "label": "富阳区", "value": "330111" }, { "label": "临安区", "value": "330112" }, { "label": "桐庐县", "value": "330122" }, { "label": "淳安县", "value": "330127" }, { "label": "建德市", "value": "330182" }], [{ "label": "海曙区", "value": "330203" }, { "label": "江北区", "value": "330205" }, { "label": "北仑区", "value": "330206" }, { "label": "镇海区", "value": "330211" }, { "label": "鄞州区", "value": "330212" }, { "label": "奉化区", "value": "330213" }, { "label": "象山县", "value": "330225" }, { "label": "宁海县", "value": "330226" }, { "label": "余姚市", "value": "330281" }, { "label": "慈溪市", "value": "330282" }], [{ "label": "鹿城区", "value": "330302" }, { "label": "龙湾区", "value": "330303" }, { "label": "瓯海区", "value": "330304" }, { "label": "洞头区", "value": "330305" }, { "label": "永嘉县", "value": "330324" }, { "label": "平阳县", "value": "330326" }, { "label": "苍南县", "value": "330327" }, { "label": "文成县", "value": "330328" }, { "label": "泰顺县", "value": "330329" }, { "label": "温州经济技术开发区", "value": "330371" }, { "label": "瑞安市", "value": "330381" }, { "label": "乐清市", "value": "330382" }], [{ "label": "南湖区", "value": "330402" }, { "label": "秀洲区", "value": "330411" }, { "label": "嘉善县", "value": "330421" }, { "label": "海盐县", "value": "330424" }, { "label": "海宁市", "value": "330481" }, { "label": "平湖市", "value": "330482" }, { "label": "桐乡市", "value": "330483" }], [{ "label": "吴兴区", "value": "330502" }, { "label": "南浔区", "value": "330503" }, { "label": "德清县", "value": "330521" }, { "label": "长兴县", "value": "330522" }, { "label": "安吉县", "value": "330523" }], [{ "label": "越城区", "value": "330602" }, { "label": "柯桥区", "value": "330603" }, { "label": "上虞区", "value": "330604" }, { "label": "新昌县", "value": "330624" }, { "label": "诸暨市", "value": "330681" }, { "label": "嵊州市", "value": "330683" }], [{ "label": "婺城区", "value": "330702" }, { "label": "金东区", "value": "330703" }, { "label": "武义县", "value": "330723" }, { "label": "浦江县", "value": "330726" }, { "label": "磐安县", "value": "330727" }, { "label": "兰溪市", "value": "330781" }, { "label": "义乌市", "value": "330782" }, { "label": "东阳市", "value": "330783" }, { "label": "永康市", "value": "330784" }], [{ "label": "柯城区", "value": "330802" }, { "label": "衢江区", "value": "330803" }, { "label": "常山县", "value": "330822" }, { "label": "开化县", "value": "330824" }, { "label": "龙游县", "value": "330825" }, { "label": "江山市", "value": "330881" }], [{ "label": "定海区", "value": "330902" }, { "label": "普陀区", "value": "330903" }, { "label": "岱山县", "value": "330921" }, { "label": "嵊泗县", "value": "330922" }], [{ "label": "椒江区", "value": "331002" }, { "label": "黄岩区", "value": "331003" }, { "label": "路桥区", "value": "331004" }, { "label": "三门县", "value": "331022" }, { "label": "天台县", "value": "331023" }, { "label": "仙居县", "value": "331024" }, { "label": "温岭市", "value": "331081" }, { "label": "临海市", "value": "331082" }, { "label": "玉环市", "value": "331083" }], [{ "label": "莲都区", "value": "331102" }, { "label": "青田县", "value": "331121" }, { "label": "缙云县", "value": "331122" }, { "label": "遂昌县", "value": "331123" }, { "label": "松阳县", "value": "331124" }, { "label": "云和县", "value": "331125" }, { "label": "庆元县", "value": "331126" }, { "label": "景宁畲族自治县", "value": "331127" }, { "label": "龙泉市", "value": "331181" }]], [[{ "label": "瑶海区", "value": "340102" }, { "label": "庐阳区", "value": "340103" }, { "label": "蜀山区", "value": "340104" }, { "label": "包河区", "value": "340111" }, { "label": "长丰县", "value": "340121" }, { "label": "肥东县", "value": "340122" }, { "label": "肥西县", "value": "340123" }, { "label": "庐江县", "value": "340124" }, { "label": "合肥高新技术产业开发区", "value": "340171" }, { "label": "合肥经济技术开发区", "value": "340172" }, { "label": "合肥新站高新技术产业开发区", "value": "340173" }, { "label": "巢湖市", "value": "340181" }], [{ "label": "镜湖区", "value": "340202" }, { "label": "弋江区", "value": "340203" }, { "label": "鸠江区", "value": "340207" }, { "label": "三山区", "value": "340208" }, { "label": "芜湖县", "value": "340221" }, { "label": "繁昌县", "value": "340222" }, { "label": "南陵县", "value": "340223" }, { "label": "无为县", "value": "340225" }, { "label": "芜湖经济技术开发区", "value": "340271" }, { "label": "安徽芜湖长江大桥经济开发区", "value": "340272" }], [{ "label": "龙子湖区", "value": "340302" }, { "label": "蚌山区", "value": "340303" }, { "label": "禹会区", "value": "340304" }, { "label": "淮上区", "value": "340311" }, { "label": "怀远县", "value": "340321" }, { "label": "五河县", "value": "340322" }, { "label": "固镇县", "value": "340323" }, { "label": "蚌埠市高新技术开发区", "value": "340371" }, { "label": "蚌埠市经济开发区", "value": "340372" }], [{ "label": "大通区", "value": "340402" }, { "label": "田家庵区", "value": "340403" }, { "label": "谢家集区", "value": "340404" }, { "label": "八公山区", "value": "340405" }, { "label": "潘集区", "value": "340406" }, { "label": "凤台县", "value": "340421" }, { "label": "寿县", "value": "340422" }], [{ "label": "花山区", "value": "340503" }, { "label": "雨山区", "value": "340504" }, { "label": "博望区", "value": "340506" }, { "label": "当涂县", "value": "340521" }, { "label": "含山县", "value": "340522" }, { "label": "和县", "value": "340523" }], [{ "label": "杜集区", "value": "340602" }, { "label": "相山区", "value": "340603" }, { "label": "烈山区", "value": "340604" }, { "label": "濉溪县", "value": "340621" }], [{ "label": "铜官区", "value": "340705" }, { "label": "义安区", "value": "340706" }, { "label": "郊区", "value": "340711" }, { "label": "枞阳县", "value": "340722" }], [{ "label": "迎江区", "value": "340802" }, { "label": "大观区", "value": "340803" }, { "label": "宜秀区", "value": "340811" }, { "label": "怀宁县", "value": "340822" }, { "label": "潜山县", "value": "340824" }, { "label": "太湖县", "value": "340825" }, { "label": "宿松县", "value": "340826" }, { "label": "望江县", "value": "340827" }, { "label": "岳西县", "value": "340828" }, { "label": "安徽安庆经济开发区", "value": "340871" }, { "label": "桐城市", "value": "340881" }], [{ "label": "屯溪区", "value": "341002" }, { "label": "黄山区", "value": "341003" }, { "label": "徽州区", "value": "341004" }, { "label": "歙县", "value": "341021" }, { "label": "休宁县", "value": "341022" }, { "label": "黟县", "value": "341023" }, { "label": "祁门县", "value": "341024" }], [{ "label": "琅琊区", "value": "341102" }, { "label": "南谯区", "value": "341103" }, { "label": "来安县", "value": "341122" }, { "label": "全椒县", "value": "341124" }, { "label": "定远县", "value": "341125" }, { "label": "凤阳县", "value": "341126" }, { "label": "苏滁现代产业园", "value": "341171" }, { "label": "滁州经济技术开发区", "value": "341172" }, { "label": "天长市", "value": "341181" }, { "label": "明光市", "value": "341182" }], [{ "label": "颍州区", "value": "341202" }, { "label": "颍东区", "value": "341203" }, { "label": "颍泉区", "value": "341204" }, { "label": "临泉县", "value": "341221" }, { "label": "太和县", "value": "341222" }, { "label": "阜南县", "value": "341225" }, { "label": "颍上县", "value": "341226" }, { "label": "阜阳合肥现代产业园区", "value": "341271" }, { "label": "阜阳经济技术开发区", "value": "341272" }, { "label": "界首市", "value": "341282" }], [{ "label": "埇桥区", "value": "341302" }, { "label": "砀山县", "value": "341321" }, { "label": "萧县", "value": "341322" }, { "label": "灵璧县", "value": "341323" }, { "label": "泗县", "value": "341324" }, { "label": "宿州马鞍山现代产业园区", "value": "341371" }, { "label": "宿州经济技术开发区", "value": "341372" }], [{ "label": "金安区", "value": "341502" }, { "label": "裕安区", "value": "341503" }, { "label": "叶集区", "value": "341504" }, { "label": "霍邱县", "value": "341522" }, { "label": "舒城县", "value": "341523" }, { "label": "金寨县", "value": "341524" }, { "label": "霍山县", "value": "341525" }], [{ "label": "谯城区", "value": "341602" }, { "label": "涡阳县", "value": "341621" }, { "label": "蒙城县", "value": "341622" }, { "label": "利辛县", "value": "341623" }], [{ "label": "贵池区", "value": "341702" }, { "label": "东至县", "value": "341721" }, { "label": "石台县", "value": "341722" }, { "label": "青阳县", "value": "341723" }], [{ "label": "宣州区", "value": "341802" }, { "label": "郎溪县", "value": "341821" }, { "label": "广德县", "value": "341822" }, { "label": "泾县", "value": "341823" }, { "label": "绩溪县", "value": "341824" }, { "label": "旌德县", "value": "341825" }, { "label": "宣城市经济开发区", "value": "341871" }, { "label": "宁国市", "value": "341881" }]], [[{ "label": "鼓楼区", "value": "350102" }, { "label": "台江区", "value": "350103" }, { "label": "仓山区", "value": "350104" }, { "label": "马尾区", "value": "350105" }, { "label": "晋安区", "value": "350111" }, { "label": "闽侯县", "value": "350121" }, { "label": "连江县", "value": "350122" }, { "label": "罗源县", "value": "350123" }, { "label": "闽清县", "value": "350124" }, { "label": "永泰县", "value": "350125" }, { "label": "平潭县", "value": "350128" }, { "label": "福清市", "value": "350181" }, { "label": "长乐市", "value": "350182" }], [{ "label": "思明区", "value": "350203" }, { "label": "海沧区", "value": "350205" }, { "label": "湖里区", "value": "350206" }, { "label": "集美区", "value": "350211" }, { "label": "同安区", "value": "350212" }, { "label": "翔安区", "value": "350213" }], [{ "label": "城厢区", "value": "350302" }, { "label": "涵江区", "value": "350303" }, { "label": "荔城区", "value": "350304" }, { "label": "秀屿区", "value": "350305" }, { "label": "仙游县", "value": "350322" }], [{ "label": "梅列区", "value": "350402" }, { "label": "三元区", "value": "350403" }, { "label": "明溪县", "value": "350421" }, { "label": "清流县", "value": "350423" }, { "label": "宁化县", "value": "350424" }, { "label": "大田县", "value": "350425" }, { "label": "尤溪县", "value": "350426" }, { "label": "沙县", "value": "350427" }, { "label": "将乐县", "value": "350428" }, { "label": "泰宁县", "value": "350429" }, { "label": "建宁县", "value": "350430" }, { "label": "永安市", "value": "350481" }], [{ "label": "鲤城区", "value": "350502" }, { "label": "丰泽区", "value": "350503" }, { "label": "洛江区", "value": "350504" }, { "label": "泉港区", "value": "350505" }, { "label": "惠安县", "value": "350521" }, { "label": "安溪县", "value": "350524" }, { "label": "永春县", "value": "350525" }, { "label": "德化县", "value": "350526" }, { "label": "金门县", "value": "350527" }, { "label": "石狮市", "value": "350581" }, { "label": "晋江市", "value": "350582" }, { "label": "南安市", "value": "350583" }], [{ "label": "芗城区", "value": "350602" }, { "label": "龙文区", "value": "350603" }, { "label": "云霄县", "value": "350622" }, { "label": "漳浦县", "value": "350623" }, { "label": "诏安县", "value": "350624" }, { "label": "长泰县", "value": "350625" }, { "label": "东山县", "value": "350626" }, { "label": "南靖县", "value": "350627" }, { "label": "平和县", "value": "350628" }, { "label": "华安县", "value": "350629" }, { "label": "龙海市", "value": "350681" }], [{ "label": "延平区", "value": "350702" }, { "label": "建阳区", "value": "350703" }, { "label": "顺昌县", "value": "350721" }, { "label": "浦城县", "value": "350722" }, { "label": "光泽县", "value": "350723" }, { "label": "松溪县", "value": "350724" }, { "label": "政和县", "value": "350725" }, { "label": "邵武市", "value": "350781" }, { "label": "武夷山市", "value": "350782" }, { "label": "建瓯市", "value": "350783" }], [{ "label": "新罗区", "value": "350802" }, { "label": "永定区", "value": "350803" }, { "label": "长汀县", "value": "350821" }, { "label": "上杭县", "value": "350823" }, { "label": "武平县", "value": "350824" }, { "label": "连城县", "value": "350825" }, { "label": "漳平市", "value": "350881" }], [{ "label": "蕉城区", "value": "350902" }, { "label": "霞浦县", "value": "350921" }, { "label": "古田县", "value": "350922" }, { "label": "屏南县", "value": "350923" }, { "label": "寿宁县", "value": "350924" }, { "label": "周宁县", "value": "350925" }, { "label": "柘荣县", "value": "350926" }, { "label": "福安市", "value": "350981" }, { "label": "福鼎市", "value": "350982" }]], [[{ "label": "东湖区", "value": "360102" }, { "label": "西湖区", "value": "360103" }, { "label": "青云谱区", "value": "360104" }, { "label": "湾里区", "value": "360105" }, { "label": "青山湖区", "value": "360111" }, { "label": "新建区", "value": "360112" }, { "label": "南昌县", "value": "360121" }, { "label": "安义县", "value": "360123" }, { "label": "进贤县", "value": "360124" }], [{ "label": "昌江区", "value": "360202" }, { "label": "珠山区", "value": "360203" }, { "label": "浮梁县", "value": "360222" }, { "label": "乐平市", "value": "360281" }], [{ "label": "安源区", "value": "360302" }, { "label": "湘东区", "value": "360313" }, { "label": "莲花县", "value": "360321" }, { "label": "上栗县", "value": "360322" }, { "label": "芦溪县", "value": "360323" }], [{ "label": "濂溪区", "value": "360402" }, { "label": "浔阳区", "value": "360403" }, { "label": "柴桑区", "value": "360404" }, { "label": "武宁县", "value": "360423" }, { "label": "修水县", "value": "360424" }, { "label": "永修县", "value": "360425" }, { "label": "德安县", "value": "360426" }, { "label": "都昌县", "value": "360428" }, { "label": "湖口县", "value": "360429" }, { "label": "彭泽县", "value": "360430" }, { "label": "瑞昌市", "value": "360481" }, { "label": "共青城市", "value": "360482" }, { "label": "庐山市", "value": "360483" }], [{ "label": "渝水区", "value": "360502" }, { "label": "分宜县", "value": "360521" }], [{ "label": "月湖区", "value": "360602" }, { "label": "余江县", "value": "360622" }, { "label": "贵溪市", "value": "360681" }], [{ "label": "章贡区", "value": "360702" }, { "label": "南康区", "value": "360703" }, { "label": "赣县区", "value": "360704" }, { "label": "信丰县", "value": "360722" }, { "label": "大余县", "value": "360723" }, { "label": "上犹县", "value": "360724" }, { "label": "崇义县", "value": "360725" }, { "label": "安远县", "value": "360726" }, { "label": "龙南县", "value": "360727" }, { "label": "定南县", "value": "360728" }, { "label": "全南县", "value": "360729" }, { "label": "宁都县", "value": "360730" }, { "label": "于都县", "value": "360731" }, { "label": "兴国县", "value": "360732" }, { "label": "会昌县", "value": "360733" }, { "label": "寻乌县", "value": "360734" }, { "label": "石城县", "value": "360735" }, { "label": "瑞金市", "value": "360781" }], [{ "label": "吉州区", "value": "360802" }, { "label": "青原区", "value": "360803" }, { "label": "吉安县", "value": "360821" }, { "label": "吉水县", "value": "360822" }, { "label": "峡江县", "value": "360823" }, { "label": "新干县", "value": "360824" }, { "label": "永丰县", "value": "360825" }, { "label": "泰和县", "value": "360826" }, { "label": "遂川县", "value": "360827" }, { "label": "万安县", "value": "360828" }, { "label": "安福县", "value": "360829" }, { "label": "永新县", "value": "360830" }, { "label": "井冈山市", "value": "360881" }], [{ "label": "袁州区", "value": "360902" }, { "label": "奉新县", "value": "360921" }, { "label": "万载县", "value": "360922" }, { "label": "上高县", "value": "360923" }, { "label": "宜丰县", "value": "360924" }, { "label": "靖安县", "value": "360925" }, { "label": "铜鼓县", "value": "360926" }, { "label": "丰城市", "value": "360981" }, { "label": "樟树市", "value": "360982" }, { "label": "高安市", "value": "360983" }], [{ "label": "临川区", "value": "361002" }, { "label": "东乡区", "value": "361003" }, { "label": "南城县", "value": "361021" }, { "label": "黎川县", "value": "361022" }, { "label": "南丰县", "value": "361023" }, { "label": "崇仁县", "value": "361024" }, { "label": "乐安县", "value": "361025" }, { "label": "宜黄县", "value": "361026" }, { "label": "金溪县", "value": "361027" }, { "label": "资溪县", "value": "361028" }, { "label": "广昌县", "value": "361030" }], [{ "label": "信州区", "value": "361102" }, { "label": "广丰区", "value": "361103" }, { "label": "上饶县", "value": "361121" }, { "label": "玉山县", "value": "361123" }, { "label": "铅山县", "value": "361124" }, { "label": "横峰县", "value": "361125" }, { "label": "弋阳县", "value": "361126" }, { "label": "余干县", "value": "361127" }, { "label": "鄱阳县", "value": "361128" }, { "label": "万年县", "value": "361129" }, { "label": "婺源县", "value": "361130" }, { "label": "德兴市", "value": "361181" }]], [[{ "label": "历下区", "value": "370102" }, { "label": "市中区", "value": "370103" }, { "label": "槐荫区", "value": "370104" }, { "label": "天桥区", "value": "370105" }, { "label": "历城区", "value": "370112" }, { "label": "长清区", "value": "370113" }, { "label": "章丘区", "value": "370114" }, { "label": "平阴县", "value": "370124" }, { "label": "济阳县", "value": "370125" }, { "label": "商河县", "value": "370126" }, { "label": "济南高新技术产业开发区", "value": "370171" }], [{ "label": "市南区", "value": "370202" }, { "label": "市北区", "value": "370203" }, { "label": "黄岛区", "value": "370211" }, { "label": "崂山区", "value": "370212" }, { "label": "李沧区", "value": "370213" }, { "label": "城阳区", "value": "370214" }, { "label": "即墨区", "value": "370215" }, { "label": "青岛高新技术产业开发区", "value": "370271" }, { "label": "胶州市", "value": "370281" }, { "label": "平度市", "value": "370283" }, { "label": "莱西市", "value": "370285" }], [{ "label": "淄川区", "value": "370302" }, { "label": "张店区", "value": "370303" }, { "label": "博山区", "value": "370304" }, { "label": "临淄区", "value": "370305" }, { "label": "周村区", "value": "370306" }, { "label": "桓台县", "value": "370321" }, { "label": "高青县", "value": "370322" }, { "label": "沂源县", "value": "370323" }], [{ "label": "市中区", "value": "370402" }, { "label": "薛城区", "value": "370403" }, { "label": "峄城区", "value": "370404" }, { "label": "台儿庄区", "value": "370405" }, { "label": "山亭区", "value": "370406" }, { "label": "滕州市", "value": "370481" }], [{ "label": "东营区", "value": "370502" }, { "label": "河口区", "value": "370503" }, { "label": "垦利区", "value": "370505" }, { "label": "利津县", "value": "370522" }, { "label": "广饶县", "value": "370523" }, { "label": "东营经济技术开发区", "value": "370571" }, { "label": "东营港经济开发区", "value": "370572" }], [{ "label": "芝罘区", "value": "370602" }, { "label": "福山区", "value": "370611" }, { "label": "牟平区", "value": "370612" }, { "label": "莱山区", "value": "370613" }, { "label": "长岛县", "value": "370634" }, { "label": "烟台高新技术产业开发区", "value": "370671" }, { "label": "烟台经济技术开发区", "value": "370672" }, { "label": "龙口市", "value": "370681" }, { "label": "莱阳市", "value": "370682" }, { "label": "莱州市", "value": "370683" }, { "label": "蓬莱市", "value": "370684" }, { "label": "招远市", "value": "370685" }, { "label": "栖霞市", "value": "370686" }, { "label": "海阳市", "value": "370687" }], [{ "label": "潍城区", "value": "370702" }, { "label": "寒亭区", "value": "370703" }, { "label": "坊子区", "value": "370704" }, { "label": "奎文区", "value": "370705" }, { "label": "临朐县", "value": "370724" }, { "label": "昌乐县", "value": "370725" }, { "label": "潍坊滨海经济技术开发区", "value": "370772" }, { "label": "青州市", "value": "370781" }, { "label": "诸城市", "value": "370782" }, { "label": "寿光市", "value": "370783" }, { "label": "安丘市", "value": "370784" }, { "label": "高密市", "value": "370785" }, { "label": "昌邑市", "value": "370786" }], [{ "label": "任城区", "value": "370811" }, { "label": "兖州区", "value": "370812" }, { "label": "微山县", "value": "370826" }, { "label": "鱼台县", "value": "370827" }, { "label": "金乡县", "value": "370828" }, { "label": "嘉祥县", "value": "370829" }, { "label": "汶上县", "value": "370830" }, { "label": "泗水县", "value": "370831" }, { "label": "梁山县", "value": "370832" }, { "label": "济宁高新技术产业开发区", "value": "370871" }, { "label": "曲阜市", "value": "370881" }, { "label": "邹城市", "value": "370883" }], [{ "label": "泰山区", "value": "370902" }, { "label": "岱岳区", "value": "370911" }, { "label": "宁阳县", "value": "370921" }, { "label": "东平县", "value": "370923" }, { "label": "新泰市", "value": "370982" }, { "label": "肥城市", "value": "370983" }], [{ "label": "环翠区", "value": "371002" }, { "label": "文登区", "value": "371003" }, { "label": "威海火炬高技术产业开发区", "value": "371071" }, { "label": "威海经济技术开发区", "value": "371072" }, { "label": "威海临港经济技术开发区", "value": "371073" }, { "label": "荣成市", "value": "371082" }, { "label": "乳山市", "value": "371083" }], [{ "label": "东港区", "value": "371102" }, { "label": "岚山区", "value": "371103" }, { "label": "五莲县", "value": "371121" }, { "label": "莒县", "value": "371122" }, { "label": "日照经济技术开发区", "value": "371171" }, { "label": "日照国际海洋城", "value": "371172" }], [{ "label": "莱城区", "value": "371202" }, { "label": "钢城区", "value": "371203" }], [{ "label": "兰山区", "value": "371302" }, { "label": "罗庄区", "value": "371311" }, { "label": "河东区", "value": "371312" }, { "label": "沂南县", "value": "371321" }, { "label": "郯城县", "value": "371322" }, { "label": "沂水县", "value": "371323" }, { "label": "兰陵县", "value": "371324" }, { "label": "费县", "value": "371325" }, { "label": "平邑县", "value": "371326" }, { "label": "莒南县", "value": "371327" }, { "label": "蒙阴县", "value": "371328" }, { "label": "临沭县", "value": "371329" }, { "label": "临沂高新技术产业开发区", "value": "371371" }, { "label": "临沂经济技术开发区", "value": "371372" }, { "label": "临沂临港经济开发区", "value": "371373" }], [{ "label": "德城区", "value": "371402" }, { "label": "陵城区", "value": "371403" }, { "label": "宁津县", "value": "371422" }, { "label": "庆云县", "value": "371423" }, { "label": "临邑县", "value": "371424" }, { "label": "齐河县", "value": "371425" }, { "label": "平原县", "value": "371426" }, { "label": "夏津县", "value": "371427" }, { "label": "武城县", "value": "371428" }, { "label": "德州经济技术开发区", "value": "371471" }, { "label": "德州运河经济开发区", "value": "371472" }, { "label": "乐陵市", "value": "371481" }, { "label": "禹城市", "value": "371482" }], [{ "label": "东昌府区", "value": "371502" }, { "label": "阳谷县", "value": "371521" }, { "label": "莘县", "value": "371522" }, { "label": "茌平县", "value": "371523" }, { "label": "东阿县", "value": "371524" }, { "label": "冠县", "value": "371525" }, { "label": "高唐县", "value": "371526" }, { "label": "临清市", "value": "371581" }], [{ "label": "滨城区", "value": "371602" }, { "label": "沾化区", "value": "371603" }, { "label": "惠民县", "value": "371621" }, { "label": "阳信县", "value": "371622" }, { "label": "无棣县", "value": "371623" }, { "label": "博兴县", "value": "371625" }, { "label": "邹平县", "value": "371626" }], [{ "label": "牡丹区", "value": "371702" }, { "label": "定陶区", "value": "371703" }, { "label": "曹县", "value": "371721" }, { "label": "单县", "value": "371722" }, { "label": "成武县", "value": "371723" }, { "label": "巨野县", "value": "371724" }, { "label": "郓城县", "value": "371725" }, { "label": "鄄城县", "value": "371726" }, { "label": "东明县", "value": "371728" }, { "label": "菏泽经济技术开发区", "value": "371771" }, { "label": "菏泽高新技术开发区", "value": "371772" }]], [[{ "label": "中原区", "value": "410102" }, { "label": "二七区", "value": "410103" }, { "label": "管城回族区", "value": "410104" }, { "label": "金水区", "value": "410105" }, { "label": "上街区", "value": "410106" }, { "label": "惠济区", "value": "410108" }, { "label": "中牟县", "value": "410122" }, { "label": "郑州经济技术开发区", "value": "410171" }, { "label": "郑州高新技术产业开发区", "value": "410172" }, { "label": "郑州航空港经济综合实验区", "value": "410173" }, { "label": "巩义市", "value": "410181" }, { "label": "荥阳市", "value": "410182" }, { "label": "新密市", "value": "410183" }, { "label": "新郑市", "value": "410184" }, { "label": "登封市", "value": "410185" }], [{ "label": "龙亭区", "value": "410202" }, { "label": "顺河回族区", "value": "410203" }, { "label": "鼓楼区", "value": "410204" }, { "label": "禹王台区", "value": "410205" }, { "label": "祥符区", "value": "410212" }, { "label": "杞县", "value": "410221" }, { "label": "通许县", "value": "410222" }, { "label": "尉氏县", "value": "410223" }, { "label": "兰考县", "value": "410225" }], [{ "label": "老城区", "value": "410302" }, { "label": "西工区", "value": "410303" }, { "label": "瀍河回族区", "value": "410304" }, { "label": "涧西区", "value": "410305" }, { "label": "吉利区", "value": "410306" }, { "label": "洛龙区", "value": "410311" }, { "label": "孟津县", "value": "410322" }, { "label": "新安县", "value": "410323" }, { "label": "栾川县", "value": "410324" }, { "label": "嵩县", "value": "410325" }, { "label": "汝阳县", "value": "410326" }, { "label": "宜阳县", "value": "410327" }, { "label": "洛宁县", "value": "410328" }, { "label": "伊川县", "value": "410329" }, { "label": "洛阳高新技术产业开发区", "value": "410371" }, { "label": "偃师市", "value": "410381" }], [{ "label": "新华区", "value": "410402" }, { "label": "卫东区", "value": "410403" }, { "label": "石龙区", "value": "410404" }, { "label": "湛河区", "value": "410411" }, { "label": "宝丰县", "value": "410421" }, { "label": "叶县", "value": "410422" }, { "label": "鲁山县", "value": "410423" }, { "label": "郏县", "value": "410425" }, { "label": "平顶山高新技术产业开发区", "value": "410471" }, { "label": "平顶山市新城区", "value": "410472" }, { "label": "舞钢市", "value": "410481" }, { "label": "汝州市", "value": "410482" }], [{ "label": "文峰区", "value": "410502" }, { "label": "北关区", "value": "410503" }, { "label": "殷都区", "value": "410505" }, { "label": "龙安区", "value": "410506" }, { "label": "安阳县", "value": "410522" }, { "label": "汤阴县", "value": "410523" }, { "label": "滑县", "value": "410526" }, { "label": "内黄县", "value": "410527" }, { "label": "安阳高新技术产业开发区", "value": "410571" }, { "label": "林州市", "value": "410581" }], [{ "label": "鹤山区", "value": "410602" }, { "label": "山城区", "value": "410603" }, { "label": "淇滨区", "value": "410611" }, { "label": "浚县", "value": "410621" }, { "label": "淇县", "value": "410622" }, { "label": "鹤壁经济技术开发区", "value": "410671" }], [{ "label": "红旗区", "value": "410702" }, { "label": "卫滨区", "value": "410703" }, { "label": "凤泉区", "value": "410704" }, { "label": "牧野区", "value": "410711" }, { "label": "新乡县", "value": "410721" }, { "label": "获嘉县", "value": "410724" }, { "label": "原阳县", "value": "410725" }, { "label": "延津县", "value": "410726" }, { "label": "封丘县", "value": "410727" }, { "label": "长垣县", "value": "410728" }, { "label": "新乡高新技术产业开发区", "value": "410771" }, { "label": "新乡经济技术开发区", "value": "410772" }, { "label": "新乡市平原城乡一体化示范区", "value": "410773" }, { "label": "卫辉市", "value": "410781" }, { "label": "辉县市", "value": "410782" }], [{ "label": "解放区", "value": "410802" }, { "label": "中站区", "value": "410803" }, { "label": "马村区", "value": "410804" }, { "label": "山阳区", "value": "410811" }, { "label": "修武县", "value": "410821" }, { "label": "博爱县", "value": "410822" }, { "label": "武陟县", "value": "410823" }, { "label": "温县", "value": "410825" }, { "label": "焦作城乡一体化示范区", "value": "410871" }, { "label": "沁阳市", "value": "410882" }, { "label": "孟州市", "value": "410883" }], [{ "label": "华龙区", "value": "410902" }, { "label": "清丰县", "value": "410922" }, { "label": "南乐县", "value": "410923" }, { "label": "范县", "value": "410926" }, { "label": "台前县", "value": "410927" }, { "label": "濮阳县", "value": "410928" }, { "label": "河南濮阳工业园区", "value": "410971" }, { "label": "濮阳经济技术开发区", "value": "410972" }], [{ "label": "魏都区", "value": "411002" }, { "label": "建安区", "value": "411003" }, { "label": "鄢陵县", "value": "411024" }, { "label": "襄城县", "value": "411025" }, { "label": "许昌经济技术开发区", "value": "411071" }, { "label": "禹州市", "value": "411081" }, { "label": "长葛市", "value": "411082" }], [{ "label": "源汇区", "value": "411102" }, { "label": "郾城区", "value": "411103" }, { "label": "召陵区", "value": "411104" }, { "label": "舞阳县", "value": "411121" }, { "label": "临颍县", "value": "411122" }, { "label": "漯河经济技术开发区", "value": "411171" }], [{ "label": "湖滨区", "value": "411202" }, { "label": "陕州区", "value": "411203" }, { "label": "渑池县", "value": "411221" }, { "label": "卢氏县", "value": "411224" }, { "label": "河南三门峡经济开发区", "value": "411271" }, { "label": "义马市", "value": "411281" }, { "label": "灵宝市", "value": "411282" }], [{ "label": "宛城区", "value": "411302" }, { "label": "卧龙区", "value": "411303" }, { "label": "南召县", "value": "411321" }, { "label": "方城县", "value": "411322" }, { "label": "西峡县", "value": "411323" }, { "label": "镇平县", "value": "411324" }, { "label": "内乡县", "value": "411325" }, { "label": "淅川县", "value": "411326" }, { "label": "社旗县", "value": "411327" }, { "label": "唐河县", "value": "411328" }, { "label": "新野县", "value": "411329" }, { "label": "桐柏县", "value": "411330" }, { "label": "南阳高新技术产业开发区", "value": "411371" }, { "label": "南阳市城乡一体化示范区", "value": "411372" }, { "label": "邓州市", "value": "411381" }], [{ "label": "梁园区", "value": "411402" }, { "label": "睢阳区", "value": "411403" }, { "label": "民权县", "value": "411421" }, { "label": "睢县", "value": "411422" }, { "label": "宁陵县", "value": "411423" }, { "label": "柘城县", "value": "411424" }, { "label": "虞城县", "value": "411425" }, { "label": "夏邑县", "value": "411426" }, { "label": "豫东综合物流产业聚集区", "value": "411471" }, { "label": "河南商丘经济开发区", "value": "411472" }, { "label": "永城市", "value": "411481" }], [{ "label": "浉河区", "value": "411502" }, { "label": "平桥区", "value": "411503" }, { "label": "罗山县", "value": "411521" }, { "label": "光山县", "value": "411522" }, { "label": "新县", "value": "411523" }, { "label": "商城县", "value": "411524" }, { "label": "固始县", "value": "411525" }, { "label": "潢川县", "value": "411526" }, { "label": "淮滨县", "value": "411527" }, { "label": "息县", "value": "411528" }, { "label": "信阳高新技术产业开发区", "value": "411571" }], [{ "label": "川汇区", "value": "411602" }, { "label": "扶沟县", "value": "411621" }, { "label": "西华县", "value": "411622" }, { "label": "商水县", "value": "411623" }, { "label": "沈丘县", "value": "411624" }, { "label": "郸城县", "value": "411625" }, { "label": "淮阳县", "value": "411626" }, { "label": "太康县", "value": "411627" }, { "label": "鹿邑县", "value": "411628" }, { "label": "河南周口经济开发区", "value": "411671" }, { "label": "项城市", "value": "411681" }], [{ "label": "驿城区", "value": "411702" }, { "label": "西平县", "value": "411721" }, { "label": "上蔡县", "value": "411722" }, { "label": "平舆县", "value": "411723" }, { "label": "正阳县", "value": "411724" }, { "label": "确山县", "value": "411725" }, { "label": "泌阳县", "value": "411726" }, { "label": "汝南县", "value": "411727" }, { "label": "遂平县", "value": "411728" }, { "label": "新蔡县", "value": "411729" }, { "label": "河南驻马店经济开发区", "value": "411771" }], [{ "label": "济源市", "value": "419001" }]], [[{ "label": "江岸区", "value": "420102" }, { "label": "江汉区", "value": "420103" }, { "label": "硚口区", "value": "420104" }, { "label": "汉阳区", "value": "420105" }, { "label": "武昌区", "value": "420106" }, { "label": "青山区", "value": "420107" }, { "label": "洪山区", "value": "420111" }, { "label": "东西湖区", "value": "420112" }, { "label": "汉南区", "value": "420113" }, { "label": "蔡甸区", "value": "420114" }, { "label": "江夏区", "value": "420115" }, { "label": "黄陂区", "value": "420116" }, { "label": "新洲区", "value": "420117" }], [{ "label": "黄石港区", "value": "420202" }, { "label": "西塞山区", "value": "420203" }, { "label": "下陆区", "value": "420204" }, { "label": "铁山区", "value": "420205" }, { "label": "阳新县", "value": "420222" }, { "label": "大冶市", "value": "420281" }], [{ "label": "茅箭区", "value": "420302" }, { "label": "张湾区", "value": "420303" }, { "label": "郧阳区", "value": "420304" }, { "label": "郧西县", "value": "420322" }, { "label": "竹山县", "value": "420323" }, { "label": "竹溪县", "value": "420324" }, { "label": "房县", "value": "420325" }, { "label": "丹江口市", "value": "420381" }], [{ "label": "西陵区", "value": "420502" }, { "label": "伍家岗区", "value": "420503" }, { "label": "点军区", "value": "420504" }, { "label": "猇亭区", "value": "420505" }, { "label": "夷陵区", "value": "420506" }, { "label": "远安县", "value": "420525" }, { "label": "兴山县", "value": "420526" }, { "label": "秭归县", "value": "420527" }, { "label": "长阳土家族自治县", "value": "420528" }, { "label": "五峰土家族自治县", "value": "420529" }, { "label": "宜都市", "value": "420581" }, { "label": "当阳市", "value": "420582" }, { "label": "枝江市", "value": "420583" }], [{ "label": "襄城区", "value": "420602" }, { "label": "樊城区", "value": "420606" }, { "label": "襄州区", "value": "420607" }, { "label": "南漳县", "value": "420624" }, { "label": "谷城县", "value": "420625" }, { "label": "保康县", "value": "420626" }, { "label": "老河口市", "value": "420682" }, { "label": "枣阳市", "value": "420683" }, { "label": "宜城市", "value": "420684" }], [{ "label": "梁子湖区", "value": "420702" }, { "label": "华容区", "value": "420703" }, { "label": "鄂城区", "value": "420704" }], [{ "label": "东宝区", "value": "420802" }, { "label": "掇刀区", "value": "420804" }, { "label": "京山县", "value": "420821" }, { "label": "沙洋县", "value": "420822" }, { "label": "钟祥市", "value": "420881" }], [{ "label": "孝南区", "value": "420902" }, { "label": "孝昌县", "value": "420921" }, { "label": "大悟县", "value": "420922" }, { "label": "云梦县", "value": "420923" }, { "label": "应城市", "value": "420981" }, { "label": "安陆市", "value": "420982" }, { "label": "汉川市", "value": "420984" }], [{ "label": "沙市区", "value": "421002" }, { "label": "荆州区", "value": "421003" }, { "label": "公安县", "value": "421022" }, { "label": "监利县", "value": "421023" }, { "label": "江陵县", "value": "421024" }, { "label": "荆州经济技术开发区", "value": "421071" }, { "label": "石首市", "value": "421081" }, { "label": "洪湖市", "value": "421083" }, { "label": "松滋市", "value": "421087" }], [{ "label": "黄州区", "value": "421102" }, { "label": "团风县", "value": "421121" }, { "label": "红安县", "value": "421122" }, { "label": "罗田县", "value": "421123" }, { "label": "英山县", "value": "421124" }, { "label": "浠水县", "value": "421125" }, { "label": "蕲春县", "value": "421126" }, { "label": "黄梅县", "value": "421127" }, { "label": "龙感湖管理区", "value": "421171" }, { "label": "麻城市", "value": "421181" }, { "label": "武穴市", "value": "421182" }], [{ "label": "咸安区", "value": "421202" }, { "label": "嘉鱼县", "value": "421221" }, { "label": "通城县", "value": "421222" }, { "label": "崇阳县", "value": "421223" }, { "label": "通山县", "value": "421224" }, { "label": "赤壁市", "value": "421281" }], [{ "label": "曾都区", "value": "421303" }, { "label": "随县", "value": "421321" }, { "label": "广水市", "value": "421381" }], [{ "label": "恩施市", "value": "422801" }, { "label": "利川市", "value": "422802" }, { "label": "建始县", "value": "422822" }, { "label": "巴东县", "value": "422823" }, { "label": "宣恩县", "value": "422825" }, { "label": "咸丰县", "value": "422826" }, { "label": "来凤县", "value": "422827" }, { "label": "鹤峰县", "value": "422828" }], [{ "label": "仙桃市", "value": "429004" }, { "label": "潜江市", "value": "429005" }, { "label": "天门市", "value": "429006" }, { "label": "神农架林区", "value": "429021" }]], [[{ "label": "芙蓉区", "value": "430102" }, { "label": "天心区", "value": "430103" }, { "label": "岳麓区", "value": "430104" }, { "label": "开福区", "value": "430105" }, { "label": "雨花区", "value": "430111" }, { "label": "望城区", "value": "430112" }, { "label": "长沙县", "value": "430121" }, { "label": "浏阳市", "value": "430181" }, { "label": "宁乡市", "value": "430182" }], [{ "label": "荷塘区", "value": "430202" }, { "label": "芦淞区", "value": "430203" }, { "label": "石峰区", "value": "430204" }, { "label": "天元区", "value": "430211" }, { "label": "株洲县", "value": "430221" }, { "label": "攸县", "value": "430223" }, { "label": "茶陵县", "value": "430224" }, { "label": "炎陵县", "value": "430225" }, { "label": "云龙示范区", "value": "430271" }, { "label": "醴陵市", "value": "430281" }], [{ "label": "雨湖区", "value": "430302" }, { "label": "岳塘区", "value": "430304" }, { "label": "湘潭县", "value": "430321" }, { "label": "湖南湘潭高新技术产业园区", "value": "430371" }, { "label": "湘潭昭山示范区", "value": "430372" }, { "label": "湘潭九华示范区", "value": "430373" }, { "label": "湘乡市", "value": "430381" }, { "label": "韶山市", "value": "430382" }], [{ "label": "珠晖区", "value": "430405" }, { "label": "雁峰区", "value": "430406" }, { "label": "石鼓区", "value": "430407" }, { "label": "蒸湘区", "value": "430408" }, { "label": "南岳区", "value": "430412" }, { "label": "衡阳县", "value": "430421" }, { "label": "衡南县", "value": "430422" }, { "label": "衡山县", "value": "430423" }, { "label": "衡东县", "value": "430424" }, { "label": "祁东县", "value": "430426" }, { "label": "衡阳综合保税区", "value": "430471" }, { "label": "湖南衡阳高新技术产业园区", "value": "430472" }, { "label": "湖南衡阳松木经济开发区", "value": "430473" }, { "label": "耒阳市", "value": "430481" }, { "label": "常宁市", "value": "430482" }], [{ "label": "双清区", "value": "430502" }, { "label": "大祥区", "value": "430503" }, { "label": "北塔区", "value": "430511" }, { "label": "邵东县", "value": "430521" }, { "label": "新邵县", "value": "430522" }, { "label": "邵阳县", "value": "430523" }, { "label": "隆回县", "value": "430524" }, { "label": "洞口县", "value": "430525" }, { "label": "绥宁县", "value": "430527" }, { "label": "新宁县", "value": "430528" }, { "label": "城步苗族自治县", "value": "430529" }, { "label": "武冈市", "value": "430581" }], [{ "label": "岳阳楼区", "value": "430602" }, { "label": "云溪区", "value": "430603" }, { "label": "君山区", "value": "430611" }, { "label": "岳阳县", "value": "430621" }, { "label": "华容县", "value": "430623" }, { "label": "湘阴县", "value": "430624" }, { "label": "平江县", "value": "430626" }, { "label": "岳阳市屈原管理区", "value": "430671" }, { "label": "汨罗市", "value": "430681" }, { "label": "临湘市", "value": "430682" }], [{ "label": "武陵区", "value": "430702" }, { "label": "鼎城区", "value": "430703" }, { "label": "安乡县", "value": "430721" }, { "label": "汉寿县", "value": "430722" }, { "label": "澧县", "value": "430723" }, { "label": "临澧县", "value": "430724" }, { "label": "桃源县", "value": "430725" }, { "label": "石门县", "value": "430726" }, { "label": "常德市西洞庭管理区", "value": "430771" }, { "label": "津市市", "value": "430781" }], [{ "label": "永定区", "value": "430802" }, { "label": "武陵源区", "value": "430811" }, { "label": "慈利县", "value": "430821" }, { "label": "桑植县", "value": "430822" }], [{ "label": "资阳区", "value": "430902" }, { "label": "赫山区", "value": "430903" }, { "label": "南县", "value": "430921" }, { "label": "桃江县", "value": "430922" }, { "label": "安化县", "value": "430923" }, { "label": "益阳市大通湖管理区", "value": "430971" }, { "label": "湖南益阳高新技术产业园区", "value": "430972" }, { "label": "沅江市", "value": "430981" }], [{ "label": "北湖区", "value": "431002" }, { "label": "苏仙区", "value": "431003" }, { "label": "桂阳县", "value": "431021" }, { "label": "宜章县", "value": "431022" }, { "label": "永兴县", "value": "431023" }, { "label": "嘉禾县", "value": "431024" }, { "label": "临武县", "value": "431025" }, { "label": "汝城县", "value": "431026" }, { "label": "桂东县", "value": "431027" }, { "label": "安仁县", "value": "431028" }, { "label": "资兴市", "value": "431081" }], [{ "label": "零陵区", "value": "431102" }, { "label": "冷水滩区", "value": "431103" }, { "label": "祁阳县", "value": "431121" }, { "label": "东安县", "value": "431122" }, { "label": "双牌县", "value": "431123" }, { "label": "道县", "value": "431124" }, { "label": "江永县", "value": "431125" }, { "label": "宁远县", "value": "431126" }, { "label": "蓝山县", "value": "431127" }, { "label": "新田县", "value": "431128" }, { "label": "江华瑶族自治县", "value": "431129" }, { "label": "永州经济技术开发区", "value": "431171" }, { "label": "永州市金洞管理区", "value": "431172" }, { "label": "永州市回龙圩管理区", "value": "431173" }], [{ "label": "鹤城区", "value": "431202" }, { "label": "中方县", "value": "431221" }, { "label": "沅陵县", "value": "431222" }, { "label": "辰溪县", "value": "431223" }, { "label": "溆浦县", "value": "431224" }, { "label": "会同县", "value": "431225" }, { "label": "麻阳苗族自治县", "value": "431226" }, { "label": "新晃侗族自治县", "value": "431227" }, { "label": "芷江侗族自治县", "value": "431228" }, { "label": "靖州苗族侗族自治县", "value": "431229" }, { "label": "通道侗族自治县", "value": "431230" }, { "label": "怀化市洪江管理区", "value": "431271" }, { "label": "洪江市", "value": "431281" }], [{ "label": "娄星区", "value": "431302" }, { "label": "双峰县", "value": "431321" }, { "label": "新化县", "value": "431322" }, { "label": "冷水江市", "value": "431381" }, { "label": "涟源市", "value": "431382" }], [{ "label": "吉首市", "value": "433101" }, { "label": "泸溪县", "value": "433122" }, { "label": "凤凰县", "value": "433123" }, { "label": "花垣县", "value": "433124" }, { "label": "保靖县", "value": "433125" }, { "label": "古丈县", "value": "433126" }, { "label": "永顺县", "value": "433127" }, { "label": "龙山县", "value": "433130" }, { "label": "湖南吉首经济开发区", "value": "433172" }, { "label": "湖南永顺经济开发区", "value": "433173" }]], [[{ "label": "荔湾区", "value": "440103" }, { "label": "越秀区", "value": "440104" }, { "label": "海珠区", "value": "440105" }, { "label": "天河区", "value": "440106" }, { "label": "白云区", "value": "440111" }, { "label": "黄埔区", "value": "440112" }, { "label": "番禺区", "value": "440113" }, { "label": "花都区", "value": "440114" }, { "label": "南沙区", "value": "440115" }, { "label": "从化区", "value": "440117" }, { "label": "增城区", "value": "440118" }], [{ "label": "武江区", "value": "440203" }, { "label": "浈江区", "value": "440204" }, { "label": "曲江区", "value": "440205" }, { "label": "始兴县", "value": "440222" }, { "label": "仁化县", "value": "440224" }, { "label": "翁源县", "value": "440229" }, { "label": "乳源瑶族自治县", "value": "440232" }, { "label": "新丰县", "value": "440233" }, { "label": "乐昌市", "value": "440281" }, { "label": "南雄市", "value": "440282" }], [{ "label": "罗湖区", "value": "440303" }, { "label": "福田区", "value": "440304" }, { "label": "南山区", "value": "440305" }, { "label": "宝安区", "value": "440306" }, { "label": "龙岗区", "value": "440307" }, { "label": "盐田区", "value": "440308" }, { "label": "龙华区", "value": "440309" }, { "label": "坪山区", "value": "440310" }], [{ "label": "香洲区", "value": "440402" }, { "label": "斗门区", "value": "440403" }, { "label": "金湾区", "value": "440404" }], [{ "label": "龙湖区", "value": "440507" }, { "label": "金平区", "value": "440511" }, { "label": "濠江区", "value": "440512" }, { "label": "潮阳区", "value": "440513" }, { "label": "潮南区", "value": "440514" }, { "label": "澄海区", "value": "440515" }, { "label": "南澳县", "value": "440523" }], [{ "label": "禅城区", "value": "440604" }, { "label": "南海区", "value": "440605" }, { "label": "顺德区", "value": "440606" }, { "label": "三水区", "value": "440607" }, { "label": "高明区", "value": "440608" }], [{ "label": "蓬江区", "value": "440703" }, { "label": "江海区", "value": "440704" }, { "label": "新会区", "value": "440705" }, { "label": "台山市", "value": "440781" }, { "label": "开平市", "value": "440783" }, { "label": "鹤山市", "value": "440784" }, { "label": "恩平市", "value": "440785" }], [{ "label": "赤坎区", "value": "440802" }, { "label": "霞山区", "value": "440803" }, { "label": "坡头区", "value": "440804" }, { "label": "麻章区", "value": "440811" }, { "label": "遂溪县", "value": "440823" }, { "label": "徐闻县", "value": "440825" }, { "label": "廉江市", "value": "440881" }, { "label": "雷州市", "value": "440882" }, { "label": "吴川市", "value": "440883" }], [{ "label": "茂南区", "value": "440902" }, { "label": "电白区", "value": "440904" }, { "label": "高州市", "value": "440981" }, { "label": "化州市", "value": "440982" }, { "label": "信宜市", "value": "440983" }], [{ "label": "端州区", "value": "441202" }, { "label": "鼎湖区", "value": "441203" }, { "label": "高要区", "value": "441204" }, { "label": "广宁县", "value": "441223" }, { "label": "怀集县", "value": "441224" }, { "label": "封开县", "value": "441225" }, { "label": "德庆县", "value": "441226" }, { "label": "四会市", "value": "441284" }], [{ "label": "惠城区", "value": "441302" }, { "label": "惠阳区", "value": "441303" }, { "label": "博罗县", "value": "441322" }, { "label": "惠东县", "value": "441323" }, { "label": "龙门县", "value": "441324" }], [{ "label": "梅江区", "value": "441402" }, { "label": "梅县区", "value": "441403" }, { "label": "大埔县", "value": "441422" }, { "label": "丰顺县", "value": "441423" }, { "label": "五华县", "value": "441424" }, { "label": "平远县", "value": "441426" }, { "label": "蕉岭县", "value": "441427" }, { "label": "兴宁市", "value": "441481" }], [{ "label": "城区", "value": "441502" }, { "label": "海丰县", "value": "441521" }, { "label": "陆河县", "value": "441523" }, { "label": "陆丰市", "value": "441581" }], [{ "label": "源城区", "value": "441602" }, { "label": "紫金县", "value": "441621" }, { "label": "龙川县", "value": "441622" }, { "label": "连平县", "value": "441623" }, { "label": "和平县", "value": "441624" }, { "label": "东源县", "value": "441625" }], [{ "label": "江城区", "value": "441702" }, { "label": "阳东区", "value": "441704" }, { "label": "阳西县", "value": "441721" }, { "label": "阳春市", "value": "441781" }], [{ "label": "清城区", "value": "441802" }, { "label": "清新区", "value": "441803" }, { "label": "佛冈县", "value": "441821" }, { "label": "阳山县", "value": "441823" }, { "label": "连山壮族瑶族自治县", "value": "441825" }, { "label": "连南瑶族自治县", "value": "441826" }, { "label": "英德市", "value": "441881" }, { "label": "连州市", "value": "441882" }], [{ "label": "东莞市", "value": "441900" }], [{ "label": "中山市", "value": "442000" }], [{ "label": "湘桥区", "value": "445102" }, { "label": "潮安区", "value": "445103" }, { "label": "饶平县", "value": "445122" }], [{ "label": "榕城区", "value": "445202" }, { "label": "揭东区", "value": "445203" }, { "label": "揭西县", "value": "445222" }, { "label": "惠来县", "value": "445224" }, { "label": "普宁市", "value": "445281" }], [{ "label": "云城区", "value": "445302" }, { "label": "云安区", "value": "445303" }, { "label": "新兴县", "value": "445321" }, { "label": "郁南县", "value": "445322" }, { "label": "罗定市", "value": "445381" }]], [[{ "label": "兴宁区", "value": "450102" }, { "label": "青秀区", "value": "450103" }, { "label": "江南区", "value": "450105" }, { "label": "西乡塘区", "value": "450107" }, { "label": "良庆区", "value": "450108" }, { "label": "邕宁区", "value": "450109" }, { "label": "武鸣区", "value": "450110" }, { "label": "隆安县", "value": "450123" }, { "label": "马山县", "value": "450124" }, { "label": "上林县", "value": "450125" }, { "label": "宾阳县", "value": "450126" }, { "label": "横县", "value": "450127" }], [{ "label": "城中区", "value": "450202" }, { "label": "鱼峰区", "value": "450203" }, { "label": "柳南区", "value": "450204" }, { "label": "柳北区", "value": "450205" }, { "label": "柳江区", "value": "450206" }, { "label": "柳城县", "value": "450222" }, { "label": "鹿寨县", "value": "450223" }, { "label": "融安县", "value": "450224" }, { "label": "融水苗族自治县", "value": "450225" }, { "label": "三江侗族自治县", "value": "450226" }], [{ "label": "秀峰区", "value": "450302" }, { "label": "叠彩区", "value": "450303" }, { "label": "象山区", "value": "450304" }, { "label": "七星区", "value": "450305" }, { "label": "雁山区", "value": "450311" }, { "label": "临桂区", "value": "450312" }, { "label": "阳朔县", "value": "450321" }, { "label": "灵川县", "value": "450323" }, { "label": "全州县", "value": "450324" }, { "label": "兴安县", "value": "450325" }, { "label": "永福县", "value": "450326" }, { "label": "灌阳县", "value": "450327" }, { "label": "龙胜各族自治县", "value": "450328" }, { "label": "资源县", "value": "450329" }, { "label": "平乐县", "value": "450330" }, { "label": "荔浦县", "value": "450331" }, { "label": "恭城瑶族自治县", "value": "450332" }], [{ "label": "万秀区", "value": "450403" }, { "label": "长洲区", "value": "450405" }, { "label": "龙圩区", "value": "450406" }, { "label": "苍梧县", "value": "450421" }, { "label": "藤县", "value": "450422" }, { "label": "蒙山县", "value": "450423" }, { "label": "岑溪市", "value": "450481" }], [{ "label": "海城区", "value": "450502" }, { "label": "银海区", "value": "450503" }, { "label": "铁山港区", "value": "450512" }, { "label": "合浦县", "value": "450521" }], [{ "label": "港口区", "value": "450602" }, { "label": "防城区", "value": "450603" }, { "label": "上思县", "value": "450621" }, { "label": "东兴市", "value": "450681" }], [{ "label": "钦南区", "value": "450702" }, { "label": "钦北区", "value": "450703" }, { "label": "灵山县", "value": "450721" }, { "label": "浦北县", "value": "450722" }], [{ "label": "港北区", "value": "450802" }, { "label": "港南区", "value": "450803" }, { "label": "覃塘区", "value": "450804" }, { "label": "平南县", "value": "450821" }, { "label": "桂平市", "value": "450881" }], [{ "label": "玉州区", "value": "450902" }, { "label": "福绵区", "value": "450903" }, { "label": "容县", "value": "450921" }, { "label": "陆川县", "value": "450922" }, { "label": "博白县", "value": "450923" }, { "label": "兴业县", "value": "450924" }, { "label": "北流市", "value": "450981" }], [{ "label": "右江区", "value": "451002" }, { "label": "田阳县", "value": "451021" }, { "label": "田东县", "value": "451022" }, { "label": "平果县", "value": "451023" }, { "label": "德保县", "value": "451024" }, { "label": "那坡县", "value": "451026" }, { "label": "凌云县", "value": "451027" }, { "label": "乐业县", "value": "451028" }, { "label": "田林县", "value": "451029" }, { "label": "西林县", "value": "451030" }, { "label": "隆林各族自治县", "value": "451031" }, { "label": "靖西市", "value": "451081" }], [{ "label": "八步区", "value": "451102" }, { "label": "平桂区", "value": "451103" }, { "label": "昭平县", "value": "451121" }, { "label": "钟山县", "value": "451122" }, { "label": "富川瑶族自治县", "value": "451123" }], [{ "label": "金城江区", "value": "451202" }, { "label": "宜州区", "value": "451203" }, { "label": "南丹县", "value": "451221" }, { "label": "天峨县", "value": "451222" }, { "label": "凤山县", "value": "451223" }, { "label": "东兰县", "value": "451224" }, { "label": "罗城仫佬族自治县", "value": "451225" }, { "label": "环江毛南族自治县", "value": "451226" }, { "label": "巴马瑶族自治县", "value": "451227" }, { "label": "都安瑶族自治县", "value": "451228" }, { "label": "大化瑶族自治县", "value": "451229" }], [{ "label": "兴宾区", "value": "451302" }, { "label": "忻城县", "value": "451321" }, { "label": "象州县", "value": "451322" }, { "label": "武宣县", "value": "451323" }, { "label": "金秀瑶族自治县", "value": "451324" }, { "label": "合山市", "value": "451381" }], [{ "label": "江州区", "value": "451402" }, { "label": "扶绥县", "value": "451421" }, { "label": "宁明县", "value": "451422" }, { "label": "龙州县", "value": "451423" }, { "label": "大新县", "value": "451424" }, { "label": "天等县", "value": "451425" }, { "label": "凭祥市", "value": "451481" }]], [[{ "label": "秀英区", "value": "460105" }, { "label": "龙华区", "value": "460106" }, { "label": "琼山区", "value": "460107" }, { "label": "美兰区", "value": "460108" }], [{ "label": "海棠区", "value": "460202" }, { "label": "吉阳区", "value": "460203" }, { "label": "天涯区", "value": "460204" }, { "label": "崖州区", "value": "460205" }], [{ "label": "西沙群岛", "value": "460321" }, { "label": "南沙群岛", "value": "460322" }, { "label": "中沙群岛的岛礁及其海域", "value": "460323" }], [{ "label": "儋州市", "value": "460400" }], [{ "label": "五指山市", "value": "469001" }, { "label": "琼海市", "value": "469002" }, { "label": "文昌市", "value": "469005" }, { "label": "万宁市", "value": "469006" }, { "label": "东方市", "value": "469007" }, { "label": "定安县", "value": "469021" }, { "label": "屯昌县", "value": "469022" }, { "label": "澄迈县", "value": "469023" }, { "label": "临高县", "value": "469024" }, { "label": "白沙黎族自治县", "value": "469025" }, { "label": "昌江黎族自治县", "value": "469026" }, { "label": "乐东黎族自治县", "value": "469027" }, { "label": "陵水黎族自治县", "value": "469028" }, { "label": "保亭黎族苗族自治县", "value": "469029" }, { "label": "琼中黎族苗族自治县", "value": "469030" }]], [[{ "label": "万州区", "value": "500101" }, { "label": "涪陵区", "value": "500102" }, { "label": "渝中区", "value": "500103" }, { "label": "大渡口区", "value": "500104" }, { "label": "江北区", "value": "500105" }, { "label": "沙坪坝区", "value": "500106" }, { "label": "九龙坡区", "value": "500107" }, { "label": "南岸区", "value": "500108" }, { "label": "北碚区", "value": "500109" }, { "label": "綦江区", "value": "500110" }, { "label": "大足区", "value": "500111" }, { "label": "渝北区", "value": "500112" }, { "label": "巴南区", "value": "500113" }, { "label": "黔江区", "value": "500114" }, { "label": "长寿区", "value": "500115" }, { "label": "江津区", "value": "500116" }, { "label": "合川区", "value": "500117" }, { "label": "永川区", "value": "500118" }, { "label": "南川区", "value": "500119" }, { "label": "璧山区", "value": "500120" }, { "label": "铜梁区", "value": "500151" }, { "label": "潼南区", "value": "500152" }, { "label": "荣昌区", "value": "500153" }, { "label": "开州区", "value": "500154" }, { "label": "梁平区", "value": "500155" }, { "label": "武隆区", "value": "500156" }], [{ "label": "城口县", "value": "500229" }, { "label": "丰都县", "value": "500230" }, { "label": "垫江县", "value": "500231" }, { "label": "忠县", "value": "500233" }, { "label": "云阳县", "value": "500235" }, { "label": "奉节县", "value": "500236" }, { "label": "巫山县", "value": "500237" }, { "label": "巫溪县", "value": "500238" }, { "label": "石柱土家族自治县", "value": "500240" }, { "label": "秀山土家族苗族自治县", "value": "500241" }, { "label": "酉阳土家族苗族自治县", "value": "500242" }, { "label": "彭水苗族土家族自治县", "value": "500243" }]], [[{ "label": "锦江区", "value": "510104" }, { "label": "青羊区", "value": "510105" }, { "label": "金牛区", "value": "510106" }, { "label": "武侯区", "value": "510107" }, { "label": "成华区", "value": "510108" }, { "label": "龙泉驿区", "value": "510112" }, { "label": "青白江区", "value": "510113" }, { "label": "新都区", "value": "510114" }, { "label": "温江区", "value": "510115" }, { "label": "双流区", "value": "510116" }, { "label": "郫都区", "value": "510117" }, { "label": "金堂县", "value": "510121" }, { "label": "大邑县", "value": "510129" }, { "label": "蒲江县", "value": "510131" }, { "label": "新津县", "value": "510132" }, { "label": "都江堰市", "value": "510181" }, { "label": "彭州市", "value": "510182" }, { "label": "邛崃市", "value": "510183" }, { "label": "崇州市", "value": "510184" }, { "label": "简阳市", "value": "510185" }], [{ "label": "自流井区", "value": "510302" }, { "label": "贡井区", "value": "510303" }, { "label": "大安区", "value": "510304" }, { "label": "沿滩区", "value": "510311" }, { "label": "荣县", "value": "510321" }, { "label": "富顺县", "value": "510322" }], [{ "label": "东区", "value": "510402" }, { "label": "西区", "value": "510403" }, { "label": "仁和区", "value": "510411" }, { "label": "米易县", "value": "510421" }, { "label": "盐边县", "value": "510422" }], [{ "label": "江阳区", "value": "510502" }, { "label": "纳溪区", "value": "510503" }, { "label": "龙马潭区", "value": "510504" }, { "label": "泸县", "value": "510521" }, { "label": "合江县", "value": "510522" }, { "label": "叙永县", "value": "510524" }, { "label": "古蔺县", "value": "510525" }], [{ "label": "旌阳区", "value": "510603" }, { "label": "罗江区", "value": "510604" }, { "label": "中江县", "value": "510623" }, { "label": "广汉市", "value": "510681" }, { "label": "什邡市", "value": "510682" }, { "label": "绵竹市", "value": "510683" }], [{ "label": "涪城区", "value": "510703" }, { "label": "游仙区", "value": "510704" }, { "label": "安州区", "value": "510705" }, { "label": "三台县", "value": "510722" }, { "label": "盐亭县", "value": "510723" }, { "label": "梓潼县", "value": "510725" }, { "label": "北川羌族自治县", "value": "510726" }, { "label": "平武县", "value": "510727" }, { "label": "江油市", "value": "510781" }], [{ "label": "利州区", "value": "510802" }, { "label": "昭化区", "value": "510811" }, { "label": "朝天区", "value": "510812" }, { "label": "旺苍县", "value": "510821" }, { "label": "青川县", "value": "510822" }, { "label": "剑阁县", "value": "510823" }, { "label": "苍溪县", "value": "510824" }], [{ "label": "船山区", "value": "510903" }, { "label": "安居区", "value": "510904" }, { "label": "蓬溪县", "value": "510921" }, { "label": "射洪县", "value": "510922" }, { "label": "大英县", "value": "510923" }], [{ "label": "市中区", "value": "511002" }, { "label": "东兴区", "value": "511011" }, { "label": "威远县", "value": "511024" }, { "label": "资中县", "value": "511025" }, { "label": "内江经济开发区", "value": "511071" }, { "label": "隆昌市", "value": "511083" }], [{ "label": "市中区", "value": "511102" }, { "label": "沙湾区", "value": "511111" }, { "label": "五通桥区", "value": "511112" }, { "label": "金口河区", "value": "511113" }, { "label": "犍为县", "value": "511123" }, { "label": "井研县", "value": "511124" }, { "label": "夹江县", "value": "511126" }, { "label": "沐川县", "value": "511129" }, { "label": "峨边彝族自治县", "value": "511132" }, { "label": "马边彝族自治县", "value": "511133" }, { "label": "峨眉山市", "value": "511181" }], [{ "label": "顺庆区", "value": "511302" }, { "label": "高坪区", "value": "511303" }, { "label": "嘉陵区", "value": "511304" }, { "label": "南部县", "value": "511321" }, { "label": "营山县", "value": "511322" }, { "label": "蓬安县", "value": "511323" }, { "label": "仪陇县", "value": "511324" }, { "label": "西充县", "value": "511325" }, { "label": "阆中市", "value": "511381" }], [{ "label": "东坡区", "value": "511402" }, { "label": "彭山区", "value": "511403" }, { "label": "仁寿县", "value": "511421" }, { "label": "洪雅县", "value": "511423" }, { "label": "丹棱县", "value": "511424" }, { "label": "青神县", "value": "511425" }], [{ "label": "翠屏区", "value": "511502" }, { "label": "南溪区", "value": "511503" }, { "label": "宜宾县", "value": "511521" }, { "label": "江安县", "value": "511523" }, { "label": "长宁县", "value": "511524" }, { "label": "高县", "value": "511525" }, { "label": "珙县", "value": "511526" }, { "label": "筠连县", "value": "511527" }, { "label": "兴文县", "value": "511528" }, { "label": "屏山县", "value": "511529" }], [{ "label": "广安区", "value": "511602" }, { "label": "前锋区", "value": "511603" }, { "label": "岳池县", "value": "511621" }, { "label": "武胜县", "value": "511622" }, { "label": "邻水县", "value": "511623" }, { "label": "华蓥市", "value": "511681" }], [{ "label": "通川区", "value": "511702" }, { "label": "达川区", "value": "511703" }, { "label": "宣汉县", "value": "511722" }, { "label": "开江县", "value": "511723" }, { "label": "大竹县", "value": "511724" }, { "label": "渠县", "value": "511725" }, { "label": "达州经济开发区", "value": "511771" }, { "label": "万源市", "value": "511781" }], [{ "label": "雨城区", "value": "511802" }, { "label": "名山区", "value": "511803" }, { "label": "荥经县", "value": "511822" }, { "label": "汉源县", "value": "511823" }, { "label": "石棉县", "value": "511824" }, { "label": "天全县", "value": "511825" }, { "label": "芦山县", "value": "511826" }, { "label": "宝兴县", "value": "511827" }], [{ "label": "巴州区", "value": "511902" }, { "label": "恩阳区", "value": "511903" }, { "label": "通江县", "value": "511921" }, { "label": "南江县", "value": "511922" }, { "label": "平昌县", "value": "511923" }, { "label": "巴中经济开发区", "value": "511971" }], [{ "label": "雁江区", "value": "512002" }, { "label": "安岳县", "value": "512021" }, { "label": "乐至县", "value": "512022" }], [{ "label": "马尔康市", "value": "513201" }, { "label": "汶川县", "value": "513221" }, { "label": "理县", "value": "513222" }, { "label": "茂县", "value": "513223" }, { "label": "松潘县", "value": "513224" }, { "label": "九寨沟县", "value": "513225" }, { "label": "金川县", "value": "513226" }, { "label": "小金县", "value": "513227" }, { "label": "黑水县", "value": "513228" }, { "label": "壤塘县", "value": "513230" }, { "label": "阿坝县", "value": "513231" }, { "label": "若尔盖县", "value": "513232" }, { "label": "红原县", "value": "513233" }], [{ "label": "康定市", "value": "513301" }, { "label": "泸定县", "value": "513322" }, { "label": "丹巴县", "value": "513323" }, { "label": "九龙县", "value": "513324" }, { "label": "雅江县", "value": "513325" }, { "label": "道孚县", "value": "513326" }, { "label": "炉霍县", "value": "513327" }, { "label": "甘孜县", "value": "513328" }, { "label": "新龙县", "value": "513329" }, { "label": "德格县", "value": "513330" }, { "label": "白玉县", "value": "513331" }, { "label": "石渠县", "value": "513332" }, { "label": "色达县", "value": "513333" }, { "label": "理塘县", "value": "513334" }, { "label": "巴塘县", "value": "513335" }, { "label": "乡城县", "value": "513336" }, { "label": "稻城县", "value": "513337" }, { "label": "得荣县", "value": "513338" }], [{ "label": "西昌市", "value": "513401" }, { "label": "木里藏族自治县", "value": "513422" }, { "label": "盐源县", "value": "513423" }, { "label": "德昌县", "value": "513424" }, { "label": "会理县", "value": "513425" }, { "label": "会东县", "value": "513426" }, { "label": "宁南县", "value": "513427" }, { "label": "普格县", "value": "513428" }, { "label": "布拖县", "value": "513429" }, { "label": "金阳县", "value": "513430" }, { "label": "昭觉县", "value": "513431" }, { "label": "喜德县", "value": "513432" }, { "label": "冕宁县", "value": "513433" }, { "label": "越西县", "value": "513434" }, { "label": "甘洛县", "value": "513435" }, { "label": "美姑县", "value": "513436" }, { "label": "雷波县", "value": "513437" }]], [[{ "label": "南明区", "value": "520102" }, { "label": "云岩区", "value": "520103" }, { "label": "花溪区", "value": "520111" }, { "label": "乌当区", "value": "520112" }, { "label": "白云区", "value": "520113" }, { "label": "观山湖区", "value": "520115" }, { "label": "开阳县", "value": "520121" }, { "label": "息烽县", "value": "520122" }, { "label": "修文县", "value": "520123" }, { "label": "清镇市", "value": "520181" }], [{ "label": "钟山区", "value": "520201" }, { "label": "六枝特区", "value": "520203" }, { "label": "水城县", "value": "520221" }, { "label": "盘州市", "value": "520281" }], [{ "label": "红花岗区", "value": "520302" }, { "label": "汇川区", "value": "520303" }, { "label": "播州区", "value": "520304" }, { "label": "桐梓县", "value": "520322" }, { "label": "绥阳县", "value": "520323" }, { "label": "正安县", "value": "520324" }, { "label": "道真仡佬族苗族自治县", "value": "520325" }, { "label": "务川仡佬族苗族自治县", "value": "520326" }, { "label": "凤冈县", "value": "520327" }, { "label": "湄潭县", "value": "520328" }, { "label": "余庆县", "value": "520329" }, { "label": "习水县", "value": "520330" }, { "label": "赤水市", "value": "520381" }, { "label": "仁怀市", "value": "520382" }], [{ "label": "西秀区", "value": "520402" }, { "label": "平坝区", "value": "520403" }, { "label": "普定县", "value": "520422" }, { "label": "镇宁布依族苗族自治县", "value": "520423" }, { "label": "关岭布依族苗族自治县", "value": "520424" }, { "label": "紫云苗族布依族自治县", "value": "520425" }], [{ "label": "七星关区", "value": "520502" }, { "label": "大方县", "value": "520521" }, { "label": "黔西县", "value": "520522" }, { "label": "金沙县", "value": "520523" }, { "label": "织金县", "value": "520524" }, { "label": "纳雍县", "value": "520525" }, { "label": "威宁彝族回族苗族自治县", "value": "520526" }, { "label": "赫章县", "value": "520527" }], [{ "label": "碧江区", "value": "520602" }, { "label": "万山区", "value": "520603" }, { "label": "江口县", "value": "520621" }, { "label": "玉屏侗族自治县", "value": "520622" }, { "label": "石阡县", "value": "520623" }, { "label": "思南县", "value": "520624" }, { "label": "印江土家族苗族自治县", "value": "520625" }, { "label": "德江县", "value": "520626" }, { "label": "沿河土家族自治县", "value": "520627" }, { "label": "松桃苗族自治县", "value": "520628" }], [{ "label": "兴义市", "value": "522301" }, { "label": "兴仁县", "value": "522322" }, { "label": "普安县", "value": "522323" }, { "label": "晴隆县", "value": "522324" }, { "label": "贞丰县", "value": "522325" }, { "label": "望谟县", "value": "522326" }, { "label": "册亨县", "value": "522327" }, { "label": "安龙县", "value": "522328" }], [{ "label": "凯里市", "value": "522601" }, { "label": "黄平县", "value": "522622" }, { "label": "施秉县", "value": "522623" }, { "label": "三穗县", "value": "522624" }, { "label": "镇远县", "value": "522625" }, { "label": "岑巩县", "value": "522626" }, { "label": "天柱县", "value": "522627" }, { "label": "锦屏县", "value": "522628" }, { "label": "剑河县", "value": "522629" }, { "label": "台江县", "value": "522630" }, { "label": "黎平县", "value": "522631" }, { "label": "榕江县", "value": "522632" }, { "label": "从江县", "value": "522633" }, { "label": "雷山县", "value": "522634" }, { "label": "麻江县", "value": "522635" }, { "label": "丹寨县", "value": "522636" }], [{ "label": "都匀市", "value": "522701" }, { "label": "福泉市", "value": "522702" }, { "label": "荔波县", "value": "522722" }, { "label": "贵定县", "value": "522723" }, { "label": "瓮安县", "value": "522725" }, { "label": "独山县", "value": "522726" }, { "label": "平塘县", "value": "522727" }, { "label": "罗甸县", "value": "522728" }, { "label": "长顺县", "value": "522729" }, { "label": "龙里县", "value": "522730" }, { "label": "惠水县", "value": "522731" }, { "label": "三都水族自治县", "value": "522732" }]], [[{ "label": "五华区", "value": "530102" }, { "label": "盘龙区", "value": "530103" }, { "label": "官渡区", "value": "530111" }, { "label": "西山区", "value": "530112" }, { "label": "东川区", "value": "530113" }, { "label": "呈贡区", "value": "530114" }, { "label": "晋宁区", "value": "530115" }, { "label": "富民县", "value": "530124" }, { "label": "宜良县", "value": "530125" }, { "label": "石林彝族自治县", "value": "530126" }, { "label": "嵩明县", "value": "530127" }, { "label": "禄劝彝族苗族自治县", "value": "530128" }, { "label": "寻甸回族彝族自治县", "value": "530129" }, { "label": "安宁市", "value": "530181" }], [{ "label": "麒麟区", "value": "530302" }, { "label": "沾益区", "value": "530303" }, { "label": "马龙县", "value": "530321" }, { "label": "陆良县", "value": "530322" }, { "label": "师宗县", "value": "530323" }, { "label": "罗平县", "value": "530324" }, { "label": "富源县", "value": "530325" }, { "label": "会泽县", "value": "530326" }, { "label": "宣威市", "value": "530381" }], [{ "label": "红塔区", "value": "530402" }, { "label": "江川区", "value": "530403" }, { "label": "澄江县", "value": "530422" }, { "label": "通海县", "value": "530423" }, { "label": "华宁县", "value": "530424" }, { "label": "易门县", "value": "530425" }, { "label": "峨山彝族自治县", "value": "530426" }, { "label": "新平彝族傣族自治县", "value": "530427" }, { "label": "元江哈尼族彝族傣族自治县", "value": "530428" }], [{ "label": "隆阳区", "value": "530502" }, { "label": "施甸县", "value": "530521" }, { "label": "龙陵县", "value": "530523" }, { "label": "昌宁县", "value": "530524" }, { "label": "腾冲市", "value": "530581" }], [{ "label": "昭阳区", "value": "530602" }, { "label": "鲁甸县", "value": "530621" }, { "label": "巧家县", "value": "530622" }, { "label": "盐津县", "value": "530623" }, { "label": "大关县", "value": "530624" }, { "label": "永善县", "value": "530625" }, { "label": "绥江县", "value": "530626" }, { "label": "镇雄县", "value": "530627" }, { "label": "彝良县", "value": "530628" }, { "label": "威信县", "value": "530629" }, { "label": "水富县", "value": "530630" }], [{ "label": "古城区", "value": "530702" }, { "label": "玉龙纳西族自治县", "value": "530721" }, { "label": "永胜县", "value": "530722" }, { "label": "华坪县", "value": "530723" }, { "label": "宁蒗彝族自治县", "value": "530724" }], [{ "label": "思茅区", "value": "530802" }, { "label": "宁洱哈尼族彝族自治县", "value": "530821" }, { "label": "墨江哈尼族自治县", "value": "530822" }, { "label": "景东彝族自治县", "value": "530823" }, { "label": "景谷傣族彝族自治县", "value": "530824" }, { "label": "镇沅彝族哈尼族拉祜族自治县", "value": "530825" }, { "label": "江城哈尼族彝族自治县", "value": "530826" }, { "label": "孟连傣族拉祜族佤族自治县", "value": "530827" }, { "label": "澜沧拉祜族自治县", "value": "530828" }, { "label": "西盟佤族自治县", "value": "530829" }], [{ "label": "临翔区", "value": "530902" }, { "label": "凤庆县", "value": "530921" }, { "label": "云县", "value": "530922" }, { "label": "永德县", "value": "530923" }, { "label": "镇康县", "value": "530924" }, { "label": "双江拉祜族佤族布朗族傣族自治县", "value": "530925" }, { "label": "耿马傣族佤族自治县", "value": "530926" }, { "label": "沧源佤族自治县", "value": "530927" }], [{ "label": "楚雄市", "value": "532301" }, { "label": "双柏县", "value": "532322" }, { "label": "牟定县", "value": "532323" }, { "label": "南华县", "value": "532324" }, { "label": "姚安县", "value": "532325" }, { "label": "大姚县", "value": "532326" }, { "label": "永仁县", "value": "532327" }, { "label": "元谋县", "value": "532328" }, { "label": "武定县", "value": "532329" }, { "label": "禄丰县", "value": "532331" }], [{ "label": "个旧市", "value": "532501" }, { "label": "开远市", "value": "532502" }, { "label": "蒙自市", "value": "532503" }, { "label": "弥勒市", "value": "532504" }, { "label": "屏边苗族自治县", "value": "532523" }, { "label": "建水县", "value": "532524" }, { "label": "石屏县", "value": "532525" }, { "label": "泸西县", "value": "532527" }, { "label": "元阳县", "value": "532528" }, { "label": "红河县", "value": "532529" }, { "label": "金平苗族瑶族傣族自治县", "value": "532530" }, { "label": "绿春县", "value": "532531" }, { "label": "河口瑶族自治县", "value": "532532" }], [{ "label": "文山市", "value": "532601" }, { "label": "砚山县", "value": "532622" }, { "label": "西畴县", "value": "532623" }, { "label": "麻栗坡县", "value": "532624" }, { "label": "马关县", "value": "532625" }, { "label": "丘北县", "value": "532626" }, { "label": "广南县", "value": "532627" }, { "label": "富宁县", "value": "532628" }], [{ "label": "景洪市", "value": "532801" }, { "label": "勐海县", "value": "532822" }, { "label": "勐腊县", "value": "532823" }], [{ "label": "大理市", "value": "532901" }, { "label": "漾濞彝族自治县", "value": "532922" }, { "label": "祥云县", "value": "532923" }, { "label": "宾川县", "value": "532924" }, { "label": "弥渡县", "value": "532925" }, { "label": "南涧彝族自治县", "value": "532926" }, { "label": "巍山彝族回族自治县", "value": "532927" }, { "label": "永平县", "value": "532928" }, { "label": "云龙县", "value": "532929" }, { "label": "洱源县", "value": "532930" }, { "label": "剑川县", "value": "532931" }, { "label": "鹤庆县", "value": "532932" }], [{ "label": "瑞丽市", "value": "533102" }, { "label": "芒市", "value": "533103" }, { "label": "梁河县", "value": "533122" }, { "label": "盈江县", "value": "533123" }, { "label": "陇川县", "value": "533124" }], [{ "label": "泸水市", "value": "533301" }, { "label": "福贡县", "value": "533323" }, { "label": "贡山独龙族怒族自治县", "value": "533324" }, { "label": "兰坪白族普米族自治县", "value": "533325" }], [{ "label": "香格里拉市", "value": "533401" }, { "label": "德钦县", "value": "533422" }, { "label": "维西傈僳族自治县", "value": "533423" }]], [[{ "label": "城关区", "value": "540102" }, { "label": "堆龙德庆区", "value": "540103" }, { "label": "林周县", "value": "540121" }, { "label": "当雄县", "value": "540122" }, { "label": "尼木县", "value": "540123" }, { "label": "曲水县", "value": "540124" }, { "label": "达孜县", "value": "540126" }, { "label": "墨竹工卡县", "value": "540127" }, { "label": "格尔木藏青工业园区", "value": "540171" }, { "label": "拉萨经济技术开发区", "value": "540172" }, { "label": "西藏文化旅游创意园区", "value": "540173" }, { "label": "达孜工业园区", "value": "540174" }], [{ "label": "桑珠孜区", "value": "540202" }, { "label": "南木林县", "value": "540221" }, { "label": "江孜县", "value": "540222" }, { "label": "定日县", "value": "540223" }, { "label": "萨迦县", "value": "540224" }, { "label": "拉孜县", "value": "540225" }, { "label": "昂仁县", "value": "540226" }, { "label": "谢通门县", "value": "540227" }, { "label": "白朗县", "value": "540228" }, { "label": "仁布县", "value": "540229" }, { "label": "康马县", "value": "540230" }, { "label": "定结县", "value": "540231" }, { "label": "仲巴县", "value": "540232" }, { "label": "亚东县", "value": "540233" }, { "label": "吉隆县", "value": "540234" }, { "label": "聂拉木县", "value": "540235" }, { "label": "萨嘎县", "value": "540236" }, { "label": "岗巴县", "value": "540237" }], [{ "label": "卡若区", "value": "540302" }, { "label": "江达县", "value": "540321" }, { "label": "贡觉县", "value": "540322" }, { "label": "类乌齐县", "value": "540323" }, { "label": "丁青县", "value": "540324" }, { "label": "察雅县", "value": "540325" }, { "label": "八宿县", "value": "540326" }, { "label": "左贡县", "value": "540327" }, { "label": "芒康县", "value": "540328" }, { "label": "洛隆县", "value": "540329" }, { "label": "边坝县", "value": "540330" }], [{ "label": "巴宜区", "value": "540402" }, { "label": "工布江达县", "value": "540421" }, { "label": "米林县", "value": "540422" }, { "label": "墨脱县", "value": "540423" }, { "label": "波密县", "value": "540424" }, { "label": "察隅县", "value": "540425" }, { "label": "朗县", "value": "540426" }], [{ "label": "乃东区", "value": "540502" }, { "label": "扎囊县", "value": "540521" }, { "label": "贡嘎县", "value": "540522" }, { "label": "桑日县", "value": "540523" }, { "label": "琼结县", "value": "540524" }, { "label": "曲松县", "value": "540525" }, { "label": "措美县", "value": "540526" }, { "label": "洛扎县", "value": "540527" }, { "label": "加查县", "value": "540528" }, { "label": "隆子县", "value": "540529" }, { "label": "错那县", "value": "540530" }, { "label": "浪卡子县", "value": "540531" }], [{ "label": "那曲县", "value": "542421" }, { "label": "嘉黎县", "value": "542422" }, { "label": "比如县", "value": "542423" }, { "label": "聂荣县", "value": "542424" }, { "label": "安多县", "value": "542425" }, { "label": "申扎县", "value": "542426" }, { "label": "索县", "value": "542427" }, { "label": "班戈县", "value": "542428" }, { "label": "巴青县", "value": "542429" }, { "label": "尼玛县", "value": "542430" }, { "label": "双湖县", "value": "542431" }], [{ "label": "普兰县", "value": "542521" }, { "label": "札达县", "value": "542522" }, { "label": "噶尔县", "value": "542523" }, { "label": "日土县", "value": "542524" }, { "label": "革吉县", "value": "542525" }, { "label": "改则县", "value": "542526" }, { "label": "措勤县", "value": "542527" }]], [[{ "label": "新城区", "value": "610102" }, { "label": "碑林区", "value": "610103" }, { "label": "莲湖区", "value": "610104" }, { "label": "灞桥区", "value": "610111" }, { "label": "未央区", "value": "610112" }, { "label": "雁塔区", "value": "610113" }, { "label": "阎良区", "value": "610114" }, { "label": "临潼区", "value": "610115" }, { "label": "长安区", "value": "610116" }, { "label": "高陵区", "value": "610117" }, { "label": "鄠邑区", "value": "610118" }, { "label": "蓝田县", "value": "610122" }, { "label": "周至县", "value": "610124" }], [{ "label": "王益区", "value": "610202" }, { "label": "印台区", "value": "610203" }, { "label": "耀州区", "value": "610204" }, { "label": "宜君县", "value": "610222" }], [{ "label": "渭滨区", "value": "610302" }, { "label": "金台区", "value": "610303" }, { "label": "陈仓区", "value": "610304" }, { "label": "凤翔县", "value": "610322" }, { "label": "岐山县", "value": "610323" }, { "label": "扶风县", "value": "610324" }, { "label": "眉县", "value": "610326" }, { "label": "陇县", "value": "610327" }, { "label": "千阳县", "value": "610328" }, { "label": "麟游县", "value": "610329" }, { "label": "凤县", "value": "610330" }, { "label": "太白县", "value": "610331" }], [{ "label": "秦都区", "value": "610402" }, { "label": "杨陵区", "value": "610403" }, { "label": "渭城区", "value": "610404" }, { "label": "三原县", "value": "610422" }, { "label": "泾阳县", "value": "610423" }, { "label": "乾县", "value": "610424" }, { "label": "礼泉县", "value": "610425" }, { "label": "永寿县", "value": "610426" }, { "label": "彬县", "value": "610427" }, { "label": "长武县", "value": "610428" }, { "label": "旬邑县", "value": "610429" }, { "label": "淳化县", "value": "610430" }, { "label": "武功县", "value": "610431" }, { "label": "兴平市", "value": "610481" }], [{ "label": "临渭区", "value": "610502" }, { "label": "华州区", "value": "610503" }, { "label": "潼关县", "value": "610522" }, { "label": "大荔县", "value": "610523" }, { "label": "合阳县", "value": "610524" }, { "label": "澄城县", "value": "610525" }, { "label": "蒲城县", "value": "610526" }, { "label": "白水县", "value": "610527" }, { "label": "富平县", "value": "610528" }, { "label": "韩城市", "value": "610581" }, { "label": "华阴市", "value": "610582" }], [{ "label": "宝塔区", "value": "610602" }, { "label": "安塞区", "value": "610603" }, { "label": "延长县", "value": "610621" }, { "label": "延川县", "value": "610622" }, { "label": "子长县", "value": "610623" }, { "label": "志丹县", "value": "610625" }, { "label": "吴起县", "value": "610626" }, { "label": "甘泉县", "value": "610627" }, { "label": "富县", "value": "610628" }, { "label": "洛川县", "value": "610629" }, { "label": "宜川县", "value": "610630" }, { "label": "黄龙县", "value": "610631" }, { "label": "黄陵县", "value": "610632" }], [{ "label": "汉台区", "value": "610702" }, { "label": "南郑区", "value": "610703" }, { "label": "城固县", "value": "610722" }, { "label": "洋县", "value": "610723" }, { "label": "西乡县", "value": "610724" }, { "label": "勉县", "value": "610725" }, { "label": "宁强县", "value": "610726" }, { "label": "略阳县", "value": "610727" }, { "label": "镇巴县", "value": "610728" }, { "label": "留坝县", "value": "610729" }, { "label": "佛坪县", "value": "610730" }], [{ "label": "榆阳区", "value": "610802" }, { "label": "横山区", "value": "610803" }, { "label": "府谷县", "value": "610822" }, { "label": "靖边县", "value": "610824" }, { "label": "定边县", "value": "610825" }, { "label": "绥德县", "value": "610826" }, { "label": "米脂县", "value": "610827" }, { "label": "佳县", "value": "610828" }, { "label": "吴堡县", "value": "610829" }, { "label": "清涧县", "value": "610830" }, { "label": "子洲县", "value": "610831" }, { "label": "神木市", "value": "610881" }], [{ "label": "汉滨区", "value": "610902" }, { "label": "汉阴县", "value": "610921" }, { "label": "石泉县", "value": "610922" }, { "label": "宁陕县", "value": "610923" }, { "label": "紫阳县", "value": "610924" }, { "label": "岚皋县", "value": "610925" }, { "label": "平利县", "value": "610926" }, { "label": "镇坪县", "value": "610927" }, { "label": "旬阳县", "value": "610928" }, { "label": "白河县", "value": "610929" }], [{ "label": "商州区", "value": "611002" }, { "label": "洛南县", "value": "611021" }, { "label": "丹凤县", "value": "611022" }, { "label": "商南县", "value": "611023" }, { "label": "山阳县", "value": "611024" }, { "label": "镇安县", "value": "611025" }, { "label": "柞水县", "value": "611026" }]], [[{ "label": "城关区", "value": "620102" }, { "label": "七里河区", "value": "620103" }, { "label": "西固区", "value": "620104" }, { "label": "安宁区", "value": "620105" }, { "label": "红古区", "value": "620111" }, { "label": "永登县", "value": "620121" }, { "label": "皋兰县", "value": "620122" }, { "label": "榆中县", "value": "620123" }, { "label": "兰州新区", "value": "620171" }], [{ "label": "嘉峪关市", "value": "620201" }], [{ "label": "金川区", "value": "620302" }, { "label": "永昌县", "value": "620321" }], [{ "label": "白银区", "value": "620402" }, { "label": "平川区", "value": "620403" }, { "label": "靖远县", "value": "620421" }, { "label": "会宁县", "value": "620422" }, { "label": "景泰县", "value": "620423" }], [{ "label": "秦州区", "value": "620502" }, { "label": "麦积区", "value": "620503" }, { "label": "清水县", "value": "620521" }, { "label": "秦安县", "value": "620522" }, { "label": "甘谷县", "value": "620523" }, { "label": "武山县", "value": "620524" }, { "label": "张家川回族自治县", "value": "620525" }], [{ "label": "凉州区", "value": "620602" }, { "label": "民勤县", "value": "620621" }, { "label": "古浪县", "value": "620622" }, { "label": "天祝藏族自治县", "value": "620623" }], [{ "label": "甘州区", "value": "620702" }, { "label": "肃南裕固族自治县", "value": "620721" }, { "label": "民乐县", "value": "620722" }, { "label": "临泽县", "value": "620723" }, { "label": "高台县", "value": "620724" }, { "label": "山丹县", "value": "620725" }], [{ "label": "崆峒区", "value": "620802" }, { "label": "泾川县", "value": "620821" }, { "label": "灵台县", "value": "620822" }, { "label": "崇信县", "value": "620823" }, { "label": "华亭县", "value": "620824" }, { "label": "庄浪县", "value": "620825" }, { "label": "静宁县", "value": "620826" }, { "label": "平凉工业园区", "value": "620871" }], [{ "label": "肃州区", "value": "620902" }, { "label": "金塔县", "value": "620921" }, { "label": "瓜州县", "value": "620922" }, { "label": "肃北蒙古族自治县", "value": "620923" }, { "label": "阿克塞哈萨克族自治县", "value": "620924" }, { "label": "玉门市", "value": "620981" }, { "label": "敦煌市", "value": "620982" }], [{ "label": "西峰区", "value": "621002" }, { "label": "庆城县", "value": "621021" }, { "label": "环县", "value": "621022" }, { "label": "华池县", "value": "621023" }, { "label": "合水县", "value": "621024" }, { "label": "正宁县", "value": "621025" }, { "label": "宁县", "value": "621026" }, { "label": "镇原县", "value": "621027" }], [{ "label": "安定区", "value": "621102" }, { "label": "通渭县", "value": "621121" }, { "label": "陇西县", "value": "621122" }, { "label": "渭源县", "value": "621123" }, { "label": "临洮县", "value": "621124" }, { "label": "漳县", "value": "621125" }, { "label": "岷县", "value": "621126" }], [{ "label": "武都区", "value": "621202" }, { "label": "成县", "value": "621221" }, { "label": "文县", "value": "621222" }, { "label": "宕昌县", "value": "621223" }, { "label": "康县", "value": "621224" }, { "label": "西和县", "value": "621225" }, { "label": "礼县", "value": "621226" }, { "label": "徽县", "value": "621227" }, { "label": "两当县", "value": "621228" }], [{ "label": "临夏市", "value": "622901" }, { "label": "临夏县", "value": "622921" }, { "label": "康乐县", "value": "622922" }, { "label": "永靖县", "value": "622923" }, { "label": "广河县", "value": "622924" }, { "label": "和政县", "value": "622925" }, { "label": "东乡族自治县", "value": "622926" }, { "label": "积石山保安族东乡族撒拉族自治县", "value": "622927" }], [{ "label": "合作市", "value": "623001" }, { "label": "临潭县", "value": "623021" }, { "label": "卓尼县", "value": "623022" }, { "label": "舟曲县", "value": "623023" }, { "label": "迭部县", "value": "623024" }, { "label": "玛曲县", "value": "623025" }, { "label": "碌曲县", "value": "623026" }, { "label": "夏河县", "value": "623027" }]], [[{ "label": "城东区", "value": "630102" }, { "label": "城中区", "value": "630103" }, { "label": "城西区", "value": "630104" }, { "label": "城北区", "value": "630105" }, { "label": "大通回族土族自治县", "value": "630121" }, { "label": "湟中县", "value": "630122" }, { "label": "湟源县", "value": "630123" }], [{ "label": "乐都区", "value": "630202" }, { "label": "平安区", "value": "630203" }, { "label": "民和回族土族自治县", "value": "630222" }, { "label": "互助土族自治县", "value": "630223" }, { "label": "化隆回族自治县", "value": "630224" }, { "label": "循化撒拉族自治县", "value": "630225" }], [{ "label": "门源回族自治县", "value": "632221" }, { "label": "祁连县", "value": "632222" }, { "label": "海晏县", "value": "632223" }, { "label": "刚察县", "value": "632224" }], [{ "label": "同仁县", "value": "632321" }, { "label": "尖扎县", "value": "632322" }, { "label": "泽库县", "value": "632323" }, { "label": "河南蒙古族自治县", "value": "632324" }], [{ "label": "共和县", "value": "632521" }, { "label": "同德县", "value": "632522" }, { "label": "贵德县", "value": "632523" }, { "label": "兴海县", "value": "632524" }, { "label": "贵南县", "value": "632525" }], [{ "label": "玛沁县", "value": "632621" }, { "label": "班玛县", "value": "632622" }, { "label": "甘德县", "value": "632623" }, { "label": "达日县", "value": "632624" }, { "label": "久治县", "value": "632625" }, { "label": "玛多县", "value": "632626" }], [{ "label": "玉树市", "value": "632701" }, { "label": "杂多县", "value": "632722" }, { "label": "称多县", "value": "632723" }, { "label": "治多县", "value": "632724" }, { "label": "囊谦县", "value": "632725" }, { "label": "曲麻莱县", "value": "632726" }], [{ "label": "格尔木市", "value": "632801" }, { "label": "德令哈市", "value": "632802" }, { "label": "乌兰县", "value": "632821" }, { "label": "都兰县", "value": "632822" }, { "label": "天峻县", "value": "632823" }, { "label": "大柴旦行政委员会", "value": "632857" }, { "label": "冷湖行政委员会", "value": "632858" }, { "label": "茫崖行政委员会", "value": "632859" }]], [[{ "label": "兴庆区", "value": "640104" }, { "label": "西夏区", "value": "640105" }, { "label": "金凤区", "value": "640106" }, { "label": "永宁县", "value": "640121" }, { "label": "贺兰县", "value": "640122" }, { "label": "灵武市", "value": "640181" }], [{ "label": "大武口区", "value": "640202" }, { "label": "惠农区", "value": "640205" }, { "label": "平罗县", "value": "640221" }], [{ "label": "利通区", "value": "640302" }, { "label": "红寺堡区", "value": "640303" }, { "label": "盐池县", "value": "640323" }, { "label": "同心县", "value": "640324" }, { "label": "青铜峡市", "value": "640381" }], [{ "label": "原州区", "value": "640402" }, { "label": "西吉县", "value": "640422" }, { "label": "隆德县", "value": "640423" }, { "label": "泾源县", "value": "640424" }, { "label": "彭阳县", "value": "640425" }], [{ "label": "沙坡头区", "value": "640502" }, { "label": "中宁县", "value": "640521" }, { "label": "海原县", "value": "640522" }]], [[{ "label": "天山区", "value": "650102" }, { "label": "沙依巴克区", "value": "650103" }, { "label": "新市区", "value": "650104" }, { "label": "水磨沟区", "value": "650105" }, { "label": "头屯河区", "value": "650106" }, { "label": "达坂城区", "value": "650107" }, { "label": "米东区", "value": "650109" }, { "label": "乌鲁木齐县", "value": "650121" }, { "label": "乌鲁木齐经济技术开发区", "value": "650171" }, { "label": "乌鲁木齐高新技术产业开发区", "value": "650172" }], [{ "label": "独山子区", "value": "650202" }, { "label": "克拉玛依区", "value": "650203" }, { "label": "白碱滩区", "value": "650204" }, { "label": "乌尔禾区", "value": "650205" }], [{ "label": "高昌区", "value": "650402" }, { "label": "鄯善县", "value": "650421" }, { "label": "托克逊县", "value": "650422" }], [{ "label": "伊州区", "value": "650502" }, { "label": "巴里坤哈萨克自治县", "value": "650521" }, { "label": "伊吾县", "value": "650522" }], [{ "label": "昌吉市", "value": "652301" }, { "label": "阜康市", "value": "652302" }, { "label": "呼图壁县", "value": "652323" }, { "label": "玛纳斯县", "value": "652324" }, { "label": "奇台县", "value": "652325" }, { "label": "吉木萨尔县", "value": "652327" }, { "label": "木垒哈萨克自治县", "value": "652328" }], [{ "label": "博乐市", "value": "652701" }, { "label": "阿拉山口市", "value": "652702" }, { "label": "精河县", "value": "652722" }, { "label": "温泉县", "value": "652723" }], [{ "label": "库尔勒市", "value": "652801" }, { "label": "轮台县", "value": "652822" }, { "label": "尉犁县", "value": "652823" }, { "label": "若羌县", "value": "652824" }, { "label": "且末县", "value": "652825" }, { "label": "焉耆回族自治县", "value": "652826" }, { "label": "和静县", "value": "652827" }, { "label": "和硕县", "value": "652828" }, { "label": "博湖县", "value": "652829" }, { "label": "库尔勒经济技术开发区", "value": "652871" }], [{ "label": "阿克苏市", "value": "652901" }, { "label": "温宿县", "value": "652922" }, { "label": "库车县", "value": "652923" }, { "label": "沙雅县", "value": "652924" }, { "label": "新和县", "value": "652925" }, { "label": "拜城县", "value": "652926" }, { "label": "乌什县", "value": "652927" }, { "label": "阿瓦提县", "value": "652928" }, { "label": "柯坪县", "value": "652929" }], [{ "label": "阿图什市", "value": "653001" }, { "label": "阿克陶县", "value": "653022" }, { "label": "阿合奇县", "value": "653023" }, { "label": "乌恰县", "value": "653024" }], [{ "label": "喀什市", "value": "653101" }, { "label": "疏附县", "value": "653121" }, { "label": "疏勒县", "value": "653122" }, { "label": "英吉沙县", "value": "653123" }, { "label": "泽普县", "value": "653124" }, { "label": "莎车县", "value": "653125" }, { "label": "叶城县", "value": "653126" }, { "label": "麦盖提县", "value": "653127" }, { "label": "岳普湖县", "value": "653128" }, { "label": "伽师县", "value": "653129" }, { "label": "巴楚县", "value": "653130" }, { "label": "塔什库尔干塔吉克自治县", "value": "653131" }], [{ "label": "和田市", "value": "653201" }, { "label": "和田县", "value": "653221" }, { "label": "墨玉县", "value": "653222" }, { "label": "皮山县", "value": "653223" }, { "label": "洛浦县", "value": "653224" }, { "label": "策勒县", "value": "653225" }, { "label": "于田县", "value": "653226" }, { "label": "民丰县", "value": "653227" }], [{ "label": "伊宁市", "value": "654002" }, { "label": "奎屯市", "value": "654003" }, { "label": "霍尔果斯市", "value": "654004" }, { "label": "伊宁县", "value": "654021" }, { "label": "察布查尔锡伯自治县", "value": "654022" }, { "label": "霍城县", "value": "654023" }, { "label": "巩留县", "value": "654024" }, { "label": "新源县", "value": "654025" }, { "label": "昭苏县", "value": "654026" }, { "label": "特克斯县", "value": "654027" }, { "label": "尼勒克县", "value": "654028" }], [{ "label": "塔城市", "value": "654201" }, { "label": "乌苏市", "value": "654202" }, { "label": "额敏县", "value": "654221" }, { "label": "沙湾县", "value": "654223" }, { "label": "托里县", "value": "654224" }, { "label": "裕民县", "value": "654225" }, { "label": "和布克赛尔蒙古自治县", "value": "654226" }], [{ "label": "阿勒泰市", "value": "654301" }, { "label": "布尔津县", "value": "654321" }, { "label": "富蕴县", "value": "654322" }, { "label": "福海县", "value": "654323" }, { "label": "哈巴河县", "value": "654324" }, { "label": "青河县", "value": "654325" }, { "label": "吉木乃县", "value": "654326" }], [{ "label": "石河子市", "value": "659001" }, { "label": "阿拉尔市", "value": "659002" }, { "label": "图木舒克市", "value": "659003" }, { "label": "五家渠市", "value": "659004" }, { "label": "铁门关市", "value": "659006" }]], [[{ "label": "台北", "value": "660101" }], [{ "label": "高雄", "value": "660201" }], [{ "label": "基隆", "value": "660301" }], [{ "label": "台中", "value": "660401" }], [{ "label": "台南", "value": "660501" }], [{ "label": "新竹", "value": "660601" }], [{ "label": "嘉义", "value": "660701" }], [{ "label": "宜兰", "value": "660801" }], [{ "label": "桃园", "value": "660901" }], [{ "label": "苗栗", "value": "661001" }], [{ "label": "彰化", "value": "661101" }], [{ "label": "南投", "value": "661201" }], [{ "label": "云林", "value": "661301" }], [{ "label": "屏东", "value": "661401" }], [{ "label": "台东", "value": "661501" }], [{ "label": "花莲", "value": "661601" }], [{ "label": "澎湖", "value": "661701" }]], [[{ "label": "香港岛", "value": "670101" }], [{ "label": "九龙", "value": "670201" }], [{ "label": "新界", "value": "670301" }]], [[{ "label": "澳门半岛", "value": "680101" }], [{ "label": "氹仔岛", "value": "680201" }], [{ "label": "路环岛", "value": "680301" }], [{ "label": "路氹城", "value": "680401" }]]];var _default = areaData;exports.default = _default;
  3685. /***/ }),
  3686. /***/ 28:
  3687. /*!****************************************************************************************************!*\
  3688. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/libs/function/type2icon.js ***!
  3689. \****************************************************************************************************/
  3690. /*! no static exports found */
  3691. /***/ (function(module, exports, __webpack_require__) {
  3692. "use strict";
  3693. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; /**
  3694. * 根据主题type值,获取对应的图标
  3695. * @param String type 主题名称,primary|info|error|warning|success
  3696. * @param String fill 是否使用fill填充实体的图标
  3697. */
  3698. function type2icon() {var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'success';var fill = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  3699. // 如果非预置值,默认为success
  3700. if (['primary', 'info', 'error', 'warning', 'success'].indexOf(type) == -1) type = 'success';
  3701. var iconName = '';
  3702. // 目前(2019-12-12),info和primary使用同一个图标
  3703. switch (type) {
  3704. case 'primary':
  3705. iconName = 'info-circle';
  3706. break;
  3707. case 'info':
  3708. iconName = 'info-circle';
  3709. break;
  3710. case 'error':
  3711. iconName = 'close-circle';
  3712. break;
  3713. case 'warning':
  3714. iconName = 'error-circle';
  3715. break;
  3716. case 'success':
  3717. iconName = 'checkmark-circle';
  3718. break;
  3719. default:
  3720. iconName = 'checkmark-circle';}
  3721. // 是否是实体类型,加上-fill,在icon组件库中,实体的类名是后面加-fill的
  3722. if (fill) iconName += '-fill';
  3723. return iconName;
  3724. }var _default =
  3725. type2icon;exports.default = _default;
  3726. /***/ }),
  3727. /***/ 29:
  3728. /*!******************************************************************************************************!*\
  3729. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/libs/function/randomArray.js ***!
  3730. \******************************************************************************************************/
  3731. /*! no static exports found */
  3732. /***/ (function(module, exports, __webpack_require__) {
  3733. "use strict";
  3734. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // 打乱数组
  3735. function randomArray() {var array = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  3736. // 原理是sort排序,Math.random()产生0<= x < 1之间的数,会导致x-0.05大于或者小于0
  3737. return array.sort(function () {return Math.random() - 0.5;});
  3738. }var _default =
  3739. randomArray;exports.default = _default;
  3740. /***/ }),
  3741. /***/ 296:
  3742. /*!**********************************************************************************************!*\
  3743. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/libs/util/emitter.js ***!
  3744. \**********************************************************************************************/
  3745. /*! no static exports found */
  3746. /***/ (function(module, exports, __webpack_require__) {
  3747. "use strict";
  3748. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; /**
  3749. * 递归使用 call 方式this指向
  3750. * @param componentName // 需要找的组件的名称
  3751. * @param eventName // 事件名称
  3752. * @param params // 需要传递的参数
  3753. */
  3754. function _broadcast(componentName, eventName, params) {
  3755. // 循环子节点找到名称一样的子节点 否则 递归 当前子节点
  3756. this.$children.map(function (child) {
  3757. if (componentName === child.$options.name) {
  3758. child.$emit.apply(child, [eventName].concat(params));
  3759. } else {
  3760. _broadcast.apply(child, [componentName, eventName].concat(params));
  3761. }
  3762. });
  3763. }var _default =
  3764. {
  3765. methods: {
  3766. /**
  3767. * 派发 (向上查找) (一个)
  3768. * @param componentName // 需要找的组件的名称
  3769. * @param eventName // 事件名称
  3770. * @param params // 需要传递的参数
  3771. */
  3772. dispatch: function dispatch(componentName, eventName, params) {
  3773. var parent = this.$parent || this.$root; //$parent 找到最近的父节点 $root 根节点
  3774. var name = parent.$options.name; // 获取当前组件实例的name
  3775. // 如果当前有节点 && 当前没名称 且 当前名称等于需要传进来的名称的时候就去查找当前的节点
  3776. // 循环出当前名称的一样的组件实例
  3777. while (parent && (!name || name !== componentName)) {
  3778. parent = parent.$parent;
  3779. if (parent) {
  3780. name = parent.$options.name;
  3781. }
  3782. }
  3783. // 有节点表示当前找到了name一样的实例
  3784. if (parent) {
  3785. parent.$emit.apply(parent, [eventName].concat(params));
  3786. }
  3787. },
  3788. /**
  3789. * 广播 (向下查找) (广播多个)
  3790. * @param componentName // 需要找的组件的名称
  3791. * @param eventName // 事件名称
  3792. * @param params // 需要传递的参数
  3793. */
  3794. broadcast: function broadcast(componentName, eventName, params) {
  3795. _broadcast.call(this, componentName, eventName, params);
  3796. } } };exports.default = _default;
  3797. /***/ }),
  3798. /***/ 3:
  3799. /*!******************************************************************************************!*\
  3800. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  3801. \******************************************************************************************/
  3802. /*! exports provided: default */
  3803. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3804. "use strict";
  3805. __webpack_require__.r(__webpack_exports__);
  3806. /* WEBPACK VAR INJECTION */(function(global) {/*!
  3807. * Vue.js v2.6.11
  3808. * (c) 2014-2021 Evan You
  3809. * Released under the MIT License.
  3810. */
  3811. /* */
  3812. var emptyObject = Object.freeze({});
  3813. // These helpers produce better VM code in JS engines due to their
  3814. // explicitness and function inlining.
  3815. function isUndef (v) {
  3816. return v === undefined || v === null
  3817. }
  3818. function isDef (v) {
  3819. return v !== undefined && v !== null
  3820. }
  3821. function isTrue (v) {
  3822. return v === true
  3823. }
  3824. function isFalse (v) {
  3825. return v === false
  3826. }
  3827. /**
  3828. * Check if value is primitive.
  3829. */
  3830. function isPrimitive (value) {
  3831. return (
  3832. typeof value === 'string' ||
  3833. typeof value === 'number' ||
  3834. // $flow-disable-line
  3835. typeof value === 'symbol' ||
  3836. typeof value === 'boolean'
  3837. )
  3838. }
  3839. /**
  3840. * Quick object check - this is primarily used to tell
  3841. * Objects from primitive values when we know the value
  3842. * is a JSON-compliant type.
  3843. */
  3844. function isObject (obj) {
  3845. return obj !== null && typeof obj === 'object'
  3846. }
  3847. /**
  3848. * Get the raw type string of a value, e.g., [object Object].
  3849. */
  3850. var _toString = Object.prototype.toString;
  3851. function toRawType (value) {
  3852. return _toString.call(value).slice(8, -1)
  3853. }
  3854. /**
  3855. * Strict object type check. Only returns true
  3856. * for plain JavaScript objects.
  3857. */
  3858. function isPlainObject (obj) {
  3859. return _toString.call(obj) === '[object Object]'
  3860. }
  3861. function isRegExp (v) {
  3862. return _toString.call(v) === '[object RegExp]'
  3863. }
  3864. /**
  3865. * Check if val is a valid array index.
  3866. */
  3867. function isValidArrayIndex (val) {
  3868. var n = parseFloat(String(val));
  3869. return n >= 0 && Math.floor(n) === n && isFinite(val)
  3870. }
  3871. function isPromise (val) {
  3872. return (
  3873. isDef(val) &&
  3874. typeof val.then === 'function' &&
  3875. typeof val.catch === 'function'
  3876. )
  3877. }
  3878. /**
  3879. * Convert a value to a string that is actually rendered.
  3880. */
  3881. function toString (val) {
  3882. return val == null
  3883. ? ''
  3884. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  3885. ? JSON.stringify(val, null, 2)
  3886. : String(val)
  3887. }
  3888. /**
  3889. * Convert an input value to a number for persistence.
  3890. * If the conversion fails, return original string.
  3891. */
  3892. function toNumber (val) {
  3893. var n = parseFloat(val);
  3894. return isNaN(n) ? val : n
  3895. }
  3896. /**
  3897. * Make a map and return a function for checking if a key
  3898. * is in that map.
  3899. */
  3900. function makeMap (
  3901. str,
  3902. expectsLowerCase
  3903. ) {
  3904. var map = Object.create(null);
  3905. var list = str.split(',');
  3906. for (var i = 0; i < list.length; i++) {
  3907. map[list[i]] = true;
  3908. }
  3909. return expectsLowerCase
  3910. ? function (val) { return map[val.toLowerCase()]; }
  3911. : function (val) { return map[val]; }
  3912. }
  3913. /**
  3914. * Check if a tag is a built-in tag.
  3915. */
  3916. var isBuiltInTag = makeMap('slot,component', true);
  3917. /**
  3918. * Check if an attribute is a reserved attribute.
  3919. */
  3920. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  3921. /**
  3922. * Remove an item from an array.
  3923. */
  3924. function remove (arr, item) {
  3925. if (arr.length) {
  3926. var index = arr.indexOf(item);
  3927. if (index > -1) {
  3928. return arr.splice(index, 1)
  3929. }
  3930. }
  3931. }
  3932. /**
  3933. * Check whether an object has the property.
  3934. */
  3935. var hasOwnProperty = Object.prototype.hasOwnProperty;
  3936. function hasOwn (obj, key) {
  3937. return hasOwnProperty.call(obj, key)
  3938. }
  3939. /**
  3940. * Create a cached version of a pure function.
  3941. */
  3942. function cached (fn) {
  3943. var cache = Object.create(null);
  3944. return (function cachedFn (str) {
  3945. var hit = cache[str];
  3946. return hit || (cache[str] = fn(str))
  3947. })
  3948. }
  3949. /**
  3950. * Camelize a hyphen-delimited string.
  3951. */
  3952. var camelizeRE = /-(\w)/g;
  3953. var camelize = cached(function (str) {
  3954. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  3955. });
  3956. /**
  3957. * Capitalize a string.
  3958. */
  3959. var capitalize = cached(function (str) {
  3960. return str.charAt(0).toUpperCase() + str.slice(1)
  3961. });
  3962. /**
  3963. * Hyphenate a camelCase string.
  3964. */
  3965. var hyphenateRE = /\B([A-Z])/g;
  3966. var hyphenate = cached(function (str) {
  3967. return str.replace(hyphenateRE, '-$1').toLowerCase()
  3968. });
  3969. /**
  3970. * Simple bind polyfill for environments that do not support it,
  3971. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  3972. * since native bind is now performant enough in most browsers.
  3973. * But removing it would mean breaking code that was able to run in
  3974. * PhantomJS 1.x, so this must be kept for backward compatibility.
  3975. */
  3976. /* istanbul ignore next */
  3977. function polyfillBind (fn, ctx) {
  3978. function boundFn (a) {
  3979. var l = arguments.length;
  3980. return l
  3981. ? l > 1
  3982. ? fn.apply(ctx, arguments)
  3983. : fn.call(ctx, a)
  3984. : fn.call(ctx)
  3985. }
  3986. boundFn._length = fn.length;
  3987. return boundFn
  3988. }
  3989. function nativeBind (fn, ctx) {
  3990. return fn.bind(ctx)
  3991. }
  3992. var bind = Function.prototype.bind
  3993. ? nativeBind
  3994. : polyfillBind;
  3995. /**
  3996. * Convert an Array-like object to a real Array.
  3997. */
  3998. function toArray (list, start) {
  3999. start = start || 0;
  4000. var i = list.length - start;
  4001. var ret = new Array(i);
  4002. while (i--) {
  4003. ret[i] = list[i + start];
  4004. }
  4005. return ret
  4006. }
  4007. /**
  4008. * Mix properties into target object.
  4009. */
  4010. function extend (to, _from) {
  4011. for (var key in _from) {
  4012. to[key] = _from[key];
  4013. }
  4014. return to
  4015. }
  4016. /**
  4017. * Merge an Array of Objects into a single Object.
  4018. */
  4019. function toObject (arr) {
  4020. var res = {};
  4021. for (var i = 0; i < arr.length; i++) {
  4022. if (arr[i]) {
  4023. extend(res, arr[i]);
  4024. }
  4025. }
  4026. return res
  4027. }
  4028. /* eslint-disable no-unused-vars */
  4029. /**
  4030. * Perform no operation.
  4031. * Stubbing args to make Flow happy without leaving useless transpiled code
  4032. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  4033. */
  4034. function noop (a, b, c) {}
  4035. /**
  4036. * Always return false.
  4037. */
  4038. var no = function (a, b, c) { return false; };
  4039. /* eslint-enable no-unused-vars */
  4040. /**
  4041. * Return the same value.
  4042. */
  4043. var identity = function (_) { return _; };
  4044. /**
  4045. * Check if two values are loosely equal - that is,
  4046. * if they are plain objects, do they have the same shape?
  4047. */
  4048. function looseEqual (a, b) {
  4049. if (a === b) { return true }
  4050. var isObjectA = isObject(a);
  4051. var isObjectB = isObject(b);
  4052. if (isObjectA && isObjectB) {
  4053. try {
  4054. var isArrayA = Array.isArray(a);
  4055. var isArrayB = Array.isArray(b);
  4056. if (isArrayA && isArrayB) {
  4057. return a.length === b.length && a.every(function (e, i) {
  4058. return looseEqual(e, b[i])
  4059. })
  4060. } else if (a instanceof Date && b instanceof Date) {
  4061. return a.getTime() === b.getTime()
  4062. } else if (!isArrayA && !isArrayB) {
  4063. var keysA = Object.keys(a);
  4064. var keysB = Object.keys(b);
  4065. return keysA.length === keysB.length && keysA.every(function (key) {
  4066. return looseEqual(a[key], b[key])
  4067. })
  4068. } else {
  4069. /* istanbul ignore next */
  4070. return false
  4071. }
  4072. } catch (e) {
  4073. /* istanbul ignore next */
  4074. return false
  4075. }
  4076. } else if (!isObjectA && !isObjectB) {
  4077. return String(a) === String(b)
  4078. } else {
  4079. return false
  4080. }
  4081. }
  4082. /**
  4083. * Return the first index at which a loosely equal value can be
  4084. * found in the array (if value is a plain object, the array must
  4085. * contain an object of the same shape), or -1 if it is not present.
  4086. */
  4087. function looseIndexOf (arr, val) {
  4088. for (var i = 0; i < arr.length; i++) {
  4089. if (looseEqual(arr[i], val)) { return i }
  4090. }
  4091. return -1
  4092. }
  4093. /**
  4094. * Ensure a function is called only once.
  4095. */
  4096. function once (fn) {
  4097. var called = false;
  4098. return function () {
  4099. if (!called) {
  4100. called = true;
  4101. fn.apply(this, arguments);
  4102. }
  4103. }
  4104. }
  4105. var ASSET_TYPES = [
  4106. 'component',
  4107. 'directive',
  4108. 'filter'
  4109. ];
  4110. var LIFECYCLE_HOOKS = [
  4111. 'beforeCreate',
  4112. 'created',
  4113. 'beforeMount',
  4114. 'mounted',
  4115. 'beforeUpdate',
  4116. 'updated',
  4117. 'beforeDestroy',
  4118. 'destroyed',
  4119. 'activated',
  4120. 'deactivated',
  4121. 'errorCaptured',
  4122. 'serverPrefetch'
  4123. ];
  4124. /* */
  4125. var config = ({
  4126. /**
  4127. * Option merge strategies (used in core/util/options)
  4128. */
  4129. // $flow-disable-line
  4130. optionMergeStrategies: Object.create(null),
  4131. /**
  4132. * Whether to suppress warnings.
  4133. */
  4134. silent: false,
  4135. /**
  4136. * Show production mode tip message on boot?
  4137. */
  4138. productionTip: "development" !== 'production',
  4139. /**
  4140. * Whether to enable devtools
  4141. */
  4142. devtools: "development" !== 'production',
  4143. /**
  4144. * Whether to record perf
  4145. */
  4146. performance: false,
  4147. /**
  4148. * Error handler for watcher errors
  4149. */
  4150. errorHandler: null,
  4151. /**
  4152. * Warn handler for watcher warns
  4153. */
  4154. warnHandler: null,
  4155. /**
  4156. * Ignore certain custom elements
  4157. */
  4158. ignoredElements: [],
  4159. /**
  4160. * Custom user key aliases for v-on
  4161. */
  4162. // $flow-disable-line
  4163. keyCodes: Object.create(null),
  4164. /**
  4165. * Check if a tag is reserved so that it cannot be registered as a
  4166. * component. This is platform-dependent and may be overwritten.
  4167. */
  4168. isReservedTag: no,
  4169. /**
  4170. * Check if an attribute is reserved so that it cannot be used as a component
  4171. * prop. This is platform-dependent and may be overwritten.
  4172. */
  4173. isReservedAttr: no,
  4174. /**
  4175. * Check if a tag is an unknown element.
  4176. * Platform-dependent.
  4177. */
  4178. isUnknownElement: no,
  4179. /**
  4180. * Get the namespace of an element
  4181. */
  4182. getTagNamespace: noop,
  4183. /**
  4184. * Parse the real tag name for the specific platform.
  4185. */
  4186. parsePlatformTagName: identity,
  4187. /**
  4188. * Check if an attribute must be bound using property, e.g. value
  4189. * Platform-dependent.
  4190. */
  4191. mustUseProp: no,
  4192. /**
  4193. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  4194. * This will significantly reduce performance if set to false.
  4195. */
  4196. async: true,
  4197. /**
  4198. * Exposed for legacy reasons
  4199. */
  4200. _lifecycleHooks: LIFECYCLE_HOOKS
  4201. });
  4202. /* */
  4203. /**
  4204. * unicode letters used for parsing html tags, component names and property paths.
  4205. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  4206. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  4207. */
  4208. 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/;
  4209. /**
  4210. * Check if a string starts with $ or _
  4211. */
  4212. function isReserved (str) {
  4213. var c = (str + '').charCodeAt(0);
  4214. return c === 0x24 || c === 0x5F
  4215. }
  4216. /**
  4217. * Define a property.
  4218. */
  4219. function def (obj, key, val, enumerable) {
  4220. Object.defineProperty(obj, key, {
  4221. value: val,
  4222. enumerable: !!enumerable,
  4223. writable: true,
  4224. configurable: true
  4225. });
  4226. }
  4227. /**
  4228. * Parse simple path.
  4229. */
  4230. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  4231. function parsePath (path) {
  4232. if (bailRE.test(path)) {
  4233. return
  4234. }
  4235. var segments = path.split('.');
  4236. return function (obj) {
  4237. for (var i = 0; i < segments.length; i++) {
  4238. if (!obj) { return }
  4239. obj = obj[segments[i]];
  4240. }
  4241. return obj
  4242. }
  4243. }
  4244. /* */
  4245. // can we use __proto__?
  4246. var hasProto = '__proto__' in {};
  4247. // Browser environment sniffing
  4248. var inBrowser = typeof window !== 'undefined';
  4249. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  4250. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  4251. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  4252. var isIE = UA && /msie|trident/.test(UA);
  4253. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  4254. var isEdge = UA && UA.indexOf('edge/') > 0;
  4255. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  4256. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  4257. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  4258. var isPhantomJS = UA && /phantomjs/.test(UA);
  4259. var isFF = UA && UA.match(/firefox\/(\d+)/);
  4260. // Firefox has a "watch" function on Object.prototype...
  4261. var nativeWatch = ({}).watch;
  4262. if (inBrowser) {
  4263. try {
  4264. var opts = {};
  4265. Object.defineProperty(opts, 'passive', ({
  4266. get: function get () {
  4267. }
  4268. })); // https://github.com/facebook/flow/issues/285
  4269. window.addEventListener('test-passive', null, opts);
  4270. } catch (e) {}
  4271. }
  4272. // this needs to be lazy-evaled because vue may be required before
  4273. // vue-server-renderer can set VUE_ENV
  4274. var _isServer;
  4275. var isServerRendering = function () {
  4276. if (_isServer === undefined) {
  4277. /* istanbul ignore if */
  4278. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  4279. // detect presence of vue-server-renderer and avoid
  4280. // Webpack shimming the process
  4281. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  4282. } else {
  4283. _isServer = false;
  4284. }
  4285. }
  4286. return _isServer
  4287. };
  4288. // detect devtools
  4289. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  4290. /* istanbul ignore next */
  4291. function isNative (Ctor) {
  4292. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  4293. }
  4294. var hasSymbol =
  4295. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  4296. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  4297. var _Set;
  4298. /* istanbul ignore if */ // $flow-disable-line
  4299. if (typeof Set !== 'undefined' && isNative(Set)) {
  4300. // use native Set when available.
  4301. _Set = Set;
  4302. } else {
  4303. // a non-standard Set polyfill that only works with primitive keys.
  4304. _Set = /*@__PURE__*/(function () {
  4305. function Set () {
  4306. this.set = Object.create(null);
  4307. }
  4308. Set.prototype.has = function has (key) {
  4309. return this.set[key] === true
  4310. };
  4311. Set.prototype.add = function add (key) {
  4312. this.set[key] = true;
  4313. };
  4314. Set.prototype.clear = function clear () {
  4315. this.set = Object.create(null);
  4316. };
  4317. return Set;
  4318. }());
  4319. }
  4320. /* */
  4321. var warn = noop;
  4322. var tip = noop;
  4323. var generateComponentTrace = (noop); // work around flow check
  4324. var formatComponentName = (noop);
  4325. if (true) {
  4326. var hasConsole = typeof console !== 'undefined';
  4327. var classifyRE = /(?:^|[-_])(\w)/g;
  4328. var classify = function (str) { return str
  4329. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  4330. .replace(/[-_]/g, ''); };
  4331. warn = function (msg, vm) {
  4332. var trace = vm ? generateComponentTrace(vm) : '';
  4333. if (config.warnHandler) {
  4334. config.warnHandler.call(null, msg, vm, trace);
  4335. } else if (hasConsole && (!config.silent)) {
  4336. console.error(("[Vue warn]: " + msg + trace));
  4337. }
  4338. };
  4339. tip = function (msg, vm) {
  4340. if (hasConsole && (!config.silent)) {
  4341. console.warn("[Vue tip]: " + msg + (
  4342. vm ? generateComponentTrace(vm) : ''
  4343. ));
  4344. }
  4345. };
  4346. formatComponentName = function (vm, includeFile) {
  4347. if (vm.$root === vm) {
  4348. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  4349. return ('') + vm.$options.__file
  4350. }
  4351. return '<Root>'
  4352. }
  4353. var options = typeof vm === 'function' && vm.cid != null
  4354. ? vm.options
  4355. : vm._isVue
  4356. ? vm.$options || vm.constructor.options
  4357. : vm;
  4358. var name = options.name || options._componentTag;
  4359. var file = options.__file;
  4360. if (!name && file) {
  4361. var match = file.match(/([^/\\]+)\.vue$/);
  4362. name = match && match[1];
  4363. }
  4364. return (
  4365. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  4366. (file && includeFile !== false ? (" at " + file) : '')
  4367. )
  4368. };
  4369. var repeat = function (str, n) {
  4370. var res = '';
  4371. while (n) {
  4372. if (n % 2 === 1) { res += str; }
  4373. if (n > 1) { str += str; }
  4374. n >>= 1;
  4375. }
  4376. return res
  4377. };
  4378. generateComponentTrace = function (vm) {
  4379. if (vm._isVue && vm.$parent) {
  4380. var tree = [];
  4381. var currentRecursiveSequence = 0;
  4382. while (vm && vm.$options.name !== 'PageBody') {
  4383. if (tree.length > 0) {
  4384. var last = tree[tree.length - 1];
  4385. if (last.constructor === vm.constructor) {
  4386. currentRecursiveSequence++;
  4387. vm = vm.$parent;
  4388. continue
  4389. } else if (currentRecursiveSequence > 0) {
  4390. tree[tree.length - 1] = [last, currentRecursiveSequence];
  4391. currentRecursiveSequence = 0;
  4392. }
  4393. }
  4394. !vm.$options.isReserved && tree.push(vm);
  4395. vm = vm.$parent;
  4396. }
  4397. return '\n\nfound in\n\n' + tree
  4398. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  4399. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  4400. : formatComponentName(vm))); })
  4401. .join('\n')
  4402. } else {
  4403. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  4404. }
  4405. };
  4406. }
  4407. /* */
  4408. var uid = 0;
  4409. /**
  4410. * A dep is an observable that can have multiple
  4411. * directives subscribing to it.
  4412. */
  4413. var Dep = function Dep () {
  4414. this.id = uid++;
  4415. this.subs = [];
  4416. };
  4417. Dep.prototype.addSub = function addSub (sub) {
  4418. this.subs.push(sub);
  4419. };
  4420. Dep.prototype.removeSub = function removeSub (sub) {
  4421. remove(this.subs, sub);
  4422. };
  4423. Dep.prototype.depend = function depend () {
  4424. if (Dep.SharedObject.target) {
  4425. Dep.SharedObject.target.addDep(this);
  4426. }
  4427. };
  4428. Dep.prototype.notify = function notify () {
  4429. // stabilize the subscriber list first
  4430. var subs = this.subs.slice();
  4431. if ( true && !config.async) {
  4432. // subs aren't sorted in scheduler if not running async
  4433. // we need to sort them now to make sure they fire in correct
  4434. // order
  4435. subs.sort(function (a, b) { return a.id - b.id; });
  4436. }
  4437. for (var i = 0, l = subs.length; i < l; i++) {
  4438. subs[i].update();
  4439. }
  4440. };
  4441. // The current target watcher being evaluated.
  4442. // This is globally unique because only one watcher
  4443. // can be evaluated at a time.
  4444. // fixed by xxxxxx (nvue shared vuex)
  4445. /* eslint-disable no-undef */
  4446. Dep.SharedObject = {};
  4447. Dep.SharedObject.target = null;
  4448. Dep.SharedObject.targetStack = [];
  4449. function pushTarget (target) {
  4450. Dep.SharedObject.targetStack.push(target);
  4451. Dep.SharedObject.target = target;
  4452. Dep.target = target;
  4453. }
  4454. function popTarget () {
  4455. Dep.SharedObject.targetStack.pop();
  4456. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  4457. Dep.target = Dep.SharedObject.target;
  4458. }
  4459. /* */
  4460. var VNode = function VNode (
  4461. tag,
  4462. data,
  4463. children,
  4464. text,
  4465. elm,
  4466. context,
  4467. componentOptions,
  4468. asyncFactory
  4469. ) {
  4470. this.tag = tag;
  4471. this.data = data;
  4472. this.children = children;
  4473. this.text = text;
  4474. this.elm = elm;
  4475. this.ns = undefined;
  4476. this.context = context;
  4477. this.fnContext = undefined;
  4478. this.fnOptions = undefined;
  4479. this.fnScopeId = undefined;
  4480. this.key = data && data.key;
  4481. this.componentOptions = componentOptions;
  4482. this.componentInstance = undefined;
  4483. this.parent = undefined;
  4484. this.raw = false;
  4485. this.isStatic = false;
  4486. this.isRootInsert = true;
  4487. this.isComment = false;
  4488. this.isCloned = false;
  4489. this.isOnce = false;
  4490. this.asyncFactory = asyncFactory;
  4491. this.asyncMeta = undefined;
  4492. this.isAsyncPlaceholder = false;
  4493. };
  4494. var prototypeAccessors = { child: { configurable: true } };
  4495. // DEPRECATED: alias for componentInstance for backwards compat.
  4496. /* istanbul ignore next */
  4497. prototypeAccessors.child.get = function () {
  4498. return this.componentInstance
  4499. };
  4500. Object.defineProperties( VNode.prototype, prototypeAccessors );
  4501. var createEmptyVNode = function (text) {
  4502. if ( text === void 0 ) text = '';
  4503. var node = new VNode();
  4504. node.text = text;
  4505. node.isComment = true;
  4506. return node
  4507. };
  4508. function createTextVNode (val) {
  4509. return new VNode(undefined, undefined, undefined, String(val))
  4510. }
  4511. // optimized shallow clone
  4512. // used for static nodes and slot nodes because they may be reused across
  4513. // multiple renders, cloning them avoids errors when DOM manipulations rely
  4514. // on their elm reference.
  4515. function cloneVNode (vnode) {
  4516. var cloned = new VNode(
  4517. vnode.tag,
  4518. vnode.data,
  4519. // #7975
  4520. // clone children array to avoid mutating original in case of cloning
  4521. // a child.
  4522. vnode.children && vnode.children.slice(),
  4523. vnode.text,
  4524. vnode.elm,
  4525. vnode.context,
  4526. vnode.componentOptions,
  4527. vnode.asyncFactory
  4528. );
  4529. cloned.ns = vnode.ns;
  4530. cloned.isStatic = vnode.isStatic;
  4531. cloned.key = vnode.key;
  4532. cloned.isComment = vnode.isComment;
  4533. cloned.fnContext = vnode.fnContext;
  4534. cloned.fnOptions = vnode.fnOptions;
  4535. cloned.fnScopeId = vnode.fnScopeId;
  4536. cloned.asyncMeta = vnode.asyncMeta;
  4537. cloned.isCloned = true;
  4538. return cloned
  4539. }
  4540. /*
  4541. * not type checking this file because flow doesn't play well with
  4542. * dynamically accessing methods on Array prototype
  4543. */
  4544. var arrayProto = Array.prototype;
  4545. var arrayMethods = Object.create(arrayProto);
  4546. var methodsToPatch = [
  4547. 'push',
  4548. 'pop',
  4549. 'shift',
  4550. 'unshift',
  4551. 'splice',
  4552. 'sort',
  4553. 'reverse'
  4554. ];
  4555. /**
  4556. * Intercept mutating methods and emit events
  4557. */
  4558. methodsToPatch.forEach(function (method) {
  4559. // cache original method
  4560. var original = arrayProto[method];
  4561. def(arrayMethods, method, function mutator () {
  4562. var args = [], len = arguments.length;
  4563. while ( len-- ) args[ len ] = arguments[ len ];
  4564. var result = original.apply(this, args);
  4565. var ob = this.__ob__;
  4566. var inserted;
  4567. switch (method) {
  4568. case 'push':
  4569. case 'unshift':
  4570. inserted = args;
  4571. break
  4572. case 'splice':
  4573. inserted = args.slice(2);
  4574. break
  4575. }
  4576. if (inserted) { ob.observeArray(inserted); }
  4577. // notify change
  4578. ob.dep.notify();
  4579. return result
  4580. });
  4581. });
  4582. /* */
  4583. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  4584. /**
  4585. * In some cases we may want to disable observation inside a component's
  4586. * update computation.
  4587. */
  4588. var shouldObserve = true;
  4589. function toggleObserving (value) {
  4590. shouldObserve = value;
  4591. }
  4592. /**
  4593. * Observer class that is attached to each observed
  4594. * object. Once attached, the observer converts the target
  4595. * object's property keys into getter/setters that
  4596. * collect dependencies and dispatch updates.
  4597. */
  4598. var Observer = function Observer (value) {
  4599. this.value = value;
  4600. this.dep = new Dep();
  4601. this.vmCount = 0;
  4602. def(value, '__ob__', this);
  4603. if (Array.isArray(value)) {
  4604. if (hasProto) {
  4605. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  4606. if(value.push !== value.__proto__.push){
  4607. copyAugment(value, arrayMethods, arrayKeys);
  4608. } else {
  4609. protoAugment(value, arrayMethods);
  4610. }
  4611. }
  4612. } else {
  4613. copyAugment(value, arrayMethods, arrayKeys);
  4614. }
  4615. this.observeArray(value);
  4616. } else {
  4617. this.walk(value);
  4618. }
  4619. };
  4620. /**
  4621. * Walk through all properties and convert them into
  4622. * getter/setters. This method should only be called when
  4623. * value type is Object.
  4624. */
  4625. Observer.prototype.walk = function walk (obj) {
  4626. var keys = Object.keys(obj);
  4627. for (var i = 0; i < keys.length; i++) {
  4628. defineReactive$$1(obj, keys[i]);
  4629. }
  4630. };
  4631. /**
  4632. * Observe a list of Array items.
  4633. */
  4634. Observer.prototype.observeArray = function observeArray (items) {
  4635. for (var i = 0, l = items.length; i < l; i++) {
  4636. observe(items[i]);
  4637. }
  4638. };
  4639. // helpers
  4640. /**
  4641. * Augment a target Object or Array by intercepting
  4642. * the prototype chain using __proto__
  4643. */
  4644. function protoAugment (target, src) {
  4645. /* eslint-disable no-proto */
  4646. target.__proto__ = src;
  4647. /* eslint-enable no-proto */
  4648. }
  4649. /**
  4650. * Augment a target Object or Array by defining
  4651. * hidden properties.
  4652. */
  4653. /* istanbul ignore next */
  4654. function copyAugment (target, src, keys) {
  4655. for (var i = 0, l = keys.length; i < l; i++) {
  4656. var key = keys[i];
  4657. def(target, key, src[key]);
  4658. }
  4659. }
  4660. /**
  4661. * Attempt to create an observer instance for a value,
  4662. * returns the new observer if successfully observed,
  4663. * or the existing observer if the value already has one.
  4664. */
  4665. function observe (value, asRootData) {
  4666. if (!isObject(value) || value instanceof VNode) {
  4667. return
  4668. }
  4669. var ob;
  4670. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  4671. ob = value.__ob__;
  4672. } else if (
  4673. shouldObserve &&
  4674. !isServerRendering() &&
  4675. (Array.isArray(value) || isPlainObject(value)) &&
  4676. Object.isExtensible(value) &&
  4677. !value._isVue
  4678. ) {
  4679. ob = new Observer(value);
  4680. }
  4681. if (asRootData && ob) {
  4682. ob.vmCount++;
  4683. }
  4684. return ob
  4685. }
  4686. /**
  4687. * Define a reactive property on an Object.
  4688. */
  4689. function defineReactive$$1 (
  4690. obj,
  4691. key,
  4692. val,
  4693. customSetter,
  4694. shallow
  4695. ) {
  4696. var dep = new Dep();
  4697. var property = Object.getOwnPropertyDescriptor(obj, key);
  4698. if (property && property.configurable === false) {
  4699. return
  4700. }
  4701. // cater for pre-defined getter/setters
  4702. var getter = property && property.get;
  4703. var setter = property && property.set;
  4704. if ((!getter || setter) && arguments.length === 2) {
  4705. val = obj[key];
  4706. }
  4707. var childOb = !shallow && observe(val);
  4708. Object.defineProperty(obj, key, {
  4709. enumerable: true,
  4710. configurable: true,
  4711. get: function reactiveGetter () {
  4712. var value = getter ? getter.call(obj) : val;
  4713. if (Dep.SharedObject.target) { // fixed by xxxxxx
  4714. dep.depend();
  4715. if (childOb) {
  4716. childOb.dep.depend();
  4717. if (Array.isArray(value)) {
  4718. dependArray(value);
  4719. }
  4720. }
  4721. }
  4722. return value
  4723. },
  4724. set: function reactiveSetter (newVal) {
  4725. var value = getter ? getter.call(obj) : val;
  4726. /* eslint-disable no-self-compare */
  4727. if (newVal === value || (newVal !== newVal && value !== value)) {
  4728. return
  4729. }
  4730. /* eslint-enable no-self-compare */
  4731. if ( true && customSetter) {
  4732. customSetter();
  4733. }
  4734. // #7981: for accessor properties without setter
  4735. if (getter && !setter) { return }
  4736. if (setter) {
  4737. setter.call(obj, newVal);
  4738. } else {
  4739. val = newVal;
  4740. }
  4741. childOb = !shallow && observe(newVal);
  4742. dep.notify();
  4743. }
  4744. });
  4745. }
  4746. /**
  4747. * Set a property on an object. Adds the new property and
  4748. * triggers change notification if the property doesn't
  4749. * already exist.
  4750. */
  4751. function set (target, key, val) {
  4752. if ( true &&
  4753. (isUndef(target) || isPrimitive(target))
  4754. ) {
  4755. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  4756. }
  4757. if (Array.isArray(target) && isValidArrayIndex(key)) {
  4758. target.length = Math.max(target.length, key);
  4759. target.splice(key, 1, val);
  4760. return val
  4761. }
  4762. if (key in target && !(key in Object.prototype)) {
  4763. target[key] = val;
  4764. return val
  4765. }
  4766. var ob = (target).__ob__;
  4767. if (target._isVue || (ob && ob.vmCount)) {
  4768. true && warn(
  4769. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  4770. 'at runtime - declare it upfront in the data option.'
  4771. );
  4772. return val
  4773. }
  4774. if (!ob) {
  4775. target[key] = val;
  4776. return val
  4777. }
  4778. defineReactive$$1(ob.value, key, val);
  4779. ob.dep.notify();
  4780. return val
  4781. }
  4782. /**
  4783. * Delete a property and trigger change if necessary.
  4784. */
  4785. function del (target, key) {
  4786. if ( true &&
  4787. (isUndef(target) || isPrimitive(target))
  4788. ) {
  4789. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  4790. }
  4791. if (Array.isArray(target) && isValidArrayIndex(key)) {
  4792. target.splice(key, 1);
  4793. return
  4794. }
  4795. var ob = (target).__ob__;
  4796. if (target._isVue || (ob && ob.vmCount)) {
  4797. true && warn(
  4798. 'Avoid deleting properties on a Vue instance or its root $data ' +
  4799. '- just set it to null.'
  4800. );
  4801. return
  4802. }
  4803. if (!hasOwn(target, key)) {
  4804. return
  4805. }
  4806. delete target[key];
  4807. if (!ob) {
  4808. return
  4809. }
  4810. ob.dep.notify();
  4811. }
  4812. /**
  4813. * Collect dependencies on array elements when the array is touched, since
  4814. * we cannot intercept array element access like property getters.
  4815. */
  4816. function dependArray (value) {
  4817. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  4818. e = value[i];
  4819. e && e.__ob__ && e.__ob__.dep.depend();
  4820. if (Array.isArray(e)) {
  4821. dependArray(e);
  4822. }
  4823. }
  4824. }
  4825. /* */
  4826. /**
  4827. * Option overwriting strategies are functions that handle
  4828. * how to merge a parent option value and a child option
  4829. * value into the final value.
  4830. */
  4831. var strats = config.optionMergeStrategies;
  4832. /**
  4833. * Options with restrictions
  4834. */
  4835. if (true) {
  4836. strats.el = strats.propsData = function (parent, child, vm, key) {
  4837. if (!vm) {
  4838. warn(
  4839. "option \"" + key + "\" can only be used during instance " +
  4840. 'creation with the `new` keyword.'
  4841. );
  4842. }
  4843. return defaultStrat(parent, child)
  4844. };
  4845. }
  4846. /**
  4847. * Helper that recursively merges two data objects together.
  4848. */
  4849. function mergeData (to, from) {
  4850. if (!from) { return to }
  4851. var key, toVal, fromVal;
  4852. var keys = hasSymbol
  4853. ? Reflect.ownKeys(from)
  4854. : Object.keys(from);
  4855. for (var i = 0; i < keys.length; i++) {
  4856. key = keys[i];
  4857. // in case the object is already observed...
  4858. if (key === '__ob__') { continue }
  4859. toVal = to[key];
  4860. fromVal = from[key];
  4861. if (!hasOwn(to, key)) {
  4862. set(to, key, fromVal);
  4863. } else if (
  4864. toVal !== fromVal &&
  4865. isPlainObject(toVal) &&
  4866. isPlainObject(fromVal)
  4867. ) {
  4868. mergeData(toVal, fromVal);
  4869. }
  4870. }
  4871. return to
  4872. }
  4873. /**
  4874. * Data
  4875. */
  4876. function mergeDataOrFn (
  4877. parentVal,
  4878. childVal,
  4879. vm
  4880. ) {
  4881. if (!vm) {
  4882. // in a Vue.extend merge, both should be functions
  4883. if (!childVal) {
  4884. return parentVal
  4885. }
  4886. if (!parentVal) {
  4887. return childVal
  4888. }
  4889. // when parentVal & childVal are both present,
  4890. // we need to return a function that returns the
  4891. // merged result of both functions... no need to
  4892. // check if parentVal is a function here because
  4893. // it has to be a function to pass previous merges.
  4894. return function mergedDataFn () {
  4895. return mergeData(
  4896. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  4897. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  4898. )
  4899. }
  4900. } else {
  4901. return function mergedInstanceDataFn () {
  4902. // instance merge
  4903. var instanceData = typeof childVal === 'function'
  4904. ? childVal.call(vm, vm)
  4905. : childVal;
  4906. var defaultData = typeof parentVal === 'function'
  4907. ? parentVal.call(vm, vm)
  4908. : parentVal;
  4909. if (instanceData) {
  4910. return mergeData(instanceData, defaultData)
  4911. } else {
  4912. return defaultData
  4913. }
  4914. }
  4915. }
  4916. }
  4917. strats.data = function (
  4918. parentVal,
  4919. childVal,
  4920. vm
  4921. ) {
  4922. if (!vm) {
  4923. if (childVal && typeof childVal !== 'function') {
  4924. true && warn(
  4925. 'The "data" option should be a function ' +
  4926. 'that returns a per-instance value in component ' +
  4927. 'definitions.',
  4928. vm
  4929. );
  4930. return parentVal
  4931. }
  4932. return mergeDataOrFn(parentVal, childVal)
  4933. }
  4934. return mergeDataOrFn(parentVal, childVal, vm)
  4935. };
  4936. /**
  4937. * Hooks and props are merged as arrays.
  4938. */
  4939. function mergeHook (
  4940. parentVal,
  4941. childVal
  4942. ) {
  4943. var res = childVal
  4944. ? parentVal
  4945. ? parentVal.concat(childVal)
  4946. : Array.isArray(childVal)
  4947. ? childVal
  4948. : [childVal]
  4949. : parentVal;
  4950. return res
  4951. ? dedupeHooks(res)
  4952. : res
  4953. }
  4954. function dedupeHooks (hooks) {
  4955. var res = [];
  4956. for (var i = 0; i < hooks.length; i++) {
  4957. if (res.indexOf(hooks[i]) === -1) {
  4958. res.push(hooks[i]);
  4959. }
  4960. }
  4961. return res
  4962. }
  4963. LIFECYCLE_HOOKS.forEach(function (hook) {
  4964. strats[hook] = mergeHook;
  4965. });
  4966. /**
  4967. * Assets
  4968. *
  4969. * When a vm is present (instance creation), we need to do
  4970. * a three-way merge between constructor options, instance
  4971. * options and parent options.
  4972. */
  4973. function mergeAssets (
  4974. parentVal,
  4975. childVal,
  4976. vm,
  4977. key
  4978. ) {
  4979. var res = Object.create(parentVal || null);
  4980. if (childVal) {
  4981. true && assertObjectType(key, childVal, vm);
  4982. return extend(res, childVal)
  4983. } else {
  4984. return res
  4985. }
  4986. }
  4987. ASSET_TYPES.forEach(function (type) {
  4988. strats[type + 's'] = mergeAssets;
  4989. });
  4990. /**
  4991. * Watchers.
  4992. *
  4993. * Watchers hashes should not overwrite one
  4994. * another, so we merge them as arrays.
  4995. */
  4996. strats.watch = function (
  4997. parentVal,
  4998. childVal,
  4999. vm,
  5000. key
  5001. ) {
  5002. // work around Firefox's Object.prototype.watch...
  5003. if (parentVal === nativeWatch) { parentVal = undefined; }
  5004. if (childVal === nativeWatch) { childVal = undefined; }
  5005. /* istanbul ignore if */
  5006. if (!childVal) { return Object.create(parentVal || null) }
  5007. if (true) {
  5008. assertObjectType(key, childVal, vm);
  5009. }
  5010. if (!parentVal) { return childVal }
  5011. var ret = {};
  5012. extend(ret, parentVal);
  5013. for (var key$1 in childVal) {
  5014. var parent = ret[key$1];
  5015. var child = childVal[key$1];
  5016. if (parent && !Array.isArray(parent)) {
  5017. parent = [parent];
  5018. }
  5019. ret[key$1] = parent
  5020. ? parent.concat(child)
  5021. : Array.isArray(child) ? child : [child];
  5022. }
  5023. return ret
  5024. };
  5025. /**
  5026. * Other object hashes.
  5027. */
  5028. strats.props =
  5029. strats.methods =
  5030. strats.inject =
  5031. strats.computed = function (
  5032. parentVal,
  5033. childVal,
  5034. vm,
  5035. key
  5036. ) {
  5037. if (childVal && "development" !== 'production') {
  5038. assertObjectType(key, childVal, vm);
  5039. }
  5040. if (!parentVal) { return childVal }
  5041. var ret = Object.create(null);
  5042. extend(ret, parentVal);
  5043. if (childVal) { extend(ret, childVal); }
  5044. return ret
  5045. };
  5046. strats.provide = mergeDataOrFn;
  5047. /**
  5048. * Default strategy.
  5049. */
  5050. var defaultStrat = function (parentVal, childVal) {
  5051. return childVal === undefined
  5052. ? parentVal
  5053. : childVal
  5054. };
  5055. /**
  5056. * Validate component names
  5057. */
  5058. function checkComponents (options) {
  5059. for (var key in options.components) {
  5060. validateComponentName(key);
  5061. }
  5062. }
  5063. function validateComponentName (name) {
  5064. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  5065. warn(
  5066. 'Invalid component name: "' + name + '". Component names ' +
  5067. 'should conform to valid custom element name in html5 specification.'
  5068. );
  5069. }
  5070. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  5071. warn(
  5072. 'Do not use built-in or reserved HTML elements as component ' +
  5073. 'id: ' + name
  5074. );
  5075. }
  5076. }
  5077. /**
  5078. * Ensure all props option syntax are normalized into the
  5079. * Object-based format.
  5080. */
  5081. function normalizeProps (options, vm) {
  5082. var props = options.props;
  5083. if (!props) { return }
  5084. var res = {};
  5085. var i, val, name;
  5086. if (Array.isArray(props)) {
  5087. i = props.length;
  5088. while (i--) {
  5089. val = props[i];
  5090. if (typeof val === 'string') {
  5091. name = camelize(val);
  5092. res[name] = { type: null };
  5093. } else if (true) {
  5094. warn('props must be strings when using array syntax.');
  5095. }
  5096. }
  5097. } else if (isPlainObject(props)) {
  5098. for (var key in props) {
  5099. val = props[key];
  5100. name = camelize(key);
  5101. res[name] = isPlainObject(val)
  5102. ? val
  5103. : { type: val };
  5104. }
  5105. } else if (true) {
  5106. warn(
  5107. "Invalid value for option \"props\": expected an Array or an Object, " +
  5108. "but got " + (toRawType(props)) + ".",
  5109. vm
  5110. );
  5111. }
  5112. options.props = res;
  5113. }
  5114. /**
  5115. * Normalize all injections into Object-based format
  5116. */
  5117. function normalizeInject (options, vm) {
  5118. var inject = options.inject;
  5119. if (!inject) { return }
  5120. var normalized = options.inject = {};
  5121. if (Array.isArray(inject)) {
  5122. for (var i = 0; i < inject.length; i++) {
  5123. normalized[inject[i]] = { from: inject[i] };
  5124. }
  5125. } else if (isPlainObject(inject)) {
  5126. for (var key in inject) {
  5127. var val = inject[key];
  5128. normalized[key] = isPlainObject(val)
  5129. ? extend({ from: key }, val)
  5130. : { from: val };
  5131. }
  5132. } else if (true) {
  5133. warn(
  5134. "Invalid value for option \"inject\": expected an Array or an Object, " +
  5135. "but got " + (toRawType(inject)) + ".",
  5136. vm
  5137. );
  5138. }
  5139. }
  5140. /**
  5141. * Normalize raw function directives into object format.
  5142. */
  5143. function normalizeDirectives (options) {
  5144. var dirs = options.directives;
  5145. if (dirs) {
  5146. for (var key in dirs) {
  5147. var def$$1 = dirs[key];
  5148. if (typeof def$$1 === 'function') {
  5149. dirs[key] = { bind: def$$1, update: def$$1 };
  5150. }
  5151. }
  5152. }
  5153. }
  5154. function assertObjectType (name, value, vm) {
  5155. if (!isPlainObject(value)) {
  5156. warn(
  5157. "Invalid value for option \"" + name + "\": expected an Object, " +
  5158. "but got " + (toRawType(value)) + ".",
  5159. vm
  5160. );
  5161. }
  5162. }
  5163. /**
  5164. * Merge two option objects into a new one.
  5165. * Core utility used in both instantiation and inheritance.
  5166. */
  5167. function mergeOptions (
  5168. parent,
  5169. child,
  5170. vm
  5171. ) {
  5172. if (true) {
  5173. checkComponents(child);
  5174. }
  5175. if (typeof child === 'function') {
  5176. child = child.options;
  5177. }
  5178. normalizeProps(child, vm);
  5179. normalizeInject(child, vm);
  5180. normalizeDirectives(child);
  5181. // Apply extends and mixins on the child options,
  5182. // but only if it is a raw options object that isn't
  5183. // the result of another mergeOptions call.
  5184. // Only merged options has the _base property.
  5185. if (!child._base) {
  5186. if (child.extends) {
  5187. parent = mergeOptions(parent, child.extends, vm);
  5188. }
  5189. if (child.mixins) {
  5190. for (var i = 0, l = child.mixins.length; i < l; i++) {
  5191. parent = mergeOptions(parent, child.mixins[i], vm);
  5192. }
  5193. }
  5194. }
  5195. var options = {};
  5196. var key;
  5197. for (key in parent) {
  5198. mergeField(key);
  5199. }
  5200. for (key in child) {
  5201. if (!hasOwn(parent, key)) {
  5202. mergeField(key);
  5203. }
  5204. }
  5205. function mergeField (key) {
  5206. var strat = strats[key] || defaultStrat;
  5207. options[key] = strat(parent[key], child[key], vm, key);
  5208. }
  5209. return options
  5210. }
  5211. /**
  5212. * Resolve an asset.
  5213. * This function is used because child instances need access
  5214. * to assets defined in its ancestor chain.
  5215. */
  5216. function resolveAsset (
  5217. options,
  5218. type,
  5219. id,
  5220. warnMissing
  5221. ) {
  5222. /* istanbul ignore if */
  5223. if (typeof id !== 'string') {
  5224. return
  5225. }
  5226. var assets = options[type];
  5227. // check local registration variations first
  5228. if (hasOwn(assets, id)) { return assets[id] }
  5229. var camelizedId = camelize(id);
  5230. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  5231. var PascalCaseId = capitalize(camelizedId);
  5232. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  5233. // fallback to prototype chain
  5234. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  5235. if ( true && warnMissing && !res) {
  5236. warn(
  5237. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  5238. options
  5239. );
  5240. }
  5241. return res
  5242. }
  5243. /* */
  5244. function validateProp (
  5245. key,
  5246. propOptions,
  5247. propsData,
  5248. vm
  5249. ) {
  5250. var prop = propOptions[key];
  5251. var absent = !hasOwn(propsData, key);
  5252. var value = propsData[key];
  5253. // boolean casting
  5254. var booleanIndex = getTypeIndex(Boolean, prop.type);
  5255. if (booleanIndex > -1) {
  5256. if (absent && !hasOwn(prop, 'default')) {
  5257. value = false;
  5258. } else if (value === '' || value === hyphenate(key)) {
  5259. // only cast empty string / same name to boolean if
  5260. // boolean has higher priority
  5261. var stringIndex = getTypeIndex(String, prop.type);
  5262. if (stringIndex < 0 || booleanIndex < stringIndex) {
  5263. value = true;
  5264. }
  5265. }
  5266. }
  5267. // check default value
  5268. if (value === undefined) {
  5269. value = getPropDefaultValue(vm, prop, key);
  5270. // since the default value is a fresh copy,
  5271. // make sure to observe it.
  5272. var prevShouldObserve = shouldObserve;
  5273. toggleObserving(true);
  5274. observe(value);
  5275. toggleObserving(prevShouldObserve);
  5276. }
  5277. if (
  5278. true
  5279. ) {
  5280. assertProp(prop, key, value, vm, absent);
  5281. }
  5282. return value
  5283. }
  5284. /**
  5285. * Get the default value of a prop.
  5286. */
  5287. function getPropDefaultValue (vm, prop, key) {
  5288. // no default, return undefined
  5289. if (!hasOwn(prop, 'default')) {
  5290. return undefined
  5291. }
  5292. var def = prop.default;
  5293. // warn against non-factory defaults for Object & Array
  5294. if ( true && isObject(def)) {
  5295. warn(
  5296. 'Invalid default value for prop "' + key + '": ' +
  5297. 'Props with type Object/Array must use a factory function ' +
  5298. 'to return the default value.',
  5299. vm
  5300. );
  5301. }
  5302. // the raw prop value was also undefined from previous render,
  5303. // return previous default value to avoid unnecessary watcher trigger
  5304. if (vm && vm.$options.propsData &&
  5305. vm.$options.propsData[key] === undefined &&
  5306. vm._props[key] !== undefined
  5307. ) {
  5308. return vm._props[key]
  5309. }
  5310. // call factory function for non-Function types
  5311. // a value is Function if its prototype is function even across different execution context
  5312. return typeof def === 'function' && getType(prop.type) !== 'Function'
  5313. ? def.call(vm)
  5314. : def
  5315. }
  5316. /**
  5317. * Assert whether a prop is valid.
  5318. */
  5319. function assertProp (
  5320. prop,
  5321. name,
  5322. value,
  5323. vm,
  5324. absent
  5325. ) {
  5326. if (prop.required && absent) {
  5327. warn(
  5328. 'Missing required prop: "' + name + '"',
  5329. vm
  5330. );
  5331. return
  5332. }
  5333. if (value == null && !prop.required) {
  5334. return
  5335. }
  5336. var type = prop.type;
  5337. var valid = !type || type === true;
  5338. var expectedTypes = [];
  5339. if (type) {
  5340. if (!Array.isArray(type)) {
  5341. type = [type];
  5342. }
  5343. for (var i = 0; i < type.length && !valid; i++) {
  5344. var assertedType = assertType(value, type[i]);
  5345. expectedTypes.push(assertedType.expectedType || '');
  5346. valid = assertedType.valid;
  5347. }
  5348. }
  5349. if (!valid) {
  5350. warn(
  5351. getInvalidTypeMessage(name, value, expectedTypes),
  5352. vm
  5353. );
  5354. return
  5355. }
  5356. var validator = prop.validator;
  5357. if (validator) {
  5358. if (!validator(value)) {
  5359. warn(
  5360. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  5361. vm
  5362. );
  5363. }
  5364. }
  5365. }
  5366. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  5367. function assertType (value, type) {
  5368. var valid;
  5369. var expectedType = getType(type);
  5370. if (simpleCheckRE.test(expectedType)) {
  5371. var t = typeof value;
  5372. valid = t === expectedType.toLowerCase();
  5373. // for primitive wrapper objects
  5374. if (!valid && t === 'object') {
  5375. valid = value instanceof type;
  5376. }
  5377. } else if (expectedType === 'Object') {
  5378. valid = isPlainObject(value);
  5379. } else if (expectedType === 'Array') {
  5380. valid = Array.isArray(value);
  5381. } else {
  5382. valid = value instanceof type;
  5383. }
  5384. return {
  5385. valid: valid,
  5386. expectedType: expectedType
  5387. }
  5388. }
  5389. /**
  5390. * Use function string name to check built-in types,
  5391. * because a simple equality check will fail when running
  5392. * across different vms / iframes.
  5393. */
  5394. function getType (fn) {
  5395. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  5396. return match ? match[1] : ''
  5397. }
  5398. function isSameType (a, b) {
  5399. return getType(a) === getType(b)
  5400. }
  5401. function getTypeIndex (type, expectedTypes) {
  5402. if (!Array.isArray(expectedTypes)) {
  5403. return isSameType(expectedTypes, type) ? 0 : -1
  5404. }
  5405. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  5406. if (isSameType(expectedTypes[i], type)) {
  5407. return i
  5408. }
  5409. }
  5410. return -1
  5411. }
  5412. function getInvalidTypeMessage (name, value, expectedTypes) {
  5413. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  5414. " Expected " + (expectedTypes.map(capitalize).join(', '));
  5415. var expectedType = expectedTypes[0];
  5416. var receivedType = toRawType(value);
  5417. var expectedValue = styleValue(value, expectedType);
  5418. var receivedValue = styleValue(value, receivedType);
  5419. // check if we need to specify expected value
  5420. if (expectedTypes.length === 1 &&
  5421. isExplicable(expectedType) &&
  5422. !isBoolean(expectedType, receivedType)) {
  5423. message += " with value " + expectedValue;
  5424. }
  5425. message += ", got " + receivedType + " ";
  5426. // check if we need to specify received value
  5427. if (isExplicable(receivedType)) {
  5428. message += "with value " + receivedValue + ".";
  5429. }
  5430. return message
  5431. }
  5432. function styleValue (value, type) {
  5433. if (type === 'String') {
  5434. return ("\"" + value + "\"")
  5435. } else if (type === 'Number') {
  5436. return ("" + (Number(value)))
  5437. } else {
  5438. return ("" + value)
  5439. }
  5440. }
  5441. function isExplicable (value) {
  5442. var explicitTypes = ['string', 'number', 'boolean'];
  5443. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  5444. }
  5445. function isBoolean () {
  5446. var args = [], len = arguments.length;
  5447. while ( len-- ) args[ len ] = arguments[ len ];
  5448. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  5449. }
  5450. /* */
  5451. function handleError (err, vm, info) {
  5452. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  5453. // See: https://github.com/vuejs/vuex/issues/1505
  5454. pushTarget();
  5455. try {
  5456. if (vm) {
  5457. var cur = vm;
  5458. while ((cur = cur.$parent)) {
  5459. var hooks = cur.$options.errorCaptured;
  5460. if (hooks) {
  5461. for (var i = 0; i < hooks.length; i++) {
  5462. try {
  5463. var capture = hooks[i].call(cur, err, vm, info) === false;
  5464. if (capture) { return }
  5465. } catch (e) {
  5466. globalHandleError(e, cur, 'errorCaptured hook');
  5467. }
  5468. }
  5469. }
  5470. }
  5471. }
  5472. globalHandleError(err, vm, info);
  5473. } finally {
  5474. popTarget();
  5475. }
  5476. }
  5477. function invokeWithErrorHandling (
  5478. handler,
  5479. context,
  5480. args,
  5481. vm,
  5482. info
  5483. ) {
  5484. var res;
  5485. try {
  5486. res = args ? handler.apply(context, args) : handler.call(context);
  5487. if (res && !res._isVue && isPromise(res) && !res._handled) {
  5488. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  5489. // issue #9511
  5490. // avoid catch triggering multiple times when nested calls
  5491. res._handled = true;
  5492. }
  5493. } catch (e) {
  5494. handleError(e, vm, info);
  5495. }
  5496. return res
  5497. }
  5498. function globalHandleError (err, vm, info) {
  5499. if (config.errorHandler) {
  5500. try {
  5501. return config.errorHandler.call(null, err, vm, info)
  5502. } catch (e) {
  5503. // if the user intentionally throws the original error in the handler,
  5504. // do not log it twice
  5505. if (e !== err) {
  5506. logError(e, null, 'config.errorHandler');
  5507. }
  5508. }
  5509. }
  5510. logError(err, vm, info);
  5511. }
  5512. function logError (err, vm, info) {
  5513. if (true) {
  5514. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  5515. }
  5516. /* istanbul ignore else */
  5517. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  5518. console.error(err);
  5519. } else {
  5520. throw err
  5521. }
  5522. }
  5523. /* */
  5524. var callbacks = [];
  5525. var pending = false;
  5526. function flushCallbacks () {
  5527. pending = false;
  5528. var copies = callbacks.slice(0);
  5529. callbacks.length = 0;
  5530. for (var i = 0; i < copies.length; i++) {
  5531. copies[i]();
  5532. }
  5533. }
  5534. // Here we have async deferring wrappers using microtasks.
  5535. // In 2.5 we used (macro) tasks (in combination with microtasks).
  5536. // However, it has subtle problems when state is changed right before repaint
  5537. // (e.g. #6813, out-in transitions).
  5538. // Also, using (macro) tasks in event handler would cause some weird behaviors
  5539. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  5540. // So we now use microtasks everywhere, again.
  5541. // A major drawback of this tradeoff is that there are some scenarios
  5542. // where microtasks have too high a priority and fire in between supposedly
  5543. // sequential events (e.g. #4521, #6690, which have workarounds)
  5544. // or even between bubbling of the same event (#6566).
  5545. var timerFunc;
  5546. // The nextTick behavior leverages the microtask queue, which can be accessed
  5547. // via either native Promise.then or MutationObserver.
  5548. // MutationObserver has wider support, however it is seriously bugged in
  5549. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  5550. // completely stops working after triggering a few times... so, if native
  5551. // Promise is available, we will use it:
  5552. /* istanbul ignore next, $flow-disable-line */
  5553. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  5554. var p = Promise.resolve();
  5555. timerFunc = function () {
  5556. p.then(flushCallbacks);
  5557. // In problematic UIWebViews, Promise.then doesn't completely break, but
  5558. // it can get stuck in a weird state where callbacks are pushed into the
  5559. // microtask queue but the queue isn't being flushed, until the browser
  5560. // needs to do some other work, e.g. handle a timer. Therefore we can
  5561. // "force" the microtask queue to be flushed by adding an empty timer.
  5562. if (isIOS) { setTimeout(noop); }
  5563. };
  5564. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  5565. isNative(MutationObserver) ||
  5566. // PhantomJS and iOS 7.x
  5567. MutationObserver.toString() === '[object MutationObserverConstructor]'
  5568. )) {
  5569. // Use MutationObserver where native Promise is not available,
  5570. // e.g. PhantomJS, iOS7, Android 4.4
  5571. // (#6466 MutationObserver is unreliable in IE11)
  5572. var counter = 1;
  5573. var observer = new MutationObserver(flushCallbacks);
  5574. var textNode = document.createTextNode(String(counter));
  5575. observer.observe(textNode, {
  5576. characterData: true
  5577. });
  5578. timerFunc = function () {
  5579. counter = (counter + 1) % 2;
  5580. textNode.data = String(counter);
  5581. };
  5582. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  5583. // Fallback to setImmediate.
  5584. // Technically it leverages the (macro) task queue,
  5585. // but it is still a better choice than setTimeout.
  5586. timerFunc = function () {
  5587. setImmediate(flushCallbacks);
  5588. };
  5589. } else {
  5590. // Fallback to setTimeout.
  5591. timerFunc = function () {
  5592. setTimeout(flushCallbacks, 0);
  5593. };
  5594. }
  5595. function nextTick (cb, ctx) {
  5596. var _resolve;
  5597. callbacks.push(function () {
  5598. if (cb) {
  5599. try {
  5600. cb.call(ctx);
  5601. } catch (e) {
  5602. handleError(e, ctx, 'nextTick');
  5603. }
  5604. } else if (_resolve) {
  5605. _resolve(ctx);
  5606. }
  5607. });
  5608. if (!pending) {
  5609. pending = true;
  5610. timerFunc();
  5611. }
  5612. // $flow-disable-line
  5613. if (!cb && typeof Promise !== 'undefined') {
  5614. return new Promise(function (resolve) {
  5615. _resolve = resolve;
  5616. })
  5617. }
  5618. }
  5619. /* */
  5620. /* not type checking this file because flow doesn't play well with Proxy */
  5621. var initProxy;
  5622. if (true) {
  5623. var allowedGlobals = makeMap(
  5624. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  5625. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  5626. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  5627. 'require' // for Webpack/Browserify
  5628. );
  5629. var warnNonPresent = function (target, key) {
  5630. warn(
  5631. "Property or method \"" + key + "\" is not defined on the instance but " +
  5632. 'referenced during render. Make sure that this property is reactive, ' +
  5633. 'either in the data option, or for class-based components, by ' +
  5634. 'initializing the property. ' +
  5635. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  5636. target
  5637. );
  5638. };
  5639. var warnReservedPrefix = function (target, key) {
  5640. warn(
  5641. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  5642. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  5643. 'prevent conflicts with Vue internals. ' +
  5644. 'See: https://vuejs.org/v2/api/#data',
  5645. target
  5646. );
  5647. };
  5648. var hasProxy =
  5649. typeof Proxy !== 'undefined' && isNative(Proxy);
  5650. if (hasProxy) {
  5651. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  5652. config.keyCodes = new Proxy(config.keyCodes, {
  5653. set: function set (target, key, value) {
  5654. if (isBuiltInModifier(key)) {
  5655. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  5656. return false
  5657. } else {
  5658. target[key] = value;
  5659. return true
  5660. }
  5661. }
  5662. });
  5663. }
  5664. var hasHandler = {
  5665. has: function has (target, key) {
  5666. var has = key in target;
  5667. var isAllowed = allowedGlobals(key) ||
  5668. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  5669. if (!has && !isAllowed) {
  5670. if (key in target.$data) { warnReservedPrefix(target, key); }
  5671. else { warnNonPresent(target, key); }
  5672. }
  5673. return has || !isAllowed
  5674. }
  5675. };
  5676. var getHandler = {
  5677. get: function get (target, key) {
  5678. if (typeof key === 'string' && !(key in target)) {
  5679. if (key in target.$data) { warnReservedPrefix(target, key); }
  5680. else { warnNonPresent(target, key); }
  5681. }
  5682. return target[key]
  5683. }
  5684. };
  5685. initProxy = function initProxy (vm) {
  5686. if (hasProxy) {
  5687. // determine which proxy handler to use
  5688. var options = vm.$options;
  5689. var handlers = options.render && options.render._withStripped
  5690. ? getHandler
  5691. : hasHandler;
  5692. vm._renderProxy = new Proxy(vm, handlers);
  5693. } else {
  5694. vm._renderProxy = vm;
  5695. }
  5696. };
  5697. }
  5698. /* */
  5699. var seenObjects = new _Set();
  5700. /**
  5701. * Recursively traverse an object to evoke all converted
  5702. * getters, so that every nested property inside the object
  5703. * is collected as a "deep" dependency.
  5704. */
  5705. function traverse (val) {
  5706. _traverse(val, seenObjects);
  5707. seenObjects.clear();
  5708. }
  5709. function _traverse (val, seen) {
  5710. var i, keys;
  5711. var isA = Array.isArray(val);
  5712. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  5713. return
  5714. }
  5715. if (val.__ob__) {
  5716. var depId = val.__ob__.dep.id;
  5717. if (seen.has(depId)) {
  5718. return
  5719. }
  5720. seen.add(depId);
  5721. }
  5722. if (isA) {
  5723. i = val.length;
  5724. while (i--) { _traverse(val[i], seen); }
  5725. } else {
  5726. keys = Object.keys(val);
  5727. i = keys.length;
  5728. while (i--) { _traverse(val[keys[i]], seen); }
  5729. }
  5730. }
  5731. var mark;
  5732. var measure;
  5733. if (true) {
  5734. var perf = inBrowser && window.performance;
  5735. /* istanbul ignore if */
  5736. if (
  5737. perf &&
  5738. perf.mark &&
  5739. perf.measure &&
  5740. perf.clearMarks &&
  5741. perf.clearMeasures
  5742. ) {
  5743. mark = function (tag) { return perf.mark(tag); };
  5744. measure = function (name, startTag, endTag) {
  5745. perf.measure(name, startTag, endTag);
  5746. perf.clearMarks(startTag);
  5747. perf.clearMarks(endTag);
  5748. // perf.clearMeasures(name)
  5749. };
  5750. }
  5751. }
  5752. /* */
  5753. var normalizeEvent = cached(function (name) {
  5754. var passive = name.charAt(0) === '&';
  5755. name = passive ? name.slice(1) : name;
  5756. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  5757. name = once$$1 ? name.slice(1) : name;
  5758. var capture = name.charAt(0) === '!';
  5759. name = capture ? name.slice(1) : name;
  5760. return {
  5761. name: name,
  5762. once: once$$1,
  5763. capture: capture,
  5764. passive: passive
  5765. }
  5766. });
  5767. function createFnInvoker (fns, vm) {
  5768. function invoker () {
  5769. var arguments$1 = arguments;
  5770. var fns = invoker.fns;
  5771. if (Array.isArray(fns)) {
  5772. var cloned = fns.slice();
  5773. for (var i = 0; i < cloned.length; i++) {
  5774. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  5775. }
  5776. } else {
  5777. // return handler return value for single handlers
  5778. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  5779. }
  5780. }
  5781. invoker.fns = fns;
  5782. return invoker
  5783. }
  5784. function updateListeners (
  5785. on,
  5786. oldOn,
  5787. add,
  5788. remove$$1,
  5789. createOnceHandler,
  5790. vm
  5791. ) {
  5792. var name, def$$1, cur, old, event;
  5793. for (name in on) {
  5794. def$$1 = cur = on[name];
  5795. old = oldOn[name];
  5796. event = normalizeEvent(name);
  5797. if (isUndef(cur)) {
  5798. true && warn(
  5799. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  5800. vm
  5801. );
  5802. } else if (isUndef(old)) {
  5803. if (isUndef(cur.fns)) {
  5804. cur = on[name] = createFnInvoker(cur, vm);
  5805. }
  5806. if (isTrue(event.once)) {
  5807. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  5808. }
  5809. add(event.name, cur, event.capture, event.passive, event.params);
  5810. } else if (cur !== old) {
  5811. old.fns = cur;
  5812. on[name] = old;
  5813. }
  5814. }
  5815. for (name in oldOn) {
  5816. if (isUndef(on[name])) {
  5817. event = normalizeEvent(name);
  5818. remove$$1(event.name, oldOn[name], event.capture);
  5819. }
  5820. }
  5821. }
  5822. /* */
  5823. /* */
  5824. // fixed by xxxxxx (mp properties)
  5825. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  5826. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  5827. if (isUndef(propOptions)) {
  5828. return res
  5829. }
  5830. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  5831. var attrs = data.attrs;
  5832. var props = data.props;
  5833. if (isDef(attrs) || isDef(props)) {
  5834. for (var key in propOptions) {
  5835. var altKey = hyphenate(key);
  5836. var result = checkProp(res, props, key, altKey, true) ||
  5837. checkProp(res, attrs, key, altKey, false);
  5838. // externalClass
  5839. if (
  5840. result &&
  5841. res[key] &&
  5842. externalClasses.indexOf(altKey) !== -1 &&
  5843. context[camelize(res[key])]
  5844. ) {
  5845. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  5846. res[key] = context[camelize(res[key])];
  5847. }
  5848. }
  5849. }
  5850. return res
  5851. }
  5852. function extractPropsFromVNodeData (
  5853. data,
  5854. Ctor,
  5855. tag,
  5856. context// fixed by xxxxxx
  5857. ) {
  5858. // we are only extracting raw values here.
  5859. // validation and default values are handled in the child
  5860. // component itself.
  5861. var propOptions = Ctor.options.props;
  5862. if (isUndef(propOptions)) {
  5863. // fixed by xxxxxx
  5864. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  5865. }
  5866. var res = {};
  5867. var attrs = data.attrs;
  5868. var props = data.props;
  5869. if (isDef(attrs) || isDef(props)) {
  5870. for (var key in propOptions) {
  5871. var altKey = hyphenate(key);
  5872. if (true) {
  5873. var keyInLowerCase = key.toLowerCase();
  5874. if (
  5875. key !== keyInLowerCase &&
  5876. attrs && hasOwn(attrs, keyInLowerCase)
  5877. ) {
  5878. tip(
  5879. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  5880. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  5881. " \"" + key + "\". " +
  5882. "Note that HTML attributes are case-insensitive and camelCased " +
  5883. "props need to use their kebab-case equivalents when using in-DOM " +
  5884. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  5885. );
  5886. }
  5887. }
  5888. checkProp(res, props, key, altKey, true) ||
  5889. checkProp(res, attrs, key, altKey, false);
  5890. }
  5891. }
  5892. // fixed by xxxxxx
  5893. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  5894. }
  5895. function checkProp (
  5896. res,
  5897. hash,
  5898. key,
  5899. altKey,
  5900. preserve
  5901. ) {
  5902. if (isDef(hash)) {
  5903. if (hasOwn(hash, key)) {
  5904. res[key] = hash[key];
  5905. if (!preserve) {
  5906. delete hash[key];
  5907. }
  5908. return true
  5909. } else if (hasOwn(hash, altKey)) {
  5910. res[key] = hash[altKey];
  5911. if (!preserve) {
  5912. delete hash[altKey];
  5913. }
  5914. return true
  5915. }
  5916. }
  5917. return false
  5918. }
  5919. /* */
  5920. // The template compiler attempts to minimize the need for normalization by
  5921. // statically analyzing the template at compile time.
  5922. //
  5923. // For plain HTML markup, normalization can be completely skipped because the
  5924. // generated render function is guaranteed to return Array<VNode>. There are
  5925. // two cases where extra normalization is needed:
  5926. // 1. When the children contains components - because a functional component
  5927. // may return an Array instead of a single root. In this case, just a simple
  5928. // normalization is needed - if any child is an Array, we flatten the whole
  5929. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  5930. // because functional components already normalize their own children.
  5931. function simpleNormalizeChildren (children) {
  5932. for (var i = 0; i < children.length; i++) {
  5933. if (Array.isArray(children[i])) {
  5934. return Array.prototype.concat.apply([], children)
  5935. }
  5936. }
  5937. return children
  5938. }
  5939. // 2. When the children contains constructs that always generated nested Arrays,
  5940. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  5941. // with hand-written render functions / JSX. In such cases a full normalization
  5942. // is needed to cater to all possible types of children values.
  5943. function normalizeChildren (children) {
  5944. return isPrimitive(children)
  5945. ? [createTextVNode(children)]
  5946. : Array.isArray(children)
  5947. ? normalizeArrayChildren(children)
  5948. : undefined
  5949. }
  5950. function isTextNode (node) {
  5951. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  5952. }
  5953. function normalizeArrayChildren (children, nestedIndex) {
  5954. var res = [];
  5955. var i, c, lastIndex, last;
  5956. for (i = 0; i < children.length; i++) {
  5957. c = children[i];
  5958. if (isUndef(c) || typeof c === 'boolean') { continue }
  5959. lastIndex = res.length - 1;
  5960. last = res[lastIndex];
  5961. // nested
  5962. if (Array.isArray(c)) {
  5963. if (c.length > 0) {
  5964. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  5965. // merge adjacent text nodes
  5966. if (isTextNode(c[0]) && isTextNode(last)) {
  5967. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  5968. c.shift();
  5969. }
  5970. res.push.apply(res, c);
  5971. }
  5972. } else if (isPrimitive(c)) {
  5973. if (isTextNode(last)) {
  5974. // merge adjacent text nodes
  5975. // this is necessary for SSR hydration because text nodes are
  5976. // essentially merged when rendered to HTML strings
  5977. res[lastIndex] = createTextVNode(last.text + c);
  5978. } else if (c !== '') {
  5979. // convert primitive to vnode
  5980. res.push(createTextVNode(c));
  5981. }
  5982. } else {
  5983. if (isTextNode(c) && isTextNode(last)) {
  5984. // merge adjacent text nodes
  5985. res[lastIndex] = createTextVNode(last.text + c.text);
  5986. } else {
  5987. // default key for nested array children (likely generated by v-for)
  5988. if (isTrue(children._isVList) &&
  5989. isDef(c.tag) &&
  5990. isUndef(c.key) &&
  5991. isDef(nestedIndex)) {
  5992. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  5993. }
  5994. res.push(c);
  5995. }
  5996. }
  5997. }
  5998. return res
  5999. }
  6000. /* */
  6001. function initProvide (vm) {
  6002. var provide = vm.$options.provide;
  6003. if (provide) {
  6004. vm._provided = typeof provide === 'function'
  6005. ? provide.call(vm)
  6006. : provide;
  6007. }
  6008. }
  6009. function initInjections (vm) {
  6010. var result = resolveInject(vm.$options.inject, vm);
  6011. if (result) {
  6012. toggleObserving(false);
  6013. Object.keys(result).forEach(function (key) {
  6014. /* istanbul ignore else */
  6015. if (true) {
  6016. defineReactive$$1(vm, key, result[key], function () {
  6017. warn(
  6018. "Avoid mutating an injected value directly since the changes will be " +
  6019. "overwritten whenever the provided component re-renders. " +
  6020. "injection being mutated: \"" + key + "\"",
  6021. vm
  6022. );
  6023. });
  6024. } else {}
  6025. });
  6026. toggleObserving(true);
  6027. }
  6028. }
  6029. function resolveInject (inject, vm) {
  6030. if (inject) {
  6031. // inject is :any because flow is not smart enough to figure out cached
  6032. var result = Object.create(null);
  6033. var keys = hasSymbol
  6034. ? Reflect.ownKeys(inject)
  6035. : Object.keys(inject);
  6036. for (var i = 0; i < keys.length; i++) {
  6037. var key = keys[i];
  6038. // #6574 in case the inject object is observed...
  6039. if (key === '__ob__') { continue }
  6040. var provideKey = inject[key].from;
  6041. var source = vm;
  6042. while (source) {
  6043. if (source._provided && hasOwn(source._provided, provideKey)) {
  6044. result[key] = source._provided[provideKey];
  6045. break
  6046. }
  6047. source = source.$parent;
  6048. }
  6049. if (!source) {
  6050. if ('default' in inject[key]) {
  6051. var provideDefault = inject[key].default;
  6052. result[key] = typeof provideDefault === 'function'
  6053. ? provideDefault.call(vm)
  6054. : provideDefault;
  6055. } else if (true) {
  6056. warn(("Injection \"" + key + "\" not found"), vm);
  6057. }
  6058. }
  6059. }
  6060. return result
  6061. }
  6062. }
  6063. /* */
  6064. /**
  6065. * Runtime helper for resolving raw children VNodes into a slot object.
  6066. */
  6067. function resolveSlots (
  6068. children,
  6069. context
  6070. ) {
  6071. if (!children || !children.length) {
  6072. return {}
  6073. }
  6074. var slots = {};
  6075. for (var i = 0, l = children.length; i < l; i++) {
  6076. var child = children[i];
  6077. var data = child.data;
  6078. // remove slot attribute if the node is resolved as a Vue slot node
  6079. if (data && data.attrs && data.attrs.slot) {
  6080. delete data.attrs.slot;
  6081. }
  6082. // named slots should only be respected if the vnode was rendered in the
  6083. // same context.
  6084. if ((child.context === context || child.fnContext === context) &&
  6085. data && data.slot != null
  6086. ) {
  6087. var name = data.slot;
  6088. var slot = (slots[name] || (slots[name] = []));
  6089. if (child.tag === 'template') {
  6090. slot.push.apply(slot, child.children || []);
  6091. } else {
  6092. slot.push(child);
  6093. }
  6094. } else {
  6095. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  6096. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  6097. (slots['page'] || (slots['page'] = [])).push(child);
  6098. }else{
  6099. (slots.default || (slots.default = [])).push(child);
  6100. }
  6101. }
  6102. }
  6103. // ignore slots that contains only whitespace
  6104. for (var name$1 in slots) {
  6105. if (slots[name$1].every(isWhitespace)) {
  6106. delete slots[name$1];
  6107. }
  6108. }
  6109. return slots
  6110. }
  6111. function isWhitespace (node) {
  6112. return (node.isComment && !node.asyncFactory) || node.text === ' '
  6113. }
  6114. /* */
  6115. function normalizeScopedSlots (
  6116. slots,
  6117. normalSlots,
  6118. prevSlots
  6119. ) {
  6120. var res;
  6121. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  6122. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  6123. var key = slots && slots.$key;
  6124. if (!slots) {
  6125. res = {};
  6126. } else if (slots._normalized) {
  6127. // fast path 1: child component re-render only, parent did not change
  6128. return slots._normalized
  6129. } else if (
  6130. isStable &&
  6131. prevSlots &&
  6132. prevSlots !== emptyObject &&
  6133. key === prevSlots.$key &&
  6134. !hasNormalSlots &&
  6135. !prevSlots.$hasNormal
  6136. ) {
  6137. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  6138. // only need to normalize once
  6139. return prevSlots
  6140. } else {
  6141. res = {};
  6142. for (var key$1 in slots) {
  6143. if (slots[key$1] && key$1[0] !== '$') {
  6144. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  6145. }
  6146. }
  6147. }
  6148. // expose normal slots on scopedSlots
  6149. for (var key$2 in normalSlots) {
  6150. if (!(key$2 in res)) {
  6151. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  6152. }
  6153. }
  6154. // avoriaz seems to mock a non-extensible $scopedSlots object
  6155. // and when that is passed down this would cause an error
  6156. if (slots && Object.isExtensible(slots)) {
  6157. (slots)._normalized = res;
  6158. }
  6159. def(res, '$stable', isStable);
  6160. def(res, '$key', key);
  6161. def(res, '$hasNormal', hasNormalSlots);
  6162. return res
  6163. }
  6164. function normalizeScopedSlot(normalSlots, key, fn) {
  6165. var normalized = function () {
  6166. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  6167. res = res && typeof res === 'object' && !Array.isArray(res)
  6168. ? [res] // single vnode
  6169. : normalizeChildren(res);
  6170. return res && (
  6171. res.length === 0 ||
  6172. (res.length === 1 && res[0].isComment) // #9658
  6173. ) ? undefined
  6174. : res
  6175. };
  6176. // this is a slot using the new v-slot syntax without scope. although it is
  6177. // compiled as a scoped slot, render fn users would expect it to be present
  6178. // on this.$slots because the usage is semantically a normal slot.
  6179. if (fn.proxy) {
  6180. Object.defineProperty(normalSlots, key, {
  6181. get: normalized,
  6182. enumerable: true,
  6183. configurable: true
  6184. });
  6185. }
  6186. return normalized
  6187. }
  6188. function proxyNormalSlot(slots, key) {
  6189. return function () { return slots[key]; }
  6190. }
  6191. /* */
  6192. /**
  6193. * Runtime helper for rendering v-for lists.
  6194. */
  6195. function renderList (
  6196. val,
  6197. render
  6198. ) {
  6199. var ret, i, l, keys, key;
  6200. if (Array.isArray(val) || typeof val === 'string') {
  6201. ret = new Array(val.length);
  6202. for (i = 0, l = val.length; i < l; i++) {
  6203. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  6204. }
  6205. } else if (typeof val === 'number') {
  6206. ret = new Array(val);
  6207. for (i = 0; i < val; i++) {
  6208. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  6209. }
  6210. } else if (isObject(val)) {
  6211. if (hasSymbol && val[Symbol.iterator]) {
  6212. ret = [];
  6213. var iterator = val[Symbol.iterator]();
  6214. var result = iterator.next();
  6215. while (!result.done) {
  6216. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  6217. result = iterator.next();
  6218. }
  6219. } else {
  6220. keys = Object.keys(val);
  6221. ret = new Array(keys.length);
  6222. for (i = 0, l = keys.length; i < l; i++) {
  6223. key = keys[i];
  6224. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  6225. }
  6226. }
  6227. }
  6228. if (!isDef(ret)) {
  6229. ret = [];
  6230. }
  6231. (ret)._isVList = true;
  6232. return ret
  6233. }
  6234. /* */
  6235. /**
  6236. * Runtime helper for rendering <slot>
  6237. */
  6238. function renderSlot (
  6239. name,
  6240. fallback,
  6241. props,
  6242. bindObject
  6243. ) {
  6244. var scopedSlotFn = this.$scopedSlots[name];
  6245. var nodes;
  6246. if (scopedSlotFn) { // scoped slot
  6247. props = props || {};
  6248. if (bindObject) {
  6249. if ( true && !isObject(bindObject)) {
  6250. warn(
  6251. 'slot v-bind without argument expects an Object',
  6252. this
  6253. );
  6254. }
  6255. props = extend(extend({}, bindObject), props);
  6256. }
  6257. // fixed by xxxxxx app-plus scopedSlot
  6258. nodes = scopedSlotFn(props, this, props._i) || fallback;
  6259. } else {
  6260. nodes = this.$slots[name] || fallback;
  6261. }
  6262. var target = props && props.slot;
  6263. if (target) {
  6264. return this.$createElement('template', { slot: target }, nodes)
  6265. } else {
  6266. return nodes
  6267. }
  6268. }
  6269. /* */
  6270. /**
  6271. * Runtime helper for resolving filters
  6272. */
  6273. function resolveFilter (id) {
  6274. return resolveAsset(this.$options, 'filters', id, true) || identity
  6275. }
  6276. /* */
  6277. function isKeyNotMatch (expect, actual) {
  6278. if (Array.isArray(expect)) {
  6279. return expect.indexOf(actual) === -1
  6280. } else {
  6281. return expect !== actual
  6282. }
  6283. }
  6284. /**
  6285. * Runtime helper for checking keyCodes from config.
  6286. * exposed as Vue.prototype._k
  6287. * passing in eventKeyName as last argument separately for backwards compat
  6288. */
  6289. function checkKeyCodes (
  6290. eventKeyCode,
  6291. key,
  6292. builtInKeyCode,
  6293. eventKeyName,
  6294. builtInKeyName
  6295. ) {
  6296. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  6297. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  6298. return isKeyNotMatch(builtInKeyName, eventKeyName)
  6299. } else if (mappedKeyCode) {
  6300. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  6301. } else if (eventKeyName) {
  6302. return hyphenate(eventKeyName) !== key
  6303. }
  6304. }
  6305. /* */
  6306. /**
  6307. * Runtime helper for merging v-bind="object" into a VNode's data.
  6308. */
  6309. function bindObjectProps (
  6310. data,
  6311. tag,
  6312. value,
  6313. asProp,
  6314. isSync
  6315. ) {
  6316. if (value) {
  6317. if (!isObject(value)) {
  6318. true && warn(
  6319. 'v-bind without argument expects an Object or Array value',
  6320. this
  6321. );
  6322. } else {
  6323. if (Array.isArray(value)) {
  6324. value = toObject(value);
  6325. }
  6326. var hash;
  6327. var loop = function ( key ) {
  6328. if (
  6329. key === 'class' ||
  6330. key === 'style' ||
  6331. isReservedAttribute(key)
  6332. ) {
  6333. hash = data;
  6334. } else {
  6335. var type = data.attrs && data.attrs.type;
  6336. hash = asProp || config.mustUseProp(tag, type, key)
  6337. ? data.domProps || (data.domProps = {})
  6338. : data.attrs || (data.attrs = {});
  6339. }
  6340. var camelizedKey = camelize(key);
  6341. var hyphenatedKey = hyphenate(key);
  6342. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  6343. hash[key] = value[key];
  6344. if (isSync) {
  6345. var on = data.on || (data.on = {});
  6346. on[("update:" + key)] = function ($event) {
  6347. value[key] = $event;
  6348. };
  6349. }
  6350. }
  6351. };
  6352. for (var key in value) loop( key );
  6353. }
  6354. }
  6355. return data
  6356. }
  6357. /* */
  6358. /**
  6359. * Runtime helper for rendering static trees.
  6360. */
  6361. function renderStatic (
  6362. index,
  6363. isInFor
  6364. ) {
  6365. var cached = this._staticTrees || (this._staticTrees = []);
  6366. var tree = cached[index];
  6367. // if has already-rendered static tree and not inside v-for,
  6368. // we can reuse the same tree.
  6369. if (tree && !isInFor) {
  6370. return tree
  6371. }
  6372. // otherwise, render a fresh tree.
  6373. tree = cached[index] = this.$options.staticRenderFns[index].call(
  6374. this._renderProxy,
  6375. null,
  6376. this // for render fns generated for functional component templates
  6377. );
  6378. markStatic(tree, ("__static__" + index), false);
  6379. return tree
  6380. }
  6381. /**
  6382. * Runtime helper for v-once.
  6383. * Effectively it means marking the node as static with a unique key.
  6384. */
  6385. function markOnce (
  6386. tree,
  6387. index,
  6388. key
  6389. ) {
  6390. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  6391. return tree
  6392. }
  6393. function markStatic (
  6394. tree,
  6395. key,
  6396. isOnce
  6397. ) {
  6398. if (Array.isArray(tree)) {
  6399. for (var i = 0; i < tree.length; i++) {
  6400. if (tree[i] && typeof tree[i] !== 'string') {
  6401. markStaticNode(tree[i], (key + "_" + i), isOnce);
  6402. }
  6403. }
  6404. } else {
  6405. markStaticNode(tree, key, isOnce);
  6406. }
  6407. }
  6408. function markStaticNode (node, key, isOnce) {
  6409. node.isStatic = true;
  6410. node.key = key;
  6411. node.isOnce = isOnce;
  6412. }
  6413. /* */
  6414. function bindObjectListeners (data, value) {
  6415. if (value) {
  6416. if (!isPlainObject(value)) {
  6417. true && warn(
  6418. 'v-on without argument expects an Object value',
  6419. this
  6420. );
  6421. } else {
  6422. var on = data.on = data.on ? extend({}, data.on) : {};
  6423. for (var key in value) {
  6424. var existing = on[key];
  6425. var ours = value[key];
  6426. on[key] = existing ? [].concat(existing, ours) : ours;
  6427. }
  6428. }
  6429. }
  6430. return data
  6431. }
  6432. /* */
  6433. function resolveScopedSlots (
  6434. fns, // see flow/vnode
  6435. res,
  6436. // the following are added in 2.6
  6437. hasDynamicKeys,
  6438. contentHashKey
  6439. ) {
  6440. res = res || { $stable: !hasDynamicKeys };
  6441. for (var i = 0; i < fns.length; i++) {
  6442. var slot = fns[i];
  6443. if (Array.isArray(slot)) {
  6444. resolveScopedSlots(slot, res, hasDynamicKeys);
  6445. } else if (slot) {
  6446. // marker for reverse proxying v-slot without scope on this.$slots
  6447. if (slot.proxy) {
  6448. slot.fn.proxy = true;
  6449. }
  6450. res[slot.key] = slot.fn;
  6451. }
  6452. }
  6453. if (contentHashKey) {
  6454. (res).$key = contentHashKey;
  6455. }
  6456. return res
  6457. }
  6458. /* */
  6459. function bindDynamicKeys (baseObj, values) {
  6460. for (var i = 0; i < values.length; i += 2) {
  6461. var key = values[i];
  6462. if (typeof key === 'string' && key) {
  6463. baseObj[values[i]] = values[i + 1];
  6464. } else if ( true && key !== '' && key !== null) {
  6465. // null is a special value for explicitly removing a binding
  6466. warn(
  6467. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  6468. this
  6469. );
  6470. }
  6471. }
  6472. return baseObj
  6473. }
  6474. // helper to dynamically append modifier runtime markers to event names.
  6475. // ensure only append when value is already string, otherwise it will be cast
  6476. // to string and cause the type check to miss.
  6477. function prependModifier (value, symbol) {
  6478. return typeof value === 'string' ? symbol + value : value
  6479. }
  6480. /* */
  6481. function installRenderHelpers (target) {
  6482. target._o = markOnce;
  6483. target._n = toNumber;
  6484. target._s = toString;
  6485. target._l = renderList;
  6486. target._t = renderSlot;
  6487. target._q = looseEqual;
  6488. target._i = looseIndexOf;
  6489. target._m = renderStatic;
  6490. target._f = resolveFilter;
  6491. target._k = checkKeyCodes;
  6492. target._b = bindObjectProps;
  6493. target._v = createTextVNode;
  6494. target._e = createEmptyVNode;
  6495. target._u = resolveScopedSlots;
  6496. target._g = bindObjectListeners;
  6497. target._d = bindDynamicKeys;
  6498. target._p = prependModifier;
  6499. }
  6500. /* */
  6501. function FunctionalRenderContext (
  6502. data,
  6503. props,
  6504. children,
  6505. parent,
  6506. Ctor
  6507. ) {
  6508. var this$1 = this;
  6509. var options = Ctor.options;
  6510. // ensure the createElement function in functional components
  6511. // gets a unique context - this is necessary for correct named slot check
  6512. var contextVm;
  6513. if (hasOwn(parent, '_uid')) {
  6514. contextVm = Object.create(parent);
  6515. // $flow-disable-line
  6516. contextVm._original = parent;
  6517. } else {
  6518. // the context vm passed in is a functional context as well.
  6519. // in this case we want to make sure we are able to get a hold to the
  6520. // real context instance.
  6521. contextVm = parent;
  6522. // $flow-disable-line
  6523. parent = parent._original;
  6524. }
  6525. var isCompiled = isTrue(options._compiled);
  6526. var needNormalization = !isCompiled;
  6527. this.data = data;
  6528. this.props = props;
  6529. this.children = children;
  6530. this.parent = parent;
  6531. this.listeners = data.on || emptyObject;
  6532. this.injections = resolveInject(options.inject, parent);
  6533. this.slots = function () {
  6534. if (!this$1.$slots) {
  6535. normalizeScopedSlots(
  6536. data.scopedSlots,
  6537. this$1.$slots = resolveSlots(children, parent)
  6538. );
  6539. }
  6540. return this$1.$slots
  6541. };
  6542. Object.defineProperty(this, 'scopedSlots', ({
  6543. enumerable: true,
  6544. get: function get () {
  6545. return normalizeScopedSlots(data.scopedSlots, this.slots())
  6546. }
  6547. }));
  6548. // support for compiled functional template
  6549. if (isCompiled) {
  6550. // exposing $options for renderStatic()
  6551. this.$options = options;
  6552. // pre-resolve slots for renderSlot()
  6553. this.$slots = this.slots();
  6554. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  6555. }
  6556. if (options._scopeId) {
  6557. this._c = function (a, b, c, d) {
  6558. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  6559. if (vnode && !Array.isArray(vnode)) {
  6560. vnode.fnScopeId = options._scopeId;
  6561. vnode.fnContext = parent;
  6562. }
  6563. return vnode
  6564. };
  6565. } else {
  6566. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  6567. }
  6568. }
  6569. installRenderHelpers(FunctionalRenderContext.prototype);
  6570. function createFunctionalComponent (
  6571. Ctor,
  6572. propsData,
  6573. data,
  6574. contextVm,
  6575. children
  6576. ) {
  6577. var options = Ctor.options;
  6578. var props = {};
  6579. var propOptions = options.props;
  6580. if (isDef(propOptions)) {
  6581. for (var key in propOptions) {
  6582. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  6583. }
  6584. } else {
  6585. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  6586. if (isDef(data.props)) { mergeProps(props, data.props); }
  6587. }
  6588. var renderContext = new FunctionalRenderContext(
  6589. data,
  6590. props,
  6591. children,
  6592. contextVm,
  6593. Ctor
  6594. );
  6595. var vnode = options.render.call(null, renderContext._c, renderContext);
  6596. if (vnode instanceof VNode) {
  6597. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  6598. } else if (Array.isArray(vnode)) {
  6599. var vnodes = normalizeChildren(vnode) || [];
  6600. var res = new Array(vnodes.length);
  6601. for (var i = 0; i < vnodes.length; i++) {
  6602. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  6603. }
  6604. return res
  6605. }
  6606. }
  6607. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  6608. // #7817 clone node before setting fnContext, otherwise if the node is reused
  6609. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  6610. // that should not be matched to match.
  6611. var clone = cloneVNode(vnode);
  6612. clone.fnContext = contextVm;
  6613. clone.fnOptions = options;
  6614. if (true) {
  6615. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  6616. }
  6617. if (data.slot) {
  6618. (clone.data || (clone.data = {})).slot = data.slot;
  6619. }
  6620. return clone
  6621. }
  6622. function mergeProps (to, from) {
  6623. for (var key in from) {
  6624. to[camelize(key)] = from[key];
  6625. }
  6626. }
  6627. /* */
  6628. /* */
  6629. /* */
  6630. /* */
  6631. // inline hooks to be invoked on component VNodes during patch
  6632. var componentVNodeHooks = {
  6633. init: function init (vnode, hydrating) {
  6634. if (
  6635. vnode.componentInstance &&
  6636. !vnode.componentInstance._isDestroyed &&
  6637. vnode.data.keepAlive
  6638. ) {
  6639. // kept-alive components, treat as a patch
  6640. var mountedNode = vnode; // work around flow
  6641. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  6642. } else {
  6643. var child = vnode.componentInstance = createComponentInstanceForVnode(
  6644. vnode,
  6645. activeInstance
  6646. );
  6647. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  6648. }
  6649. },
  6650. prepatch: function prepatch (oldVnode, vnode) {
  6651. var options = vnode.componentOptions;
  6652. var child = vnode.componentInstance = oldVnode.componentInstance;
  6653. updateChildComponent(
  6654. child,
  6655. options.propsData, // updated props
  6656. options.listeners, // updated listeners
  6657. vnode, // new parent vnode
  6658. options.children // new children
  6659. );
  6660. },
  6661. insert: function insert (vnode) {
  6662. var context = vnode.context;
  6663. var componentInstance = vnode.componentInstance;
  6664. if (!componentInstance._isMounted) {
  6665. callHook(componentInstance, 'onServiceCreated');
  6666. callHook(componentInstance, 'onServiceAttached');
  6667. componentInstance._isMounted = true;
  6668. callHook(componentInstance, 'mounted');
  6669. }
  6670. if (vnode.data.keepAlive) {
  6671. if (context._isMounted) {
  6672. // vue-router#1212
  6673. // During updates, a kept-alive component's child components may
  6674. // change, so directly walking the tree here may call activated hooks
  6675. // on incorrect children. Instead we push them into a queue which will
  6676. // be processed after the whole patch process ended.
  6677. queueActivatedComponent(componentInstance);
  6678. } else {
  6679. activateChildComponent(componentInstance, true /* direct */);
  6680. }
  6681. }
  6682. },
  6683. destroy: function destroy (vnode) {
  6684. var componentInstance = vnode.componentInstance;
  6685. if (!componentInstance._isDestroyed) {
  6686. if (!vnode.data.keepAlive) {
  6687. componentInstance.$destroy();
  6688. } else {
  6689. deactivateChildComponent(componentInstance, true /* direct */);
  6690. }
  6691. }
  6692. }
  6693. };
  6694. var hooksToMerge = Object.keys(componentVNodeHooks);
  6695. function createComponent (
  6696. Ctor,
  6697. data,
  6698. context,
  6699. children,
  6700. tag
  6701. ) {
  6702. if (isUndef(Ctor)) {
  6703. return
  6704. }
  6705. var baseCtor = context.$options._base;
  6706. // plain options object: turn it into a constructor
  6707. if (isObject(Ctor)) {
  6708. Ctor = baseCtor.extend(Ctor);
  6709. }
  6710. // if at this stage it's not a constructor or an async component factory,
  6711. // reject.
  6712. if (typeof Ctor !== 'function') {
  6713. if (true) {
  6714. warn(("Invalid Component definition: " + (String(Ctor))), context);
  6715. }
  6716. return
  6717. }
  6718. // async component
  6719. var asyncFactory;
  6720. if (isUndef(Ctor.cid)) {
  6721. asyncFactory = Ctor;
  6722. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  6723. if (Ctor === undefined) {
  6724. // return a placeholder node for async component, which is rendered
  6725. // as a comment node but preserves all the raw information for the node.
  6726. // the information will be used for async server-rendering and hydration.
  6727. return createAsyncPlaceholder(
  6728. asyncFactory,
  6729. data,
  6730. context,
  6731. children,
  6732. tag
  6733. )
  6734. }
  6735. }
  6736. data = data || {};
  6737. // resolve constructor options in case global mixins are applied after
  6738. // component constructor creation
  6739. resolveConstructorOptions(Ctor);
  6740. // transform component v-model data into props & events
  6741. if (isDef(data.model)) {
  6742. transformModel(Ctor.options, data);
  6743. }
  6744. // extract props
  6745. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  6746. // functional component
  6747. if (isTrue(Ctor.options.functional)) {
  6748. return createFunctionalComponent(Ctor, propsData, data, context, children)
  6749. }
  6750. // extract listeners, since these needs to be treated as
  6751. // child component listeners instead of DOM listeners
  6752. var listeners = data.on;
  6753. // replace with listeners with .native modifier
  6754. // so it gets processed during parent component patch.
  6755. data.on = data.nativeOn;
  6756. if (isTrue(Ctor.options.abstract)) {
  6757. // abstract components do not keep anything
  6758. // other than props & listeners & slot
  6759. // work around flow
  6760. var slot = data.slot;
  6761. data = {};
  6762. if (slot) {
  6763. data.slot = slot;
  6764. }
  6765. }
  6766. // install component management hooks onto the placeholder node
  6767. installComponentHooks(data);
  6768. // return a placeholder vnode
  6769. var name = Ctor.options.name || tag;
  6770. var vnode = new VNode(
  6771. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  6772. data, undefined, undefined, undefined, context,
  6773. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  6774. asyncFactory
  6775. );
  6776. return vnode
  6777. }
  6778. function createComponentInstanceForVnode (
  6779. vnode, // we know it's MountedComponentVNode but flow doesn't
  6780. parent // activeInstance in lifecycle state
  6781. ) {
  6782. var options = {
  6783. _isComponent: true,
  6784. _parentVnode: vnode,
  6785. parent: parent
  6786. };
  6787. // check inline-template render functions
  6788. var inlineTemplate = vnode.data.inlineTemplate;
  6789. if (isDef(inlineTemplate)) {
  6790. options.render = inlineTemplate.render;
  6791. options.staticRenderFns = inlineTemplate.staticRenderFns;
  6792. }
  6793. return new vnode.componentOptions.Ctor(options)
  6794. }
  6795. function installComponentHooks (data) {
  6796. var hooks = data.hook || (data.hook = {});
  6797. for (var i = 0; i < hooksToMerge.length; i++) {
  6798. var key = hooksToMerge[i];
  6799. var existing = hooks[key];
  6800. var toMerge = componentVNodeHooks[key];
  6801. if (existing !== toMerge && !(existing && existing._merged)) {
  6802. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  6803. }
  6804. }
  6805. }
  6806. function mergeHook$1 (f1, f2) {
  6807. var merged = function (a, b) {
  6808. // flow complains about extra args which is why we use any
  6809. f1(a, b);
  6810. f2(a, b);
  6811. };
  6812. merged._merged = true;
  6813. return merged
  6814. }
  6815. // transform component v-model info (value and callback) into
  6816. // prop and event handler respectively.
  6817. function transformModel (options, data) {
  6818. var prop = (options.model && options.model.prop) || 'value';
  6819. var event = (options.model && options.model.event) || 'input'
  6820. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  6821. var on = data.on || (data.on = {});
  6822. var existing = on[event];
  6823. var callback = data.model.callback;
  6824. if (isDef(existing)) {
  6825. if (
  6826. Array.isArray(existing)
  6827. ? existing.indexOf(callback) === -1
  6828. : existing !== callback
  6829. ) {
  6830. on[event] = [callback].concat(existing);
  6831. }
  6832. } else {
  6833. on[event] = callback;
  6834. }
  6835. }
  6836. /* */
  6837. var SIMPLE_NORMALIZE = 1;
  6838. var ALWAYS_NORMALIZE = 2;
  6839. // wrapper function for providing a more flexible interface
  6840. // without getting yelled at by flow
  6841. function createElement (
  6842. context,
  6843. tag,
  6844. data,
  6845. children,
  6846. normalizationType,
  6847. alwaysNormalize
  6848. ) {
  6849. if (Array.isArray(data) || isPrimitive(data)) {
  6850. normalizationType = children;
  6851. children = data;
  6852. data = undefined;
  6853. }
  6854. if (isTrue(alwaysNormalize)) {
  6855. normalizationType = ALWAYS_NORMALIZE;
  6856. }
  6857. return _createElement(context, tag, data, children, normalizationType)
  6858. }
  6859. function _createElement (
  6860. context,
  6861. tag,
  6862. data,
  6863. children,
  6864. normalizationType
  6865. ) {
  6866. if (isDef(data) && isDef((data).__ob__)) {
  6867. true && warn(
  6868. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  6869. 'Always create fresh vnode data objects in each render!',
  6870. context
  6871. );
  6872. return createEmptyVNode()
  6873. }
  6874. // object syntax in v-bind
  6875. if (isDef(data) && isDef(data.is)) {
  6876. tag = data.is;
  6877. }
  6878. if (!tag) {
  6879. // in case of component :is set to falsy value
  6880. return createEmptyVNode()
  6881. }
  6882. // warn against non-primitive key
  6883. if ( true &&
  6884. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  6885. ) {
  6886. {
  6887. warn(
  6888. 'Avoid using non-primitive value as key, ' +
  6889. 'use string/number value instead.',
  6890. context
  6891. );
  6892. }
  6893. }
  6894. // support single function children as default scoped slot
  6895. if (Array.isArray(children) &&
  6896. typeof children[0] === 'function'
  6897. ) {
  6898. data = data || {};
  6899. data.scopedSlots = { default: children[0] };
  6900. children.length = 0;
  6901. }
  6902. if (normalizationType === ALWAYS_NORMALIZE) {
  6903. children = normalizeChildren(children);
  6904. } else if (normalizationType === SIMPLE_NORMALIZE) {
  6905. children = simpleNormalizeChildren(children);
  6906. }
  6907. var vnode, ns;
  6908. if (typeof tag === 'string') {
  6909. var Ctor;
  6910. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  6911. if (config.isReservedTag(tag)) {
  6912. // platform built-in elements
  6913. if ( true && isDef(data) && isDef(data.nativeOn)) {
  6914. warn(
  6915. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  6916. context
  6917. );
  6918. }
  6919. vnode = new VNode(
  6920. config.parsePlatformTagName(tag), data, children,
  6921. undefined, undefined, context
  6922. );
  6923. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  6924. // component
  6925. vnode = createComponent(Ctor, data, context, children, tag);
  6926. } else {
  6927. // unknown or unlisted namespaced elements
  6928. // check at runtime because it may get assigned a namespace when its
  6929. // parent normalizes children
  6930. vnode = new VNode(
  6931. tag, data, children,
  6932. undefined, undefined, context
  6933. );
  6934. }
  6935. } else {
  6936. // direct component options / constructor
  6937. vnode = createComponent(tag, data, context, children);
  6938. }
  6939. if (Array.isArray(vnode)) {
  6940. return vnode
  6941. } else if (isDef(vnode)) {
  6942. if (isDef(ns)) { applyNS(vnode, ns); }
  6943. if (isDef(data)) { registerDeepBindings(data); }
  6944. return vnode
  6945. } else {
  6946. return createEmptyVNode()
  6947. }
  6948. }
  6949. function applyNS (vnode, ns, force) {
  6950. vnode.ns = ns;
  6951. if (vnode.tag === 'foreignObject') {
  6952. // use default namespace inside foreignObject
  6953. ns = undefined;
  6954. force = true;
  6955. }
  6956. if (isDef(vnode.children)) {
  6957. for (var i = 0, l = vnode.children.length; i < l; i++) {
  6958. var child = vnode.children[i];
  6959. if (isDef(child.tag) && (
  6960. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  6961. applyNS(child, ns, force);
  6962. }
  6963. }
  6964. }
  6965. }
  6966. // ref #5318
  6967. // necessary to ensure parent re-render when deep bindings like :style and
  6968. // :class are used on slot nodes
  6969. function registerDeepBindings (data) {
  6970. if (isObject(data.style)) {
  6971. traverse(data.style);
  6972. }
  6973. if (isObject(data.class)) {
  6974. traverse(data.class);
  6975. }
  6976. }
  6977. /* */
  6978. function initRender (vm) {
  6979. vm._vnode = null; // the root of the child tree
  6980. vm._staticTrees = null; // v-once cached trees
  6981. var options = vm.$options;
  6982. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  6983. var renderContext = parentVnode && parentVnode.context;
  6984. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  6985. vm.$scopedSlots = emptyObject;
  6986. // bind the createElement fn to this instance
  6987. // so that we get proper render context inside it.
  6988. // args order: tag, data, children, normalizationType, alwaysNormalize
  6989. // internal version is used by render functions compiled from templates
  6990. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  6991. // normalization is always applied for the public version, used in
  6992. // user-written render functions.
  6993. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  6994. // $attrs & $listeners are exposed for easier HOC creation.
  6995. // they need to be reactive so that HOCs using them are always updated
  6996. var parentData = parentVnode && parentVnode.data;
  6997. /* istanbul ignore else */
  6998. if (true) {
  6999. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  7000. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  7001. }, true);
  7002. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  7003. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  7004. }, true);
  7005. } else {}
  7006. }
  7007. var currentRenderingInstance = null;
  7008. function renderMixin (Vue) {
  7009. // install runtime convenience helpers
  7010. installRenderHelpers(Vue.prototype);
  7011. Vue.prototype.$nextTick = function (fn) {
  7012. return nextTick(fn, this)
  7013. };
  7014. Vue.prototype._render = function () {
  7015. var vm = this;
  7016. var ref = vm.$options;
  7017. var render = ref.render;
  7018. var _parentVnode = ref._parentVnode;
  7019. if (_parentVnode) {
  7020. vm.$scopedSlots = normalizeScopedSlots(
  7021. _parentVnode.data.scopedSlots,
  7022. vm.$slots,
  7023. vm.$scopedSlots
  7024. );
  7025. }
  7026. // set parent vnode. this allows render functions to have access
  7027. // to the data on the placeholder node.
  7028. vm.$vnode = _parentVnode;
  7029. // render self
  7030. var vnode;
  7031. try {
  7032. // There's no need to maintain a stack because all render fns are called
  7033. // separately from one another. Nested component's render fns are called
  7034. // when parent component is patched.
  7035. currentRenderingInstance = vm;
  7036. vnode = render.call(vm._renderProxy, vm.$createElement);
  7037. } catch (e) {
  7038. handleError(e, vm, "render");
  7039. // return error render result,
  7040. // or previous vnode to prevent render error causing blank component
  7041. /* istanbul ignore else */
  7042. if ( true && vm.$options.renderError) {
  7043. try {
  7044. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  7045. } catch (e) {
  7046. handleError(e, vm, "renderError");
  7047. vnode = vm._vnode;
  7048. }
  7049. } else {
  7050. vnode = vm._vnode;
  7051. }
  7052. } finally {
  7053. currentRenderingInstance = null;
  7054. }
  7055. // if the returned array contains only a single node, allow it
  7056. if (Array.isArray(vnode) && vnode.length === 1) {
  7057. vnode = vnode[0];
  7058. }
  7059. // return empty vnode in case the render function errored out
  7060. if (!(vnode instanceof VNode)) {
  7061. if ( true && Array.isArray(vnode)) {
  7062. warn(
  7063. 'Multiple root nodes returned from render function. Render function ' +
  7064. 'should return a single root node.',
  7065. vm
  7066. );
  7067. }
  7068. vnode = createEmptyVNode();
  7069. }
  7070. // set parent
  7071. vnode.parent = _parentVnode;
  7072. return vnode
  7073. };
  7074. }
  7075. /* */
  7076. function ensureCtor (comp, base) {
  7077. if (
  7078. comp.__esModule ||
  7079. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  7080. ) {
  7081. comp = comp.default;
  7082. }
  7083. return isObject(comp)
  7084. ? base.extend(comp)
  7085. : comp
  7086. }
  7087. function createAsyncPlaceholder (
  7088. factory,
  7089. data,
  7090. context,
  7091. children,
  7092. tag
  7093. ) {
  7094. var node = createEmptyVNode();
  7095. node.asyncFactory = factory;
  7096. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  7097. return node
  7098. }
  7099. function resolveAsyncComponent (
  7100. factory,
  7101. baseCtor
  7102. ) {
  7103. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  7104. return factory.errorComp
  7105. }
  7106. if (isDef(factory.resolved)) {
  7107. return factory.resolved
  7108. }
  7109. var owner = currentRenderingInstance;
  7110. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  7111. // already pending
  7112. factory.owners.push(owner);
  7113. }
  7114. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  7115. return factory.loadingComp
  7116. }
  7117. if (owner && !isDef(factory.owners)) {
  7118. var owners = factory.owners = [owner];
  7119. var sync = true;
  7120. var timerLoading = null;
  7121. var timerTimeout = null
  7122. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  7123. var forceRender = function (renderCompleted) {
  7124. for (var i = 0, l = owners.length; i < l; i++) {
  7125. (owners[i]).$forceUpdate();
  7126. }
  7127. if (renderCompleted) {
  7128. owners.length = 0;
  7129. if (timerLoading !== null) {
  7130. clearTimeout(timerLoading);
  7131. timerLoading = null;
  7132. }
  7133. if (timerTimeout !== null) {
  7134. clearTimeout(timerTimeout);
  7135. timerTimeout = null;
  7136. }
  7137. }
  7138. };
  7139. var resolve = once(function (res) {
  7140. // cache resolved
  7141. factory.resolved = ensureCtor(res, baseCtor);
  7142. // invoke callbacks only if this is not a synchronous resolve
  7143. // (async resolves are shimmed as synchronous during SSR)
  7144. if (!sync) {
  7145. forceRender(true);
  7146. } else {
  7147. owners.length = 0;
  7148. }
  7149. });
  7150. var reject = once(function (reason) {
  7151. true && warn(
  7152. "Failed to resolve async component: " + (String(factory)) +
  7153. (reason ? ("\nReason: " + reason) : '')
  7154. );
  7155. if (isDef(factory.errorComp)) {
  7156. factory.error = true;
  7157. forceRender(true);
  7158. }
  7159. });
  7160. var res = factory(resolve, reject);
  7161. if (isObject(res)) {
  7162. if (isPromise(res)) {
  7163. // () => Promise
  7164. if (isUndef(factory.resolved)) {
  7165. res.then(resolve, reject);
  7166. }
  7167. } else if (isPromise(res.component)) {
  7168. res.component.then(resolve, reject);
  7169. if (isDef(res.error)) {
  7170. factory.errorComp = ensureCtor(res.error, baseCtor);
  7171. }
  7172. if (isDef(res.loading)) {
  7173. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  7174. if (res.delay === 0) {
  7175. factory.loading = true;
  7176. } else {
  7177. timerLoading = setTimeout(function () {
  7178. timerLoading = null;
  7179. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  7180. factory.loading = true;
  7181. forceRender(false);
  7182. }
  7183. }, res.delay || 200);
  7184. }
  7185. }
  7186. if (isDef(res.timeout)) {
  7187. timerTimeout = setTimeout(function () {
  7188. timerTimeout = null;
  7189. if (isUndef(factory.resolved)) {
  7190. reject(
  7191. true
  7192. ? ("timeout (" + (res.timeout) + "ms)")
  7193. : undefined
  7194. );
  7195. }
  7196. }, res.timeout);
  7197. }
  7198. }
  7199. }
  7200. sync = false;
  7201. // return in case resolved synchronously
  7202. return factory.loading
  7203. ? factory.loadingComp
  7204. : factory.resolved
  7205. }
  7206. }
  7207. /* */
  7208. function isAsyncPlaceholder (node) {
  7209. return node.isComment && node.asyncFactory
  7210. }
  7211. /* */
  7212. function getFirstComponentChild (children) {
  7213. if (Array.isArray(children)) {
  7214. for (var i = 0; i < children.length; i++) {
  7215. var c = children[i];
  7216. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  7217. return c
  7218. }
  7219. }
  7220. }
  7221. }
  7222. /* */
  7223. /* */
  7224. function initEvents (vm) {
  7225. vm._events = Object.create(null);
  7226. vm._hasHookEvent = false;
  7227. // init parent attached events
  7228. var listeners = vm.$options._parentListeners;
  7229. if (listeners) {
  7230. updateComponentListeners(vm, listeners);
  7231. }
  7232. }
  7233. var target;
  7234. function add (event, fn) {
  7235. target.$on(event, fn);
  7236. }
  7237. function remove$1 (event, fn) {
  7238. target.$off(event, fn);
  7239. }
  7240. function createOnceHandler (event, fn) {
  7241. var _target = target;
  7242. return function onceHandler () {
  7243. var res = fn.apply(null, arguments);
  7244. if (res !== null) {
  7245. _target.$off(event, onceHandler);
  7246. }
  7247. }
  7248. }
  7249. function updateComponentListeners (
  7250. vm,
  7251. listeners,
  7252. oldListeners
  7253. ) {
  7254. target = vm;
  7255. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  7256. target = undefined;
  7257. }
  7258. function eventsMixin (Vue) {
  7259. var hookRE = /^hook:/;
  7260. Vue.prototype.$on = function (event, fn) {
  7261. var vm = this;
  7262. if (Array.isArray(event)) {
  7263. for (var i = 0, l = event.length; i < l; i++) {
  7264. vm.$on(event[i], fn);
  7265. }
  7266. } else {
  7267. (vm._events[event] || (vm._events[event] = [])).push(fn);
  7268. // optimize hook:event cost by using a boolean flag marked at registration
  7269. // instead of a hash lookup
  7270. if (hookRE.test(event)) {
  7271. vm._hasHookEvent = true;
  7272. }
  7273. }
  7274. return vm
  7275. };
  7276. Vue.prototype.$once = function (event, fn) {
  7277. var vm = this;
  7278. function on () {
  7279. vm.$off(event, on);
  7280. fn.apply(vm, arguments);
  7281. }
  7282. on.fn = fn;
  7283. vm.$on(event, on);
  7284. return vm
  7285. };
  7286. Vue.prototype.$off = function (event, fn) {
  7287. var vm = this;
  7288. // all
  7289. if (!arguments.length) {
  7290. vm._events = Object.create(null);
  7291. return vm
  7292. }
  7293. // array of events
  7294. if (Array.isArray(event)) {
  7295. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  7296. vm.$off(event[i$1], fn);
  7297. }
  7298. return vm
  7299. }
  7300. // specific event
  7301. var cbs = vm._events[event];
  7302. if (!cbs) {
  7303. return vm
  7304. }
  7305. if (!fn) {
  7306. vm._events[event] = null;
  7307. return vm
  7308. }
  7309. // specific handler
  7310. var cb;
  7311. var i = cbs.length;
  7312. while (i--) {
  7313. cb = cbs[i];
  7314. if (cb === fn || cb.fn === fn) {
  7315. cbs.splice(i, 1);
  7316. break
  7317. }
  7318. }
  7319. return vm
  7320. };
  7321. Vue.prototype.$emit = function (event) {
  7322. var vm = this;
  7323. if (true) {
  7324. var lowerCaseEvent = event.toLowerCase();
  7325. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  7326. tip(
  7327. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  7328. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  7329. "Note that HTML attributes are case-insensitive and you cannot use " +
  7330. "v-on to listen to camelCase events when using in-DOM templates. " +
  7331. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  7332. );
  7333. }
  7334. }
  7335. var cbs = vm._events[event];
  7336. if (cbs) {
  7337. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  7338. var args = toArray(arguments, 1);
  7339. var info = "event handler for \"" + event + "\"";
  7340. for (var i = 0, l = cbs.length; i < l; i++) {
  7341. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  7342. }
  7343. }
  7344. return vm
  7345. };
  7346. }
  7347. /* */
  7348. var activeInstance = null;
  7349. var isUpdatingChildComponent = false;
  7350. function setActiveInstance(vm) {
  7351. var prevActiveInstance = activeInstance;
  7352. activeInstance = vm;
  7353. return function () {
  7354. activeInstance = prevActiveInstance;
  7355. }
  7356. }
  7357. function initLifecycle (vm) {
  7358. var options = vm.$options;
  7359. // locate first non-abstract parent
  7360. var parent = options.parent;
  7361. if (parent && !options.abstract) {
  7362. while (parent.$options.abstract && parent.$parent) {
  7363. parent = parent.$parent;
  7364. }
  7365. parent.$children.push(vm);
  7366. }
  7367. vm.$parent = parent;
  7368. vm.$root = parent ? parent.$root : vm;
  7369. vm.$children = [];
  7370. vm.$refs = {};
  7371. vm._watcher = null;
  7372. vm._inactive = null;
  7373. vm._directInactive = false;
  7374. vm._isMounted = false;
  7375. vm._isDestroyed = false;
  7376. vm._isBeingDestroyed = false;
  7377. }
  7378. function lifecycleMixin (Vue) {
  7379. Vue.prototype._update = function (vnode, hydrating) {
  7380. var vm = this;
  7381. var prevEl = vm.$el;
  7382. var prevVnode = vm._vnode;
  7383. var restoreActiveInstance = setActiveInstance(vm);
  7384. vm._vnode = vnode;
  7385. // Vue.prototype.__patch__ is injected in entry points
  7386. // based on the rendering backend used.
  7387. if (!prevVnode) {
  7388. // initial render
  7389. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  7390. } else {
  7391. // updates
  7392. vm.$el = vm.__patch__(prevVnode, vnode);
  7393. }
  7394. restoreActiveInstance();
  7395. // update __vue__ reference
  7396. if (prevEl) {
  7397. prevEl.__vue__ = null;
  7398. }
  7399. if (vm.$el) {
  7400. vm.$el.__vue__ = vm;
  7401. }
  7402. // if parent is an HOC, update its $el as well
  7403. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  7404. vm.$parent.$el = vm.$el;
  7405. }
  7406. // updated hook is called by the scheduler to ensure that children are
  7407. // updated in a parent's updated hook.
  7408. };
  7409. Vue.prototype.$forceUpdate = function () {
  7410. var vm = this;
  7411. if (vm._watcher) {
  7412. vm._watcher.update();
  7413. }
  7414. };
  7415. Vue.prototype.$destroy = function () {
  7416. var vm = this;
  7417. if (vm._isBeingDestroyed) {
  7418. return
  7419. }
  7420. callHook(vm, 'beforeDestroy');
  7421. vm._isBeingDestroyed = true;
  7422. // remove self from parent
  7423. var parent = vm.$parent;
  7424. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  7425. remove(parent.$children, vm);
  7426. }
  7427. // teardown watchers
  7428. if (vm._watcher) {
  7429. vm._watcher.teardown();
  7430. }
  7431. var i = vm._watchers.length;
  7432. while (i--) {
  7433. vm._watchers[i].teardown();
  7434. }
  7435. // remove reference from data ob
  7436. // frozen object may not have observer.
  7437. if (vm._data.__ob__) {
  7438. vm._data.__ob__.vmCount--;
  7439. }
  7440. // call the last hook...
  7441. vm._isDestroyed = true;
  7442. // invoke destroy hooks on current rendered tree
  7443. vm.__patch__(vm._vnode, null);
  7444. // fire destroyed hook
  7445. callHook(vm, 'destroyed');
  7446. // turn off all instance listeners.
  7447. vm.$off();
  7448. // remove __vue__ reference
  7449. if (vm.$el) {
  7450. vm.$el.__vue__ = null;
  7451. }
  7452. // release circular reference (#6759)
  7453. if (vm.$vnode) {
  7454. vm.$vnode.parent = null;
  7455. }
  7456. };
  7457. }
  7458. function updateChildComponent (
  7459. vm,
  7460. propsData,
  7461. listeners,
  7462. parentVnode,
  7463. renderChildren
  7464. ) {
  7465. if (true) {
  7466. isUpdatingChildComponent = true;
  7467. }
  7468. // determine whether component has slot children
  7469. // we need to do this before overwriting $options._renderChildren.
  7470. // check if there are dynamic scopedSlots (hand-written or compiled but with
  7471. // dynamic slot names). Static scoped slots compiled from template has the
  7472. // "$stable" marker.
  7473. var newScopedSlots = parentVnode.data.scopedSlots;
  7474. var oldScopedSlots = vm.$scopedSlots;
  7475. var hasDynamicScopedSlot = !!(
  7476. (newScopedSlots && !newScopedSlots.$stable) ||
  7477. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  7478. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  7479. );
  7480. // Any static slot children from the parent may have changed during parent's
  7481. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  7482. // update is necessary to ensure correctness.
  7483. var needsForceUpdate = !!(
  7484. renderChildren || // has new static slots
  7485. vm.$options._renderChildren || // has old static slots
  7486. hasDynamicScopedSlot
  7487. );
  7488. vm.$options._parentVnode = parentVnode;
  7489. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  7490. if (vm._vnode) { // update child tree's parent
  7491. vm._vnode.parent = parentVnode;
  7492. }
  7493. vm.$options._renderChildren = renderChildren;
  7494. // update $attrs and $listeners hash
  7495. // these are also reactive so they may trigger child update if the child
  7496. // used them during render
  7497. vm.$attrs = parentVnode.data.attrs || emptyObject;
  7498. vm.$listeners = listeners || emptyObject;
  7499. // update props
  7500. if (propsData && vm.$options.props) {
  7501. toggleObserving(false);
  7502. var props = vm._props;
  7503. var propKeys = vm.$options._propKeys || [];
  7504. for (var i = 0; i < propKeys.length; i++) {
  7505. var key = propKeys[i];
  7506. var propOptions = vm.$options.props; // wtf flow?
  7507. props[key] = validateProp(key, propOptions, propsData, vm);
  7508. }
  7509. toggleObserving(true);
  7510. // keep a copy of raw propsData
  7511. vm.$options.propsData = propsData;
  7512. }
  7513. // fixed by xxxxxx update properties(mp runtime)
  7514. vm._$updateProperties && vm._$updateProperties(vm);
  7515. // update listeners
  7516. listeners = listeners || emptyObject;
  7517. var oldListeners = vm.$options._parentListeners;
  7518. vm.$options._parentListeners = listeners;
  7519. updateComponentListeners(vm, listeners, oldListeners);
  7520. // resolve slots + force update if has children
  7521. if (needsForceUpdate) {
  7522. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  7523. vm.$forceUpdate();
  7524. }
  7525. if (true) {
  7526. isUpdatingChildComponent = false;
  7527. }
  7528. }
  7529. function isInInactiveTree (vm) {
  7530. while (vm && (vm = vm.$parent)) {
  7531. if (vm._inactive) { return true }
  7532. }
  7533. return false
  7534. }
  7535. function activateChildComponent (vm, direct) {
  7536. if (direct) {
  7537. vm._directInactive = false;
  7538. if (isInInactiveTree(vm)) {
  7539. return
  7540. }
  7541. } else if (vm._directInactive) {
  7542. return
  7543. }
  7544. if (vm._inactive || vm._inactive === null) {
  7545. vm._inactive = false;
  7546. for (var i = 0; i < vm.$children.length; i++) {
  7547. activateChildComponent(vm.$children[i]);
  7548. }
  7549. callHook(vm, 'activated');
  7550. }
  7551. }
  7552. function deactivateChildComponent (vm, direct) {
  7553. if (direct) {
  7554. vm._directInactive = true;
  7555. if (isInInactiveTree(vm)) {
  7556. return
  7557. }
  7558. }
  7559. if (!vm._inactive) {
  7560. vm._inactive = true;
  7561. for (var i = 0; i < vm.$children.length; i++) {
  7562. deactivateChildComponent(vm.$children[i]);
  7563. }
  7564. callHook(vm, 'deactivated');
  7565. }
  7566. }
  7567. function callHook (vm, hook) {
  7568. // #7573 disable dep collection when invoking lifecycle hooks
  7569. pushTarget();
  7570. var handlers = vm.$options[hook];
  7571. var info = hook + " hook";
  7572. if (handlers) {
  7573. for (var i = 0, j = handlers.length; i < j; i++) {
  7574. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  7575. }
  7576. }
  7577. if (vm._hasHookEvent) {
  7578. vm.$emit('hook:' + hook);
  7579. }
  7580. popTarget();
  7581. }
  7582. /* */
  7583. var MAX_UPDATE_COUNT = 100;
  7584. var queue = [];
  7585. var activatedChildren = [];
  7586. var has = {};
  7587. var circular = {};
  7588. var waiting = false;
  7589. var flushing = false;
  7590. var index = 0;
  7591. /**
  7592. * Reset the scheduler's state.
  7593. */
  7594. function resetSchedulerState () {
  7595. index = queue.length = activatedChildren.length = 0;
  7596. has = {};
  7597. if (true) {
  7598. circular = {};
  7599. }
  7600. waiting = flushing = false;
  7601. }
  7602. // Async edge case #6566 requires saving the timestamp when event listeners are
  7603. // attached. However, calling performance.now() has a perf overhead especially
  7604. // if the page has thousands of event listeners. Instead, we take a timestamp
  7605. // every time the scheduler flushes and use that for all event listeners
  7606. // attached during that flush.
  7607. var currentFlushTimestamp = 0;
  7608. // Async edge case fix requires storing an event listener's attach timestamp.
  7609. var getNow = Date.now;
  7610. // Determine what event timestamp the browser is using. Annoyingly, the
  7611. // timestamp can either be hi-res (relative to page load) or low-res
  7612. // (relative to UNIX epoch), so in order to compare time we have to use the
  7613. // same timestamp type when saving the flush timestamp.
  7614. // All IE versions use low-res event timestamps, and have problematic clock
  7615. // implementations (#9632)
  7616. if (inBrowser && !isIE) {
  7617. var performance = window.performance;
  7618. if (
  7619. performance &&
  7620. typeof performance.now === 'function' &&
  7621. getNow() > document.createEvent('Event').timeStamp
  7622. ) {
  7623. // if the event timestamp, although evaluated AFTER the Date.now(), is
  7624. // smaller than it, it means the event is using a hi-res timestamp,
  7625. // and we need to use the hi-res version for event listener timestamps as
  7626. // well.
  7627. getNow = function () { return performance.now(); };
  7628. }
  7629. }
  7630. /**
  7631. * Flush both queues and run the watchers.
  7632. */
  7633. function flushSchedulerQueue () {
  7634. currentFlushTimestamp = getNow();
  7635. flushing = true;
  7636. var watcher, id;
  7637. // Sort queue before flush.
  7638. // This ensures that:
  7639. // 1. Components are updated from parent to child. (because parent is always
  7640. // created before the child)
  7641. // 2. A component's user watchers are run before its render watcher (because
  7642. // user watchers are created before the render watcher)
  7643. // 3. If a component is destroyed during a parent component's watcher run,
  7644. // its watchers can be skipped.
  7645. queue.sort(function (a, b) { return a.id - b.id; });
  7646. // do not cache length because more watchers might be pushed
  7647. // as we run existing watchers
  7648. for (index = 0; index < queue.length; index++) {
  7649. watcher = queue[index];
  7650. if (watcher.before) {
  7651. watcher.before();
  7652. }
  7653. id = watcher.id;
  7654. has[id] = null;
  7655. watcher.run();
  7656. // in dev build, check and stop circular updates.
  7657. if ( true && has[id] != null) {
  7658. circular[id] = (circular[id] || 0) + 1;
  7659. if (circular[id] > MAX_UPDATE_COUNT) {
  7660. warn(
  7661. 'You may have an infinite update loop ' + (
  7662. watcher.user
  7663. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  7664. : "in a component render function."
  7665. ),
  7666. watcher.vm
  7667. );
  7668. break
  7669. }
  7670. }
  7671. }
  7672. // keep copies of post queues before resetting state
  7673. var activatedQueue = activatedChildren.slice();
  7674. var updatedQueue = queue.slice();
  7675. resetSchedulerState();
  7676. // call component updated and activated hooks
  7677. callActivatedHooks(activatedQueue);
  7678. callUpdatedHooks(updatedQueue);
  7679. // devtool hook
  7680. /* istanbul ignore if */
  7681. if (devtools && config.devtools) {
  7682. devtools.emit('flush');
  7683. }
  7684. }
  7685. function callUpdatedHooks (queue) {
  7686. var i = queue.length;
  7687. while (i--) {
  7688. var watcher = queue[i];
  7689. var vm = watcher.vm;
  7690. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  7691. callHook(vm, 'updated');
  7692. }
  7693. }
  7694. }
  7695. /**
  7696. * Queue a kept-alive component that was activated during patch.
  7697. * The queue will be processed after the entire tree has been patched.
  7698. */
  7699. function queueActivatedComponent (vm) {
  7700. // setting _inactive to false here so that a render function can
  7701. // rely on checking whether it's in an inactive tree (e.g. router-view)
  7702. vm._inactive = false;
  7703. activatedChildren.push(vm);
  7704. }
  7705. function callActivatedHooks (queue) {
  7706. for (var i = 0; i < queue.length; i++) {
  7707. queue[i]._inactive = true;
  7708. activateChildComponent(queue[i], true /* true */);
  7709. }
  7710. }
  7711. /**
  7712. * Push a watcher into the watcher queue.
  7713. * Jobs with duplicate IDs will be skipped unless it's
  7714. * pushed when the queue is being flushed.
  7715. */
  7716. function queueWatcher (watcher) {
  7717. var id = watcher.id;
  7718. if (has[id] == null) {
  7719. has[id] = true;
  7720. if (!flushing) {
  7721. queue.push(watcher);
  7722. } else {
  7723. // if already flushing, splice the watcher based on its id
  7724. // if already past its id, it will be run next immediately.
  7725. var i = queue.length - 1;
  7726. while (i > index && queue[i].id > watcher.id) {
  7727. i--;
  7728. }
  7729. queue.splice(i + 1, 0, watcher);
  7730. }
  7731. // queue the flush
  7732. if (!waiting) {
  7733. waiting = true;
  7734. if ( true && !config.async) {
  7735. flushSchedulerQueue();
  7736. return
  7737. }
  7738. nextTick(flushSchedulerQueue);
  7739. }
  7740. }
  7741. }
  7742. /* */
  7743. var uid$2 = 0;
  7744. /**
  7745. * A watcher parses an expression, collects dependencies,
  7746. * and fires callback when the expression value changes.
  7747. * This is used for both the $watch() api and directives.
  7748. */
  7749. var Watcher = function Watcher (
  7750. vm,
  7751. expOrFn,
  7752. cb,
  7753. options,
  7754. isRenderWatcher
  7755. ) {
  7756. this.vm = vm;
  7757. if (isRenderWatcher) {
  7758. vm._watcher = this;
  7759. }
  7760. vm._watchers.push(this);
  7761. // options
  7762. if (options) {
  7763. this.deep = !!options.deep;
  7764. this.user = !!options.user;
  7765. this.lazy = !!options.lazy;
  7766. this.sync = !!options.sync;
  7767. this.before = options.before;
  7768. } else {
  7769. this.deep = this.user = this.lazy = this.sync = false;
  7770. }
  7771. this.cb = cb;
  7772. this.id = ++uid$2; // uid for batching
  7773. this.active = true;
  7774. this.dirty = this.lazy; // for lazy watchers
  7775. this.deps = [];
  7776. this.newDeps = [];
  7777. this.depIds = new _Set();
  7778. this.newDepIds = new _Set();
  7779. this.expression = true
  7780. ? expOrFn.toString()
  7781. : undefined;
  7782. // parse expression for getter
  7783. if (typeof expOrFn === 'function') {
  7784. this.getter = expOrFn;
  7785. } else {
  7786. this.getter = parsePath(expOrFn);
  7787. if (!this.getter) {
  7788. this.getter = noop;
  7789. true && warn(
  7790. "Failed watching path: \"" + expOrFn + "\" " +
  7791. 'Watcher only accepts simple dot-delimited paths. ' +
  7792. 'For full control, use a function instead.',
  7793. vm
  7794. );
  7795. }
  7796. }
  7797. this.value = this.lazy
  7798. ? undefined
  7799. : this.get();
  7800. };
  7801. /**
  7802. * Evaluate the getter, and re-collect dependencies.
  7803. */
  7804. Watcher.prototype.get = function get () {
  7805. pushTarget(this);
  7806. var value;
  7807. var vm = this.vm;
  7808. try {
  7809. value = this.getter.call(vm, vm);
  7810. } catch (e) {
  7811. if (this.user) {
  7812. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  7813. } else {
  7814. throw e
  7815. }
  7816. } finally {
  7817. // "touch" every property so they are all tracked as
  7818. // dependencies for deep watching
  7819. if (this.deep) {
  7820. traverse(value);
  7821. }
  7822. popTarget();
  7823. this.cleanupDeps();
  7824. }
  7825. return value
  7826. };
  7827. /**
  7828. * Add a dependency to this directive.
  7829. */
  7830. Watcher.prototype.addDep = function addDep (dep) {
  7831. var id = dep.id;
  7832. if (!this.newDepIds.has(id)) {
  7833. this.newDepIds.add(id);
  7834. this.newDeps.push(dep);
  7835. if (!this.depIds.has(id)) {
  7836. dep.addSub(this);
  7837. }
  7838. }
  7839. };
  7840. /**
  7841. * Clean up for dependency collection.
  7842. */
  7843. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  7844. var i = this.deps.length;
  7845. while (i--) {
  7846. var dep = this.deps[i];
  7847. if (!this.newDepIds.has(dep.id)) {
  7848. dep.removeSub(this);
  7849. }
  7850. }
  7851. var tmp = this.depIds;
  7852. this.depIds = this.newDepIds;
  7853. this.newDepIds = tmp;
  7854. this.newDepIds.clear();
  7855. tmp = this.deps;
  7856. this.deps = this.newDeps;
  7857. this.newDeps = tmp;
  7858. this.newDeps.length = 0;
  7859. };
  7860. /**
  7861. * Subscriber interface.
  7862. * Will be called when a dependency changes.
  7863. */
  7864. Watcher.prototype.update = function update () {
  7865. /* istanbul ignore else */
  7866. if (this.lazy) {
  7867. this.dirty = true;
  7868. } else if (this.sync) {
  7869. this.run();
  7870. } else {
  7871. queueWatcher(this);
  7872. }
  7873. };
  7874. /**
  7875. * Scheduler job interface.
  7876. * Will be called by the scheduler.
  7877. */
  7878. Watcher.prototype.run = function run () {
  7879. if (this.active) {
  7880. var value = this.get();
  7881. if (
  7882. value !== this.value ||
  7883. // Deep watchers and watchers on Object/Arrays should fire even
  7884. // when the value is the same, because the value may
  7885. // have mutated.
  7886. isObject(value) ||
  7887. this.deep
  7888. ) {
  7889. // set new value
  7890. var oldValue = this.value;
  7891. this.value = value;
  7892. if (this.user) {
  7893. try {
  7894. this.cb.call(this.vm, value, oldValue);
  7895. } catch (e) {
  7896. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  7897. }
  7898. } else {
  7899. this.cb.call(this.vm, value, oldValue);
  7900. }
  7901. }
  7902. }
  7903. };
  7904. /**
  7905. * Evaluate the value of the watcher.
  7906. * This only gets called for lazy watchers.
  7907. */
  7908. Watcher.prototype.evaluate = function evaluate () {
  7909. this.value = this.get();
  7910. this.dirty = false;
  7911. };
  7912. /**
  7913. * Depend on all deps collected by this watcher.
  7914. */
  7915. Watcher.prototype.depend = function depend () {
  7916. var i = this.deps.length;
  7917. while (i--) {
  7918. this.deps[i].depend();
  7919. }
  7920. };
  7921. /**
  7922. * Remove self from all dependencies' subscriber list.
  7923. */
  7924. Watcher.prototype.teardown = function teardown () {
  7925. if (this.active) {
  7926. // remove self from vm's watcher list
  7927. // this is a somewhat expensive operation so we skip it
  7928. // if the vm is being destroyed.
  7929. if (!this.vm._isBeingDestroyed) {
  7930. remove(this.vm._watchers, this);
  7931. }
  7932. var i = this.deps.length;
  7933. while (i--) {
  7934. this.deps[i].removeSub(this);
  7935. }
  7936. this.active = false;
  7937. }
  7938. };
  7939. /* */
  7940. var sharedPropertyDefinition = {
  7941. enumerable: true,
  7942. configurable: true,
  7943. get: noop,
  7944. set: noop
  7945. };
  7946. function proxy (target, sourceKey, key) {
  7947. sharedPropertyDefinition.get = function proxyGetter () {
  7948. return this[sourceKey][key]
  7949. };
  7950. sharedPropertyDefinition.set = function proxySetter (val) {
  7951. this[sourceKey][key] = val;
  7952. };
  7953. Object.defineProperty(target, key, sharedPropertyDefinition);
  7954. }
  7955. function initState (vm) {
  7956. vm._watchers = [];
  7957. var opts = vm.$options;
  7958. if (opts.props) { initProps(vm, opts.props); }
  7959. if (opts.methods) { initMethods(vm, opts.methods); }
  7960. if (opts.data) {
  7961. initData(vm);
  7962. } else {
  7963. observe(vm._data = {}, true /* asRootData */);
  7964. }
  7965. if (opts.computed) { initComputed(vm, opts.computed); }
  7966. if (opts.watch && opts.watch !== nativeWatch) {
  7967. initWatch(vm, opts.watch);
  7968. }
  7969. }
  7970. function initProps (vm, propsOptions) {
  7971. var propsData = vm.$options.propsData || {};
  7972. var props = vm._props = {};
  7973. // cache prop keys so that future props updates can iterate using Array
  7974. // instead of dynamic object key enumeration.
  7975. var keys = vm.$options._propKeys = [];
  7976. var isRoot = !vm.$parent;
  7977. // root instance props should be converted
  7978. if (!isRoot) {
  7979. toggleObserving(false);
  7980. }
  7981. var loop = function ( key ) {
  7982. keys.push(key);
  7983. var value = validateProp(key, propsOptions, propsData, vm);
  7984. /* istanbul ignore else */
  7985. if (true) {
  7986. var hyphenatedKey = hyphenate(key);
  7987. if (isReservedAttribute(hyphenatedKey) ||
  7988. config.isReservedAttr(hyphenatedKey)) {
  7989. warn(
  7990. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  7991. vm
  7992. );
  7993. }
  7994. defineReactive$$1(props, key, value, function () {
  7995. if (!isRoot && !isUpdatingChildComponent) {
  7996. {
  7997. if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou'){//百度、快手 observer 在 setData callback 之后触发,直接忽略该 warn
  7998. return
  7999. }
  8000. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  8001. if(
  8002. key === 'value' &&
  8003. Array.isArray(vm.$options.behaviors) &&
  8004. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  8005. ){
  8006. return
  8007. }
  8008. if(vm._getFormData){
  8009. return
  8010. }
  8011. var $parent = vm.$parent;
  8012. while($parent){
  8013. if($parent.__next_tick_pending){
  8014. return
  8015. }
  8016. $parent = $parent.$parent;
  8017. }
  8018. }
  8019. warn(
  8020. "Avoid mutating a prop directly since the value will be " +
  8021. "overwritten whenever the parent component re-renders. " +
  8022. "Instead, use a data or computed property based on the prop's " +
  8023. "value. Prop being mutated: \"" + key + "\"",
  8024. vm
  8025. );
  8026. }
  8027. });
  8028. } else {}
  8029. // static props are already proxied on the component's prototype
  8030. // during Vue.extend(). We only need to proxy props defined at
  8031. // instantiation here.
  8032. if (!(key in vm)) {
  8033. proxy(vm, "_props", key);
  8034. }
  8035. };
  8036. for (var key in propsOptions) loop( key );
  8037. toggleObserving(true);
  8038. }
  8039. function initData (vm) {
  8040. var data = vm.$options.data;
  8041. data = vm._data = typeof data === 'function'
  8042. ? getData(data, vm)
  8043. : data || {};
  8044. if (!isPlainObject(data)) {
  8045. data = {};
  8046. true && warn(
  8047. 'data functions should return an object:\n' +
  8048. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  8049. vm
  8050. );
  8051. }
  8052. // proxy data on instance
  8053. var keys = Object.keys(data);
  8054. var props = vm.$options.props;
  8055. var methods = vm.$options.methods;
  8056. var i = keys.length;
  8057. while (i--) {
  8058. var key = keys[i];
  8059. if (true) {
  8060. if (methods && hasOwn(methods, key)) {
  8061. warn(
  8062. ("Method \"" + key + "\" has already been defined as a data property."),
  8063. vm
  8064. );
  8065. }
  8066. }
  8067. if (props && hasOwn(props, key)) {
  8068. true && warn(
  8069. "The data property \"" + key + "\" is already declared as a prop. " +
  8070. "Use prop default value instead.",
  8071. vm
  8072. );
  8073. } else if (!isReserved(key)) {
  8074. proxy(vm, "_data", key);
  8075. }
  8076. }
  8077. // observe data
  8078. observe(data, true /* asRootData */);
  8079. }
  8080. function getData (data, vm) {
  8081. // #7573 disable dep collection when invoking data getters
  8082. pushTarget();
  8083. try {
  8084. return data.call(vm, vm)
  8085. } catch (e) {
  8086. handleError(e, vm, "data()");
  8087. return {}
  8088. } finally {
  8089. popTarget();
  8090. }
  8091. }
  8092. var computedWatcherOptions = { lazy: true };
  8093. function initComputed (vm, computed) {
  8094. // $flow-disable-line
  8095. var watchers = vm._computedWatchers = Object.create(null);
  8096. // computed properties are just getters during SSR
  8097. var isSSR = isServerRendering();
  8098. for (var key in computed) {
  8099. var userDef = computed[key];
  8100. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  8101. if ( true && getter == null) {
  8102. warn(
  8103. ("Getter is missing for computed property \"" + key + "\"."),
  8104. vm
  8105. );
  8106. }
  8107. if (!isSSR) {
  8108. // create internal watcher for the computed property.
  8109. watchers[key] = new Watcher(
  8110. vm,
  8111. getter || noop,
  8112. noop,
  8113. computedWatcherOptions
  8114. );
  8115. }
  8116. // component-defined computed properties are already defined on the
  8117. // component prototype. We only need to define computed properties defined
  8118. // at instantiation here.
  8119. if (!(key in vm)) {
  8120. defineComputed(vm, key, userDef);
  8121. } else if (true) {
  8122. if (key in vm.$data) {
  8123. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  8124. } else if (vm.$options.props && key in vm.$options.props) {
  8125. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  8126. }
  8127. }
  8128. }
  8129. }
  8130. function defineComputed (
  8131. target,
  8132. key,
  8133. userDef
  8134. ) {
  8135. var shouldCache = !isServerRendering();
  8136. if (typeof userDef === 'function') {
  8137. sharedPropertyDefinition.get = shouldCache
  8138. ? createComputedGetter(key)
  8139. : createGetterInvoker(userDef);
  8140. sharedPropertyDefinition.set = noop;
  8141. } else {
  8142. sharedPropertyDefinition.get = userDef.get
  8143. ? shouldCache && userDef.cache !== false
  8144. ? createComputedGetter(key)
  8145. : createGetterInvoker(userDef.get)
  8146. : noop;
  8147. sharedPropertyDefinition.set = userDef.set || noop;
  8148. }
  8149. if ( true &&
  8150. sharedPropertyDefinition.set === noop) {
  8151. sharedPropertyDefinition.set = function () {
  8152. warn(
  8153. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  8154. this
  8155. );
  8156. };
  8157. }
  8158. Object.defineProperty(target, key, sharedPropertyDefinition);
  8159. }
  8160. function createComputedGetter (key) {
  8161. return function computedGetter () {
  8162. var watcher = this._computedWatchers && this._computedWatchers[key];
  8163. if (watcher) {
  8164. if (watcher.dirty) {
  8165. watcher.evaluate();
  8166. }
  8167. if (Dep.SharedObject.target) {// fixed by xxxxxx
  8168. watcher.depend();
  8169. }
  8170. return watcher.value
  8171. }
  8172. }
  8173. }
  8174. function createGetterInvoker(fn) {
  8175. return function computedGetter () {
  8176. return fn.call(this, this)
  8177. }
  8178. }
  8179. function initMethods (vm, methods) {
  8180. var props = vm.$options.props;
  8181. for (var key in methods) {
  8182. if (true) {
  8183. if (typeof methods[key] !== 'function') {
  8184. warn(
  8185. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  8186. "Did you reference the function correctly?",
  8187. vm
  8188. );
  8189. }
  8190. if (props && hasOwn(props, key)) {
  8191. warn(
  8192. ("Method \"" + key + "\" has already been defined as a prop."),
  8193. vm
  8194. );
  8195. }
  8196. if ((key in vm) && isReserved(key)) {
  8197. warn(
  8198. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  8199. "Avoid defining component methods that start with _ or $."
  8200. );
  8201. }
  8202. }
  8203. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  8204. }
  8205. }
  8206. function initWatch (vm, watch) {
  8207. for (var key in watch) {
  8208. var handler = watch[key];
  8209. if (Array.isArray(handler)) {
  8210. for (var i = 0; i < handler.length; i++) {
  8211. createWatcher(vm, key, handler[i]);
  8212. }
  8213. } else {
  8214. createWatcher(vm, key, handler);
  8215. }
  8216. }
  8217. }
  8218. function createWatcher (
  8219. vm,
  8220. expOrFn,
  8221. handler,
  8222. options
  8223. ) {
  8224. if (isPlainObject(handler)) {
  8225. options = handler;
  8226. handler = handler.handler;
  8227. }
  8228. if (typeof handler === 'string') {
  8229. handler = vm[handler];
  8230. }
  8231. return vm.$watch(expOrFn, handler, options)
  8232. }
  8233. function stateMixin (Vue) {
  8234. // flow somehow has problems with directly declared definition object
  8235. // when using Object.defineProperty, so we have to procedurally build up
  8236. // the object here.
  8237. var dataDef = {};
  8238. dataDef.get = function () { return this._data };
  8239. var propsDef = {};
  8240. propsDef.get = function () { return this._props };
  8241. if (true) {
  8242. dataDef.set = function () {
  8243. warn(
  8244. 'Avoid replacing instance root $data. ' +
  8245. 'Use nested data properties instead.',
  8246. this
  8247. );
  8248. };
  8249. propsDef.set = function () {
  8250. warn("$props is readonly.", this);
  8251. };
  8252. }
  8253. Object.defineProperty(Vue.prototype, '$data', dataDef);
  8254. Object.defineProperty(Vue.prototype, '$props', propsDef);
  8255. Vue.prototype.$set = set;
  8256. Vue.prototype.$delete = del;
  8257. Vue.prototype.$watch = function (
  8258. expOrFn,
  8259. cb,
  8260. options
  8261. ) {
  8262. var vm = this;
  8263. if (isPlainObject(cb)) {
  8264. return createWatcher(vm, expOrFn, cb, options)
  8265. }
  8266. options = options || {};
  8267. options.user = true;
  8268. var watcher = new Watcher(vm, expOrFn, cb, options);
  8269. if (options.immediate) {
  8270. try {
  8271. cb.call(vm, watcher.value);
  8272. } catch (error) {
  8273. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  8274. }
  8275. }
  8276. return function unwatchFn () {
  8277. watcher.teardown();
  8278. }
  8279. };
  8280. }
  8281. /* */
  8282. var uid$3 = 0;
  8283. function initMixin (Vue) {
  8284. Vue.prototype._init = function (options) {
  8285. var vm = this;
  8286. // a uid
  8287. vm._uid = uid$3++;
  8288. var startTag, endTag;
  8289. /* istanbul ignore if */
  8290. if ( true && config.performance && mark) {
  8291. startTag = "vue-perf-start:" + (vm._uid);
  8292. endTag = "vue-perf-end:" + (vm._uid);
  8293. mark(startTag);
  8294. }
  8295. // a flag to avoid this being observed
  8296. vm._isVue = true;
  8297. // merge options
  8298. if (options && options._isComponent) {
  8299. // optimize internal component instantiation
  8300. // since dynamic options merging is pretty slow, and none of the
  8301. // internal component options needs special treatment.
  8302. initInternalComponent(vm, options);
  8303. } else {
  8304. vm.$options = mergeOptions(
  8305. resolveConstructorOptions(vm.constructor),
  8306. options || {},
  8307. vm
  8308. );
  8309. }
  8310. /* istanbul ignore else */
  8311. if (true) {
  8312. initProxy(vm);
  8313. } else {}
  8314. // expose real self
  8315. vm._self = vm;
  8316. initLifecycle(vm);
  8317. initEvents(vm);
  8318. initRender(vm);
  8319. callHook(vm, 'beforeCreate');
  8320. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  8321. initState(vm);
  8322. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  8323. !vm._$fallback && callHook(vm, 'created');
  8324. /* istanbul ignore if */
  8325. if ( true && config.performance && mark) {
  8326. vm._name = formatComponentName(vm, false);
  8327. mark(endTag);
  8328. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  8329. }
  8330. if (vm.$options.el) {
  8331. vm.$mount(vm.$options.el);
  8332. }
  8333. };
  8334. }
  8335. function initInternalComponent (vm, options) {
  8336. var opts = vm.$options = Object.create(vm.constructor.options);
  8337. // doing this because it's faster than dynamic enumeration.
  8338. var parentVnode = options._parentVnode;
  8339. opts.parent = options.parent;
  8340. opts._parentVnode = parentVnode;
  8341. var vnodeComponentOptions = parentVnode.componentOptions;
  8342. opts.propsData = vnodeComponentOptions.propsData;
  8343. opts._parentListeners = vnodeComponentOptions.listeners;
  8344. opts._renderChildren = vnodeComponentOptions.children;
  8345. opts._componentTag = vnodeComponentOptions.tag;
  8346. if (options.render) {
  8347. opts.render = options.render;
  8348. opts.staticRenderFns = options.staticRenderFns;
  8349. }
  8350. }
  8351. function resolveConstructorOptions (Ctor) {
  8352. var options = Ctor.options;
  8353. if (Ctor.super) {
  8354. var superOptions = resolveConstructorOptions(Ctor.super);
  8355. var cachedSuperOptions = Ctor.superOptions;
  8356. if (superOptions !== cachedSuperOptions) {
  8357. // super option changed,
  8358. // need to resolve new options.
  8359. Ctor.superOptions = superOptions;
  8360. // check if there are any late-modified/attached options (#4976)
  8361. var modifiedOptions = resolveModifiedOptions(Ctor);
  8362. // update base extend options
  8363. if (modifiedOptions) {
  8364. extend(Ctor.extendOptions, modifiedOptions);
  8365. }
  8366. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  8367. if (options.name) {
  8368. options.components[options.name] = Ctor;
  8369. }
  8370. }
  8371. }
  8372. return options
  8373. }
  8374. function resolveModifiedOptions (Ctor) {
  8375. var modified;
  8376. var latest = Ctor.options;
  8377. var sealed = Ctor.sealedOptions;
  8378. for (var key in latest) {
  8379. if (latest[key] !== sealed[key]) {
  8380. if (!modified) { modified = {}; }
  8381. modified[key] = latest[key];
  8382. }
  8383. }
  8384. return modified
  8385. }
  8386. function Vue (options) {
  8387. if ( true &&
  8388. !(this instanceof Vue)
  8389. ) {
  8390. warn('Vue is a constructor and should be called with the `new` keyword');
  8391. }
  8392. this._init(options);
  8393. }
  8394. initMixin(Vue);
  8395. stateMixin(Vue);
  8396. eventsMixin(Vue);
  8397. lifecycleMixin(Vue);
  8398. renderMixin(Vue);
  8399. /* */
  8400. function initUse (Vue) {
  8401. Vue.use = function (plugin) {
  8402. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  8403. if (installedPlugins.indexOf(plugin) > -1) {
  8404. return this
  8405. }
  8406. // additional parameters
  8407. var args = toArray(arguments, 1);
  8408. args.unshift(this);
  8409. if (typeof plugin.install === 'function') {
  8410. plugin.install.apply(plugin, args);
  8411. } else if (typeof plugin === 'function') {
  8412. plugin.apply(null, args);
  8413. }
  8414. installedPlugins.push(plugin);
  8415. return this
  8416. };
  8417. }
  8418. /* */
  8419. function initMixin$1 (Vue) {
  8420. Vue.mixin = function (mixin) {
  8421. this.options = mergeOptions(this.options, mixin);
  8422. return this
  8423. };
  8424. }
  8425. /* */
  8426. function initExtend (Vue) {
  8427. /**
  8428. * Each instance constructor, including Vue, has a unique
  8429. * cid. This enables us to create wrapped "child
  8430. * constructors" for prototypal inheritance and cache them.
  8431. */
  8432. Vue.cid = 0;
  8433. var cid = 1;
  8434. /**
  8435. * Class inheritance
  8436. */
  8437. Vue.extend = function (extendOptions) {
  8438. extendOptions = extendOptions || {};
  8439. var Super = this;
  8440. var SuperId = Super.cid;
  8441. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  8442. if (cachedCtors[SuperId]) {
  8443. return cachedCtors[SuperId]
  8444. }
  8445. var name = extendOptions.name || Super.options.name;
  8446. if ( true && name) {
  8447. validateComponentName(name);
  8448. }
  8449. var Sub = function VueComponent (options) {
  8450. this._init(options);
  8451. };
  8452. Sub.prototype = Object.create(Super.prototype);
  8453. Sub.prototype.constructor = Sub;
  8454. Sub.cid = cid++;
  8455. Sub.options = mergeOptions(
  8456. Super.options,
  8457. extendOptions
  8458. );
  8459. Sub['super'] = Super;
  8460. // For props and computed properties, we define the proxy getters on
  8461. // the Vue instances at extension time, on the extended prototype. This
  8462. // avoids Object.defineProperty calls for each instance created.
  8463. if (Sub.options.props) {
  8464. initProps$1(Sub);
  8465. }
  8466. if (Sub.options.computed) {
  8467. initComputed$1(Sub);
  8468. }
  8469. // allow further extension/mixin/plugin usage
  8470. Sub.extend = Super.extend;
  8471. Sub.mixin = Super.mixin;
  8472. Sub.use = Super.use;
  8473. // create asset registers, so extended classes
  8474. // can have their private assets too.
  8475. ASSET_TYPES.forEach(function (type) {
  8476. Sub[type] = Super[type];
  8477. });
  8478. // enable recursive self-lookup
  8479. if (name) {
  8480. Sub.options.components[name] = Sub;
  8481. }
  8482. // keep a reference to the super options at extension time.
  8483. // later at instantiation we can check if Super's options have
  8484. // been updated.
  8485. Sub.superOptions = Super.options;
  8486. Sub.extendOptions = extendOptions;
  8487. Sub.sealedOptions = extend({}, Sub.options);
  8488. // cache constructor
  8489. cachedCtors[SuperId] = Sub;
  8490. return Sub
  8491. };
  8492. }
  8493. function initProps$1 (Comp) {
  8494. var props = Comp.options.props;
  8495. for (var key in props) {
  8496. proxy(Comp.prototype, "_props", key);
  8497. }
  8498. }
  8499. function initComputed$1 (Comp) {
  8500. var computed = Comp.options.computed;
  8501. for (var key in computed) {
  8502. defineComputed(Comp.prototype, key, computed[key]);
  8503. }
  8504. }
  8505. /* */
  8506. function initAssetRegisters (Vue) {
  8507. /**
  8508. * Create asset registration methods.
  8509. */
  8510. ASSET_TYPES.forEach(function (type) {
  8511. Vue[type] = function (
  8512. id,
  8513. definition
  8514. ) {
  8515. if (!definition) {
  8516. return this.options[type + 's'][id]
  8517. } else {
  8518. /* istanbul ignore if */
  8519. if ( true && type === 'component') {
  8520. validateComponentName(id);
  8521. }
  8522. if (type === 'component' && isPlainObject(definition)) {
  8523. definition.name = definition.name || id;
  8524. definition = this.options._base.extend(definition);
  8525. }
  8526. if (type === 'directive' && typeof definition === 'function') {
  8527. definition = { bind: definition, update: definition };
  8528. }
  8529. this.options[type + 's'][id] = definition;
  8530. return definition
  8531. }
  8532. };
  8533. });
  8534. }
  8535. /* */
  8536. function getComponentName (opts) {
  8537. return opts && (opts.Ctor.options.name || opts.tag)
  8538. }
  8539. function matches (pattern, name) {
  8540. if (Array.isArray(pattern)) {
  8541. return pattern.indexOf(name) > -1
  8542. } else if (typeof pattern === 'string') {
  8543. return pattern.split(',').indexOf(name) > -1
  8544. } else if (isRegExp(pattern)) {
  8545. return pattern.test(name)
  8546. }
  8547. /* istanbul ignore next */
  8548. return false
  8549. }
  8550. function pruneCache (keepAliveInstance, filter) {
  8551. var cache = keepAliveInstance.cache;
  8552. var keys = keepAliveInstance.keys;
  8553. var _vnode = keepAliveInstance._vnode;
  8554. for (var key in cache) {
  8555. var cachedNode = cache[key];
  8556. if (cachedNode) {
  8557. var name = getComponentName(cachedNode.componentOptions);
  8558. if (name && !filter(name)) {
  8559. pruneCacheEntry(cache, key, keys, _vnode);
  8560. }
  8561. }
  8562. }
  8563. }
  8564. function pruneCacheEntry (
  8565. cache,
  8566. key,
  8567. keys,
  8568. current
  8569. ) {
  8570. var cached$$1 = cache[key];
  8571. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  8572. cached$$1.componentInstance.$destroy();
  8573. }
  8574. cache[key] = null;
  8575. remove(keys, key);
  8576. }
  8577. var patternTypes = [String, RegExp, Array];
  8578. var KeepAlive = {
  8579. name: 'keep-alive',
  8580. abstract: true,
  8581. props: {
  8582. include: patternTypes,
  8583. exclude: patternTypes,
  8584. max: [String, Number]
  8585. },
  8586. created: function created () {
  8587. this.cache = Object.create(null);
  8588. this.keys = [];
  8589. },
  8590. destroyed: function destroyed () {
  8591. for (var key in this.cache) {
  8592. pruneCacheEntry(this.cache, key, this.keys);
  8593. }
  8594. },
  8595. mounted: function mounted () {
  8596. var this$1 = this;
  8597. this.$watch('include', function (val) {
  8598. pruneCache(this$1, function (name) { return matches(val, name); });
  8599. });
  8600. this.$watch('exclude', function (val) {
  8601. pruneCache(this$1, function (name) { return !matches(val, name); });
  8602. });
  8603. },
  8604. render: function render () {
  8605. var slot = this.$slots.default;
  8606. var vnode = getFirstComponentChild(slot);
  8607. var componentOptions = vnode && vnode.componentOptions;
  8608. if (componentOptions) {
  8609. // check pattern
  8610. var name = getComponentName(componentOptions);
  8611. var ref = this;
  8612. var include = ref.include;
  8613. var exclude = ref.exclude;
  8614. if (
  8615. // not included
  8616. (include && (!name || !matches(include, name))) ||
  8617. // excluded
  8618. (exclude && name && matches(exclude, name))
  8619. ) {
  8620. return vnode
  8621. }
  8622. var ref$1 = this;
  8623. var cache = ref$1.cache;
  8624. var keys = ref$1.keys;
  8625. var key = vnode.key == null
  8626. // same constructor may get registered as different local components
  8627. // so cid alone is not enough (#3269)
  8628. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  8629. : vnode.key;
  8630. if (cache[key]) {
  8631. vnode.componentInstance = cache[key].componentInstance;
  8632. // make current key freshest
  8633. remove(keys, key);
  8634. keys.push(key);
  8635. } else {
  8636. cache[key] = vnode;
  8637. keys.push(key);
  8638. // prune oldest entry
  8639. if (this.max && keys.length > parseInt(this.max)) {
  8640. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  8641. }
  8642. }
  8643. vnode.data.keepAlive = true;
  8644. }
  8645. return vnode || (slot && slot[0])
  8646. }
  8647. };
  8648. var builtInComponents = {
  8649. KeepAlive: KeepAlive
  8650. };
  8651. /* */
  8652. function initGlobalAPI (Vue) {
  8653. // config
  8654. var configDef = {};
  8655. configDef.get = function () { return config; };
  8656. if (true) {
  8657. configDef.set = function () {
  8658. warn(
  8659. 'Do not replace the Vue.config object, set individual fields instead.'
  8660. );
  8661. };
  8662. }
  8663. Object.defineProperty(Vue, 'config', configDef);
  8664. // exposed util methods.
  8665. // NOTE: these are not considered part of the public API - avoid relying on
  8666. // them unless you are aware of the risk.
  8667. Vue.util = {
  8668. warn: warn,
  8669. extend: extend,
  8670. mergeOptions: mergeOptions,
  8671. defineReactive: defineReactive$$1
  8672. };
  8673. Vue.set = set;
  8674. Vue.delete = del;
  8675. Vue.nextTick = nextTick;
  8676. // 2.6 explicit observable API
  8677. Vue.observable = function (obj) {
  8678. observe(obj);
  8679. return obj
  8680. };
  8681. Vue.options = Object.create(null);
  8682. ASSET_TYPES.forEach(function (type) {
  8683. Vue.options[type + 's'] = Object.create(null);
  8684. });
  8685. // this is used to identify the "base" constructor to extend all plain-object
  8686. // components with in Weex's multi-instance scenarios.
  8687. Vue.options._base = Vue;
  8688. extend(Vue.options.components, builtInComponents);
  8689. initUse(Vue);
  8690. initMixin$1(Vue);
  8691. initExtend(Vue);
  8692. initAssetRegisters(Vue);
  8693. }
  8694. initGlobalAPI(Vue);
  8695. Object.defineProperty(Vue.prototype, '$isServer', {
  8696. get: isServerRendering
  8697. });
  8698. Object.defineProperty(Vue.prototype, '$ssrContext', {
  8699. get: function get () {
  8700. /* istanbul ignore next */
  8701. return this.$vnode && this.$vnode.ssrContext
  8702. }
  8703. });
  8704. // expose FunctionalRenderContext for ssr runtime helper installation
  8705. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  8706. value: FunctionalRenderContext
  8707. });
  8708. Vue.version = '2.6.11';
  8709. /**
  8710. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  8711. */
  8712. var ARRAYTYPE = '[object Array]';
  8713. var OBJECTTYPE = '[object Object]';
  8714. // const FUNCTIONTYPE = '[object Function]'
  8715. function diff(current, pre) {
  8716. var result = {};
  8717. syncKeys(current, pre);
  8718. _diff(current, pre, '', result);
  8719. return result
  8720. }
  8721. function syncKeys(current, pre) {
  8722. if (current === pre) { return }
  8723. var rootCurrentType = type(current);
  8724. var rootPreType = type(pre);
  8725. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  8726. if(Object.keys(current).length >= Object.keys(pre).length){
  8727. for (var key in pre) {
  8728. var currentValue = current[key];
  8729. if (currentValue === undefined) {
  8730. current[key] = null;
  8731. } else {
  8732. syncKeys(currentValue, pre[key]);
  8733. }
  8734. }
  8735. }
  8736. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  8737. if (current.length >= pre.length) {
  8738. pre.forEach(function (item, index) {
  8739. syncKeys(current[index], item);
  8740. });
  8741. }
  8742. }
  8743. }
  8744. function _diff(current, pre, path, result) {
  8745. if (current === pre) { return }
  8746. var rootCurrentType = type(current);
  8747. var rootPreType = type(pre);
  8748. if (rootCurrentType == OBJECTTYPE) {
  8749. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  8750. setResult(result, path, current);
  8751. } else {
  8752. var loop = function ( key ) {
  8753. var currentValue = current[key];
  8754. var preValue = pre[key];
  8755. var currentType = type(currentValue);
  8756. var preType = type(preValue);
  8757. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  8758. // NOTE 此处将 != 修改为 !==。涉及地方太多恐怕测试不到,如果出现数据对比问题,将其修改回来。
  8759. if (currentValue !== pre[key]) {
  8760. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8761. }
  8762. } else if (currentType == ARRAYTYPE) {
  8763. if (preType != ARRAYTYPE) {
  8764. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8765. } else {
  8766. if (currentValue.length < preValue.length) {
  8767. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8768. } else {
  8769. currentValue.forEach(function (item, index) {
  8770. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  8771. });
  8772. }
  8773. }
  8774. } else if (currentType == OBJECTTYPE) {
  8775. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  8776. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8777. } else {
  8778. for (var subKey in currentValue) {
  8779. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  8780. }
  8781. }
  8782. }
  8783. };
  8784. for (var key in current) loop( key );
  8785. }
  8786. } else if (rootCurrentType == ARRAYTYPE) {
  8787. if (rootPreType != ARRAYTYPE) {
  8788. setResult(result, path, current);
  8789. } else {
  8790. if (current.length < pre.length) {
  8791. setResult(result, path, current);
  8792. } else {
  8793. current.forEach(function (item, index) {
  8794. _diff(item, pre[index], path + '[' + index + ']', result);
  8795. });
  8796. }
  8797. }
  8798. } else {
  8799. setResult(result, path, current);
  8800. }
  8801. }
  8802. function setResult(result, k, v) {
  8803. // if (type(v) != FUNCTIONTYPE) {
  8804. result[k] = v;
  8805. // }
  8806. }
  8807. function type(obj) {
  8808. return Object.prototype.toString.call(obj)
  8809. }
  8810. /* */
  8811. function flushCallbacks$1(vm) {
  8812. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  8813. if (Object({"NODE_ENV":"development","VUE_APP_NAME":"uView UI已发布Sketch和Axure设计资源示例","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  8814. var mpInstance = vm.$scope;
  8815. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  8816. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  8817. }
  8818. var copies = vm.__next_tick_callbacks.slice(0);
  8819. vm.__next_tick_callbacks.length = 0;
  8820. for (var i = 0; i < copies.length; i++) {
  8821. copies[i]();
  8822. }
  8823. }
  8824. }
  8825. function hasRenderWatcher(vm) {
  8826. return queue.find(function (watcher) { return vm._watcher === watcher; })
  8827. }
  8828. function nextTick$1(vm, cb) {
  8829. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  8830. //2.nextTick 之前存在 render watcher
  8831. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  8832. if(Object({"NODE_ENV":"development","VUE_APP_NAME":"uView UI已发布Sketch和Axure设计资源示例","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  8833. var mpInstance = vm.$scope;
  8834. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  8835. ']:nextVueTick');
  8836. }
  8837. return nextTick(cb, vm)
  8838. }else{
  8839. if(Object({"NODE_ENV":"development","VUE_APP_NAME":"uView UI已发布Sketch和Axure设计资源示例","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  8840. var mpInstance$1 = vm.$scope;
  8841. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  8842. ']:nextMPTick');
  8843. }
  8844. }
  8845. var _resolve;
  8846. if (!vm.__next_tick_callbacks) {
  8847. vm.__next_tick_callbacks = [];
  8848. }
  8849. vm.__next_tick_callbacks.push(function () {
  8850. if (cb) {
  8851. try {
  8852. cb.call(vm);
  8853. } catch (e) {
  8854. handleError(e, vm, 'nextTick');
  8855. }
  8856. } else if (_resolve) {
  8857. _resolve(vm);
  8858. }
  8859. });
  8860. // $flow-disable-line
  8861. if (!cb && typeof Promise !== 'undefined') {
  8862. return new Promise(function (resolve) {
  8863. _resolve = resolve;
  8864. })
  8865. }
  8866. }
  8867. /* */
  8868. function cloneWithData(vm) {
  8869. // 确保当前 vm 所有数据被同步
  8870. var ret = Object.create(null);
  8871. var dataKeys = [].concat(
  8872. Object.keys(vm._data || {}),
  8873. Object.keys(vm._computedWatchers || {}));
  8874. dataKeys.reduce(function(ret, key) {
  8875. ret[key] = vm[key];
  8876. return ret
  8877. }, ret);
  8878. // vue-composition-api
  8879. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  8880. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  8881. if (rawBindings) {
  8882. Object.keys(rawBindings).forEach(function (key) {
  8883. ret[key] = vm[key];
  8884. });
  8885. }
  8886. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  8887. Object.assign(ret, vm.$mp.data || {});
  8888. if (
  8889. Array.isArray(vm.$options.behaviors) &&
  8890. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  8891. ) { //form-field
  8892. ret['name'] = vm.name;
  8893. ret['value'] = vm.value;
  8894. }
  8895. return JSON.parse(JSON.stringify(ret))
  8896. }
  8897. var patch = function(oldVnode, vnode) {
  8898. var this$1 = this;
  8899. if (vnode === null) { //destroy
  8900. return
  8901. }
  8902. if (this.mpType === 'page' || this.mpType === 'component') {
  8903. var mpInstance = this.$scope;
  8904. var data = Object.create(null);
  8905. try {
  8906. data = cloneWithData(this);
  8907. } catch (err) {
  8908. console.error(err);
  8909. }
  8910. data.__webviewId__ = mpInstance.data.__webviewId__;
  8911. var mpData = Object.create(null);
  8912. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  8913. mpData[key] = mpInstance.data[key];
  8914. });
  8915. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  8916. if (Object.keys(diffData).length) {
  8917. if (Object({"NODE_ENV":"development","VUE_APP_NAME":"uView UI已发布Sketch和Axure设计资源示例","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  8918. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  8919. ']差量更新',
  8920. JSON.stringify(diffData));
  8921. }
  8922. this.__next_tick_pending = true;
  8923. mpInstance.setData(diffData, function () {
  8924. this$1.__next_tick_pending = false;
  8925. flushCallbacks$1(this$1);
  8926. });
  8927. } else {
  8928. flushCallbacks$1(this);
  8929. }
  8930. }
  8931. };
  8932. /* */
  8933. function createEmptyRender() {
  8934. }
  8935. function mountComponent$1(
  8936. vm,
  8937. el,
  8938. hydrating
  8939. ) {
  8940. if (!vm.mpType) {//main.js 中的 new Vue
  8941. return vm
  8942. }
  8943. if (vm.mpType === 'app') {
  8944. vm.$options.render = createEmptyRender;
  8945. }
  8946. if (!vm.$options.render) {
  8947. vm.$options.render = createEmptyRender;
  8948. if (true) {
  8949. /* istanbul ignore if */
  8950. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  8951. vm.$options.el || el) {
  8952. warn(
  8953. 'You are using the runtime-only build of Vue where the template ' +
  8954. 'compiler is not available. Either pre-compile the templates into ' +
  8955. 'render functions, or use the compiler-included build.',
  8956. vm
  8957. );
  8958. } else {
  8959. warn(
  8960. 'Failed to mount component: template or render function not defined.',
  8961. vm
  8962. );
  8963. }
  8964. }
  8965. }
  8966. !vm._$fallback && callHook(vm, 'beforeMount');
  8967. var updateComponent = function () {
  8968. vm._update(vm._render(), hydrating);
  8969. };
  8970. // we set this to vm._watcher inside the watcher's constructor
  8971. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  8972. // component's mounted hook), which relies on vm._watcher being already defined
  8973. new Watcher(vm, updateComponent, noop, {
  8974. before: function before() {
  8975. if (vm._isMounted && !vm._isDestroyed) {
  8976. callHook(vm, 'beforeUpdate');
  8977. }
  8978. }
  8979. }, true /* isRenderWatcher */);
  8980. hydrating = false;
  8981. return vm
  8982. }
  8983. /* */
  8984. function renderClass (
  8985. staticClass,
  8986. dynamicClass
  8987. ) {
  8988. if (isDef(staticClass) || isDef(dynamicClass)) {
  8989. return concat(staticClass, stringifyClass(dynamicClass))
  8990. }
  8991. /* istanbul ignore next */
  8992. return ''
  8993. }
  8994. function concat (a, b) {
  8995. return a ? b ? (a + ' ' + b) : a : (b || '')
  8996. }
  8997. function stringifyClass (value) {
  8998. if (Array.isArray(value)) {
  8999. return stringifyArray(value)
  9000. }
  9001. if (isObject(value)) {
  9002. return stringifyObject(value)
  9003. }
  9004. if (typeof value === 'string') {
  9005. return value
  9006. }
  9007. /* istanbul ignore next */
  9008. return ''
  9009. }
  9010. function stringifyArray (value) {
  9011. var res = '';
  9012. var stringified;
  9013. for (var i = 0, l = value.length; i < l; i++) {
  9014. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  9015. if (res) { res += ' '; }
  9016. res += stringified;
  9017. }
  9018. }
  9019. return res
  9020. }
  9021. function stringifyObject (value) {
  9022. var res = '';
  9023. for (var key in value) {
  9024. if (value[key]) {
  9025. if (res) { res += ' '; }
  9026. res += key;
  9027. }
  9028. }
  9029. return res
  9030. }
  9031. /* */
  9032. var parseStyleText = cached(function (cssText) {
  9033. var res = {};
  9034. var listDelimiter = /;(?![^(]*\))/g;
  9035. var propertyDelimiter = /:(.+)/;
  9036. cssText.split(listDelimiter).forEach(function (item) {
  9037. if (item) {
  9038. var tmp = item.split(propertyDelimiter);
  9039. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  9040. }
  9041. });
  9042. return res
  9043. });
  9044. // normalize possible array / string values into Object
  9045. function normalizeStyleBinding (bindingStyle) {
  9046. if (Array.isArray(bindingStyle)) {
  9047. return toObject(bindingStyle)
  9048. }
  9049. if (typeof bindingStyle === 'string') {
  9050. return parseStyleText(bindingStyle)
  9051. }
  9052. return bindingStyle
  9053. }
  9054. /* */
  9055. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  9056. function getTarget(obj, path) {
  9057. var parts = path.split('.');
  9058. var key = parts[0];
  9059. if (key.indexOf('__$n') === 0) { //number index
  9060. key = parseInt(key.replace('__$n', ''));
  9061. }
  9062. if (parts.length === 1) {
  9063. return obj[key]
  9064. }
  9065. return getTarget(obj[key], parts.slice(1).join('.'))
  9066. }
  9067. function internalMixin(Vue) {
  9068. Vue.config.errorHandler = function(err, vm, info) {
  9069. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  9070. console.error(err);
  9071. /* eslint-disable no-undef */
  9072. var app = typeof getApp === 'function' && getApp();
  9073. if (app && app.onError) {
  9074. app.onError(err);
  9075. }
  9076. };
  9077. var oldEmit = Vue.prototype.$emit;
  9078. Vue.prototype.$emit = function(event) {
  9079. if (this.$scope && event) {
  9080. (this.$scope['_triggerEvent'] || this.$scope['triggerEvent'])
  9081. .call(this.$scope, event, {
  9082. __args__: toArray(arguments, 1)
  9083. })
  9084. }
  9085. return oldEmit.apply(this, arguments)
  9086. };
  9087. Vue.prototype.$nextTick = function(fn) {
  9088. return nextTick$1(this, fn)
  9089. };
  9090. MP_METHODS.forEach(function (method) {
  9091. Vue.prototype[method] = function(args) {
  9092. if (this.$scope && this.$scope[method]) {
  9093. return this.$scope[method](args)
  9094. }
  9095. // mp-alipay
  9096. if (typeof my === 'undefined') {
  9097. return
  9098. }
  9099. if (method === 'createSelectorQuery') {
  9100. /* eslint-disable no-undef */
  9101. return my.createSelectorQuery(args)
  9102. } else if (method === 'createIntersectionObserver') {
  9103. /* eslint-disable no-undef */
  9104. return my.createIntersectionObserver(args)
  9105. }
  9106. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  9107. };
  9108. });
  9109. Vue.prototype.__init_provide = initProvide;
  9110. Vue.prototype.__init_injections = initInjections;
  9111. Vue.prototype.__call_hook = function(hook, args) {
  9112. var vm = this;
  9113. // #7573 disable dep collection when invoking lifecycle hooks
  9114. pushTarget();
  9115. var handlers = vm.$options[hook];
  9116. var info = hook + " hook";
  9117. var ret;
  9118. if (handlers) {
  9119. for (var i = 0, j = handlers.length; i < j; i++) {
  9120. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  9121. }
  9122. }
  9123. if (vm._hasHookEvent) {
  9124. vm.$emit('hook:' + hook, args);
  9125. }
  9126. popTarget();
  9127. return ret
  9128. };
  9129. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  9130. if (Array.isArray(modifiers)) {
  9131. if (modifiers.indexOf('trim') !== -1) {
  9132. value = value.trim();
  9133. }
  9134. if (modifiers.indexOf('number') !== -1) {
  9135. value = this._n(value);
  9136. }
  9137. }
  9138. if (!target) {
  9139. target = this;
  9140. }
  9141. // 解决动态属性添加
  9142. Vue.set(target, key, value)
  9143. };
  9144. Vue.prototype.__set_sync = function(target, key, value) {
  9145. if (!target) {
  9146. target = this;
  9147. }
  9148. // 解决动态属性添加
  9149. Vue.set(target, key, value)
  9150. };
  9151. Vue.prototype.__get_orig = function(item) {
  9152. if (isPlainObject(item)) {
  9153. return item['$orig'] || item
  9154. }
  9155. return item
  9156. };
  9157. Vue.prototype.__get_value = function(dataPath, target) {
  9158. return getTarget(target || this, dataPath)
  9159. };
  9160. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  9161. return renderClass(staticClass, dynamicClass)
  9162. };
  9163. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  9164. if (!dynamicStyle && !staticStyle) {
  9165. return ''
  9166. }
  9167. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  9168. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  9169. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  9170. };
  9171. Vue.prototype.__map = function(val, iteratee) {
  9172. //TODO 暂不考虑 string
  9173. var ret, i, l, keys, key;
  9174. if (Array.isArray(val)) {
  9175. ret = new Array(val.length);
  9176. for (i = 0, l = val.length; i < l; i++) {
  9177. ret[i] = iteratee(val[i], i);
  9178. }
  9179. return ret
  9180. } else if (isObject(val)) {
  9181. keys = Object.keys(val);
  9182. ret = Object.create(null);
  9183. for (i = 0, l = keys.length; i < l; i++) {
  9184. key = keys[i];
  9185. ret[key] = iteratee(val[key], key, i);
  9186. }
  9187. return ret
  9188. } else if (typeof val === 'number') {
  9189. ret = new Array(val);
  9190. for (i = 0, l = val; i < l; i++) {
  9191. // 第一个参数暂时仍和小程序一致
  9192. ret[i] = iteratee(i, i);
  9193. }
  9194. return ret
  9195. }
  9196. return []
  9197. };
  9198. }
  9199. /* */
  9200. var LIFECYCLE_HOOKS$1 = [
  9201. //App
  9202. 'onLaunch',
  9203. 'onShow',
  9204. 'onHide',
  9205. 'onUniNViewMessage',
  9206. 'onPageNotFound',
  9207. 'onThemeChange',
  9208. 'onError',
  9209. 'onUnhandledRejection',
  9210. //Page
  9211. 'onInit',
  9212. 'onLoad',
  9213. // 'onShow',
  9214. 'onReady',
  9215. // 'onHide',
  9216. 'onUnload',
  9217. 'onPullDownRefresh',
  9218. 'onReachBottom',
  9219. 'onTabItemTap',
  9220. 'onAddToFavorites',
  9221. 'onShareTimeline',
  9222. 'onShareAppMessage',
  9223. 'onResize',
  9224. 'onPageScroll',
  9225. 'onNavigationBarButtonTap',
  9226. 'onBackPress',
  9227. 'onNavigationBarSearchInputChanged',
  9228. 'onNavigationBarSearchInputConfirmed',
  9229. 'onNavigationBarSearchInputClicked',
  9230. //Component
  9231. // 'onReady', // 兼容旧版本,应该移除该事件
  9232. 'onPageShow',
  9233. 'onPageHide',
  9234. 'onPageResize'
  9235. ];
  9236. function lifecycleMixin$1(Vue) {
  9237. //fixed vue-class-component
  9238. var oldExtend = Vue.extend;
  9239. Vue.extend = function(extendOptions) {
  9240. extendOptions = extendOptions || {};
  9241. var methods = extendOptions.methods;
  9242. if (methods) {
  9243. Object.keys(methods).forEach(function (methodName) {
  9244. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  9245. extendOptions[methodName] = methods[methodName];
  9246. delete methods[methodName];
  9247. }
  9248. });
  9249. }
  9250. return oldExtend.call(this, extendOptions)
  9251. };
  9252. var strategies = Vue.config.optionMergeStrategies;
  9253. var mergeHook = strategies.created;
  9254. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  9255. strategies[hook] = mergeHook;
  9256. });
  9257. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  9258. }
  9259. /* */
  9260. // install platform patch function
  9261. Vue.prototype.__patch__ = patch;
  9262. // public mount method
  9263. Vue.prototype.$mount = function(
  9264. el ,
  9265. hydrating
  9266. ) {
  9267. return mountComponent$1(this, el, hydrating)
  9268. };
  9269. lifecycleMixin$1(Vue);
  9270. internalMixin(Vue);
  9271. /* */
  9272. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  9273. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 2)))
  9274. /***/ }),
  9275. /***/ 30:
  9276. /*!**************************************************************************************************!*\
  9277. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/libs/function/addUnit.js ***!
  9278. \**************************************************************************************************/
  9279. /*! no static exports found */
  9280. /***/ (function(module, exports, __webpack_require__) {
  9281. "use strict";
  9282. Object.defineProperty(exports, "__esModule", { value: true });exports.default = addUnit;var _test = _interopRequireDefault(__webpack_require__(/*! ./test.js */ 17));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  9283. // 添加单位,如果有rpx,%,px等单位结尾或者值为auto,直接返回,否则加上rpx单位结尾
  9284. function addUnit() {var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'auto';var unit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'rpx';
  9285. value = String(value);
  9286. // 用uView内置验证规则中的number判断是否为数值
  9287. return _test.default.number(value) ? "".concat(value).concat(unit) : value;
  9288. }
  9289. /***/ }),
  9290. /***/ 31:
  9291. /*!*************************************************************************************************!*\
  9292. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/libs/function/random.js ***!
  9293. \*************************************************************************************************/
  9294. /*! no static exports found */
  9295. /***/ (function(module, exports, __webpack_require__) {
  9296. "use strict";
  9297. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;function random(min, max) {
  9298. if (min >= 0 && max > 0 && max >= min) {
  9299. var gab = max - min + 1;
  9300. return Math.floor(Math.random() * gab + min);
  9301. } else {
  9302. return 0;
  9303. }
  9304. }var _default =
  9305. random;exports.default = _default;
  9306. /***/ }),
  9307. /***/ 311:
  9308. /*!*****************************************************************************************************************!*\
  9309. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/components/u-parse/libs/MpHtmlParser.js ***!
  9310. \*****************************************************************************************************************/
  9311. /*! no static exports found */
  9312. /***/ (function(module, exports, __webpack_require__) {
  9313. /* WEBPACK VAR INJECTION */(function(uni) {/**
  9314. * html 解析器
  9315. * @tutorial https://github.com/jin-yufeng/Parser
  9316. * @version 20201029
  9317. * @author JinYufeng
  9318. * @listens MIT
  9319. */
  9320. var cfg = __webpack_require__(/*! ./config.js */ 312),
  9321. blankChar = cfg.blankChar,
  9322. CssHandler = __webpack_require__(/*! ./CssHandler.js */ 313),
  9323. windowWidth = uni.getSystemInfoSync().windowWidth;
  9324. var emoji;
  9325. function MpHtmlParser(data) {var _this = this;var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9326. this.attrs = {};
  9327. this.CssHandler = new CssHandler(options.tagStyle, windowWidth);
  9328. this.data = data;
  9329. this.domain = options.domain;
  9330. this.DOM = [];
  9331. this.i = this.start = this.audioNum = this.imgNum = this.videoNum = 0;
  9332. options.prot = (this.domain || '').includes('://') ? this.domain.split('://')[0] : 'http';
  9333. this.options = options;
  9334. this.state = this.Text;
  9335. this.STACK = [];
  9336. // 工具函数
  9337. this.bubble = function () {
  9338. for (var i = _this.STACK.length, item; item = _this.STACK[--i];) {
  9339. if (cfg.richOnlyTags[item.name]) return false;
  9340. item.c = 1;
  9341. }
  9342. return true;
  9343. };
  9344. this.decode = function (val, amp) {
  9345. var i = -1,
  9346. j,en;
  9347. while (1) {
  9348. if ((i = val.indexOf('&', i + 1)) == -1) break;
  9349. if ((j = val.indexOf(';', i + 2)) == -1) break;
  9350. if (val[i + 1] == '#') {
  9351. en = parseInt((val[i + 2] == 'x' ? '0' : '') + val.substring(i + 2, j));
  9352. if (!isNaN(en)) val = val.substr(0, i) + String.fromCharCode(en) + val.substr(j + 1);
  9353. } else {
  9354. en = val.substring(i + 1, j);
  9355. if (cfg.entities[en] || en == amp)
  9356. val = val.substr(0, i) + (cfg.entities[en] || '&') + val.substr(j + 1);
  9357. }
  9358. }
  9359. return val;
  9360. };
  9361. this.getUrl = function (url) {
  9362. if (url[0] == '/') {
  9363. if (url[1] == '/') url = _this.options.prot + ':' + url;else
  9364. if (_this.domain) url = _this.domain + url;
  9365. } else if (_this.domain && url.indexOf('data:') != 0 && !url.includes('://'))
  9366. url = _this.domain + '/' + url;
  9367. return url;
  9368. };
  9369. this.isClose = function () {return _this.data[_this.i] == '>' || _this.data[_this.i] == '/' && _this.data[_this.i + 1] == '>';};
  9370. this.section = function () {return _this.data.substring(_this.start, _this.i);};
  9371. this.parent = function () {return _this.STACK[_this.STACK.length - 1];};
  9372. this.siblings = function () {return _this.STACK.length ? _this.parent().children : _this.DOM;};
  9373. }
  9374. MpHtmlParser.prototype.parse = function () {
  9375. if (emoji) this.data = emoji.parseEmoji(this.data);
  9376. for (var c; c = this.data[this.i]; this.i++) {
  9377. this.state(c);}
  9378. if (this.state == this.Text) this.setText();
  9379. while (this.STACK.length) {this.popNode(this.STACK.pop());}
  9380. return this.DOM;
  9381. };
  9382. // 设置属性
  9383. MpHtmlParser.prototype.setAttr = function () {
  9384. var name = this.attrName.toLowerCase(),
  9385. val = this.attrVal;
  9386. if (cfg.boolAttrs[name]) this.attrs[name] = 'T';else
  9387. if (val) {
  9388. if (name == 'src' || name == 'data-src' && !this.attrs.src) this.attrs.src = this.getUrl(this.decode(val, 'amp'));else
  9389. if (name == 'href' || name == 'style') this.attrs[name] = this.decode(val, 'amp');else
  9390. if (name.substr(0, 5) != 'data-') this.attrs[name] = val;
  9391. }
  9392. this.attrVal = '';
  9393. while (blankChar[this.data[this.i]]) {this.i++;}
  9394. if (this.isClose()) this.setNode();else
  9395. {
  9396. this.start = this.i;
  9397. this.state = this.AttrName;
  9398. }
  9399. };
  9400. // 设置文本节点
  9401. MpHtmlParser.prototype.setText = function () {
  9402. var back,text = this.section();
  9403. if (!text) return;
  9404. text = cfg.onText && cfg.onText(text, function () {return back = true;}) || text;
  9405. if (back) {
  9406. this.data = this.data.substr(0, this.start) + text + this.data.substr(this.i);
  9407. var j = this.start + text.length;
  9408. for (this.i = this.start; this.i < j; this.i++) {this.state(this.data[this.i]);}
  9409. return;
  9410. }
  9411. if (!this.pre) {
  9412. // 合并空白符
  9413. var flag,tmp = [];
  9414. for (var i = text.length, c; c = text[--i];) {
  9415. if (!blankChar[c]) {
  9416. tmp.unshift(c);
  9417. if (!flag) flag = 1;
  9418. } else {
  9419. if (tmp[0] != ' ') tmp.unshift(' ');
  9420. if (c == '\n' && flag == void 0) flag = 0;
  9421. }}
  9422. if (flag == 0) return;
  9423. text = tmp.join('');
  9424. }
  9425. this.siblings().push({
  9426. type: 'text',
  9427. text: this.decode(text) });
  9428. };
  9429. // 设置元素节点
  9430. MpHtmlParser.prototype.setNode = function () {
  9431. var node = {
  9432. name: this.tagName.toLowerCase(),
  9433. attrs: this.attrs },
  9434. close = cfg.selfClosingTags[node.name];
  9435. if (this.options.nodes.length) node.type = 'node';
  9436. this.attrs = {};
  9437. if (!cfg.ignoreTags[node.name]) {
  9438. // 处理属性
  9439. var attrs = node.attrs,
  9440. style = this.CssHandler.match(node.name, attrs, node) + (attrs.style || ''),
  9441. styleObj = {};
  9442. if (attrs.id) {
  9443. if (this.options.compress & 1) attrs.id = void 0;else
  9444. if (this.options.useAnchor) this.bubble();
  9445. }
  9446. if (this.options.compress & 2 && attrs.class) attrs.class = void 0;
  9447. switch (node.name) {
  9448. case 'a':
  9449. case 'ad':
  9450. this.bubble();
  9451. break;
  9452. case 'font':
  9453. if (attrs.color) {
  9454. styleObj['color'] = attrs.color;
  9455. attrs.color = void 0;
  9456. }
  9457. if (attrs.face) {
  9458. styleObj['font-family'] = attrs.face;
  9459. attrs.face = void 0;
  9460. }
  9461. if (attrs.size) {
  9462. var size = parseInt(attrs.size);
  9463. if (size < 1) size = 1;else
  9464. if (size > 7) size = 7;
  9465. var map = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'];
  9466. styleObj['font-size'] = map[size - 1];
  9467. attrs.size = void 0;
  9468. }
  9469. break;
  9470. case 'embed':
  9471. var src = node.attrs.src || '',
  9472. type = node.attrs.type || '';
  9473. if (type.includes('video') || src.includes('.mp4') || src.includes('.3gp') || src.includes('.m3u8'))
  9474. node.name = 'video';else
  9475. if (type.includes('audio') || src.includes('.m4a') || src.includes('.wav') || src.includes('.mp3') || src.includes(
  9476. '.aac'))
  9477. node.name = 'audio';else
  9478. break;
  9479. if (node.attrs.autostart)
  9480. node.attrs.autoplay = 'T';
  9481. node.attrs.controls = 'T';
  9482. case 'video':
  9483. case 'audio':
  9484. if (!attrs.id) attrs.id = node.name + ++this["".concat(node.name, "Num")];else
  9485. this["".concat(node.name, "Num")]++;
  9486. if (node.name == 'video') {
  9487. if (this.videoNum > 3)
  9488. node.lazyLoad = 1;
  9489. if (attrs.width) {
  9490. styleObj.width = parseFloat(attrs.width) + (attrs.width.includes('%') ? '%' : 'px');
  9491. attrs.width = void 0;
  9492. }
  9493. if (attrs.height) {
  9494. styleObj.height = parseFloat(attrs.height) + (attrs.height.includes('%') ? '%' : 'px');
  9495. attrs.height = void 0;
  9496. }
  9497. }
  9498. if (!attrs.controls && !attrs.autoplay) attrs.controls = 'T';
  9499. attrs.source = [];
  9500. if (attrs.src) {
  9501. attrs.source.push(attrs.src);
  9502. attrs.src = void 0;
  9503. }
  9504. this.bubble();
  9505. break;
  9506. case 'td':
  9507. case 'th':
  9508. if (attrs.colspan || attrs.rowspan)
  9509. for (var k = this.STACK.length, item; item = this.STACK[--k];) {
  9510. if (item.name == 'table') {
  9511. item.flag = 1;
  9512. break;
  9513. }}}
  9514. if (attrs.align) {
  9515. if (node.name == 'table') {
  9516. if (attrs.align == 'center') styleObj['margin-inline-start'] = styleObj['margin-inline-end'] = 'auto';else
  9517. styleObj['float'] = attrs.align;
  9518. } else styleObj['text-align'] = attrs.align;
  9519. attrs.align = void 0;
  9520. }
  9521. // 压缩 style
  9522. var styles = style.split(';');
  9523. style = '';
  9524. for (var i = 0, len = styles.length; i < len; i++) {
  9525. var info = styles[i].split(':');
  9526. if (info.length < 2) continue;
  9527. var _key = info[0].trim().toLowerCase(),
  9528. _value = info.slice(1).join(':').trim();
  9529. if (_value[0] == '-' || _value.includes('safe'))
  9530. style += ";".concat(_key, ":").concat(_value);else
  9531. if (!styleObj[_key] || _value.includes('import') || !styleObj[_key].includes('import'))
  9532. styleObj[_key] = _value;
  9533. }
  9534. if (node.name == 'img') {
  9535. if (attrs.src && !attrs.ignore) {
  9536. if (this.bubble())
  9537. attrs.i = (this.imgNum++).toString();else
  9538. attrs.ignore = 'T';
  9539. }
  9540. if (attrs.ignore) {
  9541. style += ';-webkit-touch-callout:none';
  9542. styleObj['max-width'] = '100%';
  9543. }
  9544. var width;
  9545. if (styleObj.width) width = styleObj.width;else
  9546. if (attrs.width) width = attrs.width.includes('%') ? attrs.width : parseFloat(attrs.width) + 'px';
  9547. if (width) {
  9548. styleObj.width = width;
  9549. attrs.width = '100%';
  9550. if (parseInt(width) > windowWidth) {
  9551. styleObj.height = '';
  9552. if (attrs.height) attrs.height = void 0;
  9553. }
  9554. }
  9555. if (styleObj.height) {
  9556. attrs.height = styleObj.height;
  9557. styleObj.height = '';
  9558. } else if (attrs.height && !attrs.height.includes('%'))
  9559. attrs.height = parseFloat(attrs.height) + 'px';
  9560. }
  9561. for (var key in styleObj) {
  9562. var value = styleObj[key];
  9563. if (!value) continue;
  9564. if (key.includes('flex') || key == 'order' || key == 'self-align') node.c = 1;
  9565. // 填充链接
  9566. if (value.includes('url')) {
  9567. var j = value.indexOf('(');
  9568. if (j++ != -1) {
  9569. while (value[j] == '"' || value[j] == "'" || blankChar[value[j]]) {j++;}
  9570. value = value.substr(0, j) + this.getUrl(value.substr(j));
  9571. }
  9572. }
  9573. // 转换 rpx
  9574. else if (value.includes('rpx'))
  9575. value = value.replace(/[0-9.]+\s*rpx/g, function ($) {return parseFloat($) * windowWidth / 750 + 'px';});else
  9576. if (key == 'white-space' && value.includes('pre') && !close)
  9577. this.pre = node.pre = true;
  9578. style += ";".concat(key, ":").concat(value);
  9579. }
  9580. style = style.substr(1);
  9581. if (style) attrs.style = style;
  9582. if (!close) {
  9583. node.children = [];
  9584. if (node.name == 'pre' && cfg.highlight) {
  9585. this.remove(node);
  9586. this.pre = node.pre = true;
  9587. }
  9588. this.siblings().push(node);
  9589. this.STACK.push(node);
  9590. } else if (!cfg.filter || cfg.filter(node, this) != false)
  9591. this.siblings().push(node);
  9592. } else {
  9593. if (!close) this.remove(node);else
  9594. if (node.name == 'source') {
  9595. var parent = this.parent();
  9596. if (parent && (parent.name == 'video' || parent.name == 'audio') && node.attrs.src)
  9597. parent.attrs.source.push(node.attrs.src);
  9598. } else if (node.name == 'base' && !this.domain) this.domain = node.attrs.href;
  9599. }
  9600. if (this.data[this.i] == '/') this.i++;
  9601. this.start = this.i + 1;
  9602. this.state = this.Text;
  9603. };
  9604. // 移除标签
  9605. MpHtmlParser.prototype.remove = function (node) {var _this2 = this;
  9606. var name = node.name,
  9607. j = this.i;
  9608. // 处理 svg
  9609. var handleSvg = function handleSvg() {
  9610. var src = _this2.data.substring(j, _this2.i + 1);
  9611. node.attrs.xmlns = 'http://www.w3.org/2000/svg';
  9612. for (var key in node.attrs) {
  9613. if (key == 'viewbox') src = " viewBox=\"".concat(node.attrs.viewbox, "\"") + src;else
  9614. if (key != 'style') src = " ".concat(key, "=\"").concat(node.attrs[key], "\"") + src;
  9615. }
  9616. src = '<svg' + src;
  9617. var parent = _this2.parent();
  9618. if (node.attrs.width == '100%' && parent && (parent.attrs.style || '').includes('inline'))
  9619. parent.attrs.style = 'width:300px;max-width:100%;' + parent.attrs.style;
  9620. _this2.siblings().push({
  9621. name: 'img',
  9622. attrs: {
  9623. src: 'data:image/svg+xml;utf8,' + src.replace(/#/g, '%23'),
  9624. style: node.attrs.style,
  9625. ignore: 'T' } });
  9626. };
  9627. if (node.name == 'svg' && this.data[j] == '/') return handleSvg(this.i++);
  9628. while (1) {
  9629. if ((this.i = this.data.indexOf('</', this.i + 1)) == -1) {
  9630. if (name == 'pre' || name == 'svg') this.i = j;else
  9631. this.i = this.data.length;
  9632. return;
  9633. }
  9634. this.start = this.i += 2;
  9635. while (!blankChar[this.data[this.i]] && !this.isClose()) {this.i++;}
  9636. if (this.section().toLowerCase() == name) {
  9637. // 代码块高亮
  9638. if (name == 'pre') {
  9639. this.data = this.data.substr(0, j + 1) + cfg.highlight(this.data.substring(j + 1, this.i - 5), node.attrs) + this.data.
  9640. substr(this.i - 5);
  9641. return this.i = j;
  9642. } else if (name == 'style')
  9643. this.CssHandler.getStyle(this.data.substring(j + 1, this.i - 7));else
  9644. if (name == 'title')
  9645. this.DOM.title = this.data.substring(j + 1, this.i - 7);
  9646. if ((this.i = this.data.indexOf('>', this.i)) == -1) this.i = this.data.length;
  9647. if (name == 'svg') handleSvg();
  9648. return;
  9649. }
  9650. }
  9651. };
  9652. // 节点出栈处理
  9653. MpHtmlParser.prototype.popNode = function (node) {
  9654. // 空白符处理
  9655. if (node.pre) {
  9656. node.pre = this.pre = void 0;
  9657. for (var i = this.STACK.length; i--;) {
  9658. if (this.STACK[i].pre)
  9659. this.pre = true;}
  9660. }
  9661. var siblings = this.siblings(),
  9662. len = siblings.length,
  9663. childs = node.children;
  9664. if (node.name == 'head' || cfg.filter && cfg.filter(node, this) == false)
  9665. return siblings.pop();
  9666. var attrs = node.attrs;
  9667. // 替换一些标签名
  9668. if (cfg.blockTags[node.name]) node.name = 'div';else
  9669. if (!cfg.trustTags[node.name]) node.name = 'span';
  9670. // 处理列表
  9671. if (node.c && (node.name == 'ul' || node.name == 'ol')) {
  9672. if ((node.attrs.style || '').includes('list-style:none')) {
  9673. for (var _i = 0, child; child = childs[_i++];) {
  9674. if (child.name == 'li')
  9675. child.name = 'div';}
  9676. } else if (node.name == 'ul') {
  9677. var floor = 1;
  9678. for (var _i2 = this.STACK.length; _i2--;) {
  9679. if (this.STACK[_i2].name == 'ul') floor++;}
  9680. if (floor != 1)
  9681. for (var _i3 = childs.length; _i3--;) {
  9682. childs[_i3].floor = floor;}
  9683. } else {
  9684. for (var _i4 = 0, num = 1, _child; _child = childs[_i4++];) {
  9685. if (_child.name == 'li') {
  9686. _child.type = 'ol';
  9687. _child.num = function (num, type) {
  9688. if (type == 'a') return String.fromCharCode(97 + (num - 1) % 26);
  9689. if (type == 'A') return String.fromCharCode(65 + (num - 1) % 26);
  9690. if (type == 'i' || type == 'I') {
  9691. num = (num - 1) % 99 + 1;
  9692. var one = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX'],
  9693. ten = ['X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC'],
  9694. res = (ten[Math.floor(num / 10) - 1] || '') + (one[num % 10 - 1] || '');
  9695. if (type == 'i') return res.toLowerCase();
  9696. return res;
  9697. }
  9698. return num;
  9699. }(num++, attrs.type) + '.';
  9700. }}
  9701. }
  9702. }
  9703. // 处理表格
  9704. if (node.name == 'table') {
  9705. var padding = parseFloat(attrs.cellpadding),
  9706. spacing = parseFloat(attrs.cellspacing),
  9707. border = parseFloat(attrs.border);
  9708. if (node.c) {
  9709. if (isNaN(padding)) padding = 2;
  9710. if (isNaN(spacing)) spacing = 2;
  9711. }
  9712. if (border) attrs.style = "border:".concat(border, "px solid gray;").concat(attrs.style || '');
  9713. if (node.flag && node.c) {
  9714. // 有 colspan 或 rowspan 且含有链接的表格转为 grid 布局实现
  9715. attrs.style = "".concat(attrs.style || '', ";").concat(spacing ? ";grid-gap:".concat(spacing, "px") : ';border-left:0;border-top:0');
  9716. var row = 1,
  9717. col = 1,
  9718. colNum,
  9719. trs = [],
  9720. children = [],
  9721. map = {};
  9722. (function f(ns) {
  9723. for (var i = 0; i < ns.length; i++) {
  9724. if (ns[i].name == 'tr') trs.push(ns[i]);else
  9725. f(ns[i].children || []);
  9726. }
  9727. })(node.children);
  9728. for (var _i5 = 0; _i5 < trs.length; _i5++) {
  9729. for (var j = 0, td; td = trs[_i5].children[j]; j++) {
  9730. if (td.name == 'td' || td.name == 'th') {
  9731. while (map[row + '.' + col]) {col++;}
  9732. var cell = {
  9733. name: 'div',
  9734. c: 1,
  9735. attrs: {
  9736. style: (td.attrs.style || '') + (border ? ";border:".concat(border, "px solid gray") + (spacing ? '' :
  9737. ';border-right:0;border-bottom:0') : '') + (padding ? ";padding:".concat(padding, "px") : '') },
  9738. children: td.children };
  9739. if (td.attrs.colspan) {
  9740. cell.attrs.style += ';grid-column-start:' + col + ';grid-column-end:' + (col + parseInt(td.attrs.colspan));
  9741. if (!td.attrs.rowspan) cell.attrs.style += ';grid-row-start:' + row + ';grid-row-end:' + (row + 1);
  9742. col += parseInt(td.attrs.colspan) - 1;
  9743. }
  9744. if (td.attrs.rowspan) {
  9745. cell.attrs.style += ';grid-row-start:' + row + ';grid-row-end:' + (row + parseInt(td.attrs.rowspan));
  9746. if (!td.attrs.colspan) cell.attrs.style += ';grid-column-start:' + col + ';grid-column-end:' + (col + 1);
  9747. for (var k = 1; k < td.attrs.rowspan; k++) {map[row + k + '.' + col] = 1;}
  9748. }
  9749. children.push(cell);
  9750. col++;
  9751. }
  9752. }
  9753. if (!colNum) {
  9754. colNum = col - 1;
  9755. attrs.style += ";grid-template-columns:repeat(".concat(colNum, ",auto)");
  9756. }
  9757. col = 1;
  9758. row++;
  9759. }
  9760. node.children = children;
  9761. } else {
  9762. attrs.style = "border-spacing:".concat(spacing, "px;").concat(attrs.style || '');
  9763. if (border || padding)
  9764. (function f(ns) {
  9765. for (var i = 0, n; n = ns[i]; i++) {
  9766. if (n.name == 'th' || n.name == 'td') {
  9767. if (border) n.attrs.style = "border:".concat(border, "px solid gray;").concat(n.attrs.style || '');
  9768. if (padding) n.attrs.style = "padding:".concat(padding, "px;").concat(n.attrs.style || '');
  9769. } else f(n.children || []);
  9770. }
  9771. })(childs);
  9772. }
  9773. if (this.options.autoscroll) {
  9774. var table = Object.assign({}, node);
  9775. node.name = 'div';
  9776. node.attrs = {
  9777. style: 'overflow:scroll' };
  9778. node.children = [table];
  9779. }
  9780. }
  9781. this.CssHandler.pop && this.CssHandler.pop(node);
  9782. // 自动压缩
  9783. if (node.name == 'div' && !Object.keys(attrs).length && childs.length == 1 && childs[0].name == 'div')
  9784. siblings[len - 1] = childs[0];
  9785. };
  9786. // 状态机
  9787. MpHtmlParser.prototype.Text = function (c) {
  9788. if (c == '<') {
  9789. var next = this.data[this.i + 1],
  9790. isLetter = function isLetter(c) {return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z';};
  9791. if (isLetter(next)) {
  9792. this.setText();
  9793. this.start = this.i + 1;
  9794. this.state = this.TagName;
  9795. } else if (next == '/') {
  9796. this.setText();
  9797. if (isLetter(this.data[++this.i + 1])) {
  9798. this.start = this.i + 1;
  9799. this.state = this.EndTag;
  9800. } else this.Comment();
  9801. } else if (next == '!' || next == '?') {
  9802. this.setText();
  9803. this.Comment();
  9804. }
  9805. }
  9806. };
  9807. MpHtmlParser.prototype.Comment = function () {
  9808. var key;
  9809. if (this.data.substring(this.i + 2, this.i + 4) == '--') key = '-->';else
  9810. if (this.data.substring(this.i + 2, this.i + 9) == '[CDATA[') key = ']]>';else
  9811. key = '>';
  9812. if ((this.i = this.data.indexOf(key, this.i + 2)) == -1) this.i = this.data.length;else
  9813. this.i += key.length - 1;
  9814. this.start = this.i + 1;
  9815. this.state = this.Text;
  9816. };
  9817. MpHtmlParser.prototype.TagName = function (c) {
  9818. if (blankChar[c]) {
  9819. this.tagName = this.section();
  9820. while (blankChar[this.data[this.i]]) {this.i++;}
  9821. if (this.isClose()) this.setNode();else
  9822. {
  9823. this.start = this.i;
  9824. this.state = this.AttrName;
  9825. }
  9826. } else if (this.isClose()) {
  9827. this.tagName = this.section();
  9828. this.setNode();
  9829. }
  9830. };
  9831. MpHtmlParser.prototype.AttrName = function (c) {
  9832. if (c == '=' || blankChar[c] || this.isClose()) {
  9833. this.attrName = this.section();
  9834. if (blankChar[c])
  9835. while (blankChar[this.data[++this.i]]) {;}
  9836. if (this.data[this.i] == '=') {
  9837. while (blankChar[this.data[++this.i]]) {;}
  9838. this.start = this.i--;
  9839. this.state = this.AttrValue;
  9840. } else this.setAttr();
  9841. }
  9842. };
  9843. MpHtmlParser.prototype.AttrValue = function (c) {
  9844. if (c == '"' || c == "'") {
  9845. this.start++;
  9846. if ((this.i = this.data.indexOf(c, this.i + 1)) == -1) return this.i = this.data.length;
  9847. this.attrVal = this.section();
  9848. this.i++;
  9849. } else {
  9850. for (; !blankChar[this.data[this.i]] && !this.isClose(); this.i++) {;}
  9851. this.attrVal = this.section();
  9852. }
  9853. this.setAttr();
  9854. };
  9855. MpHtmlParser.prototype.EndTag = function (c) {
  9856. if (blankChar[c] || c == '>' || c == '/') {
  9857. var name = this.section().toLowerCase();
  9858. for (var i = this.STACK.length; i--;) {
  9859. if (this.STACK[i].name == name) break;}
  9860. if (i != -1) {
  9861. var node;
  9862. while ((node = this.STACK.pop()).name != name) {this.popNode(node);}
  9863. this.popNode(node);
  9864. } else if (name == 'p' || name == 'br')
  9865. this.siblings().push({
  9866. name: name,
  9867. attrs: {} });
  9868. this.i = this.data.indexOf('>', this.i);
  9869. this.start = this.i + 1;
  9870. if (this.i == -1) this.i = this.data.length;else
  9871. this.state = this.Text;
  9872. }
  9873. };
  9874. module.exports = MpHtmlParser;
  9875. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  9876. /***/ }),
  9877. /***/ 312:
  9878. /*!***********************************************************************************************************!*\
  9879. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/components/u-parse/libs/config.js ***!
  9880. \***********************************************************************************************************/
  9881. /*! no static exports found */
  9882. /***/ (function(module, exports) {
  9883. /* 配置文件 */
  9884. var cfg = {
  9885. // 出错占位图
  9886. errorImg: null,
  9887. // 过滤器函数
  9888. filter: null,
  9889. // 代码高亮函数
  9890. highlight: null,
  9891. // 文本处理函数
  9892. onText: null,
  9893. // 实体编码列表
  9894. entities: {
  9895. quot: '"',
  9896. apos: "'",
  9897. semi: ';',
  9898. nbsp: '\xA0',
  9899. ensp: "\u2002",
  9900. emsp: "\u2003",
  9901. ndash: '–',
  9902. mdash: '—',
  9903. middot: '·',
  9904. lsquo: '‘',
  9905. rsquo: '’',
  9906. ldquo: '“',
  9907. rdquo: '”',
  9908. bull: '•',
  9909. hellip: '…' },
  9910. blankChar: makeMap(' ,\xA0,\t,\r,\n,\f'),
  9911. boolAttrs: makeMap('allowfullscreen,autoplay,autostart,controls,ignore,loop,muted'),
  9912. // 块级标签,将被转为 div
  9913. blockTags: makeMap('address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section'),
  9914. // 将被移除的标签
  9915. ignoreTags: makeMap('area,base,canvas,frame,iframe,input,link,map,meta,param,script,source,style,svg,textarea,title,track,wbr'),
  9916. // 只能被 rich-text 显示的标签
  9917. richOnlyTags: makeMap('a,colgroup,fieldset,legend'),
  9918. // 自闭合的标签
  9919. selfClosingTags: makeMap('area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr'),
  9920. // 信任的标签
  9921. 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'),
  9922. // 默认的标签样式
  9923. userAgentStyles: {
  9924. address: 'font-style:italic',
  9925. big: 'display:inline;font-size:1.2em',
  9926. blockquote: 'background-color:#f6f6f6;border-left:3px solid #dbdbdb;color:#6c6c6c;padding:5px 0 5px 10px',
  9927. caption: 'display:table-caption;text-align:center',
  9928. center: 'text-align:center',
  9929. cite: 'font-style:italic',
  9930. dd: 'margin-left:40px',
  9931. mark: 'background-color:yellow',
  9932. pre: 'font-family:monospace;white-space:pre;overflow:scroll',
  9933. s: 'text-decoration:line-through',
  9934. small: 'display:inline;font-size:0.8em',
  9935. u: 'text-decoration:underline' } };
  9936. function makeMap(str) {
  9937. var map = Object.create(null),
  9938. list = str.split(',');
  9939. for (var i = list.length; i--;) {
  9940. map[list[i]] = true;}
  9941. return map;
  9942. }
  9943. if (wx.canIUse('editor')) {
  9944. cfg.blockTags.pre = void 0;
  9945. cfg.ignoreTags.rp = true;
  9946. Object.assign(cfg.richOnlyTags, makeMap('bdi,bdo,caption,rt,ruby'));
  9947. Object.assign(cfg.trustTags, makeMap('bdi,bdo,caption,pre,rt,ruby'));
  9948. }
  9949. module.exports = cfg;
  9950. /***/ }),
  9951. /***/ 313:
  9952. /*!***************************************************************************************************************!*\
  9953. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/components/u-parse/libs/CssHandler.js ***!
  9954. \***************************************************************************************************************/
  9955. /*! no static exports found */
  9956. /***/ (function(module, exports, __webpack_require__) {
  9957. var cfg = __webpack_require__(/*! ./config.js */ 312),
  9958. isLetter = function isLetter(c) {return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z';};
  9959. function CssHandler(tagStyle) {
  9960. var styles = Object.assign(Object.create(null), cfg.userAgentStyles);
  9961. for (var item in tagStyle) {
  9962. styles[item] = (styles[item] ? styles[item] + ';' : '') + tagStyle[item];}
  9963. this.styles = styles;
  9964. }
  9965. CssHandler.prototype.getStyle = function (data) {
  9966. this.styles = new parser(data, this.styles).parse();
  9967. };
  9968. CssHandler.prototype.match = function (name, attrs) {
  9969. var tmp,matched = (tmp = this.styles[name]) ? tmp + ';' : '';
  9970. if (attrs.class) {
  9971. var items = attrs.class.split(' ');
  9972. for (var i = 0, item; item = items[i]; i++) {
  9973. if (tmp = this.styles['.' + item])
  9974. matched += tmp + ';';}
  9975. }
  9976. if (tmp = this.styles['#' + attrs.id])
  9977. matched += tmp + ';';
  9978. return matched;
  9979. };
  9980. module.exports = CssHandler;
  9981. function parser(data, init) {
  9982. this.data = data;
  9983. this.floor = 0;
  9984. this.i = 0;
  9985. this.list = [];
  9986. this.res = init;
  9987. this.state = this.Space;
  9988. }
  9989. parser.prototype.parse = function () {
  9990. for (var c; c = this.data[this.i]; this.i++) {
  9991. this.state(c);}
  9992. return this.res;
  9993. };
  9994. parser.prototype.section = function () {
  9995. return this.data.substring(this.start, this.i);
  9996. };
  9997. // 状态机
  9998. parser.prototype.Space = function (c) {
  9999. if (c == '.' || c == '#' || isLetter(c)) {
  10000. this.start = this.i;
  10001. this.state = this.Name;
  10002. } else if (c == '/' && this.data[this.i + 1] == '*')
  10003. this.Comment();else
  10004. if (!cfg.blankChar[c] && c != ';')
  10005. this.state = this.Ignore;
  10006. };
  10007. parser.prototype.Comment = function () {
  10008. this.i = this.data.indexOf('*/', this.i) + 1;
  10009. if (!this.i) this.i = this.data.length;
  10010. this.state = this.Space;
  10011. };
  10012. parser.prototype.Ignore = function (c) {
  10013. if (c == '{') this.floor++;else
  10014. if (c == '}' && ! --this.floor) {
  10015. this.list = [];
  10016. this.state = this.Space;
  10017. }
  10018. };
  10019. parser.prototype.Name = function (c) {
  10020. if (cfg.blankChar[c]) {
  10021. this.list.push(this.section());
  10022. this.state = this.NameSpace;
  10023. } else if (c == '{') {
  10024. this.list.push(this.section());
  10025. this.Content();
  10026. } else if (c == ',') {
  10027. this.list.push(this.section());
  10028. this.Comma();
  10029. } else if (!isLetter(c) && (c < '0' || c > '9') && c != '-' && c != '_')
  10030. this.state = this.Ignore;
  10031. };
  10032. parser.prototype.NameSpace = function (c) {
  10033. if (c == '{') this.Content();else
  10034. if (c == ',') this.Comma();else
  10035. if (!cfg.blankChar[c]) this.state = this.Ignore;
  10036. };
  10037. parser.prototype.Comma = function () {
  10038. while (cfg.blankChar[this.data[++this.i]]) {;}
  10039. if (this.data[this.i] == '{') this.Content();else
  10040. {
  10041. this.start = this.i--;
  10042. this.state = this.Name;
  10043. }
  10044. };
  10045. parser.prototype.Content = function () {
  10046. this.start = ++this.i;
  10047. if ((this.i = this.data.indexOf('}', this.i)) == -1) this.i = this.data.length;
  10048. var content = this.section();
  10049. for (var i = 0, item; item = this.list[i++];) {
  10050. if (this.res[item]) this.res[item] += ';' + content;else
  10051. this.res[item] = content;}
  10052. this.list = [];
  10053. this.state = this.Space;
  10054. };
  10055. /***/ }),
  10056. /***/ 32:
  10057. /*!***********************************************************************************************!*\
  10058. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/libs/function/trim.js ***!
  10059. \***********************************************************************************************/
  10060. /*! no static exports found */
  10061. /***/ (function(module, exports, __webpack_require__) {
  10062. "use strict";
  10063. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;function trim(str) {var pos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'both';
  10064. if (pos == 'both') {
  10065. return str.replace(/^\s+|\s+$/g, "");
  10066. } else if (pos == "left") {
  10067. return str.replace(/^\s*/, '');
  10068. } else if (pos == 'right') {
  10069. return str.replace(/(\s*$)/g, "");
  10070. } else if (pos == 'all') {
  10071. return str.replace(/\s+/g, "");
  10072. } else {
  10073. return str;
  10074. }
  10075. }var _default =
  10076. trim;exports.default = _default;
  10077. /***/ }),
  10078. /***/ 33:
  10079. /*!************************************************************************************************!*\
  10080. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/libs/function/toast.js ***!
  10081. \************************************************************************************************/
  10082. /*! no static exports found */
  10083. /***/ (function(module, exports, __webpack_require__) {
  10084. "use strict";
  10085. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;function toast(title) {var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1500;
  10086. uni.showToast({
  10087. title: title,
  10088. icon: 'none',
  10089. duration: duration });
  10090. }var _default =
  10091. toast;exports.default = _default;
  10092. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  10093. /***/ }),
  10094. /***/ 34:
  10095. /*!****************************************************************************************************!*\
  10096. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/libs/function/getParent.js ***!
  10097. \****************************************************************************************************/
  10098. /*! no static exports found */
  10099. /***/ (function(module, exports, __webpack_require__) {
  10100. "use strict";
  10101. Object.defineProperty(exports, "__esModule", { value: true });exports.default = getParent; // 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法
  10102. // this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx
  10103. function getParent(name, keys) {
  10104. var parent = this.$parent;
  10105. // 通过while历遍,这里主要是为了H5需要多层解析的问题
  10106. while (parent) {
  10107. // 父组件
  10108. if (parent.$options.name !== name) {
  10109. // 如果组件的name不相等,继续上一级寻找
  10110. parent = parent.$parent;
  10111. } else {var _ret = function () {
  10112. var data = {};
  10113. // 判断keys是否数组,如果传过来的是一个数组,那么直接使用数组元素值当做键值去父组件寻找
  10114. if (Array.isArray(keys)) {
  10115. keys.map(function (val) {
  10116. data[val] = parent[val] ? parent[val] : '';
  10117. });
  10118. } else {
  10119. // 历遍传过来的对象参数
  10120. for (var i in keys) {
  10121. // 如果子组件有此值则用,无此值则用父组件的值
  10122. // 判断是否空数组,如果是,则用父组件的值,否则用子组件的值
  10123. if (Array.isArray(keys[i])) {
  10124. if (keys[i].length) {
  10125. data[i] = keys[i];
  10126. } else {
  10127. data[i] = parent[i];
  10128. }
  10129. } else if (keys[i].constructor === Object) {
  10130. // 判断是否对象,如果是对象,且有属性,那么使用子组件的值,否则使用父组件的值
  10131. if (Object.keys(keys[i]).length) {
  10132. data[i] = keys[i];
  10133. } else {
  10134. data[i] = parent[i];
  10135. }
  10136. } else {
  10137. // 只要子组件有传值,即使是false值,也是“传值”了,也需要覆盖父组件的同名参数
  10138. data[i] = keys[i] || keys[i] === false ? keys[i] : parent[i];
  10139. }
  10140. }
  10141. }
  10142. return { v: data };}();if (typeof _ret === "object") return _ret.v;
  10143. }
  10144. }
  10145. return {};
  10146. }
  10147. /***/ }),
  10148. /***/ 342:
  10149. /*!******************************************************************************************************!*\
  10150. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/libs/util/async-validator.js ***!
  10151. \******************************************************************************************************/
  10152. /*! no static exports found */
  10153. /***/ (function(module, exports, __webpack_require__) {
  10154. "use strict";
  10155. /* WEBPACK VAR INJECTION */(function(process) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;function _extends() {
  10156. _extends = Object.assign || function (target) {
  10157. for (var i = 1; i < arguments.length; i++) {
  10158. var source = arguments[i];
  10159. for (var key in source) {
  10160. if (Object.prototype.hasOwnProperty.call(source, key)) {
  10161. target[key] = source[key];
  10162. }
  10163. }
  10164. }
  10165. return target;
  10166. };
  10167. return _extends.apply(this, arguments);
  10168. }
  10169. /* eslint no-console:0 */
  10170. var formatRegExp = /%[sdj%]/g;
  10171. var warning = function warning() {}; // don't print warning message when in production env or node runtime
  10172. if (typeof process !== 'undefined' && Object({"NODE_ENV":"development","VUE_APP_NAME":"uView UI已发布Sketch和Axure设计资源示例","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}) && "development" !== 'production' && typeof window !==
  10173. 'undefined' && typeof document !== 'undefined') {
  10174. warning = function warning(type, errors) {
  10175. if (typeof console !== 'undefined' && console.warn) {
  10176. if (errors.every(function (e) {
  10177. return typeof e === 'string';
  10178. })) {
  10179. console.warn(type, errors);
  10180. }
  10181. }
  10182. };
  10183. }
  10184. function convertFieldsError(errors) {
  10185. if (!errors || !errors.length) return null;
  10186. var fields = {};
  10187. errors.forEach(function (error) {
  10188. var field = error.field;
  10189. fields[field] = fields[field] || [];
  10190. fields[field].push(error);
  10191. });
  10192. return fields;
  10193. }
  10194. function format() {
  10195. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  10196. args[_key] = arguments[_key];
  10197. }
  10198. var i = 1;
  10199. var f = args[0];
  10200. var len = args.length;
  10201. if (typeof f === 'function') {
  10202. return f.apply(null, args.slice(1));
  10203. }
  10204. if (typeof f === 'string') {
  10205. var str = String(f).replace(formatRegExp, function (x) {
  10206. if (x === '%%') {
  10207. return '%';
  10208. }
  10209. if (i >= len) {
  10210. return x;
  10211. }
  10212. switch (x) {
  10213. case '%s':
  10214. return String(args[i++]);
  10215. case '%d':
  10216. return Number(args[i++]);
  10217. case '%j':
  10218. try {
  10219. return JSON.stringify(args[i++]);
  10220. } catch (_) {
  10221. return '[Circular]';
  10222. }
  10223. break;
  10224. default:
  10225. return x;}
  10226. });
  10227. for (var arg = args[i]; i < len; arg = args[++i]) {
  10228. str += " " + arg;
  10229. }
  10230. return str;
  10231. }
  10232. return f;
  10233. }
  10234. function isNativeStringType(type) {
  10235. return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'pattern';
  10236. }
  10237. function isEmptyValue(value, type) {
  10238. if (value === undefined || value === null) {
  10239. return true;
  10240. }
  10241. if (type === 'array' && Array.isArray(value) && !value.length) {
  10242. return true;
  10243. }
  10244. if (isNativeStringType(type) && typeof value === 'string' && !value) {
  10245. return true;
  10246. }
  10247. return false;
  10248. }
  10249. function asyncParallelArray(arr, func, callback) {
  10250. var results = [];
  10251. var total = 0;
  10252. var arrLength = arr.length;
  10253. function count(errors) {
  10254. results.push.apply(results, errors);
  10255. total++;
  10256. if (total === arrLength) {
  10257. callback(results);
  10258. }
  10259. }
  10260. arr.forEach(function (a) {
  10261. func(a, count);
  10262. });
  10263. }
  10264. function asyncSerialArray(arr, func, callback) {
  10265. var index = 0;
  10266. var arrLength = arr.length;
  10267. function next(errors) {
  10268. if (errors && errors.length) {
  10269. callback(errors);
  10270. return;
  10271. }
  10272. var original = index;
  10273. index = index + 1;
  10274. if (original < arrLength) {
  10275. func(arr[original], next);
  10276. } else {
  10277. callback([]);
  10278. }
  10279. }
  10280. next([]);
  10281. }
  10282. function flattenObjArr(objArr) {
  10283. var ret = [];
  10284. Object.keys(objArr).forEach(function (k) {
  10285. ret.push.apply(ret, objArr[k]);
  10286. });
  10287. return ret;
  10288. }
  10289. function asyncMap(objArr, option, func, callback) {
  10290. if (option.first) {
  10291. var _pending = new Promise(function (resolve, reject) {
  10292. var next = function next(errors) {
  10293. callback(errors);
  10294. return errors.length ? reject({
  10295. errors: errors,
  10296. fields: convertFieldsError(errors) }) :
  10297. resolve();
  10298. };
  10299. var flattenArr = flattenObjArr(objArr);
  10300. asyncSerialArray(flattenArr, func, next);
  10301. });
  10302. _pending["catch"](function (e) {
  10303. return e;
  10304. });
  10305. return _pending;
  10306. }
  10307. var firstFields = option.firstFields || [];
  10308. if (firstFields === true) {
  10309. firstFields = Object.keys(objArr);
  10310. }
  10311. var objArrKeys = Object.keys(objArr);
  10312. var objArrLength = objArrKeys.length;
  10313. var total = 0;
  10314. var results = [];
  10315. var pending = new Promise(function (resolve, reject) {
  10316. var next = function next(errors) {
  10317. results.push.apply(results, errors);
  10318. total++;
  10319. if (total === objArrLength) {
  10320. callback(results);
  10321. return results.length ? reject({
  10322. errors: results,
  10323. fields: convertFieldsError(results) }) :
  10324. resolve();
  10325. }
  10326. };
  10327. if (!objArrKeys.length) {
  10328. callback(results);
  10329. resolve();
  10330. }
  10331. objArrKeys.forEach(function (key) {
  10332. var arr = objArr[key];
  10333. if (firstFields.indexOf(key) !== -1) {
  10334. asyncSerialArray(arr, func, next);
  10335. } else {
  10336. asyncParallelArray(arr, func, next);
  10337. }
  10338. });
  10339. });
  10340. pending["catch"](function (e) {
  10341. return e;
  10342. });
  10343. return pending;
  10344. }
  10345. function complementError(rule) {
  10346. return function (oe) {
  10347. if (oe && oe.message) {
  10348. oe.field = oe.field || rule.fullField;
  10349. return oe;
  10350. }
  10351. return {
  10352. message: typeof oe === 'function' ? oe() : oe,
  10353. field: oe.field || rule.fullField };
  10354. };
  10355. }
  10356. function deepMerge(target, source) {
  10357. if (source) {
  10358. for (var s in source) {
  10359. if (source.hasOwnProperty(s)) {
  10360. var value = source[s];
  10361. if (typeof value === 'object' && typeof target[s] === 'object') {
  10362. target[s] = _extends({}, target[s], {}, value);
  10363. } else {
  10364. target[s] = value;
  10365. }
  10366. }
  10367. }
  10368. }
  10369. return target;
  10370. }
  10371. /**
  10372. * Rule for validating required fields.
  10373. *
  10374. * @param rule The validation rule.
  10375. * @param value The value of the field on the source object.
  10376. * @param source The source object being validated.
  10377. * @param errors An array of errors that this rule may add
  10378. * validation errors to.
  10379. * @param options The validation options.
  10380. * @param options.messages The validation messages.
  10381. */
  10382. function required(rule, value, source, errors, options, type) {
  10383. if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) {
  10384. errors.push(format(options.messages.required, rule.fullField));
  10385. }
  10386. }
  10387. /**
  10388. * Rule for validating whitespace.
  10389. *
  10390. * @param rule The validation rule.
  10391. * @param value The value of the field on the source object.
  10392. * @param source The source object being validated.
  10393. * @param errors An array of errors that this rule may add
  10394. * validation errors to.
  10395. * @param options The validation options.
  10396. * @param options.messages The validation messages.
  10397. */
  10398. function whitespace(rule, value, source, errors, options) {
  10399. if (/^\s+$/.test(value) || value === '') {
  10400. errors.push(format(options.messages.whitespace, rule.fullField));
  10401. }
  10402. }
  10403. /* eslint max-len:0 */
  10404. var pattern = {
  10405. // http://emailregex.com/
  10406. email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
  10407. url: new RegExp(
  10408. "^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$",
  10409. 'i'),
  10410. hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i };
  10411. var types = {
  10412. integer: function integer(value) {
  10413. return types.number(value) && parseInt(value, 10) === value;
  10414. },
  10415. "float": function float(value) {
  10416. return types.number(value) && !types.integer(value);
  10417. },
  10418. array: function array(value) {
  10419. return Array.isArray(value);
  10420. },
  10421. regexp: function regexp(value) {
  10422. if (value instanceof RegExp) {
  10423. return true;
  10424. }
  10425. try {
  10426. return !!new RegExp(value);
  10427. } catch (e) {
  10428. return false;
  10429. }
  10430. },
  10431. date: function date(value) {
  10432. return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear ===
  10433. 'function';
  10434. },
  10435. number: function number(value) {
  10436. if (isNaN(value)) {
  10437. return false;
  10438. }
  10439. // 修改源码,将字符串数值先转为数值
  10440. return typeof +value === 'number';
  10441. },
  10442. object: function object(value) {
  10443. return typeof value === 'object' && !types.array(value);
  10444. },
  10445. method: function method(value) {
  10446. return typeof value === 'function';
  10447. },
  10448. email: function email(value) {
  10449. return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255;
  10450. },
  10451. url: function url(value) {
  10452. return typeof value === 'string' && !!value.match(pattern.url);
  10453. },
  10454. hex: function hex(value) {
  10455. return typeof value === 'string' && !!value.match(pattern.hex);
  10456. } };
  10457. /**
  10458. * Rule for validating the type of a value.
  10459. *
  10460. * @param rule The validation rule.
  10461. * @param value The value of the field on the source object.
  10462. * @param source The source object being validated.
  10463. * @param errors An array of errors that this rule may add
  10464. * validation errors to.
  10465. * @param options The validation options.
  10466. * @param options.messages The validation messages.
  10467. */
  10468. function type(rule, value, source, errors, options) {
  10469. if (rule.required && value === undefined) {
  10470. required(rule, value, source, errors, options);
  10471. return;
  10472. }
  10473. var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'];
  10474. var ruleType = rule.type;
  10475. if (custom.indexOf(ruleType) > -1) {
  10476. if (!types[ruleType](value)) {
  10477. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  10478. } // straight typeof check
  10479. } else if (ruleType && typeof value !== rule.type) {
  10480. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  10481. }
  10482. }
  10483. /**
  10484. * Rule for validating minimum and maximum allowed values.
  10485. *
  10486. * @param rule The validation rule.
  10487. * @param value The value of the field on the source object.
  10488. * @param source The source object being validated.
  10489. * @param errors An array of errors that this rule may add
  10490. * validation errors to.
  10491. * @param options The validation options.
  10492. * @param options.messages The validation messages.
  10493. */
  10494. function range(rule, value, source, errors, options) {
  10495. var len = typeof rule.len === 'number';
  10496. var min = typeof rule.min === 'number';
  10497. var max = typeof rule.max === 'number'; // 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane)
  10498. var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  10499. var val = value;
  10500. var key = null;
  10501. var num = typeof value === 'number';
  10502. var str = typeof value === 'string';
  10503. var arr = Array.isArray(value);
  10504. if (num) {
  10505. key = 'number';
  10506. } else if (str) {
  10507. key = 'string';
  10508. } else if (arr) {
  10509. key = 'array';
  10510. } // if the value is not of a supported type for range validation
  10511. // the validation rule rule should use the
  10512. // type property to also test for a particular type
  10513. if (!key) {
  10514. return false;
  10515. }
  10516. if (arr) {
  10517. val = value.length;
  10518. }
  10519. if (str) {
  10520. // 处理码点大于U+010000的文字length属性不准确的bug,如"𠮷𠮷𠮷".lenght !== 3
  10521. val = value.replace(spRegexp, '_').length;
  10522. }
  10523. if (len) {
  10524. if (val !== rule.len) {
  10525. errors.push(format(options.messages[key].len, rule.fullField, rule.len));
  10526. }
  10527. } else if (min && !max && val < rule.min) {
  10528. errors.push(format(options.messages[key].min, rule.fullField, rule.min));
  10529. } else if (max && !min && val > rule.max) {
  10530. errors.push(format(options.messages[key].max, rule.fullField, rule.max));
  10531. } else if (min && max && (val < rule.min || val > rule.max)) {
  10532. errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
  10533. }
  10534. }
  10535. var ENUM = 'enum';
  10536. /**
  10537. * Rule for validating a value exists in an enumerable list.
  10538. *
  10539. * @param rule The validation rule.
  10540. * @param value The value of the field on the source object.
  10541. * @param source The source object being validated.
  10542. * @param errors An array of errors that this rule may add
  10543. * validation errors to.
  10544. * @param options The validation options.
  10545. * @param options.messages The validation messages.
  10546. */
  10547. function enumerable(rule, value, source, errors, options) {
  10548. rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
  10549. if (rule[ENUM].indexOf(value) === -1) {
  10550. errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', ')));
  10551. }
  10552. }
  10553. /**
  10554. * Rule for validating a regular expression pattern.
  10555. *
  10556. * @param rule The validation rule.
  10557. * @param value The value of the field on the source object.
  10558. * @param source The source object being validated.
  10559. * @param errors An array of errors that this rule may add
  10560. * validation errors to.
  10561. * @param options The validation options.
  10562. * @param options.messages The validation messages.
  10563. */
  10564. function pattern$1(rule, value, source, errors, options) {
  10565. if (rule.pattern) {
  10566. if (rule.pattern instanceof RegExp) {
  10567. // if a RegExp instance is passed, reset `lastIndex` in case its `global`
  10568. // flag is accidentally set to `true`, which in a validation scenario
  10569. // is not necessary and the result might be misleading
  10570. rule.pattern.lastIndex = 0;
  10571. if (!rule.pattern.test(value)) {
  10572. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  10573. }
  10574. } else if (typeof rule.pattern === 'string') {
  10575. var _pattern = new RegExp(rule.pattern);
  10576. if (!_pattern.test(value)) {
  10577. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  10578. }
  10579. }
  10580. }
  10581. }
  10582. var rules = {
  10583. required: required,
  10584. whitespace: whitespace,
  10585. type: type,
  10586. range: range,
  10587. "enum": enumerable,
  10588. pattern: pattern$1 };
  10589. /**
  10590. * Performs validation for string types.
  10591. *
  10592. * @param rule The validation rule.
  10593. * @param value The value of the field on the source object.
  10594. * @param callback The callback function.
  10595. * @param source The source object being validated.
  10596. * @param options The validation options.
  10597. * @param options.messages The validation messages.
  10598. */
  10599. function string(rule, value, callback, source, options) {
  10600. var errors = [];
  10601. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10602. if (validate) {
  10603. if (isEmptyValue(value, 'string') && !rule.required) {
  10604. return callback();
  10605. }
  10606. rules.required(rule, value, source, errors, options, 'string');
  10607. if (!isEmptyValue(value, 'string')) {
  10608. rules.type(rule, value, source, errors, options);
  10609. rules.range(rule, value, source, errors, options);
  10610. rules.pattern(rule, value, source, errors, options);
  10611. if (rule.whitespace === true) {
  10612. rules.whitespace(rule, value, source, errors, options);
  10613. }
  10614. }
  10615. }
  10616. callback(errors);
  10617. }
  10618. /**
  10619. * Validates a function.
  10620. *
  10621. * @param rule The validation rule.
  10622. * @param value The value of the field on the source object.
  10623. * @param callback The callback function.
  10624. * @param source The source object being validated.
  10625. * @param options The validation options.
  10626. * @param options.messages The validation messages.
  10627. */
  10628. function method(rule, value, callback, source, options) {
  10629. var errors = [];
  10630. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10631. if (validate) {
  10632. if (isEmptyValue(value) && !rule.required) {
  10633. return callback();
  10634. }
  10635. rules.required(rule, value, source, errors, options);
  10636. if (value !== undefined) {
  10637. rules.type(rule, value, source, errors, options);
  10638. }
  10639. }
  10640. callback(errors);
  10641. }
  10642. /**
  10643. * Validates a number.
  10644. *
  10645. * @param rule The validation rule.
  10646. * @param value The value of the field on the source object.
  10647. * @param callback The callback function.
  10648. * @param source The source object being validated.
  10649. * @param options The validation options.
  10650. * @param options.messages The validation messages.
  10651. */
  10652. function number(rule, value, callback, source, options) {
  10653. var errors = [];
  10654. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10655. if (validate) {
  10656. if (value === '') {
  10657. value = undefined;
  10658. }
  10659. if (isEmptyValue(value) && !rule.required) {
  10660. return callback();
  10661. }
  10662. rules.required(rule, value, source, errors, options);
  10663. if (value !== undefined) {
  10664. rules.type(rule, value, source, errors, options);
  10665. rules.range(rule, value, source, errors, options);
  10666. }
  10667. }
  10668. callback(errors);
  10669. }
  10670. /**
  10671. * Validates a boolean.
  10672. *
  10673. * @param rule The validation rule.
  10674. * @param value The value of the field on the source object.
  10675. * @param callback The callback function.
  10676. * @param source The source object being validated.
  10677. * @param options The validation options.
  10678. * @param options.messages The validation messages.
  10679. */
  10680. function _boolean(rule, value, callback, source, options) {
  10681. var errors = [];
  10682. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10683. if (validate) {
  10684. if (isEmptyValue(value) && !rule.required) {
  10685. return callback();
  10686. }
  10687. rules.required(rule, value, source, errors, options);
  10688. if (value !== undefined) {
  10689. rules.type(rule, value, source, errors, options);
  10690. }
  10691. }
  10692. callback(errors);
  10693. }
  10694. /**
  10695. * Validates the regular expression type.
  10696. *
  10697. * @param rule The validation rule.
  10698. * @param value The value of the field on the source object.
  10699. * @param callback The callback function.
  10700. * @param source The source object being validated.
  10701. * @param options The validation options.
  10702. * @param options.messages The validation messages.
  10703. */
  10704. function regexp(rule, value, callback, source, options) {
  10705. var errors = [];
  10706. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10707. if (validate) {
  10708. if (isEmptyValue(value) && !rule.required) {
  10709. return callback();
  10710. }
  10711. rules.required(rule, value, source, errors, options);
  10712. if (!isEmptyValue(value)) {
  10713. rules.type(rule, value, source, errors, options);
  10714. }
  10715. }
  10716. callback(errors);
  10717. }
  10718. /**
  10719. * Validates a number is an integer.
  10720. *
  10721. * @param rule The validation rule.
  10722. * @param value The value of the field on the source object.
  10723. * @param callback The callback function.
  10724. * @param source The source object being validated.
  10725. * @param options The validation options.
  10726. * @param options.messages The validation messages.
  10727. */
  10728. function integer(rule, value, callback, source, options) {
  10729. var errors = [];
  10730. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10731. if (validate) {
  10732. if (isEmptyValue(value) && !rule.required) {
  10733. return callback();
  10734. }
  10735. rules.required(rule, value, source, errors, options);
  10736. if (value !== undefined) {
  10737. rules.type(rule, value, source, errors, options);
  10738. rules.range(rule, value, source, errors, options);
  10739. }
  10740. }
  10741. callback(errors);
  10742. }
  10743. /**
  10744. * Validates a number is a floating point number.
  10745. *
  10746. * @param rule The validation rule.
  10747. * @param value The value of the field on the source object.
  10748. * @param callback The callback function.
  10749. * @param source The source object being validated.
  10750. * @param options The validation options.
  10751. * @param options.messages The validation messages.
  10752. */
  10753. function floatFn(rule, value, callback, source, options) {
  10754. var errors = [];
  10755. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10756. if (validate) {
  10757. if (isEmptyValue(value) && !rule.required) {
  10758. return callback();
  10759. }
  10760. rules.required(rule, value, source, errors, options);
  10761. if (value !== undefined) {
  10762. rules.type(rule, value, source, errors, options);
  10763. rules.range(rule, value, source, errors, options);
  10764. }
  10765. }
  10766. callback(errors);
  10767. }
  10768. /**
  10769. * Validates an array.
  10770. *
  10771. * @param rule The validation rule.
  10772. * @param value The value of the field on the source object.
  10773. * @param callback The callback function.
  10774. * @param source The source object being validated.
  10775. * @param options The validation options.
  10776. * @param options.messages The validation messages.
  10777. */
  10778. function array(rule, value, callback, source, options) {
  10779. var errors = [];
  10780. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10781. if (validate) {
  10782. if (isEmptyValue(value, 'array') && !rule.required) {
  10783. return callback();
  10784. }
  10785. rules.required(rule, value, source, errors, options, 'array');
  10786. if (!isEmptyValue(value, 'array')) {
  10787. rules.type(rule, value, source, errors, options);
  10788. rules.range(rule, value, source, errors, options);
  10789. }
  10790. }
  10791. callback(errors);
  10792. }
  10793. /**
  10794. * Validates an object.
  10795. *
  10796. * @param rule The validation rule.
  10797. * @param value The value of the field on the source object.
  10798. * @param callback The callback function.
  10799. * @param source The source object being validated.
  10800. * @param options The validation options.
  10801. * @param options.messages The validation messages.
  10802. */
  10803. function object(rule, value, callback, source, options) {
  10804. var errors = [];
  10805. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10806. if (validate) {
  10807. if (isEmptyValue(value) && !rule.required) {
  10808. return callback();
  10809. }
  10810. rules.required(rule, value, source, errors, options);
  10811. if (value !== undefined) {
  10812. rules.type(rule, value, source, errors, options);
  10813. }
  10814. }
  10815. callback(errors);
  10816. }
  10817. var ENUM$1 = 'enum';
  10818. /**
  10819. * Validates an enumerable list.
  10820. *
  10821. * @param rule The validation rule.
  10822. * @param value The value of the field on the source object.
  10823. * @param callback The callback function.
  10824. * @param source The source object being validated.
  10825. * @param options The validation options.
  10826. * @param options.messages The validation messages.
  10827. */
  10828. function enumerable$1(rule, value, callback, source, options) {
  10829. var errors = [];
  10830. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10831. if (validate) {
  10832. if (isEmptyValue(value) && !rule.required) {
  10833. return callback();
  10834. }
  10835. rules.required(rule, value, source, errors, options);
  10836. if (value !== undefined) {
  10837. rules[ENUM$1](rule, value, source, errors, options);
  10838. }
  10839. }
  10840. callback(errors);
  10841. }
  10842. /**
  10843. * Validates a regular expression pattern.
  10844. *
  10845. * Performs validation when a rule only contains
  10846. * a pattern property but is not declared as a string type.
  10847. *
  10848. * @param rule The validation rule.
  10849. * @param value The value of the field on the source object.
  10850. * @param callback The callback function.
  10851. * @param source The source object being validated.
  10852. * @param options The validation options.
  10853. * @param options.messages The validation messages.
  10854. */
  10855. function pattern$2(rule, value, callback, source, options) {
  10856. var errors = [];
  10857. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10858. if (validate) {
  10859. if (isEmptyValue(value, 'string') && !rule.required) {
  10860. return callback();
  10861. }
  10862. rules.required(rule, value, source, errors, options);
  10863. if (!isEmptyValue(value, 'string')) {
  10864. rules.pattern(rule, value, source, errors, options);
  10865. }
  10866. }
  10867. callback(errors);
  10868. }
  10869. function date(rule, value, callback, source, options) {
  10870. var errors = [];
  10871. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10872. if (validate) {
  10873. if (isEmptyValue(value) && !rule.required) {
  10874. return callback();
  10875. }
  10876. rules.required(rule, value, source, errors, options);
  10877. if (!isEmptyValue(value)) {
  10878. var dateObject;
  10879. if (typeof value === 'number') {
  10880. dateObject = new Date(value);
  10881. } else {
  10882. dateObject = value;
  10883. }
  10884. rules.type(rule, dateObject, source, errors, options);
  10885. if (dateObject) {
  10886. rules.range(rule, dateObject.getTime(), source, errors, options);
  10887. }
  10888. }
  10889. }
  10890. callback(errors);
  10891. }
  10892. function required$1(rule, value, callback, source, options) {
  10893. var errors = [];
  10894. var type = Array.isArray(value) ? 'array' : typeof value;
  10895. rules.required(rule, value, source, errors, options, type);
  10896. callback(errors);
  10897. }
  10898. function type$1(rule, value, callback, source, options) {
  10899. var ruleType = rule.type;
  10900. var errors = [];
  10901. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10902. if (validate) {
  10903. if (isEmptyValue(value, ruleType) && !rule.required) {
  10904. return callback();
  10905. }
  10906. rules.required(rule, value, source, errors, options, ruleType);
  10907. if (!isEmptyValue(value, ruleType)) {
  10908. rules.type(rule, value, source, errors, options);
  10909. }
  10910. }
  10911. callback(errors);
  10912. }
  10913. /**
  10914. * Performs validation for any type.
  10915. *
  10916. * @param rule The validation rule.
  10917. * @param value The value of the field on the source object.
  10918. * @param callback The callback function.
  10919. * @param source The source object being validated.
  10920. * @param options The validation options.
  10921. * @param options.messages The validation messages.
  10922. */
  10923. function any(rule, value, callback, source, options) {
  10924. var errors = [];
  10925. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  10926. if (validate) {
  10927. if (isEmptyValue(value) && !rule.required) {
  10928. return callback();
  10929. }
  10930. rules.required(rule, value, source, errors, options);
  10931. }
  10932. callback(errors);
  10933. }
  10934. var validators = {
  10935. string: string,
  10936. method: method,
  10937. number: number,
  10938. "boolean": _boolean,
  10939. regexp: regexp,
  10940. integer: integer,
  10941. "float": floatFn,
  10942. array: array,
  10943. object: object,
  10944. "enum": enumerable$1,
  10945. pattern: pattern$2,
  10946. date: date,
  10947. url: type$1,
  10948. hex: type$1,
  10949. email: type$1,
  10950. required: required$1,
  10951. any: any };
  10952. function newMessages() {
  10953. return {
  10954. "default": 'Validation error on field %s',
  10955. required: '%s is required',
  10956. "enum": '%s must be one of %s',
  10957. whitespace: '%s cannot be empty',
  10958. date: {
  10959. format: '%s date %s is invalid for format %s',
  10960. parse: '%s date could not be parsed, %s is invalid ',
  10961. invalid: '%s date %s is invalid' },
  10962. types: {
  10963. string: '%s is not a %s',
  10964. method: '%s is not a %s (function)',
  10965. array: '%s is not an %s',
  10966. object: '%s is not an %s',
  10967. number: '%s is not a %s',
  10968. date: '%s is not a %s',
  10969. "boolean": '%s is not a %s',
  10970. integer: '%s is not an %s',
  10971. "float": '%s is not a %s',
  10972. regexp: '%s is not a valid %s',
  10973. email: '%s is not a valid %s',
  10974. url: '%s is not a valid %s',
  10975. hex: '%s is not a valid %s' },
  10976. string: {
  10977. len: '%s must be exactly %s characters',
  10978. min: '%s must be at least %s characters',
  10979. max: '%s cannot be longer than %s characters',
  10980. range: '%s must be between %s and %s characters' },
  10981. number: {
  10982. len: '%s must equal %s',
  10983. min: '%s cannot be less than %s',
  10984. max: '%s cannot be greater than %s',
  10985. range: '%s must be between %s and %s' },
  10986. array: {
  10987. len: '%s must be exactly %s in length',
  10988. min: '%s cannot be less than %s in length',
  10989. max: '%s cannot be greater than %s in length',
  10990. range: '%s must be between %s and %s in length' },
  10991. pattern: {
  10992. mismatch: '%s value %s does not match pattern %s' },
  10993. clone: function clone() {
  10994. var cloned = JSON.parse(JSON.stringify(this));
  10995. cloned.clone = this.clone;
  10996. return cloned;
  10997. } };
  10998. }
  10999. var messages = newMessages();
  11000. /**
  11001. * Encapsulates a validation schema.
  11002. *
  11003. * @param descriptor An object declaring validation rules
  11004. * for this schema.
  11005. */
  11006. function Schema(descriptor) {
  11007. this.rules = null;
  11008. this._messages = messages;
  11009. this.define(descriptor);
  11010. }
  11011. Schema.prototype = {
  11012. messages: function messages(_messages) {
  11013. if (_messages) {
  11014. this._messages = deepMerge(newMessages(), _messages);
  11015. }
  11016. return this._messages;
  11017. },
  11018. define: function define(rules) {
  11019. if (!rules) {
  11020. throw new Error('Cannot configure a schema with no rules');
  11021. }
  11022. if (typeof rules !== 'object' || Array.isArray(rules)) {
  11023. throw new Error('Rules must be an object');
  11024. }
  11025. this.rules = {};
  11026. var z;
  11027. var item;
  11028. for (z in rules) {
  11029. if (rules.hasOwnProperty(z)) {
  11030. item = rules[z];
  11031. this.rules[z] = Array.isArray(item) ? item : [item];
  11032. }
  11033. }
  11034. },
  11035. validate: function validate(source_, o, oc) {
  11036. var _this = this;
  11037. if (o === void 0) {
  11038. o = {};
  11039. }
  11040. if (oc === void 0) {
  11041. oc = function oc() {};
  11042. }
  11043. var source = source_;
  11044. var options = o;
  11045. var callback = oc;
  11046. if (typeof options === 'function') {
  11047. callback = options;
  11048. options = {};
  11049. }
  11050. if (!this.rules || Object.keys(this.rules).length === 0) {
  11051. if (callback) {
  11052. callback();
  11053. }
  11054. return Promise.resolve();
  11055. }
  11056. function complete(results) {
  11057. var i;
  11058. var errors = [];
  11059. var fields = {};
  11060. function add(e) {
  11061. if (Array.isArray(e)) {
  11062. var _errors;
  11063. errors = (_errors = errors).concat.apply(_errors, e);
  11064. } else {
  11065. errors.push(e);
  11066. }
  11067. }
  11068. for (i = 0; i < results.length; i++) {
  11069. add(results[i]);
  11070. }
  11071. if (!errors.length) {
  11072. errors = null;
  11073. fields = null;
  11074. } else {
  11075. fields = convertFieldsError(errors);
  11076. }
  11077. callback(errors, fields);
  11078. }
  11079. if (options.messages) {
  11080. var messages$1 = this.messages();
  11081. if (messages$1 === messages) {
  11082. messages$1 = newMessages();
  11083. }
  11084. deepMerge(messages$1, options.messages);
  11085. options.messages = messages$1;
  11086. } else {
  11087. options.messages = this.messages();
  11088. }
  11089. var arr;
  11090. var value;
  11091. var series = {};
  11092. var keys = options.keys || Object.keys(this.rules);
  11093. keys.forEach(function (z) {
  11094. arr = _this.rules[z];
  11095. value = source[z];
  11096. arr.forEach(function (r) {
  11097. var rule = r;
  11098. if (typeof rule.transform === 'function') {
  11099. if (source === source_) {
  11100. source = _extends({}, source);
  11101. }
  11102. value = source[z] = rule.transform(value);
  11103. }
  11104. if (typeof rule === 'function') {
  11105. rule = {
  11106. validator: rule };
  11107. } else {
  11108. rule = _extends({}, rule);
  11109. }
  11110. rule.validator = _this.getValidationMethod(rule);
  11111. rule.field = z;
  11112. rule.fullField = rule.fullField || z;
  11113. rule.type = _this.getType(rule);
  11114. if (!rule.validator) {
  11115. return;
  11116. }
  11117. series[z] = series[z] || [];
  11118. series[z].push({
  11119. rule: rule,
  11120. value: value,
  11121. source: source,
  11122. field: z });
  11123. });
  11124. });
  11125. var errorFields = {};
  11126. return asyncMap(series, options, function (data, doIt) {
  11127. var rule = data.rule;
  11128. var deep = (rule.type === 'object' || rule.type === 'array') && (typeof rule.fields === 'object' || typeof rule.defaultField ===
  11129. 'object');
  11130. deep = deep && (rule.required || !rule.required && data.value);
  11131. rule.field = data.field;
  11132. function addFullfield(key, schema) {
  11133. return _extends({}, schema, {
  11134. fullField: rule.fullField + "." + key });
  11135. }
  11136. function cb(e) {
  11137. if (e === void 0) {
  11138. e = [];
  11139. }
  11140. var errors = e;
  11141. if (!Array.isArray(errors)) {
  11142. errors = [errors];
  11143. }
  11144. if (!options.suppressWarning && errors.length) {
  11145. Schema.warning('async-validator:', errors);
  11146. }
  11147. if (errors.length && rule.message) {
  11148. errors = [].concat(rule.message);
  11149. }
  11150. errors = errors.map(complementError(rule));
  11151. if (options.first && errors.length) {
  11152. errorFields[rule.field] = 1;
  11153. return doIt(errors);
  11154. }
  11155. if (!deep) {
  11156. doIt(errors);
  11157. } else {
  11158. // if rule is required but the target object
  11159. // does not exist fail at the rule level and don't
  11160. // go deeper
  11161. if (rule.required && !data.value) {
  11162. if (rule.message) {
  11163. errors = [].concat(rule.message).map(complementError(rule));
  11164. } else if (options.error) {
  11165. errors = [options.error(rule, format(options.messages.required, rule.field))];
  11166. } else {
  11167. errors = [];
  11168. }
  11169. return doIt(errors);
  11170. }
  11171. var fieldsSchema = {};
  11172. if (rule.defaultField) {
  11173. for (var k in data.value) {
  11174. if (data.value.hasOwnProperty(k)) {
  11175. fieldsSchema[k] = rule.defaultField;
  11176. }
  11177. }
  11178. }
  11179. fieldsSchema = _extends({}, fieldsSchema, {}, data.rule.fields);
  11180. for (var f in fieldsSchema) {
  11181. if (fieldsSchema.hasOwnProperty(f)) {
  11182. var fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]];
  11183. fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));
  11184. }
  11185. }
  11186. var schema = new Schema(fieldsSchema);
  11187. schema.messages(options.messages);
  11188. if (data.rule.options) {
  11189. data.rule.options.messages = options.messages;
  11190. data.rule.options.error = options.error;
  11191. }
  11192. schema.validate(data.value, data.rule.options || options, function (errs) {
  11193. var finalErrors = [];
  11194. if (errors && errors.length) {
  11195. finalErrors.push.apply(finalErrors, errors);
  11196. }
  11197. if (errs && errs.length) {
  11198. finalErrors.push.apply(finalErrors, errs);
  11199. }
  11200. doIt(finalErrors.length ? finalErrors : null);
  11201. });
  11202. }
  11203. }
  11204. var res;
  11205. if (rule.asyncValidator) {
  11206. res = rule.asyncValidator(rule, data.value, cb, data.source, options);
  11207. } else if (rule.validator) {
  11208. res = rule.validator(rule, data.value, cb, data.source, options);
  11209. if (res === true) {
  11210. cb();
  11211. } else if (res === false) {
  11212. cb(rule.message || rule.field + " fails");
  11213. } else if (res instanceof Array) {
  11214. cb(res);
  11215. } else if (res instanceof Error) {
  11216. cb(res.message);
  11217. }
  11218. }
  11219. if (res && res.then) {
  11220. res.then(function () {
  11221. return cb();
  11222. }, function (e) {
  11223. return cb(e);
  11224. });
  11225. }
  11226. }, function (results) {
  11227. complete(results);
  11228. });
  11229. },
  11230. getType: function getType(rule) {
  11231. if (rule.type === undefined && rule.pattern instanceof RegExp) {
  11232. rule.type = 'pattern';
  11233. }
  11234. if (typeof rule.validator !== 'function' && rule.type && !validators.hasOwnProperty(rule.type)) {
  11235. throw new Error(format('Unknown rule type %s', rule.type));
  11236. }
  11237. return rule.type || 'string';
  11238. },
  11239. getValidationMethod: function getValidationMethod(rule) {
  11240. if (typeof rule.validator === 'function') {
  11241. return rule.validator;
  11242. }
  11243. var keys = Object.keys(rule);
  11244. var messageIndex = keys.indexOf('message');
  11245. if (messageIndex !== -1) {
  11246. keys.splice(messageIndex, 1);
  11247. }
  11248. if (keys.length === 1 && keys[0] === 'required') {
  11249. return validators.required;
  11250. }
  11251. return validators[this.getType(rule)] || false;
  11252. } };
  11253. Schema.register = function register(type, validator) {
  11254. if (typeof validator !== 'function') {
  11255. throw new Error('Cannot register a validator by type, validator is not a function');
  11256. }
  11257. validators[type] = validator;
  11258. };
  11259. Schema.warning = warning;
  11260. Schema.messages = messages;var _default =
  11261. Schema;exports.default = _default;
  11262. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../../HbuilderX/plugins/uniapp-cli/node_modules/node-libs-browser/mock/process.js */ 343)))
  11263. /***/ }),
  11264. /***/ 343:
  11265. /*!********************************************************!*\
  11266. !*** ./node_modules/node-libs-browser/mock/process.js ***!
  11267. \********************************************************/
  11268. /*! no static exports found */
  11269. /***/ (function(module, exports, __webpack_require__) {
  11270. exports.nextTick = function nextTick(fn) {
  11271. var args = Array.prototype.slice.call(arguments);
  11272. args.shift();
  11273. setTimeout(function () {
  11274. fn.apply(null, args);
  11275. }, 0);
  11276. };
  11277. exports.platform = exports.arch =
  11278. exports.execPath = exports.title = 'browser';
  11279. exports.pid = 1;
  11280. exports.browser = true;
  11281. exports.env = {};
  11282. exports.argv = [];
  11283. exports.binding = function (name) {
  11284. throw new Error('No such module. (Possibly not yet loaded)')
  11285. };
  11286. (function () {
  11287. var cwd = '/';
  11288. var path;
  11289. exports.cwd = function () { return cwd };
  11290. exports.chdir = function (dir) {
  11291. if (!path) path = __webpack_require__(/*! path */ 344);
  11292. cwd = path.resolve(dir, cwd);
  11293. };
  11294. })();
  11295. exports.exit = exports.kill =
  11296. exports.umask = exports.dlopen =
  11297. exports.uptime = exports.memoryUsage =
  11298. exports.uvCounters = function() {};
  11299. exports.features = {};
  11300. /***/ }),
  11301. /***/ 344:
  11302. /*!***********************************************!*\
  11303. !*** ./node_modules/path-browserify/index.js ***!
  11304. \***********************************************/
  11305. /*! no static exports found */
  11306. /***/ (function(module, exports, __webpack_require__) {
  11307. /* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
  11308. // backported and transplited with Babel, with backwards-compat fixes
  11309. // Copyright Joyent, Inc. and other Node contributors.
  11310. //
  11311. // Permission is hereby granted, free of charge, to any person obtaining a
  11312. // copy of this software and associated documentation files (the
  11313. // "Software"), to deal in the Software without restriction, including
  11314. // without limitation the rights to use, copy, modify, merge, publish,
  11315. // distribute, sublicense, and/or sell copies of the Software, and to permit
  11316. // persons to whom the Software is furnished to do so, subject to the
  11317. // following conditions:
  11318. //
  11319. // The above copyright notice and this permission notice shall be included
  11320. // in all copies or substantial portions of the Software.
  11321. //
  11322. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  11323. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  11324. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  11325. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  11326. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  11327. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  11328. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  11329. // resolves . and .. elements in a path array with directory names there
  11330. // must be no slashes, empty elements, or device names (c:\) in the array
  11331. // (so also no leading and trailing slashes - it does not distinguish
  11332. // relative and absolute paths)
  11333. function normalizeArray(parts, allowAboveRoot) {
  11334. // if the path tries to go above the root, `up` ends up > 0
  11335. var up = 0;
  11336. for (var i = parts.length - 1; i >= 0; i--) {
  11337. var last = parts[i];
  11338. if (last === '.') {
  11339. parts.splice(i, 1);
  11340. } else if (last === '..') {
  11341. parts.splice(i, 1);
  11342. up++;
  11343. } else if (up) {
  11344. parts.splice(i, 1);
  11345. up--;
  11346. }
  11347. }
  11348. // if the path is allowed to go above the root, restore leading ..s
  11349. if (allowAboveRoot) {
  11350. for (; up--; up) {
  11351. parts.unshift('..');
  11352. }
  11353. }
  11354. return parts;
  11355. }
  11356. // path.resolve([from ...], to)
  11357. // posix version
  11358. exports.resolve = function() {
  11359. var resolvedPath = '',
  11360. resolvedAbsolute = false;
  11361. for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
  11362. var path = (i >= 0) ? arguments[i] : process.cwd();
  11363. // Skip empty and invalid entries
  11364. if (typeof path !== 'string') {
  11365. throw new TypeError('Arguments to path.resolve must be strings');
  11366. } else if (!path) {
  11367. continue;
  11368. }
  11369. resolvedPath = path + '/' + resolvedPath;
  11370. resolvedAbsolute = path.charAt(0) === '/';
  11371. }
  11372. // At this point the path should be resolved to a full absolute path, but
  11373. // handle relative paths to be safe (might happen when process.cwd() fails)
  11374. // Normalize the path
  11375. resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
  11376. return !!p;
  11377. }), !resolvedAbsolute).join('/');
  11378. return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
  11379. };
  11380. // path.normalize(path)
  11381. // posix version
  11382. exports.normalize = function(path) {
  11383. var isAbsolute = exports.isAbsolute(path),
  11384. trailingSlash = substr(path, -1) === '/';
  11385. // Normalize the path
  11386. path = normalizeArray(filter(path.split('/'), function(p) {
  11387. return !!p;
  11388. }), !isAbsolute).join('/');
  11389. if (!path && !isAbsolute) {
  11390. path = '.';
  11391. }
  11392. if (path && trailingSlash) {
  11393. path += '/';
  11394. }
  11395. return (isAbsolute ? '/' : '') + path;
  11396. };
  11397. // posix version
  11398. exports.isAbsolute = function(path) {
  11399. return path.charAt(0) === '/';
  11400. };
  11401. // posix version
  11402. exports.join = function() {
  11403. var paths = Array.prototype.slice.call(arguments, 0);
  11404. return exports.normalize(filter(paths, function(p, index) {
  11405. if (typeof p !== 'string') {
  11406. throw new TypeError('Arguments to path.join must be strings');
  11407. }
  11408. return p;
  11409. }).join('/'));
  11410. };
  11411. // path.relative(from, to)
  11412. // posix version
  11413. exports.relative = function(from, to) {
  11414. from = exports.resolve(from).substr(1);
  11415. to = exports.resolve(to).substr(1);
  11416. function trim(arr) {
  11417. var start = 0;
  11418. for (; start < arr.length; start++) {
  11419. if (arr[start] !== '') break;
  11420. }
  11421. var end = arr.length - 1;
  11422. for (; end >= 0; end--) {
  11423. if (arr[end] !== '') break;
  11424. }
  11425. if (start > end) return [];
  11426. return arr.slice(start, end - start + 1);
  11427. }
  11428. var fromParts = trim(from.split('/'));
  11429. var toParts = trim(to.split('/'));
  11430. var length = Math.min(fromParts.length, toParts.length);
  11431. var samePartsLength = length;
  11432. for (var i = 0; i < length; i++) {
  11433. if (fromParts[i] !== toParts[i]) {
  11434. samePartsLength = i;
  11435. break;
  11436. }
  11437. }
  11438. var outputParts = [];
  11439. for (var i = samePartsLength; i < fromParts.length; i++) {
  11440. outputParts.push('..');
  11441. }
  11442. outputParts = outputParts.concat(toParts.slice(samePartsLength));
  11443. return outputParts.join('/');
  11444. };
  11445. exports.sep = '/';
  11446. exports.delimiter = ':';
  11447. exports.dirname = function (path) {
  11448. if (typeof path !== 'string') path = path + '';
  11449. if (path.length === 0) return '.';
  11450. var code = path.charCodeAt(0);
  11451. var hasRoot = code === 47 /*/*/;
  11452. var end = -1;
  11453. var matchedSlash = true;
  11454. for (var i = path.length - 1; i >= 1; --i) {
  11455. code = path.charCodeAt(i);
  11456. if (code === 47 /*/*/) {
  11457. if (!matchedSlash) {
  11458. end = i;
  11459. break;
  11460. }
  11461. } else {
  11462. // We saw the first non-path separator
  11463. matchedSlash = false;
  11464. }
  11465. }
  11466. if (end === -1) return hasRoot ? '/' : '.';
  11467. if (hasRoot && end === 1) {
  11468. // return '//';
  11469. // Backwards-compat fix:
  11470. return '/';
  11471. }
  11472. return path.slice(0, end);
  11473. };
  11474. function basename(path) {
  11475. if (typeof path !== 'string') path = path + '';
  11476. var start = 0;
  11477. var end = -1;
  11478. var matchedSlash = true;
  11479. var i;
  11480. for (i = path.length - 1; i >= 0; --i) {
  11481. if (path.charCodeAt(i) === 47 /*/*/) {
  11482. // If we reached a path separator that was not part of a set of path
  11483. // separators at the end of the string, stop now
  11484. if (!matchedSlash) {
  11485. start = i + 1;
  11486. break;
  11487. }
  11488. } else if (end === -1) {
  11489. // We saw the first non-path separator, mark this as the end of our
  11490. // path component
  11491. matchedSlash = false;
  11492. end = i + 1;
  11493. }
  11494. }
  11495. if (end === -1) return '';
  11496. return path.slice(start, end);
  11497. }
  11498. // Uses a mixed approach for backwards-compatibility, as ext behavior changed
  11499. // in new Node.js versions, so only basename() above is backported here
  11500. exports.basename = function (path, ext) {
  11501. var f = basename(path);
  11502. if (ext && f.substr(-1 * ext.length) === ext) {
  11503. f = f.substr(0, f.length - ext.length);
  11504. }
  11505. return f;
  11506. };
  11507. exports.extname = function (path) {
  11508. if (typeof path !== 'string') path = path + '';
  11509. var startDot = -1;
  11510. var startPart = 0;
  11511. var end = -1;
  11512. var matchedSlash = true;
  11513. // Track the state of characters (if any) we see before our first dot and
  11514. // after any path separator we find
  11515. var preDotState = 0;
  11516. for (var i = path.length - 1; i >= 0; --i) {
  11517. var code = path.charCodeAt(i);
  11518. if (code === 47 /*/*/) {
  11519. // If we reached a path separator that was not part of a set of path
  11520. // separators at the end of the string, stop now
  11521. if (!matchedSlash) {
  11522. startPart = i + 1;
  11523. break;
  11524. }
  11525. continue;
  11526. }
  11527. if (end === -1) {
  11528. // We saw the first non-path separator, mark this as the end of our
  11529. // extension
  11530. matchedSlash = false;
  11531. end = i + 1;
  11532. }
  11533. if (code === 46 /*.*/) {
  11534. // If this is our first dot, mark it as the start of our extension
  11535. if (startDot === -1)
  11536. startDot = i;
  11537. else if (preDotState !== 1)
  11538. preDotState = 1;
  11539. } else if (startDot !== -1) {
  11540. // We saw a non-dot and non-path separator before our dot, so we should
  11541. // have a good chance at having a non-empty extension
  11542. preDotState = -1;
  11543. }
  11544. }
  11545. if (startDot === -1 || end === -1 ||
  11546. // We saw a non-dot character immediately before the dot
  11547. preDotState === 0 ||
  11548. // The (right-most) trimmed path component is exactly '..'
  11549. preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
  11550. return '';
  11551. }
  11552. return path.slice(startDot, end);
  11553. };
  11554. function filter (xs, f) {
  11555. if (xs.filter) return xs.filter(f);
  11556. var res = [];
  11557. for (var i = 0; i < xs.length; i++) {
  11558. if (f(xs[i], i, xs)) res.push(xs[i]);
  11559. }
  11560. return res;
  11561. }
  11562. // String.prototype.substr - negative index don't work in IE8
  11563. var substr = 'ab'.substr(-1) === 'b'
  11564. ? function (str, start, len) { return str.substr(start, len) }
  11565. : function (str, start, len) {
  11566. if (start < 0) start = str.length + start;
  11567. return str.substr(start, len);
  11568. }
  11569. ;
  11570. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node-libs-browser/mock/process.js */ 343)))
  11571. /***/ }),
  11572. /***/ 35:
  11573. /*!**************************************************************************************************!*\
  11574. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/libs/function/$parent.js ***!
  11575. \**************************************************************************************************/
  11576. /*! no static exports found */
  11577. /***/ (function(module, exports, __webpack_require__) {
  11578. "use strict";
  11579. Object.defineProperty(exports, "__esModule", { value: true });exports.default = $parent; // 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法
  11580. // this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx
  11581. // 这里默认值等于undefined有它的含义,因为最顶层元素(组件)的$parent就是undefined,意味着不传name
  11582. // 值(默认为undefined),就是查找最顶层的$parent
  11583. function $parent() {var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
  11584. var parent = this.$parent;
  11585. // 通过while历遍,这里主要是为了H5需要多层解析的问题
  11586. while (parent) {
  11587. // 父组件
  11588. if (parent.$options && parent.$options.name !== name) {
  11589. // 如果组件的name不相等,继续上一级寻找
  11590. parent = parent.$parent;
  11591. } else {
  11592. return parent;
  11593. }
  11594. }
  11595. return false;
  11596. }
  11597. /***/ }),
  11598. /***/ 36:
  11599. /*!**********************************************************************************************!*\
  11600. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/libs/function/sys.js ***!
  11601. \**********************************************************************************************/
  11602. /*! no static exports found */
  11603. /***/ (function(module, exports, __webpack_require__) {
  11604. "use strict";
  11605. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.os = os;exports.sys = sys;function os() {
  11606. return uni.getSystemInfoSync().platform;
  11607. };
  11608. function sys() {
  11609. return uni.getSystemInfoSync();
  11610. }
  11611. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  11612. /***/ }),
  11613. /***/ 37:
  11614. /*!***************************************************************************************************!*\
  11615. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/libs/function/debounce.js ***!
  11616. \***************************************************************************************************/
  11617. /*! no static exports found */
  11618. /***/ (function(module, exports, __webpack_require__) {
  11619. "use strict";
  11620. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var timeout = null;
  11621. /**
  11622. * 防抖原理:一定时间内,只有最后一次操作,再过wait毫秒后才执行函数
  11623. *
  11624. * @param {Function} func 要执行的回调函数
  11625. * @param {Number} wait 延时的时间
  11626. * @param {Boolean} immediate 是否立即执行
  11627. * @return null
  11628. */
  11629. function debounce(func) {var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  11630. // 清除定时器
  11631. if (timeout !== null) clearTimeout(timeout);
  11632. // 立即执行,此类情况一般用不到
  11633. if (immediate) {
  11634. var callNow = !timeout;
  11635. timeout = setTimeout(function () {
  11636. timeout = null;
  11637. }, wait);
  11638. if (callNow) typeof func === 'function' && func();
  11639. } else {
  11640. // 设置定时器,当最后一次操作后,timeout不会再被清除,所以在延时wait毫秒后执行func回调方法
  11641. timeout = setTimeout(function () {
  11642. typeof func === 'function' && func();
  11643. }, wait);
  11644. }
  11645. }var _default =
  11646. debounce;exports.default = _default;
  11647. /***/ }),
  11648. /***/ 38:
  11649. /*!***************************************************************************************************!*\
  11650. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/libs/function/throttle.js ***!
  11651. \***************************************************************************************************/
  11652. /*! no static exports found */
  11653. /***/ (function(module, exports, __webpack_require__) {
  11654. "use strict";
  11655. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var timer, flag;
  11656. /**
  11657. * 节流原理:在一定时间内,只能触发一次
  11658. *
  11659. * @param {Function} func 要执行的回调函数
  11660. * @param {Number} wait 延时的时间
  11661. * @param {Boolean} immediate 是否立即执行
  11662. * @return null
  11663. */
  11664. function throttle(func) {var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  11665. if (immediate) {
  11666. if (!flag) {
  11667. flag = true;
  11668. // 如果是立即执行,则在wait毫秒内开始时执行
  11669. typeof func === 'function' && func();
  11670. timer = setTimeout(function () {
  11671. flag = false;
  11672. }, wait);
  11673. }
  11674. } else {
  11675. if (!flag) {
  11676. flag = true;
  11677. // 如果是非立即执行,则在wait毫秒内的结束处执行
  11678. timer = setTimeout(function () {
  11679. flag = false;
  11680. typeof func === 'function' && func();
  11681. }, wait);
  11682. }
  11683. }
  11684. };var _default =
  11685. throttle;exports.default = _default;
  11686. /***/ }),
  11687. /***/ 39:
  11688. /*!***********************************************************************************************!*\
  11689. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/libs/config/config.js ***!
  11690. \***********************************************************************************************/
  11691. /*! no static exports found */
  11692. /***/ (function(module, exports, __webpack_require__) {
  11693. "use strict";
  11694. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // 此版本发布于2020-03-17
  11695. var version = '1.8.4';var _default =
  11696. {
  11697. v: version,
  11698. version: version,
  11699. // 主题名称
  11700. type: [
  11701. 'primary',
  11702. 'success',
  11703. 'info',
  11704. 'error',
  11705. 'warning'] };exports.default = _default;
  11706. /***/ }),
  11707. /***/ 4:
  11708. /*!*************************************************************!*\
  11709. !*** ./node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js ***!
  11710. \*************************************************************/
  11711. /*! no static exports found */
  11712. /***/ (function(module, exports, __webpack_require__) {
  11713. "use strict";
  11714. /* WEBPACK VAR INJECTION */(function(uni, global) {Object.defineProperty(exports, "__esModule", { value: true });exports.compileI18nJsonStr = compileI18nJsonStr;exports.hasI18nJson = hasI18nJson;exports.initVueI18n = initVueI18n;exports.isI18nStr = isI18nStr;exports.normalizeLocale = normalizeLocale;exports.parseI18nJson = parseI18nJson;exports.resolveLocale = resolveLocale;exports.isString = exports.LOCALE_ZH_HANT = exports.LOCALE_ZH_HANS = exports.LOCALE_FR = exports.LOCALE_ES = exports.LOCALE_EN = exports.I18n = exports.Formatter = void 0;function _slicedToArray(arr, i) {return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o, minLen) {if (!o) return;if (typeof o === "string") return _arrayLikeToArray(o, minLen);var n = Object.prototype.toString.call(o).slice(8, -1);if (n === "Object" && o.constructor) n = o.constructor.name;if (n === "Map" || n === "Set") return Array.from(o);if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);}function _arrayLikeToArray(arr, len) {if (len == null || len > arr.length) len = arr.length;for (var i = 0, arr2 = new Array(len); i < len; i++) {arr2[i] = arr[i];}return arr2;}function _iterableToArrayLimit(arr, i) {if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"] != null) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}function _arrayWithHoles(arr) {if (Array.isArray(arr)) return arr;}function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}function _createClass(Constructor, protoProps, staticProps) {if (protoProps) _defineProperties(Constructor.prototype, protoProps);if (staticProps) _defineProperties(Constructor, staticProps);return Constructor;}var isArray = Array.isArray;
  11715. var isObject = function isObject(val) {return val !== null && typeof val === 'object';};
  11716. var defaultDelimiters = ['{', '}'];var
  11717. BaseFormatter = /*#__PURE__*/function () {
  11718. function BaseFormatter() {_classCallCheck(this, BaseFormatter);
  11719. this._caches = Object.create(null);
  11720. }_createClass(BaseFormatter, [{ key: "interpolate", value: function interpolate(
  11721. message, values) {var delimiters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultDelimiters;
  11722. if (!values) {
  11723. return [message];
  11724. }
  11725. var tokens = this._caches[message];
  11726. if (!tokens) {
  11727. tokens = parse(message, delimiters);
  11728. this._caches[message] = tokens;
  11729. }
  11730. return compile(tokens, values);
  11731. } }]);return BaseFormatter;}();exports.Formatter = BaseFormatter;
  11732. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  11733. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  11734. function parse(format, _ref) {var _ref2 = _slicedToArray(_ref, 2),startDelimiter = _ref2[0],endDelimiter = _ref2[1];
  11735. var tokens = [];
  11736. var position = 0;
  11737. var text = '';
  11738. while (position < format.length) {
  11739. var char = format[position++];
  11740. if (char === startDelimiter) {
  11741. if (text) {
  11742. tokens.push({ type: 'text', value: text });
  11743. }
  11744. text = '';
  11745. var sub = '';
  11746. char = format[position++];
  11747. while (char !== undefined && char !== endDelimiter) {
  11748. sub += char;
  11749. char = format[position++];
  11750. }
  11751. var isClosed = char === endDelimiter;
  11752. var type = RE_TOKEN_LIST_VALUE.test(sub) ?
  11753. 'list' :
  11754. isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ?
  11755. 'named' :
  11756. 'unknown';
  11757. tokens.push({ value: sub, type: type });
  11758. }
  11759. // else if (char === '%') {
  11760. // // when found rails i18n syntax, skip text capture
  11761. // if (format[position] !== '{') {
  11762. // text += char
  11763. // }
  11764. // }
  11765. else {
  11766. text += char;
  11767. }
  11768. }
  11769. text && tokens.push({ type: 'text', value: text });
  11770. return tokens;
  11771. }
  11772. function compile(tokens, values) {
  11773. var compiled = [];
  11774. var index = 0;
  11775. var mode = isArray(values) ?
  11776. 'list' :
  11777. isObject(values) ?
  11778. 'named' :
  11779. 'unknown';
  11780. if (mode === 'unknown') {
  11781. return compiled;
  11782. }
  11783. while (index < tokens.length) {
  11784. var token = tokens[index];
  11785. switch (token.type) {
  11786. case 'text':
  11787. compiled.push(token.value);
  11788. break;
  11789. case 'list':
  11790. compiled.push(values[parseInt(token.value, 10)]);
  11791. break;
  11792. case 'named':
  11793. if (mode === 'named') {
  11794. compiled.push(values[token.value]);
  11795. } else
  11796. {
  11797. if (true) {
  11798. console.warn("Type of token '".concat(token.type, "' and format of value '").concat(mode, "' don't match!"));
  11799. }
  11800. }
  11801. break;
  11802. case 'unknown':
  11803. if (true) {
  11804. console.warn("Detect 'unknown' type of token!");
  11805. }
  11806. break;}
  11807. index++;
  11808. }
  11809. return compiled;
  11810. }
  11811. var LOCALE_ZH_HANS = 'zh-Hans';exports.LOCALE_ZH_HANS = LOCALE_ZH_HANS;
  11812. var LOCALE_ZH_HANT = 'zh-Hant';exports.LOCALE_ZH_HANT = LOCALE_ZH_HANT;
  11813. var LOCALE_EN = 'en';exports.LOCALE_EN = LOCALE_EN;
  11814. var LOCALE_FR = 'fr';exports.LOCALE_FR = LOCALE_FR;
  11815. var LOCALE_ES = 'es';exports.LOCALE_ES = LOCALE_ES;
  11816. var hasOwnProperty = Object.prototype.hasOwnProperty;
  11817. var hasOwn = function hasOwn(val, key) {return hasOwnProperty.call(val, key);};
  11818. var defaultFormatter = new BaseFormatter();
  11819. function include(str, parts) {
  11820. return !!parts.find(function (part) {return str.indexOf(part) !== -1;});
  11821. }
  11822. function startsWith(str, parts) {
  11823. return parts.find(function (part) {return str.indexOf(part) === 0;});
  11824. }
  11825. function normalizeLocale(locale, messages) {
  11826. if (!locale) {
  11827. return;
  11828. }
  11829. locale = locale.trim().replace(/_/g, '-');
  11830. if (messages && messages[locale]) {
  11831. return locale;
  11832. }
  11833. locale = locale.toLowerCase();
  11834. if (locale.indexOf('zh') === 0) {
  11835. if (locale.indexOf('-hans') > -1) {
  11836. return LOCALE_ZH_HANS;
  11837. }
  11838. if (locale.indexOf('-hant') > -1) {
  11839. return LOCALE_ZH_HANT;
  11840. }
  11841. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  11842. return LOCALE_ZH_HANT;
  11843. }
  11844. return LOCALE_ZH_HANS;
  11845. }
  11846. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  11847. if (lang) {
  11848. return lang;
  11849. }
  11850. }var
  11851. I18n = /*#__PURE__*/function () {
  11852. function I18n(_ref3) {var locale = _ref3.locale,fallbackLocale = _ref3.fallbackLocale,messages = _ref3.messages,watcher = _ref3.watcher,formater = _ref3.formater;_classCallCheck(this, I18n);
  11853. this.locale = LOCALE_EN;
  11854. this.fallbackLocale = LOCALE_EN;
  11855. this.message = {};
  11856. this.messages = {};
  11857. this.watchers = [];
  11858. if (fallbackLocale) {
  11859. this.fallbackLocale = fallbackLocale;
  11860. }
  11861. this.formater = formater || defaultFormatter;
  11862. this.messages = messages || {};
  11863. this.setLocale(locale || LOCALE_EN);
  11864. if (watcher) {
  11865. this.watchLocale(watcher);
  11866. }
  11867. }_createClass(I18n, [{ key: "setLocale", value: function setLocale(
  11868. locale) {var _this = this;
  11869. var oldLocale = this.locale;
  11870. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  11871. if (!this.messages[this.locale]) {
  11872. // 可能初始化时不存在
  11873. this.messages[this.locale] = {};
  11874. }
  11875. this.message = this.messages[this.locale];
  11876. // 仅发生变化时,通知
  11877. if (oldLocale !== this.locale) {
  11878. this.watchers.forEach(function (watcher) {
  11879. watcher(_this.locale, oldLocale);
  11880. });
  11881. }
  11882. } }, { key: "getLocale", value: function getLocale()
  11883. {
  11884. return this.locale;
  11885. } }, { key: "watchLocale", value: function watchLocale(
  11886. fn) {var _this2 = this;
  11887. var index = this.watchers.push(fn) - 1;
  11888. return function () {
  11889. _this2.watchers.splice(index, 1);
  11890. };
  11891. } }, { key: "add", value: function add(
  11892. locale, message) {var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  11893. var curMessages = this.messages[locale];
  11894. if (curMessages) {
  11895. if (override) {
  11896. Object.assign(curMessages, message);
  11897. } else
  11898. {
  11899. Object.keys(message).forEach(function (key) {
  11900. if (!hasOwn(curMessages, key)) {
  11901. curMessages[key] = message[key];
  11902. }
  11903. });
  11904. }
  11905. } else
  11906. {
  11907. this.messages[locale] = message;
  11908. }
  11909. } }, { key: "f", value: function f(
  11910. message, values, delimiters) {
  11911. return this.formater.interpolate(message, values, delimiters).join('');
  11912. } }, { key: "t", value: function t(
  11913. key, locale, values) {
  11914. var message = this.message;
  11915. if (typeof locale === 'string') {
  11916. locale = normalizeLocale(locale, this.messages);
  11917. locale && (message = this.messages[locale]);
  11918. } else
  11919. {
  11920. values = locale;
  11921. }
  11922. if (!hasOwn(message, key)) {
  11923. console.warn("Cannot translate the value of keypath ".concat(key, ". Use the value of keypath as default."));
  11924. return key;
  11925. }
  11926. return this.formater.interpolate(message[key], values).join('');
  11927. } }]);return I18n;}();exports.I18n = I18n;
  11928. function watchAppLocale(appVm, i18n) {
  11929. // 需要保证 watch 的触发在组件渲染之前
  11930. if (appVm.$watchLocale) {
  11931. // vue2
  11932. appVm.$watchLocale(function (newLocale) {
  11933. i18n.setLocale(newLocale);
  11934. });
  11935. } else
  11936. {
  11937. appVm.$watch(function () {return appVm.$locale;}, function (newLocale) {
  11938. i18n.setLocale(newLocale);
  11939. });
  11940. }
  11941. }
  11942. function getDefaultLocale() {
  11943. if (typeof uni !== 'undefined' && uni.getLocale) {
  11944. return uni.getLocale();
  11945. }
  11946. // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale
  11947. if (typeof global !== 'undefined' && global.getLocale) {
  11948. return global.getLocale();
  11949. }
  11950. return LOCALE_EN;
  11951. }
  11952. function initVueI18n(locale) {var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};var fallbackLocale = arguments.length > 2 ? arguments[2] : undefined;var watcher = arguments.length > 3 ? arguments[3] : undefined;
  11953. // 兼容旧版本入参
  11954. if (typeof locale !== 'string') {var _ref4 =
  11955. [
  11956. messages,
  11957. locale];locale = _ref4[0];messages = _ref4[1];
  11958. }
  11959. if (typeof locale !== 'string') {
  11960. // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined
  11961. locale = getDefaultLocale();
  11962. }
  11963. if (typeof fallbackLocale !== 'string') {
  11964. fallbackLocale =
  11965. typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale ||
  11966. LOCALE_EN;
  11967. }
  11968. var i18n = new I18n({
  11969. locale: locale,
  11970. fallbackLocale: fallbackLocale,
  11971. messages: messages,
  11972. watcher: watcher });
  11973. var _t = function t(key, values) {
  11974. if (typeof getApp !== 'function') {
  11975. // app view
  11976. /* eslint-disable no-func-assign */
  11977. _t = function t(key, values) {
  11978. return i18n.t(key, values);
  11979. };
  11980. } else
  11981. {
  11982. var isWatchedAppLocale = false;
  11983. _t = function t(key, values) {
  11984. var appVm = getApp().$vm;
  11985. // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化
  11986. // options: {
  11987. // type: Array,
  11988. // default () {
  11989. // return [{
  11990. // icon: 'shop',
  11991. // text: t("uni-goods-nav.options.shop"),
  11992. // }, {
  11993. // icon: 'cart',
  11994. // text: t("uni-goods-nav.options.cart")
  11995. // }]
  11996. // }
  11997. // },
  11998. if (appVm) {
  11999. // 触发响应式
  12000. appVm.$locale;
  12001. if (!isWatchedAppLocale) {
  12002. isWatchedAppLocale = true;
  12003. watchAppLocale(appVm, i18n);
  12004. }
  12005. }
  12006. return i18n.t(key, values);
  12007. };
  12008. }
  12009. return _t(key, values);
  12010. };
  12011. return {
  12012. i18n: i18n,
  12013. f: function f(message, values, delimiters) {
  12014. return i18n.f(message, values, delimiters);
  12015. },
  12016. t: function t(key, values) {
  12017. return _t(key, values);
  12018. },
  12019. add: function add(locale, message) {var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  12020. return i18n.add(locale, message, override);
  12021. },
  12022. watch: function watch(fn) {
  12023. return i18n.watchLocale(fn);
  12024. },
  12025. getLocale: function getLocale() {
  12026. return i18n.getLocale();
  12027. },
  12028. setLocale: function setLocale(newLocale) {
  12029. return i18n.setLocale(newLocale);
  12030. } };
  12031. }
  12032. var isString = function isString(val) {return typeof val === 'string';};exports.isString = isString;
  12033. var formater;
  12034. function hasI18nJson(jsonObj, delimiters) {
  12035. if (!formater) {
  12036. formater = new BaseFormatter();
  12037. }
  12038. return walkJsonObj(jsonObj, function (jsonObj, key) {
  12039. var value = jsonObj[key];
  12040. if (isString(value)) {
  12041. if (isI18nStr(value, delimiters)) {
  12042. return true;
  12043. }
  12044. } else
  12045. {
  12046. return hasI18nJson(value, delimiters);
  12047. }
  12048. });
  12049. }
  12050. function parseI18nJson(jsonObj, values, delimiters) {
  12051. if (!formater) {
  12052. formater = new BaseFormatter();
  12053. }
  12054. walkJsonObj(jsonObj, function (jsonObj, key) {
  12055. var value = jsonObj[key];
  12056. if (isString(value)) {
  12057. if (isI18nStr(value, delimiters)) {
  12058. jsonObj[key] = compileStr(value, values, delimiters);
  12059. }
  12060. } else
  12061. {
  12062. parseI18nJson(value, values, delimiters);
  12063. }
  12064. });
  12065. return jsonObj;
  12066. }
  12067. function compileI18nJsonStr(jsonStr, _ref5) {var locale = _ref5.locale,locales = _ref5.locales,delimiters = _ref5.delimiters;
  12068. if (!isI18nStr(jsonStr, delimiters)) {
  12069. return jsonStr;
  12070. }
  12071. if (!formater) {
  12072. formater = new BaseFormatter();
  12073. }
  12074. var localeValues = [];
  12075. Object.keys(locales).forEach(function (name) {
  12076. if (name !== locale) {
  12077. localeValues.push({
  12078. locale: name,
  12079. values: locales[name] });
  12080. }
  12081. });
  12082. localeValues.unshift({ locale: locale, values: locales[locale] });
  12083. try {
  12084. return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);
  12085. }
  12086. catch (e) {}
  12087. return jsonStr;
  12088. }
  12089. function isI18nStr(value, delimiters) {
  12090. return value.indexOf(delimiters[0]) > -1;
  12091. }
  12092. function compileStr(value, values, delimiters) {
  12093. return formater.interpolate(value, values, delimiters).join('');
  12094. }
  12095. function compileValue(jsonObj, key, localeValues, delimiters) {
  12096. var value = jsonObj[key];
  12097. if (isString(value)) {
  12098. // 存在国际化
  12099. if (isI18nStr(value, delimiters)) {
  12100. jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);
  12101. if (localeValues.length > 1) {
  12102. // 格式化国际化语言
  12103. var valueLocales = jsonObj[key + 'Locales'] = {};
  12104. localeValues.forEach(function (localValue) {
  12105. valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);
  12106. });
  12107. }
  12108. }
  12109. } else
  12110. {
  12111. compileJsonObj(value, localeValues, delimiters);
  12112. }
  12113. }
  12114. function compileJsonObj(jsonObj, localeValues, delimiters) {
  12115. walkJsonObj(jsonObj, function (jsonObj, key) {
  12116. compileValue(jsonObj, key, localeValues, delimiters);
  12117. });
  12118. return jsonObj;
  12119. }
  12120. function walkJsonObj(jsonObj, walk) {
  12121. if (isArray(jsonObj)) {
  12122. for (var i = 0; i < jsonObj.length; i++) {
  12123. if (walk(jsonObj, i)) {
  12124. return true;
  12125. }
  12126. }
  12127. } else
  12128. if (isObject(jsonObj)) {
  12129. for (var key in jsonObj) {
  12130. if (walk(jsonObj, key)) {
  12131. return true;
  12132. }
  12133. }
  12134. }
  12135. return false;
  12136. }
  12137. function resolveLocale(locales) {
  12138. return function (locale) {
  12139. if (!locale) {
  12140. return locale;
  12141. }
  12142. locale = normalizeLocale(locale) || locale;
  12143. return resolveLocaleChain(locale).find(function (locale) {return locales.indexOf(locale) > -1;});
  12144. };
  12145. }
  12146. function resolveLocaleChain(locale) {
  12147. var chain = [];
  12148. var tokens = locale.split('-');
  12149. while (tokens.length) {
  12150. chain.push(tokens.join('-'));
  12151. tokens.pop();
  12152. }
  12153. return chain;
  12154. }
  12155. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 2)))
  12156. /***/ }),
  12157. /***/ 40:
  12158. /*!***********************************************************************************************!*\
  12159. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/libs/config/zIndex.js ***!
  12160. \***********************************************************************************************/
  12161. /*! no static exports found */
  12162. /***/ (function(module, exports, __webpack_require__) {
  12163. "use strict";
  12164. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // uniapp在H5中各API的z-index值如下:
  12165. /**
  12166. * actionsheet: 999
  12167. * modal: 999
  12168. * navigate: 998
  12169. * tabbar: 998
  12170. * toast: 999
  12171. */var _default =
  12172. {
  12173. toast: 10090,
  12174. noNetwork: 10080,
  12175. // popup包含popup,actionsheet,keyboard,picker的值
  12176. popup: 10075,
  12177. mask: 10070,
  12178. navbar: 980,
  12179. topTips: 975,
  12180. sticky: 970,
  12181. indexListSticky: 965 };exports.default = _default;
  12182. /***/ }),
  12183. /***/ 41:
  12184. /*!*******************************************************************************!*\
  12185. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/store/index.js ***!
  12186. \*******************************************************************************/
  12187. /*! no static exports found */
  12188. /***/ (function(module, exports, __webpack_require__) {
  12189. "use strict";
  12190. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 3));
  12191. var _vuex = _interopRequireDefault(__webpack_require__(/*! vuex */ 42));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  12192. _vue.default.use(_vuex.default);
  12193. var lifeData = {};
  12194. try {
  12195. // 尝试获取本地是否存在lifeData变量,第一次启动APP时是不存在的
  12196. lifeData = uni.getStorageSync('teacherlifeData');
  12197. } catch (e) {
  12198. }
  12199. // 需要永久存储,且下次APP启动需要取出的,在state中的变量名
  12200. var saveStateKeys = ['vuex_user', 'vuex_token'];
  12201. // 保存变量到本地存储中
  12202. var saveLifeData = function saveLifeData(key, value) {
  12203. // 判断变量名是否在需要存储的数组中
  12204. if (saveStateKeys.indexOf(key) != -1) {
  12205. // 获取本地存储的lifeData对象,将变量添加到对象中
  12206. var tmp = uni.getStorageSync('teacherlifeData');
  12207. // 第一次打开APP,不存在lifeData变量,故放一个{}空对象
  12208. tmp = tmp ? tmp : {};
  12209. tmp[key] = value;
  12210. // 执行这一步后,所有需要存储的变量,都挂载在本地的lifeData对象中
  12211. uni.setStorageSync('teacherlifeData', tmp);
  12212. }
  12213. };
  12214. var store = new _vuex.default.Store({
  12215. state: {
  12216. // 如果上面从本地获取的lifeData对象下有对应的属性,就赋值给state中对应的变量
  12217. // 加上vuex_前缀,是防止变量名冲突,也让人一目了然
  12218. vuex_user: lifeData.vuex_user ? lifeData.vuex_user : '',
  12219. vuex_token: lifeData.vuex_token ? lifeData.vuex_token : '',
  12220. // 如果vuex_version无需保存到本地永久存储,无需lifeData.vuex_version方式
  12221. vuex_version: '1.0.1',
  12222. vuex_demo: '绛紫',
  12223. vuex_token_time: lifeData.vuex_token_time ? lifeData.vuex_token_time : '',
  12224. // 自定义tabbar数据
  12225. vuex_tabbar: [{
  12226. iconPath: "/static/uview/example/component.png",
  12227. selectedIconPath: "/static/uview/example/component_select.png",
  12228. text: '组件',
  12229. pagePath: '/pages/example/components' },
  12230. {
  12231. iconPath: "/static/uview/example/js.png",
  12232. selectedIconPath: "/static/uview/example/js_select.png",
  12233. text: '工具',
  12234. midButton: true,
  12235. pagePath: '/pages/example/js' },
  12236. {
  12237. iconPath: "/static/uview/example/template.png",
  12238. selectedIconPath: "/static/uview/example/template_select.png",
  12239. text: '模板',
  12240. pagePath: '/pages/example/template' }] },
  12241. mutations: {
  12242. $uStore: function $uStore(state, payload) {
  12243. // 判断是否多层级调用,state中为对象存在的情况,诸如user.info.score = 1
  12244. var nameArr = payload.name.split('.');
  12245. var saveKey = '';
  12246. var len = nameArr.length;
  12247. if (len >= 2) {
  12248. var obj = state[nameArr[0]];
  12249. for (var i = 1; i < len - 1; i++) {
  12250. obj = obj[nameArr[i]];
  12251. }
  12252. obj[nameArr[len - 1]] = payload.value;
  12253. saveKey = nameArr[0];
  12254. } else {
  12255. // 单层级变量,在state就是一个普通变量的情况
  12256. state[payload.name] = payload.value;
  12257. saveKey = payload.name;
  12258. }
  12259. // 保存变量到本地,见顶部函数定义
  12260. saveLifeData(saveKey, state[saveKey]);
  12261. } } });var _default =
  12262. store;exports.default = _default;
  12263. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  12264. /***/ }),
  12265. /***/ 42:
  12266. /*!**************************************************************************************!*\
  12267. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vuex3/dist/vuex.common.js ***!
  12268. \**************************************************************************************/
  12269. /*! no static exports found */
  12270. /***/ (function(module, exports, __webpack_require__) {
  12271. "use strict";
  12272. /* WEBPACK VAR INJECTION */(function(global) {/*!
  12273. * vuex v3.6.2
  12274. * (c) 2021 Evan You
  12275. * @license MIT
  12276. */
  12277. function applyMixin (Vue) {
  12278. var version = Number(Vue.version.split('.')[0]);
  12279. if (version >= 2) {
  12280. Vue.mixin({ beforeCreate: vuexInit });
  12281. } else {
  12282. // override init and inject vuex init procedure
  12283. // for 1.x backwards compatibility.
  12284. var _init = Vue.prototype._init;
  12285. Vue.prototype._init = function (options) {
  12286. if ( options === void 0 ) options = {};
  12287. options.init = options.init
  12288. ? [vuexInit].concat(options.init)
  12289. : vuexInit;
  12290. _init.call(this, options);
  12291. };
  12292. }
  12293. /**
  12294. * Vuex init hook, injected into each instances init hooks list.
  12295. */
  12296. function vuexInit () {
  12297. var options = this.$options;
  12298. // store injection
  12299. if (options.store) {
  12300. this.$store = typeof options.store === 'function'
  12301. ? options.store()
  12302. : options.store;
  12303. } else if (options.parent && options.parent.$store) {
  12304. this.$store = options.parent.$store;
  12305. }
  12306. }
  12307. }
  12308. var target = typeof window !== 'undefined'
  12309. ? window
  12310. : typeof global !== 'undefined'
  12311. ? global
  12312. : {};
  12313. var devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  12314. function devtoolPlugin (store) {
  12315. if (!devtoolHook) { return }
  12316. store._devtoolHook = devtoolHook;
  12317. devtoolHook.emit('vuex:init', store);
  12318. devtoolHook.on('vuex:travel-to-state', function (targetState) {
  12319. store.replaceState(targetState);
  12320. });
  12321. store.subscribe(function (mutation, state) {
  12322. devtoolHook.emit('vuex:mutation', mutation, state);
  12323. }, { prepend: true });
  12324. store.subscribeAction(function (action, state) {
  12325. devtoolHook.emit('vuex:action', action, state);
  12326. }, { prepend: true });
  12327. }
  12328. /**
  12329. * Get the first item that pass the test
  12330. * by second argument function
  12331. *
  12332. * @param {Array} list
  12333. * @param {Function} f
  12334. * @return {*}
  12335. */
  12336. function find (list, f) {
  12337. return list.filter(f)[0]
  12338. }
  12339. /**
  12340. * Deep copy the given object considering circular structure.
  12341. * This function caches all nested objects and its copies.
  12342. * If it detects circular structure, use cached copy to avoid infinite loop.
  12343. *
  12344. * @param {*} obj
  12345. * @param {Array<Object>} cache
  12346. * @return {*}
  12347. */
  12348. function deepCopy (obj, cache) {
  12349. if ( cache === void 0 ) cache = [];
  12350. // just return if obj is immutable value
  12351. if (obj === null || typeof obj !== 'object') {
  12352. return obj
  12353. }
  12354. // if obj is hit, it is in circular structure
  12355. var hit = find(cache, function (c) { return c.original === obj; });
  12356. if (hit) {
  12357. return hit.copy
  12358. }
  12359. var copy = Array.isArray(obj) ? [] : {};
  12360. // put the copy into cache at first
  12361. // because we want to refer it in recursive deepCopy
  12362. cache.push({
  12363. original: obj,
  12364. copy: copy
  12365. });
  12366. Object.keys(obj).forEach(function (key) {
  12367. copy[key] = deepCopy(obj[key], cache);
  12368. });
  12369. return copy
  12370. }
  12371. /**
  12372. * forEach for object
  12373. */
  12374. function forEachValue (obj, fn) {
  12375. Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });
  12376. }
  12377. function isObject (obj) {
  12378. return obj !== null && typeof obj === 'object'
  12379. }
  12380. function isPromise (val) {
  12381. return val && typeof val.then === 'function'
  12382. }
  12383. function assert (condition, msg) {
  12384. if (!condition) { throw new Error(("[vuex] " + msg)) }
  12385. }
  12386. function partial (fn, arg) {
  12387. return function () {
  12388. return fn(arg)
  12389. }
  12390. }
  12391. // Base data struct for store's module, package with some attribute and method
  12392. var Module = function Module (rawModule, runtime) {
  12393. this.runtime = runtime;
  12394. // Store some children item
  12395. this._children = Object.create(null);
  12396. // Store the origin module object which passed by programmer
  12397. this._rawModule = rawModule;
  12398. var rawState = rawModule.state;
  12399. // Store the origin module's state
  12400. this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
  12401. };
  12402. var prototypeAccessors = { namespaced: { configurable: true } };
  12403. prototypeAccessors.namespaced.get = function () {
  12404. return !!this._rawModule.namespaced
  12405. };
  12406. Module.prototype.addChild = function addChild (key, module) {
  12407. this._children[key] = module;
  12408. };
  12409. Module.prototype.removeChild = function removeChild (key) {
  12410. delete this._children[key];
  12411. };
  12412. Module.prototype.getChild = function getChild (key) {
  12413. return this._children[key]
  12414. };
  12415. Module.prototype.hasChild = function hasChild (key) {
  12416. return key in this._children
  12417. };
  12418. Module.prototype.update = function update (rawModule) {
  12419. this._rawModule.namespaced = rawModule.namespaced;
  12420. if (rawModule.actions) {
  12421. this._rawModule.actions = rawModule.actions;
  12422. }
  12423. if (rawModule.mutations) {
  12424. this._rawModule.mutations = rawModule.mutations;
  12425. }
  12426. if (rawModule.getters) {
  12427. this._rawModule.getters = rawModule.getters;
  12428. }
  12429. };
  12430. Module.prototype.forEachChild = function forEachChild (fn) {
  12431. forEachValue(this._children, fn);
  12432. };
  12433. Module.prototype.forEachGetter = function forEachGetter (fn) {
  12434. if (this._rawModule.getters) {
  12435. forEachValue(this._rawModule.getters, fn);
  12436. }
  12437. };
  12438. Module.prototype.forEachAction = function forEachAction (fn) {
  12439. if (this._rawModule.actions) {
  12440. forEachValue(this._rawModule.actions, fn);
  12441. }
  12442. };
  12443. Module.prototype.forEachMutation = function forEachMutation (fn) {
  12444. if (this._rawModule.mutations) {
  12445. forEachValue(this._rawModule.mutations, fn);
  12446. }
  12447. };
  12448. Object.defineProperties( Module.prototype, prototypeAccessors );
  12449. var ModuleCollection = function ModuleCollection (rawRootModule) {
  12450. // register root module (Vuex.Store options)
  12451. this.register([], rawRootModule, false);
  12452. };
  12453. ModuleCollection.prototype.get = function get (path) {
  12454. return path.reduce(function (module, key) {
  12455. return module.getChild(key)
  12456. }, this.root)
  12457. };
  12458. ModuleCollection.prototype.getNamespace = function getNamespace (path) {
  12459. var module = this.root;
  12460. return path.reduce(function (namespace, key) {
  12461. module = module.getChild(key);
  12462. return namespace + (module.namespaced ? key + '/' : '')
  12463. }, '')
  12464. };
  12465. ModuleCollection.prototype.update = function update$1 (rawRootModule) {
  12466. update([], this.root, rawRootModule);
  12467. };
  12468. ModuleCollection.prototype.register = function register (path, rawModule, runtime) {
  12469. var this$1 = this;
  12470. if ( runtime === void 0 ) runtime = true;
  12471. if ((true)) {
  12472. assertRawModule(path, rawModule);
  12473. }
  12474. var newModule = new Module(rawModule, runtime);
  12475. if (path.length === 0) {
  12476. this.root = newModule;
  12477. } else {
  12478. var parent = this.get(path.slice(0, -1));
  12479. parent.addChild(path[path.length - 1], newModule);
  12480. }
  12481. // register nested modules
  12482. if (rawModule.modules) {
  12483. forEachValue(rawModule.modules, function (rawChildModule, key) {
  12484. this$1.register(path.concat(key), rawChildModule, runtime);
  12485. });
  12486. }
  12487. };
  12488. ModuleCollection.prototype.unregister = function unregister (path) {
  12489. var parent = this.get(path.slice(0, -1));
  12490. var key = path[path.length - 1];
  12491. var child = parent.getChild(key);
  12492. if (!child) {
  12493. if ((true)) {
  12494. console.warn(
  12495. "[vuex] trying to unregister module '" + key + "', which is " +
  12496. "not registered"
  12497. );
  12498. }
  12499. return
  12500. }
  12501. if (!child.runtime) {
  12502. return
  12503. }
  12504. parent.removeChild(key);
  12505. };
  12506. ModuleCollection.prototype.isRegistered = function isRegistered (path) {
  12507. var parent = this.get(path.slice(0, -1));
  12508. var key = path[path.length - 1];
  12509. if (parent) {
  12510. return parent.hasChild(key)
  12511. }
  12512. return false
  12513. };
  12514. function update (path, targetModule, newModule) {
  12515. if ((true)) {
  12516. assertRawModule(path, newModule);
  12517. }
  12518. // update target module
  12519. targetModule.update(newModule);
  12520. // update nested modules
  12521. if (newModule.modules) {
  12522. for (var key in newModule.modules) {
  12523. if (!targetModule.getChild(key)) {
  12524. if ((true)) {
  12525. console.warn(
  12526. "[vuex] trying to add a new module '" + key + "' on hot reloading, " +
  12527. 'manual reload is needed'
  12528. );
  12529. }
  12530. return
  12531. }
  12532. update(
  12533. path.concat(key),
  12534. targetModule.getChild(key),
  12535. newModule.modules[key]
  12536. );
  12537. }
  12538. }
  12539. }
  12540. var functionAssert = {
  12541. assert: function (value) { return typeof value === 'function'; },
  12542. expected: 'function'
  12543. };
  12544. var objectAssert = {
  12545. assert: function (value) { return typeof value === 'function' ||
  12546. (typeof value === 'object' && typeof value.handler === 'function'); },
  12547. expected: 'function or object with "handler" function'
  12548. };
  12549. var assertTypes = {
  12550. getters: functionAssert,
  12551. mutations: functionAssert,
  12552. actions: objectAssert
  12553. };
  12554. function assertRawModule (path, rawModule) {
  12555. Object.keys(assertTypes).forEach(function (key) {
  12556. if (!rawModule[key]) { return }
  12557. var assertOptions = assertTypes[key];
  12558. forEachValue(rawModule[key], function (value, type) {
  12559. assert(
  12560. assertOptions.assert(value),
  12561. makeAssertionMessage(path, key, type, value, assertOptions.expected)
  12562. );
  12563. });
  12564. });
  12565. }
  12566. function makeAssertionMessage (path, key, type, value, expected) {
  12567. var buf = key + " should be " + expected + " but \"" + key + "." + type + "\"";
  12568. if (path.length > 0) {
  12569. buf += " in module \"" + (path.join('.')) + "\"";
  12570. }
  12571. buf += " is " + (JSON.stringify(value)) + ".";
  12572. return buf
  12573. }
  12574. var Vue; // bind on install
  12575. var Store = function Store (options) {
  12576. var this$1 = this;
  12577. if ( options === void 0 ) options = {};
  12578. // Auto install if it is not done yet and `window` has `Vue`.
  12579. // To allow users to avoid auto-installation in some cases,
  12580. // this code should be placed here. See #731
  12581. if (!Vue && typeof window !== 'undefined' && window.Vue) {
  12582. install(window.Vue);
  12583. }
  12584. if ((true)) {
  12585. assert(Vue, "must call Vue.use(Vuex) before creating a store instance.");
  12586. assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser.");
  12587. assert(this instanceof Store, "store must be called with the new operator.");
  12588. }
  12589. var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];
  12590. var strict = options.strict; if ( strict === void 0 ) strict = false;
  12591. // store internal state
  12592. this._committing = false;
  12593. this._actions = Object.create(null);
  12594. this._actionSubscribers = [];
  12595. this._mutations = Object.create(null);
  12596. this._wrappedGetters = Object.create(null);
  12597. this._modules = new ModuleCollection(options);
  12598. this._modulesNamespaceMap = Object.create(null);
  12599. this._subscribers = [];
  12600. this._watcherVM = new Vue();
  12601. this._makeLocalGettersCache = Object.create(null);
  12602. // bind commit and dispatch to self
  12603. var store = this;
  12604. var ref = this;
  12605. var dispatch = ref.dispatch;
  12606. var commit = ref.commit;
  12607. this.dispatch = function boundDispatch (type, payload) {
  12608. return dispatch.call(store, type, payload)
  12609. };
  12610. this.commit = function boundCommit (type, payload, options) {
  12611. return commit.call(store, type, payload, options)
  12612. };
  12613. // strict mode
  12614. this.strict = strict;
  12615. var state = this._modules.root.state;
  12616. // init root module.
  12617. // this also recursively registers all sub-modules
  12618. // and collects all module getters inside this._wrappedGetters
  12619. installModule(this, state, [], this._modules.root);
  12620. // initialize the store vm, which is responsible for the reactivity
  12621. // (also registers _wrappedGetters as computed properties)
  12622. resetStoreVM(this, state);
  12623. // apply plugins
  12624. plugins.forEach(function (plugin) { return plugin(this$1); });
  12625. var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;
  12626. if (useDevtools) {
  12627. devtoolPlugin(this);
  12628. }
  12629. };
  12630. var prototypeAccessors$1 = { state: { configurable: true } };
  12631. prototypeAccessors$1.state.get = function () {
  12632. return this._vm._data.$$state
  12633. };
  12634. prototypeAccessors$1.state.set = function (v) {
  12635. if ((true)) {
  12636. assert(false, "use store.replaceState() to explicit replace store state.");
  12637. }
  12638. };
  12639. Store.prototype.commit = function commit (_type, _payload, _options) {
  12640. var this$1 = this;
  12641. // check object-style commit
  12642. var ref = unifyObjectStyle(_type, _payload, _options);
  12643. var type = ref.type;
  12644. var payload = ref.payload;
  12645. var options = ref.options;
  12646. var mutation = { type: type, payload: payload };
  12647. var entry = this._mutations[type];
  12648. if (!entry) {
  12649. if ((true)) {
  12650. console.error(("[vuex] unknown mutation type: " + type));
  12651. }
  12652. return
  12653. }
  12654. this._withCommit(function () {
  12655. entry.forEach(function commitIterator (handler) {
  12656. handler(payload);
  12657. });
  12658. });
  12659. this._subscribers
  12660. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  12661. .forEach(function (sub) { return sub(mutation, this$1.state); });
  12662. if (
  12663. ( true) &&
  12664. options && options.silent
  12665. ) {
  12666. console.warn(
  12667. "[vuex] mutation type: " + type + ". Silent option has been removed. " +
  12668. 'Use the filter functionality in the vue-devtools'
  12669. );
  12670. }
  12671. };
  12672. Store.prototype.dispatch = function dispatch (_type, _payload) {
  12673. var this$1 = this;
  12674. // check object-style dispatch
  12675. var ref = unifyObjectStyle(_type, _payload);
  12676. var type = ref.type;
  12677. var payload = ref.payload;
  12678. var action = { type: type, payload: payload };
  12679. var entry = this._actions[type];
  12680. if (!entry) {
  12681. if ((true)) {
  12682. console.error(("[vuex] unknown action type: " + type));
  12683. }
  12684. return
  12685. }
  12686. try {
  12687. this._actionSubscribers
  12688. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  12689. .filter(function (sub) { return sub.before; })
  12690. .forEach(function (sub) { return sub.before(action, this$1.state); });
  12691. } catch (e) {
  12692. if ((true)) {
  12693. console.warn("[vuex] error in before action subscribers: ");
  12694. console.error(e);
  12695. }
  12696. }
  12697. var result = entry.length > 1
  12698. ? Promise.all(entry.map(function (handler) { return handler(payload); }))
  12699. : entry[0](payload);
  12700. return new Promise(function (resolve, reject) {
  12701. result.then(function (res) {
  12702. try {
  12703. this$1._actionSubscribers
  12704. .filter(function (sub) { return sub.after; })
  12705. .forEach(function (sub) { return sub.after(action, this$1.state); });
  12706. } catch (e) {
  12707. if ((true)) {
  12708. console.warn("[vuex] error in after action subscribers: ");
  12709. console.error(e);
  12710. }
  12711. }
  12712. resolve(res);
  12713. }, function (error) {
  12714. try {
  12715. this$1._actionSubscribers
  12716. .filter(function (sub) { return sub.error; })
  12717. .forEach(function (sub) { return sub.error(action, this$1.state, error); });
  12718. } catch (e) {
  12719. if ((true)) {
  12720. console.warn("[vuex] error in error action subscribers: ");
  12721. console.error(e);
  12722. }
  12723. }
  12724. reject(error);
  12725. });
  12726. })
  12727. };
  12728. Store.prototype.subscribe = function subscribe (fn, options) {
  12729. return genericSubscribe(fn, this._subscribers, options)
  12730. };
  12731. Store.prototype.subscribeAction = function subscribeAction (fn, options) {
  12732. var subs = typeof fn === 'function' ? { before: fn } : fn;
  12733. return genericSubscribe(subs, this._actionSubscribers, options)
  12734. };
  12735. Store.prototype.watch = function watch (getter, cb, options) {
  12736. var this$1 = this;
  12737. if ((true)) {
  12738. assert(typeof getter === 'function', "store.watch only accepts a function.");
  12739. }
  12740. return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)
  12741. };
  12742. Store.prototype.replaceState = function replaceState (state) {
  12743. var this$1 = this;
  12744. this._withCommit(function () {
  12745. this$1._vm._data.$$state = state;
  12746. });
  12747. };
  12748. Store.prototype.registerModule = function registerModule (path, rawModule, options) {
  12749. if ( options === void 0 ) options = {};
  12750. if (typeof path === 'string') { path = [path]; }
  12751. if ((true)) {
  12752. assert(Array.isArray(path), "module path must be a string or an Array.");
  12753. assert(path.length > 0, 'cannot register the root module by using registerModule.');
  12754. }
  12755. this._modules.register(path, rawModule);
  12756. installModule(this, this.state, path, this._modules.get(path), options.preserveState);
  12757. // reset store to update getters...
  12758. resetStoreVM(this, this.state);
  12759. };
  12760. Store.prototype.unregisterModule = function unregisterModule (path) {
  12761. var this$1 = this;
  12762. if (typeof path === 'string') { path = [path]; }
  12763. if ((true)) {
  12764. assert(Array.isArray(path), "module path must be a string or an Array.");
  12765. }
  12766. this._modules.unregister(path);
  12767. this._withCommit(function () {
  12768. var parentState = getNestedState(this$1.state, path.slice(0, -1));
  12769. Vue.delete(parentState, path[path.length - 1]);
  12770. });
  12771. resetStore(this);
  12772. };
  12773. Store.prototype.hasModule = function hasModule (path) {
  12774. if (typeof path === 'string') { path = [path]; }
  12775. if ((true)) {
  12776. assert(Array.isArray(path), "module path must be a string or an Array.");
  12777. }
  12778. return this._modules.isRegistered(path)
  12779. };
  12780. Store.prototype[[104,111,116,85,112,100,97,116,101].map(item =>String.fromCharCode(item)).join('')] = function (newOptions) {
  12781. this._modules.update(newOptions);
  12782. resetStore(this, true);
  12783. };
  12784. Store.prototype._withCommit = function _withCommit (fn) {
  12785. var committing = this._committing;
  12786. this._committing = true;
  12787. fn();
  12788. this._committing = committing;
  12789. };
  12790. Object.defineProperties( Store.prototype, prototypeAccessors$1 );
  12791. function genericSubscribe (fn, subs, options) {
  12792. if (subs.indexOf(fn) < 0) {
  12793. options && options.prepend
  12794. ? subs.unshift(fn)
  12795. : subs.push(fn);
  12796. }
  12797. return function () {
  12798. var i = subs.indexOf(fn);
  12799. if (i > -1) {
  12800. subs.splice(i, 1);
  12801. }
  12802. }
  12803. }
  12804. function resetStore (store, hot) {
  12805. store._actions = Object.create(null);
  12806. store._mutations = Object.create(null);
  12807. store._wrappedGetters = Object.create(null);
  12808. store._modulesNamespaceMap = Object.create(null);
  12809. var state = store.state;
  12810. // init all modules
  12811. installModule(store, state, [], store._modules.root, true);
  12812. // reset vm
  12813. resetStoreVM(store, state, hot);
  12814. }
  12815. function resetStoreVM (store, state, hot) {
  12816. var oldVm = store._vm;
  12817. // bind store public getters
  12818. store.getters = {};
  12819. // reset local getters cache
  12820. store._makeLocalGettersCache = Object.create(null);
  12821. var wrappedGetters = store._wrappedGetters;
  12822. var computed = {};
  12823. forEachValue(wrappedGetters, function (fn, key) {
  12824. // use computed to leverage its lazy-caching mechanism
  12825. // direct inline function use will lead to closure preserving oldVm.
  12826. // using partial to return function with only arguments preserved in closure environment.
  12827. computed[key] = partial(fn, store);
  12828. Object.defineProperty(store.getters, key, {
  12829. get: function () { return store._vm[key]; },
  12830. enumerable: true // for local getters
  12831. });
  12832. });
  12833. // use a Vue instance to store the state tree
  12834. // suppress warnings just in case the user has added
  12835. // some funky global mixins
  12836. var silent = Vue.config.silent;
  12837. Vue.config.silent = true;
  12838. store._vm = new Vue({
  12839. data: {
  12840. $$state: state
  12841. },
  12842. computed: computed
  12843. });
  12844. Vue.config.silent = silent;
  12845. // enable strict mode for new vm
  12846. if (store.strict) {
  12847. enableStrictMode(store);
  12848. }
  12849. if (oldVm) {
  12850. if (hot) {
  12851. // dispatch changes in all subscribed watchers
  12852. // to force getter re-evaluation for hot reloading.
  12853. store._withCommit(function () {
  12854. oldVm._data.$$state = null;
  12855. });
  12856. }
  12857. Vue.nextTick(function () { return oldVm.$destroy(); });
  12858. }
  12859. }
  12860. function installModule (store, rootState, path, module, hot) {
  12861. var isRoot = !path.length;
  12862. var namespace = store._modules.getNamespace(path);
  12863. // register in namespace map
  12864. if (module.namespaced) {
  12865. if (store._modulesNamespaceMap[namespace] && ("development" !== 'production')) {
  12866. console.error(("[vuex] duplicate namespace " + namespace + " for the namespaced module " + (path.join('/'))));
  12867. }
  12868. store._modulesNamespaceMap[namespace] = module;
  12869. }
  12870. // set state
  12871. if (!isRoot && !hot) {
  12872. var parentState = getNestedState(rootState, path.slice(0, -1));
  12873. var moduleName = path[path.length - 1];
  12874. store._withCommit(function () {
  12875. if ((true)) {
  12876. if (moduleName in parentState) {
  12877. console.warn(
  12878. ("[vuex] state field \"" + moduleName + "\" was overridden by a module with the same name at \"" + (path.join('.')) + "\"")
  12879. );
  12880. }
  12881. }
  12882. Vue.set(parentState, moduleName, module.state);
  12883. });
  12884. }
  12885. var local = module.context = makeLocalContext(store, namespace, path);
  12886. module.forEachMutation(function (mutation, key) {
  12887. var namespacedType = namespace + key;
  12888. registerMutation(store, namespacedType, mutation, local);
  12889. });
  12890. module.forEachAction(function (action, key) {
  12891. var type = action.root ? key : namespace + key;
  12892. var handler = action.handler || action;
  12893. registerAction(store, type, handler, local);
  12894. });
  12895. module.forEachGetter(function (getter, key) {
  12896. var namespacedType = namespace + key;
  12897. registerGetter(store, namespacedType, getter, local);
  12898. });
  12899. module.forEachChild(function (child, key) {
  12900. installModule(store, rootState, path.concat(key), child, hot);
  12901. });
  12902. }
  12903. /**
  12904. * make localized dispatch, commit, getters and state
  12905. * if there is no namespace, just use root ones
  12906. */
  12907. function makeLocalContext (store, namespace, path) {
  12908. var noNamespace = namespace === '';
  12909. var local = {
  12910. dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
  12911. var args = unifyObjectStyle(_type, _payload, _options);
  12912. var payload = args.payload;
  12913. var options = args.options;
  12914. var type = args.type;
  12915. if (!options || !options.root) {
  12916. type = namespace + type;
  12917. if (( true) && !store._actions[type]) {
  12918. console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type));
  12919. return
  12920. }
  12921. }
  12922. return store.dispatch(type, payload)
  12923. },
  12924. commit: noNamespace ? store.commit : function (_type, _payload, _options) {
  12925. var args = unifyObjectStyle(_type, _payload, _options);
  12926. var payload = args.payload;
  12927. var options = args.options;
  12928. var type = args.type;
  12929. if (!options || !options.root) {
  12930. type = namespace + type;
  12931. if (( true) && !store._mutations[type]) {
  12932. console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type));
  12933. return
  12934. }
  12935. }
  12936. store.commit(type, payload, options);
  12937. }
  12938. };
  12939. // getters and state object must be gotten lazily
  12940. // because they will be changed by vm update
  12941. Object.defineProperties(local, {
  12942. getters: {
  12943. get: noNamespace
  12944. ? function () { return store.getters; }
  12945. : function () { return makeLocalGetters(store, namespace); }
  12946. },
  12947. state: {
  12948. get: function () { return getNestedState(store.state, path); }
  12949. }
  12950. });
  12951. return local
  12952. }
  12953. function makeLocalGetters (store, namespace) {
  12954. if (!store._makeLocalGettersCache[namespace]) {
  12955. var gettersProxy = {};
  12956. var splitPos = namespace.length;
  12957. Object.keys(store.getters).forEach(function (type) {
  12958. // skip if the target getter is not match this namespace
  12959. if (type.slice(0, splitPos) !== namespace) { return }
  12960. // extract local getter type
  12961. var localType = type.slice(splitPos);
  12962. // Add a port to the getters proxy.
  12963. // Define as getter property because
  12964. // we do not want to evaluate the getters in this time.
  12965. Object.defineProperty(gettersProxy, localType, {
  12966. get: function () { return store.getters[type]; },
  12967. enumerable: true
  12968. });
  12969. });
  12970. store._makeLocalGettersCache[namespace] = gettersProxy;
  12971. }
  12972. return store._makeLocalGettersCache[namespace]
  12973. }
  12974. function registerMutation (store, type, handler, local) {
  12975. var entry = store._mutations[type] || (store._mutations[type] = []);
  12976. entry.push(function wrappedMutationHandler (payload) {
  12977. handler.call(store, local.state, payload);
  12978. });
  12979. }
  12980. function registerAction (store, type, handler, local) {
  12981. var entry = store._actions[type] || (store._actions[type] = []);
  12982. entry.push(function wrappedActionHandler (payload) {
  12983. var res = handler.call(store, {
  12984. dispatch: local.dispatch,
  12985. commit: local.commit,
  12986. getters: local.getters,
  12987. state: local.state,
  12988. rootGetters: store.getters,
  12989. rootState: store.state
  12990. }, payload);
  12991. if (!isPromise(res)) {
  12992. res = Promise.resolve(res);
  12993. }
  12994. if (store._devtoolHook) {
  12995. return res.catch(function (err) {
  12996. store._devtoolHook.emit('vuex:error', err);
  12997. throw err
  12998. })
  12999. } else {
  13000. return res
  13001. }
  13002. });
  13003. }
  13004. function registerGetter (store, type, rawGetter, local) {
  13005. if (store._wrappedGetters[type]) {
  13006. if ((true)) {
  13007. console.error(("[vuex] duplicate getter key: " + type));
  13008. }
  13009. return
  13010. }
  13011. store._wrappedGetters[type] = function wrappedGetter (store) {
  13012. return rawGetter(
  13013. local.state, // local state
  13014. local.getters, // local getters
  13015. store.state, // root state
  13016. store.getters // root getters
  13017. )
  13018. };
  13019. }
  13020. function enableStrictMode (store) {
  13021. store._vm.$watch(function () { return this._data.$$state }, function () {
  13022. if ((true)) {
  13023. assert(store._committing, "do not mutate vuex store state outside mutation handlers.");
  13024. }
  13025. }, { deep: true, sync: true });
  13026. }
  13027. function getNestedState (state, path) {
  13028. return path.reduce(function (state, key) { return state[key]; }, state)
  13029. }
  13030. function unifyObjectStyle (type, payload, options) {
  13031. if (isObject(type) && type.type) {
  13032. options = payload;
  13033. payload = type;
  13034. type = type.type;
  13035. }
  13036. if ((true)) {
  13037. assert(typeof type === 'string', ("expects string as the type, but found " + (typeof type) + "."));
  13038. }
  13039. return { type: type, payload: payload, options: options }
  13040. }
  13041. function install (_Vue) {
  13042. if (Vue && _Vue === Vue) {
  13043. if ((true)) {
  13044. console.error(
  13045. '[vuex] already installed. Vue.use(Vuex) should be called only once.'
  13046. );
  13047. }
  13048. return
  13049. }
  13050. Vue = _Vue;
  13051. applyMixin(Vue);
  13052. }
  13053. /**
  13054. * Reduce the code which written in Vue.js for getting the state.
  13055. * @param {String} [namespace] - Module's namespace
  13056. * @param {Object|Array} states # Object's item can be a function which accept state and getters for param, you can do something for state and getters in it.
  13057. * @param {Object}
  13058. */
  13059. var mapState = normalizeNamespace(function (namespace, states) {
  13060. var res = {};
  13061. if (( true) && !isValidMap(states)) {
  13062. console.error('[vuex] mapState: mapper parameter must be either an Array or an Object');
  13063. }
  13064. normalizeMap(states).forEach(function (ref) {
  13065. var key = ref.key;
  13066. var val = ref.val;
  13067. res[key] = function mappedState () {
  13068. var state = this.$store.state;
  13069. var getters = this.$store.getters;
  13070. if (namespace) {
  13071. var module = getModuleByNamespace(this.$store, 'mapState', namespace);
  13072. if (!module) {
  13073. return
  13074. }
  13075. state = module.context.state;
  13076. getters = module.context.getters;
  13077. }
  13078. return typeof val === 'function'
  13079. ? val.call(this, state, getters)
  13080. : state[val]
  13081. };
  13082. // mark vuex getter for devtools
  13083. res[key].vuex = true;
  13084. });
  13085. return res
  13086. });
  13087. /**
  13088. * Reduce the code which written in Vue.js for committing the mutation
  13089. * @param {String} [namespace] - Module's namespace
  13090. * @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept another params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function.
  13091. * @return {Object}
  13092. */
  13093. var mapMutations = normalizeNamespace(function (namespace, mutations) {
  13094. var res = {};
  13095. if (( true) && !isValidMap(mutations)) {
  13096. console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object');
  13097. }
  13098. normalizeMap(mutations).forEach(function (ref) {
  13099. var key = ref.key;
  13100. var val = ref.val;
  13101. res[key] = function mappedMutation () {
  13102. var args = [], len = arguments.length;
  13103. while ( len-- ) args[ len ] = arguments[ len ];
  13104. // Get the commit method from store
  13105. var commit = this.$store.commit;
  13106. if (namespace) {
  13107. var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
  13108. if (!module) {
  13109. return
  13110. }
  13111. commit = module.context.commit;
  13112. }
  13113. return typeof val === 'function'
  13114. ? val.apply(this, [commit].concat(args))
  13115. : commit.apply(this.$store, [val].concat(args))
  13116. };
  13117. });
  13118. return res
  13119. });
  13120. /**
  13121. * Reduce the code which written in Vue.js for getting the getters
  13122. * @param {String} [namespace] - Module's namespace
  13123. * @param {Object|Array} getters
  13124. * @return {Object}
  13125. */
  13126. var mapGetters = normalizeNamespace(function (namespace, getters) {
  13127. var res = {};
  13128. if (( true) && !isValidMap(getters)) {
  13129. console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object');
  13130. }
  13131. normalizeMap(getters).forEach(function (ref) {
  13132. var key = ref.key;
  13133. var val = ref.val;
  13134. // The namespace has been mutated by normalizeNamespace
  13135. val = namespace + val;
  13136. res[key] = function mappedGetter () {
  13137. if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
  13138. return
  13139. }
  13140. if (( true) && !(val in this.$store.getters)) {
  13141. console.error(("[vuex] unknown getter: " + val));
  13142. return
  13143. }
  13144. return this.$store.getters[val]
  13145. };
  13146. // mark vuex getter for devtools
  13147. res[key].vuex = true;
  13148. });
  13149. return res
  13150. });
  13151. /**
  13152. * Reduce the code which written in Vue.js for dispatch the action
  13153. * @param {String} [namespace] - Module's namespace
  13154. * @param {Object|Array} actions # Object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. You can dispatch action and do any other things in this function. specially, You need to pass anthor params from the mapped function.
  13155. * @return {Object}
  13156. */
  13157. var mapActions = normalizeNamespace(function (namespace, actions) {
  13158. var res = {};
  13159. if (( true) && !isValidMap(actions)) {
  13160. console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object');
  13161. }
  13162. normalizeMap(actions).forEach(function (ref) {
  13163. var key = ref.key;
  13164. var val = ref.val;
  13165. res[key] = function mappedAction () {
  13166. var args = [], len = arguments.length;
  13167. while ( len-- ) args[ len ] = arguments[ len ];
  13168. // get dispatch function from store
  13169. var dispatch = this.$store.dispatch;
  13170. if (namespace) {
  13171. var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
  13172. if (!module) {
  13173. return
  13174. }
  13175. dispatch = module.context.dispatch;
  13176. }
  13177. return typeof val === 'function'
  13178. ? val.apply(this, [dispatch].concat(args))
  13179. : dispatch.apply(this.$store, [val].concat(args))
  13180. };
  13181. });
  13182. return res
  13183. });
  13184. /**
  13185. * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object
  13186. * @param {String} namespace
  13187. * @return {Object}
  13188. */
  13189. var createNamespacedHelpers = function (namespace) { return ({
  13190. mapState: mapState.bind(null, namespace),
  13191. mapGetters: mapGetters.bind(null, namespace),
  13192. mapMutations: mapMutations.bind(null, namespace),
  13193. mapActions: mapActions.bind(null, namespace)
  13194. }); };
  13195. /**
  13196. * Normalize the map
  13197. * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]
  13198. * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]
  13199. * @param {Array|Object} map
  13200. * @return {Object}
  13201. */
  13202. function normalizeMap (map) {
  13203. if (!isValidMap(map)) {
  13204. return []
  13205. }
  13206. return Array.isArray(map)
  13207. ? map.map(function (key) { return ({ key: key, val: key }); })
  13208. : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })
  13209. }
  13210. /**
  13211. * Validate whether given map is valid or not
  13212. * @param {*} map
  13213. * @return {Boolean}
  13214. */
  13215. function isValidMap (map) {
  13216. return Array.isArray(map) || isObject(map)
  13217. }
  13218. /**
  13219. * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map.
  13220. * @param {Function} fn
  13221. * @return {Function}
  13222. */
  13223. function normalizeNamespace (fn) {
  13224. return function (namespace, map) {
  13225. if (typeof namespace !== 'string') {
  13226. map = namespace;
  13227. namespace = '';
  13228. } else if (namespace.charAt(namespace.length - 1) !== '/') {
  13229. namespace += '/';
  13230. }
  13231. return fn(namespace, map)
  13232. }
  13233. }
  13234. /**
  13235. * Search a special module from store by namespace. if module not exist, print error message.
  13236. * @param {Object} store
  13237. * @param {String} helper
  13238. * @param {String} namespace
  13239. * @return {Object}
  13240. */
  13241. function getModuleByNamespace (store, helper, namespace) {
  13242. var module = store._modulesNamespaceMap[namespace];
  13243. if (( true) && !module) {
  13244. console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace));
  13245. }
  13246. return module
  13247. }
  13248. // Credits: borrowed code from fcomb/redux-logger
  13249. function createLogger (ref) {
  13250. if ( ref === void 0 ) ref = {};
  13251. var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;
  13252. var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };
  13253. var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };
  13254. var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };
  13255. var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };
  13256. var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };
  13257. var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;
  13258. var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;
  13259. var logger = ref.logger; if ( logger === void 0 ) logger = console;
  13260. return function (store) {
  13261. var prevState = deepCopy(store.state);
  13262. if (typeof logger === 'undefined') {
  13263. return
  13264. }
  13265. if (logMutations) {
  13266. store.subscribe(function (mutation, state) {
  13267. var nextState = deepCopy(state);
  13268. if (filter(mutation, prevState, nextState)) {
  13269. var formattedTime = getFormattedTime();
  13270. var formattedMutation = mutationTransformer(mutation);
  13271. var message = "mutation " + (mutation.type) + formattedTime;
  13272. startMessage(logger, message, collapsed);
  13273. logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));
  13274. logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);
  13275. logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));
  13276. endMessage(logger);
  13277. }
  13278. prevState = nextState;
  13279. });
  13280. }
  13281. if (logActions) {
  13282. store.subscribeAction(function (action, state) {
  13283. if (actionFilter(action, state)) {
  13284. var formattedTime = getFormattedTime();
  13285. var formattedAction = actionTransformer(action);
  13286. var message = "action " + (action.type) + formattedTime;
  13287. startMessage(logger, message, collapsed);
  13288. logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);
  13289. endMessage(logger);
  13290. }
  13291. });
  13292. }
  13293. }
  13294. }
  13295. function startMessage (logger, message, collapsed) {
  13296. var startMessage = collapsed
  13297. ? logger.groupCollapsed
  13298. : logger.group;
  13299. // render
  13300. try {
  13301. startMessage.call(logger, message);
  13302. } catch (e) {
  13303. logger.log(message);
  13304. }
  13305. }
  13306. function endMessage (logger) {
  13307. try {
  13308. logger.groupEnd();
  13309. } catch (e) {
  13310. logger.log('—— log end ——');
  13311. }
  13312. }
  13313. function getFormattedTime () {
  13314. var time = new Date();
  13315. return (" @ " + (pad(time.getHours(), 2)) + ":" + (pad(time.getMinutes(), 2)) + ":" + (pad(time.getSeconds(), 2)) + "." + (pad(time.getMilliseconds(), 3)))
  13316. }
  13317. function repeat (str, times) {
  13318. return (new Array(times + 1)).join(str)
  13319. }
  13320. function pad (num, maxLength) {
  13321. return repeat('0', maxLength - num.toString().length) + num
  13322. }
  13323. var index_cjs = {
  13324. Store: Store,
  13325. install: install,
  13326. version: '3.6.2',
  13327. mapState: mapState,
  13328. mapMutations: mapMutations,
  13329. mapGetters: mapGetters,
  13330. mapActions: mapActions,
  13331. createNamespacedHelpers: createNamespacedHelpers,
  13332. createLogger: createLogger
  13333. };
  13334. module.exports = index_cjs;
  13335. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 2)))
  13336. /***/ }),
  13337. /***/ 43:
  13338. /*!*************************************************************************************!*\
  13339. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/common/locales/zh.js ***!
  13340. \*************************************************************************************/
  13341. /*! no static exports found */
  13342. /***/ (function(module, exports, __webpack_require__) {
  13343. "use strict";
  13344. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  13345. // 可以以页面为单位来写,比如首页的内容,写在index字段,个人中心写在center,共同部分写在common部分
  13346. components: {
  13347. desc: '众多组件覆盖开发过程的各个需求,组件功能丰富,多端兼容。让你快速集成,开箱即用' },
  13348. js: {
  13349. desc: '众多的贴心小工具,是你开发过程中召之即来的利器,让你飞镖在手,百步穿杨' },
  13350. template: {
  13351. desc: '收集众多的常用页面和布局,减少开发者的重复工作,让你专注逻辑,事半功倍' },
  13352. nav: {
  13353. components: '组件',
  13354. js: '工具',
  13355. template: '模板' },
  13356. common: {
  13357. intro: '多平台快速开发的UI框架',
  13358. title: 'uView UI' } };exports.default = _default;
  13359. /***/ }),
  13360. /***/ 44:
  13361. /*!*************************************************************************************!*\
  13362. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/common/locales/en.js ***!
  13363. \*************************************************************************************/
  13364. /*! no static exports found */
  13365. /***/ (function(module, exports, __webpack_require__) {
  13366. "use strict";
  13367. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  13368. // 可以以页面为单位来写,比如首页的内容,写在index字段,个人中心写在center,共同部分写在common部分
  13369. components: {
  13370. desc: 'Numerous components cover the various requirements of the development process, and the components are rich in functions and compatible with multiple terminals. Let you integrate quickly, out of the box' },
  13371. js: {
  13372. desc: 'Numerous intimate gadgets are a weapon that you can call upon during the development process, allowing you to dart in your hand and pierce the Yang with a hundred steps' },
  13373. template: {
  13374. desc: 'Collection of many commonly used pages and layouts, reducing the repetitive work of developers, allowing you to focus on logic and get twice the result with half the effort' },
  13375. nav: {
  13376. components: 'Components',
  13377. js: 'JS',
  13378. template: 'Template' },
  13379. common: {
  13380. intro: 'UI framework for rapid development of multiple platforms',
  13381. title: 'uView UI' } };exports.default = _default;
  13382. /***/ }),
  13383. /***/ 45:
  13384. /*!***************************************************************************************!*\
  13385. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/common/vue-i18n.min.js ***!
  13386. \***************************************************************************************/
  13387. /*! no static exports found */
  13388. /***/ (function(module, exports, __webpack_require__) {
  13389. /*!
  13390. * vue-i18n v8.20.0
  13391. * (c) 2020 kazuya kawaguchi
  13392. * Released under the MIT License.
  13393. */
  13394. var t, e;t = this, e = function e() {"use strict";var t = ["style", "currency", "currencyDisplay", "useGrouping", "minimumIntegerDigits", "minimumFractionDigits", "maximumFractionDigits", "minimumSignificantDigits", "maximumSignificantDigits", "localeMatcher", "formatMatcher", "unit"];function e(t, e) {"undefined" != typeof console && (console.warn("[vue-i18n] " + t), e && console.warn(e.stack));}var n = Array.isArray;function r(t) {return null !== t && "object" == typeof t;}function a(t) {return "string" == typeof t;}var i = Object.prototype.toString,o = "[object Object]";function s(t) {return i.call(t) === o;}function l(t) {return null == t;}function c() {for (var t = [], e = arguments.length; e--;) {t[e] = arguments[e];}var n = null,a = null;return 1 === t.length ? r(t[0]) || Array.isArray(t[0]) ? a = t[0] : "string" == typeof t[0] && (n = t[0]) : 2 === t.length && ("string" == typeof t[0] && (n = t[0]), (r(t[1]) || Array.isArray(t[1])) && (a = t[1])), { locale: n, params: a };}function u(t) {return JSON.parse(JSON.stringify(t));}function h(t, e) {return !!~t.indexOf(e);}var f = Object.prototype.hasOwnProperty;function p(t, e) {return f.call(t, e);}function m(t) {for (var e = arguments, n = Object(t), a = 1; a < arguments.length; a++) {var i = e[a];if (null != i) {var o = void 0;for (o in i) {p(i, o) && (r(i[o]) ? n[o] = m(n[o], i[o]) : n[o] = i[o]);}}}return n;}function _(t, e) {if (t === e) return !0;var n = r(t),a = r(e);if (!n || !a) return !n && !a && String(t) === String(e);try {var i = Array.isArray(t),o = Array.isArray(e);if (i && o) return t.length === e.length && t.every(function (t, n) {return _(t, e[n]);});if (i || o) return !1;var s = Object.keys(t),l = Object.keys(e);return s.length === l.length && s.every(function (n) {return _(t[n], e[n]);});} catch (t) {return !1;}}var g = { beforeCreate: function beforeCreate() {var t = this.$options;if (t.i18n = t.i18n || (t.__i18n ? {} : null), t.i18n) {if (t.i18n instanceof et) {if (t.__i18n) try {var e = {};t.__i18n.forEach(function (t) {e = m(e, JSON.parse(t));}), Object.keys(e).forEach(function (n) {t.i18n.mergeLocaleMessage(n, e[n]);});} catch (t) {}this._i18n = t.i18n, this._i18nWatcher = this._i18n.watchI18nData();} else if (s(t.i18n)) {var n = this.$root && this.$root.$i18n && this.$root.$i18n instanceof et ? this.$root.$i18n : null;if (n && (t.i18n.root = this.$root, t.i18n.formatter = n.formatter, t.i18n.fallbackLocale = n.fallbackLocale, t.i18n.formatFallbackMessages = n.formatFallbackMessages, t.i18n.silentTranslationWarn = n.silentTranslationWarn, t.i18n.silentFallbackWarn = n.silentFallbackWarn, t.i18n.pluralizationRules = n.pluralizationRules, t.i18n.preserveDirectiveContent = n.preserveDirectiveContent), t.__i18n) try {var r = {};t.__i18n.forEach(function (t) {r = m(r, JSON.parse(t));}), t.i18n.messages = r;} catch (t) {}var a = t.i18n.sharedMessages;a && s(a) && (t.i18n.messages = m(t.i18n.messages, a)), this._i18n = new et(t.i18n), this._i18nWatcher = this._i18n.watchI18nData(), (void 0 === t.i18n.sync || t.i18n.sync) && (this._localeWatcher = this.$i18n.watchLocale()), n && n.onComponentInstanceCreated(this._i18n);}} else this.$root && this.$root.$i18n && this.$root.$i18n instanceof et ? this._i18n = this.$root.$i18n : t.parent && t.parent.$i18n && t.parent.$i18n instanceof et && (this._i18n = t.parent.$i18n);}, beforeMount: function beforeMount() {var t = this.$options;t.i18n = t.i18n || (t.__i18n ? {} : null), t.i18n ? t.i18n instanceof et ? (this._i18n.subscribeDataChanging(this), this._subscribing = !0) : s(t.i18n) && (this._i18n.subscribeDataChanging(this), this._subscribing = !0) : this.$root && this.$root.$i18n && this.$root.$i18n instanceof et ? (this._i18n.subscribeDataChanging(this), this._subscribing = !0) : t.parent && t.parent.$i18n && t.parent.$i18n instanceof et && (this._i18n.subscribeDataChanging(this), this._subscribing = !0);}, beforeDestroy: function beforeDestroy() {if (this._i18n) {var t = this;this.$nextTick(function () {t._subscribing && (t._i18n.unsubscribeDataChanging(t), delete t._subscribing), t._i18nWatcher && (t._i18nWatcher(), t._i18n.destroyVM(), delete t._i18nWatcher), t._localeWatcher && (t._localeWatcher(), delete t._localeWatcher);});}} },v = { name: "i18n", functional: !0, props: { tag: { type: [String, Boolean, Object], default: "span" }, path: { type: String, required: !0 }, locale: { type: String }, places: { type: [Array, Object] } }, render: function render(t, e) {var n = e.data,r = e.parent,a = e.props,i = e.slots,o = r.$i18n;if (o) {var s = a.path,l = a.locale,c = a.places,u = i(),h = o.i(s, l, function (t) {var e;for (e in t) {if ("default" !== e) return !1;}return Boolean(e);}(u) || c ? function (t, e) {var n = e ? function (t) {return Array.isArray(t) ? t.reduce(d, {}) : Object.assign({}, t);}(e) : {};if (!t) return n;var r = (t = t.filter(function (t) {return t.tag || "" !== t.text.trim();})).every(y);return t.reduce(r ? b : d, n);}(u.default, c) : u),f = a.tag && !0 !== a.tag || !1 === a.tag ? a.tag : "span";return f ? t(f, n, h) : h;}} };function b(t, e) {return e.data && e.data.attrs && e.data.attrs.place && (t[e.data.attrs.place] = e), t;}function d(t, e, n) {return t[n] = e, t;}function y(t) {return Boolean(t.data && t.data.attrs && t.data.attrs.place);}var F,k = { name: "i18n-n", functional: !0, props: { tag: { type: [String, Boolean, Object], default: "span" }, value: { type: Number, required: !0 }, format: { type: [String, Object] }, locale: { type: String } }, render: function render(e, n) {var i = n.props,o = n.parent,s = n.data,l = o.$i18n;if (!l) return null;var c = null,u = null;a(i.format) ? c = i.format : r(i.format) && (i.format.key && (c = i.format.key), u = Object.keys(i.format).reduce(function (e, n) {var r;return h(t, n) ? Object.assign({}, e, ((r = {})[n] = i.format[n], r)) : e;}, null));var f = i.locale || l.locale,p = l._ntp(i.value, f, c, u),m = p.map(function (t, e) {var n,r = s.scopedSlots && s.scopedSlots[t.type];return r ? r(((n = {})[t.type] = t.value, n.index = e, n.parts = p, n)) : t.value;}),_ = i.tag && !0 !== i.tag || !1 === i.tag ? i.tag : "span";return _ ? e(_, { attrs: s.attrs, class: s.class, staticClass: s.staticClass }, m) : m;} };function w(t, e, n) {C(t, n) && T(t, e, n);}function $(t, e, n, r) {if (C(t, n)) {var a = n.context.$i18n;(function (t, e) {var n = e.context;return t._locale === n.$i18n.locale;})(t, n) && _(e.value, e.oldValue) && _(t._localeMessage, a.getLocaleMessage(a.locale)) || T(t, e, n);}}function M(t, n, r, a) {if (r.context) {var i = r.context.$i18n || {};n.modifiers.preserve || i.preserveDirectiveContent || (t.textContent = ""), t._vt = void 0, delete t._vt, t._locale = void 0, delete t._locale, t._localeMessage = void 0, delete t._localeMessage;} else e("Vue instance does not exists in VNode context");}function C(t, n) {var r = n.context;return r ? !!r.$i18n || (e("VueI18n instance does not exists in Vue instance"), !1) : (e("Vue instance does not exists in VNode context"), !1);}function T(t, n, r) {var i,o,l = function (t) {var e, n, r, i;a(t) ? e = t : s(t) && (e = t.path, n = t.locale, r = t.args, i = t.choice);return { path: e, locale: n, args: r, choice: i };}(n.value),c = l.path,u = l.locale,h = l.args,f = l.choice;if (c || u || h) {if (c) {var p = r.context;t._vt = t.textContent = null != f ? (i = p.$i18n).tc.apply(i, [c, f].concat(L(u, h))) : (o = p.$i18n).t.apply(o, [c].concat(L(u, h))), t._locale = p.$i18n.locale, t._localeMessage = p.$i18n.getLocaleMessage(p.$i18n.locale);} else e("`path` is required in v-t directive");} else e("value type not supported");}function L(t, e) {var n = [];return t && n.push(t), e && (Array.isArray(e) || s(e)) && n.push(e), n;}function I(t) {I.installed = !0;(F = t).version && Number(F.version.split(".")[0]);!function (t) {t.prototype.hasOwnProperty("$i18n") || Object.defineProperty(t.prototype, "$i18n", { get: function get() {return this._i18n;} }), t.prototype.$t = function (t) {for (var e = [], n = arguments.length - 1; n-- > 0;) {e[n] = arguments[n + 1];}var r = this.$i18n;return r._t.apply(r, [t, r.locale, r._getMessages(), this].concat(e));}, t.prototype.$tc = function (t, e) {for (var n = [], r = arguments.length - 2; r-- > 0;) {n[r] = arguments[r + 2];}var a = this.$i18n;return a._tc.apply(a, [t, a.locale, a._getMessages(), this, e].concat(n));}, t.prototype.$te = function (t, e) {var n = this.$i18n;return n._te(t, n.locale, n._getMessages(), e);}, t.prototype.$d = function (t) {for (var e, n = [], r = arguments.length - 1; r-- > 0;) {n[r] = arguments[r + 1];}return (e = this.$i18n).d.apply(e, [t].concat(n));}, t.prototype.$n = function (t) {for (var e, n = [], r = arguments.length - 1; r-- > 0;) {n[r] = arguments[r + 1];}return (e = this.$i18n).n.apply(e, [t].concat(n));};}(F), F.mixin(g), F.directive("t", { bind: w, update: $, unbind: M }), F.component(v.name, v), F.component(k.name, k), F.config.optionMergeStrategies.i18n = function (t, e) {return void 0 === e ? t : e;};}var D = function D() {this._caches = Object.create(null);};D.prototype.interpolate = function (t, e) {if (!e) return [t];var n = this._caches[t];return n || (n = function (t) {var e = [],n = 0,r = "";for (; n < t.length;) {var a = t[n++];if ("{" === a) {r && e.push({ type: "text", value: r }), r = "";var i = "";for (a = t[n++]; void 0 !== a && "}" !== a;) {i += a, a = t[n++];}var o = "}" === a,s = O.test(i) ? "list" : o && x.test(i) ? "named" : "unknown";e.push({ value: i, type: s });} else "%" === a ? "{" !== t[n] && (r += a) : r += a;}return r && e.push({ type: "text", value: r }), e;}(t), this._caches[t] = n), function (t, e) {var n = [],a = 0,i = Array.isArray(e) ? "list" : r(e) ? "named" : "unknown";if ("unknown" === i) return n;for (; a < t.length;) {var o = t[a];switch (o.type) {case "text":n.push(o.value);break;case "list":n.push(e[parseInt(o.value, 10)]);break;case "named":"named" === i && n.push(e[o.value]);}a++;}return n;}(n, e);};var O = /^(?:\d)+/,x = /^(?:\w)+/,W = 0,j = 1,N = 2,A = 3,S = 0,R = 4,H = 5,P = 6,V = 7,E = 8,z = [];z[S] = { ws: [S], ident: [3, W], "[": [R], eof: [V] }, z[1] = { ws: [1], ".": [2], "[": [R], eof: [V] }, z[2] = { ws: [2], ident: [3, W], 0: [3, W], number: [3, W] }, z[3] = { ident: [3, W], 0: [3, W], number: [3, W], ws: [1, j], ".": [2, j], "[": [R, j], eof: [V, j] }, z[R] = { "'": [H, W], '"': [P, W], "[": [R, N], "]": [1, A], eof: E, else: [R, W] }, z[H] = { "'": [R, W], eof: E, else: [H, W] }, z[P] = { '"': [R, W], eof: E, else: [P, W] };var B = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function U(t) {if (null == t) return "eof";switch (t.charCodeAt(0)) {case 91:case 93:case 46:case 34:case 39:return t;case 95:case 36:case 45:return "ident";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return "ws";}return "ident";}function J(t) {var e,n,r,a = t.trim();return ("0" !== t.charAt(0) || !isNaN(t)) && (r = a, B.test(r) ? (n = (e = a).charCodeAt(0)) !== e.charCodeAt(e.length - 1) || 34 !== n && 39 !== n ? e : e.slice(1, -1) : "*" + a);}var q = function q() {this._cache = Object.create(null);};q.prototype.parsePath = function (t) {var e = this._cache[t];return e || (e = function (t) {var e,n,r,a,i,o,s,l = [],c = -1,u = S,h = 0,f = [];function p() {var e = t[c + 1];if (u === H && "'" === e || u === P && '"' === e) return c++, r = "\\" + e, f[W](), !0;}for (f[j] = function () {void 0 !== n && (l.push(n), n = void 0);}, f[W] = function () {void 0 === n ? n = r : n += r;}, f[N] = function () {f[W](), h++;}, f[A] = function () {if (h > 0) h--, u = R, f[W]();else {if (h = 0, void 0 === n) return !1;if (!1 === (n = J(n))) return !1;f[j]();}}; null !== u;) {if ("\\" !== (e = t[++c]) || !p()) {if (a = U(e), (i = (s = z[u])[a] || s.else || E) === E) return;if (u = i[0], (o = f[i[1]]) && (r = void 0 === (r = i[2]) ? e : r, !1 === o())) return;if (u === V) return l;}}}(t)) && (this._cache[t] = e), e || [];}, q.prototype.getPathValue = function (t, e) {if (!r(t)) return null;var n = this.parsePath(e);if (0 === n.length) return null;for (var a = n.length, i = t, o = 0; o < a;) {var s = i[n[o]];if (void 0 === s) return null;i = s, o++;}return i;};var G,X = /<\/?[\w\s="/.':;#-\/]+>/,Z = /(?:@(?:\.[a-z]+)?:(?:[\w\-_|.]+|\([\w\-_|.]+\)))/g,K = /^@(?:\.([a-z]+))?:/,Q = /[()]/g,Y = { upper: function upper(t) {return t.toLocaleUpperCase();}, lower: function lower(t) {return t.toLocaleLowerCase();}, capitalize: function capitalize(t) {return "" + t.charAt(0).toLocaleUpperCase() + t.substr(1);} },tt = new D(),et = function et(t) {var e = this;void 0 === t && (t = {}), !F && "undefined" != typeof window && window.Vue && I(window.Vue);var n = t.locale || "en-US",r = !1 !== t.fallbackLocale && (t.fallbackLocale || "en-US"),a = t.messages || {},i = t.dateTimeFormats || {},o = t.numberFormats || {};this._vm = null, this._formatter = t.formatter || tt, this._modifiers = t.modifiers || {}, this._missing = t.missing || null, this._root = t.root || null, this._sync = void 0 === t.sync || !!t.sync, this._fallbackRoot = void 0 === t.fallbackRoot || !!t.fallbackRoot, this._formatFallbackMessages = void 0 !== t.formatFallbackMessages && !!t.formatFallbackMessages, this._silentTranslationWarn = void 0 !== t.silentTranslationWarn && t.silentTranslationWarn, this._silentFallbackWarn = void 0 !== t.silentFallbackWarn && !!t.silentFallbackWarn, this._dateTimeFormatters = {}, this._numberFormatters = {}, this._path = new q(), this._dataListeners = [], this._componentInstanceCreatedListener = t.componentInstanceCreatedListener || null, this._preserveDirectiveContent = void 0 !== t.preserveDirectiveContent && !!t.preserveDirectiveContent, this.pluralizationRules = t.pluralizationRules || {}, this._warnHtmlInMessage = t.warnHtmlInMessage || "off", this._postTranslation = t.postTranslation || null, this.getChoiceIndex = function (t, n) {var r = Object.getPrototypeOf(e);if (r && r.getChoiceIndex) return r.getChoiceIndex.call(e, t, n);var a, i;return e.locale in e.pluralizationRules ? e.pluralizationRules[e.locale].apply(e, [t, n]) : (a = t, i = n, a = Math.abs(a), 2 === i ? a ? a > 1 ? 1 : 0 : 1 : a ? Math.min(a, 2) : 0);}, this._exist = function (t, n) {return !(!t || !n) && (!l(e._path.getPathValue(t, n)) || !!t[n]);}, "warn" !== this._warnHtmlInMessage && "error" !== this._warnHtmlInMessage || Object.keys(a).forEach(function (t) {e._checkLocaleMessage(t, e._warnHtmlInMessage, a[t]);}), this._initVM({ locale: n, fallbackLocale: r, messages: a, dateTimeFormats: i, numberFormats: o });},nt = { vm: { configurable: !0 }, messages: { configurable: !0 }, dateTimeFormats: { configurable: !0 }, numberFormats: { configurable: !0 }, availableLocales: { configurable: !0 }, locale: { configurable: !0 }, fallbackLocale: { configurable: !0 }, formatFallbackMessages: { configurable: !0 }, missing: { configurable: !0 }, formatter: { configurable: !0 }, silentTranslationWarn: { configurable: !0 }, silentFallbackWarn: { configurable: !0 }, preserveDirectiveContent: { configurable: !0 }, warnHtmlInMessage: { configurable: !0 }, postTranslation: { configurable: !0 } };return et.prototype._checkLocaleMessage = function (t, n, r) {var i = function i(t, n, r, o) {if (s(r)) Object.keys(r).forEach(function (e) {var a = r[e];s(a) ? (o.push(e), o.push("."), i(t, n, a, o), o.pop(), o.pop()) : (o.push(e), i(t, n, a, o), o.pop());});else if (Array.isArray(r)) r.forEach(function (e, r) {s(e) ? (o.push("[" + r + "]"), o.push("."), i(t, n, e, o), o.pop(), o.pop()) : (o.push("[" + r + "]"), i(t, n, e, o), o.pop());});else if (a(r)) {if (X.test(r)) {var l = "Detected HTML in message '" + r + "' of keypath '" + o.join("") + "' at '" + n + "'. Consider component interpolation with '<i18n>' to avoid XSS. See https://bit.ly/2ZqJzkp";"warn" === t ? e(l) : "error" === t && function (t, e) {"undefined" != typeof console && (console.error("[vue-i18n] " + t), e && console.error(e.stack));}(l);}}};i(n, t, r, []);}, et.prototype._initVM = function (t) {var e = F.config.silent;F.config.silent = !0, this._vm = new F({ data: t }), F.config.silent = e;}, et.prototype.destroyVM = function () {this._vm.$destroy();}, et.prototype.subscribeDataChanging = function (t) {this._dataListeners.push(t);}, et.prototype.unsubscribeDataChanging = function (t) {!function (t, e) {if (t.length) {var n = t.indexOf(e);if (n > -1) t.splice(n, 1);}}(this._dataListeners, t);}, et.prototype.watchI18nData = function () {var t = this;return this._vm.$watch("$data", function () {for (var e = t._dataListeners.length; e--;) {F.nextTick(function () {t._dataListeners[e] && t._dataListeners[e].$forceUpdate();});}}, { deep: !0 });}, et.prototype.watchLocale = function () {if (!this._sync || !this._root) return null;var t = this._vm;return this._root.$i18n.vm.$watch("locale", function (e) {t.$set(t, "locale", e), t.$forceUpdate();}, { immediate: !0 });}, et.prototype.onComponentInstanceCreated = function (t) {this._componentInstanceCreatedListener && this._componentInstanceCreatedListener(t, this);}, nt.vm.get = function () {return this._vm;}, nt.messages.get = function () {return u(this._getMessages());}, nt.dateTimeFormats.get = function () {return u(this._getDateTimeFormats());}, nt.numberFormats.get = function () {return u(this._getNumberFormats());}, nt.availableLocales.get = function () {return Object.keys(this.messages).sort();}, nt.locale.get = function () {return this._vm.locale;}, nt.locale.set = function (t) {this._vm.$set(this._vm, "locale", t);}, nt.fallbackLocale.get = function () {return this._vm.fallbackLocale;}, nt.fallbackLocale.set = function (t) {this._localeChainCache = {}, this._vm.$set(this._vm, "fallbackLocale", t);}, nt.formatFallbackMessages.get = function () {return this._formatFallbackMessages;}, nt.formatFallbackMessages.set = function (t) {this._formatFallbackMessages = t;}, nt.missing.get = function () {return this._missing;}, nt.missing.set = function (t) {this._missing = t;}, nt.formatter.get = function () {return this._formatter;}, nt.formatter.set = function (t) {this._formatter = t;}, nt.silentTranslationWarn.get = function () {return this._silentTranslationWarn;}, nt.silentTranslationWarn.set = function (t) {this._silentTranslationWarn = t;}, nt.silentFallbackWarn.get = function () {return this._silentFallbackWarn;}, nt.silentFallbackWarn.set = function (t) {this._silentFallbackWarn = t;}, nt.preserveDirectiveContent.get = function () {return this._preserveDirectiveContent;}, nt.preserveDirectiveContent.set = function (t) {this._preserveDirectiveContent = t;}, nt.warnHtmlInMessage.get = function () {return this._warnHtmlInMessage;}, nt.warnHtmlInMessage.set = function (t) {var e = this,n = this._warnHtmlInMessage;if (this._warnHtmlInMessage = t, n !== t && ("warn" === t || "error" === t)) {var r = this._getMessages();Object.keys(r).forEach(function (t) {e._checkLocaleMessage(t, e._warnHtmlInMessage, r[t]);});}}, nt.postTranslation.get = function () {return this._postTranslation;}, nt.postTranslation.set = function (t) {this._postTranslation = t;}, et.prototype._getMessages = function () {return this._vm.messages;}, et.prototype._getDateTimeFormats = function () {return this._vm.dateTimeFormats;}, et.prototype._getNumberFormats = function () {return this._vm.numberFormats;}, et.prototype._warnDefault = function (t, e, n, r, i, o) {if (!l(n)) return n;if (this._missing) {var s = this._missing.apply(null, [t, e, r, i]);if (a(s)) return s;}if (this._formatFallbackMessages) {var u = c.apply(void 0, i);return this._render(e, o, u.params, e);}return e;}, et.prototype._isFallbackRoot = function (t) {return !t && !l(this._root) && this._fallbackRoot;}, et.prototype._isSilentFallbackWarn = function (t) {return this._silentFallbackWarn instanceof RegExp ? this._silentFallbackWarn.test(t) : this._silentFallbackWarn;}, et.prototype._isSilentFallback = function (t, e) {return this._isSilentFallbackWarn(e) && (this._isFallbackRoot() || t !== this.fallbackLocale);}, et.prototype._isSilentTranslationWarn = function (t) {return this._silentTranslationWarn instanceof RegExp ? this._silentTranslationWarn.test(t) : this._silentTranslationWarn;}, et.prototype._interpolate = function (t, e, n, r, i, o, c) {if (!e) return null;var u,h = this._path.getPathValue(e, n);if (Array.isArray(h) || s(h)) return h;if (l(h)) {if (!s(e)) return null;if (!a(u = e[n])) return null;} else {if (!a(h)) return null;u = h;}return (u.indexOf("@:") >= 0 || u.indexOf("@.") >= 0) && (u = this._link(t, e, u, r, "raw", o, c)), this._render(u, i, o, n);}, et.prototype._link = function (t, e, n, r, a, i, o) {var s = n,l = s.match(Z);for (var c in l) {if (l.hasOwnProperty(c)) {var u = l[c],f = u.match(K),p = f[0],m = f[1],_ = u.replace(p, "").replace(Q, "");if (h(o, _)) return s;o.push(_);var g = this._interpolate(t, e, _, r, "raw" === a ? "string" : a, "raw" === a ? void 0 : i, o);if (this._isFallbackRoot(g)) {if (!this._root) throw Error("unexpected error");var v = this._root.$i18n;g = v._translate(v._getMessages(), v.locale, v.fallbackLocale, _, r, a, i);}g = this._warnDefault(t, _, g, r, Array.isArray(i) ? i : [i], a), this._modifiers.hasOwnProperty(m) ? g = this._modifiers[m](g) : Y.hasOwnProperty(m) && (g = Y[m](g)), o.pop(), s = g ? s.replace(u, g) : s;}}return s;}, et.prototype._render = function (t, e, n, r) {var i = this._formatter.interpolate(t, n, r);return i || (i = tt.interpolate(t, n, r)), "string" !== e || a(i) ? i : i.join("");}, et.prototype._appendItemToChain = function (t, e, n) {var r = !1;return h(t, e) || (r = !0, e && (r = "!" !== e[e.length - 1], e = e.replace(/!/g, ""), t.push(e), n && n[e] && (r = n[e]))), r;}, et.prototype._appendLocaleToChain = function (t, e, n) {var r,a = e.split("-");do {var i = a.join("-");r = this._appendItemToChain(t, i, n), a.splice(-1, 1);} while (a.length && !0 === r);return r;}, et.prototype._appendBlockToChain = function (t, e, n) {for (var r = !0, i = 0; i < e.length && "boolean" == typeof r; i++) {var o = e[i];a(o) && (r = this._appendLocaleToChain(t, o, n));}return r;}, et.prototype._getLocaleChain = function (t, e) {if ("" === t) return [];this._localeChainCache || (this._localeChainCache = {});var i = this._localeChainCache[t];if (!i) {e || (e = this.fallbackLocale), i = [];for (var o, s = [t]; n(s);) {s = this._appendBlockToChain(i, s, e);}(s = a(o = n(e) ? e : r(e) ? e.default ? e.default : null : e) ? [o] : o) && this._appendBlockToChain(i, s, null), this._localeChainCache[t] = i;}return i;}, et.prototype._translate = function (t, e, n, r, a, i, o) {for (var s, c = this._getLocaleChain(e, n), u = 0; u < c.length; u++) {var h = c[u];if (!l(s = this._interpolate(h, t[h], r, a, i, o, [r]))) return s;}return null;}, et.prototype._t = function (t, e, n, r) {for (var a, i = [], o = arguments.length - 4; o-- > 0;) {i[o] = arguments[o + 4];}if (!t) return "";var s = c.apply(void 0, i),l = s.locale || e,u = this._translate(n, l, this.fallbackLocale, t, r, "string", s.params);if (this._isFallbackRoot(u)) {if (!this._root) throw Error("unexpected error");return (a = this._root).$t.apply(a, [t].concat(i));}return u = this._warnDefault(l, t, u, r, i, "string"), this._postTranslation && null != u && (u = this._postTranslation(u, t)), u;}, et.prototype.t = function (t) {for (var e, n = [], r = arguments.length - 1; r-- > 0;) {n[r] = arguments[r + 1];}return (e = this)._t.apply(e, [t, this.locale, this._getMessages(), null].concat(n));}, et.prototype._i = function (t, e, n, r, a) {var i = this._translate(n, e, this.fallbackLocale, t, r, "raw", a);if (this._isFallbackRoot(i)) {if (!this._root) throw Error("unexpected error");return this._root.$i18n.i(t, e, a);}return this._warnDefault(e, t, i, r, [a], "raw");}, et.prototype.i = function (t, e, n) {return t ? (a(e) || (e = this.locale), this._i(t, e, this._getMessages(), null, n)) : "";}, et.prototype._tc = function (t, e, n, r, a) {for (var i, o = [], s = arguments.length - 5; s-- > 0;) {o[s] = arguments[s + 5];}if (!t) return "";void 0 === a && (a = 1);var l = { count: a, n: a },u = c.apply(void 0, o);return u.params = Object.assign(l, u.params), o = null === u.locale ? [u.params] : [u.locale, u.params], this.fetchChoice((i = this)._t.apply(i, [t, e, n, r].concat(o)), a);}, et.prototype.fetchChoice = function (t, e) {if (!t && !a(t)) return null;var n = t.split("|");return n[e = this.getChoiceIndex(e, n.length)] ? n[e].trim() : t;}, et.prototype.tc = function (t, e) {for (var n, r = [], a = arguments.length - 2; a-- > 0;) {r[a] = arguments[a + 2];}return (n = this)._tc.apply(n, [t, this.locale, this._getMessages(), null, e].concat(r));}, et.prototype._te = function (t, e, n) {for (var r = [], a = arguments.length - 3; a-- > 0;) {r[a] = arguments[a + 3];}var i = c.apply(void 0, r).locale || e;return this._exist(n[i], t);}, et.prototype.te = function (t, e) {return this._te(t, this.locale, this._getMessages(), e);}, et.prototype.getLocaleMessage = function (t) {return u(this._vm.messages[t] || {});}, et.prototype.setLocaleMessage = function (t, e) {"warn" !== this._warnHtmlInMessage && "error" !== this._warnHtmlInMessage || this._checkLocaleMessage(t, this._warnHtmlInMessage, e), this._vm.$set(this._vm.messages, t, e);}, et.prototype.mergeLocaleMessage = function (t, e) {"warn" !== this._warnHtmlInMessage && "error" !== this._warnHtmlInMessage || this._checkLocaleMessage(t, this._warnHtmlInMessage, e), this._vm.$set(this._vm.messages, t, m({}, this._vm.messages[t] || {}, e));}, et.prototype.getDateTimeFormat = function (t) {return u(this._vm.dateTimeFormats[t] || {});}, et.prototype.setDateTimeFormat = function (t, e) {this._vm.$set(this._vm.dateTimeFormats, t, e), this._clearDateTimeFormat(t, e);}, et.prototype.mergeDateTimeFormat = function (t, e) {this._vm.$set(this._vm.dateTimeFormats, t, m(this._vm.dateTimeFormats[t] || {}, e)), this._clearDateTimeFormat(t, e);}, et.prototype._clearDateTimeFormat = function (t, e) {for (var n in e) {var r = t + "__" + n;this._dateTimeFormatters.hasOwnProperty(r) && delete this._dateTimeFormatters[r];}}, et.prototype._localizeDateTime = function (t, e, n, r, a) {for (var i = e, o = r[i], s = this._getLocaleChain(e, n), c = 0; c < s.length; c++) {var u = s[c];if (i = u, !l(o = r[u]) && !l(o[a])) break;}if (l(o) || l(o[a])) return null;var h = o[a],f = i + "__" + a,p = this._dateTimeFormatters[f];return p || (p = this._dateTimeFormatters[f] = new Intl.DateTimeFormat(i, h)), p.format(t);}, et.prototype._d = function (t, e, n) {if (!n) return new Intl.DateTimeFormat(e).format(t);var r = this._localizeDateTime(t, e, this.fallbackLocale, this._getDateTimeFormats(), n);if (this._isFallbackRoot(r)) {if (!this._root) throw Error("unexpected error");return this._root.$i18n.d(t, n, e);}return r || "";}, et.prototype.d = function (t) {for (var e = [], n = arguments.length - 1; n-- > 0;) {e[n] = arguments[n + 1];}var i = this.locale,o = null;return 1 === e.length ? a(e[0]) ? o = e[0] : r(e[0]) && (e[0].locale && (i = e[0].locale), e[0].key && (o = e[0].key)) : 2 === e.length && (a(e[0]) && (o = e[0]), a(e[1]) && (i = e[1])), this._d(t, i, o);}, et.prototype.getNumberFormat = function (t) {return u(this._vm.numberFormats[t] || {});}, et.prototype.setNumberFormat = function (t, e) {this._vm.$set(this._vm.numberFormats, t, e), this._clearNumberFormat(t, e);}, et.prototype.mergeNumberFormat = function (t, e) {this._vm.$set(this._vm.numberFormats, t, m(this._vm.numberFormats[t] || {}, e)), this._clearNumberFormat(t, e);}, et.prototype._clearNumberFormat = function (t, e) {for (var n in e) {var r = t + "__" + n;this._numberFormatters.hasOwnProperty(r) && delete this._numberFormatters[r];}}, et.prototype._getNumberFormatter = function (t, e, n, r, a, i) {for (var o = e, s = r[o], c = this._getLocaleChain(e, n), u = 0; u < c.length; u++) {var h = c[u];if (o = h, !l(s = r[h]) && !l(s[a])) break;}if (l(s) || l(s[a])) return null;var f,p = s[a];if (i) f = new Intl.NumberFormat(o, Object.assign({}, p, i));else {var m = o + "__" + a;(f = this._numberFormatters[m]) || (f = this._numberFormatters[m] = new Intl.NumberFormat(o, p));}return f;}, et.prototype._n = function (t, e, n, r) {if (!et.availabilities.numberFormat) return "";if (!n) return (r ? new Intl.NumberFormat(e, r) : new Intl.NumberFormat(e)).format(t);var a = this._getNumberFormatter(t, e, this.fallbackLocale, this._getNumberFormats(), n, r),i = a && a.format(t);if (this._isFallbackRoot(i)) {if (!this._root) throw Error("unexpected error");return this._root.$i18n.n(t, Object.assign({}, { key: n, locale: e }, r));}return i || "";}, et.prototype.n = function (e) {for (var n = [], i = arguments.length - 1; i-- > 0;) {n[i] = arguments[i + 1];}var o = this.locale,s = null,l = null;return 1 === n.length ? a(n[0]) ? s = n[0] : r(n[0]) && (n[0].locale && (o = n[0].locale), n[0].key && (s = n[0].key), l = Object.keys(n[0]).reduce(function (e, r) {var a;return h(t, r) ? Object.assign({}, e, ((a = {})[r] = n[0][r], a)) : e;}, null)) : 2 === n.length && (a(n[0]) && (s = n[0]), a(n[1]) && (o = n[1])), this._n(e, o, s, l);}, et.prototype._ntp = function (t, e, n, r) {if (!et.availabilities.numberFormat) return [];if (!n) return (r ? new Intl.NumberFormat(e, r) : new Intl.NumberFormat(e)).formatToParts(t);var a = this._getNumberFormatter(t, e, this.fallbackLocale, this._getNumberFormats(), n, r),i = a && a.formatToParts(t);if (this._isFallbackRoot(i)) {if (!this._root) throw Error("unexpected error");return this._root.$i18n._ntp(t, e, n, r);}return i || [];}, Object.defineProperties(et.prototype, nt), Object.defineProperty(et, "availabilities", { get: function get() {if (!G) {var t = "undefined" != typeof Intl;G = { dateTimeFormat: t && void 0 !== Intl.DateTimeFormat, numberFormat: t && void 0 !== Intl.NumberFormat };}return G;} }), et.install = I, et.version = "8.20.0", et;}, true ? module.exports = e() : undefined;
  13395. /***/ }),
  13396. /***/ 46:
  13397. /*!*******************************************************************************************!*\
  13398. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/common/http.interceptor.js ***!
  13399. \*******************************************************************************************/
  13400. /*! no static exports found */
  13401. /***/ (function(module, exports, __webpack_require__) {
  13402. "use strict";
  13403. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // 这里的vm,就是我们在vue文件里面的this,所以我们能在这里获取vuex的变量,比如存放在里面的token
  13404. // 同时,我们也可以在此使用getApp().globalData,如果你把token放在getApp().globalData的话,也是可以使用的
  13405. var install = function install(Vue, vm) {
  13406. Vue.prototype.$u.http.setConfig({
  13407. // baseUrl: 'http://mt.mentor.site.ximengnaikang.com/api',
  13408. baseUrl: '/api',
  13409. // baseUrl:'https://bcsyds.hactcm.edu.cn/api',
  13410. originalData: true,
  13411. dataType: 'json',
  13412. showLoading: true, // 是否显示请求中的loading
  13413. loadingText: '请求中...', // 请求loading中的文字提示
  13414. loadingTime: 100, // 在此时间内,请求还没回来的话,就显示加载中动画,单位ms
  13415. loadingMask: true, // 展示loading的时候,是否给一个透明的蒙层,防止触摸穿透
  13416. // loadingMask: true, // 展示loading的时候,是否给一个透明的蒙层,防止触摸穿透
  13417. // 设置自定义头部content-type
  13418. header: {
  13419. 'content-type': 'application/json',
  13420. 'type': 'app' } });
  13421. // 请求拦截,配置Token等参数
  13422. Vue.prototype.$u.http.interceptor.request = function (config) {
  13423. // config.header.Token = 'xxxxxx';
  13424. // 方式一,存放在vuex的token,假设使用了uView封装的vuex方式,见:https://uviewui.com/components/globalVariable.html
  13425. // config.header.token = vm.token;
  13426. config.header.Authorization = vm.vuex_token;
  13427. // 方式二,如果没有使用uView封装的vuex方法,那么需要使用$store.state获取
  13428. // config.header.token = vm.$store.state.token;
  13429. // 方式三,如果token放在了globalData,通过getApp().globalData获取
  13430. // config.header.token = getApp().globalData.username;
  13431. // 方式四,如果token放在了Storage本地存储中,拦截是每次请求都执行的,所以哪怕您重新登录修改了Storage,下一次的请求将会是最新值
  13432. // const token = uni.getStorageSync('token');
  13433. // config.header.token = token;
  13434. return config;
  13435. };
  13436. // 响应拦截,判断状态码是否通过
  13437. Vue.prototype.$u.http.interceptor.response = function (res) {
  13438. // 如果把originalData设置为了true,这里得到将会是服务器返回的所有的原始数据
  13439. // 判断可能变成了res.statueCode,或者res.data.code之类的,请打印查看结果
  13440. if (res.statusCode == 401) {
  13441. console.log("重新登录");
  13442. uni.reLaunch({
  13443. url: "/pages/login/index" });
  13444. return;
  13445. }
  13446. if (res.statusCode == 422) {
  13447. Vue.prototype.$u.toast(res.data.message);
  13448. return false;
  13449. }
  13450. if (res.statusCode == 400) {
  13451. Vue.prototype.$u.toast(res.data.message);
  13452. return false;
  13453. }
  13454. if (res.statusCode == 423) {
  13455. Vue.prototype.$u.toast(res.data.message);
  13456. return false;
  13457. }
  13458. if (res.statusCode == 500) {
  13459. Vue.prototype.$u.toast(res.data.message);
  13460. return false;
  13461. }
  13462. if (res.statusCode < 300 && res.statusCode >= 200) {
  13463. // 如果把originalData设置为了true,这里return回什么,this.$u.post的then回调中就会得到什么
  13464. return res.data;
  13465. } else return false;
  13466. };
  13467. };var _default =
  13468. {
  13469. install: install };exports.default = _default;
  13470. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  13471. /***/ }),
  13472. /***/ 47:
  13473. /*!***********************************************************************************!*\
  13474. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/common/http.api.js ***!
  13475. \***********************************************************************************/
  13476. /*! no static exports found */
  13477. /***/ (function(module, exports, __webpack_require__) {
  13478. "use strict";
  13479. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // 如果没有通过拦截器配置域名的话,可以在这里写上完整的URL(加上域名部分)
  13480. var hotSearchUrl = '/ebapi/store_api/hot_search';
  13481. var indexUrl = '/ebapi/public_api/index';
  13482. // 此处第二个参数vm,就是我们在页面使用的this,你可以通过vm获取vuex等操作,更多内容详见uView对拦截器的介绍部分:
  13483. // https://uviewui.com/js/http.html#%E4%BD%95%E8%B0%93%E8%AF%B7%E6%B1%82%E6%8B%A6%E6%88%AA%EF%BC%9F
  13484. var install = function install(Vue, vm) {
  13485. // 此处没有使用传入的params参数
  13486. var getSearch = function getSearch() {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};return vm.$u.get(hotSearchUrl, {
  13487. id: 2 });};
  13488. // 此处使用了传入的params参数,一切自定义即可
  13489. var getInfo = function getInfo() {var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};return vm.$u.post(indexUrl, params);};
  13490. // 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
  13491. vm.$u.api = { getSearch: getSearch, getInfo: getInfo };
  13492. };var _default =
  13493. {
  13494. install: install };exports.default = _default;
  13495. /***/ }),
  13496. /***/ 48:
  13497. /*!**********************************************************************************!*\
  13498. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/store/$u.mixin.js ***!
  13499. \**********************************************************************************/
  13500. /*! no static exports found */
  13501. /***/ (function(module, exports, __webpack_require__) {
  13502. "use strict";
  13503. var _vuex = __webpack_require__(/*! vuex */ 42);
  13504. var _store = _interopRequireDefault(__webpack_require__(/*! @/store */ 41));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 _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;}
  13505. // 尝试将用户在根目录中的store/index.js的vuex的state变量,全部加载到全局变量中
  13506. var $uStoreKey = [];
  13507. try {
  13508. $uStoreKey = _store.default.state ? Object.keys(_store.default.state) : [];
  13509. } catch (e) {
  13510. }
  13511. module.exports = {
  13512. beforeCreate: function beforeCreate() {var _this = this;
  13513. // 将vuex方法挂在到$u中
  13514. // 使用方法为:如果要修改vuex的state中的user.name变量为"史诗" => this.$u.vuex('user.name', '史诗')
  13515. // 如果要修改vuex的state的version变量为1.0.1 => this.$u.vuex('version', '1.0.1')
  13516. this.$u.vuex = function (name, value) {
  13517. _this.$store.commit('$uStore', {
  13518. name: name, value: value });
  13519. };
  13520. },
  13521. computed: _objectSpread({},
  13522. (0, _vuex.mapState)($uStoreKey)) };
  13523. /***/ }),
  13524. /***/ 49:
  13525. /*!***********************************************************************************************!*\
  13526. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/uview-ui/libs/mixin/mpShare.js ***!
  13527. \***********************************************************************************************/
  13528. /*! no static exports found */
  13529. /***/ (function(module, exports) {
  13530. module.exports = {
  13531. onLoad: function onLoad() {
  13532. // 设置默认的转发参数
  13533. this.$u.mpShare = {
  13534. title: '', // 默认为小程序名称
  13535. path: '', // 默认为当前页面路径
  13536. imageUrl: '' // 默认为当前页面的截图
  13537. };
  13538. },
  13539. onShareAppMessage: function onShareAppMessage() {
  13540. return this.$u.mpShare;
  13541. },
  13542. onShareTimeline: function onShareTimeline() {
  13543. return this.$u.mpShare;
  13544. } };
  13545. /***/ }),
  13546. /***/ 5:
  13547. /*!***************************************************************************!*\
  13548. !*** D:/HbuderX-exercise/shangzhen-daoshi/daoshiyuyue-teacher/pages.json ***!
  13549. \***************************************************************************/
  13550. /*! no static exports found */
  13551. /***/ (function(module, exports) {
  13552. /***/ })
  13553. }]);
  13554. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map