vendor.js 293 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],{
  2. /***/ 1:
  3. /*!*********************************************************!*\
  4. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js ***!
  5. \*********************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. "use strict";
  9. Object.defineProperty(exports, "__esModule", {
  10. value: true
  11. });
  12. exports.default = void 0;
  13. var objectKeys = ['qy', 'env', 'error', 'version', 'lanDebug', 'cloud', 'serviceMarket', 'router', 'worklet', '__webpack_require_UNI_MP_PLUGIN__'];
  14. var singlePageDisableKey = ['lanDebug', 'router', 'worklet'];
  15. var target = typeof globalThis !== 'undefined' ? globalThis : function () {
  16. return this;
  17. }();
  18. var key = ['w', 'x'].join('');
  19. var oldWx = target[key];
  20. var launchOption = oldWx.getLaunchOptionsSync ? oldWx.getLaunchOptionsSync() : null;
  21. function isWxKey(key) {
  22. if (launchOption && launchOption.scene === 1154 && singlePageDisableKey.includes(key)) {
  23. return false;
  24. }
  25. return objectKeys.indexOf(key) > -1 || typeof oldWx[key] === 'function';
  26. }
  27. function initWx() {
  28. var newWx = {};
  29. for (var _key in oldWx) {
  30. if (isWxKey(_key)) {
  31. // TODO wrapper function
  32. newWx[_key] = oldWx[_key];
  33. }
  34. }
  35. return newWx;
  36. }
  37. target[key] = initWx();
  38. var _default = target[key];
  39. exports.default = _default;
  40. /***/ }),
  41. /***/ 10:
  42. /*!****************************************************************!*\
  43. !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
  44. \****************************************************************/
  45. /*! no static exports found */
  46. /***/ (function(module, exports) {
  47. function _nonIterableRest() {
  48. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  49. }
  50. module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
  51. /***/ }),
  52. /***/ 11:
  53. /*!***************************************************************!*\
  54. !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
  55. \***************************************************************/
  56. /*! no static exports found */
  57. /***/ (function(module, exports, __webpack_require__) {
  58. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  59. function _defineProperty(obj, key, value) {
  60. key = toPropertyKey(key);
  61. if (key in obj) {
  62. Object.defineProperty(obj, key, {
  63. value: value,
  64. enumerable: true,
  65. configurable: true,
  66. writable: true
  67. });
  68. } else {
  69. obj[key] = value;
  70. }
  71. return obj;
  72. }
  73. module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
  74. /***/ }),
  75. /***/ 12:
  76. /*!**************************************************************!*\
  77. !*** ./node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
  78. \**************************************************************/
  79. /*! no static exports found */
  80. /***/ (function(module, exports, __webpack_require__) {
  81. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  82. var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ 14);
  83. function _toPropertyKey(arg) {
  84. var key = toPrimitive(arg, "string");
  85. return _typeof(key) === "symbol" ? key : String(key);
  86. }
  87. module.exports = _toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
  88. /***/ }),
  89. /***/ 13:
  90. /*!*******************************************************!*\
  91. !*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
  92. \*******************************************************/
  93. /*! no static exports found */
  94. /***/ (function(module, exports) {
  95. function _typeof(obj) {
  96. "@babel/helpers - typeof";
  97. return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
  98. return typeof obj;
  99. } : function (obj) {
  100. return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  101. }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
  102. }
  103. module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
  104. /***/ }),
  105. /***/ 14:
  106. /*!************************************************************!*\
  107. !*** ./node_modules/@babel/runtime/helpers/toPrimitive.js ***!
  108. \************************************************************/
  109. /*! no static exports found */
  110. /***/ (function(module, exports, __webpack_require__) {
  111. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  112. function _toPrimitive(input, hint) {
  113. if (_typeof(input) !== "object" || input === null) return input;
  114. var prim = input[Symbol.toPrimitive];
  115. if (prim !== undefined) {
  116. var res = prim.call(input, hint || "default");
  117. if (_typeof(res) !== "object") return res;
  118. throw new TypeError("@@toPrimitive must return a primitive value.");
  119. }
  120. return (hint === "string" ? String : Number)(input);
  121. }
  122. module.exports = _toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
  123. /***/ }),
  124. /***/ 15:
  125. /*!**********************************************************!*\
  126. !*** ./node_modules/@babel/runtime/helpers/construct.js ***!
  127. \**********************************************************/
  128. /*! no static exports found */
  129. /***/ (function(module, exports, __webpack_require__) {
  130. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  131. var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ 17);
  132. function _construct(Parent, args, Class) {
  133. if (isNativeReflectConstruct()) {
  134. module.exports = _construct = Reflect.construct.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports;
  135. } else {
  136. module.exports = _construct = function _construct(Parent, args, Class) {
  137. var a = [null];
  138. a.push.apply(a, args);
  139. var Constructor = Function.bind.apply(Parent, a);
  140. var instance = new Constructor();
  141. if (Class) setPrototypeOf(instance, Class.prototype);
  142. return instance;
  143. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  144. }
  145. return _construct.apply(null, arguments);
  146. }
  147. module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  148. /***/ }),
  149. /***/ 16:
  150. /*!***************************************************************!*\
  151. !*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
  152. \***************************************************************/
  153. /*! no static exports found */
  154. /***/ (function(module, exports) {
  155. function _setPrototypeOf(o, p) {
  156. module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  157. o.__proto__ = p;
  158. return o;
  159. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  160. return _setPrototypeOf(o, p);
  161. }
  162. module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  163. /***/ }),
  164. /***/ 17:
  165. /*!*************************************************************************!*\
  166. !*** ./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
  167. \*************************************************************************/
  168. /*! no static exports found */
  169. /***/ (function(module, exports) {
  170. function _isNativeReflectConstruct() {
  171. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  172. if (Reflect.construct.sham) return false;
  173. if (typeof Proxy === "function") return true;
  174. try {
  175. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  176. return true;
  177. } catch (e) {
  178. return false;
  179. }
  180. }
  181. module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  182. /***/ }),
  183. /***/ 18:
  184. /*!******************************************************************!*\
  185. !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
  186. \******************************************************************/
  187. /*! no static exports found */
  188. /***/ (function(module, exports, __webpack_require__) {
  189. var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ 19);
  190. var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ 20);
  191. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  192. var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ 21);
  193. function _toConsumableArray(arr) {
  194. return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
  195. }
  196. module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  197. /***/ }),
  198. /***/ 19:
  199. /*!******************************************************************!*\
  200. !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
  201. \******************************************************************/
  202. /*! no static exports found */
  203. /***/ (function(module, exports, __webpack_require__) {
  204. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  205. function _arrayWithoutHoles(arr) {
  206. if (Array.isArray(arr)) return arrayLikeToArray(arr);
  207. }
  208. module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  209. /***/ }),
  210. /***/ 2:
  211. /*!************************************************************!*\
  212. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  213. \************************************************************/
  214. /*! no static exports found */
  215. /***/ (function(module, exports, __webpack_require__) {
  216. "use strict";
  217. /* WEBPACK VAR INJECTION */(function(wx, global) {
  218. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  219. Object.defineProperty(exports, "__esModule", {
  220. value: true
  221. });
  222. exports.createApp = createApp;
  223. exports.createComponent = createComponent;
  224. exports.createPage = createPage;
  225. exports.createPlugin = createPlugin;
  226. exports.createSubpackageApp = createSubpackageApp;
  227. exports.default = void 0;
  228. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  229. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  230. var _construct2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/construct */ 15));
  231. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  232. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  233. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  234. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  235. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  236. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  237. var realAtob;
  238. var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  239. var b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  240. if (typeof atob !== 'function') {
  241. realAtob = function realAtob(str) {
  242. str = String(str).replace(/[\t\n\f\r ]+/g, '');
  243. if (!b64re.test(str)) {
  244. throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  245. }
  246. // Adding the padding if missing, for semplicity
  247. str += '=='.slice(2 - (str.length & 3));
  248. var bitmap;
  249. var result = '';
  250. var r1;
  251. var r2;
  252. var i = 0;
  253. for (; i < str.length;) {
  254. bitmap = b64.indexOf(str.charAt(i++)) << 18 | b64.indexOf(str.charAt(i++)) << 12 | (r1 = b64.indexOf(str.charAt(i++))) << 6 | (r2 = b64.indexOf(str.charAt(i++)));
  255. result += r1 === 64 ? String.fromCharCode(bitmap >> 16 & 255) : r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255) : String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255);
  256. }
  257. return result;
  258. };
  259. } else {
  260. // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
  261. realAtob = atob;
  262. }
  263. function b64DecodeUnicode(str) {
  264. return decodeURIComponent(realAtob(str).split('').map(function (c) {
  265. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  266. }).join(''));
  267. }
  268. function getCurrentUserInfo() {
  269. var token = wx.getStorageSync('uni_id_token') || '';
  270. var tokenArr = token.split('.');
  271. if (!token || tokenArr.length !== 3) {
  272. return {
  273. uid: null,
  274. role: [],
  275. permission: [],
  276. tokenExpired: 0
  277. };
  278. }
  279. var userInfo;
  280. try {
  281. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  282. } catch (error) {
  283. throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
  284. }
  285. userInfo.tokenExpired = userInfo.exp * 1000;
  286. delete userInfo.exp;
  287. delete userInfo.iat;
  288. return userInfo;
  289. }
  290. function uniIdMixin(Vue) {
  291. Vue.prototype.uniIDHasRole = function (roleId) {
  292. var _getCurrentUserInfo = getCurrentUserInfo(),
  293. role = _getCurrentUserInfo.role;
  294. return role.indexOf(roleId) > -1;
  295. };
  296. Vue.prototype.uniIDHasPermission = function (permissionId) {
  297. var _getCurrentUserInfo2 = getCurrentUserInfo(),
  298. permission = _getCurrentUserInfo2.permission;
  299. return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
  300. };
  301. Vue.prototype.uniIDTokenValid = function () {
  302. var _getCurrentUserInfo3 = getCurrentUserInfo(),
  303. tokenExpired = _getCurrentUserInfo3.tokenExpired;
  304. return tokenExpired > Date.now();
  305. };
  306. }
  307. var _toString = Object.prototype.toString;
  308. var hasOwnProperty = Object.prototype.hasOwnProperty;
  309. function isFn(fn) {
  310. return typeof fn === 'function';
  311. }
  312. function isStr(str) {
  313. return typeof str === 'string';
  314. }
  315. function isObject(obj) {
  316. return obj !== null && (0, _typeof2.default)(obj) === 'object';
  317. }
  318. function isPlainObject(obj) {
  319. return _toString.call(obj) === '[object Object]';
  320. }
  321. function hasOwn(obj, key) {
  322. return hasOwnProperty.call(obj, key);
  323. }
  324. function noop() {}
  325. /**
  326. * Create a cached version of a pure function.
  327. */
  328. function cached(fn) {
  329. var cache = Object.create(null);
  330. return function cachedFn(str) {
  331. var hit = cache[str];
  332. return hit || (cache[str] = fn(str));
  333. };
  334. }
  335. /**
  336. * Camelize a hyphen-delimited string.
  337. */
  338. var camelizeRE = /-(\w)/g;
  339. var camelize = cached(function (str) {
  340. return str.replace(camelizeRE, function (_, c) {
  341. return c ? c.toUpperCase() : '';
  342. });
  343. });
  344. function sortObject(obj) {
  345. var sortObj = {};
  346. if (isPlainObject(obj)) {
  347. Object.keys(obj).sort().forEach(function (key) {
  348. sortObj[key] = obj[key];
  349. });
  350. }
  351. return !Object.keys(sortObj) ? obj : sortObj;
  352. }
  353. var HOOKS = ['invoke', 'success', 'fail', 'complete', 'returnValue'];
  354. var globalInterceptors = {};
  355. var scopedInterceptors = {};
  356. function mergeHook(parentVal, childVal) {
  357. var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;
  358. return res ? dedupeHooks(res) : res;
  359. }
  360. function dedupeHooks(hooks) {
  361. var res = [];
  362. for (var i = 0; i < hooks.length; i++) {
  363. if (res.indexOf(hooks[i]) === -1) {
  364. res.push(hooks[i]);
  365. }
  366. }
  367. return res;
  368. }
  369. function removeHook(hooks, hook) {
  370. var index = hooks.indexOf(hook);
  371. if (index !== -1) {
  372. hooks.splice(index, 1);
  373. }
  374. }
  375. function mergeInterceptorHook(interceptor, option) {
  376. Object.keys(option).forEach(function (hook) {
  377. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  378. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  379. }
  380. });
  381. }
  382. function removeInterceptorHook(interceptor, option) {
  383. if (!interceptor || !option) {
  384. return;
  385. }
  386. Object.keys(option).forEach(function (hook) {
  387. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  388. removeHook(interceptor[hook], option[hook]);
  389. }
  390. });
  391. }
  392. function addInterceptor(method, option) {
  393. if (typeof method === 'string' && isPlainObject(option)) {
  394. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  395. } else if (isPlainObject(method)) {
  396. mergeInterceptorHook(globalInterceptors, method);
  397. }
  398. }
  399. function removeInterceptor(method, option) {
  400. if (typeof method === 'string') {
  401. if (isPlainObject(option)) {
  402. removeInterceptorHook(scopedInterceptors[method], option);
  403. } else {
  404. delete scopedInterceptors[method];
  405. }
  406. } else if (isPlainObject(method)) {
  407. removeInterceptorHook(globalInterceptors, method);
  408. }
  409. }
  410. function wrapperHook(hook, params) {
  411. return function (data) {
  412. return hook(data, params) || data;
  413. };
  414. }
  415. function isPromise(obj) {
  416. return !!obj && ((0, _typeof2.default)(obj) === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  417. }
  418. function queue(hooks, data, params) {
  419. var promise = false;
  420. for (var i = 0; i < hooks.length; i++) {
  421. var hook = hooks[i];
  422. if (promise) {
  423. promise = Promise.resolve(wrapperHook(hook, params));
  424. } else {
  425. var res = hook(data, params);
  426. if (isPromise(res)) {
  427. promise = Promise.resolve(res);
  428. }
  429. if (res === false) {
  430. return {
  431. then: function then() {}
  432. };
  433. }
  434. }
  435. }
  436. return promise || {
  437. then: function then(callback) {
  438. return callback(data);
  439. }
  440. };
  441. }
  442. function wrapperOptions(interceptor) {
  443. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  444. ['success', 'fail', 'complete'].forEach(function (name) {
  445. if (Array.isArray(interceptor[name])) {
  446. var oldCallback = options[name];
  447. options[name] = function callbackInterceptor(res) {
  448. queue(interceptor[name], res, options).then(function (res) {
  449. /* eslint-disable no-mixed-operators */
  450. return isFn(oldCallback) && oldCallback(res) || res;
  451. });
  452. };
  453. }
  454. });
  455. return options;
  456. }
  457. function wrapperReturnValue(method, returnValue) {
  458. var returnValueHooks = [];
  459. if (Array.isArray(globalInterceptors.returnValue)) {
  460. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(globalInterceptors.returnValue));
  461. }
  462. var interceptor = scopedInterceptors[method];
  463. if (interceptor && Array.isArray(interceptor.returnValue)) {
  464. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(interceptor.returnValue));
  465. }
  466. returnValueHooks.forEach(function (hook) {
  467. returnValue = hook(returnValue) || returnValue;
  468. });
  469. return returnValue;
  470. }
  471. function getApiInterceptorHooks(method) {
  472. var interceptor = Object.create(null);
  473. Object.keys(globalInterceptors).forEach(function (hook) {
  474. if (hook !== 'returnValue') {
  475. interceptor[hook] = globalInterceptors[hook].slice();
  476. }
  477. });
  478. var scopedInterceptor = scopedInterceptors[method];
  479. if (scopedInterceptor) {
  480. Object.keys(scopedInterceptor).forEach(function (hook) {
  481. if (hook !== 'returnValue') {
  482. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  483. }
  484. });
  485. }
  486. return interceptor;
  487. }
  488. function invokeApi(method, api, options) {
  489. for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
  490. params[_key - 3] = arguments[_key];
  491. }
  492. var interceptor = getApiInterceptorHooks(method);
  493. if (interceptor && Object.keys(interceptor).length) {
  494. if (Array.isArray(interceptor.invoke)) {
  495. var res = queue(interceptor.invoke, options);
  496. return res.then(function (options) {
  497. // 重新访问 getApiInterceptorHooks, 允许 invoke 中再次调用 addInterceptor,removeInterceptor
  498. return api.apply(void 0, [wrapperOptions(getApiInterceptorHooks(method), options)].concat(params));
  499. });
  500. } else {
  501. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  502. }
  503. }
  504. return api.apply(void 0, [options].concat(params));
  505. }
  506. var promiseInterceptor = {
  507. returnValue: function returnValue(res) {
  508. if (!isPromise(res)) {
  509. return res;
  510. }
  511. return new Promise(function (resolve, reject) {
  512. res.then(function (res) {
  513. if (res[0]) {
  514. reject(res[0]);
  515. } else {
  516. resolve(res[1]);
  517. }
  518. });
  519. });
  520. }
  521. };
  522. var SYNC_API_RE = /^\$|Window$|WindowStyle$|sendHostEvent|sendNativeEvent|restoreGlobal|requireGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getLocale|setLocale|invokePushCallback|getWindowInfo|getDeviceInfo|getAppBaseInfo|getSystemSetting|getAppAuthorizeSetting|initUTS|requireUTS|registerUTS/;
  523. var CONTEXT_API_RE = /^create|Manager$/;
  524. // Context例外情况
  525. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  526. // 同步例外情况
  527. var ASYNC_API = ['createBLEConnection', 'createPushMessage'];
  528. var CALLBACK_API_RE = /^on|^off/;
  529. function isContextApi(name) {
  530. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  531. }
  532. function isSyncApi(name) {
  533. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  534. }
  535. function isCallbackApi(name) {
  536. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  537. }
  538. function handlePromise(promise) {
  539. return promise.then(function (data) {
  540. return [null, data];
  541. }).catch(function (err) {
  542. return [err];
  543. });
  544. }
  545. function shouldPromise(name) {
  546. if (isContextApi(name) || isSyncApi(name) || isCallbackApi(name)) {
  547. return false;
  548. }
  549. return true;
  550. }
  551. /* eslint-disable no-extend-native */
  552. if (!Promise.prototype.finally) {
  553. Promise.prototype.finally = function (callback) {
  554. var promise = this.constructor;
  555. return this.then(function (value) {
  556. return promise.resolve(callback()).then(function () {
  557. return value;
  558. });
  559. }, function (reason) {
  560. return promise.resolve(callback()).then(function () {
  561. throw reason;
  562. });
  563. });
  564. };
  565. }
  566. function promisify(name, api) {
  567. if (!shouldPromise(name) || !isFn(api)) {
  568. return api;
  569. }
  570. return function promiseApi() {
  571. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  572. for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  573. params[_key2 - 1] = arguments[_key2];
  574. }
  575. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  576. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  577. }
  578. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  579. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  580. success: resolve,
  581. fail: reject
  582. })].concat(params));
  583. })));
  584. };
  585. }
  586. var EPS = 1e-4;
  587. var BASE_DEVICE_WIDTH = 750;
  588. var isIOS = false;
  589. var deviceWidth = 0;
  590. var deviceDPR = 0;
  591. function checkDeviceWidth() {
  592. var _wx$getSystemInfoSync = wx.getSystemInfoSync(),
  593. platform = _wx$getSystemInfoSync.platform,
  594. pixelRatio = _wx$getSystemInfoSync.pixelRatio,
  595. windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  596. deviceWidth = windowWidth;
  597. deviceDPR = pixelRatio;
  598. isIOS = platform === 'ios';
  599. }
  600. function upx2px(number, newDeviceWidth) {
  601. if (deviceWidth === 0) {
  602. checkDeviceWidth();
  603. }
  604. number = Number(number);
  605. if (number === 0) {
  606. return 0;
  607. }
  608. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  609. if (result < 0) {
  610. result = -result;
  611. }
  612. result = Math.floor(result + EPS);
  613. if (result === 0) {
  614. if (deviceDPR === 1 || !isIOS) {
  615. result = 1;
  616. } else {
  617. result = 0.5;
  618. }
  619. }
  620. return number < 0 ? -result : result;
  621. }
  622. var LOCALE_ZH_HANS = 'zh-Hans';
  623. var LOCALE_ZH_HANT = 'zh-Hant';
  624. var LOCALE_EN = 'en';
  625. var LOCALE_FR = 'fr';
  626. var LOCALE_ES = 'es';
  627. var messages = {};
  628. var locale;
  629. {
  630. locale = normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  631. }
  632. function initI18nMessages() {
  633. if (!isEnableLocale()) {
  634. return;
  635. }
  636. var localeKeys = Object.keys(__uniConfig.locales);
  637. if (localeKeys.length) {
  638. localeKeys.forEach(function (locale) {
  639. var curMessages = messages[locale];
  640. var userMessages = __uniConfig.locales[locale];
  641. if (curMessages) {
  642. Object.assign(curMessages, userMessages);
  643. } else {
  644. messages[locale] = userMessages;
  645. }
  646. });
  647. }
  648. }
  649. initI18nMessages();
  650. var i18n = (0, _uniI18n.initVueI18n)(locale, {});
  651. var t = i18n.t;
  652. var i18nMixin = i18n.mixin = {
  653. beforeCreate: function beforeCreate() {
  654. var _this = this;
  655. var unwatch = i18n.i18n.watchLocale(function () {
  656. _this.$forceUpdate();
  657. });
  658. this.$once('hook:beforeDestroy', function () {
  659. unwatch();
  660. });
  661. },
  662. methods: {
  663. $$t: function $$t(key, values) {
  664. return t(key, values);
  665. }
  666. }
  667. };
  668. var setLocale = i18n.setLocale;
  669. var getLocale = i18n.getLocale;
  670. function initAppLocale(Vue, appVm, locale) {
  671. var state = Vue.observable({
  672. locale: locale || i18n.getLocale()
  673. });
  674. var localeWatchers = [];
  675. appVm.$watchLocale = function (fn) {
  676. localeWatchers.push(fn);
  677. };
  678. Object.defineProperty(appVm, '$locale', {
  679. get: function get() {
  680. return state.locale;
  681. },
  682. set: function set(v) {
  683. state.locale = v;
  684. localeWatchers.forEach(function (watch) {
  685. return watch(v);
  686. });
  687. }
  688. });
  689. }
  690. function isEnableLocale() {
  691. return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length;
  692. }
  693. function include(str, parts) {
  694. return !!parts.find(function (part) {
  695. return str.indexOf(part) !== -1;
  696. });
  697. }
  698. function startsWith(str, parts) {
  699. return parts.find(function (part) {
  700. return str.indexOf(part) === 0;
  701. });
  702. }
  703. function normalizeLocale(locale, messages) {
  704. if (!locale) {
  705. return;
  706. }
  707. locale = locale.trim().replace(/_/g, '-');
  708. if (messages && messages[locale]) {
  709. return locale;
  710. }
  711. locale = locale.toLowerCase();
  712. if (locale === 'chinese') {
  713. // 支付宝
  714. return LOCALE_ZH_HANS;
  715. }
  716. if (locale.indexOf('zh') === 0) {
  717. if (locale.indexOf('-hans') > -1) {
  718. return LOCALE_ZH_HANS;
  719. }
  720. if (locale.indexOf('-hant') > -1) {
  721. return LOCALE_ZH_HANT;
  722. }
  723. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  724. return LOCALE_ZH_HANT;
  725. }
  726. return LOCALE_ZH_HANS;
  727. }
  728. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  729. if (lang) {
  730. return lang;
  731. }
  732. }
  733. // export function initI18n() {
  734. // const localeKeys = Object.keys(__uniConfig.locales || {})
  735. // if (localeKeys.length) {
  736. // localeKeys.forEach((locale) =>
  737. // i18n.add(locale, __uniConfig.locales[locale])
  738. // )
  739. // }
  740. // }
  741. function getLocale$1() {
  742. // 优先使用 $locale
  743. if (isFn(getApp)) {
  744. var app = getApp({
  745. allowDefault: true
  746. });
  747. if (app && app.$vm) {
  748. return app.$vm.$locale;
  749. }
  750. }
  751. return normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  752. }
  753. function setLocale$1(locale) {
  754. var app = isFn(getApp) ? getApp() : false;
  755. if (!app) {
  756. return false;
  757. }
  758. var oldLocale = app.$vm.$locale;
  759. if (oldLocale !== locale) {
  760. app.$vm.$locale = locale;
  761. onLocaleChangeCallbacks.forEach(function (fn) {
  762. return fn({
  763. locale: locale
  764. });
  765. });
  766. return true;
  767. }
  768. return false;
  769. }
  770. var onLocaleChangeCallbacks = [];
  771. function onLocaleChange(fn) {
  772. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  773. onLocaleChangeCallbacks.push(fn);
  774. }
  775. }
  776. if (typeof global !== 'undefined') {
  777. global.getLocale = getLocale$1;
  778. }
  779. var interceptors = {
  780. promiseInterceptor: promiseInterceptor
  781. };
  782. var baseApi = /*#__PURE__*/Object.freeze({
  783. __proto__: null,
  784. upx2px: upx2px,
  785. getLocale: getLocale$1,
  786. setLocale: setLocale$1,
  787. onLocaleChange: onLocaleChange,
  788. addInterceptor: addInterceptor,
  789. removeInterceptor: removeInterceptor,
  790. interceptors: interceptors
  791. });
  792. function findExistsPageIndex(url) {
  793. var pages = getCurrentPages();
  794. var len = pages.length;
  795. while (len--) {
  796. var page = pages[len];
  797. if (page.$page && page.$page.fullPath === url) {
  798. return len;
  799. }
  800. }
  801. return -1;
  802. }
  803. var redirectTo = {
  804. name: function name(fromArgs) {
  805. if (fromArgs.exists === 'back' && fromArgs.delta) {
  806. return 'navigateBack';
  807. }
  808. return 'redirectTo';
  809. },
  810. args: function args(fromArgs) {
  811. if (fromArgs.exists === 'back' && fromArgs.url) {
  812. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  813. if (existsPageIndex !== -1) {
  814. var delta = getCurrentPages().length - 1 - existsPageIndex;
  815. if (delta > 0) {
  816. fromArgs.delta = delta;
  817. }
  818. }
  819. }
  820. }
  821. };
  822. var previewImage = {
  823. args: function args(fromArgs) {
  824. var currentIndex = parseInt(fromArgs.current);
  825. if (isNaN(currentIndex)) {
  826. return;
  827. }
  828. var urls = fromArgs.urls;
  829. if (!Array.isArray(urls)) {
  830. return;
  831. }
  832. var len = urls.length;
  833. if (!len) {
  834. return;
  835. }
  836. if (currentIndex < 0) {
  837. currentIndex = 0;
  838. } else if (currentIndex >= len) {
  839. currentIndex = len - 1;
  840. }
  841. if (currentIndex > 0) {
  842. fromArgs.current = urls[currentIndex];
  843. fromArgs.urls = urls.filter(function (item, index) {
  844. return index < currentIndex ? item !== urls[currentIndex] : true;
  845. });
  846. } else {
  847. fromArgs.current = urls[0];
  848. }
  849. return {
  850. indicator: false,
  851. loop: false
  852. };
  853. }
  854. };
  855. var UUID_KEY = '__DC_STAT_UUID';
  856. var deviceId;
  857. function useDeviceId(result) {
  858. deviceId = deviceId || wx.getStorageSync(UUID_KEY);
  859. if (!deviceId) {
  860. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  861. wx.setStorage({
  862. key: UUID_KEY,
  863. data: deviceId
  864. });
  865. }
  866. result.deviceId = deviceId;
  867. }
  868. function addSafeAreaInsets(result) {
  869. if (result.safeArea) {
  870. var safeArea = result.safeArea;
  871. result.safeAreaInsets = {
  872. top: safeArea.top,
  873. left: safeArea.left,
  874. right: result.windowWidth - safeArea.right,
  875. bottom: result.screenHeight - safeArea.bottom
  876. };
  877. }
  878. }
  879. function populateParameters(result) {
  880. var _result$brand = result.brand,
  881. brand = _result$brand === void 0 ? '' : _result$brand,
  882. _result$model = result.model,
  883. model = _result$model === void 0 ? '' : _result$model,
  884. _result$system = result.system,
  885. system = _result$system === void 0 ? '' : _result$system,
  886. _result$language = result.language,
  887. language = _result$language === void 0 ? '' : _result$language,
  888. theme = result.theme,
  889. version = result.version,
  890. platform = result.platform,
  891. fontSizeSetting = result.fontSizeSetting,
  892. SDKVersion = result.SDKVersion,
  893. pixelRatio = result.pixelRatio,
  894. deviceOrientation = result.deviceOrientation;
  895. // const isQuickApp = "mp-weixin".indexOf('quickapp-webview') !== -1
  896. var extraParam = {};
  897. // osName osVersion
  898. var osName = '';
  899. var osVersion = '';
  900. {
  901. osName = system.split(' ')[0] || '';
  902. osVersion = system.split(' ')[1] || '';
  903. }
  904. var hostVersion = version;
  905. // deviceType
  906. var deviceType = getGetDeviceType(result, model);
  907. // deviceModel
  908. var deviceBrand = getDeviceBrand(brand);
  909. // hostName
  910. var _hostName = getHostName(result);
  911. // deviceOrientation
  912. var _deviceOrientation = deviceOrientation; // 仅 微信 百度 支持
  913. // devicePixelRatio
  914. var _devicePixelRatio = pixelRatio;
  915. // SDKVersion
  916. var _SDKVersion = SDKVersion;
  917. // hostLanguage
  918. var hostLanguage = language.replace(/_/g, '-');
  919. // wx.getAccountInfoSync
  920. var parameters = {
  921. appId: "__UNI__B46B675",
  922. appName: "kklbWe",
  923. appVersion: "1.0.0",
  924. appVersionCode: "100",
  925. appLanguage: getAppLanguage(hostLanguage),
  926. uniCompileVersion: "3.8.12",
  927. uniRuntimeVersion: "3.8.12",
  928. uniPlatform: undefined || "mp-weixin",
  929. deviceBrand: deviceBrand,
  930. deviceModel: model,
  931. deviceType: deviceType,
  932. devicePixelRatio: _devicePixelRatio,
  933. deviceOrientation: _deviceOrientation,
  934. osName: osName.toLocaleLowerCase(),
  935. osVersion: osVersion,
  936. hostTheme: theme,
  937. hostVersion: hostVersion,
  938. hostLanguage: hostLanguage,
  939. hostName: _hostName,
  940. hostSDKVersion: _SDKVersion,
  941. hostFontSizeSetting: fontSizeSetting,
  942. windowTop: 0,
  943. windowBottom: 0,
  944. // TODO
  945. osLanguage: undefined,
  946. osTheme: undefined,
  947. ua: undefined,
  948. hostPackageName: undefined,
  949. browserName: undefined,
  950. browserVersion: undefined
  951. };
  952. Object.assign(result, parameters, extraParam);
  953. }
  954. function getGetDeviceType(result, model) {
  955. var deviceType = result.deviceType || 'phone';
  956. {
  957. var deviceTypeMaps = {
  958. ipad: 'pad',
  959. windows: 'pc',
  960. mac: 'pc'
  961. };
  962. var deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
  963. var _model = model.toLocaleLowerCase();
  964. for (var index = 0; index < deviceTypeMapsKeys.length; index++) {
  965. var _m = deviceTypeMapsKeys[index];
  966. if (_model.indexOf(_m) !== -1) {
  967. deviceType = deviceTypeMaps[_m];
  968. break;
  969. }
  970. }
  971. }
  972. return deviceType;
  973. }
  974. function getDeviceBrand(brand) {
  975. var deviceBrand = brand;
  976. if (deviceBrand) {
  977. deviceBrand = brand.toLocaleLowerCase();
  978. }
  979. return deviceBrand;
  980. }
  981. function getAppLanguage(defaultLanguage) {
  982. return getLocale$1 ? getLocale$1() : defaultLanguage;
  983. }
  984. function getHostName(result) {
  985. var _platform = 'WeChat';
  986. var _hostName = result.hostName || _platform; // mp-jd
  987. {
  988. if (result.environment) {
  989. _hostName = result.environment;
  990. } else if (result.host && result.host.env) {
  991. _hostName = result.host.env;
  992. }
  993. }
  994. return _hostName;
  995. }
  996. var getSystemInfo = {
  997. returnValue: function returnValue(result) {
  998. useDeviceId(result);
  999. addSafeAreaInsets(result);
  1000. populateParameters(result);
  1001. }
  1002. };
  1003. var showActionSheet = {
  1004. args: function args(fromArgs) {
  1005. if ((0, _typeof2.default)(fromArgs) === 'object') {
  1006. fromArgs.alertText = fromArgs.title;
  1007. }
  1008. }
  1009. };
  1010. var getAppBaseInfo = {
  1011. returnValue: function returnValue(result) {
  1012. var _result = result,
  1013. version = _result.version,
  1014. language = _result.language,
  1015. SDKVersion = _result.SDKVersion,
  1016. theme = _result.theme;
  1017. var _hostName = getHostName(result);
  1018. var hostLanguage = language.replace('_', '-');
  1019. result = sortObject(Object.assign(result, {
  1020. appId: "__UNI__B46B675",
  1021. appName: "kklbWe",
  1022. appVersion: "1.0.0",
  1023. appVersionCode: "100",
  1024. appLanguage: getAppLanguage(hostLanguage),
  1025. hostVersion: version,
  1026. hostLanguage: hostLanguage,
  1027. hostName: _hostName,
  1028. hostSDKVersion: SDKVersion,
  1029. hostTheme: theme
  1030. }));
  1031. }
  1032. };
  1033. var getDeviceInfo = {
  1034. returnValue: function returnValue(result) {
  1035. var _result2 = result,
  1036. brand = _result2.brand,
  1037. model = _result2.model;
  1038. var deviceType = getGetDeviceType(result, model);
  1039. var deviceBrand = getDeviceBrand(brand);
  1040. useDeviceId(result);
  1041. result = sortObject(Object.assign(result, {
  1042. deviceType: deviceType,
  1043. deviceBrand: deviceBrand,
  1044. deviceModel: model
  1045. }));
  1046. }
  1047. };
  1048. var getWindowInfo = {
  1049. returnValue: function returnValue(result) {
  1050. addSafeAreaInsets(result);
  1051. result = sortObject(Object.assign(result, {
  1052. windowTop: 0,
  1053. windowBottom: 0
  1054. }));
  1055. }
  1056. };
  1057. var getAppAuthorizeSetting = {
  1058. returnValue: function returnValue(result) {
  1059. var locationReducedAccuracy = result.locationReducedAccuracy;
  1060. result.locationAccuracy = 'unsupported';
  1061. if (locationReducedAccuracy === true) {
  1062. result.locationAccuracy = 'reduced';
  1063. } else if (locationReducedAccuracy === false) {
  1064. result.locationAccuracy = 'full';
  1065. }
  1066. }
  1067. };
  1068. // import navigateTo from 'uni-helpers/navigate-to'
  1069. var compressImage = {
  1070. args: function args(fromArgs) {
  1071. // https://developers.weixin.qq.com/community/develop/doc/000c08940c865011298e0a43256800?highLine=compressHeight
  1072. if (fromArgs.compressedHeight && !fromArgs.compressHeight) {
  1073. fromArgs.compressHeight = fromArgs.compressedHeight;
  1074. }
  1075. if (fromArgs.compressedWidth && !fromArgs.compressWidth) {
  1076. fromArgs.compressWidth = fromArgs.compressedWidth;
  1077. }
  1078. }
  1079. };
  1080. var protocols = {
  1081. redirectTo: redirectTo,
  1082. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  1083. previewImage: previewImage,
  1084. getSystemInfo: getSystemInfo,
  1085. getSystemInfoSync: getSystemInfo,
  1086. showActionSheet: showActionSheet,
  1087. getAppBaseInfo: getAppBaseInfo,
  1088. getDeviceInfo: getDeviceInfo,
  1089. getWindowInfo: getWindowInfo,
  1090. getAppAuthorizeSetting: getAppAuthorizeSetting,
  1091. compressImage: compressImage
  1092. };
  1093. var todos = ['vibrate', 'preloadPage', 'unPreloadPage', 'loadSubPackage'];
  1094. var canIUses = [];
  1095. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  1096. function processCallback(methodName, method, returnValue) {
  1097. return function (res) {
  1098. return method(processReturnValue(methodName, res, returnValue));
  1099. };
  1100. }
  1101. function processArgs(methodName, fromArgs) {
  1102. var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  1103. var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  1104. var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  1105. if (isPlainObject(fromArgs)) {
  1106. // 一般 api 的参数解析
  1107. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  1108. if (isFn(argsOption)) {
  1109. argsOption = argsOption(fromArgs, toArgs) || {};
  1110. }
  1111. for (var key in fromArgs) {
  1112. if (hasOwn(argsOption, key)) {
  1113. var keyOption = argsOption[key];
  1114. if (isFn(keyOption)) {
  1115. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  1116. }
  1117. if (!keyOption) {
  1118. // 不支持的参数
  1119. console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  1120. } else if (isStr(keyOption)) {
  1121. // 重写参数 key
  1122. toArgs[keyOption] = fromArgs[key];
  1123. } else if (isPlainObject(keyOption)) {
  1124. // {name:newName,value:value}可重新指定参数 key:value
  1125. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  1126. }
  1127. } else if (CALLBACKS.indexOf(key) !== -1) {
  1128. if (isFn(fromArgs[key])) {
  1129. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  1130. }
  1131. } else {
  1132. if (!keepFromArgs) {
  1133. toArgs[key] = fromArgs[key];
  1134. }
  1135. }
  1136. }
  1137. return toArgs;
  1138. } else if (isFn(fromArgs)) {
  1139. fromArgs = processCallback(methodName, fromArgs, returnValue);
  1140. }
  1141. return fromArgs;
  1142. }
  1143. function processReturnValue(methodName, res, returnValue) {
  1144. var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  1145. if (isFn(protocols.returnValue)) {
  1146. // 处理通用 returnValue
  1147. res = protocols.returnValue(methodName, res);
  1148. }
  1149. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  1150. }
  1151. function wrapper(methodName, method) {
  1152. if (hasOwn(protocols, methodName)) {
  1153. var protocol = protocols[methodName];
  1154. if (!protocol) {
  1155. // 暂不支持的 api
  1156. return function () {
  1157. console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  1158. };
  1159. }
  1160. return function (arg1, arg2) {
  1161. // 目前 api 最多两个参数
  1162. var options = protocol;
  1163. if (isFn(protocol)) {
  1164. options = protocol(arg1);
  1165. }
  1166. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  1167. var args = [arg1];
  1168. if (typeof arg2 !== 'undefined') {
  1169. args.push(arg2);
  1170. }
  1171. if (isFn(options.name)) {
  1172. methodName = options.name(arg1);
  1173. } else if (isStr(options.name)) {
  1174. methodName = options.name;
  1175. }
  1176. var returnValue = wx[methodName].apply(wx, args);
  1177. if (isSyncApi(methodName)) {
  1178. // 同步 api
  1179. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  1180. }
  1181. return returnValue;
  1182. };
  1183. }
  1184. return method;
  1185. }
  1186. var todoApis = Object.create(null);
  1187. var TODOS = ['onTabBarMidButtonTap', 'subscribePush', 'unsubscribePush', 'onPush', 'offPush', 'share'];
  1188. function createTodoApi(name) {
  1189. return function todoApi(_ref) {
  1190. var fail = _ref.fail,
  1191. complete = _ref.complete;
  1192. var res = {
  1193. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported")
  1194. };
  1195. isFn(fail) && fail(res);
  1196. isFn(complete) && complete(res);
  1197. };
  1198. }
  1199. TODOS.forEach(function (name) {
  1200. todoApis[name] = createTodoApi(name);
  1201. });
  1202. var providers = {
  1203. oauth: ['weixin'],
  1204. share: ['weixin'],
  1205. payment: ['wxpay'],
  1206. push: ['weixin']
  1207. };
  1208. function getProvider(_ref2) {
  1209. var service = _ref2.service,
  1210. success = _ref2.success,
  1211. fail = _ref2.fail,
  1212. complete = _ref2.complete;
  1213. var res = false;
  1214. if (providers[service]) {
  1215. res = {
  1216. errMsg: 'getProvider:ok',
  1217. service: service,
  1218. provider: providers[service]
  1219. };
  1220. isFn(success) && success(res);
  1221. } else {
  1222. res = {
  1223. errMsg: 'getProvider:fail service not found'
  1224. };
  1225. isFn(fail) && fail(res);
  1226. }
  1227. isFn(complete) && complete(res);
  1228. }
  1229. var extraApi = /*#__PURE__*/Object.freeze({
  1230. __proto__: null,
  1231. getProvider: getProvider
  1232. });
  1233. var getEmitter = function () {
  1234. var Emitter;
  1235. return function getUniEmitter() {
  1236. if (!Emitter) {
  1237. Emitter = new _vue.default();
  1238. }
  1239. return Emitter;
  1240. };
  1241. }();
  1242. function apply(ctx, method, args) {
  1243. return ctx[method].apply(ctx, args);
  1244. }
  1245. function $on() {
  1246. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  1247. }
  1248. function $off() {
  1249. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  1250. }
  1251. function $once() {
  1252. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  1253. }
  1254. function $emit() {
  1255. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  1256. }
  1257. var eventApi = /*#__PURE__*/Object.freeze({
  1258. __proto__: null,
  1259. $on: $on,
  1260. $off: $off,
  1261. $once: $once,
  1262. $emit: $emit
  1263. });
  1264. /**
  1265. * 框架内 try-catch
  1266. */
  1267. /**
  1268. * 开发者 try-catch
  1269. */
  1270. function tryCatch(fn) {
  1271. return function () {
  1272. try {
  1273. return fn.apply(fn, arguments);
  1274. } catch (e) {
  1275. // TODO
  1276. console.error(e);
  1277. }
  1278. };
  1279. }
  1280. function getApiCallbacks(params) {
  1281. var apiCallbacks = {};
  1282. for (var name in params) {
  1283. var param = params[name];
  1284. if (isFn(param)) {
  1285. apiCallbacks[name] = tryCatch(param);
  1286. delete params[name];
  1287. }
  1288. }
  1289. return apiCallbacks;
  1290. }
  1291. var cid;
  1292. var cidErrMsg;
  1293. var enabled;
  1294. function normalizePushMessage(message) {
  1295. try {
  1296. return JSON.parse(message);
  1297. } catch (e) {}
  1298. return message;
  1299. }
  1300. function invokePushCallback(args) {
  1301. if (args.type === 'enabled') {
  1302. enabled = true;
  1303. } else if (args.type === 'clientId') {
  1304. cid = args.cid;
  1305. cidErrMsg = args.errMsg;
  1306. invokeGetPushCidCallbacks(cid, args.errMsg);
  1307. } else if (args.type === 'pushMsg') {
  1308. var message = {
  1309. type: 'receive',
  1310. data: normalizePushMessage(args.message)
  1311. };
  1312. for (var i = 0; i < onPushMessageCallbacks.length; i++) {
  1313. var callback = onPushMessageCallbacks[i];
  1314. callback(message);
  1315. // 该消息已被阻止
  1316. if (message.stopped) {
  1317. break;
  1318. }
  1319. }
  1320. } else if (args.type === 'click') {
  1321. onPushMessageCallbacks.forEach(function (callback) {
  1322. callback({
  1323. type: 'click',
  1324. data: normalizePushMessage(args.message)
  1325. });
  1326. });
  1327. }
  1328. }
  1329. var getPushCidCallbacks = [];
  1330. function invokeGetPushCidCallbacks(cid, errMsg) {
  1331. getPushCidCallbacks.forEach(function (callback) {
  1332. callback(cid, errMsg);
  1333. });
  1334. getPushCidCallbacks.length = 0;
  1335. }
  1336. function getPushClientId(args) {
  1337. if (!isPlainObject(args)) {
  1338. args = {};
  1339. }
  1340. var _getApiCallbacks = getApiCallbacks(args),
  1341. success = _getApiCallbacks.success,
  1342. fail = _getApiCallbacks.fail,
  1343. complete = _getApiCallbacks.complete;
  1344. var hasSuccess = isFn(success);
  1345. var hasFail = isFn(fail);
  1346. var hasComplete = isFn(complete);
  1347. Promise.resolve().then(function () {
  1348. if (typeof enabled === 'undefined') {
  1349. enabled = false;
  1350. cid = '';
  1351. cidErrMsg = 'uniPush is not enabled';
  1352. }
  1353. getPushCidCallbacks.push(function (cid, errMsg) {
  1354. var res;
  1355. if (cid) {
  1356. res = {
  1357. errMsg: 'getPushClientId:ok',
  1358. cid: cid
  1359. };
  1360. hasSuccess && success(res);
  1361. } else {
  1362. res = {
  1363. errMsg: 'getPushClientId:fail' + (errMsg ? ' ' + errMsg : '')
  1364. };
  1365. hasFail && fail(res);
  1366. }
  1367. hasComplete && complete(res);
  1368. });
  1369. if (typeof cid !== 'undefined') {
  1370. invokeGetPushCidCallbacks(cid, cidErrMsg);
  1371. }
  1372. });
  1373. }
  1374. var onPushMessageCallbacks = [];
  1375. // 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现
  1376. var onPushMessage = function onPushMessage(fn) {
  1377. if (onPushMessageCallbacks.indexOf(fn) === -1) {
  1378. onPushMessageCallbacks.push(fn);
  1379. }
  1380. };
  1381. var offPushMessage = function offPushMessage(fn) {
  1382. if (!fn) {
  1383. onPushMessageCallbacks.length = 0;
  1384. } else {
  1385. var index = onPushMessageCallbacks.indexOf(fn);
  1386. if (index > -1) {
  1387. onPushMessageCallbacks.splice(index, 1);
  1388. }
  1389. }
  1390. };
  1391. var baseInfo = wx.getAppBaseInfo && wx.getAppBaseInfo();
  1392. if (!baseInfo) {
  1393. baseInfo = wx.getSystemInfoSync();
  1394. }
  1395. var host = baseInfo ? baseInfo.host : null;
  1396. var shareVideoMessage = host && host.env === 'SAAASDK' ? wx.miniapp.shareVideoMessage : wx.shareVideoMessage;
  1397. var api = /*#__PURE__*/Object.freeze({
  1398. __proto__: null,
  1399. shareVideoMessage: shareVideoMessage,
  1400. getPushClientId: getPushClientId,
  1401. onPushMessage: onPushMessage,
  1402. offPushMessage: offPushMessage,
  1403. invokePushCallback: invokePushCallback
  1404. });
  1405. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1406. function findVmByVueId(vm, vuePid) {
  1407. var $children = vm.$children;
  1408. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1409. for (var i = $children.length - 1; i >= 0; i--) {
  1410. var childVm = $children[i];
  1411. if (childVm.$scope._$vueId === vuePid) {
  1412. return childVm;
  1413. }
  1414. }
  1415. // 反向递归查找
  1416. var parentVm;
  1417. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1418. parentVm = findVmByVueId($children[_i], vuePid);
  1419. if (parentVm) {
  1420. return parentVm;
  1421. }
  1422. }
  1423. }
  1424. function initBehavior(options) {
  1425. return Behavior(options);
  1426. }
  1427. function isPage() {
  1428. return !!this.route;
  1429. }
  1430. function initRelation(detail) {
  1431. this.triggerEvent('__l', detail);
  1432. }
  1433. function selectAllComponents(mpInstance, selector, $refs) {
  1434. var components = mpInstance.selectAllComponents(selector) || [];
  1435. components.forEach(function (component) {
  1436. var ref = component.dataset.ref;
  1437. $refs[ref] = component.$vm || toSkip(component);
  1438. {
  1439. if (component.dataset.vueGeneric === 'scoped') {
  1440. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  1441. selectAllComponents(scopedComponent, selector, $refs);
  1442. });
  1443. }
  1444. }
  1445. });
  1446. }
  1447. function syncRefs(refs, newRefs) {
  1448. var oldKeys = (0, _construct2.default)(Set, (0, _toConsumableArray2.default)(Object.keys(refs)));
  1449. var newKeys = Object.keys(newRefs);
  1450. newKeys.forEach(function (key) {
  1451. var oldValue = refs[key];
  1452. var newValue = newRefs[key];
  1453. if (Array.isArray(oldValue) && Array.isArray(newValue) && oldValue.length === newValue.length && newValue.every(function (value) {
  1454. return oldValue.includes(value);
  1455. })) {
  1456. return;
  1457. }
  1458. refs[key] = newValue;
  1459. oldKeys.delete(key);
  1460. });
  1461. oldKeys.forEach(function (key) {
  1462. delete refs[key];
  1463. });
  1464. return refs;
  1465. }
  1466. function initRefs(vm) {
  1467. var mpInstance = vm.$scope;
  1468. var refs = {};
  1469. Object.defineProperty(vm, '$refs', {
  1470. get: function get() {
  1471. var $refs = {};
  1472. selectAllComponents(mpInstance, '.vue-ref', $refs);
  1473. // TODO 暂不考虑 for 中的 scoped
  1474. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for') || [];
  1475. forComponents.forEach(function (component) {
  1476. var ref = component.dataset.ref;
  1477. if (!$refs[ref]) {
  1478. $refs[ref] = [];
  1479. }
  1480. $refs[ref].push(component.$vm || toSkip(component));
  1481. });
  1482. return syncRefs(refs, $refs);
  1483. }
  1484. });
  1485. }
  1486. function handleLink(event) {
  1487. var _ref3 = event.detail || event.value,
  1488. vuePid = _ref3.vuePid,
  1489. vueOptions = _ref3.vueOptions; // detail 是微信,value 是百度(dipatch)
  1490. var parentVm;
  1491. if (vuePid) {
  1492. parentVm = findVmByVueId(this.$vm, vuePid);
  1493. }
  1494. if (!parentVm) {
  1495. parentVm = this.$vm;
  1496. }
  1497. vueOptions.parent = parentVm;
  1498. }
  1499. function markMPComponent(component) {
  1500. // 在 Vue 中标记为小程序组件
  1501. var IS_MP = '__v_isMPComponent';
  1502. Object.defineProperty(component, IS_MP, {
  1503. configurable: true,
  1504. enumerable: false,
  1505. value: true
  1506. });
  1507. return component;
  1508. }
  1509. function toSkip(obj) {
  1510. var OB = '__ob__';
  1511. var SKIP = '__v_skip';
  1512. if (isObject(obj) && Object.isExtensible(obj)) {
  1513. // 避免被 @vue/composition-api 观测
  1514. Object.defineProperty(obj, OB, {
  1515. configurable: true,
  1516. enumerable: false,
  1517. value: (0, _defineProperty2.default)({}, SKIP, true)
  1518. });
  1519. }
  1520. return obj;
  1521. }
  1522. var WORKLET_RE = /_(.*)_worklet_factory_/;
  1523. function initWorkletMethods(mpMethods, vueMethods) {
  1524. if (vueMethods) {
  1525. Object.keys(vueMethods).forEach(function (name) {
  1526. var matches = name.match(WORKLET_RE);
  1527. if (matches) {
  1528. var workletName = matches[1];
  1529. mpMethods[name] = vueMethods[name];
  1530. mpMethods[workletName] = vueMethods[workletName];
  1531. }
  1532. });
  1533. }
  1534. }
  1535. var MPPage = Page;
  1536. var MPComponent = Component;
  1537. var customizeRE = /:/g;
  1538. var customize = cached(function (str) {
  1539. return camelize(str.replace(customizeRE, '-'));
  1540. });
  1541. function initTriggerEvent(mpInstance) {
  1542. var oldTriggerEvent = mpInstance.triggerEvent;
  1543. var newTriggerEvent = function newTriggerEvent(event) {
  1544. for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
  1545. args[_key3 - 1] = arguments[_key3];
  1546. }
  1547. // 事件名统一转驼峰格式,仅处理:当前组件为 vue 组件、当前组件为 vue 组件子组件
  1548. if (this.$vm || this.dataset && this.dataset.comType) {
  1549. event = customize(event);
  1550. } else {
  1551. // 针对微信/QQ小程序单独补充驼峰格式事件,以兼容历史项目
  1552. var newEvent = customize(event);
  1553. if (newEvent !== event) {
  1554. oldTriggerEvent.apply(this, [newEvent].concat(args));
  1555. }
  1556. }
  1557. return oldTriggerEvent.apply(this, [event].concat(args));
  1558. };
  1559. try {
  1560. // 京东小程序 triggerEvent 为只读
  1561. mpInstance.triggerEvent = newTriggerEvent;
  1562. } catch (error) {
  1563. mpInstance._triggerEvent = newTriggerEvent;
  1564. }
  1565. }
  1566. function initHook(name, options, isComponent) {
  1567. var oldHook = options[name];
  1568. options[name] = function () {
  1569. markMPComponent(this);
  1570. initTriggerEvent(this);
  1571. if (oldHook) {
  1572. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  1573. args[_key4] = arguments[_key4];
  1574. }
  1575. return oldHook.apply(this, args);
  1576. }
  1577. };
  1578. }
  1579. if (!MPPage.__$wrappered) {
  1580. MPPage.__$wrappered = true;
  1581. Page = function Page() {
  1582. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1583. initHook('onLoad', options);
  1584. return MPPage(options);
  1585. };
  1586. Page.after = MPPage.after;
  1587. Component = function Component() {
  1588. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1589. initHook('created', options);
  1590. return MPComponent(options);
  1591. };
  1592. }
  1593. var PAGE_EVENT_HOOKS = ['onPullDownRefresh', 'onReachBottom', 'onAddToFavorites', 'onShareTimeline', 'onShareAppMessage', 'onPageScroll', 'onResize', 'onTabItemTap'];
  1594. function initMocks(vm, mocks) {
  1595. var mpInstance = vm.$mp[vm.mpType];
  1596. mocks.forEach(function (mock) {
  1597. if (hasOwn(mpInstance, mock)) {
  1598. vm[mock] = mpInstance[mock];
  1599. }
  1600. });
  1601. }
  1602. function hasHook(hook, vueOptions) {
  1603. if (!vueOptions) {
  1604. return true;
  1605. }
  1606. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  1607. return true;
  1608. }
  1609. vueOptions = vueOptions.default || vueOptions;
  1610. if (isFn(vueOptions)) {
  1611. if (isFn(vueOptions.extendOptions[hook])) {
  1612. return true;
  1613. }
  1614. if (vueOptions.super && vueOptions.super.options && Array.isArray(vueOptions.super.options[hook])) {
  1615. return true;
  1616. }
  1617. return false;
  1618. }
  1619. if (isFn(vueOptions[hook]) || Array.isArray(vueOptions[hook])) {
  1620. return true;
  1621. }
  1622. var mixins = vueOptions.mixins;
  1623. if (Array.isArray(mixins)) {
  1624. return !!mixins.find(function (mixin) {
  1625. return hasHook(hook, mixin);
  1626. });
  1627. }
  1628. }
  1629. function initHooks(mpOptions, hooks, vueOptions) {
  1630. hooks.forEach(function (hook) {
  1631. if (hasHook(hook, vueOptions)) {
  1632. mpOptions[hook] = function (args) {
  1633. return this.$vm && this.$vm.__call_hook(hook, args);
  1634. };
  1635. }
  1636. });
  1637. }
  1638. function initUnknownHooks(mpOptions, vueOptions) {
  1639. var excludes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1640. findHooks(vueOptions).forEach(function (hook) {
  1641. return initHook$1(mpOptions, hook, excludes);
  1642. });
  1643. }
  1644. function findHooks(vueOptions) {
  1645. var hooks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  1646. if (vueOptions) {
  1647. Object.keys(vueOptions).forEach(function (name) {
  1648. if (name.indexOf('on') === 0 && isFn(vueOptions[name])) {
  1649. hooks.push(name);
  1650. }
  1651. });
  1652. }
  1653. return hooks;
  1654. }
  1655. function initHook$1(mpOptions, hook, excludes) {
  1656. if (excludes.indexOf(hook) === -1 && !hasOwn(mpOptions, hook)) {
  1657. mpOptions[hook] = function (args) {
  1658. return this.$vm && this.$vm.__call_hook(hook, args);
  1659. };
  1660. }
  1661. }
  1662. function initVueComponent(Vue, vueOptions) {
  1663. vueOptions = vueOptions.default || vueOptions;
  1664. var VueComponent;
  1665. if (isFn(vueOptions)) {
  1666. VueComponent = vueOptions;
  1667. } else {
  1668. VueComponent = Vue.extend(vueOptions);
  1669. }
  1670. vueOptions = VueComponent.options;
  1671. return [VueComponent, vueOptions];
  1672. }
  1673. function initSlots(vm, vueSlots) {
  1674. if (Array.isArray(vueSlots) && vueSlots.length) {
  1675. var $slots = Object.create(null);
  1676. vueSlots.forEach(function (slotName) {
  1677. $slots[slotName] = true;
  1678. });
  1679. vm.$scopedSlots = vm.$slots = $slots;
  1680. }
  1681. }
  1682. function initVueIds(vueIds, mpInstance) {
  1683. vueIds = (vueIds || '').split(',');
  1684. var len = vueIds.length;
  1685. if (len === 1) {
  1686. mpInstance._$vueId = vueIds[0];
  1687. } else if (len === 2) {
  1688. mpInstance._$vueId = vueIds[0];
  1689. mpInstance._$vuePid = vueIds[1];
  1690. }
  1691. }
  1692. function initData(vueOptions, context) {
  1693. var data = vueOptions.data || {};
  1694. var methods = vueOptions.methods || {};
  1695. if (typeof data === 'function') {
  1696. try {
  1697. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  1698. } catch (e) {
  1699. if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"kklbWe","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  1700. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  1701. }
  1702. }
  1703. } else {
  1704. try {
  1705. // 对 data 格式化
  1706. data = JSON.parse(JSON.stringify(data));
  1707. } catch (e) {}
  1708. }
  1709. if (!isPlainObject(data)) {
  1710. data = {};
  1711. }
  1712. Object.keys(methods).forEach(function (methodName) {
  1713. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  1714. data[methodName] = methods[methodName];
  1715. }
  1716. });
  1717. return data;
  1718. }
  1719. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  1720. function createObserver(name) {
  1721. return function observer(newVal, oldVal) {
  1722. if (this.$vm) {
  1723. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  1724. }
  1725. };
  1726. }
  1727. function initBehaviors(vueOptions, initBehavior) {
  1728. var vueBehaviors = vueOptions.behaviors;
  1729. var vueExtends = vueOptions.extends;
  1730. var vueMixins = vueOptions.mixins;
  1731. var vueProps = vueOptions.props;
  1732. if (!vueProps) {
  1733. vueOptions.props = vueProps = [];
  1734. }
  1735. var behaviors = [];
  1736. if (Array.isArray(vueBehaviors)) {
  1737. vueBehaviors.forEach(function (behavior) {
  1738. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  1739. if (behavior === 'uni://form-field') {
  1740. if (Array.isArray(vueProps)) {
  1741. vueProps.push('name');
  1742. vueProps.push('value');
  1743. } else {
  1744. vueProps.name = {
  1745. type: String,
  1746. default: ''
  1747. };
  1748. vueProps.value = {
  1749. type: [String, Number, Boolean, Array, Object, Date],
  1750. default: ''
  1751. };
  1752. }
  1753. }
  1754. });
  1755. }
  1756. if (isPlainObject(vueExtends) && vueExtends.props) {
  1757. behaviors.push(initBehavior({
  1758. properties: initProperties(vueExtends.props, true)
  1759. }));
  1760. }
  1761. if (Array.isArray(vueMixins)) {
  1762. vueMixins.forEach(function (vueMixin) {
  1763. if (isPlainObject(vueMixin) && vueMixin.props) {
  1764. behaviors.push(initBehavior({
  1765. properties: initProperties(vueMixin.props, true)
  1766. }));
  1767. }
  1768. });
  1769. }
  1770. return behaviors;
  1771. }
  1772. function parsePropType(key, type, defaultValue, file) {
  1773. // [String]=>String
  1774. if (Array.isArray(type) && type.length === 1) {
  1775. return type[0];
  1776. }
  1777. return type;
  1778. }
  1779. function initProperties(props) {
  1780. var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  1781. var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  1782. var options = arguments.length > 3 ? arguments[3] : undefined;
  1783. var properties = {};
  1784. if (!isBehavior) {
  1785. properties.vueId = {
  1786. type: String,
  1787. value: ''
  1788. };
  1789. {
  1790. if (options.virtualHost) {
  1791. properties.virtualHostStyle = {
  1792. type: null,
  1793. value: ''
  1794. };
  1795. properties.virtualHostClass = {
  1796. type: null,
  1797. value: ''
  1798. };
  1799. }
  1800. }
  1801. // scopedSlotsCompiler auto
  1802. properties.scopedSlotsCompiler = {
  1803. type: String,
  1804. value: ''
  1805. };
  1806. properties.vueSlots = {
  1807. // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  1808. type: null,
  1809. value: [],
  1810. observer: function observer(newVal, oldVal) {
  1811. var $slots = Object.create(null);
  1812. newVal.forEach(function (slotName) {
  1813. $slots[slotName] = true;
  1814. });
  1815. this.setData({
  1816. $slots: $slots
  1817. });
  1818. }
  1819. };
  1820. }
  1821. if (Array.isArray(props)) {
  1822. // ['title']
  1823. props.forEach(function (key) {
  1824. properties[key] = {
  1825. type: null,
  1826. observer: createObserver(key)
  1827. };
  1828. });
  1829. } else if (isPlainObject(props)) {
  1830. // {title:{type:String,default:''},content:String}
  1831. Object.keys(props).forEach(function (key) {
  1832. var opts = props[key];
  1833. if (isPlainObject(opts)) {
  1834. // title:{type:String,default:''}
  1835. var value = opts.default;
  1836. if (isFn(value)) {
  1837. value = value();
  1838. }
  1839. opts.type = parsePropType(key, opts.type);
  1840. properties[key] = {
  1841. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  1842. value: value,
  1843. observer: createObserver(key)
  1844. };
  1845. } else {
  1846. // content:String
  1847. var type = parsePropType(key, opts);
  1848. properties[key] = {
  1849. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  1850. observer: createObserver(key)
  1851. };
  1852. }
  1853. });
  1854. }
  1855. return properties;
  1856. }
  1857. function wrapper$1(event) {
  1858. // TODO 又得兼容 mpvue 的 mp 对象
  1859. try {
  1860. event.mp = JSON.parse(JSON.stringify(event));
  1861. } catch (e) {}
  1862. event.stopPropagation = noop;
  1863. event.preventDefault = noop;
  1864. event.target = event.target || {};
  1865. if (!hasOwn(event, 'detail')) {
  1866. event.detail = {};
  1867. }
  1868. if (hasOwn(event, 'markerId')) {
  1869. event.detail = (0, _typeof2.default)(event.detail) === 'object' ? event.detail : {};
  1870. event.detail.markerId = event.markerId;
  1871. }
  1872. if (isPlainObject(event.detail)) {
  1873. event.target = Object.assign({}, event.target, event.detail);
  1874. }
  1875. return event;
  1876. }
  1877. function getExtraValue(vm, dataPathsArray) {
  1878. var context = vm;
  1879. dataPathsArray.forEach(function (dataPathArray) {
  1880. var dataPath = dataPathArray[0];
  1881. var value = dataPathArray[2];
  1882. if (dataPath || typeof value !== 'undefined') {
  1883. // ['','',index,'disable']
  1884. var propPath = dataPathArray[1];
  1885. var valuePath = dataPathArray[3];
  1886. var vFor;
  1887. if (Number.isInteger(dataPath)) {
  1888. vFor = dataPath;
  1889. } else if (!dataPath) {
  1890. vFor = context;
  1891. } else if (typeof dataPath === 'string' && dataPath) {
  1892. if (dataPath.indexOf('#s#') === 0) {
  1893. vFor = dataPath.substr(3);
  1894. } else {
  1895. vFor = vm.__get_value(dataPath, context);
  1896. }
  1897. }
  1898. if (Number.isInteger(vFor)) {
  1899. context = value;
  1900. } else if (!propPath) {
  1901. context = vFor[value];
  1902. } else {
  1903. if (Array.isArray(vFor)) {
  1904. context = vFor.find(function (vForItem) {
  1905. return vm.__get_value(propPath, vForItem) === value;
  1906. });
  1907. } else if (isPlainObject(vFor)) {
  1908. context = Object.keys(vFor).find(function (vForKey) {
  1909. return vm.__get_value(propPath, vFor[vForKey]) === value;
  1910. });
  1911. } else {
  1912. console.error('v-for 暂不支持循环数据:', vFor);
  1913. }
  1914. }
  1915. if (valuePath) {
  1916. context = vm.__get_value(valuePath, context);
  1917. }
  1918. }
  1919. });
  1920. return context;
  1921. }
  1922. function processEventExtra(vm, extra, event, __args__) {
  1923. var extraObj = {};
  1924. if (Array.isArray(extra) && extra.length) {
  1925. /**
  1926. *[
  1927. * ['data.items', 'data.id', item.data.id],
  1928. * ['metas', 'id', meta.id]
  1929. *],
  1930. *[
  1931. * ['data.items', 'data.id', item.data.id],
  1932. * ['metas', 'id', meta.id]
  1933. *],
  1934. *'test'
  1935. */
  1936. extra.forEach(function (dataPath, index) {
  1937. if (typeof dataPath === 'string') {
  1938. if (!dataPath) {
  1939. // model,prop.sync
  1940. extraObj['$' + index] = vm;
  1941. } else {
  1942. if (dataPath === '$event') {
  1943. // $event
  1944. extraObj['$' + index] = event;
  1945. } else if (dataPath === 'arguments') {
  1946. extraObj['$' + index] = event.detail ? event.detail.__args__ || __args__ : __args__;
  1947. } else if (dataPath.indexOf('$event.') === 0) {
  1948. // $event.target.value
  1949. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  1950. } else {
  1951. extraObj['$' + index] = vm.__get_value(dataPath);
  1952. }
  1953. }
  1954. } else {
  1955. extraObj['$' + index] = getExtraValue(vm, dataPath);
  1956. }
  1957. });
  1958. }
  1959. return extraObj;
  1960. }
  1961. function getObjByArray(arr) {
  1962. var obj = {};
  1963. for (var i = 1; i < arr.length; i++) {
  1964. var element = arr[i];
  1965. obj[element[0]] = element[1];
  1966. }
  1967. return obj;
  1968. }
  1969. function processEventArgs(vm, event) {
  1970. var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1971. var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
  1972. var isCustom = arguments.length > 4 ? arguments[4] : undefined;
  1973. var methodName = arguments.length > 5 ? arguments[5] : undefined;
  1974. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  1975. // fixed 用户直接触发 mpInstance.triggerEvent
  1976. var __args__ = isPlainObject(event.detail) ? event.detail.__args__ || [event.detail] : [event.detail];
  1977. if (isCustom) {
  1978. // 自定义事件
  1979. isCustomMPEvent = event.currentTarget && event.currentTarget.dataset && event.currentTarget.dataset.comType === 'wx';
  1980. if (!args.length) {
  1981. // 无参数,直接传入 event 或 detail 数组
  1982. if (isCustomMPEvent) {
  1983. return [event];
  1984. }
  1985. return __args__;
  1986. }
  1987. }
  1988. var extraObj = processEventExtra(vm, extra, event, __args__);
  1989. var ret = [];
  1990. args.forEach(function (arg) {
  1991. if (arg === '$event') {
  1992. if (methodName === '__set_model' && !isCustom) {
  1993. // input v-model value
  1994. ret.push(event.target.value);
  1995. } else {
  1996. if (isCustom && !isCustomMPEvent) {
  1997. ret.push(__args__[0]);
  1998. } else {
  1999. // wxcomponent 组件或内置组件
  2000. ret.push(event);
  2001. }
  2002. }
  2003. } else {
  2004. if (Array.isArray(arg) && arg[0] === 'o') {
  2005. ret.push(getObjByArray(arg));
  2006. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  2007. ret.push(extraObj[arg]);
  2008. } else {
  2009. ret.push(arg);
  2010. }
  2011. }
  2012. });
  2013. return ret;
  2014. }
  2015. var ONCE = '~';
  2016. var CUSTOM = '^';
  2017. function isMatchEventType(eventType, optType) {
  2018. return eventType === optType || optType === 'regionchange' && (eventType === 'begin' || eventType === 'end');
  2019. }
  2020. function getContextVm(vm) {
  2021. var $parent = vm.$parent;
  2022. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  2023. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  2024. $parent = $parent.$parent;
  2025. }
  2026. return $parent && $parent.$parent;
  2027. }
  2028. function handleEvent(event) {
  2029. var _this2 = this;
  2030. event = wrapper$1(event);
  2031. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  2032. var dataset = (event.currentTarget || event.target).dataset;
  2033. if (!dataset) {
  2034. return console.warn('事件信息不存在');
  2035. }
  2036. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  2037. if (!eventOpts) {
  2038. return console.warn('事件信息不存在');
  2039. }
  2040. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  2041. var eventType = event.type;
  2042. var ret = [];
  2043. eventOpts.forEach(function (eventOpt) {
  2044. var type = eventOpt[0];
  2045. var eventsArray = eventOpt[1];
  2046. var isCustom = type.charAt(0) === CUSTOM;
  2047. type = isCustom ? type.slice(1) : type;
  2048. var isOnce = type.charAt(0) === ONCE;
  2049. type = isOnce ? type.slice(1) : type;
  2050. if (eventsArray && isMatchEventType(eventType, type)) {
  2051. eventsArray.forEach(function (eventArray) {
  2052. var methodName = eventArray[0];
  2053. if (methodName) {
  2054. var handlerCtx = _this2.$vm;
  2055. if (handlerCtx.$options.generic) {
  2056. // mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  2057. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  2058. }
  2059. if (methodName === '$emit') {
  2060. handlerCtx.$emit.apply(handlerCtx, processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName));
  2061. return;
  2062. }
  2063. var handler = handlerCtx[methodName];
  2064. if (!isFn(handler)) {
  2065. var _type = _this2.$vm.mpType === 'page' ? 'Page' : 'Component';
  2066. var path = _this2.route || _this2.is;
  2067. throw new Error("".concat(_type, " \"").concat(path, "\" does not have a method \"").concat(methodName, "\""));
  2068. }
  2069. if (isOnce) {
  2070. if (handler.once) {
  2071. return;
  2072. }
  2073. handler.once = true;
  2074. }
  2075. var params = processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName);
  2076. params = Array.isArray(params) ? params : [];
  2077. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  2078. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  2079. // eslint-disable-next-line no-sparse-arrays
  2080. params = params.concat([,,,,,,,,,, event]);
  2081. }
  2082. ret.push(handler.apply(handlerCtx, params));
  2083. }
  2084. });
  2085. }
  2086. });
  2087. if (eventType === 'input' && ret.length === 1 && typeof ret[0] !== 'undefined') {
  2088. return ret[0];
  2089. }
  2090. }
  2091. var eventChannels = {};
  2092. function getEventChannel(id) {
  2093. var eventChannel = eventChannels[id];
  2094. delete eventChannels[id];
  2095. return eventChannel;
  2096. }
  2097. var hooks = ['onShow', 'onHide', 'onError', 'onPageNotFound', 'onThemeChange', 'onUnhandledRejection'];
  2098. function initEventChannel() {
  2099. _vue.default.prototype.getOpenerEventChannel = function () {
  2100. // 微信小程序使用自身getOpenerEventChannel
  2101. {
  2102. return this.$scope.getOpenerEventChannel();
  2103. }
  2104. };
  2105. var callHook = _vue.default.prototype.__call_hook;
  2106. _vue.default.prototype.__call_hook = function (hook, args) {
  2107. if (hook === 'onLoad' && args && args.__id__) {
  2108. this.__eventChannel__ = getEventChannel(args.__id__);
  2109. delete args.__id__;
  2110. }
  2111. return callHook.call(this, hook, args);
  2112. };
  2113. }
  2114. function initScopedSlotsParams() {
  2115. var center = {};
  2116. var parents = {};
  2117. function currentId(fn) {
  2118. var vueIds = this.$options.propsData.vueId;
  2119. if (vueIds) {
  2120. var vueId = vueIds.split(',')[0];
  2121. fn(vueId);
  2122. }
  2123. }
  2124. _vue.default.prototype.$hasSSP = function (vueId) {
  2125. var slot = center[vueId];
  2126. if (!slot) {
  2127. parents[vueId] = this;
  2128. this.$on('hook:destroyed', function () {
  2129. delete parents[vueId];
  2130. });
  2131. }
  2132. return slot;
  2133. };
  2134. _vue.default.prototype.$getSSP = function (vueId, name, needAll) {
  2135. var slot = center[vueId];
  2136. if (slot) {
  2137. var params = slot[name] || [];
  2138. if (needAll) {
  2139. return params;
  2140. }
  2141. return params[0];
  2142. }
  2143. };
  2144. _vue.default.prototype.$setSSP = function (name, value) {
  2145. var index = 0;
  2146. currentId.call(this, function (vueId) {
  2147. var slot = center[vueId];
  2148. var params = slot[name] = slot[name] || [];
  2149. params.push(value);
  2150. index = params.length - 1;
  2151. });
  2152. return index;
  2153. };
  2154. _vue.default.prototype.$initSSP = function () {
  2155. currentId.call(this, function (vueId) {
  2156. center[vueId] = {};
  2157. });
  2158. };
  2159. _vue.default.prototype.$callSSP = function () {
  2160. currentId.call(this, function (vueId) {
  2161. if (parents[vueId]) {
  2162. parents[vueId].$forceUpdate();
  2163. }
  2164. });
  2165. };
  2166. _vue.default.mixin({
  2167. destroyed: function destroyed() {
  2168. var propsData = this.$options.propsData;
  2169. var vueId = propsData && propsData.vueId;
  2170. if (vueId) {
  2171. delete center[vueId];
  2172. delete parents[vueId];
  2173. }
  2174. }
  2175. });
  2176. }
  2177. function parseBaseApp(vm, _ref4) {
  2178. var mocks = _ref4.mocks,
  2179. initRefs = _ref4.initRefs;
  2180. initEventChannel();
  2181. {
  2182. initScopedSlotsParams();
  2183. }
  2184. if (vm.$options.store) {
  2185. _vue.default.prototype.$store = vm.$options.store;
  2186. }
  2187. uniIdMixin(_vue.default);
  2188. _vue.default.prototype.mpHost = "mp-weixin";
  2189. _vue.default.mixin({
  2190. beforeCreate: function beforeCreate() {
  2191. if (!this.$options.mpType) {
  2192. return;
  2193. }
  2194. this.mpType = this.$options.mpType;
  2195. this.$mp = (0, _defineProperty2.default)({
  2196. data: {}
  2197. }, this.mpType, this.$options.mpInstance);
  2198. this.$scope = this.$options.mpInstance;
  2199. delete this.$options.mpType;
  2200. delete this.$options.mpInstance;
  2201. if (this.mpType === 'page' && typeof getApp === 'function') {
  2202. // hack vue-i18n
  2203. var app = getApp();
  2204. if (app.$vm && app.$vm.$i18n) {
  2205. this._i18n = app.$vm.$i18n;
  2206. }
  2207. }
  2208. if (this.mpType !== 'app') {
  2209. initRefs(this);
  2210. initMocks(this, mocks);
  2211. }
  2212. }
  2213. });
  2214. var appOptions = {
  2215. onLaunch: function onLaunch(args) {
  2216. if (this.$vm) {
  2217. // 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  2218. return;
  2219. }
  2220. {
  2221. if (wx.canIUse && !wx.canIUse('nextTick')) {
  2222. // 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  2223. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  2224. }
  2225. }
  2226. this.$vm = vm;
  2227. this.$vm.$mp = {
  2228. app: this
  2229. };
  2230. this.$vm.$scope = this;
  2231. // vm 上也挂载 globalData
  2232. this.$vm.globalData = this.globalData;
  2233. this.$vm._isMounted = true;
  2234. this.$vm.__call_hook('mounted', args);
  2235. this.$vm.__call_hook('onLaunch', args);
  2236. }
  2237. };
  2238. // 兼容旧版本 globalData
  2239. appOptions.globalData = vm.$options.globalData || {};
  2240. // 将 methods 中的方法挂在 getApp() 中
  2241. var methods = vm.$options.methods;
  2242. if (methods) {
  2243. Object.keys(methods).forEach(function (name) {
  2244. appOptions[name] = methods[name];
  2245. });
  2246. }
  2247. initAppLocale(_vue.default, vm, normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN);
  2248. initHooks(appOptions, hooks);
  2249. initUnknownHooks(appOptions, vm.$options);
  2250. return appOptions;
  2251. }
  2252. function parseApp(vm) {
  2253. return parseBaseApp(vm, {
  2254. mocks: mocks,
  2255. initRefs: initRefs
  2256. });
  2257. }
  2258. function createApp(vm) {
  2259. App(parseApp(vm));
  2260. return vm;
  2261. }
  2262. var encodeReserveRE = /[!'()*]/g;
  2263. var encodeReserveReplacer = function encodeReserveReplacer(c) {
  2264. return '%' + c.charCodeAt(0).toString(16);
  2265. };
  2266. var commaRE = /%2C/g;
  2267. // fixed encodeURIComponent which is more conformant to RFC3986:
  2268. // - escapes [!'()*]
  2269. // - preserve commas
  2270. var encode = function encode(str) {
  2271. return encodeURIComponent(str).replace(encodeReserveRE, encodeReserveReplacer).replace(commaRE, ',');
  2272. };
  2273. function stringifyQuery(obj) {
  2274. var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  2275. var res = obj ? Object.keys(obj).map(function (key) {
  2276. var val = obj[key];
  2277. if (val === undefined) {
  2278. return '';
  2279. }
  2280. if (val === null) {
  2281. return encodeStr(key);
  2282. }
  2283. if (Array.isArray(val)) {
  2284. var result = [];
  2285. val.forEach(function (val2) {
  2286. if (val2 === undefined) {
  2287. return;
  2288. }
  2289. if (val2 === null) {
  2290. result.push(encodeStr(key));
  2291. } else {
  2292. result.push(encodeStr(key) + '=' + encodeStr(val2));
  2293. }
  2294. });
  2295. return result.join('&');
  2296. }
  2297. return encodeStr(key) + '=' + encodeStr(val);
  2298. }).filter(function (x) {
  2299. return x.length > 0;
  2300. }).join('&') : null;
  2301. return res ? "?".concat(res) : '';
  2302. }
  2303. function parseBaseComponent(vueComponentOptions) {
  2304. var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  2305. isPage = _ref5.isPage,
  2306. initRelation = _ref5.initRelation;
  2307. var needVueOptions = arguments.length > 2 ? arguments[2] : undefined;
  2308. var _initVueComponent = initVueComponent(_vue.default, vueComponentOptions),
  2309. _initVueComponent2 = (0, _slicedToArray2.default)(_initVueComponent, 2),
  2310. VueComponent = _initVueComponent2[0],
  2311. vueOptions = _initVueComponent2[1];
  2312. var options = _objectSpread({
  2313. multipleSlots: true,
  2314. // styleIsolation: 'apply-shared',
  2315. addGlobalClass: true
  2316. }, vueOptions.options || {});
  2317. {
  2318. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  2319. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  2320. Object.assign(options, vueOptions['mp-weixin'].options);
  2321. }
  2322. }
  2323. var componentOptions = {
  2324. options: options,
  2325. data: initData(vueOptions, _vue.default.prototype),
  2326. behaviors: initBehaviors(vueOptions, initBehavior),
  2327. properties: initProperties(vueOptions.props, false, vueOptions.__file, options),
  2328. lifetimes: {
  2329. attached: function attached() {
  2330. var properties = this.properties;
  2331. var options = {
  2332. mpType: isPage.call(this) ? 'page' : 'component',
  2333. mpInstance: this,
  2334. propsData: properties
  2335. };
  2336. initVueIds(properties.vueId, this);
  2337. // 处理父子关系
  2338. initRelation.call(this, {
  2339. vuePid: this._$vuePid,
  2340. vueOptions: options
  2341. });
  2342. // 初始化 vue 实例
  2343. this.$vm = new VueComponent(options);
  2344. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  2345. initSlots(this.$vm, properties.vueSlots);
  2346. // 触发首次 setData
  2347. this.$vm.$mount();
  2348. },
  2349. ready: function ready() {
  2350. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  2351. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  2352. if (this.$vm) {
  2353. this.$vm._isMounted = true;
  2354. this.$vm.__call_hook('mounted');
  2355. this.$vm.__call_hook('onReady');
  2356. }
  2357. },
  2358. detached: function detached() {
  2359. this.$vm && this.$vm.$destroy();
  2360. }
  2361. },
  2362. pageLifetimes: {
  2363. show: function show(args) {
  2364. this.$vm && this.$vm.__call_hook('onPageShow', args);
  2365. },
  2366. hide: function hide() {
  2367. this.$vm && this.$vm.__call_hook('onPageHide');
  2368. },
  2369. resize: function resize(size) {
  2370. this.$vm && this.$vm.__call_hook('onPageResize', size);
  2371. }
  2372. },
  2373. methods: {
  2374. __l: handleLink,
  2375. __e: handleEvent
  2376. }
  2377. };
  2378. // externalClasses
  2379. if (vueOptions.externalClasses) {
  2380. componentOptions.externalClasses = vueOptions.externalClasses;
  2381. }
  2382. if (Array.isArray(vueOptions.wxsCallMethods)) {
  2383. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  2384. componentOptions.methods[callMethod] = function (args) {
  2385. return this.$vm[callMethod](args);
  2386. };
  2387. });
  2388. }
  2389. if (needVueOptions) {
  2390. return [componentOptions, vueOptions, VueComponent];
  2391. }
  2392. if (isPage) {
  2393. return componentOptions;
  2394. }
  2395. return [componentOptions, VueComponent];
  2396. }
  2397. function parseComponent(vueComponentOptions, needVueOptions) {
  2398. return parseBaseComponent(vueComponentOptions, {
  2399. isPage: isPage,
  2400. initRelation: initRelation
  2401. }, needVueOptions);
  2402. }
  2403. var hooks$1 = ['onShow', 'onHide', 'onUnload'];
  2404. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  2405. function parseBasePage(vuePageOptions) {
  2406. var _parseComponent = parseComponent(vuePageOptions, true),
  2407. _parseComponent2 = (0, _slicedToArray2.default)(_parseComponent, 2),
  2408. pageOptions = _parseComponent2[0],
  2409. vueOptions = _parseComponent2[1];
  2410. initHooks(pageOptions.methods, hooks$1, vueOptions);
  2411. pageOptions.methods.onLoad = function (query) {
  2412. this.options = query;
  2413. var copyQuery = Object.assign({}, query);
  2414. delete copyQuery.__id__;
  2415. this.$page = {
  2416. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery)
  2417. };
  2418. this.$vm.$mp.query = query; // 兼容 mpvue
  2419. this.$vm.__call_hook('onLoad', query);
  2420. };
  2421. {
  2422. initUnknownHooks(pageOptions.methods, vuePageOptions, ['onReady']);
  2423. }
  2424. {
  2425. initWorkletMethods(pageOptions.methods, vueOptions.methods);
  2426. }
  2427. return pageOptions;
  2428. }
  2429. function parsePage(vuePageOptions) {
  2430. return parseBasePage(vuePageOptions);
  2431. }
  2432. function createPage(vuePageOptions) {
  2433. {
  2434. return Component(parsePage(vuePageOptions));
  2435. }
  2436. }
  2437. function createComponent(vueOptions) {
  2438. {
  2439. return Component(parseComponent(vueOptions));
  2440. }
  2441. }
  2442. function createSubpackageApp(vm) {
  2443. var appOptions = parseApp(vm);
  2444. var app = getApp({
  2445. allowDefault: true
  2446. });
  2447. vm.$scope = app;
  2448. var globalData = app.globalData;
  2449. if (globalData) {
  2450. Object.keys(appOptions.globalData).forEach(function (name) {
  2451. if (!hasOwn(globalData, name)) {
  2452. globalData[name] = appOptions.globalData[name];
  2453. }
  2454. });
  2455. }
  2456. Object.keys(appOptions).forEach(function (name) {
  2457. if (!hasOwn(app, name)) {
  2458. app[name] = appOptions[name];
  2459. }
  2460. });
  2461. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2462. wx.onAppShow(function () {
  2463. for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  2464. args[_key5] = arguments[_key5];
  2465. }
  2466. vm.__call_hook('onShow', args);
  2467. });
  2468. }
  2469. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2470. wx.onAppHide(function () {
  2471. for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
  2472. args[_key6] = arguments[_key6];
  2473. }
  2474. vm.__call_hook('onHide', args);
  2475. });
  2476. }
  2477. if (isFn(appOptions.onLaunch)) {
  2478. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2479. vm.__call_hook('onLaunch', args);
  2480. }
  2481. return vm;
  2482. }
  2483. function createPlugin(vm) {
  2484. var appOptions = parseApp(vm);
  2485. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2486. wx.onAppShow(function () {
  2487. for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  2488. args[_key7] = arguments[_key7];
  2489. }
  2490. vm.__call_hook('onShow', args);
  2491. });
  2492. }
  2493. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2494. wx.onAppHide(function () {
  2495. for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
  2496. args[_key8] = arguments[_key8];
  2497. }
  2498. vm.__call_hook('onHide', args);
  2499. });
  2500. }
  2501. if (isFn(appOptions.onLaunch)) {
  2502. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2503. vm.__call_hook('onLaunch', args);
  2504. }
  2505. return vm;
  2506. }
  2507. todos.forEach(function (todoApi) {
  2508. protocols[todoApi] = false;
  2509. });
  2510. canIUses.forEach(function (canIUseApi) {
  2511. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name : canIUseApi;
  2512. if (!wx.canIUse(apiName)) {
  2513. protocols[canIUseApi] = false;
  2514. }
  2515. });
  2516. var uni = {};
  2517. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  2518. uni = new Proxy({}, {
  2519. get: function get(target, name) {
  2520. if (hasOwn(target, name)) {
  2521. return target[name];
  2522. }
  2523. if (baseApi[name]) {
  2524. return baseApi[name];
  2525. }
  2526. if (api[name]) {
  2527. return promisify(name, api[name]);
  2528. }
  2529. {
  2530. if (extraApi[name]) {
  2531. return promisify(name, extraApi[name]);
  2532. }
  2533. if (todoApis[name]) {
  2534. return promisify(name, todoApis[name]);
  2535. }
  2536. }
  2537. if (eventApi[name]) {
  2538. return eventApi[name];
  2539. }
  2540. return promisify(name, wrapper(name, wx[name]));
  2541. },
  2542. set: function set(target, name, value) {
  2543. target[name] = value;
  2544. return true;
  2545. }
  2546. });
  2547. } else {
  2548. Object.keys(baseApi).forEach(function (name) {
  2549. uni[name] = baseApi[name];
  2550. });
  2551. {
  2552. Object.keys(todoApis).forEach(function (name) {
  2553. uni[name] = promisify(name, todoApis[name]);
  2554. });
  2555. Object.keys(extraApi).forEach(function (name) {
  2556. uni[name] = promisify(name, extraApi[name]);
  2557. });
  2558. }
  2559. Object.keys(eventApi).forEach(function (name) {
  2560. uni[name] = eventApi[name];
  2561. });
  2562. Object.keys(api).forEach(function (name) {
  2563. uni[name] = promisify(name, api[name]);
  2564. });
  2565. Object.keys(wx).forEach(function (name) {
  2566. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  2567. uni[name] = promisify(name, wrapper(name, wx[name]));
  2568. }
  2569. });
  2570. }
  2571. wx.createApp = createApp;
  2572. wx.createPage = createPage;
  2573. wx.createComponent = createComponent;
  2574. wx.createSubpackageApp = createSubpackageApp;
  2575. wx.createPlugin = createPlugin;
  2576. var uni$1 = uni;
  2577. var _default = uni$1;
  2578. exports.default = _default;
  2579. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 3)))
  2580. /***/ }),
  2581. /***/ 20:
  2582. /*!****************************************************************!*\
  2583. !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
  2584. \****************************************************************/
  2585. /*! no static exports found */
  2586. /***/ (function(module, exports) {
  2587. function _iterableToArray(iter) {
  2588. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  2589. }
  2590. module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2591. /***/ }),
  2592. /***/ 21:
  2593. /*!******************************************************************!*\
  2594. !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
  2595. \******************************************************************/
  2596. /*! no static exports found */
  2597. /***/ (function(module, exports) {
  2598. function _nonIterableSpread() {
  2599. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  2600. }
  2601. module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2602. /***/ }),
  2603. /***/ 22:
  2604. /*!*************************************************************!*\
  2605. !*** ./node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js ***!
  2606. \*************************************************************/
  2607. /*! no static exports found */
  2608. /***/ (function(module, exports, __webpack_require__) {
  2609. "use strict";
  2610. /* WEBPACK VAR INJECTION */(function(uni, global) {
  2611. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  2612. Object.defineProperty(exports, "__esModule", {
  2613. value: true
  2614. });
  2615. exports.LOCALE_ZH_HANT = exports.LOCALE_ZH_HANS = exports.LOCALE_FR = exports.LOCALE_ES = exports.LOCALE_EN = exports.I18n = exports.Formatter = void 0;
  2616. exports.compileI18nJsonStr = compileI18nJsonStr;
  2617. exports.hasI18nJson = hasI18nJson;
  2618. exports.initVueI18n = initVueI18n;
  2619. exports.isI18nStr = isI18nStr;
  2620. exports.isString = void 0;
  2621. exports.normalizeLocale = normalizeLocale;
  2622. exports.parseI18nJson = parseI18nJson;
  2623. exports.resolveLocale = resolveLocale;
  2624. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  2625. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  2626. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  2627. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  2628. var isObject = function isObject(val) {
  2629. return val !== null && (0, _typeof2.default)(val) === 'object';
  2630. };
  2631. var defaultDelimiters = ['{', '}'];
  2632. var BaseFormatter = /*#__PURE__*/function () {
  2633. function BaseFormatter() {
  2634. (0, _classCallCheck2.default)(this, BaseFormatter);
  2635. this._caches = Object.create(null);
  2636. }
  2637. (0, _createClass2.default)(BaseFormatter, [{
  2638. key: "interpolate",
  2639. value: function interpolate(message, values) {
  2640. var delimiters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultDelimiters;
  2641. if (!values) {
  2642. return [message];
  2643. }
  2644. var tokens = this._caches[message];
  2645. if (!tokens) {
  2646. tokens = parse(message, delimiters);
  2647. this._caches[message] = tokens;
  2648. }
  2649. return compile(tokens, values);
  2650. }
  2651. }]);
  2652. return BaseFormatter;
  2653. }();
  2654. exports.Formatter = BaseFormatter;
  2655. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  2656. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  2657. function parse(format, _ref) {
  2658. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  2659. startDelimiter = _ref2[0],
  2660. endDelimiter = _ref2[1];
  2661. var tokens = [];
  2662. var position = 0;
  2663. var text = '';
  2664. while (position < format.length) {
  2665. var char = format[position++];
  2666. if (char === startDelimiter) {
  2667. if (text) {
  2668. tokens.push({
  2669. type: 'text',
  2670. value: text
  2671. });
  2672. }
  2673. text = '';
  2674. var sub = '';
  2675. char = format[position++];
  2676. while (char !== undefined && char !== endDelimiter) {
  2677. sub += char;
  2678. char = format[position++];
  2679. }
  2680. var isClosed = char === endDelimiter;
  2681. var type = RE_TOKEN_LIST_VALUE.test(sub) ? 'list' : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? 'named' : 'unknown';
  2682. tokens.push({
  2683. value: sub,
  2684. type: type
  2685. });
  2686. }
  2687. // else if (char === '%') {
  2688. // // when found rails i18n syntax, skip text capture
  2689. // if (format[position] !== '{') {
  2690. // text += char
  2691. // }
  2692. // }
  2693. else {
  2694. text += char;
  2695. }
  2696. }
  2697. text && tokens.push({
  2698. type: 'text',
  2699. value: text
  2700. });
  2701. return tokens;
  2702. }
  2703. function compile(tokens, values) {
  2704. var compiled = [];
  2705. var index = 0;
  2706. var mode = Array.isArray(values) ? 'list' : isObject(values) ? 'named' : 'unknown';
  2707. if (mode === 'unknown') {
  2708. return compiled;
  2709. }
  2710. while (index < tokens.length) {
  2711. var token = tokens[index];
  2712. switch (token.type) {
  2713. case 'text':
  2714. compiled.push(token.value);
  2715. break;
  2716. case 'list':
  2717. compiled.push(values[parseInt(token.value, 10)]);
  2718. break;
  2719. case 'named':
  2720. if (mode === 'named') {
  2721. compiled.push(values[token.value]);
  2722. } else {
  2723. if (true) {
  2724. console.warn("Type of token '".concat(token.type, "' and format of value '").concat(mode, "' don't match!"));
  2725. }
  2726. }
  2727. break;
  2728. case 'unknown':
  2729. if (true) {
  2730. console.warn("Detect 'unknown' type of token!");
  2731. }
  2732. break;
  2733. }
  2734. index++;
  2735. }
  2736. return compiled;
  2737. }
  2738. var LOCALE_ZH_HANS = 'zh-Hans';
  2739. exports.LOCALE_ZH_HANS = LOCALE_ZH_HANS;
  2740. var LOCALE_ZH_HANT = 'zh-Hant';
  2741. exports.LOCALE_ZH_HANT = LOCALE_ZH_HANT;
  2742. var LOCALE_EN = 'en';
  2743. exports.LOCALE_EN = LOCALE_EN;
  2744. var LOCALE_FR = 'fr';
  2745. exports.LOCALE_FR = LOCALE_FR;
  2746. var LOCALE_ES = 'es';
  2747. exports.LOCALE_ES = LOCALE_ES;
  2748. var hasOwnProperty = Object.prototype.hasOwnProperty;
  2749. var hasOwn = function hasOwn(val, key) {
  2750. return hasOwnProperty.call(val, key);
  2751. };
  2752. var defaultFormatter = new BaseFormatter();
  2753. function include(str, parts) {
  2754. return !!parts.find(function (part) {
  2755. return str.indexOf(part) !== -1;
  2756. });
  2757. }
  2758. function startsWith(str, parts) {
  2759. return parts.find(function (part) {
  2760. return str.indexOf(part) === 0;
  2761. });
  2762. }
  2763. function normalizeLocale(locale, messages) {
  2764. if (!locale) {
  2765. return;
  2766. }
  2767. locale = locale.trim().replace(/_/g, '-');
  2768. if (messages && messages[locale]) {
  2769. return locale;
  2770. }
  2771. locale = locale.toLowerCase();
  2772. if (locale === 'chinese') {
  2773. // 支付宝
  2774. return LOCALE_ZH_HANS;
  2775. }
  2776. if (locale.indexOf('zh') === 0) {
  2777. if (locale.indexOf('-hans') > -1) {
  2778. return LOCALE_ZH_HANS;
  2779. }
  2780. if (locale.indexOf('-hant') > -1) {
  2781. return LOCALE_ZH_HANT;
  2782. }
  2783. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  2784. return LOCALE_ZH_HANT;
  2785. }
  2786. return LOCALE_ZH_HANS;
  2787. }
  2788. var locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  2789. if (messages && Object.keys(messages).length > 0) {
  2790. locales = Object.keys(messages);
  2791. }
  2792. var lang = startsWith(locale, locales);
  2793. if (lang) {
  2794. return lang;
  2795. }
  2796. }
  2797. var I18n = /*#__PURE__*/function () {
  2798. function I18n(_ref3) {
  2799. var locale = _ref3.locale,
  2800. fallbackLocale = _ref3.fallbackLocale,
  2801. messages = _ref3.messages,
  2802. watcher = _ref3.watcher,
  2803. formater = _ref3.formater;
  2804. (0, _classCallCheck2.default)(this, I18n);
  2805. this.locale = LOCALE_EN;
  2806. this.fallbackLocale = LOCALE_EN;
  2807. this.message = {};
  2808. this.messages = {};
  2809. this.watchers = [];
  2810. if (fallbackLocale) {
  2811. this.fallbackLocale = fallbackLocale;
  2812. }
  2813. this.formater = formater || defaultFormatter;
  2814. this.messages = messages || {};
  2815. this.setLocale(locale || LOCALE_EN);
  2816. if (watcher) {
  2817. this.watchLocale(watcher);
  2818. }
  2819. }
  2820. (0, _createClass2.default)(I18n, [{
  2821. key: "setLocale",
  2822. value: function setLocale(locale) {
  2823. var _this = this;
  2824. var oldLocale = this.locale;
  2825. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  2826. if (!this.messages[this.locale]) {
  2827. // 可能初始化时不存在
  2828. this.messages[this.locale] = {};
  2829. }
  2830. this.message = this.messages[this.locale];
  2831. // 仅发生变化时,通知
  2832. if (oldLocale !== this.locale) {
  2833. this.watchers.forEach(function (watcher) {
  2834. watcher(_this.locale, oldLocale);
  2835. });
  2836. }
  2837. }
  2838. }, {
  2839. key: "getLocale",
  2840. value: function getLocale() {
  2841. return this.locale;
  2842. }
  2843. }, {
  2844. key: "watchLocale",
  2845. value: function watchLocale(fn) {
  2846. var _this2 = this;
  2847. var index = this.watchers.push(fn) - 1;
  2848. return function () {
  2849. _this2.watchers.splice(index, 1);
  2850. };
  2851. }
  2852. }, {
  2853. key: "add",
  2854. value: function add(locale, message) {
  2855. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  2856. var curMessages = this.messages[locale];
  2857. if (curMessages) {
  2858. if (override) {
  2859. Object.assign(curMessages, message);
  2860. } else {
  2861. Object.keys(message).forEach(function (key) {
  2862. if (!hasOwn(curMessages, key)) {
  2863. curMessages[key] = message[key];
  2864. }
  2865. });
  2866. }
  2867. } else {
  2868. this.messages[locale] = message;
  2869. }
  2870. }
  2871. }, {
  2872. key: "f",
  2873. value: function f(message, values, delimiters) {
  2874. return this.formater.interpolate(message, values, delimiters).join('');
  2875. }
  2876. }, {
  2877. key: "t",
  2878. value: function t(key, locale, values) {
  2879. var message = this.message;
  2880. if (typeof locale === 'string') {
  2881. locale = normalizeLocale(locale, this.messages);
  2882. locale && (message = this.messages[locale]);
  2883. } else {
  2884. values = locale;
  2885. }
  2886. if (!hasOwn(message, key)) {
  2887. console.warn("Cannot translate the value of keypath ".concat(key, ". Use the value of keypath as default."));
  2888. return key;
  2889. }
  2890. return this.formater.interpolate(message[key], values).join('');
  2891. }
  2892. }]);
  2893. return I18n;
  2894. }();
  2895. exports.I18n = I18n;
  2896. function watchAppLocale(appVm, i18n) {
  2897. // 需要保证 watch 的触发在组件渲染之前
  2898. if (appVm.$watchLocale) {
  2899. // vue2
  2900. appVm.$watchLocale(function (newLocale) {
  2901. i18n.setLocale(newLocale);
  2902. });
  2903. } else {
  2904. appVm.$watch(function () {
  2905. return appVm.$locale;
  2906. }, function (newLocale) {
  2907. i18n.setLocale(newLocale);
  2908. });
  2909. }
  2910. }
  2911. function getDefaultLocale() {
  2912. if (typeof uni !== 'undefined' && uni.getLocale) {
  2913. return uni.getLocale();
  2914. }
  2915. // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale
  2916. if (typeof global !== 'undefined' && global.getLocale) {
  2917. return global.getLocale();
  2918. }
  2919. return LOCALE_EN;
  2920. }
  2921. function initVueI18n(locale) {
  2922. var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  2923. var fallbackLocale = arguments.length > 2 ? arguments[2] : undefined;
  2924. var watcher = arguments.length > 3 ? arguments[3] : undefined;
  2925. // 兼容旧版本入参
  2926. if (typeof locale !== 'string') {
  2927. var _ref4 = [messages, locale];
  2928. locale = _ref4[0];
  2929. messages = _ref4[1];
  2930. }
  2931. if (typeof locale !== 'string') {
  2932. // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined
  2933. locale = getDefaultLocale();
  2934. }
  2935. if (typeof fallbackLocale !== 'string') {
  2936. fallbackLocale = typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale || LOCALE_EN;
  2937. }
  2938. var i18n = new I18n({
  2939. locale: locale,
  2940. fallbackLocale: fallbackLocale,
  2941. messages: messages,
  2942. watcher: watcher
  2943. });
  2944. var _t = function t(key, values) {
  2945. if (typeof getApp !== 'function') {
  2946. // app view
  2947. /* eslint-disable no-func-assign */
  2948. _t = function t(key, values) {
  2949. return i18n.t(key, values);
  2950. };
  2951. } else {
  2952. var isWatchedAppLocale = false;
  2953. _t = function t(key, values) {
  2954. var appVm = getApp().$vm;
  2955. // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化
  2956. // options: {
  2957. // type: Array,
  2958. // default () {
  2959. // return [{
  2960. // icon: 'shop',
  2961. // text: t("uni-goods-nav.options.shop"),
  2962. // }, {
  2963. // icon: 'cart',
  2964. // text: t("uni-goods-nav.options.cart")
  2965. // }]
  2966. // }
  2967. // },
  2968. if (appVm) {
  2969. // 触发响应式
  2970. appVm.$locale;
  2971. if (!isWatchedAppLocale) {
  2972. isWatchedAppLocale = true;
  2973. watchAppLocale(appVm, i18n);
  2974. }
  2975. }
  2976. return i18n.t(key, values);
  2977. };
  2978. }
  2979. return _t(key, values);
  2980. };
  2981. return {
  2982. i18n: i18n,
  2983. f: function f(message, values, delimiters) {
  2984. return i18n.f(message, values, delimiters);
  2985. },
  2986. t: function t(key, values) {
  2987. return _t(key, values);
  2988. },
  2989. add: function add(locale, message) {
  2990. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  2991. return i18n.add(locale, message, override);
  2992. },
  2993. watch: function watch(fn) {
  2994. return i18n.watchLocale(fn);
  2995. },
  2996. getLocale: function getLocale() {
  2997. return i18n.getLocale();
  2998. },
  2999. setLocale: function setLocale(newLocale) {
  3000. return i18n.setLocale(newLocale);
  3001. }
  3002. };
  3003. }
  3004. var isString = function isString(val) {
  3005. return typeof val === 'string';
  3006. };
  3007. exports.isString = isString;
  3008. var formater;
  3009. function hasI18nJson(jsonObj, delimiters) {
  3010. if (!formater) {
  3011. formater = new BaseFormatter();
  3012. }
  3013. return walkJsonObj(jsonObj, function (jsonObj, key) {
  3014. var value = jsonObj[key];
  3015. if (isString(value)) {
  3016. if (isI18nStr(value, delimiters)) {
  3017. return true;
  3018. }
  3019. } else {
  3020. return hasI18nJson(value, delimiters);
  3021. }
  3022. });
  3023. }
  3024. function parseI18nJson(jsonObj, values, delimiters) {
  3025. if (!formater) {
  3026. formater = new BaseFormatter();
  3027. }
  3028. walkJsonObj(jsonObj, function (jsonObj, key) {
  3029. var value = jsonObj[key];
  3030. if (isString(value)) {
  3031. if (isI18nStr(value, delimiters)) {
  3032. jsonObj[key] = compileStr(value, values, delimiters);
  3033. }
  3034. } else {
  3035. parseI18nJson(value, values, delimiters);
  3036. }
  3037. });
  3038. return jsonObj;
  3039. }
  3040. function compileI18nJsonStr(jsonStr, _ref5) {
  3041. var locale = _ref5.locale,
  3042. locales = _ref5.locales,
  3043. delimiters = _ref5.delimiters;
  3044. if (!isI18nStr(jsonStr, delimiters)) {
  3045. return jsonStr;
  3046. }
  3047. if (!formater) {
  3048. formater = new BaseFormatter();
  3049. }
  3050. var localeValues = [];
  3051. Object.keys(locales).forEach(function (name) {
  3052. if (name !== locale) {
  3053. localeValues.push({
  3054. locale: name,
  3055. values: locales[name]
  3056. });
  3057. }
  3058. });
  3059. localeValues.unshift({
  3060. locale: locale,
  3061. values: locales[locale]
  3062. });
  3063. try {
  3064. return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);
  3065. } catch (e) {}
  3066. return jsonStr;
  3067. }
  3068. function isI18nStr(value, delimiters) {
  3069. return value.indexOf(delimiters[0]) > -1;
  3070. }
  3071. function compileStr(value, values, delimiters) {
  3072. return formater.interpolate(value, values, delimiters).join('');
  3073. }
  3074. function compileValue(jsonObj, key, localeValues, delimiters) {
  3075. var value = jsonObj[key];
  3076. if (isString(value)) {
  3077. // 存在国际化
  3078. if (isI18nStr(value, delimiters)) {
  3079. jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);
  3080. if (localeValues.length > 1) {
  3081. // 格式化国际化语言
  3082. var valueLocales = jsonObj[key + 'Locales'] = {};
  3083. localeValues.forEach(function (localValue) {
  3084. valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);
  3085. });
  3086. }
  3087. }
  3088. } else {
  3089. compileJsonObj(value, localeValues, delimiters);
  3090. }
  3091. }
  3092. function compileJsonObj(jsonObj, localeValues, delimiters) {
  3093. walkJsonObj(jsonObj, function (jsonObj, key) {
  3094. compileValue(jsonObj, key, localeValues, delimiters);
  3095. });
  3096. return jsonObj;
  3097. }
  3098. function walkJsonObj(jsonObj, walk) {
  3099. if (Array.isArray(jsonObj)) {
  3100. for (var i = 0; i < jsonObj.length; i++) {
  3101. if (walk(jsonObj, i)) {
  3102. return true;
  3103. }
  3104. }
  3105. } else if (isObject(jsonObj)) {
  3106. for (var key in jsonObj) {
  3107. if (walk(jsonObj, key)) {
  3108. return true;
  3109. }
  3110. }
  3111. }
  3112. return false;
  3113. }
  3114. function resolveLocale(locales) {
  3115. return function (locale) {
  3116. if (!locale) {
  3117. return locale;
  3118. }
  3119. locale = normalizeLocale(locale) || locale;
  3120. return resolveLocaleChain(locale).find(function (locale) {
  3121. return locales.indexOf(locale) > -1;
  3122. });
  3123. };
  3124. }
  3125. function resolveLocaleChain(locale) {
  3126. var chain = [];
  3127. var tokens = locale.split('-');
  3128. while (tokens.length) {
  3129. chain.push(tokens.join('-'));
  3130. tokens.pop();
  3131. }
  3132. return chain;
  3133. }
  3134. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 3)))
  3135. /***/ }),
  3136. /***/ 23:
  3137. /*!***************************************************************!*\
  3138. !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
  3139. \***************************************************************/
  3140. /*! no static exports found */
  3141. /***/ (function(module, exports) {
  3142. function _classCallCheck(instance, Constructor) {
  3143. if (!(instance instanceof Constructor)) {
  3144. throw new TypeError("Cannot call a class as a function");
  3145. }
  3146. }
  3147. module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3148. /***/ }),
  3149. /***/ 236:
  3150. /*!**************************************************************************************************************!*\
  3151. !*** C:/Users/yuanyiming/Desktop/教研app/teaching-uniapp/node_modules/@dcloudio/uni-ui/lib/uni-icons/icons.js ***!
  3152. \**************************************************************************************************************/
  3153. /*! no static exports found */
  3154. /***/ (function(module, exports, __webpack_require__) {
  3155. "use strict";
  3156. Object.defineProperty(exports, "__esModule", {
  3157. value: true
  3158. });
  3159. exports.default = void 0;
  3160. var _default = {
  3161. "id": "2852637",
  3162. "name": "uniui图标库",
  3163. "font_family": "uniicons",
  3164. "css_prefix_text": "uniui-",
  3165. "description": "",
  3166. "glyphs": [{
  3167. "icon_id": "25027049",
  3168. "name": "yanse",
  3169. "font_class": "color",
  3170. "unicode": "e6cf",
  3171. "unicode_decimal": 59087
  3172. }, {
  3173. "icon_id": "25027048",
  3174. "name": "wallet",
  3175. "font_class": "wallet",
  3176. "unicode": "e6b1",
  3177. "unicode_decimal": 59057
  3178. }, {
  3179. "icon_id": "25015720",
  3180. "name": "settings-filled",
  3181. "font_class": "settings-filled",
  3182. "unicode": "e6ce",
  3183. "unicode_decimal": 59086
  3184. }, {
  3185. "icon_id": "25015434",
  3186. "name": "shimingrenzheng-filled",
  3187. "font_class": "auth-filled",
  3188. "unicode": "e6cc",
  3189. "unicode_decimal": 59084
  3190. }, {
  3191. "icon_id": "24934246",
  3192. "name": "shop-filled",
  3193. "font_class": "shop-filled",
  3194. "unicode": "e6cd",
  3195. "unicode_decimal": 59085
  3196. }, {
  3197. "icon_id": "24934159",
  3198. "name": "staff-filled-01",
  3199. "font_class": "staff-filled",
  3200. "unicode": "e6cb",
  3201. "unicode_decimal": 59083
  3202. }, {
  3203. "icon_id": "24932461",
  3204. "name": "VIP-filled",
  3205. "font_class": "vip-filled",
  3206. "unicode": "e6c6",
  3207. "unicode_decimal": 59078
  3208. }, {
  3209. "icon_id": "24932462",
  3210. "name": "plus_circle_fill",
  3211. "font_class": "plus-filled",
  3212. "unicode": "e6c7",
  3213. "unicode_decimal": 59079
  3214. }, {
  3215. "icon_id": "24932463",
  3216. "name": "folder_add-filled",
  3217. "font_class": "folder-add-filled",
  3218. "unicode": "e6c8",
  3219. "unicode_decimal": 59080
  3220. }, {
  3221. "icon_id": "24932464",
  3222. "name": "yanse-filled",
  3223. "font_class": "color-filled",
  3224. "unicode": "e6c9",
  3225. "unicode_decimal": 59081
  3226. }, {
  3227. "icon_id": "24932465",
  3228. "name": "tune-filled",
  3229. "font_class": "tune-filled",
  3230. "unicode": "e6ca",
  3231. "unicode_decimal": 59082
  3232. }, {
  3233. "icon_id": "24932455",
  3234. "name": "a-rilidaka-filled",
  3235. "font_class": "calendar-filled",
  3236. "unicode": "e6c0",
  3237. "unicode_decimal": 59072
  3238. }, {
  3239. "icon_id": "24932456",
  3240. "name": "notification-filled",
  3241. "font_class": "notification-filled",
  3242. "unicode": "e6c1",
  3243. "unicode_decimal": 59073
  3244. }, {
  3245. "icon_id": "24932457",
  3246. "name": "wallet-filled",
  3247. "font_class": "wallet-filled",
  3248. "unicode": "e6c2",
  3249. "unicode_decimal": 59074
  3250. }, {
  3251. "icon_id": "24932458",
  3252. "name": "paihangbang-filled",
  3253. "font_class": "medal-filled",
  3254. "unicode": "e6c3",
  3255. "unicode_decimal": 59075
  3256. }, {
  3257. "icon_id": "24932459",
  3258. "name": "gift-filled",
  3259. "font_class": "gift-filled",
  3260. "unicode": "e6c4",
  3261. "unicode_decimal": 59076
  3262. }, {
  3263. "icon_id": "24932460",
  3264. "name": "fire-filled",
  3265. "font_class": "fire-filled",
  3266. "unicode": "e6c5",
  3267. "unicode_decimal": 59077
  3268. }, {
  3269. "icon_id": "24928001",
  3270. "name": "refreshempty",
  3271. "font_class": "refreshempty",
  3272. "unicode": "e6bf",
  3273. "unicode_decimal": 59071
  3274. }, {
  3275. "icon_id": "24926853",
  3276. "name": "location-ellipse",
  3277. "font_class": "location-filled",
  3278. "unicode": "e6af",
  3279. "unicode_decimal": 59055
  3280. }, {
  3281. "icon_id": "24926735",
  3282. "name": "person-filled",
  3283. "font_class": "person-filled",
  3284. "unicode": "e69d",
  3285. "unicode_decimal": 59037
  3286. }, {
  3287. "icon_id": "24926703",
  3288. "name": "personadd-filled",
  3289. "font_class": "personadd-filled",
  3290. "unicode": "e698",
  3291. "unicode_decimal": 59032
  3292. }, {
  3293. "icon_id": "24923351",
  3294. "name": "back",
  3295. "font_class": "back",
  3296. "unicode": "e6b9",
  3297. "unicode_decimal": 59065
  3298. }, {
  3299. "icon_id": "24923352",
  3300. "name": "forward",
  3301. "font_class": "forward",
  3302. "unicode": "e6ba",
  3303. "unicode_decimal": 59066
  3304. }, {
  3305. "icon_id": "24923353",
  3306. "name": "arrowthinright",
  3307. "font_class": "arrow-right",
  3308. "unicode": "e6bb",
  3309. "unicode_decimal": 59067
  3310. }, {
  3311. "icon_id": "24923353",
  3312. "name": "arrowthinright",
  3313. "font_class": "arrowthinright",
  3314. "unicode": "e6bb",
  3315. "unicode_decimal": 59067
  3316. }, {
  3317. "icon_id": "24923354",
  3318. "name": "arrowthinleft",
  3319. "font_class": "arrow-left",
  3320. "unicode": "e6bc",
  3321. "unicode_decimal": 59068
  3322. }, {
  3323. "icon_id": "24923354",
  3324. "name": "arrowthinleft",
  3325. "font_class": "arrowthinleft",
  3326. "unicode": "e6bc",
  3327. "unicode_decimal": 59068
  3328. }, {
  3329. "icon_id": "24923355",
  3330. "name": "arrowthinup",
  3331. "font_class": "arrow-up",
  3332. "unicode": "e6bd",
  3333. "unicode_decimal": 59069
  3334. }, {
  3335. "icon_id": "24923355",
  3336. "name": "arrowthinup",
  3337. "font_class": "arrowthinup",
  3338. "unicode": "e6bd",
  3339. "unicode_decimal": 59069
  3340. }, {
  3341. "icon_id": "24923356",
  3342. "name": "arrowthindown",
  3343. "font_class": "arrow-down",
  3344. "unicode": "e6be",
  3345. "unicode_decimal": 59070
  3346. }, {
  3347. "icon_id": "24923356",
  3348. "name": "arrowthindown",
  3349. "font_class": "arrowthindown",
  3350. "unicode": "e6be",
  3351. "unicode_decimal": 59070
  3352. }, {
  3353. "icon_id": "24923349",
  3354. "name": "arrowdown",
  3355. "font_class": "bottom",
  3356. "unicode": "e6b8",
  3357. "unicode_decimal": 59064
  3358. }, {
  3359. "icon_id": "24923349",
  3360. "name": "arrowdown",
  3361. "font_class": "arrowdown",
  3362. "unicode": "e6b8",
  3363. "unicode_decimal": 59064
  3364. }, {
  3365. "icon_id": "24923346",
  3366. "name": "arrowright",
  3367. "font_class": "right",
  3368. "unicode": "e6b5",
  3369. "unicode_decimal": 59061
  3370. }, {
  3371. "icon_id": "24923346",
  3372. "name": "arrowright",
  3373. "font_class": "arrowright",
  3374. "unicode": "e6b5",
  3375. "unicode_decimal": 59061
  3376. }, {
  3377. "icon_id": "24923347",
  3378. "name": "arrowup",
  3379. "font_class": "top",
  3380. "unicode": "e6b6",
  3381. "unicode_decimal": 59062
  3382. }, {
  3383. "icon_id": "24923347",
  3384. "name": "arrowup",
  3385. "font_class": "arrowup",
  3386. "unicode": "e6b6",
  3387. "unicode_decimal": 59062
  3388. }, {
  3389. "icon_id": "24923348",
  3390. "name": "arrowleft",
  3391. "font_class": "left",
  3392. "unicode": "e6b7",
  3393. "unicode_decimal": 59063
  3394. }, {
  3395. "icon_id": "24923348",
  3396. "name": "arrowleft",
  3397. "font_class": "arrowleft",
  3398. "unicode": "e6b7",
  3399. "unicode_decimal": 59063
  3400. }, {
  3401. "icon_id": "24923334",
  3402. "name": "eye",
  3403. "font_class": "eye",
  3404. "unicode": "e651",
  3405. "unicode_decimal": 58961
  3406. }, {
  3407. "icon_id": "24923335",
  3408. "name": "eye-filled",
  3409. "font_class": "eye-filled",
  3410. "unicode": "e66a",
  3411. "unicode_decimal": 58986
  3412. }, {
  3413. "icon_id": "24923336",
  3414. "name": "eye-slash",
  3415. "font_class": "eye-slash",
  3416. "unicode": "e6b3",
  3417. "unicode_decimal": 59059
  3418. }, {
  3419. "icon_id": "24923337",
  3420. "name": "eye-slash-filled",
  3421. "font_class": "eye-slash-filled",
  3422. "unicode": "e6b4",
  3423. "unicode_decimal": 59060
  3424. }, {
  3425. "icon_id": "24923305",
  3426. "name": "info-filled",
  3427. "font_class": "info-filled",
  3428. "unicode": "e649",
  3429. "unicode_decimal": 58953
  3430. }, {
  3431. "icon_id": "24923299",
  3432. "name": "reload-01",
  3433. "font_class": "reload",
  3434. "unicode": "e6b2",
  3435. "unicode_decimal": 59058
  3436. }, {
  3437. "icon_id": "24923195",
  3438. "name": "mic_slash_fill",
  3439. "font_class": "micoff-filled",
  3440. "unicode": "e6b0",
  3441. "unicode_decimal": 59056
  3442. }, {
  3443. "icon_id": "24923165",
  3444. "name": "map-pin-ellipse",
  3445. "font_class": "map-pin-ellipse",
  3446. "unicode": "e6ac",
  3447. "unicode_decimal": 59052
  3448. }, {
  3449. "icon_id": "24923166",
  3450. "name": "map-pin",
  3451. "font_class": "map-pin",
  3452. "unicode": "e6ad",
  3453. "unicode_decimal": 59053
  3454. }, {
  3455. "icon_id": "24923167",
  3456. "name": "location",
  3457. "font_class": "location",
  3458. "unicode": "e6ae",
  3459. "unicode_decimal": 59054
  3460. }, {
  3461. "icon_id": "24923064",
  3462. "name": "starhalf",
  3463. "font_class": "starhalf",
  3464. "unicode": "e683",
  3465. "unicode_decimal": 59011
  3466. }, {
  3467. "icon_id": "24923065",
  3468. "name": "star",
  3469. "font_class": "star",
  3470. "unicode": "e688",
  3471. "unicode_decimal": 59016
  3472. }, {
  3473. "icon_id": "24923066",
  3474. "name": "star-filled",
  3475. "font_class": "star-filled",
  3476. "unicode": "e68f",
  3477. "unicode_decimal": 59023
  3478. }, {
  3479. "icon_id": "24899646",
  3480. "name": "a-rilidaka",
  3481. "font_class": "calendar",
  3482. "unicode": "e6a0",
  3483. "unicode_decimal": 59040
  3484. }, {
  3485. "icon_id": "24899647",
  3486. "name": "fire",
  3487. "font_class": "fire",
  3488. "unicode": "e6a1",
  3489. "unicode_decimal": 59041
  3490. }, {
  3491. "icon_id": "24899648",
  3492. "name": "paihangbang",
  3493. "font_class": "medal",
  3494. "unicode": "e6a2",
  3495. "unicode_decimal": 59042
  3496. }, {
  3497. "icon_id": "24899649",
  3498. "name": "font",
  3499. "font_class": "font",
  3500. "unicode": "e6a3",
  3501. "unicode_decimal": 59043
  3502. }, {
  3503. "icon_id": "24899650",
  3504. "name": "gift",
  3505. "font_class": "gift",
  3506. "unicode": "e6a4",
  3507. "unicode_decimal": 59044
  3508. }, {
  3509. "icon_id": "24899651",
  3510. "name": "link",
  3511. "font_class": "link",
  3512. "unicode": "e6a5",
  3513. "unicode_decimal": 59045
  3514. }, {
  3515. "icon_id": "24899652",
  3516. "name": "notification",
  3517. "font_class": "notification",
  3518. "unicode": "e6a6",
  3519. "unicode_decimal": 59046
  3520. }, {
  3521. "icon_id": "24899653",
  3522. "name": "staff",
  3523. "font_class": "staff",
  3524. "unicode": "e6a7",
  3525. "unicode_decimal": 59047
  3526. }, {
  3527. "icon_id": "24899654",
  3528. "name": "VIP",
  3529. "font_class": "vip",
  3530. "unicode": "e6a8",
  3531. "unicode_decimal": 59048
  3532. }, {
  3533. "icon_id": "24899655",
  3534. "name": "folder_add",
  3535. "font_class": "folder-add",
  3536. "unicode": "e6a9",
  3537. "unicode_decimal": 59049
  3538. }, {
  3539. "icon_id": "24899656",
  3540. "name": "tune",
  3541. "font_class": "tune",
  3542. "unicode": "e6aa",
  3543. "unicode_decimal": 59050
  3544. }, {
  3545. "icon_id": "24899657",
  3546. "name": "shimingrenzheng",
  3547. "font_class": "auth",
  3548. "unicode": "e6ab",
  3549. "unicode_decimal": 59051
  3550. }, {
  3551. "icon_id": "24899565",
  3552. "name": "person",
  3553. "font_class": "person",
  3554. "unicode": "e699",
  3555. "unicode_decimal": 59033
  3556. }, {
  3557. "icon_id": "24899566",
  3558. "name": "email-filled",
  3559. "font_class": "email-filled",
  3560. "unicode": "e69a",
  3561. "unicode_decimal": 59034
  3562. }, {
  3563. "icon_id": "24899567",
  3564. "name": "phone-filled",
  3565. "font_class": "phone-filled",
  3566. "unicode": "e69b",
  3567. "unicode_decimal": 59035
  3568. }, {
  3569. "icon_id": "24899568",
  3570. "name": "phone",
  3571. "font_class": "phone",
  3572. "unicode": "e69c",
  3573. "unicode_decimal": 59036
  3574. }, {
  3575. "icon_id": "24899570",
  3576. "name": "email",
  3577. "font_class": "email",
  3578. "unicode": "e69e",
  3579. "unicode_decimal": 59038
  3580. }, {
  3581. "icon_id": "24899571",
  3582. "name": "personadd",
  3583. "font_class": "personadd",
  3584. "unicode": "e69f",
  3585. "unicode_decimal": 59039
  3586. }, {
  3587. "icon_id": "24899558",
  3588. "name": "chatboxes-filled",
  3589. "font_class": "chatboxes-filled",
  3590. "unicode": "e692",
  3591. "unicode_decimal": 59026
  3592. }, {
  3593. "icon_id": "24899559",
  3594. "name": "contact",
  3595. "font_class": "contact",
  3596. "unicode": "e693",
  3597. "unicode_decimal": 59027
  3598. }, {
  3599. "icon_id": "24899560",
  3600. "name": "chatbubble-filled",
  3601. "font_class": "chatbubble-filled",
  3602. "unicode": "e694",
  3603. "unicode_decimal": 59028
  3604. }, {
  3605. "icon_id": "24899561",
  3606. "name": "contact-filled",
  3607. "font_class": "contact-filled",
  3608. "unicode": "e695",
  3609. "unicode_decimal": 59029
  3610. }, {
  3611. "icon_id": "24899562",
  3612. "name": "chatboxes",
  3613. "font_class": "chatboxes",
  3614. "unicode": "e696",
  3615. "unicode_decimal": 59030
  3616. }, {
  3617. "icon_id": "24899563",
  3618. "name": "chatbubble",
  3619. "font_class": "chatbubble",
  3620. "unicode": "e697",
  3621. "unicode_decimal": 59031
  3622. }, {
  3623. "icon_id": "24881290",
  3624. "name": "upload-filled",
  3625. "font_class": "upload-filled",
  3626. "unicode": "e68e",
  3627. "unicode_decimal": 59022
  3628. }, {
  3629. "icon_id": "24881292",
  3630. "name": "upload",
  3631. "font_class": "upload",
  3632. "unicode": "e690",
  3633. "unicode_decimal": 59024
  3634. }, {
  3635. "icon_id": "24881293",
  3636. "name": "weixin",
  3637. "font_class": "weixin",
  3638. "unicode": "e691",
  3639. "unicode_decimal": 59025
  3640. }, {
  3641. "icon_id": "24881274",
  3642. "name": "compose",
  3643. "font_class": "compose",
  3644. "unicode": "e67f",
  3645. "unicode_decimal": 59007
  3646. }, {
  3647. "icon_id": "24881275",
  3648. "name": "qq",
  3649. "font_class": "qq",
  3650. "unicode": "e680",
  3651. "unicode_decimal": 59008
  3652. }, {
  3653. "icon_id": "24881276",
  3654. "name": "download-filled",
  3655. "font_class": "download-filled",
  3656. "unicode": "e681",
  3657. "unicode_decimal": 59009
  3658. }, {
  3659. "icon_id": "24881277",
  3660. "name": "pengyouquan",
  3661. "font_class": "pyq",
  3662. "unicode": "e682",
  3663. "unicode_decimal": 59010
  3664. }, {
  3665. "icon_id": "24881279",
  3666. "name": "sound",
  3667. "font_class": "sound",
  3668. "unicode": "e684",
  3669. "unicode_decimal": 59012
  3670. }, {
  3671. "icon_id": "24881280",
  3672. "name": "trash-filled",
  3673. "font_class": "trash-filled",
  3674. "unicode": "e685",
  3675. "unicode_decimal": 59013
  3676. }, {
  3677. "icon_id": "24881281",
  3678. "name": "sound-filled",
  3679. "font_class": "sound-filled",
  3680. "unicode": "e686",
  3681. "unicode_decimal": 59014
  3682. }, {
  3683. "icon_id": "24881282",
  3684. "name": "trash",
  3685. "font_class": "trash",
  3686. "unicode": "e687",
  3687. "unicode_decimal": 59015
  3688. }, {
  3689. "icon_id": "24881284",
  3690. "name": "videocam-filled",
  3691. "font_class": "videocam-filled",
  3692. "unicode": "e689",
  3693. "unicode_decimal": 59017
  3694. }, {
  3695. "icon_id": "24881285",
  3696. "name": "spinner-cycle",
  3697. "font_class": "spinner-cycle",
  3698. "unicode": "e68a",
  3699. "unicode_decimal": 59018
  3700. }, {
  3701. "icon_id": "24881286",
  3702. "name": "weibo",
  3703. "font_class": "weibo",
  3704. "unicode": "e68b",
  3705. "unicode_decimal": 59019
  3706. }, {
  3707. "icon_id": "24881288",
  3708. "name": "videocam",
  3709. "font_class": "videocam",
  3710. "unicode": "e68c",
  3711. "unicode_decimal": 59020
  3712. }, {
  3713. "icon_id": "24881289",
  3714. "name": "download",
  3715. "font_class": "download",
  3716. "unicode": "e68d",
  3717. "unicode_decimal": 59021
  3718. }, {
  3719. "icon_id": "24879601",
  3720. "name": "help",
  3721. "font_class": "help",
  3722. "unicode": "e679",
  3723. "unicode_decimal": 59001
  3724. }, {
  3725. "icon_id": "24879602",
  3726. "name": "navigate-filled",
  3727. "font_class": "navigate-filled",
  3728. "unicode": "e67a",
  3729. "unicode_decimal": 59002
  3730. }, {
  3731. "icon_id": "24879603",
  3732. "name": "plusempty",
  3733. "font_class": "plusempty",
  3734. "unicode": "e67b",
  3735. "unicode_decimal": 59003
  3736. }, {
  3737. "icon_id": "24879604",
  3738. "name": "smallcircle",
  3739. "font_class": "smallcircle",
  3740. "unicode": "e67c",
  3741. "unicode_decimal": 59004
  3742. }, {
  3743. "icon_id": "24879605",
  3744. "name": "minus-filled",
  3745. "font_class": "minus-filled",
  3746. "unicode": "e67d",
  3747. "unicode_decimal": 59005
  3748. }, {
  3749. "icon_id": "24879606",
  3750. "name": "micoff",
  3751. "font_class": "micoff",
  3752. "unicode": "e67e",
  3753. "unicode_decimal": 59006
  3754. }, {
  3755. "icon_id": "24879588",
  3756. "name": "closeempty",
  3757. "font_class": "closeempty",
  3758. "unicode": "e66c",
  3759. "unicode_decimal": 58988
  3760. }, {
  3761. "icon_id": "24879589",
  3762. "name": "clear",
  3763. "font_class": "clear",
  3764. "unicode": "e66d",
  3765. "unicode_decimal": 58989
  3766. }, {
  3767. "icon_id": "24879590",
  3768. "name": "navigate",
  3769. "font_class": "navigate",
  3770. "unicode": "e66e",
  3771. "unicode_decimal": 58990
  3772. }, {
  3773. "icon_id": "24879591",
  3774. "name": "minus",
  3775. "font_class": "minus",
  3776. "unicode": "e66f",
  3777. "unicode_decimal": 58991
  3778. }, {
  3779. "icon_id": "24879592",
  3780. "name": "image",
  3781. "font_class": "image",
  3782. "unicode": "e670",
  3783. "unicode_decimal": 58992
  3784. }, {
  3785. "icon_id": "24879593",
  3786. "name": "mic",
  3787. "font_class": "mic",
  3788. "unicode": "e671",
  3789. "unicode_decimal": 58993
  3790. }, {
  3791. "icon_id": "24879594",
  3792. "name": "paperplane",
  3793. "font_class": "paperplane",
  3794. "unicode": "e672",
  3795. "unicode_decimal": 58994
  3796. }, {
  3797. "icon_id": "24879595",
  3798. "name": "close",
  3799. "font_class": "close",
  3800. "unicode": "e673",
  3801. "unicode_decimal": 58995
  3802. }, {
  3803. "icon_id": "24879596",
  3804. "name": "help-filled",
  3805. "font_class": "help-filled",
  3806. "unicode": "e674",
  3807. "unicode_decimal": 58996
  3808. }, {
  3809. "icon_id": "24879597",
  3810. "name": "plus-filled",
  3811. "font_class": "paperplane-filled",
  3812. "unicode": "e675",
  3813. "unicode_decimal": 58997
  3814. }, {
  3815. "icon_id": "24879598",
  3816. "name": "plus",
  3817. "font_class": "plus",
  3818. "unicode": "e676",
  3819. "unicode_decimal": 58998
  3820. }, {
  3821. "icon_id": "24879599",
  3822. "name": "mic-filled",
  3823. "font_class": "mic-filled",
  3824. "unicode": "e677",
  3825. "unicode_decimal": 58999
  3826. }, {
  3827. "icon_id": "24879600",
  3828. "name": "image-filled",
  3829. "font_class": "image-filled",
  3830. "unicode": "e678",
  3831. "unicode_decimal": 59000
  3832. }, {
  3833. "icon_id": "24855900",
  3834. "name": "locked-filled",
  3835. "font_class": "locked-filled",
  3836. "unicode": "e668",
  3837. "unicode_decimal": 58984
  3838. }, {
  3839. "icon_id": "24855901",
  3840. "name": "info",
  3841. "font_class": "info",
  3842. "unicode": "e669",
  3843. "unicode_decimal": 58985
  3844. }, {
  3845. "icon_id": "24855903",
  3846. "name": "locked",
  3847. "font_class": "locked",
  3848. "unicode": "e66b",
  3849. "unicode_decimal": 58987
  3850. }, {
  3851. "icon_id": "24855884",
  3852. "name": "camera-filled",
  3853. "font_class": "camera-filled",
  3854. "unicode": "e658",
  3855. "unicode_decimal": 58968
  3856. }, {
  3857. "icon_id": "24855885",
  3858. "name": "chat-filled",
  3859. "font_class": "chat-filled",
  3860. "unicode": "e659",
  3861. "unicode_decimal": 58969
  3862. }, {
  3863. "icon_id": "24855886",
  3864. "name": "camera",
  3865. "font_class": "camera",
  3866. "unicode": "e65a",
  3867. "unicode_decimal": 58970
  3868. }, {
  3869. "icon_id": "24855887",
  3870. "name": "circle",
  3871. "font_class": "circle",
  3872. "unicode": "e65b",
  3873. "unicode_decimal": 58971
  3874. }, {
  3875. "icon_id": "24855888",
  3876. "name": "checkmarkempty",
  3877. "font_class": "checkmarkempty",
  3878. "unicode": "e65c",
  3879. "unicode_decimal": 58972
  3880. }, {
  3881. "icon_id": "24855889",
  3882. "name": "chat",
  3883. "font_class": "chat",
  3884. "unicode": "e65d",
  3885. "unicode_decimal": 58973
  3886. }, {
  3887. "icon_id": "24855890",
  3888. "name": "circle-filled",
  3889. "font_class": "circle-filled",
  3890. "unicode": "e65e",
  3891. "unicode_decimal": 58974
  3892. }, {
  3893. "icon_id": "24855891",
  3894. "name": "flag",
  3895. "font_class": "flag",
  3896. "unicode": "e65f",
  3897. "unicode_decimal": 58975
  3898. }, {
  3899. "icon_id": "24855892",
  3900. "name": "flag-filled",
  3901. "font_class": "flag-filled",
  3902. "unicode": "e660",
  3903. "unicode_decimal": 58976
  3904. }, {
  3905. "icon_id": "24855893",
  3906. "name": "gear-filled",
  3907. "font_class": "gear-filled",
  3908. "unicode": "e661",
  3909. "unicode_decimal": 58977
  3910. }, {
  3911. "icon_id": "24855894",
  3912. "name": "home",
  3913. "font_class": "home",
  3914. "unicode": "e662",
  3915. "unicode_decimal": 58978
  3916. }, {
  3917. "icon_id": "24855895",
  3918. "name": "home-filled",
  3919. "font_class": "home-filled",
  3920. "unicode": "e663",
  3921. "unicode_decimal": 58979
  3922. }, {
  3923. "icon_id": "24855896",
  3924. "name": "gear",
  3925. "font_class": "gear",
  3926. "unicode": "e664",
  3927. "unicode_decimal": 58980
  3928. }, {
  3929. "icon_id": "24855897",
  3930. "name": "smallcircle-filled",
  3931. "font_class": "smallcircle-filled",
  3932. "unicode": "e665",
  3933. "unicode_decimal": 58981
  3934. }, {
  3935. "icon_id": "24855898",
  3936. "name": "map-filled",
  3937. "font_class": "map-filled",
  3938. "unicode": "e666",
  3939. "unicode_decimal": 58982
  3940. }, {
  3941. "icon_id": "24855899",
  3942. "name": "map",
  3943. "font_class": "map",
  3944. "unicode": "e667",
  3945. "unicode_decimal": 58983
  3946. }, {
  3947. "icon_id": "24855825",
  3948. "name": "refresh-filled",
  3949. "font_class": "refresh-filled",
  3950. "unicode": "e656",
  3951. "unicode_decimal": 58966
  3952. }, {
  3953. "icon_id": "24855826",
  3954. "name": "refresh",
  3955. "font_class": "refresh",
  3956. "unicode": "e657",
  3957. "unicode_decimal": 58967
  3958. }, {
  3959. "icon_id": "24855808",
  3960. "name": "cloud-upload",
  3961. "font_class": "cloud-upload",
  3962. "unicode": "e645",
  3963. "unicode_decimal": 58949
  3964. }, {
  3965. "icon_id": "24855809",
  3966. "name": "cloud-download-filled",
  3967. "font_class": "cloud-download-filled",
  3968. "unicode": "e646",
  3969. "unicode_decimal": 58950
  3970. }, {
  3971. "icon_id": "24855810",
  3972. "name": "cloud-download",
  3973. "font_class": "cloud-download",
  3974. "unicode": "e647",
  3975. "unicode_decimal": 58951
  3976. }, {
  3977. "icon_id": "24855811",
  3978. "name": "cloud-upload-filled",
  3979. "font_class": "cloud-upload-filled",
  3980. "unicode": "e648",
  3981. "unicode_decimal": 58952
  3982. }, {
  3983. "icon_id": "24855813",
  3984. "name": "redo",
  3985. "font_class": "redo",
  3986. "unicode": "e64a",
  3987. "unicode_decimal": 58954
  3988. }, {
  3989. "icon_id": "24855814",
  3990. "name": "images-filled",
  3991. "font_class": "images-filled",
  3992. "unicode": "e64b",
  3993. "unicode_decimal": 58955
  3994. }, {
  3995. "icon_id": "24855815",
  3996. "name": "undo-filled",
  3997. "font_class": "undo-filled",
  3998. "unicode": "e64c",
  3999. "unicode_decimal": 58956
  4000. }, {
  4001. "icon_id": "24855816",
  4002. "name": "more",
  4003. "font_class": "more",
  4004. "unicode": "e64d",
  4005. "unicode_decimal": 58957
  4006. }, {
  4007. "icon_id": "24855817",
  4008. "name": "more-filled",
  4009. "font_class": "more-filled",
  4010. "unicode": "e64e",
  4011. "unicode_decimal": 58958
  4012. }, {
  4013. "icon_id": "24855818",
  4014. "name": "undo",
  4015. "font_class": "undo",
  4016. "unicode": "e64f",
  4017. "unicode_decimal": 58959
  4018. }, {
  4019. "icon_id": "24855819",
  4020. "name": "images",
  4021. "font_class": "images",
  4022. "unicode": "e650",
  4023. "unicode_decimal": 58960
  4024. }, {
  4025. "icon_id": "24855821",
  4026. "name": "paperclip",
  4027. "font_class": "paperclip",
  4028. "unicode": "e652",
  4029. "unicode_decimal": 58962
  4030. }, {
  4031. "icon_id": "24855822",
  4032. "name": "settings",
  4033. "font_class": "settings",
  4034. "unicode": "e653",
  4035. "unicode_decimal": 58963
  4036. }, {
  4037. "icon_id": "24855823",
  4038. "name": "search",
  4039. "font_class": "search",
  4040. "unicode": "e654",
  4041. "unicode_decimal": 58964
  4042. }, {
  4043. "icon_id": "24855824",
  4044. "name": "redo-filled",
  4045. "font_class": "redo-filled",
  4046. "unicode": "e655",
  4047. "unicode_decimal": 58965
  4048. }, {
  4049. "icon_id": "24841702",
  4050. "name": "list",
  4051. "font_class": "list",
  4052. "unicode": "e644",
  4053. "unicode_decimal": 58948
  4054. }, {
  4055. "icon_id": "24841489",
  4056. "name": "mail-open-filled",
  4057. "font_class": "mail-open-filled",
  4058. "unicode": "e63a",
  4059. "unicode_decimal": 58938
  4060. }, {
  4061. "icon_id": "24841491",
  4062. "name": "hand-thumbsdown-filled",
  4063. "font_class": "hand-down-filled",
  4064. "unicode": "e63c",
  4065. "unicode_decimal": 58940
  4066. }, {
  4067. "icon_id": "24841492",
  4068. "name": "hand-thumbsdown",
  4069. "font_class": "hand-down",
  4070. "unicode": "e63d",
  4071. "unicode_decimal": 58941
  4072. }, {
  4073. "icon_id": "24841493",
  4074. "name": "hand-thumbsup-filled",
  4075. "font_class": "hand-up-filled",
  4076. "unicode": "e63e",
  4077. "unicode_decimal": 58942
  4078. }, {
  4079. "icon_id": "24841494",
  4080. "name": "hand-thumbsup",
  4081. "font_class": "hand-up",
  4082. "unicode": "e63f",
  4083. "unicode_decimal": 58943
  4084. }, {
  4085. "icon_id": "24841496",
  4086. "name": "heart-filled",
  4087. "font_class": "heart-filled",
  4088. "unicode": "e641",
  4089. "unicode_decimal": 58945
  4090. }, {
  4091. "icon_id": "24841498",
  4092. "name": "mail-open",
  4093. "font_class": "mail-open",
  4094. "unicode": "e643",
  4095. "unicode_decimal": 58947
  4096. }, {
  4097. "icon_id": "24841488",
  4098. "name": "heart",
  4099. "font_class": "heart",
  4100. "unicode": "e639",
  4101. "unicode_decimal": 58937
  4102. }, {
  4103. "icon_id": "24839963",
  4104. "name": "loop",
  4105. "font_class": "loop",
  4106. "unicode": "e633",
  4107. "unicode_decimal": 58931
  4108. }, {
  4109. "icon_id": "24839866",
  4110. "name": "pulldown",
  4111. "font_class": "pulldown",
  4112. "unicode": "e632",
  4113. "unicode_decimal": 58930
  4114. }, {
  4115. "icon_id": "24813798",
  4116. "name": "scan",
  4117. "font_class": "scan",
  4118. "unicode": "e62a",
  4119. "unicode_decimal": 58922
  4120. }, {
  4121. "icon_id": "24813786",
  4122. "name": "bars",
  4123. "font_class": "bars",
  4124. "unicode": "e627",
  4125. "unicode_decimal": 58919
  4126. }, {
  4127. "icon_id": "24813788",
  4128. "name": "cart-filled",
  4129. "font_class": "cart-filled",
  4130. "unicode": "e629",
  4131. "unicode_decimal": 58921
  4132. }, {
  4133. "icon_id": "24813790",
  4134. "name": "checkbox",
  4135. "font_class": "checkbox",
  4136. "unicode": "e62b",
  4137. "unicode_decimal": 58923
  4138. }, {
  4139. "icon_id": "24813791",
  4140. "name": "checkbox-filled",
  4141. "font_class": "checkbox-filled",
  4142. "unicode": "e62c",
  4143. "unicode_decimal": 58924
  4144. }, {
  4145. "icon_id": "24813794",
  4146. "name": "shop",
  4147. "font_class": "shop",
  4148. "unicode": "e62f",
  4149. "unicode_decimal": 58927
  4150. }, {
  4151. "icon_id": "24813795",
  4152. "name": "headphones",
  4153. "font_class": "headphones",
  4154. "unicode": "e630",
  4155. "unicode_decimal": 58928
  4156. }, {
  4157. "icon_id": "24813796",
  4158. "name": "cart",
  4159. "font_class": "cart",
  4160. "unicode": "e631",
  4161. "unicode_decimal": 58929
  4162. }]
  4163. };
  4164. exports.default = _default;
  4165. /***/ }),
  4166. /***/ 24:
  4167. /*!************************************************************!*\
  4168. !*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
  4169. \************************************************************/
  4170. /*! no static exports found */
  4171. /***/ (function(module, exports, __webpack_require__) {
  4172. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  4173. function _defineProperties(target, props) {
  4174. for (var i = 0; i < props.length; i++) {
  4175. var descriptor = props[i];
  4176. descriptor.enumerable = descriptor.enumerable || false;
  4177. descriptor.configurable = true;
  4178. if ("value" in descriptor) descriptor.writable = true;
  4179. Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
  4180. }
  4181. }
  4182. function _createClass(Constructor, protoProps, staticProps) {
  4183. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  4184. if (staticProps) _defineProperties(Constructor, staticProps);
  4185. Object.defineProperty(Constructor, "prototype", {
  4186. writable: false
  4187. });
  4188. return Constructor;
  4189. }
  4190. module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
  4191. /***/ }),
  4192. /***/ 244:
  4193. /*!************************************************************************************************************************!*\
  4194. !*** C:/Users/yuanyiming/Desktop/教研app/teaching-uniapp/node_modules/@dcloudio/uni-ui/lib/uni-search-bar/i18n/index.js ***!
  4195. \************************************************************************************************************************/
  4196. /*! no static exports found */
  4197. /***/ (function(module, exports, __webpack_require__) {
  4198. "use strict";
  4199. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  4200. Object.defineProperty(exports, "__esModule", {
  4201. value: true
  4202. });
  4203. exports.default = void 0;
  4204. var _en = _interopRequireDefault(__webpack_require__(/*! ./en.json */ 245));
  4205. var _zhHans = _interopRequireDefault(__webpack_require__(/*! ./zh-Hans.json */ 246));
  4206. var _zhHant = _interopRequireDefault(__webpack_require__(/*! ./zh-Hant.json */ 247));
  4207. var _default = {
  4208. en: _en.default,
  4209. 'zh-Hans': _zhHans.default,
  4210. 'zh-Hant': _zhHant.default
  4211. };
  4212. exports.default = _default;
  4213. /***/ }),
  4214. /***/ 245:
  4215. /*!***********************************************************************************************************************!*\
  4216. !*** C:/Users/yuanyiming/Desktop/教研app/teaching-uniapp/node_modules/@dcloudio/uni-ui/lib/uni-search-bar/i18n/en.json ***!
  4217. \***********************************************************************************************************************/
  4218. /*! exports provided: uni-search-bar.cancel, uni-search-bar.placeholder, default */
  4219. /***/ (function(module) {
  4220. module.exports = JSON.parse("{\"uni-search-bar.cancel\":\"cancel\",\"uni-search-bar.placeholder\":\"Search enter content\"}");
  4221. /***/ }),
  4222. /***/ 246:
  4223. /*!****************************************************************************************************************************!*\
  4224. !*** C:/Users/yuanyiming/Desktop/教研app/teaching-uniapp/node_modules/@dcloudio/uni-ui/lib/uni-search-bar/i18n/zh-Hans.json ***!
  4225. \****************************************************************************************************************************/
  4226. /*! exports provided: uni-search-bar.cancel, uni-search-bar.placeholder, default */
  4227. /***/ (function(module) {
  4228. module.exports = JSON.parse("{\"uni-search-bar.cancel\":\"取消\",\"uni-search-bar.placeholder\":\"请输入搜索内容\"}");
  4229. /***/ }),
  4230. /***/ 247:
  4231. /*!****************************************************************************************************************************!*\
  4232. !*** C:/Users/yuanyiming/Desktop/教研app/teaching-uniapp/node_modules/@dcloudio/uni-ui/lib/uni-search-bar/i18n/zh-Hant.json ***!
  4233. \****************************************************************************************************************************/
  4234. /*! exports provided: uni-search-bar.cancel, uni-search-bar.placeholder, default */
  4235. /***/ (function(module) {
  4236. module.exports = JSON.parse("{\"uni-search-bar.cancel\":\"取消\",\"uni-search-bar.placeholder\":\"請輸入搜索內容\"}");
  4237. /***/ }),
  4238. /***/ 25:
  4239. /*!******************************************************************************************!*\
  4240. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  4241. \******************************************************************************************/
  4242. /*! exports provided: default */
  4243. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  4244. "use strict";
  4245. __webpack_require__.r(__webpack_exports__);
  4246. /* WEBPACK VAR INJECTION */(function(global) {/*!
  4247. * Vue.js v2.6.11
  4248. * (c) 2014-2023 Evan You
  4249. * Released under the MIT License.
  4250. */
  4251. /* */
  4252. var emptyObject = Object.freeze({});
  4253. // These helpers produce better VM code in JS engines due to their
  4254. // explicitness and function inlining.
  4255. function isUndef (v) {
  4256. return v === undefined || v === null
  4257. }
  4258. function isDef (v) {
  4259. return v !== undefined && v !== null
  4260. }
  4261. function isTrue (v) {
  4262. return v === true
  4263. }
  4264. function isFalse (v) {
  4265. return v === false
  4266. }
  4267. /**
  4268. * Check if value is primitive.
  4269. */
  4270. function isPrimitive (value) {
  4271. return (
  4272. typeof value === 'string' ||
  4273. typeof value === 'number' ||
  4274. // $flow-disable-line
  4275. typeof value === 'symbol' ||
  4276. typeof value === 'boolean'
  4277. )
  4278. }
  4279. /**
  4280. * Quick object check - this is primarily used to tell
  4281. * Objects from primitive values when we know the value
  4282. * is a JSON-compliant type.
  4283. */
  4284. function isObject (obj) {
  4285. return obj !== null && typeof obj === 'object'
  4286. }
  4287. /**
  4288. * Get the raw type string of a value, e.g., [object Object].
  4289. */
  4290. var _toString = Object.prototype.toString;
  4291. function toRawType (value) {
  4292. return _toString.call(value).slice(8, -1)
  4293. }
  4294. /**
  4295. * Strict object type check. Only returns true
  4296. * for plain JavaScript objects.
  4297. */
  4298. function isPlainObject (obj) {
  4299. return _toString.call(obj) === '[object Object]'
  4300. }
  4301. function isRegExp (v) {
  4302. return _toString.call(v) === '[object RegExp]'
  4303. }
  4304. /**
  4305. * Check if val is a valid array index.
  4306. */
  4307. function isValidArrayIndex (val) {
  4308. var n = parseFloat(String(val));
  4309. return n >= 0 && Math.floor(n) === n && isFinite(val)
  4310. }
  4311. function isPromise (val) {
  4312. return (
  4313. isDef(val) &&
  4314. typeof val.then === 'function' &&
  4315. typeof val.catch === 'function'
  4316. )
  4317. }
  4318. /**
  4319. * Convert a value to a string that is actually rendered.
  4320. */
  4321. function toString (val) {
  4322. return val == null
  4323. ? ''
  4324. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  4325. ? JSON.stringify(val, null, 2)
  4326. : String(val)
  4327. }
  4328. /**
  4329. * Convert an input value to a number for persistence.
  4330. * If the conversion fails, return original string.
  4331. */
  4332. function toNumber (val) {
  4333. var n = parseFloat(val);
  4334. return isNaN(n) ? val : n
  4335. }
  4336. /**
  4337. * Make a map and return a function for checking if a key
  4338. * is in that map.
  4339. */
  4340. function makeMap (
  4341. str,
  4342. expectsLowerCase
  4343. ) {
  4344. var map = Object.create(null);
  4345. var list = str.split(',');
  4346. for (var i = 0; i < list.length; i++) {
  4347. map[list[i]] = true;
  4348. }
  4349. return expectsLowerCase
  4350. ? function (val) { return map[val.toLowerCase()]; }
  4351. : function (val) { return map[val]; }
  4352. }
  4353. /**
  4354. * Check if a tag is a built-in tag.
  4355. */
  4356. var isBuiltInTag = makeMap('slot,component', true);
  4357. /**
  4358. * Check if an attribute is a reserved attribute.
  4359. */
  4360. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  4361. /**
  4362. * Remove an item from an array.
  4363. */
  4364. function remove (arr, item) {
  4365. if (arr.length) {
  4366. var index = arr.indexOf(item);
  4367. if (index > -1) {
  4368. return arr.splice(index, 1)
  4369. }
  4370. }
  4371. }
  4372. /**
  4373. * Check whether an object has the property.
  4374. */
  4375. var hasOwnProperty = Object.prototype.hasOwnProperty;
  4376. function hasOwn (obj, key) {
  4377. return hasOwnProperty.call(obj, key)
  4378. }
  4379. /**
  4380. * Create a cached version of a pure function.
  4381. */
  4382. function cached (fn) {
  4383. var cache = Object.create(null);
  4384. return (function cachedFn (str) {
  4385. var hit = cache[str];
  4386. return hit || (cache[str] = fn(str))
  4387. })
  4388. }
  4389. /**
  4390. * Camelize a hyphen-delimited string.
  4391. */
  4392. var camelizeRE = /-(\w)/g;
  4393. var camelize = cached(function (str) {
  4394. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  4395. });
  4396. /**
  4397. * Capitalize a string.
  4398. */
  4399. var capitalize = cached(function (str) {
  4400. return str.charAt(0).toUpperCase() + str.slice(1)
  4401. });
  4402. /**
  4403. * Hyphenate a camelCase string.
  4404. */
  4405. var hyphenateRE = /\B([A-Z])/g;
  4406. var hyphenate = cached(function (str) {
  4407. return str.replace(hyphenateRE, '-$1').toLowerCase()
  4408. });
  4409. /**
  4410. * Simple bind polyfill for environments that do not support it,
  4411. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  4412. * since native bind is now performant enough in most browsers.
  4413. * But removing it would mean breaking code that was able to run in
  4414. * PhantomJS 1.x, so this must be kept for backward compatibility.
  4415. */
  4416. /* istanbul ignore next */
  4417. function polyfillBind (fn, ctx) {
  4418. function boundFn (a) {
  4419. var l = arguments.length;
  4420. return l
  4421. ? l > 1
  4422. ? fn.apply(ctx, arguments)
  4423. : fn.call(ctx, a)
  4424. : fn.call(ctx)
  4425. }
  4426. boundFn._length = fn.length;
  4427. return boundFn
  4428. }
  4429. function nativeBind (fn, ctx) {
  4430. return fn.bind(ctx)
  4431. }
  4432. var bind = Function.prototype.bind
  4433. ? nativeBind
  4434. : polyfillBind;
  4435. /**
  4436. * Convert an Array-like object to a real Array.
  4437. */
  4438. function toArray (list, start) {
  4439. start = start || 0;
  4440. var i = list.length - start;
  4441. var ret = new Array(i);
  4442. while (i--) {
  4443. ret[i] = list[i + start];
  4444. }
  4445. return ret
  4446. }
  4447. /**
  4448. * Mix properties into target object.
  4449. */
  4450. function extend (to, _from) {
  4451. for (var key in _from) {
  4452. to[key] = _from[key];
  4453. }
  4454. return to
  4455. }
  4456. /**
  4457. * Merge an Array of Objects into a single Object.
  4458. */
  4459. function toObject (arr) {
  4460. var res = {};
  4461. for (var i = 0; i < arr.length; i++) {
  4462. if (arr[i]) {
  4463. extend(res, arr[i]);
  4464. }
  4465. }
  4466. return res
  4467. }
  4468. /* eslint-disable no-unused-vars */
  4469. /**
  4470. * Perform no operation.
  4471. * Stubbing args to make Flow happy without leaving useless transpiled code
  4472. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  4473. */
  4474. function noop (a, b, c) {}
  4475. /**
  4476. * Always return false.
  4477. */
  4478. var no = function (a, b, c) { return false; };
  4479. /* eslint-enable no-unused-vars */
  4480. /**
  4481. * Return the same value.
  4482. */
  4483. var identity = function (_) { return _; };
  4484. /**
  4485. * Check if two values are loosely equal - that is,
  4486. * if they are plain objects, do they have the same shape?
  4487. */
  4488. function looseEqual (a, b) {
  4489. if (a === b) { return true }
  4490. var isObjectA = isObject(a);
  4491. var isObjectB = isObject(b);
  4492. if (isObjectA && isObjectB) {
  4493. try {
  4494. var isArrayA = Array.isArray(a);
  4495. var isArrayB = Array.isArray(b);
  4496. if (isArrayA && isArrayB) {
  4497. return a.length === b.length && a.every(function (e, i) {
  4498. return looseEqual(e, b[i])
  4499. })
  4500. } else if (a instanceof Date && b instanceof Date) {
  4501. return a.getTime() === b.getTime()
  4502. } else if (!isArrayA && !isArrayB) {
  4503. var keysA = Object.keys(a);
  4504. var keysB = Object.keys(b);
  4505. return keysA.length === keysB.length && keysA.every(function (key) {
  4506. return looseEqual(a[key], b[key])
  4507. })
  4508. } else {
  4509. /* istanbul ignore next */
  4510. return false
  4511. }
  4512. } catch (e) {
  4513. /* istanbul ignore next */
  4514. return false
  4515. }
  4516. } else if (!isObjectA && !isObjectB) {
  4517. return String(a) === String(b)
  4518. } else {
  4519. return false
  4520. }
  4521. }
  4522. /**
  4523. * Return the first index at which a loosely equal value can be
  4524. * found in the array (if value is a plain object, the array must
  4525. * contain an object of the same shape), or -1 if it is not present.
  4526. */
  4527. function looseIndexOf (arr, val) {
  4528. for (var i = 0; i < arr.length; i++) {
  4529. if (looseEqual(arr[i], val)) { return i }
  4530. }
  4531. return -1
  4532. }
  4533. /**
  4534. * Ensure a function is called only once.
  4535. */
  4536. function once (fn) {
  4537. var called = false;
  4538. return function () {
  4539. if (!called) {
  4540. called = true;
  4541. fn.apply(this, arguments);
  4542. }
  4543. }
  4544. }
  4545. var ASSET_TYPES = [
  4546. 'component',
  4547. 'directive',
  4548. 'filter'
  4549. ];
  4550. var LIFECYCLE_HOOKS = [
  4551. 'beforeCreate',
  4552. 'created',
  4553. 'beforeMount',
  4554. 'mounted',
  4555. 'beforeUpdate',
  4556. 'updated',
  4557. 'beforeDestroy',
  4558. 'destroyed',
  4559. 'activated',
  4560. 'deactivated',
  4561. 'errorCaptured',
  4562. 'serverPrefetch'
  4563. ];
  4564. /* */
  4565. var config = ({
  4566. /**
  4567. * Option merge strategies (used in core/util/options)
  4568. */
  4569. // $flow-disable-line
  4570. optionMergeStrategies: Object.create(null),
  4571. /**
  4572. * Whether to suppress warnings.
  4573. */
  4574. silent: false,
  4575. /**
  4576. * Show production mode tip message on boot?
  4577. */
  4578. productionTip: "development" !== 'production',
  4579. /**
  4580. * Whether to enable devtools
  4581. */
  4582. devtools: "development" !== 'production',
  4583. /**
  4584. * Whether to record perf
  4585. */
  4586. performance: false,
  4587. /**
  4588. * Error handler for watcher errors
  4589. */
  4590. errorHandler: null,
  4591. /**
  4592. * Warn handler for watcher warns
  4593. */
  4594. warnHandler: null,
  4595. /**
  4596. * Ignore certain custom elements
  4597. */
  4598. ignoredElements: [],
  4599. /**
  4600. * Custom user key aliases for v-on
  4601. */
  4602. // $flow-disable-line
  4603. keyCodes: Object.create(null),
  4604. /**
  4605. * Check if a tag is reserved so that it cannot be registered as a
  4606. * component. This is platform-dependent and may be overwritten.
  4607. */
  4608. isReservedTag: no,
  4609. /**
  4610. * Check if an attribute is reserved so that it cannot be used as a component
  4611. * prop. This is platform-dependent and may be overwritten.
  4612. */
  4613. isReservedAttr: no,
  4614. /**
  4615. * Check if a tag is an unknown element.
  4616. * Platform-dependent.
  4617. */
  4618. isUnknownElement: no,
  4619. /**
  4620. * Get the namespace of an element
  4621. */
  4622. getTagNamespace: noop,
  4623. /**
  4624. * Parse the real tag name for the specific platform.
  4625. */
  4626. parsePlatformTagName: identity,
  4627. /**
  4628. * Check if an attribute must be bound using property, e.g. value
  4629. * Platform-dependent.
  4630. */
  4631. mustUseProp: no,
  4632. /**
  4633. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  4634. * This will significantly reduce performance if set to false.
  4635. */
  4636. async: true,
  4637. /**
  4638. * Exposed for legacy reasons
  4639. */
  4640. _lifecycleHooks: LIFECYCLE_HOOKS
  4641. });
  4642. /* */
  4643. /**
  4644. * unicode letters used for parsing html tags, component names and property paths.
  4645. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  4646. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  4647. */
  4648. 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/;
  4649. /**
  4650. * Check if a string starts with $ or _
  4651. */
  4652. function isReserved (str) {
  4653. var c = (str + '').charCodeAt(0);
  4654. return c === 0x24 || c === 0x5F
  4655. }
  4656. /**
  4657. * Define a property.
  4658. */
  4659. function def (obj, key, val, enumerable) {
  4660. Object.defineProperty(obj, key, {
  4661. value: val,
  4662. enumerable: !!enumerable,
  4663. writable: true,
  4664. configurable: true
  4665. });
  4666. }
  4667. /**
  4668. * Parse simple path.
  4669. */
  4670. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  4671. function parsePath (path) {
  4672. if (bailRE.test(path)) {
  4673. return
  4674. }
  4675. var segments = path.split('.');
  4676. return function (obj) {
  4677. for (var i = 0; i < segments.length; i++) {
  4678. if (!obj) { return }
  4679. obj = obj[segments[i]];
  4680. }
  4681. return obj
  4682. }
  4683. }
  4684. /* */
  4685. // can we use __proto__?
  4686. var hasProto = '__proto__' in {};
  4687. // Browser environment sniffing
  4688. var inBrowser = typeof window !== 'undefined';
  4689. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  4690. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  4691. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  4692. var isIE = UA && /msie|trident/.test(UA);
  4693. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  4694. var isEdge = UA && UA.indexOf('edge/') > 0;
  4695. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  4696. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  4697. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  4698. var isPhantomJS = UA && /phantomjs/.test(UA);
  4699. var isFF = UA && UA.match(/firefox\/(\d+)/);
  4700. // Firefox has a "watch" function on Object.prototype...
  4701. var nativeWatch = ({}).watch;
  4702. if (inBrowser) {
  4703. try {
  4704. var opts = {};
  4705. Object.defineProperty(opts, 'passive', ({
  4706. get: function get () {
  4707. }
  4708. })); // https://github.com/facebook/flow/issues/285
  4709. window.addEventListener('test-passive', null, opts);
  4710. } catch (e) {}
  4711. }
  4712. // this needs to be lazy-evaled because vue may be required before
  4713. // vue-server-renderer can set VUE_ENV
  4714. var _isServer;
  4715. var isServerRendering = function () {
  4716. if (_isServer === undefined) {
  4717. /* istanbul ignore if */
  4718. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  4719. // detect presence of vue-server-renderer and avoid
  4720. // Webpack shimming the process
  4721. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  4722. } else {
  4723. _isServer = false;
  4724. }
  4725. }
  4726. return _isServer
  4727. };
  4728. // detect devtools
  4729. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  4730. /* istanbul ignore next */
  4731. function isNative (Ctor) {
  4732. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  4733. }
  4734. var hasSymbol =
  4735. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  4736. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  4737. var _Set;
  4738. /* istanbul ignore if */ // $flow-disable-line
  4739. if (typeof Set !== 'undefined' && isNative(Set)) {
  4740. // use native Set when available.
  4741. _Set = Set;
  4742. } else {
  4743. // a non-standard Set polyfill that only works with primitive keys.
  4744. _Set = /*@__PURE__*/(function () {
  4745. function Set () {
  4746. this.set = Object.create(null);
  4747. }
  4748. Set.prototype.has = function has (key) {
  4749. return this.set[key] === true
  4750. };
  4751. Set.prototype.add = function add (key) {
  4752. this.set[key] = true;
  4753. };
  4754. Set.prototype.clear = function clear () {
  4755. this.set = Object.create(null);
  4756. };
  4757. return Set;
  4758. }());
  4759. }
  4760. /* */
  4761. var warn = noop;
  4762. var tip = noop;
  4763. var generateComponentTrace = (noop); // work around flow check
  4764. var formatComponentName = (noop);
  4765. if (true) {
  4766. var hasConsole = typeof console !== 'undefined';
  4767. var classifyRE = /(?:^|[-_])(\w)/g;
  4768. var classify = function (str) { return str
  4769. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  4770. .replace(/[-_]/g, ''); };
  4771. warn = function (msg, vm) {
  4772. var trace = vm ? generateComponentTrace(vm) : '';
  4773. if (config.warnHandler) {
  4774. config.warnHandler.call(null, msg, vm, trace);
  4775. } else if (hasConsole && (!config.silent)) {
  4776. console.error(("[Vue warn]: " + msg + trace));
  4777. }
  4778. };
  4779. tip = function (msg, vm) {
  4780. if (hasConsole && (!config.silent)) {
  4781. console.warn("[Vue tip]: " + msg + (
  4782. vm ? generateComponentTrace(vm) : ''
  4783. ));
  4784. }
  4785. };
  4786. formatComponentName = function (vm, includeFile) {
  4787. if (vm.$root === vm) {
  4788. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  4789. return ('') + vm.$options.__file
  4790. }
  4791. return '<Root>'
  4792. }
  4793. var options = typeof vm === 'function' && vm.cid != null
  4794. ? vm.options
  4795. : vm._isVue
  4796. ? vm.$options || vm.constructor.options
  4797. : vm;
  4798. var name = options.name || options._componentTag;
  4799. var file = options.__file;
  4800. if (!name && file) {
  4801. var match = file.match(/([^/\\]+)\.vue$/);
  4802. name = match && match[1];
  4803. }
  4804. return (
  4805. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  4806. (file && includeFile !== false ? (" at " + file) : '')
  4807. )
  4808. };
  4809. var repeat = function (str, n) {
  4810. var res = '';
  4811. while (n) {
  4812. if (n % 2 === 1) { res += str; }
  4813. if (n > 1) { str += str; }
  4814. n >>= 1;
  4815. }
  4816. return res
  4817. };
  4818. generateComponentTrace = function (vm) {
  4819. if (vm._isVue && vm.$parent) {
  4820. var tree = [];
  4821. var currentRecursiveSequence = 0;
  4822. while (vm && vm.$options.name !== 'PageBody') {
  4823. if (tree.length > 0) {
  4824. var last = tree[tree.length - 1];
  4825. if (last.constructor === vm.constructor) {
  4826. currentRecursiveSequence++;
  4827. vm = vm.$parent;
  4828. continue
  4829. } else if (currentRecursiveSequence > 0) {
  4830. tree[tree.length - 1] = [last, currentRecursiveSequence];
  4831. currentRecursiveSequence = 0;
  4832. }
  4833. }
  4834. !vm.$options.isReserved && tree.push(vm);
  4835. vm = vm.$parent;
  4836. }
  4837. return '\n\nfound in\n\n' + tree
  4838. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  4839. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  4840. : formatComponentName(vm))); })
  4841. .join('\n')
  4842. } else {
  4843. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  4844. }
  4845. };
  4846. }
  4847. /* */
  4848. var uid = 0;
  4849. /**
  4850. * A dep is an observable that can have multiple
  4851. * directives subscribing to it.
  4852. */
  4853. var Dep = function Dep () {
  4854. this.id = uid++;
  4855. this.subs = [];
  4856. };
  4857. Dep.prototype.addSub = function addSub (sub) {
  4858. this.subs.push(sub);
  4859. };
  4860. Dep.prototype.removeSub = function removeSub (sub) {
  4861. remove(this.subs, sub);
  4862. };
  4863. Dep.prototype.depend = function depend () {
  4864. if (Dep.SharedObject.target) {
  4865. Dep.SharedObject.target.addDep(this);
  4866. }
  4867. };
  4868. Dep.prototype.notify = function notify () {
  4869. // stabilize the subscriber list first
  4870. var subs = this.subs.slice();
  4871. if ( true && !config.async) {
  4872. // subs aren't sorted in scheduler if not running async
  4873. // we need to sort them now to make sure they fire in correct
  4874. // order
  4875. subs.sort(function (a, b) { return a.id - b.id; });
  4876. }
  4877. for (var i = 0, l = subs.length; i < l; i++) {
  4878. subs[i].update();
  4879. }
  4880. };
  4881. // The current target watcher being evaluated.
  4882. // This is globally unique because only one watcher
  4883. // can be evaluated at a time.
  4884. // fixed by xxxxxx (nvue shared vuex)
  4885. /* eslint-disable no-undef */
  4886. Dep.SharedObject = {};
  4887. Dep.SharedObject.target = null;
  4888. Dep.SharedObject.targetStack = [];
  4889. function pushTarget (target) {
  4890. Dep.SharedObject.targetStack.push(target);
  4891. Dep.SharedObject.target = target;
  4892. Dep.target = target;
  4893. }
  4894. function popTarget () {
  4895. Dep.SharedObject.targetStack.pop();
  4896. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  4897. Dep.target = Dep.SharedObject.target;
  4898. }
  4899. /* */
  4900. var VNode = function VNode (
  4901. tag,
  4902. data,
  4903. children,
  4904. text,
  4905. elm,
  4906. context,
  4907. componentOptions,
  4908. asyncFactory
  4909. ) {
  4910. this.tag = tag;
  4911. this.data = data;
  4912. this.children = children;
  4913. this.text = text;
  4914. this.elm = elm;
  4915. this.ns = undefined;
  4916. this.context = context;
  4917. this.fnContext = undefined;
  4918. this.fnOptions = undefined;
  4919. this.fnScopeId = undefined;
  4920. this.key = data && data.key;
  4921. this.componentOptions = componentOptions;
  4922. this.componentInstance = undefined;
  4923. this.parent = undefined;
  4924. this.raw = false;
  4925. this.isStatic = false;
  4926. this.isRootInsert = true;
  4927. this.isComment = false;
  4928. this.isCloned = false;
  4929. this.isOnce = false;
  4930. this.asyncFactory = asyncFactory;
  4931. this.asyncMeta = undefined;
  4932. this.isAsyncPlaceholder = false;
  4933. };
  4934. var prototypeAccessors = { child: { configurable: true } };
  4935. // DEPRECATED: alias for componentInstance for backwards compat.
  4936. /* istanbul ignore next */
  4937. prototypeAccessors.child.get = function () {
  4938. return this.componentInstance
  4939. };
  4940. Object.defineProperties( VNode.prototype, prototypeAccessors );
  4941. var createEmptyVNode = function (text) {
  4942. if ( text === void 0 ) text = '';
  4943. var node = new VNode();
  4944. node.text = text;
  4945. node.isComment = true;
  4946. return node
  4947. };
  4948. function createTextVNode (val) {
  4949. return new VNode(undefined, undefined, undefined, String(val))
  4950. }
  4951. // optimized shallow clone
  4952. // used for static nodes and slot nodes because they may be reused across
  4953. // multiple renders, cloning them avoids errors when DOM manipulations rely
  4954. // on their elm reference.
  4955. function cloneVNode (vnode) {
  4956. var cloned = new VNode(
  4957. vnode.tag,
  4958. vnode.data,
  4959. // #7975
  4960. // clone children array to avoid mutating original in case of cloning
  4961. // a child.
  4962. vnode.children && vnode.children.slice(),
  4963. vnode.text,
  4964. vnode.elm,
  4965. vnode.context,
  4966. vnode.componentOptions,
  4967. vnode.asyncFactory
  4968. );
  4969. cloned.ns = vnode.ns;
  4970. cloned.isStatic = vnode.isStatic;
  4971. cloned.key = vnode.key;
  4972. cloned.isComment = vnode.isComment;
  4973. cloned.fnContext = vnode.fnContext;
  4974. cloned.fnOptions = vnode.fnOptions;
  4975. cloned.fnScopeId = vnode.fnScopeId;
  4976. cloned.asyncMeta = vnode.asyncMeta;
  4977. cloned.isCloned = true;
  4978. return cloned
  4979. }
  4980. /*
  4981. * not type checking this file because flow doesn't play well with
  4982. * dynamically accessing methods on Array prototype
  4983. */
  4984. var arrayProto = Array.prototype;
  4985. var arrayMethods = Object.create(arrayProto);
  4986. var methodsToPatch = [
  4987. 'push',
  4988. 'pop',
  4989. 'shift',
  4990. 'unshift',
  4991. 'splice',
  4992. 'sort',
  4993. 'reverse'
  4994. ];
  4995. /**
  4996. * Intercept mutating methods and emit events
  4997. */
  4998. methodsToPatch.forEach(function (method) {
  4999. // cache original method
  5000. var original = arrayProto[method];
  5001. def(arrayMethods, method, function mutator () {
  5002. var args = [], len = arguments.length;
  5003. while ( len-- ) args[ len ] = arguments[ len ];
  5004. var result = original.apply(this, args);
  5005. var ob = this.__ob__;
  5006. var inserted;
  5007. switch (method) {
  5008. case 'push':
  5009. case 'unshift':
  5010. inserted = args;
  5011. break
  5012. case 'splice':
  5013. inserted = args.slice(2);
  5014. break
  5015. }
  5016. if (inserted) { ob.observeArray(inserted); }
  5017. // notify change
  5018. ob.dep.notify();
  5019. return result
  5020. });
  5021. });
  5022. /* */
  5023. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  5024. /**
  5025. * In some cases we may want to disable observation inside a component's
  5026. * update computation.
  5027. */
  5028. var shouldObserve = true;
  5029. function toggleObserving (value) {
  5030. shouldObserve = value;
  5031. }
  5032. /**
  5033. * Observer class that is attached to each observed
  5034. * object. Once attached, the observer converts the target
  5035. * object's property keys into getter/setters that
  5036. * collect dependencies and dispatch updates.
  5037. */
  5038. var Observer = function Observer (value) {
  5039. this.value = value;
  5040. this.dep = new Dep();
  5041. this.vmCount = 0;
  5042. def(value, '__ob__', this);
  5043. if (Array.isArray(value)) {
  5044. if (hasProto) {
  5045. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  5046. if(value.push !== value.__proto__.push){
  5047. copyAugment(value, arrayMethods, arrayKeys);
  5048. } else {
  5049. protoAugment(value, arrayMethods);
  5050. }
  5051. }
  5052. } else {
  5053. copyAugment(value, arrayMethods, arrayKeys);
  5054. }
  5055. this.observeArray(value);
  5056. } else {
  5057. this.walk(value);
  5058. }
  5059. };
  5060. /**
  5061. * Walk through all properties and convert them into
  5062. * getter/setters. This method should only be called when
  5063. * value type is Object.
  5064. */
  5065. Observer.prototype.walk = function walk (obj) {
  5066. var keys = Object.keys(obj);
  5067. for (var i = 0; i < keys.length; i++) {
  5068. defineReactive$$1(obj, keys[i]);
  5069. }
  5070. };
  5071. /**
  5072. * Observe a list of Array items.
  5073. */
  5074. Observer.prototype.observeArray = function observeArray (items) {
  5075. for (var i = 0, l = items.length; i < l; i++) {
  5076. observe(items[i]);
  5077. }
  5078. };
  5079. // helpers
  5080. /**
  5081. * Augment a target Object or Array by intercepting
  5082. * the prototype chain using __proto__
  5083. */
  5084. function protoAugment (target, src) {
  5085. /* eslint-disable no-proto */
  5086. target.__proto__ = src;
  5087. /* eslint-enable no-proto */
  5088. }
  5089. /**
  5090. * Augment a target Object or Array by defining
  5091. * hidden properties.
  5092. */
  5093. /* istanbul ignore next */
  5094. function copyAugment (target, src, keys) {
  5095. for (var i = 0, l = keys.length; i < l; i++) {
  5096. var key = keys[i];
  5097. def(target, key, src[key]);
  5098. }
  5099. }
  5100. /**
  5101. * Attempt to create an observer instance for a value,
  5102. * returns the new observer if successfully observed,
  5103. * or the existing observer if the value already has one.
  5104. */
  5105. function observe (value, asRootData) {
  5106. if (!isObject(value) || value instanceof VNode) {
  5107. return
  5108. }
  5109. var ob;
  5110. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  5111. ob = value.__ob__;
  5112. } else if (
  5113. shouldObserve &&
  5114. !isServerRendering() &&
  5115. (Array.isArray(value) || isPlainObject(value)) &&
  5116. Object.isExtensible(value) &&
  5117. !value._isVue &&
  5118. !value.__v_isMPComponent
  5119. ) {
  5120. ob = new Observer(value);
  5121. }
  5122. if (asRootData && ob) {
  5123. ob.vmCount++;
  5124. }
  5125. return ob
  5126. }
  5127. /**
  5128. * Define a reactive property on an Object.
  5129. */
  5130. function defineReactive$$1 (
  5131. obj,
  5132. key,
  5133. val,
  5134. customSetter,
  5135. shallow
  5136. ) {
  5137. var dep = new Dep();
  5138. var property = Object.getOwnPropertyDescriptor(obj, key);
  5139. if (property && property.configurable === false) {
  5140. return
  5141. }
  5142. // cater for pre-defined getter/setters
  5143. var getter = property && property.get;
  5144. var setter = property && property.set;
  5145. if ((!getter || setter) && arguments.length === 2) {
  5146. val = obj[key];
  5147. }
  5148. var childOb = !shallow && observe(val);
  5149. Object.defineProperty(obj, key, {
  5150. enumerable: true,
  5151. configurable: true,
  5152. get: function reactiveGetter () {
  5153. var value = getter ? getter.call(obj) : val;
  5154. if (Dep.SharedObject.target) { // fixed by xxxxxx
  5155. dep.depend();
  5156. if (childOb) {
  5157. childOb.dep.depend();
  5158. if (Array.isArray(value)) {
  5159. dependArray(value);
  5160. }
  5161. }
  5162. }
  5163. return value
  5164. },
  5165. set: function reactiveSetter (newVal) {
  5166. var value = getter ? getter.call(obj) : val;
  5167. /* eslint-disable no-self-compare */
  5168. if (newVal === value || (newVal !== newVal && value !== value)) {
  5169. return
  5170. }
  5171. /* eslint-enable no-self-compare */
  5172. if ( true && customSetter) {
  5173. customSetter();
  5174. }
  5175. // #7981: for accessor properties without setter
  5176. if (getter && !setter) { return }
  5177. if (setter) {
  5178. setter.call(obj, newVal);
  5179. } else {
  5180. val = newVal;
  5181. }
  5182. childOb = !shallow && observe(newVal);
  5183. dep.notify();
  5184. }
  5185. });
  5186. }
  5187. /**
  5188. * Set a property on an object. Adds the new property and
  5189. * triggers change notification if the property doesn't
  5190. * already exist.
  5191. */
  5192. function set (target, key, val) {
  5193. if ( true &&
  5194. (isUndef(target) || isPrimitive(target))
  5195. ) {
  5196. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  5197. }
  5198. if (Array.isArray(target) && isValidArrayIndex(key)) {
  5199. target.length = Math.max(target.length, key);
  5200. target.splice(key, 1, val);
  5201. return val
  5202. }
  5203. if (key in target && !(key in Object.prototype)) {
  5204. target[key] = val;
  5205. return val
  5206. }
  5207. var ob = (target).__ob__;
  5208. if (target._isVue || (ob && ob.vmCount)) {
  5209. true && warn(
  5210. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  5211. 'at runtime - declare it upfront in the data option.'
  5212. );
  5213. return val
  5214. }
  5215. if (!ob) {
  5216. target[key] = val;
  5217. return val
  5218. }
  5219. defineReactive$$1(ob.value, key, val);
  5220. ob.dep.notify();
  5221. return val
  5222. }
  5223. /**
  5224. * Delete a property and trigger change if necessary.
  5225. */
  5226. function del (target, key) {
  5227. if ( true &&
  5228. (isUndef(target) || isPrimitive(target))
  5229. ) {
  5230. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  5231. }
  5232. if (Array.isArray(target) && isValidArrayIndex(key)) {
  5233. target.splice(key, 1);
  5234. return
  5235. }
  5236. var ob = (target).__ob__;
  5237. if (target._isVue || (ob && ob.vmCount)) {
  5238. true && warn(
  5239. 'Avoid deleting properties on a Vue instance or its root $data ' +
  5240. '- just set it to null.'
  5241. );
  5242. return
  5243. }
  5244. if (!hasOwn(target, key)) {
  5245. return
  5246. }
  5247. delete target[key];
  5248. if (!ob) {
  5249. return
  5250. }
  5251. ob.dep.notify();
  5252. }
  5253. /**
  5254. * Collect dependencies on array elements when the array is touched, since
  5255. * we cannot intercept array element access like property getters.
  5256. */
  5257. function dependArray (value) {
  5258. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  5259. e = value[i];
  5260. e && e.__ob__ && e.__ob__.dep.depend();
  5261. if (Array.isArray(e)) {
  5262. dependArray(e);
  5263. }
  5264. }
  5265. }
  5266. /* */
  5267. /**
  5268. * Option overwriting strategies are functions that handle
  5269. * how to merge a parent option value and a child option
  5270. * value into the final value.
  5271. */
  5272. var strats = config.optionMergeStrategies;
  5273. /**
  5274. * Options with restrictions
  5275. */
  5276. if (true) {
  5277. strats.el = strats.propsData = function (parent, child, vm, key) {
  5278. if (!vm) {
  5279. warn(
  5280. "option \"" + key + "\" can only be used during instance " +
  5281. 'creation with the `new` keyword.'
  5282. );
  5283. }
  5284. return defaultStrat(parent, child)
  5285. };
  5286. }
  5287. /**
  5288. * Helper that recursively merges two data objects together.
  5289. */
  5290. function mergeData (to, from) {
  5291. if (!from) { return to }
  5292. var key, toVal, fromVal;
  5293. var keys = hasSymbol
  5294. ? Reflect.ownKeys(from)
  5295. : Object.keys(from);
  5296. for (var i = 0; i < keys.length; i++) {
  5297. key = keys[i];
  5298. // in case the object is already observed...
  5299. if (key === '__ob__') { continue }
  5300. toVal = to[key];
  5301. fromVal = from[key];
  5302. if (!hasOwn(to, key)) {
  5303. set(to, key, fromVal);
  5304. } else if (
  5305. toVal !== fromVal &&
  5306. isPlainObject(toVal) &&
  5307. isPlainObject(fromVal)
  5308. ) {
  5309. mergeData(toVal, fromVal);
  5310. }
  5311. }
  5312. return to
  5313. }
  5314. /**
  5315. * Data
  5316. */
  5317. function mergeDataOrFn (
  5318. parentVal,
  5319. childVal,
  5320. vm
  5321. ) {
  5322. if (!vm) {
  5323. // in a Vue.extend merge, both should be functions
  5324. if (!childVal) {
  5325. return parentVal
  5326. }
  5327. if (!parentVal) {
  5328. return childVal
  5329. }
  5330. // when parentVal & childVal are both present,
  5331. // we need to return a function that returns the
  5332. // merged result of both functions... no need to
  5333. // check if parentVal is a function here because
  5334. // it has to be a function to pass previous merges.
  5335. return function mergedDataFn () {
  5336. return mergeData(
  5337. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  5338. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  5339. )
  5340. }
  5341. } else {
  5342. return function mergedInstanceDataFn () {
  5343. // instance merge
  5344. var instanceData = typeof childVal === 'function'
  5345. ? childVal.call(vm, vm)
  5346. : childVal;
  5347. var defaultData = typeof parentVal === 'function'
  5348. ? parentVal.call(vm, vm)
  5349. : parentVal;
  5350. if (instanceData) {
  5351. return mergeData(instanceData, defaultData)
  5352. } else {
  5353. return defaultData
  5354. }
  5355. }
  5356. }
  5357. }
  5358. strats.data = function (
  5359. parentVal,
  5360. childVal,
  5361. vm
  5362. ) {
  5363. if (!vm) {
  5364. if (childVal && typeof childVal !== 'function') {
  5365. true && warn(
  5366. 'The "data" option should be a function ' +
  5367. 'that returns a per-instance value in component ' +
  5368. 'definitions.',
  5369. vm
  5370. );
  5371. return parentVal
  5372. }
  5373. return mergeDataOrFn(parentVal, childVal)
  5374. }
  5375. return mergeDataOrFn(parentVal, childVal, vm)
  5376. };
  5377. /**
  5378. * Hooks and props are merged as arrays.
  5379. */
  5380. function mergeHook (
  5381. parentVal,
  5382. childVal
  5383. ) {
  5384. var res = childVal
  5385. ? parentVal
  5386. ? parentVal.concat(childVal)
  5387. : Array.isArray(childVal)
  5388. ? childVal
  5389. : [childVal]
  5390. : parentVal;
  5391. return res
  5392. ? dedupeHooks(res)
  5393. : res
  5394. }
  5395. function dedupeHooks (hooks) {
  5396. var res = [];
  5397. for (var i = 0; i < hooks.length; i++) {
  5398. if (res.indexOf(hooks[i]) === -1) {
  5399. res.push(hooks[i]);
  5400. }
  5401. }
  5402. return res
  5403. }
  5404. LIFECYCLE_HOOKS.forEach(function (hook) {
  5405. strats[hook] = mergeHook;
  5406. });
  5407. /**
  5408. * Assets
  5409. *
  5410. * When a vm is present (instance creation), we need to do
  5411. * a three-way merge between constructor options, instance
  5412. * options and parent options.
  5413. */
  5414. function mergeAssets (
  5415. parentVal,
  5416. childVal,
  5417. vm,
  5418. key
  5419. ) {
  5420. var res = Object.create(parentVal || null);
  5421. if (childVal) {
  5422. true && assertObjectType(key, childVal, vm);
  5423. return extend(res, childVal)
  5424. } else {
  5425. return res
  5426. }
  5427. }
  5428. ASSET_TYPES.forEach(function (type) {
  5429. strats[type + 's'] = mergeAssets;
  5430. });
  5431. /**
  5432. * Watchers.
  5433. *
  5434. * Watchers hashes should not overwrite one
  5435. * another, so we merge them as arrays.
  5436. */
  5437. strats.watch = function (
  5438. parentVal,
  5439. childVal,
  5440. vm,
  5441. key
  5442. ) {
  5443. // work around Firefox's Object.prototype.watch...
  5444. if (parentVal === nativeWatch) { parentVal = undefined; }
  5445. if (childVal === nativeWatch) { childVal = undefined; }
  5446. /* istanbul ignore if */
  5447. if (!childVal) { return Object.create(parentVal || null) }
  5448. if (true) {
  5449. assertObjectType(key, childVal, vm);
  5450. }
  5451. if (!parentVal) { return childVal }
  5452. var ret = {};
  5453. extend(ret, parentVal);
  5454. for (var key$1 in childVal) {
  5455. var parent = ret[key$1];
  5456. var child = childVal[key$1];
  5457. if (parent && !Array.isArray(parent)) {
  5458. parent = [parent];
  5459. }
  5460. ret[key$1] = parent
  5461. ? parent.concat(child)
  5462. : Array.isArray(child) ? child : [child];
  5463. }
  5464. return ret
  5465. };
  5466. /**
  5467. * Other object hashes.
  5468. */
  5469. strats.props =
  5470. strats.methods =
  5471. strats.inject =
  5472. strats.computed = function (
  5473. parentVal,
  5474. childVal,
  5475. vm,
  5476. key
  5477. ) {
  5478. if (childVal && "development" !== 'production') {
  5479. assertObjectType(key, childVal, vm);
  5480. }
  5481. if (!parentVal) { return childVal }
  5482. var ret = Object.create(null);
  5483. extend(ret, parentVal);
  5484. if (childVal) { extend(ret, childVal); }
  5485. return ret
  5486. };
  5487. strats.provide = mergeDataOrFn;
  5488. /**
  5489. * Default strategy.
  5490. */
  5491. var defaultStrat = function (parentVal, childVal) {
  5492. return childVal === undefined
  5493. ? parentVal
  5494. : childVal
  5495. };
  5496. /**
  5497. * Validate component names
  5498. */
  5499. function checkComponents (options) {
  5500. for (var key in options.components) {
  5501. validateComponentName(key);
  5502. }
  5503. }
  5504. function validateComponentName (name) {
  5505. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  5506. warn(
  5507. 'Invalid component name: "' + name + '". Component names ' +
  5508. 'should conform to valid custom element name in html5 specification.'
  5509. );
  5510. }
  5511. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  5512. warn(
  5513. 'Do not use built-in or reserved HTML elements as component ' +
  5514. 'id: ' + name
  5515. );
  5516. }
  5517. }
  5518. /**
  5519. * Ensure all props option syntax are normalized into the
  5520. * Object-based format.
  5521. */
  5522. function normalizeProps (options, vm) {
  5523. var props = options.props;
  5524. if (!props) { return }
  5525. var res = {};
  5526. var i, val, name;
  5527. if (Array.isArray(props)) {
  5528. i = props.length;
  5529. while (i--) {
  5530. val = props[i];
  5531. if (typeof val === 'string') {
  5532. name = camelize(val);
  5533. res[name] = { type: null };
  5534. } else if (true) {
  5535. warn('props must be strings when using array syntax.');
  5536. }
  5537. }
  5538. } else if (isPlainObject(props)) {
  5539. for (var key in props) {
  5540. val = props[key];
  5541. name = camelize(key);
  5542. res[name] = isPlainObject(val)
  5543. ? val
  5544. : { type: val };
  5545. }
  5546. } else if (true) {
  5547. warn(
  5548. "Invalid value for option \"props\": expected an Array or an Object, " +
  5549. "but got " + (toRawType(props)) + ".",
  5550. vm
  5551. );
  5552. }
  5553. options.props = res;
  5554. }
  5555. /**
  5556. * Normalize all injections into Object-based format
  5557. */
  5558. function normalizeInject (options, vm) {
  5559. var inject = options.inject;
  5560. if (!inject) { return }
  5561. var normalized = options.inject = {};
  5562. if (Array.isArray(inject)) {
  5563. for (var i = 0; i < inject.length; i++) {
  5564. normalized[inject[i]] = { from: inject[i] };
  5565. }
  5566. } else if (isPlainObject(inject)) {
  5567. for (var key in inject) {
  5568. var val = inject[key];
  5569. normalized[key] = isPlainObject(val)
  5570. ? extend({ from: key }, val)
  5571. : { from: val };
  5572. }
  5573. } else if (true) {
  5574. warn(
  5575. "Invalid value for option \"inject\": expected an Array or an Object, " +
  5576. "but got " + (toRawType(inject)) + ".",
  5577. vm
  5578. );
  5579. }
  5580. }
  5581. /**
  5582. * Normalize raw function directives into object format.
  5583. */
  5584. function normalizeDirectives (options) {
  5585. var dirs = options.directives;
  5586. if (dirs) {
  5587. for (var key in dirs) {
  5588. var def$$1 = dirs[key];
  5589. if (typeof def$$1 === 'function') {
  5590. dirs[key] = { bind: def$$1, update: def$$1 };
  5591. }
  5592. }
  5593. }
  5594. }
  5595. function assertObjectType (name, value, vm) {
  5596. if (!isPlainObject(value)) {
  5597. warn(
  5598. "Invalid value for option \"" + name + "\": expected an Object, " +
  5599. "but got " + (toRawType(value)) + ".",
  5600. vm
  5601. );
  5602. }
  5603. }
  5604. /**
  5605. * Merge two option objects into a new one.
  5606. * Core utility used in both instantiation and inheritance.
  5607. */
  5608. function mergeOptions (
  5609. parent,
  5610. child,
  5611. vm
  5612. ) {
  5613. if (true) {
  5614. checkComponents(child);
  5615. }
  5616. if (typeof child === 'function') {
  5617. child = child.options;
  5618. }
  5619. normalizeProps(child, vm);
  5620. normalizeInject(child, vm);
  5621. normalizeDirectives(child);
  5622. // Apply extends and mixins on the child options,
  5623. // but only if it is a raw options object that isn't
  5624. // the result of another mergeOptions call.
  5625. // Only merged options has the _base property.
  5626. if (!child._base) {
  5627. if (child.extends) {
  5628. parent = mergeOptions(parent, child.extends, vm);
  5629. }
  5630. if (child.mixins) {
  5631. for (var i = 0, l = child.mixins.length; i < l; i++) {
  5632. parent = mergeOptions(parent, child.mixins[i], vm);
  5633. }
  5634. }
  5635. }
  5636. var options = {};
  5637. var key;
  5638. for (key in parent) {
  5639. mergeField(key);
  5640. }
  5641. for (key in child) {
  5642. if (!hasOwn(parent, key)) {
  5643. mergeField(key);
  5644. }
  5645. }
  5646. function mergeField (key) {
  5647. var strat = strats[key] || defaultStrat;
  5648. options[key] = strat(parent[key], child[key], vm, key);
  5649. }
  5650. return options
  5651. }
  5652. /**
  5653. * Resolve an asset.
  5654. * This function is used because child instances need access
  5655. * to assets defined in its ancestor chain.
  5656. */
  5657. function resolveAsset (
  5658. options,
  5659. type,
  5660. id,
  5661. warnMissing
  5662. ) {
  5663. /* istanbul ignore if */
  5664. if (typeof id !== 'string') {
  5665. return
  5666. }
  5667. var assets = options[type];
  5668. // check local registration variations first
  5669. if (hasOwn(assets, id)) { return assets[id] }
  5670. var camelizedId = camelize(id);
  5671. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  5672. var PascalCaseId = capitalize(camelizedId);
  5673. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  5674. // fallback to prototype chain
  5675. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  5676. if ( true && warnMissing && !res) {
  5677. warn(
  5678. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  5679. options
  5680. );
  5681. }
  5682. return res
  5683. }
  5684. /* */
  5685. function validateProp (
  5686. key,
  5687. propOptions,
  5688. propsData,
  5689. vm
  5690. ) {
  5691. var prop = propOptions[key];
  5692. var absent = !hasOwn(propsData, key);
  5693. var value = propsData[key];
  5694. // boolean casting
  5695. var booleanIndex = getTypeIndex(Boolean, prop.type);
  5696. if (booleanIndex > -1) {
  5697. if (absent && !hasOwn(prop, 'default')) {
  5698. value = false;
  5699. } else if (value === '' || value === hyphenate(key)) {
  5700. // only cast empty string / same name to boolean if
  5701. // boolean has higher priority
  5702. var stringIndex = getTypeIndex(String, prop.type);
  5703. if (stringIndex < 0 || booleanIndex < stringIndex) {
  5704. value = true;
  5705. }
  5706. }
  5707. }
  5708. // check default value
  5709. if (value === undefined) {
  5710. value = getPropDefaultValue(vm, prop, key);
  5711. // since the default value is a fresh copy,
  5712. // make sure to observe it.
  5713. var prevShouldObserve = shouldObserve;
  5714. toggleObserving(true);
  5715. observe(value);
  5716. toggleObserving(prevShouldObserve);
  5717. }
  5718. if (
  5719. true
  5720. ) {
  5721. assertProp(prop, key, value, vm, absent);
  5722. }
  5723. return value
  5724. }
  5725. /**
  5726. * Get the default value of a prop.
  5727. */
  5728. function getPropDefaultValue (vm, prop, key) {
  5729. // no default, return undefined
  5730. if (!hasOwn(prop, 'default')) {
  5731. return undefined
  5732. }
  5733. var def = prop.default;
  5734. // warn against non-factory defaults for Object & Array
  5735. if ( true && isObject(def)) {
  5736. warn(
  5737. 'Invalid default value for prop "' + key + '": ' +
  5738. 'Props with type Object/Array must use a factory function ' +
  5739. 'to return the default value.',
  5740. vm
  5741. );
  5742. }
  5743. // the raw prop value was also undefined from previous render,
  5744. // return previous default value to avoid unnecessary watcher trigger
  5745. if (vm && vm.$options.propsData &&
  5746. vm.$options.propsData[key] === undefined &&
  5747. vm._props[key] !== undefined
  5748. ) {
  5749. return vm._props[key]
  5750. }
  5751. // call factory function for non-Function types
  5752. // a value is Function if its prototype is function even across different execution context
  5753. return typeof def === 'function' && getType(prop.type) !== 'Function'
  5754. ? def.call(vm)
  5755. : def
  5756. }
  5757. /**
  5758. * Assert whether a prop is valid.
  5759. */
  5760. function assertProp (
  5761. prop,
  5762. name,
  5763. value,
  5764. vm,
  5765. absent
  5766. ) {
  5767. if (prop.required && absent) {
  5768. warn(
  5769. 'Missing required prop: "' + name + '"',
  5770. vm
  5771. );
  5772. return
  5773. }
  5774. if (value == null && !prop.required) {
  5775. return
  5776. }
  5777. var type = prop.type;
  5778. var valid = !type || type === true;
  5779. var expectedTypes = [];
  5780. if (type) {
  5781. if (!Array.isArray(type)) {
  5782. type = [type];
  5783. }
  5784. for (var i = 0; i < type.length && !valid; i++) {
  5785. var assertedType = assertType(value, type[i]);
  5786. expectedTypes.push(assertedType.expectedType || '');
  5787. valid = assertedType.valid;
  5788. }
  5789. }
  5790. if (!valid) {
  5791. warn(
  5792. getInvalidTypeMessage(name, value, expectedTypes),
  5793. vm
  5794. );
  5795. return
  5796. }
  5797. var validator = prop.validator;
  5798. if (validator) {
  5799. if (!validator(value)) {
  5800. warn(
  5801. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  5802. vm
  5803. );
  5804. }
  5805. }
  5806. }
  5807. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  5808. function assertType (value, type) {
  5809. var valid;
  5810. var expectedType = getType(type);
  5811. if (simpleCheckRE.test(expectedType)) {
  5812. var t = typeof value;
  5813. valid = t === expectedType.toLowerCase();
  5814. // for primitive wrapper objects
  5815. if (!valid && t === 'object') {
  5816. valid = value instanceof type;
  5817. }
  5818. } else if (expectedType === 'Object') {
  5819. valid = isPlainObject(value);
  5820. } else if (expectedType === 'Array') {
  5821. valid = Array.isArray(value);
  5822. } else {
  5823. valid = value instanceof type;
  5824. }
  5825. return {
  5826. valid: valid,
  5827. expectedType: expectedType
  5828. }
  5829. }
  5830. /**
  5831. * Use function string name to check built-in types,
  5832. * because a simple equality check will fail when running
  5833. * across different vms / iframes.
  5834. */
  5835. function getType (fn) {
  5836. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  5837. return match ? match[1] : ''
  5838. }
  5839. function isSameType (a, b) {
  5840. return getType(a) === getType(b)
  5841. }
  5842. function getTypeIndex (type, expectedTypes) {
  5843. if (!Array.isArray(expectedTypes)) {
  5844. return isSameType(expectedTypes, type) ? 0 : -1
  5845. }
  5846. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  5847. if (isSameType(expectedTypes[i], type)) {
  5848. return i
  5849. }
  5850. }
  5851. return -1
  5852. }
  5853. function getInvalidTypeMessage (name, value, expectedTypes) {
  5854. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  5855. " Expected " + (expectedTypes.map(capitalize).join(', '));
  5856. var expectedType = expectedTypes[0];
  5857. var receivedType = toRawType(value);
  5858. var expectedValue = styleValue(value, expectedType);
  5859. var receivedValue = styleValue(value, receivedType);
  5860. // check if we need to specify expected value
  5861. if (expectedTypes.length === 1 &&
  5862. isExplicable(expectedType) &&
  5863. !isBoolean(expectedType, receivedType)) {
  5864. message += " with value " + expectedValue;
  5865. }
  5866. message += ", got " + receivedType + " ";
  5867. // check if we need to specify received value
  5868. if (isExplicable(receivedType)) {
  5869. message += "with value " + receivedValue + ".";
  5870. }
  5871. return message
  5872. }
  5873. function styleValue (value, type) {
  5874. if (type === 'String') {
  5875. return ("\"" + value + "\"")
  5876. } else if (type === 'Number') {
  5877. return ("" + (Number(value)))
  5878. } else {
  5879. return ("" + value)
  5880. }
  5881. }
  5882. function isExplicable (value) {
  5883. var explicitTypes = ['string', 'number', 'boolean'];
  5884. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  5885. }
  5886. function isBoolean () {
  5887. var args = [], len = arguments.length;
  5888. while ( len-- ) args[ len ] = arguments[ len ];
  5889. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  5890. }
  5891. /* */
  5892. function handleError (err, vm, info) {
  5893. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  5894. // See: https://github.com/vuejs/vuex/issues/1505
  5895. pushTarget();
  5896. try {
  5897. if (vm) {
  5898. var cur = vm;
  5899. while ((cur = cur.$parent)) {
  5900. var hooks = cur.$options.errorCaptured;
  5901. if (hooks) {
  5902. for (var i = 0; i < hooks.length; i++) {
  5903. try {
  5904. var capture = hooks[i].call(cur, err, vm, info) === false;
  5905. if (capture) { return }
  5906. } catch (e) {
  5907. globalHandleError(e, cur, 'errorCaptured hook');
  5908. }
  5909. }
  5910. }
  5911. }
  5912. }
  5913. globalHandleError(err, vm, info);
  5914. } finally {
  5915. popTarget();
  5916. }
  5917. }
  5918. function invokeWithErrorHandling (
  5919. handler,
  5920. context,
  5921. args,
  5922. vm,
  5923. info
  5924. ) {
  5925. var res;
  5926. try {
  5927. res = args ? handler.apply(context, args) : handler.call(context);
  5928. if (res && !res._isVue && isPromise(res) && !res._handled) {
  5929. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  5930. // issue #9511
  5931. // avoid catch triggering multiple times when nested calls
  5932. res._handled = true;
  5933. }
  5934. } catch (e) {
  5935. handleError(e, vm, info);
  5936. }
  5937. return res
  5938. }
  5939. function globalHandleError (err, vm, info) {
  5940. if (config.errorHandler) {
  5941. try {
  5942. return config.errorHandler.call(null, err, vm, info)
  5943. } catch (e) {
  5944. // if the user intentionally throws the original error in the handler,
  5945. // do not log it twice
  5946. if (e !== err) {
  5947. logError(e, null, 'config.errorHandler');
  5948. }
  5949. }
  5950. }
  5951. logError(err, vm, info);
  5952. }
  5953. function logError (err, vm, info) {
  5954. if (true) {
  5955. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  5956. }
  5957. /* istanbul ignore else */
  5958. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  5959. console.error(err);
  5960. } else {
  5961. throw err
  5962. }
  5963. }
  5964. /* */
  5965. var callbacks = [];
  5966. var pending = false;
  5967. function flushCallbacks () {
  5968. pending = false;
  5969. var copies = callbacks.slice(0);
  5970. callbacks.length = 0;
  5971. for (var i = 0; i < copies.length; i++) {
  5972. copies[i]();
  5973. }
  5974. }
  5975. // Here we have async deferring wrappers using microtasks.
  5976. // In 2.5 we used (macro) tasks (in combination with microtasks).
  5977. // However, it has subtle problems when state is changed right before repaint
  5978. // (e.g. #6813, out-in transitions).
  5979. // Also, using (macro) tasks in event handler would cause some weird behaviors
  5980. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  5981. // So we now use microtasks everywhere, again.
  5982. // A major drawback of this tradeoff is that there are some scenarios
  5983. // where microtasks have too high a priority and fire in between supposedly
  5984. // sequential events (e.g. #4521, #6690, which have workarounds)
  5985. // or even between bubbling of the same event (#6566).
  5986. var timerFunc;
  5987. // The nextTick behavior leverages the microtask queue, which can be accessed
  5988. // via either native Promise.then or MutationObserver.
  5989. // MutationObserver has wider support, however it is seriously bugged in
  5990. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  5991. // completely stops working after triggering a few times... so, if native
  5992. // Promise is available, we will use it:
  5993. /* istanbul ignore next, $flow-disable-line */
  5994. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  5995. var p = Promise.resolve();
  5996. timerFunc = function () {
  5997. p.then(flushCallbacks);
  5998. // In problematic UIWebViews, Promise.then doesn't completely break, but
  5999. // it can get stuck in a weird state where callbacks are pushed into the
  6000. // microtask queue but the queue isn't being flushed, until the browser
  6001. // needs to do some other work, e.g. handle a timer. Therefore we can
  6002. // "force" the microtask queue to be flushed by adding an empty timer.
  6003. if (isIOS) { setTimeout(noop); }
  6004. };
  6005. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  6006. isNative(MutationObserver) ||
  6007. // PhantomJS and iOS 7.x
  6008. MutationObserver.toString() === '[object MutationObserverConstructor]'
  6009. )) {
  6010. // Use MutationObserver where native Promise is not available,
  6011. // e.g. PhantomJS, iOS7, Android 4.4
  6012. // (#6466 MutationObserver is unreliable in IE11)
  6013. var counter = 1;
  6014. var observer = new MutationObserver(flushCallbacks);
  6015. var textNode = document.createTextNode(String(counter));
  6016. observer.observe(textNode, {
  6017. characterData: true
  6018. });
  6019. timerFunc = function () {
  6020. counter = (counter + 1) % 2;
  6021. textNode.data = String(counter);
  6022. };
  6023. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  6024. // Fallback to setImmediate.
  6025. // Technically it leverages the (macro) task queue,
  6026. // but it is still a better choice than setTimeout.
  6027. timerFunc = function () {
  6028. setImmediate(flushCallbacks);
  6029. };
  6030. } else {
  6031. // Fallback to setTimeout.
  6032. timerFunc = function () {
  6033. setTimeout(flushCallbacks, 0);
  6034. };
  6035. }
  6036. function nextTick (cb, ctx) {
  6037. var _resolve;
  6038. callbacks.push(function () {
  6039. if (cb) {
  6040. try {
  6041. cb.call(ctx);
  6042. } catch (e) {
  6043. handleError(e, ctx, 'nextTick');
  6044. }
  6045. } else if (_resolve) {
  6046. _resolve(ctx);
  6047. }
  6048. });
  6049. if (!pending) {
  6050. pending = true;
  6051. timerFunc();
  6052. }
  6053. // $flow-disable-line
  6054. if (!cb && typeof Promise !== 'undefined') {
  6055. return new Promise(function (resolve) {
  6056. _resolve = resolve;
  6057. })
  6058. }
  6059. }
  6060. /* */
  6061. /* not type checking this file because flow doesn't play well with Proxy */
  6062. var initProxy;
  6063. if (true) {
  6064. var allowedGlobals = makeMap(
  6065. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  6066. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  6067. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  6068. 'require' // for Webpack/Browserify
  6069. );
  6070. var warnNonPresent = function (target, key) {
  6071. warn(
  6072. "Property or method \"" + key + "\" is not defined on the instance but " +
  6073. 'referenced during render. Make sure that this property is reactive, ' +
  6074. 'either in the data option, or for class-based components, by ' +
  6075. 'initializing the property. ' +
  6076. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  6077. target
  6078. );
  6079. };
  6080. var warnReservedPrefix = function (target, key) {
  6081. warn(
  6082. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  6083. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  6084. 'prevent conflicts with Vue internals. ' +
  6085. 'See: https://vuejs.org/v2/api/#data',
  6086. target
  6087. );
  6088. };
  6089. var hasProxy =
  6090. typeof Proxy !== 'undefined' && isNative(Proxy);
  6091. if (hasProxy) {
  6092. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  6093. config.keyCodes = new Proxy(config.keyCodes, {
  6094. set: function set (target, key, value) {
  6095. if (isBuiltInModifier(key)) {
  6096. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  6097. return false
  6098. } else {
  6099. target[key] = value;
  6100. return true
  6101. }
  6102. }
  6103. });
  6104. }
  6105. var hasHandler = {
  6106. has: function has (target, key) {
  6107. var has = key in target;
  6108. var isAllowed = allowedGlobals(key) ||
  6109. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  6110. if (!has && !isAllowed) {
  6111. if (key in target.$data) { warnReservedPrefix(target, key); }
  6112. else { warnNonPresent(target, key); }
  6113. }
  6114. return has || !isAllowed
  6115. }
  6116. };
  6117. var getHandler = {
  6118. get: function get (target, key) {
  6119. if (typeof key === 'string' && !(key in target)) {
  6120. if (key in target.$data) { warnReservedPrefix(target, key); }
  6121. else { warnNonPresent(target, key); }
  6122. }
  6123. return target[key]
  6124. }
  6125. };
  6126. initProxy = function initProxy (vm) {
  6127. if (hasProxy) {
  6128. // determine which proxy handler to use
  6129. var options = vm.$options;
  6130. var handlers = options.render && options.render._withStripped
  6131. ? getHandler
  6132. : hasHandler;
  6133. vm._renderProxy = new Proxy(vm, handlers);
  6134. } else {
  6135. vm._renderProxy = vm;
  6136. }
  6137. };
  6138. }
  6139. /* */
  6140. var seenObjects = new _Set();
  6141. /**
  6142. * Recursively traverse an object to evoke all converted
  6143. * getters, so that every nested property inside the object
  6144. * is collected as a "deep" dependency.
  6145. */
  6146. function traverse (val) {
  6147. _traverse(val, seenObjects);
  6148. seenObjects.clear();
  6149. }
  6150. function _traverse (val, seen) {
  6151. var i, keys;
  6152. var isA = Array.isArray(val);
  6153. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  6154. return
  6155. }
  6156. if (val.__ob__) {
  6157. var depId = val.__ob__.dep.id;
  6158. if (seen.has(depId)) {
  6159. return
  6160. }
  6161. seen.add(depId);
  6162. }
  6163. if (isA) {
  6164. i = val.length;
  6165. while (i--) { _traverse(val[i], seen); }
  6166. } else {
  6167. keys = Object.keys(val);
  6168. i = keys.length;
  6169. while (i--) { _traverse(val[keys[i]], seen); }
  6170. }
  6171. }
  6172. var mark;
  6173. var measure;
  6174. if (true) {
  6175. var perf = inBrowser && window.performance;
  6176. /* istanbul ignore if */
  6177. if (
  6178. perf &&
  6179. perf.mark &&
  6180. perf.measure &&
  6181. perf.clearMarks &&
  6182. perf.clearMeasures
  6183. ) {
  6184. mark = function (tag) { return perf.mark(tag); };
  6185. measure = function (name, startTag, endTag) {
  6186. perf.measure(name, startTag, endTag);
  6187. perf.clearMarks(startTag);
  6188. perf.clearMarks(endTag);
  6189. // perf.clearMeasures(name)
  6190. };
  6191. }
  6192. }
  6193. /* */
  6194. var normalizeEvent = cached(function (name) {
  6195. var passive = name.charAt(0) === '&';
  6196. name = passive ? name.slice(1) : name;
  6197. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  6198. name = once$$1 ? name.slice(1) : name;
  6199. var capture = name.charAt(0) === '!';
  6200. name = capture ? name.slice(1) : name;
  6201. return {
  6202. name: name,
  6203. once: once$$1,
  6204. capture: capture,
  6205. passive: passive
  6206. }
  6207. });
  6208. function createFnInvoker (fns, vm) {
  6209. function invoker () {
  6210. var arguments$1 = arguments;
  6211. var fns = invoker.fns;
  6212. if (Array.isArray(fns)) {
  6213. var cloned = fns.slice();
  6214. for (var i = 0; i < cloned.length; i++) {
  6215. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  6216. }
  6217. } else {
  6218. // return handler return value for single handlers
  6219. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  6220. }
  6221. }
  6222. invoker.fns = fns;
  6223. return invoker
  6224. }
  6225. function updateListeners (
  6226. on,
  6227. oldOn,
  6228. add,
  6229. remove$$1,
  6230. createOnceHandler,
  6231. vm
  6232. ) {
  6233. var name, def$$1, cur, old, event;
  6234. for (name in on) {
  6235. def$$1 = cur = on[name];
  6236. old = oldOn[name];
  6237. event = normalizeEvent(name);
  6238. if (isUndef(cur)) {
  6239. true && warn(
  6240. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  6241. vm
  6242. );
  6243. } else if (isUndef(old)) {
  6244. if (isUndef(cur.fns)) {
  6245. cur = on[name] = createFnInvoker(cur, vm);
  6246. }
  6247. if (isTrue(event.once)) {
  6248. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  6249. }
  6250. add(event.name, cur, event.capture, event.passive, event.params);
  6251. } else if (cur !== old) {
  6252. old.fns = cur;
  6253. on[name] = old;
  6254. }
  6255. }
  6256. for (name in oldOn) {
  6257. if (isUndef(on[name])) {
  6258. event = normalizeEvent(name);
  6259. remove$$1(event.name, oldOn[name], event.capture);
  6260. }
  6261. }
  6262. }
  6263. /* */
  6264. /* */
  6265. // fixed by xxxxxx (mp properties)
  6266. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  6267. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  6268. if (isUndef(propOptions)) {
  6269. return res
  6270. }
  6271. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  6272. var attrs = data.attrs;
  6273. var props = data.props;
  6274. if (isDef(attrs) || isDef(props)) {
  6275. for (var key in propOptions) {
  6276. var altKey = hyphenate(key);
  6277. var result = checkProp(res, props, key, altKey, true) ||
  6278. checkProp(res, attrs, key, altKey, false);
  6279. // externalClass
  6280. if (
  6281. result &&
  6282. res[key] &&
  6283. externalClasses.indexOf(altKey) !== -1 &&
  6284. context[camelize(res[key])]
  6285. ) {
  6286. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  6287. res[key] = context[camelize(res[key])];
  6288. }
  6289. }
  6290. }
  6291. return res
  6292. }
  6293. function extractPropsFromVNodeData (
  6294. data,
  6295. Ctor,
  6296. tag,
  6297. context// fixed by xxxxxx
  6298. ) {
  6299. // we are only extracting raw values here.
  6300. // validation and default values are handled in the child
  6301. // component itself.
  6302. var propOptions = Ctor.options.props;
  6303. if (isUndef(propOptions)) {
  6304. // fixed by xxxxxx
  6305. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  6306. }
  6307. var res = {};
  6308. var attrs = data.attrs;
  6309. var props = data.props;
  6310. if (isDef(attrs) || isDef(props)) {
  6311. for (var key in propOptions) {
  6312. var altKey = hyphenate(key);
  6313. if (true) {
  6314. var keyInLowerCase = key.toLowerCase();
  6315. if (
  6316. key !== keyInLowerCase &&
  6317. attrs && hasOwn(attrs, keyInLowerCase)
  6318. ) {
  6319. tip(
  6320. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  6321. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  6322. " \"" + key + "\". " +
  6323. "Note that HTML attributes are case-insensitive and camelCased " +
  6324. "props need to use their kebab-case equivalents when using in-DOM " +
  6325. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  6326. );
  6327. }
  6328. }
  6329. checkProp(res, props, key, altKey, true) ||
  6330. checkProp(res, attrs, key, altKey, false);
  6331. }
  6332. }
  6333. // fixed by xxxxxx
  6334. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  6335. }
  6336. function checkProp (
  6337. res,
  6338. hash,
  6339. key,
  6340. altKey,
  6341. preserve
  6342. ) {
  6343. if (isDef(hash)) {
  6344. if (hasOwn(hash, key)) {
  6345. res[key] = hash[key];
  6346. if (!preserve) {
  6347. delete hash[key];
  6348. }
  6349. return true
  6350. } else if (hasOwn(hash, altKey)) {
  6351. res[key] = hash[altKey];
  6352. if (!preserve) {
  6353. delete hash[altKey];
  6354. }
  6355. return true
  6356. }
  6357. }
  6358. return false
  6359. }
  6360. /* */
  6361. // The template compiler attempts to minimize the need for normalization by
  6362. // statically analyzing the template at compile time.
  6363. //
  6364. // For plain HTML markup, normalization can be completely skipped because the
  6365. // generated render function is guaranteed to return Array<VNode>. There are
  6366. // two cases where extra normalization is needed:
  6367. // 1. When the children contains components - because a functional component
  6368. // may return an Array instead of a single root. In this case, just a simple
  6369. // normalization is needed - if any child is an Array, we flatten the whole
  6370. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  6371. // because functional components already normalize their own children.
  6372. function simpleNormalizeChildren (children) {
  6373. for (var i = 0; i < children.length; i++) {
  6374. if (Array.isArray(children[i])) {
  6375. return Array.prototype.concat.apply([], children)
  6376. }
  6377. }
  6378. return children
  6379. }
  6380. // 2. When the children contains constructs that always generated nested Arrays,
  6381. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  6382. // with hand-written render functions / JSX. In such cases a full normalization
  6383. // is needed to cater to all possible types of children values.
  6384. function normalizeChildren (children) {
  6385. return isPrimitive(children)
  6386. ? [createTextVNode(children)]
  6387. : Array.isArray(children)
  6388. ? normalizeArrayChildren(children)
  6389. : undefined
  6390. }
  6391. function isTextNode (node) {
  6392. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  6393. }
  6394. function normalizeArrayChildren (children, nestedIndex) {
  6395. var res = [];
  6396. var i, c, lastIndex, last;
  6397. for (i = 0; i < children.length; i++) {
  6398. c = children[i];
  6399. if (isUndef(c) || typeof c === 'boolean') { continue }
  6400. lastIndex = res.length - 1;
  6401. last = res[lastIndex];
  6402. // nested
  6403. if (Array.isArray(c)) {
  6404. if (c.length > 0) {
  6405. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  6406. // merge adjacent text nodes
  6407. if (isTextNode(c[0]) && isTextNode(last)) {
  6408. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  6409. c.shift();
  6410. }
  6411. res.push.apply(res, c);
  6412. }
  6413. } else if (isPrimitive(c)) {
  6414. if (isTextNode(last)) {
  6415. // merge adjacent text nodes
  6416. // this is necessary for SSR hydration because text nodes are
  6417. // essentially merged when rendered to HTML strings
  6418. res[lastIndex] = createTextVNode(last.text + c);
  6419. } else if (c !== '') {
  6420. // convert primitive to vnode
  6421. res.push(createTextVNode(c));
  6422. }
  6423. } else {
  6424. if (isTextNode(c) && isTextNode(last)) {
  6425. // merge adjacent text nodes
  6426. res[lastIndex] = createTextVNode(last.text + c.text);
  6427. } else {
  6428. // default key for nested array children (likely generated by v-for)
  6429. if (isTrue(children._isVList) &&
  6430. isDef(c.tag) &&
  6431. isUndef(c.key) &&
  6432. isDef(nestedIndex)) {
  6433. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  6434. }
  6435. res.push(c);
  6436. }
  6437. }
  6438. }
  6439. return res
  6440. }
  6441. /* */
  6442. function initProvide (vm) {
  6443. var provide = vm.$options.provide;
  6444. if (provide) {
  6445. vm._provided = typeof provide === 'function'
  6446. ? provide.call(vm)
  6447. : provide;
  6448. }
  6449. }
  6450. function initInjections (vm) {
  6451. var result = resolveInject(vm.$options.inject, vm);
  6452. if (result) {
  6453. toggleObserving(false);
  6454. Object.keys(result).forEach(function (key) {
  6455. /* istanbul ignore else */
  6456. if (true) {
  6457. defineReactive$$1(vm, key, result[key], function () {
  6458. warn(
  6459. "Avoid mutating an injected value directly since the changes will be " +
  6460. "overwritten whenever the provided component re-renders. " +
  6461. "injection being mutated: \"" + key + "\"",
  6462. vm
  6463. );
  6464. });
  6465. } else {}
  6466. });
  6467. toggleObserving(true);
  6468. }
  6469. }
  6470. function resolveInject (inject, vm) {
  6471. if (inject) {
  6472. // inject is :any because flow is not smart enough to figure out cached
  6473. var result = Object.create(null);
  6474. var keys = hasSymbol
  6475. ? Reflect.ownKeys(inject)
  6476. : Object.keys(inject);
  6477. for (var i = 0; i < keys.length; i++) {
  6478. var key = keys[i];
  6479. // #6574 in case the inject object is observed...
  6480. if (key === '__ob__') { continue }
  6481. var provideKey = inject[key].from;
  6482. var source = vm;
  6483. while (source) {
  6484. if (source._provided && hasOwn(source._provided, provideKey)) {
  6485. result[key] = source._provided[provideKey];
  6486. break
  6487. }
  6488. source = source.$parent;
  6489. }
  6490. if (!source) {
  6491. if ('default' in inject[key]) {
  6492. var provideDefault = inject[key].default;
  6493. result[key] = typeof provideDefault === 'function'
  6494. ? provideDefault.call(vm)
  6495. : provideDefault;
  6496. } else if (true) {
  6497. warn(("Injection \"" + key + "\" not found"), vm);
  6498. }
  6499. }
  6500. }
  6501. return result
  6502. }
  6503. }
  6504. /* */
  6505. /**
  6506. * Runtime helper for resolving raw children VNodes into a slot object.
  6507. */
  6508. function resolveSlots (
  6509. children,
  6510. context
  6511. ) {
  6512. if (!children || !children.length) {
  6513. return {}
  6514. }
  6515. var slots = {};
  6516. for (var i = 0, l = children.length; i < l; i++) {
  6517. var child = children[i];
  6518. var data = child.data;
  6519. // remove slot attribute if the node is resolved as a Vue slot node
  6520. if (data && data.attrs && data.attrs.slot) {
  6521. delete data.attrs.slot;
  6522. }
  6523. // named slots should only be respected if the vnode was rendered in the
  6524. // same context.
  6525. if ((child.context === context || child.fnContext === context) &&
  6526. data && data.slot != null
  6527. ) {
  6528. var name = data.slot;
  6529. var slot = (slots[name] || (slots[name] = []));
  6530. if (child.tag === 'template') {
  6531. slot.push.apply(slot, child.children || []);
  6532. } else {
  6533. slot.push(child);
  6534. }
  6535. } else {
  6536. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  6537. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  6538. (slots['page'] || (slots['page'] = [])).push(child);
  6539. }else{
  6540. (slots.default || (slots.default = [])).push(child);
  6541. }
  6542. }
  6543. }
  6544. // ignore slots that contains only whitespace
  6545. for (var name$1 in slots) {
  6546. if (slots[name$1].every(isWhitespace)) {
  6547. delete slots[name$1];
  6548. }
  6549. }
  6550. return slots
  6551. }
  6552. function isWhitespace (node) {
  6553. return (node.isComment && !node.asyncFactory) || node.text === ' '
  6554. }
  6555. /* */
  6556. function normalizeScopedSlots (
  6557. slots,
  6558. normalSlots,
  6559. prevSlots
  6560. ) {
  6561. var res;
  6562. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  6563. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  6564. var key = slots && slots.$key;
  6565. if (!slots) {
  6566. res = {};
  6567. } else if (slots._normalized) {
  6568. // fast path 1: child component re-render only, parent did not change
  6569. return slots._normalized
  6570. } else if (
  6571. isStable &&
  6572. prevSlots &&
  6573. prevSlots !== emptyObject &&
  6574. key === prevSlots.$key &&
  6575. !hasNormalSlots &&
  6576. !prevSlots.$hasNormal
  6577. ) {
  6578. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  6579. // only need to normalize once
  6580. return prevSlots
  6581. } else {
  6582. res = {};
  6583. for (var key$1 in slots) {
  6584. if (slots[key$1] && key$1[0] !== '$') {
  6585. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  6586. }
  6587. }
  6588. }
  6589. // expose normal slots on scopedSlots
  6590. for (var key$2 in normalSlots) {
  6591. if (!(key$2 in res)) {
  6592. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  6593. }
  6594. }
  6595. // avoriaz seems to mock a non-extensible $scopedSlots object
  6596. // and when that is passed down this would cause an error
  6597. if (slots && Object.isExtensible(slots)) {
  6598. (slots)._normalized = res;
  6599. }
  6600. def(res, '$stable', isStable);
  6601. def(res, '$key', key);
  6602. def(res, '$hasNormal', hasNormalSlots);
  6603. return res
  6604. }
  6605. function normalizeScopedSlot(normalSlots, key, fn) {
  6606. var normalized = function () {
  6607. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  6608. res = res && typeof res === 'object' && !Array.isArray(res)
  6609. ? [res] // single vnode
  6610. : normalizeChildren(res);
  6611. return res && (
  6612. res.length === 0 ||
  6613. (res.length === 1 && res[0].isComment) // #9658
  6614. ) ? undefined
  6615. : res
  6616. };
  6617. // this is a slot using the new v-slot syntax without scope. although it is
  6618. // compiled as a scoped slot, render fn users would expect it to be present
  6619. // on this.$slots because the usage is semantically a normal slot.
  6620. if (fn.proxy) {
  6621. Object.defineProperty(normalSlots, key, {
  6622. get: normalized,
  6623. enumerable: true,
  6624. configurable: true
  6625. });
  6626. }
  6627. return normalized
  6628. }
  6629. function proxyNormalSlot(slots, key) {
  6630. return function () { return slots[key]; }
  6631. }
  6632. /* */
  6633. /**
  6634. * Runtime helper for rendering v-for lists.
  6635. */
  6636. function renderList (
  6637. val,
  6638. render
  6639. ) {
  6640. var ret, i, l, keys, key;
  6641. if (Array.isArray(val) || typeof val === 'string') {
  6642. ret = new Array(val.length);
  6643. for (i = 0, l = val.length; i < l; i++) {
  6644. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  6645. }
  6646. } else if (typeof val === 'number') {
  6647. ret = new Array(val);
  6648. for (i = 0; i < val; i++) {
  6649. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  6650. }
  6651. } else if (isObject(val)) {
  6652. if (hasSymbol && val[Symbol.iterator]) {
  6653. ret = [];
  6654. var iterator = val[Symbol.iterator]();
  6655. var result = iterator.next();
  6656. while (!result.done) {
  6657. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  6658. result = iterator.next();
  6659. }
  6660. } else {
  6661. keys = Object.keys(val);
  6662. ret = new Array(keys.length);
  6663. for (i = 0, l = keys.length; i < l; i++) {
  6664. key = keys[i];
  6665. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  6666. }
  6667. }
  6668. }
  6669. if (!isDef(ret)) {
  6670. ret = [];
  6671. }
  6672. (ret)._isVList = true;
  6673. return ret
  6674. }
  6675. /* */
  6676. /**
  6677. * Runtime helper for rendering <slot>
  6678. */
  6679. function renderSlot (
  6680. name,
  6681. fallback,
  6682. props,
  6683. bindObject
  6684. ) {
  6685. var scopedSlotFn = this.$scopedSlots[name];
  6686. var nodes;
  6687. if (scopedSlotFn) { // scoped slot
  6688. props = props || {};
  6689. if (bindObject) {
  6690. if ( true && !isObject(bindObject)) {
  6691. warn(
  6692. 'slot v-bind without argument expects an Object',
  6693. this
  6694. );
  6695. }
  6696. props = extend(extend({}, bindObject), props);
  6697. }
  6698. // fixed by xxxxxx app-plus scopedSlot
  6699. nodes = scopedSlotFn(props, this, props._i) || fallback;
  6700. } else {
  6701. nodes = this.$slots[name] || fallback;
  6702. }
  6703. var target = props && props.slot;
  6704. if (target) {
  6705. return this.$createElement('template', { slot: target }, nodes)
  6706. } else {
  6707. return nodes
  6708. }
  6709. }
  6710. /* */
  6711. /**
  6712. * Runtime helper for resolving filters
  6713. */
  6714. function resolveFilter (id) {
  6715. return resolveAsset(this.$options, 'filters', id, true) || identity
  6716. }
  6717. /* */
  6718. function isKeyNotMatch (expect, actual) {
  6719. if (Array.isArray(expect)) {
  6720. return expect.indexOf(actual) === -1
  6721. } else {
  6722. return expect !== actual
  6723. }
  6724. }
  6725. /**
  6726. * Runtime helper for checking keyCodes from config.
  6727. * exposed as Vue.prototype._k
  6728. * passing in eventKeyName as last argument separately for backwards compat
  6729. */
  6730. function checkKeyCodes (
  6731. eventKeyCode,
  6732. key,
  6733. builtInKeyCode,
  6734. eventKeyName,
  6735. builtInKeyName
  6736. ) {
  6737. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  6738. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  6739. return isKeyNotMatch(builtInKeyName, eventKeyName)
  6740. } else if (mappedKeyCode) {
  6741. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  6742. } else if (eventKeyName) {
  6743. return hyphenate(eventKeyName) !== key
  6744. }
  6745. }
  6746. /* */
  6747. /**
  6748. * Runtime helper for merging v-bind="object" into a VNode's data.
  6749. */
  6750. function bindObjectProps (
  6751. data,
  6752. tag,
  6753. value,
  6754. asProp,
  6755. isSync
  6756. ) {
  6757. if (value) {
  6758. if (!isObject(value)) {
  6759. true && warn(
  6760. 'v-bind without argument expects an Object or Array value',
  6761. this
  6762. );
  6763. } else {
  6764. if (Array.isArray(value)) {
  6765. value = toObject(value);
  6766. }
  6767. var hash;
  6768. var loop = function ( key ) {
  6769. if (
  6770. key === 'class' ||
  6771. key === 'style' ||
  6772. isReservedAttribute(key)
  6773. ) {
  6774. hash = data;
  6775. } else {
  6776. var type = data.attrs && data.attrs.type;
  6777. hash = asProp || config.mustUseProp(tag, type, key)
  6778. ? data.domProps || (data.domProps = {})
  6779. : data.attrs || (data.attrs = {});
  6780. }
  6781. var camelizedKey = camelize(key);
  6782. var hyphenatedKey = hyphenate(key);
  6783. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  6784. hash[key] = value[key];
  6785. if (isSync) {
  6786. var on = data.on || (data.on = {});
  6787. on[("update:" + key)] = function ($event) {
  6788. value[key] = $event;
  6789. };
  6790. }
  6791. }
  6792. };
  6793. for (var key in value) loop( key );
  6794. }
  6795. }
  6796. return data
  6797. }
  6798. /* */
  6799. /**
  6800. * Runtime helper for rendering static trees.
  6801. */
  6802. function renderStatic (
  6803. index,
  6804. isInFor
  6805. ) {
  6806. var cached = this._staticTrees || (this._staticTrees = []);
  6807. var tree = cached[index];
  6808. // if has already-rendered static tree and not inside v-for,
  6809. // we can reuse the same tree.
  6810. if (tree && !isInFor) {
  6811. return tree
  6812. }
  6813. // otherwise, render a fresh tree.
  6814. tree = cached[index] = this.$options.staticRenderFns[index].call(
  6815. this._renderProxy,
  6816. null,
  6817. this // for render fns generated for functional component templates
  6818. );
  6819. markStatic(tree, ("__static__" + index), false);
  6820. return tree
  6821. }
  6822. /**
  6823. * Runtime helper for v-once.
  6824. * Effectively it means marking the node as static with a unique key.
  6825. */
  6826. function markOnce (
  6827. tree,
  6828. index,
  6829. key
  6830. ) {
  6831. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  6832. return tree
  6833. }
  6834. function markStatic (
  6835. tree,
  6836. key,
  6837. isOnce
  6838. ) {
  6839. if (Array.isArray(tree)) {
  6840. for (var i = 0; i < tree.length; i++) {
  6841. if (tree[i] && typeof tree[i] !== 'string') {
  6842. markStaticNode(tree[i], (key + "_" + i), isOnce);
  6843. }
  6844. }
  6845. } else {
  6846. markStaticNode(tree, key, isOnce);
  6847. }
  6848. }
  6849. function markStaticNode (node, key, isOnce) {
  6850. node.isStatic = true;
  6851. node.key = key;
  6852. node.isOnce = isOnce;
  6853. }
  6854. /* */
  6855. function bindObjectListeners (data, value) {
  6856. if (value) {
  6857. if (!isPlainObject(value)) {
  6858. true && warn(
  6859. 'v-on without argument expects an Object value',
  6860. this
  6861. );
  6862. } else {
  6863. var on = data.on = data.on ? extend({}, data.on) : {};
  6864. for (var key in value) {
  6865. var existing = on[key];
  6866. var ours = value[key];
  6867. on[key] = existing ? [].concat(existing, ours) : ours;
  6868. }
  6869. }
  6870. }
  6871. return data
  6872. }
  6873. /* */
  6874. function resolveScopedSlots (
  6875. fns, // see flow/vnode
  6876. res,
  6877. // the following are added in 2.6
  6878. hasDynamicKeys,
  6879. contentHashKey
  6880. ) {
  6881. res = res || { $stable: !hasDynamicKeys };
  6882. for (var i = 0; i < fns.length; i++) {
  6883. var slot = fns[i];
  6884. if (Array.isArray(slot)) {
  6885. resolveScopedSlots(slot, res, hasDynamicKeys);
  6886. } else if (slot) {
  6887. // marker for reverse proxying v-slot without scope on this.$slots
  6888. if (slot.proxy) {
  6889. slot.fn.proxy = true;
  6890. }
  6891. res[slot.key] = slot.fn;
  6892. }
  6893. }
  6894. if (contentHashKey) {
  6895. (res).$key = contentHashKey;
  6896. }
  6897. return res
  6898. }
  6899. /* */
  6900. function bindDynamicKeys (baseObj, values) {
  6901. for (var i = 0; i < values.length; i += 2) {
  6902. var key = values[i];
  6903. if (typeof key === 'string' && key) {
  6904. baseObj[values[i]] = values[i + 1];
  6905. } else if ( true && key !== '' && key !== null) {
  6906. // null is a special value for explicitly removing a binding
  6907. warn(
  6908. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  6909. this
  6910. );
  6911. }
  6912. }
  6913. return baseObj
  6914. }
  6915. // helper to dynamically append modifier runtime markers to event names.
  6916. // ensure only append when value is already string, otherwise it will be cast
  6917. // to string and cause the type check to miss.
  6918. function prependModifier (value, symbol) {
  6919. return typeof value === 'string' ? symbol + value : value
  6920. }
  6921. /* */
  6922. function installRenderHelpers (target) {
  6923. target._o = markOnce;
  6924. target._n = toNumber;
  6925. target._s = toString;
  6926. target._l = renderList;
  6927. target._t = renderSlot;
  6928. target._q = looseEqual;
  6929. target._i = looseIndexOf;
  6930. target._m = renderStatic;
  6931. target._f = resolveFilter;
  6932. target._k = checkKeyCodes;
  6933. target._b = bindObjectProps;
  6934. target._v = createTextVNode;
  6935. target._e = createEmptyVNode;
  6936. target._u = resolveScopedSlots;
  6937. target._g = bindObjectListeners;
  6938. target._d = bindDynamicKeys;
  6939. target._p = prependModifier;
  6940. }
  6941. /* */
  6942. function FunctionalRenderContext (
  6943. data,
  6944. props,
  6945. children,
  6946. parent,
  6947. Ctor
  6948. ) {
  6949. var this$1 = this;
  6950. var options = Ctor.options;
  6951. // ensure the createElement function in functional components
  6952. // gets a unique context - this is necessary for correct named slot check
  6953. var contextVm;
  6954. if (hasOwn(parent, '_uid')) {
  6955. contextVm = Object.create(parent);
  6956. // $flow-disable-line
  6957. contextVm._original = parent;
  6958. } else {
  6959. // the context vm passed in is a functional context as well.
  6960. // in this case we want to make sure we are able to get a hold to the
  6961. // real context instance.
  6962. contextVm = parent;
  6963. // $flow-disable-line
  6964. parent = parent._original;
  6965. }
  6966. var isCompiled = isTrue(options._compiled);
  6967. var needNormalization = !isCompiled;
  6968. this.data = data;
  6969. this.props = props;
  6970. this.children = children;
  6971. this.parent = parent;
  6972. this.listeners = data.on || emptyObject;
  6973. this.injections = resolveInject(options.inject, parent);
  6974. this.slots = function () {
  6975. if (!this$1.$slots) {
  6976. normalizeScopedSlots(
  6977. data.scopedSlots,
  6978. this$1.$slots = resolveSlots(children, parent)
  6979. );
  6980. }
  6981. return this$1.$slots
  6982. };
  6983. Object.defineProperty(this, 'scopedSlots', ({
  6984. enumerable: true,
  6985. get: function get () {
  6986. return normalizeScopedSlots(data.scopedSlots, this.slots())
  6987. }
  6988. }));
  6989. // support for compiled functional template
  6990. if (isCompiled) {
  6991. // exposing $options for renderStatic()
  6992. this.$options = options;
  6993. // pre-resolve slots for renderSlot()
  6994. this.$slots = this.slots();
  6995. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  6996. }
  6997. if (options._scopeId) {
  6998. this._c = function (a, b, c, d) {
  6999. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  7000. if (vnode && !Array.isArray(vnode)) {
  7001. vnode.fnScopeId = options._scopeId;
  7002. vnode.fnContext = parent;
  7003. }
  7004. return vnode
  7005. };
  7006. } else {
  7007. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  7008. }
  7009. }
  7010. installRenderHelpers(FunctionalRenderContext.prototype);
  7011. function createFunctionalComponent (
  7012. Ctor,
  7013. propsData,
  7014. data,
  7015. contextVm,
  7016. children
  7017. ) {
  7018. var options = Ctor.options;
  7019. var props = {};
  7020. var propOptions = options.props;
  7021. if (isDef(propOptions)) {
  7022. for (var key in propOptions) {
  7023. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  7024. }
  7025. } else {
  7026. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  7027. if (isDef(data.props)) { mergeProps(props, data.props); }
  7028. }
  7029. var renderContext = new FunctionalRenderContext(
  7030. data,
  7031. props,
  7032. children,
  7033. contextVm,
  7034. Ctor
  7035. );
  7036. var vnode = options.render.call(null, renderContext._c, renderContext);
  7037. if (vnode instanceof VNode) {
  7038. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  7039. } else if (Array.isArray(vnode)) {
  7040. var vnodes = normalizeChildren(vnode) || [];
  7041. var res = new Array(vnodes.length);
  7042. for (var i = 0; i < vnodes.length; i++) {
  7043. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  7044. }
  7045. return res
  7046. }
  7047. }
  7048. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  7049. // #7817 clone node before setting fnContext, otherwise if the node is reused
  7050. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  7051. // that should not be matched to match.
  7052. var clone = cloneVNode(vnode);
  7053. clone.fnContext = contextVm;
  7054. clone.fnOptions = options;
  7055. if (true) {
  7056. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  7057. }
  7058. if (data.slot) {
  7059. (clone.data || (clone.data = {})).slot = data.slot;
  7060. }
  7061. return clone
  7062. }
  7063. function mergeProps (to, from) {
  7064. for (var key in from) {
  7065. to[camelize(key)] = from[key];
  7066. }
  7067. }
  7068. /* */
  7069. /* */
  7070. /* */
  7071. /* */
  7072. // inline hooks to be invoked on component VNodes during patch
  7073. var componentVNodeHooks = {
  7074. init: function init (vnode, hydrating) {
  7075. if (
  7076. vnode.componentInstance &&
  7077. !vnode.componentInstance._isDestroyed &&
  7078. vnode.data.keepAlive
  7079. ) {
  7080. // kept-alive components, treat as a patch
  7081. var mountedNode = vnode; // work around flow
  7082. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  7083. } else {
  7084. var child = vnode.componentInstance = createComponentInstanceForVnode(
  7085. vnode,
  7086. activeInstance
  7087. );
  7088. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  7089. }
  7090. },
  7091. prepatch: function prepatch (oldVnode, vnode) {
  7092. var options = vnode.componentOptions;
  7093. var child = vnode.componentInstance = oldVnode.componentInstance;
  7094. updateChildComponent(
  7095. child,
  7096. options.propsData, // updated props
  7097. options.listeners, // updated listeners
  7098. vnode, // new parent vnode
  7099. options.children // new children
  7100. );
  7101. },
  7102. insert: function insert (vnode) {
  7103. var context = vnode.context;
  7104. var componentInstance = vnode.componentInstance;
  7105. if (!componentInstance._isMounted) {
  7106. callHook(componentInstance, 'onServiceCreated');
  7107. callHook(componentInstance, 'onServiceAttached');
  7108. componentInstance._isMounted = true;
  7109. callHook(componentInstance, 'mounted');
  7110. }
  7111. if (vnode.data.keepAlive) {
  7112. if (context._isMounted) {
  7113. // vue-router#1212
  7114. // During updates, a kept-alive component's child components may
  7115. // change, so directly walking the tree here may call activated hooks
  7116. // on incorrect children. Instead we push them into a queue which will
  7117. // be processed after the whole patch process ended.
  7118. queueActivatedComponent(componentInstance);
  7119. } else {
  7120. activateChildComponent(componentInstance, true /* direct */);
  7121. }
  7122. }
  7123. },
  7124. destroy: function destroy (vnode) {
  7125. var componentInstance = vnode.componentInstance;
  7126. if (!componentInstance._isDestroyed) {
  7127. if (!vnode.data.keepAlive) {
  7128. componentInstance.$destroy();
  7129. } else {
  7130. deactivateChildComponent(componentInstance, true /* direct */);
  7131. }
  7132. }
  7133. }
  7134. };
  7135. var hooksToMerge = Object.keys(componentVNodeHooks);
  7136. function createComponent (
  7137. Ctor,
  7138. data,
  7139. context,
  7140. children,
  7141. tag
  7142. ) {
  7143. if (isUndef(Ctor)) {
  7144. return
  7145. }
  7146. var baseCtor = context.$options._base;
  7147. // plain options object: turn it into a constructor
  7148. if (isObject(Ctor)) {
  7149. Ctor = baseCtor.extend(Ctor);
  7150. }
  7151. // if at this stage it's not a constructor or an async component factory,
  7152. // reject.
  7153. if (typeof Ctor !== 'function') {
  7154. if (true) {
  7155. warn(("Invalid Component definition: " + (String(Ctor))), context);
  7156. }
  7157. return
  7158. }
  7159. // async component
  7160. var asyncFactory;
  7161. if (isUndef(Ctor.cid)) {
  7162. asyncFactory = Ctor;
  7163. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  7164. if (Ctor === undefined) {
  7165. // return a placeholder node for async component, which is rendered
  7166. // as a comment node but preserves all the raw information for the node.
  7167. // the information will be used for async server-rendering and hydration.
  7168. return createAsyncPlaceholder(
  7169. asyncFactory,
  7170. data,
  7171. context,
  7172. children,
  7173. tag
  7174. )
  7175. }
  7176. }
  7177. data = data || {};
  7178. // resolve constructor options in case global mixins are applied after
  7179. // component constructor creation
  7180. resolveConstructorOptions(Ctor);
  7181. // transform component v-model data into props & events
  7182. if (isDef(data.model)) {
  7183. transformModel(Ctor.options, data);
  7184. }
  7185. // extract props
  7186. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  7187. // functional component
  7188. if (isTrue(Ctor.options.functional)) {
  7189. return createFunctionalComponent(Ctor, propsData, data, context, children)
  7190. }
  7191. // extract listeners, since these needs to be treated as
  7192. // child component listeners instead of DOM listeners
  7193. var listeners = data.on;
  7194. // replace with listeners with .native modifier
  7195. // so it gets processed during parent component patch.
  7196. data.on = data.nativeOn;
  7197. if (isTrue(Ctor.options.abstract)) {
  7198. // abstract components do not keep anything
  7199. // other than props & listeners & slot
  7200. // work around flow
  7201. var slot = data.slot;
  7202. data = {};
  7203. if (slot) {
  7204. data.slot = slot;
  7205. }
  7206. }
  7207. // install component management hooks onto the placeholder node
  7208. installComponentHooks(data);
  7209. // return a placeholder vnode
  7210. var name = Ctor.options.name || tag;
  7211. var vnode = new VNode(
  7212. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  7213. data, undefined, undefined, undefined, context,
  7214. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  7215. asyncFactory
  7216. );
  7217. return vnode
  7218. }
  7219. function createComponentInstanceForVnode (
  7220. vnode, // we know it's MountedComponentVNode but flow doesn't
  7221. parent // activeInstance in lifecycle state
  7222. ) {
  7223. var options = {
  7224. _isComponent: true,
  7225. _parentVnode: vnode,
  7226. parent: parent
  7227. };
  7228. // check inline-template render functions
  7229. var inlineTemplate = vnode.data.inlineTemplate;
  7230. if (isDef(inlineTemplate)) {
  7231. options.render = inlineTemplate.render;
  7232. options.staticRenderFns = inlineTemplate.staticRenderFns;
  7233. }
  7234. return new vnode.componentOptions.Ctor(options)
  7235. }
  7236. function installComponentHooks (data) {
  7237. var hooks = data.hook || (data.hook = {});
  7238. for (var i = 0; i < hooksToMerge.length; i++) {
  7239. var key = hooksToMerge[i];
  7240. var existing = hooks[key];
  7241. var toMerge = componentVNodeHooks[key];
  7242. if (existing !== toMerge && !(existing && existing._merged)) {
  7243. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  7244. }
  7245. }
  7246. }
  7247. function mergeHook$1 (f1, f2) {
  7248. var merged = function (a, b) {
  7249. // flow complains about extra args which is why we use any
  7250. f1(a, b);
  7251. f2(a, b);
  7252. };
  7253. merged._merged = true;
  7254. return merged
  7255. }
  7256. // transform component v-model info (value and callback) into
  7257. // prop and event handler respectively.
  7258. function transformModel (options, data) {
  7259. var prop = (options.model && options.model.prop) || 'value';
  7260. var event = (options.model && options.model.event) || 'input'
  7261. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  7262. var on = data.on || (data.on = {});
  7263. var existing = on[event];
  7264. var callback = data.model.callback;
  7265. if (isDef(existing)) {
  7266. if (
  7267. Array.isArray(existing)
  7268. ? existing.indexOf(callback) === -1
  7269. : existing !== callback
  7270. ) {
  7271. on[event] = [callback].concat(existing);
  7272. }
  7273. } else {
  7274. on[event] = callback;
  7275. }
  7276. }
  7277. /* */
  7278. var SIMPLE_NORMALIZE = 1;
  7279. var ALWAYS_NORMALIZE = 2;
  7280. // wrapper function for providing a more flexible interface
  7281. // without getting yelled at by flow
  7282. function createElement (
  7283. context,
  7284. tag,
  7285. data,
  7286. children,
  7287. normalizationType,
  7288. alwaysNormalize
  7289. ) {
  7290. if (Array.isArray(data) || isPrimitive(data)) {
  7291. normalizationType = children;
  7292. children = data;
  7293. data = undefined;
  7294. }
  7295. if (isTrue(alwaysNormalize)) {
  7296. normalizationType = ALWAYS_NORMALIZE;
  7297. }
  7298. return _createElement(context, tag, data, children, normalizationType)
  7299. }
  7300. function _createElement (
  7301. context,
  7302. tag,
  7303. data,
  7304. children,
  7305. normalizationType
  7306. ) {
  7307. if (isDef(data) && isDef((data).__ob__)) {
  7308. true && warn(
  7309. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  7310. 'Always create fresh vnode data objects in each render!',
  7311. context
  7312. );
  7313. return createEmptyVNode()
  7314. }
  7315. // object syntax in v-bind
  7316. if (isDef(data) && isDef(data.is)) {
  7317. tag = data.is;
  7318. }
  7319. if (!tag) {
  7320. // in case of component :is set to falsy value
  7321. return createEmptyVNode()
  7322. }
  7323. // warn against non-primitive key
  7324. if ( true &&
  7325. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  7326. ) {
  7327. {
  7328. warn(
  7329. 'Avoid using non-primitive value as key, ' +
  7330. 'use string/number value instead.',
  7331. context
  7332. );
  7333. }
  7334. }
  7335. // support single function children as default scoped slot
  7336. if (Array.isArray(children) &&
  7337. typeof children[0] === 'function'
  7338. ) {
  7339. data = data || {};
  7340. data.scopedSlots = { default: children[0] };
  7341. children.length = 0;
  7342. }
  7343. if (normalizationType === ALWAYS_NORMALIZE) {
  7344. children = normalizeChildren(children);
  7345. } else if (normalizationType === SIMPLE_NORMALIZE) {
  7346. children = simpleNormalizeChildren(children);
  7347. }
  7348. var vnode, ns;
  7349. if (typeof tag === 'string') {
  7350. var Ctor;
  7351. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  7352. if (config.isReservedTag(tag)) {
  7353. // platform built-in elements
  7354. if ( true && isDef(data) && isDef(data.nativeOn)) {
  7355. warn(
  7356. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  7357. context
  7358. );
  7359. }
  7360. vnode = new VNode(
  7361. config.parsePlatformTagName(tag), data, children,
  7362. undefined, undefined, context
  7363. );
  7364. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  7365. // component
  7366. vnode = createComponent(Ctor, data, context, children, tag);
  7367. } else {
  7368. // unknown or unlisted namespaced elements
  7369. // check at runtime because it may get assigned a namespace when its
  7370. // parent normalizes children
  7371. vnode = new VNode(
  7372. tag, data, children,
  7373. undefined, undefined, context
  7374. );
  7375. }
  7376. } else {
  7377. // direct component options / constructor
  7378. vnode = createComponent(tag, data, context, children);
  7379. }
  7380. if (Array.isArray(vnode)) {
  7381. return vnode
  7382. } else if (isDef(vnode)) {
  7383. if (isDef(ns)) { applyNS(vnode, ns); }
  7384. if (isDef(data)) { registerDeepBindings(data); }
  7385. return vnode
  7386. } else {
  7387. return createEmptyVNode()
  7388. }
  7389. }
  7390. function applyNS (vnode, ns, force) {
  7391. vnode.ns = ns;
  7392. if (vnode.tag === 'foreignObject') {
  7393. // use default namespace inside foreignObject
  7394. ns = undefined;
  7395. force = true;
  7396. }
  7397. if (isDef(vnode.children)) {
  7398. for (var i = 0, l = vnode.children.length; i < l; i++) {
  7399. var child = vnode.children[i];
  7400. if (isDef(child.tag) && (
  7401. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  7402. applyNS(child, ns, force);
  7403. }
  7404. }
  7405. }
  7406. }
  7407. // ref #5318
  7408. // necessary to ensure parent re-render when deep bindings like :style and
  7409. // :class are used on slot nodes
  7410. function registerDeepBindings (data) {
  7411. if (isObject(data.style)) {
  7412. traverse(data.style);
  7413. }
  7414. if (isObject(data.class)) {
  7415. traverse(data.class);
  7416. }
  7417. }
  7418. /* */
  7419. function initRender (vm) {
  7420. vm._vnode = null; // the root of the child tree
  7421. vm._staticTrees = null; // v-once cached trees
  7422. var options = vm.$options;
  7423. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  7424. var renderContext = parentVnode && parentVnode.context;
  7425. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  7426. vm.$scopedSlots = emptyObject;
  7427. // bind the createElement fn to this instance
  7428. // so that we get proper render context inside it.
  7429. // args order: tag, data, children, normalizationType, alwaysNormalize
  7430. // internal version is used by render functions compiled from templates
  7431. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  7432. // normalization is always applied for the public version, used in
  7433. // user-written render functions.
  7434. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  7435. // $attrs & $listeners are exposed for easier HOC creation.
  7436. // they need to be reactive so that HOCs using them are always updated
  7437. var parentData = parentVnode && parentVnode.data;
  7438. /* istanbul ignore else */
  7439. if (true) {
  7440. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  7441. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  7442. }, true);
  7443. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  7444. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  7445. }, true);
  7446. } else {}
  7447. }
  7448. var currentRenderingInstance = null;
  7449. function renderMixin (Vue) {
  7450. // install runtime convenience helpers
  7451. installRenderHelpers(Vue.prototype);
  7452. Vue.prototype.$nextTick = function (fn) {
  7453. return nextTick(fn, this)
  7454. };
  7455. Vue.prototype._render = function () {
  7456. var vm = this;
  7457. var ref = vm.$options;
  7458. var render = ref.render;
  7459. var _parentVnode = ref._parentVnode;
  7460. if (_parentVnode) {
  7461. vm.$scopedSlots = normalizeScopedSlots(
  7462. _parentVnode.data.scopedSlots,
  7463. vm.$slots,
  7464. vm.$scopedSlots
  7465. );
  7466. }
  7467. // set parent vnode. this allows render functions to have access
  7468. // to the data on the placeholder node.
  7469. vm.$vnode = _parentVnode;
  7470. // render self
  7471. var vnode;
  7472. try {
  7473. // There's no need to maintain a stack because all render fns are called
  7474. // separately from one another. Nested component's render fns are called
  7475. // when parent component is patched.
  7476. currentRenderingInstance = vm;
  7477. vnode = render.call(vm._renderProxy, vm.$createElement);
  7478. } catch (e) {
  7479. handleError(e, vm, "render");
  7480. // return error render result,
  7481. // or previous vnode to prevent render error causing blank component
  7482. /* istanbul ignore else */
  7483. if ( true && vm.$options.renderError) {
  7484. try {
  7485. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  7486. } catch (e) {
  7487. handleError(e, vm, "renderError");
  7488. vnode = vm._vnode;
  7489. }
  7490. } else {
  7491. vnode = vm._vnode;
  7492. }
  7493. } finally {
  7494. currentRenderingInstance = null;
  7495. }
  7496. // if the returned array contains only a single node, allow it
  7497. if (Array.isArray(vnode) && vnode.length === 1) {
  7498. vnode = vnode[0];
  7499. }
  7500. // return empty vnode in case the render function errored out
  7501. if (!(vnode instanceof VNode)) {
  7502. if ( true && Array.isArray(vnode)) {
  7503. warn(
  7504. 'Multiple root nodes returned from render function. Render function ' +
  7505. 'should return a single root node.',
  7506. vm
  7507. );
  7508. }
  7509. vnode = createEmptyVNode();
  7510. }
  7511. // set parent
  7512. vnode.parent = _parentVnode;
  7513. return vnode
  7514. };
  7515. }
  7516. /* */
  7517. function ensureCtor (comp, base) {
  7518. if (
  7519. comp.__esModule ||
  7520. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  7521. ) {
  7522. comp = comp.default;
  7523. }
  7524. return isObject(comp)
  7525. ? base.extend(comp)
  7526. : comp
  7527. }
  7528. function createAsyncPlaceholder (
  7529. factory,
  7530. data,
  7531. context,
  7532. children,
  7533. tag
  7534. ) {
  7535. var node = createEmptyVNode();
  7536. node.asyncFactory = factory;
  7537. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  7538. return node
  7539. }
  7540. function resolveAsyncComponent (
  7541. factory,
  7542. baseCtor
  7543. ) {
  7544. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  7545. return factory.errorComp
  7546. }
  7547. if (isDef(factory.resolved)) {
  7548. return factory.resolved
  7549. }
  7550. var owner = currentRenderingInstance;
  7551. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  7552. // already pending
  7553. factory.owners.push(owner);
  7554. }
  7555. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  7556. return factory.loadingComp
  7557. }
  7558. if (owner && !isDef(factory.owners)) {
  7559. var owners = factory.owners = [owner];
  7560. var sync = true;
  7561. var timerLoading = null;
  7562. var timerTimeout = null
  7563. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  7564. var forceRender = function (renderCompleted) {
  7565. for (var i = 0, l = owners.length; i < l; i++) {
  7566. (owners[i]).$forceUpdate();
  7567. }
  7568. if (renderCompleted) {
  7569. owners.length = 0;
  7570. if (timerLoading !== null) {
  7571. clearTimeout(timerLoading);
  7572. timerLoading = null;
  7573. }
  7574. if (timerTimeout !== null) {
  7575. clearTimeout(timerTimeout);
  7576. timerTimeout = null;
  7577. }
  7578. }
  7579. };
  7580. var resolve = once(function (res) {
  7581. // cache resolved
  7582. factory.resolved = ensureCtor(res, baseCtor);
  7583. // invoke callbacks only if this is not a synchronous resolve
  7584. // (async resolves are shimmed as synchronous during SSR)
  7585. if (!sync) {
  7586. forceRender(true);
  7587. } else {
  7588. owners.length = 0;
  7589. }
  7590. });
  7591. var reject = once(function (reason) {
  7592. true && warn(
  7593. "Failed to resolve async component: " + (String(factory)) +
  7594. (reason ? ("\nReason: " + reason) : '')
  7595. );
  7596. if (isDef(factory.errorComp)) {
  7597. factory.error = true;
  7598. forceRender(true);
  7599. }
  7600. });
  7601. var res = factory(resolve, reject);
  7602. if (isObject(res)) {
  7603. if (isPromise(res)) {
  7604. // () => Promise
  7605. if (isUndef(factory.resolved)) {
  7606. res.then(resolve, reject);
  7607. }
  7608. } else if (isPromise(res.component)) {
  7609. res.component.then(resolve, reject);
  7610. if (isDef(res.error)) {
  7611. factory.errorComp = ensureCtor(res.error, baseCtor);
  7612. }
  7613. if (isDef(res.loading)) {
  7614. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  7615. if (res.delay === 0) {
  7616. factory.loading = true;
  7617. } else {
  7618. timerLoading = setTimeout(function () {
  7619. timerLoading = null;
  7620. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  7621. factory.loading = true;
  7622. forceRender(false);
  7623. }
  7624. }, res.delay || 200);
  7625. }
  7626. }
  7627. if (isDef(res.timeout)) {
  7628. timerTimeout = setTimeout(function () {
  7629. timerTimeout = null;
  7630. if (isUndef(factory.resolved)) {
  7631. reject(
  7632. true
  7633. ? ("timeout (" + (res.timeout) + "ms)")
  7634. : undefined
  7635. );
  7636. }
  7637. }, res.timeout);
  7638. }
  7639. }
  7640. }
  7641. sync = false;
  7642. // return in case resolved synchronously
  7643. return factory.loading
  7644. ? factory.loadingComp
  7645. : factory.resolved
  7646. }
  7647. }
  7648. /* */
  7649. function isAsyncPlaceholder (node) {
  7650. return node.isComment && node.asyncFactory
  7651. }
  7652. /* */
  7653. function getFirstComponentChild (children) {
  7654. if (Array.isArray(children)) {
  7655. for (var i = 0; i < children.length; i++) {
  7656. var c = children[i];
  7657. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  7658. return c
  7659. }
  7660. }
  7661. }
  7662. }
  7663. /* */
  7664. /* */
  7665. function initEvents (vm) {
  7666. vm._events = Object.create(null);
  7667. vm._hasHookEvent = false;
  7668. // init parent attached events
  7669. var listeners = vm.$options._parentListeners;
  7670. if (listeners) {
  7671. updateComponentListeners(vm, listeners);
  7672. }
  7673. }
  7674. var target;
  7675. function add (event, fn) {
  7676. target.$on(event, fn);
  7677. }
  7678. function remove$1 (event, fn) {
  7679. target.$off(event, fn);
  7680. }
  7681. function createOnceHandler (event, fn) {
  7682. var _target = target;
  7683. return function onceHandler () {
  7684. var res = fn.apply(null, arguments);
  7685. if (res !== null) {
  7686. _target.$off(event, onceHandler);
  7687. }
  7688. }
  7689. }
  7690. function updateComponentListeners (
  7691. vm,
  7692. listeners,
  7693. oldListeners
  7694. ) {
  7695. target = vm;
  7696. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  7697. target = undefined;
  7698. }
  7699. function eventsMixin (Vue) {
  7700. var hookRE = /^hook:/;
  7701. Vue.prototype.$on = function (event, fn) {
  7702. var vm = this;
  7703. if (Array.isArray(event)) {
  7704. for (var i = 0, l = event.length; i < l; i++) {
  7705. vm.$on(event[i], fn);
  7706. }
  7707. } else {
  7708. (vm._events[event] || (vm._events[event] = [])).push(fn);
  7709. // optimize hook:event cost by using a boolean flag marked at registration
  7710. // instead of a hash lookup
  7711. if (hookRE.test(event)) {
  7712. vm._hasHookEvent = true;
  7713. }
  7714. }
  7715. return vm
  7716. };
  7717. Vue.prototype.$once = function (event, fn) {
  7718. var vm = this;
  7719. function on () {
  7720. vm.$off(event, on);
  7721. fn.apply(vm, arguments);
  7722. }
  7723. on.fn = fn;
  7724. vm.$on(event, on);
  7725. return vm
  7726. };
  7727. Vue.prototype.$off = function (event, fn) {
  7728. var vm = this;
  7729. // all
  7730. if (!arguments.length) {
  7731. vm._events = Object.create(null);
  7732. return vm
  7733. }
  7734. // array of events
  7735. if (Array.isArray(event)) {
  7736. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  7737. vm.$off(event[i$1], fn);
  7738. }
  7739. return vm
  7740. }
  7741. // specific event
  7742. var cbs = vm._events[event];
  7743. if (!cbs) {
  7744. return vm
  7745. }
  7746. if (!fn) {
  7747. vm._events[event] = null;
  7748. return vm
  7749. }
  7750. // specific handler
  7751. var cb;
  7752. var i = cbs.length;
  7753. while (i--) {
  7754. cb = cbs[i];
  7755. if (cb === fn || cb.fn === fn) {
  7756. cbs.splice(i, 1);
  7757. break
  7758. }
  7759. }
  7760. return vm
  7761. };
  7762. Vue.prototype.$emit = function (event) {
  7763. var vm = this;
  7764. if (true) {
  7765. var lowerCaseEvent = event.toLowerCase();
  7766. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  7767. tip(
  7768. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  7769. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  7770. "Note that HTML attributes are case-insensitive and you cannot use " +
  7771. "v-on to listen to camelCase events when using in-DOM templates. " +
  7772. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  7773. );
  7774. }
  7775. }
  7776. var cbs = vm._events[event];
  7777. if (cbs) {
  7778. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  7779. var args = toArray(arguments, 1);
  7780. var info = "event handler for \"" + event + "\"";
  7781. for (var i = 0, l = cbs.length; i < l; i++) {
  7782. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  7783. }
  7784. }
  7785. return vm
  7786. };
  7787. }
  7788. /* */
  7789. var activeInstance = null;
  7790. var isUpdatingChildComponent = false;
  7791. function setActiveInstance(vm) {
  7792. var prevActiveInstance = activeInstance;
  7793. activeInstance = vm;
  7794. return function () {
  7795. activeInstance = prevActiveInstance;
  7796. }
  7797. }
  7798. function initLifecycle (vm) {
  7799. var options = vm.$options;
  7800. // locate first non-abstract parent
  7801. var parent = options.parent;
  7802. if (parent && !options.abstract) {
  7803. while (parent.$options.abstract && parent.$parent) {
  7804. parent = parent.$parent;
  7805. }
  7806. parent.$children.push(vm);
  7807. }
  7808. vm.$parent = parent;
  7809. vm.$root = parent ? parent.$root : vm;
  7810. vm.$children = [];
  7811. vm.$refs = {};
  7812. vm._watcher = null;
  7813. vm._inactive = null;
  7814. vm._directInactive = false;
  7815. vm._isMounted = false;
  7816. vm._isDestroyed = false;
  7817. vm._isBeingDestroyed = false;
  7818. }
  7819. function lifecycleMixin (Vue) {
  7820. Vue.prototype._update = function (vnode, hydrating) {
  7821. var vm = this;
  7822. var prevEl = vm.$el;
  7823. var prevVnode = vm._vnode;
  7824. var restoreActiveInstance = setActiveInstance(vm);
  7825. vm._vnode = vnode;
  7826. // Vue.prototype.__patch__ is injected in entry points
  7827. // based on the rendering backend used.
  7828. if (!prevVnode) {
  7829. // initial render
  7830. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  7831. } else {
  7832. // updates
  7833. vm.$el = vm.__patch__(prevVnode, vnode);
  7834. }
  7835. restoreActiveInstance();
  7836. // update __vue__ reference
  7837. if (prevEl) {
  7838. prevEl.__vue__ = null;
  7839. }
  7840. if (vm.$el) {
  7841. vm.$el.__vue__ = vm;
  7842. }
  7843. // if parent is an HOC, update its $el as well
  7844. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  7845. vm.$parent.$el = vm.$el;
  7846. }
  7847. // updated hook is called by the scheduler to ensure that children are
  7848. // updated in a parent's updated hook.
  7849. };
  7850. Vue.prototype.$forceUpdate = function () {
  7851. var vm = this;
  7852. if (vm._watcher) {
  7853. vm._watcher.update();
  7854. }
  7855. };
  7856. Vue.prototype.$destroy = function () {
  7857. var vm = this;
  7858. if (vm._isBeingDestroyed) {
  7859. return
  7860. }
  7861. callHook(vm, 'beforeDestroy');
  7862. vm._isBeingDestroyed = true;
  7863. // remove self from parent
  7864. var parent = vm.$parent;
  7865. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  7866. remove(parent.$children, vm);
  7867. }
  7868. // teardown watchers
  7869. if (vm._watcher) {
  7870. vm._watcher.teardown();
  7871. }
  7872. var i = vm._watchers.length;
  7873. while (i--) {
  7874. vm._watchers[i].teardown();
  7875. }
  7876. // remove reference from data ob
  7877. // frozen object may not have observer.
  7878. if (vm._data.__ob__) {
  7879. vm._data.__ob__.vmCount--;
  7880. }
  7881. // call the last hook...
  7882. vm._isDestroyed = true;
  7883. // invoke destroy hooks on current rendered tree
  7884. vm.__patch__(vm._vnode, null);
  7885. // fire destroyed hook
  7886. callHook(vm, 'destroyed');
  7887. // turn off all instance listeners.
  7888. vm.$off();
  7889. // remove __vue__ reference
  7890. if (vm.$el) {
  7891. vm.$el.__vue__ = null;
  7892. }
  7893. // release circular reference (#6759)
  7894. if (vm.$vnode) {
  7895. vm.$vnode.parent = null;
  7896. }
  7897. };
  7898. }
  7899. function updateChildComponent (
  7900. vm,
  7901. propsData,
  7902. listeners,
  7903. parentVnode,
  7904. renderChildren
  7905. ) {
  7906. if (true) {
  7907. isUpdatingChildComponent = true;
  7908. }
  7909. // determine whether component has slot children
  7910. // we need to do this before overwriting $options._renderChildren.
  7911. // check if there are dynamic scopedSlots (hand-written or compiled but with
  7912. // dynamic slot names). Static scoped slots compiled from template has the
  7913. // "$stable" marker.
  7914. var newScopedSlots = parentVnode.data.scopedSlots;
  7915. var oldScopedSlots = vm.$scopedSlots;
  7916. var hasDynamicScopedSlot = !!(
  7917. (newScopedSlots && !newScopedSlots.$stable) ||
  7918. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  7919. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  7920. );
  7921. // Any static slot children from the parent may have changed during parent's
  7922. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  7923. // update is necessary to ensure correctness.
  7924. var needsForceUpdate = !!(
  7925. renderChildren || // has new static slots
  7926. vm.$options._renderChildren || // has old static slots
  7927. hasDynamicScopedSlot
  7928. );
  7929. vm.$options._parentVnode = parentVnode;
  7930. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  7931. if (vm._vnode) { // update child tree's parent
  7932. vm._vnode.parent = parentVnode;
  7933. }
  7934. vm.$options._renderChildren = renderChildren;
  7935. // update $attrs and $listeners hash
  7936. // these are also reactive so they may trigger child update if the child
  7937. // used them during render
  7938. vm.$attrs = parentVnode.data.attrs || emptyObject;
  7939. vm.$listeners = listeners || emptyObject;
  7940. // update props
  7941. if (propsData && vm.$options.props) {
  7942. toggleObserving(false);
  7943. var props = vm._props;
  7944. var propKeys = vm.$options._propKeys || [];
  7945. for (var i = 0; i < propKeys.length; i++) {
  7946. var key = propKeys[i];
  7947. var propOptions = vm.$options.props; // wtf flow?
  7948. props[key] = validateProp(key, propOptions, propsData, vm);
  7949. }
  7950. toggleObserving(true);
  7951. // keep a copy of raw propsData
  7952. vm.$options.propsData = propsData;
  7953. }
  7954. // fixed by xxxxxx update properties(mp runtime)
  7955. vm._$updateProperties && vm._$updateProperties(vm);
  7956. // update listeners
  7957. listeners = listeners || emptyObject;
  7958. var oldListeners = vm.$options._parentListeners;
  7959. vm.$options._parentListeners = listeners;
  7960. updateComponentListeners(vm, listeners, oldListeners);
  7961. // resolve slots + force update if has children
  7962. if (needsForceUpdate) {
  7963. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  7964. vm.$forceUpdate();
  7965. }
  7966. if (true) {
  7967. isUpdatingChildComponent = false;
  7968. }
  7969. }
  7970. function isInInactiveTree (vm) {
  7971. while (vm && (vm = vm.$parent)) {
  7972. if (vm._inactive) { return true }
  7973. }
  7974. return false
  7975. }
  7976. function activateChildComponent (vm, direct) {
  7977. if (direct) {
  7978. vm._directInactive = false;
  7979. if (isInInactiveTree(vm)) {
  7980. return
  7981. }
  7982. } else if (vm._directInactive) {
  7983. return
  7984. }
  7985. if (vm._inactive || vm._inactive === null) {
  7986. vm._inactive = false;
  7987. for (var i = 0; i < vm.$children.length; i++) {
  7988. activateChildComponent(vm.$children[i]);
  7989. }
  7990. callHook(vm, 'activated');
  7991. }
  7992. }
  7993. function deactivateChildComponent (vm, direct) {
  7994. if (direct) {
  7995. vm._directInactive = true;
  7996. if (isInInactiveTree(vm)) {
  7997. return
  7998. }
  7999. }
  8000. if (!vm._inactive) {
  8001. vm._inactive = true;
  8002. for (var i = 0; i < vm.$children.length; i++) {
  8003. deactivateChildComponent(vm.$children[i]);
  8004. }
  8005. callHook(vm, 'deactivated');
  8006. }
  8007. }
  8008. function callHook (vm, hook) {
  8009. // #7573 disable dep collection when invoking lifecycle hooks
  8010. pushTarget();
  8011. var handlers = vm.$options[hook];
  8012. var info = hook + " hook";
  8013. if (handlers) {
  8014. for (var i = 0, j = handlers.length; i < j; i++) {
  8015. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  8016. }
  8017. }
  8018. if (vm._hasHookEvent) {
  8019. vm.$emit('hook:' + hook);
  8020. }
  8021. popTarget();
  8022. }
  8023. /* */
  8024. var MAX_UPDATE_COUNT = 100;
  8025. var queue = [];
  8026. var activatedChildren = [];
  8027. var has = {};
  8028. var circular = {};
  8029. var waiting = false;
  8030. var flushing = false;
  8031. var index = 0;
  8032. /**
  8033. * Reset the scheduler's state.
  8034. */
  8035. function resetSchedulerState () {
  8036. index = queue.length = activatedChildren.length = 0;
  8037. has = {};
  8038. if (true) {
  8039. circular = {};
  8040. }
  8041. waiting = flushing = false;
  8042. }
  8043. // Async edge case #6566 requires saving the timestamp when event listeners are
  8044. // attached. However, calling performance.now() has a perf overhead especially
  8045. // if the page has thousands of event listeners. Instead, we take a timestamp
  8046. // every time the scheduler flushes and use that for all event listeners
  8047. // attached during that flush.
  8048. var currentFlushTimestamp = 0;
  8049. // Async edge case fix requires storing an event listener's attach timestamp.
  8050. var getNow = Date.now;
  8051. // Determine what event timestamp the browser is using. Annoyingly, the
  8052. // timestamp can either be hi-res (relative to page load) or low-res
  8053. // (relative to UNIX epoch), so in order to compare time we have to use the
  8054. // same timestamp type when saving the flush timestamp.
  8055. // All IE versions use low-res event timestamps, and have problematic clock
  8056. // implementations (#9632)
  8057. if (inBrowser && !isIE) {
  8058. var performance = window.performance;
  8059. if (
  8060. performance &&
  8061. typeof performance.now === 'function' &&
  8062. getNow() > document.createEvent('Event').timeStamp
  8063. ) {
  8064. // if the event timestamp, although evaluated AFTER the Date.now(), is
  8065. // smaller than it, it means the event is using a hi-res timestamp,
  8066. // and we need to use the hi-res version for event listener timestamps as
  8067. // well.
  8068. getNow = function () { return performance.now(); };
  8069. }
  8070. }
  8071. /**
  8072. * Flush both queues and run the watchers.
  8073. */
  8074. function flushSchedulerQueue () {
  8075. currentFlushTimestamp = getNow();
  8076. flushing = true;
  8077. var watcher, id;
  8078. // Sort queue before flush.
  8079. // This ensures that:
  8080. // 1. Components are updated from parent to child. (because parent is always
  8081. // created before the child)
  8082. // 2. A component's user watchers are run before its render watcher (because
  8083. // user watchers are created before the render watcher)
  8084. // 3. If a component is destroyed during a parent component's watcher run,
  8085. // its watchers can be skipped.
  8086. queue.sort(function (a, b) { return a.id - b.id; });
  8087. // do not cache length because more watchers might be pushed
  8088. // as we run existing watchers
  8089. for (index = 0; index < queue.length; index++) {
  8090. watcher = queue[index];
  8091. if (watcher.before) {
  8092. watcher.before();
  8093. }
  8094. id = watcher.id;
  8095. has[id] = null;
  8096. watcher.run();
  8097. // in dev build, check and stop circular updates.
  8098. if ( true && has[id] != null) {
  8099. circular[id] = (circular[id] || 0) + 1;
  8100. if (circular[id] > MAX_UPDATE_COUNT) {
  8101. warn(
  8102. 'You may have an infinite update loop ' + (
  8103. watcher.user
  8104. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  8105. : "in a component render function."
  8106. ),
  8107. watcher.vm
  8108. );
  8109. break
  8110. }
  8111. }
  8112. }
  8113. // keep copies of post queues before resetting state
  8114. var activatedQueue = activatedChildren.slice();
  8115. var updatedQueue = queue.slice();
  8116. resetSchedulerState();
  8117. // call component updated and activated hooks
  8118. callActivatedHooks(activatedQueue);
  8119. callUpdatedHooks(updatedQueue);
  8120. // devtool hook
  8121. /* istanbul ignore if */
  8122. if (devtools && config.devtools) {
  8123. devtools.emit('flush');
  8124. }
  8125. }
  8126. function callUpdatedHooks (queue) {
  8127. var i = queue.length;
  8128. while (i--) {
  8129. var watcher = queue[i];
  8130. var vm = watcher.vm;
  8131. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  8132. callHook(vm, 'updated');
  8133. }
  8134. }
  8135. }
  8136. /**
  8137. * Queue a kept-alive component that was activated during patch.
  8138. * The queue will be processed after the entire tree has been patched.
  8139. */
  8140. function queueActivatedComponent (vm) {
  8141. // setting _inactive to false here so that a render function can
  8142. // rely on checking whether it's in an inactive tree (e.g. router-view)
  8143. vm._inactive = false;
  8144. activatedChildren.push(vm);
  8145. }
  8146. function callActivatedHooks (queue) {
  8147. for (var i = 0; i < queue.length; i++) {
  8148. queue[i]._inactive = true;
  8149. activateChildComponent(queue[i], true /* true */);
  8150. }
  8151. }
  8152. /**
  8153. * Push a watcher into the watcher queue.
  8154. * Jobs with duplicate IDs will be skipped unless it's
  8155. * pushed when the queue is being flushed.
  8156. */
  8157. function queueWatcher (watcher) {
  8158. var id = watcher.id;
  8159. if (has[id] == null) {
  8160. has[id] = true;
  8161. if (!flushing) {
  8162. queue.push(watcher);
  8163. } else {
  8164. // if already flushing, splice the watcher based on its id
  8165. // if already past its id, it will be run next immediately.
  8166. var i = queue.length - 1;
  8167. while (i > index && queue[i].id > watcher.id) {
  8168. i--;
  8169. }
  8170. queue.splice(i + 1, 0, watcher);
  8171. }
  8172. // queue the flush
  8173. if (!waiting) {
  8174. waiting = true;
  8175. if ( true && !config.async) {
  8176. flushSchedulerQueue();
  8177. return
  8178. }
  8179. nextTick(flushSchedulerQueue);
  8180. }
  8181. }
  8182. }
  8183. /* */
  8184. var uid$2 = 0;
  8185. /**
  8186. * A watcher parses an expression, collects dependencies,
  8187. * and fires callback when the expression value changes.
  8188. * This is used for both the $watch() api and directives.
  8189. */
  8190. var Watcher = function Watcher (
  8191. vm,
  8192. expOrFn,
  8193. cb,
  8194. options,
  8195. isRenderWatcher
  8196. ) {
  8197. this.vm = vm;
  8198. if (isRenderWatcher) {
  8199. vm._watcher = this;
  8200. }
  8201. vm._watchers.push(this);
  8202. // options
  8203. if (options) {
  8204. this.deep = !!options.deep;
  8205. this.user = !!options.user;
  8206. this.lazy = !!options.lazy;
  8207. this.sync = !!options.sync;
  8208. this.before = options.before;
  8209. } else {
  8210. this.deep = this.user = this.lazy = this.sync = false;
  8211. }
  8212. this.cb = cb;
  8213. this.id = ++uid$2; // uid for batching
  8214. this.active = true;
  8215. this.dirty = this.lazy; // for lazy watchers
  8216. this.deps = [];
  8217. this.newDeps = [];
  8218. this.depIds = new _Set();
  8219. this.newDepIds = new _Set();
  8220. this.expression = true
  8221. ? expOrFn.toString()
  8222. : undefined;
  8223. // parse expression for getter
  8224. if (typeof expOrFn === 'function') {
  8225. this.getter = expOrFn;
  8226. } else {
  8227. this.getter = parsePath(expOrFn);
  8228. if (!this.getter) {
  8229. this.getter = noop;
  8230. true && warn(
  8231. "Failed watching path: \"" + expOrFn + "\" " +
  8232. 'Watcher only accepts simple dot-delimited paths. ' +
  8233. 'For full control, use a function instead.',
  8234. vm
  8235. );
  8236. }
  8237. }
  8238. this.value = this.lazy
  8239. ? undefined
  8240. : this.get();
  8241. };
  8242. /**
  8243. * Evaluate the getter, and re-collect dependencies.
  8244. */
  8245. Watcher.prototype.get = function get () {
  8246. pushTarget(this);
  8247. var value;
  8248. var vm = this.vm;
  8249. try {
  8250. value = this.getter.call(vm, vm);
  8251. } catch (e) {
  8252. if (this.user) {
  8253. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  8254. } else {
  8255. throw e
  8256. }
  8257. } finally {
  8258. // "touch" every property so they are all tracked as
  8259. // dependencies for deep watching
  8260. if (this.deep) {
  8261. traverse(value);
  8262. }
  8263. popTarget();
  8264. this.cleanupDeps();
  8265. }
  8266. return value
  8267. };
  8268. /**
  8269. * Add a dependency to this directive.
  8270. */
  8271. Watcher.prototype.addDep = function addDep (dep) {
  8272. var id = dep.id;
  8273. if (!this.newDepIds.has(id)) {
  8274. this.newDepIds.add(id);
  8275. this.newDeps.push(dep);
  8276. if (!this.depIds.has(id)) {
  8277. dep.addSub(this);
  8278. }
  8279. }
  8280. };
  8281. /**
  8282. * Clean up for dependency collection.
  8283. */
  8284. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  8285. var i = this.deps.length;
  8286. while (i--) {
  8287. var dep = this.deps[i];
  8288. if (!this.newDepIds.has(dep.id)) {
  8289. dep.removeSub(this);
  8290. }
  8291. }
  8292. var tmp = this.depIds;
  8293. this.depIds = this.newDepIds;
  8294. this.newDepIds = tmp;
  8295. this.newDepIds.clear();
  8296. tmp = this.deps;
  8297. this.deps = this.newDeps;
  8298. this.newDeps = tmp;
  8299. this.newDeps.length = 0;
  8300. };
  8301. /**
  8302. * Subscriber interface.
  8303. * Will be called when a dependency changes.
  8304. */
  8305. Watcher.prototype.update = function update () {
  8306. /* istanbul ignore else */
  8307. if (this.lazy) {
  8308. this.dirty = true;
  8309. } else if (this.sync) {
  8310. this.run();
  8311. } else {
  8312. queueWatcher(this);
  8313. }
  8314. };
  8315. /**
  8316. * Scheduler job interface.
  8317. * Will be called by the scheduler.
  8318. */
  8319. Watcher.prototype.run = function run () {
  8320. if (this.active) {
  8321. var value = this.get();
  8322. if (
  8323. value !== this.value ||
  8324. // Deep watchers and watchers on Object/Arrays should fire even
  8325. // when the value is the same, because the value may
  8326. // have mutated.
  8327. isObject(value) ||
  8328. this.deep
  8329. ) {
  8330. // set new value
  8331. var oldValue = this.value;
  8332. this.value = value;
  8333. if (this.user) {
  8334. try {
  8335. this.cb.call(this.vm, value, oldValue);
  8336. } catch (e) {
  8337. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  8338. }
  8339. } else {
  8340. this.cb.call(this.vm, value, oldValue);
  8341. }
  8342. }
  8343. }
  8344. };
  8345. /**
  8346. * Evaluate the value of the watcher.
  8347. * This only gets called for lazy watchers.
  8348. */
  8349. Watcher.prototype.evaluate = function evaluate () {
  8350. this.value = this.get();
  8351. this.dirty = false;
  8352. };
  8353. /**
  8354. * Depend on all deps collected by this watcher.
  8355. */
  8356. Watcher.prototype.depend = function depend () {
  8357. var i = this.deps.length;
  8358. while (i--) {
  8359. this.deps[i].depend();
  8360. }
  8361. };
  8362. /**
  8363. * Remove self from all dependencies' subscriber list.
  8364. */
  8365. Watcher.prototype.teardown = function teardown () {
  8366. if (this.active) {
  8367. // remove self from vm's watcher list
  8368. // this is a somewhat expensive operation so we skip it
  8369. // if the vm is being destroyed.
  8370. if (!this.vm._isBeingDestroyed) {
  8371. remove(this.vm._watchers, this);
  8372. }
  8373. var i = this.deps.length;
  8374. while (i--) {
  8375. this.deps[i].removeSub(this);
  8376. }
  8377. this.active = false;
  8378. }
  8379. };
  8380. /* */
  8381. var sharedPropertyDefinition = {
  8382. enumerable: true,
  8383. configurable: true,
  8384. get: noop,
  8385. set: noop
  8386. };
  8387. function proxy (target, sourceKey, key) {
  8388. sharedPropertyDefinition.get = function proxyGetter () {
  8389. return this[sourceKey][key]
  8390. };
  8391. sharedPropertyDefinition.set = function proxySetter (val) {
  8392. this[sourceKey][key] = val;
  8393. };
  8394. Object.defineProperty(target, key, sharedPropertyDefinition);
  8395. }
  8396. function initState (vm) {
  8397. vm._watchers = [];
  8398. var opts = vm.$options;
  8399. if (opts.props) { initProps(vm, opts.props); }
  8400. if (opts.methods) { initMethods(vm, opts.methods); }
  8401. if (opts.data) {
  8402. initData(vm);
  8403. } else {
  8404. observe(vm._data = {}, true /* asRootData */);
  8405. }
  8406. if (opts.computed) { initComputed(vm, opts.computed); }
  8407. if (opts.watch && opts.watch !== nativeWatch) {
  8408. initWatch(vm, opts.watch);
  8409. }
  8410. }
  8411. function initProps (vm, propsOptions) {
  8412. var propsData = vm.$options.propsData || {};
  8413. var props = vm._props = {};
  8414. // cache prop keys so that future props updates can iterate using Array
  8415. // instead of dynamic object key enumeration.
  8416. var keys = vm.$options._propKeys = [];
  8417. var isRoot = !vm.$parent;
  8418. // root instance props should be converted
  8419. if (!isRoot) {
  8420. toggleObserving(false);
  8421. }
  8422. var loop = function ( key ) {
  8423. keys.push(key);
  8424. var value = validateProp(key, propsOptions, propsData, vm);
  8425. /* istanbul ignore else */
  8426. if (true) {
  8427. var hyphenatedKey = hyphenate(key);
  8428. if (isReservedAttribute(hyphenatedKey) ||
  8429. config.isReservedAttr(hyphenatedKey)) {
  8430. warn(
  8431. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  8432. vm
  8433. );
  8434. }
  8435. defineReactive$$1(props, key, value, function () {
  8436. if (!isRoot && !isUpdatingChildComponent) {
  8437. {
  8438. if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou' || vm.mpHost === 'mp-xhs'){//百度、快手、小红书 observer 在 setData callback 之后触发,直接忽略该 warn
  8439. return
  8440. }
  8441. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  8442. if(
  8443. key === 'value' &&
  8444. Array.isArray(vm.$options.behaviors) &&
  8445. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  8446. ){
  8447. return
  8448. }
  8449. if(vm._getFormData){
  8450. return
  8451. }
  8452. var $parent = vm.$parent;
  8453. while($parent){
  8454. if($parent.__next_tick_pending){
  8455. return
  8456. }
  8457. $parent = $parent.$parent;
  8458. }
  8459. }
  8460. warn(
  8461. "Avoid mutating a prop directly since the value will be " +
  8462. "overwritten whenever the parent component re-renders. " +
  8463. "Instead, use a data or computed property based on the prop's " +
  8464. "value. Prop being mutated: \"" + key + "\"",
  8465. vm
  8466. );
  8467. }
  8468. });
  8469. } else {}
  8470. // static props are already proxied on the component's prototype
  8471. // during Vue.extend(). We only need to proxy props defined at
  8472. // instantiation here.
  8473. if (!(key in vm)) {
  8474. proxy(vm, "_props", key);
  8475. }
  8476. };
  8477. for (var key in propsOptions) loop( key );
  8478. toggleObserving(true);
  8479. }
  8480. function initData (vm) {
  8481. var data = vm.$options.data;
  8482. data = vm._data = typeof data === 'function'
  8483. ? getData(data, vm)
  8484. : data || {};
  8485. if (!isPlainObject(data)) {
  8486. data = {};
  8487. true && warn(
  8488. 'data functions should return an object:\n' +
  8489. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  8490. vm
  8491. );
  8492. }
  8493. // proxy data on instance
  8494. var keys = Object.keys(data);
  8495. var props = vm.$options.props;
  8496. var methods = vm.$options.methods;
  8497. var i = keys.length;
  8498. while (i--) {
  8499. var key = keys[i];
  8500. if (true) {
  8501. if (methods && hasOwn(methods, key)) {
  8502. warn(
  8503. ("Method \"" + key + "\" has already been defined as a data property."),
  8504. vm
  8505. );
  8506. }
  8507. }
  8508. if (props && hasOwn(props, key)) {
  8509. true && warn(
  8510. "The data property \"" + key + "\" is already declared as a prop. " +
  8511. "Use prop default value instead.",
  8512. vm
  8513. );
  8514. } else if (!isReserved(key)) {
  8515. proxy(vm, "_data", key);
  8516. }
  8517. }
  8518. // observe data
  8519. observe(data, true /* asRootData */);
  8520. }
  8521. function getData (data, vm) {
  8522. // #7573 disable dep collection when invoking data getters
  8523. pushTarget();
  8524. try {
  8525. return data.call(vm, vm)
  8526. } catch (e) {
  8527. handleError(e, vm, "data()");
  8528. return {}
  8529. } finally {
  8530. popTarget();
  8531. }
  8532. }
  8533. var computedWatcherOptions = { lazy: true };
  8534. function initComputed (vm, computed) {
  8535. // $flow-disable-line
  8536. var watchers = vm._computedWatchers = Object.create(null);
  8537. // computed properties are just getters during SSR
  8538. var isSSR = isServerRendering();
  8539. for (var key in computed) {
  8540. var userDef = computed[key];
  8541. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  8542. if ( true && getter == null) {
  8543. warn(
  8544. ("Getter is missing for computed property \"" + key + "\"."),
  8545. vm
  8546. );
  8547. }
  8548. if (!isSSR) {
  8549. // create internal watcher for the computed property.
  8550. watchers[key] = new Watcher(
  8551. vm,
  8552. getter || noop,
  8553. noop,
  8554. computedWatcherOptions
  8555. );
  8556. }
  8557. // component-defined computed properties are already defined on the
  8558. // component prototype. We only need to define computed properties defined
  8559. // at instantiation here.
  8560. if (!(key in vm)) {
  8561. defineComputed(vm, key, userDef);
  8562. } else if (true) {
  8563. if (key in vm.$data) {
  8564. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  8565. } else if (vm.$options.props && key in vm.$options.props) {
  8566. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  8567. }
  8568. }
  8569. }
  8570. }
  8571. function defineComputed (
  8572. target,
  8573. key,
  8574. userDef
  8575. ) {
  8576. var shouldCache = !isServerRendering();
  8577. if (typeof userDef === 'function') {
  8578. sharedPropertyDefinition.get = shouldCache
  8579. ? createComputedGetter(key)
  8580. : createGetterInvoker(userDef);
  8581. sharedPropertyDefinition.set = noop;
  8582. } else {
  8583. sharedPropertyDefinition.get = userDef.get
  8584. ? shouldCache && userDef.cache !== false
  8585. ? createComputedGetter(key)
  8586. : createGetterInvoker(userDef.get)
  8587. : noop;
  8588. sharedPropertyDefinition.set = userDef.set || noop;
  8589. }
  8590. if ( true &&
  8591. sharedPropertyDefinition.set === noop) {
  8592. sharedPropertyDefinition.set = function () {
  8593. warn(
  8594. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  8595. this
  8596. );
  8597. };
  8598. }
  8599. Object.defineProperty(target, key, sharedPropertyDefinition);
  8600. }
  8601. function createComputedGetter (key) {
  8602. return function computedGetter () {
  8603. var watcher = this._computedWatchers && this._computedWatchers[key];
  8604. if (watcher) {
  8605. if (watcher.dirty) {
  8606. watcher.evaluate();
  8607. }
  8608. if (Dep.SharedObject.target) {// fixed by xxxxxx
  8609. watcher.depend();
  8610. }
  8611. return watcher.value
  8612. }
  8613. }
  8614. }
  8615. function createGetterInvoker(fn) {
  8616. return function computedGetter () {
  8617. return fn.call(this, this)
  8618. }
  8619. }
  8620. function initMethods (vm, methods) {
  8621. var props = vm.$options.props;
  8622. for (var key in methods) {
  8623. if (true) {
  8624. if (typeof methods[key] !== 'function') {
  8625. warn(
  8626. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  8627. "Did you reference the function correctly?",
  8628. vm
  8629. );
  8630. }
  8631. if (props && hasOwn(props, key)) {
  8632. warn(
  8633. ("Method \"" + key + "\" has already been defined as a prop."),
  8634. vm
  8635. );
  8636. }
  8637. if ((key in vm) && isReserved(key)) {
  8638. warn(
  8639. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  8640. "Avoid defining component methods that start with _ or $."
  8641. );
  8642. }
  8643. }
  8644. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  8645. }
  8646. }
  8647. function initWatch (vm, watch) {
  8648. for (var key in watch) {
  8649. var handler = watch[key];
  8650. if (Array.isArray(handler)) {
  8651. for (var i = 0; i < handler.length; i++) {
  8652. createWatcher(vm, key, handler[i]);
  8653. }
  8654. } else {
  8655. createWatcher(vm, key, handler);
  8656. }
  8657. }
  8658. }
  8659. function createWatcher (
  8660. vm,
  8661. expOrFn,
  8662. handler,
  8663. options
  8664. ) {
  8665. if (isPlainObject(handler)) {
  8666. options = handler;
  8667. handler = handler.handler;
  8668. }
  8669. if (typeof handler === 'string') {
  8670. handler = vm[handler];
  8671. }
  8672. return vm.$watch(expOrFn, handler, options)
  8673. }
  8674. function stateMixin (Vue) {
  8675. // flow somehow has problems with directly declared definition object
  8676. // when using Object.defineProperty, so we have to procedurally build up
  8677. // the object here.
  8678. var dataDef = {};
  8679. dataDef.get = function () { return this._data };
  8680. var propsDef = {};
  8681. propsDef.get = function () { return this._props };
  8682. if (true) {
  8683. dataDef.set = function () {
  8684. warn(
  8685. 'Avoid replacing instance root $data. ' +
  8686. 'Use nested data properties instead.',
  8687. this
  8688. );
  8689. };
  8690. propsDef.set = function () {
  8691. warn("$props is readonly.", this);
  8692. };
  8693. }
  8694. Object.defineProperty(Vue.prototype, '$data', dataDef);
  8695. Object.defineProperty(Vue.prototype, '$props', propsDef);
  8696. Vue.prototype.$set = set;
  8697. Vue.prototype.$delete = del;
  8698. Vue.prototype.$watch = function (
  8699. expOrFn,
  8700. cb,
  8701. options
  8702. ) {
  8703. var vm = this;
  8704. if (isPlainObject(cb)) {
  8705. return createWatcher(vm, expOrFn, cb, options)
  8706. }
  8707. options = options || {};
  8708. options.user = true;
  8709. var watcher = new Watcher(vm, expOrFn, cb, options);
  8710. if (options.immediate) {
  8711. try {
  8712. cb.call(vm, watcher.value);
  8713. } catch (error) {
  8714. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  8715. }
  8716. }
  8717. return function unwatchFn () {
  8718. watcher.teardown();
  8719. }
  8720. };
  8721. }
  8722. /* */
  8723. var uid$3 = 0;
  8724. function initMixin (Vue) {
  8725. Vue.prototype._init = function (options) {
  8726. var vm = this;
  8727. // a uid
  8728. vm._uid = uid$3++;
  8729. var startTag, endTag;
  8730. /* istanbul ignore if */
  8731. if ( true && config.performance && mark) {
  8732. startTag = "vue-perf-start:" + (vm._uid);
  8733. endTag = "vue-perf-end:" + (vm._uid);
  8734. mark(startTag);
  8735. }
  8736. // a flag to avoid this being observed
  8737. vm._isVue = true;
  8738. // merge options
  8739. if (options && options._isComponent) {
  8740. // optimize internal component instantiation
  8741. // since dynamic options merging is pretty slow, and none of the
  8742. // internal component options needs special treatment.
  8743. initInternalComponent(vm, options);
  8744. } else {
  8745. vm.$options = mergeOptions(
  8746. resolveConstructorOptions(vm.constructor),
  8747. options || {},
  8748. vm
  8749. );
  8750. }
  8751. /* istanbul ignore else */
  8752. if (true) {
  8753. initProxy(vm);
  8754. } else {}
  8755. // expose real self
  8756. vm._self = vm;
  8757. initLifecycle(vm);
  8758. initEvents(vm);
  8759. initRender(vm);
  8760. callHook(vm, 'beforeCreate');
  8761. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  8762. initState(vm);
  8763. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  8764. !vm._$fallback && callHook(vm, 'created');
  8765. /* istanbul ignore if */
  8766. if ( true && config.performance && mark) {
  8767. vm._name = formatComponentName(vm, false);
  8768. mark(endTag);
  8769. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  8770. }
  8771. if (vm.$options.el) {
  8772. vm.$mount(vm.$options.el);
  8773. }
  8774. };
  8775. }
  8776. function initInternalComponent (vm, options) {
  8777. var opts = vm.$options = Object.create(vm.constructor.options);
  8778. // doing this because it's faster than dynamic enumeration.
  8779. var parentVnode = options._parentVnode;
  8780. opts.parent = options.parent;
  8781. opts._parentVnode = parentVnode;
  8782. var vnodeComponentOptions = parentVnode.componentOptions;
  8783. opts.propsData = vnodeComponentOptions.propsData;
  8784. opts._parentListeners = vnodeComponentOptions.listeners;
  8785. opts._renderChildren = vnodeComponentOptions.children;
  8786. opts._componentTag = vnodeComponentOptions.tag;
  8787. if (options.render) {
  8788. opts.render = options.render;
  8789. opts.staticRenderFns = options.staticRenderFns;
  8790. }
  8791. }
  8792. function resolveConstructorOptions (Ctor) {
  8793. var options = Ctor.options;
  8794. if (Ctor.super) {
  8795. var superOptions = resolveConstructorOptions(Ctor.super);
  8796. var cachedSuperOptions = Ctor.superOptions;
  8797. if (superOptions !== cachedSuperOptions) {
  8798. // super option changed,
  8799. // need to resolve new options.
  8800. Ctor.superOptions = superOptions;
  8801. // check if there are any late-modified/attached options (#4976)
  8802. var modifiedOptions = resolveModifiedOptions(Ctor);
  8803. // update base extend options
  8804. if (modifiedOptions) {
  8805. extend(Ctor.extendOptions, modifiedOptions);
  8806. }
  8807. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  8808. if (options.name) {
  8809. options.components[options.name] = Ctor;
  8810. }
  8811. }
  8812. }
  8813. return options
  8814. }
  8815. function resolveModifiedOptions (Ctor) {
  8816. var modified;
  8817. var latest = Ctor.options;
  8818. var sealed = Ctor.sealedOptions;
  8819. for (var key in latest) {
  8820. if (latest[key] !== sealed[key]) {
  8821. if (!modified) { modified = {}; }
  8822. modified[key] = latest[key];
  8823. }
  8824. }
  8825. return modified
  8826. }
  8827. function Vue (options) {
  8828. if ( true &&
  8829. !(this instanceof Vue)
  8830. ) {
  8831. warn('Vue is a constructor and should be called with the `new` keyword');
  8832. }
  8833. this._init(options);
  8834. }
  8835. initMixin(Vue);
  8836. stateMixin(Vue);
  8837. eventsMixin(Vue);
  8838. lifecycleMixin(Vue);
  8839. renderMixin(Vue);
  8840. /* */
  8841. function initUse (Vue) {
  8842. Vue.use = function (plugin) {
  8843. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  8844. if (installedPlugins.indexOf(plugin) > -1) {
  8845. return this
  8846. }
  8847. // additional parameters
  8848. var args = toArray(arguments, 1);
  8849. args.unshift(this);
  8850. if (typeof plugin.install === 'function') {
  8851. plugin.install.apply(plugin, args);
  8852. } else if (typeof plugin === 'function') {
  8853. plugin.apply(null, args);
  8854. }
  8855. installedPlugins.push(plugin);
  8856. return this
  8857. };
  8858. }
  8859. /* */
  8860. function initMixin$1 (Vue) {
  8861. Vue.mixin = function (mixin) {
  8862. this.options = mergeOptions(this.options, mixin);
  8863. return this
  8864. };
  8865. }
  8866. /* */
  8867. function initExtend (Vue) {
  8868. /**
  8869. * Each instance constructor, including Vue, has a unique
  8870. * cid. This enables us to create wrapped "child
  8871. * constructors" for prototypal inheritance and cache them.
  8872. */
  8873. Vue.cid = 0;
  8874. var cid = 1;
  8875. /**
  8876. * Class inheritance
  8877. */
  8878. Vue.extend = function (extendOptions) {
  8879. extendOptions = extendOptions || {};
  8880. var Super = this;
  8881. var SuperId = Super.cid;
  8882. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  8883. if (cachedCtors[SuperId]) {
  8884. return cachedCtors[SuperId]
  8885. }
  8886. var name = extendOptions.name || Super.options.name;
  8887. if ( true && name) {
  8888. validateComponentName(name);
  8889. }
  8890. var Sub = function VueComponent (options) {
  8891. this._init(options);
  8892. };
  8893. Sub.prototype = Object.create(Super.prototype);
  8894. Sub.prototype.constructor = Sub;
  8895. Sub.cid = cid++;
  8896. Sub.options = mergeOptions(
  8897. Super.options,
  8898. extendOptions
  8899. );
  8900. Sub['super'] = Super;
  8901. // For props and computed properties, we define the proxy getters on
  8902. // the Vue instances at extension time, on the extended prototype. This
  8903. // avoids Object.defineProperty calls for each instance created.
  8904. if (Sub.options.props) {
  8905. initProps$1(Sub);
  8906. }
  8907. if (Sub.options.computed) {
  8908. initComputed$1(Sub);
  8909. }
  8910. // allow further extension/mixin/plugin usage
  8911. Sub.extend = Super.extend;
  8912. Sub.mixin = Super.mixin;
  8913. Sub.use = Super.use;
  8914. // create asset registers, so extended classes
  8915. // can have their private assets too.
  8916. ASSET_TYPES.forEach(function (type) {
  8917. Sub[type] = Super[type];
  8918. });
  8919. // enable recursive self-lookup
  8920. if (name) {
  8921. Sub.options.components[name] = Sub;
  8922. }
  8923. // keep a reference to the super options at extension time.
  8924. // later at instantiation we can check if Super's options have
  8925. // been updated.
  8926. Sub.superOptions = Super.options;
  8927. Sub.extendOptions = extendOptions;
  8928. Sub.sealedOptions = extend({}, Sub.options);
  8929. // cache constructor
  8930. cachedCtors[SuperId] = Sub;
  8931. return Sub
  8932. };
  8933. }
  8934. function initProps$1 (Comp) {
  8935. var props = Comp.options.props;
  8936. for (var key in props) {
  8937. proxy(Comp.prototype, "_props", key);
  8938. }
  8939. }
  8940. function initComputed$1 (Comp) {
  8941. var computed = Comp.options.computed;
  8942. for (var key in computed) {
  8943. defineComputed(Comp.prototype, key, computed[key]);
  8944. }
  8945. }
  8946. /* */
  8947. function initAssetRegisters (Vue) {
  8948. /**
  8949. * Create asset registration methods.
  8950. */
  8951. ASSET_TYPES.forEach(function (type) {
  8952. Vue[type] = function (
  8953. id,
  8954. definition
  8955. ) {
  8956. if (!definition) {
  8957. return this.options[type + 's'][id]
  8958. } else {
  8959. /* istanbul ignore if */
  8960. if ( true && type === 'component') {
  8961. validateComponentName(id);
  8962. }
  8963. if (type === 'component' && isPlainObject(definition)) {
  8964. definition.name = definition.name || id;
  8965. definition = this.options._base.extend(definition);
  8966. }
  8967. if (type === 'directive' && typeof definition === 'function') {
  8968. definition = { bind: definition, update: definition };
  8969. }
  8970. this.options[type + 's'][id] = definition;
  8971. return definition
  8972. }
  8973. };
  8974. });
  8975. }
  8976. /* */
  8977. function getComponentName (opts) {
  8978. return opts && (opts.Ctor.options.name || opts.tag)
  8979. }
  8980. function matches (pattern, name) {
  8981. if (Array.isArray(pattern)) {
  8982. return pattern.indexOf(name) > -1
  8983. } else if (typeof pattern === 'string') {
  8984. return pattern.split(',').indexOf(name) > -1
  8985. } else if (isRegExp(pattern)) {
  8986. return pattern.test(name)
  8987. }
  8988. /* istanbul ignore next */
  8989. return false
  8990. }
  8991. function pruneCache (keepAliveInstance, filter) {
  8992. var cache = keepAliveInstance.cache;
  8993. var keys = keepAliveInstance.keys;
  8994. var _vnode = keepAliveInstance._vnode;
  8995. for (var key in cache) {
  8996. var cachedNode = cache[key];
  8997. if (cachedNode) {
  8998. var name = getComponentName(cachedNode.componentOptions);
  8999. if (name && !filter(name)) {
  9000. pruneCacheEntry(cache, key, keys, _vnode);
  9001. }
  9002. }
  9003. }
  9004. }
  9005. function pruneCacheEntry (
  9006. cache,
  9007. key,
  9008. keys,
  9009. current
  9010. ) {
  9011. var cached$$1 = cache[key];
  9012. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  9013. cached$$1.componentInstance.$destroy();
  9014. }
  9015. cache[key] = null;
  9016. remove(keys, key);
  9017. }
  9018. var patternTypes = [String, RegExp, Array];
  9019. var KeepAlive = {
  9020. name: 'keep-alive',
  9021. abstract: true,
  9022. props: {
  9023. include: patternTypes,
  9024. exclude: patternTypes,
  9025. max: [String, Number]
  9026. },
  9027. created: function created () {
  9028. this.cache = Object.create(null);
  9029. this.keys = [];
  9030. },
  9031. destroyed: function destroyed () {
  9032. for (var key in this.cache) {
  9033. pruneCacheEntry(this.cache, key, this.keys);
  9034. }
  9035. },
  9036. mounted: function mounted () {
  9037. var this$1 = this;
  9038. this.$watch('include', function (val) {
  9039. pruneCache(this$1, function (name) { return matches(val, name); });
  9040. });
  9041. this.$watch('exclude', function (val) {
  9042. pruneCache(this$1, function (name) { return !matches(val, name); });
  9043. });
  9044. },
  9045. render: function render () {
  9046. var slot = this.$slots.default;
  9047. var vnode = getFirstComponentChild(slot);
  9048. var componentOptions = vnode && vnode.componentOptions;
  9049. if (componentOptions) {
  9050. // check pattern
  9051. var name = getComponentName(componentOptions);
  9052. var ref = this;
  9053. var include = ref.include;
  9054. var exclude = ref.exclude;
  9055. if (
  9056. // not included
  9057. (include && (!name || !matches(include, name))) ||
  9058. // excluded
  9059. (exclude && name && matches(exclude, name))
  9060. ) {
  9061. return vnode
  9062. }
  9063. var ref$1 = this;
  9064. var cache = ref$1.cache;
  9065. var keys = ref$1.keys;
  9066. var key = vnode.key == null
  9067. // same constructor may get registered as different local components
  9068. // so cid alone is not enough (#3269)
  9069. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  9070. : vnode.key;
  9071. if (cache[key]) {
  9072. vnode.componentInstance = cache[key].componentInstance;
  9073. // make current key freshest
  9074. remove(keys, key);
  9075. keys.push(key);
  9076. } else {
  9077. cache[key] = vnode;
  9078. keys.push(key);
  9079. // prune oldest entry
  9080. if (this.max && keys.length > parseInt(this.max)) {
  9081. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  9082. }
  9083. }
  9084. vnode.data.keepAlive = true;
  9085. }
  9086. return vnode || (slot && slot[0])
  9087. }
  9088. };
  9089. var builtInComponents = {
  9090. KeepAlive: KeepAlive
  9091. };
  9092. /* */
  9093. function initGlobalAPI (Vue) {
  9094. // config
  9095. var configDef = {};
  9096. configDef.get = function () { return config; };
  9097. if (true) {
  9098. configDef.set = function () {
  9099. warn(
  9100. 'Do not replace the Vue.config object, set individual fields instead.'
  9101. );
  9102. };
  9103. }
  9104. Object.defineProperty(Vue, 'config', configDef);
  9105. // exposed util methods.
  9106. // NOTE: these are not considered part of the public API - avoid relying on
  9107. // them unless you are aware of the risk.
  9108. Vue.util = {
  9109. warn: warn,
  9110. extend: extend,
  9111. mergeOptions: mergeOptions,
  9112. defineReactive: defineReactive$$1
  9113. };
  9114. Vue.set = set;
  9115. Vue.delete = del;
  9116. Vue.nextTick = nextTick;
  9117. // 2.6 explicit observable API
  9118. Vue.observable = function (obj) {
  9119. observe(obj);
  9120. return obj
  9121. };
  9122. Vue.options = Object.create(null);
  9123. ASSET_TYPES.forEach(function (type) {
  9124. Vue.options[type + 's'] = Object.create(null);
  9125. });
  9126. // this is used to identify the "base" constructor to extend all plain-object
  9127. // components with in Weex's multi-instance scenarios.
  9128. Vue.options._base = Vue;
  9129. extend(Vue.options.components, builtInComponents);
  9130. initUse(Vue);
  9131. initMixin$1(Vue);
  9132. initExtend(Vue);
  9133. initAssetRegisters(Vue);
  9134. }
  9135. initGlobalAPI(Vue);
  9136. Object.defineProperty(Vue.prototype, '$isServer', {
  9137. get: isServerRendering
  9138. });
  9139. Object.defineProperty(Vue.prototype, '$ssrContext', {
  9140. get: function get () {
  9141. /* istanbul ignore next */
  9142. return this.$vnode && this.$vnode.ssrContext
  9143. }
  9144. });
  9145. // expose FunctionalRenderContext for ssr runtime helper installation
  9146. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  9147. value: FunctionalRenderContext
  9148. });
  9149. Vue.version = '2.6.11';
  9150. /**
  9151. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  9152. */
  9153. var ARRAYTYPE = '[object Array]';
  9154. var OBJECTTYPE = '[object Object]';
  9155. var NULLTYPE = '[object Null]';
  9156. var UNDEFINEDTYPE = '[object Undefined]';
  9157. // const FUNCTIONTYPE = '[object Function]'
  9158. function diff(current, pre) {
  9159. var result = {};
  9160. syncKeys(current, pre);
  9161. _diff(current, pre, '', result);
  9162. return result
  9163. }
  9164. function syncKeys(current, pre) {
  9165. if (current === pre) { return }
  9166. var rootCurrentType = type(current);
  9167. var rootPreType = type(pre);
  9168. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  9169. if(Object.keys(current).length >= Object.keys(pre).length){
  9170. for (var key in pre) {
  9171. var currentValue = current[key];
  9172. if (currentValue === undefined) {
  9173. current[key] = null;
  9174. } else {
  9175. syncKeys(currentValue, pre[key]);
  9176. }
  9177. }
  9178. }
  9179. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  9180. if (current.length >= pre.length) {
  9181. pre.forEach(function (item, index) {
  9182. syncKeys(current[index], item);
  9183. });
  9184. }
  9185. }
  9186. }
  9187. function nullOrUndefined(currentType, preType) {
  9188. if(
  9189. (currentType === NULLTYPE || currentType === UNDEFINEDTYPE) &&
  9190. (preType === NULLTYPE || preType === UNDEFINEDTYPE)
  9191. ) {
  9192. return false
  9193. }
  9194. return true
  9195. }
  9196. function _diff(current, pre, path, result) {
  9197. if (current === pre) { return }
  9198. var rootCurrentType = type(current);
  9199. var rootPreType = type(pre);
  9200. if (rootCurrentType == OBJECTTYPE) {
  9201. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  9202. setResult(result, path, current);
  9203. } else {
  9204. var loop = function ( key ) {
  9205. var currentValue = current[key];
  9206. var preValue = pre[key];
  9207. var currentType = type(currentValue);
  9208. var preType = type(preValue);
  9209. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  9210. if (currentValue !== pre[key] && nullOrUndefined(currentType, preType)) {
  9211. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9212. }
  9213. } else if (currentType == ARRAYTYPE) {
  9214. if (preType != ARRAYTYPE) {
  9215. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9216. } else {
  9217. if (currentValue.length < preValue.length) {
  9218. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9219. } else {
  9220. currentValue.forEach(function (item, index) {
  9221. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  9222. });
  9223. }
  9224. }
  9225. } else if (currentType == OBJECTTYPE) {
  9226. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  9227. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9228. } else {
  9229. for (var subKey in currentValue) {
  9230. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  9231. }
  9232. }
  9233. }
  9234. };
  9235. for (var key in current) loop( key );
  9236. }
  9237. } else if (rootCurrentType == ARRAYTYPE) {
  9238. if (rootPreType != ARRAYTYPE) {
  9239. setResult(result, path, current);
  9240. } else {
  9241. if (current.length < pre.length) {
  9242. setResult(result, path, current);
  9243. } else {
  9244. current.forEach(function (item, index) {
  9245. _diff(item, pre[index], path + '[' + index + ']', result);
  9246. });
  9247. }
  9248. }
  9249. } else {
  9250. setResult(result, path, current);
  9251. }
  9252. }
  9253. function setResult(result, k, v) {
  9254. // if (type(v) != FUNCTIONTYPE) {
  9255. result[k] = v;
  9256. // }
  9257. }
  9258. function type(obj) {
  9259. return Object.prototype.toString.call(obj)
  9260. }
  9261. /* */
  9262. function flushCallbacks$1(vm) {
  9263. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  9264. if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"kklbWe","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  9265. var mpInstance = vm.$scope;
  9266. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  9267. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  9268. }
  9269. var copies = vm.__next_tick_callbacks.slice(0);
  9270. vm.__next_tick_callbacks.length = 0;
  9271. for (var i = 0; i < copies.length; i++) {
  9272. copies[i]();
  9273. }
  9274. }
  9275. }
  9276. function hasRenderWatcher(vm) {
  9277. return queue.find(function (watcher) { return vm._watcher === watcher; })
  9278. }
  9279. function nextTick$1(vm, cb) {
  9280. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  9281. //2.nextTick 之前存在 render watcher
  9282. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  9283. if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"kklbWe","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  9284. var mpInstance = vm.$scope;
  9285. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  9286. ']:nextVueTick');
  9287. }
  9288. return nextTick(cb, vm)
  9289. }else{
  9290. if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"kklbWe","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  9291. var mpInstance$1 = vm.$scope;
  9292. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  9293. ']:nextMPTick');
  9294. }
  9295. }
  9296. var _resolve;
  9297. if (!vm.__next_tick_callbacks) {
  9298. vm.__next_tick_callbacks = [];
  9299. }
  9300. vm.__next_tick_callbacks.push(function () {
  9301. if (cb) {
  9302. try {
  9303. cb.call(vm);
  9304. } catch (e) {
  9305. handleError(e, vm, 'nextTick');
  9306. }
  9307. } else if (_resolve) {
  9308. _resolve(vm);
  9309. }
  9310. });
  9311. // $flow-disable-line
  9312. if (!cb && typeof Promise !== 'undefined') {
  9313. return new Promise(function (resolve) {
  9314. _resolve = resolve;
  9315. })
  9316. }
  9317. }
  9318. /* */
  9319. function clearInstance(key, value) {
  9320. // 简易去除 Vue 和小程序组件实例
  9321. if (value) {
  9322. if (value._isVue || value.__v_isMPComponent) {
  9323. return {}
  9324. }
  9325. }
  9326. return value
  9327. }
  9328. function cloneWithData(vm) {
  9329. // 确保当前 vm 所有数据被同步
  9330. var ret = Object.create(null);
  9331. var dataKeys = [].concat(
  9332. Object.keys(vm._data || {}),
  9333. Object.keys(vm._computedWatchers || {}));
  9334. dataKeys.reduce(function(ret, key) {
  9335. ret[key] = vm[key];
  9336. return ret
  9337. }, ret);
  9338. // vue-composition-api
  9339. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  9340. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  9341. if (rawBindings) {
  9342. Object.keys(rawBindings).forEach(function (key) {
  9343. ret[key] = vm[key];
  9344. });
  9345. }
  9346. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  9347. Object.assign(ret, vm.$mp.data || {});
  9348. if (
  9349. Array.isArray(vm.$options.behaviors) &&
  9350. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  9351. ) { //form-field
  9352. ret['name'] = vm.name;
  9353. ret['value'] = vm.value;
  9354. }
  9355. return JSON.parse(JSON.stringify(ret, clearInstance))
  9356. }
  9357. var patch = function(oldVnode, vnode) {
  9358. var this$1 = this;
  9359. if (vnode === null) { //destroy
  9360. return
  9361. }
  9362. if (this.mpType === 'page' || this.mpType === 'component') {
  9363. var mpInstance = this.$scope;
  9364. var data = Object.create(null);
  9365. try {
  9366. data = cloneWithData(this);
  9367. } catch (err) {
  9368. console.error(err);
  9369. }
  9370. data.__webviewId__ = mpInstance.data.__webviewId__;
  9371. var mpData = Object.create(null);
  9372. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  9373. mpData[key] = mpInstance.data[key];
  9374. });
  9375. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  9376. if (Object.keys(diffData).length) {
  9377. if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"kklbWe","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  9378. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  9379. ']差量更新',
  9380. JSON.stringify(diffData));
  9381. }
  9382. this.__next_tick_pending = true;
  9383. mpInstance.setData(diffData, function () {
  9384. this$1.__next_tick_pending = false;
  9385. flushCallbacks$1(this$1);
  9386. });
  9387. } else {
  9388. flushCallbacks$1(this);
  9389. }
  9390. }
  9391. };
  9392. /* */
  9393. function createEmptyRender() {
  9394. }
  9395. function mountComponent$1(
  9396. vm,
  9397. el,
  9398. hydrating
  9399. ) {
  9400. if (!vm.mpType) {//main.js 中的 new Vue
  9401. return vm
  9402. }
  9403. if (vm.mpType === 'app') {
  9404. vm.$options.render = createEmptyRender;
  9405. }
  9406. if (!vm.$options.render) {
  9407. vm.$options.render = createEmptyRender;
  9408. if (true) {
  9409. /* istanbul ignore if */
  9410. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  9411. vm.$options.el || el) {
  9412. warn(
  9413. 'You are using the runtime-only build of Vue where the template ' +
  9414. 'compiler is not available. Either pre-compile the templates into ' +
  9415. 'render functions, or use the compiler-included build.',
  9416. vm
  9417. );
  9418. } else {
  9419. warn(
  9420. 'Failed to mount component: template or render function not defined.',
  9421. vm
  9422. );
  9423. }
  9424. }
  9425. }
  9426. !vm._$fallback && callHook(vm, 'beforeMount');
  9427. var updateComponent = function () {
  9428. vm._update(vm._render(), hydrating);
  9429. };
  9430. // we set this to vm._watcher inside the watcher's constructor
  9431. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  9432. // component's mounted hook), which relies on vm._watcher being already defined
  9433. new Watcher(vm, updateComponent, noop, {
  9434. before: function before() {
  9435. if (vm._isMounted && !vm._isDestroyed) {
  9436. callHook(vm, 'beforeUpdate');
  9437. }
  9438. }
  9439. }, true /* isRenderWatcher */);
  9440. hydrating = false;
  9441. return vm
  9442. }
  9443. /* */
  9444. function renderClass (
  9445. staticClass,
  9446. dynamicClass
  9447. ) {
  9448. if (isDef(staticClass) || isDef(dynamicClass)) {
  9449. return concat(staticClass, stringifyClass(dynamicClass))
  9450. }
  9451. /* istanbul ignore next */
  9452. return ''
  9453. }
  9454. function concat (a, b) {
  9455. return a ? b ? (a + ' ' + b) : a : (b || '')
  9456. }
  9457. function stringifyClass (value) {
  9458. if (Array.isArray(value)) {
  9459. return stringifyArray(value)
  9460. }
  9461. if (isObject(value)) {
  9462. return stringifyObject(value)
  9463. }
  9464. if (typeof value === 'string') {
  9465. return value
  9466. }
  9467. /* istanbul ignore next */
  9468. return ''
  9469. }
  9470. function stringifyArray (value) {
  9471. var res = '';
  9472. var stringified;
  9473. for (var i = 0, l = value.length; i < l; i++) {
  9474. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  9475. if (res) { res += ' '; }
  9476. res += stringified;
  9477. }
  9478. }
  9479. return res
  9480. }
  9481. function stringifyObject (value) {
  9482. var res = '';
  9483. for (var key in value) {
  9484. if (value[key]) {
  9485. if (res) { res += ' '; }
  9486. res += key;
  9487. }
  9488. }
  9489. return res
  9490. }
  9491. /* */
  9492. var parseStyleText = cached(function (cssText) {
  9493. var res = {};
  9494. var listDelimiter = /;(?![^(]*\))/g;
  9495. var propertyDelimiter = /:(.+)/;
  9496. cssText.split(listDelimiter).forEach(function (item) {
  9497. if (item) {
  9498. var tmp = item.split(propertyDelimiter);
  9499. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  9500. }
  9501. });
  9502. return res
  9503. });
  9504. // normalize possible array / string values into Object
  9505. function normalizeStyleBinding (bindingStyle) {
  9506. if (Array.isArray(bindingStyle)) {
  9507. return toObject(bindingStyle)
  9508. }
  9509. if (typeof bindingStyle === 'string') {
  9510. return parseStyleText(bindingStyle)
  9511. }
  9512. return bindingStyle
  9513. }
  9514. /* */
  9515. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  9516. function getTarget(obj, path) {
  9517. var parts = path.split('.');
  9518. var key = parts[0];
  9519. if (key.indexOf('__$n') === 0) { //number index
  9520. key = parseInt(key.replace('__$n', ''));
  9521. }
  9522. if (parts.length === 1) {
  9523. return obj[key]
  9524. }
  9525. return getTarget(obj[key], parts.slice(1).join('.'))
  9526. }
  9527. function internalMixin(Vue) {
  9528. Vue.config.errorHandler = function(err, vm, info) {
  9529. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  9530. console.error(err);
  9531. /* eslint-disable no-undef */
  9532. var app = typeof getApp === 'function' && getApp();
  9533. if (app && app.onError) {
  9534. app.onError(err);
  9535. }
  9536. };
  9537. var oldEmit = Vue.prototype.$emit;
  9538. Vue.prototype.$emit = function(event) {
  9539. if (this.$scope && event) {
  9540. var triggerEvent = this.$scope['_triggerEvent'] || this.$scope['triggerEvent'];
  9541. if (triggerEvent) {
  9542. try {
  9543. triggerEvent.call(this.$scope, event, {
  9544. __args__: toArray(arguments, 1)
  9545. });
  9546. } catch (error) {
  9547. }
  9548. }
  9549. }
  9550. return oldEmit.apply(this, arguments)
  9551. };
  9552. Vue.prototype.$nextTick = function(fn) {
  9553. return nextTick$1(this, fn)
  9554. };
  9555. MP_METHODS.forEach(function (method) {
  9556. Vue.prototype[method] = function(args) {
  9557. if (this.$scope && this.$scope[method]) {
  9558. return this.$scope[method](args)
  9559. }
  9560. // mp-alipay
  9561. if (typeof my === 'undefined') {
  9562. return
  9563. }
  9564. if (method === 'createSelectorQuery') {
  9565. /* eslint-disable no-undef */
  9566. return my.createSelectorQuery(args)
  9567. } else if (method === 'createIntersectionObserver') {
  9568. /* eslint-disable no-undef */
  9569. return my.createIntersectionObserver(args)
  9570. }
  9571. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  9572. };
  9573. });
  9574. Vue.prototype.__init_provide = initProvide;
  9575. Vue.prototype.__init_injections = initInjections;
  9576. Vue.prototype.__call_hook = function(hook, args) {
  9577. var vm = this;
  9578. // #7573 disable dep collection when invoking lifecycle hooks
  9579. pushTarget();
  9580. var handlers = vm.$options[hook];
  9581. var info = hook + " hook";
  9582. var ret;
  9583. if (handlers) {
  9584. for (var i = 0, j = handlers.length; i < j; i++) {
  9585. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  9586. }
  9587. }
  9588. if (vm._hasHookEvent) {
  9589. vm.$emit('hook:' + hook, args);
  9590. }
  9591. popTarget();
  9592. return ret
  9593. };
  9594. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  9595. if (Array.isArray(modifiers)) {
  9596. if (modifiers.indexOf('trim') !== -1) {
  9597. value = value.trim();
  9598. }
  9599. if (modifiers.indexOf('number') !== -1) {
  9600. value = this._n(value);
  9601. }
  9602. }
  9603. if (!target) {
  9604. target = this;
  9605. }
  9606. // 解决动态属性添加
  9607. Vue.set(target, key, value);
  9608. };
  9609. Vue.prototype.__set_sync = function(target, key, value) {
  9610. if (!target) {
  9611. target = this;
  9612. }
  9613. // 解决动态属性添加
  9614. Vue.set(target, key, value);
  9615. };
  9616. Vue.prototype.__get_orig = function(item) {
  9617. if (isPlainObject(item)) {
  9618. return item['$orig'] || item
  9619. }
  9620. return item
  9621. };
  9622. Vue.prototype.__get_value = function(dataPath, target) {
  9623. return getTarget(target || this, dataPath)
  9624. };
  9625. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  9626. return renderClass(staticClass, dynamicClass)
  9627. };
  9628. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  9629. if (!dynamicStyle && !staticStyle) {
  9630. return ''
  9631. }
  9632. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  9633. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  9634. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  9635. };
  9636. Vue.prototype.__map = function(val, iteratee) {
  9637. //TODO 暂不考虑 string
  9638. var ret, i, l, keys, key;
  9639. if (Array.isArray(val)) {
  9640. ret = new Array(val.length);
  9641. for (i = 0, l = val.length; i < l; i++) {
  9642. ret[i] = iteratee(val[i], i);
  9643. }
  9644. return ret
  9645. } else if (isObject(val)) {
  9646. keys = Object.keys(val);
  9647. ret = Object.create(null);
  9648. for (i = 0, l = keys.length; i < l; i++) {
  9649. key = keys[i];
  9650. ret[key] = iteratee(val[key], key, i);
  9651. }
  9652. return ret
  9653. } else if (typeof val === 'number') {
  9654. ret = new Array(val);
  9655. for (i = 0, l = val; i < l; i++) {
  9656. // 第一个参数暂时仍和小程序一致
  9657. ret[i] = iteratee(i, i);
  9658. }
  9659. return ret
  9660. }
  9661. return []
  9662. };
  9663. }
  9664. /* */
  9665. var LIFECYCLE_HOOKS$1 = [
  9666. //App
  9667. 'onLaunch',
  9668. 'onShow',
  9669. 'onHide',
  9670. 'onUniNViewMessage',
  9671. 'onPageNotFound',
  9672. 'onThemeChange',
  9673. 'onError',
  9674. 'onUnhandledRejection',
  9675. //Page
  9676. 'onInit',
  9677. 'onLoad',
  9678. // 'onShow',
  9679. 'onReady',
  9680. // 'onHide',
  9681. 'onUnload',
  9682. 'onPullDownRefresh',
  9683. 'onReachBottom',
  9684. 'onTabItemTap',
  9685. 'onAddToFavorites',
  9686. 'onShareTimeline',
  9687. 'onShareAppMessage',
  9688. 'onResize',
  9689. 'onPageScroll',
  9690. 'onNavigationBarButtonTap',
  9691. 'onBackPress',
  9692. 'onNavigationBarSearchInputChanged',
  9693. 'onNavigationBarSearchInputConfirmed',
  9694. 'onNavigationBarSearchInputClicked',
  9695. 'onUploadDouyinVideo',
  9696. 'onNFCReadMessage',
  9697. //Component
  9698. // 'onReady', // 兼容旧版本,应该移除该事件
  9699. 'onPageShow',
  9700. 'onPageHide',
  9701. 'onPageResize'
  9702. ];
  9703. function lifecycleMixin$1(Vue) {
  9704. //fixed vue-class-component
  9705. var oldExtend = Vue.extend;
  9706. Vue.extend = function(extendOptions) {
  9707. extendOptions = extendOptions || {};
  9708. var methods = extendOptions.methods;
  9709. if (methods) {
  9710. Object.keys(methods).forEach(function (methodName) {
  9711. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  9712. extendOptions[methodName] = methods[methodName];
  9713. delete methods[methodName];
  9714. }
  9715. });
  9716. }
  9717. return oldExtend.call(this, extendOptions)
  9718. };
  9719. var strategies = Vue.config.optionMergeStrategies;
  9720. var mergeHook = strategies.created;
  9721. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  9722. strategies[hook] = mergeHook;
  9723. });
  9724. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  9725. }
  9726. /* */
  9727. // install platform patch function
  9728. Vue.prototype.__patch__ = patch;
  9729. // public mount method
  9730. Vue.prototype.$mount = function(
  9731. el ,
  9732. hydrating
  9733. ) {
  9734. return mountComponent$1(this, el, hydrating)
  9735. };
  9736. lifecycleMixin$1(Vue);
  9737. internalMixin(Vue);
  9738. /* */
  9739. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  9740. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  9741. /***/ }),
  9742. /***/ 26:
  9743. /*!********************************************************************!*\
  9744. !*** C:/Users/yuanyiming/Desktop/教研app/teaching-uniapp/pages.json ***!
  9745. \********************************************************************/
  9746. /*! no static exports found */
  9747. /***/ (function(module, exports) {
  9748. /***/ }),
  9749. /***/ 3:
  9750. /*!***********************************!*\
  9751. !*** (webpack)/buildin/global.js ***!
  9752. \***********************************/
  9753. /*! no static exports found */
  9754. /***/ (function(module, exports) {
  9755. var g;
  9756. // This works in non-strict mode
  9757. g = (function() {
  9758. return this;
  9759. })();
  9760. try {
  9761. // This works if eval is allowed (see CSP)
  9762. g = g || new Function("return this")();
  9763. } catch (e) {
  9764. // This works if the window reference is available
  9765. if (typeof window === "object") g = window;
  9766. }
  9767. // g can still be undefined, but nothing to do about it...
  9768. // We return undefined, instead of nothing here, so it's
  9769. // easier to handle this case. if(!global) { ...}
  9770. module.exports = g;
  9771. /***/ }),
  9772. /***/ 32:
  9773. /*!**********************************************************************************************************!*\
  9774. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  9775. \**********************************************************************************************************/
  9776. /*! exports provided: default */
  9777. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  9778. "use strict";
  9779. __webpack_require__.r(__webpack_exports__);
  9780. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  9781. /* globals __VUE_SSR_CONTEXT__ */
  9782. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  9783. // This module is a runtime utility for cleaner component module output and will
  9784. // be included in the final webpack user bundle.
  9785. function normalizeComponent (
  9786. scriptExports,
  9787. render,
  9788. staticRenderFns,
  9789. functionalTemplate,
  9790. injectStyles,
  9791. scopeId,
  9792. moduleIdentifier, /* server only */
  9793. shadowMode, /* vue-cli only */
  9794. components, // fixed by xxxxxx auto components
  9795. renderjs // fixed by xxxxxx renderjs
  9796. ) {
  9797. // Vue.extend constructor export interop
  9798. var options = typeof scriptExports === 'function'
  9799. ? scriptExports.options
  9800. : scriptExports
  9801. // fixed by xxxxxx auto components
  9802. if (components) {
  9803. if (!options.components) {
  9804. options.components = {}
  9805. }
  9806. var hasOwn = Object.prototype.hasOwnProperty
  9807. for (var name in components) {
  9808. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  9809. options.components[name] = components[name]
  9810. }
  9811. }
  9812. }
  9813. // fixed by xxxxxx renderjs
  9814. if (renderjs) {
  9815. if(typeof renderjs.beforeCreate === 'function'){
  9816. renderjs.beforeCreate = [renderjs.beforeCreate]
  9817. }
  9818. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  9819. this[renderjs.__module] = this
  9820. });
  9821. (options.mixins || (options.mixins = [])).push(renderjs)
  9822. }
  9823. // render functions
  9824. if (render) {
  9825. options.render = render
  9826. options.staticRenderFns = staticRenderFns
  9827. options._compiled = true
  9828. }
  9829. // functional template
  9830. if (functionalTemplate) {
  9831. options.functional = true
  9832. }
  9833. // scopedId
  9834. if (scopeId) {
  9835. options._scopeId = 'data-v-' + scopeId
  9836. }
  9837. var hook
  9838. if (moduleIdentifier) { // server build
  9839. hook = function (context) {
  9840. // 2.3 injection
  9841. context =
  9842. context || // cached call
  9843. (this.$vnode && this.$vnode.ssrContext) || // stateful
  9844. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  9845. // 2.2 with runInNewContext: true
  9846. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  9847. context = __VUE_SSR_CONTEXT__
  9848. }
  9849. // inject component styles
  9850. if (injectStyles) {
  9851. injectStyles.call(this, context)
  9852. }
  9853. // register component module identifier for async chunk inferrence
  9854. if (context && context._registeredComponents) {
  9855. context._registeredComponents.add(moduleIdentifier)
  9856. }
  9857. }
  9858. // used by ssr in case component is cached and beforeCreate
  9859. // never gets called
  9860. options._ssrRegister = hook
  9861. } else if (injectStyles) {
  9862. hook = shadowMode
  9863. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  9864. : injectStyles
  9865. }
  9866. if (hook) {
  9867. if (options.functional) {
  9868. // for template-only hot-reload because in that case the render fn doesn't
  9869. // go through the normalizer
  9870. options._injectStyles = hook
  9871. // register for functioal component in vue file
  9872. var originalRender = options.render
  9873. options.render = function renderWithStyleInjection (h, context) {
  9874. hook.call(context)
  9875. return originalRender(h, context)
  9876. }
  9877. } else {
  9878. // inject component registration as beforeCreate hook
  9879. var existing = options.beforeCreate
  9880. options.beforeCreate = existing
  9881. ? [].concat(existing, hook)
  9882. : [hook]
  9883. }
  9884. }
  9885. return {
  9886. exports: scriptExports,
  9887. options: options
  9888. }
  9889. }
  9890. /***/ }),
  9891. /***/ 33:
  9892. /*!**********************************************************************************!*\
  9893. !*** C:/Users/yuanyiming/Desktop/教研app/teaching-uniapp/uni.promisify.adaptor.js ***!
  9894. \**********************************************************************************/
  9895. /*! no static exports found */
  9896. /***/ (function(module, exports, __webpack_require__) {
  9897. /* WEBPACK VAR INJECTION */(function(uni) {var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  9898. uni.addInterceptor({
  9899. returnValue: function returnValue(res) {
  9900. if (!(!!res && (_typeof(res) === "object" || typeof res === "function") && typeof res.then === "function")) {
  9901. return res;
  9902. }
  9903. return new Promise(function (resolve, reject) {
  9904. res.then(function (res) {
  9905. return res[0] ? reject(res[0]) : resolve(res[1]);
  9906. });
  9907. });
  9908. }
  9909. });
  9910. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  9911. /***/ }),
  9912. /***/ 4:
  9913. /*!**********************************************************************!*\
  9914. !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
  9915. \**********************************************************************/
  9916. /*! no static exports found */
  9917. /***/ (function(module, exports) {
  9918. function _interopRequireDefault(obj) {
  9919. return obj && obj.__esModule ? obj : {
  9920. "default": obj
  9921. };
  9922. }
  9923. module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
  9924. /***/ }),
  9925. /***/ 5:
  9926. /*!**************************************************************!*\
  9927. !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
  9928. \**************************************************************/
  9929. /*! no static exports found */
  9930. /***/ (function(module, exports, __webpack_require__) {
  9931. var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ 6);
  9932. var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ 7);
  9933. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  9934. var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ 10);
  9935. function _slicedToArray(arr, i) {
  9936. return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
  9937. }
  9938. module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  9939. /***/ }),
  9940. /***/ 6:
  9941. /*!***************************************************************!*\
  9942. !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
  9943. \***************************************************************/
  9944. /*! no static exports found */
  9945. /***/ (function(module, exports) {
  9946. function _arrayWithHoles(arr) {
  9947. if (Array.isArray(arr)) return arr;
  9948. }
  9949. module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  9950. /***/ }),
  9951. /***/ 7:
  9952. /*!*********************************************************************!*\
  9953. !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
  9954. \*********************************************************************/
  9955. /*! no static exports found */
  9956. /***/ (function(module, exports) {
  9957. function _iterableToArrayLimit(arr, i) {
  9958. var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
  9959. if (null != _i) {
  9960. var _s,
  9961. _e,
  9962. _x,
  9963. _r,
  9964. _arr = [],
  9965. _n = !0,
  9966. _d = !1;
  9967. try {
  9968. if (_x = (_i = _i.call(arr)).next, 0 === i) {
  9969. if (Object(_i) !== _i) return;
  9970. _n = !1;
  9971. } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) {
  9972. ;
  9973. }
  9974. } catch (err) {
  9975. _d = !0, _e = err;
  9976. } finally {
  9977. try {
  9978. if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
  9979. } finally {
  9980. if (_d) throw _e;
  9981. }
  9982. }
  9983. return _arr;
  9984. }
  9985. }
  9986. module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
  9987. /***/ }),
  9988. /***/ 8:
  9989. /*!***************************************************************************!*\
  9990. !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
  9991. \***************************************************************************/
  9992. /*! no static exports found */
  9993. /***/ (function(module, exports, __webpack_require__) {
  9994. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  9995. function _unsupportedIterableToArray(o, minLen) {
  9996. if (!o) return;
  9997. if (typeof o === "string") return arrayLikeToArray(o, minLen);
  9998. var n = Object.prototype.toString.call(o).slice(8, -1);
  9999. if (n === "Object" && o.constructor) n = o.constructor.name;
  10000. if (n === "Map" || n === "Set") return Array.from(o);
  10001. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
  10002. }
  10003. module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  10004. /***/ }),
  10005. /***/ 9:
  10006. /*!*****************************************************************!*\
  10007. !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
  10008. \*****************************************************************/
  10009. /*! no static exports found */
  10010. /***/ (function(module, exports) {
  10011. function _arrayLikeToArray(arr, len) {
  10012. if (len == null || len > arr.length) len = arr.length;
  10013. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  10014. arr2[i] = arr[i];
  10015. }
  10016. return arr2;
  10017. }
  10018. module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  10019. /***/ })
  10020. }]);
  10021. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map