vendor.js 440 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],{
  2. /***/ 1:
  3. /*!************************************************************!*\
  4. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  5. \************************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. "use strict";
  9. Object.defineProperty(exports, "__esModule", { value: true });exports.createApp = createApp;exports.createComponent = createComponent;exports.createPage = createPage;exports.default = void 0;var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _slicedToArray(arr, i) {return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(arr, i) {if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"] != null) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}function _arrayWithHoles(arr) {if (Array.isArray(arr)) return arr;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}function _createClass(Constructor, protoProps, staticProps) {if (protoProps) _defineProperties(Constructor.prototype, protoProps);if (staticProps) _defineProperties(Constructor, staticProps);return Constructor;}function _toConsumableArray(arr) {return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();}function _nonIterableSpread() {throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o, minLen) {if (!o) return;if (typeof o === "string") return _arrayLikeToArray(o, minLen);var n = Object.prototype.toString.call(o).slice(8, -1);if (n === "Object" && o.constructor) n = o.constructor.name;if (n === "Map" || n === "Set") return Array.from(o);if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);}function _iterableToArray(iter) {if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);}function _arrayWithoutHoles(arr) {if (Array.isArray(arr)) return _arrayLikeToArray(arr);}function _arrayLikeToArray(arr, len) {if (len == null || len > arr.length) len = arr.length;for (var i = 0, arr2 = new Array(len); i < len; i++) {arr2[i] = arr[i];}return arr2;}
  10. var _toString = Object.prototype.toString;
  11. var hasOwnProperty = Object.prototype.hasOwnProperty;
  12. function isFn(fn) {
  13. return typeof fn === 'function';
  14. }
  15. function isStr(str) {
  16. return typeof str === 'string';
  17. }
  18. function isPlainObject(obj) {
  19. return _toString.call(obj) === '[object Object]';
  20. }
  21. function hasOwn(obj, key) {
  22. return hasOwnProperty.call(obj, key);
  23. }
  24. function noop() {}
  25. /**
  26. * Create a cached version of a pure function.
  27. */
  28. function cached(fn) {
  29. var cache = Object.create(null);
  30. return function cachedFn(str) {
  31. var hit = cache[str];
  32. return hit || (cache[str] = fn(str));
  33. };
  34. }
  35. /**
  36. * Camelize a hyphen-delimited string.
  37. */
  38. var camelizeRE = /-(\w)/g;
  39. var camelize = cached(function (str) {
  40. return str.replace(camelizeRE, function (_, c) {return c ? c.toUpperCase() : '';});
  41. });
  42. var HOOKS = [
  43. 'invoke',
  44. 'success',
  45. 'fail',
  46. 'complete',
  47. 'returnValue'];
  48. var globalInterceptors = {};
  49. var scopedInterceptors = {};
  50. function mergeHook(parentVal, childVal) {
  51. var res = childVal ?
  52. parentVal ?
  53. parentVal.concat(childVal) :
  54. Array.isArray(childVal) ?
  55. childVal : [childVal] :
  56. parentVal;
  57. return res ?
  58. dedupeHooks(res) :
  59. res;
  60. }
  61. function dedupeHooks(hooks) {
  62. var res = [];
  63. for (var i = 0; i < hooks.length; i++) {
  64. if (res.indexOf(hooks[i]) === -1) {
  65. res.push(hooks[i]);
  66. }
  67. }
  68. return res;
  69. }
  70. function removeHook(hooks, hook) {
  71. var index = hooks.indexOf(hook);
  72. if (index !== -1) {
  73. hooks.splice(index, 1);
  74. }
  75. }
  76. function mergeInterceptorHook(interceptor, option) {
  77. Object.keys(option).forEach(function (hook) {
  78. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  79. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  80. }
  81. });
  82. }
  83. function removeInterceptorHook(interceptor, option) {
  84. if (!interceptor || !option) {
  85. return;
  86. }
  87. Object.keys(option).forEach(function (hook) {
  88. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  89. removeHook(interceptor[hook], option[hook]);
  90. }
  91. });
  92. }
  93. function addInterceptor(method, option) {
  94. if (typeof method === 'string' && isPlainObject(option)) {
  95. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  96. } else if (isPlainObject(method)) {
  97. mergeInterceptorHook(globalInterceptors, method);
  98. }
  99. }
  100. function removeInterceptor(method, option) {
  101. if (typeof method === 'string') {
  102. if (isPlainObject(option)) {
  103. removeInterceptorHook(scopedInterceptors[method], option);
  104. } else {
  105. delete scopedInterceptors[method];
  106. }
  107. } else if (isPlainObject(method)) {
  108. removeInterceptorHook(globalInterceptors, method);
  109. }
  110. }
  111. function wrapperHook(hook) {
  112. return function (data) {
  113. return hook(data) || data;
  114. };
  115. }
  116. function isPromise(obj) {
  117. return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  118. }
  119. function queue(hooks, data) {
  120. var promise = false;
  121. for (var i = 0; i < hooks.length; i++) {
  122. var hook = hooks[i];
  123. if (promise) {
  124. promise = Promise.resolve(wrapperHook(hook));
  125. } else {
  126. var res = hook(data);
  127. if (isPromise(res)) {
  128. promise = Promise.resolve(res);
  129. }
  130. if (res === false) {
  131. return {
  132. then: function then() {} };
  133. }
  134. }
  135. }
  136. return promise || {
  137. then: function then(callback) {
  138. return callback(data);
  139. } };
  140. }
  141. function wrapperOptions(interceptor) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  142. ['success', 'fail', 'complete'].forEach(function (name) {
  143. if (Array.isArray(interceptor[name])) {
  144. var oldCallback = options[name];
  145. options[name] = function callbackInterceptor(res) {
  146. queue(interceptor[name], res).then(function (res) {
  147. /* eslint-disable no-mixed-operators */
  148. return isFn(oldCallback) && oldCallback(res) || res;
  149. });
  150. };
  151. }
  152. });
  153. return options;
  154. }
  155. function wrapperReturnValue(method, returnValue) {
  156. var returnValueHooks = [];
  157. if (Array.isArray(globalInterceptors.returnValue)) {
  158. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(globalInterceptors.returnValue));
  159. }
  160. var interceptor = scopedInterceptors[method];
  161. if (interceptor && Array.isArray(interceptor.returnValue)) {
  162. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(interceptor.returnValue));
  163. }
  164. returnValueHooks.forEach(function (hook) {
  165. returnValue = hook(returnValue) || returnValue;
  166. });
  167. return returnValue;
  168. }
  169. function getApiInterceptorHooks(method) {
  170. var interceptor = Object.create(null);
  171. Object.keys(globalInterceptors).forEach(function (hook) {
  172. if (hook !== 'returnValue') {
  173. interceptor[hook] = globalInterceptors[hook].slice();
  174. }
  175. });
  176. var scopedInterceptor = scopedInterceptors[method];
  177. if (scopedInterceptor) {
  178. Object.keys(scopedInterceptor).forEach(function (hook) {
  179. if (hook !== 'returnValue') {
  180. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  181. }
  182. });
  183. }
  184. return interceptor;
  185. }
  186. function invokeApi(method, api, options) {for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {params[_key - 3] = arguments[_key];}
  187. var interceptor = getApiInterceptorHooks(method);
  188. if (interceptor && Object.keys(interceptor).length) {
  189. if (Array.isArray(interceptor.invoke)) {
  190. var res = queue(interceptor.invoke, options);
  191. return res.then(function (options) {
  192. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  193. });
  194. } else {
  195. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  196. }
  197. }
  198. return api.apply(void 0, [options].concat(params));
  199. }
  200. var promiseInterceptor = {
  201. returnValue: function returnValue(res) {
  202. if (!isPromise(res)) {
  203. return res;
  204. }
  205. return res.then(function (res) {
  206. return res[1];
  207. }).catch(function (res) {
  208. return res[0];
  209. });
  210. } };
  211. var SYNC_API_RE =
  212. /^\$|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/;
  213. var CONTEXT_API_RE = /^create|Manager$/;
  214. // Context例外情况
  215. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  216. // 同步例外情况
  217. var ASYNC_API = ['createBLEConnection'];
  218. var CALLBACK_API_RE = /^on|^off/;
  219. function isContextApi(name) {
  220. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  221. }
  222. function isSyncApi(name) {
  223. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  224. }
  225. function isCallbackApi(name) {
  226. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  227. }
  228. function handlePromise(promise) {
  229. return promise.then(function (data) {
  230. return [null, data];
  231. }).
  232. catch(function (err) {return [err];});
  233. }
  234. function shouldPromise(name) {
  235. if (
  236. isContextApi(name) ||
  237. isSyncApi(name) ||
  238. isCallbackApi(name))
  239. {
  240. return false;
  241. }
  242. return true;
  243. }
  244. /* eslint-disable no-extend-native */
  245. if (!Promise.prototype.finally) {
  246. Promise.prototype.finally = function (callback) {
  247. var promise = this.constructor;
  248. return this.then(
  249. function (value) {return promise.resolve(callback()).then(function () {return value;});},
  250. function (reason) {return promise.resolve(callback()).then(function () {
  251. throw reason;
  252. });});
  253. };
  254. }
  255. function promisify(name, api) {
  256. if (!shouldPromise(name)) {
  257. return api;
  258. }
  259. return function promiseApi() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {params[_key2 - 1] = arguments[_key2];}
  260. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  261. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  262. }
  263. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  264. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  265. success: resolve,
  266. fail: reject })].concat(
  267. params));
  268. })));
  269. };
  270. }
  271. var EPS = 1e-4;
  272. var BASE_DEVICE_WIDTH = 750;
  273. var isIOS = false;
  274. var deviceWidth = 0;
  275. var deviceDPR = 0;
  276. function checkDeviceWidth() {var _wx$getSystemInfoSync =
  277. wx.getSystemInfoSync(),platform = _wx$getSystemInfoSync.platform,pixelRatio = _wx$getSystemInfoSync.pixelRatio,windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  278. deviceWidth = windowWidth;
  279. deviceDPR = pixelRatio;
  280. isIOS = platform === 'ios';
  281. }
  282. function upx2px(number, newDeviceWidth) {
  283. if (deviceWidth === 0) {
  284. checkDeviceWidth();
  285. }
  286. number = Number(number);
  287. if (number === 0) {
  288. return 0;
  289. }
  290. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  291. if (result < 0) {
  292. result = -result;
  293. }
  294. result = Math.floor(result + EPS);
  295. if (result === 0) {
  296. if (deviceDPR === 1 || !isIOS) {
  297. result = 1;
  298. } else {
  299. result = 0.5;
  300. }
  301. }
  302. return number < 0 ? -result : result;
  303. }
  304. var interceptors = {
  305. promiseInterceptor: promiseInterceptor };
  306. var baseApi = /*#__PURE__*/Object.freeze({
  307. __proto__: null,
  308. upx2px: upx2px,
  309. addInterceptor: addInterceptor,
  310. removeInterceptor: removeInterceptor,
  311. interceptors: interceptors });var
  312. EventChannel = /*#__PURE__*/function () {
  313. function EventChannel(id, events) {var _this = this;_classCallCheck(this, EventChannel);
  314. this.id = id;
  315. this.listener = {};
  316. this.emitCache = {};
  317. if (events) {
  318. Object.keys(events).forEach(function (name) {
  319. _this.on(name, events[name]);
  320. });
  321. }
  322. }_createClass(EventChannel, [{ key: "emit", value: function emit(
  323. eventName) {for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {args[_key3 - 1] = arguments[_key3];}
  324. var fns = this.listener[eventName];
  325. if (!fns) {
  326. return (this.emitCache[eventName] || (this.emitCache[eventName] = [])).push(args);
  327. }
  328. fns.forEach(function (opt) {
  329. opt.fn.apply(opt.fn, args);
  330. });
  331. this.listener[eventName] = fns.filter(function (opt) {return opt.type !== 'once';});
  332. } }, { key: "on", value: function on(
  333. eventName, fn) {
  334. this._addListener(eventName, 'on', fn);
  335. this._clearCache(eventName);
  336. } }, { key: "once", value: function once(
  337. eventName, fn) {
  338. this._addListener(eventName, 'once', fn);
  339. this._clearCache(eventName);
  340. } }, { key: "off", value: function off(
  341. eventName, fn) {
  342. var fns = this.listener[eventName];
  343. if (!fns) {
  344. return;
  345. }
  346. if (fn) {
  347. for (var i = 0; i < fns.length;) {
  348. if (fns[i].fn === fn) {
  349. fns.splice(i, 1);
  350. i--;
  351. }
  352. i++;
  353. }
  354. } else {
  355. delete this.listener[eventName];
  356. }
  357. } }, { key: "_clearCache", value: function _clearCache(
  358. eventName) {
  359. var cacheArgs = this.emitCache[eventName];
  360. if (cacheArgs) {
  361. for (; cacheArgs.length > 0;) {
  362. this.emit.apply(this, [eventName].concat(cacheArgs.shift()));
  363. }
  364. }
  365. } }, { key: "_addListener", value: function _addListener(
  366. eventName, type, fn) {
  367. (this.listener[eventName] || (this.listener[eventName] = [])).push({
  368. fn: fn,
  369. type: type });
  370. } }]);return EventChannel;}();
  371. var eventChannels = {};
  372. var eventChannelStack = [];
  373. var id = 0;
  374. function initEventChannel(events) {var cache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  375. id++;
  376. var eventChannel = new EventChannel(id, events);
  377. if (cache) {
  378. eventChannels[id] = eventChannel;
  379. eventChannelStack.push(eventChannel);
  380. }
  381. return eventChannel;
  382. }
  383. function getEventChannel(id) {
  384. if (id) {
  385. var eventChannel = eventChannels[id];
  386. delete eventChannels[id];
  387. return eventChannel;
  388. }
  389. return eventChannelStack.shift();
  390. }
  391. var navigateTo = {
  392. args: function args(fromArgs, toArgs) {
  393. var id = initEventChannel(fromArgs.events).id;
  394. if (fromArgs.url) {
  395. fromArgs.url = fromArgs.url + (fromArgs.url.indexOf('?') === -1 ? '?' : '&') + '__id__=' + id;
  396. }
  397. },
  398. returnValue: function returnValue(fromRes, toRes) {
  399. fromRes.eventChannel = getEventChannel();
  400. } };
  401. function findExistsPageIndex(url) {
  402. var pages = getCurrentPages();
  403. var len = pages.length;
  404. while (len--) {
  405. var page = pages[len];
  406. if (page.$page && page.$page.fullPath === url) {
  407. return len;
  408. }
  409. }
  410. return -1;
  411. }
  412. var redirectTo = {
  413. name: function name(fromArgs) {
  414. if (fromArgs.exists === 'back' && fromArgs.delta) {
  415. return 'navigateBack';
  416. }
  417. return 'redirectTo';
  418. },
  419. args: function args(fromArgs) {
  420. if (fromArgs.exists === 'back' && fromArgs.url) {
  421. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  422. if (existsPageIndex !== -1) {
  423. var delta = getCurrentPages().length - 1 - existsPageIndex;
  424. if (delta > 0) {
  425. fromArgs.delta = delta;
  426. }
  427. }
  428. }
  429. } };
  430. var previewImage = {
  431. args: function args(fromArgs) {
  432. var currentIndex = parseInt(fromArgs.current);
  433. if (isNaN(currentIndex)) {
  434. return;
  435. }
  436. var urls = fromArgs.urls;
  437. if (!Array.isArray(urls)) {
  438. return;
  439. }
  440. var len = urls.length;
  441. if (!len) {
  442. return;
  443. }
  444. if (currentIndex < 0) {
  445. currentIndex = 0;
  446. } else if (currentIndex >= len) {
  447. currentIndex = len - 1;
  448. }
  449. if (currentIndex > 0) {
  450. fromArgs.current = urls[currentIndex];
  451. fromArgs.urls = urls.filter(
  452. function (item, index) {return index < currentIndex ? item !== urls[currentIndex] : true;});
  453. } else {
  454. fromArgs.current = urls[0];
  455. }
  456. return {
  457. indicator: false,
  458. loop: false };
  459. } };
  460. function addSafeAreaInsets(result) {
  461. if (result.safeArea) {
  462. var safeArea = result.safeArea;
  463. result.safeAreaInsets = {
  464. top: safeArea.top,
  465. left: safeArea.left,
  466. right: result.windowWidth - safeArea.right,
  467. bottom: result.windowHeight - safeArea.bottom };
  468. }
  469. }
  470. var protocols = {
  471. redirectTo: redirectTo,
  472. navigateTo: navigateTo,
  473. previewImage: previewImage,
  474. getSystemInfo: {
  475. returnValue: addSafeAreaInsets },
  476. getSystemInfoSync: {
  477. returnValue: addSafeAreaInsets } };
  478. var todos = [
  479. 'vibrate',
  480. 'preloadPage',
  481. 'unPreloadPage',
  482. 'loadSubPackage'];
  483. var canIUses = [];
  484. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  485. function processCallback(methodName, method, returnValue) {
  486. return function (res) {
  487. return method(processReturnValue(methodName, res, returnValue));
  488. };
  489. }
  490. function processArgs(methodName, fromArgs) {var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  491. if (isPlainObject(fromArgs)) {// 一般 api 的参数解析
  492. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  493. if (isFn(argsOption)) {
  494. argsOption = argsOption(fromArgs, toArgs) || {};
  495. }
  496. for (var key in fromArgs) {
  497. if (hasOwn(argsOption, key)) {
  498. var keyOption = argsOption[key];
  499. if (isFn(keyOption)) {
  500. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  501. }
  502. if (!keyOption) {// 不支持的参数
  503. console.warn("\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F ".concat(methodName, "\u6682\u4E0D\u652F\u6301").concat(key));
  504. } else if (isStr(keyOption)) {// 重写参数 key
  505. toArgs[keyOption] = fromArgs[key];
  506. } else if (isPlainObject(keyOption)) {// {name:newName,value:value}可重新指定参数 key:value
  507. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  508. }
  509. } else if (CALLBACKS.indexOf(key) !== -1) {
  510. if (isFn(fromArgs[key])) {
  511. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  512. }
  513. } else {
  514. if (!keepFromArgs) {
  515. toArgs[key] = fromArgs[key];
  516. }
  517. }
  518. }
  519. return toArgs;
  520. } else if (isFn(fromArgs)) {
  521. fromArgs = processCallback(methodName, fromArgs, returnValue);
  522. }
  523. return fromArgs;
  524. }
  525. function processReturnValue(methodName, res, returnValue) {var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  526. if (isFn(protocols.returnValue)) {// 处理通用 returnValue
  527. res = protocols.returnValue(methodName, res);
  528. }
  529. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  530. }
  531. function wrapper(methodName, method) {
  532. if (hasOwn(protocols, methodName)) {
  533. var protocol = protocols[methodName];
  534. if (!protocol) {// 暂不支持的 api
  535. return function () {
  536. console.error("\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F \u6682\u4E0D\u652F\u6301".concat(methodName));
  537. };
  538. }
  539. return function (arg1, arg2) {// 目前 api 最多两个参数
  540. var options = protocol;
  541. if (isFn(protocol)) {
  542. options = protocol(arg1);
  543. }
  544. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  545. var args = [arg1];
  546. if (typeof arg2 !== 'undefined') {
  547. args.push(arg2);
  548. }
  549. if (isFn(options.name)) {
  550. methodName = options.name(arg1);
  551. } else if (isStr(options.name)) {
  552. methodName = options.name;
  553. }
  554. var returnValue = wx[methodName].apply(wx, args);
  555. if (isSyncApi(methodName)) {// 同步 api
  556. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  557. }
  558. return returnValue;
  559. };
  560. }
  561. return method;
  562. }
  563. var todoApis = Object.create(null);
  564. var TODOS = [
  565. 'onTabBarMidButtonTap',
  566. 'subscribePush',
  567. 'unsubscribePush',
  568. 'onPush',
  569. 'offPush',
  570. 'share'];
  571. function createTodoApi(name) {
  572. return function todoApi(_ref)
  573. {var fail = _ref.fail,complete = _ref.complete;
  574. var res = {
  575. errMsg: "".concat(name, ":fail:\u6682\u4E0D\u652F\u6301 ").concat(name, " \u65B9\u6CD5") };
  576. isFn(fail) && fail(res);
  577. isFn(complete) && complete(res);
  578. };
  579. }
  580. TODOS.forEach(function (name) {
  581. todoApis[name] = createTodoApi(name);
  582. });
  583. var providers = {
  584. oauth: ['weixin'],
  585. share: ['weixin'],
  586. payment: ['wxpay'],
  587. push: ['weixin'] };
  588. function getProvider(_ref2)
  589. {var service = _ref2.service,success = _ref2.success,fail = _ref2.fail,complete = _ref2.complete;
  590. var res = false;
  591. if (providers[service]) {
  592. res = {
  593. errMsg: 'getProvider:ok',
  594. service: service,
  595. provider: providers[service] };
  596. isFn(success) && success(res);
  597. } else {
  598. res = {
  599. errMsg: 'getProvider:fail:服务[' + service + ']不存在' };
  600. isFn(fail) && fail(res);
  601. }
  602. isFn(complete) && complete(res);
  603. }
  604. var extraApi = /*#__PURE__*/Object.freeze({
  605. __proto__: null,
  606. getProvider: getProvider });
  607. var getEmitter = function () {
  608. var Emitter;
  609. return function getUniEmitter() {
  610. if (!Emitter) {
  611. Emitter = new _vue.default();
  612. }
  613. return Emitter;
  614. };
  615. }();
  616. function apply(ctx, method, args) {
  617. return ctx[method].apply(ctx, args);
  618. }
  619. function $on() {
  620. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  621. }
  622. function $off() {
  623. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  624. }
  625. function $once() {
  626. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  627. }
  628. function $emit() {
  629. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  630. }
  631. var eventApi = /*#__PURE__*/Object.freeze({
  632. __proto__: null,
  633. $on: $on,
  634. $off: $off,
  635. $once: $once,
  636. $emit: $emit });
  637. var api = /*#__PURE__*/Object.freeze({
  638. __proto__: null });
  639. var MPPage = Page;
  640. var MPComponent = Component;
  641. var customizeRE = /:/g;
  642. var customize = cached(function (str) {
  643. return camelize(str.replace(customizeRE, '-'));
  644. });
  645. function initTriggerEvent(mpInstance) {
  646. {
  647. if (!wx.canIUse('nextTick')) {
  648. return;
  649. }
  650. }
  651. var oldTriggerEvent = mpInstance.triggerEvent;
  652. mpInstance.triggerEvent = function (event) {for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {args[_key4 - 1] = arguments[_key4];}
  653. return oldTriggerEvent.apply(mpInstance, [customize(event)].concat(args));
  654. };
  655. }
  656. function initHook(name, options) {
  657. var oldHook = options[name];
  658. if (!oldHook) {
  659. options[name] = function () {
  660. initTriggerEvent(this);
  661. };
  662. } else {
  663. options[name] = function () {
  664. initTriggerEvent(this);for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {args[_key5] = arguments[_key5];}
  665. return oldHook.apply(this, args);
  666. };
  667. }
  668. }
  669. Page = function Page() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  670. initHook('onLoad', options);
  671. return MPPage(options);
  672. };
  673. Component = function Component() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  674. initHook('created', options);
  675. return MPComponent(options);
  676. };
  677. var PAGE_EVENT_HOOKS = [
  678. 'onPullDownRefresh',
  679. 'onReachBottom',
  680. 'onAddToFavorites',
  681. 'onShareTimeline',
  682. 'onShareAppMessage',
  683. 'onPageScroll',
  684. 'onResize',
  685. 'onTabItemTap'];
  686. function initMocks(vm, mocks) {
  687. var mpInstance = vm.$mp[vm.mpType];
  688. mocks.forEach(function (mock) {
  689. if (hasOwn(mpInstance, mock)) {
  690. vm[mock] = mpInstance[mock];
  691. }
  692. });
  693. }
  694. function hasHook(hook, vueOptions) {
  695. if (!vueOptions) {
  696. return true;
  697. }
  698. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  699. return true;
  700. }
  701. vueOptions = vueOptions.default || vueOptions;
  702. if (isFn(vueOptions)) {
  703. if (isFn(vueOptions.extendOptions[hook])) {
  704. return true;
  705. }
  706. if (vueOptions.super &&
  707. vueOptions.super.options &&
  708. Array.isArray(vueOptions.super.options[hook])) {
  709. return true;
  710. }
  711. return false;
  712. }
  713. if (isFn(vueOptions[hook])) {
  714. return true;
  715. }
  716. var mixins = vueOptions.mixins;
  717. if (Array.isArray(mixins)) {
  718. return !!mixins.find(function (mixin) {return hasHook(hook, mixin);});
  719. }
  720. }
  721. function initHooks(mpOptions, hooks, vueOptions) {
  722. hooks.forEach(function (hook) {
  723. if (hasHook(hook, vueOptions)) {
  724. mpOptions[hook] = function (args) {
  725. return this.$vm && this.$vm.__call_hook(hook, args);
  726. };
  727. }
  728. });
  729. }
  730. function initVueComponent(Vue, vueOptions) {
  731. vueOptions = vueOptions.default || vueOptions;
  732. var VueComponent;
  733. if (isFn(vueOptions)) {
  734. VueComponent = vueOptions;
  735. } else {
  736. VueComponent = Vue.extend(vueOptions);
  737. }
  738. vueOptions = VueComponent.options;
  739. return [VueComponent, vueOptions];
  740. }
  741. function initSlots(vm, vueSlots) {
  742. if (Array.isArray(vueSlots) && vueSlots.length) {
  743. var $slots = Object.create(null);
  744. vueSlots.forEach(function (slotName) {
  745. $slots[slotName] = true;
  746. });
  747. vm.$scopedSlots = vm.$slots = $slots;
  748. }
  749. }
  750. function initVueIds(vueIds, mpInstance) {
  751. vueIds = (vueIds || '').split(',');
  752. var len = vueIds.length;
  753. if (len === 1) {
  754. mpInstance._$vueId = vueIds[0];
  755. } else if (len === 2) {
  756. mpInstance._$vueId = vueIds[0];
  757. mpInstance._$vuePid = vueIds[1];
  758. }
  759. }
  760. function initData(vueOptions, context) {
  761. var data = vueOptions.data || {};
  762. var methods = vueOptions.methods || {};
  763. if (typeof data === 'function') {
  764. try {
  765. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  766. } catch (e) {
  767. if (Object({"NODE_ENV":"development","VUE_APP_NAME":"forest","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  768. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  769. }
  770. }
  771. } else {
  772. try {
  773. // 对 data 格式化
  774. data = JSON.parse(JSON.stringify(data));
  775. } catch (e) {}
  776. }
  777. if (!isPlainObject(data)) {
  778. data = {};
  779. }
  780. Object.keys(methods).forEach(function (methodName) {
  781. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  782. data[methodName] = methods[methodName];
  783. }
  784. });
  785. return data;
  786. }
  787. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  788. function createObserver(name) {
  789. return function observer(newVal, oldVal) {
  790. if (this.$vm) {
  791. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  792. }
  793. };
  794. }
  795. function initBehaviors(vueOptions, initBehavior) {
  796. var vueBehaviors = vueOptions.behaviors;
  797. var vueExtends = vueOptions.extends;
  798. var vueMixins = vueOptions.mixins;
  799. var vueProps = vueOptions.props;
  800. if (!vueProps) {
  801. vueOptions.props = vueProps = [];
  802. }
  803. var behaviors = [];
  804. if (Array.isArray(vueBehaviors)) {
  805. vueBehaviors.forEach(function (behavior) {
  806. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  807. if (behavior === 'uni://form-field') {
  808. if (Array.isArray(vueProps)) {
  809. vueProps.push('name');
  810. vueProps.push('value');
  811. } else {
  812. vueProps.name = {
  813. type: String,
  814. default: '' };
  815. vueProps.value = {
  816. type: [String, Number, Boolean, Array, Object, Date],
  817. default: '' };
  818. }
  819. }
  820. });
  821. }
  822. if (isPlainObject(vueExtends) && vueExtends.props) {
  823. behaviors.push(
  824. initBehavior({
  825. properties: initProperties(vueExtends.props, true) }));
  826. }
  827. if (Array.isArray(vueMixins)) {
  828. vueMixins.forEach(function (vueMixin) {
  829. if (isPlainObject(vueMixin) && vueMixin.props) {
  830. behaviors.push(
  831. initBehavior({
  832. properties: initProperties(vueMixin.props, true) }));
  833. }
  834. });
  835. }
  836. return behaviors;
  837. }
  838. function parsePropType(key, type, defaultValue, file) {
  839. // [String]=>String
  840. if (Array.isArray(type) && type.length === 1) {
  841. return type[0];
  842. }
  843. return type;
  844. }
  845. function initProperties(props) {var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  846. var properties = {};
  847. if (!isBehavior) {
  848. properties.vueId = {
  849. type: String,
  850. value: '' };
  851. // 用于字节跳动小程序模拟抽象节点
  852. properties.generic = {
  853. type: Object,
  854. value: null };
  855. properties.vueSlots = { // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  856. type: null,
  857. value: [],
  858. observer: function observer(newVal, oldVal) {
  859. var $slots = Object.create(null);
  860. newVal.forEach(function (slotName) {
  861. $slots[slotName] = true;
  862. });
  863. this.setData({
  864. $slots: $slots });
  865. } };
  866. }
  867. if (Array.isArray(props)) {// ['title']
  868. props.forEach(function (key) {
  869. properties[key] = {
  870. type: null,
  871. observer: createObserver(key) };
  872. });
  873. } else if (isPlainObject(props)) {// {title:{type:String,default:''},content:String}
  874. Object.keys(props).forEach(function (key) {
  875. var opts = props[key];
  876. if (isPlainObject(opts)) {// title:{type:String,default:''}
  877. var value = opts.default;
  878. if (isFn(value)) {
  879. value = value();
  880. }
  881. opts.type = parsePropType(key, opts.type);
  882. properties[key] = {
  883. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  884. value: value,
  885. observer: createObserver(key) };
  886. } else {// content:String
  887. var type = parsePropType(key, opts);
  888. properties[key] = {
  889. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  890. observer: createObserver(key) };
  891. }
  892. });
  893. }
  894. return properties;
  895. }
  896. function wrapper$1(event) {
  897. // TODO 又得兼容 mpvue 的 mp 对象
  898. try {
  899. event.mp = JSON.parse(JSON.stringify(event));
  900. } catch (e) {}
  901. event.stopPropagation = noop;
  902. event.preventDefault = noop;
  903. event.target = event.target || {};
  904. if (!hasOwn(event, 'detail')) {
  905. event.detail = {};
  906. }
  907. if (hasOwn(event, 'markerId')) {
  908. event.detail = typeof event.detail === 'object' ? event.detail : {};
  909. event.detail.markerId = event.markerId;
  910. }
  911. if (isPlainObject(event.detail)) {
  912. event.target = Object.assign({}, event.target, event.detail);
  913. }
  914. return event;
  915. }
  916. function getExtraValue(vm, dataPathsArray) {
  917. var context = vm;
  918. dataPathsArray.forEach(function (dataPathArray) {
  919. var dataPath = dataPathArray[0];
  920. var value = dataPathArray[2];
  921. if (dataPath || typeof value !== 'undefined') {// ['','',index,'disable']
  922. var propPath = dataPathArray[1];
  923. var valuePath = dataPathArray[3];
  924. var vFor;
  925. if (Number.isInteger(dataPath)) {
  926. vFor = dataPath;
  927. } else if (!dataPath) {
  928. vFor = context;
  929. } else if (typeof dataPath === 'string' && dataPath) {
  930. if (dataPath.indexOf('#s#') === 0) {
  931. vFor = dataPath.substr(3);
  932. } else {
  933. vFor = vm.__get_value(dataPath, context);
  934. }
  935. }
  936. if (Number.isInteger(vFor)) {
  937. context = value;
  938. } else if (!propPath) {
  939. context = vFor[value];
  940. } else {
  941. if (Array.isArray(vFor)) {
  942. context = vFor.find(function (vForItem) {
  943. return vm.__get_value(propPath, vForItem) === value;
  944. });
  945. } else if (isPlainObject(vFor)) {
  946. context = Object.keys(vFor).find(function (vForKey) {
  947. return vm.__get_value(propPath, vFor[vForKey]) === value;
  948. });
  949. } else {
  950. console.error('v-for 暂不支持循环数据:', vFor);
  951. }
  952. }
  953. if (valuePath) {
  954. context = vm.__get_value(valuePath, context);
  955. }
  956. }
  957. });
  958. return context;
  959. }
  960. function processEventExtra(vm, extra, event) {
  961. var extraObj = {};
  962. if (Array.isArray(extra) && extra.length) {
  963. /**
  964. *[
  965. * ['data.items', 'data.id', item.data.id],
  966. * ['metas', 'id', meta.id]
  967. *],
  968. *[
  969. * ['data.items', 'data.id', item.data.id],
  970. * ['metas', 'id', meta.id]
  971. *],
  972. *'test'
  973. */
  974. extra.forEach(function (dataPath, index) {
  975. if (typeof dataPath === 'string') {
  976. if (!dataPath) {// model,prop.sync
  977. extraObj['$' + index] = vm;
  978. } else {
  979. if (dataPath === '$event') {// $event
  980. extraObj['$' + index] = event;
  981. } else if (dataPath === 'arguments') {
  982. if (event.detail && event.detail.__args__) {
  983. extraObj['$' + index] = event.detail.__args__;
  984. } else {
  985. extraObj['$' + index] = [event];
  986. }
  987. } else if (dataPath.indexOf('$event.') === 0) {// $event.target.value
  988. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  989. } else {
  990. extraObj['$' + index] = vm.__get_value(dataPath);
  991. }
  992. }
  993. } else {
  994. extraObj['$' + index] = getExtraValue(vm, dataPath);
  995. }
  996. });
  997. }
  998. return extraObj;
  999. }
  1000. function getObjByArray(arr) {
  1001. var obj = {};
  1002. for (var i = 1; i < arr.length; i++) {
  1003. var element = arr[i];
  1004. obj[element[0]] = element[1];
  1005. }
  1006. return obj;
  1007. }
  1008. function processEventArgs(vm, event) {var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];var isCustom = arguments.length > 4 ? arguments[4] : undefined;var methodName = arguments.length > 5 ? arguments[5] : undefined;
  1009. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  1010. if (isCustom) {// 自定义事件
  1011. isCustomMPEvent = event.currentTarget &&
  1012. event.currentTarget.dataset &&
  1013. event.currentTarget.dataset.comType === 'wx';
  1014. if (!args.length) {// 无参数,直接传入 event 或 detail 数组
  1015. if (isCustomMPEvent) {
  1016. return [event];
  1017. }
  1018. return event.detail.__args__ || event.detail;
  1019. }
  1020. }
  1021. var extraObj = processEventExtra(vm, extra, event);
  1022. var ret = [];
  1023. args.forEach(function (arg) {
  1024. if (arg === '$event') {
  1025. if (methodName === '__set_model' && !isCustom) {// input v-model value
  1026. ret.push(event.target.value);
  1027. } else {
  1028. if (isCustom && !isCustomMPEvent) {
  1029. ret.push(event.detail.__args__[0]);
  1030. } else {// wxcomponent 组件或内置组件
  1031. ret.push(event);
  1032. }
  1033. }
  1034. } else {
  1035. if (Array.isArray(arg) && arg[0] === 'o') {
  1036. ret.push(getObjByArray(arg));
  1037. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  1038. ret.push(extraObj[arg]);
  1039. } else {
  1040. ret.push(arg);
  1041. }
  1042. }
  1043. });
  1044. return ret;
  1045. }
  1046. var ONCE = '~';
  1047. var CUSTOM = '^';
  1048. function isMatchEventType(eventType, optType) {
  1049. return eventType === optType ||
  1050. optType === 'regionchange' && (
  1051. eventType === 'begin' ||
  1052. eventType === 'end');
  1053. }
  1054. function getContextVm(vm) {
  1055. var $parent = vm.$parent;
  1056. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  1057. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  1058. $parent = $parent.$parent;
  1059. }
  1060. return $parent && $parent.$parent;
  1061. }
  1062. function handleEvent(event) {var _this2 = this;
  1063. event = wrapper$1(event);
  1064. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  1065. var dataset = (event.currentTarget || event.target).dataset;
  1066. if (!dataset) {
  1067. return console.warn('事件信息不存在');
  1068. }
  1069. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  1070. if (!eventOpts) {
  1071. return console.warn('事件信息不存在');
  1072. }
  1073. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  1074. var eventType = event.type;
  1075. var ret = [];
  1076. eventOpts.forEach(function (eventOpt) {
  1077. var type = eventOpt[0];
  1078. var eventsArray = eventOpt[1];
  1079. var isCustom = type.charAt(0) === CUSTOM;
  1080. type = isCustom ? type.slice(1) : type;
  1081. var isOnce = type.charAt(0) === ONCE;
  1082. type = isOnce ? type.slice(1) : type;
  1083. if (eventsArray && isMatchEventType(eventType, type)) {
  1084. eventsArray.forEach(function (eventArray) {
  1085. var methodName = eventArray[0];
  1086. if (methodName) {
  1087. var handlerCtx = _this2.$vm;
  1088. if (handlerCtx.$options.generic) {// mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  1089. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  1090. }
  1091. if (methodName === '$emit') {
  1092. handlerCtx.$emit.apply(handlerCtx,
  1093. processEventArgs(
  1094. _this2.$vm,
  1095. event,
  1096. eventArray[1],
  1097. eventArray[2],
  1098. isCustom,
  1099. methodName));
  1100. return;
  1101. }
  1102. var handler = handlerCtx[methodName];
  1103. if (!isFn(handler)) {
  1104. throw new Error(" _vm.".concat(methodName, " is not a function"));
  1105. }
  1106. if (isOnce) {
  1107. if (handler.once) {
  1108. return;
  1109. }
  1110. handler.once = true;
  1111. }
  1112. var params = processEventArgs(
  1113. _this2.$vm,
  1114. event,
  1115. eventArray[1],
  1116. eventArray[2],
  1117. isCustom,
  1118. methodName);
  1119. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  1120. // eslint-disable-next-line no-sparse-arrays
  1121. ret.push(handler.apply(handlerCtx, (Array.isArray(params) ? params : []).concat([,,,,,,,,,, event])));
  1122. }
  1123. });
  1124. }
  1125. });
  1126. if (
  1127. eventType === 'input' &&
  1128. ret.length === 1 &&
  1129. typeof ret[0] !== 'undefined')
  1130. {
  1131. return ret[0];
  1132. }
  1133. }
  1134. var hooks = [
  1135. 'onShow',
  1136. 'onHide',
  1137. 'onError',
  1138. 'onPageNotFound',
  1139. 'onThemeChange',
  1140. 'onUnhandledRejection'];
  1141. function parseBaseApp(vm, _ref3)
  1142. {var mocks = _ref3.mocks,initRefs = _ref3.initRefs;
  1143. if (vm.$options.store) {
  1144. _vue.default.prototype.$store = vm.$options.store;
  1145. }
  1146. _vue.default.prototype.mpHost = "mp-weixin";
  1147. _vue.default.mixin({
  1148. beforeCreate: function beforeCreate() {
  1149. if (!this.$options.mpType) {
  1150. return;
  1151. }
  1152. this.mpType = this.$options.mpType;
  1153. this.$mp = _defineProperty({
  1154. data: {} },
  1155. this.mpType, this.$options.mpInstance);
  1156. this.$scope = this.$options.mpInstance;
  1157. delete this.$options.mpType;
  1158. delete this.$options.mpInstance;
  1159. if (this.mpType !== 'app') {
  1160. initRefs(this);
  1161. initMocks(this, mocks);
  1162. }
  1163. } });
  1164. var appOptions = {
  1165. onLaunch: function onLaunch(args) {
  1166. if (this.$vm) {// 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  1167. return;
  1168. }
  1169. {
  1170. if (!wx.canIUse('nextTick')) {// 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  1171. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  1172. }
  1173. }
  1174. this.$vm = vm;
  1175. this.$vm.$mp = {
  1176. app: this };
  1177. this.$vm.$scope = this;
  1178. // vm 上也挂载 globalData
  1179. this.$vm.globalData = this.globalData;
  1180. this.$vm._isMounted = true;
  1181. this.$vm.__call_hook('mounted', args);
  1182. this.$vm.__call_hook('onLaunch', args);
  1183. } };
  1184. // 兼容旧版本 globalData
  1185. appOptions.globalData = vm.$options.globalData || {};
  1186. // 将 methods 中的方法挂在 getApp() 中
  1187. var methods = vm.$options.methods;
  1188. if (methods) {
  1189. Object.keys(methods).forEach(function (name) {
  1190. appOptions[name] = methods[name];
  1191. });
  1192. }
  1193. initHooks(appOptions, hooks);
  1194. return appOptions;
  1195. }
  1196. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1197. function findVmByVueId(vm, vuePid) {
  1198. var $children = vm.$children;
  1199. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1200. for (var i = $children.length - 1; i >= 0; i--) {
  1201. var childVm = $children[i];
  1202. if (childVm.$scope._$vueId === vuePid) {
  1203. return childVm;
  1204. }
  1205. }
  1206. // 反向递归查找
  1207. var parentVm;
  1208. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1209. parentVm = findVmByVueId($children[_i], vuePid);
  1210. if (parentVm) {
  1211. return parentVm;
  1212. }
  1213. }
  1214. }
  1215. function initBehavior(options) {
  1216. return Behavior(options);
  1217. }
  1218. function isPage() {
  1219. return !!this.route;
  1220. }
  1221. function initRelation(detail) {
  1222. this.triggerEvent('__l', detail);
  1223. }
  1224. function initRefs(vm) {
  1225. var mpInstance = vm.$scope;
  1226. Object.defineProperty(vm, '$refs', {
  1227. get: function get() {
  1228. var $refs = {};
  1229. var components = mpInstance.selectAllComponents('.vue-ref');
  1230. components.forEach(function (component) {
  1231. var ref = component.dataset.ref;
  1232. $refs[ref] = component.$vm || component;
  1233. });
  1234. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for');
  1235. forComponents.forEach(function (component) {
  1236. var ref = component.dataset.ref;
  1237. if (!$refs[ref]) {
  1238. $refs[ref] = [];
  1239. }
  1240. $refs[ref].push(component.$vm || component);
  1241. });
  1242. return $refs;
  1243. } });
  1244. }
  1245. function handleLink(event) {var _ref4 =
  1246. event.detail || event.value,vuePid = _ref4.vuePid,vueOptions = _ref4.vueOptions; // detail 是微信,value 是百度(dipatch)
  1247. var parentVm;
  1248. if (vuePid) {
  1249. parentVm = findVmByVueId(this.$vm, vuePid);
  1250. }
  1251. if (!parentVm) {
  1252. parentVm = this.$vm;
  1253. }
  1254. vueOptions.parent = parentVm;
  1255. }
  1256. function parseApp(vm) {
  1257. return parseBaseApp(vm, {
  1258. mocks: mocks,
  1259. initRefs: initRefs });
  1260. }
  1261. function createApp(vm) {
  1262. _vue.default.prototype.getOpenerEventChannel = function () {
  1263. if (!this.__eventChannel__) {
  1264. this.__eventChannel__ = new EventChannel();
  1265. }
  1266. return this.__eventChannel__;
  1267. };
  1268. var callHook = _vue.default.prototype.__call_hook;
  1269. _vue.default.prototype.__call_hook = function (hook, args) {
  1270. if (hook === 'onLoad' && args && args.__id__) {
  1271. this.__eventChannel__ = getEventChannel(args.__id__);
  1272. delete args.__id__;
  1273. }
  1274. return callHook.call(this, hook, args);
  1275. };
  1276. App(parseApp(vm));
  1277. return vm;
  1278. }
  1279. var encodeReserveRE = /[!'()*]/g;
  1280. var encodeReserveReplacer = function encodeReserveReplacer(c) {return '%' + c.charCodeAt(0).toString(16);};
  1281. var commaRE = /%2C/g;
  1282. // fixed encodeURIComponent which is more conformant to RFC3986:
  1283. // - escapes [!'()*]
  1284. // - preserve commas
  1285. var encode = function encode(str) {return encodeURIComponent(str).
  1286. replace(encodeReserveRE, encodeReserveReplacer).
  1287. replace(commaRE, ',');};
  1288. function stringifyQuery(obj) {var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  1289. var res = obj ? Object.keys(obj).map(function (key) {
  1290. var val = obj[key];
  1291. if (val === undefined) {
  1292. return '';
  1293. }
  1294. if (val === null) {
  1295. return encodeStr(key);
  1296. }
  1297. if (Array.isArray(val)) {
  1298. var result = [];
  1299. val.forEach(function (val2) {
  1300. if (val2 === undefined) {
  1301. return;
  1302. }
  1303. if (val2 === null) {
  1304. result.push(encodeStr(key));
  1305. } else {
  1306. result.push(encodeStr(key) + '=' + encodeStr(val2));
  1307. }
  1308. });
  1309. return result.join('&');
  1310. }
  1311. return encodeStr(key) + '=' + encodeStr(val);
  1312. }).filter(function (x) {return x.length > 0;}).join('&') : null;
  1313. return res ? "?".concat(res) : '';
  1314. }
  1315. function parseBaseComponent(vueComponentOptions)
  1316. {var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},isPage = _ref5.isPage,initRelation = _ref5.initRelation;var _initVueComponent =
  1317. initVueComponent(_vue.default, vueComponentOptions),_initVueComponent2 = _slicedToArray(_initVueComponent, 2),VueComponent = _initVueComponent2[0],vueOptions = _initVueComponent2[1];
  1318. var options = _objectSpread({
  1319. multipleSlots: true,
  1320. addGlobalClass: true },
  1321. vueOptions.options || {});
  1322. {
  1323. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  1324. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  1325. Object.assign(options, vueOptions['mp-weixin'].options);
  1326. }
  1327. }
  1328. var componentOptions = {
  1329. options: options,
  1330. data: initData(vueOptions, _vue.default.prototype),
  1331. behaviors: initBehaviors(vueOptions, initBehavior),
  1332. properties: initProperties(vueOptions.props, false, vueOptions.__file),
  1333. lifetimes: {
  1334. attached: function attached() {
  1335. var properties = this.properties;
  1336. var options = {
  1337. mpType: isPage.call(this) ? 'page' : 'component',
  1338. mpInstance: this,
  1339. propsData: properties };
  1340. initVueIds(properties.vueId, this);
  1341. // 处理父子关系
  1342. initRelation.call(this, {
  1343. vuePid: this._$vuePid,
  1344. vueOptions: options });
  1345. // 初始化 vue 实例
  1346. this.$vm = new VueComponent(options);
  1347. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  1348. initSlots(this.$vm, properties.vueSlots);
  1349. // 触发首次 setData
  1350. this.$vm.$mount();
  1351. },
  1352. ready: function ready() {
  1353. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  1354. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  1355. if (this.$vm) {
  1356. this.$vm._isMounted = true;
  1357. this.$vm.__call_hook('mounted');
  1358. this.$vm.__call_hook('onReady');
  1359. }
  1360. },
  1361. detached: function detached() {
  1362. this.$vm && this.$vm.$destroy();
  1363. } },
  1364. pageLifetimes: {
  1365. show: function show(args) {
  1366. this.$vm && this.$vm.__call_hook('onPageShow', args);
  1367. },
  1368. hide: function hide() {
  1369. this.$vm && this.$vm.__call_hook('onPageHide');
  1370. },
  1371. resize: function resize(size) {
  1372. this.$vm && this.$vm.__call_hook('onPageResize', size);
  1373. } },
  1374. methods: {
  1375. __l: handleLink,
  1376. __e: handleEvent } };
  1377. // externalClasses
  1378. if (vueOptions.externalClasses) {
  1379. componentOptions.externalClasses = vueOptions.externalClasses;
  1380. }
  1381. if (Array.isArray(vueOptions.wxsCallMethods)) {
  1382. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  1383. componentOptions.methods[callMethod] = function (args) {
  1384. return this.$vm[callMethod](args);
  1385. };
  1386. });
  1387. }
  1388. if (isPage) {
  1389. return componentOptions;
  1390. }
  1391. return [componentOptions, VueComponent];
  1392. }
  1393. function parseComponent(vueComponentOptions) {
  1394. return parseBaseComponent(vueComponentOptions, {
  1395. isPage: isPage,
  1396. initRelation: initRelation });
  1397. }
  1398. var hooks$1 = [
  1399. 'onShow',
  1400. 'onHide',
  1401. 'onUnload'];
  1402. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  1403. function parseBasePage(vuePageOptions, _ref6)
  1404. {var isPage = _ref6.isPage,initRelation = _ref6.initRelation;
  1405. var pageOptions = parseComponent(vuePageOptions);
  1406. initHooks(pageOptions.methods, hooks$1, vuePageOptions);
  1407. pageOptions.methods.onLoad = function (query) {
  1408. this.options = query;
  1409. var copyQuery = Object.assign({}, query);
  1410. delete copyQuery.__id__;
  1411. this.$page = {
  1412. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery) };
  1413. this.$vm.$mp.query = query; // 兼容 mpvue
  1414. this.$vm.__call_hook('onLoad', query);
  1415. };
  1416. return pageOptions;
  1417. }
  1418. function parsePage(vuePageOptions) {
  1419. return parseBasePage(vuePageOptions, {
  1420. isPage: isPage,
  1421. initRelation: initRelation });
  1422. }
  1423. function createPage(vuePageOptions) {
  1424. {
  1425. return Component(parsePage(vuePageOptions));
  1426. }
  1427. }
  1428. function createComponent(vueOptions) {
  1429. {
  1430. return Component(parseComponent(vueOptions));
  1431. }
  1432. }
  1433. todos.forEach(function (todoApi) {
  1434. protocols[todoApi] = false;
  1435. });
  1436. canIUses.forEach(function (canIUseApi) {
  1437. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name :
  1438. canIUseApi;
  1439. if (!wx.canIUse(apiName)) {
  1440. protocols[canIUseApi] = false;
  1441. }
  1442. });
  1443. var uni = {};
  1444. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  1445. uni = new Proxy({}, {
  1446. get: function get(target, name) {
  1447. if (hasOwn(target, name)) {
  1448. return target[name];
  1449. }
  1450. if (baseApi[name]) {
  1451. return baseApi[name];
  1452. }
  1453. if (api[name]) {
  1454. return promisify(name, api[name]);
  1455. }
  1456. {
  1457. if (extraApi[name]) {
  1458. return promisify(name, extraApi[name]);
  1459. }
  1460. if (todoApis[name]) {
  1461. return promisify(name, todoApis[name]);
  1462. }
  1463. }
  1464. if (eventApi[name]) {
  1465. return eventApi[name];
  1466. }
  1467. if (!hasOwn(wx, name) && !hasOwn(protocols, name)) {
  1468. return;
  1469. }
  1470. return promisify(name, wrapper(name, wx[name]));
  1471. },
  1472. set: function set(target, name, value) {
  1473. target[name] = value;
  1474. return true;
  1475. } });
  1476. } else {
  1477. Object.keys(baseApi).forEach(function (name) {
  1478. uni[name] = baseApi[name];
  1479. });
  1480. {
  1481. Object.keys(todoApis).forEach(function (name) {
  1482. uni[name] = promisify(name, todoApis[name]);
  1483. });
  1484. Object.keys(extraApi).forEach(function (name) {
  1485. uni[name] = promisify(name, todoApis[name]);
  1486. });
  1487. }
  1488. Object.keys(eventApi).forEach(function (name) {
  1489. uni[name] = eventApi[name];
  1490. });
  1491. Object.keys(api).forEach(function (name) {
  1492. uni[name] = promisify(name, api[name]);
  1493. });
  1494. Object.keys(wx).forEach(function (name) {
  1495. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  1496. uni[name] = promisify(name, wrapper(name, wx[name]));
  1497. }
  1498. });
  1499. }
  1500. wx.createApp = createApp;
  1501. wx.createPage = createPage;
  1502. wx.createComponent = createComponent;
  1503. var uni$1 = uni;var _default =
  1504. uni$1;exports.default = _default;
  1505. /***/ }),
  1506. /***/ 11:
  1507. /*!**********************************************************************************************************!*\
  1508. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  1509. \**********************************************************************************************************/
  1510. /*! exports provided: default */
  1511. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1512. "use strict";
  1513. __webpack_require__.r(__webpack_exports__);
  1514. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  1515. /* globals __VUE_SSR_CONTEXT__ */
  1516. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  1517. // This module is a runtime utility for cleaner component module output and will
  1518. // be included in the final webpack user bundle.
  1519. function normalizeComponent (
  1520. scriptExports,
  1521. render,
  1522. staticRenderFns,
  1523. functionalTemplate,
  1524. injectStyles,
  1525. scopeId,
  1526. moduleIdentifier, /* server only */
  1527. shadowMode, /* vue-cli only */
  1528. components, // fixed by xxxxxx auto components
  1529. renderjs // fixed by xxxxxx renderjs
  1530. ) {
  1531. // Vue.extend constructor export interop
  1532. var options = typeof scriptExports === 'function'
  1533. ? scriptExports.options
  1534. : scriptExports
  1535. // fixed by xxxxxx auto components
  1536. if (components) {
  1537. if (!options.components) {
  1538. options.components = {}
  1539. }
  1540. var hasOwn = Object.prototype.hasOwnProperty
  1541. for (var name in components) {
  1542. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  1543. options.components[name] = components[name]
  1544. }
  1545. }
  1546. }
  1547. // fixed by xxxxxx renderjs
  1548. if (renderjs) {
  1549. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  1550. this[renderjs.__module] = this
  1551. });
  1552. (options.mixins || (options.mixins = [])).push(renderjs)
  1553. }
  1554. // render functions
  1555. if (render) {
  1556. options.render = render
  1557. options.staticRenderFns = staticRenderFns
  1558. options._compiled = true
  1559. }
  1560. // functional template
  1561. if (functionalTemplate) {
  1562. options.functional = true
  1563. }
  1564. // scopedId
  1565. if (scopeId) {
  1566. options._scopeId = 'data-v-' + scopeId
  1567. }
  1568. var hook
  1569. if (moduleIdentifier) { // server build
  1570. hook = function (context) {
  1571. // 2.3 injection
  1572. context =
  1573. context || // cached call
  1574. (this.$vnode && this.$vnode.ssrContext) || // stateful
  1575. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  1576. // 2.2 with runInNewContext: true
  1577. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  1578. context = __VUE_SSR_CONTEXT__
  1579. }
  1580. // inject component styles
  1581. if (injectStyles) {
  1582. injectStyles.call(this, context)
  1583. }
  1584. // register component module identifier for async chunk inferrence
  1585. if (context && context._registeredComponents) {
  1586. context._registeredComponents.add(moduleIdentifier)
  1587. }
  1588. }
  1589. // used by ssr in case component is cached and beforeCreate
  1590. // never gets called
  1591. options._ssrRegister = hook
  1592. } else if (injectStyles) {
  1593. hook = shadowMode
  1594. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  1595. : injectStyles
  1596. }
  1597. if (hook) {
  1598. if (options.functional) {
  1599. // for template-only hot-reload because in that case the render fn doesn't
  1600. // go through the normalizer
  1601. options._injectStyles = hook
  1602. // register for functioal component in vue file
  1603. var originalRender = options.render
  1604. options.render = function renderWithStyleInjection (h, context) {
  1605. hook.call(context)
  1606. return originalRender(h, context)
  1607. }
  1608. } else {
  1609. // inject component registration as beforeCreate hook
  1610. var existing = options.beforeCreate
  1611. options.beforeCreate = existing
  1612. ? [].concat(existing, hook)
  1613. : [hook]
  1614. }
  1615. }
  1616. return {
  1617. exports: scriptExports,
  1618. options: options
  1619. }
  1620. }
  1621. /***/ }),
  1622. /***/ 12:
  1623. /*!******************************************!*\
  1624. !*** D:/wwwroot/forest/config/config.js ***!
  1625. \******************************************/
  1626. /*! no static exports found */
  1627. /***/ (function(module, exports, __webpack_require__) {
  1628. "use strict";
  1629. Object.defineProperty(exports, "__esModule", { value: true });exports.config = void 0;var config = {
  1630. //dev
  1631. // apiBaseurl:'http://forest.hw.hongweisoft.com/data/forest-portal',//测试
  1632. // apiBaseurl:'http://172.16.90.64:9098/forest-portal',//测试
  1633. // apiBaseurl:'http://172.16.90.50:9098/forest-portal',//邱波
  1634. // apiBaseurl:'http://172.16.90.3:9098/forest-portal',//邱波
  1635. // apiBaseurl:'http://wx.hw.hongweisoft.com/zddtest/forest-portal',//东东
  1636. // apiBaseurl:'http://wx.hw.hongweisoft.com/zddapi/forest-portal',//东东
  1637. // apiBaseurl:'http://wx.hw.hongweisoft.com/fqb/forest-portal',//东东
  1638. //本地图片
  1639. // imgUrl:'http://'+window.location.host,
  1640. // 图片占位
  1641. placeImg: 'http://placekitten.com',
  1642. // loginUrl:'http://tanhui.hongweisoft.com/forest-portal/wechat/h5/authorize?returnUrl=/',//登录后跳转到测试链接
  1643. // loginUrl:'http://forest.hw.hongweisoft.com/data/forest-portal/wechat/h5/authorize?returnUrl=http://forest.hw.hongweisoft.com/#/',//登录后跳转链接
  1644. // loginUrl:'http://wx.hw.hongweisoft.com/zddtest/forest-portal/wechat/h5/authorize?returnUrl=http://172.16.90.25:8080/#/',//登录后跳转到测试链接 东东
  1645. // loginUrl:'http://wx.hw.hongweisoft.com/fqb/forest-portal/wechat/h5/authorize?returnUrl=http://172.16.90.25:8080/#/',//登录后跳转到测试链接 东东
  1646. // loginUrl:'http://wx.hw.hongweisoft.com/zddtest/forest-portal/wechat/h5/authorize?returnUrl=http://foresth5test.hw.hongweisoft.com/#/',//登录后跳转到测试链接 东东
  1647. // loginUrl:'http://wx.hw.hongweisoft.com/zddtest/forest-portal/wechat/h5/authorize?returnUrl=http://wx.hw.hongweisoft.com/gcz/#/',//登录后跳转到测试链接 东东
  1648. // 公司测试配置
  1649. apiBaseurl: 'http://wx.hw.hongweisoft.com/forestapi/forest-portal', //测试
  1650. // loginUrl:'http://wx.hw.hongweisoft.com/forestapi/forest-portal/wechat/h5/authorize?returnUrl=http://172.16.90.25:8080/#/',
  1651. loginUrl: 'http://wx.hw.hongweisoft.com/forestapi/forest-portal/wechat/h5/authorize?returnUrl=http://wx.hw.hongweisoft.com/hhforest/', //登录后跳转到测试链接
  1652. //online 线上配置
  1653. // loginUrl:'http://wxh5.gzqlyx.com/api/forest-portal/wechat/h5/authorize?returnUrl=http://wxh5.gzqlyx.com/#/',//登录后跳转链接
  1654. // apiBaseurl:'http://wxh5.gzqlyx.com/api/forest-portal',
  1655. //gloab 全局
  1656. imgUrl: "" };exports.config = config;
  1657. /***/ }),
  1658. /***/ 13:
  1659. /*!****************************************!*\
  1660. !*** D:/wwwroot/forest/store/index.js ***!
  1661. \****************************************/
  1662. /*! no static exports found */
  1663. /***/ (function(module, exports, __webpack_require__) {
  1664. "use strict";
  1665. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));
  1666. var _vuex = _interopRequireDefault(__webpack_require__(/*! vuex */ 14));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  1667. _vue.default.use(_vuex.default);
  1668. var store = new _vuex.default.Store({
  1669. state: {
  1670. hasLogin: false,
  1671. token: '',
  1672. userInfo: {} },
  1673. mutations: {
  1674. setLogin: function setLogin(state, userInfo) {
  1675. state.userInfo = userInfo || {};
  1676. state.token = userInfo.accessToken;
  1677. state.tokenhead = userInfo.tokenhead;
  1678. state.hasLogin = Boolean(state.token);
  1679. uni.setStorage({
  1680. key: "userInfo",
  1681. data: userInfo.data });
  1682. uni.setStorage({
  1683. key: "hasLogin",
  1684. data: true });
  1685. uni.setStorage({
  1686. key: "token",
  1687. data: userInfo.accessToken });
  1688. uni.setStorage({
  1689. key: "tokenhead",
  1690. data: userInfo.tokenhead });
  1691. },
  1692. logout: function logout(state) {
  1693. userInfo = {};
  1694. hasLogin: false,
  1695. uni.removeStorage({
  1696. key: "userInfo" });
  1697. } },
  1698. actions: {} });var _default =
  1699. store;exports.default = _default;
  1700. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  1701. /***/ }),
  1702. /***/ 14:
  1703. /*!********************************************!*\
  1704. !*** ./node_modules/vuex/dist/vuex.esm.js ***!
  1705. \********************************************/
  1706. /*! exports provided: default, Store, createNamespacedHelpers, install, mapActions, mapGetters, mapMutations, mapState */
  1707. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1708. "use strict";
  1709. __webpack_require__.r(__webpack_exports__);
  1710. /* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Store", function() { return Store; });
  1711. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createNamespacedHelpers", function() { return createNamespacedHelpers; });
  1712. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "install", function() { return install; });
  1713. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapActions", function() { return mapActions; });
  1714. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapGetters", function() { return mapGetters; });
  1715. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapMutations", function() { return mapMutations; });
  1716. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapState", function() { return mapState; });
  1717. /*!
  1718. * vuex v3.4.0
  1719. * (c) 2020 Evan You
  1720. * @license MIT
  1721. */
  1722. function applyMixin (Vue) {
  1723. var version = Number(Vue.version.split('.')[0]);
  1724. if (version >= 2) {
  1725. Vue.mixin({ beforeCreate: vuexInit });
  1726. } else {
  1727. // override init and inject vuex init procedure
  1728. // for 1.x backwards compatibility.
  1729. var _init = Vue.prototype._init;
  1730. Vue.prototype._init = function (options) {
  1731. if ( options === void 0 ) options = {};
  1732. options.init = options.init
  1733. ? [vuexInit].concat(options.init)
  1734. : vuexInit;
  1735. _init.call(this, options);
  1736. };
  1737. }
  1738. /**
  1739. * Vuex init hook, injected into each instances init hooks list.
  1740. */
  1741. function vuexInit () {
  1742. var options = this.$options;
  1743. // store injection
  1744. if (options.store) {
  1745. this.$store = typeof options.store === 'function'
  1746. ? options.store()
  1747. : options.store;
  1748. } else if (options.parent && options.parent.$store) {
  1749. this.$store = options.parent.$store;
  1750. }
  1751. }
  1752. }
  1753. var target = typeof window !== 'undefined'
  1754. ? window
  1755. : typeof global !== 'undefined'
  1756. ? global
  1757. : {};
  1758. var devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  1759. function devtoolPlugin (store) {
  1760. if (!devtoolHook) { return }
  1761. store._devtoolHook = devtoolHook;
  1762. devtoolHook.emit('vuex:init', store);
  1763. devtoolHook.on('vuex:travel-to-state', function (targetState) {
  1764. store.replaceState(targetState);
  1765. });
  1766. store.subscribe(function (mutation, state) {
  1767. devtoolHook.emit('vuex:mutation', mutation, state);
  1768. }, { prepend: true });
  1769. store.subscribeAction(function (action, state) {
  1770. devtoolHook.emit('vuex:action', action, state);
  1771. }, { prepend: true });
  1772. }
  1773. /**
  1774. * Get the first item that pass the test
  1775. * by second argument function
  1776. *
  1777. * @param {Array} list
  1778. * @param {Function} f
  1779. * @return {*}
  1780. */
  1781. /**
  1782. * forEach for object
  1783. */
  1784. function forEachValue (obj, fn) {
  1785. Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });
  1786. }
  1787. function isObject (obj) {
  1788. return obj !== null && typeof obj === 'object'
  1789. }
  1790. function isPromise (val) {
  1791. return val && typeof val.then === 'function'
  1792. }
  1793. function assert (condition, msg) {
  1794. if (!condition) { throw new Error(("[vuex] " + msg)) }
  1795. }
  1796. function partial (fn, arg) {
  1797. return function () {
  1798. return fn(arg)
  1799. }
  1800. }
  1801. // Base data struct for store's module, package with some attribute and method
  1802. var Module = function Module (rawModule, runtime) {
  1803. this.runtime = runtime;
  1804. // Store some children item
  1805. this._children = Object.create(null);
  1806. // Store the origin module object which passed by programmer
  1807. this._rawModule = rawModule;
  1808. var rawState = rawModule.state;
  1809. // Store the origin module's state
  1810. this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
  1811. };
  1812. var prototypeAccessors = { namespaced: { configurable: true } };
  1813. prototypeAccessors.namespaced.get = function () {
  1814. return !!this._rawModule.namespaced
  1815. };
  1816. Module.prototype.addChild = function addChild (key, module) {
  1817. this._children[key] = module;
  1818. };
  1819. Module.prototype.removeChild = function removeChild (key) {
  1820. delete this._children[key];
  1821. };
  1822. Module.prototype.getChild = function getChild (key) {
  1823. return this._children[key]
  1824. };
  1825. Module.prototype.hasChild = function hasChild (key) {
  1826. return key in this._children
  1827. };
  1828. Module.prototype.update = function update (rawModule) {
  1829. this._rawModule.namespaced = rawModule.namespaced;
  1830. if (rawModule.actions) {
  1831. this._rawModule.actions = rawModule.actions;
  1832. }
  1833. if (rawModule.mutations) {
  1834. this._rawModule.mutations = rawModule.mutations;
  1835. }
  1836. if (rawModule.getters) {
  1837. this._rawModule.getters = rawModule.getters;
  1838. }
  1839. };
  1840. Module.prototype.forEachChild = function forEachChild (fn) {
  1841. forEachValue(this._children, fn);
  1842. };
  1843. Module.prototype.forEachGetter = function forEachGetter (fn) {
  1844. if (this._rawModule.getters) {
  1845. forEachValue(this._rawModule.getters, fn);
  1846. }
  1847. };
  1848. Module.prototype.forEachAction = function forEachAction (fn) {
  1849. if (this._rawModule.actions) {
  1850. forEachValue(this._rawModule.actions, fn);
  1851. }
  1852. };
  1853. Module.prototype.forEachMutation = function forEachMutation (fn) {
  1854. if (this._rawModule.mutations) {
  1855. forEachValue(this._rawModule.mutations, fn);
  1856. }
  1857. };
  1858. Object.defineProperties( Module.prototype, prototypeAccessors );
  1859. var ModuleCollection = function ModuleCollection (rawRootModule) {
  1860. // register root module (Vuex.Store options)
  1861. this.register([], rawRootModule, false);
  1862. };
  1863. ModuleCollection.prototype.get = function get (path) {
  1864. return path.reduce(function (module, key) {
  1865. return module.getChild(key)
  1866. }, this.root)
  1867. };
  1868. ModuleCollection.prototype.getNamespace = function getNamespace (path) {
  1869. var module = this.root;
  1870. return path.reduce(function (namespace, key) {
  1871. module = module.getChild(key);
  1872. return namespace + (module.namespaced ? key + '/' : '')
  1873. }, '')
  1874. };
  1875. ModuleCollection.prototype.update = function update$1 (rawRootModule) {
  1876. update([], this.root, rawRootModule);
  1877. };
  1878. ModuleCollection.prototype.register = function register (path, rawModule, runtime) {
  1879. var this$1 = this;
  1880. if ( runtime === void 0 ) runtime = true;
  1881. if ((true)) {
  1882. assertRawModule(path, rawModule);
  1883. }
  1884. var newModule = new Module(rawModule, runtime);
  1885. if (path.length === 0) {
  1886. this.root = newModule;
  1887. } else {
  1888. var parent = this.get(path.slice(0, -1));
  1889. parent.addChild(path[path.length - 1], newModule);
  1890. }
  1891. // register nested modules
  1892. if (rawModule.modules) {
  1893. forEachValue(rawModule.modules, function (rawChildModule, key) {
  1894. this$1.register(path.concat(key), rawChildModule, runtime);
  1895. });
  1896. }
  1897. };
  1898. ModuleCollection.prototype.unregister = function unregister (path) {
  1899. var parent = this.get(path.slice(0, -1));
  1900. var key = path[path.length - 1];
  1901. if (!parent.getChild(key).runtime) { return }
  1902. parent.removeChild(key);
  1903. };
  1904. ModuleCollection.prototype.isRegistered = function isRegistered (path) {
  1905. var parent = this.get(path.slice(0, -1));
  1906. var key = path[path.length - 1];
  1907. return parent.hasChild(key)
  1908. };
  1909. function update (path, targetModule, newModule) {
  1910. if ((true)) {
  1911. assertRawModule(path, newModule);
  1912. }
  1913. // update target module
  1914. targetModule.update(newModule);
  1915. // update nested modules
  1916. if (newModule.modules) {
  1917. for (var key in newModule.modules) {
  1918. if (!targetModule.getChild(key)) {
  1919. if ((true)) {
  1920. console.warn(
  1921. "[vuex] trying to add a new module '" + key + "' on hot reloading, " +
  1922. 'manual reload is needed'
  1923. );
  1924. }
  1925. return
  1926. }
  1927. update(
  1928. path.concat(key),
  1929. targetModule.getChild(key),
  1930. newModule.modules[key]
  1931. );
  1932. }
  1933. }
  1934. }
  1935. var functionAssert = {
  1936. assert: function (value) { return typeof value === 'function'; },
  1937. expected: 'function'
  1938. };
  1939. var objectAssert = {
  1940. assert: function (value) { return typeof value === 'function' ||
  1941. (typeof value === 'object' && typeof value.handler === 'function'); },
  1942. expected: 'function or object with "handler" function'
  1943. };
  1944. var assertTypes = {
  1945. getters: functionAssert,
  1946. mutations: functionAssert,
  1947. actions: objectAssert
  1948. };
  1949. function assertRawModule (path, rawModule) {
  1950. Object.keys(assertTypes).forEach(function (key) {
  1951. if (!rawModule[key]) { return }
  1952. var assertOptions = assertTypes[key];
  1953. forEachValue(rawModule[key], function (value, type) {
  1954. assert(
  1955. assertOptions.assert(value),
  1956. makeAssertionMessage(path, key, type, value, assertOptions.expected)
  1957. );
  1958. });
  1959. });
  1960. }
  1961. function makeAssertionMessage (path, key, type, value, expected) {
  1962. var buf = key + " should be " + expected + " but \"" + key + "." + type + "\"";
  1963. if (path.length > 0) {
  1964. buf += " in module \"" + (path.join('.')) + "\"";
  1965. }
  1966. buf += " is " + (JSON.stringify(value)) + ".";
  1967. return buf
  1968. }
  1969. var Vue; // bind on install
  1970. var Store = function Store (options) {
  1971. var this$1 = this;
  1972. if ( options === void 0 ) options = {};
  1973. // Auto install if it is not done yet and `window` has `Vue`.
  1974. // To allow users to avoid auto-installation in some cases,
  1975. // this code should be placed here. See #731
  1976. if (!Vue && typeof window !== 'undefined' && window.Vue) {
  1977. install(window.Vue);
  1978. }
  1979. if ((true)) {
  1980. assert(Vue, "must call Vue.use(Vuex) before creating a store instance.");
  1981. assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser.");
  1982. assert(this instanceof Store, "store must be called with the new operator.");
  1983. }
  1984. var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];
  1985. var strict = options.strict; if ( strict === void 0 ) strict = false;
  1986. // store internal state
  1987. this._committing = false;
  1988. this._actions = Object.create(null);
  1989. this._actionSubscribers = [];
  1990. this._mutations = Object.create(null);
  1991. this._wrappedGetters = Object.create(null);
  1992. this._modules = new ModuleCollection(options);
  1993. this._modulesNamespaceMap = Object.create(null);
  1994. this._subscribers = [];
  1995. this._watcherVM = new Vue();
  1996. this._makeLocalGettersCache = Object.create(null);
  1997. // bind commit and dispatch to self
  1998. var store = this;
  1999. var ref = this;
  2000. var dispatch = ref.dispatch;
  2001. var commit = ref.commit;
  2002. this.dispatch = function boundDispatch (type, payload) {
  2003. return dispatch.call(store, type, payload)
  2004. };
  2005. this.commit = function boundCommit (type, payload, options) {
  2006. return commit.call(store, type, payload, options)
  2007. };
  2008. // strict mode
  2009. this.strict = strict;
  2010. var state = this._modules.root.state;
  2011. // init root module.
  2012. // this also recursively registers all sub-modules
  2013. // and collects all module getters inside this._wrappedGetters
  2014. installModule(this, state, [], this._modules.root);
  2015. // initialize the store vm, which is responsible for the reactivity
  2016. // (also registers _wrappedGetters as computed properties)
  2017. resetStoreVM(this, state);
  2018. // apply plugins
  2019. plugins.forEach(function (plugin) { return plugin(this$1); });
  2020. var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;
  2021. if (useDevtools) {
  2022. devtoolPlugin(this);
  2023. }
  2024. };
  2025. var prototypeAccessors$1 = { state: { configurable: true } };
  2026. prototypeAccessors$1.state.get = function () {
  2027. return this._vm._data.$$state
  2028. };
  2029. prototypeAccessors$1.state.set = function (v) {
  2030. if ((true)) {
  2031. assert(false, "use store.replaceState() to explicit replace store state.");
  2032. }
  2033. };
  2034. Store.prototype.commit = function commit (_type, _payload, _options) {
  2035. var this$1 = this;
  2036. // check object-style commit
  2037. var ref = unifyObjectStyle(_type, _payload, _options);
  2038. var type = ref.type;
  2039. var payload = ref.payload;
  2040. var options = ref.options;
  2041. var mutation = { type: type, payload: payload };
  2042. var entry = this._mutations[type];
  2043. if (!entry) {
  2044. if ((true)) {
  2045. console.error(("[vuex] unknown mutation type: " + type));
  2046. }
  2047. return
  2048. }
  2049. this._withCommit(function () {
  2050. entry.forEach(function commitIterator (handler) {
  2051. handler(payload);
  2052. });
  2053. });
  2054. this._subscribers
  2055. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  2056. .forEach(function (sub) { return sub(mutation, this$1.state); });
  2057. if (
  2058. ( true) &&
  2059. options && options.silent
  2060. ) {
  2061. console.warn(
  2062. "[vuex] mutation type: " + type + ". Silent option has been removed. " +
  2063. 'Use the filter functionality in the vue-devtools'
  2064. );
  2065. }
  2066. };
  2067. Store.prototype.dispatch = function dispatch (_type, _payload) {
  2068. var this$1 = this;
  2069. // check object-style dispatch
  2070. var ref = unifyObjectStyle(_type, _payload);
  2071. var type = ref.type;
  2072. var payload = ref.payload;
  2073. var action = { type: type, payload: payload };
  2074. var entry = this._actions[type];
  2075. if (!entry) {
  2076. if ((true)) {
  2077. console.error(("[vuex] unknown action type: " + type));
  2078. }
  2079. return
  2080. }
  2081. try {
  2082. this._actionSubscribers
  2083. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  2084. .filter(function (sub) { return sub.before; })
  2085. .forEach(function (sub) { return sub.before(action, this$1.state); });
  2086. } catch (e) {
  2087. if ((true)) {
  2088. console.warn("[vuex] error in before action subscribers: ");
  2089. console.error(e);
  2090. }
  2091. }
  2092. var result = entry.length > 1
  2093. ? Promise.all(entry.map(function (handler) { return handler(payload); }))
  2094. : entry[0](payload);
  2095. return new Promise(function (resolve, reject) {
  2096. result.then(function (res) {
  2097. try {
  2098. this$1._actionSubscribers
  2099. .filter(function (sub) { return sub.after; })
  2100. .forEach(function (sub) { return sub.after(action, this$1.state); });
  2101. } catch (e) {
  2102. if ((true)) {
  2103. console.warn("[vuex] error in after action subscribers: ");
  2104. console.error(e);
  2105. }
  2106. }
  2107. resolve(res);
  2108. }, function (error) {
  2109. try {
  2110. this$1._actionSubscribers
  2111. .filter(function (sub) { return sub.error; })
  2112. .forEach(function (sub) { return sub.error(action, this$1.state, error); });
  2113. } catch (e) {
  2114. if ((true)) {
  2115. console.warn("[vuex] error in error action subscribers: ");
  2116. console.error(e);
  2117. }
  2118. }
  2119. reject(error);
  2120. });
  2121. })
  2122. };
  2123. Store.prototype.subscribe = function subscribe (fn, options) {
  2124. return genericSubscribe(fn, this._subscribers, options)
  2125. };
  2126. Store.prototype.subscribeAction = function subscribeAction (fn, options) {
  2127. var subs = typeof fn === 'function' ? { before: fn } : fn;
  2128. return genericSubscribe(subs, this._actionSubscribers, options)
  2129. };
  2130. Store.prototype.watch = function watch (getter, cb, options) {
  2131. var this$1 = this;
  2132. if ((true)) {
  2133. assert(typeof getter === 'function', "store.watch only accepts a function.");
  2134. }
  2135. return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)
  2136. };
  2137. Store.prototype.replaceState = function replaceState (state) {
  2138. var this$1 = this;
  2139. this._withCommit(function () {
  2140. this$1._vm._data.$$state = state;
  2141. });
  2142. };
  2143. Store.prototype.registerModule = function registerModule (path, rawModule, options) {
  2144. if ( options === void 0 ) options = {};
  2145. if (typeof path === 'string') { path = [path]; }
  2146. if ((true)) {
  2147. assert(Array.isArray(path), "module path must be a string or an Array.");
  2148. assert(path.length > 0, 'cannot register the root module by using registerModule.');
  2149. }
  2150. this._modules.register(path, rawModule);
  2151. installModule(this, this.state, path, this._modules.get(path), options.preserveState);
  2152. // reset store to update getters...
  2153. resetStoreVM(this, this.state);
  2154. };
  2155. Store.prototype.unregisterModule = function unregisterModule (path) {
  2156. var this$1 = this;
  2157. if (typeof path === 'string') { path = [path]; }
  2158. if ((true)) {
  2159. assert(Array.isArray(path), "module path must be a string or an Array.");
  2160. }
  2161. this._modules.unregister(path);
  2162. this._withCommit(function () {
  2163. var parentState = getNestedState(this$1.state, path.slice(0, -1));
  2164. Vue.delete(parentState, path[path.length - 1]);
  2165. });
  2166. resetStore(this);
  2167. };
  2168. Store.prototype.hasModule = function hasModule (path) {
  2169. if (typeof path === 'string') { path = [path]; }
  2170. if ((true)) {
  2171. assert(Array.isArray(path), "module path must be a string or an Array.");
  2172. }
  2173. return this._modules.isRegistered(path)
  2174. };
  2175. Store.prototype.hotUpdate = function hotUpdate (newOptions) {
  2176. this._modules.update(newOptions);
  2177. resetStore(this, true);
  2178. };
  2179. Store.prototype._withCommit = function _withCommit (fn) {
  2180. var committing = this._committing;
  2181. this._committing = true;
  2182. fn();
  2183. this._committing = committing;
  2184. };
  2185. Object.defineProperties( Store.prototype, prototypeAccessors$1 );
  2186. function genericSubscribe (fn, subs, options) {
  2187. if (subs.indexOf(fn) < 0) {
  2188. options && options.prepend
  2189. ? subs.unshift(fn)
  2190. : subs.push(fn);
  2191. }
  2192. return function () {
  2193. var i = subs.indexOf(fn);
  2194. if (i > -1) {
  2195. subs.splice(i, 1);
  2196. }
  2197. }
  2198. }
  2199. function resetStore (store, hot) {
  2200. store._actions = Object.create(null);
  2201. store._mutations = Object.create(null);
  2202. store._wrappedGetters = Object.create(null);
  2203. store._modulesNamespaceMap = Object.create(null);
  2204. var state = store.state;
  2205. // init all modules
  2206. installModule(store, state, [], store._modules.root, true);
  2207. // reset vm
  2208. resetStoreVM(store, state, hot);
  2209. }
  2210. function resetStoreVM (store, state, hot) {
  2211. var oldVm = store._vm;
  2212. // bind store public getters
  2213. store.getters = {};
  2214. // reset local getters cache
  2215. store._makeLocalGettersCache = Object.create(null);
  2216. var wrappedGetters = store._wrappedGetters;
  2217. var computed = {};
  2218. forEachValue(wrappedGetters, function (fn, key) {
  2219. // use computed to leverage its lazy-caching mechanism
  2220. // direct inline function use will lead to closure preserving oldVm.
  2221. // using partial to return function with only arguments preserved in closure environment.
  2222. computed[key] = partial(fn, store);
  2223. Object.defineProperty(store.getters, key, {
  2224. get: function () { return store._vm[key]; },
  2225. enumerable: true // for local getters
  2226. });
  2227. });
  2228. // use a Vue instance to store the state tree
  2229. // suppress warnings just in case the user has added
  2230. // some funky global mixins
  2231. var silent = Vue.config.silent;
  2232. Vue.config.silent = true;
  2233. store._vm = new Vue({
  2234. data: {
  2235. $$state: state
  2236. },
  2237. computed: computed
  2238. });
  2239. Vue.config.silent = silent;
  2240. // enable strict mode for new vm
  2241. if (store.strict) {
  2242. enableStrictMode(store);
  2243. }
  2244. if (oldVm) {
  2245. if (hot) {
  2246. // dispatch changes in all subscribed watchers
  2247. // to force getter re-evaluation for hot reloading.
  2248. store._withCommit(function () {
  2249. oldVm._data.$$state = null;
  2250. });
  2251. }
  2252. Vue.nextTick(function () { return oldVm.$destroy(); });
  2253. }
  2254. }
  2255. function installModule (store, rootState, path, module, hot) {
  2256. var isRoot = !path.length;
  2257. var namespace = store._modules.getNamespace(path);
  2258. // register in namespace map
  2259. if (module.namespaced) {
  2260. if (store._modulesNamespaceMap[namespace] && ("development" !== 'production')) {
  2261. console.error(("[vuex] duplicate namespace " + namespace + " for the namespaced module " + (path.join('/'))));
  2262. }
  2263. store._modulesNamespaceMap[namespace] = module;
  2264. }
  2265. // set state
  2266. if (!isRoot && !hot) {
  2267. var parentState = getNestedState(rootState, path.slice(0, -1));
  2268. var moduleName = path[path.length - 1];
  2269. store._withCommit(function () {
  2270. if ((true)) {
  2271. if (moduleName in parentState) {
  2272. console.warn(
  2273. ("[vuex] state field \"" + moduleName + "\" was overridden by a module with the same name at \"" + (path.join('.')) + "\"")
  2274. );
  2275. }
  2276. }
  2277. Vue.set(parentState, moduleName, module.state);
  2278. });
  2279. }
  2280. var local = module.context = makeLocalContext(store, namespace, path);
  2281. module.forEachMutation(function (mutation, key) {
  2282. var namespacedType = namespace + key;
  2283. registerMutation(store, namespacedType, mutation, local);
  2284. });
  2285. module.forEachAction(function (action, key) {
  2286. var type = action.root ? key : namespace + key;
  2287. var handler = action.handler || action;
  2288. registerAction(store, type, handler, local);
  2289. });
  2290. module.forEachGetter(function (getter, key) {
  2291. var namespacedType = namespace + key;
  2292. registerGetter(store, namespacedType, getter, local);
  2293. });
  2294. module.forEachChild(function (child, key) {
  2295. installModule(store, rootState, path.concat(key), child, hot);
  2296. });
  2297. }
  2298. /**
  2299. * make localized dispatch, commit, getters and state
  2300. * if there is no namespace, just use root ones
  2301. */
  2302. function makeLocalContext (store, namespace, path) {
  2303. var noNamespace = namespace === '';
  2304. var local = {
  2305. dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
  2306. var args = unifyObjectStyle(_type, _payload, _options);
  2307. var payload = args.payload;
  2308. var options = args.options;
  2309. var type = args.type;
  2310. if (!options || !options.root) {
  2311. type = namespace + type;
  2312. if (( true) && !store._actions[type]) {
  2313. console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type));
  2314. return
  2315. }
  2316. }
  2317. return store.dispatch(type, payload)
  2318. },
  2319. commit: noNamespace ? store.commit : function (_type, _payload, _options) {
  2320. var args = unifyObjectStyle(_type, _payload, _options);
  2321. var payload = args.payload;
  2322. var options = args.options;
  2323. var type = args.type;
  2324. if (!options || !options.root) {
  2325. type = namespace + type;
  2326. if (( true) && !store._mutations[type]) {
  2327. console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type));
  2328. return
  2329. }
  2330. }
  2331. store.commit(type, payload, options);
  2332. }
  2333. };
  2334. // getters and state object must be gotten lazily
  2335. // because they will be changed by vm update
  2336. Object.defineProperties(local, {
  2337. getters: {
  2338. get: noNamespace
  2339. ? function () { return store.getters; }
  2340. : function () { return makeLocalGetters(store, namespace); }
  2341. },
  2342. state: {
  2343. get: function () { return getNestedState(store.state, path); }
  2344. }
  2345. });
  2346. return local
  2347. }
  2348. function makeLocalGetters (store, namespace) {
  2349. if (!store._makeLocalGettersCache[namespace]) {
  2350. var gettersProxy = {};
  2351. var splitPos = namespace.length;
  2352. Object.keys(store.getters).forEach(function (type) {
  2353. // skip if the target getter is not match this namespace
  2354. if (type.slice(0, splitPos) !== namespace) { return }
  2355. // extract local getter type
  2356. var localType = type.slice(splitPos);
  2357. // Add a port to the getters proxy.
  2358. // Define as getter property because
  2359. // we do not want to evaluate the getters in this time.
  2360. Object.defineProperty(gettersProxy, localType, {
  2361. get: function () { return store.getters[type]; },
  2362. enumerable: true
  2363. });
  2364. });
  2365. store._makeLocalGettersCache[namespace] = gettersProxy;
  2366. }
  2367. return store._makeLocalGettersCache[namespace]
  2368. }
  2369. function registerMutation (store, type, handler, local) {
  2370. var entry = store._mutations[type] || (store._mutations[type] = []);
  2371. entry.push(function wrappedMutationHandler (payload) {
  2372. handler.call(store, local.state, payload);
  2373. });
  2374. }
  2375. function registerAction (store, type, handler, local) {
  2376. var entry = store._actions[type] || (store._actions[type] = []);
  2377. entry.push(function wrappedActionHandler (payload) {
  2378. var res = handler.call(store, {
  2379. dispatch: local.dispatch,
  2380. commit: local.commit,
  2381. getters: local.getters,
  2382. state: local.state,
  2383. rootGetters: store.getters,
  2384. rootState: store.state
  2385. }, payload);
  2386. if (!isPromise(res)) {
  2387. res = Promise.resolve(res);
  2388. }
  2389. if (store._devtoolHook) {
  2390. return res.catch(function (err) {
  2391. store._devtoolHook.emit('vuex:error', err);
  2392. throw err
  2393. })
  2394. } else {
  2395. return res
  2396. }
  2397. });
  2398. }
  2399. function registerGetter (store, type, rawGetter, local) {
  2400. if (store._wrappedGetters[type]) {
  2401. if ((true)) {
  2402. console.error(("[vuex] duplicate getter key: " + type));
  2403. }
  2404. return
  2405. }
  2406. store._wrappedGetters[type] = function wrappedGetter (store) {
  2407. return rawGetter(
  2408. local.state, // local state
  2409. local.getters, // local getters
  2410. store.state, // root state
  2411. store.getters // root getters
  2412. )
  2413. };
  2414. }
  2415. function enableStrictMode (store) {
  2416. store._vm.$watch(function () { return this._data.$$state }, function () {
  2417. if ((true)) {
  2418. assert(store._committing, "do not mutate vuex store state outside mutation handlers.");
  2419. }
  2420. }, { deep: true, sync: true });
  2421. }
  2422. function getNestedState (state, path) {
  2423. return path.reduce(function (state, key) { return state[key]; }, state)
  2424. }
  2425. function unifyObjectStyle (type, payload, options) {
  2426. if (isObject(type) && type.type) {
  2427. options = payload;
  2428. payload = type;
  2429. type = type.type;
  2430. }
  2431. if ((true)) {
  2432. assert(typeof type === 'string', ("expects string as the type, but found " + (typeof type) + "."));
  2433. }
  2434. return { type: type, payload: payload, options: options }
  2435. }
  2436. function install (_Vue) {
  2437. if (Vue && _Vue === Vue) {
  2438. if ((true)) {
  2439. console.error(
  2440. '[vuex] already installed. Vue.use(Vuex) should be called only once.'
  2441. );
  2442. }
  2443. return
  2444. }
  2445. Vue = _Vue;
  2446. applyMixin(Vue);
  2447. }
  2448. /**
  2449. * Reduce the code which written in Vue.js for getting the state.
  2450. * @param {String} [namespace] - Module's namespace
  2451. * @param {Object|Array} states # Object's item can be a function which accept state and getters for param, you can do something for state and getters in it.
  2452. * @param {Object}
  2453. */
  2454. var mapState = normalizeNamespace(function (namespace, states) {
  2455. var res = {};
  2456. if (( true) && !isValidMap(states)) {
  2457. console.error('[vuex] mapState: mapper parameter must be either an Array or an Object');
  2458. }
  2459. normalizeMap(states).forEach(function (ref) {
  2460. var key = ref.key;
  2461. var val = ref.val;
  2462. res[key] = function mappedState () {
  2463. var state = this.$store.state;
  2464. var getters = this.$store.getters;
  2465. if (namespace) {
  2466. var module = getModuleByNamespace(this.$store, 'mapState', namespace);
  2467. if (!module) {
  2468. return
  2469. }
  2470. state = module.context.state;
  2471. getters = module.context.getters;
  2472. }
  2473. return typeof val === 'function'
  2474. ? val.call(this, state, getters)
  2475. : state[val]
  2476. };
  2477. // mark vuex getter for devtools
  2478. res[key].vuex = true;
  2479. });
  2480. return res
  2481. });
  2482. /**
  2483. * Reduce the code which written in Vue.js for committing the mutation
  2484. * @param {String} [namespace] - Module's namespace
  2485. * @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept anthor params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function.
  2486. * @return {Object}
  2487. */
  2488. var mapMutations = normalizeNamespace(function (namespace, mutations) {
  2489. var res = {};
  2490. if (( true) && !isValidMap(mutations)) {
  2491. console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object');
  2492. }
  2493. normalizeMap(mutations).forEach(function (ref) {
  2494. var key = ref.key;
  2495. var val = ref.val;
  2496. res[key] = function mappedMutation () {
  2497. var args = [], len = arguments.length;
  2498. while ( len-- ) args[ len ] = arguments[ len ];
  2499. // Get the commit method from store
  2500. var commit = this.$store.commit;
  2501. if (namespace) {
  2502. var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
  2503. if (!module) {
  2504. return
  2505. }
  2506. commit = module.context.commit;
  2507. }
  2508. return typeof val === 'function'
  2509. ? val.apply(this, [commit].concat(args))
  2510. : commit.apply(this.$store, [val].concat(args))
  2511. };
  2512. });
  2513. return res
  2514. });
  2515. /**
  2516. * Reduce the code which written in Vue.js for getting the getters
  2517. * @param {String} [namespace] - Module's namespace
  2518. * @param {Object|Array} getters
  2519. * @return {Object}
  2520. */
  2521. var mapGetters = normalizeNamespace(function (namespace, getters) {
  2522. var res = {};
  2523. if (( true) && !isValidMap(getters)) {
  2524. console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object');
  2525. }
  2526. normalizeMap(getters).forEach(function (ref) {
  2527. var key = ref.key;
  2528. var val = ref.val;
  2529. // The namespace has been mutated by normalizeNamespace
  2530. val = namespace + val;
  2531. res[key] = function mappedGetter () {
  2532. if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
  2533. return
  2534. }
  2535. if (( true) && !(val in this.$store.getters)) {
  2536. console.error(("[vuex] unknown getter: " + val));
  2537. return
  2538. }
  2539. return this.$store.getters[val]
  2540. };
  2541. // mark vuex getter for devtools
  2542. res[key].vuex = true;
  2543. });
  2544. return res
  2545. });
  2546. /**
  2547. * Reduce the code which written in Vue.js for dispatch the action
  2548. * @param {String} [namespace] - Module's namespace
  2549. * @param {Object|Array} actions # Object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. You can dispatch action and do any other things in this function. specially, You need to pass anthor params from the mapped function.
  2550. * @return {Object}
  2551. */
  2552. var mapActions = normalizeNamespace(function (namespace, actions) {
  2553. var res = {};
  2554. if (( true) && !isValidMap(actions)) {
  2555. console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object');
  2556. }
  2557. normalizeMap(actions).forEach(function (ref) {
  2558. var key = ref.key;
  2559. var val = ref.val;
  2560. res[key] = function mappedAction () {
  2561. var args = [], len = arguments.length;
  2562. while ( len-- ) args[ len ] = arguments[ len ];
  2563. // get dispatch function from store
  2564. var dispatch = this.$store.dispatch;
  2565. if (namespace) {
  2566. var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
  2567. if (!module) {
  2568. return
  2569. }
  2570. dispatch = module.context.dispatch;
  2571. }
  2572. return typeof val === 'function'
  2573. ? val.apply(this, [dispatch].concat(args))
  2574. : dispatch.apply(this.$store, [val].concat(args))
  2575. };
  2576. });
  2577. return res
  2578. });
  2579. /**
  2580. * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object
  2581. * @param {String} namespace
  2582. * @return {Object}
  2583. */
  2584. var createNamespacedHelpers = function (namespace) { return ({
  2585. mapState: mapState.bind(null, namespace),
  2586. mapGetters: mapGetters.bind(null, namespace),
  2587. mapMutations: mapMutations.bind(null, namespace),
  2588. mapActions: mapActions.bind(null, namespace)
  2589. }); };
  2590. /**
  2591. * Normalize the map
  2592. * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]
  2593. * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]
  2594. * @param {Array|Object} map
  2595. * @return {Object}
  2596. */
  2597. function normalizeMap (map) {
  2598. if (!isValidMap(map)) {
  2599. return []
  2600. }
  2601. return Array.isArray(map)
  2602. ? map.map(function (key) { return ({ key: key, val: key }); })
  2603. : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })
  2604. }
  2605. /**
  2606. * Validate whether given map is valid or not
  2607. * @param {*} map
  2608. * @return {Boolean}
  2609. */
  2610. function isValidMap (map) {
  2611. return Array.isArray(map) || isObject(map)
  2612. }
  2613. /**
  2614. * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map.
  2615. * @param {Function} fn
  2616. * @return {Function}
  2617. */
  2618. function normalizeNamespace (fn) {
  2619. return function (namespace, map) {
  2620. if (typeof namespace !== 'string') {
  2621. map = namespace;
  2622. namespace = '';
  2623. } else if (namespace.charAt(namespace.length - 1) !== '/') {
  2624. namespace += '/';
  2625. }
  2626. return fn(namespace, map)
  2627. }
  2628. }
  2629. /**
  2630. * Search a special module from store by namespace. if module not exist, print error message.
  2631. * @param {Object} store
  2632. * @param {String} helper
  2633. * @param {String} namespace
  2634. * @return {Object}
  2635. */
  2636. function getModuleByNamespace (store, helper, namespace) {
  2637. var module = store._modulesNamespaceMap[namespace];
  2638. if (( true) && !module) {
  2639. console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace));
  2640. }
  2641. return module
  2642. }
  2643. var index = {
  2644. Store: Store,
  2645. install: install,
  2646. version: '3.4.0',
  2647. mapState: mapState,
  2648. mapMutations: mapMutations,
  2649. mapGetters: mapGetters,
  2650. mapActions: mapActions,
  2651. createNamespacedHelpers: createNamespacedHelpers
  2652. };
  2653. /* harmony default export */ __webpack_exports__["default"] = (index);
  2654. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ 3)))
  2655. /***/ }),
  2656. /***/ 15:
  2657. /*!*******************************************************************!*\
  2658. !*** D:/wwwroot/forest/js_sdk/luch-request/luch-request/index.js ***!
  2659. \*******************************************************************/
  2660. /*! no static exports found */
  2661. /***/ (function(module, exports, __webpack_require__) {
  2662. "use strict";
  2663. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _Request = _interopRequireDefault(__webpack_require__(/*! ./core/Request */ 16));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}var _default =
  2664. _Request.default;exports.default = _default;
  2665. /***/ }),
  2666. /***/ 16:
  2667. /*!**************************************************************************!*\
  2668. !*** D:/wwwroot/forest/js_sdk/luch-request/luch-request/core/Request.js ***!
  2669. \**************************************************************************/
  2670. /*! no static exports found */
  2671. /***/ (function(module, exports, __webpack_require__) {
  2672. "use strict";
  2673. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;
  2674. var _dispatchRequest = _interopRequireDefault(__webpack_require__(/*! ./dispatchRequest */ 17));
  2675. var _InterceptorManager = _interopRequireDefault(__webpack_require__(/*! ./InterceptorManager */ 25));
  2676. var _mergeConfig = _interopRequireDefault(__webpack_require__(/*! ./mergeConfig */ 26));
  2677. var _defaults = _interopRequireDefault(__webpack_require__(/*! ./defaults */ 27));
  2678. var _utils = __webpack_require__(/*! ../utils */ 20);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}function _createClass(Constructor, protoProps, staticProps) {if (protoProps) _defineProperties(Constructor.prototype, protoProps);if (staticProps) _defineProperties(Constructor, staticProps);return Constructor;}var
  2679. Request = /*#__PURE__*/function () {
  2680. /**
  2681. * @param {Object} arg - 全局配置
  2682. * @param {String} arg.baseURL - 全局根路径
  2683. * @param {Object} arg.header - 全局header
  2684. * @param {String} arg.method = [GET|POST|PUT|DELETE|CONNECT|HEAD|OPTIONS|TRACE] - 全局默认请求方式
  2685. * @param {String} arg.dataType = [json] - 全局默认的dataType
  2686. * @param {String} arg.responseType = [text|arraybuffer] - 全局默认的responseType。App和支付宝小程序不支持
  2687. * @param {Object} arg.custom - 全局默认的自定义参数
  2688. * @param {Number} arg.timeout - 全局默认的超时时间,单位 ms。默认30000。仅微信小程序(2.10.0)、支付宝小程序支持
  2689. * @param {Boolean} arg.sslVerify - 全局默认的是否验证 ssl 证书。默认true.仅App安卓端支持(HBuilderX 2.3.3+)
  2690. * @param {Boolean} arg.withCredentials - 全局默认的跨域请求时是否携带凭证(cookies)。默认false。仅H5支持(HBuilderX 2.6.15+)
  2691. * @param {Boolean} arg.firstIpv4 - 全DNS解析时优先使用ipv4。默认false。仅 App-Android 支持 (HBuilderX 2.8.0+)
  2692. * @param {Function(statusCode):Boolean} arg.validateStatus - 全局默认的自定义验证器。默认statusCode >= 200 && statusCode < 300
  2693. */
  2694. function Request() {var arg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};_classCallCheck(this, Request);
  2695. if (!(0, _utils.isPlainObject)(arg)) {
  2696. arg = {};
  2697. console.warn('设置全局参数必须接收一个Object');
  2698. }
  2699. this.config = _objectSpread(_objectSpread({}, _defaults.default), arg);
  2700. this.interceptors = {
  2701. request: new _InterceptorManager.default(),
  2702. response: new _InterceptorManager.default() };
  2703. }
  2704. /**
  2705. * @Function
  2706. * @param {Request~setConfigCallback} f - 设置全局默认配置
  2707. */_createClass(Request, [{ key: "setConfig", value: function setConfig(
  2708. f) {
  2709. this.config = f(this.config);
  2710. } }, { key: "middleware", value: function middleware(
  2711. config) {
  2712. config = (0, _mergeConfig.default)(this.config, config);
  2713. var chain = [_dispatchRequest.default, undefined];
  2714. var promise = Promise.resolve(config);
  2715. this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
  2716. chain.unshift(interceptor.fulfilled, interceptor.rejected);
  2717. });
  2718. this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
  2719. chain.push(interceptor.fulfilled, interceptor.rejected);
  2720. });
  2721. while (chain.length) {
  2722. promise = promise.then(chain.shift(), chain.shift());
  2723. }
  2724. return promise;
  2725. }
  2726. /**
  2727. * @Function
  2728. * @param {Object} config - 请求配置项
  2729. * @prop {String} options.url - 请求路径
  2730. * @prop {Object} options.data - 请求参数
  2731. * @prop {Object} [options.responseType = config.responseType] [text|arraybuffer] - 响应的数据类型
  2732. * @prop {Object} [options.dataType = config.dataType] - 如果设为 json,会尝试对返回的数据做一次 JSON.parse
  2733. * @prop {Object} [options.header = config.header] - 请求header
  2734. * @prop {Object} [options.method = config.method] - 请求方法
  2735. * @returns {Promise<unknown>}
  2736. */ }, { key: "request", value: function request()
  2737. {var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  2738. return this.middleware(config);
  2739. } }, { key: "get", value: function get(
  2740. url) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  2741. return this.middleware(_objectSpread({
  2742. url: url,
  2743. method: 'GET' },
  2744. options));
  2745. } }, { key: "post", value: function post(
  2746. url, data) {var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  2747. return this.middleware(_objectSpread({
  2748. url: url,
  2749. data: data,
  2750. method: 'POST' },
  2751. options));
  2752. } }, { key: "put", value: function put(
  2753. url, data) {var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  2754. return this.middleware(_objectSpread({
  2755. url: url,
  2756. data: data,
  2757. method: 'PUT' },
  2758. options));
  2759. } }, { key: "delete", value: function _delete(
  2760. url, data) {var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  2761. return this.middleware(_objectSpread({
  2762. url: url,
  2763. data: data,
  2764. method: 'DELETE' },
  2765. options));
  2766. } }, { key: "connect", value: function connect(
  2767. url, data) {var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  2768. return this.middleware(_objectSpread({
  2769. url: url,
  2770. data: data,
  2771. method: 'CONNECT' },
  2772. options));
  2773. } }, { key: "head", value: function head(
  2774. url, data) {var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  2775. return this.middleware(_objectSpread({
  2776. url: url,
  2777. data: data,
  2778. method: 'HEAD' },
  2779. options));
  2780. } }, { key: "options", value: function options(
  2781. url, data) {var _options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  2782. return this.middleware(_objectSpread({
  2783. url: url,
  2784. data: data,
  2785. method: 'OPTIONS' },
  2786. _options));
  2787. } }, { key: "trace", value: function trace(
  2788. url, data) {var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  2789. return this.middleware(_objectSpread({
  2790. url: url,
  2791. data: data,
  2792. method: 'TRACE' },
  2793. options));
  2794. } }, { key: "upload", value: function upload(
  2795. url) {var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  2796. config.url = url;
  2797. config.method = 'UPLOAD';
  2798. return this.middleware(config);
  2799. } }, { key: "download", value: function download(
  2800. url) {var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  2801. config.url = url;
  2802. config.method = 'DOWNLOAD';
  2803. return this.middleware(config);
  2804. } }]);return Request;}();
  2805. /**
  2806. * setConfig回调
  2807. * @return {Object} - 返回操作后的config
  2808. * @callback Request~setConfigCallback
  2809. * @param {Object} config - 全局默认config
  2810. */exports.default = Request;
  2811. /***/ }),
  2812. /***/ 17:
  2813. /*!**********************************************************************************!*\
  2814. !*** D:/wwwroot/forest/js_sdk/luch-request/luch-request/core/dispatchRequest.js ***!
  2815. \**********************************************************************************/
  2816. /*! no static exports found */
  2817. /***/ (function(module, exports, __webpack_require__) {
  2818. "use strict";
  2819. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _index = _interopRequireDefault(__webpack_require__(/*! ../adapters/index */ 18));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}var _default =
  2820. function _default(config) {
  2821. return (0, _index.default)(config);
  2822. };exports.default = _default;
  2823. /***/ }),
  2824. /***/ 18:
  2825. /*!****************************************************************************!*\
  2826. !*** D:/wwwroot/forest/js_sdk/luch-request/luch-request/adapters/index.js ***!
  2827. \****************************************************************************/
  2828. /*! no static exports found */
  2829. /***/ (function(module, exports, __webpack_require__) {
  2830. "use strict";
  2831. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _buildURL = _interopRequireDefault(__webpack_require__(/*! ../helpers/buildURL */ 19));
  2832. var _buildFullPath = _interopRequireDefault(__webpack_require__(/*! ../core/buildFullPath */ 21));
  2833. var _settle = _interopRequireDefault(__webpack_require__(/*! ../core/settle */ 24));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}
  2834. /**
  2835. * 返回可选值存在的配置
  2836. * @param {Array} keys - 可选值数组
  2837. * @param {Object} config2 - 配置
  2838. * @return {{}} - 存在的配置项
  2839. */
  2840. var mergeKeys = function mergeKeys(keys, config2) {
  2841. var config = {};
  2842. keys.forEach(function (prop) {
  2843. if (typeof config2[prop] !== 'undefined') {
  2844. config[prop] = config2[prop];
  2845. }
  2846. });
  2847. return config;
  2848. };var _default =
  2849. function _default(config) {
  2850. return new Promise(function (resolve, reject) {
  2851. var _config = {
  2852. url: (0, _buildURL.default)((0, _buildFullPath.default)(config.baseURL, config.url), config.params),
  2853. header: config.header,
  2854. complete: function complete(response) {
  2855. response.config = config;
  2856. try {
  2857. // 对可能字符串不是json 的情况容错
  2858. if (typeof response.data === 'string') {
  2859. response.data = JSON.parse(response.data);
  2860. }
  2861. // eslint-disable-next-line no-empty
  2862. } catch (e) {
  2863. }
  2864. (0, _settle.default)(resolve, reject, response);
  2865. } };
  2866. var requestTask;
  2867. if (config.method === 'UPLOAD') {
  2868. delete _config.header['content-type'];
  2869. delete _config.header['Content-Type'];
  2870. var otherConfig = {
  2871. filePath: config.filePath,
  2872. name: config.name };
  2873. var optionalKeys = [
  2874. 'formData'];
  2875. requestTask = uni.uploadFile(_objectSpread(_objectSpread(_objectSpread({}, _config), otherConfig), mergeKeys(optionalKeys, config)));
  2876. } else if (config.method === 'DOWNLOAD') {
  2877. requestTask = uni.downloadFile(_config);
  2878. } else {
  2879. var _optionalKeys = [
  2880. 'data',
  2881. 'method',
  2882. 'timeout',
  2883. 'dataType',
  2884. 'responseType'];
  2885. requestTask = uni.request(_objectSpread(_objectSpread({}, _config), mergeKeys(_optionalKeys, config)));
  2886. }
  2887. if (config.getTask) {
  2888. config.getTask(requestTask, config);
  2889. }
  2890. });
  2891. };exports.default = _default;
  2892. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  2893. /***/ }),
  2894. /***/ 19:
  2895. /*!******************************************************************************!*\
  2896. !*** D:/wwwroot/forest/js_sdk/luch-request/luch-request/helpers/buildURL.js ***!
  2897. \******************************************************************************/
  2898. /*! no static exports found */
  2899. /***/ (function(module, exports, __webpack_require__) {
  2900. "use strict";
  2901. Object.defineProperty(exports, "__esModule", { value: true });exports.default = buildURL;
  2902. var utils = _interopRequireWildcard(__webpack_require__(/*! ./../utils */ 20));function _getRequireWildcardCache() {if (typeof WeakMap !== "function") return null;var cache = new WeakMap();_getRequireWildcardCache = function _getRequireWildcardCache() {return cache;};return cache;}function _interopRequireWildcard(obj) {if (obj && obj.__esModule) {return obj;}if (obj === null || typeof obj !== "object" && typeof obj !== "function") {return { default: obj };}var cache = _getRequireWildcardCache();if (cache && cache.has(obj)) {return cache.get(obj);}var newObj = {};var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;for (var key in obj) {if (Object.prototype.hasOwnProperty.call(obj, key)) {var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;if (desc && (desc.get || desc.set)) {Object.defineProperty(newObj, key, desc);} else {newObj[key] = obj[key];}}}newObj.default = obj;if (cache) {cache.set(obj, newObj);}return newObj;}
  2903. function encode(val) {
  2904. return encodeURIComponent(val).
  2905. replace(/%40/gi, '@').
  2906. replace(/%3A/gi, ':').
  2907. replace(/%24/g, '$').
  2908. replace(/%2C/gi, ',').
  2909. replace(/%20/g, '+').
  2910. replace(/%5B/gi, '[').
  2911. replace(/%5D/gi, ']');
  2912. }
  2913. /**
  2914. * Build a URL by appending params to the end
  2915. *
  2916. * @param {string} url The base of the url (e.g., http://www.google.com)
  2917. * @param {object} [params] The params to be appended
  2918. * @returns {string} The formatted url
  2919. */
  2920. function buildURL(url, params) {
  2921. /*eslint no-param-reassign:0*/
  2922. if (!params) {
  2923. return url;
  2924. }
  2925. var serializedParams;
  2926. if (utils.isURLSearchParams(params)) {
  2927. serializedParams = params.toString();
  2928. } else {
  2929. var parts = [];
  2930. utils.forEach(params, function serialize(val, key) {
  2931. if (val === null || typeof val === 'undefined') {
  2932. return;
  2933. }
  2934. if (utils.isArray(val)) {
  2935. key = key + '[]';
  2936. } else {
  2937. val = [val];
  2938. }
  2939. utils.forEach(val, function parseValue(v) {
  2940. if (utils.isDate(v)) {
  2941. v = v.toISOString();
  2942. } else if (utils.isObject(v)) {
  2943. v = JSON.stringify(v);
  2944. }
  2945. parts.push(encode(key) + '=' + encode(v));
  2946. });
  2947. });
  2948. serializedParams = parts.join('&');
  2949. }
  2950. if (serializedParams) {
  2951. var hashmarkIndex = url.indexOf('#');
  2952. if (hashmarkIndex !== -1) {
  2953. url = url.slice(0, hashmarkIndex);
  2954. }
  2955. url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
  2956. }
  2957. return url;
  2958. }
  2959. /***/ }),
  2960. /***/ 2:
  2961. /*!******************************************************************************************!*\
  2962. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  2963. \******************************************************************************************/
  2964. /*! exports provided: default */
  2965. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2966. "use strict";
  2967. __webpack_require__.r(__webpack_exports__);
  2968. /* WEBPACK VAR INJECTION */(function(global) {/*!
  2969. * Vue.js v2.6.11
  2970. * (c) 2014-2020 Evan You
  2971. * Released under the MIT License.
  2972. */
  2973. /* */
  2974. var emptyObject = Object.freeze({});
  2975. // These helpers produce better VM code in JS engines due to their
  2976. // explicitness and function inlining.
  2977. function isUndef (v) {
  2978. return v === undefined || v === null
  2979. }
  2980. function isDef (v) {
  2981. return v !== undefined && v !== null
  2982. }
  2983. function isTrue (v) {
  2984. return v === true
  2985. }
  2986. function isFalse (v) {
  2987. return v === false
  2988. }
  2989. /**
  2990. * Check if value is primitive.
  2991. */
  2992. function isPrimitive (value) {
  2993. return (
  2994. typeof value === 'string' ||
  2995. typeof value === 'number' ||
  2996. // $flow-disable-line
  2997. typeof value === 'symbol' ||
  2998. typeof value === 'boolean'
  2999. )
  3000. }
  3001. /**
  3002. * Quick object check - this is primarily used to tell
  3003. * Objects from primitive values when we know the value
  3004. * is a JSON-compliant type.
  3005. */
  3006. function isObject (obj) {
  3007. return obj !== null && typeof obj === 'object'
  3008. }
  3009. /**
  3010. * Get the raw type string of a value, e.g., [object Object].
  3011. */
  3012. var _toString = Object.prototype.toString;
  3013. function toRawType (value) {
  3014. return _toString.call(value).slice(8, -1)
  3015. }
  3016. /**
  3017. * Strict object type check. Only returns true
  3018. * for plain JavaScript objects.
  3019. */
  3020. function isPlainObject (obj) {
  3021. return _toString.call(obj) === '[object Object]'
  3022. }
  3023. function isRegExp (v) {
  3024. return _toString.call(v) === '[object RegExp]'
  3025. }
  3026. /**
  3027. * Check if val is a valid array index.
  3028. */
  3029. function isValidArrayIndex (val) {
  3030. var n = parseFloat(String(val));
  3031. return n >= 0 && Math.floor(n) === n && isFinite(val)
  3032. }
  3033. function isPromise (val) {
  3034. return (
  3035. isDef(val) &&
  3036. typeof val.then === 'function' &&
  3037. typeof val.catch === 'function'
  3038. )
  3039. }
  3040. /**
  3041. * Convert a value to a string that is actually rendered.
  3042. */
  3043. function toString (val) {
  3044. return val == null
  3045. ? ''
  3046. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  3047. ? JSON.stringify(val, null, 2)
  3048. : String(val)
  3049. }
  3050. /**
  3051. * Convert an input value to a number for persistence.
  3052. * If the conversion fails, return original string.
  3053. */
  3054. function toNumber (val) {
  3055. var n = parseFloat(val);
  3056. return isNaN(n) ? val : n
  3057. }
  3058. /**
  3059. * Make a map and return a function for checking if a key
  3060. * is in that map.
  3061. */
  3062. function makeMap (
  3063. str,
  3064. expectsLowerCase
  3065. ) {
  3066. var map = Object.create(null);
  3067. var list = str.split(',');
  3068. for (var i = 0; i < list.length; i++) {
  3069. map[list[i]] = true;
  3070. }
  3071. return expectsLowerCase
  3072. ? function (val) { return map[val.toLowerCase()]; }
  3073. : function (val) { return map[val]; }
  3074. }
  3075. /**
  3076. * Check if a tag is a built-in tag.
  3077. */
  3078. var isBuiltInTag = makeMap('slot,component', true);
  3079. /**
  3080. * Check if an attribute is a reserved attribute.
  3081. */
  3082. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  3083. /**
  3084. * Remove an item from an array.
  3085. */
  3086. function remove (arr, item) {
  3087. if (arr.length) {
  3088. var index = arr.indexOf(item);
  3089. if (index > -1) {
  3090. return arr.splice(index, 1)
  3091. }
  3092. }
  3093. }
  3094. /**
  3095. * Check whether an object has the property.
  3096. */
  3097. var hasOwnProperty = Object.prototype.hasOwnProperty;
  3098. function hasOwn (obj, key) {
  3099. return hasOwnProperty.call(obj, key)
  3100. }
  3101. /**
  3102. * Create a cached version of a pure function.
  3103. */
  3104. function cached (fn) {
  3105. var cache = Object.create(null);
  3106. return (function cachedFn (str) {
  3107. var hit = cache[str];
  3108. return hit || (cache[str] = fn(str))
  3109. })
  3110. }
  3111. /**
  3112. * Camelize a hyphen-delimited string.
  3113. */
  3114. var camelizeRE = /-(\w)/g;
  3115. var camelize = cached(function (str) {
  3116. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  3117. });
  3118. /**
  3119. * Capitalize a string.
  3120. */
  3121. var capitalize = cached(function (str) {
  3122. return str.charAt(0).toUpperCase() + str.slice(1)
  3123. });
  3124. /**
  3125. * Hyphenate a camelCase string.
  3126. */
  3127. var hyphenateRE = /\B([A-Z])/g;
  3128. var hyphenate = cached(function (str) {
  3129. return str.replace(hyphenateRE, '-$1').toLowerCase()
  3130. });
  3131. /**
  3132. * Simple bind polyfill for environments that do not support it,
  3133. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  3134. * since native bind is now performant enough in most browsers.
  3135. * But removing it would mean breaking code that was able to run in
  3136. * PhantomJS 1.x, so this must be kept for backward compatibility.
  3137. */
  3138. /* istanbul ignore next */
  3139. function polyfillBind (fn, ctx) {
  3140. function boundFn (a) {
  3141. var l = arguments.length;
  3142. return l
  3143. ? l > 1
  3144. ? fn.apply(ctx, arguments)
  3145. : fn.call(ctx, a)
  3146. : fn.call(ctx)
  3147. }
  3148. boundFn._length = fn.length;
  3149. return boundFn
  3150. }
  3151. function nativeBind (fn, ctx) {
  3152. return fn.bind(ctx)
  3153. }
  3154. var bind = Function.prototype.bind
  3155. ? nativeBind
  3156. : polyfillBind;
  3157. /**
  3158. * Convert an Array-like object to a real Array.
  3159. */
  3160. function toArray (list, start) {
  3161. start = start || 0;
  3162. var i = list.length - start;
  3163. var ret = new Array(i);
  3164. while (i--) {
  3165. ret[i] = list[i + start];
  3166. }
  3167. return ret
  3168. }
  3169. /**
  3170. * Mix properties into target object.
  3171. */
  3172. function extend (to, _from) {
  3173. for (var key in _from) {
  3174. to[key] = _from[key];
  3175. }
  3176. return to
  3177. }
  3178. /**
  3179. * Merge an Array of Objects into a single Object.
  3180. */
  3181. function toObject (arr) {
  3182. var res = {};
  3183. for (var i = 0; i < arr.length; i++) {
  3184. if (arr[i]) {
  3185. extend(res, arr[i]);
  3186. }
  3187. }
  3188. return res
  3189. }
  3190. /* eslint-disable no-unused-vars */
  3191. /**
  3192. * Perform no operation.
  3193. * Stubbing args to make Flow happy without leaving useless transpiled code
  3194. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  3195. */
  3196. function noop (a, b, c) {}
  3197. /**
  3198. * Always return false.
  3199. */
  3200. var no = function (a, b, c) { return false; };
  3201. /* eslint-enable no-unused-vars */
  3202. /**
  3203. * Return the same value.
  3204. */
  3205. var identity = function (_) { return _; };
  3206. /**
  3207. * Check if two values are loosely equal - that is,
  3208. * if they are plain objects, do they have the same shape?
  3209. */
  3210. function looseEqual (a, b) {
  3211. if (a === b) { return true }
  3212. var isObjectA = isObject(a);
  3213. var isObjectB = isObject(b);
  3214. if (isObjectA && isObjectB) {
  3215. try {
  3216. var isArrayA = Array.isArray(a);
  3217. var isArrayB = Array.isArray(b);
  3218. if (isArrayA && isArrayB) {
  3219. return a.length === b.length && a.every(function (e, i) {
  3220. return looseEqual(e, b[i])
  3221. })
  3222. } else if (a instanceof Date && b instanceof Date) {
  3223. return a.getTime() === b.getTime()
  3224. } else if (!isArrayA && !isArrayB) {
  3225. var keysA = Object.keys(a);
  3226. var keysB = Object.keys(b);
  3227. return keysA.length === keysB.length && keysA.every(function (key) {
  3228. return looseEqual(a[key], b[key])
  3229. })
  3230. } else {
  3231. /* istanbul ignore next */
  3232. return false
  3233. }
  3234. } catch (e) {
  3235. /* istanbul ignore next */
  3236. return false
  3237. }
  3238. } else if (!isObjectA && !isObjectB) {
  3239. return String(a) === String(b)
  3240. } else {
  3241. return false
  3242. }
  3243. }
  3244. /**
  3245. * Return the first index at which a loosely equal value can be
  3246. * found in the array (if value is a plain object, the array must
  3247. * contain an object of the same shape), or -1 if it is not present.
  3248. */
  3249. function looseIndexOf (arr, val) {
  3250. for (var i = 0; i < arr.length; i++) {
  3251. if (looseEqual(arr[i], val)) { return i }
  3252. }
  3253. return -1
  3254. }
  3255. /**
  3256. * Ensure a function is called only once.
  3257. */
  3258. function once (fn) {
  3259. var called = false;
  3260. return function () {
  3261. if (!called) {
  3262. called = true;
  3263. fn.apply(this, arguments);
  3264. }
  3265. }
  3266. }
  3267. var ASSET_TYPES = [
  3268. 'component',
  3269. 'directive',
  3270. 'filter'
  3271. ];
  3272. var LIFECYCLE_HOOKS = [
  3273. 'beforeCreate',
  3274. 'created',
  3275. 'beforeMount',
  3276. 'mounted',
  3277. 'beforeUpdate',
  3278. 'updated',
  3279. 'beforeDestroy',
  3280. 'destroyed',
  3281. 'activated',
  3282. 'deactivated',
  3283. 'errorCaptured',
  3284. 'serverPrefetch'
  3285. ];
  3286. /* */
  3287. var config = ({
  3288. /**
  3289. * Option merge strategies (used in core/util/options)
  3290. */
  3291. // $flow-disable-line
  3292. optionMergeStrategies: Object.create(null),
  3293. /**
  3294. * Whether to suppress warnings.
  3295. */
  3296. silent: false,
  3297. /**
  3298. * Show production mode tip message on boot?
  3299. */
  3300. productionTip: "development" !== 'production',
  3301. /**
  3302. * Whether to enable devtools
  3303. */
  3304. devtools: "development" !== 'production',
  3305. /**
  3306. * Whether to record perf
  3307. */
  3308. performance: false,
  3309. /**
  3310. * Error handler for watcher errors
  3311. */
  3312. errorHandler: null,
  3313. /**
  3314. * Warn handler for watcher warns
  3315. */
  3316. warnHandler: null,
  3317. /**
  3318. * Ignore certain custom elements
  3319. */
  3320. ignoredElements: [],
  3321. /**
  3322. * Custom user key aliases for v-on
  3323. */
  3324. // $flow-disable-line
  3325. keyCodes: Object.create(null),
  3326. /**
  3327. * Check if a tag is reserved so that it cannot be registered as a
  3328. * component. This is platform-dependent and may be overwritten.
  3329. */
  3330. isReservedTag: no,
  3331. /**
  3332. * Check if an attribute is reserved so that it cannot be used as a component
  3333. * prop. This is platform-dependent and may be overwritten.
  3334. */
  3335. isReservedAttr: no,
  3336. /**
  3337. * Check if a tag is an unknown element.
  3338. * Platform-dependent.
  3339. */
  3340. isUnknownElement: no,
  3341. /**
  3342. * Get the namespace of an element
  3343. */
  3344. getTagNamespace: noop,
  3345. /**
  3346. * Parse the real tag name for the specific platform.
  3347. */
  3348. parsePlatformTagName: identity,
  3349. /**
  3350. * Check if an attribute must be bound using property, e.g. value
  3351. * Platform-dependent.
  3352. */
  3353. mustUseProp: no,
  3354. /**
  3355. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  3356. * This will significantly reduce performance if set to false.
  3357. */
  3358. async: true,
  3359. /**
  3360. * Exposed for legacy reasons
  3361. */
  3362. _lifecycleHooks: LIFECYCLE_HOOKS
  3363. });
  3364. /* */
  3365. /**
  3366. * unicode letters used for parsing html tags, component names and property paths.
  3367. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  3368. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  3369. */
  3370. 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/;
  3371. /**
  3372. * Check if a string starts with $ or _
  3373. */
  3374. function isReserved (str) {
  3375. var c = (str + '').charCodeAt(0);
  3376. return c === 0x24 || c === 0x5F
  3377. }
  3378. /**
  3379. * Define a property.
  3380. */
  3381. function def (obj, key, val, enumerable) {
  3382. Object.defineProperty(obj, key, {
  3383. value: val,
  3384. enumerable: !!enumerable,
  3385. writable: true,
  3386. configurable: true
  3387. });
  3388. }
  3389. /**
  3390. * Parse simple path.
  3391. */
  3392. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  3393. function parsePath (path) {
  3394. if (bailRE.test(path)) {
  3395. return
  3396. }
  3397. var segments = path.split('.');
  3398. return function (obj) {
  3399. for (var i = 0; i < segments.length; i++) {
  3400. if (!obj) { return }
  3401. obj = obj[segments[i]];
  3402. }
  3403. return obj
  3404. }
  3405. }
  3406. /* */
  3407. // can we use __proto__?
  3408. var hasProto = '__proto__' in {};
  3409. // Browser environment sniffing
  3410. var inBrowser = typeof window !== 'undefined';
  3411. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  3412. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  3413. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  3414. var isIE = UA && /msie|trident/.test(UA);
  3415. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  3416. var isEdge = UA && UA.indexOf('edge/') > 0;
  3417. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  3418. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  3419. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  3420. var isPhantomJS = UA && /phantomjs/.test(UA);
  3421. var isFF = UA && UA.match(/firefox\/(\d+)/);
  3422. // Firefox has a "watch" function on Object.prototype...
  3423. var nativeWatch = ({}).watch;
  3424. if (inBrowser) {
  3425. try {
  3426. var opts = {};
  3427. Object.defineProperty(opts, 'passive', ({
  3428. get: function get () {
  3429. }
  3430. })); // https://github.com/facebook/flow/issues/285
  3431. window.addEventListener('test-passive', null, opts);
  3432. } catch (e) {}
  3433. }
  3434. // this needs to be lazy-evaled because vue may be required before
  3435. // vue-server-renderer can set VUE_ENV
  3436. var _isServer;
  3437. var isServerRendering = function () {
  3438. if (_isServer === undefined) {
  3439. /* istanbul ignore if */
  3440. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  3441. // detect presence of vue-server-renderer and avoid
  3442. // Webpack shimming the process
  3443. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  3444. } else {
  3445. _isServer = false;
  3446. }
  3447. }
  3448. return _isServer
  3449. };
  3450. // detect devtools
  3451. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  3452. /* istanbul ignore next */
  3453. function isNative (Ctor) {
  3454. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  3455. }
  3456. var hasSymbol =
  3457. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  3458. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  3459. var _Set;
  3460. /* istanbul ignore if */ // $flow-disable-line
  3461. if (typeof Set !== 'undefined' && isNative(Set)) {
  3462. // use native Set when available.
  3463. _Set = Set;
  3464. } else {
  3465. // a non-standard Set polyfill that only works with primitive keys.
  3466. _Set = /*@__PURE__*/(function () {
  3467. function Set () {
  3468. this.set = Object.create(null);
  3469. }
  3470. Set.prototype.has = function has (key) {
  3471. return this.set[key] === true
  3472. };
  3473. Set.prototype.add = function add (key) {
  3474. this.set[key] = true;
  3475. };
  3476. Set.prototype.clear = function clear () {
  3477. this.set = Object.create(null);
  3478. };
  3479. return Set;
  3480. }());
  3481. }
  3482. /* */
  3483. var warn = noop;
  3484. var tip = noop;
  3485. var generateComponentTrace = (noop); // work around flow check
  3486. var formatComponentName = (noop);
  3487. if (true) {
  3488. var hasConsole = typeof console !== 'undefined';
  3489. var classifyRE = /(?:^|[-_])(\w)/g;
  3490. var classify = function (str) { return str
  3491. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  3492. .replace(/[-_]/g, ''); };
  3493. warn = function (msg, vm) {
  3494. var trace = vm ? generateComponentTrace(vm) : '';
  3495. if (config.warnHandler) {
  3496. config.warnHandler.call(null, msg, vm, trace);
  3497. } else if (hasConsole && (!config.silent)) {
  3498. console.error(("[Vue warn]: " + msg + trace));
  3499. }
  3500. };
  3501. tip = function (msg, vm) {
  3502. if (hasConsole && (!config.silent)) {
  3503. console.warn("[Vue tip]: " + msg + (
  3504. vm ? generateComponentTrace(vm) : ''
  3505. ));
  3506. }
  3507. };
  3508. formatComponentName = function (vm, includeFile) {
  3509. if (vm.$root === vm) {
  3510. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  3511. return ('') + vm.$options.__file
  3512. }
  3513. return '<Root>'
  3514. }
  3515. var options = typeof vm === 'function' && vm.cid != null
  3516. ? vm.options
  3517. : vm._isVue
  3518. ? vm.$options || vm.constructor.options
  3519. : vm;
  3520. var name = options.name || options._componentTag;
  3521. var file = options.__file;
  3522. if (!name && file) {
  3523. var match = file.match(/([^/\\]+)\.vue$/);
  3524. name = match && match[1];
  3525. }
  3526. return (
  3527. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  3528. (file && includeFile !== false ? (" at " + file) : '')
  3529. )
  3530. };
  3531. var repeat = function (str, n) {
  3532. var res = '';
  3533. while (n) {
  3534. if (n % 2 === 1) { res += str; }
  3535. if (n > 1) { str += str; }
  3536. n >>= 1;
  3537. }
  3538. return res
  3539. };
  3540. generateComponentTrace = function (vm) {
  3541. if (vm._isVue && vm.$parent) {
  3542. var tree = [];
  3543. var currentRecursiveSequence = 0;
  3544. while (vm && vm.$options.name !== 'PageBody') {
  3545. if (tree.length > 0) {
  3546. var last = tree[tree.length - 1];
  3547. if (last.constructor === vm.constructor) {
  3548. currentRecursiveSequence++;
  3549. vm = vm.$parent;
  3550. continue
  3551. } else if (currentRecursiveSequence > 0) {
  3552. tree[tree.length - 1] = [last, currentRecursiveSequence];
  3553. currentRecursiveSequence = 0;
  3554. }
  3555. }
  3556. !vm.$options.isReserved && tree.push(vm);
  3557. vm = vm.$parent;
  3558. }
  3559. return '\n\nfound in\n\n' + tree
  3560. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  3561. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  3562. : formatComponentName(vm))); })
  3563. .join('\n')
  3564. } else {
  3565. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  3566. }
  3567. };
  3568. }
  3569. /* */
  3570. var uid = 0;
  3571. /**
  3572. * A dep is an observable that can have multiple
  3573. * directives subscribing to it.
  3574. */
  3575. var Dep = function Dep () {
  3576. this.id = uid++;
  3577. this.subs = [];
  3578. };
  3579. Dep.prototype.addSub = function addSub (sub) {
  3580. this.subs.push(sub);
  3581. };
  3582. Dep.prototype.removeSub = function removeSub (sub) {
  3583. remove(this.subs, sub);
  3584. };
  3585. Dep.prototype.depend = function depend () {
  3586. if (Dep.SharedObject.target) {
  3587. Dep.SharedObject.target.addDep(this);
  3588. }
  3589. };
  3590. Dep.prototype.notify = function notify () {
  3591. // stabilize the subscriber list first
  3592. var subs = this.subs.slice();
  3593. if ( true && !config.async) {
  3594. // subs aren't sorted in scheduler if not running async
  3595. // we need to sort them now to make sure they fire in correct
  3596. // order
  3597. subs.sort(function (a, b) { return a.id - b.id; });
  3598. }
  3599. for (var i = 0, l = subs.length; i < l; i++) {
  3600. subs[i].update();
  3601. }
  3602. };
  3603. // The current target watcher being evaluated.
  3604. // This is globally unique because only one watcher
  3605. // can be evaluated at a time.
  3606. // fixed by xxxxxx (nvue shared vuex)
  3607. /* eslint-disable no-undef */
  3608. Dep.SharedObject = {};
  3609. Dep.SharedObject.target = null;
  3610. Dep.SharedObject.targetStack = [];
  3611. function pushTarget (target) {
  3612. Dep.SharedObject.targetStack.push(target);
  3613. Dep.SharedObject.target = target;
  3614. Dep.target = target;
  3615. }
  3616. function popTarget () {
  3617. Dep.SharedObject.targetStack.pop();
  3618. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  3619. Dep.target = Dep.SharedObject.target;
  3620. }
  3621. /* */
  3622. var VNode = function VNode (
  3623. tag,
  3624. data,
  3625. children,
  3626. text,
  3627. elm,
  3628. context,
  3629. componentOptions,
  3630. asyncFactory
  3631. ) {
  3632. this.tag = tag;
  3633. this.data = data;
  3634. this.children = children;
  3635. this.text = text;
  3636. this.elm = elm;
  3637. this.ns = undefined;
  3638. this.context = context;
  3639. this.fnContext = undefined;
  3640. this.fnOptions = undefined;
  3641. this.fnScopeId = undefined;
  3642. this.key = data && data.key;
  3643. this.componentOptions = componentOptions;
  3644. this.componentInstance = undefined;
  3645. this.parent = undefined;
  3646. this.raw = false;
  3647. this.isStatic = false;
  3648. this.isRootInsert = true;
  3649. this.isComment = false;
  3650. this.isCloned = false;
  3651. this.isOnce = false;
  3652. this.asyncFactory = asyncFactory;
  3653. this.asyncMeta = undefined;
  3654. this.isAsyncPlaceholder = false;
  3655. };
  3656. var prototypeAccessors = { child: { configurable: true } };
  3657. // DEPRECATED: alias for componentInstance for backwards compat.
  3658. /* istanbul ignore next */
  3659. prototypeAccessors.child.get = function () {
  3660. return this.componentInstance
  3661. };
  3662. Object.defineProperties( VNode.prototype, prototypeAccessors );
  3663. var createEmptyVNode = function (text) {
  3664. if ( text === void 0 ) text = '';
  3665. var node = new VNode();
  3666. node.text = text;
  3667. node.isComment = true;
  3668. return node
  3669. };
  3670. function createTextVNode (val) {
  3671. return new VNode(undefined, undefined, undefined, String(val))
  3672. }
  3673. // optimized shallow clone
  3674. // used for static nodes and slot nodes because they may be reused across
  3675. // multiple renders, cloning them avoids errors when DOM manipulations rely
  3676. // on their elm reference.
  3677. function cloneVNode (vnode) {
  3678. var cloned = new VNode(
  3679. vnode.tag,
  3680. vnode.data,
  3681. // #7975
  3682. // clone children array to avoid mutating original in case of cloning
  3683. // a child.
  3684. vnode.children && vnode.children.slice(),
  3685. vnode.text,
  3686. vnode.elm,
  3687. vnode.context,
  3688. vnode.componentOptions,
  3689. vnode.asyncFactory
  3690. );
  3691. cloned.ns = vnode.ns;
  3692. cloned.isStatic = vnode.isStatic;
  3693. cloned.key = vnode.key;
  3694. cloned.isComment = vnode.isComment;
  3695. cloned.fnContext = vnode.fnContext;
  3696. cloned.fnOptions = vnode.fnOptions;
  3697. cloned.fnScopeId = vnode.fnScopeId;
  3698. cloned.asyncMeta = vnode.asyncMeta;
  3699. cloned.isCloned = true;
  3700. return cloned
  3701. }
  3702. /*
  3703. * not type checking this file because flow doesn't play well with
  3704. * dynamically accessing methods on Array prototype
  3705. */
  3706. var arrayProto = Array.prototype;
  3707. var arrayMethods = Object.create(arrayProto);
  3708. var methodsToPatch = [
  3709. 'push',
  3710. 'pop',
  3711. 'shift',
  3712. 'unshift',
  3713. 'splice',
  3714. 'sort',
  3715. 'reverse'
  3716. ];
  3717. /**
  3718. * Intercept mutating methods and emit events
  3719. */
  3720. methodsToPatch.forEach(function (method) {
  3721. // cache original method
  3722. var original = arrayProto[method];
  3723. def(arrayMethods, method, function mutator () {
  3724. var args = [], len = arguments.length;
  3725. while ( len-- ) args[ len ] = arguments[ len ];
  3726. var result = original.apply(this, args);
  3727. var ob = this.__ob__;
  3728. var inserted;
  3729. switch (method) {
  3730. case 'push':
  3731. case 'unshift':
  3732. inserted = args;
  3733. break
  3734. case 'splice':
  3735. inserted = args.slice(2);
  3736. break
  3737. }
  3738. if (inserted) { ob.observeArray(inserted); }
  3739. // notify change
  3740. ob.dep.notify();
  3741. return result
  3742. });
  3743. });
  3744. /* */
  3745. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  3746. /**
  3747. * In some cases we may want to disable observation inside a component's
  3748. * update computation.
  3749. */
  3750. var shouldObserve = true;
  3751. function toggleObserving (value) {
  3752. shouldObserve = value;
  3753. }
  3754. /**
  3755. * Observer class that is attached to each observed
  3756. * object. Once attached, the observer converts the target
  3757. * object's property keys into getter/setters that
  3758. * collect dependencies and dispatch updates.
  3759. */
  3760. var Observer = function Observer (value) {
  3761. this.value = value;
  3762. this.dep = new Dep();
  3763. this.vmCount = 0;
  3764. def(value, '__ob__', this);
  3765. if (Array.isArray(value)) {
  3766. if (hasProto) {
  3767. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  3768. if(value.push !== value.__proto__.push){
  3769. copyAugment(value, arrayMethods, arrayKeys);
  3770. } else {
  3771. protoAugment(value, arrayMethods);
  3772. }
  3773. }
  3774. } else {
  3775. copyAugment(value, arrayMethods, arrayKeys);
  3776. }
  3777. this.observeArray(value);
  3778. } else {
  3779. this.walk(value);
  3780. }
  3781. };
  3782. /**
  3783. * Walk through all properties and convert them into
  3784. * getter/setters. This method should only be called when
  3785. * value type is Object.
  3786. */
  3787. Observer.prototype.walk = function walk (obj) {
  3788. var keys = Object.keys(obj);
  3789. for (var i = 0; i < keys.length; i++) {
  3790. defineReactive$$1(obj, keys[i]);
  3791. }
  3792. };
  3793. /**
  3794. * Observe a list of Array items.
  3795. */
  3796. Observer.prototype.observeArray = function observeArray (items) {
  3797. for (var i = 0, l = items.length; i < l; i++) {
  3798. observe(items[i]);
  3799. }
  3800. };
  3801. // helpers
  3802. /**
  3803. * Augment a target Object or Array by intercepting
  3804. * the prototype chain using __proto__
  3805. */
  3806. function protoAugment (target, src) {
  3807. /* eslint-disable no-proto */
  3808. target.__proto__ = src;
  3809. /* eslint-enable no-proto */
  3810. }
  3811. /**
  3812. * Augment a target Object or Array by defining
  3813. * hidden properties.
  3814. */
  3815. /* istanbul ignore next */
  3816. function copyAugment (target, src, keys) {
  3817. for (var i = 0, l = keys.length; i < l; i++) {
  3818. var key = keys[i];
  3819. def(target, key, src[key]);
  3820. }
  3821. }
  3822. /**
  3823. * Attempt to create an observer instance for a value,
  3824. * returns the new observer if successfully observed,
  3825. * or the existing observer if the value already has one.
  3826. */
  3827. function observe (value, asRootData) {
  3828. if (!isObject(value) || value instanceof VNode) {
  3829. return
  3830. }
  3831. var ob;
  3832. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  3833. ob = value.__ob__;
  3834. } else if (
  3835. shouldObserve &&
  3836. !isServerRendering() &&
  3837. (Array.isArray(value) || isPlainObject(value)) &&
  3838. Object.isExtensible(value) &&
  3839. !value._isVue
  3840. ) {
  3841. ob = new Observer(value);
  3842. }
  3843. if (asRootData && ob) {
  3844. ob.vmCount++;
  3845. }
  3846. return ob
  3847. }
  3848. /**
  3849. * Define a reactive property on an Object.
  3850. */
  3851. function defineReactive$$1 (
  3852. obj,
  3853. key,
  3854. val,
  3855. customSetter,
  3856. shallow
  3857. ) {
  3858. var dep = new Dep();
  3859. var property = Object.getOwnPropertyDescriptor(obj, key);
  3860. if (property && property.configurable === false) {
  3861. return
  3862. }
  3863. // cater for pre-defined getter/setters
  3864. var getter = property && property.get;
  3865. var setter = property && property.set;
  3866. if ((!getter || setter) && arguments.length === 2) {
  3867. val = obj[key];
  3868. }
  3869. var childOb = !shallow && observe(val);
  3870. Object.defineProperty(obj, key, {
  3871. enumerable: true,
  3872. configurable: true,
  3873. get: function reactiveGetter () {
  3874. var value = getter ? getter.call(obj) : val;
  3875. if (Dep.SharedObject.target) { // fixed by xxxxxx
  3876. dep.depend();
  3877. if (childOb) {
  3878. childOb.dep.depend();
  3879. if (Array.isArray(value)) {
  3880. dependArray(value);
  3881. }
  3882. }
  3883. }
  3884. return value
  3885. },
  3886. set: function reactiveSetter (newVal) {
  3887. var value = getter ? getter.call(obj) : val;
  3888. /* eslint-disable no-self-compare */
  3889. if (newVal === value || (newVal !== newVal && value !== value)) {
  3890. return
  3891. }
  3892. /* eslint-enable no-self-compare */
  3893. if ( true && customSetter) {
  3894. customSetter();
  3895. }
  3896. // #7981: for accessor properties without setter
  3897. if (getter && !setter) { return }
  3898. if (setter) {
  3899. setter.call(obj, newVal);
  3900. } else {
  3901. val = newVal;
  3902. }
  3903. childOb = !shallow && observe(newVal);
  3904. dep.notify();
  3905. }
  3906. });
  3907. }
  3908. /**
  3909. * Set a property on an object. Adds the new property and
  3910. * triggers change notification if the property doesn't
  3911. * already exist.
  3912. */
  3913. function set (target, key, val) {
  3914. if ( true &&
  3915. (isUndef(target) || isPrimitive(target))
  3916. ) {
  3917. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  3918. }
  3919. if (Array.isArray(target) && isValidArrayIndex(key)) {
  3920. target.length = Math.max(target.length, key);
  3921. target.splice(key, 1, val);
  3922. return val
  3923. }
  3924. if (key in target && !(key in Object.prototype)) {
  3925. target[key] = val;
  3926. return val
  3927. }
  3928. var ob = (target).__ob__;
  3929. if (target._isVue || (ob && ob.vmCount)) {
  3930. true && warn(
  3931. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  3932. 'at runtime - declare it upfront in the data option.'
  3933. );
  3934. return val
  3935. }
  3936. if (!ob) {
  3937. target[key] = val;
  3938. return val
  3939. }
  3940. defineReactive$$1(ob.value, key, val);
  3941. ob.dep.notify();
  3942. return val
  3943. }
  3944. /**
  3945. * Delete a property and trigger change if necessary.
  3946. */
  3947. function del (target, key) {
  3948. if ( true &&
  3949. (isUndef(target) || isPrimitive(target))
  3950. ) {
  3951. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  3952. }
  3953. if (Array.isArray(target) && isValidArrayIndex(key)) {
  3954. target.splice(key, 1);
  3955. return
  3956. }
  3957. var ob = (target).__ob__;
  3958. if (target._isVue || (ob && ob.vmCount)) {
  3959. true && warn(
  3960. 'Avoid deleting properties on a Vue instance or its root $data ' +
  3961. '- just set it to null.'
  3962. );
  3963. return
  3964. }
  3965. if (!hasOwn(target, key)) {
  3966. return
  3967. }
  3968. delete target[key];
  3969. if (!ob) {
  3970. return
  3971. }
  3972. ob.dep.notify();
  3973. }
  3974. /**
  3975. * Collect dependencies on array elements when the array is touched, since
  3976. * we cannot intercept array element access like property getters.
  3977. */
  3978. function dependArray (value) {
  3979. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  3980. e = value[i];
  3981. e && e.__ob__ && e.__ob__.dep.depend();
  3982. if (Array.isArray(e)) {
  3983. dependArray(e);
  3984. }
  3985. }
  3986. }
  3987. /* */
  3988. /**
  3989. * Option overwriting strategies are functions that handle
  3990. * how to merge a parent option value and a child option
  3991. * value into the final value.
  3992. */
  3993. var strats = config.optionMergeStrategies;
  3994. /**
  3995. * Options with restrictions
  3996. */
  3997. if (true) {
  3998. strats.el = strats.propsData = function (parent, child, vm, key) {
  3999. if (!vm) {
  4000. warn(
  4001. "option \"" + key + "\" can only be used during instance " +
  4002. 'creation with the `new` keyword.'
  4003. );
  4004. }
  4005. return defaultStrat(parent, child)
  4006. };
  4007. }
  4008. /**
  4009. * Helper that recursively merges two data objects together.
  4010. */
  4011. function mergeData (to, from) {
  4012. if (!from) { return to }
  4013. var key, toVal, fromVal;
  4014. var keys = hasSymbol
  4015. ? Reflect.ownKeys(from)
  4016. : Object.keys(from);
  4017. for (var i = 0; i < keys.length; i++) {
  4018. key = keys[i];
  4019. // in case the object is already observed...
  4020. if (key === '__ob__') { continue }
  4021. toVal = to[key];
  4022. fromVal = from[key];
  4023. if (!hasOwn(to, key)) {
  4024. set(to, key, fromVal);
  4025. } else if (
  4026. toVal !== fromVal &&
  4027. isPlainObject(toVal) &&
  4028. isPlainObject(fromVal)
  4029. ) {
  4030. mergeData(toVal, fromVal);
  4031. }
  4032. }
  4033. return to
  4034. }
  4035. /**
  4036. * Data
  4037. */
  4038. function mergeDataOrFn (
  4039. parentVal,
  4040. childVal,
  4041. vm
  4042. ) {
  4043. if (!vm) {
  4044. // in a Vue.extend merge, both should be functions
  4045. if (!childVal) {
  4046. return parentVal
  4047. }
  4048. if (!parentVal) {
  4049. return childVal
  4050. }
  4051. // when parentVal & childVal are both present,
  4052. // we need to return a function that returns the
  4053. // merged result of both functions... no need to
  4054. // check if parentVal is a function here because
  4055. // it has to be a function to pass previous merges.
  4056. return function mergedDataFn () {
  4057. return mergeData(
  4058. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  4059. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  4060. )
  4061. }
  4062. } else {
  4063. return function mergedInstanceDataFn () {
  4064. // instance merge
  4065. var instanceData = typeof childVal === 'function'
  4066. ? childVal.call(vm, vm)
  4067. : childVal;
  4068. var defaultData = typeof parentVal === 'function'
  4069. ? parentVal.call(vm, vm)
  4070. : parentVal;
  4071. if (instanceData) {
  4072. return mergeData(instanceData, defaultData)
  4073. } else {
  4074. return defaultData
  4075. }
  4076. }
  4077. }
  4078. }
  4079. strats.data = function (
  4080. parentVal,
  4081. childVal,
  4082. vm
  4083. ) {
  4084. if (!vm) {
  4085. if (childVal && typeof childVal !== 'function') {
  4086. true && warn(
  4087. 'The "data" option should be a function ' +
  4088. 'that returns a per-instance value in component ' +
  4089. 'definitions.',
  4090. vm
  4091. );
  4092. return parentVal
  4093. }
  4094. return mergeDataOrFn(parentVal, childVal)
  4095. }
  4096. return mergeDataOrFn(parentVal, childVal, vm)
  4097. };
  4098. /**
  4099. * Hooks and props are merged as arrays.
  4100. */
  4101. function mergeHook (
  4102. parentVal,
  4103. childVal
  4104. ) {
  4105. var res = childVal
  4106. ? parentVal
  4107. ? parentVal.concat(childVal)
  4108. : Array.isArray(childVal)
  4109. ? childVal
  4110. : [childVal]
  4111. : parentVal;
  4112. return res
  4113. ? dedupeHooks(res)
  4114. : res
  4115. }
  4116. function dedupeHooks (hooks) {
  4117. var res = [];
  4118. for (var i = 0; i < hooks.length; i++) {
  4119. if (res.indexOf(hooks[i]) === -1) {
  4120. res.push(hooks[i]);
  4121. }
  4122. }
  4123. return res
  4124. }
  4125. LIFECYCLE_HOOKS.forEach(function (hook) {
  4126. strats[hook] = mergeHook;
  4127. });
  4128. /**
  4129. * Assets
  4130. *
  4131. * When a vm is present (instance creation), we need to do
  4132. * a three-way merge between constructor options, instance
  4133. * options and parent options.
  4134. */
  4135. function mergeAssets (
  4136. parentVal,
  4137. childVal,
  4138. vm,
  4139. key
  4140. ) {
  4141. var res = Object.create(parentVal || null);
  4142. if (childVal) {
  4143. true && assertObjectType(key, childVal, vm);
  4144. return extend(res, childVal)
  4145. } else {
  4146. return res
  4147. }
  4148. }
  4149. ASSET_TYPES.forEach(function (type) {
  4150. strats[type + 's'] = mergeAssets;
  4151. });
  4152. /**
  4153. * Watchers.
  4154. *
  4155. * Watchers hashes should not overwrite one
  4156. * another, so we merge them as arrays.
  4157. */
  4158. strats.watch = function (
  4159. parentVal,
  4160. childVal,
  4161. vm,
  4162. key
  4163. ) {
  4164. // work around Firefox's Object.prototype.watch...
  4165. if (parentVal === nativeWatch) { parentVal = undefined; }
  4166. if (childVal === nativeWatch) { childVal = undefined; }
  4167. /* istanbul ignore if */
  4168. if (!childVal) { return Object.create(parentVal || null) }
  4169. if (true) {
  4170. assertObjectType(key, childVal, vm);
  4171. }
  4172. if (!parentVal) { return childVal }
  4173. var ret = {};
  4174. extend(ret, parentVal);
  4175. for (var key$1 in childVal) {
  4176. var parent = ret[key$1];
  4177. var child = childVal[key$1];
  4178. if (parent && !Array.isArray(parent)) {
  4179. parent = [parent];
  4180. }
  4181. ret[key$1] = parent
  4182. ? parent.concat(child)
  4183. : Array.isArray(child) ? child : [child];
  4184. }
  4185. return ret
  4186. };
  4187. /**
  4188. * Other object hashes.
  4189. */
  4190. strats.props =
  4191. strats.methods =
  4192. strats.inject =
  4193. strats.computed = function (
  4194. parentVal,
  4195. childVal,
  4196. vm,
  4197. key
  4198. ) {
  4199. if (childVal && "development" !== 'production') {
  4200. assertObjectType(key, childVal, vm);
  4201. }
  4202. if (!parentVal) { return childVal }
  4203. var ret = Object.create(null);
  4204. extend(ret, parentVal);
  4205. if (childVal) { extend(ret, childVal); }
  4206. return ret
  4207. };
  4208. strats.provide = mergeDataOrFn;
  4209. /**
  4210. * Default strategy.
  4211. */
  4212. var defaultStrat = function (parentVal, childVal) {
  4213. return childVal === undefined
  4214. ? parentVal
  4215. : childVal
  4216. };
  4217. /**
  4218. * Validate component names
  4219. */
  4220. function checkComponents (options) {
  4221. for (var key in options.components) {
  4222. validateComponentName(key);
  4223. }
  4224. }
  4225. function validateComponentName (name) {
  4226. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  4227. warn(
  4228. 'Invalid component name: "' + name + '". Component names ' +
  4229. 'should conform to valid custom element name in html5 specification.'
  4230. );
  4231. }
  4232. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  4233. warn(
  4234. 'Do not use built-in or reserved HTML elements as component ' +
  4235. 'id: ' + name
  4236. );
  4237. }
  4238. }
  4239. /**
  4240. * Ensure all props option syntax are normalized into the
  4241. * Object-based format.
  4242. */
  4243. function normalizeProps (options, vm) {
  4244. var props = options.props;
  4245. if (!props) { return }
  4246. var res = {};
  4247. var i, val, name;
  4248. if (Array.isArray(props)) {
  4249. i = props.length;
  4250. while (i--) {
  4251. val = props[i];
  4252. if (typeof val === 'string') {
  4253. name = camelize(val);
  4254. res[name] = { type: null };
  4255. } else if (true) {
  4256. warn('props must be strings when using array syntax.');
  4257. }
  4258. }
  4259. } else if (isPlainObject(props)) {
  4260. for (var key in props) {
  4261. val = props[key];
  4262. name = camelize(key);
  4263. res[name] = isPlainObject(val)
  4264. ? val
  4265. : { type: val };
  4266. }
  4267. } else if (true) {
  4268. warn(
  4269. "Invalid value for option \"props\": expected an Array or an Object, " +
  4270. "but got " + (toRawType(props)) + ".",
  4271. vm
  4272. );
  4273. }
  4274. options.props = res;
  4275. }
  4276. /**
  4277. * Normalize all injections into Object-based format
  4278. */
  4279. function normalizeInject (options, vm) {
  4280. var inject = options.inject;
  4281. if (!inject) { return }
  4282. var normalized = options.inject = {};
  4283. if (Array.isArray(inject)) {
  4284. for (var i = 0; i < inject.length; i++) {
  4285. normalized[inject[i]] = { from: inject[i] };
  4286. }
  4287. } else if (isPlainObject(inject)) {
  4288. for (var key in inject) {
  4289. var val = inject[key];
  4290. normalized[key] = isPlainObject(val)
  4291. ? extend({ from: key }, val)
  4292. : { from: val };
  4293. }
  4294. } else if (true) {
  4295. warn(
  4296. "Invalid value for option \"inject\": expected an Array or an Object, " +
  4297. "but got " + (toRawType(inject)) + ".",
  4298. vm
  4299. );
  4300. }
  4301. }
  4302. /**
  4303. * Normalize raw function directives into object format.
  4304. */
  4305. function normalizeDirectives (options) {
  4306. var dirs = options.directives;
  4307. if (dirs) {
  4308. for (var key in dirs) {
  4309. var def$$1 = dirs[key];
  4310. if (typeof def$$1 === 'function') {
  4311. dirs[key] = { bind: def$$1, update: def$$1 };
  4312. }
  4313. }
  4314. }
  4315. }
  4316. function assertObjectType (name, value, vm) {
  4317. if (!isPlainObject(value)) {
  4318. warn(
  4319. "Invalid value for option \"" + name + "\": expected an Object, " +
  4320. "but got " + (toRawType(value)) + ".",
  4321. vm
  4322. );
  4323. }
  4324. }
  4325. /**
  4326. * Merge two option objects into a new one.
  4327. * Core utility used in both instantiation and inheritance.
  4328. */
  4329. function mergeOptions (
  4330. parent,
  4331. child,
  4332. vm
  4333. ) {
  4334. if (true) {
  4335. checkComponents(child);
  4336. }
  4337. if (typeof child === 'function') {
  4338. child = child.options;
  4339. }
  4340. normalizeProps(child, vm);
  4341. normalizeInject(child, vm);
  4342. normalizeDirectives(child);
  4343. // Apply extends and mixins on the child options,
  4344. // but only if it is a raw options object that isn't
  4345. // the result of another mergeOptions call.
  4346. // Only merged options has the _base property.
  4347. if (!child._base) {
  4348. if (child.extends) {
  4349. parent = mergeOptions(parent, child.extends, vm);
  4350. }
  4351. if (child.mixins) {
  4352. for (var i = 0, l = child.mixins.length; i < l; i++) {
  4353. parent = mergeOptions(parent, child.mixins[i], vm);
  4354. }
  4355. }
  4356. }
  4357. var options = {};
  4358. var key;
  4359. for (key in parent) {
  4360. mergeField(key);
  4361. }
  4362. for (key in child) {
  4363. if (!hasOwn(parent, key)) {
  4364. mergeField(key);
  4365. }
  4366. }
  4367. function mergeField (key) {
  4368. var strat = strats[key] || defaultStrat;
  4369. options[key] = strat(parent[key], child[key], vm, key);
  4370. }
  4371. return options
  4372. }
  4373. /**
  4374. * Resolve an asset.
  4375. * This function is used because child instances need access
  4376. * to assets defined in its ancestor chain.
  4377. */
  4378. function resolveAsset (
  4379. options,
  4380. type,
  4381. id,
  4382. warnMissing
  4383. ) {
  4384. /* istanbul ignore if */
  4385. if (typeof id !== 'string') {
  4386. return
  4387. }
  4388. var assets = options[type];
  4389. // check local registration variations first
  4390. if (hasOwn(assets, id)) { return assets[id] }
  4391. var camelizedId = camelize(id);
  4392. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  4393. var PascalCaseId = capitalize(camelizedId);
  4394. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  4395. // fallback to prototype chain
  4396. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  4397. if ( true && warnMissing && !res) {
  4398. warn(
  4399. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  4400. options
  4401. );
  4402. }
  4403. return res
  4404. }
  4405. /* */
  4406. function validateProp (
  4407. key,
  4408. propOptions,
  4409. propsData,
  4410. vm
  4411. ) {
  4412. var prop = propOptions[key];
  4413. var absent = !hasOwn(propsData, key);
  4414. var value = propsData[key];
  4415. // boolean casting
  4416. var booleanIndex = getTypeIndex(Boolean, prop.type);
  4417. if (booleanIndex > -1) {
  4418. if (absent && !hasOwn(prop, 'default')) {
  4419. value = false;
  4420. } else if (value === '' || value === hyphenate(key)) {
  4421. // only cast empty string / same name to boolean if
  4422. // boolean has higher priority
  4423. var stringIndex = getTypeIndex(String, prop.type);
  4424. if (stringIndex < 0 || booleanIndex < stringIndex) {
  4425. value = true;
  4426. }
  4427. }
  4428. }
  4429. // check default value
  4430. if (value === undefined) {
  4431. value = getPropDefaultValue(vm, prop, key);
  4432. // since the default value is a fresh copy,
  4433. // make sure to observe it.
  4434. var prevShouldObserve = shouldObserve;
  4435. toggleObserving(true);
  4436. observe(value);
  4437. toggleObserving(prevShouldObserve);
  4438. }
  4439. if (
  4440. true
  4441. ) {
  4442. assertProp(prop, key, value, vm, absent);
  4443. }
  4444. return value
  4445. }
  4446. /**
  4447. * Get the default value of a prop.
  4448. */
  4449. function getPropDefaultValue (vm, prop, key) {
  4450. // no default, return undefined
  4451. if (!hasOwn(prop, 'default')) {
  4452. return undefined
  4453. }
  4454. var def = prop.default;
  4455. // warn against non-factory defaults for Object & Array
  4456. if ( true && isObject(def)) {
  4457. warn(
  4458. 'Invalid default value for prop "' + key + '": ' +
  4459. 'Props with type Object/Array must use a factory function ' +
  4460. 'to return the default value.',
  4461. vm
  4462. );
  4463. }
  4464. // the raw prop value was also undefined from previous render,
  4465. // return previous default value to avoid unnecessary watcher trigger
  4466. if (vm && vm.$options.propsData &&
  4467. vm.$options.propsData[key] === undefined &&
  4468. vm._props[key] !== undefined
  4469. ) {
  4470. return vm._props[key]
  4471. }
  4472. // call factory function for non-Function types
  4473. // a value is Function if its prototype is function even across different execution context
  4474. return typeof def === 'function' && getType(prop.type) !== 'Function'
  4475. ? def.call(vm)
  4476. : def
  4477. }
  4478. /**
  4479. * Assert whether a prop is valid.
  4480. */
  4481. function assertProp (
  4482. prop,
  4483. name,
  4484. value,
  4485. vm,
  4486. absent
  4487. ) {
  4488. if (prop.required && absent) {
  4489. warn(
  4490. 'Missing required prop: "' + name + '"',
  4491. vm
  4492. );
  4493. return
  4494. }
  4495. if (value == null && !prop.required) {
  4496. return
  4497. }
  4498. var type = prop.type;
  4499. var valid = !type || type === true;
  4500. var expectedTypes = [];
  4501. if (type) {
  4502. if (!Array.isArray(type)) {
  4503. type = [type];
  4504. }
  4505. for (var i = 0; i < type.length && !valid; i++) {
  4506. var assertedType = assertType(value, type[i]);
  4507. expectedTypes.push(assertedType.expectedType || '');
  4508. valid = assertedType.valid;
  4509. }
  4510. }
  4511. if (!valid) {
  4512. warn(
  4513. getInvalidTypeMessage(name, value, expectedTypes),
  4514. vm
  4515. );
  4516. return
  4517. }
  4518. var validator = prop.validator;
  4519. if (validator) {
  4520. if (!validator(value)) {
  4521. warn(
  4522. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  4523. vm
  4524. );
  4525. }
  4526. }
  4527. }
  4528. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  4529. function assertType (value, type) {
  4530. var valid;
  4531. var expectedType = getType(type);
  4532. if (simpleCheckRE.test(expectedType)) {
  4533. var t = typeof value;
  4534. valid = t === expectedType.toLowerCase();
  4535. // for primitive wrapper objects
  4536. if (!valid && t === 'object') {
  4537. valid = value instanceof type;
  4538. }
  4539. } else if (expectedType === 'Object') {
  4540. valid = isPlainObject(value);
  4541. } else if (expectedType === 'Array') {
  4542. valid = Array.isArray(value);
  4543. } else {
  4544. valid = value instanceof type;
  4545. }
  4546. return {
  4547. valid: valid,
  4548. expectedType: expectedType
  4549. }
  4550. }
  4551. /**
  4552. * Use function string name to check built-in types,
  4553. * because a simple equality check will fail when running
  4554. * across different vms / iframes.
  4555. */
  4556. function getType (fn) {
  4557. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  4558. return match ? match[1] : ''
  4559. }
  4560. function isSameType (a, b) {
  4561. return getType(a) === getType(b)
  4562. }
  4563. function getTypeIndex (type, expectedTypes) {
  4564. if (!Array.isArray(expectedTypes)) {
  4565. return isSameType(expectedTypes, type) ? 0 : -1
  4566. }
  4567. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  4568. if (isSameType(expectedTypes[i], type)) {
  4569. return i
  4570. }
  4571. }
  4572. return -1
  4573. }
  4574. function getInvalidTypeMessage (name, value, expectedTypes) {
  4575. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  4576. " Expected " + (expectedTypes.map(capitalize).join(', '));
  4577. var expectedType = expectedTypes[0];
  4578. var receivedType = toRawType(value);
  4579. var expectedValue = styleValue(value, expectedType);
  4580. var receivedValue = styleValue(value, receivedType);
  4581. // check if we need to specify expected value
  4582. if (expectedTypes.length === 1 &&
  4583. isExplicable(expectedType) &&
  4584. !isBoolean(expectedType, receivedType)) {
  4585. message += " with value " + expectedValue;
  4586. }
  4587. message += ", got " + receivedType + " ";
  4588. // check if we need to specify received value
  4589. if (isExplicable(receivedType)) {
  4590. message += "with value " + receivedValue + ".";
  4591. }
  4592. return message
  4593. }
  4594. function styleValue (value, type) {
  4595. if (type === 'String') {
  4596. return ("\"" + value + "\"")
  4597. } else if (type === 'Number') {
  4598. return ("" + (Number(value)))
  4599. } else {
  4600. return ("" + value)
  4601. }
  4602. }
  4603. function isExplicable (value) {
  4604. var explicitTypes = ['string', 'number', 'boolean'];
  4605. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  4606. }
  4607. function isBoolean () {
  4608. var args = [], len = arguments.length;
  4609. while ( len-- ) args[ len ] = arguments[ len ];
  4610. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  4611. }
  4612. /* */
  4613. function handleError (err, vm, info) {
  4614. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  4615. // See: https://github.com/vuejs/vuex/issues/1505
  4616. pushTarget();
  4617. try {
  4618. if (vm) {
  4619. var cur = vm;
  4620. while ((cur = cur.$parent)) {
  4621. var hooks = cur.$options.errorCaptured;
  4622. if (hooks) {
  4623. for (var i = 0; i < hooks.length; i++) {
  4624. try {
  4625. var capture = hooks[i].call(cur, err, vm, info) === false;
  4626. if (capture) { return }
  4627. } catch (e) {
  4628. globalHandleError(e, cur, 'errorCaptured hook');
  4629. }
  4630. }
  4631. }
  4632. }
  4633. }
  4634. globalHandleError(err, vm, info);
  4635. } finally {
  4636. popTarget();
  4637. }
  4638. }
  4639. function invokeWithErrorHandling (
  4640. handler,
  4641. context,
  4642. args,
  4643. vm,
  4644. info
  4645. ) {
  4646. var res;
  4647. try {
  4648. res = args ? handler.apply(context, args) : handler.call(context);
  4649. if (res && !res._isVue && isPromise(res) && !res._handled) {
  4650. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  4651. // issue #9511
  4652. // avoid catch triggering multiple times when nested calls
  4653. res._handled = true;
  4654. }
  4655. } catch (e) {
  4656. handleError(e, vm, info);
  4657. }
  4658. return res
  4659. }
  4660. function globalHandleError (err, vm, info) {
  4661. if (config.errorHandler) {
  4662. try {
  4663. return config.errorHandler.call(null, err, vm, info)
  4664. } catch (e) {
  4665. // if the user intentionally throws the original error in the handler,
  4666. // do not log it twice
  4667. if (e !== err) {
  4668. logError(e, null, 'config.errorHandler');
  4669. }
  4670. }
  4671. }
  4672. logError(err, vm, info);
  4673. }
  4674. function logError (err, vm, info) {
  4675. if (true) {
  4676. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  4677. }
  4678. /* istanbul ignore else */
  4679. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  4680. console.error(err);
  4681. } else {
  4682. throw err
  4683. }
  4684. }
  4685. /* */
  4686. var callbacks = [];
  4687. var pending = false;
  4688. function flushCallbacks () {
  4689. pending = false;
  4690. var copies = callbacks.slice(0);
  4691. callbacks.length = 0;
  4692. for (var i = 0; i < copies.length; i++) {
  4693. copies[i]();
  4694. }
  4695. }
  4696. // Here we have async deferring wrappers using microtasks.
  4697. // In 2.5 we used (macro) tasks (in combination with microtasks).
  4698. // However, it has subtle problems when state is changed right before repaint
  4699. // (e.g. #6813, out-in transitions).
  4700. // Also, using (macro) tasks in event handler would cause some weird behaviors
  4701. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  4702. // So we now use microtasks everywhere, again.
  4703. // A major drawback of this tradeoff is that there are some scenarios
  4704. // where microtasks have too high a priority and fire in between supposedly
  4705. // sequential events (e.g. #4521, #6690, which have workarounds)
  4706. // or even between bubbling of the same event (#6566).
  4707. var timerFunc;
  4708. // The nextTick behavior leverages the microtask queue, which can be accessed
  4709. // via either native Promise.then or MutationObserver.
  4710. // MutationObserver has wider support, however it is seriously bugged in
  4711. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  4712. // completely stops working after triggering a few times... so, if native
  4713. // Promise is available, we will use it:
  4714. /* istanbul ignore next, $flow-disable-line */
  4715. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  4716. var p = Promise.resolve();
  4717. timerFunc = function () {
  4718. p.then(flushCallbacks);
  4719. // In problematic UIWebViews, Promise.then doesn't completely break, but
  4720. // it can get stuck in a weird state where callbacks are pushed into the
  4721. // microtask queue but the queue isn't being flushed, until the browser
  4722. // needs to do some other work, e.g. handle a timer. Therefore we can
  4723. // "force" the microtask queue to be flushed by adding an empty timer.
  4724. if (isIOS) { setTimeout(noop); }
  4725. };
  4726. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  4727. isNative(MutationObserver) ||
  4728. // PhantomJS and iOS 7.x
  4729. MutationObserver.toString() === '[object MutationObserverConstructor]'
  4730. )) {
  4731. // Use MutationObserver where native Promise is not available,
  4732. // e.g. PhantomJS, iOS7, Android 4.4
  4733. // (#6466 MutationObserver is unreliable in IE11)
  4734. var counter = 1;
  4735. var observer = new MutationObserver(flushCallbacks);
  4736. var textNode = document.createTextNode(String(counter));
  4737. observer.observe(textNode, {
  4738. characterData: true
  4739. });
  4740. timerFunc = function () {
  4741. counter = (counter + 1) % 2;
  4742. textNode.data = String(counter);
  4743. };
  4744. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  4745. // Fallback to setImmediate.
  4746. // Technically it leverages the (macro) task queue,
  4747. // but it is still a better choice than setTimeout.
  4748. timerFunc = function () {
  4749. setImmediate(flushCallbacks);
  4750. };
  4751. } else {
  4752. // Fallback to setTimeout.
  4753. timerFunc = function () {
  4754. setTimeout(flushCallbacks, 0);
  4755. };
  4756. }
  4757. function nextTick (cb, ctx) {
  4758. var _resolve;
  4759. callbacks.push(function () {
  4760. if (cb) {
  4761. try {
  4762. cb.call(ctx);
  4763. } catch (e) {
  4764. handleError(e, ctx, 'nextTick');
  4765. }
  4766. } else if (_resolve) {
  4767. _resolve(ctx);
  4768. }
  4769. });
  4770. if (!pending) {
  4771. pending = true;
  4772. timerFunc();
  4773. }
  4774. // $flow-disable-line
  4775. if (!cb && typeof Promise !== 'undefined') {
  4776. return new Promise(function (resolve) {
  4777. _resolve = resolve;
  4778. })
  4779. }
  4780. }
  4781. /* */
  4782. /* not type checking this file because flow doesn't play well with Proxy */
  4783. var initProxy;
  4784. if (true) {
  4785. var allowedGlobals = makeMap(
  4786. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  4787. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  4788. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  4789. 'require' // for Webpack/Browserify
  4790. );
  4791. var warnNonPresent = function (target, key) {
  4792. warn(
  4793. "Property or method \"" + key + "\" is not defined on the instance but " +
  4794. 'referenced during render. Make sure that this property is reactive, ' +
  4795. 'either in the data option, or for class-based components, by ' +
  4796. 'initializing the property. ' +
  4797. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  4798. target
  4799. );
  4800. };
  4801. var warnReservedPrefix = function (target, key) {
  4802. warn(
  4803. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  4804. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  4805. 'prevent conflicts with Vue internals. ' +
  4806. 'See: https://vuejs.org/v2/api/#data',
  4807. target
  4808. );
  4809. };
  4810. var hasProxy =
  4811. typeof Proxy !== 'undefined' && isNative(Proxy);
  4812. if (hasProxy) {
  4813. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  4814. config.keyCodes = new Proxy(config.keyCodes, {
  4815. set: function set (target, key, value) {
  4816. if (isBuiltInModifier(key)) {
  4817. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  4818. return false
  4819. } else {
  4820. target[key] = value;
  4821. return true
  4822. }
  4823. }
  4824. });
  4825. }
  4826. var hasHandler = {
  4827. has: function has (target, key) {
  4828. var has = key in target;
  4829. var isAllowed = allowedGlobals(key) ||
  4830. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  4831. if (!has && !isAllowed) {
  4832. if (key in target.$data) { warnReservedPrefix(target, key); }
  4833. else { warnNonPresent(target, key); }
  4834. }
  4835. return has || !isAllowed
  4836. }
  4837. };
  4838. var getHandler = {
  4839. get: function get (target, key) {
  4840. if (typeof key === 'string' && !(key in target)) {
  4841. if (key in target.$data) { warnReservedPrefix(target, key); }
  4842. else { warnNonPresent(target, key); }
  4843. }
  4844. return target[key]
  4845. }
  4846. };
  4847. initProxy = function initProxy (vm) {
  4848. if (hasProxy) {
  4849. // determine which proxy handler to use
  4850. var options = vm.$options;
  4851. var handlers = options.render && options.render._withStripped
  4852. ? getHandler
  4853. : hasHandler;
  4854. vm._renderProxy = new Proxy(vm, handlers);
  4855. } else {
  4856. vm._renderProxy = vm;
  4857. }
  4858. };
  4859. }
  4860. /* */
  4861. var seenObjects = new _Set();
  4862. /**
  4863. * Recursively traverse an object to evoke all converted
  4864. * getters, so that every nested property inside the object
  4865. * is collected as a "deep" dependency.
  4866. */
  4867. function traverse (val) {
  4868. _traverse(val, seenObjects);
  4869. seenObjects.clear();
  4870. }
  4871. function _traverse (val, seen) {
  4872. var i, keys;
  4873. var isA = Array.isArray(val);
  4874. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  4875. return
  4876. }
  4877. if (val.__ob__) {
  4878. var depId = val.__ob__.dep.id;
  4879. if (seen.has(depId)) {
  4880. return
  4881. }
  4882. seen.add(depId);
  4883. }
  4884. if (isA) {
  4885. i = val.length;
  4886. while (i--) { _traverse(val[i], seen); }
  4887. } else {
  4888. keys = Object.keys(val);
  4889. i = keys.length;
  4890. while (i--) { _traverse(val[keys[i]], seen); }
  4891. }
  4892. }
  4893. var mark;
  4894. var measure;
  4895. if (true) {
  4896. var perf = inBrowser && window.performance;
  4897. /* istanbul ignore if */
  4898. if (
  4899. perf &&
  4900. perf.mark &&
  4901. perf.measure &&
  4902. perf.clearMarks &&
  4903. perf.clearMeasures
  4904. ) {
  4905. mark = function (tag) { return perf.mark(tag); };
  4906. measure = function (name, startTag, endTag) {
  4907. perf.measure(name, startTag, endTag);
  4908. perf.clearMarks(startTag);
  4909. perf.clearMarks(endTag);
  4910. // perf.clearMeasures(name)
  4911. };
  4912. }
  4913. }
  4914. /* */
  4915. var normalizeEvent = cached(function (name) {
  4916. var passive = name.charAt(0) === '&';
  4917. name = passive ? name.slice(1) : name;
  4918. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  4919. name = once$$1 ? name.slice(1) : name;
  4920. var capture = name.charAt(0) === '!';
  4921. name = capture ? name.slice(1) : name;
  4922. return {
  4923. name: name,
  4924. once: once$$1,
  4925. capture: capture,
  4926. passive: passive
  4927. }
  4928. });
  4929. function createFnInvoker (fns, vm) {
  4930. function invoker () {
  4931. var arguments$1 = arguments;
  4932. var fns = invoker.fns;
  4933. if (Array.isArray(fns)) {
  4934. var cloned = fns.slice();
  4935. for (var i = 0; i < cloned.length; i++) {
  4936. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  4937. }
  4938. } else {
  4939. // return handler return value for single handlers
  4940. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  4941. }
  4942. }
  4943. invoker.fns = fns;
  4944. return invoker
  4945. }
  4946. function updateListeners (
  4947. on,
  4948. oldOn,
  4949. add,
  4950. remove$$1,
  4951. createOnceHandler,
  4952. vm
  4953. ) {
  4954. var name, def$$1, cur, old, event;
  4955. for (name in on) {
  4956. def$$1 = cur = on[name];
  4957. old = oldOn[name];
  4958. event = normalizeEvent(name);
  4959. if (isUndef(cur)) {
  4960. true && warn(
  4961. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  4962. vm
  4963. );
  4964. } else if (isUndef(old)) {
  4965. if (isUndef(cur.fns)) {
  4966. cur = on[name] = createFnInvoker(cur, vm);
  4967. }
  4968. if (isTrue(event.once)) {
  4969. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  4970. }
  4971. add(event.name, cur, event.capture, event.passive, event.params);
  4972. } else if (cur !== old) {
  4973. old.fns = cur;
  4974. on[name] = old;
  4975. }
  4976. }
  4977. for (name in oldOn) {
  4978. if (isUndef(on[name])) {
  4979. event = normalizeEvent(name);
  4980. remove$$1(event.name, oldOn[name], event.capture);
  4981. }
  4982. }
  4983. }
  4984. /* */
  4985. /* */
  4986. // fixed by xxxxxx (mp properties)
  4987. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  4988. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  4989. if (isUndef(propOptions)) {
  4990. return res
  4991. }
  4992. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  4993. var attrs = data.attrs;
  4994. var props = data.props;
  4995. if (isDef(attrs) || isDef(props)) {
  4996. for (var key in propOptions) {
  4997. var altKey = hyphenate(key);
  4998. var result = checkProp(res, props, key, altKey, true) ||
  4999. checkProp(res, attrs, key, altKey, false);
  5000. // externalClass
  5001. if (
  5002. result &&
  5003. res[key] &&
  5004. externalClasses.indexOf(altKey) !== -1 &&
  5005. context[camelize(res[key])]
  5006. ) {
  5007. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  5008. res[key] = context[camelize(res[key])];
  5009. }
  5010. }
  5011. }
  5012. return res
  5013. }
  5014. function extractPropsFromVNodeData (
  5015. data,
  5016. Ctor,
  5017. tag,
  5018. context// fixed by xxxxxx
  5019. ) {
  5020. // we are only extracting raw values here.
  5021. // validation and default values are handled in the child
  5022. // component itself.
  5023. var propOptions = Ctor.options.props;
  5024. if (isUndef(propOptions)) {
  5025. // fixed by xxxxxx
  5026. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  5027. }
  5028. var res = {};
  5029. var attrs = data.attrs;
  5030. var props = data.props;
  5031. if (isDef(attrs) || isDef(props)) {
  5032. for (var key in propOptions) {
  5033. var altKey = hyphenate(key);
  5034. if (true) {
  5035. var keyInLowerCase = key.toLowerCase();
  5036. if (
  5037. key !== keyInLowerCase &&
  5038. attrs && hasOwn(attrs, keyInLowerCase)
  5039. ) {
  5040. tip(
  5041. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  5042. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  5043. " \"" + key + "\". " +
  5044. "Note that HTML attributes are case-insensitive and camelCased " +
  5045. "props need to use their kebab-case equivalents when using in-DOM " +
  5046. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  5047. );
  5048. }
  5049. }
  5050. checkProp(res, props, key, altKey, true) ||
  5051. checkProp(res, attrs, key, altKey, false);
  5052. }
  5053. }
  5054. // fixed by xxxxxx
  5055. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  5056. }
  5057. function checkProp (
  5058. res,
  5059. hash,
  5060. key,
  5061. altKey,
  5062. preserve
  5063. ) {
  5064. if (isDef(hash)) {
  5065. if (hasOwn(hash, key)) {
  5066. res[key] = hash[key];
  5067. if (!preserve) {
  5068. delete hash[key];
  5069. }
  5070. return true
  5071. } else if (hasOwn(hash, altKey)) {
  5072. res[key] = hash[altKey];
  5073. if (!preserve) {
  5074. delete hash[altKey];
  5075. }
  5076. return true
  5077. }
  5078. }
  5079. return false
  5080. }
  5081. /* */
  5082. // The template compiler attempts to minimize the need for normalization by
  5083. // statically analyzing the template at compile time.
  5084. //
  5085. // For plain HTML markup, normalization can be completely skipped because the
  5086. // generated render function is guaranteed to return Array<VNode>. There are
  5087. // two cases where extra normalization is needed:
  5088. // 1. When the children contains components - because a functional component
  5089. // may return an Array instead of a single root. In this case, just a simple
  5090. // normalization is needed - if any child is an Array, we flatten the whole
  5091. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  5092. // because functional components already normalize their own children.
  5093. function simpleNormalizeChildren (children) {
  5094. for (var i = 0; i < children.length; i++) {
  5095. if (Array.isArray(children[i])) {
  5096. return Array.prototype.concat.apply([], children)
  5097. }
  5098. }
  5099. return children
  5100. }
  5101. // 2. When the children contains constructs that always generated nested Arrays,
  5102. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  5103. // with hand-written render functions / JSX. In such cases a full normalization
  5104. // is needed to cater to all possible types of children values.
  5105. function normalizeChildren (children) {
  5106. return isPrimitive(children)
  5107. ? [createTextVNode(children)]
  5108. : Array.isArray(children)
  5109. ? normalizeArrayChildren(children)
  5110. : undefined
  5111. }
  5112. function isTextNode (node) {
  5113. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  5114. }
  5115. function normalizeArrayChildren (children, nestedIndex) {
  5116. var res = [];
  5117. var i, c, lastIndex, last;
  5118. for (i = 0; i < children.length; i++) {
  5119. c = children[i];
  5120. if (isUndef(c) || typeof c === 'boolean') { continue }
  5121. lastIndex = res.length - 1;
  5122. last = res[lastIndex];
  5123. // nested
  5124. if (Array.isArray(c)) {
  5125. if (c.length > 0) {
  5126. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  5127. // merge adjacent text nodes
  5128. if (isTextNode(c[0]) && isTextNode(last)) {
  5129. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  5130. c.shift();
  5131. }
  5132. res.push.apply(res, c);
  5133. }
  5134. } else if (isPrimitive(c)) {
  5135. if (isTextNode(last)) {
  5136. // merge adjacent text nodes
  5137. // this is necessary for SSR hydration because text nodes are
  5138. // essentially merged when rendered to HTML strings
  5139. res[lastIndex] = createTextVNode(last.text + c);
  5140. } else if (c !== '') {
  5141. // convert primitive to vnode
  5142. res.push(createTextVNode(c));
  5143. }
  5144. } else {
  5145. if (isTextNode(c) && isTextNode(last)) {
  5146. // merge adjacent text nodes
  5147. res[lastIndex] = createTextVNode(last.text + c.text);
  5148. } else {
  5149. // default key for nested array children (likely generated by v-for)
  5150. if (isTrue(children._isVList) &&
  5151. isDef(c.tag) &&
  5152. isUndef(c.key) &&
  5153. isDef(nestedIndex)) {
  5154. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  5155. }
  5156. res.push(c);
  5157. }
  5158. }
  5159. }
  5160. return res
  5161. }
  5162. /* */
  5163. function initProvide (vm) {
  5164. var provide = vm.$options.provide;
  5165. if (provide) {
  5166. vm._provided = typeof provide === 'function'
  5167. ? provide.call(vm)
  5168. : provide;
  5169. }
  5170. }
  5171. function initInjections (vm) {
  5172. var result = resolveInject(vm.$options.inject, vm);
  5173. if (result) {
  5174. toggleObserving(false);
  5175. Object.keys(result).forEach(function (key) {
  5176. /* istanbul ignore else */
  5177. if (true) {
  5178. defineReactive$$1(vm, key, result[key], function () {
  5179. warn(
  5180. "Avoid mutating an injected value directly since the changes will be " +
  5181. "overwritten whenever the provided component re-renders. " +
  5182. "injection being mutated: \"" + key + "\"",
  5183. vm
  5184. );
  5185. });
  5186. } else {}
  5187. });
  5188. toggleObserving(true);
  5189. }
  5190. }
  5191. function resolveInject (inject, vm) {
  5192. if (inject) {
  5193. // inject is :any because flow is not smart enough to figure out cached
  5194. var result = Object.create(null);
  5195. var keys = hasSymbol
  5196. ? Reflect.ownKeys(inject)
  5197. : Object.keys(inject);
  5198. for (var i = 0; i < keys.length; i++) {
  5199. var key = keys[i];
  5200. // #6574 in case the inject object is observed...
  5201. if (key === '__ob__') { continue }
  5202. var provideKey = inject[key].from;
  5203. var source = vm;
  5204. while (source) {
  5205. if (source._provided && hasOwn(source._provided, provideKey)) {
  5206. result[key] = source._provided[provideKey];
  5207. break
  5208. }
  5209. source = source.$parent;
  5210. }
  5211. if (!source) {
  5212. if ('default' in inject[key]) {
  5213. var provideDefault = inject[key].default;
  5214. result[key] = typeof provideDefault === 'function'
  5215. ? provideDefault.call(vm)
  5216. : provideDefault;
  5217. } else if (true) {
  5218. warn(("Injection \"" + key + "\" not found"), vm);
  5219. }
  5220. }
  5221. }
  5222. return result
  5223. }
  5224. }
  5225. /* */
  5226. /**
  5227. * Runtime helper for resolving raw children VNodes into a slot object.
  5228. */
  5229. function resolveSlots (
  5230. children,
  5231. context
  5232. ) {
  5233. if (!children || !children.length) {
  5234. return {}
  5235. }
  5236. var slots = {};
  5237. for (var i = 0, l = children.length; i < l; i++) {
  5238. var child = children[i];
  5239. var data = child.data;
  5240. // remove slot attribute if the node is resolved as a Vue slot node
  5241. if (data && data.attrs && data.attrs.slot) {
  5242. delete data.attrs.slot;
  5243. }
  5244. // named slots should only be respected if the vnode was rendered in the
  5245. // same context.
  5246. if ((child.context === context || child.fnContext === context) &&
  5247. data && data.slot != null
  5248. ) {
  5249. var name = data.slot;
  5250. var slot = (slots[name] || (slots[name] = []));
  5251. if (child.tag === 'template') {
  5252. slot.push.apply(slot, child.children || []);
  5253. } else {
  5254. slot.push(child);
  5255. }
  5256. } else {
  5257. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  5258. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  5259. (slots['page'] || (slots['page'] = [])).push(child);
  5260. }else{
  5261. (slots.default || (slots.default = [])).push(child);
  5262. }
  5263. }
  5264. }
  5265. // ignore slots that contains only whitespace
  5266. for (var name$1 in slots) {
  5267. if (slots[name$1].every(isWhitespace)) {
  5268. delete slots[name$1];
  5269. }
  5270. }
  5271. return slots
  5272. }
  5273. function isWhitespace (node) {
  5274. return (node.isComment && !node.asyncFactory) || node.text === ' '
  5275. }
  5276. /* */
  5277. function normalizeScopedSlots (
  5278. slots,
  5279. normalSlots,
  5280. prevSlots
  5281. ) {
  5282. var res;
  5283. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  5284. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  5285. var key = slots && slots.$key;
  5286. if (!slots) {
  5287. res = {};
  5288. } else if (slots._normalized) {
  5289. // fast path 1: child component re-render only, parent did not change
  5290. return slots._normalized
  5291. } else if (
  5292. isStable &&
  5293. prevSlots &&
  5294. prevSlots !== emptyObject &&
  5295. key === prevSlots.$key &&
  5296. !hasNormalSlots &&
  5297. !prevSlots.$hasNormal
  5298. ) {
  5299. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  5300. // only need to normalize once
  5301. return prevSlots
  5302. } else {
  5303. res = {};
  5304. for (var key$1 in slots) {
  5305. if (slots[key$1] && key$1[0] !== '$') {
  5306. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  5307. }
  5308. }
  5309. }
  5310. // expose normal slots on scopedSlots
  5311. for (var key$2 in normalSlots) {
  5312. if (!(key$2 in res)) {
  5313. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  5314. }
  5315. }
  5316. // avoriaz seems to mock a non-extensible $scopedSlots object
  5317. // and when that is passed down this would cause an error
  5318. if (slots && Object.isExtensible(slots)) {
  5319. (slots)._normalized = res;
  5320. }
  5321. def(res, '$stable', isStable);
  5322. def(res, '$key', key);
  5323. def(res, '$hasNormal', hasNormalSlots);
  5324. return res
  5325. }
  5326. function normalizeScopedSlot(normalSlots, key, fn) {
  5327. var normalized = function () {
  5328. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  5329. res = res && typeof res === 'object' && !Array.isArray(res)
  5330. ? [res] // single vnode
  5331. : normalizeChildren(res);
  5332. return res && (
  5333. res.length === 0 ||
  5334. (res.length === 1 && res[0].isComment) // #9658
  5335. ) ? undefined
  5336. : res
  5337. };
  5338. // this is a slot using the new v-slot syntax without scope. although it is
  5339. // compiled as a scoped slot, render fn users would expect it to be present
  5340. // on this.$slots because the usage is semantically a normal slot.
  5341. if (fn.proxy) {
  5342. Object.defineProperty(normalSlots, key, {
  5343. get: normalized,
  5344. enumerable: true,
  5345. configurable: true
  5346. });
  5347. }
  5348. return normalized
  5349. }
  5350. function proxyNormalSlot(slots, key) {
  5351. return function () { return slots[key]; }
  5352. }
  5353. /* */
  5354. /**
  5355. * Runtime helper for rendering v-for lists.
  5356. */
  5357. function renderList (
  5358. val,
  5359. render
  5360. ) {
  5361. var ret, i, l, keys, key;
  5362. if (Array.isArray(val) || typeof val === 'string') {
  5363. ret = new Array(val.length);
  5364. for (i = 0, l = val.length; i < l; i++) {
  5365. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  5366. }
  5367. } else if (typeof val === 'number') {
  5368. ret = new Array(val);
  5369. for (i = 0; i < val; i++) {
  5370. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  5371. }
  5372. } else if (isObject(val)) {
  5373. if (hasSymbol && val[Symbol.iterator]) {
  5374. ret = [];
  5375. var iterator = val[Symbol.iterator]();
  5376. var result = iterator.next();
  5377. while (!result.done) {
  5378. ret.push(render(result.value, ret.length, i++, i)); // fixed by xxxxxx
  5379. result = iterator.next();
  5380. }
  5381. } else {
  5382. keys = Object.keys(val);
  5383. ret = new Array(keys.length);
  5384. for (i = 0, l = keys.length; i < l; i++) {
  5385. key = keys[i];
  5386. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  5387. }
  5388. }
  5389. }
  5390. if (!isDef(ret)) {
  5391. ret = [];
  5392. }
  5393. (ret)._isVList = true;
  5394. return ret
  5395. }
  5396. /* */
  5397. /**
  5398. * Runtime helper for rendering <slot>
  5399. */
  5400. function renderSlot (
  5401. name,
  5402. fallback,
  5403. props,
  5404. bindObject
  5405. ) {
  5406. var scopedSlotFn = this.$scopedSlots[name];
  5407. var nodes;
  5408. if (scopedSlotFn) { // scoped slot
  5409. props = props || {};
  5410. if (bindObject) {
  5411. if ( true && !isObject(bindObject)) {
  5412. warn(
  5413. 'slot v-bind without argument expects an Object',
  5414. this
  5415. );
  5416. }
  5417. props = extend(extend({}, bindObject), props);
  5418. }
  5419. // fixed by xxxxxx app-plus scopedSlot
  5420. nodes = scopedSlotFn(props, this, props._i) || fallback;
  5421. } else {
  5422. nodes = this.$slots[name] || fallback;
  5423. }
  5424. var target = props && props.slot;
  5425. if (target) {
  5426. return this.$createElement('template', { slot: target }, nodes)
  5427. } else {
  5428. return nodes
  5429. }
  5430. }
  5431. /* */
  5432. /**
  5433. * Runtime helper for resolving filters
  5434. */
  5435. function resolveFilter (id) {
  5436. return resolveAsset(this.$options, 'filters', id, true) || identity
  5437. }
  5438. /* */
  5439. function isKeyNotMatch (expect, actual) {
  5440. if (Array.isArray(expect)) {
  5441. return expect.indexOf(actual) === -1
  5442. } else {
  5443. return expect !== actual
  5444. }
  5445. }
  5446. /**
  5447. * Runtime helper for checking keyCodes from config.
  5448. * exposed as Vue.prototype._k
  5449. * passing in eventKeyName as last argument separately for backwards compat
  5450. */
  5451. function checkKeyCodes (
  5452. eventKeyCode,
  5453. key,
  5454. builtInKeyCode,
  5455. eventKeyName,
  5456. builtInKeyName
  5457. ) {
  5458. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  5459. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  5460. return isKeyNotMatch(builtInKeyName, eventKeyName)
  5461. } else if (mappedKeyCode) {
  5462. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  5463. } else if (eventKeyName) {
  5464. return hyphenate(eventKeyName) !== key
  5465. }
  5466. }
  5467. /* */
  5468. /**
  5469. * Runtime helper for merging v-bind="object" into a VNode's data.
  5470. */
  5471. function bindObjectProps (
  5472. data,
  5473. tag,
  5474. value,
  5475. asProp,
  5476. isSync
  5477. ) {
  5478. if (value) {
  5479. if (!isObject(value)) {
  5480. true && warn(
  5481. 'v-bind without argument expects an Object or Array value',
  5482. this
  5483. );
  5484. } else {
  5485. if (Array.isArray(value)) {
  5486. value = toObject(value);
  5487. }
  5488. var hash;
  5489. var loop = function ( key ) {
  5490. if (
  5491. key === 'class' ||
  5492. key === 'style' ||
  5493. isReservedAttribute(key)
  5494. ) {
  5495. hash = data;
  5496. } else {
  5497. var type = data.attrs && data.attrs.type;
  5498. hash = asProp || config.mustUseProp(tag, type, key)
  5499. ? data.domProps || (data.domProps = {})
  5500. : data.attrs || (data.attrs = {});
  5501. }
  5502. var camelizedKey = camelize(key);
  5503. var hyphenatedKey = hyphenate(key);
  5504. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  5505. hash[key] = value[key];
  5506. if (isSync) {
  5507. var on = data.on || (data.on = {});
  5508. on[("update:" + key)] = function ($event) {
  5509. value[key] = $event;
  5510. };
  5511. }
  5512. }
  5513. };
  5514. for (var key in value) loop( key );
  5515. }
  5516. }
  5517. return data
  5518. }
  5519. /* */
  5520. /**
  5521. * Runtime helper for rendering static trees.
  5522. */
  5523. function renderStatic (
  5524. index,
  5525. isInFor
  5526. ) {
  5527. var cached = this._staticTrees || (this._staticTrees = []);
  5528. var tree = cached[index];
  5529. // if has already-rendered static tree and not inside v-for,
  5530. // we can reuse the same tree.
  5531. if (tree && !isInFor) {
  5532. return tree
  5533. }
  5534. // otherwise, render a fresh tree.
  5535. tree = cached[index] = this.$options.staticRenderFns[index].call(
  5536. this._renderProxy,
  5537. null,
  5538. this // for render fns generated for functional component templates
  5539. );
  5540. markStatic(tree, ("__static__" + index), false);
  5541. return tree
  5542. }
  5543. /**
  5544. * Runtime helper for v-once.
  5545. * Effectively it means marking the node as static with a unique key.
  5546. */
  5547. function markOnce (
  5548. tree,
  5549. index,
  5550. key
  5551. ) {
  5552. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  5553. return tree
  5554. }
  5555. function markStatic (
  5556. tree,
  5557. key,
  5558. isOnce
  5559. ) {
  5560. if (Array.isArray(tree)) {
  5561. for (var i = 0; i < tree.length; i++) {
  5562. if (tree[i] && typeof tree[i] !== 'string') {
  5563. markStaticNode(tree[i], (key + "_" + i), isOnce);
  5564. }
  5565. }
  5566. } else {
  5567. markStaticNode(tree, key, isOnce);
  5568. }
  5569. }
  5570. function markStaticNode (node, key, isOnce) {
  5571. node.isStatic = true;
  5572. node.key = key;
  5573. node.isOnce = isOnce;
  5574. }
  5575. /* */
  5576. function bindObjectListeners (data, value) {
  5577. if (value) {
  5578. if (!isPlainObject(value)) {
  5579. true && warn(
  5580. 'v-on without argument expects an Object value',
  5581. this
  5582. );
  5583. } else {
  5584. var on = data.on = data.on ? extend({}, data.on) : {};
  5585. for (var key in value) {
  5586. var existing = on[key];
  5587. var ours = value[key];
  5588. on[key] = existing ? [].concat(existing, ours) : ours;
  5589. }
  5590. }
  5591. }
  5592. return data
  5593. }
  5594. /* */
  5595. function resolveScopedSlots (
  5596. fns, // see flow/vnode
  5597. res,
  5598. // the following are added in 2.6
  5599. hasDynamicKeys,
  5600. contentHashKey
  5601. ) {
  5602. res = res || { $stable: !hasDynamicKeys };
  5603. for (var i = 0; i < fns.length; i++) {
  5604. var slot = fns[i];
  5605. if (Array.isArray(slot)) {
  5606. resolveScopedSlots(slot, res, hasDynamicKeys);
  5607. } else if (slot) {
  5608. // marker for reverse proxying v-slot without scope on this.$slots
  5609. if (slot.proxy) {
  5610. slot.fn.proxy = true;
  5611. }
  5612. res[slot.key] = slot.fn;
  5613. }
  5614. }
  5615. if (contentHashKey) {
  5616. (res).$key = contentHashKey;
  5617. }
  5618. return res
  5619. }
  5620. /* */
  5621. function bindDynamicKeys (baseObj, values) {
  5622. for (var i = 0; i < values.length; i += 2) {
  5623. var key = values[i];
  5624. if (typeof key === 'string' && key) {
  5625. baseObj[values[i]] = values[i + 1];
  5626. } else if ( true && key !== '' && key !== null) {
  5627. // null is a special value for explicitly removing a binding
  5628. warn(
  5629. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  5630. this
  5631. );
  5632. }
  5633. }
  5634. return baseObj
  5635. }
  5636. // helper to dynamically append modifier runtime markers to event names.
  5637. // ensure only append when value is already string, otherwise it will be cast
  5638. // to string and cause the type check to miss.
  5639. function prependModifier (value, symbol) {
  5640. return typeof value === 'string' ? symbol + value : value
  5641. }
  5642. /* */
  5643. function installRenderHelpers (target) {
  5644. target._o = markOnce;
  5645. target._n = toNumber;
  5646. target._s = toString;
  5647. target._l = renderList;
  5648. target._t = renderSlot;
  5649. target._q = looseEqual;
  5650. target._i = looseIndexOf;
  5651. target._m = renderStatic;
  5652. target._f = resolveFilter;
  5653. target._k = checkKeyCodes;
  5654. target._b = bindObjectProps;
  5655. target._v = createTextVNode;
  5656. target._e = createEmptyVNode;
  5657. target._u = resolveScopedSlots;
  5658. target._g = bindObjectListeners;
  5659. target._d = bindDynamicKeys;
  5660. target._p = prependModifier;
  5661. }
  5662. /* */
  5663. function FunctionalRenderContext (
  5664. data,
  5665. props,
  5666. children,
  5667. parent,
  5668. Ctor
  5669. ) {
  5670. var this$1 = this;
  5671. var options = Ctor.options;
  5672. // ensure the createElement function in functional components
  5673. // gets a unique context - this is necessary for correct named slot check
  5674. var contextVm;
  5675. if (hasOwn(parent, '_uid')) {
  5676. contextVm = Object.create(parent);
  5677. // $flow-disable-line
  5678. contextVm._original = parent;
  5679. } else {
  5680. // the context vm passed in is a functional context as well.
  5681. // in this case we want to make sure we are able to get a hold to the
  5682. // real context instance.
  5683. contextVm = parent;
  5684. // $flow-disable-line
  5685. parent = parent._original;
  5686. }
  5687. var isCompiled = isTrue(options._compiled);
  5688. var needNormalization = !isCompiled;
  5689. this.data = data;
  5690. this.props = props;
  5691. this.children = children;
  5692. this.parent = parent;
  5693. this.listeners = data.on || emptyObject;
  5694. this.injections = resolveInject(options.inject, parent);
  5695. this.slots = function () {
  5696. if (!this$1.$slots) {
  5697. normalizeScopedSlots(
  5698. data.scopedSlots,
  5699. this$1.$slots = resolveSlots(children, parent)
  5700. );
  5701. }
  5702. return this$1.$slots
  5703. };
  5704. Object.defineProperty(this, 'scopedSlots', ({
  5705. enumerable: true,
  5706. get: function get () {
  5707. return normalizeScopedSlots(data.scopedSlots, this.slots())
  5708. }
  5709. }));
  5710. // support for compiled functional template
  5711. if (isCompiled) {
  5712. // exposing $options for renderStatic()
  5713. this.$options = options;
  5714. // pre-resolve slots for renderSlot()
  5715. this.$slots = this.slots();
  5716. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  5717. }
  5718. if (options._scopeId) {
  5719. this._c = function (a, b, c, d) {
  5720. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  5721. if (vnode && !Array.isArray(vnode)) {
  5722. vnode.fnScopeId = options._scopeId;
  5723. vnode.fnContext = parent;
  5724. }
  5725. return vnode
  5726. };
  5727. } else {
  5728. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  5729. }
  5730. }
  5731. installRenderHelpers(FunctionalRenderContext.prototype);
  5732. function createFunctionalComponent (
  5733. Ctor,
  5734. propsData,
  5735. data,
  5736. contextVm,
  5737. children
  5738. ) {
  5739. var options = Ctor.options;
  5740. var props = {};
  5741. var propOptions = options.props;
  5742. if (isDef(propOptions)) {
  5743. for (var key in propOptions) {
  5744. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  5745. }
  5746. } else {
  5747. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  5748. if (isDef(data.props)) { mergeProps(props, data.props); }
  5749. }
  5750. var renderContext = new FunctionalRenderContext(
  5751. data,
  5752. props,
  5753. children,
  5754. contextVm,
  5755. Ctor
  5756. );
  5757. var vnode = options.render.call(null, renderContext._c, renderContext);
  5758. if (vnode instanceof VNode) {
  5759. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  5760. } else if (Array.isArray(vnode)) {
  5761. var vnodes = normalizeChildren(vnode) || [];
  5762. var res = new Array(vnodes.length);
  5763. for (var i = 0; i < vnodes.length; i++) {
  5764. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  5765. }
  5766. return res
  5767. }
  5768. }
  5769. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  5770. // #7817 clone node before setting fnContext, otherwise if the node is reused
  5771. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  5772. // that should not be matched to match.
  5773. var clone = cloneVNode(vnode);
  5774. clone.fnContext = contextVm;
  5775. clone.fnOptions = options;
  5776. if (true) {
  5777. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  5778. }
  5779. if (data.slot) {
  5780. (clone.data || (clone.data = {})).slot = data.slot;
  5781. }
  5782. return clone
  5783. }
  5784. function mergeProps (to, from) {
  5785. for (var key in from) {
  5786. to[camelize(key)] = from[key];
  5787. }
  5788. }
  5789. /* */
  5790. /* */
  5791. /* */
  5792. /* */
  5793. // inline hooks to be invoked on component VNodes during patch
  5794. var componentVNodeHooks = {
  5795. init: function init (vnode, hydrating) {
  5796. if (
  5797. vnode.componentInstance &&
  5798. !vnode.componentInstance._isDestroyed &&
  5799. vnode.data.keepAlive
  5800. ) {
  5801. // kept-alive components, treat as a patch
  5802. var mountedNode = vnode; // work around flow
  5803. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  5804. } else {
  5805. var child = vnode.componentInstance = createComponentInstanceForVnode(
  5806. vnode,
  5807. activeInstance
  5808. );
  5809. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  5810. }
  5811. },
  5812. prepatch: function prepatch (oldVnode, vnode) {
  5813. var options = vnode.componentOptions;
  5814. var child = vnode.componentInstance = oldVnode.componentInstance;
  5815. updateChildComponent(
  5816. child,
  5817. options.propsData, // updated props
  5818. options.listeners, // updated listeners
  5819. vnode, // new parent vnode
  5820. options.children // new children
  5821. );
  5822. },
  5823. insert: function insert (vnode) {
  5824. var context = vnode.context;
  5825. var componentInstance = vnode.componentInstance;
  5826. if (!componentInstance._isMounted) {
  5827. callHook(componentInstance, 'onServiceCreated');
  5828. callHook(componentInstance, 'onServiceAttached');
  5829. componentInstance._isMounted = true;
  5830. callHook(componentInstance, 'mounted');
  5831. }
  5832. if (vnode.data.keepAlive) {
  5833. if (context._isMounted) {
  5834. // vue-router#1212
  5835. // During updates, a kept-alive component's child components may
  5836. // change, so directly walking the tree here may call activated hooks
  5837. // on incorrect children. Instead we push them into a queue which will
  5838. // be processed after the whole patch process ended.
  5839. queueActivatedComponent(componentInstance);
  5840. } else {
  5841. activateChildComponent(componentInstance, true /* direct */);
  5842. }
  5843. }
  5844. },
  5845. destroy: function destroy (vnode) {
  5846. var componentInstance = vnode.componentInstance;
  5847. if (!componentInstance._isDestroyed) {
  5848. if (!vnode.data.keepAlive) {
  5849. componentInstance.$destroy();
  5850. } else {
  5851. deactivateChildComponent(componentInstance, true /* direct */);
  5852. }
  5853. }
  5854. }
  5855. };
  5856. var hooksToMerge = Object.keys(componentVNodeHooks);
  5857. function createComponent (
  5858. Ctor,
  5859. data,
  5860. context,
  5861. children,
  5862. tag
  5863. ) {
  5864. if (isUndef(Ctor)) {
  5865. return
  5866. }
  5867. var baseCtor = context.$options._base;
  5868. // plain options object: turn it into a constructor
  5869. if (isObject(Ctor)) {
  5870. Ctor = baseCtor.extend(Ctor);
  5871. }
  5872. // if at this stage it's not a constructor or an async component factory,
  5873. // reject.
  5874. if (typeof Ctor !== 'function') {
  5875. if (true) {
  5876. warn(("Invalid Component definition: " + (String(Ctor))), context);
  5877. }
  5878. return
  5879. }
  5880. // async component
  5881. var asyncFactory;
  5882. if (isUndef(Ctor.cid)) {
  5883. asyncFactory = Ctor;
  5884. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  5885. if (Ctor === undefined) {
  5886. // return a placeholder node for async component, which is rendered
  5887. // as a comment node but preserves all the raw information for the node.
  5888. // the information will be used for async server-rendering and hydration.
  5889. return createAsyncPlaceholder(
  5890. asyncFactory,
  5891. data,
  5892. context,
  5893. children,
  5894. tag
  5895. )
  5896. }
  5897. }
  5898. data = data || {};
  5899. // resolve constructor options in case global mixins are applied after
  5900. // component constructor creation
  5901. resolveConstructorOptions(Ctor);
  5902. // transform component v-model data into props & events
  5903. if (isDef(data.model)) {
  5904. transformModel(Ctor.options, data);
  5905. }
  5906. // extract props
  5907. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  5908. // functional component
  5909. if (isTrue(Ctor.options.functional)) {
  5910. return createFunctionalComponent(Ctor, propsData, data, context, children)
  5911. }
  5912. // extract listeners, since these needs to be treated as
  5913. // child component listeners instead of DOM listeners
  5914. var listeners = data.on;
  5915. // replace with listeners with .native modifier
  5916. // so it gets processed during parent component patch.
  5917. data.on = data.nativeOn;
  5918. if (isTrue(Ctor.options.abstract)) {
  5919. // abstract components do not keep anything
  5920. // other than props & listeners & slot
  5921. // work around flow
  5922. var slot = data.slot;
  5923. data = {};
  5924. if (slot) {
  5925. data.slot = slot;
  5926. }
  5927. }
  5928. // install component management hooks onto the placeholder node
  5929. installComponentHooks(data);
  5930. // return a placeholder vnode
  5931. var name = Ctor.options.name || tag;
  5932. var vnode = new VNode(
  5933. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  5934. data, undefined, undefined, undefined, context,
  5935. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  5936. asyncFactory
  5937. );
  5938. return vnode
  5939. }
  5940. function createComponentInstanceForVnode (
  5941. vnode, // we know it's MountedComponentVNode but flow doesn't
  5942. parent // activeInstance in lifecycle state
  5943. ) {
  5944. var options = {
  5945. _isComponent: true,
  5946. _parentVnode: vnode,
  5947. parent: parent
  5948. };
  5949. // check inline-template render functions
  5950. var inlineTemplate = vnode.data.inlineTemplate;
  5951. if (isDef(inlineTemplate)) {
  5952. options.render = inlineTemplate.render;
  5953. options.staticRenderFns = inlineTemplate.staticRenderFns;
  5954. }
  5955. return new vnode.componentOptions.Ctor(options)
  5956. }
  5957. function installComponentHooks (data) {
  5958. var hooks = data.hook || (data.hook = {});
  5959. for (var i = 0; i < hooksToMerge.length; i++) {
  5960. var key = hooksToMerge[i];
  5961. var existing = hooks[key];
  5962. var toMerge = componentVNodeHooks[key];
  5963. if (existing !== toMerge && !(existing && existing._merged)) {
  5964. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  5965. }
  5966. }
  5967. }
  5968. function mergeHook$1 (f1, f2) {
  5969. var merged = function (a, b) {
  5970. // flow complains about extra args which is why we use any
  5971. f1(a, b);
  5972. f2(a, b);
  5973. };
  5974. merged._merged = true;
  5975. return merged
  5976. }
  5977. // transform component v-model info (value and callback) into
  5978. // prop and event handler respectively.
  5979. function transformModel (options, data) {
  5980. var prop = (options.model && options.model.prop) || 'value';
  5981. var event = (options.model && options.model.event) || 'input'
  5982. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  5983. var on = data.on || (data.on = {});
  5984. var existing = on[event];
  5985. var callback = data.model.callback;
  5986. if (isDef(existing)) {
  5987. if (
  5988. Array.isArray(existing)
  5989. ? existing.indexOf(callback) === -1
  5990. : existing !== callback
  5991. ) {
  5992. on[event] = [callback].concat(existing);
  5993. }
  5994. } else {
  5995. on[event] = callback;
  5996. }
  5997. }
  5998. /* */
  5999. var SIMPLE_NORMALIZE = 1;
  6000. var ALWAYS_NORMALIZE = 2;
  6001. // wrapper function for providing a more flexible interface
  6002. // without getting yelled at by flow
  6003. function createElement (
  6004. context,
  6005. tag,
  6006. data,
  6007. children,
  6008. normalizationType,
  6009. alwaysNormalize
  6010. ) {
  6011. if (Array.isArray(data) || isPrimitive(data)) {
  6012. normalizationType = children;
  6013. children = data;
  6014. data = undefined;
  6015. }
  6016. if (isTrue(alwaysNormalize)) {
  6017. normalizationType = ALWAYS_NORMALIZE;
  6018. }
  6019. return _createElement(context, tag, data, children, normalizationType)
  6020. }
  6021. function _createElement (
  6022. context,
  6023. tag,
  6024. data,
  6025. children,
  6026. normalizationType
  6027. ) {
  6028. if (isDef(data) && isDef((data).__ob__)) {
  6029. true && warn(
  6030. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  6031. 'Always create fresh vnode data objects in each render!',
  6032. context
  6033. );
  6034. return createEmptyVNode()
  6035. }
  6036. // object syntax in v-bind
  6037. if (isDef(data) && isDef(data.is)) {
  6038. tag = data.is;
  6039. }
  6040. if (!tag) {
  6041. // in case of component :is set to falsy value
  6042. return createEmptyVNode()
  6043. }
  6044. // warn against non-primitive key
  6045. if ( true &&
  6046. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  6047. ) {
  6048. {
  6049. warn(
  6050. 'Avoid using non-primitive value as key, ' +
  6051. 'use string/number value instead.',
  6052. context
  6053. );
  6054. }
  6055. }
  6056. // support single function children as default scoped slot
  6057. if (Array.isArray(children) &&
  6058. typeof children[0] === 'function'
  6059. ) {
  6060. data = data || {};
  6061. data.scopedSlots = { default: children[0] };
  6062. children.length = 0;
  6063. }
  6064. if (normalizationType === ALWAYS_NORMALIZE) {
  6065. children = normalizeChildren(children);
  6066. } else if (normalizationType === SIMPLE_NORMALIZE) {
  6067. children = simpleNormalizeChildren(children);
  6068. }
  6069. var vnode, ns;
  6070. if (typeof tag === 'string') {
  6071. var Ctor;
  6072. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  6073. if (config.isReservedTag(tag)) {
  6074. // platform built-in elements
  6075. if ( true && isDef(data) && isDef(data.nativeOn)) {
  6076. warn(
  6077. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  6078. context
  6079. );
  6080. }
  6081. vnode = new VNode(
  6082. config.parsePlatformTagName(tag), data, children,
  6083. undefined, undefined, context
  6084. );
  6085. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  6086. // component
  6087. vnode = createComponent(Ctor, data, context, children, tag);
  6088. } else {
  6089. // unknown or unlisted namespaced elements
  6090. // check at runtime because it may get assigned a namespace when its
  6091. // parent normalizes children
  6092. vnode = new VNode(
  6093. tag, data, children,
  6094. undefined, undefined, context
  6095. );
  6096. }
  6097. } else {
  6098. // direct component options / constructor
  6099. vnode = createComponent(tag, data, context, children);
  6100. }
  6101. if (Array.isArray(vnode)) {
  6102. return vnode
  6103. } else if (isDef(vnode)) {
  6104. if (isDef(ns)) { applyNS(vnode, ns); }
  6105. if (isDef(data)) { registerDeepBindings(data); }
  6106. return vnode
  6107. } else {
  6108. return createEmptyVNode()
  6109. }
  6110. }
  6111. function applyNS (vnode, ns, force) {
  6112. vnode.ns = ns;
  6113. if (vnode.tag === 'foreignObject') {
  6114. // use default namespace inside foreignObject
  6115. ns = undefined;
  6116. force = true;
  6117. }
  6118. if (isDef(vnode.children)) {
  6119. for (var i = 0, l = vnode.children.length; i < l; i++) {
  6120. var child = vnode.children[i];
  6121. if (isDef(child.tag) && (
  6122. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  6123. applyNS(child, ns, force);
  6124. }
  6125. }
  6126. }
  6127. }
  6128. // ref #5318
  6129. // necessary to ensure parent re-render when deep bindings like :style and
  6130. // :class are used on slot nodes
  6131. function registerDeepBindings (data) {
  6132. if (isObject(data.style)) {
  6133. traverse(data.style);
  6134. }
  6135. if (isObject(data.class)) {
  6136. traverse(data.class);
  6137. }
  6138. }
  6139. /* */
  6140. function initRender (vm) {
  6141. vm._vnode = null; // the root of the child tree
  6142. vm._staticTrees = null; // v-once cached trees
  6143. var options = vm.$options;
  6144. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  6145. var renderContext = parentVnode && parentVnode.context;
  6146. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  6147. vm.$scopedSlots = emptyObject;
  6148. // bind the createElement fn to this instance
  6149. // so that we get proper render context inside it.
  6150. // args order: tag, data, children, normalizationType, alwaysNormalize
  6151. // internal version is used by render functions compiled from templates
  6152. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  6153. // normalization is always applied for the public version, used in
  6154. // user-written render functions.
  6155. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  6156. // $attrs & $listeners are exposed for easier HOC creation.
  6157. // they need to be reactive so that HOCs using them are always updated
  6158. var parentData = parentVnode && parentVnode.data;
  6159. /* istanbul ignore else */
  6160. if (true) {
  6161. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  6162. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  6163. }, true);
  6164. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  6165. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  6166. }, true);
  6167. } else {}
  6168. }
  6169. var currentRenderingInstance = null;
  6170. function renderMixin (Vue) {
  6171. // install runtime convenience helpers
  6172. installRenderHelpers(Vue.prototype);
  6173. Vue.prototype.$nextTick = function (fn) {
  6174. return nextTick(fn, this)
  6175. };
  6176. Vue.prototype._render = function () {
  6177. var vm = this;
  6178. var ref = vm.$options;
  6179. var render = ref.render;
  6180. var _parentVnode = ref._parentVnode;
  6181. if (_parentVnode) {
  6182. vm.$scopedSlots = normalizeScopedSlots(
  6183. _parentVnode.data.scopedSlots,
  6184. vm.$slots,
  6185. vm.$scopedSlots
  6186. );
  6187. }
  6188. // set parent vnode. this allows render functions to have access
  6189. // to the data on the placeholder node.
  6190. vm.$vnode = _parentVnode;
  6191. // render self
  6192. var vnode;
  6193. try {
  6194. // There's no need to maintain a stack because all render fns are called
  6195. // separately from one another. Nested component's render fns are called
  6196. // when parent component is patched.
  6197. currentRenderingInstance = vm;
  6198. vnode = render.call(vm._renderProxy, vm.$createElement);
  6199. } catch (e) {
  6200. handleError(e, vm, "render");
  6201. // return error render result,
  6202. // or previous vnode to prevent render error causing blank component
  6203. /* istanbul ignore else */
  6204. if ( true && vm.$options.renderError) {
  6205. try {
  6206. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  6207. } catch (e) {
  6208. handleError(e, vm, "renderError");
  6209. vnode = vm._vnode;
  6210. }
  6211. } else {
  6212. vnode = vm._vnode;
  6213. }
  6214. } finally {
  6215. currentRenderingInstance = null;
  6216. }
  6217. // if the returned array contains only a single node, allow it
  6218. if (Array.isArray(vnode) && vnode.length === 1) {
  6219. vnode = vnode[0];
  6220. }
  6221. // return empty vnode in case the render function errored out
  6222. if (!(vnode instanceof VNode)) {
  6223. if ( true && Array.isArray(vnode)) {
  6224. warn(
  6225. 'Multiple root nodes returned from render function. Render function ' +
  6226. 'should return a single root node.',
  6227. vm
  6228. );
  6229. }
  6230. vnode = createEmptyVNode();
  6231. }
  6232. // set parent
  6233. vnode.parent = _parentVnode;
  6234. return vnode
  6235. };
  6236. }
  6237. /* */
  6238. function ensureCtor (comp, base) {
  6239. if (
  6240. comp.__esModule ||
  6241. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  6242. ) {
  6243. comp = comp.default;
  6244. }
  6245. return isObject(comp)
  6246. ? base.extend(comp)
  6247. : comp
  6248. }
  6249. function createAsyncPlaceholder (
  6250. factory,
  6251. data,
  6252. context,
  6253. children,
  6254. tag
  6255. ) {
  6256. var node = createEmptyVNode();
  6257. node.asyncFactory = factory;
  6258. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  6259. return node
  6260. }
  6261. function resolveAsyncComponent (
  6262. factory,
  6263. baseCtor
  6264. ) {
  6265. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  6266. return factory.errorComp
  6267. }
  6268. if (isDef(factory.resolved)) {
  6269. return factory.resolved
  6270. }
  6271. var owner = currentRenderingInstance;
  6272. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  6273. // already pending
  6274. factory.owners.push(owner);
  6275. }
  6276. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  6277. return factory.loadingComp
  6278. }
  6279. if (owner && !isDef(factory.owners)) {
  6280. var owners = factory.owners = [owner];
  6281. var sync = true;
  6282. var timerLoading = null;
  6283. var timerTimeout = null
  6284. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  6285. var forceRender = function (renderCompleted) {
  6286. for (var i = 0, l = owners.length; i < l; i++) {
  6287. (owners[i]).$forceUpdate();
  6288. }
  6289. if (renderCompleted) {
  6290. owners.length = 0;
  6291. if (timerLoading !== null) {
  6292. clearTimeout(timerLoading);
  6293. timerLoading = null;
  6294. }
  6295. if (timerTimeout !== null) {
  6296. clearTimeout(timerTimeout);
  6297. timerTimeout = null;
  6298. }
  6299. }
  6300. };
  6301. var resolve = once(function (res) {
  6302. // cache resolved
  6303. factory.resolved = ensureCtor(res, baseCtor);
  6304. // invoke callbacks only if this is not a synchronous resolve
  6305. // (async resolves are shimmed as synchronous during SSR)
  6306. if (!sync) {
  6307. forceRender(true);
  6308. } else {
  6309. owners.length = 0;
  6310. }
  6311. });
  6312. var reject = once(function (reason) {
  6313. true && warn(
  6314. "Failed to resolve async component: " + (String(factory)) +
  6315. (reason ? ("\nReason: " + reason) : '')
  6316. );
  6317. if (isDef(factory.errorComp)) {
  6318. factory.error = true;
  6319. forceRender(true);
  6320. }
  6321. });
  6322. var res = factory(resolve, reject);
  6323. if (isObject(res)) {
  6324. if (isPromise(res)) {
  6325. // () => Promise
  6326. if (isUndef(factory.resolved)) {
  6327. res.then(resolve, reject);
  6328. }
  6329. } else if (isPromise(res.component)) {
  6330. res.component.then(resolve, reject);
  6331. if (isDef(res.error)) {
  6332. factory.errorComp = ensureCtor(res.error, baseCtor);
  6333. }
  6334. if (isDef(res.loading)) {
  6335. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  6336. if (res.delay === 0) {
  6337. factory.loading = true;
  6338. } else {
  6339. timerLoading = setTimeout(function () {
  6340. timerLoading = null;
  6341. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  6342. factory.loading = true;
  6343. forceRender(false);
  6344. }
  6345. }, res.delay || 200);
  6346. }
  6347. }
  6348. if (isDef(res.timeout)) {
  6349. timerTimeout = setTimeout(function () {
  6350. timerTimeout = null;
  6351. if (isUndef(factory.resolved)) {
  6352. reject(
  6353. true
  6354. ? ("timeout (" + (res.timeout) + "ms)")
  6355. : undefined
  6356. );
  6357. }
  6358. }, res.timeout);
  6359. }
  6360. }
  6361. }
  6362. sync = false;
  6363. // return in case resolved synchronously
  6364. return factory.loading
  6365. ? factory.loadingComp
  6366. : factory.resolved
  6367. }
  6368. }
  6369. /* */
  6370. function isAsyncPlaceholder (node) {
  6371. return node.isComment && node.asyncFactory
  6372. }
  6373. /* */
  6374. function getFirstComponentChild (children) {
  6375. if (Array.isArray(children)) {
  6376. for (var i = 0; i < children.length; i++) {
  6377. var c = children[i];
  6378. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  6379. return c
  6380. }
  6381. }
  6382. }
  6383. }
  6384. /* */
  6385. /* */
  6386. function initEvents (vm) {
  6387. vm._events = Object.create(null);
  6388. vm._hasHookEvent = false;
  6389. // init parent attached events
  6390. var listeners = vm.$options._parentListeners;
  6391. if (listeners) {
  6392. updateComponentListeners(vm, listeners);
  6393. }
  6394. }
  6395. var target;
  6396. function add (event, fn) {
  6397. target.$on(event, fn);
  6398. }
  6399. function remove$1 (event, fn) {
  6400. target.$off(event, fn);
  6401. }
  6402. function createOnceHandler (event, fn) {
  6403. var _target = target;
  6404. return function onceHandler () {
  6405. var res = fn.apply(null, arguments);
  6406. if (res !== null) {
  6407. _target.$off(event, onceHandler);
  6408. }
  6409. }
  6410. }
  6411. function updateComponentListeners (
  6412. vm,
  6413. listeners,
  6414. oldListeners
  6415. ) {
  6416. target = vm;
  6417. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  6418. target = undefined;
  6419. }
  6420. function eventsMixin (Vue) {
  6421. var hookRE = /^hook:/;
  6422. Vue.prototype.$on = function (event, fn) {
  6423. var vm = this;
  6424. if (Array.isArray(event)) {
  6425. for (var i = 0, l = event.length; i < l; i++) {
  6426. vm.$on(event[i], fn);
  6427. }
  6428. } else {
  6429. (vm._events[event] || (vm._events[event] = [])).push(fn);
  6430. // optimize hook:event cost by using a boolean flag marked at registration
  6431. // instead of a hash lookup
  6432. if (hookRE.test(event)) {
  6433. vm._hasHookEvent = true;
  6434. }
  6435. }
  6436. return vm
  6437. };
  6438. Vue.prototype.$once = function (event, fn) {
  6439. var vm = this;
  6440. function on () {
  6441. vm.$off(event, on);
  6442. fn.apply(vm, arguments);
  6443. }
  6444. on.fn = fn;
  6445. vm.$on(event, on);
  6446. return vm
  6447. };
  6448. Vue.prototype.$off = function (event, fn) {
  6449. var vm = this;
  6450. // all
  6451. if (!arguments.length) {
  6452. vm._events = Object.create(null);
  6453. return vm
  6454. }
  6455. // array of events
  6456. if (Array.isArray(event)) {
  6457. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  6458. vm.$off(event[i$1], fn);
  6459. }
  6460. return vm
  6461. }
  6462. // specific event
  6463. var cbs = vm._events[event];
  6464. if (!cbs) {
  6465. return vm
  6466. }
  6467. if (!fn) {
  6468. vm._events[event] = null;
  6469. return vm
  6470. }
  6471. // specific handler
  6472. var cb;
  6473. var i = cbs.length;
  6474. while (i--) {
  6475. cb = cbs[i];
  6476. if (cb === fn || cb.fn === fn) {
  6477. cbs.splice(i, 1);
  6478. break
  6479. }
  6480. }
  6481. return vm
  6482. };
  6483. Vue.prototype.$emit = function (event) {
  6484. var vm = this;
  6485. if (true) {
  6486. var lowerCaseEvent = event.toLowerCase();
  6487. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  6488. tip(
  6489. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  6490. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  6491. "Note that HTML attributes are case-insensitive and you cannot use " +
  6492. "v-on to listen to camelCase events when using in-DOM templates. " +
  6493. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  6494. );
  6495. }
  6496. }
  6497. var cbs = vm._events[event];
  6498. if (cbs) {
  6499. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  6500. var args = toArray(arguments, 1);
  6501. var info = "event handler for \"" + event + "\"";
  6502. for (var i = 0, l = cbs.length; i < l; i++) {
  6503. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  6504. }
  6505. }
  6506. return vm
  6507. };
  6508. }
  6509. /* */
  6510. var activeInstance = null;
  6511. var isUpdatingChildComponent = false;
  6512. function setActiveInstance(vm) {
  6513. var prevActiveInstance = activeInstance;
  6514. activeInstance = vm;
  6515. return function () {
  6516. activeInstance = prevActiveInstance;
  6517. }
  6518. }
  6519. function initLifecycle (vm) {
  6520. var options = vm.$options;
  6521. // locate first non-abstract parent
  6522. var parent = options.parent;
  6523. if (parent && !options.abstract) {
  6524. while (parent.$options.abstract && parent.$parent) {
  6525. parent = parent.$parent;
  6526. }
  6527. parent.$children.push(vm);
  6528. }
  6529. vm.$parent = parent;
  6530. vm.$root = parent ? parent.$root : vm;
  6531. vm.$children = [];
  6532. vm.$refs = {};
  6533. vm._watcher = null;
  6534. vm._inactive = null;
  6535. vm._directInactive = false;
  6536. vm._isMounted = false;
  6537. vm._isDestroyed = false;
  6538. vm._isBeingDestroyed = false;
  6539. }
  6540. function lifecycleMixin (Vue) {
  6541. Vue.prototype._update = function (vnode, hydrating) {
  6542. var vm = this;
  6543. var prevEl = vm.$el;
  6544. var prevVnode = vm._vnode;
  6545. var restoreActiveInstance = setActiveInstance(vm);
  6546. vm._vnode = vnode;
  6547. // Vue.prototype.__patch__ is injected in entry points
  6548. // based on the rendering backend used.
  6549. if (!prevVnode) {
  6550. // initial render
  6551. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  6552. } else {
  6553. // updates
  6554. vm.$el = vm.__patch__(prevVnode, vnode);
  6555. }
  6556. restoreActiveInstance();
  6557. // update __vue__ reference
  6558. if (prevEl) {
  6559. prevEl.__vue__ = null;
  6560. }
  6561. if (vm.$el) {
  6562. vm.$el.__vue__ = vm;
  6563. }
  6564. // if parent is an HOC, update its $el as well
  6565. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  6566. vm.$parent.$el = vm.$el;
  6567. }
  6568. // updated hook is called by the scheduler to ensure that children are
  6569. // updated in a parent's updated hook.
  6570. };
  6571. Vue.prototype.$forceUpdate = function () {
  6572. var vm = this;
  6573. if (vm._watcher) {
  6574. vm._watcher.update();
  6575. }
  6576. };
  6577. Vue.prototype.$destroy = function () {
  6578. var vm = this;
  6579. if (vm._isBeingDestroyed) {
  6580. return
  6581. }
  6582. callHook(vm, 'beforeDestroy');
  6583. vm._isBeingDestroyed = true;
  6584. // remove self from parent
  6585. var parent = vm.$parent;
  6586. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  6587. remove(parent.$children, vm);
  6588. }
  6589. // teardown watchers
  6590. if (vm._watcher) {
  6591. vm._watcher.teardown();
  6592. }
  6593. var i = vm._watchers.length;
  6594. while (i--) {
  6595. vm._watchers[i].teardown();
  6596. }
  6597. // remove reference from data ob
  6598. // frozen object may not have observer.
  6599. if (vm._data.__ob__) {
  6600. vm._data.__ob__.vmCount--;
  6601. }
  6602. // call the last hook...
  6603. vm._isDestroyed = true;
  6604. // invoke destroy hooks on current rendered tree
  6605. vm.__patch__(vm._vnode, null);
  6606. // fire destroyed hook
  6607. callHook(vm, 'destroyed');
  6608. // turn off all instance listeners.
  6609. vm.$off();
  6610. // remove __vue__ reference
  6611. if (vm.$el) {
  6612. vm.$el.__vue__ = null;
  6613. }
  6614. // release circular reference (#6759)
  6615. if (vm.$vnode) {
  6616. vm.$vnode.parent = null;
  6617. }
  6618. };
  6619. }
  6620. function updateChildComponent (
  6621. vm,
  6622. propsData,
  6623. listeners,
  6624. parentVnode,
  6625. renderChildren
  6626. ) {
  6627. if (true) {
  6628. isUpdatingChildComponent = true;
  6629. }
  6630. // determine whether component has slot children
  6631. // we need to do this before overwriting $options._renderChildren.
  6632. // check if there are dynamic scopedSlots (hand-written or compiled but with
  6633. // dynamic slot names). Static scoped slots compiled from template has the
  6634. // "$stable" marker.
  6635. var newScopedSlots = parentVnode.data.scopedSlots;
  6636. var oldScopedSlots = vm.$scopedSlots;
  6637. var hasDynamicScopedSlot = !!(
  6638. (newScopedSlots && !newScopedSlots.$stable) ||
  6639. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  6640. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  6641. );
  6642. // Any static slot children from the parent may have changed during parent's
  6643. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  6644. // update is necessary to ensure correctness.
  6645. var needsForceUpdate = !!(
  6646. renderChildren || // has new static slots
  6647. vm.$options._renderChildren || // has old static slots
  6648. hasDynamicScopedSlot
  6649. );
  6650. vm.$options._parentVnode = parentVnode;
  6651. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  6652. if (vm._vnode) { // update child tree's parent
  6653. vm._vnode.parent = parentVnode;
  6654. }
  6655. vm.$options._renderChildren = renderChildren;
  6656. // update $attrs and $listeners hash
  6657. // these are also reactive so they may trigger child update if the child
  6658. // used them during render
  6659. vm.$attrs = parentVnode.data.attrs || emptyObject;
  6660. vm.$listeners = listeners || emptyObject;
  6661. // update props
  6662. if (propsData && vm.$options.props) {
  6663. toggleObserving(false);
  6664. var props = vm._props;
  6665. var propKeys = vm.$options._propKeys || [];
  6666. for (var i = 0; i < propKeys.length; i++) {
  6667. var key = propKeys[i];
  6668. var propOptions = vm.$options.props; // wtf flow?
  6669. props[key] = validateProp(key, propOptions, propsData, vm);
  6670. }
  6671. toggleObserving(true);
  6672. // keep a copy of raw propsData
  6673. vm.$options.propsData = propsData;
  6674. }
  6675. // fixed by xxxxxx update properties(mp runtime)
  6676. vm._$updateProperties && vm._$updateProperties(vm);
  6677. // update listeners
  6678. listeners = listeners || emptyObject;
  6679. var oldListeners = vm.$options._parentListeners;
  6680. vm.$options._parentListeners = listeners;
  6681. updateComponentListeners(vm, listeners, oldListeners);
  6682. // resolve slots + force update if has children
  6683. if (needsForceUpdate) {
  6684. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  6685. vm.$forceUpdate();
  6686. }
  6687. if (true) {
  6688. isUpdatingChildComponent = false;
  6689. }
  6690. }
  6691. function isInInactiveTree (vm) {
  6692. while (vm && (vm = vm.$parent)) {
  6693. if (vm._inactive) { return true }
  6694. }
  6695. return false
  6696. }
  6697. function activateChildComponent (vm, direct) {
  6698. if (direct) {
  6699. vm._directInactive = false;
  6700. if (isInInactiveTree(vm)) {
  6701. return
  6702. }
  6703. } else if (vm._directInactive) {
  6704. return
  6705. }
  6706. if (vm._inactive || vm._inactive === null) {
  6707. vm._inactive = false;
  6708. for (var i = 0; i < vm.$children.length; i++) {
  6709. activateChildComponent(vm.$children[i]);
  6710. }
  6711. callHook(vm, 'activated');
  6712. }
  6713. }
  6714. function deactivateChildComponent (vm, direct) {
  6715. if (direct) {
  6716. vm._directInactive = true;
  6717. if (isInInactiveTree(vm)) {
  6718. return
  6719. }
  6720. }
  6721. if (!vm._inactive) {
  6722. vm._inactive = true;
  6723. for (var i = 0; i < vm.$children.length; i++) {
  6724. deactivateChildComponent(vm.$children[i]);
  6725. }
  6726. callHook(vm, 'deactivated');
  6727. }
  6728. }
  6729. function callHook (vm, hook) {
  6730. // #7573 disable dep collection when invoking lifecycle hooks
  6731. pushTarget();
  6732. var handlers = vm.$options[hook];
  6733. var info = hook + " hook";
  6734. if (handlers) {
  6735. for (var i = 0, j = handlers.length; i < j; i++) {
  6736. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  6737. }
  6738. }
  6739. if (vm._hasHookEvent) {
  6740. vm.$emit('hook:' + hook);
  6741. }
  6742. popTarget();
  6743. }
  6744. /* */
  6745. var MAX_UPDATE_COUNT = 100;
  6746. var queue = [];
  6747. var activatedChildren = [];
  6748. var has = {};
  6749. var circular = {};
  6750. var waiting = false;
  6751. var flushing = false;
  6752. var index = 0;
  6753. /**
  6754. * Reset the scheduler's state.
  6755. */
  6756. function resetSchedulerState () {
  6757. index = queue.length = activatedChildren.length = 0;
  6758. has = {};
  6759. if (true) {
  6760. circular = {};
  6761. }
  6762. waiting = flushing = false;
  6763. }
  6764. // Async edge case #6566 requires saving the timestamp when event listeners are
  6765. // attached. However, calling performance.now() has a perf overhead especially
  6766. // if the page has thousands of event listeners. Instead, we take a timestamp
  6767. // every time the scheduler flushes and use that for all event listeners
  6768. // attached during that flush.
  6769. var currentFlushTimestamp = 0;
  6770. // Async edge case fix requires storing an event listener's attach timestamp.
  6771. var getNow = Date.now;
  6772. // Determine what event timestamp the browser is using. Annoyingly, the
  6773. // timestamp can either be hi-res (relative to page load) or low-res
  6774. // (relative to UNIX epoch), so in order to compare time we have to use the
  6775. // same timestamp type when saving the flush timestamp.
  6776. // All IE versions use low-res event timestamps, and have problematic clock
  6777. // implementations (#9632)
  6778. if (inBrowser && !isIE) {
  6779. var performance = window.performance;
  6780. if (
  6781. performance &&
  6782. typeof performance.now === 'function' &&
  6783. getNow() > document.createEvent('Event').timeStamp
  6784. ) {
  6785. // if the event timestamp, although evaluated AFTER the Date.now(), is
  6786. // smaller than it, it means the event is using a hi-res timestamp,
  6787. // and we need to use the hi-res version for event listener timestamps as
  6788. // well.
  6789. getNow = function () { return performance.now(); };
  6790. }
  6791. }
  6792. /**
  6793. * Flush both queues and run the watchers.
  6794. */
  6795. function flushSchedulerQueue () {
  6796. currentFlushTimestamp = getNow();
  6797. flushing = true;
  6798. var watcher, id;
  6799. // Sort queue before flush.
  6800. // This ensures that:
  6801. // 1. Components are updated from parent to child. (because parent is always
  6802. // created before the child)
  6803. // 2. A component's user watchers are run before its render watcher (because
  6804. // user watchers are created before the render watcher)
  6805. // 3. If a component is destroyed during a parent component's watcher run,
  6806. // its watchers can be skipped.
  6807. queue.sort(function (a, b) { return a.id - b.id; });
  6808. // do not cache length because more watchers might be pushed
  6809. // as we run existing watchers
  6810. for (index = 0; index < queue.length; index++) {
  6811. watcher = queue[index];
  6812. if (watcher.before) {
  6813. watcher.before();
  6814. }
  6815. id = watcher.id;
  6816. has[id] = null;
  6817. watcher.run();
  6818. // in dev build, check and stop circular updates.
  6819. if ( true && has[id] != null) {
  6820. circular[id] = (circular[id] || 0) + 1;
  6821. if (circular[id] > MAX_UPDATE_COUNT) {
  6822. warn(
  6823. 'You may have an infinite update loop ' + (
  6824. watcher.user
  6825. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  6826. : "in a component render function."
  6827. ),
  6828. watcher.vm
  6829. );
  6830. break
  6831. }
  6832. }
  6833. }
  6834. // keep copies of post queues before resetting state
  6835. var activatedQueue = activatedChildren.slice();
  6836. var updatedQueue = queue.slice();
  6837. resetSchedulerState();
  6838. // call component updated and activated hooks
  6839. callActivatedHooks(activatedQueue);
  6840. callUpdatedHooks(updatedQueue);
  6841. // devtool hook
  6842. /* istanbul ignore if */
  6843. if (devtools && config.devtools) {
  6844. devtools.emit('flush');
  6845. }
  6846. }
  6847. function callUpdatedHooks (queue) {
  6848. var i = queue.length;
  6849. while (i--) {
  6850. var watcher = queue[i];
  6851. var vm = watcher.vm;
  6852. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  6853. callHook(vm, 'updated');
  6854. }
  6855. }
  6856. }
  6857. /**
  6858. * Queue a kept-alive component that was activated during patch.
  6859. * The queue will be processed after the entire tree has been patched.
  6860. */
  6861. function queueActivatedComponent (vm) {
  6862. // setting _inactive to false here so that a render function can
  6863. // rely on checking whether it's in an inactive tree (e.g. router-view)
  6864. vm._inactive = false;
  6865. activatedChildren.push(vm);
  6866. }
  6867. function callActivatedHooks (queue) {
  6868. for (var i = 0; i < queue.length; i++) {
  6869. queue[i]._inactive = true;
  6870. activateChildComponent(queue[i], true /* true */);
  6871. }
  6872. }
  6873. /**
  6874. * Push a watcher into the watcher queue.
  6875. * Jobs with duplicate IDs will be skipped unless it's
  6876. * pushed when the queue is being flushed.
  6877. */
  6878. function queueWatcher (watcher) {
  6879. var id = watcher.id;
  6880. if (has[id] == null) {
  6881. has[id] = true;
  6882. if (!flushing) {
  6883. queue.push(watcher);
  6884. } else {
  6885. // if already flushing, splice the watcher based on its id
  6886. // if already past its id, it will be run next immediately.
  6887. var i = queue.length - 1;
  6888. while (i > index && queue[i].id > watcher.id) {
  6889. i--;
  6890. }
  6891. queue.splice(i + 1, 0, watcher);
  6892. }
  6893. // queue the flush
  6894. if (!waiting) {
  6895. waiting = true;
  6896. if ( true && !config.async) {
  6897. flushSchedulerQueue();
  6898. return
  6899. }
  6900. nextTick(flushSchedulerQueue);
  6901. }
  6902. }
  6903. }
  6904. /* */
  6905. var uid$2 = 0;
  6906. /**
  6907. * A watcher parses an expression, collects dependencies,
  6908. * and fires callback when the expression value changes.
  6909. * This is used for both the $watch() api and directives.
  6910. */
  6911. var Watcher = function Watcher (
  6912. vm,
  6913. expOrFn,
  6914. cb,
  6915. options,
  6916. isRenderWatcher
  6917. ) {
  6918. this.vm = vm;
  6919. if (isRenderWatcher) {
  6920. vm._watcher = this;
  6921. }
  6922. vm._watchers.push(this);
  6923. // options
  6924. if (options) {
  6925. this.deep = !!options.deep;
  6926. this.user = !!options.user;
  6927. this.lazy = !!options.lazy;
  6928. this.sync = !!options.sync;
  6929. this.before = options.before;
  6930. } else {
  6931. this.deep = this.user = this.lazy = this.sync = false;
  6932. }
  6933. this.cb = cb;
  6934. this.id = ++uid$2; // uid for batching
  6935. this.active = true;
  6936. this.dirty = this.lazy; // for lazy watchers
  6937. this.deps = [];
  6938. this.newDeps = [];
  6939. this.depIds = new _Set();
  6940. this.newDepIds = new _Set();
  6941. this.expression = true
  6942. ? expOrFn.toString()
  6943. : undefined;
  6944. // parse expression for getter
  6945. if (typeof expOrFn === 'function') {
  6946. this.getter = expOrFn;
  6947. } else {
  6948. this.getter = parsePath(expOrFn);
  6949. if (!this.getter) {
  6950. this.getter = noop;
  6951. true && warn(
  6952. "Failed watching path: \"" + expOrFn + "\" " +
  6953. 'Watcher only accepts simple dot-delimited paths. ' +
  6954. 'For full control, use a function instead.',
  6955. vm
  6956. );
  6957. }
  6958. }
  6959. this.value = this.lazy
  6960. ? undefined
  6961. : this.get();
  6962. };
  6963. /**
  6964. * Evaluate the getter, and re-collect dependencies.
  6965. */
  6966. Watcher.prototype.get = function get () {
  6967. pushTarget(this);
  6968. var value;
  6969. var vm = this.vm;
  6970. try {
  6971. value = this.getter.call(vm, vm);
  6972. } catch (e) {
  6973. if (this.user) {
  6974. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  6975. } else {
  6976. throw e
  6977. }
  6978. } finally {
  6979. // "touch" every property so they are all tracked as
  6980. // dependencies for deep watching
  6981. if (this.deep) {
  6982. traverse(value);
  6983. }
  6984. popTarget();
  6985. this.cleanupDeps();
  6986. }
  6987. return value
  6988. };
  6989. /**
  6990. * Add a dependency to this directive.
  6991. */
  6992. Watcher.prototype.addDep = function addDep (dep) {
  6993. var id = dep.id;
  6994. if (!this.newDepIds.has(id)) {
  6995. this.newDepIds.add(id);
  6996. this.newDeps.push(dep);
  6997. if (!this.depIds.has(id)) {
  6998. dep.addSub(this);
  6999. }
  7000. }
  7001. };
  7002. /**
  7003. * Clean up for dependency collection.
  7004. */
  7005. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  7006. var i = this.deps.length;
  7007. while (i--) {
  7008. var dep = this.deps[i];
  7009. if (!this.newDepIds.has(dep.id)) {
  7010. dep.removeSub(this);
  7011. }
  7012. }
  7013. var tmp = this.depIds;
  7014. this.depIds = this.newDepIds;
  7015. this.newDepIds = tmp;
  7016. this.newDepIds.clear();
  7017. tmp = this.deps;
  7018. this.deps = this.newDeps;
  7019. this.newDeps = tmp;
  7020. this.newDeps.length = 0;
  7021. };
  7022. /**
  7023. * Subscriber interface.
  7024. * Will be called when a dependency changes.
  7025. */
  7026. Watcher.prototype.update = function update () {
  7027. /* istanbul ignore else */
  7028. if (this.lazy) {
  7029. this.dirty = true;
  7030. } else if (this.sync) {
  7031. this.run();
  7032. } else {
  7033. queueWatcher(this);
  7034. }
  7035. };
  7036. /**
  7037. * Scheduler job interface.
  7038. * Will be called by the scheduler.
  7039. */
  7040. Watcher.prototype.run = function run () {
  7041. if (this.active) {
  7042. var value = this.get();
  7043. if (
  7044. value !== this.value ||
  7045. // Deep watchers and watchers on Object/Arrays should fire even
  7046. // when the value is the same, because the value may
  7047. // have mutated.
  7048. isObject(value) ||
  7049. this.deep
  7050. ) {
  7051. // set new value
  7052. var oldValue = this.value;
  7053. this.value = value;
  7054. if (this.user) {
  7055. try {
  7056. this.cb.call(this.vm, value, oldValue);
  7057. } catch (e) {
  7058. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  7059. }
  7060. } else {
  7061. this.cb.call(this.vm, value, oldValue);
  7062. }
  7063. }
  7064. }
  7065. };
  7066. /**
  7067. * Evaluate the value of the watcher.
  7068. * This only gets called for lazy watchers.
  7069. */
  7070. Watcher.prototype.evaluate = function evaluate () {
  7071. this.value = this.get();
  7072. this.dirty = false;
  7073. };
  7074. /**
  7075. * Depend on all deps collected by this watcher.
  7076. */
  7077. Watcher.prototype.depend = function depend () {
  7078. var i = this.deps.length;
  7079. while (i--) {
  7080. this.deps[i].depend();
  7081. }
  7082. };
  7083. /**
  7084. * Remove self from all dependencies' subscriber list.
  7085. */
  7086. Watcher.prototype.teardown = function teardown () {
  7087. if (this.active) {
  7088. // remove self from vm's watcher list
  7089. // this is a somewhat expensive operation so we skip it
  7090. // if the vm is being destroyed.
  7091. if (!this.vm._isBeingDestroyed) {
  7092. remove(this.vm._watchers, this);
  7093. }
  7094. var i = this.deps.length;
  7095. while (i--) {
  7096. this.deps[i].removeSub(this);
  7097. }
  7098. this.active = false;
  7099. }
  7100. };
  7101. /* */
  7102. var sharedPropertyDefinition = {
  7103. enumerable: true,
  7104. configurable: true,
  7105. get: noop,
  7106. set: noop
  7107. };
  7108. function proxy (target, sourceKey, key) {
  7109. sharedPropertyDefinition.get = function proxyGetter () {
  7110. return this[sourceKey][key]
  7111. };
  7112. sharedPropertyDefinition.set = function proxySetter (val) {
  7113. this[sourceKey][key] = val;
  7114. };
  7115. Object.defineProperty(target, key, sharedPropertyDefinition);
  7116. }
  7117. function initState (vm) {
  7118. vm._watchers = [];
  7119. var opts = vm.$options;
  7120. if (opts.props) { initProps(vm, opts.props); }
  7121. if (opts.methods) { initMethods(vm, opts.methods); }
  7122. if (opts.data) {
  7123. initData(vm);
  7124. } else {
  7125. observe(vm._data = {}, true /* asRootData */);
  7126. }
  7127. if (opts.computed) { initComputed(vm, opts.computed); }
  7128. if (opts.watch && opts.watch !== nativeWatch) {
  7129. initWatch(vm, opts.watch);
  7130. }
  7131. }
  7132. function initProps (vm, propsOptions) {
  7133. var propsData = vm.$options.propsData || {};
  7134. var props = vm._props = {};
  7135. // cache prop keys so that future props updates can iterate using Array
  7136. // instead of dynamic object key enumeration.
  7137. var keys = vm.$options._propKeys = [];
  7138. var isRoot = !vm.$parent;
  7139. // root instance props should be converted
  7140. if (!isRoot) {
  7141. toggleObserving(false);
  7142. }
  7143. var loop = function ( key ) {
  7144. keys.push(key);
  7145. var value = validateProp(key, propsOptions, propsData, vm);
  7146. /* istanbul ignore else */
  7147. if (true) {
  7148. var hyphenatedKey = hyphenate(key);
  7149. if (isReservedAttribute(hyphenatedKey) ||
  7150. config.isReservedAttr(hyphenatedKey)) {
  7151. warn(
  7152. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  7153. vm
  7154. );
  7155. }
  7156. defineReactive$$1(props, key, value, function () {
  7157. if (!isRoot && !isUpdatingChildComponent) {
  7158. {
  7159. if(vm.mpHost === 'mp-baidu'){//百度 observer 在 setData callback 之后触发,直接忽略该 warn
  7160. return
  7161. }
  7162. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  7163. if(
  7164. key === 'value' &&
  7165. Array.isArray(vm.$options.behaviors) &&
  7166. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  7167. ){
  7168. return
  7169. }
  7170. if(vm._getFormData){
  7171. return
  7172. }
  7173. var $parent = vm.$parent;
  7174. while($parent){
  7175. if($parent.__next_tick_pending){
  7176. return
  7177. }
  7178. $parent = $parent.$parent;
  7179. }
  7180. }
  7181. warn(
  7182. "Avoid mutating a prop directly since the value will be " +
  7183. "overwritten whenever the parent component re-renders. " +
  7184. "Instead, use a data or computed property based on the prop's " +
  7185. "value. Prop being mutated: \"" + key + "\"",
  7186. vm
  7187. );
  7188. }
  7189. });
  7190. } else {}
  7191. // static props are already proxied on the component's prototype
  7192. // during Vue.extend(). We only need to proxy props defined at
  7193. // instantiation here.
  7194. if (!(key in vm)) {
  7195. proxy(vm, "_props", key);
  7196. }
  7197. };
  7198. for (var key in propsOptions) loop( key );
  7199. toggleObserving(true);
  7200. }
  7201. function initData (vm) {
  7202. var data = vm.$options.data;
  7203. data = vm._data = typeof data === 'function'
  7204. ? getData(data, vm)
  7205. : data || {};
  7206. if (!isPlainObject(data)) {
  7207. data = {};
  7208. true && warn(
  7209. 'data functions should return an object:\n' +
  7210. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  7211. vm
  7212. );
  7213. }
  7214. // proxy data on instance
  7215. var keys = Object.keys(data);
  7216. var props = vm.$options.props;
  7217. var methods = vm.$options.methods;
  7218. var i = keys.length;
  7219. while (i--) {
  7220. var key = keys[i];
  7221. if (true) {
  7222. if (methods && hasOwn(methods, key)) {
  7223. warn(
  7224. ("Method \"" + key + "\" has already been defined as a data property."),
  7225. vm
  7226. );
  7227. }
  7228. }
  7229. if (props && hasOwn(props, key)) {
  7230. true && warn(
  7231. "The data property \"" + key + "\" is already declared as a prop. " +
  7232. "Use prop default value instead.",
  7233. vm
  7234. );
  7235. } else if (!isReserved(key)) {
  7236. proxy(vm, "_data", key);
  7237. }
  7238. }
  7239. // observe data
  7240. observe(data, true /* asRootData */);
  7241. }
  7242. function getData (data, vm) {
  7243. // #7573 disable dep collection when invoking data getters
  7244. pushTarget();
  7245. try {
  7246. return data.call(vm, vm)
  7247. } catch (e) {
  7248. handleError(e, vm, "data()");
  7249. return {}
  7250. } finally {
  7251. popTarget();
  7252. }
  7253. }
  7254. var computedWatcherOptions = { lazy: true };
  7255. function initComputed (vm, computed) {
  7256. // $flow-disable-line
  7257. var watchers = vm._computedWatchers = Object.create(null);
  7258. // computed properties are just getters during SSR
  7259. var isSSR = isServerRendering();
  7260. for (var key in computed) {
  7261. var userDef = computed[key];
  7262. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  7263. if ( true && getter == null) {
  7264. warn(
  7265. ("Getter is missing for computed property \"" + key + "\"."),
  7266. vm
  7267. );
  7268. }
  7269. if (!isSSR) {
  7270. // create internal watcher for the computed property.
  7271. watchers[key] = new Watcher(
  7272. vm,
  7273. getter || noop,
  7274. noop,
  7275. computedWatcherOptions
  7276. );
  7277. }
  7278. // component-defined computed properties are already defined on the
  7279. // component prototype. We only need to define computed properties defined
  7280. // at instantiation here.
  7281. if (!(key in vm)) {
  7282. defineComputed(vm, key, userDef);
  7283. } else if (true) {
  7284. if (key in vm.$data) {
  7285. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  7286. } else if (vm.$options.props && key in vm.$options.props) {
  7287. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  7288. }
  7289. }
  7290. }
  7291. }
  7292. function defineComputed (
  7293. target,
  7294. key,
  7295. userDef
  7296. ) {
  7297. var shouldCache = !isServerRendering();
  7298. if (typeof userDef === 'function') {
  7299. sharedPropertyDefinition.get = shouldCache
  7300. ? createComputedGetter(key)
  7301. : createGetterInvoker(userDef);
  7302. sharedPropertyDefinition.set = noop;
  7303. } else {
  7304. sharedPropertyDefinition.get = userDef.get
  7305. ? shouldCache && userDef.cache !== false
  7306. ? createComputedGetter(key)
  7307. : createGetterInvoker(userDef.get)
  7308. : noop;
  7309. sharedPropertyDefinition.set = userDef.set || noop;
  7310. }
  7311. if ( true &&
  7312. sharedPropertyDefinition.set === noop) {
  7313. sharedPropertyDefinition.set = function () {
  7314. warn(
  7315. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  7316. this
  7317. );
  7318. };
  7319. }
  7320. Object.defineProperty(target, key, sharedPropertyDefinition);
  7321. }
  7322. function createComputedGetter (key) {
  7323. return function computedGetter () {
  7324. var watcher = this._computedWatchers && this._computedWatchers[key];
  7325. if (watcher) {
  7326. if (watcher.dirty) {
  7327. watcher.evaluate();
  7328. }
  7329. if (Dep.SharedObject.target) {// fixed by xxxxxx
  7330. watcher.depend();
  7331. }
  7332. return watcher.value
  7333. }
  7334. }
  7335. }
  7336. function createGetterInvoker(fn) {
  7337. return function computedGetter () {
  7338. return fn.call(this, this)
  7339. }
  7340. }
  7341. function initMethods (vm, methods) {
  7342. var props = vm.$options.props;
  7343. for (var key in methods) {
  7344. if (true) {
  7345. if (typeof methods[key] !== 'function') {
  7346. warn(
  7347. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  7348. "Did you reference the function correctly?",
  7349. vm
  7350. );
  7351. }
  7352. if (props && hasOwn(props, key)) {
  7353. warn(
  7354. ("Method \"" + key + "\" has already been defined as a prop."),
  7355. vm
  7356. );
  7357. }
  7358. if ((key in vm) && isReserved(key)) {
  7359. warn(
  7360. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  7361. "Avoid defining component methods that start with _ or $."
  7362. );
  7363. }
  7364. }
  7365. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  7366. }
  7367. }
  7368. function initWatch (vm, watch) {
  7369. for (var key in watch) {
  7370. var handler = watch[key];
  7371. if (Array.isArray(handler)) {
  7372. for (var i = 0; i < handler.length; i++) {
  7373. createWatcher(vm, key, handler[i]);
  7374. }
  7375. } else {
  7376. createWatcher(vm, key, handler);
  7377. }
  7378. }
  7379. }
  7380. function createWatcher (
  7381. vm,
  7382. expOrFn,
  7383. handler,
  7384. options
  7385. ) {
  7386. if (isPlainObject(handler)) {
  7387. options = handler;
  7388. handler = handler.handler;
  7389. }
  7390. if (typeof handler === 'string') {
  7391. handler = vm[handler];
  7392. }
  7393. return vm.$watch(expOrFn, handler, options)
  7394. }
  7395. function stateMixin (Vue) {
  7396. // flow somehow has problems with directly declared definition object
  7397. // when using Object.defineProperty, so we have to procedurally build up
  7398. // the object here.
  7399. var dataDef = {};
  7400. dataDef.get = function () { return this._data };
  7401. var propsDef = {};
  7402. propsDef.get = function () { return this._props };
  7403. if (true) {
  7404. dataDef.set = function () {
  7405. warn(
  7406. 'Avoid replacing instance root $data. ' +
  7407. 'Use nested data properties instead.',
  7408. this
  7409. );
  7410. };
  7411. propsDef.set = function () {
  7412. warn("$props is readonly.", this);
  7413. };
  7414. }
  7415. Object.defineProperty(Vue.prototype, '$data', dataDef);
  7416. Object.defineProperty(Vue.prototype, '$props', propsDef);
  7417. Vue.prototype.$set = set;
  7418. Vue.prototype.$delete = del;
  7419. Vue.prototype.$watch = function (
  7420. expOrFn,
  7421. cb,
  7422. options
  7423. ) {
  7424. var vm = this;
  7425. if (isPlainObject(cb)) {
  7426. return createWatcher(vm, expOrFn, cb, options)
  7427. }
  7428. options = options || {};
  7429. options.user = true;
  7430. var watcher = new Watcher(vm, expOrFn, cb, options);
  7431. if (options.immediate) {
  7432. try {
  7433. cb.call(vm, watcher.value);
  7434. } catch (error) {
  7435. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  7436. }
  7437. }
  7438. return function unwatchFn () {
  7439. watcher.teardown();
  7440. }
  7441. };
  7442. }
  7443. /* */
  7444. var uid$3 = 0;
  7445. function initMixin (Vue) {
  7446. Vue.prototype._init = function (options) {
  7447. var vm = this;
  7448. // a uid
  7449. vm._uid = uid$3++;
  7450. var startTag, endTag;
  7451. /* istanbul ignore if */
  7452. if ( true && config.performance && mark) {
  7453. startTag = "vue-perf-start:" + (vm._uid);
  7454. endTag = "vue-perf-end:" + (vm._uid);
  7455. mark(startTag);
  7456. }
  7457. // a flag to avoid this being observed
  7458. vm._isVue = true;
  7459. // merge options
  7460. if (options && options._isComponent) {
  7461. // optimize internal component instantiation
  7462. // since dynamic options merging is pretty slow, and none of the
  7463. // internal component options needs special treatment.
  7464. initInternalComponent(vm, options);
  7465. } else {
  7466. vm.$options = mergeOptions(
  7467. resolveConstructorOptions(vm.constructor),
  7468. options || {},
  7469. vm
  7470. );
  7471. }
  7472. /* istanbul ignore else */
  7473. if (true) {
  7474. initProxy(vm);
  7475. } else {}
  7476. // expose real self
  7477. vm._self = vm;
  7478. initLifecycle(vm);
  7479. initEvents(vm);
  7480. initRender(vm);
  7481. callHook(vm, 'beforeCreate');
  7482. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  7483. initState(vm);
  7484. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  7485. !vm._$fallback && callHook(vm, 'created');
  7486. /* istanbul ignore if */
  7487. if ( true && config.performance && mark) {
  7488. vm._name = formatComponentName(vm, false);
  7489. mark(endTag);
  7490. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  7491. }
  7492. if (vm.$options.el) {
  7493. vm.$mount(vm.$options.el);
  7494. }
  7495. };
  7496. }
  7497. function initInternalComponent (vm, options) {
  7498. var opts = vm.$options = Object.create(vm.constructor.options);
  7499. // doing this because it's faster than dynamic enumeration.
  7500. var parentVnode = options._parentVnode;
  7501. opts.parent = options.parent;
  7502. opts._parentVnode = parentVnode;
  7503. var vnodeComponentOptions = parentVnode.componentOptions;
  7504. opts.propsData = vnodeComponentOptions.propsData;
  7505. opts._parentListeners = vnodeComponentOptions.listeners;
  7506. opts._renderChildren = vnodeComponentOptions.children;
  7507. opts._componentTag = vnodeComponentOptions.tag;
  7508. if (options.render) {
  7509. opts.render = options.render;
  7510. opts.staticRenderFns = options.staticRenderFns;
  7511. }
  7512. }
  7513. function resolveConstructorOptions (Ctor) {
  7514. var options = Ctor.options;
  7515. if (Ctor.super) {
  7516. var superOptions = resolveConstructorOptions(Ctor.super);
  7517. var cachedSuperOptions = Ctor.superOptions;
  7518. if (superOptions !== cachedSuperOptions) {
  7519. // super option changed,
  7520. // need to resolve new options.
  7521. Ctor.superOptions = superOptions;
  7522. // check if there are any late-modified/attached options (#4976)
  7523. var modifiedOptions = resolveModifiedOptions(Ctor);
  7524. // update base extend options
  7525. if (modifiedOptions) {
  7526. extend(Ctor.extendOptions, modifiedOptions);
  7527. }
  7528. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  7529. if (options.name) {
  7530. options.components[options.name] = Ctor;
  7531. }
  7532. }
  7533. }
  7534. return options
  7535. }
  7536. function resolveModifiedOptions (Ctor) {
  7537. var modified;
  7538. var latest = Ctor.options;
  7539. var sealed = Ctor.sealedOptions;
  7540. for (var key in latest) {
  7541. if (latest[key] !== sealed[key]) {
  7542. if (!modified) { modified = {}; }
  7543. modified[key] = latest[key];
  7544. }
  7545. }
  7546. return modified
  7547. }
  7548. function Vue (options) {
  7549. if ( true &&
  7550. !(this instanceof Vue)
  7551. ) {
  7552. warn('Vue is a constructor and should be called with the `new` keyword');
  7553. }
  7554. this._init(options);
  7555. }
  7556. initMixin(Vue);
  7557. stateMixin(Vue);
  7558. eventsMixin(Vue);
  7559. lifecycleMixin(Vue);
  7560. renderMixin(Vue);
  7561. /* */
  7562. function initUse (Vue) {
  7563. Vue.use = function (plugin) {
  7564. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  7565. if (installedPlugins.indexOf(plugin) > -1) {
  7566. return this
  7567. }
  7568. // additional parameters
  7569. var args = toArray(arguments, 1);
  7570. args.unshift(this);
  7571. if (typeof plugin.install === 'function') {
  7572. plugin.install.apply(plugin, args);
  7573. } else if (typeof plugin === 'function') {
  7574. plugin.apply(null, args);
  7575. }
  7576. installedPlugins.push(plugin);
  7577. return this
  7578. };
  7579. }
  7580. /* */
  7581. function initMixin$1 (Vue) {
  7582. Vue.mixin = function (mixin) {
  7583. this.options = mergeOptions(this.options, mixin);
  7584. return this
  7585. };
  7586. }
  7587. /* */
  7588. function initExtend (Vue) {
  7589. /**
  7590. * Each instance constructor, including Vue, has a unique
  7591. * cid. This enables us to create wrapped "child
  7592. * constructors" for prototypal inheritance and cache them.
  7593. */
  7594. Vue.cid = 0;
  7595. var cid = 1;
  7596. /**
  7597. * Class inheritance
  7598. */
  7599. Vue.extend = function (extendOptions) {
  7600. extendOptions = extendOptions || {};
  7601. var Super = this;
  7602. var SuperId = Super.cid;
  7603. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  7604. if (cachedCtors[SuperId]) {
  7605. return cachedCtors[SuperId]
  7606. }
  7607. var name = extendOptions.name || Super.options.name;
  7608. if ( true && name) {
  7609. validateComponentName(name);
  7610. }
  7611. var Sub = function VueComponent (options) {
  7612. this._init(options);
  7613. };
  7614. Sub.prototype = Object.create(Super.prototype);
  7615. Sub.prototype.constructor = Sub;
  7616. Sub.cid = cid++;
  7617. Sub.options = mergeOptions(
  7618. Super.options,
  7619. extendOptions
  7620. );
  7621. Sub['super'] = Super;
  7622. // For props and computed properties, we define the proxy getters on
  7623. // the Vue instances at extension time, on the extended prototype. This
  7624. // avoids Object.defineProperty calls for each instance created.
  7625. if (Sub.options.props) {
  7626. initProps$1(Sub);
  7627. }
  7628. if (Sub.options.computed) {
  7629. initComputed$1(Sub);
  7630. }
  7631. // allow further extension/mixin/plugin usage
  7632. Sub.extend = Super.extend;
  7633. Sub.mixin = Super.mixin;
  7634. Sub.use = Super.use;
  7635. // create asset registers, so extended classes
  7636. // can have their private assets too.
  7637. ASSET_TYPES.forEach(function (type) {
  7638. Sub[type] = Super[type];
  7639. });
  7640. // enable recursive self-lookup
  7641. if (name) {
  7642. Sub.options.components[name] = Sub;
  7643. }
  7644. // keep a reference to the super options at extension time.
  7645. // later at instantiation we can check if Super's options have
  7646. // been updated.
  7647. Sub.superOptions = Super.options;
  7648. Sub.extendOptions = extendOptions;
  7649. Sub.sealedOptions = extend({}, Sub.options);
  7650. // cache constructor
  7651. cachedCtors[SuperId] = Sub;
  7652. return Sub
  7653. };
  7654. }
  7655. function initProps$1 (Comp) {
  7656. var props = Comp.options.props;
  7657. for (var key in props) {
  7658. proxy(Comp.prototype, "_props", key);
  7659. }
  7660. }
  7661. function initComputed$1 (Comp) {
  7662. var computed = Comp.options.computed;
  7663. for (var key in computed) {
  7664. defineComputed(Comp.prototype, key, computed[key]);
  7665. }
  7666. }
  7667. /* */
  7668. function initAssetRegisters (Vue) {
  7669. /**
  7670. * Create asset registration methods.
  7671. */
  7672. ASSET_TYPES.forEach(function (type) {
  7673. Vue[type] = function (
  7674. id,
  7675. definition
  7676. ) {
  7677. if (!definition) {
  7678. return this.options[type + 's'][id]
  7679. } else {
  7680. /* istanbul ignore if */
  7681. if ( true && type === 'component') {
  7682. validateComponentName(id);
  7683. }
  7684. if (type === 'component' && isPlainObject(definition)) {
  7685. definition.name = definition.name || id;
  7686. definition = this.options._base.extend(definition);
  7687. }
  7688. if (type === 'directive' && typeof definition === 'function') {
  7689. definition = { bind: definition, update: definition };
  7690. }
  7691. this.options[type + 's'][id] = definition;
  7692. return definition
  7693. }
  7694. };
  7695. });
  7696. }
  7697. /* */
  7698. function getComponentName (opts) {
  7699. return opts && (opts.Ctor.options.name || opts.tag)
  7700. }
  7701. function matches (pattern, name) {
  7702. if (Array.isArray(pattern)) {
  7703. return pattern.indexOf(name) > -1
  7704. } else if (typeof pattern === 'string') {
  7705. return pattern.split(',').indexOf(name) > -1
  7706. } else if (isRegExp(pattern)) {
  7707. return pattern.test(name)
  7708. }
  7709. /* istanbul ignore next */
  7710. return false
  7711. }
  7712. function pruneCache (keepAliveInstance, filter) {
  7713. var cache = keepAliveInstance.cache;
  7714. var keys = keepAliveInstance.keys;
  7715. var _vnode = keepAliveInstance._vnode;
  7716. for (var key in cache) {
  7717. var cachedNode = cache[key];
  7718. if (cachedNode) {
  7719. var name = getComponentName(cachedNode.componentOptions);
  7720. if (name && !filter(name)) {
  7721. pruneCacheEntry(cache, key, keys, _vnode);
  7722. }
  7723. }
  7724. }
  7725. }
  7726. function pruneCacheEntry (
  7727. cache,
  7728. key,
  7729. keys,
  7730. current
  7731. ) {
  7732. var cached$$1 = cache[key];
  7733. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  7734. cached$$1.componentInstance.$destroy();
  7735. }
  7736. cache[key] = null;
  7737. remove(keys, key);
  7738. }
  7739. var patternTypes = [String, RegExp, Array];
  7740. var KeepAlive = {
  7741. name: 'keep-alive',
  7742. abstract: true,
  7743. props: {
  7744. include: patternTypes,
  7745. exclude: patternTypes,
  7746. max: [String, Number]
  7747. },
  7748. created: function created () {
  7749. this.cache = Object.create(null);
  7750. this.keys = [];
  7751. },
  7752. destroyed: function destroyed () {
  7753. for (var key in this.cache) {
  7754. pruneCacheEntry(this.cache, key, this.keys);
  7755. }
  7756. },
  7757. mounted: function mounted () {
  7758. var this$1 = this;
  7759. this.$watch('include', function (val) {
  7760. pruneCache(this$1, function (name) { return matches(val, name); });
  7761. });
  7762. this.$watch('exclude', function (val) {
  7763. pruneCache(this$1, function (name) { return !matches(val, name); });
  7764. });
  7765. },
  7766. render: function render () {
  7767. var slot = this.$slots.default;
  7768. var vnode = getFirstComponentChild(slot);
  7769. var componentOptions = vnode && vnode.componentOptions;
  7770. if (componentOptions) {
  7771. // check pattern
  7772. var name = getComponentName(componentOptions);
  7773. var ref = this;
  7774. var include = ref.include;
  7775. var exclude = ref.exclude;
  7776. if (
  7777. // not included
  7778. (include && (!name || !matches(include, name))) ||
  7779. // excluded
  7780. (exclude && name && matches(exclude, name))
  7781. ) {
  7782. return vnode
  7783. }
  7784. var ref$1 = this;
  7785. var cache = ref$1.cache;
  7786. var keys = ref$1.keys;
  7787. var key = vnode.key == null
  7788. // same constructor may get registered as different local components
  7789. // so cid alone is not enough (#3269)
  7790. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  7791. : vnode.key;
  7792. if (cache[key]) {
  7793. vnode.componentInstance = cache[key].componentInstance;
  7794. // make current key freshest
  7795. remove(keys, key);
  7796. keys.push(key);
  7797. } else {
  7798. cache[key] = vnode;
  7799. keys.push(key);
  7800. // prune oldest entry
  7801. if (this.max && keys.length > parseInt(this.max)) {
  7802. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  7803. }
  7804. }
  7805. vnode.data.keepAlive = true;
  7806. }
  7807. return vnode || (slot && slot[0])
  7808. }
  7809. };
  7810. var builtInComponents = {
  7811. KeepAlive: KeepAlive
  7812. };
  7813. /* */
  7814. function initGlobalAPI (Vue) {
  7815. // config
  7816. var configDef = {};
  7817. configDef.get = function () { return config; };
  7818. if (true) {
  7819. configDef.set = function () {
  7820. warn(
  7821. 'Do not replace the Vue.config object, set individual fields instead.'
  7822. );
  7823. };
  7824. }
  7825. Object.defineProperty(Vue, 'config', configDef);
  7826. // exposed util methods.
  7827. // NOTE: these are not considered part of the public API - avoid relying on
  7828. // them unless you are aware of the risk.
  7829. Vue.util = {
  7830. warn: warn,
  7831. extend: extend,
  7832. mergeOptions: mergeOptions,
  7833. defineReactive: defineReactive$$1
  7834. };
  7835. Vue.set = set;
  7836. Vue.delete = del;
  7837. Vue.nextTick = nextTick;
  7838. // 2.6 explicit observable API
  7839. Vue.observable = function (obj) {
  7840. observe(obj);
  7841. return obj
  7842. };
  7843. Vue.options = Object.create(null);
  7844. ASSET_TYPES.forEach(function (type) {
  7845. Vue.options[type + 's'] = Object.create(null);
  7846. });
  7847. // this is used to identify the "base" constructor to extend all plain-object
  7848. // components with in Weex's multi-instance scenarios.
  7849. Vue.options._base = Vue;
  7850. extend(Vue.options.components, builtInComponents);
  7851. initUse(Vue);
  7852. initMixin$1(Vue);
  7853. initExtend(Vue);
  7854. initAssetRegisters(Vue);
  7855. }
  7856. initGlobalAPI(Vue);
  7857. Object.defineProperty(Vue.prototype, '$isServer', {
  7858. get: isServerRendering
  7859. });
  7860. Object.defineProperty(Vue.prototype, '$ssrContext', {
  7861. get: function get () {
  7862. /* istanbul ignore next */
  7863. return this.$vnode && this.$vnode.ssrContext
  7864. }
  7865. });
  7866. // expose FunctionalRenderContext for ssr runtime helper installation
  7867. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  7868. value: FunctionalRenderContext
  7869. });
  7870. Vue.version = '2.6.11';
  7871. /**
  7872. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  7873. */
  7874. var ARRAYTYPE = '[object Array]';
  7875. var OBJECTTYPE = '[object Object]';
  7876. // const FUNCTIONTYPE = '[object Function]'
  7877. function diff(current, pre) {
  7878. var result = {};
  7879. syncKeys(current, pre);
  7880. _diff(current, pre, '', result);
  7881. return result
  7882. }
  7883. function syncKeys(current, pre) {
  7884. if (current === pre) { return }
  7885. var rootCurrentType = type(current);
  7886. var rootPreType = type(pre);
  7887. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  7888. if(Object.keys(current).length >= Object.keys(pre).length){
  7889. for (var key in pre) {
  7890. var currentValue = current[key];
  7891. if (currentValue === undefined) {
  7892. current[key] = null;
  7893. } else {
  7894. syncKeys(currentValue, pre[key]);
  7895. }
  7896. }
  7897. }
  7898. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  7899. if (current.length >= pre.length) {
  7900. pre.forEach(function (item, index) {
  7901. syncKeys(current[index], item);
  7902. });
  7903. }
  7904. }
  7905. }
  7906. function _diff(current, pre, path, result) {
  7907. if (current === pre) { return }
  7908. var rootCurrentType = type(current);
  7909. var rootPreType = type(pre);
  7910. if (rootCurrentType == OBJECTTYPE) {
  7911. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  7912. setResult(result, path, current);
  7913. } else {
  7914. var loop = function ( key ) {
  7915. var currentValue = current[key];
  7916. var preValue = pre[key];
  7917. var currentType = type(currentValue);
  7918. var preType = type(preValue);
  7919. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  7920. if (currentValue != pre[key]) {
  7921. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  7922. }
  7923. } else if (currentType == ARRAYTYPE) {
  7924. if (preType != ARRAYTYPE) {
  7925. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  7926. } else {
  7927. if (currentValue.length < preValue.length) {
  7928. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  7929. } else {
  7930. currentValue.forEach(function (item, index) {
  7931. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  7932. });
  7933. }
  7934. }
  7935. } else if (currentType == OBJECTTYPE) {
  7936. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  7937. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  7938. } else {
  7939. for (var subKey in currentValue) {
  7940. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  7941. }
  7942. }
  7943. }
  7944. };
  7945. for (var key in current) loop( key );
  7946. }
  7947. } else if (rootCurrentType == ARRAYTYPE) {
  7948. if (rootPreType != ARRAYTYPE) {
  7949. setResult(result, path, current);
  7950. } else {
  7951. if (current.length < pre.length) {
  7952. setResult(result, path, current);
  7953. } else {
  7954. current.forEach(function (item, index) {
  7955. _diff(item, pre[index], path + '[' + index + ']', result);
  7956. });
  7957. }
  7958. }
  7959. } else {
  7960. setResult(result, path, current);
  7961. }
  7962. }
  7963. function setResult(result, k, v) {
  7964. // if (type(v) != FUNCTIONTYPE) {
  7965. result[k] = v;
  7966. // }
  7967. }
  7968. function type(obj) {
  7969. return Object.prototype.toString.call(obj)
  7970. }
  7971. /* */
  7972. function flushCallbacks$1(vm) {
  7973. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  7974. if (Object({"NODE_ENV":"development","VUE_APP_NAME":"forest","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  7975. var mpInstance = vm.$scope;
  7976. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  7977. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  7978. }
  7979. var copies = vm.__next_tick_callbacks.slice(0);
  7980. vm.__next_tick_callbacks.length = 0;
  7981. for (var i = 0; i < copies.length; i++) {
  7982. copies[i]();
  7983. }
  7984. }
  7985. }
  7986. function hasRenderWatcher(vm) {
  7987. return queue.find(function (watcher) { return vm._watcher === watcher; })
  7988. }
  7989. function nextTick$1(vm, cb) {
  7990. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  7991. //2.nextTick 之前存在 render watcher
  7992. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  7993. if(Object({"NODE_ENV":"development","VUE_APP_NAME":"forest","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  7994. var mpInstance = vm.$scope;
  7995. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  7996. ']:nextVueTick');
  7997. }
  7998. return nextTick(cb, vm)
  7999. }else{
  8000. if(Object({"NODE_ENV":"development","VUE_APP_NAME":"forest","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  8001. var mpInstance$1 = vm.$scope;
  8002. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  8003. ']:nextMPTick');
  8004. }
  8005. }
  8006. var _resolve;
  8007. if (!vm.__next_tick_callbacks) {
  8008. vm.__next_tick_callbacks = [];
  8009. }
  8010. vm.__next_tick_callbacks.push(function () {
  8011. if (cb) {
  8012. try {
  8013. cb.call(vm);
  8014. } catch (e) {
  8015. handleError(e, vm, 'nextTick');
  8016. }
  8017. } else if (_resolve) {
  8018. _resolve(vm);
  8019. }
  8020. });
  8021. // $flow-disable-line
  8022. if (!cb && typeof Promise !== 'undefined') {
  8023. return new Promise(function (resolve) {
  8024. _resolve = resolve;
  8025. })
  8026. }
  8027. }
  8028. /* */
  8029. function cloneWithData(vm) {
  8030. // 确保当前 vm 所有数据被同步
  8031. var ret = Object.create(null);
  8032. var dataKeys = [].concat(
  8033. Object.keys(vm._data || {}),
  8034. Object.keys(vm._computedWatchers || {}));
  8035. dataKeys.reduce(function(ret, key) {
  8036. ret[key] = vm[key];
  8037. return ret
  8038. }, ret);
  8039. // vue-composition-api
  8040. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  8041. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  8042. if (rawBindings) {
  8043. Object.keys(rawBindings).forEach(function (key) {
  8044. ret[key] = vm[key];
  8045. });
  8046. }
  8047. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  8048. Object.assign(ret, vm.$mp.data || {});
  8049. if (
  8050. Array.isArray(vm.$options.behaviors) &&
  8051. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  8052. ) { //form-field
  8053. ret['name'] = vm.name;
  8054. ret['value'] = vm.value;
  8055. }
  8056. return JSON.parse(JSON.stringify(ret))
  8057. }
  8058. var patch = function(oldVnode, vnode) {
  8059. var this$1 = this;
  8060. if (vnode === null) { //destroy
  8061. return
  8062. }
  8063. if (this.mpType === 'page' || this.mpType === 'component') {
  8064. var mpInstance = this.$scope;
  8065. var data = Object.create(null);
  8066. try {
  8067. data = cloneWithData(this);
  8068. } catch (err) {
  8069. console.error(err);
  8070. }
  8071. data.__webviewId__ = mpInstance.data.__webviewId__;
  8072. var mpData = Object.create(null);
  8073. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  8074. mpData[key] = mpInstance.data[key];
  8075. });
  8076. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  8077. if (Object.keys(diffData).length) {
  8078. if (Object({"NODE_ENV":"development","VUE_APP_NAME":"forest","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  8079. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  8080. ']差量更新',
  8081. JSON.stringify(diffData));
  8082. }
  8083. this.__next_tick_pending = true;
  8084. mpInstance.setData(diffData, function () {
  8085. this$1.__next_tick_pending = false;
  8086. flushCallbacks$1(this$1);
  8087. });
  8088. } else {
  8089. flushCallbacks$1(this);
  8090. }
  8091. }
  8092. };
  8093. /* */
  8094. function createEmptyRender() {
  8095. }
  8096. function mountComponent$1(
  8097. vm,
  8098. el,
  8099. hydrating
  8100. ) {
  8101. if (!vm.mpType) {//main.js 中的 new Vue
  8102. return vm
  8103. }
  8104. if (vm.mpType === 'app') {
  8105. vm.$options.render = createEmptyRender;
  8106. }
  8107. if (!vm.$options.render) {
  8108. vm.$options.render = createEmptyRender;
  8109. if (true) {
  8110. /* istanbul ignore if */
  8111. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  8112. vm.$options.el || el) {
  8113. warn(
  8114. 'You are using the runtime-only build of Vue where the template ' +
  8115. 'compiler is not available. Either pre-compile the templates into ' +
  8116. 'render functions, or use the compiler-included build.',
  8117. vm
  8118. );
  8119. } else {
  8120. warn(
  8121. 'Failed to mount component: template or render function not defined.',
  8122. vm
  8123. );
  8124. }
  8125. }
  8126. }
  8127. !vm._$fallback && callHook(vm, 'beforeMount');
  8128. var updateComponent = function () {
  8129. vm._update(vm._render(), hydrating);
  8130. };
  8131. // we set this to vm._watcher inside the watcher's constructor
  8132. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  8133. // component's mounted hook), which relies on vm._watcher being already defined
  8134. new Watcher(vm, updateComponent, noop, {
  8135. before: function before() {
  8136. if (vm._isMounted && !vm._isDestroyed) {
  8137. callHook(vm, 'beforeUpdate');
  8138. }
  8139. }
  8140. }, true /* isRenderWatcher */);
  8141. hydrating = false;
  8142. return vm
  8143. }
  8144. /* */
  8145. function renderClass (
  8146. staticClass,
  8147. dynamicClass
  8148. ) {
  8149. if (isDef(staticClass) || isDef(dynamicClass)) {
  8150. return concat(staticClass, stringifyClass(dynamicClass))
  8151. }
  8152. /* istanbul ignore next */
  8153. return ''
  8154. }
  8155. function concat (a, b) {
  8156. return a ? b ? (a + ' ' + b) : a : (b || '')
  8157. }
  8158. function stringifyClass (value) {
  8159. if (Array.isArray(value)) {
  8160. return stringifyArray(value)
  8161. }
  8162. if (isObject(value)) {
  8163. return stringifyObject(value)
  8164. }
  8165. if (typeof value === 'string') {
  8166. return value
  8167. }
  8168. /* istanbul ignore next */
  8169. return ''
  8170. }
  8171. function stringifyArray (value) {
  8172. var res = '';
  8173. var stringified;
  8174. for (var i = 0, l = value.length; i < l; i++) {
  8175. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  8176. if (res) { res += ' '; }
  8177. res += stringified;
  8178. }
  8179. }
  8180. return res
  8181. }
  8182. function stringifyObject (value) {
  8183. var res = '';
  8184. for (var key in value) {
  8185. if (value[key]) {
  8186. if (res) { res += ' '; }
  8187. res += key;
  8188. }
  8189. }
  8190. return res
  8191. }
  8192. /* */
  8193. var parseStyleText = cached(function (cssText) {
  8194. var res = {};
  8195. var listDelimiter = /;(?![^(]*\))/g;
  8196. var propertyDelimiter = /:(.+)/;
  8197. cssText.split(listDelimiter).forEach(function (item) {
  8198. if (item) {
  8199. var tmp = item.split(propertyDelimiter);
  8200. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  8201. }
  8202. });
  8203. return res
  8204. });
  8205. // normalize possible array / string values into Object
  8206. function normalizeStyleBinding (bindingStyle) {
  8207. if (Array.isArray(bindingStyle)) {
  8208. return toObject(bindingStyle)
  8209. }
  8210. if (typeof bindingStyle === 'string') {
  8211. return parseStyleText(bindingStyle)
  8212. }
  8213. return bindingStyle
  8214. }
  8215. /* */
  8216. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  8217. function getTarget(obj, path) {
  8218. var parts = path.split('.');
  8219. var key = parts[0];
  8220. if (key.indexOf('__$n') === 0) { //number index
  8221. key = parseInt(key.replace('__$n', ''));
  8222. }
  8223. if (parts.length === 1) {
  8224. return obj[key]
  8225. }
  8226. return getTarget(obj[key], parts.slice(1).join('.'))
  8227. }
  8228. function internalMixin(Vue) {
  8229. Vue.config.errorHandler = function(err, vm, info) {
  8230. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  8231. console.error(err);
  8232. /* eslint-disable no-undef */
  8233. var app = getApp();
  8234. if (app && app.onError) {
  8235. app.onError(err);
  8236. }
  8237. };
  8238. var oldEmit = Vue.prototype.$emit;
  8239. Vue.prototype.$emit = function(event) {
  8240. if (this.$scope && event) {
  8241. this.$scope['triggerEvent'](event, {
  8242. __args__: toArray(arguments, 1)
  8243. });
  8244. }
  8245. return oldEmit.apply(this, arguments)
  8246. };
  8247. Vue.prototype.$nextTick = function(fn) {
  8248. return nextTick$1(this, fn)
  8249. };
  8250. MP_METHODS.forEach(function (method) {
  8251. Vue.prototype[method] = function(args) {
  8252. if (this.$scope && this.$scope[method]) {
  8253. return this.$scope[method](args)
  8254. }
  8255. // mp-alipay
  8256. if (typeof my === 'undefined') {
  8257. return
  8258. }
  8259. if (method === 'createSelectorQuery') {
  8260. /* eslint-disable no-undef */
  8261. return my.createSelectorQuery(args)
  8262. } else if (method === 'createIntersectionObserver') {
  8263. /* eslint-disable no-undef */
  8264. return my.createIntersectionObserver(args)
  8265. }
  8266. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  8267. };
  8268. });
  8269. Vue.prototype.__init_provide = initProvide;
  8270. Vue.prototype.__init_injections = initInjections;
  8271. Vue.prototype.__call_hook = function(hook, args) {
  8272. var vm = this;
  8273. // #7573 disable dep collection when invoking lifecycle hooks
  8274. pushTarget();
  8275. var handlers = vm.$options[hook];
  8276. var info = hook + " hook";
  8277. var ret;
  8278. if (handlers) {
  8279. for (var i = 0, j = handlers.length; i < j; i++) {
  8280. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  8281. }
  8282. }
  8283. if (vm._hasHookEvent) {
  8284. vm.$emit('hook:' + hook, args);
  8285. }
  8286. popTarget();
  8287. return ret
  8288. };
  8289. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  8290. if (Array.isArray(modifiers)) {
  8291. if (modifiers.indexOf('trim') !== -1) {
  8292. value = value.trim();
  8293. }
  8294. if (modifiers.indexOf('number') !== -1) {
  8295. value = this._n(value);
  8296. }
  8297. }
  8298. if (!target) {
  8299. target = this;
  8300. }
  8301. target[key] = value;
  8302. };
  8303. Vue.prototype.__set_sync = function(target, key, value) {
  8304. if (!target) {
  8305. target = this;
  8306. }
  8307. target[key] = value;
  8308. };
  8309. Vue.prototype.__get_orig = function(item) {
  8310. if (isPlainObject(item)) {
  8311. return item['$orig'] || item
  8312. }
  8313. return item
  8314. };
  8315. Vue.prototype.__get_value = function(dataPath, target) {
  8316. return getTarget(target || this, dataPath)
  8317. };
  8318. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  8319. return renderClass(staticClass, dynamicClass)
  8320. };
  8321. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  8322. if (!dynamicStyle && !staticStyle) {
  8323. return ''
  8324. }
  8325. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  8326. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  8327. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  8328. };
  8329. Vue.prototype.__map = function(val, iteratee) {
  8330. //TODO 暂不考虑 string
  8331. var ret, i, l, keys, key;
  8332. if (Array.isArray(val)) {
  8333. ret = new Array(val.length);
  8334. for (i = 0, l = val.length; i < l; i++) {
  8335. ret[i] = iteratee(val[i], i);
  8336. }
  8337. return ret
  8338. } else if (isObject(val)) {
  8339. keys = Object.keys(val);
  8340. ret = Object.create(null);
  8341. for (i = 0, l = keys.length; i < l; i++) {
  8342. key = keys[i];
  8343. ret[key] = iteratee(val[key], key, i);
  8344. }
  8345. return ret
  8346. } else if (typeof val === 'number') {
  8347. ret = new Array(val);
  8348. for (i = 0, l = val; i < l; i++) {
  8349. // 第一个参数暂时仍和小程序一致
  8350. ret[i] = iteratee(i, i);
  8351. }
  8352. return ret
  8353. }
  8354. return []
  8355. };
  8356. }
  8357. /* */
  8358. var LIFECYCLE_HOOKS$1 = [
  8359. //App
  8360. 'onLaunch',
  8361. 'onShow',
  8362. 'onHide',
  8363. 'onUniNViewMessage',
  8364. 'onPageNotFound',
  8365. 'onThemeChange',
  8366. 'onError',
  8367. 'onUnhandledRejection',
  8368. //Page
  8369. 'onLoad',
  8370. // 'onShow',
  8371. 'onReady',
  8372. // 'onHide',
  8373. 'onUnload',
  8374. 'onPullDownRefresh',
  8375. 'onReachBottom',
  8376. 'onTabItemTap',
  8377. 'onAddToFavorites',
  8378. 'onShareTimeline',
  8379. 'onShareAppMessage',
  8380. 'onResize',
  8381. 'onPageScroll',
  8382. 'onNavigationBarButtonTap',
  8383. 'onBackPress',
  8384. 'onNavigationBarSearchInputChanged',
  8385. 'onNavigationBarSearchInputConfirmed',
  8386. 'onNavigationBarSearchInputClicked',
  8387. //Component
  8388. // 'onReady', // 兼容旧版本,应该移除该事件
  8389. 'onPageShow',
  8390. 'onPageHide',
  8391. 'onPageResize'
  8392. ];
  8393. function lifecycleMixin$1(Vue) {
  8394. //fixed vue-class-component
  8395. var oldExtend = Vue.extend;
  8396. Vue.extend = function(extendOptions) {
  8397. extendOptions = extendOptions || {};
  8398. var methods = extendOptions.methods;
  8399. if (methods) {
  8400. Object.keys(methods).forEach(function (methodName) {
  8401. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  8402. extendOptions[methodName] = methods[methodName];
  8403. delete methods[methodName];
  8404. }
  8405. });
  8406. }
  8407. return oldExtend.call(this, extendOptions)
  8408. };
  8409. var strategies = Vue.config.optionMergeStrategies;
  8410. var mergeHook = strategies.created;
  8411. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  8412. strategies[hook] = mergeHook;
  8413. });
  8414. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  8415. }
  8416. /* */
  8417. // install platform patch function
  8418. Vue.prototype.__patch__ = patch;
  8419. // public mount method
  8420. Vue.prototype.$mount = function(
  8421. el ,
  8422. hydrating
  8423. ) {
  8424. return mountComponent$1(this, el, hydrating)
  8425. };
  8426. lifecycleMixin$1(Vue);
  8427. internalMixin(Vue);
  8428. /* */
  8429. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  8430. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  8431. /***/ }),
  8432. /***/ 20:
  8433. /*!*******************************************************************!*\
  8434. !*** D:/wwwroot/forest/js_sdk/luch-request/luch-request/utils.js ***!
  8435. \*******************************************************************/
  8436. /*! no static exports found */
  8437. /***/ (function(module, exports, __webpack_require__) {
  8438. "use strict";
  8439. // utils is a library of generic helper functions non-specific to axios
  8440. Object.defineProperty(exports, "__esModule", { value: true });exports.isArray = isArray;exports.isObject = isObject;exports.isDate = isDate;exports.isURLSearchParams = isURLSearchParams;exports.forEach = forEach;exports.isBoolean = isBoolean;exports.isPlainObject = isPlainObject;exports.deepMerge = deepMerge;
  8441. var toString = Object.prototype.toString;
  8442. /**
  8443. * Determine if a value is an Array
  8444. *
  8445. * @param {Object} val The value to test
  8446. * @returns {boolean} True if value is an Array, otherwise false
  8447. */
  8448. function isArray(val) {
  8449. return toString.call(val) === '[object Array]';
  8450. }
  8451. /**
  8452. * Determine if a value is an Object
  8453. *
  8454. * @param {Object} val The value to test
  8455. * @returns {boolean} True if value is an Object, otherwise false
  8456. */
  8457. function isObject(val) {
  8458. return val !== null && typeof val === 'object';
  8459. }
  8460. /**
  8461. * Determine if a value is a Date
  8462. *
  8463. * @param {Object} val The value to test
  8464. * @returns {boolean} True if value is a Date, otherwise false
  8465. */
  8466. function isDate(val) {
  8467. return toString.call(val) === '[object Date]';
  8468. }
  8469. /**
  8470. * Determine if a value is a URLSearchParams object
  8471. *
  8472. * @param {Object} val The value to test
  8473. * @returns {boolean} True if value is a URLSearchParams object, otherwise false
  8474. */
  8475. function isURLSearchParams(val) {
  8476. return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
  8477. }
  8478. /**
  8479. * Iterate over an Array or an Object invoking a function for each item.
  8480. *
  8481. * If `obj` is an Array callback will be called passing
  8482. * the value, index, and complete array for each item.
  8483. *
  8484. * If 'obj' is an Object callback will be called passing
  8485. * the value, key, and complete object for each property.
  8486. *
  8487. * @param {Object|Array} obj The object to iterate
  8488. * @param {Function} fn The callback to invoke for each item
  8489. */
  8490. function forEach(obj, fn) {
  8491. // Don't bother if no value provided
  8492. if (obj === null || typeof obj === 'undefined') {
  8493. return;
  8494. }
  8495. // Force an array if not already something iterable
  8496. if (typeof obj !== 'object') {
  8497. /*eslint no-param-reassign:0*/
  8498. obj = [obj];
  8499. }
  8500. if (isArray(obj)) {
  8501. // Iterate over array values
  8502. for (var i = 0, l = obj.length; i < l; i++) {
  8503. fn.call(null, obj[i], i, obj);
  8504. }
  8505. } else {
  8506. // Iterate over object keys
  8507. for (var key in obj) {
  8508. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  8509. fn.call(null, obj[key], key, obj);
  8510. }
  8511. }
  8512. }
  8513. }
  8514. /**
  8515. * 是否为boolean 值
  8516. * @param val
  8517. * @returns {boolean}
  8518. */
  8519. function isBoolean(val) {
  8520. return typeof val === 'boolean';
  8521. }
  8522. /**
  8523. * 是否为真正的对象{} new Object
  8524. * @param {any} obj - 检测的对象
  8525. * @returns {boolean}
  8526. */
  8527. function isPlainObject(obj) {
  8528. return Object.prototype.toString.call(obj) === '[object Object]';
  8529. }
  8530. /**
  8531. * Function equal to merge with the difference being that no reference
  8532. * to original objects is kept.
  8533. *
  8534. * @see merge
  8535. * @param {Object} obj1 Object to merge
  8536. * @returns {Object} Result of all merge properties
  8537. */
  8538. function deepMerge() /* obj1, obj2, obj3, ... */{
  8539. var result = {};
  8540. function assignValue(val, key) {
  8541. if (typeof result[key] === 'object' && typeof val === 'object') {
  8542. result[key] = deepMerge(result[key], val);
  8543. } else if (typeof val === 'object') {
  8544. result[key] = deepMerge({}, val);
  8545. } else {
  8546. result[key] = val;
  8547. }
  8548. }
  8549. for (var i = 0, l = arguments.length; i < l; i++) {
  8550. forEach(arguments[i], assignValue);
  8551. }
  8552. return result;
  8553. }
  8554. /***/ }),
  8555. /***/ 21:
  8556. /*!********************************************************************************!*\
  8557. !*** D:/wwwroot/forest/js_sdk/luch-request/luch-request/core/buildFullPath.js ***!
  8558. \********************************************************************************/
  8559. /*! no static exports found */
  8560. /***/ (function(module, exports, __webpack_require__) {
  8561. "use strict";
  8562. Object.defineProperty(exports, "__esModule", { value: true });exports.default = buildFullPath;
  8563. var _isAbsoluteURL = _interopRequireDefault(__webpack_require__(/*! ../helpers/isAbsoluteURL */ 22));
  8564. var _combineURLs = _interopRequireDefault(__webpack_require__(/*! ../helpers/combineURLs */ 23));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  8565. /**
  8566. * Creates a new URL by combining the baseURL with the requestedURL,
  8567. * only when the requestedURL is not already an absolute URL.
  8568. * If the requestURL is absolute, this function returns the requestedURL untouched.
  8569. *
  8570. * @param {string} baseURL The base URL
  8571. * @param {string} requestedURL Absolute or relative URL to combine
  8572. * @returns {string} The combined full path
  8573. */
  8574. function buildFullPath(baseURL, requestedURL) {
  8575. if (baseURL && !(0, _isAbsoluteURL.default)(requestedURL)) {
  8576. return (0, _combineURLs.default)(baseURL, requestedURL);
  8577. }
  8578. return requestedURL;
  8579. }
  8580. /***/ }),
  8581. /***/ 22:
  8582. /*!***********************************************************************************!*\
  8583. !*** D:/wwwroot/forest/js_sdk/luch-request/luch-request/helpers/isAbsoluteURL.js ***!
  8584. \***********************************************************************************/
  8585. /*! no static exports found */
  8586. /***/ (function(module, exports, __webpack_require__) {
  8587. "use strict";
  8588. /**
  8589. * Determines whether the specified URL is absolute
  8590. *
  8591. * @param {string} url The URL to test
  8592. * @returns {boolean} True if the specified URL is absolute, otherwise false
  8593. */Object.defineProperty(exports, "__esModule", { value: true });exports.default = isAbsoluteURL;
  8594. function isAbsoluteURL(url) {
  8595. // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
  8596. // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
  8597. // by any combination of letters, digits, plus, period, or hyphen.
  8598. return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
  8599. }
  8600. /***/ }),
  8601. /***/ 23:
  8602. /*!*********************************************************************************!*\
  8603. !*** D:/wwwroot/forest/js_sdk/luch-request/luch-request/helpers/combineURLs.js ***!
  8604. \*********************************************************************************/
  8605. /*! no static exports found */
  8606. /***/ (function(module, exports, __webpack_require__) {
  8607. "use strict";
  8608. /**
  8609. * Creates a new URL by combining the specified URLs
  8610. *
  8611. * @param {string} baseURL The base URL
  8612. * @param {string} relativeURL The relative URL
  8613. * @returns {string} The combined URL
  8614. */Object.defineProperty(exports, "__esModule", { value: true });exports.default = combineURLs;
  8615. function combineURLs(baseURL, relativeURL) {
  8616. return relativeURL ?
  8617. baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') :
  8618. baseURL;
  8619. }
  8620. /***/ }),
  8621. /***/ 24:
  8622. /*!*************************************************************************!*\
  8623. !*** D:/wwwroot/forest/js_sdk/luch-request/luch-request/core/settle.js ***!
  8624. \*************************************************************************/
  8625. /*! no static exports found */
  8626. /***/ (function(module, exports, __webpack_require__) {
  8627. "use strict";
  8628. Object.defineProperty(exports, "__esModule", { value: true });exports.default = settle; /**
  8629. * Resolve or reject a Promise based on response status.
  8630. *
  8631. * @param {Function} resolve A function that resolves the promise.
  8632. * @param {Function} reject A function that rejects the promise.
  8633. * @param {object} response The response.
  8634. */
  8635. function settle(resolve, reject, response) {
  8636. var validateStatus = response.config.validateStatus;
  8637. var status = response.statusCode;
  8638. if (status && (!validateStatus || validateStatus(status))) {
  8639. resolve(response);
  8640. } else {
  8641. reject(response);
  8642. }
  8643. }
  8644. /***/ }),
  8645. /***/ 25:
  8646. /*!*************************************************************************************!*\
  8647. !*** D:/wwwroot/forest/js_sdk/luch-request/luch-request/core/InterceptorManager.js ***!
  8648. \*************************************************************************************/
  8649. /*! no static exports found */
  8650. /***/ (function(module, exports, __webpack_require__) {
  8651. "use strict";
  8652. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;
  8653. function InterceptorManager() {
  8654. this.handlers = [];
  8655. }
  8656. /**
  8657. * Add a new interceptor to the stack
  8658. *
  8659. * @param {Function} fulfilled The function to handle `then` for a `Promise`
  8660. * @param {Function} rejected The function to handle `reject` for a `Promise`
  8661. *
  8662. * @return {Number} An ID used to remove interceptor later
  8663. */
  8664. InterceptorManager.prototype.use = function use(fulfilled, rejected) {
  8665. this.handlers.push({
  8666. fulfilled: fulfilled,
  8667. rejected: rejected });
  8668. return this.handlers.length - 1;
  8669. };
  8670. /**
  8671. * Remove an interceptor from the stack
  8672. *
  8673. * @param {Number} id The ID that was returned by `use`
  8674. */
  8675. InterceptorManager.prototype.eject = function eject(id) {
  8676. if (this.handlers[id]) {
  8677. this.handlers[id] = null;
  8678. }
  8679. };
  8680. /**
  8681. * Iterate over all the registered interceptors
  8682. *
  8683. * This method is particularly useful for skipping over any
  8684. * interceptors that may have become `null` calling `eject`.
  8685. *
  8686. * @param {Function} fn The function to call for each interceptor
  8687. */
  8688. InterceptorManager.prototype.forEach = function forEach(fn) {
  8689. this.handlers.forEach(function (h) {
  8690. if (h !== null) {
  8691. fn(h);
  8692. }
  8693. });
  8694. };var _default =
  8695. InterceptorManager;exports.default = _default;
  8696. /***/ }),
  8697. /***/ 252:
  8698. /*!*******************************************************!*\
  8699. !*** D:/wwwroot/forest/components/uni-popup/popup.js ***!
  8700. \*******************************************************/
  8701. /*! no static exports found */
  8702. /***/ (function(module, exports, __webpack_require__) {
  8703. "use strict";
  8704. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _message = _interopRequireDefault(__webpack_require__(/*! ./message.js */ 253));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  8705. // 定义 type 类型:弹出类型:top/bottom/center
  8706. var config = {
  8707. // 顶部弹出
  8708. top: 'top',
  8709. // 底部弹出
  8710. bottom: 'bottom',
  8711. // 居中弹出
  8712. center: 'center',
  8713. // 消息提示
  8714. message: 'top',
  8715. // 对话框
  8716. dialog: 'center',
  8717. // 分享
  8718. share: 'bottom' };var _default =
  8719. {
  8720. data: function data() {
  8721. return {
  8722. config: config };
  8723. },
  8724. mixins: [_message.default] };exports.default = _default;
  8725. /***/ }),
  8726. /***/ 253:
  8727. /*!*********************************************************!*\
  8728. !*** D:/wwwroot/forest/components/uni-popup/message.js ***!
  8729. \*********************************************************/
  8730. /*! no static exports found */
  8731. /***/ (function(module, exports, __webpack_require__) {
  8732. "use strict";
  8733. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  8734. created: function created() {
  8735. if (this.type === 'message') {
  8736. // 不显示遮罩
  8737. this.maskShow = false;
  8738. // 获取子组件对象
  8739. this.childrenMsg = null;
  8740. }
  8741. },
  8742. methods: {
  8743. customOpen: function customOpen() {
  8744. if (this.childrenMsg) {
  8745. this.childrenMsg.open();
  8746. }
  8747. },
  8748. customClose: function customClose() {
  8749. if (this.childrenMsg) {
  8750. this.childrenMsg.close();
  8751. }
  8752. } } };exports.default = _default;
  8753. /***/ }),
  8754. /***/ 26:
  8755. /*!******************************************************************************!*\
  8756. !*** D:/wwwroot/forest/js_sdk/luch-request/luch-request/core/mergeConfig.js ***!
  8757. \******************************************************************************/
  8758. /*! no static exports found */
  8759. /***/ (function(module, exports, __webpack_require__) {
  8760. "use strict";
  8761. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _utils = __webpack_require__(/*! ../utils */ 20);function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}
  8762. /**
  8763. * 合并局部配置优先的配置,如果局部有该配置项则用局部,如果全局有该配置项则用全局
  8764. * @param {Array} keys - 配置项
  8765. * @param {Object} globalsConfig - 当前的全局配置
  8766. * @param {Object} config2 - 局部配置
  8767. * @return {{}}
  8768. */
  8769. var mergeKeys = function mergeKeys(keys, globalsConfig, config2) {
  8770. var config = {};
  8771. keys.forEach(function (prop) {
  8772. if (typeof config2[prop] !== 'undefined') {
  8773. config[prop] = config2[prop];
  8774. } else if (typeof globalsConfig[prop] !== 'undefined') {
  8775. config[prop] = globalsConfig[prop];
  8776. }
  8777. });
  8778. return config;
  8779. };
  8780. /**
  8781. *
  8782. * @param globalsConfig - 当前实例的全局配置
  8783. * @param config2 - 当前的局部配置
  8784. * @return - 合并后的配置
  8785. */var _default =
  8786. function _default(globalsConfig) {var config2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  8787. var method = config2.method || globalsConfig.method || 'GET';
  8788. var config = {
  8789. baseURL: globalsConfig.baseURL || '',
  8790. method: method,
  8791. url: config2.url || '',
  8792. params: config2.params || {},
  8793. custom: _objectSpread(_objectSpread({}, globalsConfig.custom || {}), config2.custom || {}),
  8794. header: (0, _utils.deepMerge)(globalsConfig.header || {}, config2.header || {}) };
  8795. var defaultToConfig2Keys = ['getTask', 'validateStatus'];
  8796. config = _objectSpread(_objectSpread({}, config), mergeKeys(defaultToConfig2Keys, globalsConfig, config2));
  8797. // eslint-disable-next-line no-empty
  8798. if (method === 'DOWNLOAD') {
  8799. } else if (method === 'UPLOAD') {
  8800. delete config.header['content-type'];
  8801. delete config.header['Content-Type'];
  8802. var uploadKeys = [
  8803. 'filePath',
  8804. 'name',
  8805. 'formData'];
  8806. uploadKeys.forEach(function (prop) {
  8807. if (typeof config2[prop] !== 'undefined') {
  8808. config[prop] = config2[prop];
  8809. }
  8810. });
  8811. } else {
  8812. var defaultsKeys = [
  8813. 'data',
  8814. 'timeout',
  8815. 'dataType',
  8816. 'responseType'];
  8817. config = _objectSpread(_objectSpread({}, config), mergeKeys(defaultsKeys, globalsConfig, config2));
  8818. }
  8819. return config;
  8820. };exports.default = _default;
  8821. /***/ }),
  8822. /***/ 261:
  8823. /*!*****************************************************************!*\
  8824. !*** D:/wwwroot/forest/components/mescroll-uni/mescroll-uni.js ***!
  8825. \*****************************************************************/
  8826. /*! no static exports found */
  8827. /***/ (function(module, exports, __webpack_require__) {
  8828. "use strict";
  8829. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = MeScroll; /* mescroll
  8830. * version 1.3.2
  8831. * 2020-08-05 wenju
  8832. * http://www.mescroll.com
  8833. */
  8834. function MeScroll(options, isScrollBody) {
  8835. var me = this;
  8836. me.version = '1.3.2'; // mescroll版本号
  8837. me.options = options || {}; // 配置
  8838. me.isScrollBody = isScrollBody || false; // 滚动区域是否为原生页面滚动; 默认为scroll-view
  8839. me.isDownScrolling = false; // 是否在执行下拉刷新的回调
  8840. me.isUpScrolling = false; // 是否在执行上拉加载的回调
  8841. var hasDownCallback = me.options.down && me.options.down.callback; // 是否配置了down的callback
  8842. // 初始化下拉刷新
  8843. me.initDownScroll();
  8844. // 初始化上拉加载,则初始化
  8845. me.initUpScroll();
  8846. // 自动加载
  8847. setTimeout(function () {// 待主线程执行完毕再执行,避免new MeScroll未初始化,在回调获取不到mescroll的实例
  8848. // 自动触发下拉刷新 (只有配置了down的callback才自动触发下拉刷新)
  8849. if ((me.optDown.use || me.optDown.native) && me.optDown.auto && hasDownCallback) {
  8850. if (me.optDown.autoShowLoading) {
  8851. me.triggerDownScroll(); // 显示下拉进度,执行下拉回调
  8852. } else {
  8853. me.optDown.callback && me.optDown.callback(me); // 不显示下拉进度,直接执行下拉回调
  8854. }
  8855. }
  8856. // 自动触发上拉加载
  8857. if (!me.isUpAutoLoad) {// 部分小程序(头条小程序)emit是异步, 会导致isUpAutoLoad判断有误, 先延时确保先执行down的callback,再执行up的callback
  8858. setTimeout(function () {
  8859. me.optUp.use && me.optUp.auto && !me.isUpAutoLoad && me.triggerUpScroll();
  8860. }, 100);
  8861. }
  8862. }, 30); // 需让me.optDown.inited和me.optUp.inited先执行
  8863. }
  8864. /* 配置参数:下拉刷新 */
  8865. MeScroll.prototype.extendDownScroll = function (optDown) {
  8866. // 下拉刷新的配置
  8867. MeScroll.extend(optDown, {
  8868. use: true, // 是否启用下拉刷新; 默认true
  8869. auto: true, // 是否在初始化完毕之后自动执行下拉刷新的回调; 默认true
  8870. native: false, // 是否使用系统自带的下拉刷新; 默认false; 仅mescroll-body生效 (值为true时,还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
  8871. autoShowLoading: false, // 如果设置auto=true(在初始化完毕之后自动执行下拉刷新的回调),那么是否显示下拉刷新的进度; 默认false
  8872. isLock: false, // 是否锁定下拉刷新,默认false;
  8873. offset: 80, // 在列表顶部,下拉大于80px,松手即可触发下拉刷新的回调
  8874. startTop: 100, // scroll-view快速滚动到顶部时,此时的scroll-top可能大于0, 此值用于控制最大的误差
  8875. inOffsetRate: 1, // 在列表顶部,下拉的距离小于offset时,改变下拉区域高度比例;值小于1且越接近0,高度变化越小,表现为越往下越难拉
  8876. outOffsetRate: 0.2, // 在列表顶部,下拉的距离大于offset时,改变下拉区域高度比例;值小于1且越接近0,高度变化越小,表现为越往下越难拉
  8877. bottomOffset: 20, // 当手指touchmove位置在距离body底部20px范围内的时候结束上拉刷新,避免Webview嵌套导致touchend事件不执行
  8878. minAngle: 45, // 向下滑动最少偏移的角度,取值区间 [0,90];默认45度,即向下滑动的角度大于45度则触发下拉;而小于45度,将不触发下拉,避免与左右滑动的轮播等组件冲突;
  8879. textInOffset: '下拉刷新', // 下拉的距离在offset范围内的提示文本
  8880. textOutOffset: '释放更新', // 下拉的距离大于offset范围的提示文本
  8881. textLoading: '加载中 ...', // 加载中的提示文本
  8882. bgColor: "transparent", // 背景颜色 (建议在pages.json中再设置一下backgroundColorTop)
  8883. textColor: "gray", // 文本颜色 (当bgColor配置了颜色,而textColor未配置时,则textColor会默认为白色)
  8884. inited: null, // 下拉刷新初始化完毕的回调
  8885. inOffset: null, // 下拉的距离进入offset范围内那一刻的回调
  8886. outOffset: null, // 下拉的距离大于offset那一刻的回调
  8887. onMoving: null, // 下拉过程中的回调,滑动过程一直在执行; rate下拉区域当前高度与指定距离的比值(inOffset: rate<1; outOffset: rate>=1); downHight当前下拉区域的高度
  8888. beforeLoading: null, // 准备触发下拉刷新的回调: 如果return true,将不触发showLoading和callback回调; 常用来完全自定义下拉刷新, 参考案例【淘宝 v6.8.0】
  8889. showLoading: null, // 显示下拉刷新进度的回调
  8890. afterLoading: null, // 显示下拉刷新进度的回调之后,马上要执行的代码 (如: 在wxs中使用)
  8891. beforeEndDownScroll: null, // 准备结束下拉的回调. 返回结束下拉的延时执行时间,默认0ms; 常用于结束下拉之前再显示另外一小段动画,才去隐藏下拉刷新的场景, 参考案例【dotJump】
  8892. endDownScroll: null, // 结束下拉刷新的回调
  8893. afterEndDownScroll: null, // 结束下拉刷新的回调,马上要执行的代码 (如: 在wxs中使用)
  8894. callback: function callback(mescroll) {
  8895. // 下拉刷新的回调;默认重置上拉加载列表为第一页
  8896. mescroll.resetUpScroll();
  8897. } });
  8898. };
  8899. /* 配置参数:上拉加载 */
  8900. MeScroll.prototype.extendUpScroll = function (optUp) {
  8901. // 上拉加载的配置
  8902. MeScroll.extend(optUp, {
  8903. use: true, // 是否启用上拉加载; 默认true
  8904. auto: true, // 是否在初始化完毕之后自动执行上拉加载的回调; 默认true
  8905. isLock: false, // 是否锁定上拉加载,默认false;
  8906. isBoth: true, // 上拉加载时,如果滑动到列表顶部是否可以同时触发下拉刷新;默认true,两者可同时触发;
  8907. callback: null, // 上拉加载的回调;function(page,mescroll){ }
  8908. page: {
  8909. num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  8910. size: 10, // 每页数据的数量
  8911. time: null // 加载第一页数据服务器返回的时间; 防止用户翻页时,后台新增了数据从而导致下一页数据重复;
  8912. },
  8913. noMoreSize: 5, // 如果列表已无数据,可设置列表的总数量要大于等于5条才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看
  8914. offset: 80, // 距底部多远时,触发upCallback
  8915. textLoading: '加载中 ...', // 加载中的提示文本
  8916. textNoMore: '-- END --', // 没有更多数据的提示文本
  8917. bgColor: "transparent", // 背景颜色 (建议在pages.json中再设置一下backgroundColorBottom)
  8918. textColor: "gray", // 文本颜色 (当bgColor配置了颜色,而textColor未配置时,则textColor会默认为白色)
  8919. inited: null, // 初始化完毕的回调
  8920. showLoading: null, // 显示加载中的回调
  8921. showNoMore: null, // 显示无更多数据的回调
  8922. hideUpScroll: null, // 隐藏上拉加载的回调
  8923. errDistance: 60, // endErr的时候需往上滑动一段距离,使其往下滑动时再次触发onReachBottom,仅mescroll-body生效
  8924. toTop: {
  8925. // 回到顶部按钮,需配置src才显示
  8926. src: null, // 图片路径,默认null (绝对路径或网络图)
  8927. offset: 1000, // 列表滚动多少距离才显示回到顶部按钮,默认1000
  8928. duration: 300, // 回到顶部的动画时长,默认300ms (当值为0或300则使用系统自带回到顶部,更流畅; 其他值则通过step模拟,部分机型可能不够流畅,所以非特殊情况不建议修改此项)
  8929. btnClick: null, // 点击按钮的回调
  8930. onShow: null, // 是否显示的回调
  8931. zIndex: 9990, // fixed定位z-index值
  8932. left: null, // 到左边的距离, 默认null. 此项有值时,right不生效. (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  8933. right: 20, // 到右边的距离, 默认20 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  8934. bottom: 120, // 到底部的距离, 默认120 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  8935. safearea: false, // bottom的偏移量是否加上底部安全区的距离, 默认false, 需要适配iPhoneX时使用 (具体的界面如果不配置此项,则取本vue的safearea值)
  8936. width: 72, // 回到顶部图标的宽度, 默认72 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  8937. radius: "50%" // 圆角, 默认"50%" (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  8938. },
  8939. empty: {
  8940. use: true, // 是否显示空布局
  8941. icon: null, // 图标路径
  8942. tip: '~ 暂无相关数据 ~', // 提示
  8943. btnText: '', // 按钮
  8944. btnClick: null, // 点击按钮的回调
  8945. onShow: null, // 是否显示的回调
  8946. fixed: false, // 是否使用fixed定位,默认false; 配置fixed为true,以下的top和zIndex才生效 (transform会使fixed失效,最终会降级为absolute)
  8947. top: "100rpx", // fixed定位的top值 (完整的单位值,如 "10%"; "100rpx")
  8948. zIndex: 99 // fixed定位z-index值
  8949. },
  8950. onScroll: false // 是否监听滚动事件
  8951. });
  8952. };
  8953. /* 配置参数 */
  8954. MeScroll.extend = function (userOption, defaultOption) {
  8955. if (!userOption) return defaultOption;
  8956. for (var key in defaultOption) {
  8957. if (userOption[key] == null) {
  8958. var def = defaultOption[key];
  8959. if (def != null && typeof def === 'object') {
  8960. userOption[key] = MeScroll.extend({}, def); // 深度匹配
  8961. } else {
  8962. userOption[key] = def;
  8963. }
  8964. } else if (typeof userOption[key] === 'object') {
  8965. MeScroll.extend(userOption[key], defaultOption[key]); // 深度匹配
  8966. }
  8967. }
  8968. return userOption;
  8969. };
  8970. /* 简单判断是否配置了颜色 (非透明,非白色) */
  8971. MeScroll.prototype.hasColor = function (color) {
  8972. if (!color) return false;
  8973. var c = color.toLowerCase();
  8974. return c != "#fff" && c != "#ffffff" && c != "transparent" && c != "white";
  8975. };
  8976. /* -------初始化下拉刷新------- */
  8977. MeScroll.prototype.initDownScroll = function () {
  8978. var me = this;
  8979. // 配置参数
  8980. me.optDown = me.options.down || {};
  8981. if (!me.optDown.textColor && me.hasColor(me.optDown.bgColor)) me.optDown.textColor = "#fff"; // 当bgColor有值且textColor未设置,则textColor默认白色
  8982. me.extendDownScroll(me.optDown);
  8983. // 如果是mescroll-body且配置了native,则禁止自定义的下拉刷新
  8984. if (me.isScrollBody && me.optDown.native) {
  8985. me.optDown.use = false;
  8986. } else {
  8987. me.optDown.native = false; // 仅mescroll-body支持,mescroll-uni不支持
  8988. }
  8989. me.downHight = 0; // 下拉区域的高度
  8990. // 在页面中加入下拉布局
  8991. if (me.optDown.use && me.optDown.inited) {
  8992. // 初始化完毕的回调
  8993. setTimeout(function () {// 待主线程执行完毕再执行,避免new MeScroll未初始化,在回调获取不到mescroll的实例
  8994. me.optDown.inited(me);
  8995. }, 0);
  8996. }
  8997. };
  8998. /* 列表touchstart事件 */
  8999. MeScroll.prototype.touchstartEvent = function (e) {
  9000. if (!this.optDown.use) return;
  9001. this.startPoint = this.getPoint(e); // 记录起点
  9002. this.startTop = this.getScrollTop(); // 记录此时的滚动条位置
  9003. this.startAngle = 0; // 初始角度
  9004. this.lastPoint = this.startPoint; // 重置上次move的点
  9005. this.maxTouchmoveY = this.getBodyHeight() - this.optDown.bottomOffset; // 手指触摸的最大范围(写在touchstart避免body获取高度为0的情况)
  9006. this.inTouchend = false; // 标记不是touchend
  9007. };
  9008. /* 列表touchmove事件 */
  9009. MeScroll.prototype.touchmoveEvent = function (e) {
  9010. if (!this.optDown.use) return;
  9011. var me = this;
  9012. var scrollTop = me.getScrollTop(); // 当前滚动条的距离
  9013. var curPoint = me.getPoint(e); // 当前点
  9014. var moveY = curPoint.y - me.startPoint.y; // 和起点比,移动的距离,大于0向下拉,小于0向上拉
  9015. // 向下拉 && 在顶部
  9016. // mescroll-body,直接判定在顶部即可
  9017. // scroll-view在滚动时不会触发touchmove,当触顶/底/左/右时,才会触发touchmove
  9018. // scroll-view滚动到顶部时,scrollTop不一定为0,也有可能大于0; 在iOS的APP中scrollTop可能为负数,不一定和startTop相等
  9019. if (moveY > 0 && (
  9020. me.isScrollBody && scrollTop <= 0 ||
  9021. !me.isScrollBody && (scrollTop <= 0 || scrollTop <= me.optDown.startTop && scrollTop === me.startTop)))
  9022. {
  9023. // 可下拉的条件
  9024. if (!me.inTouchend && !me.isDownScrolling && !me.optDown.isLock && (!me.isUpScrolling || me.isUpScrolling &&
  9025. me.optUp.isBoth)) {
  9026. // 下拉的初始角度是否在配置的范围内
  9027. if (!me.startAngle) me.startAngle = me.getAngle(me.lastPoint, curPoint); // 两点之间的角度,区间 [0,90]
  9028. if (me.startAngle < me.optDown.minAngle) return; // 如果小于配置的角度,则不往下执行下拉刷新
  9029. // 如果手指的位置超过配置的距离,则提前结束下拉,避免Webview嵌套导致touchend无法触发
  9030. if (me.maxTouchmoveY > 0 && curPoint.y >= me.maxTouchmoveY) {
  9031. me.inTouchend = true; // 标记执行touchend
  9032. me.touchendEvent(); // 提前触发touchend
  9033. return;
  9034. }
  9035. me.preventDefault(e); // 阻止默认事件
  9036. var diff = curPoint.y - me.lastPoint.y; // 和上次比,移动的距离 (大于0向下,小于0向上)
  9037. // 下拉距离 < 指定距离
  9038. if (me.downHight < me.optDown.offset) {
  9039. if (me.movetype !== 1) {
  9040. me.movetype = 1; // 加入标记,保证只执行一次
  9041. me.optDown.inOffset && me.optDown.inOffset(me); // 进入指定距离范围内那一刻的回调,只执行一次
  9042. me.isMoveDown = true; // 标记下拉区域高度改变,在touchend重置回来
  9043. }
  9044. me.downHight += diff * me.optDown.inOffsetRate; // 越往下,高度变化越小
  9045. // 指定距离 <= 下拉距离
  9046. } else {
  9047. if (me.movetype !== 2) {
  9048. me.movetype = 2; // 加入标记,保证只执行一次
  9049. me.optDown.outOffset && me.optDown.outOffset(me); // 下拉超过指定距离那一刻的回调,只执行一次
  9050. me.isMoveDown = true; // 标记下拉区域高度改变,在touchend重置回来
  9051. }
  9052. if (diff > 0) {// 向下拉
  9053. me.downHight += diff * me.optDown.outOffsetRate; // 越往下,高度变化越小
  9054. } else {// 向上收
  9055. me.downHight += diff; // 向上收回高度,则向上滑多少收多少高度
  9056. }
  9057. }
  9058. me.downHight = Math.round(me.downHight); // 取整
  9059. var rate = me.downHight / me.optDown.offset; // 下拉区域当前高度与指定距离的比值
  9060. me.optDown.onMoving && me.optDown.onMoving(me, rate, me.downHight); // 下拉过程中的回调,一直在执行
  9061. }
  9062. }
  9063. me.lastPoint = curPoint; // 记录本次移动的点
  9064. };
  9065. /* 列表touchend事件 */
  9066. MeScroll.prototype.touchendEvent = function (e) {
  9067. if (!this.optDown.use) return;
  9068. // 如果下拉区域高度已改变,则需重置回来
  9069. if (this.isMoveDown) {
  9070. if (this.downHight >= this.optDown.offset) {
  9071. // 符合触发刷新的条件
  9072. this.triggerDownScroll();
  9073. } else {
  9074. // 不符合的话 则重置
  9075. this.downHight = 0;
  9076. this.endDownScrollCall(this);
  9077. }
  9078. this.movetype = 0;
  9079. this.isMoveDown = false;
  9080. } else if (!this.isScrollBody && this.getScrollTop() === this.startTop) {// scroll-view到顶/左/右/底的滑动事件
  9081. var isScrollUp = this.getPoint(e).y - this.startPoint.y < 0; // 和起点比,移动的距离,大于0向下拉,小于0向上拉
  9082. // 上滑
  9083. if (isScrollUp) {
  9084. // 需检查滑动的角度
  9085. var angle = this.getAngle(this.getPoint(e), this.startPoint); // 两点之间的角度,区间 [0,90]
  9086. if (angle > 80) {
  9087. // 检查并触发上拉
  9088. this.triggerUpScroll(true);
  9089. }
  9090. }
  9091. }
  9092. };
  9093. /* 根据点击滑动事件获取第一个手指的坐标 */
  9094. MeScroll.prototype.getPoint = function (e) {
  9095. if (!e) {
  9096. return {
  9097. x: 0,
  9098. y: 0 };
  9099. }
  9100. if (e.touches && e.touches[0]) {
  9101. return {
  9102. x: e.touches[0].pageX,
  9103. y: e.touches[0].pageY };
  9104. } else if (e.changedTouches && e.changedTouches[0]) {
  9105. return {
  9106. x: e.changedTouches[0].pageX,
  9107. y: e.changedTouches[0].pageY };
  9108. } else {
  9109. return {
  9110. x: e.clientX,
  9111. y: e.clientY };
  9112. }
  9113. };
  9114. /* 计算两点之间的角度: 区间 [0,90]*/
  9115. MeScroll.prototype.getAngle = function (p1, p2) {
  9116. var x = Math.abs(p1.x - p2.x);
  9117. var y = Math.abs(p1.y - p2.y);
  9118. var z = Math.sqrt(x * x + y * y);
  9119. var angle = 0;
  9120. if (z !== 0) {
  9121. angle = Math.asin(y / z) / Math.PI * 180;
  9122. }
  9123. return angle;
  9124. };
  9125. /* 触发下拉刷新 */
  9126. MeScroll.prototype.triggerDownScroll = function () {
  9127. if (this.optDown.beforeLoading && this.optDown.beforeLoading(this)) {
  9128. //return true则处于完全自定义状态
  9129. } else {
  9130. this.showDownScroll(); // 下拉刷新中...
  9131. !this.optDown.native && this.optDown.callback && this.optDown.callback(this); // 执行回调,联网加载数据
  9132. }
  9133. };
  9134. /* 显示下拉进度布局 */
  9135. MeScroll.prototype.showDownScroll = function () {
  9136. this.isDownScrolling = true; // 标记下拉中
  9137. if (this.optDown.native) {
  9138. uni.startPullDownRefresh(); // 系统自带的下拉刷新
  9139. this.showDownLoadingCall(0); // 仍触发showLoading,因为上拉加载用到
  9140. } else {
  9141. this.downHight = this.optDown.offset; // 更新下拉区域高度
  9142. this.showDownLoadingCall(this.downHight); // 下拉刷新中...
  9143. }
  9144. };
  9145. MeScroll.prototype.showDownLoadingCall = function (downHight) {
  9146. this.optDown.showLoading && this.optDown.showLoading(this, downHight); // 下拉刷新中...
  9147. this.optDown.afterLoading && this.optDown.afterLoading(this, downHight); // 下拉刷新中...触发之后马上要执行的代码
  9148. };
  9149. /* 显示系统自带的下拉刷新时需要处理的业务 */
  9150. MeScroll.prototype.onPullDownRefresh = function () {
  9151. this.isDownScrolling = true; // 标记下拉中
  9152. this.showDownLoadingCall(0); // 仍触发showLoading,因为上拉加载用到
  9153. this.optDown.callback && this.optDown.callback(this); // 执行回调,联网加载数据
  9154. };
  9155. /* 结束下拉刷新 */
  9156. MeScroll.prototype.endDownScroll = function () {
  9157. if (this.optDown.native) {// 结束原生下拉刷新
  9158. this.isDownScrolling = false;
  9159. this.endDownScrollCall(this);
  9160. uni.stopPullDownRefresh();
  9161. return;
  9162. }
  9163. var me = this;
  9164. // 结束下拉刷新的方法
  9165. var endScroll = function endScroll() {
  9166. me.downHight = 0;
  9167. me.isDownScrolling = false;
  9168. me.endDownScrollCall(me);
  9169. if (!me.isScrollBody) {
  9170. me.setScrollHeight(0); // scroll-view重置滚动区域,使数据不满屏时仍可检查触发翻页
  9171. me.scrollTo(0, 0); // scroll-view需重置滚动条到顶部,避免startTop大于0时,对下拉刷新的影响
  9172. }
  9173. };
  9174. // 结束下拉刷新时的回调
  9175. var delay = 0;
  9176. if (me.optDown.beforeEndDownScroll) delay = me.optDown.beforeEndDownScroll(me); // 结束下拉刷新的延时,单位ms
  9177. if (typeof delay === 'number' && delay > 0) {
  9178. setTimeout(endScroll, delay);
  9179. } else {
  9180. endScroll();
  9181. }
  9182. };
  9183. MeScroll.prototype.endDownScrollCall = function () {
  9184. this.optDown.endDownScroll && this.optDown.endDownScroll(this);
  9185. this.optDown.afterEndDownScroll && this.optDown.afterEndDownScroll(this);
  9186. };
  9187. /* 锁定下拉刷新:isLock=ture,null锁定;isLock=false解锁 */
  9188. MeScroll.prototype.lockDownScroll = function (isLock) {
  9189. if (isLock == null) isLock = true;
  9190. this.optDown.isLock = isLock;
  9191. };
  9192. /* 锁定上拉加载:isLock=ture,null锁定;isLock=false解锁 */
  9193. MeScroll.prototype.lockUpScroll = function (isLock) {
  9194. if (isLock == null) isLock = true;
  9195. this.optUp.isLock = isLock;
  9196. };
  9197. /* -------初始化上拉加载------- */
  9198. MeScroll.prototype.initUpScroll = function () {
  9199. var me = this;
  9200. // 配置参数
  9201. me.optUp = me.options.up || { use: false };
  9202. if (!me.optUp.textColor && me.hasColor(me.optUp.bgColor)) me.optUp.textColor = "#fff"; // 当bgColor有值且textColor未设置,则textColor默认白色
  9203. me.extendUpScroll(me.optUp);
  9204. if (me.optUp.use === false) return; // 配置不使用上拉加载时,则不初始化上拉布局
  9205. me.optUp.hasNext = true; // 如果使用上拉,则默认有下一页
  9206. me.startNum = me.optUp.page.num + 1; // 记录page开始的页码
  9207. // 初始化完毕的回调
  9208. if (me.optUp.inited) {
  9209. setTimeout(function () {// 待主线程执行完毕再执行,避免new MeScroll未初始化,在回调获取不到mescroll的实例
  9210. me.optUp.inited(me);
  9211. }, 0);
  9212. }
  9213. };
  9214. /*滚动到底部的事件 (仅mescroll-body生效)*/
  9215. MeScroll.prototype.onReachBottom = function () {
  9216. if (this.isScrollBody && !this.isUpScrolling) {// 只能支持下拉刷新的时候同时可以触发上拉加载,否则滚动到底部就需要上滑一点才能触发onReachBottom
  9217. if (!this.optUp.isLock && this.optUp.hasNext) {
  9218. this.triggerUpScroll();
  9219. }
  9220. }
  9221. };
  9222. /*列表滚动事件 (仅mescroll-body生效)*/
  9223. MeScroll.prototype.onPageScroll = function (e) {
  9224. if (!this.isScrollBody) return;
  9225. // 更新滚动条的位置 (主要用于判断下拉刷新时,滚动条是否在顶部)
  9226. this.setScrollTop(e.scrollTop);
  9227. // 顶部按钮的显示隐藏
  9228. if (e.scrollTop >= this.optUp.toTop.offset) {
  9229. this.showTopBtn();
  9230. } else {
  9231. this.hideTopBtn();
  9232. }
  9233. };
  9234. /*列表滚动事件*/
  9235. MeScroll.prototype.scroll = function (e, onScroll) {
  9236. // 更新滚动条的位置
  9237. this.setScrollTop(e.scrollTop);
  9238. // 更新滚动内容高度
  9239. this.setScrollHeight(e.scrollHeight);
  9240. // 向上滑还是向下滑动
  9241. if (this.preScrollY == null) this.preScrollY = 0;
  9242. this.isScrollUp = e.scrollTop - this.preScrollY > 0;
  9243. this.preScrollY = e.scrollTop;
  9244. // 上滑 && 检查并触发上拉
  9245. this.isScrollUp && this.triggerUpScroll(true);
  9246. // 顶部按钮的显示隐藏
  9247. if (e.scrollTop >= this.optUp.toTop.offset) {
  9248. this.showTopBtn();
  9249. } else {
  9250. this.hideTopBtn();
  9251. }
  9252. // 滑动监听
  9253. this.optUp.onScroll && onScroll && onScroll();
  9254. };
  9255. /* 触发上拉加载 */
  9256. MeScroll.prototype.triggerUpScroll = function (isCheck) {
  9257. if (!this.isUpScrolling && this.optUp.use && this.optUp.callback) {
  9258. // 是否校验在底部; 默认不校验
  9259. if (isCheck === true) {
  9260. var canUp = false;
  9261. // 还有下一页 && 没有锁定 && 不在下拉中
  9262. if (this.optUp.hasNext && !this.optUp.isLock && !this.isDownScrolling) {
  9263. if (this.getScrollBottom() <= this.optUp.offset) {// 到底部
  9264. canUp = true; // 标记可上拉
  9265. }
  9266. }
  9267. if (canUp === false) return;
  9268. }
  9269. this.showUpScroll(); // 上拉加载中...
  9270. this.optUp.page.num++; // 预先加一页,如果失败则减回
  9271. this.isUpAutoLoad = true; // 标记上拉已经自动执行过,避免初始化时多次触发上拉回调
  9272. this.num = this.optUp.page.num; // 把最新的页数赋值在mescroll上,避免对page的影响
  9273. this.size = this.optUp.page.size; // 把最新的页码赋值在mescroll上,避免对page的影响
  9274. this.time = this.optUp.page.time; // 把最新的页码赋值在mescroll上,避免对page的影响
  9275. this.optUp.callback(this); // 执行回调,联网加载数据
  9276. }
  9277. };
  9278. /* 显示上拉加载中 */
  9279. MeScroll.prototype.showUpScroll = function () {
  9280. this.isUpScrolling = true; // 标记上拉加载中
  9281. this.optUp.showLoading && this.optUp.showLoading(this); // 回调
  9282. };
  9283. /* 显示上拉无更多数据 */
  9284. MeScroll.prototype.showNoMore = function () {
  9285. this.optUp.hasNext = false; // 标记无更多数据
  9286. this.optUp.showNoMore && this.optUp.showNoMore(this); // 回调
  9287. };
  9288. /* 隐藏上拉区域**/
  9289. MeScroll.prototype.hideUpScroll = function () {
  9290. this.optUp.hideUpScroll && this.optUp.hideUpScroll(this); // 回调
  9291. };
  9292. /* 结束上拉加载 */
  9293. MeScroll.prototype.endUpScroll = function (isShowNoMore) {
  9294. if (isShowNoMore != null) {// isShowNoMore=null,不处理下拉状态,下拉刷新的时候调用
  9295. if (isShowNoMore) {
  9296. this.showNoMore(); // isShowNoMore=true,显示无更多数据
  9297. } else {
  9298. this.hideUpScroll(); // isShowNoMore=false,隐藏上拉加载
  9299. }
  9300. }
  9301. this.isUpScrolling = false; // 标记结束上拉加载
  9302. };
  9303. /* 重置上拉加载列表为第一页
  9304. *isShowLoading 是否显示进度布局;
  9305. * 1.默认null,不传参,则显示上拉加载的进度布局
  9306. * 2.传参true, 则显示下拉刷新的进度布局
  9307. * 3.传参false,则不显示上拉和下拉的进度 (常用于静默更新列表数据)
  9308. */
  9309. MeScroll.prototype.resetUpScroll = function (isShowLoading) {
  9310. if (this.optUp && this.optUp.use) {
  9311. var page = this.optUp.page;
  9312. this.prePageNum = page.num; // 缓存重置前的页码,加载失败可退回
  9313. this.prePageTime = page.time; // 缓存重置前的时间,加载失败可退回
  9314. page.num = this.startNum; // 重置为第一页
  9315. page.time = null; // 重置时间为空
  9316. if (!this.isDownScrolling && isShowLoading !== false) {// 如果不是下拉刷新触发的resetUpScroll并且不配置列表静默更新,则显示进度;
  9317. if (isShowLoading == null) {
  9318. this.removeEmpty(); // 移除空布局
  9319. this.showUpScroll(); // 不传参,默认显示上拉加载的进度布局
  9320. } else {
  9321. this.showDownScroll(); // 传true,显示下拉刷新的进度布局,不清空列表
  9322. }
  9323. }
  9324. this.isUpAutoLoad = true; // 标记上拉已经自动执行过,避免初始化时多次触发上拉回调
  9325. this.num = page.num; // 把最新的页数赋值在mescroll上,避免对page的影响
  9326. this.size = page.size; // 把最新的页码赋值在mescroll上,避免对page的影响
  9327. this.time = page.time; // 把最新的页码赋值在mescroll上,避免对page的影响
  9328. this.optUp.callback && this.optUp.callback(this); // 执行上拉回调
  9329. }
  9330. };
  9331. /* 设置page.num的值 */
  9332. MeScroll.prototype.setPageNum = function (num) {
  9333. this.optUp.page.num = num - 1;
  9334. };
  9335. /* 设置page.size的值 */
  9336. MeScroll.prototype.setPageSize = function (size) {
  9337. this.optUp.page.size = size;
  9338. };
  9339. /* 联网回调成功,结束下拉刷新和上拉加载
  9340. * dataSize: 当前页的数据量(必传)
  9341. * totalPage: 总页数(必传)
  9342. * systime: 服务器时间 (可空)
  9343. */
  9344. MeScroll.prototype.endByPage = function (dataSize, totalPage, systime) {
  9345. var hasNext;
  9346. if (this.optUp.use && totalPage != null) hasNext = this.optUp.page.num < totalPage; // 是否还有下一页
  9347. this.endSuccess(dataSize, hasNext, systime);
  9348. };
  9349. /* 联网回调成功,结束下拉刷新和上拉加载
  9350. * dataSize: 当前页的数据量(必传)
  9351. * totalSize: 列表所有数据总数量(必传)
  9352. * systime: 服务器时间 (可空)
  9353. */
  9354. MeScroll.prototype.endBySize = function (dataSize, totalSize, systime) {
  9355. var hasNext;
  9356. if (this.optUp.use && totalSize != null) {
  9357. var loadSize = (this.optUp.page.num - 1) * this.optUp.page.size + dataSize; // 已加载的数据总数
  9358. hasNext = loadSize < totalSize; // 是否还有下一页
  9359. }
  9360. this.endSuccess(dataSize, hasNext, systime);
  9361. };
  9362. /* 联网回调成功,结束下拉刷新和上拉加载
  9363. * dataSize: 当前页的数据个数(不是所有页的数据总和),用于上拉加载判断是否还有下一页.如果不传,则会判断还有下一页
  9364. * hasNext: 是否还有下一页,布尔类型;用来解决这个小问题:比如列表共有20条数据,每页加载10条,共2页.如果只根据dataSize判断,则需翻到第三页才会知道无更多数据,如果传了hasNext,则翻到第二页即可显示无更多数据.
  9365. * systime: 服务器时间(可空);用来解决这个小问题:当准备翻下一页时,数据库新增了几条记录,此时翻下一页,前面的几条数据会和上一页的重复;这里传入了systime,那么upCallback的page.time就会有值,把page.time传给服务器,让后台过滤新加入的那几条记录
  9366. */
  9367. MeScroll.prototype.endSuccess = function (dataSize, hasNext, systime) {
  9368. var me = this;
  9369. // 结束下拉刷新
  9370. if (me.isDownScrolling) me.endDownScroll();
  9371. // 结束上拉加载
  9372. if (me.optUp.use) {
  9373. var isShowNoMore; // 是否已无更多数据
  9374. if (dataSize != null) {
  9375. var pageNum = me.optUp.page.num; // 当前页码
  9376. var pageSize = me.optUp.page.size; // 每页长度
  9377. // 如果是第一页
  9378. if (pageNum === 1) {
  9379. if (systime) me.optUp.page.time = systime; // 设置加载列表数据第一页的时间
  9380. }
  9381. if (dataSize < pageSize || hasNext === false) {
  9382. // 返回的数据不满一页时,则说明已无更多数据
  9383. me.optUp.hasNext = false;
  9384. if (dataSize === 0 && pageNum === 1) {
  9385. // 如果第一页无任何数据且配置了空布局
  9386. isShowNoMore = false;
  9387. me.showEmpty();
  9388. } else {
  9389. // 总列表数少于配置的数量,则不显示无更多数据
  9390. var allDataSize = (pageNum - 1) * pageSize + dataSize;
  9391. if (allDataSize < me.optUp.noMoreSize) {
  9392. isShowNoMore = false;
  9393. } else {
  9394. isShowNoMore = true;
  9395. }
  9396. me.removeEmpty(); // 移除空布局
  9397. }
  9398. } else {
  9399. // 还有下一页
  9400. isShowNoMore = false;
  9401. me.optUp.hasNext = true;
  9402. me.removeEmpty(); // 移除空布局
  9403. }
  9404. }
  9405. // 隐藏上拉
  9406. me.endUpScroll(isShowNoMore);
  9407. }
  9408. };
  9409. /* 回调失败,结束下拉刷新和上拉加载 */
  9410. MeScroll.prototype.endErr = function (errDistance) {
  9411. // 结束下拉,回调失败重置回原来的页码和时间
  9412. if (this.isDownScrolling) {
  9413. var page = this.optUp.page;
  9414. if (page && this.prePageNum) {
  9415. page.num = this.prePageNum;
  9416. page.time = this.prePageTime;
  9417. }
  9418. this.endDownScroll();
  9419. }
  9420. // 结束上拉,回调失败重置回原来的页码
  9421. if (this.isUpScrolling) {
  9422. this.optUp.page.num--;
  9423. this.endUpScroll(false);
  9424. // 如果是mescroll-body,则需往回滚一定距离
  9425. if (this.isScrollBody && errDistance !== 0) {// 不处理0
  9426. if (!errDistance) errDistance = this.optUp.errDistance; // 不传,则取默认
  9427. this.scrollTo(this.getScrollTop() - errDistance, 0); // 往上回滚的距离
  9428. }
  9429. }
  9430. };
  9431. /* 显示空布局 */
  9432. MeScroll.prototype.showEmpty = function () {
  9433. this.optUp.empty.use && this.optUp.empty.onShow && this.optUp.empty.onShow(true);
  9434. };
  9435. /* 移除空布局 */
  9436. MeScroll.prototype.removeEmpty = function () {
  9437. this.optUp.empty.use && this.optUp.empty.onShow && this.optUp.empty.onShow(false);
  9438. };
  9439. /* 显示回到顶部的按钮 */
  9440. MeScroll.prototype.showTopBtn = function () {
  9441. if (!this.topBtnShow) {
  9442. this.topBtnShow = true;
  9443. this.optUp.toTop.onShow && this.optUp.toTop.onShow(true);
  9444. }
  9445. };
  9446. /* 隐藏回到顶部的按钮 */
  9447. MeScroll.prototype.hideTopBtn = function () {
  9448. if (this.topBtnShow) {
  9449. this.topBtnShow = false;
  9450. this.optUp.toTop.onShow && this.optUp.toTop.onShow(false);
  9451. }
  9452. };
  9453. /* 获取滚动条的位置 */
  9454. MeScroll.prototype.getScrollTop = function () {
  9455. return this.scrollTop || 0;
  9456. };
  9457. /* 记录滚动条的位置 */
  9458. MeScroll.prototype.setScrollTop = function (y) {
  9459. this.scrollTop = y;
  9460. };
  9461. /* 滚动到指定位置 */
  9462. MeScroll.prototype.scrollTo = function (y, t) {
  9463. this.myScrollTo && this.myScrollTo(y, t); // scrollview需自定义回到顶部方法
  9464. };
  9465. /* 自定义scrollTo */
  9466. MeScroll.prototype.resetScrollTo = function (myScrollTo) {
  9467. this.myScrollTo = myScrollTo;
  9468. };
  9469. /* 滚动条到底部的距离 */
  9470. MeScroll.prototype.getScrollBottom = function () {
  9471. return this.getScrollHeight() - this.getClientHeight() - this.getScrollTop();
  9472. };
  9473. /* 计步器
  9474. star: 开始值
  9475. end: 结束值
  9476. callback(step,timer): 回调step值,计步器timer,可自行通过window.clearInterval(timer)结束计步器;
  9477. t: 计步时长,传0则直接回调end值;不传则默认300ms
  9478. rate: 周期;不传则默认30ms计步一次
  9479. * */
  9480. MeScroll.prototype.getStep = function (star, end, callback, t, rate) {
  9481. var diff = end - star; // 差值
  9482. if (t === 0 || diff === 0) {
  9483. callback && callback(end);
  9484. return;
  9485. }
  9486. t = t || 300; // 时长 300ms
  9487. rate = rate || 30; // 周期 30ms
  9488. var count = t / rate; // 次数
  9489. var step = diff / count; // 步长
  9490. var i = 0; // 计数
  9491. var timer = setInterval(function () {
  9492. if (i < count - 1) {
  9493. star += step;
  9494. callback && callback(star, timer);
  9495. i++;
  9496. } else {
  9497. callback && callback(end, timer); // 最后一次直接设置end,避免计算误差
  9498. clearInterval(timer);
  9499. }
  9500. }, rate);
  9501. };
  9502. /* 滚动容器的高度 */
  9503. MeScroll.prototype.getClientHeight = function (isReal) {
  9504. var h = this.clientHeight || 0;
  9505. if (h === 0 && isReal !== true) {// 未获取到容器的高度,可临时取body的高度 (可能会有误差)
  9506. h = this.getBodyHeight();
  9507. }
  9508. return h;
  9509. };
  9510. MeScroll.prototype.setClientHeight = function (h) {
  9511. this.clientHeight = h;
  9512. };
  9513. /* 滚动内容的高度 */
  9514. MeScroll.prototype.getScrollHeight = function () {
  9515. return this.scrollHeight || 0;
  9516. };
  9517. MeScroll.prototype.setScrollHeight = function (h) {
  9518. this.scrollHeight = h;
  9519. };
  9520. /* body的高度 */
  9521. MeScroll.prototype.getBodyHeight = function () {
  9522. return this.bodyHeight || 0;
  9523. };
  9524. MeScroll.prototype.setBodyHeight = function (h) {
  9525. this.bodyHeight = h;
  9526. };
  9527. /* 阻止浏览器默认滚动事件 */
  9528. MeScroll.prototype.preventDefault = function (e) {
  9529. // 小程序不支持e.preventDefault, 已在wxs中禁止
  9530. // app的bounce只能通过配置pages.json的style.app-plus.bounce为"none"来禁止, 或使用renderjs禁止
  9531. // cancelable:是否可以被禁用; defaultPrevented:是否已经被禁用
  9532. if (e && e.cancelable && !e.defaultPrevented) e.preventDefault();
  9533. };
  9534. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  9535. /***/ }),
  9536. /***/ 262:
  9537. /*!************************************************************************!*\
  9538. !*** D:/wwwroot/forest/components/mescroll-uni/mescroll-uni-option.js ***!
  9539. \************************************************************************/
  9540. /*! no static exports found */
  9541. /***/ (function(module, exports, __webpack_require__) {
  9542. "use strict";
  9543. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // 全局配置
  9544. // mescroll-body 和 mescroll-uni 通用
  9545. var GlobalOption = {
  9546. down: {
  9547. // 其他down的配置参数也可以写,这里只展示了常用的配置:
  9548. textInOffset: '下拉刷新', // 下拉的距离在offset范围内的提示文本
  9549. textOutOffset: '释放更新', // 下拉的距离大于offset范围的提示文本
  9550. textLoading: '加载中 ...', // 加载中的提示文本
  9551. offset: 80, // 在列表顶部,下拉大于80px,松手即可触发下拉刷新的回调
  9552. native: false // 是否使用系统自带的下拉刷新; 默认false; 仅在mescroll-body生效 (值为true时,还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
  9553. },
  9554. up: {
  9555. // 其他up的配置参数也可以写,这里只展示了常用的配置:
  9556. textLoading: '加载中 ...', // 加载中的提示文本
  9557. textNoMore: '-- END --', // 没有更多数据的提示文本
  9558. offset: 80, // 距底部多远时,触发upCallback
  9559. toTop: {
  9560. // 回到顶部按钮,需配置src才显示
  9561. src: "http://www.mescroll.com/img/mescroll-totop.png?v=1", // 图片路径 (建议放入static目录, 如 /static/img/mescroll-totop.png )
  9562. offset: 1000, // 列表滚动多少距离才显示回到顶部按钮,默认1000px
  9563. right: 20, // 到右边的距离, 默认20 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
  9564. bottom: 120, // 到底部的距离, 默认120 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
  9565. width: 72 // 回到顶部图标的宽度, 默认72 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
  9566. },
  9567. empty: {
  9568. use: true, // 是否显示空布局
  9569. icon: "http://www.mescroll.com/img/mescroll-empty.png?v=1", // 图标路径 (建议放入static目录, 如 /static/img/mescroll-empty.png )
  9570. tip: '~ 空空如也 ~' // 提示
  9571. } } };var _default =
  9572. GlobalOption;exports.default = _default;
  9573. /***/ }),
  9574. /***/ 263:
  9575. /*!***************************************************************!*\
  9576. !*** D:/wwwroot/forest/components/mescroll-uni/wxs/mixins.js ***!
  9577. \***************************************************************/
  9578. /*! no static exports found */
  9579. /***/ (function(module, exports, __webpack_require__) {
  9580. "use strict";
  9581. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // 定义在wxs (含renderjs) 逻辑层的数据和方法, 与视图层相互通信
  9582. var WxsMixin = {
  9583. data: function data() {
  9584. return {
  9585. // 传入wxs视图层的数据 (响应式)
  9586. wxsProp: {
  9587. optDown: {}, // 下拉刷新的配置
  9588. scrollTop: 0, // 滚动条的距离
  9589. bodyHeight: 0, // body的高度
  9590. isDownScrolling: false, // 是否正在下拉刷新中
  9591. isUpScrolling: false, // 是否正在上拉加载中
  9592. isScrollBody: true, // 是否为mescroll-body滚动
  9593. isUpBoth: true, // 上拉加载时,是否同时可以下拉刷新
  9594. t: 0 // 数据更新的标记 (只有数据更新了,才会触发wxs的Observer)
  9595. },
  9596. // 标记调用wxs视图层的方法
  9597. callProp: {
  9598. callType: '', // 方法名
  9599. t: 0 // 数据更新的标记 (只有数据更新了,才会触发wxs的Observer)
  9600. },
  9601. // 不用wxs的平台使用此处的wxsBiz对象,抹平wxs的写法 (微信小程序和APP使用的wxsBiz对象是./wxs/wxs.wxs)
  9602. // 不用renderjs的平台使用此处的renderBiz对象,抹平renderjs的写法 (app 和 h5 使用的renderBiz对象是./wxs/renderjs.js)
  9603. renderBiz: {
  9604. propObserver: function propObserver() {} // 抹平renderjs的写法
  9605. } };
  9606. },
  9607. methods: {
  9608. // wxs视图层调用逻辑层的回调
  9609. wxsCall: function wxsCall(msg) {
  9610. if (msg.type === 'setWxsProp') {
  9611. // 更新wxsProp数据 (值改变才触发更新)
  9612. this.wxsProp = {
  9613. optDown: this.mescroll.optDown,
  9614. scrollTop: this.mescroll.getScrollTop(),
  9615. bodyHeight: this.mescroll.getBodyHeight(),
  9616. isDownScrolling: this.mescroll.isDownScrolling,
  9617. isUpScrolling: this.mescroll.isUpScrolling,
  9618. isUpBoth: this.mescroll.optUp.isBoth,
  9619. isScrollBody: this.mescroll.isScrollBody,
  9620. t: Date.now() };
  9621. } else if (msg.type === 'setLoadType') {
  9622. // 设置inOffset,outOffset的状态
  9623. this.downLoadType = msg.downLoadType;
  9624. } else if (msg.type === 'triggerDownScroll') {
  9625. // 主动触发下拉刷新
  9626. this.mescroll.triggerDownScroll();
  9627. } else if (msg.type === 'endDownScroll') {
  9628. // 结束下拉刷新
  9629. this.mescroll.endDownScroll();
  9630. } else if (msg.type === 'triggerUpScroll') {
  9631. // 主动触发上拉加载
  9632. this.mescroll.triggerUpScroll(true);
  9633. }
  9634. } },
  9635. mounted: function mounted() {var _this = this;
  9636. // 配置主动触发wxs显示加载进度的回调
  9637. this.mescroll.optDown.afterLoading = function () {
  9638. _this.callProp = { callType: "showLoading", t: Date.now() }; // 触发wxs的方法 (值改变才触发更新)
  9639. };
  9640. // 配置主动触发wxs隐藏加载进度的回调
  9641. this.mescroll.optDown.afterEndDownScroll = function () {
  9642. _this.callProp = { callType: "endDownScroll", t: Date.now() }; // 触发wxs的方法 (值改变才触发更新)
  9643. setTimeout(function () {
  9644. if (_this.downLoadType === 4 || _this.downLoadType === 0) {
  9645. _this.callProp = { callType: "clearTransform", t: Date.now() }; // 触发wxs的方法 (值改变才触发更新)
  9646. }
  9647. }, 320);
  9648. };
  9649. // 初始化wxs的数据
  9650. this.wxsCall({ type: 'setWxsProp' });
  9651. } };var _default =
  9652. WxsMixin;exports.default = _default;
  9653. /***/ }),
  9654. /***/ 27:
  9655. /*!***************************************************************************!*\
  9656. !*** D:/wwwroot/forest/js_sdk/luch-request/luch-request/core/defaults.js ***!
  9657. \***************************************************************************/
  9658. /*! no static exports found */
  9659. /***/ (function(module, exports, __webpack_require__) {
  9660. "use strict";
  9661. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; /**
  9662. * 默认的全局配置
  9663. */var _default =
  9664. {
  9665. baseURL: '',
  9666. header: {},
  9667. method: 'GET',
  9668. dataType: 'json',
  9669. responseType: 'text',
  9670. custom: {},
  9671. timeout: 30000,
  9672. validateStatus: function validateStatus(status) {
  9673. return status >= 200 && status < 300;
  9674. } };exports.default = _default;
  9675. /***/ }),
  9676. /***/ 28:
  9677. /*!*****************************************!*\
  9678. !*** D:/wwwroot/forest/utils/filter.js ***!
  9679. \*****************************************/
  9680. /*! no static exports found */
  9681. /***/ (function(module, exports, __webpack_require__) {
  9682. "use strict";
  9683. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));
  9684. var _config = __webpack_require__(/*! @/config/config */ 12);
  9685. var _date = __webpack_require__(/*! @/utils/date */ 29);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} //保留两位小数
  9686. _vue.default.filter('keepTwoNum', function (val) {var value = Number(val);return value.toFixed(2);}); //链接加时间戳
  9687. _vue.default.filter("timestamp", function (link) {return link + '?t=' + new Date().getTime();}); //截取第一张照片且判断是否有图片,没有图片按照传递类型随机输出
  9688. _vue.default.filter("firstImg", function (arr, sizeType, imgType) {var img; //图片类型判断
  9689. if (arr) {if (arr instanceof Array) {img = arr[0];} else {img = arr.split(',')[0];}} else if (!arr) {//如果没有图片则随机输出一张
  9690. // if(imgType === 'farmer'){
  9691. // const farmerList = ['carbon2/farmer/1.png','carbon2/farmer/2.png']
  9692. // img = farmerList[Math.floor(Math.random() * farmerList.length)];
  9693. // }
  9694. img = '/static/img/inbuild.png';} // return config.imgUrl + img;
  9695. return img;});_vue.default.filter("miniImg", function (img, quality) {return img + '?imageMogr2/quality/' + quality;});_vue.default.filter("formatDateTime", function (time) {if (time == null || time === '') {return 'N/A';} //不足10 补0操作
  9696. var addZero = function addZero(num) {return num < 10 ? '0' + num : num;};var time1 = time.replace(/T/g, ' ');time1 = time1.replace(/\-/g, "/");
  9697. console.log(time1.substring(0, 19));
  9698. var time2 = new Date(time1).getTime();
  9699. console.log('a', time2);
  9700. var date = new Date(time2);
  9701. console.log('date', date);
  9702. var Year = date.getFullYear();
  9703. var Month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1;
  9704. var d = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
  9705. var Hours = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
  9706. var Minutes = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
  9707. var Seconds = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
  9708. var over_time = Year + "/" + Month + "/" + d + " " + Hours + ":" + Minutes + ":" + Seconds;
  9709. //***至此以上是将时间转为正常时间格式,以下为将时间进行增加8小时解决时区差异的操作***
  9710. var time3 = new Date(Date.parse(over_time));
  9711. // time3.setTime(time3.setHours(time3.getHours()));
  9712. time3.setTime(time3.setHours(time3.getHours() + 8));
  9713. var Y = time3.getFullYear() + '/';
  9714. var M = addZero(time3.getMonth() + 1) + '/';
  9715. var D = addZero(time3.getDate()) + ' ';
  9716. var h = addZero(time3.getHours()) + ':';
  9717. var m = addZero(time3.getMinutes()) + ':';
  9718. var s = addZero(time3.getSeconds());
  9719. return Y + M + D + " " + h + m + s;
  9720. // return formatDate(date, 'yyyy-MM-dd hh:mm:ss')
  9721. });
  9722. /***/ }),
  9723. /***/ 29:
  9724. /*!***************************************!*\
  9725. !*** D:/wwwroot/forest/utils/date.js ***!
  9726. \***************************************/
  9727. /*! no static exports found */
  9728. /***/ (function(module, exports, __webpack_require__) {
  9729. "use strict";
  9730. Object.defineProperty(exports, "__esModule", { value: true });exports.formatDate = formatDate;exports.str2Date = str2Date; // date.js
  9731. function formatDate(date, fmt) {
  9732. if (/(y+)/.test(fmt)) {
  9733. fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
  9734. }
  9735. var o = {
  9736. 'M+': date.getMonth() + 1,
  9737. 'd+': date.getDate(),
  9738. 'h+': date.getHours(),
  9739. 'm+': date.getMinutes(),
  9740. 's+': date.getSeconds() };
  9741. for (var k in o) {
  9742. if (new RegExp("(".concat(k, ")")).test(fmt)) {
  9743. var str = o[k] + '';
  9744. fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? str : padLeftZero(str));
  9745. }
  9746. }
  9747. return fmt;
  9748. }
  9749. function padLeftZero(str) {
  9750. return ('00' + str).substr(str.length);
  9751. }
  9752. function str2Date(dateStr, separator) {
  9753. if (!separator) {
  9754. separator = "-";
  9755. }
  9756. var dateArr = dateStr.split(separator);
  9757. var year = parseInt(dateArr[0]);
  9758. var month;
  9759. //处理月份为04这样的情况
  9760. if (dateArr[1].indexOf("0") == 0) {
  9761. month = parseInt(dateArr[1].substring(1));
  9762. } else {
  9763. month = parseInt(dateArr[1]);
  9764. }
  9765. var day = parseInt(dateArr[2]);
  9766. var date = new Date(year, month - 1, day);
  9767. return date;
  9768. }
  9769. /***/ }),
  9770. /***/ 292:
  9771. /*!*******************************************************************!*\
  9772. !*** D:/wwwroot/forest/components/uni-swipe-action-item/mpwxs.js ***!
  9773. \*******************************************************************/
  9774. /*! no static exports found */
  9775. /***/ (function(module, exports, __webpack_require__) {
  9776. "use strict";
  9777. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  9778. data: function data() {
  9779. return {
  9780. position: [],
  9781. button: {},
  9782. btn: "[]" };
  9783. },
  9784. // computed: {
  9785. // pos() {
  9786. // return JSON.stringify(this.position)
  9787. // },
  9788. // btn() {
  9789. // return JSON.stringify(this.button)
  9790. // }
  9791. // },
  9792. watch: {
  9793. button: {
  9794. handler: function handler(newVal) {
  9795. this.btn = JSON.stringify(newVal);
  9796. },
  9797. deep: true },
  9798. show: function show(newVal) {
  9799. if (this.autoClose) return;
  9800. if (!this.button) {
  9801. this.init();
  9802. return;
  9803. }
  9804. this.button.show = newVal;
  9805. },
  9806. leftOptions: function leftOptions() {
  9807. this.init();
  9808. },
  9809. rightOptions: function rightOptions() {
  9810. this.init();
  9811. } },
  9812. created: function created() {
  9813. if (this.swipeaction.children !== undefined) {
  9814. this.swipeaction.children.push(this);
  9815. }
  9816. },
  9817. mounted: function mounted() {
  9818. this.init();
  9819. },
  9820. beforeDestroy: function beforeDestroy() {var _this = this;
  9821. this.swipeaction.children.forEach(function (item, index) {
  9822. if (item === _this) {
  9823. _this.swipeaction.children.splice(index, 1);
  9824. }
  9825. });
  9826. },
  9827. methods: {
  9828. init: function init() {var _this2 = this;
  9829. clearTimeout(this.swipetimer);
  9830. this.swipetimer = setTimeout(function () {
  9831. _this2.getButtonSize();
  9832. }, 50);
  9833. },
  9834. closeSwipe: function closeSwipe(e) {
  9835. if (!this.autoClose) return;
  9836. this.swipeaction.closeOther(this);
  9837. },
  9838. change: function change(e) {
  9839. this.$emit('change', e.open);
  9840. var show = this.button.show;
  9841. if (show !== e.open) {
  9842. this.button.show = e.open;
  9843. }
  9844. },
  9845. appTouchStart: function appTouchStart(e) {var
  9846. clientX =
  9847. e.changedTouches[0].clientX;
  9848. this.clientX = clientX;
  9849. this.timestamp = new Date().getTime();
  9850. },
  9851. appTouchEnd: function appTouchEnd(e, index, item, position) {var
  9852. clientX =
  9853. e.changedTouches[0].clientX;
  9854. // fixed by xxxx 模拟点击事件,解决 ios 13 点击区域错位的问题
  9855. var diff = Math.abs(this.clientX - clientX);
  9856. var time = new Date().getTime() - this.timestamp;
  9857. if (diff < 40 && time < 300) {
  9858. this.$emit('click', {
  9859. content: item,
  9860. index: index,
  9861. position: position });
  9862. }
  9863. },
  9864. getButtonSize: function getButtonSize() {var _this3 = this;
  9865. var views = uni.createSelectorQuery().in(this);
  9866. views.
  9867. selectAll('.uni-swipe_button-group').
  9868. boundingClientRect(function (data) {
  9869. var show = 'none';
  9870. if (_this3.autoClose) {
  9871. show = 'none';
  9872. } else {
  9873. show = _this3.show;
  9874. }
  9875. _this3.button = {
  9876. data: data,
  9877. show: show };
  9878. }).
  9879. exec();
  9880. } } };exports.default = _default;
  9881. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  9882. /***/ }),
  9883. /***/ 3:
  9884. /*!***********************************!*\
  9885. !*** (webpack)/buildin/global.js ***!
  9886. \***********************************/
  9887. /*! no static exports found */
  9888. /***/ (function(module, exports) {
  9889. var g;
  9890. // This works in non-strict mode
  9891. g = (function() {
  9892. return this;
  9893. })();
  9894. try {
  9895. // This works if eval is allowed (see CSP)
  9896. g = g || new Function("return this")();
  9897. } catch (e) {
  9898. // This works if the window reference is available
  9899. if (typeof window === "object") g = window;
  9900. }
  9901. // g can still be undefined, but nothing to do about it...
  9902. // We return undefined, instead of nothing here, so it's
  9903. // easier to handle this case. if(!global) { ...}
  9904. module.exports = g;
  9905. /***/ }),
  9906. /***/ 30:
  9907. /*!**********************************!*\
  9908. !*** D:/wwwroot/forest/wxapi.js ***!
  9909. \**********************************/
  9910. /*! no static exports found */
  9911. /***/ (function(module, exports, __webpack_require__) {
  9912. "use strict";
  9913. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _regenerator = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@babel/runtime/regenerator */ 31));
  9914. var _index = _interopRequireDefault(__webpack_require__(/*! @/js_sdk/luch-request/luch-request/index.js */ 15));
  9915. var _config2 = __webpack_require__(/*! ./config/config */ 12);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {try {var info = gen[key](arg);var value = info.value;} catch (error) {reject(error);return;}if (info.done) {resolve(value);} else {Promise.resolve(value).then(_next, _throw);}}function _asyncToGenerator(fn) {return function () {var self = this,args = arguments;return new Promise(function (resolve, reject) {var gen = fn.apply(self, args);function _next(value) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);}function _throw(err) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);}_next(undefined);});};}function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;} //引入微信jssdk
  9916. var wx = __webpack_require__(/*! @/js_sdk/jweixin-1.4.0.js */ 34); //配置注册url
  9917. var url = '/app/getJsapiTicket'; //http方法
  9918. var $http = new _index.default(); //系统域名url
  9919. // encodeURIComponent
  9920. var href = location.href.split('#')[0]; // const href = location.href.split("?")[0];
  9921. // console.log('href',href);
  9922. var token = uni.getStorageSync("token"); //系统域名url
  9923. var _default = _objectSpread(_objectSpread({}, wx), {}, { isOk: false, config: function config() {var _this = this;return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee() {return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:_context.t0 = wx;_context.t1 = _objectSpread;_context.t2 = { debug: false,
  9924. jsApiList: [
  9925. "updateAppMessageShareData",
  9926. "updateTimelineShareData",
  9927. "onMenuShareTimeline",
  9928. "onMenuShareAppMessage",
  9929. "onMenuShareQQ",
  9930. "onMenuShareWeibo",
  9931. "onMenuShareQZone",
  9932. "startRecord",
  9933. "stopRecord",
  9934. "onVoiceRecordEnd",
  9935. "playVoice",
  9936. "pauseVoice",
  9937. "stopVoice",
  9938. "onVoicePlayEnd",
  9939. "uploadVoice",
  9940. "downloadVoice",
  9941. "chooseImage",
  9942. "previewImage",
  9943. "uploadImage",
  9944. "downloadImage",
  9945. "translateVoice",
  9946. "getNetworkType",
  9947. "openLocation",
  9948. "getLocation",
  9949. "hideOptionMenu",
  9950. "showOptionMenu",
  9951. "hideMenuItems",
  9952. "showMenuItems",
  9953. "hideAllNonBaseMenuItem",
  9954. "showAllNonBaseMenuItem",
  9955. "closeWindow",
  9956. "scanQRCode",
  9957. "chooseWXPay",
  9958. "openProductSpecificView",
  9959. "addCard",
  9960. "chooseCard",
  9961. "openCard"] };_context.next = 5;return (
  9962. $http.get(_config2.config.apiBaseurl + url, {
  9963. params: { url: href },
  9964. header: { Accept: 'application/json',
  9965. Authorization: 'Bearer ' + token },
  9966. dataType: 'json' }));case 5:_context.t3 = _context.sent.
  9967. data.data;_context.t4 = (0, _context.t1)(_context.t2, _context.t3);_context.t0.config.call(_context.t0, _context.t4);
  9968. wx.ready(function (e) {
  9969. _this.isOk = true;
  9970. _this.hideMenu();
  9971. });
  9972. wx.error(function (e) {
  9973. console.log("失败", e.errMsg);
  9974. _this.isOk = false;
  9975. });case 10:case "end":return _context.stop();}}}, _callee);}))();
  9976. },
  9977. hideMenu: function hideMenu() {
  9978. wx.hideAllNonBaseMenuItem();
  9979. wx.hideMenuItems({
  9980. menuList: [
  9981. "menuItem:share:appMessage",
  9982. "menuItem:profile",
  9983. "menuItem:addContact",
  9984. "menuItem:dayMode",
  9985. "menuItem:nightMode",
  9986. "menuItem:share:timeline",
  9987. "menuItem:favorite"]
  9988. // 要隐藏的菜单项,只能隐藏“传播类”和“保护类”按钮,所有menu项见附录3
  9989. });
  9990. },
  9991. showMenu: function showMenu() {
  9992. wx.showMenuItems({
  9993. menuList: [
  9994. "menuItem:share:appMessage",
  9995. "menuItem:profile",
  9996. "menuItem:addContact",
  9997. "menuItem:dayMode",
  9998. "menuItem:nightMode",
  9999. "menuItem:share:timeline",
  10000. "menuItem:favorite"]
  10001. // 要显示的菜单项,所有menu项见附录3
  10002. });
  10003. },
  10004. /**
  10005. * 分享配置
  10006. * @param {Object} info
  10007. */
  10008. share: function share() {var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};var info = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  10009. //添加链接时间戳
  10010. // data.v = new Date().getTime();
  10011. // console.log("shareData",data)
  10012. // let search = [];
  10013. // for (const [key, value] of Object.entries(data)) {
  10014. // // search.push(`${key}=${encodeURIComponent(value)}`);
  10015. // search.push(`${key}=${value}`);
  10016. // }
  10017. // search = "?" + search.join("&");
  10018. var afterEndUrl = _config2.config.afterEndUrl;
  10019. // let afterEndUrl = 'http://tanhui.hongweisoft.com/api/wechat/h5/authorize?returnUrl='
  10020. // let afterEndUrl = 'http://gzhjt.gzsdzth.com/api/wechat/h5/authorize?returnUrl='
  10021. var fullUrl = afterEndUrl + location.href.split('?')[0] + '?togetherId=' + data.togetherId + '/#/' + data.routeUrl;
  10022. var shareInfo = _objectSpread({
  10023. title: data.nickname + '邀请你参与贵州省单株碳汇精准扶贫',
  10024. link: fullUrl,
  10025. desc: "购碳扶贫,你我同行",
  10026. imgUrl: href + "/static/logo.png",
  10027. trigger: function trigger(res) {},
  10028. success: function success(res) {},
  10029. cancel: function cancel(res) {},
  10030. fail: function fail(res) {} },
  10031. info);
  10032. console.log('shareInfo', shareInfo, 'fullUrl', fullUrl);
  10033. //自定义“分享给朋友”及“分享到QQ”按钮的分享内容(1.4.0)
  10034. wx.updateAppMessageShareData(shareInfo);
  10035. //自定义“分享到朋友圈”及“分享到QQ空间”按钮的分享内容(1.4.0)
  10036. wx.updateTimelineShareData(shareInfo);
  10037. },
  10038. //拉起微信浏览器端支付
  10039. JSAPI: function JSAPI(res) {
  10040. return new Promise(function (r) {
  10041. console.log('JSAPI res', res);
  10042. wx.chooseWXPay({
  10043. "appId": res.appId,
  10044. "timestamp": res.timeStamp, //时间戳,自1970年以来的秒数
  10045. "nonceStr": res.nonceStr, //随机串
  10046. "package": res.packageValue,
  10047. "signType": res.signType, //微信签名方式:
  10048. "paySign": res.paySign, //微信签名
  10049. success: function success() {
  10050. r({
  10051. code: 0,
  10052. msg: "成功" });
  10053. },
  10054. cancel: function cancel() {
  10055. r({
  10056. code: 1,
  10057. msg: "取消" });
  10058. },
  10059. fail: function fail() {
  10060. r({
  10061. code: 2,
  10062. msg: "失败" });
  10063. } });
  10064. });
  10065. } });exports.default = _default;
  10066. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  10067. /***/ }),
  10068. /***/ 309:
  10069. /*!*******************************************************!*\
  10070. !*** D:/wwwroot/forest/components/uni-icons/icons.js ***!
  10071. \*******************************************************/
  10072. /*! no static exports found */
  10073. /***/ (function(module, exports, __webpack_require__) {
  10074. "use strict";
  10075. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  10076. 'contact': "\uE100",
  10077. 'person': "\uE101",
  10078. 'personadd': "\uE102",
  10079. 'contact-filled': "\uE130",
  10080. 'person-filled': "\uE131",
  10081. 'personadd-filled': "\uE132",
  10082. 'phone': "\uE200",
  10083. 'email': "\uE201",
  10084. 'chatbubble': "\uE202",
  10085. 'chatboxes': "\uE203",
  10086. 'phone-filled': "\uE230",
  10087. 'email-filled': "\uE231",
  10088. 'chatbubble-filled': "\uE232",
  10089. 'chatboxes-filled': "\uE233",
  10090. 'weibo': "\uE260",
  10091. 'weixin': "\uE261",
  10092. 'pengyouquan': "\uE262",
  10093. 'chat': "\uE263",
  10094. 'qq': "\uE264",
  10095. 'videocam': "\uE300",
  10096. 'camera': "\uE301",
  10097. 'mic': "\uE302",
  10098. 'location': "\uE303",
  10099. 'mic-filled': "\uE332",
  10100. 'speech': "\uE332",
  10101. 'location-filled': "\uE333",
  10102. 'micoff': "\uE360",
  10103. 'image': "\uE363",
  10104. 'map': "\uE364",
  10105. 'compose': "\uE400",
  10106. 'trash': "\uE401",
  10107. 'upload': "\uE402",
  10108. 'download': "\uE403",
  10109. 'close': "\uE404",
  10110. 'redo': "\uE405",
  10111. 'undo': "\uE406",
  10112. 'refresh': "\uE407",
  10113. 'star': "\uE408",
  10114. 'plus': "\uE409",
  10115. 'minus': "\uE410",
  10116. 'circle': "\uE411",
  10117. 'checkbox': "\uE411",
  10118. 'close-filled': "\uE434",
  10119. 'clear': "\uE434",
  10120. 'refresh-filled': "\uE437",
  10121. 'star-filled': "\uE438",
  10122. 'plus-filled': "\uE439",
  10123. 'minus-filled': "\uE440",
  10124. 'circle-filled': "\uE441",
  10125. 'checkbox-filled': "\uE442",
  10126. 'closeempty': "\uE460",
  10127. 'refreshempty': "\uE461",
  10128. 'reload': "\uE462",
  10129. 'starhalf': "\uE463",
  10130. 'spinner': "\uE464",
  10131. 'spinner-cycle': "\uE465",
  10132. 'search': "\uE466",
  10133. 'plusempty': "\uE468",
  10134. 'forward': "\uE470",
  10135. 'back': "\uE471",
  10136. 'left-nav': "\uE471",
  10137. 'checkmarkempty': "\uE472",
  10138. 'home': "\uE500",
  10139. 'navigate': "\uE501",
  10140. 'gear': "\uE502",
  10141. 'paperplane': "\uE503",
  10142. 'info': "\uE504",
  10143. 'help': "\uE505",
  10144. 'locked': "\uE506",
  10145. 'more': "\uE507",
  10146. 'flag': "\uE508",
  10147. 'home-filled': "\uE530",
  10148. 'gear-filled': "\uE532",
  10149. 'info-filled': "\uE534",
  10150. 'help-filled': "\uE535",
  10151. 'more-filled': "\uE537",
  10152. 'settings': "\uE560",
  10153. 'list': "\uE562",
  10154. 'bars': "\uE563",
  10155. 'loop': "\uE565",
  10156. 'paperclip': "\uE567",
  10157. 'eye': "\uE568",
  10158. 'arrowup': "\uE580",
  10159. 'arrowdown': "\uE581",
  10160. 'arrowleft': "\uE582",
  10161. 'arrowright': "\uE583",
  10162. 'arrowthinup': "\uE584",
  10163. 'arrowthindown': "\uE585",
  10164. 'arrowthinleft': "\uE586",
  10165. 'arrowthinright': "\uE587",
  10166. 'pulldown': "\uE588",
  10167. 'closefill': "\uE589",
  10168. 'sound': "\uE590",
  10169. 'scan': "\uE612" };exports.default = _default;
  10170. /***/ }),
  10171. /***/ 31:
  10172. /*!**********************************************************!*\
  10173. !*** ./node_modules/@babel/runtime/regenerator/index.js ***!
  10174. \**********************************************************/
  10175. /*! no static exports found */
  10176. /***/ (function(module, exports, __webpack_require__) {
  10177. module.exports = __webpack_require__(/*! regenerator-runtime */ 32);
  10178. /***/ }),
  10179. /***/ 32:
  10180. /*!************************************************************!*\
  10181. !*** ./node_modules/regenerator-runtime/runtime-module.js ***!
  10182. \************************************************************/
  10183. /*! no static exports found */
  10184. /***/ (function(module, exports, __webpack_require__) {
  10185. /**
  10186. * Copyright (c) 2014-present, Facebook, Inc.
  10187. *
  10188. * This source code is licensed under the MIT license found in the
  10189. * LICENSE file in the root directory of this source tree.
  10190. */
  10191. // This method of obtaining a reference to the global object needs to be
  10192. // kept identical to the way it is obtained in runtime.js
  10193. var g = (function() {
  10194. return this || (typeof self === "object" && self);
  10195. })() || Function("return this")();
  10196. // Use `getOwnPropertyNames` because not all browsers support calling
  10197. // `hasOwnProperty` on the global `self` object in a worker. See #183.
  10198. var hadRuntime = g.regeneratorRuntime &&
  10199. Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0;
  10200. // Save the old regeneratorRuntime in case it needs to be restored later.
  10201. var oldRuntime = hadRuntime && g.regeneratorRuntime;
  10202. // Force reevalutation of runtime.js.
  10203. g.regeneratorRuntime = undefined;
  10204. module.exports = __webpack_require__(/*! ./runtime */ 33);
  10205. if (hadRuntime) {
  10206. // Restore the original runtime.
  10207. g.regeneratorRuntime = oldRuntime;
  10208. } else {
  10209. // Remove the global property added by runtime.js.
  10210. try {
  10211. delete g.regeneratorRuntime;
  10212. } catch(e) {
  10213. g.regeneratorRuntime = undefined;
  10214. }
  10215. }
  10216. /***/ }),
  10217. /***/ 33:
  10218. /*!*****************************************************!*\
  10219. !*** ./node_modules/regenerator-runtime/runtime.js ***!
  10220. \*****************************************************/
  10221. /*! no static exports found */
  10222. /***/ (function(module, exports) {
  10223. /**
  10224. * Copyright (c) 2014-present, Facebook, Inc.
  10225. *
  10226. * This source code is licensed under the MIT license found in the
  10227. * LICENSE file in the root directory of this source tree.
  10228. */
  10229. !(function(global) {
  10230. "use strict";
  10231. var Op = Object.prototype;
  10232. var hasOwn = Op.hasOwnProperty;
  10233. var undefined; // More compressible than void 0.
  10234. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  10235. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  10236. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  10237. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  10238. var inModule = typeof module === "object";
  10239. var runtime = global.regeneratorRuntime;
  10240. if (runtime) {
  10241. if (inModule) {
  10242. // If regeneratorRuntime is defined globally and we're in a module,
  10243. // make the exports object identical to regeneratorRuntime.
  10244. module.exports = runtime;
  10245. }
  10246. // Don't bother evaluating the rest of this file if the runtime was
  10247. // already defined globally.
  10248. return;
  10249. }
  10250. // Define the runtime globally (as expected by generated code) as either
  10251. // module.exports (if we're in a module) or a new, empty object.
  10252. runtime = global.regeneratorRuntime = inModule ? module.exports : {};
  10253. function wrap(innerFn, outerFn, self, tryLocsList) {
  10254. // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
  10255. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  10256. var generator = Object.create(protoGenerator.prototype);
  10257. var context = new Context(tryLocsList || []);
  10258. // The ._invoke method unifies the implementations of the .next,
  10259. // .throw, and .return methods.
  10260. generator._invoke = makeInvokeMethod(innerFn, self, context);
  10261. return generator;
  10262. }
  10263. runtime.wrap = wrap;
  10264. // Try/catch helper to minimize deoptimizations. Returns a completion
  10265. // record like context.tryEntries[i].completion. This interface could
  10266. // have been (and was previously) designed to take a closure to be
  10267. // invoked without arguments, but in all the cases we care about we
  10268. // already have an existing method we want to call, so there's no need
  10269. // to create a new function object. We can even get away with assuming
  10270. // the method takes exactly one argument, since that happens to be true
  10271. // in every case, so we don't have to touch the arguments object. The
  10272. // only additional allocation required is the completion record, which
  10273. // has a stable shape and so hopefully should be cheap to allocate.
  10274. function tryCatch(fn, obj, arg) {
  10275. try {
  10276. return { type: "normal", arg: fn.call(obj, arg) };
  10277. } catch (err) {
  10278. return { type: "throw", arg: err };
  10279. }
  10280. }
  10281. var GenStateSuspendedStart = "suspendedStart";
  10282. var GenStateSuspendedYield = "suspendedYield";
  10283. var GenStateExecuting = "executing";
  10284. var GenStateCompleted = "completed";
  10285. // Returning this object from the innerFn has the same effect as
  10286. // breaking out of the dispatch switch statement.
  10287. var ContinueSentinel = {};
  10288. // Dummy constructor functions that we use as the .constructor and
  10289. // .constructor.prototype properties for functions that return Generator
  10290. // objects. For full spec compliance, you may wish to configure your
  10291. // minifier not to mangle the names of these two functions.
  10292. function Generator() {}
  10293. function GeneratorFunction() {}
  10294. function GeneratorFunctionPrototype() {}
  10295. // This is a polyfill for %IteratorPrototype% for environments that
  10296. // don't natively support it.
  10297. var IteratorPrototype = {};
  10298. IteratorPrototype[iteratorSymbol] = function () {
  10299. return this;
  10300. };
  10301. var getProto = Object.getPrototypeOf;
  10302. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  10303. if (NativeIteratorPrototype &&
  10304. NativeIteratorPrototype !== Op &&
  10305. hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  10306. // This environment has a native %IteratorPrototype%; use it instead
  10307. // of the polyfill.
  10308. IteratorPrototype = NativeIteratorPrototype;
  10309. }
  10310. var Gp = GeneratorFunctionPrototype.prototype =
  10311. Generator.prototype = Object.create(IteratorPrototype);
  10312. GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  10313. GeneratorFunctionPrototype.constructor = GeneratorFunction;
  10314. GeneratorFunctionPrototype[toStringTagSymbol] =
  10315. GeneratorFunction.displayName = "GeneratorFunction";
  10316. // Helper for defining the .next, .throw, and .return methods of the
  10317. // Iterator interface in terms of a single ._invoke method.
  10318. function defineIteratorMethods(prototype) {
  10319. ["next", "throw", "return"].forEach(function(method) {
  10320. prototype[method] = function(arg) {
  10321. return this._invoke(method, arg);
  10322. };
  10323. });
  10324. }
  10325. runtime.isGeneratorFunction = function(genFun) {
  10326. var ctor = typeof genFun === "function" && genFun.constructor;
  10327. return ctor
  10328. ? ctor === GeneratorFunction ||
  10329. // For the native GeneratorFunction constructor, the best we can
  10330. // do is to check its .name property.
  10331. (ctor.displayName || ctor.name) === "GeneratorFunction"
  10332. : false;
  10333. };
  10334. runtime.mark = function(genFun) {
  10335. if (Object.setPrototypeOf) {
  10336. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  10337. } else {
  10338. genFun.__proto__ = GeneratorFunctionPrototype;
  10339. if (!(toStringTagSymbol in genFun)) {
  10340. genFun[toStringTagSymbol] = "GeneratorFunction";
  10341. }
  10342. }
  10343. genFun.prototype = Object.create(Gp);
  10344. return genFun;
  10345. };
  10346. // Within the body of any async function, `await x` is transformed to
  10347. // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  10348. // `hasOwn.call(value, "__await")` to determine if the yielded value is
  10349. // meant to be awaited.
  10350. runtime.awrap = function(arg) {
  10351. return { __await: arg };
  10352. };
  10353. function AsyncIterator(generator) {
  10354. function invoke(method, arg, resolve, reject) {
  10355. var record = tryCatch(generator[method], generator, arg);
  10356. if (record.type === "throw") {
  10357. reject(record.arg);
  10358. } else {
  10359. var result = record.arg;
  10360. var value = result.value;
  10361. if (value &&
  10362. typeof value === "object" &&
  10363. hasOwn.call(value, "__await")) {
  10364. return Promise.resolve(value.__await).then(function(value) {
  10365. invoke("next", value, resolve, reject);
  10366. }, function(err) {
  10367. invoke("throw", err, resolve, reject);
  10368. });
  10369. }
  10370. return Promise.resolve(value).then(function(unwrapped) {
  10371. // When a yielded Promise is resolved, its final value becomes
  10372. // the .value of the Promise<{value,done}> result for the
  10373. // current iteration.
  10374. result.value = unwrapped;
  10375. resolve(result);
  10376. }, function(error) {
  10377. // If a rejected Promise was yielded, throw the rejection back
  10378. // into the async generator function so it can be handled there.
  10379. return invoke("throw", error, resolve, reject);
  10380. });
  10381. }
  10382. }
  10383. var previousPromise;
  10384. function enqueue(method, arg) {
  10385. function callInvokeWithMethodAndArg() {
  10386. return new Promise(function(resolve, reject) {
  10387. invoke(method, arg, resolve, reject);
  10388. });
  10389. }
  10390. return previousPromise =
  10391. // If enqueue has been called before, then we want to wait until
  10392. // all previous Promises have been resolved before calling invoke,
  10393. // so that results are always delivered in the correct order. If
  10394. // enqueue has not been called before, then it is important to
  10395. // call invoke immediately, without waiting on a callback to fire,
  10396. // so that the async generator function has the opportunity to do
  10397. // any necessary setup in a predictable way. This predictability
  10398. // is why the Promise constructor synchronously invokes its
  10399. // executor callback, and why async functions synchronously
  10400. // execute code before the first await. Since we implement simple
  10401. // async functions in terms of async generators, it is especially
  10402. // important to get this right, even though it requires care.
  10403. previousPromise ? previousPromise.then(
  10404. callInvokeWithMethodAndArg,
  10405. // Avoid propagating failures to Promises returned by later
  10406. // invocations of the iterator.
  10407. callInvokeWithMethodAndArg
  10408. ) : callInvokeWithMethodAndArg();
  10409. }
  10410. // Define the unified helper method that is used to implement .next,
  10411. // .throw, and .return (see defineIteratorMethods).
  10412. this._invoke = enqueue;
  10413. }
  10414. defineIteratorMethods(AsyncIterator.prototype);
  10415. AsyncIterator.prototype[asyncIteratorSymbol] = function () {
  10416. return this;
  10417. };
  10418. runtime.AsyncIterator = AsyncIterator;
  10419. // Note that simple async functions are implemented on top of
  10420. // AsyncIterator objects; they just return a Promise for the value of
  10421. // the final result produced by the iterator.
  10422. runtime.async = function(innerFn, outerFn, self, tryLocsList) {
  10423. var iter = new AsyncIterator(
  10424. wrap(innerFn, outerFn, self, tryLocsList)
  10425. );
  10426. return runtime.isGeneratorFunction(outerFn)
  10427. ? iter // If outerFn is a generator, return the full iterator.
  10428. : iter.next().then(function(result) {
  10429. return result.done ? result.value : iter.next();
  10430. });
  10431. };
  10432. function makeInvokeMethod(innerFn, self, context) {
  10433. var state = GenStateSuspendedStart;
  10434. return function invoke(method, arg) {
  10435. if (state === GenStateExecuting) {
  10436. throw new Error("Generator is already running");
  10437. }
  10438. if (state === GenStateCompleted) {
  10439. if (method === "throw") {
  10440. throw arg;
  10441. }
  10442. // Be forgiving, per 25.3.3.3.3 of the spec:
  10443. // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
  10444. return doneResult();
  10445. }
  10446. context.method = method;
  10447. context.arg = arg;
  10448. while (true) {
  10449. var delegate = context.delegate;
  10450. if (delegate) {
  10451. var delegateResult = maybeInvokeDelegate(delegate, context);
  10452. if (delegateResult) {
  10453. if (delegateResult === ContinueSentinel) continue;
  10454. return delegateResult;
  10455. }
  10456. }
  10457. if (context.method === "next") {
  10458. // Setting context._sent for legacy support of Babel's
  10459. // function.sent implementation.
  10460. context.sent = context._sent = context.arg;
  10461. } else if (context.method === "throw") {
  10462. if (state === GenStateSuspendedStart) {
  10463. state = GenStateCompleted;
  10464. throw context.arg;
  10465. }
  10466. context.dispatchException(context.arg);
  10467. } else if (context.method === "return") {
  10468. context.abrupt("return", context.arg);
  10469. }
  10470. state = GenStateExecuting;
  10471. var record = tryCatch(innerFn, self, context);
  10472. if (record.type === "normal") {
  10473. // If an exception is thrown from innerFn, we leave state ===
  10474. // GenStateExecuting and loop back for another invocation.
  10475. state = context.done
  10476. ? GenStateCompleted
  10477. : GenStateSuspendedYield;
  10478. if (record.arg === ContinueSentinel) {
  10479. continue;
  10480. }
  10481. return {
  10482. value: record.arg,
  10483. done: context.done
  10484. };
  10485. } else if (record.type === "throw") {
  10486. state = GenStateCompleted;
  10487. // Dispatch the exception by looping back around to the
  10488. // context.dispatchException(context.arg) call above.
  10489. context.method = "throw";
  10490. context.arg = record.arg;
  10491. }
  10492. }
  10493. };
  10494. }
  10495. // Call delegate.iterator[context.method](context.arg) and handle the
  10496. // result, either by returning a { value, done } result from the
  10497. // delegate iterator, or by modifying context.method and context.arg,
  10498. // setting context.delegate to null, and returning the ContinueSentinel.
  10499. function maybeInvokeDelegate(delegate, context) {
  10500. var method = delegate.iterator[context.method];
  10501. if (method === undefined) {
  10502. // A .throw or .return when the delegate iterator has no .throw
  10503. // method always terminates the yield* loop.
  10504. context.delegate = null;
  10505. if (context.method === "throw") {
  10506. if (delegate.iterator.return) {
  10507. // If the delegate iterator has a return method, give it a
  10508. // chance to clean up.
  10509. context.method = "return";
  10510. context.arg = undefined;
  10511. maybeInvokeDelegate(delegate, context);
  10512. if (context.method === "throw") {
  10513. // If maybeInvokeDelegate(context) changed context.method from
  10514. // "return" to "throw", let that override the TypeError below.
  10515. return ContinueSentinel;
  10516. }
  10517. }
  10518. context.method = "throw";
  10519. context.arg = new TypeError(
  10520. "The iterator does not provide a 'throw' method");
  10521. }
  10522. return ContinueSentinel;
  10523. }
  10524. var record = tryCatch(method, delegate.iterator, context.arg);
  10525. if (record.type === "throw") {
  10526. context.method = "throw";
  10527. context.arg = record.arg;
  10528. context.delegate = null;
  10529. return ContinueSentinel;
  10530. }
  10531. var info = record.arg;
  10532. if (! info) {
  10533. context.method = "throw";
  10534. context.arg = new TypeError("iterator result is not an object");
  10535. context.delegate = null;
  10536. return ContinueSentinel;
  10537. }
  10538. if (info.done) {
  10539. // Assign the result of the finished delegate to the temporary
  10540. // variable specified by delegate.resultName (see delegateYield).
  10541. context[delegate.resultName] = info.value;
  10542. // Resume execution at the desired location (see delegateYield).
  10543. context.next = delegate.nextLoc;
  10544. // If context.method was "throw" but the delegate handled the
  10545. // exception, let the outer generator proceed normally. If
  10546. // context.method was "next", forget context.arg since it has been
  10547. // "consumed" by the delegate iterator. If context.method was
  10548. // "return", allow the original .return call to continue in the
  10549. // outer generator.
  10550. if (context.method !== "return") {
  10551. context.method = "next";
  10552. context.arg = undefined;
  10553. }
  10554. } else {
  10555. // Re-yield the result returned by the delegate method.
  10556. return info;
  10557. }
  10558. // The delegate iterator is finished, so forget it and continue with
  10559. // the outer generator.
  10560. context.delegate = null;
  10561. return ContinueSentinel;
  10562. }
  10563. // Define Generator.prototype.{next,throw,return} in terms of the
  10564. // unified ._invoke helper method.
  10565. defineIteratorMethods(Gp);
  10566. Gp[toStringTagSymbol] = "Generator";
  10567. // A Generator should always return itself as the iterator object when the
  10568. // @@iterator function is called on it. Some browsers' implementations of the
  10569. // iterator prototype chain incorrectly implement this, causing the Generator
  10570. // object to not be returned from this call. This ensures that doesn't happen.
  10571. // See https://github.com/facebook/regenerator/issues/274 for more details.
  10572. Gp[iteratorSymbol] = function() {
  10573. return this;
  10574. };
  10575. Gp.toString = function() {
  10576. return "[object Generator]";
  10577. };
  10578. function pushTryEntry(locs) {
  10579. var entry = { tryLoc: locs[0] };
  10580. if (1 in locs) {
  10581. entry.catchLoc = locs[1];
  10582. }
  10583. if (2 in locs) {
  10584. entry.finallyLoc = locs[2];
  10585. entry.afterLoc = locs[3];
  10586. }
  10587. this.tryEntries.push(entry);
  10588. }
  10589. function resetTryEntry(entry) {
  10590. var record = entry.completion || {};
  10591. record.type = "normal";
  10592. delete record.arg;
  10593. entry.completion = record;
  10594. }
  10595. function Context(tryLocsList) {
  10596. // The root entry object (effectively a try statement without a catch
  10597. // or a finally block) gives us a place to store values thrown from
  10598. // locations where there is no enclosing try statement.
  10599. this.tryEntries = [{ tryLoc: "root" }];
  10600. tryLocsList.forEach(pushTryEntry, this);
  10601. this.reset(true);
  10602. }
  10603. runtime.keys = function(object) {
  10604. var keys = [];
  10605. for (var key in object) {
  10606. keys.push(key);
  10607. }
  10608. keys.reverse();
  10609. // Rather than returning an object with a next method, we keep
  10610. // things simple and return the next function itself.
  10611. return function next() {
  10612. while (keys.length) {
  10613. var key = keys.pop();
  10614. if (key in object) {
  10615. next.value = key;
  10616. next.done = false;
  10617. return next;
  10618. }
  10619. }
  10620. // To avoid creating an additional object, we just hang the .value
  10621. // and .done properties off the next function object itself. This
  10622. // also ensures that the minifier will not anonymize the function.
  10623. next.done = true;
  10624. return next;
  10625. };
  10626. };
  10627. function values(iterable) {
  10628. if (iterable) {
  10629. var iteratorMethod = iterable[iteratorSymbol];
  10630. if (iteratorMethod) {
  10631. return iteratorMethod.call(iterable);
  10632. }
  10633. if (typeof iterable.next === "function") {
  10634. return iterable;
  10635. }
  10636. if (!isNaN(iterable.length)) {
  10637. var i = -1, next = function next() {
  10638. while (++i < iterable.length) {
  10639. if (hasOwn.call(iterable, i)) {
  10640. next.value = iterable[i];
  10641. next.done = false;
  10642. return next;
  10643. }
  10644. }
  10645. next.value = undefined;
  10646. next.done = true;
  10647. return next;
  10648. };
  10649. return next.next = next;
  10650. }
  10651. }
  10652. // Return an iterator with no values.
  10653. return { next: doneResult };
  10654. }
  10655. runtime.values = values;
  10656. function doneResult() {
  10657. return { value: undefined, done: true };
  10658. }
  10659. Context.prototype = {
  10660. constructor: Context,
  10661. reset: function(skipTempReset) {
  10662. this.prev = 0;
  10663. this.next = 0;
  10664. // Resetting context._sent for legacy support of Babel's
  10665. // function.sent implementation.
  10666. this.sent = this._sent = undefined;
  10667. this.done = false;
  10668. this.delegate = null;
  10669. this.method = "next";
  10670. this.arg = undefined;
  10671. this.tryEntries.forEach(resetTryEntry);
  10672. if (!skipTempReset) {
  10673. for (var name in this) {
  10674. // Not sure about the optimal order of these conditions:
  10675. if (name.charAt(0) === "t" &&
  10676. hasOwn.call(this, name) &&
  10677. !isNaN(+name.slice(1))) {
  10678. this[name] = undefined;
  10679. }
  10680. }
  10681. }
  10682. },
  10683. stop: function() {
  10684. this.done = true;
  10685. var rootEntry = this.tryEntries[0];
  10686. var rootRecord = rootEntry.completion;
  10687. if (rootRecord.type === "throw") {
  10688. throw rootRecord.arg;
  10689. }
  10690. return this.rval;
  10691. },
  10692. dispatchException: function(exception) {
  10693. if (this.done) {
  10694. throw exception;
  10695. }
  10696. var context = this;
  10697. function handle(loc, caught) {
  10698. record.type = "throw";
  10699. record.arg = exception;
  10700. context.next = loc;
  10701. if (caught) {
  10702. // If the dispatched exception was caught by a catch block,
  10703. // then let that catch block handle the exception normally.
  10704. context.method = "next";
  10705. context.arg = undefined;
  10706. }
  10707. return !! caught;
  10708. }
  10709. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  10710. var entry = this.tryEntries[i];
  10711. var record = entry.completion;
  10712. if (entry.tryLoc === "root") {
  10713. // Exception thrown outside of any try block that could handle
  10714. // it, so set the completion value of the entire function to
  10715. // throw the exception.
  10716. return handle("end");
  10717. }
  10718. if (entry.tryLoc <= this.prev) {
  10719. var hasCatch = hasOwn.call(entry, "catchLoc");
  10720. var hasFinally = hasOwn.call(entry, "finallyLoc");
  10721. if (hasCatch && hasFinally) {
  10722. if (this.prev < entry.catchLoc) {
  10723. return handle(entry.catchLoc, true);
  10724. } else if (this.prev < entry.finallyLoc) {
  10725. return handle(entry.finallyLoc);
  10726. }
  10727. } else if (hasCatch) {
  10728. if (this.prev < entry.catchLoc) {
  10729. return handle(entry.catchLoc, true);
  10730. }
  10731. } else if (hasFinally) {
  10732. if (this.prev < entry.finallyLoc) {
  10733. return handle(entry.finallyLoc);
  10734. }
  10735. } else {
  10736. throw new Error("try statement without catch or finally");
  10737. }
  10738. }
  10739. }
  10740. },
  10741. abrupt: function(type, arg) {
  10742. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  10743. var entry = this.tryEntries[i];
  10744. if (entry.tryLoc <= this.prev &&
  10745. hasOwn.call(entry, "finallyLoc") &&
  10746. this.prev < entry.finallyLoc) {
  10747. var finallyEntry = entry;
  10748. break;
  10749. }
  10750. }
  10751. if (finallyEntry &&
  10752. (type === "break" ||
  10753. type === "continue") &&
  10754. finallyEntry.tryLoc <= arg &&
  10755. arg <= finallyEntry.finallyLoc) {
  10756. // Ignore the finally entry if control is not jumping to a
  10757. // location outside the try/catch block.
  10758. finallyEntry = null;
  10759. }
  10760. var record = finallyEntry ? finallyEntry.completion : {};
  10761. record.type = type;
  10762. record.arg = arg;
  10763. if (finallyEntry) {
  10764. this.method = "next";
  10765. this.next = finallyEntry.finallyLoc;
  10766. return ContinueSentinel;
  10767. }
  10768. return this.complete(record);
  10769. },
  10770. complete: function(record, afterLoc) {
  10771. if (record.type === "throw") {
  10772. throw record.arg;
  10773. }
  10774. if (record.type === "break" ||
  10775. record.type === "continue") {
  10776. this.next = record.arg;
  10777. } else if (record.type === "return") {
  10778. this.rval = this.arg = record.arg;
  10779. this.method = "return";
  10780. this.next = "end";
  10781. } else if (record.type === "normal" && afterLoc) {
  10782. this.next = afterLoc;
  10783. }
  10784. return ContinueSentinel;
  10785. },
  10786. finish: function(finallyLoc) {
  10787. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  10788. var entry = this.tryEntries[i];
  10789. if (entry.finallyLoc === finallyLoc) {
  10790. this.complete(entry.completion, entry.afterLoc);
  10791. resetTryEntry(entry);
  10792. return ContinueSentinel;
  10793. }
  10794. }
  10795. },
  10796. "catch": function(tryLoc) {
  10797. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  10798. var entry = this.tryEntries[i];
  10799. if (entry.tryLoc === tryLoc) {
  10800. var record = entry.completion;
  10801. if (record.type === "throw") {
  10802. var thrown = record.arg;
  10803. resetTryEntry(entry);
  10804. }
  10805. return thrown;
  10806. }
  10807. }
  10808. // The context.catch method must only be called with a location
  10809. // argument that corresponds to a known catch block.
  10810. throw new Error("illegal catch attempt");
  10811. },
  10812. delegateYield: function(iterable, resultName, nextLoc) {
  10813. this.delegate = {
  10814. iterator: values(iterable),
  10815. resultName: resultName,
  10816. nextLoc: nextLoc
  10817. };
  10818. if (this.method === "next") {
  10819. // Deliberately forget the last sent value so that we don't
  10820. // accidentally pass it on to the delegate.
  10821. this.arg = undefined;
  10822. }
  10823. return ContinueSentinel;
  10824. }
  10825. };
  10826. })(
  10827. // In sloppy mode, unbound `this` refers to the global object, fallback to
  10828. // Function constructor if we're in global strict mode. That is sadly a form
  10829. // of indirect eval which violates Content Security Policy.
  10830. (function() {
  10831. return this || (typeof self === "object" && self);
  10832. })() || Function("return this")()
  10833. );
  10834. /***/ }),
  10835. /***/ 34:
  10836. /*!*************************************************!*\
  10837. !*** D:/wwwroot/forest/js_sdk/jweixin-1.4.0.js ***!
  10838. \*************************************************/
  10839. /*! no static exports found */
  10840. /***/ (function(module, exports, __webpack_require__) {
  10841. var __WEBPACK_AMD_DEFINE_RESULT__;function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}!function (e, n) { true ? !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {return n(e);}).call(exports, __webpack_require__, exports, module),
  10842. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : undefined;}(window, function (e, n) {function i(n, i, t) {e.WeixinJSBridge ? WeixinJSBridge.invoke(n, o(i), function (e) {c(n, e, t);}) : u(n, t);}function t(n, i, t) {e.WeixinJSBridge ? WeixinJSBridge.on(n, function (e) {t && t.trigger && t.trigger(e), c(n, e, i);}) : t ? u(n, t) : u(n, i);}function o(e) {return e = e || {}, e.appId = C.appId, e.verifyAppId = C.appId, e.verifySignType = "sha1", e.verifyTimestamp = C.timestamp + "", e.verifyNonceStr = C.nonceStr, e.verifySignature = C.signature, e;}function r(e) {return { timeStamp: e.timestamp + "", nonceStr: e.nonceStr, package: e.package, paySign: e.paySign, signType: e.signType || "SHA1" };}function a(e) {return e.postalCode = e.addressPostalCode, delete e.addressPostalCode, e.provinceName = e.proviceFirstStageName, delete e.proviceFirstStageName, e.cityName = e.addressCitySecondStageName, delete e.addressCitySecondStageName, e.countryName = e.addressCountiesThirdStageName, delete e.addressCountiesThirdStageName, e.detailInfo = e.addressDetailInfo, delete e.addressDetailInfo, e;}function c(e, n, i) {"openEnterpriseChat" == e && (n.errCode = n.err_code), delete n.err_code, delete n.err_desc, delete n.err_detail;var t = n.errMsg;t || (t = n.err_msg, delete n.err_msg, t = s(e, t), n.errMsg = t), (i = i || {})._complete && (i._complete(n), delete i._complete), t = n.errMsg || "", C.debug && !i.isInnerInvoke && alert(JSON.stringify(n));var o = t.indexOf(":");switch (t.substring(o + 1)) {case "ok":i.success && i.success(n);break;case "cancel":i.cancel && i.cancel(n);break;default:i.fail && i.fail(n);}i.complete && i.complete(n);}function s(e, n) {var i = e,t = v[i];t && (i = t);var o = "ok";if (n) {var r = n.indexOf(":");"confirm" == (o = n.substring(r + 1)) && (o = "ok"), "failed" == o && (o = "fail"), -1 != o.indexOf("failed_") && (o = o.substring(7)), -1 != o.indexOf("fail_") && (o = o.substring(5)), "access denied" != (o = (o = o.replace(/_/g, " ")).toLowerCase()) && "no permission to execute" != o || (o = "permission denied"), "config" == i && "function not exist" == o && (o = "ok"), "" == o && (o = "fail");}return n = i + ":" + o;}function d(e) {if (e) {for (var n = 0, i = e.length; n < i; ++n) {var t = e[n],o = h[t];o && (e[n] = o);}return e;}}function u(e, n) {if (!(!C.debug || n && n.isInnerInvoke)) {var i = v[e];i && (e = i), n && n._complete && delete n._complete, console.log('"' + e + '",', n || "");}}function l(e) {if (!(k || w || C.debug || x < "6.0.2" || V.systemType < 0)) {var n = new Image();V.appId = C.appId, V.initTime = A.initEndTime - A.initStartTime, V.preVerifyTime = A.preVerifyEndTime - A.preVerifyStartTime, N.getNetworkType({ isInnerInvoke: !0, success: function success(e) {V.networkType = e.networkType;var i = "https://open.weixin.qq.com/sdk/report?v=" + V.version + "&o=" + V.isPreVerifyOk + "&s=" + V.systemType + "&c=" + V.clientVersion + "&a=" + V.appId + "&n=" + V.networkType + "&i=" + V.initTime + "&p=" + V.preVerifyTime + "&u=" + V.url;n.src = i;} });}}function p() {return new Date().getTime();}function f(n) {T && (e.WeixinJSBridge ? n() : S.addEventListener && S.addEventListener("WeixinJSBridgeReady", n, !1));}function m() {N.invoke || (N.invoke = function (n, i, t) {e.WeixinJSBridge && WeixinJSBridge.invoke(n, o(i), t);}, N.on = function (n, i) {e.WeixinJSBridge && WeixinJSBridge.on(n, i);});}function g(e) {if ("string" == typeof e && e.length > 0) {var n = e.split("?")[0],i = e.split("?")[1];return n += ".html", void 0 !== i ? n + "?" + i : n;}}if (!e.jWeixin) {var _N;var h = { config: "preVerifyJSAPI", onMenuShareTimeline: "menu:share:timeline", onMenuShareAppMessage: "menu:share:appmessage", onMenuShareQQ: "menu:share:qq", onMenuShareWeibo: "menu:share:weiboApp", onMenuShareQZone: "menu:share:QZone", previewImage: "imagePreview", getLocation: "geoLocation", openProductSpecificView: "openProductViewWithPid", addCard: "batchAddCard", openCard: "batchViewCard", chooseWXPay: "getBrandWCPayRequest", openEnterpriseRedPacket: "getRecevieBizHongBaoRequest", startSearchBeacons: "startMonitoringBeacons", stopSearchBeacons: "stopMonitoringBeacons", onSearchBeacons: "onBeaconsInRange", consumeAndShareCard: "consumedShareCard", openAddress: "editAddress" },v = function () {var e = {};for (var n in h) {e[h[n]] = n;}return e;}(),S = e.document,I = S.title,y = navigator.userAgent.toLowerCase(),_ = navigator.platform.toLowerCase(),k = !(!_.match("mac") && !_.match("win")),w = -1 != y.indexOf("wxdebugger"),T = -1 != y.indexOf("micromessenger"),M = -1 != y.indexOf("android"),P = -1 != y.indexOf("iphone") || -1 != y.indexOf("ipad"),x = function () {var e = y.match(/micromessenger\/(\d+\.\d+\.\d+)/) || y.match(/micromessenger\/(\d+\.\d+)/);return e ? e[1] : "";}(),A = { initStartTime: p(), initEndTime: 0, preVerifyStartTime: 0, preVerifyEndTime: 0 },V = { version: 1, appId: "", initTime: 0, preVerifyTime: 0, networkType: "", isPreVerifyOk: 1, systemType: P ? 1 : M ? 2 : -1, clientVersion: x, url: encodeURIComponent(location.href) },C = {},L = { _completes: [] },B = { state: 0, data: {} };f(function () {A.initEndTime = p();});var O = !1,E = [],N = (_N = { config: function config(e) {C = e, u("config", e);var n = !1 !== C.check;f(function () {if (n) i(h.config, { verifyJsApiList: d(C.jsApiList) }, function () {L._complete = function (e) {A.preVerifyEndTime = p(), B.state = 1, B.data = e;}, L.success = function (e) {V.isPreVerifyOk = 0;}, L.fail = function (e) {L._fail ? L._fail(e) : B.state = -1;};var e = L._completes;return e.push(function () {l();}), L.complete = function (n) {for (var i = 0, t = e.length; i < t; ++i) {e[i]();}L._completes = [];}, L;}()), A.preVerifyStartTime = p();else {B.state = 1;for (var e = L._completes, t = 0, o = e.length; t < o; ++t) {e[t]();}L._completes = [];}}), m();}, ready: function ready(e) {0 != B.state ? e() : (L._completes.push(e), !T && C.debug && e());}, error: function error(e) {x < "6.0.2" || (-1 == B.state ? e(B.data) : L._fail = e);}, checkJsApi: function checkJsApi(e) {var n = function n(e) {var n = e.checkResult;for (var i in n) {var t = v[i];t && (n[t] = n[i], delete n[i]);}return e;};i("checkJsApi", { jsApiList: d(e.jsApiList) }, (e._complete = function (e) {if (M) {var i = e.checkResult;i && (e.checkResult = JSON.parse(i));}e = n(e);}, e));}, onMenuShareTimeline: function onMenuShareTimeline(e) {t(h.onMenuShareTimeline, { complete: function complete() {i("shareTimeline", { title: e.title || I, desc: e.title || I, img_url: e.imgUrl || "", link: e.link || location.href, type: e.type || "link", data_url: e.dataUrl || "" }, e);} }, e);}, onMenuShareAppMessage: function onMenuShareAppMessage(e) {t(h.onMenuShareAppMessage, { complete: function complete(n) {"favorite" === n.scene ? i("sendAppMessage", { title: e.title || I, desc: e.desc || "", link: e.link || location.href, img_url: e.imgUrl || "", type: e.type || "link", data_url: e.dataUrl || "" }) : i("sendAppMessage", { title: e.title || I, desc: e.desc || "", link: e.link || location.href, img_url: e.imgUrl || "", type: e.type || "link", data_url: e.dataUrl || "" }, e);} }, e);}, onMenuShareQQ: function onMenuShareQQ(e) {t(h.onMenuShareQQ, { complete: function complete() {i("shareQQ", { title: e.title || I, desc: e.desc || "", img_url: e.imgUrl || "", link: e.link || location.href }, e);} }, e);}, onMenuShareWeibo: function onMenuShareWeibo(e) {t(h.onMenuShareWeibo, { complete: function complete() {i("shareWeiboApp", { title: e.title || I, desc: e.desc || "", img_url: e.imgUrl || "", link: e.link || location.href }, e);} }, e);}, onMenuShareQZone: function onMenuShareQZone(e) {t(h.onMenuShareQZone, { complete: function complete() {i("shareQZone", { title: e.title || I, desc: e.desc || "", img_url: e.imgUrl || "", link: e.link || location.href }, e);} }, e);}, updateTimelineShareData: function updateTimelineShareData(e) {i("updateTimelineShareData", { title: e.title, link: e.link, imgUrl: e.imgUrl }, e);}, updateAppMessageShareData: function updateAppMessageShareData(e) {i("updateAppMessageShareData", { title: e.title, desc: e.desc, link: e.link, imgUrl: e.imgUrl }, e);}, startRecord: function startRecord(e) {i("startRecord", {}, e);}, stopRecord: function stopRecord(e) {i("stopRecord", {}, e);}, onVoiceRecordEnd: function onVoiceRecordEnd(e) {t("onVoiceRecordEnd", e);}, playVoice: function playVoice(e) {i("playVoice", { localId: e.localId }, e);}, pauseVoice: function pauseVoice(e) {i("pauseVoice", { localId: e.localId }, e);}, stopVoice: function stopVoice(e) {i("stopVoice", { localId: e.localId }, e);}, onVoicePlayEnd: function onVoicePlayEnd(e) {t("onVoicePlayEnd", e);}, uploadVoice: function uploadVoice(e) {i("uploadVoice", { localId: e.localId, isShowProgressTips: 0 == e.isShowProgressTips ? 0 : 1 }, e);}, downloadVoice: function downloadVoice(e) {i("downloadVoice", { serverId: e.serverId, isShowProgressTips: 0 == e.isShowProgressTips ? 0 : 1 }, e);}, translateVoice: function translateVoice(e) {i("translateVoice", { localId: e.localId, isShowProgressTips: 0 == e.isShowProgressTips ? 0 : 1 }, e);}, chooseImage: function chooseImage(e) {i("chooseImage", { scene: "1|2", count: e.count || 9, sizeType: e.sizeType || ["original", "compressed"], sourceType: e.sourceType || ["album", "camera"] }, (e._complete = function (e) {if (M) {var n = e.localIds;try {n && (e.localIds = JSON.parse(n));} catch (e) {}}}, e));}, getLocation: function getLocation(e) {}, previewImage: function previewImage(e) {i(h.previewImage, { current: e.current, urls: e.urls }, e);}, uploadImage: function uploadImage(e) {i("uploadImage", { localId: e.localId, isShowProgressTips: 0 == e.isShowProgressTips ? 0 : 1 }, e);}, downloadImage: function downloadImage(e) {i("downloadImage", { serverId: e.serverId, isShowProgressTips: 0 == e.isShowProgressTips ? 0 : 1 }, e);}, getLocalImgData: function getLocalImgData(e) {!1 === O ? (O = !0, i("getLocalImgData", { localId: e.localId }, (e._complete = function (e) {if (O = !1, E.length > 0) {var n = E.shift();wx.getLocalImgData(n);}}, e))) : E.push(e);}, getNetworkType: function getNetworkType(e) {var n = function n(e) {var n = e.errMsg;e.errMsg = "getNetworkType:ok";var i = e.subtype;if (delete e.subtype, i) e.networkType = i;else {var t = n.indexOf(":"),o = n.substring(t + 1);switch (o) {case "wifi":case "edge":case "wwan":e.networkType = o;break;default:e.errMsg = "getNetworkType:fail";}}return e;};i("getNetworkType", {}, (e._complete = function (e) {e = n(e);}, e));}, openLocation: function openLocation(e) {i("openLocation", { latitude: e.latitude, longitude: e.longitude, name: e.name || "", address: e.address || "", scale: e.scale || 28, infoUrl: e.infoUrl || "" }, e);} }, _defineProperty(_N, "getLocation", function getLocation(e) {e = e || {}, i(h.getLocation, { type: e.type || "wgs84" }, (e._complete = function (e) {delete e.type;}, e));}), _defineProperty(_N, "hideOptionMenu", function hideOptionMenu(e) {i("hideOptionMenu", {}, e);}), _defineProperty(_N, "showOptionMenu", function showOptionMenu(e) {i("showOptionMenu", {}, e);}), _defineProperty(_N, "closeWindow", function closeWindow(e) {i("closeWindow", {}, e = e || {});}), _defineProperty(_N, "hideMenuItems", function hideMenuItems(e) {i("hideMenuItems", { menuList: e.menuList }, e);}), _defineProperty(_N, "showMenuItems", function showMenuItems(e) {i("showMenuItems", { menuList: e.menuList }, e);}), _defineProperty(_N, "hideAllNonBaseMenuItem", function hideAllNonBaseMenuItem(e) {i("hideAllNonBaseMenuItem", {}, e);}), _defineProperty(_N, "showAllNonBaseMenuItem", function showAllNonBaseMenuItem(e) {i("showAllNonBaseMenuItem", {}, e);}), _defineProperty(_N, "scanQRCode", function scanQRCode(e) {i("scanQRCode", { needResult: (e = e || {}).needResult || 0, scanType: e.scanType || ["qrCode", "barCode"] }, (e._complete = function (e) {if (P) {var n = e.resultStr;if (n) {var i = JSON.parse(n);e.resultStr = i && i.scan_code && i.scan_code.scan_result;}}}, e));}), _defineProperty(_N, "openAddress", function openAddress(e) {i(h.openAddress, {}, (e._complete = function (e) {e = a(e);}, e));}), _defineProperty(_N, "openProductSpecificView", function openProductSpecificView(e) {i(h.openProductSpecificView, { pid: e.productId, view_type: e.viewType || 0, ext_info: e.extInfo }, e);}), _defineProperty(_N, "addCard", function addCard(e) {for (var n = e.cardList, t = [], o = 0, r = n.length; o < r; ++o) {var a = n[o],c = { card_id: a.cardId, card_ext: a.cardExt };t.push(c);}i(h.addCard, { card_list: t }, (e._complete = function (e) {var n = e.card_list;if (n) {for (var i = 0, t = (n = JSON.parse(n)).length; i < t; ++i) {var o = n[i];o.cardId = o.card_id, o.cardExt = o.card_ext, o.isSuccess = !!o.is_succ, delete o.card_id, delete o.card_ext, delete o.is_succ;}e.cardList = n, delete e.card_list;}}, e));}), _defineProperty(_N, "chooseCard", function chooseCard(e) {i("chooseCard", { app_id: C.appId, location_id: e.shopId || "", sign_type: e.signType || "SHA1", card_id: e.cardId || "", card_type: e.cardType || "", card_sign: e.cardSign, time_stamp: e.timestamp + "", nonce_str: e.nonceStr }, (e._complete = function (e) {e.cardList = e.choose_card_info, delete e.choose_card_info;}, e));}), _defineProperty(_N, "openCard", function openCard(e) {for (var n = e.cardList, t = [], o = 0, r = n.length; o < r; ++o) {var a = n[o],c = { card_id: a.cardId, code: a.code };t.push(c);}i(h.openCard, { card_list: t }, e);}), _defineProperty(_N, "consumeAndShareCard", function consumeAndShareCard(e) {i(h.consumeAndShareCard, { consumedCardId: e.cardId, consumedCode: e.code }, e);}), _defineProperty(_N, "chooseWXPay", function chooseWXPay(e) {i(h.chooseWXPay, r(e), e);}), _defineProperty(_N, "openEnterpriseRedPacket", function openEnterpriseRedPacket(e) {i(h.openEnterpriseRedPacket, r(e), e);}), _defineProperty(_N, "startSearchBeacons", function startSearchBeacons(e) {i(h.startSearchBeacons, { ticket: e.ticket }, e);}), _defineProperty(_N, "stopSearchBeacons", function stopSearchBeacons(e) {i(h.stopSearchBeacons, {}, e);}), _defineProperty(_N, "onSearchBeacons", function onSearchBeacons(e) {t(h.onSearchBeacons, e);}), _defineProperty(_N, "openEnterpriseChat", function openEnterpriseChat(e) {i("openEnterpriseChat", { useridlist: e.userIds, chatname: e.groupName }, e);}), _defineProperty(_N, "launchMiniProgram", function launchMiniProgram(e) {i("launchMiniProgram", { targetAppId: e.targetAppId, path: g(e.path), envVersion: e.envVersion }, e);}), _defineProperty(_N, "miniProgram", { navigateBack: function navigateBack(e) {e = e || {}, f(function () {i("invokeMiniProgramAPI", { name: "navigateBack", arg: { delta: e.delta || 1 } }, e);});}, navigateTo: function navigateTo(e) {f(function () {i("invokeMiniProgramAPI", { name: "navigateTo", arg: { url: e.url } }, e);});}, redirectTo: function redirectTo(e) {f(function () {i("invokeMiniProgramAPI", { name: "redirectTo", arg: { url: e.url } }, e);});}, switchTab: function switchTab(e) {f(function () {i("invokeMiniProgramAPI", { name: "switchTab", arg: { url: e.url } }, e);});}, reLaunch: function reLaunch(e) {f(function () {i("invokeMiniProgramAPI", { name: "reLaunch", arg: { url: e.url } }, e);});}, postMessage: function postMessage(e) {f(function () {i("invokeMiniProgramAPI", { name: "postMessage", arg: e.data || {} }, e);});}, getEnv: function getEnv(n) {f(function () {n({ miniprogram: "miniprogram" === e.__wxjs_environment });});} }), _N),b = 1,R = {};return S.addEventListener("error", function (e) {if (!M) {var n = e.target,i = n.tagName,t = n.src;if (("IMG" == i || "VIDEO" == i || "AUDIO" == i || "SOURCE" == i) && -1 != t.indexOf("wxlocalresource://")) {e.preventDefault(), e.stopPropagation();var o = n["wx-id"];if (o || (o = b++, n["wx-id"] = o), R[o]) return;R[o] = !0, wx.ready(function () {wx.getLocalImgData({ localId: t, success: function success(e) {n.src = e.localData;} });});}}}, !0), S.addEventListener("load", function (e) {if (!M) {var n = e.target,i = n.tagName;n.src;if ("IMG" == i || "VIDEO" == i || "AUDIO" == i || "SOURCE" == i) {var t = n["wx-id"];t && (R[t] = !1);}}}, !0), n && (e.wx = e.jWeixin = N), N;}});
  10843. /***/ }),
  10844. /***/ 35:
  10845. /*!********************************!*\
  10846. !*** D:/wwwroot/forest/pay.js ***!
  10847. \********************************/
  10848. /*! no static exports found */
  10849. /***/ (function(module, exports, __webpack_require__) {
  10850. "use strict";
  10851. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;
  10852. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));
  10853. var _index = _interopRequireDefault(__webpack_require__(/*! @/js_sdk/luch-request/luch-request/index.js */ 15));
  10854. var _config = __webpack_require__(/*! ./config/config.js */ 12);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} /**
  10855. * 订单支付
  10856. */var $http = new _index.default();var _default = { //微信支付
  10857. wxPay: function wxPay() {var _this = this;var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  10858. uni.showLoading({
  10859. title: '支付中' });
  10860. return new Promise(function (r) {
  10861. var token = uni.getStorageSync("token");
  10862. $http.post(_config.config.apiBaseurl + "/app/pay", obj, {
  10863. header: {
  10864. Accept: 'application/json',
  10865. Authorization: 'Bearer ' + token //注意Bearer后面有一空格
  10866. } }).
  10867. then(function (res) {
  10868. console.log('res', res);
  10869. _this.payError(res);
  10870. });
  10871. });
  10872. },
  10873. //支付错误处理
  10874. payError: function payError(res) {
  10875. uni.hideLoading();
  10876. // uni.navigateTo({
  10877. // url: '/pages/usercenter/myorder/myorder',
  10878. // fail:function(err){
  10879. // console.log(err)
  10880. // }
  10881. // });
  10882. // console.log('1',res);
  10883. if (res.code == 623) {
  10884. setTimeout(function (i) {
  10885. new _vue.default().$api.goto("/pages/userCenter/myorder/myorder");
  10886. }, 2000);
  10887. uni.showToast({
  10888. title: res.msg + " 即将跳转到订单页",
  10889. icon: "none",
  10890. duration: 2000 });
  10891. }
  10892. } };exports.default = _default;
  10893. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  10894. /***/ }),
  10895. /***/ 36:
  10896. /*!******************************************!*\
  10897. !*** D:/wwwroot/forest/utils/isTimes.js ***!
  10898. \******************************************/
  10899. /*! no static exports found */
  10900. /***/ (function(module, exports, __webpack_require__) {
  10901. "use strict";
  10902. Object.defineProperty(exports, "__esModule", { value: true });exports.isTime = isTime;function isTime(time1, time2) {
  10903. var time = Date.parse(new Date());
  10904. var date1 = Date.parse(new Date(time1.replace(/-/g, '/')));
  10905. var date2 = Date.parse(new Date(time2.replace(/-/g, '/')));
  10906. if (date1 < time && date2 > time) {
  10907. return true;
  10908. };
  10909. return false;
  10910. }
  10911. /***/ }),
  10912. /***/ 4:
  10913. /*!************************************!*\
  10914. !*** D:/wwwroot/forest/pages.json ***!
  10915. \************************************/
  10916. /*! no static exports found */
  10917. /***/ (function(module, exports) {
  10918. /***/ }),
  10919. /***/ 43:
  10920. /*!********************************************************************!*\
  10921. !*** D:/wwwroot/forest/components/mescroll-uni/mescroll-mixins.js ***!
  10922. \********************************************************************/
  10923. /*! no static exports found */
  10924. /***/ (function(module, exports, __webpack_require__) {
  10925. "use strict";
  10926. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // mescroll-body 和 mescroll-uni 通用
  10927. // import MescrollUni from "./mescroll-uni.vue";
  10928. // import MescrollBody from "./mescroll-body.vue";
  10929. var MescrollMixin = {
  10930. // components: { // 非H5端无法通过mixin注册组件, 只能在main.js中注册全局组件或具体界面中注册
  10931. // MescrollUni,
  10932. // MescrollBody
  10933. // },
  10934. data: function data() {
  10935. return {
  10936. mescroll: null //mescroll实例对象
  10937. };
  10938. },
  10939. // 注册系统自带的下拉刷新 (配置down.native为true时生效, 还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
  10940. onPullDownRefresh: function onPullDownRefresh() {
  10941. this.mescroll && this.mescroll.onPullDownRefresh();
  10942. },
  10943. // 注册列表滚动事件,用于判定在顶部可下拉刷新,在指定位置可显示隐藏回到顶部按钮 (此方法为页面生命周期,无法在子组件中触发, 仅在mescroll-body生效)
  10944. onPageScroll: function onPageScroll(e) {
  10945. this.mescroll && this.mescroll.onPageScroll(e);
  10946. },
  10947. // 注册滚动到底部的事件,用于上拉加载 (此方法为页面生命周期,无法在子组件中触发, 仅在mescroll-body生效)
  10948. onReachBottom: function onReachBottom() {
  10949. this.mescroll && this.mescroll.onReachBottom();
  10950. },
  10951. methods: {
  10952. // mescroll组件初始化的回调,可获取到mescroll对象
  10953. mescrollInit: function mescrollInit(mescroll) {
  10954. this.mescroll = mescroll;
  10955. this.mescrollInitByRef(); // 兼容字节跳动小程序
  10956. },
  10957. // 以ref的方式初始化mescroll对象 (兼容字节跳动小程序: http://www.mescroll.com/qa.html?v=20200107#q26)
  10958. mescrollInitByRef: function mescrollInitByRef() {
  10959. if (!this.mescroll || !this.mescroll.resetUpScroll) {
  10960. var mescrollRef = this.$refs.mescrollRef;
  10961. if (mescrollRef) this.mescroll = mescrollRef.mescroll;
  10962. }
  10963. },
  10964. // 下拉刷新的回调 (mixin默认resetUpScroll)
  10965. downCallback: function downCallback() {var _this = this;
  10966. if (this.mescroll.optUp.use) {
  10967. this.mescroll.resetUpScroll();
  10968. } else {
  10969. setTimeout(function () {
  10970. _this.mescroll.endSuccess();
  10971. }, 500);
  10972. }
  10973. },
  10974. // 上拉加载的回调
  10975. upCallback: function upCallback() {var _this2 = this;
  10976. // mixin默认延时500自动结束加载
  10977. setTimeout(function () {
  10978. _this2.mescroll.endErr();
  10979. }, 500);
  10980. } },
  10981. mounted: function mounted() {
  10982. this.mescrollInitByRef(); // 兼容字节跳动小程序, 避免未设置@init或@init此时未能取到ref的情况
  10983. } };var _default =
  10984. MescrollMixin;exports.default = _default;
  10985. /***/ }),
  10986. /***/ 44:
  10987. /*!***************************************!*\
  10988. !*** D:/wwwroot/forest/utils/util.js ***!
  10989. \***************************************/
  10990. /*! no static exports found */
  10991. /***/ (function(module, exports, __webpack_require__) {
  10992. "use strict";
  10993. Object.defineProperty(exports, "__esModule", { value: true });exports.debounce = debounce; // 防抖
  10994. function debounce(fn, wait) {
  10995. var delay = wait || 200;
  10996. var timer;
  10997. return function () {
  10998. var th = this;
  10999. var args = arguments;
  11000. if (timer) {
  11001. clearTimeout(timer);
  11002. }
  11003. timer = setTimeout(function () {
  11004. timer = null;
  11005. fn.apply(th, args);
  11006. }, delay);
  11007. };
  11008. }
  11009. /***/ }),
  11010. /***/ 61:
  11011. /*!**************************************!*\
  11012. !*** D:/wwwroot/forest/utils/bus.js ***!
  11013. \**************************************/
  11014. /*! no static exports found */
  11015. /***/ (function(module, exports, __webpack_require__) {
  11016. "use strict";
  11017. Object.defineProperty(exports, "__esModule", { value: true });exports.bus = void 0;var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  11018. var bus = new _vue.default({
  11019. data: function data() {
  11020. return {
  11021. // 定义数据
  11022. data: {} };
  11023. },
  11024. created: function created() {var _this = this;
  11025. // 绑定监听
  11026. this.$on('toDetailPage', function (value) {
  11027. _this.data = value.data;
  11028. });
  11029. } });exports.bus = bus;
  11030. /***/ }),
  11031. /***/ 8:
  11032. /*!*****************************************************!*\
  11033. !*** D:/wwwroot/forest/static/iconfont/iconfont.js ***!
  11034. \*****************************************************/
  11035. /*! no static exports found */
  11036. /***/ (function(module, exports) {
  11037. !function (a) {var c,_l,h,t,i,_o,e = '<svg><symbol id="iconhoutui" viewBox="0 0 1024 1024"><path d="M324.172267 512.0016L787.850818 73.122971a43.839863 43.839863 0 0 0 0-60.57581 40.511873 40.511873 0 0 0-58.623817 0L235.788543 479.553701c-8.607973 8.959972-12.287962 20.799935-11.711963 32.447899a43.199865 43.199865 0 0 0 11.743963 32.447899l493.406458 467.00654a40.511873 40.511873 0 0 0 58.623817 0 43.839863 43.839863 0 0 0 0-60.60781L324.172267 512.0016z" fill="#333333" ></path></symbol><symbol id="iconjia" viewBox="0 0 1024 1024"><path d="M512 0a51.2 51.2 0 0 1 51.2 51.2v921.6a51.2 51.2 0 0 1-102.4 0l-0.0512-409.6512L51.2 563.2a51.2 51.2 0 0 1 0-102.4l409.5488-0.0512L460.8 51.2a51.2 51.2 0 0 1 51.2-51.2z m460.8 460.8a51.2 51.2 0 0 1 0 102.4h-256a51.2 51.2 0 0 1 0-102.4h256z" fill="#6BBC6D" ></path></symbol><symbol id="iconjian" viewBox="0 0 9216 1024"><path d="M8777.216 0c281.088 0 438.784 229.376 438.784 512 0 266.24-139.776 484.864-438.784 512H438.784C157.696 1024 0 794.624 0 512 0 245.76 139.776 27.136 438.784 0h8338.432z" fill="#6BBC6D" ></path></symbol><symbol id="icondizhi1" viewBox="0 0 1024 1024"><path d="M511.850667 85.333333h-1.429334c-199.296 0-361.856 161.450667-362.666666 363.008a452.16 452.16 0 0 0 92.181333 258.901334c61.397333 81.706667 154.538667 168.256 243.029333 225.813333a31.786667 31.786667 0 0 0 34.773334-53.248c-82.645333-53.781333-169.6-134.549333-226.922667-210.858667a388.757333 388.757333 0 0 1-79.36-222.805333c0.64-164.138667 134.656-297.28 298.986667-297.28h1.152c164.885333 0.682667 298.453333 135.125333 297.813333 302.72-2.346667 121.962667-78.613333 226.282667-142.229333 292.245333a821.76 821.76 0 0 1-59.712 56.234667 31.786667 31.786667 0 0 0-3.562667 44.842667c11.434667 13.354667 31.509333 14.933333 44.885333 3.52a876.992 876.992 0 0 0 64.32-60.544c71.488-74.154667 157.290667-192.533333 160-335.146667v-3.968c0.768-199.594667-161.301333-362.666667-361.258666-363.434667" fill="#6BBC6D" ></path><path d="M509.973333 313.450667a139.669333 139.669333 0 1 1 0 279.338666 139.669333 139.669333 0 0 1 0-279.338666z m0 64.256a75.413333 75.413333 0 1 0 0 150.826666 75.413333 75.413333 0 0 0 0-150.826666z" fill="#B8E986" ></path></symbol><symbol id="iconfengyunbang" viewBox="0 0 1024 1024"><path d="M659.605333 85.333333h-292.906666c-120.789333 0-196.586667 84.224-196.586667 219.370667V862.506667c0 39.253333 31.146667 71.125333 69.568 71.125333 11.626667 0 23.082667-2.986667 33.322667-8.618667l238.314666-132.138666 277.525334 132.906666c7.509333 3.2 16 3.242667 23.530666 0.085334 7.573333-3.157333 13.568-9.258667 16.725334-16.96a32.170667 32.170667 0 0 0-13.546667-37.418667l-275.669333-131.776a58.88 58.88 0 0 0-57.834667 0l-238.72 131.776a8.96 8.96 0 0 1-8.768 0 9.045333 9.045333 0 0 1-4.053333-7.872V304.704c0.384-99.946667 49.450667-156.864 137.301333-156.864h292.906667c112.746667 0 129.216 93.610667 129.216 149.76v25.450667l-1.088 62.144V712.746667c0 17.173333 13.589333 31.082667 30.378666 31.082666 16.64 0 30.186667-13.696 30.378667-30.72V297.6c0-131.029333-72.490667-212.266667-189.994667-212.266667z" fill="#6BBC6D" ></path><path d="M472.896 323.050667c-8.064 0.298667-15.68 3.84-21.184 9.877333-5.482667 6.058667-8.405333 14.08-8.106667 22.314667 0.384 16.384 13.269333 29.546667 29.290667 29.952h317.034667c0 17.152-0.213333-45.12 0-62.144H472.896z" fill="#B8E986" ></path></symbol><symbol id="icongengduo" viewBox="0 0 1024 1024"><path d="M803.072 541.866667c70.656 0.213333 127.957333 58.517333 128.384 130.666666v127.850667c-0.426667 72.213333-57.664 130.624-128.384 131.072h-125.248c-70.677333-0.426667-127.786667-58.922667-128-131.072v-127.850667c0-72.170667 57.301333-130.666667 128-130.666666h125.226667z m-537.92 0a34.325333 34.325333 0 0 1 32.981333 16.362666 35.904 35.904 0 0 1 0 37.418667 34.325333 34.325333 0 0 1-32.981333 16.362667h-51.413333c-32.832 0-59.477333 27.029333-59.690667 60.522666v126.250667C154.88 832 181.184 858.688 213.717333 859.306667h126.762667a58.666667 58.666667 0 0 0 41.450667-17.578667c11.2-11.370667 17.493333-26.816 17.493333-42.944v-189.589333l-0.085333-0.512a35.562667 35.562667 0 0 1 15.573333-35.669334 33.962667 33.962667 0 0 1 38.677333 1.152c11.434667 8.384 16.746667 23.04 13.376 37.034667v188.8c0 72.384-57.472 131.050667-128.384 131.050667h-124.864c-70.293333-1.493333-126.933333-59.306667-128.384-131.072v-127.445334a132.053333 132.053333 0 0 1 37.632-92.544 126.677333 126.677333 0 0 1 90.752-38.122666h51.434667z m537.92 70.144h-125.248c-32.746667 0-59.306667 27.093333-59.306667 60.522666v128.618667c0.106667 15.786667 6.293333 30.954667 17.258667 42.154667 11.136 11.370667 26.282667 17.706667 42.026667 17.6h125.994666a58.304 58.304 0 0 0 41.301334-17.6 60.778667 60.778667 0 0 0 17.258666-42.922667v-127.850667c0-16.064-6.250667-31.445333-17.365333-42.794666a58.666667 58.666667 0 0 0-41.92-17.728zM338.965333 85.333333c70.826667 0.213333 128.192 58.773333 128.405334 131.072v127.850667a132.053333 132.053333 0 0 1-37.632 92.544 126.677333 126.677333 0 0 1-90.773334 38.122667h-125.226666C143.04 474.709333 85.76 416.426667 85.333333 344.256v-127.850667C85.76 144.192 142.997333 85.76 213.717333 85.333333h125.248z m-125.226666 70.549334a58.666667 58.666667 0 0 0-42.709334 17.28 61.162667 61.162667 0 0 0-17.770666 43.242666v127.850667a61.205333 61.205333 0 0 0 17.344 44.010667 58.666667 58.666667 0 0 0 43.114666 17.706666h125.248a59.093333 59.093333 0 0 0 42.24-18.261333c11.114667-11.584 17.28-27.221333 17.066667-43.456v-127.850667c-0.213333-33.344-26.645333-60.309333-59.306667-60.522666h-125.226666z" fill="#6BBC6D" ></path><path d="M931.072 343.850667v-127.445334c-1.450667-71.616-57.856-129.365333-128-131.072h-125.248a126.698667 126.698667 0 0 0-90.666667 38.4 132.074667 132.074667 0 0 0-37.333333 92.672v189.589334c-0.32 9.301333 3.029333 18.368 9.301333 25.152 6.272 6.762667 14.933333 10.709333 24.064 10.922666 18.986667 0.213333 34.709333-15.104 35.349334-34.474666v-191.189334c0-33.429333 26.538667-60.522667 59.285333-60.522666h125.226667c32.576 0.426667 58.88 27.264 59.306666 60.522666v127.850667c0.213333 16.213333-5.930667 31.872-17.066666 43.456a59.093333 59.093333 0 0 1-42.24 18.282667h-50.24c-17.557333 1.92-30.869333 17.045333-30.869334 35.072 0 18.026667 13.312 33.152 30.869334 35.072h51.84a126.762667 126.762667 0 0 0 90.026666-39.402667 132.138667 132.138667 0 0 0 36.394667-92.885333z" fill="#B8E986" ></path></symbol><symbol id="iconbao3" viewBox="0 0 1024 1024"><path d="M223.175111 180.167111H829.155556v627.228445H223.175111z" fill="#FFFFFF" ></path><path d="M484.039111 308.053333h191.089778v85.390223h-191.089778v-85.361778zM881.208889 126.634667a626.631111 626.631111 0 0 1-25.856 0.455111h-0.056889c-222.293333 0-320.284444-101.859556-321.024-102.712889L512 0l-22.243556 24.348444C488.789333 25.372444 385.450667 134.883556 142.791111 126.577778L111.587556 125.582222v461.937778c0 120.888889 40.391111 297.329778 389.461333 432.298667L512 1024l10.865778-4.181333c349.127111-134.968889 389.546667-311.409778 389.546666-432.327111V125.582222l-31.232 1.024z m-96.341333 553.329777c-10.666667 14.819556-19.313778 27.562667-25.884445 38.200889l-5.802667 9.528889-9.557333-5.774222a413.553778 413.553778 0 0 1-134.371555-129.820444v172.999111h-60.871112v-176.327111c-39.480889 60.956444-87.182222 109.169778-142.136888 143.616l-8.362667 5.205333-6.257778-7.594667a437.532444 437.532444 0 0 0-28.728889-31.288889l-1.877333-1.905777v65.649777H300.657778v-261.006222c-8.760889 14.478222-17.749333 28.359111-26.908445 41.642667l-12.743111 18.488889-7.111111-21.333334a552.732444 552.732444 0 0 0-15.985778-42.268444l-2.360889-5.575111 3.384889-5.034667c46.08-68.807111 82.346667-153.457778 107.832889-251.648l2.901334-11.235555 60.956444 18.119111-3.356444 10.865777a1489.834667 1489.834667 0 0 1-46.279112 128.796445v301.141333l4.408889-2.417778a401.123556 401.123556 0 0 0 136.448-123.022222H373.76v-58.197333h174.592v-48.554667h-64.284444v23.665778h-62.435556v-224.426667H737.564444v220.672h-62.407111v-19.968h-65.905777v48.554667h173.511111v58.197333h-133.518223c30.805333 43.548444 74.894222 78.933333 131.271112 105.329778l12.259555 5.745778-7.907555 10.979555z" fill="#6BBC6D" ></path></symbol><symbol id="iconwodetuandui" viewBox="0 0 1024 1024"><path d="M975.744 653.077333c-13.866667-29.482667-46.912-49.6-97.536-59.797333a455.466667 455.466667 0 0 0-71.146667-10.453333 770.730667 770.730667 0 0 0-131.626666 0 489.088 489.088 0 0 0-72.746667 10.197333c-50.922667 10.453333-83.968 30.016-98.090667 60.330667a90.325333 90.325333 0 0 0 0 76.949333 118.037333 118.037333 0 0 0 82.346667 56.32c8.192 2.688 17.216 0.618667 23.402667-5.44 6.186667-6.037333 8.533333-15.04 6.08-23.36a23.253333 23.253333 0 0 0-17.749334-16.256 77.44 77.44 0 0 1-53.290666-31.36 45.546667 45.546667 0 0 1 0-37.290667c7.466667-15.274667 30.101333-26.816 66.602666-34.858666 21.333333-4.650667 42.986667-7.68 64.768-9.109334a683.050667 683.050667 0 0 1 123.904 0c22.08 1.386667 43.989333 4.522667 65.557334 9.386667 35.712 7.253333 58.624 19.306667 65.813333 34.858667a42.88 42.88 0 0 1 0 36.992c-7.189333 15.296-30.101333 26.816-66.602667 34.858666-21.248 4.650667-42.794667 7.68-64.490666 9.109334a746.666667 746.666667 0 0 1-73.28 2.688c-11.776 1.28-20.693333 11.285333-20.693334 23.189333 0 11.925333 8.917333 21.930667 20.693334 23.189333h8.256c20.778667 0 43.157333 0 69.546666-2.944a456.234667 456.234667 0 0 0 70.890667-10.176c51.413333-10.453333 84.48-30.570667 98.581333-60.074666a91.413333 91.413333 0 0 0 0.810667-76.949334z" fill="#B8E986" ></path><path d="M739.626667 520.362667a162.282667 162.282667 0 0 0 150.144-100.629334 164.032 164.032 0 0 0-35.008-178.026666 161.557333 161.557333 0 0 0-176.896-35.52 163.306667 163.306667 0 0 0-100.245334 150.890666c0 90.069333 72.490667 163.136 162.026667 163.285334z m0-279.936a116.181333 116.181333 0 0 1 107.370666 72.234666 117.418667 117.418667 0 0 1-25.301333 127.424 115.669333 115.669333 0 0 1-126.72 25.173334 116.906667 116.906667 0 0 1-71.530667-108.181334c0-30.997333 12.266667-60.693333 34.048-82.56a115.562667 115.562667 0 0 1 82.133334-34.090666z" fill="#B8E986" ></path><path d="M478.016 613.610667a529.28 529.28 0 0 0-82.688-12.16 895.658667 895.658667 0 0 0-152.96 0c-28.458667 1.834667-56.725333 5.781333-84.565333 11.84-59.136 12.16-97.536 34.901333-113.962667 70.122666a104.96 104.96 0 0 0 0 89.429334 137.173333 137.173333 0 0 0 95.701333 65.429333c9.514667 3.157333 70.890667 14.4 84.565334 15.893333l88.533333 3.413334c24.170667 0 50.176 0 80.853333-3.413334 27.712-1.792 55.253333-5.76 82.346667-11.84 59.776-12.16 98.176-35.52 114.581333-69.802666a106.24 106.24 0 0 0 0.938667-89.429334c-16.106667-34.282667-54.506667-57.642667-113.344-69.482666zM316.992 528.853333a188.586667 188.586667 0 0 0 174.442667-116.906666 190.613333 190.613333 0 0 0-40.682667-206.933334 187.733333 187.733333 0 0 0-205.568-41.258666 189.781333 189.781333 0 0 0-116.48 175.36c0 104.661333 84.245333 189.568 188.288 189.738666z" fill="#6BBC6D" ></path></symbol><symbol id="iconjiahao" viewBox="0 0 1024 1024"><path d="M512 6.334915a48.59661 48.59661 0 0 1 35.562305 14.683119c9.806102 9.77139 14.735186 21.642847 14.735187 35.614373v402.136949h402.154305a48.59661 48.59661 0 0 1 35.544949 14.787254c9.892881 9.788746 14.752542 21.660203 14.752542 35.475526 0 13.971525-4.877017 25.68678-14.752542 35.631728a48.457763 48.457763 0 0 1-35.544949 14.665763H562.297492v402.258441c0 13.971525-4.929085 25.68678-14.752543 35.475525a48.162712 48.162712 0 0 1-35.544949 14.80461c-13.884746 0-25.68678-4.894373-35.562305-14.80461a48.110644 48.110644 0 0 1-14.735187-35.475525V559.329627H59.548203a48.423051 48.423051 0 0 1-35.527593-14.665763 48.457763 48.457763 0 0 1-14.787254-35.631728c0-13.815322 4.911729-25.68678 14.769898-35.475526a48.579254 48.579254 0 0 1 35.527593-14.80461h402.171661V56.615051c0-13.971525 4.929085-25.842983 14.752543-35.614373A48.613966 48.613966 0 0 1 512 6.334915" ></path></symbol><symbol id="iconwodedingdan" viewBox="0 0 1024 1024"><path d="M675.52 85.333333H346.517333C209.493333 85.333333 127.424 168.192 127.424 307.541333v408.64c0 138.986667 82.069333 222.229333 219.093333 222.229334a31.104 31.104 0 0 0 27.456-31.082667c0-15.936-11.818667-29.312-27.456-31.061333-104.704 0-157.802667-53.866667-157.802666-160.085334V307.541333c0-106.197333 53.098667-160.064 157.802666-160.064h329.002667c104.725333 0 157.44 53.866667 157.44 160.064v408.64c0 106.24-52.714667 160.085333-157.44 160.085334h-121.429333a31.104 31.104 0 0 0-27.434667 31.061333c0 15.936 11.818667 29.333333 27.434667 31.082667h121.813333c137.386667 0 219.093333-83.242667 219.093333-222.229334V307.541333C894.592 168.576 812.522667 85.333333 675.498667 85.333333z" fill="#6BBC6D" ></path><path d="M357.290667 723.349333h307.093333c16.810667 0 30.442667-13.824 30.442667-30.890666 0-17.066667-13.632-30.869333-30.442667-30.869334H356.928c-16.832 0-30.464 13.824-30.464 30.869334 0 17.066667 13.653333 30.890667 30.464 30.890666h0.362667z m0-180.416h307.093333a30.677333 30.677333 0 0 0 29.482667-14.464 31.637333 31.637333 0 0 0 0-33.216 30.677333 30.677333 0 0 0-29.482667-14.464H356.928a31.104 31.104 0 0 0-27.456 31.082667c0 15.936 11.84 29.312 27.456 31.061333h0.362667z m0-180.394666h116.970666a31.104 31.104 0 0 0 27.434667-31.082667c0-15.936-11.818667-29.312-27.434667-31.061333h-116.970666a31.104 31.104 0 0 0-27.434667 31.061333c0 15.936 11.818667 29.333333 27.434667 31.082667z" fill="#B8E986" ></path></symbol><symbol id="iconGroup" viewBox="0 0 1462 1024"><path d="M1412.461714 39.68l1.170286 1.170286 2.742857 2.779428a106.971429 106.971429 0 0 1 0.018286 150.125715L640.201143 982.363429a107.300571 107.300571 0 0 1-120.868572 22.436571 107.337143 107.337143 0 0 1-47.140571-27.172571l-1.188571-1.188572-427.922286-434.651428a106.971429 106.971429 0 0 1 0-150.125715l3.328-3.364571a106.971429 106.971429 0 0 1 152.466286 0l360.210285 365.878857L1261.165714 40.868571a106.971429 106.971429 0 0 1 151.296-1.188571z" ></path></symbol><symbol id="iconbangzhu" viewBox="0 0 1024 1024"><path d="M511.402667 85.333333c-199.424-0.149333-372.245333 138.346667-415.786667 333.226667-43.52 194.858667 53.930667 393.856 234.453333 478.762667a425.386667 425.386667 0 0 0 517.738667-124.928c8.042667-14.293333 4.48-32.32-8.362667-42.496a33.237333 33.237333 0 0 0-43.221333 1.706666c-111.914667 144.384-314.432 181.376-470.058667 85.845334C170.538667 721.92 111.616 524.458667 189.376 359.082667c77.781333-165.333333 267.349333-245.653333 440.042667-186.389334 172.693333 59.242667 273.216 239.104 233.322666 417.450667a33.322667 33.322667 0 0 0 41.301334 42.410667 33.28 33.28 0 0 0 22.997333-25.941334 425.92 425.92 0 0 0-55.104-322.816 424.96 424.96 0 0 0-267.84-187.989333A410.709333 410.709333 0 0 0 511.402667 85.333333z" fill="#6BBC6D" ></path><path d="M470.4 734.762667a41.173333 41.173333 0 1 0 82.346667 0 41.173333 41.173333 0 0 0-82.346667 0z" fill="#B8E986" ></path><path d="M518.442667 247.210667c48.64 0 87.210667 13.290667 115.776 39.850666 28.074667 25.557333 42.112 60.885333 42.112 105.984 0 33.578667-9.514667 62.890667-28.586667 87.957334-8.512 10.026667-28.8 29.312-60.885333 57.877333-16.042667 13.525333-27.818667 27.306667-35.328 41.344a103.296 103.296 0 0 0-14.08 47.722667v21.077333a30.165333 30.165333 0 0 1-60.16 3.349333h-0.192v-3.093333-25.152c0-2.432 0.277333-4.8 0.832-7.082667 1.685333-17.621333 5.909333-33.408 12.693333-47.36 10.538667-22.549333 35.84-51.626667 75.946667-87.189333 14.037333-14.037333 22.549333-23.04 25.557333-27.050667 15.04-19.050667 22.549333-38.848 22.549333-59.392 0-29.568-8.533333-52.864-25.557333-69.909333-17.045333-17.536-41.6-26.304-73.685333-26.304-37.589333 0-65.408 12.266667-83.456 36.821333-16.533333 21.056-24.789333 49.856-24.789334 86.442667v1.301333a29.696 29.696 0 0 1-59.413333 0v-10.517333c0-1.557333 0.128-3.072 0.362667-4.544 2.346667-46.677333 17.045333-84.181333 44.010666-112.512 30.08-33.066667 72.170667-49.621333 126.293334-49.621333z" fill="#6BBC6D" ></path></symbol><symbol id="icondianhua" viewBox="0 0 1024 1024"><path d="M150.068966 150.068966h723.862068v723.862068h-723.862068z" fill="#FFFFFF" ></path><path d="M965.349517 144.119172c1.906759-87.746207-50.529103-133.720276-134.779586-132.802206-56.161103 0.617931-254.516966 0.617931-595.032276 0C101.940966 10.416552 101.940966 69.508414 103.000276 146.379034v44.243863H82.97931c-14.900966 0-26.906483 12.164414-26.906482 26.959448v81.125517c0 14.936276 12.129103 26.959448 26.906482 26.959448h20.038621v108.084966H82.97931c-14.900966 0-26.906483 12.164414-26.906482 26.959448v81.125517c0 14.936276 12.129103 26.959448 26.906482 26.959449h20.038621v108.084965H82.97931c-14.900966 0-26.906483 12.164414-26.906482 26.959448v81.125518c0 14.936276 12.129103 26.959448 26.906482 26.959448h20.038621v72.933517c-1.05931 77.929931 18.608552 130.471724 134.779586 132.802207h568.390621c108.649931-2.330483 161.085793-41.736828 159.037793-162.003862V146.361379c0-0.741517 0.052966-1.50069 0.141241-2.242207zM742.470621 769.765517c-22.669241 11.758345-43.643586 20.091586-63.028966 24.982069h-0.918069c-58.827034 0-164.193103-41.101241-271.536552-143.501241-103.38869-106.372414-146.008276-214.333793-141.912275-272.595862 0-0.264828-0.388414-0.918069-0.388414-1.324138 0.653241-19.950345 7.238621-41.613241 19.773793-65.147586 2.507034-4.608 5.543724-8.827586 9.233655-12.535173a53.72469 53.72469 0 0 1 76.235035-0.406069l55.384275 54.978207a54.148414 54.148414 0 0 1 4.872828 71.220966l-15.289379 20.073931c-1.853793 2.771862-3.831172 6.091034-6.338207 9.25131-19.650207 28.813241 20.303448 76.499862 67.654621 124.345379 48.269241 46.909793 96.132414 86.157241 125.157517 66.595311 3.301517-2.507034 6.320552-4.502069 9.233655-6.479449l20.568276-15.465931a53.989517 53.989517 0 0 1 70.814896 5.155311l53.812966 54.713379c3.831172 3.831172 7.026759 8.244966 9.498483 13.064828a54.148414 54.148414 0 0 1-22.828138 73.092413z" fill="#6BBC6D" ></path></symbol><symbol id="iconshangpin" viewBox="0 0 1024 1024"><path d="M615.402667 511.296l-104.341334-104.341333-104.341333 104.341333c-15.466667 15.466667-15.466667 38.656 0 54.101333 15.445333 15.466667 38.634667 15.466667 54.101333 0l11.584-11.584v332.373334c0 21.248 17.386667 38.634667 38.656 38.634666 21.248 0 38.634667-17.386667 38.634667-38.634666V553.813333l11.605333 11.584c7.722667 7.744 17.386667 11.605333 27.050667 11.605334 9.664 0 19.328-3.861333 27.050667-11.605334 15.466667-15.445333 15.466667-38.634667 0-54.101333z" fill="#B8E986" ></path><path d="M279.168 832.064c-3.84 0-7.722667 0-13.525333-1.92C159.36 791.466667 85.930667 689.066667 85.930667 575.061333c0-104.341333 61.845333-200.96 156.522666-243.477333 17.386667-131.413333 131.413333-233.813333 268.586667-233.813333 137.216 0 251.221333 104.341333 268.608 235.733333 94.698667 44.458667 156.522667 139.157333 156.522667 243.498667 0 114.005333-73.429333 214.485333-179.712 253.141333-19.306667 7.722667-42.496-3.861333-48.298667-23.189333-7.722667-19.328 3.861333-42.517333 23.189333-48.32 77.290667-27.050667 129.472-98.56 129.472-179.712 0-81.152-52.181333-152.64-129.493333-179.690667l-27.029333-11.605333v-27.050667c-1.92-102.4-88.896-185.514667-193.237334-185.514667s-191.317333 83.093333-193.237333 185.514667v27.050667l-25.130667 9.664c-77.290667 25.109333-129.472 98.56-129.472 177.770666 0 81.173333 52.181333 152.661333 129.493334 179.712 19.306667 7.744 30.912 28.992 23.168 48.32-5.781333 17.386667-21.248 28.970667-36.693334 28.970667z" fill="#6BBC6D" ></path></symbol><symbol id="iconcaigou" viewBox="0 0 1024 1024"><path d="M342.741333 423.338667h493.824v138.261333H342.741333z" fill="#B8E986" ></path><path d="M915.584 257.408c-21.738667-31.616-59.264-51.349333-98.773333-51.349333H297.301333l-7.893333-37.546667a78.442667 78.442667 0 0 0-77.034667-61.226667H125.44A39.616 39.616 0 0 0 85.952 146.773333c0 21.717333 17.770667 39.509333 39.509333 39.509334h86.912l15.786667 67.157333 90.88 404.928a78.442667 78.442667 0 0 0 77.034667 61.226667h400.981333a39.616 39.616 0 0 0 39.509333-39.488 39.616 39.616 0 0 0-39.509333-39.509334H394.090667l-7.893334-39.509333h375.317334c49.365333 0 94.805333-31.594667 112.576-77.034667l57.301333-154.069333c11.84-39.509333 5.909333-81.002667-15.808-112.597333z m-59.264 82.965333l-59.264 156.053334c-5.930667 15.786667-19.754667 25.664-37.525333 25.664H368.426667l-53.333334-237.013334h501.717334c13.824 0 25.685333 5.909333 33.578666 17.770667 7.893333 11.84 9.877333 25.664 5.930667 37.525333zM402.005333 917.162667a79.253333 79.253333 0 0 1-79.018666-79.018667 79.253333 79.253333 0 0 1 79.018666-79.018667 79.253333 79.253333 0 0 1 78.997334 79.018667 79.253333 79.253333 0 0 1-78.997334 79.018667z m355.541334 0a79.253333 79.253333 0 0 1-78.997334-79.018667 79.253333 79.253333 0 0 1 78.997334-79.018667 79.253333 79.253333 0 0 1 79.018666 79.018667 79.253333 79.253333 0 0 1-79.018666 79.018667z" fill="#6BBC6D" ></path></symbol><symbol id="icondizhi" viewBox="0 0 1024 1024"><path d="M421.461333 476.928a44.864 44.864 0 0 1-44.714666 44.714667h-89.450667a44.864 44.864 0 0 1-44.736-44.714667c0-24.597333 20.138667-44.736 44.736-44.736h89.450667c24.597333 0 44.714667 20.138667 44.714666 44.736z" fill="#B8E986" ></path><path d="M578.005333 298.026667h-134.186666c-73.792 0-134.186667-60.373333-134.186667-134.186667 0-73.792 60.394667-134.165333 134.186667-134.165333h134.186666c73.792 0 134.165333 60.373333 134.165334 134.186666 0 73.792-60.373333 134.165333-134.186667 134.165334z m-134.186666-178.901334a44.864 44.864 0 0 0-44.714667 44.736c0 24.597333 20.117333 44.714667 44.714667 44.714667h134.186666a44.864 44.864 0 0 0 44.714667-44.714667 44.864 44.864 0 0 0-44.714667-44.736h-134.186666z" fill="#6BBC6D" ></path><path d="M801.621333 991.253333H220.202667c-73.813333 0-134.186667-60.373333-134.186667-134.186666v-626.133334c0-73.792 60.373333-134.186667 134.186667-134.186666 24.597333 0 44.736 20.138667 44.736 44.736a44.864 44.864 0 0 1-44.736 44.736 44.864 44.864 0 0 0-44.714667 44.714666v626.133334c0 24.597333 20.117333 44.736 44.714667 44.736h581.418666a44.864 44.864 0 0 0 44.714667-44.736v-626.133334a44.864 44.864 0 0 0-44.714667-44.714666 44.864 44.864 0 0 1-44.736-44.736c0-24.597333 20.138667-44.714667 44.736-44.714667 73.792 0 134.165333 60.373333 134.165334 134.186667v626.133333c0 73.770667-60.373333 134.165333-134.186667 134.165333z" fill="#6BBC6D" ></path><path d="M595.882667 573.077333a44.16 44.16 0 0 1-31.296-13.418666l-84.992-84.970667c-17.877333-17.898667-17.877333-44.736 0-62.613333 17.898667-17.898667 44.736-17.898667 62.613333 0l51.434667 51.413333 107.349333-107.306667c17.877333-17.92 44.714667-17.92 62.613333 0 17.877333 17.877333 17.877333 44.714667 0 62.592l-140.885333 140.885334c-4.48 8.96-15.658667 13.418667-26.837333 13.418666z m-174.421334 172.181334a44.864 44.864 0 0 1-44.714666 44.736h-89.450667a44.864 44.864 0 0 1-44.736-44.736c0-24.597333 20.138667-44.714667 44.736-44.714667h89.450667c24.597333 0 44.714667 20.117333 44.714666 44.714667z m174.421334 96.170666a44.16 44.16 0 0 1-31.296-13.44L479.573333 743.04c-17.877333-17.877333-17.877333-44.714667 0-62.613333 17.898667-17.877333 44.736-17.877333 62.613334 0l51.434666 51.434666 107.349334-107.328c17.877333-17.898667 44.714667-17.898667 62.613333 0 17.877333 17.877333 17.877333 44.714667 0 62.613334l-140.885333 140.885333c-4.48 8.938667-15.658667 13.418667-26.837334 13.418667z" fill="#B8E986" ></path></symbol><symbol id="iconzhaodaimai" viewBox="0 0 1024 1024"><path d="M317.824 279.168c9.664 0 19.328-9.664 19.328-19.328 0-9.642667-9.664-19.306667-19.328-19.306667h-11.605333l25.130666-25.130666a18.688 18.688 0 0 0 0-27.050667 18.688 18.688 0 0 0-27.050666 0l-25.130667 25.130667-25.109333-25.130667a18.688 18.688 0 0 0-27.050667 0 18.688 18.688 0 0 0 0 27.050667l25.109333 25.130666h-11.584c-9.664 0-19.328 9.664-19.328 19.306667 0 9.664 9.664 19.328 19.328 19.328h19.306667v19.328h-19.306667c-9.664 0-19.328 9.664-19.328 19.328s9.664 19.328 19.328 19.328h19.306667v19.306667c0 9.664 9.664 19.328 19.328 19.328s19.328-9.664 19.328-19.328v-19.306667h19.328c9.664 0 19.328-9.664 19.328-19.328s-9.664-19.328-19.328-19.328h-19.328v-19.328h19.328z" fill="#B8E986" ></path><path d="M804.778667 445.354667a182.613333 182.613333 0 0 0 63.786666-139.136c0-100.48-83.114667-183.573333-183.594666-183.573334s-183.573333 83.093333-183.573334 183.573334a182.613333 182.613333 0 0 0 63.786667 139.136c-34.794667 19.328-63.786667 44.437333-86.976 77.290666l-63.786667-65.706666c34.794667-19.306667 57.984-57.962667 57.984-100.48V201.877333c0-63.765333-52.16-115.946667-115.946666-115.946666H201.877333c-63.765333 0-115.946667 52.181333-115.946666 115.946666v154.581334c0 63.786667 52.181333 115.946667 115.946666 115.946666h119.808l123.669334 123.669334c-7.722667 21.269333-11.584 44.458667-11.584 69.568H211.541333a125.354667 125.354667 0 0 0-125.610666 125.610666v19.328a125.354667 125.354667 0 0 0 125.610666 125.589334h599.04a125.354667 125.354667 0 0 0 125.589334-125.589334v-144.938666c0-94.677333-54.101333-177.770667-131.392-220.288zM163.221333 356.48V201.877333c0-21.248 17.408-38.656 38.656-38.656h154.581334c21.269333 0 38.656 17.408 38.656 38.656v154.581334c0 21.269333-17.386667 38.656-38.656 38.656H201.877333a38.762667 38.762667 0 0 1-38.656-38.656z m521.749334-158.442667c57.962667 0 106.282667 48.298667 106.282666 106.282667 0 57.962667-48.32 106.282667-106.282666 106.282667s-106.282667-48.32-106.282667-106.282667c0-57.984 48.32-106.282667 106.282667-106.282667z m0 293.717334a173.184 173.184 0 0 1 173.909333 173.909333H511.061333a173.184 173.184 0 0 1 173.909334-173.909333z m173.909333 318.848a47.829333 47.829333 0 0 1-48.298667 48.298666H211.541333a47.829333 47.829333 0 0 1-48.32-48.298666v-19.328c0-27.050667 21.269333-48.32 48.32-48.32H858.88v67.626666z" fill="#6BBC6D" ></path></symbol><symbol id="iconGroup2" viewBox="0 0 1055 1024"><path d="M430.257343 858.627311C196.19095 858.627311 6.397879 667.842568 6.397879 432.52859 6.397879 197.182622 196.158961 6.397879 430.257343 6.397879c234.130371 0 423.891453 190.784743 423.891453 426.098721 0 235.345968-189.761082 426.130711-423.859464 426.130711z m0-97.983512c180.292222 0 326.419771-146.895295 326.419771-328.115209 0-181.251904-146.12755-328.147199-326.387782-328.147199-180.292222 0-326.419771 146.895295-326.419771 328.147199 0 181.219914 146.12755 328.115209 326.419771 328.115209z" ></path><path d="M872.510708 796.088047l144.52808 145.327815a48.559899 48.559899 0 0 1 0 68.457302l-0.063979 0.063979a48.144037 48.144037 0 0 1-68.265365 0l-144.52808-145.295826a48.559899 48.559899 0 0 1 0-68.457302l0.063978-0.095968a48.144037 48.144037 0 0 1 68.265366 0z" ></path></symbol><symbol id="iconfabu1" viewBox="0 0 1024 1024"><path d="M202.532571 494.153143c16.64 0 30.171429-13.494857 30.171429-30.134857V136.228571c0-1.718857 0.950857-2.413714 1.206857-2.413714h407.04v77.019429c0 36.571429 29.732571 66.304 66.267429 66.304h83.931428v186.88a30.134857 30.134857 0 0 0 60.269715 0V247.003429c0-0.585143 0-1.206857-0.109715-1.828572v-0.438857c0-0.621714-0.109714-1.206857-0.256-1.828571v-0.219429a38.107429 38.107429 0 0 0-2.413714-8.301714v-0.146286c-0.365714-0.621714-0.585143-1.316571-0.950857-1.938286 0 0 0-0.109714-0.109714-0.109714l-0.987429-1.682286c0-0.146286-0.109714-0.146286-0.109714-0.256a14.628571 14.628571 0 0 0-1.206857-1.682285c-0.109714-0.109714-0.109714-0.256-0.219429-0.365715a12.8 12.8 0 0 0-1.206857-1.462857l-0.146286-0.109714-1.462857-1.462857-0.109714-0.109715-150.198857-143.213714-0.146286-0.146286-1.462857-1.316571h-0.073143c-0.512-0.365714-0.987429-0.841143-1.572572-1.206857-0.146286-0.109714-0.256-0.109714-0.365714-0.219429-1.097143-0.841143-2.304-1.462857-3.510857-2.194285 0 0-0.109714 0-0.109714-0.109715a30.354286 30.354286 0 0 0-8.082286-2.779428h-0.256a10.605714 10.605714 0 0 0-2.048-0.219429c-0.585143-0.146286-1.316571-0.146286-1.901714-0.146286H233.910857c-33.901714 0-61.513143 28.086857-61.513143 62.72v327.68c0 16.749714 13.531429 30.244571 30.134857 30.244572z m504.685715-277.284572a6.107429 6.107429 0 0 1-5.997715-6.034285V174.08L746.057143 216.868571h-38.838857z" fill="#999999" ></path><path d="M938.715429 708.388571l-215.698286-169.618285a30.098286 30.098286 0 0 0-10.715429-5.412572c-78.116571-21.101714-261.485714-70.656-276.699428-72.813714-27.721143-4.096-64.621714 16.128-78.848 43.410286-14.957714 28.525714-11.446857 71.972571 23.990857 99.584 4.571429 3.620571 14.811429 11.556571 97.170286 49.664L339.382857 650.971429a30695.350857 30695.350857 0 0 0-129.974857-122.112c-14.226286-12.288-41.837714-15.542857-53.028571-16.384-27.867429-2.048-48.822857 2.742857-62.208 14.555428-16.64 14.628571-23.515429 38.253714-19.675429 68.388572 2.048 16.018286 8.082286 38.948571 18.212571 50.505142 1.097143 1.316571 2.925714 3.291429 210.870858 203.154286 7.350857 7.131429 17.115429 11.081143 27.355428 11.081143h359.168l48.128 57.417143c9.764571 11.702857 23.990857 18.285714 39.168 18.285714h1.206857c15.689143-0.365714 29.988571-7.68 39.533715-20.114286l125.769142-165.156571a30.281143 30.281143 0 0 0-5.193142-42.203429z m-161.572572 161.572572l-49.773714-59.428572a30.134857 30.134857 0 0 0-23.149714-10.715428H339.382857c-66.669714-64.146286-182.052571-175.067429-200.118857-192.658286-3.766857-8.448-6.656-26.697143-4.973714-34.267428 8.923429-1.901714 29.184 0 37.376 3.035428 13.385143 12.544 85.979429 80.749714 134.802285 126.829714 5.449143 5.193143 12.653714 8.045714 20.114286 8.192l296.594286 4.717715a29.988571 29.988571 0 0 0 29.915428-23.771429 30.208 30.208 0 0 0-17.371428-34.011428c-96.329143-42.057143-204.214857-91.721143-218.221714-102.107429-11.812571-9.142857-9.508571-20.48-7.570286-24.137143 2.267429-4.425143 12.434286-10.715429 17.334857-11.410286 19.419429 4.096 167.972571 43.885714 263.204571 69.668572l187.501715 147.456-100.827429 132.608zM300.8 284.745143h299.629714a30.134857 30.134857 0 0 0 0-60.269714H300.8a30.134857 30.134857 0 0 0 0 60.269714z m0 126.829714h422.107429a30.134857 30.134857 0 0 0 0-60.269714H300.8a30.134857 30.134857 0 0 0 0 60.269714z" fill="#999999" ></path></symbol><symbol id="iconhome" viewBox="0 0 1024 1024"><path d="M946.468571 505.014857L534.637714 93.403429a31.926857 31.926857 0 0 0-45.202285 0L77.494857 505.014857a64.073143 64.073143 0 0 0 45.202286 109.312h43.410286v293.668572c0 17.700571 14.262857 32 32 32h249.892571v-224h112.018286v224h265.874285a31.963429 31.963429 0 0 0 32-32v-293.668572h43.410286a64.073143 64.073143 0 0 0 45.202286-109.312z" fill="#65B74E" ></path></symbol><symbol id="iconwode1" viewBox="0 0 1024 1024"><path d="M500.004571 608.621714A267.190857 267.190857 0 0 1 311.076571 152.502857a267.190857 267.190857 0 1 1 377.856 377.856 265.435429 265.435429 0 0 1-188.928 78.262857z m0-477.513143a210.578286 210.578286 0 0 0-210.322285 210.322286 210.578286 210.578286 0 0 0 210.322285 210.322286 210.578286 210.578286 0 0 0 210.322286-210.285714 210.578286 210.578286 0 0 0-210.285714-210.358858z" fill="#999999" ></path><path d="M880.713143 948.553143a28.416 28.416 0 0 1-28.233143-25.234286 354.194286 354.194286 0 0 0-352.475429-314.697143 354.121143 354.121143 0 0 0-352.438857 314.697143 28.416 28.416 0 0 1-56.502857-6.363428 411.574857 411.574857 0 0 1 817.956572 0 28.416 28.416 0 0 1-28.306286 31.597714z m-380.708572-464.932572a353.28 353.28 0 0 1-90.733714-11.849142l-6.4-1.682286a28.416 28.416 0 0 1 14.628572-54.930286l6.363428 1.682286c49.883429 13.238857 102.4 13.238857 152.283429 0l6.4-1.682286a28.416 28.416 0 0 1 14.592 54.930286l-6.4 1.682286a353.353143 353.353143 0 0 1-90.697143 11.849142z" fill="#999999" ></path></symbol><symbol id="iconwode2" viewBox="0 0 1024 1024"><path d="M890.441143 947.565714a28.416 28.416 0 0 1-28.233143-25.234285 354.157714 354.157714 0 0 0-352.475429-314.733715 354.157714 354.157714 0 0 0-352.438857 314.697143 28.416 28.416 0 1 1-56.466285-6.326857 411.574857 411.574857 0 0 1 817.956571 0 28.416 28.416 0 0 1-28.342857 31.597714z" fill="#6BBC6D" ></path><path d="M509.732571 73.252571a267.190857 267.190857 0 1 0 0 534.345143 267.190857 267.190857 0 0 0 0-534.345143z m97.133715 395.812572l-6.4 1.718857a353.755429 353.755429 0 0 1-181.467429 0l-6.363428-1.718857a28.416 28.416 0 1 1 14.592-54.930286l6.363428 1.718857c49.92 13.238857 102.4 13.238857 152.283429 0l6.4-1.718857a28.416 28.416 0 0 1 14.592 54.930286z" fill="#6BBC6D" ></path></symbol><symbol id="iconfabu2" viewBox="0 0 1024 1024"><path d="M202.532571 494.153143c16.64 0 30.171429-13.494857 30.171429-30.134857V136.228571c0-1.718857 0.950857-2.413714 1.206857-2.413714h407.04v77.019429c0 36.571429 29.732571 66.304 66.267429 66.304h83.931428v186.88a30.134857 30.134857 0 0 0 60.269715 0V247.003429c0-0.585143 0-1.206857-0.109715-1.828572v-0.438857c0-0.621714-0.109714-1.206857-0.256-1.828571v-0.219429a38.107429 38.107429 0 0 0-2.413714-8.301714v-0.146286c-0.365714-0.621714-0.585143-1.316571-0.950857-1.938286 0 0 0-0.109714-0.109714-0.109714l-0.987429-1.682286c0-0.146286-0.109714-0.146286-0.109714-0.256a14.628571 14.628571 0 0 0-1.206857-1.682285c-0.109714-0.109714-0.109714-0.256-0.219429-0.365715a12.8 12.8 0 0 0-1.206857-1.462857l-0.146286-0.109714-1.462857-1.462857-0.109714-0.109715-150.198857-143.213714-0.146286-0.146286-1.462857-1.316571h-0.073143c-0.512-0.365714-0.987429-0.841143-1.572572-1.206857-0.146286-0.109714-0.256-0.109714-0.365714-0.219429-1.097143-0.841143-2.304-1.462857-3.510857-2.194285 0 0-0.109714 0-0.109714-0.109715a30.354286 30.354286 0 0 0-8.082286-2.779428h-0.256a10.605714 10.605714 0 0 0-2.048-0.219429c-0.585143-0.146286-1.316571-0.146286-1.901714-0.146286H233.910857c-33.901714 0-61.513143 28.086857-61.513143 62.72v327.68c0 16.749714 13.531429 30.244571 30.134857 30.244572z m504.685715-277.284572a6.107429 6.107429 0 0 1-5.997715-6.034285V174.08L746.057143 216.868571h-38.838857z" fill="#6BBC6D" ></path><path d="M938.715429 708.388571l-215.698286-169.618285a30.098286 30.098286 0 0 0-10.715429-5.412572c-78.116571-21.101714-261.485714-70.656-276.699428-72.813714-27.721143-4.096-64.621714 16.128-78.848 43.410286-14.957714 28.525714-11.446857 71.972571 23.990857 99.584 4.571429 3.620571 14.811429 11.556571 97.170286 49.664L339.382857 650.971429a30695.350857 30695.350857 0 0 0-129.974857-122.112c-14.226286-12.288-41.837714-15.542857-53.028571-16.384-27.867429-2.048-48.822857 2.742857-62.208 14.555428-16.64 14.628571-23.515429 38.253714-19.675429 68.388572 2.048 16.018286 8.082286 38.948571 18.212571 50.505142 1.097143 1.316571 2.925714 3.291429 210.870858 203.154286 7.350857 7.131429 17.115429 11.081143 27.355428 11.081143h359.168l48.128 57.417143c9.764571 11.702857 23.990857 18.285714 39.168 18.285714h1.206857c15.689143-0.365714 29.988571-7.68 39.533715-20.114286l125.769142-165.156571a30.281143 30.281143 0 0 0-5.193142-42.203429zM300.8 284.781714h299.629714a30.134857 30.134857 0 0 0 0-60.269714H300.8a30.134857 30.134857 0 0 0 0 60.269714z m0 126.829715h422.107429a30.134857 30.134857 0 0 0 0-60.269715H300.8a30.134857 30.134857 0 0 0 0 60.269715z" fill="#6BBC6D" ></path></symbol><symbol id="iconhome2" viewBox="0 0 1024 1024"><path d="M770.304 947.638857H245.138286a86.381714 86.381714 0 0 1-86.564572-86.089143v-309.577143H102.582857a28.562286 28.562286 0 0 1-26.331428-17.298285 28.306286 28.306286 0 0 1 5.741714-30.866286L490.569143 82.578286a28.635429 28.635429 0 0 1 41.142857 0l408.576 421.229714c7.972571 8.192 10.24 20.370286 5.741714 30.866286a28.562286 28.562286 0 0 1-26.331428 17.298285H856.868571v309.577143a86.381714 86.381714 0 0 1-86.564571 86.089143zM169.801143 495.140571h17.298286a28.525714 28.525714 0 0 1 28.562285 28.416v337.993143a29.184 29.184 0 0 0 29.44 29.257143h525.165715a29.330286 29.330286 0 0 0 29.403428-29.257143v-337.993143c0-15.725714 12.8-28.416 28.562286-28.416h24.173714l-341.284571-351.890285-341.321143 351.890285z" fill="#999999" ></path><path d="M625.371429 947.638857h-228.571429a28.525714 28.525714 0 0 1-28.525714-28.452571v-283.867429c0-22.162286 18.066286-40.118857 40.301714-40.155428h205.056c22.272 0.036571 40.301714 17.993143 40.338286 40.155428v283.867429a28.525714 28.525714 0 0 1-28.562286 28.452571z m-199.972572-56.868571h171.410286V652.068571h-171.410286v238.738286z" fill="#999999" ></path></symbol></svg>',v = (v = document.getElementsByTagName("script"))[v.length - 1].getAttribute("data-injectcss");if (v && !a.__iconfont__svg__cssinject__) {a.__iconfont__svg__cssinject__ = !0;try {document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>");} catch (a) {console && console.log(a);}}function d() {i || (i = !0, h());}c = function c() {var a, c, l, h;(h = document.createElement("div")).innerHTML = e, e = null, (l = h.getElementsByTagName("svg")[0]) && (l.setAttribute("aria-hidden", "true"), l.style.position = "absolute", l.style.width = 0, l.style.height = 0, l.style.overflow = "hidden", a = l, (c = document.body).firstChild ? (h = a, (l = c.firstChild).parentNode.insertBefore(h, l)) : c.appendChild(a));}, document.addEventListener ? ~["complete", "loaded", "interactive"].indexOf(document.readyState) ? setTimeout(c, 0) : (_l = function l() {document.removeEventListener("DOMContentLoaded", _l, !1), c();}, document.addEventListener("DOMContentLoaded", _l, !1)) : document.attachEvent && (h = c, t = a.document, i = !1, (_o = function o() {try {t.documentElement.doScroll("left");} catch (a) {return void setTimeout(_o, 50);}d();})(), t.onreadystatechange = function () {"complete" == t.readyState && (t.onreadystatechange = null, d());});}(window);
  11038. /***/ })
  11039. }]);
  11040. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map