vendor.js 521 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],{
  2. /***/ 1:
  3. /*!************************************************************!*\
  4. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  5. \************************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. "use strict";
  9. Object.defineProperty(exports, "__esModule", { value: true });exports.createApp = createApp;exports.createComponent = createComponent;exports.createPage = createPage;exports.default = void 0;var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _slicedToArray(arr, i) {return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(arr, i) {if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"] != null) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}function _arrayWithHoles(arr) {if (Array.isArray(arr)) return arr;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toConsumableArray(arr) {return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();}function _nonIterableSpread() {throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o, minLen) {if (!o) return;if (typeof o === "string") return _arrayLikeToArray(o, minLen);var n = Object.prototype.toString.call(o).slice(8, -1);if (n === "Object" && o.constructor) n = o.constructor.name;if (n === "Map" || n === "Set") return Array.from(n);if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);}function _iterableToArray(iter) {if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);}function _arrayWithoutHoles(arr) {if (Array.isArray(arr)) return _arrayLikeToArray(arr);}function _arrayLikeToArray(arr, len) {if (len == null || len > arr.length) len = arr.length;for (var i = 0, arr2 = new Array(len); i < len; i++) {arr2[i] = arr[i];}return arr2;}
  10. var _toString = Object.prototype.toString;
  11. var hasOwnProperty = Object.prototype.hasOwnProperty;
  12. function isFn(fn) {
  13. return typeof fn === 'function';
  14. }
  15. function isStr(str) {
  16. return typeof str === 'string';
  17. }
  18. function isPlainObject(obj) {
  19. return _toString.call(obj) === '[object Object]';
  20. }
  21. function hasOwn(obj, key) {
  22. return hasOwnProperty.call(obj, key);
  23. }
  24. function noop() {}
  25. /**
  26. * Create a cached version of a pure function.
  27. */
  28. function cached(fn) {
  29. var cache = Object.create(null);
  30. return function cachedFn(str) {
  31. var hit = cache[str];
  32. return hit || (cache[str] = fn(str));
  33. };
  34. }
  35. /**
  36. * Camelize a hyphen-delimited string.
  37. */
  38. var camelizeRE = /-(\w)/g;
  39. var camelize = cached(function (str) {
  40. return str.replace(camelizeRE, function (_, c) {return c ? c.toUpperCase() : '';});
  41. });
  42. var HOOKS = [
  43. 'invoke',
  44. 'success',
  45. 'fail',
  46. 'complete',
  47. 'returnValue'];
  48. var globalInterceptors = {};
  49. var scopedInterceptors = {};
  50. function mergeHook(parentVal, childVal) {
  51. var res = childVal ?
  52. parentVal ?
  53. parentVal.concat(childVal) :
  54. Array.isArray(childVal) ?
  55. childVal : [childVal] :
  56. parentVal;
  57. return res ?
  58. dedupeHooks(res) :
  59. res;
  60. }
  61. function dedupeHooks(hooks) {
  62. var res = [];
  63. for (var i = 0; i < hooks.length; i++) {
  64. if (res.indexOf(hooks[i]) === -1) {
  65. res.push(hooks[i]);
  66. }
  67. }
  68. return res;
  69. }
  70. function removeHook(hooks, hook) {
  71. var index = hooks.indexOf(hook);
  72. if (index !== -1) {
  73. hooks.splice(index, 1);
  74. }
  75. }
  76. function mergeInterceptorHook(interceptor, option) {
  77. Object.keys(option).forEach(function (hook) {
  78. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  79. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  80. }
  81. });
  82. }
  83. function removeInterceptorHook(interceptor, option) {
  84. if (!interceptor || !option) {
  85. return;
  86. }
  87. Object.keys(option).forEach(function (hook) {
  88. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  89. removeHook(interceptor[hook], option[hook]);
  90. }
  91. });
  92. }
  93. function addInterceptor(method, option) {
  94. if (typeof method === 'string' && isPlainObject(option)) {
  95. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  96. } else if (isPlainObject(method)) {
  97. mergeInterceptorHook(globalInterceptors, method);
  98. }
  99. }
  100. function removeInterceptor(method, option) {
  101. if (typeof method === 'string') {
  102. if (isPlainObject(option)) {
  103. removeInterceptorHook(scopedInterceptors[method], option);
  104. } else {
  105. delete scopedInterceptors[method];
  106. }
  107. } else if (isPlainObject(method)) {
  108. removeInterceptorHook(globalInterceptors, method);
  109. }
  110. }
  111. function wrapperHook(hook) {
  112. return function (data) {
  113. return hook(data) || data;
  114. };
  115. }
  116. function isPromise(obj) {
  117. return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  118. }
  119. function queue(hooks, data) {
  120. var promise = false;
  121. for (var i = 0; i < hooks.length; i++) {
  122. var hook = hooks[i];
  123. if (promise) {
  124. promise = Promise.then(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. return 1;
  298. } else {
  299. return 0.5;
  300. }
  301. }
  302. return number < 0 ? -result : result;
  303. }
  304. var interceptors = {
  305. promiseInterceptor: promiseInterceptor };
  306. var baseApi = /*#__PURE__*/Object.freeze({
  307. __proto__: null,
  308. upx2px: upx2px,
  309. addInterceptor: addInterceptor,
  310. removeInterceptor: removeInterceptor,
  311. interceptors: interceptors });
  312. var previewImage = {
  313. args: function args(fromArgs) {
  314. var currentIndex = parseInt(fromArgs.current);
  315. if (isNaN(currentIndex)) {
  316. return;
  317. }
  318. var urls = fromArgs.urls;
  319. if (!Array.isArray(urls)) {
  320. return;
  321. }
  322. var len = urls.length;
  323. if (!len) {
  324. return;
  325. }
  326. if (currentIndex < 0) {
  327. currentIndex = 0;
  328. } else if (currentIndex >= len) {
  329. currentIndex = len - 1;
  330. }
  331. if (currentIndex > 0) {
  332. fromArgs.current = urls[currentIndex];
  333. fromArgs.urls = urls.filter(
  334. function (item, index) {return index < currentIndex ? item !== urls[currentIndex] : true;});
  335. } else {
  336. fromArgs.current = urls[0];
  337. }
  338. return {
  339. indicator: false,
  340. loop: false };
  341. } };
  342. function addSafeAreaInsets(result) {
  343. if (result.safeArea) {
  344. var safeArea = result.safeArea;
  345. result.safeAreaInsets = {
  346. top: safeArea.top,
  347. left: safeArea.left,
  348. right: result.windowWidth - safeArea.right,
  349. bottom: result.windowHeight - safeArea.bottom };
  350. }
  351. }
  352. var protocols = {
  353. previewImage: previewImage,
  354. getSystemInfo: {
  355. returnValue: addSafeAreaInsets },
  356. getSystemInfoSync: {
  357. returnValue: addSafeAreaInsets } };
  358. var todos = [
  359. 'vibrate'];
  360. var canIUses = [];
  361. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  362. function processCallback(methodName, method, returnValue) {
  363. return function (res) {
  364. return method(processReturnValue(methodName, res, returnValue));
  365. };
  366. }
  367. 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;
  368. if (isPlainObject(fromArgs)) {// 一般 api 的参数解析
  369. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  370. if (isFn(argsOption)) {
  371. argsOption = argsOption(fromArgs, toArgs) || {};
  372. }
  373. for (var key in fromArgs) {
  374. if (hasOwn(argsOption, key)) {
  375. var keyOption = argsOption[key];
  376. if (isFn(keyOption)) {
  377. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  378. }
  379. if (!keyOption) {// 不支持的参数
  380. console.warn("\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F ".concat(methodName, "\u6682\u4E0D\u652F\u6301").concat(key));
  381. } else if (isStr(keyOption)) {// 重写参数 key
  382. toArgs[keyOption] = fromArgs[key];
  383. } else if (isPlainObject(keyOption)) {// {name:newName,value:value}可重新指定参数 key:value
  384. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  385. }
  386. } else if (CALLBACKS.indexOf(key) !== -1) {
  387. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  388. } else {
  389. if (!keepFromArgs) {
  390. toArgs[key] = fromArgs[key];
  391. }
  392. }
  393. }
  394. return toArgs;
  395. } else if (isFn(fromArgs)) {
  396. fromArgs = processCallback(methodName, fromArgs, returnValue);
  397. }
  398. return fromArgs;
  399. }
  400. function processReturnValue(methodName, res, returnValue) {var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  401. if (isFn(protocols.returnValue)) {// 处理通用 returnValue
  402. res = protocols.returnValue(methodName, res);
  403. }
  404. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  405. }
  406. function wrapper(methodName, method) {
  407. if (hasOwn(protocols, methodName)) {
  408. var protocol = protocols[methodName];
  409. if (!protocol) {// 暂不支持的 api
  410. return function () {
  411. console.error("\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F \u6682\u4E0D\u652F\u6301".concat(methodName));
  412. };
  413. }
  414. return function (arg1, arg2) {// 目前 api 最多两个参数
  415. var options = protocol;
  416. if (isFn(protocol)) {
  417. options = protocol(arg1);
  418. }
  419. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  420. var args = [arg1];
  421. if (typeof arg2 !== 'undefined') {
  422. args.push(arg2);
  423. }
  424. var returnValue = wx[options.name || methodName].apply(wx, args);
  425. if (isSyncApi(methodName)) {// 同步 api
  426. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  427. }
  428. return returnValue;
  429. };
  430. }
  431. return method;
  432. }
  433. var todoApis = Object.create(null);
  434. var TODOS = [
  435. 'onTabBarMidButtonTap',
  436. 'subscribePush',
  437. 'unsubscribePush',
  438. 'onPush',
  439. 'offPush',
  440. 'share'];
  441. function createTodoApi(name) {
  442. return function todoApi(_ref)
  443. {var fail = _ref.fail,complete = _ref.complete;
  444. var res = {
  445. errMsg: "".concat(name, ":fail:\u6682\u4E0D\u652F\u6301 ").concat(name, " \u65B9\u6CD5") };
  446. isFn(fail) && fail(res);
  447. isFn(complete) && complete(res);
  448. };
  449. }
  450. TODOS.forEach(function (name) {
  451. todoApis[name] = createTodoApi(name);
  452. });
  453. var providers = {
  454. oauth: ['weixin'],
  455. share: ['weixin'],
  456. payment: ['wxpay'],
  457. push: ['weixin'] };
  458. function getProvider(_ref2)
  459. {var service = _ref2.service,success = _ref2.success,fail = _ref2.fail,complete = _ref2.complete;
  460. var res = false;
  461. if (providers[service]) {
  462. res = {
  463. errMsg: 'getProvider:ok',
  464. service: service,
  465. provider: providers[service] };
  466. isFn(success) && success(res);
  467. } else {
  468. res = {
  469. errMsg: 'getProvider:fail:服务[' + service + ']不存在' };
  470. isFn(fail) && fail(res);
  471. }
  472. isFn(complete) && complete(res);
  473. }
  474. var extraApi = /*#__PURE__*/Object.freeze({
  475. __proto__: null,
  476. getProvider: getProvider });
  477. var getEmitter = function () {
  478. if (typeof getUniEmitter === 'function') {
  479. /* eslint-disable no-undef */
  480. return getUniEmitter;
  481. }
  482. var Emitter;
  483. return function getUniEmitter() {
  484. if (!Emitter) {
  485. Emitter = new _vue.default();
  486. }
  487. return Emitter;
  488. };
  489. }();
  490. function apply(ctx, method, args) {
  491. return ctx[method].apply(ctx, args);
  492. }
  493. function $on() {
  494. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  495. }
  496. function $off() {
  497. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  498. }
  499. function $once() {
  500. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  501. }
  502. function $emit() {
  503. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  504. }
  505. var eventApi = /*#__PURE__*/Object.freeze({
  506. __proto__: null,
  507. $on: $on,
  508. $off: $off,
  509. $once: $once,
  510. $emit: $emit });
  511. var api = /*#__PURE__*/Object.freeze({
  512. __proto__: null });
  513. var MPPage = Page;
  514. var MPComponent = Component;
  515. var customizeRE = /:/g;
  516. var customize = cached(function (str) {
  517. return camelize(str.replace(customizeRE, '-'));
  518. });
  519. function initTriggerEvent(mpInstance) {
  520. {
  521. if (!wx.canIUse('nextTick')) {
  522. return;
  523. }
  524. }
  525. var oldTriggerEvent = mpInstance.triggerEvent;
  526. mpInstance.triggerEvent = function (event) {for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {args[_key3 - 1] = arguments[_key3];}
  527. return oldTriggerEvent.apply(mpInstance, [customize(event)].concat(args));
  528. };
  529. }
  530. function initHook(name, options) {
  531. var oldHook = options[name];
  532. if (!oldHook) {
  533. options[name] = function () {
  534. initTriggerEvent(this);
  535. };
  536. } else {
  537. options[name] = function () {
  538. initTriggerEvent(this);for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {args[_key4] = arguments[_key4];}
  539. return oldHook.apply(this, args);
  540. };
  541. }
  542. }
  543. Page = function Page() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  544. initHook('onLoad', options);
  545. return MPPage(options);
  546. };
  547. Component = function Component() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  548. initHook('created', options);
  549. return MPComponent(options);
  550. };
  551. var PAGE_EVENT_HOOKS = [
  552. 'onPullDownRefresh',
  553. 'onReachBottom',
  554. 'onShareAppMessage',
  555. 'onPageScroll',
  556. 'onResize',
  557. 'onTabItemTap'];
  558. function initMocks(vm, mocks) {
  559. var mpInstance = vm.$mp[vm.mpType];
  560. mocks.forEach(function (mock) {
  561. if (hasOwn(mpInstance, mock)) {
  562. vm[mock] = mpInstance[mock];
  563. }
  564. });
  565. }
  566. function hasHook(hook, vueOptions) {
  567. if (!vueOptions) {
  568. return true;
  569. }
  570. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  571. return true;
  572. }
  573. vueOptions = vueOptions.default || vueOptions;
  574. if (isFn(vueOptions)) {
  575. if (isFn(vueOptions.extendOptions[hook])) {
  576. return true;
  577. }
  578. if (vueOptions.super &&
  579. vueOptions.super.options &&
  580. Array.isArray(vueOptions.super.options[hook])) {
  581. return true;
  582. }
  583. return false;
  584. }
  585. if (isFn(vueOptions[hook])) {
  586. return true;
  587. }
  588. var mixins = vueOptions.mixins;
  589. if (Array.isArray(mixins)) {
  590. return !!mixins.find(function (mixin) {return hasHook(hook, mixin);});
  591. }
  592. }
  593. function initHooks(mpOptions, hooks, vueOptions) {
  594. hooks.forEach(function (hook) {
  595. if (hasHook(hook, vueOptions)) {
  596. mpOptions[hook] = function (args) {
  597. return this.$vm && this.$vm.__call_hook(hook, args);
  598. };
  599. }
  600. });
  601. }
  602. function initVueComponent(Vue, vueOptions) {
  603. vueOptions = vueOptions.default || vueOptions;
  604. var VueComponent;
  605. if (isFn(vueOptions)) {
  606. VueComponent = vueOptions;
  607. } else {
  608. VueComponent = Vue.extend(vueOptions);
  609. }
  610. vueOptions = VueComponent.options;
  611. return [VueComponent, vueOptions];
  612. }
  613. function initSlots(vm, vueSlots) {
  614. if (Array.isArray(vueSlots) && vueSlots.length) {
  615. var $slots = Object.create(null);
  616. vueSlots.forEach(function (slotName) {
  617. $slots[slotName] = true;
  618. });
  619. vm.$scopedSlots = vm.$slots = $slots;
  620. }
  621. }
  622. function initVueIds(vueIds, mpInstance) {
  623. vueIds = (vueIds || '').split(',');
  624. var len = vueIds.length;
  625. if (len === 1) {
  626. mpInstance._$vueId = vueIds[0];
  627. } else if (len === 2) {
  628. mpInstance._$vueId = vueIds[0];
  629. mpInstance._$vuePid = vueIds[1];
  630. }
  631. }
  632. function initData(vueOptions, context) {
  633. var data = vueOptions.data || {};
  634. var methods = vueOptions.methods || {};
  635. if (typeof data === 'function') {
  636. try {
  637. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  638. } catch (e) {
  639. if (Object({"VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  640. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  641. }
  642. }
  643. } else {
  644. try {
  645. // 对 data 格式化
  646. data = JSON.parse(JSON.stringify(data));
  647. } catch (e) {}
  648. }
  649. if (!isPlainObject(data)) {
  650. data = {};
  651. }
  652. Object.keys(methods).forEach(function (methodName) {
  653. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  654. data[methodName] = methods[methodName];
  655. }
  656. });
  657. return data;
  658. }
  659. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  660. function createObserver(name) {
  661. return function observer(newVal, oldVal) {
  662. if (this.$vm) {
  663. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  664. }
  665. };
  666. }
  667. function initBehaviors(vueOptions, initBehavior) {
  668. var vueBehaviors = vueOptions.behaviors;
  669. var vueExtends = vueOptions.extends;
  670. var vueMixins = vueOptions.mixins;
  671. var vueProps = vueOptions.props;
  672. if (!vueProps) {
  673. vueOptions.props = vueProps = [];
  674. }
  675. var behaviors = [];
  676. if (Array.isArray(vueBehaviors)) {
  677. vueBehaviors.forEach(function (behavior) {
  678. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  679. if (behavior === 'uni://form-field') {
  680. if (Array.isArray(vueProps)) {
  681. vueProps.push('name');
  682. vueProps.push('value');
  683. } else {
  684. vueProps.name = {
  685. type: String,
  686. default: '' };
  687. vueProps.value = {
  688. type: [String, Number, Boolean, Array, Object, Date],
  689. default: '' };
  690. }
  691. }
  692. });
  693. }
  694. if (isPlainObject(vueExtends) && vueExtends.props) {
  695. behaviors.push(
  696. initBehavior({
  697. properties: initProperties(vueExtends.props, true) }));
  698. }
  699. if (Array.isArray(vueMixins)) {
  700. vueMixins.forEach(function (vueMixin) {
  701. if (isPlainObject(vueMixin) && vueMixin.props) {
  702. behaviors.push(
  703. initBehavior({
  704. properties: initProperties(vueMixin.props, true) }));
  705. }
  706. });
  707. }
  708. return behaviors;
  709. }
  710. function parsePropType(key, type, defaultValue, file) {
  711. // [String]=>String
  712. if (Array.isArray(type) && type.length === 1) {
  713. return type[0];
  714. }
  715. return type;
  716. }
  717. function initProperties(props) {var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  718. var properties = {};
  719. if (!isBehavior) {
  720. properties.vueId = {
  721. type: String,
  722. value: '' };
  723. properties.vueSlots = { // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  724. type: null,
  725. value: [],
  726. observer: function observer(newVal, oldVal) {
  727. var $slots = Object.create(null);
  728. newVal.forEach(function (slotName) {
  729. $slots[slotName] = true;
  730. });
  731. this.setData({
  732. $slots: $slots });
  733. } };
  734. }
  735. if (Array.isArray(props)) {// ['title']
  736. props.forEach(function (key) {
  737. properties[key] = {
  738. type: null,
  739. observer: createObserver(key) };
  740. });
  741. } else if (isPlainObject(props)) {// {title:{type:String,default:''},content:String}
  742. Object.keys(props).forEach(function (key) {
  743. var opts = props[key];
  744. if (isPlainObject(opts)) {// title:{type:String,default:''}
  745. var value = opts.default;
  746. if (isFn(value)) {
  747. value = value();
  748. }
  749. opts.type = parsePropType(key, opts.type);
  750. properties[key] = {
  751. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  752. value: value,
  753. observer: createObserver(key) };
  754. } else {// content:String
  755. var type = parsePropType(key, opts);
  756. properties[key] = {
  757. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  758. observer: createObserver(key) };
  759. }
  760. });
  761. }
  762. return properties;
  763. }
  764. function wrapper$1(event) {
  765. // TODO 又得兼容 mpvue 的 mp 对象
  766. try {
  767. event.mp = JSON.parse(JSON.stringify(event));
  768. } catch (e) {}
  769. event.stopPropagation = noop;
  770. event.preventDefault = noop;
  771. event.target = event.target || {};
  772. if (!hasOwn(event, 'detail')) {
  773. event.detail = {};
  774. }
  775. if (hasOwn(event, 'markerId')) {
  776. event.detail = typeof event.detail === 'object' ? event.detail : {};
  777. event.detail.markerId = event.markerId;
  778. }
  779. if (isPlainObject(event.detail)) {
  780. event.target = Object.assign({}, event.target, event.detail);
  781. }
  782. return event;
  783. }
  784. function getExtraValue(vm, dataPathsArray) {
  785. var context = vm;
  786. dataPathsArray.forEach(function (dataPathArray) {
  787. var dataPath = dataPathArray[0];
  788. var value = dataPathArray[2];
  789. if (dataPath || typeof value !== 'undefined') {// ['','',index,'disable']
  790. var propPath = dataPathArray[1];
  791. var valuePath = dataPathArray[3];
  792. var vFor = dataPath ? vm.__get_value(dataPath, context) : context;
  793. if (Number.isInteger(vFor)) {
  794. context = value;
  795. } else if (!propPath) {
  796. context = vFor[value];
  797. } else {
  798. if (Array.isArray(vFor)) {
  799. context = vFor.find(function (vForItem) {
  800. return vm.__get_value(propPath, vForItem) === value;
  801. });
  802. } else if (isPlainObject(vFor)) {
  803. context = Object.keys(vFor).find(function (vForKey) {
  804. return vm.__get_value(propPath, vFor[vForKey]) === value;
  805. });
  806. } else {
  807. console.error('v-for 暂不支持循环数据:', vFor);
  808. }
  809. }
  810. if (valuePath) {
  811. context = vm.__get_value(valuePath, context);
  812. }
  813. }
  814. });
  815. return context;
  816. }
  817. function processEventExtra(vm, extra, event) {
  818. var extraObj = {};
  819. if (Array.isArray(extra) && extra.length) {
  820. /**
  821. *[
  822. * ['data.items', 'data.id', item.data.id],
  823. * ['metas', 'id', meta.id]
  824. *],
  825. *[
  826. * ['data.items', 'data.id', item.data.id],
  827. * ['metas', 'id', meta.id]
  828. *],
  829. *'test'
  830. */
  831. extra.forEach(function (dataPath, index) {
  832. if (typeof dataPath === 'string') {
  833. if (!dataPath) {// model,prop.sync
  834. extraObj['$' + index] = vm;
  835. } else {
  836. if (dataPath === '$event') {// $event
  837. extraObj['$' + index] = event;
  838. } else if (dataPath.indexOf('$event.') === 0) {// $event.target.value
  839. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  840. } else {
  841. extraObj['$' + index] = vm.__get_value(dataPath);
  842. }
  843. }
  844. } else {
  845. extraObj['$' + index] = getExtraValue(vm, dataPath);
  846. }
  847. });
  848. }
  849. return extraObj;
  850. }
  851. function getObjByArray(arr) {
  852. var obj = {};
  853. for (var i = 1; i < arr.length; i++) {
  854. var element = arr[i];
  855. obj[element[0]] = element[1];
  856. }
  857. return obj;
  858. }
  859. 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;
  860. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  861. if (isCustom) {// 自定义事件
  862. isCustomMPEvent = event.currentTarget &&
  863. event.currentTarget.dataset &&
  864. event.currentTarget.dataset.comType === 'wx';
  865. if (!args.length) {// 无参数,直接传入 event 或 detail 数组
  866. if (isCustomMPEvent) {
  867. return [event];
  868. }
  869. return event.detail.__args__ || event.detail;
  870. }
  871. }
  872. var extraObj = processEventExtra(vm, extra, event);
  873. var ret = [];
  874. args.forEach(function (arg) {
  875. if (arg === '$event') {
  876. if (methodName === '__set_model' && !isCustom) {// input v-model value
  877. ret.push(event.target.value);
  878. } else {
  879. if (isCustom && !isCustomMPEvent) {
  880. ret.push(event.detail.__args__[0]);
  881. } else {// wxcomponent 组件或内置组件
  882. ret.push(event);
  883. }
  884. }
  885. } else {
  886. if (Array.isArray(arg) && arg[0] === 'o') {
  887. ret.push(getObjByArray(arg));
  888. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  889. ret.push(extraObj[arg]);
  890. } else {
  891. ret.push(arg);
  892. }
  893. }
  894. });
  895. return ret;
  896. }
  897. var ONCE = '~';
  898. var CUSTOM = '^';
  899. function isMatchEventType(eventType, optType) {
  900. return eventType === optType ||
  901. optType === 'regionchange' && (
  902. eventType === 'begin' ||
  903. eventType === 'end');
  904. }
  905. function handleEvent(event) {var _this = this;
  906. event = wrapper$1(event);
  907. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  908. var dataset = (event.currentTarget || event.target).dataset;
  909. if (!dataset) {
  910. return console.warn('事件信息不存在');
  911. }
  912. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  913. if (!eventOpts) {
  914. return console.warn('事件信息不存在');
  915. }
  916. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  917. var eventType = event.type;
  918. var ret = [];
  919. eventOpts.forEach(function (eventOpt) {
  920. var type = eventOpt[0];
  921. var eventsArray = eventOpt[1];
  922. var isCustom = type.charAt(0) === CUSTOM;
  923. type = isCustom ? type.slice(1) : type;
  924. var isOnce = type.charAt(0) === ONCE;
  925. type = isOnce ? type.slice(1) : type;
  926. if (eventsArray && isMatchEventType(eventType, type)) {
  927. eventsArray.forEach(function (eventArray) {
  928. var methodName = eventArray[0];
  929. if (methodName) {
  930. var handlerCtx = _this.$vm;
  931. if (
  932. handlerCtx.$options.generic &&
  933. handlerCtx.$parent &&
  934. handlerCtx.$parent.$parent)
  935. {// mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  936. handlerCtx = handlerCtx.$parent.$parent;
  937. }
  938. if (methodName === '$emit') {
  939. handlerCtx.$emit.apply(handlerCtx,
  940. processEventArgs(
  941. _this.$vm,
  942. event,
  943. eventArray[1],
  944. eventArray[2],
  945. isCustom,
  946. methodName));
  947. return;
  948. }
  949. var handler = handlerCtx[methodName];
  950. if (!isFn(handler)) {
  951. throw new Error(" _vm.".concat(methodName, " is not a function"));
  952. }
  953. if (isOnce) {
  954. if (handler.once) {
  955. return;
  956. }
  957. handler.once = true;
  958. }
  959. ret.push(handler.apply(handlerCtx, processEventArgs(
  960. _this.$vm,
  961. event,
  962. eventArray[1],
  963. eventArray[2],
  964. isCustom,
  965. methodName)));
  966. }
  967. });
  968. }
  969. });
  970. if (
  971. eventType === 'input' &&
  972. ret.length === 1 &&
  973. typeof ret[0] !== 'undefined')
  974. {
  975. return ret[0];
  976. }
  977. }
  978. var hooks = [
  979. 'onShow',
  980. 'onHide',
  981. 'onError',
  982. 'onPageNotFound'];
  983. function parseBaseApp(vm, _ref3)
  984. {var mocks = _ref3.mocks,initRefs = _ref3.initRefs;
  985. if (vm.$options.store) {
  986. _vue.default.prototype.$store = vm.$options.store;
  987. }
  988. _vue.default.prototype.mpHost = "mp-weixin";
  989. _vue.default.mixin({
  990. beforeCreate: function beforeCreate() {
  991. if (!this.$options.mpType) {
  992. return;
  993. }
  994. this.mpType = this.$options.mpType;
  995. this.$mp = _defineProperty({
  996. data: {} },
  997. this.mpType, this.$options.mpInstance);
  998. this.$scope = this.$options.mpInstance;
  999. delete this.$options.mpType;
  1000. delete this.$options.mpInstance;
  1001. if (this.mpType !== 'app') {
  1002. initRefs(this);
  1003. initMocks(this, mocks);
  1004. }
  1005. } });
  1006. var appOptions = {
  1007. onLaunch: function onLaunch(args) {
  1008. if (this.$vm) {// 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  1009. return;
  1010. }
  1011. {
  1012. if (!wx.canIUse('nextTick')) {// 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  1013. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  1014. }
  1015. }
  1016. this.$vm = vm;
  1017. this.$vm.$mp = {
  1018. app: this };
  1019. this.$vm.$scope = this;
  1020. // vm 上也挂载 globalData
  1021. this.$vm.globalData = this.globalData;
  1022. this.$vm._isMounted = true;
  1023. this.$vm.__call_hook('mounted', args);
  1024. this.$vm.__call_hook('onLaunch', args);
  1025. } };
  1026. // 兼容旧版本 globalData
  1027. appOptions.globalData = vm.$options.globalData || {};
  1028. // 将 methods 中的方法挂在 getApp() 中
  1029. var methods = vm.$options.methods;
  1030. if (methods) {
  1031. Object.keys(methods).forEach(function (name) {
  1032. appOptions[name] = methods[name];
  1033. });
  1034. }
  1035. initHooks(appOptions, hooks);
  1036. return appOptions;
  1037. }
  1038. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1039. function findVmByVueId(vm, vuePid) {
  1040. var $children = vm.$children;
  1041. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1042. for (var i = $children.length - 1; i >= 0; i--) {
  1043. var childVm = $children[i];
  1044. if (childVm.$scope._$vueId === vuePid) {
  1045. return childVm;
  1046. }
  1047. }
  1048. // 反向递归查找
  1049. var parentVm;
  1050. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1051. parentVm = findVmByVueId($children[_i], vuePid);
  1052. if (parentVm) {
  1053. return parentVm;
  1054. }
  1055. }
  1056. }
  1057. function initBehavior(options) {
  1058. return Behavior(options);
  1059. }
  1060. function isPage() {
  1061. return !!this.route;
  1062. }
  1063. function initRelation(detail) {
  1064. this.triggerEvent('__l', detail);
  1065. }
  1066. function initRefs(vm) {
  1067. var mpInstance = vm.$scope;
  1068. Object.defineProperty(vm, '$refs', {
  1069. get: function get() {
  1070. var $refs = {};
  1071. var components = mpInstance.selectAllComponents('.vue-ref');
  1072. components.forEach(function (component) {
  1073. var ref = component.dataset.ref;
  1074. $refs[ref] = component.$vm || component;
  1075. });
  1076. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for');
  1077. forComponents.forEach(function (component) {
  1078. var ref = component.dataset.ref;
  1079. if (!$refs[ref]) {
  1080. $refs[ref] = [];
  1081. }
  1082. $refs[ref].push(component.$vm || component);
  1083. });
  1084. return $refs;
  1085. } });
  1086. }
  1087. function handleLink(event) {var _ref4 =
  1088. event.detail || event.value,vuePid = _ref4.vuePid,vueOptions = _ref4.vueOptions; // detail 是微信,value 是百度(dipatch)
  1089. var parentVm;
  1090. if (vuePid) {
  1091. parentVm = findVmByVueId(this.$vm, vuePid);
  1092. }
  1093. if (!parentVm) {
  1094. parentVm = this.$vm;
  1095. }
  1096. vueOptions.parent = parentVm;
  1097. }
  1098. function parseApp(vm) {
  1099. return parseBaseApp(vm, {
  1100. mocks: mocks,
  1101. initRefs: initRefs });
  1102. }
  1103. function createApp(vm) {
  1104. App(parseApp(vm));
  1105. return vm;
  1106. }
  1107. function parseBaseComponent(vueComponentOptions)
  1108. {var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},isPage = _ref5.isPage,initRelation = _ref5.initRelation;var _initVueComponent =
  1109. initVueComponent(_vue.default, vueComponentOptions),_initVueComponent2 = _slicedToArray(_initVueComponent, 2),VueComponent = _initVueComponent2[0],vueOptions = _initVueComponent2[1];
  1110. var options = _objectSpread({
  1111. multipleSlots: true,
  1112. addGlobalClass: true },
  1113. vueOptions.options || {});
  1114. {
  1115. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  1116. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  1117. Object.assign(options, vueOptions['mp-weixin'].options);
  1118. }
  1119. }
  1120. var componentOptions = {
  1121. options: options,
  1122. data: initData(vueOptions, _vue.default.prototype),
  1123. behaviors: initBehaviors(vueOptions, initBehavior),
  1124. properties: initProperties(vueOptions.props, false, vueOptions.__file),
  1125. lifetimes: {
  1126. attached: function attached() {
  1127. var properties = this.properties;
  1128. var options = {
  1129. mpType: isPage.call(this) ? 'page' : 'component',
  1130. mpInstance: this,
  1131. propsData: properties };
  1132. initVueIds(properties.vueId, this);
  1133. // 处理父子关系
  1134. initRelation.call(this, {
  1135. vuePid: this._$vuePid,
  1136. vueOptions: options });
  1137. // 初始化 vue 实例
  1138. this.$vm = new VueComponent(options);
  1139. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  1140. initSlots(this.$vm, properties.vueSlots);
  1141. // 触发首次 setData
  1142. this.$vm.$mount();
  1143. },
  1144. ready: function ready() {
  1145. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  1146. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  1147. if (this.$vm) {
  1148. this.$vm._isMounted = true;
  1149. this.$vm.__call_hook('mounted');
  1150. this.$vm.__call_hook('onReady');
  1151. }
  1152. },
  1153. detached: function detached() {
  1154. this.$vm && this.$vm.$destroy();
  1155. } },
  1156. pageLifetimes: {
  1157. show: function show(args) {
  1158. this.$vm && this.$vm.__call_hook('onPageShow', args);
  1159. },
  1160. hide: function hide() {
  1161. this.$vm && this.$vm.__call_hook('onPageHide');
  1162. },
  1163. resize: function resize(size) {
  1164. this.$vm && this.$vm.__call_hook('onPageResize', size);
  1165. } },
  1166. methods: {
  1167. __l: handleLink,
  1168. __e: handleEvent } };
  1169. // externalClasses
  1170. if (vueOptions.externalClasses) {
  1171. componentOptions.externalClasses = vueOptions.externalClasses;
  1172. }
  1173. if (Array.isArray(vueOptions.wxsCallMethods)) {
  1174. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  1175. componentOptions.methods[callMethod] = function (args) {
  1176. return this.$vm[callMethod](args);
  1177. };
  1178. });
  1179. }
  1180. if (isPage) {
  1181. return componentOptions;
  1182. }
  1183. return [componentOptions, VueComponent];
  1184. }
  1185. function parseComponent(vueComponentOptions) {
  1186. return parseBaseComponent(vueComponentOptions, {
  1187. isPage: isPage,
  1188. initRelation: initRelation });
  1189. }
  1190. var hooks$1 = [
  1191. 'onShow',
  1192. 'onHide',
  1193. 'onUnload'];
  1194. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  1195. function parseBasePage(vuePageOptions, _ref6)
  1196. {var isPage = _ref6.isPage,initRelation = _ref6.initRelation;
  1197. var pageOptions = parseComponent(vuePageOptions);
  1198. initHooks(pageOptions.methods, hooks$1, vuePageOptions);
  1199. pageOptions.methods.onLoad = function (args) {
  1200. this.$vm.$mp.query = args; // 兼容 mpvue
  1201. this.$vm.__call_hook('onLoad', args);
  1202. };
  1203. return pageOptions;
  1204. }
  1205. function parsePage(vuePageOptions) {
  1206. return parseBasePage(vuePageOptions, {
  1207. isPage: isPage,
  1208. initRelation: initRelation });
  1209. }
  1210. function createPage(vuePageOptions) {
  1211. {
  1212. return Component(parsePage(vuePageOptions));
  1213. }
  1214. }
  1215. function createComponent(vueOptions) {
  1216. {
  1217. return Component(parseComponent(vueOptions));
  1218. }
  1219. }
  1220. todos.forEach(function (todoApi) {
  1221. protocols[todoApi] = false;
  1222. });
  1223. canIUses.forEach(function (canIUseApi) {
  1224. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name :
  1225. canIUseApi;
  1226. if (!wx.canIUse(apiName)) {
  1227. protocols[canIUseApi] = false;
  1228. }
  1229. });
  1230. var uni = {};
  1231. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  1232. uni = new Proxy({}, {
  1233. get: function get(target, name) {
  1234. if (target[name]) {
  1235. return target[name];
  1236. }
  1237. if (baseApi[name]) {
  1238. return baseApi[name];
  1239. }
  1240. if (api[name]) {
  1241. return promisify(name, api[name]);
  1242. }
  1243. {
  1244. if (extraApi[name]) {
  1245. return promisify(name, extraApi[name]);
  1246. }
  1247. if (todoApis[name]) {
  1248. return promisify(name, todoApis[name]);
  1249. }
  1250. }
  1251. if (eventApi[name]) {
  1252. return eventApi[name];
  1253. }
  1254. if (!hasOwn(wx, name) && !hasOwn(protocols, name)) {
  1255. return;
  1256. }
  1257. return promisify(name, wrapper(name, wx[name]));
  1258. },
  1259. set: function set(target, name, value) {
  1260. target[name] = value;
  1261. return true;
  1262. } });
  1263. } else {
  1264. Object.keys(baseApi).forEach(function (name) {
  1265. uni[name] = baseApi[name];
  1266. });
  1267. {
  1268. Object.keys(todoApis).forEach(function (name) {
  1269. uni[name] = promisify(name, todoApis[name]);
  1270. });
  1271. Object.keys(extraApi).forEach(function (name) {
  1272. uni[name] = promisify(name, todoApis[name]);
  1273. });
  1274. }
  1275. Object.keys(eventApi).forEach(function (name) {
  1276. uni[name] = eventApi[name];
  1277. });
  1278. Object.keys(api).forEach(function (name) {
  1279. uni[name] = promisify(name, api[name]);
  1280. });
  1281. Object.keys(wx).forEach(function (name) {
  1282. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  1283. uni[name] = promisify(name, wrapper(name, wx[name]));
  1284. }
  1285. });
  1286. }
  1287. wx.createApp = createApp;
  1288. wx.createPage = createPage;
  1289. wx.createComponent = createComponent;
  1290. var uni$1 = uni;var _default =
  1291. uni$1;exports.default = _default;
  1292. /***/ }),
  1293. /***/ 10:
  1294. /*!**********************************************************************************************************!*\
  1295. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  1296. \**********************************************************************************************************/
  1297. /*! exports provided: default */
  1298. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1299. "use strict";
  1300. __webpack_require__.r(__webpack_exports__);
  1301. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  1302. /* globals __VUE_SSR_CONTEXT__ */
  1303. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  1304. // This module is a runtime utility for cleaner component module output and will
  1305. // be included in the final webpack user bundle.
  1306. function normalizeComponent (
  1307. scriptExports,
  1308. render,
  1309. staticRenderFns,
  1310. functionalTemplate,
  1311. injectStyles,
  1312. scopeId,
  1313. moduleIdentifier, /* server only */
  1314. shadowMode, /* vue-cli only */
  1315. components, // fixed by xxxxxx auto components
  1316. renderjs // fixed by xxxxxx renderjs
  1317. ) {
  1318. // Vue.extend constructor export interop
  1319. var options = typeof scriptExports === 'function'
  1320. ? scriptExports.options
  1321. : scriptExports
  1322. // fixed by xxxxxx auto components
  1323. if (components) {
  1324. if (!options.components) {
  1325. options.components = {}
  1326. }
  1327. var hasOwn = Object.prototype.hasOwnProperty
  1328. for (var name in components) {
  1329. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  1330. options.components[name] = components[name]
  1331. }
  1332. }
  1333. }
  1334. // fixed by xxxxxx renderjs
  1335. if (renderjs) {
  1336. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  1337. this[renderjs.__module] = this
  1338. });
  1339. (options.mixins || (options.mixins = [])).push(renderjs)
  1340. }
  1341. // render functions
  1342. if (render) {
  1343. options.render = render
  1344. options.staticRenderFns = staticRenderFns
  1345. options._compiled = true
  1346. }
  1347. // functional template
  1348. if (functionalTemplate) {
  1349. options.functional = true
  1350. }
  1351. // scopedId
  1352. if (scopeId) {
  1353. options._scopeId = 'data-v-' + scopeId
  1354. }
  1355. var hook
  1356. if (moduleIdentifier) { // server build
  1357. hook = function (context) {
  1358. // 2.3 injection
  1359. context =
  1360. context || // cached call
  1361. (this.$vnode && this.$vnode.ssrContext) || // stateful
  1362. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  1363. // 2.2 with runInNewContext: true
  1364. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  1365. context = __VUE_SSR_CONTEXT__
  1366. }
  1367. // inject component styles
  1368. if (injectStyles) {
  1369. injectStyles.call(this, context)
  1370. }
  1371. // register component module identifier for async chunk inferrence
  1372. if (context && context._registeredComponents) {
  1373. context._registeredComponents.add(moduleIdentifier)
  1374. }
  1375. }
  1376. // used by ssr in case component is cached and beforeCreate
  1377. // never gets called
  1378. options._ssrRegister = hook
  1379. } else if (injectStyles) {
  1380. hook = shadowMode
  1381. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  1382. : injectStyles
  1383. }
  1384. if (hook) {
  1385. if (options.functional) {
  1386. // for template-only hot-reload because in that case the render fn doesn't
  1387. // go through the normalizer
  1388. options._injectStyles = hook
  1389. // register for functioal component in vue file
  1390. var originalRender = options.render
  1391. options.render = function renderWithStyleInjection (h, context) {
  1392. hook.call(context)
  1393. return originalRender(h, context)
  1394. }
  1395. } else {
  1396. // inject component registration as beforeCreate hook
  1397. var existing = options.beforeCreate
  1398. options.beforeCreate = existing
  1399. ? [].concat(existing, hook)
  1400. : [hook]
  1401. }
  1402. }
  1403. return {
  1404. exports: scriptExports,
  1405. options: options
  1406. }
  1407. }
  1408. /***/ }),
  1409. /***/ 11:
  1410. /*!************************************************!*\
  1411. !*** C:/Users/Admin/Desktop/商城/store/index.js ***!
  1412. \************************************************/
  1413. /*! no static exports found */
  1414. /***/ (function(module, exports, __webpack_require__) {
  1415. "use strict";
  1416. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));
  1417. var _vuex = _interopRequireDefault(__webpack_require__(/*! vuex */ 12));
  1418. var _mallConfig = _interopRequireDefault(__webpack_require__(/*! ./modules/mallConfig.js */ 13));
  1419. var _user = _interopRequireDefault(__webpack_require__(/*! ./modules/user.js */ 26));
  1420. var _globalConfiguration = _interopRequireDefault(__webpack_require__(/*! ./modules/globalConfiguration.js */ 30));
  1421. var _index = _interopRequireDefault(__webpack_require__(/*! ./modules/index.js */ 31));
  1422. var _orderSubmit = _interopRequireDefault(__webpack_require__(/*! ./modules/orderSubmit.js */ 32));
  1423. var _pagination = _interopRequireDefault(__webpack_require__(/*! ./modules/pagination.js */ 33));
  1424. var _loading = _interopRequireDefault(__webpack_require__(/*! ./modules/loading.js */ 34));
  1425. var _payment = _interopRequireDefault(__webpack_require__(/*! ./modules/payment.js */ 35));
  1426. var _scanCode = _interopRequireDefault(__webpack_require__(/*! ./modules/scanCode.js */ 36));
  1427. var _page = _interopRequireDefault(__webpack_require__(/*! ./modules/page.js */ 37));
  1428. var _userCenter = _interopRequireDefault(__webpack_require__(/*! ./modules/userCenter.js */ 38));
  1429. var _iphoneX = _interopRequireDefault(__webpack_require__(/*! ./modules/iphoneX.js */ 39));
  1430. var _gift = _interopRequireDefault(__webpack_require__(/*! ./modules/gift.js */ 40));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}_vue.default.use(_vuex.default);
  1431. var store = new _vuex.default.Store({
  1432. modules: {
  1433. mallConfig: _mallConfig.default,
  1434. user: _user.default,
  1435. gConfig: _globalConfiguration.default,
  1436. index: _index.default,
  1437. orderSubmit: _orderSubmit.default,
  1438. pagination: _pagination.default,
  1439. loading: _loading.default,
  1440. payment: _payment.default,
  1441. scanCode: _scanCode.default,
  1442. page: _page.default,
  1443. userCenter: _userCenter.default,
  1444. iPhoneX: _iphoneX.default,
  1445. gift: _gift.default } });var _default =
  1446. store;exports.default = _default;
  1447. /***/ }),
  1448. /***/ 12:
  1449. /*!********************************************!*\
  1450. !*** ./node_modules/vuex/dist/vuex.esm.js ***!
  1451. \********************************************/
  1452. /*! exports provided: Store, install, mapState, mapMutations, mapGetters, mapActions, createNamespacedHelpers, default */
  1453. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1454. "use strict";
  1455. __webpack_require__.r(__webpack_exports__);
  1456. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Store", function() { return Store; });
  1457. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "install", function() { return install; });
  1458. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapState", function() { return mapState; });
  1459. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapMutations", function() { return mapMutations; });
  1460. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapGetters", function() { return mapGetters; });
  1461. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapActions", function() { return mapActions; });
  1462. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createNamespacedHelpers", function() { return createNamespacedHelpers; });
  1463. /**
  1464. * vuex v3.0.1
  1465. * (c) 2017 Evan You
  1466. * @license MIT
  1467. */
  1468. var applyMixin = function (Vue) {
  1469. var version = Number(Vue.version.split('.')[0]);
  1470. if (version >= 2) {
  1471. Vue.mixin({ beforeCreate: vuexInit });
  1472. } else {
  1473. // override init and inject vuex init procedure
  1474. // for 1.x backwards compatibility.
  1475. var _init = Vue.prototype._init;
  1476. Vue.prototype._init = function (options) {
  1477. if ( options === void 0 ) options = {};
  1478. options.init = options.init
  1479. ? [vuexInit].concat(options.init)
  1480. : vuexInit;
  1481. _init.call(this, options);
  1482. };
  1483. }
  1484. /**
  1485. * Vuex init hook, injected into each instances init hooks list.
  1486. */
  1487. function vuexInit () {
  1488. var options = this.$options;
  1489. // store injection
  1490. if (options.store) {
  1491. this.$store = typeof options.store === 'function'
  1492. ? options.store()
  1493. : options.store;
  1494. } else if (options.parent && options.parent.$store) {
  1495. this.$store = options.parent.$store;
  1496. }
  1497. }
  1498. };
  1499. var devtoolHook =
  1500. typeof window !== 'undefined' &&
  1501. window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  1502. function devtoolPlugin (store) {
  1503. if (!devtoolHook) { return }
  1504. store._devtoolHook = devtoolHook;
  1505. devtoolHook.emit('vuex:init', store);
  1506. devtoolHook.on('vuex:travel-to-state', function (targetState) {
  1507. store.replaceState(targetState);
  1508. });
  1509. store.subscribe(function (mutation, state) {
  1510. devtoolHook.emit('vuex:mutation', mutation, state);
  1511. });
  1512. }
  1513. /**
  1514. * Get the first item that pass the test
  1515. * by second argument function
  1516. *
  1517. * @param {Array} list
  1518. * @param {Function} f
  1519. * @return {*}
  1520. */
  1521. /**
  1522. * Deep copy the given object considering circular structure.
  1523. * This function caches all nested objects and its copies.
  1524. * If it detects circular structure, use cached copy to avoid infinite loop.
  1525. *
  1526. * @param {*} obj
  1527. * @param {Array<Object>} cache
  1528. * @return {*}
  1529. */
  1530. /**
  1531. * forEach for object
  1532. */
  1533. function forEachValue (obj, fn) {
  1534. Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });
  1535. }
  1536. function isObject (obj) {
  1537. return obj !== null && typeof obj === 'object'
  1538. }
  1539. function isPromise (val) {
  1540. return val && typeof val.then === 'function'
  1541. }
  1542. function assert (condition, msg) {
  1543. if (!condition) { throw new Error(("[vuex] " + msg)) }
  1544. }
  1545. var Module = function Module (rawModule, runtime) {
  1546. this.runtime = runtime;
  1547. this._children = Object.create(null);
  1548. this._rawModule = rawModule;
  1549. var rawState = rawModule.state;
  1550. this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
  1551. };
  1552. var prototypeAccessors$1 = { namespaced: { configurable: true } };
  1553. prototypeAccessors$1.namespaced.get = function () {
  1554. return !!this._rawModule.namespaced
  1555. };
  1556. Module.prototype.addChild = function addChild (key, module) {
  1557. this._children[key] = module;
  1558. };
  1559. Module.prototype.removeChild = function removeChild (key) {
  1560. delete this._children[key];
  1561. };
  1562. Module.prototype.getChild = function getChild (key) {
  1563. return this._children[key]
  1564. };
  1565. Module.prototype.update = function update (rawModule) {
  1566. this._rawModule.namespaced = rawModule.namespaced;
  1567. if (rawModule.actions) {
  1568. this._rawModule.actions = rawModule.actions;
  1569. }
  1570. if (rawModule.mutations) {
  1571. this._rawModule.mutations = rawModule.mutations;
  1572. }
  1573. if (rawModule.getters) {
  1574. this._rawModule.getters = rawModule.getters;
  1575. }
  1576. };
  1577. Module.prototype.forEachChild = function forEachChild (fn) {
  1578. forEachValue(this._children, fn);
  1579. };
  1580. Module.prototype.forEachGetter = function forEachGetter (fn) {
  1581. if (this._rawModule.getters) {
  1582. forEachValue(this._rawModule.getters, fn);
  1583. }
  1584. };
  1585. Module.prototype.forEachAction = function forEachAction (fn) {
  1586. if (this._rawModule.actions) {
  1587. forEachValue(this._rawModule.actions, fn);
  1588. }
  1589. };
  1590. Module.prototype.forEachMutation = function forEachMutation (fn) {
  1591. if (this._rawModule.mutations) {
  1592. forEachValue(this._rawModule.mutations, fn);
  1593. }
  1594. };
  1595. Object.defineProperties( Module.prototype, prototypeAccessors$1 );
  1596. var ModuleCollection = function ModuleCollection (rawRootModule) {
  1597. // register root module (Vuex.Store options)
  1598. this.register([], rawRootModule, false);
  1599. };
  1600. ModuleCollection.prototype.get = function get (path) {
  1601. return path.reduce(function (module, key) {
  1602. return module.getChild(key)
  1603. }, this.root)
  1604. };
  1605. ModuleCollection.prototype.getNamespace = function getNamespace (path) {
  1606. var module = this.root;
  1607. return path.reduce(function (namespace, key) {
  1608. module = module.getChild(key);
  1609. return namespace + (module.namespaced ? key + '/' : '')
  1610. }, '')
  1611. };
  1612. ModuleCollection.prototype.update = function update$1 (rawRootModule) {
  1613. update([], this.root, rawRootModule);
  1614. };
  1615. ModuleCollection.prototype.register = function register (path, rawModule, runtime) {
  1616. var this$1 = this;
  1617. if ( runtime === void 0 ) runtime = true;
  1618. if (true) {
  1619. assertRawModule(path, rawModule);
  1620. }
  1621. var newModule = new Module(rawModule, runtime);
  1622. if (path.length === 0) {
  1623. this.root = newModule;
  1624. } else {
  1625. var parent = this.get(path.slice(0, -1));
  1626. parent.addChild(path[path.length - 1], newModule);
  1627. }
  1628. // register nested modules
  1629. if (rawModule.modules) {
  1630. forEachValue(rawModule.modules, function (rawChildModule, key) {
  1631. this$1.register(path.concat(key), rawChildModule, runtime);
  1632. });
  1633. }
  1634. };
  1635. ModuleCollection.prototype.unregister = function unregister (path) {
  1636. var parent = this.get(path.slice(0, -1));
  1637. var key = path[path.length - 1];
  1638. if (!parent.getChild(key).runtime) { return }
  1639. parent.removeChild(key);
  1640. };
  1641. function update (path, targetModule, newModule) {
  1642. if (true) {
  1643. assertRawModule(path, newModule);
  1644. }
  1645. // update target module
  1646. targetModule.update(newModule);
  1647. // update nested modules
  1648. if (newModule.modules) {
  1649. for (var key in newModule.modules) {
  1650. if (!targetModule.getChild(key)) {
  1651. if (true) {
  1652. console.warn(
  1653. "[vuex] trying to add a new module '" + key + "' on hot reloading, " +
  1654. 'manual reload is needed'
  1655. );
  1656. }
  1657. return
  1658. }
  1659. update(
  1660. path.concat(key),
  1661. targetModule.getChild(key),
  1662. newModule.modules[key]
  1663. );
  1664. }
  1665. }
  1666. }
  1667. var functionAssert = {
  1668. assert: function (value) { return typeof value === 'function'; },
  1669. expected: 'function'
  1670. };
  1671. var objectAssert = {
  1672. assert: function (value) { return typeof value === 'function' ||
  1673. (typeof value === 'object' && typeof value.handler === 'function'); },
  1674. expected: 'function or object with "handler" function'
  1675. };
  1676. var assertTypes = {
  1677. getters: functionAssert,
  1678. mutations: functionAssert,
  1679. actions: objectAssert
  1680. };
  1681. function assertRawModule (path, rawModule) {
  1682. Object.keys(assertTypes).forEach(function (key) {
  1683. if (!rawModule[key]) { return }
  1684. var assertOptions = assertTypes[key];
  1685. forEachValue(rawModule[key], function (value, type) {
  1686. assert(
  1687. assertOptions.assert(value),
  1688. makeAssertionMessage(path, key, type, value, assertOptions.expected)
  1689. );
  1690. });
  1691. });
  1692. }
  1693. function makeAssertionMessage (path, key, type, value, expected) {
  1694. var buf = key + " should be " + expected + " but \"" + key + "." + type + "\"";
  1695. if (path.length > 0) {
  1696. buf += " in module \"" + (path.join('.')) + "\"";
  1697. }
  1698. buf += " is " + (JSON.stringify(value)) + ".";
  1699. return buf
  1700. }
  1701. var Vue; // bind on install
  1702. var Store = function Store (options) {
  1703. var this$1 = this;
  1704. if ( options === void 0 ) options = {};
  1705. // Auto install if it is not done yet and `window` has `Vue`.
  1706. // To allow users to avoid auto-installation in some cases,
  1707. // this code should be placed here. See #731
  1708. if (!Vue && typeof window !== 'undefined' && window.Vue) {
  1709. install(window.Vue);
  1710. }
  1711. if (true) {
  1712. assert(Vue, "must call Vue.use(Vuex) before creating a store instance.");
  1713. assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser.");
  1714. assert(this instanceof Store, "Store must be called with the new operator.");
  1715. }
  1716. var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];
  1717. var strict = options.strict; if ( strict === void 0 ) strict = false;
  1718. var state = options.state; if ( state === void 0 ) state = {};
  1719. if (typeof state === 'function') {
  1720. state = state() || {};
  1721. }
  1722. // store internal state
  1723. this._committing = false;
  1724. this._actions = Object.create(null);
  1725. this._actionSubscribers = [];
  1726. this._mutations = Object.create(null);
  1727. this._wrappedGetters = Object.create(null);
  1728. this._modules = new ModuleCollection(options);
  1729. this._modulesNamespaceMap = Object.create(null);
  1730. this._subscribers = [];
  1731. this._watcherVM = new Vue();
  1732. // bind commit and dispatch to self
  1733. var store = this;
  1734. var ref = this;
  1735. var dispatch = ref.dispatch;
  1736. var commit = ref.commit;
  1737. this.dispatch = function boundDispatch (type, payload) {
  1738. return dispatch.call(store, type, payload)
  1739. };
  1740. this.commit = function boundCommit (type, payload, options) {
  1741. return commit.call(store, type, payload, options)
  1742. };
  1743. // strict mode
  1744. this.strict = strict;
  1745. // init root module.
  1746. // this also recursively registers all sub-modules
  1747. // and collects all module getters inside this._wrappedGetters
  1748. installModule(this, state, [], this._modules.root);
  1749. // initialize the store vm, which is responsible for the reactivity
  1750. // (also registers _wrappedGetters as computed properties)
  1751. resetStoreVM(this, state);
  1752. // apply plugins
  1753. plugins.forEach(function (plugin) { return plugin(this$1); });
  1754. if (Vue.config.devtools) {
  1755. devtoolPlugin(this);
  1756. }
  1757. };
  1758. var prototypeAccessors = { state: { configurable: true } };
  1759. prototypeAccessors.state.get = function () {
  1760. return this._vm._data.$$state
  1761. };
  1762. prototypeAccessors.state.set = function (v) {
  1763. if (true) {
  1764. assert(false, "Use store.replaceState() to explicit replace store state.");
  1765. }
  1766. };
  1767. Store.prototype.commit = function commit (_type, _payload, _options) {
  1768. var this$1 = this;
  1769. // check object-style commit
  1770. var ref = unifyObjectStyle(_type, _payload, _options);
  1771. var type = ref.type;
  1772. var payload = ref.payload;
  1773. var options = ref.options;
  1774. var mutation = { type: type, payload: payload };
  1775. var entry = this._mutations[type];
  1776. if (!entry) {
  1777. if (true) {
  1778. console.error(("[vuex] unknown mutation type: " + type));
  1779. }
  1780. return
  1781. }
  1782. this._withCommit(function () {
  1783. entry.forEach(function commitIterator (handler) {
  1784. handler(payload);
  1785. });
  1786. });
  1787. this._subscribers.forEach(function (sub) { return sub(mutation, this$1.state); });
  1788. if (
  1789. true &&
  1790. options && options.silent
  1791. ) {
  1792. console.warn(
  1793. "[vuex] mutation type: " + type + ". Silent option has been removed. " +
  1794. 'Use the filter functionality in the vue-devtools'
  1795. );
  1796. }
  1797. };
  1798. Store.prototype.dispatch = function dispatch (_type, _payload) {
  1799. var this$1 = this;
  1800. // check object-style dispatch
  1801. var ref = unifyObjectStyle(_type, _payload);
  1802. var type = ref.type;
  1803. var payload = ref.payload;
  1804. var action = { type: type, payload: payload };
  1805. var entry = this._actions[type];
  1806. if (!entry) {
  1807. if (true) {
  1808. console.error(("[vuex] unknown action type: " + type));
  1809. }
  1810. return
  1811. }
  1812. this._actionSubscribers.forEach(function (sub) { return sub(action, this$1.state); });
  1813. return entry.length > 1
  1814. ? Promise.all(entry.map(function (handler) { return handler(payload); }))
  1815. : entry[0](payload)
  1816. };
  1817. Store.prototype.subscribe = function subscribe (fn) {
  1818. return genericSubscribe(fn, this._subscribers)
  1819. };
  1820. Store.prototype.subscribeAction = function subscribeAction (fn) {
  1821. return genericSubscribe(fn, this._actionSubscribers)
  1822. };
  1823. Store.prototype.watch = function watch (getter, cb, options) {
  1824. var this$1 = this;
  1825. if (true) {
  1826. assert(typeof getter === 'function', "store.watch only accepts a function.");
  1827. }
  1828. return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)
  1829. };
  1830. Store.prototype.replaceState = function replaceState (state) {
  1831. var this$1 = this;
  1832. this._withCommit(function () {
  1833. this$1._vm._data.$$state = state;
  1834. });
  1835. };
  1836. Store.prototype.registerModule = function registerModule (path, rawModule, options) {
  1837. if ( options === void 0 ) options = {};
  1838. if (typeof path === 'string') { path = [path]; }
  1839. if (true) {
  1840. assert(Array.isArray(path), "module path must be a string or an Array.");
  1841. assert(path.length > 0, 'cannot register the root module by using registerModule.');
  1842. }
  1843. this._modules.register(path, rawModule);
  1844. installModule(this, this.state, path, this._modules.get(path), options.preserveState);
  1845. // reset store to update getters...
  1846. resetStoreVM(this, this.state);
  1847. };
  1848. Store.prototype.unregisterModule = function unregisterModule (path) {
  1849. var this$1 = this;
  1850. if (typeof path === 'string') { path = [path]; }
  1851. if (true) {
  1852. assert(Array.isArray(path), "module path must be a string or an Array.");
  1853. }
  1854. this._modules.unregister(path);
  1855. this._withCommit(function () {
  1856. var parentState = getNestedState(this$1.state, path.slice(0, -1));
  1857. Vue.delete(parentState, path[path.length - 1]);
  1858. });
  1859. resetStore(this);
  1860. };
  1861. Store.prototype.hotUpdate = function hotUpdate (newOptions) {
  1862. this._modules.update(newOptions);
  1863. resetStore(this, true);
  1864. };
  1865. Store.prototype._withCommit = function _withCommit (fn) {
  1866. var committing = this._committing;
  1867. this._committing = true;
  1868. fn();
  1869. this._committing = committing;
  1870. };
  1871. Object.defineProperties( Store.prototype, prototypeAccessors );
  1872. function genericSubscribe (fn, subs) {
  1873. if (subs.indexOf(fn) < 0) {
  1874. subs.push(fn);
  1875. }
  1876. return function () {
  1877. var i = subs.indexOf(fn);
  1878. if (i > -1) {
  1879. subs.splice(i, 1);
  1880. }
  1881. }
  1882. }
  1883. function resetStore (store, hot) {
  1884. store._actions = Object.create(null);
  1885. store._mutations = Object.create(null);
  1886. store._wrappedGetters = Object.create(null);
  1887. store._modulesNamespaceMap = Object.create(null);
  1888. var state = store.state;
  1889. // init all modules
  1890. installModule(store, state, [], store._modules.root, true);
  1891. // reset vm
  1892. resetStoreVM(store, state, hot);
  1893. }
  1894. function resetStoreVM (store, state, hot) {
  1895. var oldVm = store._vm;
  1896. // bind store public getters
  1897. store.getters = {};
  1898. var wrappedGetters = store._wrappedGetters;
  1899. var computed = {};
  1900. forEachValue(wrappedGetters, function (fn, key) {
  1901. // use computed to leverage its lazy-caching mechanism
  1902. computed[key] = function () { return fn(store); };
  1903. Object.defineProperty(store.getters, key, {
  1904. get: function () { return store._vm[key]; },
  1905. enumerable: true // for local getters
  1906. });
  1907. });
  1908. // use a Vue instance to store the state tree
  1909. // suppress warnings just in case the user has added
  1910. // some funky global mixins
  1911. var silent = Vue.config.silent;
  1912. Vue.config.silent = true;
  1913. store._vm = new Vue({
  1914. data: {
  1915. $$state: state
  1916. },
  1917. computed: computed
  1918. });
  1919. Vue.config.silent = silent;
  1920. // enable strict mode for new vm
  1921. if (store.strict) {
  1922. enableStrictMode(store);
  1923. }
  1924. if (oldVm) {
  1925. if (hot) {
  1926. // dispatch changes in all subscribed watchers
  1927. // to force getter re-evaluation for hot reloading.
  1928. store._withCommit(function () {
  1929. oldVm._data.$$state = null;
  1930. });
  1931. }
  1932. Vue.nextTick(function () { return oldVm.$destroy(); });
  1933. }
  1934. }
  1935. function installModule (store, rootState, path, module, hot) {
  1936. var isRoot = !path.length;
  1937. var namespace = store._modules.getNamespace(path);
  1938. // register in namespace map
  1939. if (module.namespaced) {
  1940. store._modulesNamespaceMap[namespace] = module;
  1941. }
  1942. // set state
  1943. if (!isRoot && !hot) {
  1944. var parentState = getNestedState(rootState, path.slice(0, -1));
  1945. var moduleName = path[path.length - 1];
  1946. store._withCommit(function () {
  1947. Vue.set(parentState, moduleName, module.state);
  1948. });
  1949. }
  1950. var local = module.context = makeLocalContext(store, namespace, path);
  1951. module.forEachMutation(function (mutation, key) {
  1952. var namespacedType = namespace + key;
  1953. registerMutation(store, namespacedType, mutation, local);
  1954. });
  1955. module.forEachAction(function (action, key) {
  1956. var type = action.root ? key : namespace + key;
  1957. var handler = action.handler || action;
  1958. registerAction(store, type, handler, local);
  1959. });
  1960. module.forEachGetter(function (getter, key) {
  1961. var namespacedType = namespace + key;
  1962. registerGetter(store, namespacedType, getter, local);
  1963. });
  1964. module.forEachChild(function (child, key) {
  1965. installModule(store, rootState, path.concat(key), child, hot);
  1966. });
  1967. }
  1968. /**
  1969. * make localized dispatch, commit, getters and state
  1970. * if there is no namespace, just use root ones
  1971. */
  1972. function makeLocalContext (store, namespace, path) {
  1973. var noNamespace = namespace === '';
  1974. var local = {
  1975. dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
  1976. var args = unifyObjectStyle(_type, _payload, _options);
  1977. var payload = args.payload;
  1978. var options = args.options;
  1979. var type = args.type;
  1980. if (!options || !options.root) {
  1981. type = namespace + type;
  1982. if ( true && !store._actions[type]) {
  1983. console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type));
  1984. return
  1985. }
  1986. }
  1987. return store.dispatch(type, payload)
  1988. },
  1989. commit: noNamespace ? store.commit : function (_type, _payload, _options) {
  1990. var args = unifyObjectStyle(_type, _payload, _options);
  1991. var payload = args.payload;
  1992. var options = args.options;
  1993. var type = args.type;
  1994. if (!options || !options.root) {
  1995. type = namespace + type;
  1996. if ( true && !store._mutations[type]) {
  1997. console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type));
  1998. return
  1999. }
  2000. }
  2001. store.commit(type, payload, options);
  2002. }
  2003. };
  2004. // getters and state object must be gotten lazily
  2005. // because they will be changed by vm update
  2006. Object.defineProperties(local, {
  2007. getters: {
  2008. get: noNamespace
  2009. ? function () { return store.getters; }
  2010. : function () { return makeLocalGetters(store, namespace); }
  2011. },
  2012. state: {
  2013. get: function () { return getNestedState(store.state, path); }
  2014. }
  2015. });
  2016. return local
  2017. }
  2018. function makeLocalGetters (store, namespace) {
  2019. var gettersProxy = {};
  2020. var splitPos = namespace.length;
  2021. Object.keys(store.getters).forEach(function (type) {
  2022. // skip if the target getter is not match this namespace
  2023. if (type.slice(0, splitPos) !== namespace) { return }
  2024. // extract local getter type
  2025. var localType = type.slice(splitPos);
  2026. // Add a port to the getters proxy.
  2027. // Define as getter property because
  2028. // we do not want to evaluate the getters in this time.
  2029. Object.defineProperty(gettersProxy, localType, {
  2030. get: function () { return store.getters[type]; },
  2031. enumerable: true
  2032. });
  2033. });
  2034. return gettersProxy
  2035. }
  2036. function registerMutation (store, type, handler, local) {
  2037. var entry = store._mutations[type] || (store._mutations[type] = []);
  2038. entry.push(function wrappedMutationHandler (payload) {
  2039. handler.call(store, local.state, payload);
  2040. });
  2041. }
  2042. function registerAction (store, type, handler, local) {
  2043. var entry = store._actions[type] || (store._actions[type] = []);
  2044. entry.push(function wrappedActionHandler (payload, cb) {
  2045. var res = handler.call(store, {
  2046. dispatch: local.dispatch,
  2047. commit: local.commit,
  2048. getters: local.getters,
  2049. state: local.state,
  2050. rootGetters: store.getters,
  2051. rootState: store.state
  2052. }, payload, cb);
  2053. if (!isPromise(res)) {
  2054. res = Promise.resolve(res);
  2055. }
  2056. if (store._devtoolHook) {
  2057. return res.catch(function (err) {
  2058. store._devtoolHook.emit('vuex:error', err);
  2059. throw err
  2060. })
  2061. } else {
  2062. return res
  2063. }
  2064. });
  2065. }
  2066. function registerGetter (store, type, rawGetter, local) {
  2067. if (store._wrappedGetters[type]) {
  2068. if (true) {
  2069. console.error(("[vuex] duplicate getter key: " + type));
  2070. }
  2071. return
  2072. }
  2073. store._wrappedGetters[type] = function wrappedGetter (store) {
  2074. return rawGetter(
  2075. local.state, // local state
  2076. local.getters, // local getters
  2077. store.state, // root state
  2078. store.getters // root getters
  2079. )
  2080. };
  2081. }
  2082. function enableStrictMode (store) {
  2083. store._vm.$watch(function () { return this._data.$$state }, function () {
  2084. if (true) {
  2085. assert(store._committing, "Do not mutate vuex store state outside mutation handlers.");
  2086. }
  2087. }, { deep: true, sync: true });
  2088. }
  2089. function getNestedState (state, path) {
  2090. return path.length
  2091. ? path.reduce(function (state, key) { return state[key]; }, state)
  2092. : state
  2093. }
  2094. function unifyObjectStyle (type, payload, options) {
  2095. if (isObject(type) && type.type) {
  2096. options = payload;
  2097. payload = type;
  2098. type = type.type;
  2099. }
  2100. if (true) {
  2101. assert(typeof type === 'string', ("Expects string as the type, but found " + (typeof type) + "."));
  2102. }
  2103. return { type: type, payload: payload, options: options }
  2104. }
  2105. function install (_Vue) {
  2106. if (Vue && _Vue === Vue) {
  2107. if (true) {
  2108. console.error(
  2109. '[vuex] already installed. Vue.use(Vuex) should be called only once.'
  2110. );
  2111. }
  2112. return
  2113. }
  2114. Vue = _Vue;
  2115. applyMixin(Vue);
  2116. }
  2117. var mapState = normalizeNamespace(function (namespace, states) {
  2118. var res = {};
  2119. normalizeMap(states).forEach(function (ref) {
  2120. var key = ref.key;
  2121. var val = ref.val;
  2122. res[key] = function mappedState () {
  2123. var state = this.$store.state;
  2124. var getters = this.$store.getters;
  2125. if (namespace) {
  2126. var module = getModuleByNamespace(this.$store, 'mapState', namespace);
  2127. if (!module) {
  2128. return
  2129. }
  2130. state = module.context.state;
  2131. getters = module.context.getters;
  2132. }
  2133. return typeof val === 'function'
  2134. ? val.call(this, state, getters)
  2135. : state[val]
  2136. };
  2137. // mark vuex getter for devtools
  2138. res[key].vuex = true;
  2139. });
  2140. return res
  2141. });
  2142. var mapMutations = normalizeNamespace(function (namespace, mutations) {
  2143. var res = {};
  2144. normalizeMap(mutations).forEach(function (ref) {
  2145. var key = ref.key;
  2146. var val = ref.val;
  2147. res[key] = function mappedMutation () {
  2148. var args = [], len = arguments.length;
  2149. while ( len-- ) args[ len ] = arguments[ len ];
  2150. var commit = this.$store.commit;
  2151. if (namespace) {
  2152. var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
  2153. if (!module) {
  2154. return
  2155. }
  2156. commit = module.context.commit;
  2157. }
  2158. return typeof val === 'function'
  2159. ? val.apply(this, [commit].concat(args))
  2160. : commit.apply(this.$store, [val].concat(args))
  2161. };
  2162. });
  2163. return res
  2164. });
  2165. var mapGetters = normalizeNamespace(function (namespace, getters) {
  2166. var res = {};
  2167. normalizeMap(getters).forEach(function (ref) {
  2168. var key = ref.key;
  2169. var val = ref.val;
  2170. val = namespace + val;
  2171. res[key] = function mappedGetter () {
  2172. if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
  2173. return
  2174. }
  2175. if ( true && !(val in this.$store.getters)) {
  2176. console.error(("[vuex] unknown getter: " + val));
  2177. return
  2178. }
  2179. return this.$store.getters[val]
  2180. };
  2181. // mark vuex getter for devtools
  2182. res[key].vuex = true;
  2183. });
  2184. return res
  2185. });
  2186. var mapActions = normalizeNamespace(function (namespace, actions) {
  2187. var res = {};
  2188. normalizeMap(actions).forEach(function (ref) {
  2189. var key = ref.key;
  2190. var val = ref.val;
  2191. res[key] = function mappedAction () {
  2192. var args = [], len = arguments.length;
  2193. while ( len-- ) args[ len ] = arguments[ len ];
  2194. var dispatch = this.$store.dispatch;
  2195. if (namespace) {
  2196. var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
  2197. if (!module) {
  2198. return
  2199. }
  2200. dispatch = module.context.dispatch;
  2201. }
  2202. return typeof val === 'function'
  2203. ? val.apply(this, [dispatch].concat(args))
  2204. : dispatch.apply(this.$store, [val].concat(args))
  2205. };
  2206. });
  2207. return res
  2208. });
  2209. var createNamespacedHelpers = function (namespace) { return ({
  2210. mapState: mapState.bind(null, namespace),
  2211. mapGetters: mapGetters.bind(null, namespace),
  2212. mapMutations: mapMutations.bind(null, namespace),
  2213. mapActions: mapActions.bind(null, namespace)
  2214. }); };
  2215. function normalizeMap (map) {
  2216. return Array.isArray(map)
  2217. ? map.map(function (key) { return ({ key: key, val: key }); })
  2218. : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })
  2219. }
  2220. function normalizeNamespace (fn) {
  2221. return function (namespace, map) {
  2222. if (typeof namespace !== 'string') {
  2223. map = namespace;
  2224. namespace = '';
  2225. } else if (namespace.charAt(namespace.length - 1) !== '/') {
  2226. namespace += '/';
  2227. }
  2228. return fn(namespace, map)
  2229. }
  2230. }
  2231. function getModuleByNamespace (store, helper, namespace) {
  2232. var module = store._modulesNamespaceMap[namespace];
  2233. if ( true && !module) {
  2234. console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace));
  2235. }
  2236. return module
  2237. }
  2238. var index_esm = {
  2239. Store: Store,
  2240. install: install,
  2241. version: '3.0.1',
  2242. mapState: mapState,
  2243. mapMutations: mapMutations,
  2244. mapGetters: mapGetters,
  2245. mapActions: mapActions,
  2246. createNamespacedHelpers: createNamespacedHelpers
  2247. };
  2248. /* harmony default export */ __webpack_exports__["default"] = (index_esm);
  2249. /***/ }),
  2250. /***/ 13:
  2251. /*!*************************************************************!*\
  2252. !*** C:/Users/Admin/Desktop/商城/store/modules/mallConfig.js ***!
  2253. \*************************************************************/
  2254. /*! no static exports found */
  2255. /***/ (function(module, exports, __webpack_require__) {
  2256. "use strict";
  2257. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _mallConfig = _interopRequireDefault(__webpack_require__(/*! ../../core/mallConfig.js */ 14));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  2258. var state = {
  2259. auth_page: {},
  2260. bar_title: {},
  2261. cat_style: {},
  2262. copyright: {},
  2263. mall: {
  2264. setting: {} },
  2265. navbar: {
  2266. navs: [] },
  2267. plugin: {},
  2268. share_setting: [],
  2269. share_setting_custom: {},
  2270. user_center: {},
  2271. __wxapp_img: {},
  2272. theme: "classic-red",
  2273. windowHeight: {
  2274. height: 0,
  2275. width: 0,
  2276. boolean: false } };
  2277. var getters = {
  2278. getNavBar: function getNavBar(state) {
  2279. return state.navbar;
  2280. },
  2281. getNavBarNavs: function getNavBarNavs(state) {
  2282. for (var i = 0, len = state.navbar.navs.length; i < len; i++) {
  2283. }
  2284. },
  2285. getUserCenter: function getUserCenter(state) {
  2286. return state.user_center;
  2287. },
  2288. getWxappImg: function getWxappImg(state) {
  2289. return state.__wxapp_img;
  2290. },
  2291. getCatStyle: function getCatStyle(state) {
  2292. return state.cat_style;
  2293. },
  2294. getVip: function getVip(state) {
  2295. return state.plugin.vip_card;
  2296. },
  2297. getVideo: function getVideo(state) {
  2298. return state.mall.setting.is_goods_video;
  2299. },
  2300. getShowCart: function getShowCart(state) {
  2301. return state.mall.setting.is_show_cart;
  2302. } };
  2303. var mutations = {
  2304. mutSetConfig: function mutSetConfig(state, data) {
  2305. for (var item in data) {
  2306. if (item === 'navbar') {
  2307. for (var i = 0; i < data[item].navs.length; i++) {
  2308. data[item].navs[i].id = i;
  2309. }
  2310. }
  2311. state[item] = data[item];
  2312. }
  2313. },
  2314. mutSetHeight: function mutSetHeight(state, data) {
  2315. state.windowHeight = data;
  2316. } };
  2317. var actions = {
  2318. actionGetConfig: function actionGetConfig(context) {
  2319. _mallConfig.default.getConfig().then(function (response) {
  2320. context.commit('mutSetConfig', response);
  2321. }).catch(function (error) {
  2322. console.log(error);
  2323. });
  2324. },
  2325. actionHeight: function actionHeight(context, data) {
  2326. context.commit("mutSetHeight", data);
  2327. },
  2328. actionResetConfig: function actionResetConfig(context) {
  2329. _mallConfig.default.resetConfig();
  2330. _mallConfig.default.getConfig().then(function (response) {
  2331. context.commit('mutSetConfig', response);
  2332. }).catch(function (error) {
  2333. console.log(error);
  2334. });
  2335. } };var _default =
  2336. {
  2337. namespaced: true,
  2338. state: state,
  2339. getters: getters,
  2340. mutations: mutations,
  2341. actions: actions };exports.default = _default;
  2342. /***/ }),
  2343. /***/ 14:
  2344. /*!****************************************************!*\
  2345. !*** C:/Users/Admin/Desktop/商城/core/mallConfig.js ***!
  2346. \****************************************************/
  2347. /*! no static exports found */
  2348. /***/ (function(module, exports, __webpack_require__) {
  2349. "use strict";
  2350. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _request = _interopRequireDefault(__webpack_require__(/*! ./request.js */ 15));
  2351. var _appOnLaunch = _interopRequireDefault(__webpack_require__(/*! ./appOnLaunch.js */ 24));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  2352. var isFirstAppRun = true;
  2353. var isGettingFromService = false;
  2354. var mallConfig = null;
  2355. var cacheKey = '_APP_CONFIG';
  2356. var resolveList = [];
  2357. var rejectList = [];
  2358. var getConfigFormServer = function getConfigFormServer(resolve, reject) {
  2359. if (resolve) {
  2360. resolveList.push(resolve);
  2361. }
  2362. if (reject) {
  2363. rejectList.push(reject);
  2364. }
  2365. if (isGettingFromService) {
  2366. return;
  2367. }
  2368. isGettingFromService = true;
  2369. (0, _request.default)({
  2370. url: _appOnLaunch.default.index.config }).
  2371. then(function (response) {
  2372. isGettingFromService = false;
  2373. if (response.code === 0) {
  2374. mallConfig = response.data;
  2375. uni.setStorageSync(cacheKey, mallConfig);
  2376. for (var i in resolveList) {
  2377. resolveList[i](mallConfig);
  2378. }
  2379. resolveList = [];
  2380. } else {
  2381. for (var _i in rejectList) {
  2382. rejectList[_i](response.msg);
  2383. }
  2384. rejectList = [];
  2385. }
  2386. }).catch(function (error) {
  2387. isGettingFromService = false;
  2388. for (var i in rejectList) {
  2389. rejectList[i](error.msg);
  2390. }
  2391. rejectList = [];
  2392. });
  2393. };var _default =
  2394. {
  2395. getConfig: function getConfig(options) {
  2396. return new Promise(function (resolve, reject) {
  2397. if (mallConfig) {
  2398. return resolve(mallConfig);
  2399. }
  2400. mallConfig = uni.getStorageSync(cacheKey);
  2401. if (mallConfig) {
  2402. if (isFirstAppRun) {
  2403. isFirstAppRun = false;
  2404. getConfigFormServer();
  2405. }
  2406. return resolve(mallConfig);
  2407. } else {
  2408. getConfigFormServer(resolve, reject);
  2409. }
  2410. });
  2411. },
  2412. resetConfig: function resetConfig() {
  2413. mallConfig = null;
  2414. isGettingFromService = false;
  2415. } };exports.default = _default;
  2416. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  2417. /***/ }),
  2418. /***/ 15:
  2419. /*!*************************************************!*\
  2420. !*** C:/Users/Admin/Desktop/商城/core/request.js ***!
  2421. \*************************************************/
  2422. /*! no static exports found */
  2423. /***/ (function(module, exports, __webpack_require__) {
  2424. "use strict";
  2425. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _regenerator = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@vue/babel-preset-app/node_modules/@babel/runtime/regenerator */ 16));var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));
  2426. var _formId = __webpack_require__(/*! ./formId.js */ 19);
  2427. var _config = __webpack_require__(/*! ./config.js */ 22);
  2428. var _apiUrl = _interopRequireDefault(__webpack_require__(/*! ./apiUrl.js */ 23));
  2429. var _utils = __webpack_require__(/*! ./utils.js */ 20);
  2430. var _index = _interopRequireDefault(__webpack_require__(/*! ../store/index.js */ 11));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function _slicedToArray(arr, i) {return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o, minLen) {if (!o) return;if (typeof o === "string") return _arrayLikeToArray(o, minLen);var n = Object.prototype.toString.call(o).slice(8, -1);if (n === "Object" && o.constructor) n = o.constructor.name;if (n === "Map" || n === "Set") return Array.from(n);if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);}function _arrayLikeToArray(arr, len) {if (len == null || len > arr.length) len = arr.length;for (var i = 0, arr2 = new Array(len); i < len; i++) {arr2[i] = arr[i];}return arr2;}function _iterableToArrayLimit(arr, i) {if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"] != null) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}function _arrayWithHoles(arr) {if (Array.isArray(arr)) return arr;}function 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);});};}
  2431. var request = /*#__PURE__*/function () {var _ref = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee(args) {var header, obj, mch_storage, _yield$uni$request, _yield$uni$request2, error, response, msg;return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:
  2432. header = {
  2433. 'X-App-Platform': args.header && args.header['X-App-Platform'] ? args.header['X-App-Platform'] : _config.platform,
  2434. 'X-Form-Id-List': JSON.stringify((0, _formId.popAll)()),
  2435. 'X-Requested-With': args.header && args.header['X-Requested-With'] ? args.header['X-Requested-With'] : 'XMLHttpRequest',
  2436. 'X-App-Version': _vue.default.prototype.$appVersion,
  2437. 'content-type': 'application/x-www-form-urlencoded' };_context.next = 3;return (
  2438. _index.default.dispatch('user/loadAccessTokenFormCache'));case 3:
  2439. if (_index.default.state.user && _index.default.state.user.accessToken) {
  2440. header['X-Access-Token'] = _index.default.state.user.accessToken;
  2441. }
  2442. if (_index.default.state.user && _index.default.state.user.tempParentId !== 0) {
  2443. header['X-User-Id'] = _index.default.state.user.tempParentId + '';
  2444. }
  2445. //多商户Token
  2446. obj = {};
  2447. args.url.replace(/([^=&]+)=([^&]*)/g, function (m, key, value) {
  2448. obj[decodeURIComponent(key)] = decodeURIComponent(value);
  2449. });
  2450. if ((0, _utils.objectValues)(_apiUrl.default.mch).indexOf(obj.r) !== -1) {
  2451. mch_storage = uni.getStorageSync('MCH2019');
  2452. header['Mch-Access-Token'] = mch_storage.token;
  2453. }_context.next = 10;return (
  2454. uni.request({
  2455. url: args.url,
  2456. method: args.method || 'get',
  2457. data: args.data,
  2458. header: header }));case 10:_yield$uni$request = _context.sent;_yield$uni$request2 = _slicedToArray(_yield$uni$request, 2);error = _yield$uni$request2[0];response = _yield$uni$request2[1];if (!
  2459. error) {_context.next = 20;break;}
  2460. msg = {
  2461. code: 400,
  2462. msg: error.errMsg,
  2463. data: error };
  2464. alertError(msg);return _context.abrupt("return",
  2465. Promise.reject(msg));case 20:return _context.abrupt("return",
  2466. distinguishStatusCode(response));case 21:case "end":return _context.stop();}}}, _callee);}));return function request(_x) {return _ref.apply(this, arguments);};}();
  2467. var reloadPage = function reloadPage() {
  2468. var pages = getCurrentPages();
  2469. var page = pages[pages.length - 1];
  2470. var options = page.options || {};
  2471. var route = page.route || '';
  2472. if (route.indexOf('/') !== 0) {
  2473. route = '/' + route;
  2474. }
  2475. var query = '';
  2476. for (var k in options) {
  2477. query = query + "".concat(k, "=").concat(options[k], "&");
  2478. }
  2479. uni.redirectTo({
  2480. url: route + (query ? "?".concat(query) : "") });
  2481. };
  2482. var alertError = function alertError(error) {
  2483. var confirmText = '刷新页面';
  2484. uni.showModal({
  2485. title: '网络错误',
  2486. content: '网络开了小差,请刷新重试下哦~',
  2487. cancelText: '复制错误',
  2488. confirmText: confirmText,
  2489. success: function success(e) {
  2490. if (e.cancel) {
  2491. var data = "code: ".concat(error.code, ", \r\nmsg: ").concat(error.msg, ", \r\ndetail: ") + (
  2492. error.data ? typeof error.data === 'string' ? error.data : JSON.stringify(error.data) : null);
  2493. uni.setClipboardData({
  2494. data: data,
  2495. fail: function fail(e) {
  2496. console.log('错误复制失败', e);
  2497. } });
  2498. }
  2499. if (e.confirm) {
  2500. reloadPage();
  2501. }
  2502. } });
  2503. };
  2504. var distinguishDataCode = function distinguishDataCode(response) {
  2505. if (response.data) {var _response$data =
  2506. response.data,msg = _response$data.msg,code = _response$data.code;
  2507. if (code >= 400) {
  2508. alertError({
  2509. code: code,
  2510. msg: msg,
  2511. data: response.data.error || response.data.data || msg });
  2512. return Promise.reject(msg);
  2513. } else if (code === -1) {
  2514. _index.default.dispatch('user/logout');
  2515. _index.default.dispatch('user/accessToken');
  2516. return Promise.reject(msg);
  2517. } else if (code === -2) {
  2518. uni.redirectTo({
  2519. url: '/pages/disabled/disabled?text=' + response.data.data.text });
  2520. } else if (code === -3) {
  2521. uni.redirectTo({
  2522. url: '/plugins/mch/mch/login/login' });
  2523. return Promise.reject(msg);
  2524. } else {
  2525. return Promise.resolve(response.data);
  2526. }
  2527. } else {
  2528. return Promise.reject({
  2529. code: 200,
  2530. msg: '数据不存在',
  2531. data: response });
  2532. }
  2533. };
  2534. var distinguishStatusCode = function distinguishStatusCode(response) {
  2535. var msg = {
  2536. code: 500,
  2537. msg: '服务器内部错误',
  2538. data: response };
  2539. switch (response.statusCode) {
  2540. case 200:
  2541. return distinguishDataCode(response);
  2542. case 404:
  2543. msg = {
  2544. code: 404,
  2545. msg: '资源获取不到',
  2546. data: response };
  2547. break;
  2548. case 500:
  2549. msg = {
  2550. code: 500,
  2551. msg: '服务器内部错误',
  2552. data: response };
  2553. break;
  2554. case 503:
  2555. msg = {
  2556. code: 503,
  2557. msg: '服务不可用',
  2558. data: response };
  2559. break;
  2560. case 504:
  2561. msg = {
  2562. code: 504,
  2563. msg: '网关超时',
  2564. data: response };
  2565. break;
  2566. case 400:
  2567. msg = {
  2568. code: 400,
  2569. msg: '服务器不理解请求的语法',
  2570. data: response };
  2571. break;
  2572. case 403:
  2573. msg = {
  2574. code: 403,
  2575. msg: '服务器拒绝请求',
  2576. data: response };
  2577. break;
  2578. case 405:
  2579. msg = {
  2580. code: 405,
  2581. msg: '方法禁用',
  2582. data: response };
  2583. break;
  2584. case 406:
  2585. msg = {
  2586. code: 406,
  2587. msg: '无法使用请求的内容特性响应请求的网页',
  2588. data: response };
  2589. break;
  2590. case 407:
  2591. msg = {
  2592. code: 407,
  2593. msg: '需要代理授权',
  2594. data: response };
  2595. break;
  2596. case 408:
  2597. msg = {
  2598. code: 408,
  2599. msg: '请求超时',
  2600. data: response };
  2601. break;
  2602. case 409:
  2603. msg = {
  2604. code: 409,
  2605. msg: '冲突',
  2606. data: response };
  2607. break;
  2608. case 410:
  2609. msg = {
  2610. code: 410,
  2611. msg: '已删除',
  2612. data: response };
  2613. break;
  2614. case 411:
  2615. msg = {
  2616. code: 411,
  2617. msg: '需要有效长度',
  2618. data: response };
  2619. break;
  2620. case 412:
  2621. msg = {
  2622. code: 412,
  2623. msg: '服务器未满足请求者在请求中设置的其中一个前提条件',
  2624. data: response };
  2625. break;
  2626. case 413:
  2627. msg = {
  2628. code: 413,
  2629. msg: '请求实体过大',
  2630. data: response };
  2631. break;
  2632. case 414:
  2633. msg = {
  2634. code: 414,
  2635. msg: '求情URI过长',
  2636. data: response };
  2637. break;
  2638. case 415:
  2639. msg = {
  2640. code: 415,
  2641. msg: '不支持的媒体类型',
  2642. data: response };
  2643. break;
  2644. case 416:
  2645. msg = {
  2646. code: 416,
  2647. msg: '请求范围不符合要求',
  2648. data: response };
  2649. break;
  2650. case 417:
  2651. msg = {
  2652. code: 417,
  2653. msg: '未满足期望值',
  2654. data: response };
  2655. break;
  2656. default:
  2657. break;}
  2658. alertError(msg);
  2659. return Promise.reject(msg);
  2660. };var _default =
  2661. request;exports.default = _default;
  2662. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  2663. /***/ }),
  2664. /***/ 1507:
  2665. /*!******************************************************!*\
  2666. !*** C:/Users/Admin/Desktop/商城/pages/order/order.js ***!
  2667. \******************************************************/
  2668. /*! no static exports found */
  2669. /***/ (function(module, exports, __webpack_require__) {
  2670. "use strict";
  2671. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  2672. // 复制功能
  2673. copyText: function copyText(text) {
  2674. uni.setClipboardData({
  2675. data: text,
  2676. success: function success() {
  2677. uni.hideLoading();
  2678. uni.showToast({
  2679. title: '复制成功',
  2680. icon: 'none' });
  2681. } });
  2682. } };exports.default = _default;
  2683. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  2684. /***/ }),
  2685. /***/ 16:
  2686. /*!*********************************************************************************************!*\
  2687. !*** ./node_modules/@vue/babel-preset-app/node_modules/@babel/runtime/regenerator/index.js ***!
  2688. \*********************************************************************************************/
  2689. /*! no static exports found */
  2690. /***/ (function(module, exports, __webpack_require__) {
  2691. module.exports = __webpack_require__(/*! regenerator-runtime */ 17);
  2692. /***/ }),
  2693. /***/ 17:
  2694. /*!************************************************************!*\
  2695. !*** ./node_modules/regenerator-runtime/runtime-module.js ***!
  2696. \************************************************************/
  2697. /*! no static exports found */
  2698. /***/ (function(module, exports, __webpack_require__) {
  2699. /**
  2700. * Copyright (c) 2014-present, Facebook, Inc.
  2701. *
  2702. * This source code is licensed under the MIT license found in the
  2703. * LICENSE file in the root directory of this source tree.
  2704. */
  2705. // This method of obtaining a reference to the global object needs to be
  2706. // kept identical to the way it is obtained in runtime.js
  2707. var g = (function() {
  2708. return this || (typeof self === "object" && self);
  2709. })() || Function("return this")();
  2710. // Use `getOwnPropertyNames` because not all browsers support calling
  2711. // `hasOwnProperty` on the global `self` object in a worker. See #183.
  2712. var hadRuntime = g.regeneratorRuntime &&
  2713. Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0;
  2714. // Save the old regeneratorRuntime in case it needs to be restored later.
  2715. var oldRuntime = hadRuntime && g.regeneratorRuntime;
  2716. // Force reevalutation of runtime.js.
  2717. g.regeneratorRuntime = undefined;
  2718. module.exports = __webpack_require__(/*! ./runtime */ 18);
  2719. if (hadRuntime) {
  2720. // Restore the original runtime.
  2721. g.regeneratorRuntime = oldRuntime;
  2722. } else {
  2723. // Remove the global property added by runtime.js.
  2724. try {
  2725. delete g.regeneratorRuntime;
  2726. } catch(e) {
  2727. g.regeneratorRuntime = undefined;
  2728. }
  2729. }
  2730. /***/ }),
  2731. /***/ 1799:
  2732. /*!************************************************!*\
  2733. !*** C:/Users/Admin/Desktop/商城/core/tabbar.js ***!
  2734. \************************************************/
  2735. /*! no static exports found */
  2736. /***/ (function(module, exports, __webpack_require__) {
  2737. "use strict";
  2738. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _regenerator = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@vue/babel-preset-app/node_modules/@babel/runtime/regenerator */ 16));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);});};}
  2739. var tabBar = {
  2740. setNavigationBarTitle: function setNavigationBarTitle(barTitle, currentRoute) {return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee() {var i, len;return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:if (!(
  2741. Object.keys(barTitle).length > 0)) {_context.next = 9;break;}
  2742. i = 0, len = barTitle.length;case 2:if (!(i < len)) {_context.next = 9;break;}if (!
  2743. currentRoute.includes(barTitle[i].value)) {_context.next = 6;break;}
  2744. uni.setNavigationBarTitle({
  2745. title: barTitle[i].new_name });return _context.abrupt("return",
  2746. barTitle[i].new_name);case 6:i++;_context.next = 2;break;case 9:case "end":return _context.stop();}}}, _callee);}))();
  2747. } };var _default =
  2748. tabBar;exports.default = _default;
  2749. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  2750. /***/ }),
  2751. /***/ 18:
  2752. /*!*****************************************************!*\
  2753. !*** ./node_modules/regenerator-runtime/runtime.js ***!
  2754. \*****************************************************/
  2755. /*! no static exports found */
  2756. /***/ (function(module, exports) {
  2757. /**
  2758. * Copyright (c) 2014-present, Facebook, Inc.
  2759. *
  2760. * This source code is licensed under the MIT license found in the
  2761. * LICENSE file in the root directory of this source tree.
  2762. */
  2763. !(function(global) {
  2764. "use strict";
  2765. var Op = Object.prototype;
  2766. var hasOwn = Op.hasOwnProperty;
  2767. var undefined; // More compressible than void 0.
  2768. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  2769. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  2770. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  2771. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  2772. var inModule = typeof module === "object";
  2773. var runtime = global.regeneratorRuntime;
  2774. if (runtime) {
  2775. if (inModule) {
  2776. // If regeneratorRuntime is defined globally and we're in a module,
  2777. // make the exports object identical to regeneratorRuntime.
  2778. module.exports = runtime;
  2779. }
  2780. // Don't bother evaluating the rest of this file if the runtime was
  2781. // already defined globally.
  2782. return;
  2783. }
  2784. // Define the runtime globally (as expected by generated code) as either
  2785. // module.exports (if we're in a module) or a new, empty object.
  2786. runtime = global.regeneratorRuntime = inModule ? module.exports : {};
  2787. function wrap(innerFn, outerFn, self, tryLocsList) {
  2788. // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
  2789. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  2790. var generator = Object.create(protoGenerator.prototype);
  2791. var context = new Context(tryLocsList || []);
  2792. // The ._invoke method unifies the implementations of the .next,
  2793. // .throw, and .return methods.
  2794. generator._invoke = makeInvokeMethod(innerFn, self, context);
  2795. return generator;
  2796. }
  2797. runtime.wrap = wrap;
  2798. // Try/catch helper to minimize deoptimizations. Returns a completion
  2799. // record like context.tryEntries[i].completion. This interface could
  2800. // have been (and was previously) designed to take a closure to be
  2801. // invoked without arguments, but in all the cases we care about we
  2802. // already have an existing method we want to call, so there's no need
  2803. // to create a new function object. We can even get away with assuming
  2804. // the method takes exactly one argument, since that happens to be true
  2805. // in every case, so we don't have to touch the arguments object. The
  2806. // only additional allocation required is the completion record, which
  2807. // has a stable shape and so hopefully should be cheap to allocate.
  2808. function tryCatch(fn, obj, arg) {
  2809. try {
  2810. return { type: "normal", arg: fn.call(obj, arg) };
  2811. } catch (err) {
  2812. return { type: "throw", arg: err };
  2813. }
  2814. }
  2815. var GenStateSuspendedStart = "suspendedStart";
  2816. var GenStateSuspendedYield = "suspendedYield";
  2817. var GenStateExecuting = "executing";
  2818. var GenStateCompleted = "completed";
  2819. // Returning this object from the innerFn has the same effect as
  2820. // breaking out of the dispatch switch statement.
  2821. var ContinueSentinel = {};
  2822. // Dummy constructor functions that we use as the .constructor and
  2823. // .constructor.prototype properties for functions that return Generator
  2824. // objects. For full spec compliance, you may wish to configure your
  2825. // minifier not to mangle the names of these two functions.
  2826. function Generator() {}
  2827. function GeneratorFunction() {}
  2828. function GeneratorFunctionPrototype() {}
  2829. // This is a polyfill for %IteratorPrototype% for environments that
  2830. // don't natively support it.
  2831. var IteratorPrototype = {};
  2832. IteratorPrototype[iteratorSymbol] = function () {
  2833. return this;
  2834. };
  2835. var getProto = Object.getPrototypeOf;
  2836. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  2837. if (NativeIteratorPrototype &&
  2838. NativeIteratorPrototype !== Op &&
  2839. hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  2840. // This environment has a native %IteratorPrototype%; use it instead
  2841. // of the polyfill.
  2842. IteratorPrototype = NativeIteratorPrototype;
  2843. }
  2844. var Gp = GeneratorFunctionPrototype.prototype =
  2845. Generator.prototype = Object.create(IteratorPrototype);
  2846. GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  2847. GeneratorFunctionPrototype.constructor = GeneratorFunction;
  2848. GeneratorFunctionPrototype[toStringTagSymbol] =
  2849. GeneratorFunction.displayName = "GeneratorFunction";
  2850. // Helper for defining the .next, .throw, and .return methods of the
  2851. // Iterator interface in terms of a single ._invoke method.
  2852. function defineIteratorMethods(prototype) {
  2853. ["next", "throw", "return"].forEach(function(method) {
  2854. prototype[method] = function(arg) {
  2855. return this._invoke(method, arg);
  2856. };
  2857. });
  2858. }
  2859. runtime.isGeneratorFunction = function(genFun) {
  2860. var ctor = typeof genFun === "function" && genFun.constructor;
  2861. return ctor
  2862. ? ctor === GeneratorFunction ||
  2863. // For the native GeneratorFunction constructor, the best we can
  2864. // do is to check its .name property.
  2865. (ctor.displayName || ctor.name) === "GeneratorFunction"
  2866. : false;
  2867. };
  2868. runtime.mark = function(genFun) {
  2869. if (Object.setPrototypeOf) {
  2870. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  2871. } else {
  2872. genFun.__proto__ = GeneratorFunctionPrototype;
  2873. if (!(toStringTagSymbol in genFun)) {
  2874. genFun[toStringTagSymbol] = "GeneratorFunction";
  2875. }
  2876. }
  2877. genFun.prototype = Object.create(Gp);
  2878. return genFun;
  2879. };
  2880. // Within the body of any async function, `await x` is transformed to
  2881. // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  2882. // `hasOwn.call(value, "__await")` to determine if the yielded value is
  2883. // meant to be awaited.
  2884. runtime.awrap = function(arg) {
  2885. return { __await: arg };
  2886. };
  2887. function AsyncIterator(generator) {
  2888. function invoke(method, arg, resolve, reject) {
  2889. var record = tryCatch(generator[method], generator, arg);
  2890. if (record.type === "throw") {
  2891. reject(record.arg);
  2892. } else {
  2893. var result = record.arg;
  2894. var value = result.value;
  2895. if (value &&
  2896. typeof value === "object" &&
  2897. hasOwn.call(value, "__await")) {
  2898. return Promise.resolve(value.__await).then(function(value) {
  2899. invoke("next", value, resolve, reject);
  2900. }, function(err) {
  2901. invoke("throw", err, resolve, reject);
  2902. });
  2903. }
  2904. return Promise.resolve(value).then(function(unwrapped) {
  2905. // When a yielded Promise is resolved, its final value becomes
  2906. // the .value of the Promise<{value,done}> result for the
  2907. // current iteration.
  2908. result.value = unwrapped;
  2909. resolve(result);
  2910. }, function(error) {
  2911. // If a rejected Promise was yielded, throw the rejection back
  2912. // into the async generator function so it can be handled there.
  2913. return invoke("throw", error, resolve, reject);
  2914. });
  2915. }
  2916. }
  2917. var previousPromise;
  2918. function enqueue(method, arg) {
  2919. function callInvokeWithMethodAndArg() {
  2920. return new Promise(function(resolve, reject) {
  2921. invoke(method, arg, resolve, reject);
  2922. });
  2923. }
  2924. return previousPromise =
  2925. // If enqueue has been called before, then we want to wait until
  2926. // all previous Promises have been resolved before calling invoke,
  2927. // so that results are always delivered in the correct order. If
  2928. // enqueue has not been called before, then it is important to
  2929. // call invoke immediately, without waiting on a callback to fire,
  2930. // so that the async generator function has the opportunity to do
  2931. // any necessary setup in a predictable way. This predictability
  2932. // is why the Promise constructor synchronously invokes its
  2933. // executor callback, and why async functions synchronously
  2934. // execute code before the first await. Since we implement simple
  2935. // async functions in terms of async generators, it is especially
  2936. // important to get this right, even though it requires care.
  2937. previousPromise ? previousPromise.then(
  2938. callInvokeWithMethodAndArg,
  2939. // Avoid propagating failures to Promises returned by later
  2940. // invocations of the iterator.
  2941. callInvokeWithMethodAndArg
  2942. ) : callInvokeWithMethodAndArg();
  2943. }
  2944. // Define the unified helper method that is used to implement .next,
  2945. // .throw, and .return (see defineIteratorMethods).
  2946. this._invoke = enqueue;
  2947. }
  2948. defineIteratorMethods(AsyncIterator.prototype);
  2949. AsyncIterator.prototype[asyncIteratorSymbol] = function () {
  2950. return this;
  2951. };
  2952. runtime.AsyncIterator = AsyncIterator;
  2953. // Note that simple async functions are implemented on top of
  2954. // AsyncIterator objects; they just return a Promise for the value of
  2955. // the final result produced by the iterator.
  2956. runtime.async = function(innerFn, outerFn, self, tryLocsList) {
  2957. var iter = new AsyncIterator(
  2958. wrap(innerFn, outerFn, self, tryLocsList)
  2959. );
  2960. return runtime.isGeneratorFunction(outerFn)
  2961. ? iter // If outerFn is a generator, return the full iterator.
  2962. : iter.next().then(function(result) {
  2963. return result.done ? result.value : iter.next();
  2964. });
  2965. };
  2966. function makeInvokeMethod(innerFn, self, context) {
  2967. var state = GenStateSuspendedStart;
  2968. return function invoke(method, arg) {
  2969. if (state === GenStateExecuting) {
  2970. throw new Error("Generator is already running");
  2971. }
  2972. if (state === GenStateCompleted) {
  2973. if (method === "throw") {
  2974. throw arg;
  2975. }
  2976. // Be forgiving, per 25.3.3.3.3 of the spec:
  2977. // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
  2978. return doneResult();
  2979. }
  2980. context.method = method;
  2981. context.arg = arg;
  2982. while (true) {
  2983. var delegate = context.delegate;
  2984. if (delegate) {
  2985. var delegateResult = maybeInvokeDelegate(delegate, context);
  2986. if (delegateResult) {
  2987. if (delegateResult === ContinueSentinel) continue;
  2988. return delegateResult;
  2989. }
  2990. }
  2991. if (context.method === "next") {
  2992. // Setting context._sent for legacy support of Babel's
  2993. // function.sent implementation.
  2994. context.sent = context._sent = context.arg;
  2995. } else if (context.method === "throw") {
  2996. if (state === GenStateSuspendedStart) {
  2997. state = GenStateCompleted;
  2998. throw context.arg;
  2999. }
  3000. context.dispatchException(context.arg);
  3001. } else if (context.method === "return") {
  3002. context.abrupt("return", context.arg);
  3003. }
  3004. state = GenStateExecuting;
  3005. var record = tryCatch(innerFn, self, context);
  3006. if (record.type === "normal") {
  3007. // If an exception is thrown from innerFn, we leave state ===
  3008. // GenStateExecuting and loop back for another invocation.
  3009. state = context.done
  3010. ? GenStateCompleted
  3011. : GenStateSuspendedYield;
  3012. if (record.arg === ContinueSentinel) {
  3013. continue;
  3014. }
  3015. return {
  3016. value: record.arg,
  3017. done: context.done
  3018. };
  3019. } else if (record.type === "throw") {
  3020. state = GenStateCompleted;
  3021. // Dispatch the exception by looping back around to the
  3022. // context.dispatchException(context.arg) call above.
  3023. context.method = "throw";
  3024. context.arg = record.arg;
  3025. }
  3026. }
  3027. };
  3028. }
  3029. // Call delegate.iterator[context.method](context.arg) and handle the
  3030. // result, either by returning a { value, done } result from the
  3031. // delegate iterator, or by modifying context.method and context.arg,
  3032. // setting context.delegate to null, and returning the ContinueSentinel.
  3033. function maybeInvokeDelegate(delegate, context) {
  3034. var method = delegate.iterator[context.method];
  3035. if (method === undefined) {
  3036. // A .throw or .return when the delegate iterator has no .throw
  3037. // method always terminates the yield* loop.
  3038. context.delegate = null;
  3039. if (context.method === "throw") {
  3040. if (delegate.iterator.return) {
  3041. // If the delegate iterator has a return method, give it a
  3042. // chance to clean up.
  3043. context.method = "return";
  3044. context.arg = undefined;
  3045. maybeInvokeDelegate(delegate, context);
  3046. if (context.method === "throw") {
  3047. // If maybeInvokeDelegate(context) changed context.method from
  3048. // "return" to "throw", let that override the TypeError below.
  3049. return ContinueSentinel;
  3050. }
  3051. }
  3052. context.method = "throw";
  3053. context.arg = new TypeError(
  3054. "The iterator does not provide a 'throw' method");
  3055. }
  3056. return ContinueSentinel;
  3057. }
  3058. var record = tryCatch(method, delegate.iterator, context.arg);
  3059. if (record.type === "throw") {
  3060. context.method = "throw";
  3061. context.arg = record.arg;
  3062. context.delegate = null;
  3063. return ContinueSentinel;
  3064. }
  3065. var info = record.arg;
  3066. if (! info) {
  3067. context.method = "throw";
  3068. context.arg = new TypeError("iterator result is not an object");
  3069. context.delegate = null;
  3070. return ContinueSentinel;
  3071. }
  3072. if (info.done) {
  3073. // Assign the result of the finished delegate to the temporary
  3074. // variable specified by delegate.resultName (see delegateYield).
  3075. context[delegate.resultName] = info.value;
  3076. // Resume execution at the desired location (see delegateYield).
  3077. context.next = delegate.nextLoc;
  3078. // If context.method was "throw" but the delegate handled the
  3079. // exception, let the outer generator proceed normally. If
  3080. // context.method was "next", forget context.arg since it has been
  3081. // "consumed" by the delegate iterator. If context.method was
  3082. // "return", allow the original .return call to continue in the
  3083. // outer generator.
  3084. if (context.method !== "return") {
  3085. context.method = "next";
  3086. context.arg = undefined;
  3087. }
  3088. } else {
  3089. // Re-yield the result returned by the delegate method.
  3090. return info;
  3091. }
  3092. // The delegate iterator is finished, so forget it and continue with
  3093. // the outer generator.
  3094. context.delegate = null;
  3095. return ContinueSentinel;
  3096. }
  3097. // Define Generator.prototype.{next,throw,return} in terms of the
  3098. // unified ._invoke helper method.
  3099. defineIteratorMethods(Gp);
  3100. Gp[toStringTagSymbol] = "Generator";
  3101. // A Generator should always return itself as the iterator object when the
  3102. // @@iterator function is called on it. Some browsers' implementations of the
  3103. // iterator prototype chain incorrectly implement this, causing the Generator
  3104. // object to not be returned from this call. This ensures that doesn't happen.
  3105. // See https://github.com/facebook/regenerator/issues/274 for more details.
  3106. Gp[iteratorSymbol] = function() {
  3107. return this;
  3108. };
  3109. Gp.toString = function() {
  3110. return "[object Generator]";
  3111. };
  3112. function pushTryEntry(locs) {
  3113. var entry = { tryLoc: locs[0] };
  3114. if (1 in locs) {
  3115. entry.catchLoc = locs[1];
  3116. }
  3117. if (2 in locs) {
  3118. entry.finallyLoc = locs[2];
  3119. entry.afterLoc = locs[3];
  3120. }
  3121. this.tryEntries.push(entry);
  3122. }
  3123. function resetTryEntry(entry) {
  3124. var record = entry.completion || {};
  3125. record.type = "normal";
  3126. delete record.arg;
  3127. entry.completion = record;
  3128. }
  3129. function Context(tryLocsList) {
  3130. // The root entry object (effectively a try statement without a catch
  3131. // or a finally block) gives us a place to store values thrown from
  3132. // locations where there is no enclosing try statement.
  3133. this.tryEntries = [{ tryLoc: "root" }];
  3134. tryLocsList.forEach(pushTryEntry, this);
  3135. this.reset(true);
  3136. }
  3137. runtime.keys = function(object) {
  3138. var keys = [];
  3139. for (var key in object) {
  3140. keys.push(key);
  3141. }
  3142. keys.reverse();
  3143. // Rather than returning an object with a next method, we keep
  3144. // things simple and return the next function itself.
  3145. return function next() {
  3146. while (keys.length) {
  3147. var key = keys.pop();
  3148. if (key in object) {
  3149. next.value = key;
  3150. next.done = false;
  3151. return next;
  3152. }
  3153. }
  3154. // To avoid creating an additional object, we just hang the .value
  3155. // and .done properties off the next function object itself. This
  3156. // also ensures that the minifier will not anonymize the function.
  3157. next.done = true;
  3158. return next;
  3159. };
  3160. };
  3161. function values(iterable) {
  3162. if (iterable) {
  3163. var iteratorMethod = iterable[iteratorSymbol];
  3164. if (iteratorMethod) {
  3165. return iteratorMethod.call(iterable);
  3166. }
  3167. if (typeof iterable.next === "function") {
  3168. return iterable;
  3169. }
  3170. if (!isNaN(iterable.length)) {
  3171. var i = -1, next = function next() {
  3172. while (++i < iterable.length) {
  3173. if (hasOwn.call(iterable, i)) {
  3174. next.value = iterable[i];
  3175. next.done = false;
  3176. return next;
  3177. }
  3178. }
  3179. next.value = undefined;
  3180. next.done = true;
  3181. return next;
  3182. };
  3183. return next.next = next;
  3184. }
  3185. }
  3186. // Return an iterator with no values.
  3187. return { next: doneResult };
  3188. }
  3189. runtime.values = values;
  3190. function doneResult() {
  3191. return { value: undefined, done: true };
  3192. }
  3193. Context.prototype = {
  3194. constructor: Context,
  3195. reset: function(skipTempReset) {
  3196. this.prev = 0;
  3197. this.next = 0;
  3198. // Resetting context._sent for legacy support of Babel's
  3199. // function.sent implementation.
  3200. this.sent = this._sent = undefined;
  3201. this.done = false;
  3202. this.delegate = null;
  3203. this.method = "next";
  3204. this.arg = undefined;
  3205. this.tryEntries.forEach(resetTryEntry);
  3206. if (!skipTempReset) {
  3207. for (var name in this) {
  3208. // Not sure about the optimal order of these conditions:
  3209. if (name.charAt(0) === "t" &&
  3210. hasOwn.call(this, name) &&
  3211. !isNaN(+name.slice(1))) {
  3212. this[name] = undefined;
  3213. }
  3214. }
  3215. }
  3216. },
  3217. stop: function() {
  3218. this.done = true;
  3219. var rootEntry = this.tryEntries[0];
  3220. var rootRecord = rootEntry.completion;
  3221. if (rootRecord.type === "throw") {
  3222. throw rootRecord.arg;
  3223. }
  3224. return this.rval;
  3225. },
  3226. dispatchException: function(exception) {
  3227. if (this.done) {
  3228. throw exception;
  3229. }
  3230. var context = this;
  3231. function handle(loc, caught) {
  3232. record.type = "throw";
  3233. record.arg = exception;
  3234. context.next = loc;
  3235. if (caught) {
  3236. // If the dispatched exception was caught by a catch block,
  3237. // then let that catch block handle the exception normally.
  3238. context.method = "next";
  3239. context.arg = undefined;
  3240. }
  3241. return !! caught;
  3242. }
  3243. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  3244. var entry = this.tryEntries[i];
  3245. var record = entry.completion;
  3246. if (entry.tryLoc === "root") {
  3247. // Exception thrown outside of any try block that could handle
  3248. // it, so set the completion value of the entire function to
  3249. // throw the exception.
  3250. return handle("end");
  3251. }
  3252. if (entry.tryLoc <= this.prev) {
  3253. var hasCatch = hasOwn.call(entry, "catchLoc");
  3254. var hasFinally = hasOwn.call(entry, "finallyLoc");
  3255. if (hasCatch && hasFinally) {
  3256. if (this.prev < entry.catchLoc) {
  3257. return handle(entry.catchLoc, true);
  3258. } else if (this.prev < entry.finallyLoc) {
  3259. return handle(entry.finallyLoc);
  3260. }
  3261. } else if (hasCatch) {
  3262. if (this.prev < entry.catchLoc) {
  3263. return handle(entry.catchLoc, true);
  3264. }
  3265. } else if (hasFinally) {
  3266. if (this.prev < entry.finallyLoc) {
  3267. return handle(entry.finallyLoc);
  3268. }
  3269. } else {
  3270. throw new Error("try statement without catch or finally");
  3271. }
  3272. }
  3273. }
  3274. },
  3275. abrupt: function(type, arg) {
  3276. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  3277. var entry = this.tryEntries[i];
  3278. if (entry.tryLoc <= this.prev &&
  3279. hasOwn.call(entry, "finallyLoc") &&
  3280. this.prev < entry.finallyLoc) {
  3281. var finallyEntry = entry;
  3282. break;
  3283. }
  3284. }
  3285. if (finallyEntry &&
  3286. (type === "break" ||
  3287. type === "continue") &&
  3288. finallyEntry.tryLoc <= arg &&
  3289. arg <= finallyEntry.finallyLoc) {
  3290. // Ignore the finally entry if control is not jumping to a
  3291. // location outside the try/catch block.
  3292. finallyEntry = null;
  3293. }
  3294. var record = finallyEntry ? finallyEntry.completion : {};
  3295. record.type = type;
  3296. record.arg = arg;
  3297. if (finallyEntry) {
  3298. this.method = "next";
  3299. this.next = finallyEntry.finallyLoc;
  3300. return ContinueSentinel;
  3301. }
  3302. return this.complete(record);
  3303. },
  3304. complete: function(record, afterLoc) {
  3305. if (record.type === "throw") {
  3306. throw record.arg;
  3307. }
  3308. if (record.type === "break" ||
  3309. record.type === "continue") {
  3310. this.next = record.arg;
  3311. } else if (record.type === "return") {
  3312. this.rval = this.arg = record.arg;
  3313. this.method = "return";
  3314. this.next = "end";
  3315. } else if (record.type === "normal" && afterLoc) {
  3316. this.next = afterLoc;
  3317. }
  3318. return ContinueSentinel;
  3319. },
  3320. finish: function(finallyLoc) {
  3321. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  3322. var entry = this.tryEntries[i];
  3323. if (entry.finallyLoc === finallyLoc) {
  3324. this.complete(entry.completion, entry.afterLoc);
  3325. resetTryEntry(entry);
  3326. return ContinueSentinel;
  3327. }
  3328. }
  3329. },
  3330. "catch": function(tryLoc) {
  3331. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  3332. var entry = this.tryEntries[i];
  3333. if (entry.tryLoc === tryLoc) {
  3334. var record = entry.completion;
  3335. if (record.type === "throw") {
  3336. var thrown = record.arg;
  3337. resetTryEntry(entry);
  3338. }
  3339. return thrown;
  3340. }
  3341. }
  3342. // The context.catch method must only be called with a location
  3343. // argument that corresponds to a known catch block.
  3344. throw new Error("illegal catch attempt");
  3345. },
  3346. delegateYield: function(iterable, resultName, nextLoc) {
  3347. this.delegate = {
  3348. iterator: values(iterable),
  3349. resultName: resultName,
  3350. nextLoc: nextLoc
  3351. };
  3352. if (this.method === "next") {
  3353. // Deliberately forget the last sent value so that we don't
  3354. // accidentally pass it on to the delegate.
  3355. this.arg = undefined;
  3356. }
  3357. return ContinueSentinel;
  3358. }
  3359. };
  3360. })(
  3361. // In sloppy mode, unbound `this` refers to the global object, fallback to
  3362. // Function constructor if we're in global strict mode. That is sadly a form
  3363. // of indirect eval which violates Content Security Policy.
  3364. (function() {
  3365. return this || (typeof self === "object" && self);
  3366. })() || Function("return this")()
  3367. );
  3368. /***/ }),
  3369. /***/ 19:
  3370. /*!************************************************!*\
  3371. !*** C:/Users/Admin/Desktop/商城/core/formId.js ***!
  3372. \************************************************/
  3373. /*! no static exports found */
  3374. /***/ (function(module, exports, __webpack_require__) {
  3375. "use strict";
  3376. Object.defineProperty(exports, "__esModule", { value: true });exports.push = exports.popAll = void 0;var _utils = __webpack_require__(/*! ./utils.js */ 20);
  3377. var _cache = __webpack_require__(/*! ./cache.js */ 21);
  3378. var popAll = function popAll() {
  3379. var formIdList = (0, _cache.getStorageSync)('_FORM_ID_LIST');
  3380. (0, _cache.setStorageSync)('_FORM_ID_LIST', []);
  3381. return formIdList || [];
  3382. };exports.popAll = popAll;
  3383. var push = function push(formId) {
  3384. console.log(formId);
  3385. if (!formId || formId === 'the formId is a mock one') {
  3386. return false;
  3387. }
  3388. var formIdList = (0, _cache.getStorageSync)('_FORM_ID_LIST');
  3389. if (!formIdList || !formIdList.length) {
  3390. formIdList = [];
  3391. }
  3392. var item = {
  3393. value: formId,
  3394. type: 0,
  3395. remains: 1,
  3396. expires_at: (0, _utils.datetime)(null, (0, _utils.time)() + 7 * 86400 - 60) };
  3397. formIdList.push(item);
  3398. (0, _cache.setStorageSync)('_FORM_ID_LIST', formIdList);
  3399. };exports.push = push;
  3400. /***/ }),
  3401. /***/ 1919:
  3402. /*!***************************************************************************************!*\
  3403. !*** C:/Users/Admin/Desktop/商城/components/basic-component/app-rich/libs/html2json.js ***!
  3404. \***************************************************************************************/
  3405. /*! no static exports found */
  3406. /***/ (function(module, exports, __webpack_require__) {
  3407. "use strict";
  3408. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _wxDiscode = _interopRequireDefault(__webpack_require__(/*! ./wxDiscode */ 1920));
  3409. var _htmlparser = _interopRequireDefault(__webpack_require__(/*! ./htmlparser */ 1921));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  3410. function makeMap(str) {
  3411. var obj = {};
  3412. var items = str.split(',');
  3413. for (var i = 0; i < items.length; i += 1) {obj[items[i]] = true;}
  3414. return obj;
  3415. }
  3416. var block = makeMap('br,code,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video');
  3417. var inline = makeMap('a,abbr,acronym,applet,b,basefont,bdo,big,button,cite,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var');
  3418. var closeSelf = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr');
  3419. function removeDOCTYPE(html) {
  3420. var isDocument = /<body.*>([^]*)<\/body>/.test(html);
  3421. return isDocument ? RegExp.$1 : html;
  3422. }
  3423. function trimHtml(html) {
  3424. return html.
  3425. replace(/<!--.*?-->/gi, '').
  3426. replace(/\/\*.*?\*\//gi, '').
  3427. replace(/[ ]+</gi, '<').
  3428. replace(/<script[^]*<\/script>/gi, '').
  3429. replace(/<style[^]*<\/style>/gi, '');
  3430. }
  3431. function getScreenInfo() {
  3432. var screen = {};
  3433. wx.getSystemInfo({
  3434. success: function success(res) {
  3435. screen.width = res.windowWidth;
  3436. screen.height = res.windowHeight;
  3437. } });
  3438. return screen;
  3439. }
  3440. function html2json(html, customHandler, imageProp, host) {
  3441. // 处理字符串
  3442. html = removeDOCTYPE(html);
  3443. // 去除注释 样式 js
  3444. html = trimHtml(html);
  3445. html = _wxDiscode.default.strDiscode(html);
  3446. var bufArray = [];
  3447. var results = {
  3448. nodes: [],
  3449. imageUrls: [] };
  3450. var screen = getScreenInfo();
  3451. function Node(tag) {
  3452. this.node = 'element';
  3453. this.tag = tag;
  3454. this.$screen = screen;
  3455. }
  3456. (0, _htmlparser.default)(html, {
  3457. start: function start(tag, attrs, unary) {
  3458. var node = new Node(tag);
  3459. if (bufArray.length !== 0) {
  3460. var parent = bufArray[0];
  3461. if (parent.nodes === undefined) {
  3462. parent.nodes = [];
  3463. }
  3464. }
  3465. if (block[tag]) {
  3466. node.tagType = 'block';
  3467. } else if (inline[tag]) {
  3468. node.tagType = 'inline';
  3469. } else if (closeSelf[tag]) {
  3470. node.tagType = 'closeSelf';
  3471. }
  3472. node.attr = attrs.reduce(function (pre, attr) {var
  3473. name = attr.name;var
  3474. value = attr.value;
  3475. if (name === 'class') {
  3476. node.classStr = value;
  3477. }
  3478. if (name === 'style') {
  3479. node.styleStr = value;
  3480. }
  3481. if (value.match(/ /)) {
  3482. value = value.split(' ');
  3483. }
  3484. // merge it
  3485. if (pre[name]) {
  3486. if (Array.isArray(pre[name])) {
  3487. // already array, push to last
  3488. pre[name].push(value);
  3489. } else {
  3490. // single value, make it array
  3491. pre[name] = [pre[name], value];
  3492. }
  3493. } else {
  3494. // not exist, put it
  3495. pre[name] = value;
  3496. }
  3497. return pre;
  3498. }, {});
  3499. // 优化样式相关属性
  3500. if (node.classStr) {
  3501. node.classStr += " ".concat(node.tag);
  3502. } else {
  3503. node.classStr = node.tag;
  3504. }
  3505. if (node.tagType === 'inline') {
  3506. node.classStr += ' inline';
  3507. }
  3508. // 对img添加额外数据
  3509. if (node.tag === 'img') {
  3510. var imgUrl = node.attr.src;
  3511. imgUrl = _wxDiscode.default.urlToHttpUrl(imgUrl, imageProp.domain);
  3512. Object.assign(node.attr, imageProp, {
  3513. src: imgUrl || '' });
  3514. if (imgUrl) {
  3515. results.imageUrls.push(imgUrl);
  3516. }
  3517. }
  3518. // 处理a标签属性
  3519. if (node.tag === 'a') {
  3520. node.attr.href = node.attr.href || '';
  3521. }
  3522. // 处理font标签样式属性
  3523. if (node.tag === 'font') {
  3524. var fontSize = [
  3525. 'x-small',
  3526. 'small',
  3527. 'medium',
  3528. 'large',
  3529. 'x-large',
  3530. 'xx-large',
  3531. '-webkit-xxx-large'];
  3532. var styleAttrs = {
  3533. color: 'color',
  3534. face: 'font-family',
  3535. size: 'font-size' };
  3536. if (!node.styleStr) node.styleStr = '';
  3537. Object.keys(styleAttrs).forEach(function (key) {
  3538. if (node.attr[key]) {
  3539. var value = key === 'size' ? fontSize[node.attr[key] - 1] : node.attr[key];
  3540. node.styleStr += "".concat(styleAttrs[key], ": ").concat(value, ";");
  3541. }
  3542. });
  3543. }
  3544. // 临时记录source资源
  3545. if (node.tag === 'source') {
  3546. results.source = node.attr.src;
  3547. }
  3548. if (customHandler.start) {
  3549. customHandler.start(node, results);
  3550. }
  3551. if (unary) {
  3552. // if this tag doesn't have end tag
  3553. // like <img src="hoge.png"/>
  3554. // add to parents
  3555. var _parent = bufArray[0] || results;
  3556. if (_parent.nodes === undefined) {
  3557. _parent.nodes = [];
  3558. }
  3559. _parent.nodes.push(node);
  3560. } else {
  3561. bufArray.unshift(node);
  3562. }
  3563. },
  3564. end: function end(tag) {
  3565. var node = bufArray.shift();
  3566. if (node.tag !== tag) {
  3567. console.error('invalid state: mismatch end tag');
  3568. }
  3569. if (node.tag === 'video' && results.source) {
  3570. node.attr.src = results.source;
  3571. delete results.source;
  3572. }
  3573. if (customHandler.end) {
  3574. customHandler.end(node, results);
  3575. }
  3576. if (bufArray.length === 0) {
  3577. results.nodes.push(node);
  3578. } else {
  3579. var parent = bufArray[0];
  3580. if (!parent.nodes) {
  3581. parent.nodes = [];
  3582. }
  3583. parent.nodes.push(node);
  3584. }
  3585. },
  3586. chars: function chars(text) {
  3587. if (!text.trim()) return;
  3588. var node = {
  3589. node: 'text',
  3590. text: text };
  3591. if (customHandler.chars) {
  3592. customHandler.chars(node, results);
  3593. }
  3594. if (bufArray.length === 0) {
  3595. results.nodes.push(node);
  3596. } else {
  3597. var parent = bufArray[0];
  3598. if (parent.nodes === undefined) {
  3599. parent.nodes = [];
  3600. }
  3601. parent.nodes.push(node);
  3602. }
  3603. } });
  3604. return results;
  3605. }var _default =
  3606. html2json;exports.default = _default;
  3607. /***/ }),
  3608. /***/ 1920:
  3609. /*!***************************************************************************************!*\
  3610. !*** C:/Users/Admin/Desktop/商城/components/basic-component/app-rich/libs/wxDiscode.js ***!
  3611. \***************************************************************************************/
  3612. /*! no static exports found */
  3613. /***/ (function(module, exports, __webpack_require__) {
  3614. "use strict";
  3615. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // HTML 支持的数学符号
  3616. function strNumDiscode(str) {
  3617. str = str.replace(/&forall;/g, '∀');
  3618. str = str.replace(/&part;/g, '∂');
  3619. str = str.replace(/&exist;/g, '∃');
  3620. str = str.replace(/&empty;/g, '∅');
  3621. str = str.replace(/&nabla;/g, '∇');
  3622. str = str.replace(/&isin;/g, '∈');
  3623. str = str.replace(/&notin;/g, '∉');
  3624. str = str.replace(/&ni;/g, '∋');
  3625. str = str.replace(/&prod;/g, '∏');
  3626. str = str.replace(/&sum;/g, '∑');
  3627. str = str.replace(/&minus;/g, '−');
  3628. str = str.replace(/&lowast;/g, '∗');
  3629. str = str.replace(/&radic;/g, '√');
  3630. str = str.replace(/&prop;/g, '∝');
  3631. str = str.replace(/&infin;/g, '∞');
  3632. str = str.replace(/&ang;/g, '∠');
  3633. str = str.replace(/&and;/g, '∧');
  3634. str = str.replace(/&or;/g, '∨');
  3635. str = str.replace(/&cap;/g, '∩');
  3636. str = str.replace(/&cup;/g, '∪');
  3637. str = str.replace(/&int;/g, '∫');
  3638. str = str.replace(/&there4;/g, '∴');
  3639. str = str.replace(/&sim;/g, '∼');
  3640. str = str.replace(/&cong;/g, '≅');
  3641. str = str.replace(/&asymp;/g, '≈');
  3642. str = str.replace(/&ne;/g, '≠');
  3643. str = str.replace(/&le;/g, '≤');
  3644. str = str.replace(/&ge;/g, '≥');
  3645. str = str.replace(/&sub;/g, '⊂');
  3646. str = str.replace(/&sup;/g, '⊃');
  3647. str = str.replace(/&nsub;/g, '⊄');
  3648. str = str.replace(/&sube;/g, '⊆');
  3649. str = str.replace(/&supe;/g, '⊇');
  3650. str = str.replace(/&oplus;/g, '⊕');
  3651. str = str.replace(/&otimes;/g, '⊗');
  3652. str = str.replace(/&perp;/g, '⊥');
  3653. str = str.replace(/&sdot;/g, '⋅');
  3654. return str;
  3655. }
  3656. // HTML 支持的希腊字母
  3657. function strGreeceDiscode(str) {
  3658. str = str.replace(/&Alpha;/g, 'Α');
  3659. str = str.replace(/&Beta;/g, 'Β');
  3660. str = str.replace(/&Gamma;/g, 'Γ');
  3661. str = str.replace(/&Delta;/g, 'Δ');
  3662. str = str.replace(/&Epsilon;/g, 'Ε');
  3663. str = str.replace(/&Zeta;/g, 'Ζ');
  3664. str = str.replace(/&Eta;/g, 'Η');
  3665. str = str.replace(/&Theta;/g, 'Θ');
  3666. str = str.replace(/&Iota;/g, 'Ι');
  3667. str = str.replace(/&Kappa;/g, 'Κ');
  3668. str = str.replace(/&Lambda;/g, 'Λ');
  3669. str = str.replace(/&Mu;/g, 'Μ');
  3670. str = str.replace(/&Nu;/g, 'Ν');
  3671. str = str.replace(/&Xi;/g, 'Ν');
  3672. str = str.replace(/&Omicron;/g, 'Ο');
  3673. str = str.replace(/&Pi;/g, 'Π');
  3674. str = str.replace(/&Rho;/g, 'Ρ');
  3675. str = str.replace(/&Sigma;/g, 'Σ');
  3676. str = str.replace(/&Tau;/g, 'Τ');
  3677. str = str.replace(/&Upsilon;/g, 'Υ');
  3678. str = str.replace(/&Phi;/g, 'Φ');
  3679. str = str.replace(/&Chi;/g, 'Χ');
  3680. str = str.replace(/&Psi;/g, 'Ψ');
  3681. str = str.replace(/&Omega;/g, 'Ω');
  3682. str = str.replace(/&alpha;/g, 'α');
  3683. str = str.replace(/&beta;/g, 'β');
  3684. str = str.replace(/&gamma;/g, 'γ');
  3685. str = str.replace(/&delta;/g, 'δ');
  3686. str = str.replace(/&epsilon;/g, 'ε');
  3687. str = str.replace(/&zeta;/g, 'ζ');
  3688. str = str.replace(/&eta;/g, 'η');
  3689. str = str.replace(/&theta;/g, 'θ');
  3690. str = str.replace(/&iota;/g, 'ι');
  3691. str = str.replace(/&kappa;/g, 'κ');
  3692. str = str.replace(/&lambda;/g, 'λ');
  3693. str = str.replace(/&mu;/g, 'μ');
  3694. str = str.replace(/&nu;/g, 'ν');
  3695. str = str.replace(/&xi;/g, 'ξ');
  3696. str = str.replace(/&omicron;/g, 'ο');
  3697. str = str.replace(/&pi;/g, 'π');
  3698. str = str.replace(/&rho;/g, 'ρ');
  3699. str = str.replace(/&sigmaf;/g, 'ς');
  3700. str = str.replace(/&sigma;/g, 'σ');
  3701. str = str.replace(/&tau;/g, 'τ');
  3702. str = str.replace(/&upsilon;/g, 'υ');
  3703. str = str.replace(/&phi;/g, 'φ');
  3704. str = str.replace(/&chi;/g, 'χ');
  3705. str = str.replace(/&psi;/g, 'ψ');
  3706. str = str.replace(/&omega;/g, 'ω');
  3707. str = str.replace(/&thetasym;/g, 'ϑ');
  3708. str = str.replace(/&upsih;/g, 'ϒ');
  3709. str = str.replace(/&piv;/g, 'ϖ');
  3710. str = str.replace(/&middot;/g, '·');
  3711. return str;
  3712. }
  3713. function strcharacterDiscode(str) {
  3714. // 加入常用解析
  3715. str = str.replace(/&nbsp;/g, ' ');
  3716. str = str.replace(/&ensp;/g, ' ');
  3717. str = str.replace(/&emsp;/g, ' ');
  3718. str = str.replace(/&quot;/g, "'");
  3719. str = str.replace(/&amp;/g, '&');
  3720. str = str.replace(/&lt;/g, '<');
  3721. str = str.replace(/&gt;/g, '>');
  3722. str = str.replace(/&#8226;/g, '•');
  3723. return str;
  3724. }
  3725. // HTML 支持的其他实体
  3726. function strOtherDiscode(str) {
  3727. str = str.replace(/&OElig;/g, 'Œ');
  3728. str = str.replace(/&oelig;/g, 'œ');
  3729. str = str.replace(/&Scaron;/g, 'Š');
  3730. str = str.replace(/&scaron;/g, 'š');
  3731. str = str.replace(/&Yuml;/g, 'Ÿ');
  3732. str = str.replace(/&fnof;/g, 'ƒ');
  3733. str = str.replace(/&circ;/g, 'ˆ');
  3734. str = str.replace(/&tilde;/g, '˜');
  3735. str = str.replace(/&ensp;/g, '');
  3736. str = str.replace(/&emsp;/g, '');
  3737. str = str.replace(/&thinsp;/g, '');
  3738. str = str.replace(/&zwnj;/g, '');
  3739. str = str.replace(/&zwj;/g, '');
  3740. str = str.replace(/&lrm;/g, '');
  3741. str = str.replace(/&rlm;/g, '');
  3742. str = str.replace(/&ndash;/g, '–');
  3743. str = str.replace(/&mdash;/g, '—');
  3744. str = str.replace(/&lsquo;/g, '‘');
  3745. str = str.replace(/&rsquo;/g, '’');
  3746. str = str.replace(/&sbquo;/g, '‚');
  3747. str = str.replace(/&ldquo;/g, '“');
  3748. str = str.replace(/&rdquo;/g, '”');
  3749. str = str.replace(/&bdquo;/g, '„');
  3750. str = str.replace(/&dagger;/g, '†');
  3751. str = str.replace(/&Dagger;/g, '‡');
  3752. str = str.replace(/&bull;/g, '•');
  3753. str = str.replace(/&hellip;/g, '…');
  3754. str = str.replace(/&permil;/g, '‰');
  3755. str = str.replace(/&prime;/g, '′');
  3756. str = str.replace(/&Prime;/g, '″');
  3757. str = str.replace(/&lsaquo;/g, '‹');
  3758. str = str.replace(/&rsaquo;/g, '›');
  3759. str = str.replace(/&oline;/g, '‾');
  3760. str = str.replace(/&euro;/g, '€');
  3761. str = str.replace(/&trade;/g, '™');
  3762. str = str.replace(/&larr;/g, '←');
  3763. str = str.replace(/&uarr;/g, '↑');
  3764. str = str.replace(/&rarr;/g, '→');
  3765. str = str.replace(/&darr;/g, '↓');
  3766. str = str.replace(/&harr;/g, '↔');
  3767. str = str.replace(/&crarr;/g, '↵');
  3768. str = str.replace(/&lceil;/g, '⌈');
  3769. str = str.replace(/&rceil;/g, '⌉');
  3770. str = str.replace(/&lfloor;/g, '⌊');
  3771. str = str.replace(/&rfloor;/g, '⌋');
  3772. str = str.replace(/&loz;/g, '◊');
  3773. str = str.replace(/&spades;/g, '♠');
  3774. str = str.replace(/&clubs;/g, '♣');
  3775. str = str.replace(/&hearts;/g, '♥');
  3776. str = str.replace(/&diams;/g, '♦');
  3777. str = str.replace(/&#39;/g, "'");
  3778. return str;
  3779. }
  3780. function strDiscode(str) {
  3781. str = strNumDiscode(str);
  3782. str = strGreeceDiscode(str);
  3783. str = strcharacterDiscode(str);
  3784. str = strOtherDiscode(str);
  3785. return str;
  3786. }
  3787. function urlToHttpUrl(url, domain) {
  3788. if (/^\/\//.test(url)) {
  3789. return "https:".concat(url);
  3790. } else if (/^\//.test(url)) {
  3791. return "https://".concat(domain).concat(url);
  3792. } else if (Array.isArray(url)) {
  3793. return arrUrl(url, domain);
  3794. }
  3795. return url;
  3796. }
  3797. function arrUrl(data, domain) {
  3798. for (var i = 0; i < data.length; i++) {
  3799. if (data[i] !== '') {
  3800. if (/^\/\//.test(data[i])) {
  3801. return "https:".concat(data[i]);
  3802. } else if (/^\//.test(data[i])) {
  3803. return "https://".concat(domain).concat(data[i]);
  3804. }
  3805. return data[i];
  3806. }
  3807. }
  3808. }var _default =
  3809. {
  3810. strDiscode: strDiscode,
  3811. urlToHttpUrl: urlToHttpUrl };exports.default = _default;
  3812. /***/ }),
  3813. /***/ 1921:
  3814. /*!****************************************************************************************!*\
  3815. !*** C:/Users/Admin/Desktop/商城/components/basic-component/app-rich/libs/htmlparser.js ***!
  3816. \****************************************************************************************/
  3817. /*! no static exports found */
  3818. /***/ (function(module, exports, __webpack_require__) {
  3819. "use strict";
  3820. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;
  3821. var startTag = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z0-9_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/;
  3822. var endTag = /^<\/([-A-Za-z0-9_]+)[^>]*>/;
  3823. var attr = /([a-zA-Z0-9_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g;
  3824. function makeMap(str) {
  3825. var obj = {};
  3826. var items = str.split(',');
  3827. for (var i = 0; i < items.length; i += 1) {obj[items[i]] = true;}
  3828. return obj;
  3829. }
  3830. var empty = makeMap('area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr');
  3831. var block = makeMap('address,code,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video');
  3832. var inline = makeMap('a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var');
  3833. var closeSelf = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr');
  3834. var fillAttrs = makeMap('checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected');
  3835. function HTMLParser(html, handler) {
  3836. var index;
  3837. var chars;
  3838. var match;
  3839. var last = html;
  3840. var stack = [];
  3841. stack.last = function () {return stack[stack.length - 1];};
  3842. function parseEndTag(tag, tagName) {
  3843. var pos;
  3844. if (!tagName) {
  3845. pos = 0;
  3846. } else {
  3847. tagName = tagName.toLowerCase();
  3848. for (pos = stack.length - 1; pos >= 0; pos -= 1) {
  3849. if (stack[pos] === tagName) break;
  3850. }
  3851. }
  3852. if (pos >= 0) {
  3853. for (var i = stack.length - 1; i >= pos; i -= 1) {
  3854. if (handler.end) handler.end(stack[i]);
  3855. }
  3856. stack.length = pos;
  3857. }
  3858. }
  3859. function parseStartTag(tag, tagName, rest, unary) {
  3860. tagName = tagName.toLowerCase();
  3861. if (block[tagName]) {
  3862. while (stack.last() && inline[stack.last()]) {
  3863. parseEndTag('', stack.last());
  3864. }
  3865. }
  3866. if (closeSelf[tagName] && stack.last() === tagName) {
  3867. parseEndTag('', tagName);
  3868. }
  3869. unary = empty[tagName] || !!unary;
  3870. if (!unary) stack.push(tagName);
  3871. if (handler.start) {
  3872. var attrs = [];
  3873. rest.replace(attr, function genAttr(matches, name) {
  3874. var value = arguments[2] || arguments[3] || arguments[4] || (fillAttrs[name] ? name : '');
  3875. attrs.push({
  3876. name: name,
  3877. value: value,
  3878. escaped: value.replace(/(^|[^\\])"/g, '$1\\"') // "
  3879. });
  3880. });
  3881. if (handler.start) {
  3882. handler.start(tagName, attrs, unary);
  3883. }
  3884. }
  3885. }
  3886. while (html) {
  3887. chars = true;
  3888. if (html.indexOf('</') === 0) {
  3889. match = html.match(endTag);
  3890. if (match) {
  3891. html = html.substring(match[0].length);
  3892. match[0].replace(endTag, parseEndTag);
  3893. chars = false;
  3894. }
  3895. } else if (html.indexOf('<') === 0) {
  3896. match = html.match(startTag);
  3897. if (match) {
  3898. html = html.substring(match[0].length);
  3899. match[0].replace(startTag, parseStartTag);
  3900. chars = false;
  3901. }
  3902. }
  3903. if (chars) {
  3904. index = html.indexOf('<');
  3905. var text = '';
  3906. while (index === 0) {
  3907. text += '<';
  3908. html = html.substring(1);
  3909. index = html.indexOf('<');
  3910. }
  3911. text += index < 0 ? html : html.substring(0, index);
  3912. html = index < 0 ? '' : html.substring(index);
  3913. if (handler.chars) handler.chars(text);
  3914. }
  3915. if (html === last) throw new Error("Parse Error: ".concat(html));
  3916. last = html;
  3917. }
  3918. parseEndTag();
  3919. }var _default =
  3920. HTMLParser;exports.default = _default;
  3921. /***/ }),
  3922. /***/ 2:
  3923. /*!******************************************************************************************!*\
  3924. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  3925. \******************************************************************************************/
  3926. /*! exports provided: default */
  3927. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3928. "use strict";
  3929. __webpack_require__.r(__webpack_exports__);
  3930. /* WEBPACK VAR INJECTION */(function(global) {/*!
  3931. * Vue.js v2.6.11
  3932. * (c) 2014-2020 Evan You
  3933. * Released under the MIT License.
  3934. */
  3935. /* */
  3936. var emptyObject = Object.freeze({});
  3937. // These helpers produce better VM code in JS engines due to their
  3938. // explicitness and function inlining.
  3939. function isUndef (v) {
  3940. return v === undefined || v === null
  3941. }
  3942. function isDef (v) {
  3943. return v !== undefined && v !== null
  3944. }
  3945. function isTrue (v) {
  3946. return v === true
  3947. }
  3948. function isFalse (v) {
  3949. return v === false
  3950. }
  3951. /**
  3952. * Check if value is primitive.
  3953. */
  3954. function isPrimitive (value) {
  3955. return (
  3956. typeof value === 'string' ||
  3957. typeof value === 'number' ||
  3958. // $flow-disable-line
  3959. typeof value === 'symbol' ||
  3960. typeof value === 'boolean'
  3961. )
  3962. }
  3963. /**
  3964. * Quick object check - this is primarily used to tell
  3965. * Objects from primitive values when we know the value
  3966. * is a JSON-compliant type.
  3967. */
  3968. function isObject (obj) {
  3969. return obj !== null && typeof obj === 'object'
  3970. }
  3971. /**
  3972. * Get the raw type string of a value, e.g., [object Object].
  3973. */
  3974. var _toString = Object.prototype.toString;
  3975. function toRawType (value) {
  3976. return _toString.call(value).slice(8, -1)
  3977. }
  3978. /**
  3979. * Strict object type check. Only returns true
  3980. * for plain JavaScript objects.
  3981. */
  3982. function isPlainObject (obj) {
  3983. return _toString.call(obj) === '[object Object]'
  3984. }
  3985. function isRegExp (v) {
  3986. return _toString.call(v) === '[object RegExp]'
  3987. }
  3988. /**
  3989. * Check if val is a valid array index.
  3990. */
  3991. function isValidArrayIndex (val) {
  3992. var n = parseFloat(String(val));
  3993. return n >= 0 && Math.floor(n) === n && isFinite(val)
  3994. }
  3995. function isPromise (val) {
  3996. return (
  3997. isDef(val) &&
  3998. typeof val.then === 'function' &&
  3999. typeof val.catch === 'function'
  4000. )
  4001. }
  4002. /**
  4003. * Convert a value to a string that is actually rendered.
  4004. */
  4005. function toString (val) {
  4006. return val == null
  4007. ? ''
  4008. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  4009. ? JSON.stringify(val, null, 2)
  4010. : String(val)
  4011. }
  4012. /**
  4013. * Convert an input value to a number for persistence.
  4014. * If the conversion fails, return original string.
  4015. */
  4016. function toNumber (val) {
  4017. var n = parseFloat(val);
  4018. return isNaN(n) ? val : n
  4019. }
  4020. /**
  4021. * Make a map and return a function for checking if a key
  4022. * is in that map.
  4023. */
  4024. function makeMap (
  4025. str,
  4026. expectsLowerCase
  4027. ) {
  4028. var map = Object.create(null);
  4029. var list = str.split(',');
  4030. for (var i = 0; i < list.length; i++) {
  4031. map[list[i]] = true;
  4032. }
  4033. return expectsLowerCase
  4034. ? function (val) { return map[val.toLowerCase()]; }
  4035. : function (val) { return map[val]; }
  4036. }
  4037. /**
  4038. * Check if a tag is a built-in tag.
  4039. */
  4040. var isBuiltInTag = makeMap('slot,component', true);
  4041. /**
  4042. * Check if an attribute is a reserved attribute.
  4043. */
  4044. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  4045. /**
  4046. * Remove an item from an array.
  4047. */
  4048. function remove (arr, item) {
  4049. if (arr.length) {
  4050. var index = arr.indexOf(item);
  4051. if (index > -1) {
  4052. return arr.splice(index, 1)
  4053. }
  4054. }
  4055. }
  4056. /**
  4057. * Check whether an object has the property.
  4058. */
  4059. var hasOwnProperty = Object.prototype.hasOwnProperty;
  4060. function hasOwn (obj, key) {
  4061. return hasOwnProperty.call(obj, key)
  4062. }
  4063. /**
  4064. * Create a cached version of a pure function.
  4065. */
  4066. function cached (fn) {
  4067. var cache = Object.create(null);
  4068. return (function cachedFn (str) {
  4069. var hit = cache[str];
  4070. return hit || (cache[str] = fn(str))
  4071. })
  4072. }
  4073. /**
  4074. * Camelize a hyphen-delimited string.
  4075. */
  4076. var camelizeRE = /-(\w)/g;
  4077. var camelize = cached(function (str) {
  4078. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  4079. });
  4080. /**
  4081. * Capitalize a string.
  4082. */
  4083. var capitalize = cached(function (str) {
  4084. return str.charAt(0).toUpperCase() + str.slice(1)
  4085. });
  4086. /**
  4087. * Hyphenate a camelCase string.
  4088. */
  4089. var hyphenateRE = /\B([A-Z])/g;
  4090. var hyphenate = cached(function (str) {
  4091. return str.replace(hyphenateRE, '-$1').toLowerCase()
  4092. });
  4093. /**
  4094. * Simple bind polyfill for environments that do not support it,
  4095. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  4096. * since native bind is now performant enough in most browsers.
  4097. * But removing it would mean breaking code that was able to run in
  4098. * PhantomJS 1.x, so this must be kept for backward compatibility.
  4099. */
  4100. /* istanbul ignore next */
  4101. function polyfillBind (fn, ctx) {
  4102. function boundFn (a) {
  4103. var l = arguments.length;
  4104. return l
  4105. ? l > 1
  4106. ? fn.apply(ctx, arguments)
  4107. : fn.call(ctx, a)
  4108. : fn.call(ctx)
  4109. }
  4110. boundFn._length = fn.length;
  4111. return boundFn
  4112. }
  4113. function nativeBind (fn, ctx) {
  4114. return fn.bind(ctx)
  4115. }
  4116. var bind = Function.prototype.bind
  4117. ? nativeBind
  4118. : polyfillBind;
  4119. /**
  4120. * Convert an Array-like object to a real Array.
  4121. */
  4122. function toArray (list, start) {
  4123. start = start || 0;
  4124. var i = list.length - start;
  4125. var ret = new Array(i);
  4126. while (i--) {
  4127. ret[i] = list[i + start];
  4128. }
  4129. return ret
  4130. }
  4131. /**
  4132. * Mix properties into target object.
  4133. */
  4134. function extend (to, _from) {
  4135. for (var key in _from) {
  4136. to[key] = _from[key];
  4137. }
  4138. return to
  4139. }
  4140. /**
  4141. * Merge an Array of Objects into a single Object.
  4142. */
  4143. function toObject (arr) {
  4144. var res = {};
  4145. for (var i = 0; i < arr.length; i++) {
  4146. if (arr[i]) {
  4147. extend(res, arr[i]);
  4148. }
  4149. }
  4150. return res
  4151. }
  4152. /* eslint-disable no-unused-vars */
  4153. /**
  4154. * Perform no operation.
  4155. * Stubbing args to make Flow happy without leaving useless transpiled code
  4156. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  4157. */
  4158. function noop (a, b, c) {}
  4159. /**
  4160. * Always return false.
  4161. */
  4162. var no = function (a, b, c) { return false; };
  4163. /* eslint-enable no-unused-vars */
  4164. /**
  4165. * Return the same value.
  4166. */
  4167. var identity = function (_) { return _; };
  4168. /**
  4169. * Check if two values are loosely equal - that is,
  4170. * if they are plain objects, do they have the same shape?
  4171. */
  4172. function looseEqual (a, b) {
  4173. if (a === b) { return true }
  4174. var isObjectA = isObject(a);
  4175. var isObjectB = isObject(b);
  4176. if (isObjectA && isObjectB) {
  4177. try {
  4178. var isArrayA = Array.isArray(a);
  4179. var isArrayB = Array.isArray(b);
  4180. if (isArrayA && isArrayB) {
  4181. return a.length === b.length && a.every(function (e, i) {
  4182. return looseEqual(e, b[i])
  4183. })
  4184. } else if (a instanceof Date && b instanceof Date) {
  4185. return a.getTime() === b.getTime()
  4186. } else if (!isArrayA && !isArrayB) {
  4187. var keysA = Object.keys(a);
  4188. var keysB = Object.keys(b);
  4189. return keysA.length === keysB.length && keysA.every(function (key) {
  4190. return looseEqual(a[key], b[key])
  4191. })
  4192. } else {
  4193. /* istanbul ignore next */
  4194. return false
  4195. }
  4196. } catch (e) {
  4197. /* istanbul ignore next */
  4198. return false
  4199. }
  4200. } else if (!isObjectA && !isObjectB) {
  4201. return String(a) === String(b)
  4202. } else {
  4203. return false
  4204. }
  4205. }
  4206. /**
  4207. * Return the first index at which a loosely equal value can be
  4208. * found in the array (if value is a plain object, the array must
  4209. * contain an object of the same shape), or -1 if it is not present.
  4210. */
  4211. function looseIndexOf (arr, val) {
  4212. for (var i = 0; i < arr.length; i++) {
  4213. if (looseEqual(arr[i], val)) { return i }
  4214. }
  4215. return -1
  4216. }
  4217. /**
  4218. * Ensure a function is called only once.
  4219. */
  4220. function once (fn) {
  4221. var called = false;
  4222. return function () {
  4223. if (!called) {
  4224. called = true;
  4225. fn.apply(this, arguments);
  4226. }
  4227. }
  4228. }
  4229. var ASSET_TYPES = [
  4230. 'component',
  4231. 'directive',
  4232. 'filter'
  4233. ];
  4234. var LIFECYCLE_HOOKS = [
  4235. 'beforeCreate',
  4236. 'created',
  4237. 'beforeMount',
  4238. 'mounted',
  4239. 'beforeUpdate',
  4240. 'updated',
  4241. 'beforeDestroy',
  4242. 'destroyed',
  4243. 'activated',
  4244. 'deactivated',
  4245. 'errorCaptured',
  4246. 'serverPrefetch'
  4247. ];
  4248. /* */
  4249. var config = ({
  4250. /**
  4251. * Option merge strategies (used in core/util/options)
  4252. */
  4253. // $flow-disable-line
  4254. optionMergeStrategies: Object.create(null),
  4255. /**
  4256. * Whether to suppress warnings.
  4257. */
  4258. silent: false,
  4259. /**
  4260. * Show production mode tip message on boot?
  4261. */
  4262. productionTip: "development" !== 'production',
  4263. /**
  4264. * Whether to enable devtools
  4265. */
  4266. devtools: "development" !== 'production',
  4267. /**
  4268. * Whether to record perf
  4269. */
  4270. performance: false,
  4271. /**
  4272. * Error handler for watcher errors
  4273. */
  4274. errorHandler: null,
  4275. /**
  4276. * Warn handler for watcher warns
  4277. */
  4278. warnHandler: null,
  4279. /**
  4280. * Ignore certain custom elements
  4281. */
  4282. ignoredElements: [],
  4283. /**
  4284. * Custom user key aliases for v-on
  4285. */
  4286. // $flow-disable-line
  4287. keyCodes: Object.create(null),
  4288. /**
  4289. * Check if a tag is reserved so that it cannot be registered as a
  4290. * component. This is platform-dependent and may be overwritten.
  4291. */
  4292. isReservedTag: no,
  4293. /**
  4294. * Check if an attribute is reserved so that it cannot be used as a component
  4295. * prop. This is platform-dependent and may be overwritten.
  4296. */
  4297. isReservedAttr: no,
  4298. /**
  4299. * Check if a tag is an unknown element.
  4300. * Platform-dependent.
  4301. */
  4302. isUnknownElement: no,
  4303. /**
  4304. * Get the namespace of an element
  4305. */
  4306. getTagNamespace: noop,
  4307. /**
  4308. * Parse the real tag name for the specific platform.
  4309. */
  4310. parsePlatformTagName: identity,
  4311. /**
  4312. * Check if an attribute must be bound using property, e.g. value
  4313. * Platform-dependent.
  4314. */
  4315. mustUseProp: no,
  4316. /**
  4317. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  4318. * This will significantly reduce performance if set to false.
  4319. */
  4320. async: true,
  4321. /**
  4322. * Exposed for legacy reasons
  4323. */
  4324. _lifecycleHooks: LIFECYCLE_HOOKS
  4325. });
  4326. /* */
  4327. /**
  4328. * unicode letters used for parsing html tags, component names and property paths.
  4329. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  4330. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  4331. */
  4332. 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/;
  4333. /**
  4334. * Check if a string starts with $ or _
  4335. */
  4336. function isReserved (str) {
  4337. var c = (str + '').charCodeAt(0);
  4338. return c === 0x24 || c === 0x5F
  4339. }
  4340. /**
  4341. * Define a property.
  4342. */
  4343. function def (obj, key, val, enumerable) {
  4344. Object.defineProperty(obj, key, {
  4345. value: val,
  4346. enumerable: !!enumerable,
  4347. writable: true,
  4348. configurable: true
  4349. });
  4350. }
  4351. /**
  4352. * Parse simple path.
  4353. */
  4354. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  4355. function parsePath (path) {
  4356. if (bailRE.test(path)) {
  4357. return
  4358. }
  4359. var segments = path.split('.');
  4360. return function (obj) {
  4361. for (var i = 0; i < segments.length; i++) {
  4362. if (!obj) { return }
  4363. obj = obj[segments[i]];
  4364. }
  4365. return obj
  4366. }
  4367. }
  4368. /* */
  4369. // can we use __proto__?
  4370. var hasProto = '__proto__' in {};
  4371. // Browser environment sniffing
  4372. var inBrowser = typeof window !== 'undefined';
  4373. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  4374. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  4375. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  4376. var isIE = UA && /msie|trident/.test(UA);
  4377. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  4378. var isEdge = UA && UA.indexOf('edge/') > 0;
  4379. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  4380. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  4381. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  4382. var isPhantomJS = UA && /phantomjs/.test(UA);
  4383. var isFF = UA && UA.match(/firefox\/(\d+)/);
  4384. // Firefox has a "watch" function on Object.prototype...
  4385. var nativeWatch = ({}).watch;
  4386. if (inBrowser) {
  4387. try {
  4388. var opts = {};
  4389. Object.defineProperty(opts, 'passive', ({
  4390. get: function get () {
  4391. }
  4392. })); // https://github.com/facebook/flow/issues/285
  4393. window.addEventListener('test-passive', null, opts);
  4394. } catch (e) {}
  4395. }
  4396. // this needs to be lazy-evaled because vue may be required before
  4397. // vue-server-renderer can set VUE_ENV
  4398. var _isServer;
  4399. var isServerRendering = function () {
  4400. if (_isServer === undefined) {
  4401. /* istanbul ignore if */
  4402. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  4403. // detect presence of vue-server-renderer and avoid
  4404. // Webpack shimming the process
  4405. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  4406. } else {
  4407. _isServer = false;
  4408. }
  4409. }
  4410. return _isServer
  4411. };
  4412. // detect devtools
  4413. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  4414. /* istanbul ignore next */
  4415. function isNative (Ctor) {
  4416. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  4417. }
  4418. var hasSymbol =
  4419. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  4420. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  4421. var _Set;
  4422. /* istanbul ignore if */ // $flow-disable-line
  4423. if (typeof Set !== 'undefined' && isNative(Set)) {
  4424. // use native Set when available.
  4425. _Set = Set;
  4426. } else {
  4427. // a non-standard Set polyfill that only works with primitive keys.
  4428. _Set = /*@__PURE__*/(function () {
  4429. function Set () {
  4430. this.set = Object.create(null);
  4431. }
  4432. Set.prototype.has = function has (key) {
  4433. return this.set[key] === true
  4434. };
  4435. Set.prototype.add = function add (key) {
  4436. this.set[key] = true;
  4437. };
  4438. Set.prototype.clear = function clear () {
  4439. this.set = Object.create(null);
  4440. };
  4441. return Set;
  4442. }());
  4443. }
  4444. /* */
  4445. var warn = noop;
  4446. var tip = noop;
  4447. var generateComponentTrace = (noop); // work around flow check
  4448. var formatComponentName = (noop);
  4449. if (true) {
  4450. var hasConsole = typeof console !== 'undefined';
  4451. var classifyRE = /(?:^|[-_])(\w)/g;
  4452. var classify = function (str) { return str
  4453. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  4454. .replace(/[-_]/g, ''); };
  4455. warn = function (msg, vm) {
  4456. var trace = vm ? generateComponentTrace(vm) : '';
  4457. if (config.warnHandler) {
  4458. config.warnHandler.call(null, msg, vm, trace);
  4459. } else if (hasConsole && (!config.silent)) {
  4460. console.error(("[Vue warn]: " + msg + trace));
  4461. }
  4462. };
  4463. tip = function (msg, vm) {
  4464. if (hasConsole && (!config.silent)) {
  4465. console.warn("[Vue tip]: " + msg + (
  4466. vm ? generateComponentTrace(vm) : ''
  4467. ));
  4468. }
  4469. };
  4470. formatComponentName = function (vm, includeFile) {
  4471. {
  4472. if(vm.$scope && vm.$scope.is){
  4473. return vm.$scope.is
  4474. }
  4475. }
  4476. if (vm.$root === vm) {
  4477. return '<Root>'
  4478. }
  4479. var options = typeof vm === 'function' && vm.cid != null
  4480. ? vm.options
  4481. : vm._isVue
  4482. ? vm.$options || vm.constructor.options
  4483. : vm;
  4484. var name = options.name || options._componentTag;
  4485. var file = options.__file;
  4486. if (!name && file) {
  4487. var match = file.match(/([^/\\]+)\.vue$/);
  4488. name = match && match[1];
  4489. }
  4490. return (
  4491. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  4492. (file && includeFile !== false ? (" at " + file) : '')
  4493. )
  4494. };
  4495. var repeat = function (str, n) {
  4496. var res = '';
  4497. while (n) {
  4498. if (n % 2 === 1) { res += str; }
  4499. if (n > 1) { str += str; }
  4500. n >>= 1;
  4501. }
  4502. return res
  4503. };
  4504. generateComponentTrace = function (vm) {
  4505. if (vm._isVue && vm.$parent) {
  4506. var tree = [];
  4507. var currentRecursiveSequence = 0;
  4508. while (vm) {
  4509. if (tree.length > 0) {
  4510. var last = tree[tree.length - 1];
  4511. if (last.constructor === vm.constructor) {
  4512. currentRecursiveSequence++;
  4513. vm = vm.$parent;
  4514. continue
  4515. } else if (currentRecursiveSequence > 0) {
  4516. tree[tree.length - 1] = [last, currentRecursiveSequence];
  4517. currentRecursiveSequence = 0;
  4518. }
  4519. }
  4520. tree.push(vm);
  4521. vm = vm.$parent;
  4522. }
  4523. return '\n\nfound in\n\n' + tree
  4524. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  4525. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  4526. : formatComponentName(vm))); })
  4527. .join('\n')
  4528. } else {
  4529. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  4530. }
  4531. };
  4532. }
  4533. /* */
  4534. var uid = 0;
  4535. /**
  4536. * A dep is an observable that can have multiple
  4537. * directives subscribing to it.
  4538. */
  4539. var Dep = function Dep () {
  4540. // fixed by xxxxxx (nvue vuex)
  4541. /* eslint-disable no-undef */
  4542. if(typeof SharedObject !== 'undefined'){
  4543. this.id = SharedObject.uid++;
  4544. } else {
  4545. this.id = uid++;
  4546. }
  4547. this.subs = [];
  4548. };
  4549. Dep.prototype.addSub = function addSub (sub) {
  4550. this.subs.push(sub);
  4551. };
  4552. Dep.prototype.removeSub = function removeSub (sub) {
  4553. remove(this.subs, sub);
  4554. };
  4555. Dep.prototype.depend = function depend () {
  4556. if (Dep.SharedObject.target) {
  4557. Dep.SharedObject.target.addDep(this);
  4558. }
  4559. };
  4560. Dep.prototype.notify = function notify () {
  4561. // stabilize the subscriber list first
  4562. var subs = this.subs.slice();
  4563. if ( true && !config.async) {
  4564. // subs aren't sorted in scheduler if not running async
  4565. // we need to sort them now to make sure they fire in correct
  4566. // order
  4567. subs.sort(function (a, b) { return a.id - b.id; });
  4568. }
  4569. for (var i = 0, l = subs.length; i < l; i++) {
  4570. subs[i].update();
  4571. }
  4572. };
  4573. // The current target watcher being evaluated.
  4574. // This is globally unique because only one watcher
  4575. // can be evaluated at a time.
  4576. // fixed by xxxxxx (nvue shared vuex)
  4577. /* eslint-disable no-undef */
  4578. Dep.SharedObject = typeof SharedObject !== 'undefined' ? SharedObject : {};
  4579. Dep.SharedObject.target = null;
  4580. Dep.SharedObject.targetStack = [];
  4581. function pushTarget (target) {
  4582. Dep.SharedObject.targetStack.push(target);
  4583. Dep.SharedObject.target = target;
  4584. }
  4585. function popTarget () {
  4586. Dep.SharedObject.targetStack.pop();
  4587. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  4588. }
  4589. /* */
  4590. var VNode = function VNode (
  4591. tag,
  4592. data,
  4593. children,
  4594. text,
  4595. elm,
  4596. context,
  4597. componentOptions,
  4598. asyncFactory
  4599. ) {
  4600. this.tag = tag;
  4601. this.data = data;
  4602. this.children = children;
  4603. this.text = text;
  4604. this.elm = elm;
  4605. this.ns = undefined;
  4606. this.context = context;
  4607. this.fnContext = undefined;
  4608. this.fnOptions = undefined;
  4609. this.fnScopeId = undefined;
  4610. this.key = data && data.key;
  4611. this.componentOptions = componentOptions;
  4612. this.componentInstance = undefined;
  4613. this.parent = undefined;
  4614. this.raw = false;
  4615. this.isStatic = false;
  4616. this.isRootInsert = true;
  4617. this.isComment = false;
  4618. this.isCloned = false;
  4619. this.isOnce = false;
  4620. this.asyncFactory = asyncFactory;
  4621. this.asyncMeta = undefined;
  4622. this.isAsyncPlaceholder = false;
  4623. };
  4624. var prototypeAccessors = { child: { configurable: true } };
  4625. // DEPRECATED: alias for componentInstance for backwards compat.
  4626. /* istanbul ignore next */
  4627. prototypeAccessors.child.get = function () {
  4628. return this.componentInstance
  4629. };
  4630. Object.defineProperties( VNode.prototype, prototypeAccessors );
  4631. var createEmptyVNode = function (text) {
  4632. if ( text === void 0 ) text = '';
  4633. var node = new VNode();
  4634. node.text = text;
  4635. node.isComment = true;
  4636. return node
  4637. };
  4638. function createTextVNode (val) {
  4639. return new VNode(undefined, undefined, undefined, String(val))
  4640. }
  4641. // optimized shallow clone
  4642. // used for static nodes and slot nodes because they may be reused across
  4643. // multiple renders, cloning them avoids errors when DOM manipulations rely
  4644. // on their elm reference.
  4645. function cloneVNode (vnode) {
  4646. var cloned = new VNode(
  4647. vnode.tag,
  4648. vnode.data,
  4649. // #7975
  4650. // clone children array to avoid mutating original in case of cloning
  4651. // a child.
  4652. vnode.children && vnode.children.slice(),
  4653. vnode.text,
  4654. vnode.elm,
  4655. vnode.context,
  4656. vnode.componentOptions,
  4657. vnode.asyncFactory
  4658. );
  4659. cloned.ns = vnode.ns;
  4660. cloned.isStatic = vnode.isStatic;
  4661. cloned.key = vnode.key;
  4662. cloned.isComment = vnode.isComment;
  4663. cloned.fnContext = vnode.fnContext;
  4664. cloned.fnOptions = vnode.fnOptions;
  4665. cloned.fnScopeId = vnode.fnScopeId;
  4666. cloned.asyncMeta = vnode.asyncMeta;
  4667. cloned.isCloned = true;
  4668. return cloned
  4669. }
  4670. /*
  4671. * not type checking this file because flow doesn't play well with
  4672. * dynamically accessing methods on Array prototype
  4673. */
  4674. var arrayProto = Array.prototype;
  4675. var arrayMethods = Object.create(arrayProto);
  4676. var methodsToPatch = [
  4677. 'push',
  4678. 'pop',
  4679. 'shift',
  4680. 'unshift',
  4681. 'splice',
  4682. 'sort',
  4683. 'reverse'
  4684. ];
  4685. /**
  4686. * Intercept mutating methods and emit events
  4687. */
  4688. methodsToPatch.forEach(function (method) {
  4689. // cache original method
  4690. var original = arrayProto[method];
  4691. def(arrayMethods, method, function mutator () {
  4692. var args = [], len = arguments.length;
  4693. while ( len-- ) args[ len ] = arguments[ len ];
  4694. var result = original.apply(this, args);
  4695. var ob = this.__ob__;
  4696. var inserted;
  4697. switch (method) {
  4698. case 'push':
  4699. case 'unshift':
  4700. inserted = args;
  4701. break
  4702. case 'splice':
  4703. inserted = args.slice(2);
  4704. break
  4705. }
  4706. if (inserted) { ob.observeArray(inserted); }
  4707. // notify change
  4708. ob.dep.notify();
  4709. return result
  4710. });
  4711. });
  4712. /* */
  4713. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  4714. /**
  4715. * In some cases we may want to disable observation inside a component's
  4716. * update computation.
  4717. */
  4718. var shouldObserve = true;
  4719. function toggleObserving (value) {
  4720. shouldObserve = value;
  4721. }
  4722. /**
  4723. * Observer class that is attached to each observed
  4724. * object. Once attached, the observer converts the target
  4725. * object's property keys into getter/setters that
  4726. * collect dependencies and dispatch updates.
  4727. */
  4728. var Observer = function Observer (value) {
  4729. this.value = value;
  4730. this.dep = new Dep();
  4731. this.vmCount = 0;
  4732. def(value, '__ob__', this);
  4733. if (Array.isArray(value)) {
  4734. if (hasProto) {
  4735. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  4736. if(value.push !== value.__proto__.push){
  4737. copyAugment(value, arrayMethods, arrayKeys);
  4738. } else {
  4739. protoAugment(value, arrayMethods);
  4740. }
  4741. }
  4742. } else {
  4743. copyAugment(value, arrayMethods, arrayKeys);
  4744. }
  4745. this.observeArray(value);
  4746. } else {
  4747. this.walk(value);
  4748. }
  4749. };
  4750. /**
  4751. * Walk through all properties and convert them into
  4752. * getter/setters. This method should only be called when
  4753. * value type is Object.
  4754. */
  4755. Observer.prototype.walk = function walk (obj) {
  4756. var keys = Object.keys(obj);
  4757. for (var i = 0; i < keys.length; i++) {
  4758. defineReactive$$1(obj, keys[i]);
  4759. }
  4760. };
  4761. /**
  4762. * Observe a list of Array items.
  4763. */
  4764. Observer.prototype.observeArray = function observeArray (items) {
  4765. for (var i = 0, l = items.length; i < l; i++) {
  4766. observe(items[i]);
  4767. }
  4768. };
  4769. // helpers
  4770. /**
  4771. * Augment a target Object or Array by intercepting
  4772. * the prototype chain using __proto__
  4773. */
  4774. function protoAugment (target, src) {
  4775. /* eslint-disable no-proto */
  4776. target.__proto__ = src;
  4777. /* eslint-enable no-proto */
  4778. }
  4779. /**
  4780. * Augment a target Object or Array by defining
  4781. * hidden properties.
  4782. */
  4783. /* istanbul ignore next */
  4784. function copyAugment (target, src, keys) {
  4785. for (var i = 0, l = keys.length; i < l; i++) {
  4786. var key = keys[i];
  4787. def(target, key, src[key]);
  4788. }
  4789. }
  4790. /**
  4791. * Attempt to create an observer instance for a value,
  4792. * returns the new observer if successfully observed,
  4793. * or the existing observer if the value already has one.
  4794. */
  4795. function observe (value, asRootData) {
  4796. if (!isObject(value) || value instanceof VNode) {
  4797. return
  4798. }
  4799. var ob;
  4800. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  4801. ob = value.__ob__;
  4802. } else if (
  4803. shouldObserve &&
  4804. !isServerRendering() &&
  4805. (Array.isArray(value) || isPlainObject(value)) &&
  4806. Object.isExtensible(value) &&
  4807. !value._isVue
  4808. ) {
  4809. ob = new Observer(value);
  4810. }
  4811. if (asRootData && ob) {
  4812. ob.vmCount++;
  4813. }
  4814. return ob
  4815. }
  4816. /**
  4817. * Define a reactive property on an Object.
  4818. */
  4819. function defineReactive$$1 (
  4820. obj,
  4821. key,
  4822. val,
  4823. customSetter,
  4824. shallow
  4825. ) {
  4826. var dep = new Dep();
  4827. var property = Object.getOwnPropertyDescriptor(obj, key);
  4828. if (property && property.configurable === false) {
  4829. return
  4830. }
  4831. // cater for pre-defined getter/setters
  4832. var getter = property && property.get;
  4833. var setter = property && property.set;
  4834. if ((!getter || setter) && arguments.length === 2) {
  4835. val = obj[key];
  4836. }
  4837. var childOb = !shallow && observe(val);
  4838. Object.defineProperty(obj, key, {
  4839. enumerable: true,
  4840. configurable: true,
  4841. get: function reactiveGetter () {
  4842. var value = getter ? getter.call(obj) : val;
  4843. if (Dep.SharedObject.target) { // fixed by xxxxxx
  4844. dep.depend();
  4845. if (childOb) {
  4846. childOb.dep.depend();
  4847. if (Array.isArray(value)) {
  4848. dependArray(value);
  4849. }
  4850. }
  4851. }
  4852. return value
  4853. },
  4854. set: function reactiveSetter (newVal) {
  4855. var value = getter ? getter.call(obj) : val;
  4856. /* eslint-disable no-self-compare */
  4857. if (newVal === value || (newVal !== newVal && value !== value)) {
  4858. return
  4859. }
  4860. /* eslint-enable no-self-compare */
  4861. if ( true && customSetter) {
  4862. customSetter();
  4863. }
  4864. // #7981: for accessor properties without setter
  4865. if (getter && !setter) { return }
  4866. if (setter) {
  4867. setter.call(obj, newVal);
  4868. } else {
  4869. val = newVal;
  4870. }
  4871. childOb = !shallow && observe(newVal);
  4872. dep.notify();
  4873. }
  4874. });
  4875. }
  4876. /**
  4877. * Set a property on an object. Adds the new property and
  4878. * triggers change notification if the property doesn't
  4879. * already exist.
  4880. */
  4881. function set (target, key, val) {
  4882. if ( true &&
  4883. (isUndef(target) || isPrimitive(target))
  4884. ) {
  4885. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  4886. }
  4887. if (Array.isArray(target) && isValidArrayIndex(key)) {
  4888. target.length = Math.max(target.length, key);
  4889. target.splice(key, 1, val);
  4890. return val
  4891. }
  4892. if (key in target && !(key in Object.prototype)) {
  4893. target[key] = val;
  4894. return val
  4895. }
  4896. var ob = (target).__ob__;
  4897. if (target._isVue || (ob && ob.vmCount)) {
  4898. true && warn(
  4899. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  4900. 'at runtime - declare it upfront in the data option.'
  4901. );
  4902. return val
  4903. }
  4904. if (!ob) {
  4905. target[key] = val;
  4906. return val
  4907. }
  4908. defineReactive$$1(ob.value, key, val);
  4909. ob.dep.notify();
  4910. return val
  4911. }
  4912. /**
  4913. * Delete a property and trigger change if necessary.
  4914. */
  4915. function del (target, key) {
  4916. if ( true &&
  4917. (isUndef(target) || isPrimitive(target))
  4918. ) {
  4919. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  4920. }
  4921. if (Array.isArray(target) && isValidArrayIndex(key)) {
  4922. target.splice(key, 1);
  4923. return
  4924. }
  4925. var ob = (target).__ob__;
  4926. if (target._isVue || (ob && ob.vmCount)) {
  4927. true && warn(
  4928. 'Avoid deleting properties on a Vue instance or its root $data ' +
  4929. '- just set it to null.'
  4930. );
  4931. return
  4932. }
  4933. if (!hasOwn(target, key)) {
  4934. return
  4935. }
  4936. delete target[key];
  4937. if (!ob) {
  4938. return
  4939. }
  4940. ob.dep.notify();
  4941. }
  4942. /**
  4943. * Collect dependencies on array elements when the array is touched, since
  4944. * we cannot intercept array element access like property getters.
  4945. */
  4946. function dependArray (value) {
  4947. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  4948. e = value[i];
  4949. e && e.__ob__ && e.__ob__.dep.depend();
  4950. if (Array.isArray(e)) {
  4951. dependArray(e);
  4952. }
  4953. }
  4954. }
  4955. /* */
  4956. /**
  4957. * Option overwriting strategies are functions that handle
  4958. * how to merge a parent option value and a child option
  4959. * value into the final value.
  4960. */
  4961. var strats = config.optionMergeStrategies;
  4962. /**
  4963. * Options with restrictions
  4964. */
  4965. if (true) {
  4966. strats.el = strats.propsData = function (parent, child, vm, key) {
  4967. if (!vm) {
  4968. warn(
  4969. "option \"" + key + "\" can only be used during instance " +
  4970. 'creation with the `new` keyword.'
  4971. );
  4972. }
  4973. return defaultStrat(parent, child)
  4974. };
  4975. }
  4976. /**
  4977. * Helper that recursively merges two data objects together.
  4978. */
  4979. function mergeData (to, from) {
  4980. if (!from) { return to }
  4981. var key, toVal, fromVal;
  4982. var keys = hasSymbol
  4983. ? Reflect.ownKeys(from)
  4984. : Object.keys(from);
  4985. for (var i = 0; i < keys.length; i++) {
  4986. key = keys[i];
  4987. // in case the object is already observed...
  4988. if (key === '__ob__') { continue }
  4989. toVal = to[key];
  4990. fromVal = from[key];
  4991. if (!hasOwn(to, key)) {
  4992. set(to, key, fromVal);
  4993. } else if (
  4994. toVal !== fromVal &&
  4995. isPlainObject(toVal) &&
  4996. isPlainObject(fromVal)
  4997. ) {
  4998. mergeData(toVal, fromVal);
  4999. }
  5000. }
  5001. return to
  5002. }
  5003. /**
  5004. * Data
  5005. */
  5006. function mergeDataOrFn (
  5007. parentVal,
  5008. childVal,
  5009. vm
  5010. ) {
  5011. if (!vm) {
  5012. // in a Vue.extend merge, both should be functions
  5013. if (!childVal) {
  5014. return parentVal
  5015. }
  5016. if (!parentVal) {
  5017. return childVal
  5018. }
  5019. // when parentVal & childVal are both present,
  5020. // we need to return a function that returns the
  5021. // merged result of both functions... no need to
  5022. // check if parentVal is a function here because
  5023. // it has to be a function to pass previous merges.
  5024. return function mergedDataFn () {
  5025. return mergeData(
  5026. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  5027. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  5028. )
  5029. }
  5030. } else {
  5031. return function mergedInstanceDataFn () {
  5032. // instance merge
  5033. var instanceData = typeof childVal === 'function'
  5034. ? childVal.call(vm, vm)
  5035. : childVal;
  5036. var defaultData = typeof parentVal === 'function'
  5037. ? parentVal.call(vm, vm)
  5038. : parentVal;
  5039. if (instanceData) {
  5040. return mergeData(instanceData, defaultData)
  5041. } else {
  5042. return defaultData
  5043. }
  5044. }
  5045. }
  5046. }
  5047. strats.data = function (
  5048. parentVal,
  5049. childVal,
  5050. vm
  5051. ) {
  5052. if (!vm) {
  5053. if (childVal && typeof childVal !== 'function') {
  5054. true && warn(
  5055. 'The "data" option should be a function ' +
  5056. 'that returns a per-instance value in component ' +
  5057. 'definitions.',
  5058. vm
  5059. );
  5060. return parentVal
  5061. }
  5062. return mergeDataOrFn(parentVal, childVal)
  5063. }
  5064. return mergeDataOrFn(parentVal, childVal, vm)
  5065. };
  5066. /**
  5067. * Hooks and props are merged as arrays.
  5068. */
  5069. function mergeHook (
  5070. parentVal,
  5071. childVal
  5072. ) {
  5073. var res = childVal
  5074. ? parentVal
  5075. ? parentVal.concat(childVal)
  5076. : Array.isArray(childVal)
  5077. ? childVal
  5078. : [childVal]
  5079. : parentVal;
  5080. return res
  5081. ? dedupeHooks(res)
  5082. : res
  5083. }
  5084. function dedupeHooks (hooks) {
  5085. var res = [];
  5086. for (var i = 0; i < hooks.length; i++) {
  5087. if (res.indexOf(hooks[i]) === -1) {
  5088. res.push(hooks[i]);
  5089. }
  5090. }
  5091. return res
  5092. }
  5093. LIFECYCLE_HOOKS.forEach(function (hook) {
  5094. strats[hook] = mergeHook;
  5095. });
  5096. /**
  5097. * Assets
  5098. *
  5099. * When a vm is present (instance creation), we need to do
  5100. * a three-way merge between constructor options, instance
  5101. * options and parent options.
  5102. */
  5103. function mergeAssets (
  5104. parentVal,
  5105. childVal,
  5106. vm,
  5107. key
  5108. ) {
  5109. var res = Object.create(parentVal || null);
  5110. if (childVal) {
  5111. true && assertObjectType(key, childVal, vm);
  5112. return extend(res, childVal)
  5113. } else {
  5114. return res
  5115. }
  5116. }
  5117. ASSET_TYPES.forEach(function (type) {
  5118. strats[type + 's'] = mergeAssets;
  5119. });
  5120. /**
  5121. * Watchers.
  5122. *
  5123. * Watchers hashes should not overwrite one
  5124. * another, so we merge them as arrays.
  5125. */
  5126. strats.watch = function (
  5127. parentVal,
  5128. childVal,
  5129. vm,
  5130. key
  5131. ) {
  5132. // work around Firefox's Object.prototype.watch...
  5133. if (parentVal === nativeWatch) { parentVal = undefined; }
  5134. if (childVal === nativeWatch) { childVal = undefined; }
  5135. /* istanbul ignore if */
  5136. if (!childVal) { return Object.create(parentVal || null) }
  5137. if (true) {
  5138. assertObjectType(key, childVal, vm);
  5139. }
  5140. if (!parentVal) { return childVal }
  5141. var ret = {};
  5142. extend(ret, parentVal);
  5143. for (var key$1 in childVal) {
  5144. var parent = ret[key$1];
  5145. var child = childVal[key$1];
  5146. if (parent && !Array.isArray(parent)) {
  5147. parent = [parent];
  5148. }
  5149. ret[key$1] = parent
  5150. ? parent.concat(child)
  5151. : Array.isArray(child) ? child : [child];
  5152. }
  5153. return ret
  5154. };
  5155. /**
  5156. * Other object hashes.
  5157. */
  5158. strats.props =
  5159. strats.methods =
  5160. strats.inject =
  5161. strats.computed = function (
  5162. parentVal,
  5163. childVal,
  5164. vm,
  5165. key
  5166. ) {
  5167. if (childVal && "development" !== 'production') {
  5168. assertObjectType(key, childVal, vm);
  5169. }
  5170. if (!parentVal) { return childVal }
  5171. var ret = Object.create(null);
  5172. extend(ret, parentVal);
  5173. if (childVal) { extend(ret, childVal); }
  5174. return ret
  5175. };
  5176. strats.provide = mergeDataOrFn;
  5177. /**
  5178. * Default strategy.
  5179. */
  5180. var defaultStrat = function (parentVal, childVal) {
  5181. return childVal === undefined
  5182. ? parentVal
  5183. : childVal
  5184. };
  5185. /**
  5186. * Validate component names
  5187. */
  5188. function checkComponents (options) {
  5189. for (var key in options.components) {
  5190. validateComponentName(key);
  5191. }
  5192. }
  5193. function validateComponentName (name) {
  5194. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  5195. warn(
  5196. 'Invalid component name: "' + name + '". Component names ' +
  5197. 'should conform to valid custom element name in html5 specification.'
  5198. );
  5199. }
  5200. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  5201. warn(
  5202. 'Do not use built-in or reserved HTML elements as component ' +
  5203. 'id: ' + name
  5204. );
  5205. }
  5206. }
  5207. /**
  5208. * Ensure all props option syntax are normalized into the
  5209. * Object-based format.
  5210. */
  5211. function normalizeProps (options, vm) {
  5212. var props = options.props;
  5213. if (!props) { return }
  5214. var res = {};
  5215. var i, val, name;
  5216. if (Array.isArray(props)) {
  5217. i = props.length;
  5218. while (i--) {
  5219. val = props[i];
  5220. if (typeof val === 'string') {
  5221. name = camelize(val);
  5222. res[name] = { type: null };
  5223. } else if (true) {
  5224. warn('props must be strings when using array syntax.');
  5225. }
  5226. }
  5227. } else if (isPlainObject(props)) {
  5228. for (var key in props) {
  5229. val = props[key];
  5230. name = camelize(key);
  5231. res[name] = isPlainObject(val)
  5232. ? val
  5233. : { type: val };
  5234. }
  5235. } else if (true) {
  5236. warn(
  5237. "Invalid value for option \"props\": expected an Array or an Object, " +
  5238. "but got " + (toRawType(props)) + ".",
  5239. vm
  5240. );
  5241. }
  5242. options.props = res;
  5243. }
  5244. /**
  5245. * Normalize all injections into Object-based format
  5246. */
  5247. function normalizeInject (options, vm) {
  5248. var inject = options.inject;
  5249. if (!inject) { return }
  5250. var normalized = options.inject = {};
  5251. if (Array.isArray(inject)) {
  5252. for (var i = 0; i < inject.length; i++) {
  5253. normalized[inject[i]] = { from: inject[i] };
  5254. }
  5255. } else if (isPlainObject(inject)) {
  5256. for (var key in inject) {
  5257. var val = inject[key];
  5258. normalized[key] = isPlainObject(val)
  5259. ? extend({ from: key }, val)
  5260. : { from: val };
  5261. }
  5262. } else if (true) {
  5263. warn(
  5264. "Invalid value for option \"inject\": expected an Array or an Object, " +
  5265. "but got " + (toRawType(inject)) + ".",
  5266. vm
  5267. );
  5268. }
  5269. }
  5270. /**
  5271. * Normalize raw function directives into object format.
  5272. */
  5273. function normalizeDirectives (options) {
  5274. var dirs = options.directives;
  5275. if (dirs) {
  5276. for (var key in dirs) {
  5277. var def$$1 = dirs[key];
  5278. if (typeof def$$1 === 'function') {
  5279. dirs[key] = { bind: def$$1, update: def$$1 };
  5280. }
  5281. }
  5282. }
  5283. }
  5284. function assertObjectType (name, value, vm) {
  5285. if (!isPlainObject(value)) {
  5286. warn(
  5287. "Invalid value for option \"" + name + "\": expected an Object, " +
  5288. "but got " + (toRawType(value)) + ".",
  5289. vm
  5290. );
  5291. }
  5292. }
  5293. /**
  5294. * Merge two option objects into a new one.
  5295. * Core utility used in both instantiation and inheritance.
  5296. */
  5297. function mergeOptions (
  5298. parent,
  5299. child,
  5300. vm
  5301. ) {
  5302. if (true) {
  5303. checkComponents(child);
  5304. }
  5305. if (typeof child === 'function') {
  5306. child = child.options;
  5307. }
  5308. normalizeProps(child, vm);
  5309. normalizeInject(child, vm);
  5310. normalizeDirectives(child);
  5311. // Apply extends and mixins on the child options,
  5312. // but only if it is a raw options object that isn't
  5313. // the result of another mergeOptions call.
  5314. // Only merged options has the _base property.
  5315. if (!child._base) {
  5316. if (child.extends) {
  5317. parent = mergeOptions(parent, child.extends, vm);
  5318. }
  5319. if (child.mixins) {
  5320. for (var i = 0, l = child.mixins.length; i < l; i++) {
  5321. parent = mergeOptions(parent, child.mixins[i], vm);
  5322. }
  5323. }
  5324. }
  5325. var options = {};
  5326. var key;
  5327. for (key in parent) {
  5328. mergeField(key);
  5329. }
  5330. for (key in child) {
  5331. if (!hasOwn(parent, key)) {
  5332. mergeField(key);
  5333. }
  5334. }
  5335. function mergeField (key) {
  5336. var strat = strats[key] || defaultStrat;
  5337. options[key] = strat(parent[key], child[key], vm, key);
  5338. }
  5339. return options
  5340. }
  5341. /**
  5342. * Resolve an asset.
  5343. * This function is used because child instances need access
  5344. * to assets defined in its ancestor chain.
  5345. */
  5346. function resolveAsset (
  5347. options,
  5348. type,
  5349. id,
  5350. warnMissing
  5351. ) {
  5352. /* istanbul ignore if */
  5353. if (typeof id !== 'string') {
  5354. return
  5355. }
  5356. var assets = options[type];
  5357. // check local registration variations first
  5358. if (hasOwn(assets, id)) { return assets[id] }
  5359. var camelizedId = camelize(id);
  5360. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  5361. var PascalCaseId = capitalize(camelizedId);
  5362. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  5363. // fallback to prototype chain
  5364. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  5365. if ( true && warnMissing && !res) {
  5366. warn(
  5367. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  5368. options
  5369. );
  5370. }
  5371. return res
  5372. }
  5373. /* */
  5374. function validateProp (
  5375. key,
  5376. propOptions,
  5377. propsData,
  5378. vm
  5379. ) {
  5380. var prop = propOptions[key];
  5381. var absent = !hasOwn(propsData, key);
  5382. var value = propsData[key];
  5383. // boolean casting
  5384. var booleanIndex = getTypeIndex(Boolean, prop.type);
  5385. if (booleanIndex > -1) {
  5386. if (absent && !hasOwn(prop, 'default')) {
  5387. value = false;
  5388. } else if (value === '' || value === hyphenate(key)) {
  5389. // only cast empty string / same name to boolean if
  5390. // boolean has higher priority
  5391. var stringIndex = getTypeIndex(String, prop.type);
  5392. if (stringIndex < 0 || booleanIndex < stringIndex) {
  5393. value = true;
  5394. }
  5395. }
  5396. }
  5397. // check default value
  5398. if (value === undefined) {
  5399. value = getPropDefaultValue(vm, prop, key);
  5400. // since the default value is a fresh copy,
  5401. // make sure to observe it.
  5402. var prevShouldObserve = shouldObserve;
  5403. toggleObserving(true);
  5404. observe(value);
  5405. toggleObserving(prevShouldObserve);
  5406. }
  5407. if (
  5408. true
  5409. ) {
  5410. assertProp(prop, key, value, vm, absent);
  5411. }
  5412. return value
  5413. }
  5414. /**
  5415. * Get the default value of a prop.
  5416. */
  5417. function getPropDefaultValue (vm, prop, key) {
  5418. // no default, return undefined
  5419. if (!hasOwn(prop, 'default')) {
  5420. return undefined
  5421. }
  5422. var def = prop.default;
  5423. // warn against non-factory defaults for Object & Array
  5424. if ( true && isObject(def)) {
  5425. warn(
  5426. 'Invalid default value for prop "' + key + '": ' +
  5427. 'Props with type Object/Array must use a factory function ' +
  5428. 'to return the default value.',
  5429. vm
  5430. );
  5431. }
  5432. // the raw prop value was also undefined from previous render,
  5433. // return previous default value to avoid unnecessary watcher trigger
  5434. if (vm && vm.$options.propsData &&
  5435. vm.$options.propsData[key] === undefined &&
  5436. vm._props[key] !== undefined
  5437. ) {
  5438. return vm._props[key]
  5439. }
  5440. // call factory function for non-Function types
  5441. // a value is Function if its prototype is function even across different execution context
  5442. return typeof def === 'function' && getType(prop.type) !== 'Function'
  5443. ? def.call(vm)
  5444. : def
  5445. }
  5446. /**
  5447. * Assert whether a prop is valid.
  5448. */
  5449. function assertProp (
  5450. prop,
  5451. name,
  5452. value,
  5453. vm,
  5454. absent
  5455. ) {
  5456. if (prop.required && absent) {
  5457. warn(
  5458. 'Missing required prop: "' + name + '"',
  5459. vm
  5460. );
  5461. return
  5462. }
  5463. if (value == null && !prop.required) {
  5464. return
  5465. }
  5466. var type = prop.type;
  5467. var valid = !type || type === true;
  5468. var expectedTypes = [];
  5469. if (type) {
  5470. if (!Array.isArray(type)) {
  5471. type = [type];
  5472. }
  5473. for (var i = 0; i < type.length && !valid; i++) {
  5474. var assertedType = assertType(value, type[i]);
  5475. expectedTypes.push(assertedType.expectedType || '');
  5476. valid = assertedType.valid;
  5477. }
  5478. }
  5479. if (!valid) {
  5480. warn(
  5481. getInvalidTypeMessage(name, value, expectedTypes),
  5482. vm
  5483. );
  5484. return
  5485. }
  5486. var validator = prop.validator;
  5487. if (validator) {
  5488. if (!validator(value)) {
  5489. warn(
  5490. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  5491. vm
  5492. );
  5493. }
  5494. }
  5495. }
  5496. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  5497. function assertType (value, type) {
  5498. var valid;
  5499. var expectedType = getType(type);
  5500. if (simpleCheckRE.test(expectedType)) {
  5501. var t = typeof value;
  5502. valid = t === expectedType.toLowerCase();
  5503. // for primitive wrapper objects
  5504. if (!valid && t === 'object') {
  5505. valid = value instanceof type;
  5506. }
  5507. } else if (expectedType === 'Object') {
  5508. valid = isPlainObject(value);
  5509. } else if (expectedType === 'Array') {
  5510. valid = Array.isArray(value);
  5511. } else {
  5512. valid = value instanceof type;
  5513. }
  5514. return {
  5515. valid: valid,
  5516. expectedType: expectedType
  5517. }
  5518. }
  5519. /**
  5520. * Use function string name to check built-in types,
  5521. * because a simple equality check will fail when running
  5522. * across different vms / iframes.
  5523. */
  5524. function getType (fn) {
  5525. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  5526. return match ? match[1] : ''
  5527. }
  5528. function isSameType (a, b) {
  5529. return getType(a) === getType(b)
  5530. }
  5531. function getTypeIndex (type, expectedTypes) {
  5532. if (!Array.isArray(expectedTypes)) {
  5533. return isSameType(expectedTypes, type) ? 0 : -1
  5534. }
  5535. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  5536. if (isSameType(expectedTypes[i], type)) {
  5537. return i
  5538. }
  5539. }
  5540. return -1
  5541. }
  5542. function getInvalidTypeMessage (name, value, expectedTypes) {
  5543. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  5544. " Expected " + (expectedTypes.map(capitalize).join(', '));
  5545. var expectedType = expectedTypes[0];
  5546. var receivedType = toRawType(value);
  5547. var expectedValue = styleValue(value, expectedType);
  5548. var receivedValue = styleValue(value, receivedType);
  5549. // check if we need to specify expected value
  5550. if (expectedTypes.length === 1 &&
  5551. isExplicable(expectedType) &&
  5552. !isBoolean(expectedType, receivedType)) {
  5553. message += " with value " + expectedValue;
  5554. }
  5555. message += ", got " + receivedType + " ";
  5556. // check if we need to specify received value
  5557. if (isExplicable(receivedType)) {
  5558. message += "with value " + receivedValue + ".";
  5559. }
  5560. return message
  5561. }
  5562. function styleValue (value, type) {
  5563. if (type === 'String') {
  5564. return ("\"" + value + "\"")
  5565. } else if (type === 'Number') {
  5566. return ("" + (Number(value)))
  5567. } else {
  5568. return ("" + value)
  5569. }
  5570. }
  5571. function isExplicable (value) {
  5572. var explicitTypes = ['string', 'number', 'boolean'];
  5573. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  5574. }
  5575. function isBoolean () {
  5576. var args = [], len = arguments.length;
  5577. while ( len-- ) args[ len ] = arguments[ len ];
  5578. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  5579. }
  5580. /* */
  5581. function handleError (err, vm, info) {
  5582. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  5583. // See: https://github.com/vuejs/vuex/issues/1505
  5584. pushTarget();
  5585. try {
  5586. if (vm) {
  5587. var cur = vm;
  5588. while ((cur = cur.$parent)) {
  5589. var hooks = cur.$options.errorCaptured;
  5590. if (hooks) {
  5591. for (var i = 0; i < hooks.length; i++) {
  5592. try {
  5593. var capture = hooks[i].call(cur, err, vm, info) === false;
  5594. if (capture) { return }
  5595. } catch (e) {
  5596. globalHandleError(e, cur, 'errorCaptured hook');
  5597. }
  5598. }
  5599. }
  5600. }
  5601. }
  5602. globalHandleError(err, vm, info);
  5603. } finally {
  5604. popTarget();
  5605. }
  5606. }
  5607. function invokeWithErrorHandling (
  5608. handler,
  5609. context,
  5610. args,
  5611. vm,
  5612. info
  5613. ) {
  5614. var res;
  5615. try {
  5616. res = args ? handler.apply(context, args) : handler.call(context);
  5617. if (res && !res._isVue && isPromise(res) && !res._handled) {
  5618. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  5619. // issue #9511
  5620. // avoid catch triggering multiple times when nested calls
  5621. res._handled = true;
  5622. }
  5623. } catch (e) {
  5624. handleError(e, vm, info);
  5625. }
  5626. return res
  5627. }
  5628. function globalHandleError (err, vm, info) {
  5629. if (config.errorHandler) {
  5630. try {
  5631. return config.errorHandler.call(null, err, vm, info)
  5632. } catch (e) {
  5633. // if the user intentionally throws the original error in the handler,
  5634. // do not log it twice
  5635. if (e !== err) {
  5636. logError(e, null, 'config.errorHandler');
  5637. }
  5638. }
  5639. }
  5640. logError(err, vm, info);
  5641. }
  5642. function logError (err, vm, info) {
  5643. if (true) {
  5644. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  5645. }
  5646. /* istanbul ignore else */
  5647. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  5648. console.error(err);
  5649. } else {
  5650. throw err
  5651. }
  5652. }
  5653. /* */
  5654. var callbacks = [];
  5655. var pending = false;
  5656. function flushCallbacks () {
  5657. pending = false;
  5658. var copies = callbacks.slice(0);
  5659. callbacks.length = 0;
  5660. for (var i = 0; i < copies.length; i++) {
  5661. copies[i]();
  5662. }
  5663. }
  5664. // Here we have async deferring wrappers using microtasks.
  5665. // In 2.5 we used (macro) tasks (in combination with microtasks).
  5666. // However, it has subtle problems when state is changed right before repaint
  5667. // (e.g. #6813, out-in transitions).
  5668. // Also, using (macro) tasks in event handler would cause some weird behaviors
  5669. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  5670. // So we now use microtasks everywhere, again.
  5671. // A major drawback of this tradeoff is that there are some scenarios
  5672. // where microtasks have too high a priority and fire in between supposedly
  5673. // sequential events (e.g. #4521, #6690, which have workarounds)
  5674. // or even between bubbling of the same event (#6566).
  5675. var timerFunc;
  5676. // The nextTick behavior leverages the microtask queue, which can be accessed
  5677. // via either native Promise.then or MutationObserver.
  5678. // MutationObserver has wider support, however it is seriously bugged in
  5679. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  5680. // completely stops working after triggering a few times... so, if native
  5681. // Promise is available, we will use it:
  5682. /* istanbul ignore next, $flow-disable-line */
  5683. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  5684. var p = Promise.resolve();
  5685. timerFunc = function () {
  5686. p.then(flushCallbacks);
  5687. // In problematic UIWebViews, Promise.then doesn't completely break, but
  5688. // it can get stuck in a weird state where callbacks are pushed into the
  5689. // microtask queue but the queue isn't being flushed, until the browser
  5690. // needs to do some other work, e.g. handle a timer. Therefore we can
  5691. // "force" the microtask queue to be flushed by adding an empty timer.
  5692. if (isIOS) { setTimeout(noop); }
  5693. };
  5694. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  5695. isNative(MutationObserver) ||
  5696. // PhantomJS and iOS 7.x
  5697. MutationObserver.toString() === '[object MutationObserverConstructor]'
  5698. )) {
  5699. // Use MutationObserver where native Promise is not available,
  5700. // e.g. PhantomJS, iOS7, Android 4.4
  5701. // (#6466 MutationObserver is unreliable in IE11)
  5702. var counter = 1;
  5703. var observer = new MutationObserver(flushCallbacks);
  5704. var textNode = document.createTextNode(String(counter));
  5705. observer.observe(textNode, {
  5706. characterData: true
  5707. });
  5708. timerFunc = function () {
  5709. counter = (counter + 1) % 2;
  5710. textNode.data = String(counter);
  5711. };
  5712. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  5713. // Fallback to setImmediate.
  5714. // Technically it leverages the (macro) task queue,
  5715. // but it is still a better choice than setTimeout.
  5716. timerFunc = function () {
  5717. setImmediate(flushCallbacks);
  5718. };
  5719. } else {
  5720. // Fallback to setTimeout.
  5721. timerFunc = function () {
  5722. setTimeout(flushCallbacks, 0);
  5723. };
  5724. }
  5725. function nextTick (cb, ctx) {
  5726. var _resolve;
  5727. callbacks.push(function () {
  5728. if (cb) {
  5729. try {
  5730. cb.call(ctx);
  5731. } catch (e) {
  5732. handleError(e, ctx, 'nextTick');
  5733. }
  5734. } else if (_resolve) {
  5735. _resolve(ctx);
  5736. }
  5737. });
  5738. if (!pending) {
  5739. pending = true;
  5740. timerFunc();
  5741. }
  5742. // $flow-disable-line
  5743. if (!cb && typeof Promise !== 'undefined') {
  5744. return new Promise(function (resolve) {
  5745. _resolve = resolve;
  5746. })
  5747. }
  5748. }
  5749. /* */
  5750. /* not type checking this file because flow doesn't play well with Proxy */
  5751. var initProxy;
  5752. if (true) {
  5753. var allowedGlobals = makeMap(
  5754. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  5755. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  5756. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  5757. 'require' // for Webpack/Browserify
  5758. );
  5759. var warnNonPresent = function (target, key) {
  5760. warn(
  5761. "Property or method \"" + key + "\" is not defined on the instance but " +
  5762. 'referenced during render. Make sure that this property is reactive, ' +
  5763. 'either in the data option, or for class-based components, by ' +
  5764. 'initializing the property. ' +
  5765. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  5766. target
  5767. );
  5768. };
  5769. var warnReservedPrefix = function (target, key) {
  5770. warn(
  5771. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  5772. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  5773. 'prevent conflicts with Vue internals. ' +
  5774. 'See: https://vuejs.org/v2/api/#data',
  5775. target
  5776. );
  5777. };
  5778. var hasProxy =
  5779. typeof Proxy !== 'undefined' && isNative(Proxy);
  5780. if (hasProxy) {
  5781. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  5782. config.keyCodes = new Proxy(config.keyCodes, {
  5783. set: function set (target, key, value) {
  5784. if (isBuiltInModifier(key)) {
  5785. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  5786. return false
  5787. } else {
  5788. target[key] = value;
  5789. return true
  5790. }
  5791. }
  5792. });
  5793. }
  5794. var hasHandler = {
  5795. has: function has (target, key) {
  5796. var has = key in target;
  5797. var isAllowed = allowedGlobals(key) ||
  5798. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  5799. if (!has && !isAllowed) {
  5800. if (key in target.$data) { warnReservedPrefix(target, key); }
  5801. else { warnNonPresent(target, key); }
  5802. }
  5803. return has || !isAllowed
  5804. }
  5805. };
  5806. var getHandler = {
  5807. get: function get (target, key) {
  5808. if (typeof key === 'string' && !(key in target)) {
  5809. if (key in target.$data) { warnReservedPrefix(target, key); }
  5810. else { warnNonPresent(target, key); }
  5811. }
  5812. return target[key]
  5813. }
  5814. };
  5815. initProxy = function initProxy (vm) {
  5816. if (hasProxy) {
  5817. // determine which proxy handler to use
  5818. var options = vm.$options;
  5819. var handlers = options.render && options.render._withStripped
  5820. ? getHandler
  5821. : hasHandler;
  5822. vm._renderProxy = new Proxy(vm, handlers);
  5823. } else {
  5824. vm._renderProxy = vm;
  5825. }
  5826. };
  5827. }
  5828. /* */
  5829. var seenObjects = new _Set();
  5830. /**
  5831. * Recursively traverse an object to evoke all converted
  5832. * getters, so that every nested property inside the object
  5833. * is collected as a "deep" dependency.
  5834. */
  5835. function traverse (val) {
  5836. _traverse(val, seenObjects);
  5837. seenObjects.clear();
  5838. }
  5839. function _traverse (val, seen) {
  5840. var i, keys;
  5841. var isA = Array.isArray(val);
  5842. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  5843. return
  5844. }
  5845. if (val.__ob__) {
  5846. var depId = val.__ob__.dep.id;
  5847. if (seen.has(depId)) {
  5848. return
  5849. }
  5850. seen.add(depId);
  5851. }
  5852. if (isA) {
  5853. i = val.length;
  5854. while (i--) { _traverse(val[i], seen); }
  5855. } else {
  5856. keys = Object.keys(val);
  5857. i = keys.length;
  5858. while (i--) { _traverse(val[keys[i]], seen); }
  5859. }
  5860. }
  5861. var mark;
  5862. var measure;
  5863. if (true) {
  5864. var perf = inBrowser && window.performance;
  5865. /* istanbul ignore if */
  5866. if (
  5867. perf &&
  5868. perf.mark &&
  5869. perf.measure &&
  5870. perf.clearMarks &&
  5871. perf.clearMeasures
  5872. ) {
  5873. mark = function (tag) { return perf.mark(tag); };
  5874. measure = function (name, startTag, endTag) {
  5875. perf.measure(name, startTag, endTag);
  5876. perf.clearMarks(startTag);
  5877. perf.clearMarks(endTag);
  5878. // perf.clearMeasures(name)
  5879. };
  5880. }
  5881. }
  5882. /* */
  5883. var normalizeEvent = cached(function (name) {
  5884. var passive = name.charAt(0) === '&';
  5885. name = passive ? name.slice(1) : name;
  5886. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  5887. name = once$$1 ? name.slice(1) : name;
  5888. var capture = name.charAt(0) === '!';
  5889. name = capture ? name.slice(1) : name;
  5890. return {
  5891. name: name,
  5892. once: once$$1,
  5893. capture: capture,
  5894. passive: passive
  5895. }
  5896. });
  5897. function createFnInvoker (fns, vm) {
  5898. function invoker () {
  5899. var arguments$1 = arguments;
  5900. var fns = invoker.fns;
  5901. if (Array.isArray(fns)) {
  5902. var cloned = fns.slice();
  5903. for (var i = 0; i < cloned.length; i++) {
  5904. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  5905. }
  5906. } else {
  5907. // return handler return value for single handlers
  5908. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  5909. }
  5910. }
  5911. invoker.fns = fns;
  5912. return invoker
  5913. }
  5914. function updateListeners (
  5915. on,
  5916. oldOn,
  5917. add,
  5918. remove$$1,
  5919. createOnceHandler,
  5920. vm
  5921. ) {
  5922. var name, def$$1, cur, old, event;
  5923. for (name in on) {
  5924. def$$1 = cur = on[name];
  5925. old = oldOn[name];
  5926. event = normalizeEvent(name);
  5927. if (isUndef(cur)) {
  5928. true && warn(
  5929. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  5930. vm
  5931. );
  5932. } else if (isUndef(old)) {
  5933. if (isUndef(cur.fns)) {
  5934. cur = on[name] = createFnInvoker(cur, vm);
  5935. }
  5936. if (isTrue(event.once)) {
  5937. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  5938. }
  5939. add(event.name, cur, event.capture, event.passive, event.params);
  5940. } else if (cur !== old) {
  5941. old.fns = cur;
  5942. on[name] = old;
  5943. }
  5944. }
  5945. for (name in oldOn) {
  5946. if (isUndef(on[name])) {
  5947. event = normalizeEvent(name);
  5948. remove$$1(event.name, oldOn[name], event.capture);
  5949. }
  5950. }
  5951. }
  5952. /* */
  5953. /* */
  5954. // fixed by xxxxxx (mp properties)
  5955. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  5956. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  5957. if (isUndef(propOptions)) {
  5958. return res
  5959. }
  5960. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  5961. var attrs = data.attrs;
  5962. var props = data.props;
  5963. if (isDef(attrs) || isDef(props)) {
  5964. for (var key in propOptions) {
  5965. var altKey = hyphenate(key);
  5966. var result = checkProp(res, props, key, altKey, true) ||
  5967. checkProp(res, attrs, key, altKey, false);
  5968. // externalClass
  5969. if (
  5970. result &&
  5971. res[key] &&
  5972. externalClasses.indexOf(altKey) !== -1 &&
  5973. context[camelize(res[key])]
  5974. ) {
  5975. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  5976. res[key] = context[camelize(res[key])];
  5977. }
  5978. }
  5979. }
  5980. return res
  5981. }
  5982. function extractPropsFromVNodeData (
  5983. data,
  5984. Ctor,
  5985. tag,
  5986. context// fixed by xxxxxx
  5987. ) {
  5988. // we are only extracting raw values here.
  5989. // validation and default values are handled in the child
  5990. // component itself.
  5991. var propOptions = Ctor.options.props;
  5992. if (isUndef(propOptions)) {
  5993. // fixed by xxxxxx
  5994. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  5995. }
  5996. var res = {};
  5997. var attrs = data.attrs;
  5998. var props = data.props;
  5999. if (isDef(attrs) || isDef(props)) {
  6000. for (var key in propOptions) {
  6001. var altKey = hyphenate(key);
  6002. if (true) {
  6003. var keyInLowerCase = key.toLowerCase();
  6004. if (
  6005. key !== keyInLowerCase &&
  6006. attrs && hasOwn(attrs, keyInLowerCase)
  6007. ) {
  6008. tip(
  6009. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  6010. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  6011. " \"" + key + "\". " +
  6012. "Note that HTML attributes are case-insensitive and camelCased " +
  6013. "props need to use their kebab-case equivalents when using in-DOM " +
  6014. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  6015. );
  6016. }
  6017. }
  6018. checkProp(res, props, key, altKey, true) ||
  6019. checkProp(res, attrs, key, altKey, false);
  6020. }
  6021. }
  6022. // fixed by xxxxxx
  6023. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  6024. }
  6025. function checkProp (
  6026. res,
  6027. hash,
  6028. key,
  6029. altKey,
  6030. preserve
  6031. ) {
  6032. if (isDef(hash)) {
  6033. if (hasOwn(hash, key)) {
  6034. res[key] = hash[key];
  6035. if (!preserve) {
  6036. delete hash[key];
  6037. }
  6038. return true
  6039. } else if (hasOwn(hash, altKey)) {
  6040. res[key] = hash[altKey];
  6041. if (!preserve) {
  6042. delete hash[altKey];
  6043. }
  6044. return true
  6045. }
  6046. }
  6047. return false
  6048. }
  6049. /* */
  6050. // The template compiler attempts to minimize the need for normalization by
  6051. // statically analyzing the template at compile time.
  6052. //
  6053. // For plain HTML markup, normalization can be completely skipped because the
  6054. // generated render function is guaranteed to return Array<VNode>. There are
  6055. // two cases where extra normalization is needed:
  6056. // 1. When the children contains components - because a functional component
  6057. // may return an Array instead of a single root. In this case, just a simple
  6058. // normalization is needed - if any child is an Array, we flatten the whole
  6059. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  6060. // because functional components already normalize their own children.
  6061. function simpleNormalizeChildren (children) {
  6062. for (var i = 0; i < children.length; i++) {
  6063. if (Array.isArray(children[i])) {
  6064. return Array.prototype.concat.apply([], children)
  6065. }
  6066. }
  6067. return children
  6068. }
  6069. // 2. When the children contains constructs that always generated nested Arrays,
  6070. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  6071. // with hand-written render functions / JSX. In such cases a full normalization
  6072. // is needed to cater to all possible types of children values.
  6073. function normalizeChildren (children) {
  6074. return isPrimitive(children)
  6075. ? [createTextVNode(children)]
  6076. : Array.isArray(children)
  6077. ? normalizeArrayChildren(children)
  6078. : undefined
  6079. }
  6080. function isTextNode (node) {
  6081. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  6082. }
  6083. function normalizeArrayChildren (children, nestedIndex) {
  6084. var res = [];
  6085. var i, c, lastIndex, last;
  6086. for (i = 0; i < children.length; i++) {
  6087. c = children[i];
  6088. if (isUndef(c) || typeof c === 'boolean') { continue }
  6089. lastIndex = res.length - 1;
  6090. last = res[lastIndex];
  6091. // nested
  6092. if (Array.isArray(c)) {
  6093. if (c.length > 0) {
  6094. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  6095. // merge adjacent text nodes
  6096. if (isTextNode(c[0]) && isTextNode(last)) {
  6097. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  6098. c.shift();
  6099. }
  6100. res.push.apply(res, c);
  6101. }
  6102. } else if (isPrimitive(c)) {
  6103. if (isTextNode(last)) {
  6104. // merge adjacent text nodes
  6105. // this is necessary for SSR hydration because text nodes are
  6106. // essentially merged when rendered to HTML strings
  6107. res[lastIndex] = createTextVNode(last.text + c);
  6108. } else if (c !== '') {
  6109. // convert primitive to vnode
  6110. res.push(createTextVNode(c));
  6111. }
  6112. } else {
  6113. if (isTextNode(c) && isTextNode(last)) {
  6114. // merge adjacent text nodes
  6115. res[lastIndex] = createTextVNode(last.text + c.text);
  6116. } else {
  6117. // default key for nested array children (likely generated by v-for)
  6118. if (isTrue(children._isVList) &&
  6119. isDef(c.tag) &&
  6120. isUndef(c.key) &&
  6121. isDef(nestedIndex)) {
  6122. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  6123. }
  6124. res.push(c);
  6125. }
  6126. }
  6127. }
  6128. return res
  6129. }
  6130. /* */
  6131. function initProvide (vm) {
  6132. var provide = vm.$options.provide;
  6133. if (provide) {
  6134. vm._provided = typeof provide === 'function'
  6135. ? provide.call(vm)
  6136. : provide;
  6137. }
  6138. }
  6139. function initInjections (vm) {
  6140. var result = resolveInject(vm.$options.inject, vm);
  6141. if (result) {
  6142. toggleObserving(false);
  6143. Object.keys(result).forEach(function (key) {
  6144. /* istanbul ignore else */
  6145. if (true) {
  6146. defineReactive$$1(vm, key, result[key], function () {
  6147. warn(
  6148. "Avoid mutating an injected value directly since the changes will be " +
  6149. "overwritten whenever the provided component re-renders. " +
  6150. "injection being mutated: \"" + key + "\"",
  6151. vm
  6152. );
  6153. });
  6154. } else {}
  6155. });
  6156. toggleObserving(true);
  6157. }
  6158. }
  6159. function resolveInject (inject, vm) {
  6160. if (inject) {
  6161. // inject is :any because flow is not smart enough to figure out cached
  6162. var result = Object.create(null);
  6163. var keys = hasSymbol
  6164. ? Reflect.ownKeys(inject)
  6165. : Object.keys(inject);
  6166. for (var i = 0; i < keys.length; i++) {
  6167. var key = keys[i];
  6168. // #6574 in case the inject object is observed...
  6169. if (key === '__ob__') { continue }
  6170. var provideKey = inject[key].from;
  6171. var source = vm;
  6172. while (source) {
  6173. if (source._provided && hasOwn(source._provided, provideKey)) {
  6174. result[key] = source._provided[provideKey];
  6175. break
  6176. }
  6177. source = source.$parent;
  6178. }
  6179. if (!source) {
  6180. if ('default' in inject[key]) {
  6181. var provideDefault = inject[key].default;
  6182. result[key] = typeof provideDefault === 'function'
  6183. ? provideDefault.call(vm)
  6184. : provideDefault;
  6185. } else if (true) {
  6186. warn(("Injection \"" + key + "\" not found"), vm);
  6187. }
  6188. }
  6189. }
  6190. return result
  6191. }
  6192. }
  6193. /* */
  6194. /**
  6195. * Runtime helper for resolving raw children VNodes into a slot object.
  6196. */
  6197. function resolveSlots (
  6198. children,
  6199. context
  6200. ) {
  6201. if (!children || !children.length) {
  6202. return {}
  6203. }
  6204. var slots = {};
  6205. for (var i = 0, l = children.length; i < l; i++) {
  6206. var child = children[i];
  6207. var data = child.data;
  6208. // remove slot attribute if the node is resolved as a Vue slot node
  6209. if (data && data.attrs && data.attrs.slot) {
  6210. delete data.attrs.slot;
  6211. }
  6212. // named slots should only be respected if the vnode was rendered in the
  6213. // same context.
  6214. if ((child.context === context || child.fnContext === context) &&
  6215. data && data.slot != null
  6216. ) {
  6217. var name = data.slot;
  6218. var slot = (slots[name] || (slots[name] = []));
  6219. if (child.tag === 'template') {
  6220. slot.push.apply(slot, child.children || []);
  6221. } else {
  6222. slot.push(child);
  6223. }
  6224. } else {
  6225. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  6226. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  6227. (slots['page'] || (slots['page'] = [])).push(child);
  6228. }else{
  6229. (slots.default || (slots.default = [])).push(child);
  6230. }
  6231. }
  6232. }
  6233. // ignore slots that contains only whitespace
  6234. for (var name$1 in slots) {
  6235. if (slots[name$1].every(isWhitespace)) {
  6236. delete slots[name$1];
  6237. }
  6238. }
  6239. return slots
  6240. }
  6241. function isWhitespace (node) {
  6242. return (node.isComment && !node.asyncFactory) || node.text === ' '
  6243. }
  6244. /* */
  6245. function normalizeScopedSlots (
  6246. slots,
  6247. normalSlots,
  6248. prevSlots
  6249. ) {
  6250. var res;
  6251. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  6252. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  6253. var key = slots && slots.$key;
  6254. if (!slots) {
  6255. res = {};
  6256. } else if (slots._normalized) {
  6257. // fast path 1: child component re-render only, parent did not change
  6258. return slots._normalized
  6259. } else if (
  6260. isStable &&
  6261. prevSlots &&
  6262. prevSlots !== emptyObject &&
  6263. key === prevSlots.$key &&
  6264. !hasNormalSlots &&
  6265. !prevSlots.$hasNormal
  6266. ) {
  6267. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  6268. // only need to normalize once
  6269. return prevSlots
  6270. } else {
  6271. res = {};
  6272. for (var key$1 in slots) {
  6273. if (slots[key$1] && key$1[0] !== '$') {
  6274. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  6275. }
  6276. }
  6277. }
  6278. // expose normal slots on scopedSlots
  6279. for (var key$2 in normalSlots) {
  6280. if (!(key$2 in res)) {
  6281. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  6282. }
  6283. }
  6284. // avoriaz seems to mock a non-extensible $scopedSlots object
  6285. // and when that is passed down this would cause an error
  6286. if (slots && Object.isExtensible(slots)) {
  6287. (slots)._normalized = res;
  6288. }
  6289. def(res, '$stable', isStable);
  6290. def(res, '$key', key);
  6291. def(res, '$hasNormal', hasNormalSlots);
  6292. return res
  6293. }
  6294. function normalizeScopedSlot(normalSlots, key, fn) {
  6295. var normalized = function () {
  6296. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  6297. res = res && typeof res === 'object' && !Array.isArray(res)
  6298. ? [res] // single vnode
  6299. : normalizeChildren(res);
  6300. return res && (
  6301. res.length === 0 ||
  6302. (res.length === 1 && res[0].isComment) // #9658
  6303. ) ? undefined
  6304. : res
  6305. };
  6306. // this is a slot using the new v-slot syntax without scope. although it is
  6307. // compiled as a scoped slot, render fn users would expect it to be present
  6308. // on this.$slots because the usage is semantically a normal slot.
  6309. if (fn.proxy) {
  6310. Object.defineProperty(normalSlots, key, {
  6311. get: normalized,
  6312. enumerable: true,
  6313. configurable: true
  6314. });
  6315. }
  6316. return normalized
  6317. }
  6318. function proxyNormalSlot(slots, key) {
  6319. return function () { return slots[key]; }
  6320. }
  6321. /* */
  6322. /**
  6323. * Runtime helper for rendering v-for lists.
  6324. */
  6325. function renderList (
  6326. val,
  6327. render
  6328. ) {
  6329. var ret, i, l, keys, key;
  6330. if (Array.isArray(val) || typeof val === 'string') {
  6331. ret = new Array(val.length);
  6332. for (i = 0, l = val.length; i < l; i++) {
  6333. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  6334. }
  6335. } else if (typeof val === 'number') {
  6336. ret = new Array(val);
  6337. for (i = 0; i < val; i++) {
  6338. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  6339. }
  6340. } else if (isObject(val)) {
  6341. if (hasSymbol && val[Symbol.iterator]) {
  6342. ret = [];
  6343. var iterator = val[Symbol.iterator]();
  6344. var result = iterator.next();
  6345. while (!result.done) {
  6346. ret.push(render(result.value, ret.length, i++, i)); // fixed by xxxxxx
  6347. result = iterator.next();
  6348. }
  6349. } else {
  6350. keys = Object.keys(val);
  6351. ret = new Array(keys.length);
  6352. for (i = 0, l = keys.length; i < l; i++) {
  6353. key = keys[i];
  6354. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  6355. }
  6356. }
  6357. }
  6358. if (!isDef(ret)) {
  6359. ret = [];
  6360. }
  6361. (ret)._isVList = true;
  6362. return ret
  6363. }
  6364. /* */
  6365. /**
  6366. * Runtime helper for rendering <slot>
  6367. */
  6368. function renderSlot (
  6369. name,
  6370. fallback,
  6371. props,
  6372. bindObject
  6373. ) {
  6374. var scopedSlotFn = this.$scopedSlots[name];
  6375. var nodes;
  6376. if (scopedSlotFn) { // scoped slot
  6377. props = props || {};
  6378. if (bindObject) {
  6379. if ( true && !isObject(bindObject)) {
  6380. warn(
  6381. 'slot v-bind without argument expects an Object',
  6382. this
  6383. );
  6384. }
  6385. props = extend(extend({}, bindObject), props);
  6386. }
  6387. // fixed by xxxxxx app-plus scopedSlot
  6388. nodes = scopedSlotFn(props, this, props._i) || fallback;
  6389. } else {
  6390. nodes = this.$slots[name] || fallback;
  6391. }
  6392. var target = props && props.slot;
  6393. if (target) {
  6394. return this.$createElement('template', { slot: target }, nodes)
  6395. } else {
  6396. return nodes
  6397. }
  6398. }
  6399. /* */
  6400. /**
  6401. * Runtime helper for resolving filters
  6402. */
  6403. function resolveFilter (id) {
  6404. return resolveAsset(this.$options, 'filters', id, true) || identity
  6405. }
  6406. /* */
  6407. function isKeyNotMatch (expect, actual) {
  6408. if (Array.isArray(expect)) {
  6409. return expect.indexOf(actual) === -1
  6410. } else {
  6411. return expect !== actual
  6412. }
  6413. }
  6414. /**
  6415. * Runtime helper for checking keyCodes from config.
  6416. * exposed as Vue.prototype._k
  6417. * passing in eventKeyName as last argument separately for backwards compat
  6418. */
  6419. function checkKeyCodes (
  6420. eventKeyCode,
  6421. key,
  6422. builtInKeyCode,
  6423. eventKeyName,
  6424. builtInKeyName
  6425. ) {
  6426. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  6427. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  6428. return isKeyNotMatch(builtInKeyName, eventKeyName)
  6429. } else if (mappedKeyCode) {
  6430. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  6431. } else if (eventKeyName) {
  6432. return hyphenate(eventKeyName) !== key
  6433. }
  6434. }
  6435. /* */
  6436. /**
  6437. * Runtime helper for merging v-bind="object" into a VNode's data.
  6438. */
  6439. function bindObjectProps (
  6440. data,
  6441. tag,
  6442. value,
  6443. asProp,
  6444. isSync
  6445. ) {
  6446. if (value) {
  6447. if (!isObject(value)) {
  6448. true && warn(
  6449. 'v-bind without argument expects an Object or Array value',
  6450. this
  6451. );
  6452. } else {
  6453. if (Array.isArray(value)) {
  6454. value = toObject(value);
  6455. }
  6456. var hash;
  6457. var loop = function ( key ) {
  6458. if (
  6459. key === 'class' ||
  6460. key === 'style' ||
  6461. isReservedAttribute(key)
  6462. ) {
  6463. hash = data;
  6464. } else {
  6465. var type = data.attrs && data.attrs.type;
  6466. hash = asProp || config.mustUseProp(tag, type, key)
  6467. ? data.domProps || (data.domProps = {})
  6468. : data.attrs || (data.attrs = {});
  6469. }
  6470. var camelizedKey = camelize(key);
  6471. var hyphenatedKey = hyphenate(key);
  6472. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  6473. hash[key] = value[key];
  6474. if (isSync) {
  6475. var on = data.on || (data.on = {});
  6476. on[("update:" + key)] = function ($event) {
  6477. value[key] = $event;
  6478. };
  6479. }
  6480. }
  6481. };
  6482. for (var key in value) loop( key );
  6483. }
  6484. }
  6485. return data
  6486. }
  6487. /* */
  6488. /**
  6489. * Runtime helper for rendering static trees.
  6490. */
  6491. function renderStatic (
  6492. index,
  6493. isInFor
  6494. ) {
  6495. var cached = this._staticTrees || (this._staticTrees = []);
  6496. var tree = cached[index];
  6497. // if has already-rendered static tree and not inside v-for,
  6498. // we can reuse the same tree.
  6499. if (tree && !isInFor) {
  6500. return tree
  6501. }
  6502. // otherwise, render a fresh tree.
  6503. tree = cached[index] = this.$options.staticRenderFns[index].call(
  6504. this._renderProxy,
  6505. null,
  6506. this // for render fns generated for functional component templates
  6507. );
  6508. markStatic(tree, ("__static__" + index), false);
  6509. return tree
  6510. }
  6511. /**
  6512. * Runtime helper for v-once.
  6513. * Effectively it means marking the node as static with a unique key.
  6514. */
  6515. function markOnce (
  6516. tree,
  6517. index,
  6518. key
  6519. ) {
  6520. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  6521. return tree
  6522. }
  6523. function markStatic (
  6524. tree,
  6525. key,
  6526. isOnce
  6527. ) {
  6528. if (Array.isArray(tree)) {
  6529. for (var i = 0; i < tree.length; i++) {
  6530. if (tree[i] && typeof tree[i] !== 'string') {
  6531. markStaticNode(tree[i], (key + "_" + i), isOnce);
  6532. }
  6533. }
  6534. } else {
  6535. markStaticNode(tree, key, isOnce);
  6536. }
  6537. }
  6538. function markStaticNode (node, key, isOnce) {
  6539. node.isStatic = true;
  6540. node.key = key;
  6541. node.isOnce = isOnce;
  6542. }
  6543. /* */
  6544. function bindObjectListeners (data, value) {
  6545. if (value) {
  6546. if (!isPlainObject(value)) {
  6547. true && warn(
  6548. 'v-on without argument expects an Object value',
  6549. this
  6550. );
  6551. } else {
  6552. var on = data.on = data.on ? extend({}, data.on) : {};
  6553. for (var key in value) {
  6554. var existing = on[key];
  6555. var ours = value[key];
  6556. on[key] = existing ? [].concat(existing, ours) : ours;
  6557. }
  6558. }
  6559. }
  6560. return data
  6561. }
  6562. /* */
  6563. function resolveScopedSlots (
  6564. fns, // see flow/vnode
  6565. res,
  6566. // the following are added in 2.6
  6567. hasDynamicKeys,
  6568. contentHashKey
  6569. ) {
  6570. res = res || { $stable: !hasDynamicKeys };
  6571. for (var i = 0; i < fns.length; i++) {
  6572. var slot = fns[i];
  6573. if (Array.isArray(slot)) {
  6574. resolveScopedSlots(slot, res, hasDynamicKeys);
  6575. } else if (slot) {
  6576. // marker for reverse proxying v-slot without scope on this.$slots
  6577. if (slot.proxy) {
  6578. slot.fn.proxy = true;
  6579. }
  6580. res[slot.key] = slot.fn;
  6581. }
  6582. }
  6583. if (contentHashKey) {
  6584. (res).$key = contentHashKey;
  6585. }
  6586. return res
  6587. }
  6588. /* */
  6589. function bindDynamicKeys (baseObj, values) {
  6590. for (var i = 0; i < values.length; i += 2) {
  6591. var key = values[i];
  6592. if (typeof key === 'string' && key) {
  6593. baseObj[values[i]] = values[i + 1];
  6594. } else if ( true && key !== '' && key !== null) {
  6595. // null is a special value for explicitly removing a binding
  6596. warn(
  6597. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  6598. this
  6599. );
  6600. }
  6601. }
  6602. return baseObj
  6603. }
  6604. // helper to dynamically append modifier runtime markers to event names.
  6605. // ensure only append when value is already string, otherwise it will be cast
  6606. // to string and cause the type check to miss.
  6607. function prependModifier (value, symbol) {
  6608. return typeof value === 'string' ? symbol + value : value
  6609. }
  6610. /* */
  6611. function installRenderHelpers (target) {
  6612. target._o = markOnce;
  6613. target._n = toNumber;
  6614. target._s = toString;
  6615. target._l = renderList;
  6616. target._t = renderSlot;
  6617. target._q = looseEqual;
  6618. target._i = looseIndexOf;
  6619. target._m = renderStatic;
  6620. target._f = resolveFilter;
  6621. target._k = checkKeyCodes;
  6622. target._b = bindObjectProps;
  6623. target._v = createTextVNode;
  6624. target._e = createEmptyVNode;
  6625. target._u = resolveScopedSlots;
  6626. target._g = bindObjectListeners;
  6627. target._d = bindDynamicKeys;
  6628. target._p = prependModifier;
  6629. }
  6630. /* */
  6631. function FunctionalRenderContext (
  6632. data,
  6633. props,
  6634. children,
  6635. parent,
  6636. Ctor
  6637. ) {
  6638. var this$1 = this;
  6639. var options = Ctor.options;
  6640. // ensure the createElement function in functional components
  6641. // gets a unique context - this is necessary for correct named slot check
  6642. var contextVm;
  6643. if (hasOwn(parent, '_uid')) {
  6644. contextVm = Object.create(parent);
  6645. // $flow-disable-line
  6646. contextVm._original = parent;
  6647. } else {
  6648. // the context vm passed in is a functional context as well.
  6649. // in this case we want to make sure we are able to get a hold to the
  6650. // real context instance.
  6651. contextVm = parent;
  6652. // $flow-disable-line
  6653. parent = parent._original;
  6654. }
  6655. var isCompiled = isTrue(options._compiled);
  6656. var needNormalization = !isCompiled;
  6657. this.data = data;
  6658. this.props = props;
  6659. this.children = children;
  6660. this.parent = parent;
  6661. this.listeners = data.on || emptyObject;
  6662. this.injections = resolveInject(options.inject, parent);
  6663. this.slots = function () {
  6664. if (!this$1.$slots) {
  6665. normalizeScopedSlots(
  6666. data.scopedSlots,
  6667. this$1.$slots = resolveSlots(children, parent)
  6668. );
  6669. }
  6670. return this$1.$slots
  6671. };
  6672. Object.defineProperty(this, 'scopedSlots', ({
  6673. enumerable: true,
  6674. get: function get () {
  6675. return normalizeScopedSlots(data.scopedSlots, this.slots())
  6676. }
  6677. }));
  6678. // support for compiled functional template
  6679. if (isCompiled) {
  6680. // exposing $options for renderStatic()
  6681. this.$options = options;
  6682. // pre-resolve slots for renderSlot()
  6683. this.$slots = this.slots();
  6684. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  6685. }
  6686. if (options._scopeId) {
  6687. this._c = function (a, b, c, d) {
  6688. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  6689. if (vnode && !Array.isArray(vnode)) {
  6690. vnode.fnScopeId = options._scopeId;
  6691. vnode.fnContext = parent;
  6692. }
  6693. return vnode
  6694. };
  6695. } else {
  6696. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  6697. }
  6698. }
  6699. installRenderHelpers(FunctionalRenderContext.prototype);
  6700. function createFunctionalComponent (
  6701. Ctor,
  6702. propsData,
  6703. data,
  6704. contextVm,
  6705. children
  6706. ) {
  6707. var options = Ctor.options;
  6708. var props = {};
  6709. var propOptions = options.props;
  6710. if (isDef(propOptions)) {
  6711. for (var key in propOptions) {
  6712. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  6713. }
  6714. } else {
  6715. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  6716. if (isDef(data.props)) { mergeProps(props, data.props); }
  6717. }
  6718. var renderContext = new FunctionalRenderContext(
  6719. data,
  6720. props,
  6721. children,
  6722. contextVm,
  6723. Ctor
  6724. );
  6725. var vnode = options.render.call(null, renderContext._c, renderContext);
  6726. if (vnode instanceof VNode) {
  6727. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  6728. } else if (Array.isArray(vnode)) {
  6729. var vnodes = normalizeChildren(vnode) || [];
  6730. var res = new Array(vnodes.length);
  6731. for (var i = 0; i < vnodes.length; i++) {
  6732. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  6733. }
  6734. return res
  6735. }
  6736. }
  6737. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  6738. // #7817 clone node before setting fnContext, otherwise if the node is reused
  6739. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  6740. // that should not be matched to match.
  6741. var clone = cloneVNode(vnode);
  6742. clone.fnContext = contextVm;
  6743. clone.fnOptions = options;
  6744. if (true) {
  6745. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  6746. }
  6747. if (data.slot) {
  6748. (clone.data || (clone.data = {})).slot = data.slot;
  6749. }
  6750. return clone
  6751. }
  6752. function mergeProps (to, from) {
  6753. for (var key in from) {
  6754. to[camelize(key)] = from[key];
  6755. }
  6756. }
  6757. /* */
  6758. /* */
  6759. /* */
  6760. /* */
  6761. // inline hooks to be invoked on component VNodes during patch
  6762. var componentVNodeHooks = {
  6763. init: function init (vnode, hydrating) {
  6764. if (
  6765. vnode.componentInstance &&
  6766. !vnode.componentInstance._isDestroyed &&
  6767. vnode.data.keepAlive
  6768. ) {
  6769. // kept-alive components, treat as a patch
  6770. var mountedNode = vnode; // work around flow
  6771. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  6772. } else {
  6773. var child = vnode.componentInstance = createComponentInstanceForVnode(
  6774. vnode,
  6775. activeInstance
  6776. );
  6777. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  6778. }
  6779. },
  6780. prepatch: function prepatch (oldVnode, vnode) {
  6781. var options = vnode.componentOptions;
  6782. var child = vnode.componentInstance = oldVnode.componentInstance;
  6783. updateChildComponent(
  6784. child,
  6785. options.propsData, // updated props
  6786. options.listeners, // updated listeners
  6787. vnode, // new parent vnode
  6788. options.children // new children
  6789. );
  6790. },
  6791. insert: function insert (vnode) {
  6792. var context = vnode.context;
  6793. var componentInstance = vnode.componentInstance;
  6794. if (!componentInstance._isMounted) {
  6795. callHook(componentInstance, 'onServiceCreated');
  6796. callHook(componentInstance, 'onServiceAttached');
  6797. componentInstance._isMounted = true;
  6798. callHook(componentInstance, 'mounted');
  6799. }
  6800. if (vnode.data.keepAlive) {
  6801. if (context._isMounted) {
  6802. // vue-router#1212
  6803. // During updates, a kept-alive component's child components may
  6804. // change, so directly walking the tree here may call activated hooks
  6805. // on incorrect children. Instead we push them into a queue which will
  6806. // be processed after the whole patch process ended.
  6807. queueActivatedComponent(componentInstance);
  6808. } else {
  6809. activateChildComponent(componentInstance, true /* direct */);
  6810. }
  6811. }
  6812. },
  6813. destroy: function destroy (vnode) {
  6814. var componentInstance = vnode.componentInstance;
  6815. if (!componentInstance._isDestroyed) {
  6816. if (!vnode.data.keepAlive) {
  6817. componentInstance.$destroy();
  6818. } else {
  6819. deactivateChildComponent(componentInstance, true /* direct */);
  6820. }
  6821. }
  6822. }
  6823. };
  6824. var hooksToMerge = Object.keys(componentVNodeHooks);
  6825. function createComponent (
  6826. Ctor,
  6827. data,
  6828. context,
  6829. children,
  6830. tag
  6831. ) {
  6832. if (isUndef(Ctor)) {
  6833. return
  6834. }
  6835. var baseCtor = context.$options._base;
  6836. // plain options object: turn it into a constructor
  6837. if (isObject(Ctor)) {
  6838. Ctor = baseCtor.extend(Ctor);
  6839. }
  6840. // if at this stage it's not a constructor or an async component factory,
  6841. // reject.
  6842. if (typeof Ctor !== 'function') {
  6843. if (true) {
  6844. warn(("Invalid Component definition: " + (String(Ctor))), context);
  6845. }
  6846. return
  6847. }
  6848. // async component
  6849. var asyncFactory;
  6850. if (isUndef(Ctor.cid)) {
  6851. asyncFactory = Ctor;
  6852. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  6853. if (Ctor === undefined) {
  6854. // return a placeholder node for async component, which is rendered
  6855. // as a comment node but preserves all the raw information for the node.
  6856. // the information will be used for async server-rendering and hydration.
  6857. return createAsyncPlaceholder(
  6858. asyncFactory,
  6859. data,
  6860. context,
  6861. children,
  6862. tag
  6863. )
  6864. }
  6865. }
  6866. data = data || {};
  6867. // resolve constructor options in case global mixins are applied after
  6868. // component constructor creation
  6869. resolveConstructorOptions(Ctor);
  6870. // transform component v-model data into props & events
  6871. if (isDef(data.model)) {
  6872. transformModel(Ctor.options, data);
  6873. }
  6874. // extract props
  6875. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  6876. // functional component
  6877. if (isTrue(Ctor.options.functional)) {
  6878. return createFunctionalComponent(Ctor, propsData, data, context, children)
  6879. }
  6880. // extract listeners, since these needs to be treated as
  6881. // child component listeners instead of DOM listeners
  6882. var listeners = data.on;
  6883. // replace with listeners with .native modifier
  6884. // so it gets processed during parent component patch.
  6885. data.on = data.nativeOn;
  6886. if (isTrue(Ctor.options.abstract)) {
  6887. // abstract components do not keep anything
  6888. // other than props & listeners & slot
  6889. // work around flow
  6890. var slot = data.slot;
  6891. data = {};
  6892. if (slot) {
  6893. data.slot = slot;
  6894. }
  6895. }
  6896. // install component management hooks onto the placeholder node
  6897. installComponentHooks(data);
  6898. // return a placeholder vnode
  6899. var name = Ctor.options.name || tag;
  6900. var vnode = new VNode(
  6901. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  6902. data, undefined, undefined, undefined, context,
  6903. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  6904. asyncFactory
  6905. );
  6906. return vnode
  6907. }
  6908. function createComponentInstanceForVnode (
  6909. vnode, // we know it's MountedComponentVNode but flow doesn't
  6910. parent // activeInstance in lifecycle state
  6911. ) {
  6912. var options = {
  6913. _isComponent: true,
  6914. _parentVnode: vnode,
  6915. parent: parent
  6916. };
  6917. // check inline-template render functions
  6918. var inlineTemplate = vnode.data.inlineTemplate;
  6919. if (isDef(inlineTemplate)) {
  6920. options.render = inlineTemplate.render;
  6921. options.staticRenderFns = inlineTemplate.staticRenderFns;
  6922. }
  6923. return new vnode.componentOptions.Ctor(options)
  6924. }
  6925. function installComponentHooks (data) {
  6926. var hooks = data.hook || (data.hook = {});
  6927. for (var i = 0; i < hooksToMerge.length; i++) {
  6928. var key = hooksToMerge[i];
  6929. var existing = hooks[key];
  6930. var toMerge = componentVNodeHooks[key];
  6931. if (existing !== toMerge && !(existing && existing._merged)) {
  6932. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  6933. }
  6934. }
  6935. }
  6936. function mergeHook$1 (f1, f2) {
  6937. var merged = function (a, b) {
  6938. // flow complains about extra args which is why we use any
  6939. f1(a, b);
  6940. f2(a, b);
  6941. };
  6942. merged._merged = true;
  6943. return merged
  6944. }
  6945. // transform component v-model info (value and callback) into
  6946. // prop and event handler respectively.
  6947. function transformModel (options, data) {
  6948. var prop = (options.model && options.model.prop) || 'value';
  6949. var event = (options.model && options.model.event) || 'input'
  6950. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  6951. var on = data.on || (data.on = {});
  6952. var existing = on[event];
  6953. var callback = data.model.callback;
  6954. if (isDef(existing)) {
  6955. if (
  6956. Array.isArray(existing)
  6957. ? existing.indexOf(callback) === -1
  6958. : existing !== callback
  6959. ) {
  6960. on[event] = [callback].concat(existing);
  6961. }
  6962. } else {
  6963. on[event] = callback;
  6964. }
  6965. }
  6966. /* */
  6967. var SIMPLE_NORMALIZE = 1;
  6968. var ALWAYS_NORMALIZE = 2;
  6969. // wrapper function for providing a more flexible interface
  6970. // without getting yelled at by flow
  6971. function createElement (
  6972. context,
  6973. tag,
  6974. data,
  6975. children,
  6976. normalizationType,
  6977. alwaysNormalize
  6978. ) {
  6979. if (Array.isArray(data) || isPrimitive(data)) {
  6980. normalizationType = children;
  6981. children = data;
  6982. data = undefined;
  6983. }
  6984. if (isTrue(alwaysNormalize)) {
  6985. normalizationType = ALWAYS_NORMALIZE;
  6986. }
  6987. return _createElement(context, tag, data, children, normalizationType)
  6988. }
  6989. function _createElement (
  6990. context,
  6991. tag,
  6992. data,
  6993. children,
  6994. normalizationType
  6995. ) {
  6996. if (isDef(data) && isDef((data).__ob__)) {
  6997. true && warn(
  6998. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  6999. 'Always create fresh vnode data objects in each render!',
  7000. context
  7001. );
  7002. return createEmptyVNode()
  7003. }
  7004. // object syntax in v-bind
  7005. if (isDef(data) && isDef(data.is)) {
  7006. tag = data.is;
  7007. }
  7008. if (!tag) {
  7009. // in case of component :is set to falsy value
  7010. return createEmptyVNode()
  7011. }
  7012. // warn against non-primitive key
  7013. if ( true &&
  7014. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  7015. ) {
  7016. {
  7017. warn(
  7018. 'Avoid using non-primitive value as key, ' +
  7019. 'use string/number value instead.',
  7020. context
  7021. );
  7022. }
  7023. }
  7024. // support single function children as default scoped slot
  7025. if (Array.isArray(children) &&
  7026. typeof children[0] === 'function'
  7027. ) {
  7028. data = data || {};
  7029. data.scopedSlots = { default: children[0] };
  7030. children.length = 0;
  7031. }
  7032. if (normalizationType === ALWAYS_NORMALIZE) {
  7033. children = normalizeChildren(children);
  7034. } else if (normalizationType === SIMPLE_NORMALIZE) {
  7035. children = simpleNormalizeChildren(children);
  7036. }
  7037. var vnode, ns;
  7038. if (typeof tag === 'string') {
  7039. var Ctor;
  7040. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  7041. if (config.isReservedTag(tag)) {
  7042. // platform built-in elements
  7043. if ( true && isDef(data) && isDef(data.nativeOn)) {
  7044. warn(
  7045. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  7046. context
  7047. );
  7048. }
  7049. vnode = new VNode(
  7050. config.parsePlatformTagName(tag), data, children,
  7051. undefined, undefined, context
  7052. );
  7053. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  7054. // component
  7055. vnode = createComponent(Ctor, data, context, children, tag);
  7056. } else {
  7057. // unknown or unlisted namespaced elements
  7058. // check at runtime because it may get assigned a namespace when its
  7059. // parent normalizes children
  7060. vnode = new VNode(
  7061. tag, data, children,
  7062. undefined, undefined, context
  7063. );
  7064. }
  7065. } else {
  7066. // direct component options / constructor
  7067. vnode = createComponent(tag, data, context, children);
  7068. }
  7069. if (Array.isArray(vnode)) {
  7070. return vnode
  7071. } else if (isDef(vnode)) {
  7072. if (isDef(ns)) { applyNS(vnode, ns); }
  7073. if (isDef(data)) { registerDeepBindings(data); }
  7074. return vnode
  7075. } else {
  7076. return createEmptyVNode()
  7077. }
  7078. }
  7079. function applyNS (vnode, ns, force) {
  7080. vnode.ns = ns;
  7081. if (vnode.tag === 'foreignObject') {
  7082. // use default namespace inside foreignObject
  7083. ns = undefined;
  7084. force = true;
  7085. }
  7086. if (isDef(vnode.children)) {
  7087. for (var i = 0, l = vnode.children.length; i < l; i++) {
  7088. var child = vnode.children[i];
  7089. if (isDef(child.tag) && (
  7090. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  7091. applyNS(child, ns, force);
  7092. }
  7093. }
  7094. }
  7095. }
  7096. // ref #5318
  7097. // necessary to ensure parent re-render when deep bindings like :style and
  7098. // :class are used on slot nodes
  7099. function registerDeepBindings (data) {
  7100. if (isObject(data.style)) {
  7101. traverse(data.style);
  7102. }
  7103. if (isObject(data.class)) {
  7104. traverse(data.class);
  7105. }
  7106. }
  7107. /* */
  7108. function initRender (vm) {
  7109. vm._vnode = null; // the root of the child tree
  7110. vm._staticTrees = null; // v-once cached trees
  7111. var options = vm.$options;
  7112. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  7113. var renderContext = parentVnode && parentVnode.context;
  7114. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  7115. vm.$scopedSlots = emptyObject;
  7116. // bind the createElement fn to this instance
  7117. // so that we get proper render context inside it.
  7118. // args order: tag, data, children, normalizationType, alwaysNormalize
  7119. // internal version is used by render functions compiled from templates
  7120. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  7121. // normalization is always applied for the public version, used in
  7122. // user-written render functions.
  7123. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  7124. // $attrs & $listeners are exposed for easier HOC creation.
  7125. // they need to be reactive so that HOCs using them are always updated
  7126. var parentData = parentVnode && parentVnode.data;
  7127. /* istanbul ignore else */
  7128. if (true) {
  7129. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  7130. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  7131. }, true);
  7132. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  7133. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  7134. }, true);
  7135. } else {}
  7136. }
  7137. var currentRenderingInstance = null;
  7138. function renderMixin (Vue) {
  7139. // install runtime convenience helpers
  7140. installRenderHelpers(Vue.prototype);
  7141. Vue.prototype.$nextTick = function (fn) {
  7142. return nextTick(fn, this)
  7143. };
  7144. Vue.prototype._render = function () {
  7145. var vm = this;
  7146. var ref = vm.$options;
  7147. var render = ref.render;
  7148. var _parentVnode = ref._parentVnode;
  7149. if (_parentVnode) {
  7150. vm.$scopedSlots = normalizeScopedSlots(
  7151. _parentVnode.data.scopedSlots,
  7152. vm.$slots,
  7153. vm.$scopedSlots
  7154. );
  7155. }
  7156. // set parent vnode. this allows render functions to have access
  7157. // to the data on the placeholder node.
  7158. vm.$vnode = _parentVnode;
  7159. // render self
  7160. var vnode;
  7161. try {
  7162. // There's no need to maintain a stack because all render fns are called
  7163. // separately from one another. Nested component's render fns are called
  7164. // when parent component is patched.
  7165. currentRenderingInstance = vm;
  7166. vnode = render.call(vm._renderProxy, vm.$createElement);
  7167. } catch (e) {
  7168. handleError(e, vm, "render");
  7169. // return error render result,
  7170. // or previous vnode to prevent render error causing blank component
  7171. /* istanbul ignore else */
  7172. if ( true && vm.$options.renderError) {
  7173. try {
  7174. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  7175. } catch (e) {
  7176. handleError(e, vm, "renderError");
  7177. vnode = vm._vnode;
  7178. }
  7179. } else {
  7180. vnode = vm._vnode;
  7181. }
  7182. } finally {
  7183. currentRenderingInstance = null;
  7184. }
  7185. // if the returned array contains only a single node, allow it
  7186. if (Array.isArray(vnode) && vnode.length === 1) {
  7187. vnode = vnode[0];
  7188. }
  7189. // return empty vnode in case the render function errored out
  7190. if (!(vnode instanceof VNode)) {
  7191. if ( true && Array.isArray(vnode)) {
  7192. warn(
  7193. 'Multiple root nodes returned from render function. Render function ' +
  7194. 'should return a single root node.',
  7195. vm
  7196. );
  7197. }
  7198. vnode = createEmptyVNode();
  7199. }
  7200. // set parent
  7201. vnode.parent = _parentVnode;
  7202. return vnode
  7203. };
  7204. }
  7205. /* */
  7206. function ensureCtor (comp, base) {
  7207. if (
  7208. comp.__esModule ||
  7209. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  7210. ) {
  7211. comp = comp.default;
  7212. }
  7213. return isObject(comp)
  7214. ? base.extend(comp)
  7215. : comp
  7216. }
  7217. function createAsyncPlaceholder (
  7218. factory,
  7219. data,
  7220. context,
  7221. children,
  7222. tag
  7223. ) {
  7224. var node = createEmptyVNode();
  7225. node.asyncFactory = factory;
  7226. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  7227. return node
  7228. }
  7229. function resolveAsyncComponent (
  7230. factory,
  7231. baseCtor
  7232. ) {
  7233. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  7234. return factory.errorComp
  7235. }
  7236. if (isDef(factory.resolved)) {
  7237. return factory.resolved
  7238. }
  7239. var owner = currentRenderingInstance;
  7240. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  7241. // already pending
  7242. factory.owners.push(owner);
  7243. }
  7244. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  7245. return factory.loadingComp
  7246. }
  7247. if (owner && !isDef(factory.owners)) {
  7248. var owners = factory.owners = [owner];
  7249. var sync = true;
  7250. var timerLoading = null;
  7251. var timerTimeout = null
  7252. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  7253. var forceRender = function (renderCompleted) {
  7254. for (var i = 0, l = owners.length; i < l; i++) {
  7255. (owners[i]).$forceUpdate();
  7256. }
  7257. if (renderCompleted) {
  7258. owners.length = 0;
  7259. if (timerLoading !== null) {
  7260. clearTimeout(timerLoading);
  7261. timerLoading = null;
  7262. }
  7263. if (timerTimeout !== null) {
  7264. clearTimeout(timerTimeout);
  7265. timerTimeout = null;
  7266. }
  7267. }
  7268. };
  7269. var resolve = once(function (res) {
  7270. // cache resolved
  7271. factory.resolved = ensureCtor(res, baseCtor);
  7272. // invoke callbacks only if this is not a synchronous resolve
  7273. // (async resolves are shimmed as synchronous during SSR)
  7274. if (!sync) {
  7275. forceRender(true);
  7276. } else {
  7277. owners.length = 0;
  7278. }
  7279. });
  7280. var reject = once(function (reason) {
  7281. true && warn(
  7282. "Failed to resolve async component: " + (String(factory)) +
  7283. (reason ? ("\nReason: " + reason) : '')
  7284. );
  7285. if (isDef(factory.errorComp)) {
  7286. factory.error = true;
  7287. forceRender(true);
  7288. }
  7289. });
  7290. var res = factory(resolve, reject);
  7291. if (isObject(res)) {
  7292. if (isPromise(res)) {
  7293. // () => Promise
  7294. if (isUndef(factory.resolved)) {
  7295. res.then(resolve, reject);
  7296. }
  7297. } else if (isPromise(res.component)) {
  7298. res.component.then(resolve, reject);
  7299. if (isDef(res.error)) {
  7300. factory.errorComp = ensureCtor(res.error, baseCtor);
  7301. }
  7302. if (isDef(res.loading)) {
  7303. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  7304. if (res.delay === 0) {
  7305. factory.loading = true;
  7306. } else {
  7307. timerLoading = setTimeout(function () {
  7308. timerLoading = null;
  7309. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  7310. factory.loading = true;
  7311. forceRender(false);
  7312. }
  7313. }, res.delay || 200);
  7314. }
  7315. }
  7316. if (isDef(res.timeout)) {
  7317. timerTimeout = setTimeout(function () {
  7318. timerTimeout = null;
  7319. if (isUndef(factory.resolved)) {
  7320. reject(
  7321. true
  7322. ? ("timeout (" + (res.timeout) + "ms)")
  7323. : undefined
  7324. );
  7325. }
  7326. }, res.timeout);
  7327. }
  7328. }
  7329. }
  7330. sync = false;
  7331. // return in case resolved synchronously
  7332. return factory.loading
  7333. ? factory.loadingComp
  7334. : factory.resolved
  7335. }
  7336. }
  7337. /* */
  7338. function isAsyncPlaceholder (node) {
  7339. return node.isComment && node.asyncFactory
  7340. }
  7341. /* */
  7342. function getFirstComponentChild (children) {
  7343. if (Array.isArray(children)) {
  7344. for (var i = 0; i < children.length; i++) {
  7345. var c = children[i];
  7346. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  7347. return c
  7348. }
  7349. }
  7350. }
  7351. }
  7352. /* */
  7353. /* */
  7354. function initEvents (vm) {
  7355. vm._events = Object.create(null);
  7356. vm._hasHookEvent = false;
  7357. // init parent attached events
  7358. var listeners = vm.$options._parentListeners;
  7359. if (listeners) {
  7360. updateComponentListeners(vm, listeners);
  7361. }
  7362. }
  7363. var target;
  7364. function add (event, fn) {
  7365. target.$on(event, fn);
  7366. }
  7367. function remove$1 (event, fn) {
  7368. target.$off(event, fn);
  7369. }
  7370. function createOnceHandler (event, fn) {
  7371. var _target = target;
  7372. return function onceHandler () {
  7373. var res = fn.apply(null, arguments);
  7374. if (res !== null) {
  7375. _target.$off(event, onceHandler);
  7376. }
  7377. }
  7378. }
  7379. function updateComponentListeners (
  7380. vm,
  7381. listeners,
  7382. oldListeners
  7383. ) {
  7384. target = vm;
  7385. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  7386. target = undefined;
  7387. }
  7388. function eventsMixin (Vue) {
  7389. var hookRE = /^hook:/;
  7390. Vue.prototype.$on = function (event, fn) {
  7391. var vm = this;
  7392. if (Array.isArray(event)) {
  7393. for (var i = 0, l = event.length; i < l; i++) {
  7394. vm.$on(event[i], fn);
  7395. }
  7396. } else {
  7397. (vm._events[event] || (vm._events[event] = [])).push(fn);
  7398. // optimize hook:event cost by using a boolean flag marked at registration
  7399. // instead of a hash lookup
  7400. if (hookRE.test(event)) {
  7401. vm._hasHookEvent = true;
  7402. }
  7403. }
  7404. return vm
  7405. };
  7406. Vue.prototype.$once = function (event, fn) {
  7407. var vm = this;
  7408. function on () {
  7409. vm.$off(event, on);
  7410. fn.apply(vm, arguments);
  7411. }
  7412. on.fn = fn;
  7413. vm.$on(event, on);
  7414. return vm
  7415. };
  7416. Vue.prototype.$off = function (event, fn) {
  7417. var vm = this;
  7418. // all
  7419. if (!arguments.length) {
  7420. vm._events = Object.create(null);
  7421. return vm
  7422. }
  7423. // array of events
  7424. if (Array.isArray(event)) {
  7425. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  7426. vm.$off(event[i$1], fn);
  7427. }
  7428. return vm
  7429. }
  7430. // specific event
  7431. var cbs = vm._events[event];
  7432. if (!cbs) {
  7433. return vm
  7434. }
  7435. if (!fn) {
  7436. vm._events[event] = null;
  7437. return vm
  7438. }
  7439. // specific handler
  7440. var cb;
  7441. var i = cbs.length;
  7442. while (i--) {
  7443. cb = cbs[i];
  7444. if (cb === fn || cb.fn === fn) {
  7445. cbs.splice(i, 1);
  7446. break
  7447. }
  7448. }
  7449. return vm
  7450. };
  7451. Vue.prototype.$emit = function (event) {
  7452. var vm = this;
  7453. if (true) {
  7454. var lowerCaseEvent = event.toLowerCase();
  7455. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  7456. tip(
  7457. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  7458. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  7459. "Note that HTML attributes are case-insensitive and you cannot use " +
  7460. "v-on to listen to camelCase events when using in-DOM templates. " +
  7461. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  7462. );
  7463. }
  7464. }
  7465. var cbs = vm._events[event];
  7466. if (cbs) {
  7467. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  7468. var args = toArray(arguments, 1);
  7469. var info = "event handler for \"" + event + "\"";
  7470. for (var i = 0, l = cbs.length; i < l; i++) {
  7471. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  7472. }
  7473. }
  7474. return vm
  7475. };
  7476. }
  7477. /* */
  7478. var activeInstance = null;
  7479. var isUpdatingChildComponent = false;
  7480. function setActiveInstance(vm) {
  7481. var prevActiveInstance = activeInstance;
  7482. activeInstance = vm;
  7483. return function () {
  7484. activeInstance = prevActiveInstance;
  7485. }
  7486. }
  7487. function initLifecycle (vm) {
  7488. var options = vm.$options;
  7489. // locate first non-abstract parent
  7490. var parent = options.parent;
  7491. if (parent && !options.abstract) {
  7492. while (parent.$options.abstract && parent.$parent) {
  7493. parent = parent.$parent;
  7494. }
  7495. parent.$children.push(vm);
  7496. }
  7497. vm.$parent = parent;
  7498. vm.$root = parent ? parent.$root : vm;
  7499. vm.$children = [];
  7500. vm.$refs = {};
  7501. vm._watcher = null;
  7502. vm._inactive = null;
  7503. vm._directInactive = false;
  7504. vm._isMounted = false;
  7505. vm._isDestroyed = false;
  7506. vm._isBeingDestroyed = false;
  7507. }
  7508. function lifecycleMixin (Vue) {
  7509. Vue.prototype._update = function (vnode, hydrating) {
  7510. var vm = this;
  7511. var prevEl = vm.$el;
  7512. var prevVnode = vm._vnode;
  7513. var restoreActiveInstance = setActiveInstance(vm);
  7514. vm._vnode = vnode;
  7515. // Vue.prototype.__patch__ is injected in entry points
  7516. // based on the rendering backend used.
  7517. if (!prevVnode) {
  7518. // initial render
  7519. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  7520. } else {
  7521. // updates
  7522. vm.$el = vm.__patch__(prevVnode, vnode);
  7523. }
  7524. restoreActiveInstance();
  7525. // update __vue__ reference
  7526. if (prevEl) {
  7527. prevEl.__vue__ = null;
  7528. }
  7529. if (vm.$el) {
  7530. vm.$el.__vue__ = vm;
  7531. }
  7532. // if parent is an HOC, update its $el as well
  7533. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  7534. vm.$parent.$el = vm.$el;
  7535. }
  7536. // updated hook is called by the scheduler to ensure that children are
  7537. // updated in a parent's updated hook.
  7538. };
  7539. Vue.prototype.$forceUpdate = function () {
  7540. var vm = this;
  7541. if (vm._watcher) {
  7542. vm._watcher.update();
  7543. }
  7544. };
  7545. Vue.prototype.$destroy = function () {
  7546. var vm = this;
  7547. if (vm._isBeingDestroyed) {
  7548. return
  7549. }
  7550. callHook(vm, 'beforeDestroy');
  7551. vm._isBeingDestroyed = true;
  7552. // remove self from parent
  7553. var parent = vm.$parent;
  7554. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  7555. remove(parent.$children, vm);
  7556. }
  7557. // teardown watchers
  7558. if (vm._watcher) {
  7559. vm._watcher.teardown();
  7560. }
  7561. var i = vm._watchers.length;
  7562. while (i--) {
  7563. vm._watchers[i].teardown();
  7564. }
  7565. // remove reference from data ob
  7566. // frozen object may not have observer.
  7567. if (vm._data.__ob__) {
  7568. vm._data.__ob__.vmCount--;
  7569. }
  7570. // call the last hook...
  7571. vm._isDestroyed = true;
  7572. // invoke destroy hooks on current rendered tree
  7573. vm.__patch__(vm._vnode, null);
  7574. // fire destroyed hook
  7575. callHook(vm, 'destroyed');
  7576. // turn off all instance listeners.
  7577. vm.$off();
  7578. // remove __vue__ reference
  7579. if (vm.$el) {
  7580. vm.$el.__vue__ = null;
  7581. }
  7582. // release circular reference (#6759)
  7583. if (vm.$vnode) {
  7584. vm.$vnode.parent = null;
  7585. }
  7586. };
  7587. }
  7588. function updateChildComponent (
  7589. vm,
  7590. propsData,
  7591. listeners,
  7592. parentVnode,
  7593. renderChildren
  7594. ) {
  7595. if (true) {
  7596. isUpdatingChildComponent = true;
  7597. }
  7598. // determine whether component has slot children
  7599. // we need to do this before overwriting $options._renderChildren.
  7600. // check if there are dynamic scopedSlots (hand-written or compiled but with
  7601. // dynamic slot names). Static scoped slots compiled from template has the
  7602. // "$stable" marker.
  7603. var newScopedSlots = parentVnode.data.scopedSlots;
  7604. var oldScopedSlots = vm.$scopedSlots;
  7605. var hasDynamicScopedSlot = !!(
  7606. (newScopedSlots && !newScopedSlots.$stable) ||
  7607. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  7608. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  7609. );
  7610. // Any static slot children from the parent may have changed during parent's
  7611. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  7612. // update is necessary to ensure correctness.
  7613. var needsForceUpdate = !!(
  7614. renderChildren || // has new static slots
  7615. vm.$options._renderChildren || // has old static slots
  7616. hasDynamicScopedSlot
  7617. );
  7618. vm.$options._parentVnode = parentVnode;
  7619. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  7620. if (vm._vnode) { // update child tree's parent
  7621. vm._vnode.parent = parentVnode;
  7622. }
  7623. vm.$options._renderChildren = renderChildren;
  7624. // update $attrs and $listeners hash
  7625. // these are also reactive so they may trigger child update if the child
  7626. // used them during render
  7627. vm.$attrs = parentVnode.data.attrs || emptyObject;
  7628. vm.$listeners = listeners || emptyObject;
  7629. // update props
  7630. if (propsData && vm.$options.props) {
  7631. toggleObserving(false);
  7632. var props = vm._props;
  7633. var propKeys = vm.$options._propKeys || [];
  7634. for (var i = 0; i < propKeys.length; i++) {
  7635. var key = propKeys[i];
  7636. var propOptions = vm.$options.props; // wtf flow?
  7637. props[key] = validateProp(key, propOptions, propsData, vm);
  7638. }
  7639. toggleObserving(true);
  7640. // keep a copy of raw propsData
  7641. vm.$options.propsData = propsData;
  7642. }
  7643. // fixed by xxxxxx update properties(mp runtime)
  7644. vm._$updateProperties && vm._$updateProperties(vm);
  7645. // update listeners
  7646. listeners = listeners || emptyObject;
  7647. var oldListeners = vm.$options._parentListeners;
  7648. vm.$options._parentListeners = listeners;
  7649. updateComponentListeners(vm, listeners, oldListeners);
  7650. // resolve slots + force update if has children
  7651. if (needsForceUpdate) {
  7652. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  7653. vm.$forceUpdate();
  7654. }
  7655. if (true) {
  7656. isUpdatingChildComponent = false;
  7657. }
  7658. }
  7659. function isInInactiveTree (vm) {
  7660. while (vm && (vm = vm.$parent)) {
  7661. if (vm._inactive) { return true }
  7662. }
  7663. return false
  7664. }
  7665. function activateChildComponent (vm, direct) {
  7666. if (direct) {
  7667. vm._directInactive = false;
  7668. if (isInInactiveTree(vm)) {
  7669. return
  7670. }
  7671. } else if (vm._directInactive) {
  7672. return
  7673. }
  7674. if (vm._inactive || vm._inactive === null) {
  7675. vm._inactive = false;
  7676. for (var i = 0; i < vm.$children.length; i++) {
  7677. activateChildComponent(vm.$children[i]);
  7678. }
  7679. callHook(vm, 'activated');
  7680. }
  7681. }
  7682. function deactivateChildComponent (vm, direct) {
  7683. if (direct) {
  7684. vm._directInactive = true;
  7685. if (isInInactiveTree(vm)) {
  7686. return
  7687. }
  7688. }
  7689. if (!vm._inactive) {
  7690. vm._inactive = true;
  7691. for (var i = 0; i < vm.$children.length; i++) {
  7692. deactivateChildComponent(vm.$children[i]);
  7693. }
  7694. callHook(vm, 'deactivated');
  7695. }
  7696. }
  7697. function callHook (vm, hook) {
  7698. // #7573 disable dep collection when invoking lifecycle hooks
  7699. pushTarget();
  7700. var handlers = vm.$options[hook];
  7701. var info = hook + " hook";
  7702. if (handlers) {
  7703. for (var i = 0, j = handlers.length; i < j; i++) {
  7704. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  7705. }
  7706. }
  7707. if (vm._hasHookEvent) {
  7708. vm.$emit('hook:' + hook);
  7709. }
  7710. popTarget();
  7711. }
  7712. /* */
  7713. var MAX_UPDATE_COUNT = 100;
  7714. var queue = [];
  7715. var activatedChildren = [];
  7716. var has = {};
  7717. var circular = {};
  7718. var waiting = false;
  7719. var flushing = false;
  7720. var index = 0;
  7721. /**
  7722. * Reset the scheduler's state.
  7723. */
  7724. function resetSchedulerState () {
  7725. index = queue.length = activatedChildren.length = 0;
  7726. has = {};
  7727. if (true) {
  7728. circular = {};
  7729. }
  7730. waiting = flushing = false;
  7731. }
  7732. // Async edge case #6566 requires saving the timestamp when event listeners are
  7733. // attached. However, calling performance.now() has a perf overhead especially
  7734. // if the page has thousands of event listeners. Instead, we take a timestamp
  7735. // every time the scheduler flushes and use that for all event listeners
  7736. // attached during that flush.
  7737. var currentFlushTimestamp = 0;
  7738. // Async edge case fix requires storing an event listener's attach timestamp.
  7739. var getNow = Date.now;
  7740. // Determine what event timestamp the browser is using. Annoyingly, the
  7741. // timestamp can either be hi-res (relative to page load) or low-res
  7742. // (relative to UNIX epoch), so in order to compare time we have to use the
  7743. // same timestamp type when saving the flush timestamp.
  7744. // All IE versions use low-res event timestamps, and have problematic clock
  7745. // implementations (#9632)
  7746. if (inBrowser && !isIE) {
  7747. var performance = window.performance;
  7748. if (
  7749. performance &&
  7750. typeof performance.now === 'function' &&
  7751. getNow() > document.createEvent('Event').timeStamp
  7752. ) {
  7753. // if the event timestamp, although evaluated AFTER the Date.now(), is
  7754. // smaller than it, it means the event is using a hi-res timestamp,
  7755. // and we need to use the hi-res version for event listener timestamps as
  7756. // well.
  7757. getNow = function () { return performance.now(); };
  7758. }
  7759. }
  7760. /**
  7761. * Flush both queues and run the watchers.
  7762. */
  7763. function flushSchedulerQueue () {
  7764. currentFlushTimestamp = getNow();
  7765. flushing = true;
  7766. var watcher, id;
  7767. // Sort queue before flush.
  7768. // This ensures that:
  7769. // 1. Components are updated from parent to child. (because parent is always
  7770. // created before the child)
  7771. // 2. A component's user watchers are run before its render watcher (because
  7772. // user watchers are created before the render watcher)
  7773. // 3. If a component is destroyed during a parent component's watcher run,
  7774. // its watchers can be skipped.
  7775. queue.sort(function (a, b) { return a.id - b.id; });
  7776. // do not cache length because more watchers might be pushed
  7777. // as we run existing watchers
  7778. for (index = 0; index < queue.length; index++) {
  7779. watcher = queue[index];
  7780. if (watcher.before) {
  7781. watcher.before();
  7782. }
  7783. id = watcher.id;
  7784. has[id] = null;
  7785. watcher.run();
  7786. // in dev build, check and stop circular updates.
  7787. if ( true && has[id] != null) {
  7788. circular[id] = (circular[id] || 0) + 1;
  7789. if (circular[id] > MAX_UPDATE_COUNT) {
  7790. warn(
  7791. 'You may have an infinite update loop ' + (
  7792. watcher.user
  7793. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  7794. : "in a component render function."
  7795. ),
  7796. watcher.vm
  7797. );
  7798. break
  7799. }
  7800. }
  7801. }
  7802. // keep copies of post queues before resetting state
  7803. var activatedQueue = activatedChildren.slice();
  7804. var updatedQueue = queue.slice();
  7805. resetSchedulerState();
  7806. // call component updated and activated hooks
  7807. callActivatedHooks(activatedQueue);
  7808. callUpdatedHooks(updatedQueue);
  7809. // devtool hook
  7810. /* istanbul ignore if */
  7811. if (devtools && config.devtools) {
  7812. devtools.emit('flush');
  7813. }
  7814. }
  7815. function callUpdatedHooks (queue) {
  7816. var i = queue.length;
  7817. while (i--) {
  7818. var watcher = queue[i];
  7819. var vm = watcher.vm;
  7820. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  7821. callHook(vm, 'updated');
  7822. }
  7823. }
  7824. }
  7825. /**
  7826. * Queue a kept-alive component that was activated during patch.
  7827. * The queue will be processed after the entire tree has been patched.
  7828. */
  7829. function queueActivatedComponent (vm) {
  7830. // setting _inactive to false here so that a render function can
  7831. // rely on checking whether it's in an inactive tree (e.g. router-view)
  7832. vm._inactive = false;
  7833. activatedChildren.push(vm);
  7834. }
  7835. function callActivatedHooks (queue) {
  7836. for (var i = 0; i < queue.length; i++) {
  7837. queue[i]._inactive = true;
  7838. activateChildComponent(queue[i], true /* true */);
  7839. }
  7840. }
  7841. /**
  7842. * Push a watcher into the watcher queue.
  7843. * Jobs with duplicate IDs will be skipped unless it's
  7844. * pushed when the queue is being flushed.
  7845. */
  7846. function queueWatcher (watcher) {
  7847. var id = watcher.id;
  7848. if (has[id] == null) {
  7849. has[id] = true;
  7850. if (!flushing) {
  7851. queue.push(watcher);
  7852. } else {
  7853. // if already flushing, splice the watcher based on its id
  7854. // if already past its id, it will be run next immediately.
  7855. var i = queue.length - 1;
  7856. while (i > index && queue[i].id > watcher.id) {
  7857. i--;
  7858. }
  7859. queue.splice(i + 1, 0, watcher);
  7860. }
  7861. // queue the flush
  7862. if (!waiting) {
  7863. waiting = true;
  7864. if ( true && !config.async) {
  7865. flushSchedulerQueue();
  7866. return
  7867. }
  7868. nextTick(flushSchedulerQueue);
  7869. }
  7870. }
  7871. }
  7872. /* */
  7873. var uid$2 = 0;
  7874. /**
  7875. * A watcher parses an expression, collects dependencies,
  7876. * and fires callback when the expression value changes.
  7877. * This is used for both the $watch() api and directives.
  7878. */
  7879. var Watcher = function Watcher (
  7880. vm,
  7881. expOrFn,
  7882. cb,
  7883. options,
  7884. isRenderWatcher
  7885. ) {
  7886. this.vm = vm;
  7887. if (isRenderWatcher) {
  7888. vm._watcher = this;
  7889. }
  7890. vm._watchers.push(this);
  7891. // options
  7892. if (options) {
  7893. this.deep = !!options.deep;
  7894. this.user = !!options.user;
  7895. this.lazy = !!options.lazy;
  7896. this.sync = !!options.sync;
  7897. this.before = options.before;
  7898. } else {
  7899. this.deep = this.user = this.lazy = this.sync = false;
  7900. }
  7901. this.cb = cb;
  7902. this.id = ++uid$2; // uid for batching
  7903. this.active = true;
  7904. this.dirty = this.lazy; // for lazy watchers
  7905. this.deps = [];
  7906. this.newDeps = [];
  7907. this.depIds = new _Set();
  7908. this.newDepIds = new _Set();
  7909. this.expression = true
  7910. ? expOrFn.toString()
  7911. : undefined;
  7912. // parse expression for getter
  7913. if (typeof expOrFn === 'function') {
  7914. this.getter = expOrFn;
  7915. } else {
  7916. this.getter = parsePath(expOrFn);
  7917. if (!this.getter) {
  7918. this.getter = noop;
  7919. true && warn(
  7920. "Failed watching path: \"" + expOrFn + "\" " +
  7921. 'Watcher only accepts simple dot-delimited paths. ' +
  7922. 'For full control, use a function instead.',
  7923. vm
  7924. );
  7925. }
  7926. }
  7927. this.value = this.lazy
  7928. ? undefined
  7929. : this.get();
  7930. };
  7931. /**
  7932. * Evaluate the getter, and re-collect dependencies.
  7933. */
  7934. Watcher.prototype.get = function get () {
  7935. pushTarget(this);
  7936. var value;
  7937. var vm = this.vm;
  7938. try {
  7939. value = this.getter.call(vm, vm);
  7940. } catch (e) {
  7941. if (this.user) {
  7942. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  7943. } else {
  7944. throw e
  7945. }
  7946. } finally {
  7947. // "touch" every property so they are all tracked as
  7948. // dependencies for deep watching
  7949. if (this.deep) {
  7950. traverse(value);
  7951. }
  7952. popTarget();
  7953. this.cleanupDeps();
  7954. }
  7955. return value
  7956. };
  7957. /**
  7958. * Add a dependency to this directive.
  7959. */
  7960. Watcher.prototype.addDep = function addDep (dep) {
  7961. var id = dep.id;
  7962. if (!this.newDepIds.has(id)) {
  7963. this.newDepIds.add(id);
  7964. this.newDeps.push(dep);
  7965. if (!this.depIds.has(id)) {
  7966. dep.addSub(this);
  7967. }
  7968. }
  7969. };
  7970. /**
  7971. * Clean up for dependency collection.
  7972. */
  7973. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  7974. var i = this.deps.length;
  7975. while (i--) {
  7976. var dep = this.deps[i];
  7977. if (!this.newDepIds.has(dep.id)) {
  7978. dep.removeSub(this);
  7979. }
  7980. }
  7981. var tmp = this.depIds;
  7982. this.depIds = this.newDepIds;
  7983. this.newDepIds = tmp;
  7984. this.newDepIds.clear();
  7985. tmp = this.deps;
  7986. this.deps = this.newDeps;
  7987. this.newDeps = tmp;
  7988. this.newDeps.length = 0;
  7989. };
  7990. /**
  7991. * Subscriber interface.
  7992. * Will be called when a dependency changes.
  7993. */
  7994. Watcher.prototype.update = function update () {
  7995. /* istanbul ignore else */
  7996. if (this.lazy) {
  7997. this.dirty = true;
  7998. } else if (this.sync) {
  7999. this.run();
  8000. } else {
  8001. queueWatcher(this);
  8002. }
  8003. };
  8004. /**
  8005. * Scheduler job interface.
  8006. * Will be called by the scheduler.
  8007. */
  8008. Watcher.prototype.run = function run () {
  8009. if (this.active) {
  8010. var value = this.get();
  8011. if (
  8012. value !== this.value ||
  8013. // Deep watchers and watchers on Object/Arrays should fire even
  8014. // when the value is the same, because the value may
  8015. // have mutated.
  8016. isObject(value) ||
  8017. this.deep
  8018. ) {
  8019. // set new value
  8020. var oldValue = this.value;
  8021. this.value = value;
  8022. if (this.user) {
  8023. try {
  8024. this.cb.call(this.vm, value, oldValue);
  8025. } catch (e) {
  8026. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  8027. }
  8028. } else {
  8029. this.cb.call(this.vm, value, oldValue);
  8030. }
  8031. }
  8032. }
  8033. };
  8034. /**
  8035. * Evaluate the value of the watcher.
  8036. * This only gets called for lazy watchers.
  8037. */
  8038. Watcher.prototype.evaluate = function evaluate () {
  8039. this.value = this.get();
  8040. this.dirty = false;
  8041. };
  8042. /**
  8043. * Depend on all deps collected by this watcher.
  8044. */
  8045. Watcher.prototype.depend = function depend () {
  8046. var i = this.deps.length;
  8047. while (i--) {
  8048. this.deps[i].depend();
  8049. }
  8050. };
  8051. /**
  8052. * Remove self from all dependencies' subscriber list.
  8053. */
  8054. Watcher.prototype.teardown = function teardown () {
  8055. if (this.active) {
  8056. // remove self from vm's watcher list
  8057. // this is a somewhat expensive operation so we skip it
  8058. // if the vm is being destroyed.
  8059. if (!this.vm._isBeingDestroyed) {
  8060. remove(this.vm._watchers, this);
  8061. }
  8062. var i = this.deps.length;
  8063. while (i--) {
  8064. this.deps[i].removeSub(this);
  8065. }
  8066. this.active = false;
  8067. }
  8068. };
  8069. /* */
  8070. var sharedPropertyDefinition = {
  8071. enumerable: true,
  8072. configurable: true,
  8073. get: noop,
  8074. set: noop
  8075. };
  8076. function proxy (target, sourceKey, key) {
  8077. sharedPropertyDefinition.get = function proxyGetter () {
  8078. return this[sourceKey][key]
  8079. };
  8080. sharedPropertyDefinition.set = function proxySetter (val) {
  8081. this[sourceKey][key] = val;
  8082. };
  8083. Object.defineProperty(target, key, sharedPropertyDefinition);
  8084. }
  8085. function initState (vm) {
  8086. vm._watchers = [];
  8087. var opts = vm.$options;
  8088. if (opts.props) { initProps(vm, opts.props); }
  8089. if (opts.methods) { initMethods(vm, opts.methods); }
  8090. if (opts.data) {
  8091. initData(vm);
  8092. } else {
  8093. observe(vm._data = {}, true /* asRootData */);
  8094. }
  8095. if (opts.computed) { initComputed(vm, opts.computed); }
  8096. if (opts.watch && opts.watch !== nativeWatch) {
  8097. initWatch(vm, opts.watch);
  8098. }
  8099. }
  8100. function initProps (vm, propsOptions) {
  8101. var propsData = vm.$options.propsData || {};
  8102. var props = vm._props = {};
  8103. // cache prop keys so that future props updates can iterate using Array
  8104. // instead of dynamic object key enumeration.
  8105. var keys = vm.$options._propKeys = [];
  8106. var isRoot = !vm.$parent;
  8107. // root instance props should be converted
  8108. if (!isRoot) {
  8109. toggleObserving(false);
  8110. }
  8111. var loop = function ( key ) {
  8112. keys.push(key);
  8113. var value = validateProp(key, propsOptions, propsData, vm);
  8114. /* istanbul ignore else */
  8115. if (true) {
  8116. var hyphenatedKey = hyphenate(key);
  8117. if (isReservedAttribute(hyphenatedKey) ||
  8118. config.isReservedAttr(hyphenatedKey)) {
  8119. warn(
  8120. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  8121. vm
  8122. );
  8123. }
  8124. defineReactive$$1(props, key, value, function () {
  8125. if (!isRoot && !isUpdatingChildComponent) {
  8126. {
  8127. if(vm.mpHost === 'mp-baidu'){//百度 observer 在 setData callback 之后触发,直接忽略该 warn
  8128. return
  8129. }
  8130. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  8131. if(
  8132. key === 'value' &&
  8133. Array.isArray(vm.$options.behaviors) &&
  8134. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  8135. ){
  8136. return
  8137. }
  8138. if(vm._getFormData){
  8139. return
  8140. }
  8141. var $parent = vm.$parent;
  8142. while($parent){
  8143. if($parent.__next_tick_pending){
  8144. return
  8145. }
  8146. $parent = $parent.$parent;
  8147. }
  8148. }
  8149. warn(
  8150. "Avoid mutating a prop directly since the value will be " +
  8151. "overwritten whenever the parent component re-renders. " +
  8152. "Instead, use a data or computed property based on the prop's " +
  8153. "value. Prop being mutated: \"" + key + "\"",
  8154. vm
  8155. );
  8156. }
  8157. });
  8158. } else {}
  8159. // static props are already proxied on the component's prototype
  8160. // during Vue.extend(). We only need to proxy props defined at
  8161. // instantiation here.
  8162. if (!(key in vm)) {
  8163. proxy(vm, "_props", key);
  8164. }
  8165. };
  8166. for (var key in propsOptions) loop( key );
  8167. toggleObserving(true);
  8168. }
  8169. function initData (vm) {
  8170. var data = vm.$options.data;
  8171. data = vm._data = typeof data === 'function'
  8172. ? getData(data, vm)
  8173. : data || {};
  8174. if (!isPlainObject(data)) {
  8175. data = {};
  8176. true && warn(
  8177. 'data functions should return an object:\n' +
  8178. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  8179. vm
  8180. );
  8181. }
  8182. // proxy data on instance
  8183. var keys = Object.keys(data);
  8184. var props = vm.$options.props;
  8185. var methods = vm.$options.methods;
  8186. var i = keys.length;
  8187. while (i--) {
  8188. var key = keys[i];
  8189. if (true) {
  8190. if (methods && hasOwn(methods, key)) {
  8191. warn(
  8192. ("Method \"" + key + "\" has already been defined as a data property."),
  8193. vm
  8194. );
  8195. }
  8196. }
  8197. if (props && hasOwn(props, key)) {
  8198. true && warn(
  8199. "The data property \"" + key + "\" is already declared as a prop. " +
  8200. "Use prop default value instead.",
  8201. vm
  8202. );
  8203. } else if (!isReserved(key)) {
  8204. proxy(vm, "_data", key);
  8205. }
  8206. }
  8207. // observe data
  8208. observe(data, true /* asRootData */);
  8209. }
  8210. function getData (data, vm) {
  8211. // #7573 disable dep collection when invoking data getters
  8212. pushTarget();
  8213. try {
  8214. return data.call(vm, vm)
  8215. } catch (e) {
  8216. handleError(e, vm, "data()");
  8217. return {}
  8218. } finally {
  8219. popTarget();
  8220. }
  8221. }
  8222. var computedWatcherOptions = { lazy: true };
  8223. function initComputed (vm, computed) {
  8224. // $flow-disable-line
  8225. var watchers = vm._computedWatchers = Object.create(null);
  8226. // computed properties are just getters during SSR
  8227. var isSSR = isServerRendering();
  8228. for (var key in computed) {
  8229. var userDef = computed[key];
  8230. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  8231. if ( true && getter == null) {
  8232. warn(
  8233. ("Getter is missing for computed property \"" + key + "\"."),
  8234. vm
  8235. );
  8236. }
  8237. if (!isSSR) {
  8238. // create internal watcher for the computed property.
  8239. watchers[key] = new Watcher(
  8240. vm,
  8241. getter || noop,
  8242. noop,
  8243. computedWatcherOptions
  8244. );
  8245. }
  8246. // component-defined computed properties are already defined on the
  8247. // component prototype. We only need to define computed properties defined
  8248. // at instantiation here.
  8249. if (!(key in vm)) {
  8250. defineComputed(vm, key, userDef);
  8251. } else if (true) {
  8252. if (key in vm.$data) {
  8253. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  8254. } else if (vm.$options.props && key in vm.$options.props) {
  8255. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  8256. }
  8257. }
  8258. }
  8259. }
  8260. function defineComputed (
  8261. target,
  8262. key,
  8263. userDef
  8264. ) {
  8265. var shouldCache = !isServerRendering();
  8266. if (typeof userDef === 'function') {
  8267. sharedPropertyDefinition.get = shouldCache
  8268. ? createComputedGetter(key)
  8269. : createGetterInvoker(userDef);
  8270. sharedPropertyDefinition.set = noop;
  8271. } else {
  8272. sharedPropertyDefinition.get = userDef.get
  8273. ? shouldCache && userDef.cache !== false
  8274. ? createComputedGetter(key)
  8275. : createGetterInvoker(userDef.get)
  8276. : noop;
  8277. sharedPropertyDefinition.set = userDef.set || noop;
  8278. }
  8279. if ( true &&
  8280. sharedPropertyDefinition.set === noop) {
  8281. sharedPropertyDefinition.set = function () {
  8282. warn(
  8283. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  8284. this
  8285. );
  8286. };
  8287. }
  8288. Object.defineProperty(target, key, sharedPropertyDefinition);
  8289. }
  8290. function createComputedGetter (key) {
  8291. return function computedGetter () {
  8292. var watcher = this._computedWatchers && this._computedWatchers[key];
  8293. if (watcher) {
  8294. if (watcher.dirty) {
  8295. watcher.evaluate();
  8296. }
  8297. if (Dep.SharedObject.target) {// fixed by xxxxxx
  8298. watcher.depend();
  8299. }
  8300. return watcher.value
  8301. }
  8302. }
  8303. }
  8304. function createGetterInvoker(fn) {
  8305. return function computedGetter () {
  8306. return fn.call(this, this)
  8307. }
  8308. }
  8309. function initMethods (vm, methods) {
  8310. var props = vm.$options.props;
  8311. for (var key in methods) {
  8312. if (true) {
  8313. if (typeof methods[key] !== 'function') {
  8314. warn(
  8315. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  8316. "Did you reference the function correctly?",
  8317. vm
  8318. );
  8319. }
  8320. if (props && hasOwn(props, key)) {
  8321. warn(
  8322. ("Method \"" + key + "\" has already been defined as a prop."),
  8323. vm
  8324. );
  8325. }
  8326. if ((key in vm) && isReserved(key)) {
  8327. warn(
  8328. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  8329. "Avoid defining component methods that start with _ or $."
  8330. );
  8331. }
  8332. }
  8333. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  8334. }
  8335. }
  8336. function initWatch (vm, watch) {
  8337. for (var key in watch) {
  8338. var handler = watch[key];
  8339. if (Array.isArray(handler)) {
  8340. for (var i = 0; i < handler.length; i++) {
  8341. createWatcher(vm, key, handler[i]);
  8342. }
  8343. } else {
  8344. createWatcher(vm, key, handler);
  8345. }
  8346. }
  8347. }
  8348. function createWatcher (
  8349. vm,
  8350. expOrFn,
  8351. handler,
  8352. options
  8353. ) {
  8354. if (isPlainObject(handler)) {
  8355. options = handler;
  8356. handler = handler.handler;
  8357. }
  8358. if (typeof handler === 'string') {
  8359. handler = vm[handler];
  8360. }
  8361. return vm.$watch(expOrFn, handler, options)
  8362. }
  8363. function stateMixin (Vue) {
  8364. // flow somehow has problems with directly declared definition object
  8365. // when using Object.defineProperty, so we have to procedurally build up
  8366. // the object here.
  8367. var dataDef = {};
  8368. dataDef.get = function () { return this._data };
  8369. var propsDef = {};
  8370. propsDef.get = function () { return this._props };
  8371. if (true) {
  8372. dataDef.set = function () {
  8373. warn(
  8374. 'Avoid replacing instance root $data. ' +
  8375. 'Use nested data properties instead.',
  8376. this
  8377. );
  8378. };
  8379. propsDef.set = function () {
  8380. warn("$props is readonly.", this);
  8381. };
  8382. }
  8383. Object.defineProperty(Vue.prototype, '$data', dataDef);
  8384. Object.defineProperty(Vue.prototype, '$props', propsDef);
  8385. Vue.prototype.$set = set;
  8386. Vue.prototype.$delete = del;
  8387. Vue.prototype.$watch = function (
  8388. expOrFn,
  8389. cb,
  8390. options
  8391. ) {
  8392. var vm = this;
  8393. if (isPlainObject(cb)) {
  8394. return createWatcher(vm, expOrFn, cb, options)
  8395. }
  8396. options = options || {};
  8397. options.user = true;
  8398. var watcher = new Watcher(vm, expOrFn, cb, options);
  8399. if (options.immediate) {
  8400. try {
  8401. cb.call(vm, watcher.value);
  8402. } catch (error) {
  8403. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  8404. }
  8405. }
  8406. return function unwatchFn () {
  8407. watcher.teardown();
  8408. }
  8409. };
  8410. }
  8411. /* */
  8412. var uid$3 = 0;
  8413. function initMixin (Vue) {
  8414. Vue.prototype._init = function (options) {
  8415. var vm = this;
  8416. // a uid
  8417. vm._uid = uid$3++;
  8418. var startTag, endTag;
  8419. /* istanbul ignore if */
  8420. if ( true && config.performance && mark) {
  8421. startTag = "vue-perf-start:" + (vm._uid);
  8422. endTag = "vue-perf-end:" + (vm._uid);
  8423. mark(startTag);
  8424. }
  8425. // a flag to avoid this being observed
  8426. vm._isVue = true;
  8427. // merge options
  8428. if (options && options._isComponent) {
  8429. // optimize internal component instantiation
  8430. // since dynamic options merging is pretty slow, and none of the
  8431. // internal component options needs special treatment.
  8432. initInternalComponent(vm, options);
  8433. } else {
  8434. vm.$options = mergeOptions(
  8435. resolveConstructorOptions(vm.constructor),
  8436. options || {},
  8437. vm
  8438. );
  8439. }
  8440. /* istanbul ignore else */
  8441. if (true) {
  8442. initProxy(vm);
  8443. } else {}
  8444. // expose real self
  8445. vm._self = vm;
  8446. initLifecycle(vm);
  8447. initEvents(vm);
  8448. initRender(vm);
  8449. callHook(vm, 'beforeCreate');
  8450. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  8451. initState(vm);
  8452. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  8453. !vm._$fallback && callHook(vm, 'created');
  8454. /* istanbul ignore if */
  8455. if ( true && config.performance && mark) {
  8456. vm._name = formatComponentName(vm, false);
  8457. mark(endTag);
  8458. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  8459. }
  8460. if (vm.$options.el) {
  8461. vm.$mount(vm.$options.el);
  8462. }
  8463. };
  8464. }
  8465. function initInternalComponent (vm, options) {
  8466. var opts = vm.$options = Object.create(vm.constructor.options);
  8467. // doing this because it's faster than dynamic enumeration.
  8468. var parentVnode = options._parentVnode;
  8469. opts.parent = options.parent;
  8470. opts._parentVnode = parentVnode;
  8471. var vnodeComponentOptions = parentVnode.componentOptions;
  8472. opts.propsData = vnodeComponentOptions.propsData;
  8473. opts._parentListeners = vnodeComponentOptions.listeners;
  8474. opts._renderChildren = vnodeComponentOptions.children;
  8475. opts._componentTag = vnodeComponentOptions.tag;
  8476. if (options.render) {
  8477. opts.render = options.render;
  8478. opts.staticRenderFns = options.staticRenderFns;
  8479. }
  8480. }
  8481. function resolveConstructorOptions (Ctor) {
  8482. var options = Ctor.options;
  8483. if (Ctor.super) {
  8484. var superOptions = resolveConstructorOptions(Ctor.super);
  8485. var cachedSuperOptions = Ctor.superOptions;
  8486. if (superOptions !== cachedSuperOptions) {
  8487. // super option changed,
  8488. // need to resolve new options.
  8489. Ctor.superOptions = superOptions;
  8490. // check if there are any late-modified/attached options (#4976)
  8491. var modifiedOptions = resolveModifiedOptions(Ctor);
  8492. // update base extend options
  8493. if (modifiedOptions) {
  8494. extend(Ctor.extendOptions, modifiedOptions);
  8495. }
  8496. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  8497. if (options.name) {
  8498. options.components[options.name] = Ctor;
  8499. }
  8500. }
  8501. }
  8502. return options
  8503. }
  8504. function resolveModifiedOptions (Ctor) {
  8505. var modified;
  8506. var latest = Ctor.options;
  8507. var sealed = Ctor.sealedOptions;
  8508. for (var key in latest) {
  8509. if (latest[key] !== sealed[key]) {
  8510. if (!modified) { modified = {}; }
  8511. modified[key] = latest[key];
  8512. }
  8513. }
  8514. return modified
  8515. }
  8516. function Vue (options) {
  8517. if ( true &&
  8518. !(this instanceof Vue)
  8519. ) {
  8520. warn('Vue is a constructor and should be called with the `new` keyword');
  8521. }
  8522. this._init(options);
  8523. }
  8524. initMixin(Vue);
  8525. stateMixin(Vue);
  8526. eventsMixin(Vue);
  8527. lifecycleMixin(Vue);
  8528. renderMixin(Vue);
  8529. /* */
  8530. function initUse (Vue) {
  8531. Vue.use = function (plugin) {
  8532. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  8533. if (installedPlugins.indexOf(plugin) > -1) {
  8534. return this
  8535. }
  8536. // additional parameters
  8537. var args = toArray(arguments, 1);
  8538. args.unshift(this);
  8539. if (typeof plugin.install === 'function') {
  8540. plugin.install.apply(plugin, args);
  8541. } else if (typeof plugin === 'function') {
  8542. plugin.apply(null, args);
  8543. }
  8544. installedPlugins.push(plugin);
  8545. return this
  8546. };
  8547. }
  8548. /* */
  8549. function initMixin$1 (Vue) {
  8550. Vue.mixin = function (mixin) {
  8551. this.options = mergeOptions(this.options, mixin);
  8552. return this
  8553. };
  8554. }
  8555. /* */
  8556. function initExtend (Vue) {
  8557. /**
  8558. * Each instance constructor, including Vue, has a unique
  8559. * cid. This enables us to create wrapped "child
  8560. * constructors" for prototypal inheritance and cache them.
  8561. */
  8562. Vue.cid = 0;
  8563. var cid = 1;
  8564. /**
  8565. * Class inheritance
  8566. */
  8567. Vue.extend = function (extendOptions) {
  8568. extendOptions = extendOptions || {};
  8569. var Super = this;
  8570. var SuperId = Super.cid;
  8571. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  8572. if (cachedCtors[SuperId]) {
  8573. return cachedCtors[SuperId]
  8574. }
  8575. var name = extendOptions.name || Super.options.name;
  8576. if ( true && name) {
  8577. validateComponentName(name);
  8578. }
  8579. var Sub = function VueComponent (options) {
  8580. this._init(options);
  8581. };
  8582. Sub.prototype = Object.create(Super.prototype);
  8583. Sub.prototype.constructor = Sub;
  8584. Sub.cid = cid++;
  8585. Sub.options = mergeOptions(
  8586. Super.options,
  8587. extendOptions
  8588. );
  8589. Sub['super'] = Super;
  8590. // For props and computed properties, we define the proxy getters on
  8591. // the Vue instances at extension time, on the extended prototype. This
  8592. // avoids Object.defineProperty calls for each instance created.
  8593. if (Sub.options.props) {
  8594. initProps$1(Sub);
  8595. }
  8596. if (Sub.options.computed) {
  8597. initComputed$1(Sub);
  8598. }
  8599. // allow further extension/mixin/plugin usage
  8600. Sub.extend = Super.extend;
  8601. Sub.mixin = Super.mixin;
  8602. Sub.use = Super.use;
  8603. // create asset registers, so extended classes
  8604. // can have their private assets too.
  8605. ASSET_TYPES.forEach(function (type) {
  8606. Sub[type] = Super[type];
  8607. });
  8608. // enable recursive self-lookup
  8609. if (name) {
  8610. Sub.options.components[name] = Sub;
  8611. }
  8612. // keep a reference to the super options at extension time.
  8613. // later at instantiation we can check if Super's options have
  8614. // been updated.
  8615. Sub.superOptions = Super.options;
  8616. Sub.extendOptions = extendOptions;
  8617. Sub.sealedOptions = extend({}, Sub.options);
  8618. // cache constructor
  8619. cachedCtors[SuperId] = Sub;
  8620. return Sub
  8621. };
  8622. }
  8623. function initProps$1 (Comp) {
  8624. var props = Comp.options.props;
  8625. for (var key in props) {
  8626. proxy(Comp.prototype, "_props", key);
  8627. }
  8628. }
  8629. function initComputed$1 (Comp) {
  8630. var computed = Comp.options.computed;
  8631. for (var key in computed) {
  8632. defineComputed(Comp.prototype, key, computed[key]);
  8633. }
  8634. }
  8635. /* */
  8636. function initAssetRegisters (Vue) {
  8637. /**
  8638. * Create asset registration methods.
  8639. */
  8640. ASSET_TYPES.forEach(function (type) {
  8641. Vue[type] = function (
  8642. id,
  8643. definition
  8644. ) {
  8645. if (!definition) {
  8646. return this.options[type + 's'][id]
  8647. } else {
  8648. /* istanbul ignore if */
  8649. if ( true && type === 'component') {
  8650. validateComponentName(id);
  8651. }
  8652. if (type === 'component' && isPlainObject(definition)) {
  8653. definition.name = definition.name || id;
  8654. definition = this.options._base.extend(definition);
  8655. }
  8656. if (type === 'directive' && typeof definition === 'function') {
  8657. definition = { bind: definition, update: definition };
  8658. }
  8659. this.options[type + 's'][id] = definition;
  8660. return definition
  8661. }
  8662. };
  8663. });
  8664. }
  8665. /* */
  8666. function getComponentName (opts) {
  8667. return opts && (opts.Ctor.options.name || opts.tag)
  8668. }
  8669. function matches (pattern, name) {
  8670. if (Array.isArray(pattern)) {
  8671. return pattern.indexOf(name) > -1
  8672. } else if (typeof pattern === 'string') {
  8673. return pattern.split(',').indexOf(name) > -1
  8674. } else if (isRegExp(pattern)) {
  8675. return pattern.test(name)
  8676. }
  8677. /* istanbul ignore next */
  8678. return false
  8679. }
  8680. function pruneCache (keepAliveInstance, filter) {
  8681. var cache = keepAliveInstance.cache;
  8682. var keys = keepAliveInstance.keys;
  8683. var _vnode = keepAliveInstance._vnode;
  8684. for (var key in cache) {
  8685. var cachedNode = cache[key];
  8686. if (cachedNode) {
  8687. var name = getComponentName(cachedNode.componentOptions);
  8688. if (name && !filter(name)) {
  8689. pruneCacheEntry(cache, key, keys, _vnode);
  8690. }
  8691. }
  8692. }
  8693. }
  8694. function pruneCacheEntry (
  8695. cache,
  8696. key,
  8697. keys,
  8698. current
  8699. ) {
  8700. var cached$$1 = cache[key];
  8701. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  8702. cached$$1.componentInstance.$destroy();
  8703. }
  8704. cache[key] = null;
  8705. remove(keys, key);
  8706. }
  8707. var patternTypes = [String, RegExp, Array];
  8708. var KeepAlive = {
  8709. name: 'keep-alive',
  8710. abstract: true,
  8711. props: {
  8712. include: patternTypes,
  8713. exclude: patternTypes,
  8714. max: [String, Number]
  8715. },
  8716. created: function created () {
  8717. this.cache = Object.create(null);
  8718. this.keys = [];
  8719. },
  8720. destroyed: function destroyed () {
  8721. for (var key in this.cache) {
  8722. pruneCacheEntry(this.cache, key, this.keys);
  8723. }
  8724. },
  8725. mounted: function mounted () {
  8726. var this$1 = this;
  8727. this.$watch('include', function (val) {
  8728. pruneCache(this$1, function (name) { return matches(val, name); });
  8729. });
  8730. this.$watch('exclude', function (val) {
  8731. pruneCache(this$1, function (name) { return !matches(val, name); });
  8732. });
  8733. },
  8734. render: function render () {
  8735. var slot = this.$slots.default;
  8736. var vnode = getFirstComponentChild(slot);
  8737. var componentOptions = vnode && vnode.componentOptions;
  8738. if (componentOptions) {
  8739. // check pattern
  8740. var name = getComponentName(componentOptions);
  8741. var ref = this;
  8742. var include = ref.include;
  8743. var exclude = ref.exclude;
  8744. if (
  8745. // not included
  8746. (include && (!name || !matches(include, name))) ||
  8747. // excluded
  8748. (exclude && name && matches(exclude, name))
  8749. ) {
  8750. return vnode
  8751. }
  8752. var ref$1 = this;
  8753. var cache = ref$1.cache;
  8754. var keys = ref$1.keys;
  8755. var key = vnode.key == null
  8756. // same constructor may get registered as different local components
  8757. // so cid alone is not enough (#3269)
  8758. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  8759. : vnode.key;
  8760. if (cache[key]) {
  8761. vnode.componentInstance = cache[key].componentInstance;
  8762. // make current key freshest
  8763. remove(keys, key);
  8764. keys.push(key);
  8765. } else {
  8766. cache[key] = vnode;
  8767. keys.push(key);
  8768. // prune oldest entry
  8769. if (this.max && keys.length > parseInt(this.max)) {
  8770. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  8771. }
  8772. }
  8773. vnode.data.keepAlive = true;
  8774. }
  8775. return vnode || (slot && slot[0])
  8776. }
  8777. };
  8778. var builtInComponents = {
  8779. KeepAlive: KeepAlive
  8780. };
  8781. /* */
  8782. function initGlobalAPI (Vue) {
  8783. // config
  8784. var configDef = {};
  8785. configDef.get = function () { return config; };
  8786. if (true) {
  8787. configDef.set = function () {
  8788. warn(
  8789. 'Do not replace the Vue.config object, set individual fields instead.'
  8790. );
  8791. };
  8792. }
  8793. Object.defineProperty(Vue, 'config', configDef);
  8794. // exposed util methods.
  8795. // NOTE: these are not considered part of the public API - avoid relying on
  8796. // them unless you are aware of the risk.
  8797. Vue.util = {
  8798. warn: warn,
  8799. extend: extend,
  8800. mergeOptions: mergeOptions,
  8801. defineReactive: defineReactive$$1
  8802. };
  8803. Vue.set = set;
  8804. Vue.delete = del;
  8805. Vue.nextTick = nextTick;
  8806. // 2.6 explicit observable API
  8807. Vue.observable = function (obj) {
  8808. observe(obj);
  8809. return obj
  8810. };
  8811. Vue.options = Object.create(null);
  8812. ASSET_TYPES.forEach(function (type) {
  8813. Vue.options[type + 's'] = Object.create(null);
  8814. });
  8815. // this is used to identify the "base" constructor to extend all plain-object
  8816. // components with in Weex's multi-instance scenarios.
  8817. Vue.options._base = Vue;
  8818. extend(Vue.options.components, builtInComponents);
  8819. initUse(Vue);
  8820. initMixin$1(Vue);
  8821. initExtend(Vue);
  8822. initAssetRegisters(Vue);
  8823. }
  8824. initGlobalAPI(Vue);
  8825. Object.defineProperty(Vue.prototype, '$isServer', {
  8826. get: isServerRendering
  8827. });
  8828. Object.defineProperty(Vue.prototype, '$ssrContext', {
  8829. get: function get () {
  8830. /* istanbul ignore next */
  8831. return this.$vnode && this.$vnode.ssrContext
  8832. }
  8833. });
  8834. // expose FunctionalRenderContext for ssr runtime helper installation
  8835. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  8836. value: FunctionalRenderContext
  8837. });
  8838. Vue.version = '2.6.11';
  8839. /**
  8840. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  8841. */
  8842. var ARRAYTYPE = '[object Array]';
  8843. var OBJECTTYPE = '[object Object]';
  8844. // const FUNCTIONTYPE = '[object Function]'
  8845. function diff(current, pre) {
  8846. var result = {};
  8847. syncKeys(current, pre);
  8848. _diff(current, pre, '', result);
  8849. return result
  8850. }
  8851. function syncKeys(current, pre) {
  8852. if (current === pre) { return }
  8853. var rootCurrentType = type(current);
  8854. var rootPreType = type(pre);
  8855. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  8856. if(Object.keys(current).length >= Object.keys(pre).length){
  8857. for (var key in pre) {
  8858. var currentValue = current[key];
  8859. if (currentValue === undefined) {
  8860. current[key] = null;
  8861. } else {
  8862. syncKeys(currentValue, pre[key]);
  8863. }
  8864. }
  8865. }
  8866. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  8867. if (current.length >= pre.length) {
  8868. pre.forEach(function (item, index) {
  8869. syncKeys(current[index], item);
  8870. });
  8871. }
  8872. }
  8873. }
  8874. function _diff(current, pre, path, result) {
  8875. if (current === pre) { return }
  8876. var rootCurrentType = type(current);
  8877. var rootPreType = type(pre);
  8878. if (rootCurrentType == OBJECTTYPE) {
  8879. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  8880. setResult(result, path, current);
  8881. } else {
  8882. var loop = function ( key ) {
  8883. var currentValue = current[key];
  8884. var preValue = pre[key];
  8885. var currentType = type(currentValue);
  8886. var preType = type(preValue);
  8887. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  8888. if (currentValue != pre[key]) {
  8889. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8890. }
  8891. } else if (currentType == ARRAYTYPE) {
  8892. if (preType != ARRAYTYPE) {
  8893. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8894. } else {
  8895. if (currentValue.length < preValue.length) {
  8896. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8897. } else {
  8898. currentValue.forEach(function (item, index) {
  8899. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  8900. });
  8901. }
  8902. }
  8903. } else if (currentType == OBJECTTYPE) {
  8904. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  8905. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8906. } else {
  8907. for (var subKey in currentValue) {
  8908. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  8909. }
  8910. }
  8911. }
  8912. };
  8913. for (var key in current) loop( key );
  8914. }
  8915. } else if (rootCurrentType == ARRAYTYPE) {
  8916. if (rootPreType != ARRAYTYPE) {
  8917. setResult(result, path, current);
  8918. } else {
  8919. if (current.length < pre.length) {
  8920. setResult(result, path, current);
  8921. } else {
  8922. current.forEach(function (item, index) {
  8923. _diff(item, pre[index], path + '[' + index + ']', result);
  8924. });
  8925. }
  8926. }
  8927. } else {
  8928. setResult(result, path, current);
  8929. }
  8930. }
  8931. function setResult(result, k, v) {
  8932. // if (type(v) != FUNCTIONTYPE) {
  8933. result[k] = v;
  8934. // }
  8935. }
  8936. function type(obj) {
  8937. return Object.prototype.toString.call(obj)
  8938. }
  8939. /* */
  8940. function flushCallbacks$1(vm) {
  8941. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  8942. if (Object({"VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  8943. var mpInstance = vm.$scope;
  8944. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  8945. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  8946. }
  8947. var copies = vm.__next_tick_callbacks.slice(0);
  8948. vm.__next_tick_callbacks.length = 0;
  8949. for (var i = 0; i < copies.length; i++) {
  8950. copies[i]();
  8951. }
  8952. }
  8953. }
  8954. function hasRenderWatcher(vm) {
  8955. return queue.find(function (watcher) { return vm._watcher === watcher; })
  8956. }
  8957. function nextTick$1(vm, cb) {
  8958. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  8959. //2.nextTick 之前存在 render watcher
  8960. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  8961. if(Object({"VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  8962. var mpInstance = vm.$scope;
  8963. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  8964. ']:nextVueTick');
  8965. }
  8966. return nextTick(cb, vm)
  8967. }else{
  8968. if(Object({"VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  8969. var mpInstance$1 = vm.$scope;
  8970. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  8971. ']:nextMPTick');
  8972. }
  8973. }
  8974. var _resolve;
  8975. if (!vm.__next_tick_callbacks) {
  8976. vm.__next_tick_callbacks = [];
  8977. }
  8978. vm.__next_tick_callbacks.push(function () {
  8979. if (cb) {
  8980. try {
  8981. cb.call(vm);
  8982. } catch (e) {
  8983. handleError(e, vm, 'nextTick');
  8984. }
  8985. } else if (_resolve) {
  8986. _resolve(vm);
  8987. }
  8988. });
  8989. // $flow-disable-line
  8990. if (!cb && typeof Promise !== 'undefined') {
  8991. return new Promise(function (resolve) {
  8992. _resolve = resolve;
  8993. })
  8994. }
  8995. }
  8996. /* */
  8997. function cloneWithData(vm) {
  8998. // 确保当前 vm 所有数据被同步
  8999. var ret = Object.create(null);
  9000. var dataKeys = [].concat(
  9001. Object.keys(vm._data || {}),
  9002. Object.keys(vm._computedWatchers || {}));
  9003. dataKeys.reduce(function(ret, key) {
  9004. ret[key] = vm[key];
  9005. return ret
  9006. }, ret);
  9007. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  9008. Object.assign(ret, vm.$mp.data || {});
  9009. if (
  9010. Array.isArray(vm.$options.behaviors) &&
  9011. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  9012. ) { //form-field
  9013. ret['name'] = vm.name;
  9014. ret['value'] = vm.value;
  9015. }
  9016. return JSON.parse(JSON.stringify(ret))
  9017. }
  9018. var patch = function(oldVnode, vnode) {
  9019. var this$1 = this;
  9020. if (vnode === null) { //destroy
  9021. return
  9022. }
  9023. if (this.mpType === 'page' || this.mpType === 'component') {
  9024. var mpInstance = this.$scope;
  9025. var data = Object.create(null);
  9026. try {
  9027. data = cloneWithData(this);
  9028. } catch (err) {
  9029. console.error(err);
  9030. }
  9031. data.__webviewId__ = mpInstance.data.__webviewId__;
  9032. var mpData = Object.create(null);
  9033. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  9034. mpData[key] = mpInstance.data[key];
  9035. });
  9036. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  9037. if (Object.keys(diffData).length) {
  9038. if (Object({"VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  9039. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  9040. ']差量更新',
  9041. JSON.stringify(diffData));
  9042. }
  9043. this.__next_tick_pending = true;
  9044. mpInstance.setData(diffData, function () {
  9045. this$1.__next_tick_pending = false;
  9046. flushCallbacks$1(this$1);
  9047. });
  9048. } else {
  9049. flushCallbacks$1(this);
  9050. }
  9051. }
  9052. };
  9053. /* */
  9054. function createEmptyRender() {
  9055. }
  9056. function mountComponent$1(
  9057. vm,
  9058. el,
  9059. hydrating
  9060. ) {
  9061. if (!vm.mpType) {//main.js 中的 new Vue
  9062. return vm
  9063. }
  9064. if (vm.mpType === 'app') {
  9065. vm.$options.render = createEmptyRender;
  9066. }
  9067. if (!vm.$options.render) {
  9068. vm.$options.render = createEmptyRender;
  9069. if (true) {
  9070. /* istanbul ignore if */
  9071. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  9072. vm.$options.el || el) {
  9073. warn(
  9074. 'You are using the runtime-only build of Vue where the template ' +
  9075. 'compiler is not available. Either pre-compile the templates into ' +
  9076. 'render functions, or use the compiler-included build.',
  9077. vm
  9078. );
  9079. } else {
  9080. warn(
  9081. 'Failed to mount component: template or render function not defined.',
  9082. vm
  9083. );
  9084. }
  9085. }
  9086. }
  9087. !vm._$fallback && callHook(vm, 'beforeMount');
  9088. var updateComponent = function () {
  9089. vm._update(vm._render(), hydrating);
  9090. };
  9091. // we set this to vm._watcher inside the watcher's constructor
  9092. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  9093. // component's mounted hook), which relies on vm._watcher being already defined
  9094. new Watcher(vm, updateComponent, noop, {
  9095. before: function before() {
  9096. if (vm._isMounted && !vm._isDestroyed) {
  9097. callHook(vm, 'beforeUpdate');
  9098. }
  9099. }
  9100. }, true /* isRenderWatcher */);
  9101. hydrating = false;
  9102. return vm
  9103. }
  9104. /* */
  9105. function renderClass (
  9106. staticClass,
  9107. dynamicClass
  9108. ) {
  9109. if (isDef(staticClass) || isDef(dynamicClass)) {
  9110. return concat(staticClass, stringifyClass(dynamicClass))
  9111. }
  9112. /* istanbul ignore next */
  9113. return ''
  9114. }
  9115. function concat (a, b) {
  9116. return a ? b ? (a + ' ' + b) : a : (b || '')
  9117. }
  9118. function stringifyClass (value) {
  9119. if (Array.isArray(value)) {
  9120. return stringifyArray(value)
  9121. }
  9122. if (isObject(value)) {
  9123. return stringifyObject(value)
  9124. }
  9125. if (typeof value === 'string') {
  9126. return value
  9127. }
  9128. /* istanbul ignore next */
  9129. return ''
  9130. }
  9131. function stringifyArray (value) {
  9132. var res = '';
  9133. var stringified;
  9134. for (var i = 0, l = value.length; i < l; i++) {
  9135. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  9136. if (res) { res += ' '; }
  9137. res += stringified;
  9138. }
  9139. }
  9140. return res
  9141. }
  9142. function stringifyObject (value) {
  9143. var res = '';
  9144. for (var key in value) {
  9145. if (value[key]) {
  9146. if (res) { res += ' '; }
  9147. res += key;
  9148. }
  9149. }
  9150. return res
  9151. }
  9152. /* */
  9153. var parseStyleText = cached(function (cssText) {
  9154. var res = {};
  9155. var listDelimiter = /;(?![^(]*\))/g;
  9156. var propertyDelimiter = /:(.+)/;
  9157. cssText.split(listDelimiter).forEach(function (item) {
  9158. if (item) {
  9159. var tmp = item.split(propertyDelimiter);
  9160. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  9161. }
  9162. });
  9163. return res
  9164. });
  9165. // normalize possible array / string values into Object
  9166. function normalizeStyleBinding (bindingStyle) {
  9167. if (Array.isArray(bindingStyle)) {
  9168. return toObject(bindingStyle)
  9169. }
  9170. if (typeof bindingStyle === 'string') {
  9171. return parseStyleText(bindingStyle)
  9172. }
  9173. return bindingStyle
  9174. }
  9175. /* */
  9176. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  9177. function getTarget(obj, path) {
  9178. var parts = path.split('.');
  9179. var key = parts[0];
  9180. if (key.indexOf('__$n') === 0) { //number index
  9181. key = parseInt(key.replace('__$n', ''));
  9182. }
  9183. if (parts.length === 1) {
  9184. return obj[key]
  9185. }
  9186. return getTarget(obj[key], parts.slice(1).join('.'))
  9187. }
  9188. function internalMixin(Vue) {
  9189. Vue.config.errorHandler = function(err) {
  9190. console.error(err);
  9191. /* eslint-disable no-undef */
  9192. var app = getApp();
  9193. if (app && app.onError) {
  9194. app.onError(err);
  9195. }
  9196. };
  9197. var oldEmit = Vue.prototype.$emit;
  9198. Vue.prototype.$emit = function(event) {
  9199. if (this.$scope && event) {
  9200. this.$scope['triggerEvent'](event, {
  9201. __args__: toArray(arguments, 1)
  9202. });
  9203. }
  9204. return oldEmit.apply(this, arguments)
  9205. };
  9206. Vue.prototype.$nextTick = function(fn) {
  9207. return nextTick$1(this, fn)
  9208. };
  9209. MP_METHODS.forEach(function (method) {
  9210. Vue.prototype[method] = function(args) {
  9211. if (this.$scope && this.$scope[method]) {
  9212. return this.$scope[method](args)
  9213. }
  9214. // mp-alipay
  9215. if (typeof my === 'undefined') {
  9216. return
  9217. }
  9218. if (method === 'createSelectorQuery') {
  9219. /* eslint-disable no-undef */
  9220. return my.createSelectorQuery(args)
  9221. } else if (method === 'createIntersectionObserver') {
  9222. /* eslint-disable no-undef */
  9223. return my.createIntersectionObserver(args)
  9224. }
  9225. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  9226. };
  9227. });
  9228. Vue.prototype.__init_provide = initProvide;
  9229. Vue.prototype.__init_injections = initInjections;
  9230. Vue.prototype.__call_hook = function(hook, args) {
  9231. var vm = this;
  9232. // #7573 disable dep collection when invoking lifecycle hooks
  9233. pushTarget();
  9234. var handlers = vm.$options[hook];
  9235. var info = hook + " hook";
  9236. var ret;
  9237. if (handlers) {
  9238. for (var i = 0, j = handlers.length; i < j; i++) {
  9239. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  9240. }
  9241. }
  9242. if (vm._hasHookEvent) {
  9243. vm.$emit('hook:' + hook, args);
  9244. }
  9245. popTarget();
  9246. return ret
  9247. };
  9248. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  9249. if (Array.isArray(modifiers)) {
  9250. if (modifiers.indexOf('trim') !== -1) {
  9251. value = value.trim();
  9252. }
  9253. if (modifiers.indexOf('number') !== -1) {
  9254. value = this._n(value);
  9255. }
  9256. }
  9257. if (!target) {
  9258. target = this;
  9259. }
  9260. target[key] = value;
  9261. };
  9262. Vue.prototype.__set_sync = function(target, key, value) {
  9263. if (!target) {
  9264. target = this;
  9265. }
  9266. target[key] = value;
  9267. };
  9268. Vue.prototype.__get_orig = function(item) {
  9269. if (isPlainObject(item)) {
  9270. return item['$orig'] || item
  9271. }
  9272. return item
  9273. };
  9274. Vue.prototype.__get_value = function(dataPath, target) {
  9275. return getTarget(target || this, dataPath)
  9276. };
  9277. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  9278. return renderClass(staticClass, dynamicClass)
  9279. };
  9280. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  9281. if (!dynamicStyle && !staticStyle) {
  9282. return ''
  9283. }
  9284. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  9285. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  9286. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  9287. };
  9288. Vue.prototype.__map = function(val, iteratee) {
  9289. //TODO 暂不考虑 string,number
  9290. var ret, i, l, keys, key;
  9291. if (Array.isArray(val)) {
  9292. ret = new Array(val.length);
  9293. for (i = 0, l = val.length; i < l; i++) {
  9294. ret[i] = iteratee(val[i], i);
  9295. }
  9296. return ret
  9297. } else if (isObject(val)) {
  9298. keys = Object.keys(val);
  9299. ret = Object.create(null);
  9300. for (i = 0, l = keys.length; i < l; i++) {
  9301. key = keys[i];
  9302. ret[key] = iteratee(val[key], key, i);
  9303. }
  9304. return ret
  9305. }
  9306. return []
  9307. };
  9308. }
  9309. /* */
  9310. var LIFECYCLE_HOOKS$1 = [
  9311. //App
  9312. 'onLaunch',
  9313. 'onShow',
  9314. 'onHide',
  9315. 'onUniNViewMessage',
  9316. 'onError',
  9317. //Page
  9318. 'onLoad',
  9319. // 'onShow',
  9320. 'onReady',
  9321. // 'onHide',
  9322. 'onUnload',
  9323. 'onPullDownRefresh',
  9324. 'onReachBottom',
  9325. 'onTabItemTap',
  9326. 'onShareAppMessage',
  9327. 'onResize',
  9328. 'onPageScroll',
  9329. 'onNavigationBarButtonTap',
  9330. 'onBackPress',
  9331. 'onNavigationBarSearchInputChanged',
  9332. 'onNavigationBarSearchInputConfirmed',
  9333. 'onNavigationBarSearchInputClicked',
  9334. //Component
  9335. // 'onReady', // 兼容旧版本,应该移除该事件
  9336. 'onPageShow',
  9337. 'onPageHide',
  9338. 'onPageResize'
  9339. ];
  9340. function lifecycleMixin$1(Vue) {
  9341. //fixed vue-class-component
  9342. var oldExtend = Vue.extend;
  9343. Vue.extend = function(extendOptions) {
  9344. extendOptions = extendOptions || {};
  9345. var methods = extendOptions.methods;
  9346. if (methods) {
  9347. Object.keys(methods).forEach(function (methodName) {
  9348. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  9349. extendOptions[methodName] = methods[methodName];
  9350. delete methods[methodName];
  9351. }
  9352. });
  9353. }
  9354. return oldExtend.call(this, extendOptions)
  9355. };
  9356. var strategies = Vue.config.optionMergeStrategies;
  9357. var mergeHook = strategies.created;
  9358. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  9359. strategies[hook] = mergeHook;
  9360. });
  9361. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  9362. }
  9363. /* */
  9364. // install platform patch function
  9365. Vue.prototype.__patch__ = patch;
  9366. // public mount method
  9367. Vue.prototype.$mount = function(
  9368. el ,
  9369. hydrating
  9370. ) {
  9371. return mountComponent$1(this, el, hydrating)
  9372. };
  9373. lifecycleMixin$1(Vue);
  9374. internalMixin(Vue);
  9375. /* */
  9376. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  9377. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  9378. /***/ }),
  9379. /***/ 20:
  9380. /*!***********************************************!*\
  9381. !*** C:/Users/Admin/Desktop/商城/core/utils.js ***!
  9382. \***********************************************/
  9383. /*! no static exports found */
  9384. /***/ (function(module, exports, __webpack_require__) {
  9385. "use strict";
  9386. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.deleteUrlParam = exports.batchSave = exports.hideLoading = exports.showLoading = exports.urlParamsToObject = exports.randomString = exports.objectValues = exports.earthDistance = exports.timeDifference = exports.objectToUrlParams = exports.strtotime = exports.datetime = exports.time = void 0;var time = function time() {
  9387. return parseInt(Math.round(new Date() / 1000));
  9388. };
  9389. /***
  9390. * 时间戳转换时间字符串
  9391. * @param format eg: Y-m-d h:i:s
  9392. * @param timestamp
  9393. * @returns {*}
  9394. */exports.time = time;
  9395. var datetime = function datetime(format, timestamp) {
  9396. if (typeof format === 'undefined' || format === null) {
  9397. format = 'Y-m-d h:i:s';
  9398. }
  9399. if (typeof timestamp === 'undefined' || timestamp === null) {
  9400. timestamp = this.time();
  9401. }
  9402. var d = new Date();
  9403. d.setTime(timestamp * 1000);
  9404. // from https://www.cnblogs.com/yjf512/p/3796229.html
  9405. var date = {
  9406. "Y": d.getFullYear(),
  9407. "m+": d.getMonth() + 1 < 10 ? "0".concat(d.getMonth() + 1) : d.getMonth() + 1,
  9408. "d+": d.getDate() < 10 ? "0".concat(d.getDate()) : d.getDate(),
  9409. "h+": d.getHours() < 10 ? "0".concat(d.getHours()) : d.getHours(),
  9410. "i+": d.getMinutes() < 10 ? "0".concat(d.getMinutes()) : d.getMinutes(),
  9411. "s+": d.getSeconds() < 10 ? "0".concat(d.getSeconds()) : d.getSeconds(),
  9412. "q+": Math.floor((d.getMonth() + 3) / 3),
  9413. "S+": d.getMilliseconds() };
  9414. for (var k in date) {
  9415. if (new RegExp("(" + k + ")").test(format)) {
  9416. format = format.replace(RegExp.$1, RegExp.$1.length === 1 ?
  9417. date[k] : ("00" + date[k]).substr(("" + date[k]).length));
  9418. }
  9419. }
  9420. return format;
  9421. };exports.datetime = datetime;
  9422. var strtotime = function strtotime(str) {
  9423. };exports.strtotime = strtotime;
  9424. var objectToUrlParams = function objectToUrlParams(obj, urlencode) {
  9425. var str = "";
  9426. for (var key in obj) {
  9427. str += "&" + key + "=" + (urlencode ? encodeURIComponent(obj[key]) : obj[key]);
  9428. }
  9429. return str.substr(1);
  9430. };exports.objectToUrlParams = objectToUrlParams;
  9431. var timeDifference = function timeDifference(start_at, end_at) {
  9432. var times = parseInt((end_at - start_at) / 1000);
  9433. var day = 0,
  9434. hour = 0,
  9435. minute = 0,
  9436. second = 0;
  9437. if (times > 0) {
  9438. day = Math.floor(times / (60 * 60 * 24));
  9439. hour = Math.floor(times / (60 * 60)) - day * 24;
  9440. minute = Math.floor(times / 60) - day * 24 * 60 - hour * 60;
  9441. second = Math.floor(times) - day * 24 * 60 * 60 - hour * 60 * 60 - minute * 60;
  9442. } else {
  9443. return null;
  9444. }
  9445. return {
  9446. d: day,
  9447. h: hour < 10 ? '0' + hour : hour,
  9448. m: minute < 10 ? '0' + minute : minute,
  9449. s: second < 10 ? '0' + second : second };
  9450. };
  9451. /**
  9452. * 使用经纬度计算地球表面距离
  9453. */exports.timeDifference = timeDifference;
  9454. var earthDistance = function earthDistance(location1, location2) {
  9455. var lat1 = parseFloat(location1.lat);
  9456. var lng1 = parseFloat(location1.lng);
  9457. var lat2 = parseFloat(location2.lat);
  9458. var lng2 = parseFloat(location2.lng);
  9459. var EARTH_RADIUS = 6378137.0; //单位M
  9460. var PI = Math.PI;
  9461. function getRad(d) {
  9462. return d * PI / 180.0;
  9463. }
  9464. var f = getRad((lat1 + lat2) / 2);
  9465. var g = getRad((lat1 - lat2) / 2);
  9466. var l = getRad((lng1 - lng2) / 2);
  9467. var sg = Math.sin(g);
  9468. var sl = Math.sin(l);
  9469. var sf = Math.sin(f);
  9470. var s, c, w, r, d, h1, h2;
  9471. var a = EARTH_RADIUS;
  9472. var fl = 1 / 298.257;
  9473. sg = sg * sg;
  9474. sl = sl * sl;
  9475. sf = sf * sf;
  9476. s = sg * (1 - sl) + (1 - sf) * sl;
  9477. c = (1 - sg) * (1 - sl) + sf * sl;
  9478. w = Math.atan(Math.sqrt(s / c));
  9479. r = Math.sqrt(s * c) / w;
  9480. d = 2 * w * a;
  9481. h1 = (3 * r - 1) / 2 / c;
  9482. h2 = (3 * r + 1) / 2 / s;
  9483. return d * (1 + fl * (h1 * sf * (1 - sg) - h2 * (1 - sf) * sg));
  9484. };exports.earthDistance = earthDistance;
  9485. var objectValues = function objectValues(obj) {
  9486. var arr = [];
  9487. for (var i in obj) {
  9488. arr.push(obj[i]);
  9489. }
  9490. return arr;
  9491. };exports.objectValues = objectValues;
  9492. var randomString = function randomString(length) {
  9493. var chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
  9494. var result = '';
  9495. for (var i = length; i > 0; --i) {result += chars[Math.floor(Math.random() * chars.length)];}
  9496. return result;
  9497. };exports.randomString = randomString;
  9498. var urlParamsToObject = function urlParamsToObject(str) {
  9499. var groups = str.split('&');
  9500. var obj = {};
  9501. for (var i in groups) {
  9502. if (typeof groups[i] !== 'string') continue;
  9503. if (!groups[i].length) continue;
  9504. var kvs = groups[i].split('=');
  9505. if (kvs.length !== 2) continue;
  9506. obj[kvs[0]] = kvs[1];
  9507. }
  9508. return obj;
  9509. };exports.urlParamsToObject = urlParamsToObject;
  9510. var showLoading = function showLoading() {
  9511. uni.showLoading({
  9512. title: '加载中',
  9513. mask: true });
  9514. };exports.showLoading = showLoading;
  9515. var hideLoading = function hideLoading() {
  9516. uni.hideLoading();
  9517. };
  9518. //保存
  9519. exports.hideLoading = hideLoading;var batchStatus = false;
  9520. /**
  9521. *
  9522. * @param url
  9523. * @param desc ['image', 'video']
  9524. * @returns {Promise<unknown>}
  9525. */
  9526. var batchSave = function batchSave(url) {var desc = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'image';
  9527. return new Promise(function (resolve_a, reject_a) {
  9528. if (!(url instanceof Array)) {
  9529. url = [url];
  9530. }
  9531. var title = desc === "image" ? '图片' : '视频';
  9532. new Promise(function (resolve_b, reject_b) {
  9533. var scope = null;
  9534. scope = 'scope.writePhotosAlbum';
  9535. uni.authorize({
  9536. scope: scope,
  9537. success: function success(res) {
  9538. resolve_b('success');
  9539. },
  9540. fail: function fail(e) {
  9541. uni.showModal({
  9542. title: '提示',
  9543. content: '您好,请先授权保存到相册权限',
  9544. showCancel: false,
  9545. success: function success(res) {
  9546. if (res.confirm) {
  9547. uni.openSetting({
  9548. success: function success(settingdata) {
  9549. if (settingdata.authSetting[scope]) {
  9550. resolve_b('success');
  9551. } else {
  9552. reject_b('fail');
  9553. }
  9554. } });
  9555. }
  9556. } });
  9557. } });
  9558. }).then(function (result) {
  9559. if (batchStatus) {
  9560. uni.showLoading({ title: title + "\u4FDD\u5B58\u4E2D", mask: true });
  9561. return;
  9562. }
  9563. batchStatus = true;
  9564. uni.showLoading({ title: title + "\u4FDD\u5B58\u4E2D", mask: true });
  9565. }).then(function (e) {
  9566. Promise.all(url.map(function (item) {
  9567. return new Promise(function (resolve_c, reject_c) {
  9568. try {
  9569. var downloadTask = uni.downloadFile({
  9570. url: item,
  9571. success: function success(e) {
  9572. if (desc === 'image') {
  9573. uni.saveImageToPhotosAlbum({
  9574. filePath: e.tempFilePath,
  9575. success: function success() {
  9576. resolve_c('success');
  9577. },
  9578. fail: function fail(err) {
  9579. console.log(err);
  9580. reject_c('fail');
  9581. } });
  9582. }
  9583. if (desc === 'video') {
  9584. uni.saveVideoToPhotosAlbum({
  9585. filePath: e.tempFilePath,
  9586. success: function success() {
  9587. resolve_c('success');
  9588. },
  9589. fail: function fail(err) {
  9590. console.log(err);
  9591. reject_c('fail');
  9592. } });
  9593. }
  9594. },
  9595. fail: function fail(err) {
  9596. console.log(err);
  9597. reject_c('fail');
  9598. } });
  9599. if (desc === 'video') {
  9600. var ago = new Date().getTime();
  9601. var limit = 1000 * 60; //max 1minute
  9602. downloadTask.onProgressUpdate(function (res) {
  9603. var currency = new Date().getTime();
  9604. if (currency - ago > limit) {
  9605. downloadTask.abort();
  9606. reject_c('fail');
  9607. }
  9608. });
  9609. }
  9610. } catch (e) {
  9611. console.error(e.message);
  9612. reject_c('fail');
  9613. }
  9614. });
  9615. })).then(function (result) {
  9616. batchStatus = false;
  9617. uni.hideLoading();
  9618. resolve_a('success');
  9619. }).catch(function (reason) {
  9620. batchStatus = false;
  9621. uni.hideLoading();
  9622. /* 提示暂放 */
  9623. uni.showToast({ title: '下载失败' });
  9624. reject_a('fail');
  9625. });
  9626. }).catch(function (reason) {
  9627. uni.showModal({ title: '提示', content: '授权失败,请稍后重新获取', showCancel: false });
  9628. reject_a('fail');
  9629. });
  9630. });
  9631. };
  9632. /**
  9633. * 删除url中指定参数,并返回删除后的url
  9634. * @param {string} url url或完整带参数的路由
  9635. * @param {string|array} param 需要删除的参数,多个可使用数字如['key1', 'key2']
  9636. * @param {boolean} allParams 是否删除所有参数,默认false
  9637. * @returns {string|*}
  9638. */exports.batchSave = batchSave;
  9639. var deleteUrlParam = function deleteUrlParam(url, param, allParams) {
  9640. if (isNaN(url.indexOf('?')) || url.indexOf('?') < 0) {
  9641. return url;
  9642. }
  9643. var query = url.substr(url.indexOf('?') + 1);
  9644. var route = url.substr(0, url.indexOf('?'));
  9645. if (allParams) {
  9646. return route;
  9647. }
  9648. var params = [];
  9649. if (typeof param === 'object') {
  9650. params = param;
  9651. } else {
  9652. params = [param];
  9653. }
  9654. var queryObj = {};
  9655. var queryList = query.split('&');
  9656. for (var i in queryList) {
  9657. queryList[i] = queryList[i].split('=');
  9658. queryObj[queryList[i][0]] = queryList[i][1];
  9659. }
  9660. for (var _i in params) {
  9661. delete queryObj[params[_i]];
  9662. }
  9663. query = JSON.stringify(queryObj).replace(/[\"\{\}]/g, '').replace(/\:/g, '=').replace(/\,/g, '&');
  9664. if (!query.length) {
  9665. return route;
  9666. }
  9667. return route + '?' + query;
  9668. };exports.deleteUrlParam = deleteUrlParam;
  9669. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  9670. /***/ }),
  9671. /***/ 21:
  9672. /*!***********************************************!*\
  9673. !*** C:/Users/Admin/Desktop/商城/core/cache.js ***!
  9674. \***********************************************/
  9675. /*! no static exports found */
  9676. /***/ (function(module, exports, __webpack_require__) {
  9677. "use strict";
  9678. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.removeStorageSync = exports.getStorageSync = exports.setStorageSync = exports.clearStorage = void 0;
  9679. var clearStorage = function clearStorage() {
  9680. uni.clearStorage({
  9681. success: function success(response) {
  9682. console.log(response);
  9683. },
  9684. fail: function fail(response) {
  9685. console.log(response);
  9686. } });
  9687. };exports.clearStorage = clearStorage;
  9688. var setStorageSync = function setStorageSync(key, data) {
  9689. try {
  9690. uni.setStorageSync(key, data);
  9691. } catch (response) {
  9692. console.log(response);
  9693. }
  9694. };exports.setStorageSync = setStorageSync;
  9695. var getStorageSync = function getStorageSync(key) {
  9696. try {
  9697. return uni.getStorageSync(key);
  9698. } catch (response) {
  9699. console.log(response);
  9700. }
  9701. };exports.getStorageSync = getStorageSync;
  9702. var removeStorageSync = function removeStorageSync(key) {
  9703. try {
  9704. uni.removeStorageSync(key);
  9705. } catch (response) {
  9706. console.log(response);
  9707. }
  9708. };exports.removeStorageSync = removeStorageSync;
  9709. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  9710. /***/ }),
  9711. /***/ 219:
  9712. /*!***************************************************!*\
  9713. !*** C:/Users/Admin/Desktop/商城/core/routeJump.js ***!
  9714. \***************************************************/
  9715. /*! no static exports found */
  9716. /***/ (function(module, exports, __webpack_require__) {
  9717. "use strict";
  9718. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var utils = _interopRequireWildcard(__webpack_require__(/*! ./utils.js */ 20));
  9719. var _index = _interopRequireDefault(__webpack_require__(/*! ../store/index.js */ 11));
  9720. var _user = _interopRequireDefault(__webpack_require__(/*! ../core/user.js */ 27));
  9721. var _cache = __webpack_require__(/*! ../core/cache.js */ 21);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}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;}
  9722. var jump = function jump(data) {
  9723. console.log(data);
  9724. if (!data.open_type && !data.params && !data.page_url) return;
  9725. var open_type = data.open_type;
  9726. var params = data.params;
  9727. var page_url = data.page_url;
  9728. if (!Array.isArray(params) && Object.prototype.toString.call(params) === "[object String]" && params) {
  9729. params = JSON.parse(params);
  9730. }
  9731. switch (open_type) {
  9732. case 'reLaunch':
  9733. uni.reLaunch({
  9734. url: params[0].value });
  9735. break;
  9736. case 'redirect':
  9737. uni.redirectTo({
  9738. url: params[0].value });
  9739. break;
  9740. case 'navigate':
  9741. var new_page_url = page_url.split('?')[0];
  9742. var options = "?";
  9743. // console.log(page_url.split('?'));
  9744. // if (page_url.split('?').length > 1) {
  9745. // options = '&'
  9746. // }
  9747. for (var i = 0; i < params.length; i++) {
  9748. options += "".concat(params[i].key, "=").concat(params[i].value, "&");
  9749. }
  9750. // console.log(options);
  9751. new_page_url += options.slice(0, options.length - 1);
  9752. if (options === '?') {
  9753. new_page_url = page_url;
  9754. }
  9755. console.log(new_page_url);
  9756. uni.navigateTo({
  9757. url: new_page_url });
  9758. break;
  9759. case 'app_admin':
  9760. if (_index.default.state.user.info.identity.is_admin == 1) {
  9761. uni.navigateTo({
  9762. url: data.url });
  9763. }
  9764. break;
  9765. case 'back':
  9766. uni.navigateBack({});
  9767. break;
  9768. case 'tel':
  9769. uni.makePhoneCall({
  9770. phoneNumber: params[0].value });
  9771. break;
  9772. case 'web':
  9773. uni.navigateTo({
  9774. url: "".concat(page_url.split('?')[0], "?url=").concat(encodeURIComponent(params[0].value)) });
  9775. break;
  9776. case 'app':
  9777. var originalPath = '';
  9778. for (var _i = 0; _i < params.length; _i++) {
  9779. originalPath += "".concat(params[_i].key, "=").concat(params[_i].value, "&");
  9780. }
  9781. if (typeof originalPath !== 'string') return;
  9782. var groups = originalPath.split('&');
  9783. var obj = {};
  9784. for (var _i2 in groups) {
  9785. if (typeof groups[_i2] !== 'string') continue;
  9786. if (!groups[_i2].length) continue;
  9787. var kvs = groups[_i2].split('=');
  9788. if (kvs.length !== 2) {
  9789. var s = '';
  9790. for (var _i3 = 1; _i3 < kvs.length; _i3++) {
  9791. if (_i3 + 1 === kvs.length) {
  9792. continue;
  9793. } else {
  9794. s += "".concat(kvs[_i3], "=").concat(kvs[_i3 + 1]);
  9795. }
  9796. }
  9797. obj[kvs[0]] = s;
  9798. } else {
  9799. obj[kvs[0]] = kvs[1];
  9800. }
  9801. }
  9802. var new_params = obj;
  9803. var appId = '';
  9804. var path = '';
  9805. appId = new_params.app_id || '';
  9806. path = new_params.path || '';
  9807. console.log(path);
  9808. uni.navigateToMiniProgram({
  9809. appId: appId,
  9810. path: path,
  9811. success: function success(e) {
  9812. console.log('打开小程序成功', e);
  9813. },
  9814. fail: function fail(e) {
  9815. console.log('打开小程序失败', e);
  9816. } });
  9817. break;
  9818. case 'clear_cache':
  9819. uni.showModal({
  9820. title: '提示',
  9821. content: '确认清理缓存?',
  9822. cancelText: '取消',
  9823. confirmText: '确认',
  9824. success: function success(e) {
  9825. if (e.confirm) {
  9826. uni.showLoading({
  9827. title: '清理缓存...' });
  9828. (0, _cache.clearStorage)();
  9829. if (_user.default && _index.default && _index.default.state.user.accessToken) {
  9830. _user.default.loginByToken(_index.default.state.user.accessToken);
  9831. }
  9832. _index.default.dispatch('mallConfig/actionResetConfig');
  9833. uni.hideLoading();
  9834. uni.showToast({
  9835. title: '清理完成',
  9836. duration: 1000 });
  9837. }
  9838. } });
  9839. break;
  9840. case 'map':
  9841. // uni.openLocation({
  9842. // latitude: Number(this.latitude),
  9843. // longitude: Number(this.longitude),
  9844. // name: this.address,
  9845. // address: this.address,
  9846. // success: function () {
  9847. // },
  9848. // fail: function () {
  9849. // }
  9850. // });
  9851. break;
  9852. // case 'share':
  9853. }
  9854. };var _default =
  9855. jump;exports.default = _default;
  9856. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  9857. /***/ }),
  9858. /***/ 22:
  9859. /*!************************************************!*\
  9860. !*** C:/Users/Admin/Desktop/商城/core/config.js ***!
  9861. \************************************************/
  9862. /*! no static exports found */
  9863. /***/ (function(module, exports, __webpack_require__) {
  9864. "use strict";
  9865. Object.defineProperty(exports, "__esModule", { value: true });exports.platform = void 0;
  9866. var platform = 'wxapp';exports.platform = platform;
  9867. /***/ }),
  9868. /***/ 23:
  9869. /*!************************************************!*\
  9870. !*** C:/Users/Admin/Desktop/商城/core/apiUrl.js ***!
  9871. \************************************************/
  9872. /*! no static exports found */
  9873. /***/ (function(module, exports, __webpack_require__) {
  9874. "use strict";
  9875. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _app_admin;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;}var apiUrl = {
  9876. index: {
  9877. config: "api/index/config",
  9878. index: "api/index/index",
  9879. buy_data: "api/index/purchase" },
  9880. payment: {
  9881. get_payments: "api/payment/get-payments",
  9882. pay_data: "api/payment/pay-data",
  9883. pay_buy_balance: "api/payment/pay-buy-balance",
  9884. pay_buy_huodao: "api/payment/pay-buy-huodao" },
  9885. upload: {
  9886. file: "api/attachment/upload" },
  9887. default: {
  9888. district: "api/default/district",
  9889. goods_list: "api/default/goods-list",
  9890. search_list: "api/default/search-list",
  9891. cart_list: "api/default/cats-list&cat_id=",
  9892. qrcode_parameter: 'api/default/qr-code-parameter',
  9893. cat_list: "api/cat/list",
  9894. cat_goods: "api/cat/goods" },
  9895. passport: {
  9896. login: "api/passport/login" },
  9897. user: {
  9898. user_info: "api/user/user-info",
  9899. address: "api/user/address",
  9900. wechat_district: "api/user/wechat-district",
  9901. address_save: "api/user/address-save",
  9902. address_detail: "api/user/address-detail",
  9903. address_default: "api/user/address-default",
  9904. address_destroy: "api/user/address-destroy",
  9905. auto_address_info: "api/default/auto-address-info",
  9906. my_favorite_goods: "api/user/my-favorite-goods",
  9907. my_favorite_topic: "api/user/my-favorite-topic",
  9908. favorite_add: "api/user/favorite-add",
  9909. favorite_remove: "api/user/favorite-remove",
  9910. config: 'api/user/config',
  9911. is_clerk: 'api/user/is-clerk-user' },
  9912. article: {
  9913. list: "api/default/article-list",
  9914. detail: "api/default/article" },
  9915. coupon: {
  9916. list: "api/coupon/list",
  9917. detail: "api/coupon/detail",
  9918. receive: "api/coupon/receive",
  9919. user_coupon: "api/coupon/user-coupon",
  9920. user_coupon_detail: "api/coupon/user-coupon-detail",
  9921. share_coupon: "api/coupon/share-coupon" },
  9922. city: {
  9923. cityName: "api/default/district",
  9924. goodsList: "api/default/goods-list" },
  9925. balance: {
  9926. index: "api/balance/index",
  9927. logs: "api/balance/logs",
  9928. log_detail: "api/balance/log-detail" },
  9929. order: {
  9930. preview: "api/order/preview",
  9931. submit: "api/order/submit",
  9932. pay_data: "api/order/pay-data",
  9933. usable_coupon_list: "api/order/usable-coupon-list",
  9934. store_list: "api/order/store-list",
  9935. list: "api/order/list",
  9936. detail: "api/order/detail",
  9937. appraise: 'api/order/appraise',
  9938. express_detail: 'api/order/express-detail',
  9939. clerk_affirm_pay: 'api/order/clerk-affirm-pay',
  9940. order_clerk: 'api/order/order-clerk',
  9941. clerk_qr_code: 'api/order/clerk-qr-code',
  9942. apply_refund: 'api/order/apply-refund',
  9943. refund_submit: 'api/order/refund-submit',
  9944. refund_detail: 'api/order/refund-detail',
  9945. refund_send: 'api/order/refund-send',
  9946. confirm: 'api/order/confirm',
  9947. cancel: 'api/order/cancel',
  9948. list_pay_data: 'api/order/list-pay-data',
  9949. pay_result: "api/order/pay-result",
  9950. customer: 'api/express/get-customer',
  9951. delivery: 'api/express/delivery-config',
  9952. order_express_list: 'api/express/order-express-list' },
  9953. video: {
  9954. index: 'api/video/index' },
  9955. topic: {
  9956. type: 'api/topic/type',
  9957. list: 'api/topic/list',
  9958. detail: 'api/topic/detail',
  9959. favorite: 'api/topic/favorite',
  9960. qrcode: 'api/qrcode/topic' },
  9961. member: {
  9962. index: 'api/mall-member/index',
  9963. all: 'api/mall-member/all-member',
  9964. coupon: 'api/mall-member/member-coupon',
  9965. goods: 'api/mall-member/member-goods',
  9966. cats: 'api/mall-member/goods-cats',
  9967. purchase: 'api/mall-member/purchase-member' },
  9968. recharge: {
  9969. index: 'api/recharge/index',
  9970. setting: 'api/recharge/setting',
  9971. balance_recharge: 'api/recharge/balance-recharge' },
  9972. store: {
  9973. list: "api/store/list",
  9974. detail: "api/store/detail" },
  9975. goods: {
  9976. detail: 'api/goods/detail',
  9977. attr: 'api/goods/attr',
  9978. comments_list: 'api/goods/comments-list',
  9979. recommend: 'api/goods/recommend',
  9980. new_recommend: 'api/goods/new-recommend',
  9981. cat_style: 'api/goods/cat-style',
  9982. goods_video_list: '/api/goods/goods-list' },
  9983. card: {
  9984. index: 'api/card/user-card',
  9985. detail: 'api/card/user-card-detail',
  9986. qrcode: 'api/card/card-qrcode',
  9987. clerk: 'api/card/card-clerk',
  9988. history: 'api/card/clerk-history' },
  9989. share: {
  9990. apply: 'api/share/apply',
  9991. index: 'api/share/index',
  9992. setting: 'api/share/setting',
  9993. customize: 'api/share/customize',
  9994. brokerage: 'api/share/brokerage',
  9995. team: 'api/share/team',
  9996. cash: 'api/share/cash',
  9997. cash_list: 'api/share/cash-list',
  9998. apply_status: 'api/share/apply-status',
  9999. share_order: 'api/share/share-order',
  10000. bind_parent: 'api/share/bind-parent',
  10001. poster: 'api/qrcode/share',
  10002. new_apply_status: 'api/share/new-apply-status',
  10003. level: 'api/share/level',
  10004. level_up: 'api/share/level-up' },
  10005. pond: {
  10006. index: 'plugin/pond/api/pond/index',
  10007. lottery: 'plugin/pond/api/pond/lottery',
  10008. prize: 'plugin/pond/api/pond/prize',
  10009. send: 'plugin/pond/api/pond/send',
  10010. setting: 'plugin/pond/api/pond/setting',
  10011. order_preview: 'plugin/pond/api/pond/order-preview',
  10012. order_submit: 'plugin/pond/api/pond/order-submit',
  10013. poster: 'plugin/pond/api/pond/poster' },
  10014. scratch: {
  10015. index: 'plugin/scratch/api/scratch/index',
  10016. receive: 'plugin/scratch/api/scratch/receive',
  10017. setting: 'plugin/scratch/api/scratch/setting',
  10018. prize: 'plugin/scratch/api/scratch/prize',
  10019. record: 'plugin/scratch/api/scratch/record',
  10020. order_preview: 'plugin/scratch/api/scratch/order-preview',
  10021. order_submit: 'plugin/scratch/api/scratch/order-submit',
  10022. poster: 'plugin/scratch/api/scratch/poster' },
  10023. bonus: {
  10024. order: 'plugin/bonus/api/order/index',
  10025. index: 'plugin/bonus/api/index/index',
  10026. apply: 'plugin/bonus/api/index/apply',
  10027. status: 'plugin/bonus/api/index/apply-status',
  10028. team: 'plugin/bonus/api/order/team-bonus',
  10029. setting: 'plugin/bonus/api/index/setting',
  10030. clear: 'plugin/bonus/api/index/clear-apply',
  10031. cash: 'plugin/bonus/api/index/cash',
  10032. detail: 'plugin/bonus/api/cash/index',
  10033. member: 'plugin/bonus/api/index/all-member',
  10034. data: 'plugin/bonus/api/order/data' },
  10035. lottery: {
  10036. index: 'plugin/lottery/api/lottery/index',
  10037. setting: 'plugin/lottery/api/lottery/setting',
  10038. detail: 'plugin/lottery/api/lottery/detail',
  10039. prize: 'plugin/lottery/api/lottery/prize',
  10040. clerk: 'plugin/lottery/api/lottery/clerk',
  10041. code: 'plugin/lottery/api/lottery/code',
  10042. order_preview: 'plugin/lottery/api/lottery/order-preview',
  10043. order_submit: 'plugin/lottery/api/lottery/order-submit',
  10044. goods: 'plugin/lottery/api/lottery/goods',
  10045. poster: 'plugin/lottery/api/lottery/poster' },
  10046. check_in: {
  10047. index: 'plugin/check_in/api/index/index',
  10048. user: 'plugin/check_in/api/index/user',
  10049. customize: 'plugin/check_in/api/index/customize',
  10050. sign_in: 'plugin/check_in/api/index/sign-in',
  10051. sign_in_result: 'plugin/check_in/api/index/sign-in-result',
  10052. sign_in_day: 'plugin/check_in/api/index/sign-in-day' },
  10053. quick: {
  10054. index: "api/quick/index",
  10055. goods_list: "api/quick/goods-list",
  10056. cart: "api/quick/cart" },
  10057. step: {
  10058. index: 'plugin/step/api/step/index',
  10059. setting: 'plugin/step/api/step/setting',
  10060. ranking: 'plugin/step/api/step/ranking',
  10061. goods: 'plugin/step/api/step/goods',
  10062. activity_detail: 'plugin/step/api/step/activity-detail',
  10063. activity: 'plugin/step/api/step/activity',
  10064. activity_log: 'plugin/step/api/step/activity-log',
  10065. activity_join: 'plugin/step/api/step/activity-join',
  10066. activity_submit: 'plugin/step/api/step/activity-submit',
  10067. invite_list: 'plugin/step/api/step/invite-list',
  10068. convert: 'plugin/step/api/step/convert',
  10069. log: 'plugin/step/api/step/log',
  10070. step_convert: 'plugin/step/api/step/step-convert',
  10071. remind: 'plugin/step/api/step/remind',
  10072. order_preview: 'plugin/step/api/step/order-preview',
  10073. order_submit: 'plugin/step/api/step/order-submit',
  10074. goods_detail: 'plugin/step/api/step/goods-detail',
  10075. poster: 'plugin/step/api/step/poster',
  10076. goods_poster: 'plugin/step/api/step/goods-poster',
  10077. receive: 'plugin/step/api/step/receive' },
  10078. cart: {
  10079. edit: 'api/cart/edit',
  10080. delete: 'api/cart/delete',
  10081. list: 'api/cart/list',
  10082. add: 'api/cart/add' },
  10083. fxhb: {
  10084. index: 'plugin/fxhb/api/index/index',
  10085. join: 'plugin/fxhb/api/index/join',
  10086. join_result: 'plugin/fxhb/api/index/join-result',
  10087. detail: 'plugin/fxhb/api/index/detail',
  10088. recommend: 'plugin/fxhb/api/index/recommend' },
  10089. scan_code_pay: {
  10090. index: 'plugin/scan_code_pay/api/index/index',
  10091. preview: 'plugin/scan_code_pay/api/order/preview',
  10092. submit: 'plugin/scan_code_pay/api/order/submit',
  10093. qr_code: 'plugin/scan_code_pay/api/index/qr-code',
  10094. coupons: 'plugin/scan_code_pay/api/order/coupons',
  10095. cancel: 'plugin/scan_code_pay/api/order/cancel' },
  10096. phone: {
  10097. binding: 'api/phone/binding',
  10098. code: 'api/user/phone-code' },
  10099. book: {
  10100. cats: 'plugin/booking/api/booking/cats',
  10101. clerk_code: 'plugin/booking/api/order-list/clerk-code',
  10102. order_submit: 'plugin/booking/api/order/order-submit',
  10103. order_preview: 'plugin/booking/api/order/order-preview',
  10104. detail: 'plugin/booking/api/goods/detail',
  10105. list: 'plugin/booking/api/goods/list',
  10106. setting: 'plugin/booking/api/booking/setting',
  10107. order_list: 'plugin/booking/api/order-list/index',
  10108. order_detail: 'plugin/booking/api/order-list/detail',
  10109. store_list: 'plugin/booking/api/booking/store-list',
  10110. poster: 'plugin/booking/api/booking/poster' },
  10111. poster: {
  10112. share: 'api/qrcode/share',
  10113. goods: 'api/qrcode/goods',
  10114. topic: 'api/qrcode/topic',
  10115. footprint: 'api/qrcode/footprint' },
  10116. bargain: {
  10117. banner: 'plugin/bargain/api/index/banner',
  10118. goods_list: 'plugin/bargain/api/goods/list',
  10119. goods_detail: 'plugin/bargain/api/goods/detail',
  10120. list: 'plugin/bargain/api/order/bargain-list',
  10121. bargain_submit: 'plugin/bargain/api/order/bargain-submit',
  10122. bargain_result: 'plugin/bargain/api/order/bargain-result',
  10123. order_preview: 'plugin/bargain/api/order/order-preview',
  10124. order_submit: 'plugin/bargain/api/order/order-submit',
  10125. user_join_bargain: 'plugin/bargain/api/order/user-join-bargain',
  10126. user_join_bargain_result: 'plugin/bargain/api/order/user-join-bargain-result',
  10127. activity: 'plugin/bargain/api/order/activity',
  10128. setting: 'plugin/bargain/api/index/index',
  10129. poster: 'plugin/bargain/api/index/poster' },
  10130. integral_mall: {
  10131. index: 'plugin/integral_mall/api/index/index',
  10132. coupon: 'plugin/integral_mall/api/coupon/index',
  10133. cats: 'plugin/integral_mall/api/goods/cats',
  10134. detail: 'plugin/integral_mall/api/coupon/detail',
  10135. goods_detail: 'plugin/integral_mall/api/goods/detail',
  10136. coupon_submit: 'plugin/integral_mall/api/coupon-order/order-submit',
  10137. goods: 'plugin/integral_mall/api/goods/index',
  10138. log: 'api/integral-log/index',
  10139. order: 'plugin/integral_mall/api/order/index',
  10140. coupon_order: 'plugin/integral_mall/api/coupon-order/index',
  10141. order_preview: 'plugin/integral_mall/api/order/order-preview',
  10142. order_submit: 'plugin/integral_mall/api/order/order-submit',
  10143. coupon_pay: 'plugin/integral_mall/api/coupon-order/order-pay-data',
  10144. poster: 'plugin/integral_mall/api/index/poster' },
  10145. pt: {
  10146. index: 'plugin/pintuan/api/index/index',
  10147. goods: 'plugin/pintuan/api/goods/index',
  10148. detail: 'plugin/pintuan/api/goods/detail',
  10149. cats: 'plugin/pintuan/api/goods/cats',
  10150. order_preview: 'plugin/pintuan/api/order/order-preview',
  10151. order_submit: 'plugin/pintuan/api/order/submit',
  10152. list: 'plugin/pintuan/api/order/pintuan-list',
  10153. pt_detail: 'plugin/pintuan/api/order/pintuan-detail',
  10154. order: 'plugin/pintuan/api/order/list',
  10155. poster: 'plugin/pintuan/api/index/poster',
  10156. order_poster: 'plugin/pintuan/api/order/poster' },
  10157. mch: {
  10158. index: 'plugin/mch/api/mch/index',
  10159. detail: 'plugin/mch/api/mch/detail',
  10160. category: 'plugin/mch/api/mch/category',
  10161. goods: 'plugin/mch/api/goods/index',
  10162. goods_detail: 'plugin/mch/api/goods/detail',
  10163. cat_style: 'plugin/mch/api/goods/cat-style',
  10164. cats_list: 'api/cat/list',
  10165. setting: 'plugin/mch/api/mch/setting',
  10166. visit: 'plugin/mch/api/mch/add-visit',
  10167. order_list: 'plugin/mch/api/order/index',
  10168. order_detail: 'plugin/mch/api/order/detail',
  10169. manage_index: 'plugin/mch/api/mch/manage-index',
  10170. qr_code: 'plugin/mch/api/mch/qr-code',
  10171. qr_code_parameter: 'api/default/qr-code-parameter',
  10172. statistic: 'plugin/mch/api/mch/statistic',
  10173. year_list: 'plugin/mch/api/mch/year-list',
  10174. property: 'plugin/mch/api/property/index',
  10175. account_log: 'plugin/mch/api/property/account-log',
  10176. cash_log: 'plugin/mch/api/property/cash-log',
  10177. order_close_log: 'plugin/mch/api/property/order-close-log',
  10178. cash_submit: 'plugin/mch/api/property/cash-submit',
  10179. order_send: 'plugin/mch/api/order/order-send',
  10180. express_list: 'api/order/express-list',
  10181. refund_detail: 'plugin/mch/api/order/refund-detail',
  10182. mch_status: 'plugin/mch/api/mch/mch-status',
  10183. apply: 'plugin/mch/api/mch/apply',
  10184. login: 'plugin/mch/api/mch/login',
  10185. order_print: 'plugin/mch/api/order/print',
  10186. update_total_price: 'plugin/mch/api/order/update-total-price',
  10187. update_price: 'plugin/mch/api/order/update-price',
  10188. refund_handle: 'plugin/mch/api/order/refund-handle',
  10189. update_password: 'plugin/mch/api/mch/update-password',
  10190. switch_status: 'plugin/mch/api/goods/switch-status',
  10191. destroy: 'plugin/mch/api/goods/destroy',
  10192. cancel: 'plugin/mch/api/order/cancel',
  10193. order_preview: 'plugin/mch/api/order/preview',
  10194. order_submit: 'plugin/mch/api/order/submit',
  10195. apply_status: 'plugin/mch/api/goods/apply-status',
  10196. qr_code_login: 'plugin/mch/api/mch/qr-code-login',
  10197. poster: 'plugin/mch/api/mch/poster',
  10198. edit: 'plugin/mch/api/goods/edit',
  10199. cat: 'plugin/mch/api/goods/cats',
  10200. postage: 'plugin/mch/api/goods/rules',
  10201. service: 'plugin/mch/api/goods/services',
  10202. mch_cat: 'plugin/mch/api/goods/mch-cats' },
  10203. app_admin: (_app_admin = {
  10204. index: 'api/admin/data-statistics/all_data',
  10205. send: 'api/admin/order/send',
  10206. goods: 'api/admin/goods/index',
  10207. table: 'api/admin/data-statistics/table',
  10208. express: 'api/order/express-list',
  10209. goods_switch: 'api/admin/goods/switch-status',
  10210. goods_destroy: 'api/admin/goods/destroy',
  10211. comments: 'api/admin/order-comments/index',
  10212. comments_top: 'api/admin/order-comments/update-top',
  10213. comments_reply: 'api/admin/order-comments/reply',
  10214. comments_show: 'api/admin/order-comments/show',
  10215. user: 'api/admin/user/index',
  10216. share: 'api/admin/share/index',
  10217. clerk: 'api/admin/user/clerk',
  10218. integral: 'api/admin/user/integral',
  10219. balance: 'api/admin/user/balance',
  10220. setting: 'api/admin/mall/setting',
  10221. review: 'api/admin/review/index',
  10222. tabs: 'api/admin/review/tabs',
  10223. review_detail: 'api/admin/review/detail',
  10224. review_switch: 'api/admin/review/switch-status',
  10225. order: 'api/admin/order/index',
  10226. update_price: 'api/admin/order/update-total-price',
  10227. update_address: 'api/admin/order/update-address',
  10228. address_list: 'api/admin/order/address-list',
  10229. express_detail: 'api/order/express-detail',
  10230. cancel: 'api/admin/order/cancel',
  10231. detail: 'api/admin/order/detail',
  10232. refund: 'api/admin/order/refund',
  10233. refund_handle: 'api/admin/order/refund-handle',
  10234. edit: 'api/admin/goods/edit',
  10235. service: 'api/admin/service/options',
  10236. card: 'api/admin/card/options',
  10237. cat: 'api/admin/cat/options',
  10238. order_num: 'api/admin/order/order-num',
  10239. print: 'api/admin/order/print',
  10240. refund_address: 'api/admin/refund-address/index',
  10241. refund_address_edit: 'api/admin/refund-address/edit',
  10242. clerk_destroy: 'api/admin/user/clerk-destroy',
  10243. address_destroy: 'api/admin/refund-address/destroy',
  10244. clerk_edit: 'api/admin/user/clerk-edit',
  10245. cash: 'api/admin/cash/index',
  10246. verify: 'api/admin/cash/verify',
  10247. user_cash: 'api/admin/cash/cash',
  10248. postage: 'api/admin/postage-rule/all-list',
  10249. shou_huo: 'api/admin/order/shou-huo',
  10250. delivery: 'api/admin/order/delivery',
  10251. remark: 'api/admin/user/update-user-remark',
  10252. remarkName: 'api/admin/user/update-user-remark-name',
  10253. level: 'api/admin/user/update-user-level' }, _defineProperty(_app_admin, "shou_huo",
  10254. 'api/admin/order/shou-huo'), _defineProperty(_app_admin, "goods_edit",
  10255. 'api/admin/goods/edit'), _defineProperty(_app_admin, "sellerRemark",
  10256. 'api/admin/order/seller-remark'), _defineProperty(_app_admin, "confirm",
  10257. 'api/admin/order/confirm'), _defineProperty(_app_admin, "queue",
  10258. 'api/admin/review/queue-status'), _app_admin),
  10259. clerk: {
  10260. info: 'plugin/clerk/api/index/clerk-info',
  10261. order: 'plugin/clerk/api/index/order',
  10262. my: 'plugin/clerk/api/index/my-order',
  10263. detail: 'plugin/clerk/api/index/detail',
  10264. card: 'plugin/clerk/api/index/card',
  10265. my_card: 'plugin/clerk/api/index/my-card',
  10266. card_detail: 'api/card/user-card-detail',
  10267. statistics: 'plugin/clerk/api/index/statistics',
  10268. qrcode_parameter: 'api/default/qr-code-parameter' },
  10269. miaosha: {
  10270. goods: 'plugin/miaosha/api/goods/index',
  10271. estimate: 'plugin/miaosha/api/goods/estimate',
  10272. goods_detail: 'plugin/miaosha/api/goods/detail',
  10273. cats: 'plugin/miaosha/api/goods/cats',
  10274. goods_info: 'plugin/miaosha/api/goods/miaosha',
  10275. order_preview: 'plugin/miaosha/api/order/order-preview',
  10276. order_submit: 'plugin/miaosha/api/order/submit',
  10277. today_goods: 'plugin/miaosha/api/goods/today-miaosha',
  10278. time_list: 'plugin/miaosha/api/goods/time-list',
  10279. add_cart: 'plugin/miaosha/api/index/add-cart',
  10280. cart_edit: 'plugin/miaosha/api/index/cart-edit',
  10281. poster: 'plugin/miaosha/api/index/poster' },
  10282. diy: {
  10283. page_store: 'plugin/diy/api/page/store',
  10284. receive: "plugin/diy/api/ad-award/receive" },
  10285. vip_card: {
  10286. index: 'plugin/vip_card/api/index/index',
  10287. card: 'plugin/vip_card/api/index/card',
  10288. order_preview: 'plugin/vip_card/api/order/preview',
  10289. card_detail: 'plugin/vip_card/api/index/card-detail',
  10290. setting: 'plugin/vip_card/api/index/setting',
  10291. right: 'plugin/vip_card/api/index/right',
  10292. order_submit: 'plugin/vip_card/api/order/submit',
  10293. pay_data: 'plugin/vip_card/api/order/pay-data' },
  10294. advance: {
  10295. goods: "plugin/advance/api/goods/index",
  10296. banner: "plugin/advance/api/goods/banner",
  10297. detail: "plugin/advance/api/goods/detail",
  10298. poster: "plugin/advance/api/goods/poster",
  10299. order_submit: "plugin/advance/api/order/advance",
  10300. order: "plugin/advance/api/order/my-advance",
  10301. order_preview: "plugin/advance/api/order/order-preview",
  10302. order_sub: "plugin/advance/api/order/order-submit",
  10303. order_detail: "plugin/advance/api/order/detail",
  10304. pay_data: "plugin/advance/api/order/pay-data",
  10305. get_payments: "plugin/advance/api/payment/get-payments",
  10306. goods_list: "plugin/advance/api/goods/index" },
  10307. gift: {
  10308. order_submit: "/plugin/gift/api/gift-order/order-submit",
  10309. order_preview: "/plugin/gift/api/gift-order/order-preview",
  10310. config: "plugin/gift/api/gift-index/config",
  10311. pay_data: "plugin/gift/api/gift-order/pay-data",
  10312. gift: "plugin/gift/api/gift-index/gift",
  10313. poster: "plugin/gift/api/gift-index/poster",
  10314. send_list: "plugin/gift/api/order-list/send-list",
  10315. send_detail: "plugin/gift/api/order-list/send-detail",
  10316. turn: "plugin/gift/api/gift-order/turn",
  10317. get_turn: "plugin/gift/api/gift-order/get-turn",
  10318. my_join: "plugin/gift/api/gift-join/my-join",
  10319. my_win: "plugin/gift/api/gift-join/my-win",
  10320. win_detail: "plugin/gift/api/gift-join/win-detail",
  10321. join: "plugin/gift/api/gift-join/join",
  10322. join_status: "plugin/gift/api/gift-join/join-status",
  10323. join_detail: "plugin/gift/api/gift-join/join-detail",
  10324. preview: "plugin/gift/api/gift-order/gift-convert-preview",
  10325. convert: "plugin/gift/api/gift-order/gift-convert",
  10326. list: "plugin/gift/api/goods/goods-list",
  10327. goods: "plugin/gift/api/goods/detail",
  10328. cancel: "plugin/gift/api/gift-order/order-cancel" },
  10329. foot: {
  10330. index: 'api/footprint/footprint',
  10331. list: 'api/footprint/index',
  10332. del: 'api/footprint/footprint-del' },
  10333. quick_share: {
  10334. poster_list: "plugin/quick_share/api/goods/poster-list",
  10335. goods: "plugin/quick_share/api/goods/index",
  10336. poster: "plugin/quick_share/api/goods/poster",
  10337. setting: "plugin/quick_share/api/setting/index" },
  10338. stock: {
  10339. status: 'plugin/stock/api/index/apply-status',
  10340. index: 'plugin/stock/api/index/index',
  10341. setting: 'plugin/stock/api/index/setting',
  10342. apply: 'plugin/stock/api/index/apply',
  10343. clear: 'plugin/stock/api/index/clear-apply',
  10344. cash: 'plugin/stock/api/index/cash',
  10345. detail: 'plugin/stock/api/cash/index',
  10346. level: 'plugin/stock/api/index/level',
  10347. info: 'plugin/stock/api/index/info',
  10348. up: 'plugin/stock/api/index/level-up',
  10349. bonus: 'plugin/stock/api/cash/bonus-detail' },
  10350. template: {
  10351. template: "api/message/template" },
  10352. pick: {
  10353. goods_list: "plugin/pick/api/index/goods-list",
  10354. goods: "/plugin/pick/api/index/goods-detail",
  10355. order_preview: "/plugin/pick/api/pick-order/order-preview",
  10356. order_submit: "/plugin/pick/api/pick-order/order-submit",
  10357. poster: 'plugin/pick/api/index/poster',
  10358. add: "plugin/pick/api/cart/add",
  10359. list: 'plugin/pick/api/cart/list',
  10360. edit: "plugin/pick/api/cart/edit",
  10361. delete: 'plugin/pick/api/cart/delete' },
  10362. live: {
  10363. index: 'api/live/index',
  10364. playback: 'api/live/play-back' },
  10365. composition: {
  10366. index: "plugin/composition/api/index/index",
  10367. config: "plugin/composition/api/index/config",
  10368. detail: "plugin/composition/api/index/detail",
  10369. composition_detail: "plugin/composition/api/index/composition-detail",
  10370. order_preview: "plugin/composition/api/index/order-preview",
  10371. order_submit: "plugin/composition/api/index/order-submit" } };var _default =
  10372. apiUrl;exports.default = _default;
  10373. /***/ }),
  10374. /***/ 24:
  10375. /*!*****************************************************!*\
  10376. !*** C:/Users/Admin/Desktop/商城/core/appOnLaunch.js ***!
  10377. \*****************************************************/
  10378. /*! no static exports found */
  10379. /***/ (function(module, exports, __webpack_require__) {
  10380. "use strict";
  10381. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _apiUrl = _interopRequireDefault(__webpack_require__(/*! ./apiUrl.js */ 23));
  10382. var _siteInfo = _interopRequireDefault(__webpack_require__(/*! siteInfo */ 25));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}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;}
  10383. var spliceUrl = function spliceUrl(ip, apiUrl) {
  10384. var newUrl = {};
  10385. for (var k in apiUrl) {
  10386. var newOb = _defineProperty({},
  10387. k, {});
  10388. for (var i in apiUrl[k]) {
  10389. newOb[k][i] = "".concat(ip).concat(apiUrl[k][i]);
  10390. }
  10391. newUrl[k] = newOb[k];
  10392. }
  10393. return newUrl;
  10394. };
  10395. var appendApiUrl = function appendApiUrl(siteInfo) {
  10396. var apiRoot = '';
  10397. if (siteInfo.acid > 0) {
  10398. var scriptUrl = siteInfo.siteroot.substr(0, siteInfo.siteroot.indexOf('app/index.php')) +
  10399. 'addons/zjhj_bd/web/index.php';
  10400. apiRoot = scriptUrl + '?_acid=' + siteInfo.acid + '&r=';
  10401. } else {
  10402. apiRoot = siteInfo.apiroot + '&r=';
  10403. }
  10404. return spliceUrl(apiRoot, _apiUrl.default);
  10405. };var _default =
  10406. appendApiUrl(_siteInfo.default);exports.default = _default;
  10407. /***/ }),
  10408. /***/ 25:
  10409. /*!*********************************************!*\
  10410. !*** C:/Users/Admin/Desktop/商城/siteInfo.js ***!
  10411. \*********************************************/
  10412. /*! no static exports found */
  10413. /***/ (function(module, exports) {
  10414. module.exports = {
  10415. acid: -1,
  10416. version: "1.0.0",
  10417. siteroot: "https://shop.9026.com",
  10418. apiroot: "https://shop.9026.com/web/index.php?_mall_id=21982" };
  10419. /***/ }),
  10420. /***/ 26:
  10421. /*!*******************************************************!*\
  10422. !*** C:/Users/Admin/Desktop/商城/store/modules/user.js ***!
  10423. \*******************************************************/
  10424. /*! no static exports found */
  10425. /***/ (function(module, exports, __webpack_require__) {
  10426. "use strict";
  10427. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _user = _interopRequireDefault(__webpack_require__(/*! ../../core/user.js */ 27));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  10428. var state = {
  10429. accessToken: null,
  10430. info: null,
  10431. showLoginModal: false,
  10432. tempParentId: 0 };
  10433. var getters = {
  10434. accessToken: function accessToken(state) {
  10435. return state.accessToken;
  10436. },
  10437. info: function info(state) {
  10438. return state.info;
  10439. },
  10440. showLoginModal: function showLoginModal(state) {
  10441. return state.showLoginModal;
  10442. },
  10443. tempParentId: function tempParentId(state) {
  10444. return state.tempParentId;
  10445. },
  10446. is_vip: function is_vip(state) {
  10447. return state.is_vip_card_user;
  10448. } };
  10449. var mutations = {
  10450. accessToken: function accessToken(state, data) {
  10451. state.accessToken = data;
  10452. },
  10453. info: function info(state, data) {
  10454. state.info = data;
  10455. },
  10456. showLoginModal: function showLoginModal(state, data) {
  10457. state.showLoginModal = data;
  10458. },
  10459. tempParentId: function tempParentId(state, data) {
  10460. state.tempParentId = data;
  10461. } };
  10462. var actions = {
  10463. accessToken: function accessToken(context) {
  10464. if (!_user.default.isLogin()) {
  10465. context.commit('accessToken', null);
  10466. }
  10467. _user.default.getAccessToken().then(function (accessToken) {
  10468. context.commit('accessToken', accessToken);
  10469. }).catch(function (e) {
  10470. });
  10471. },
  10472. info: function info(context) {
  10473. if (!_user.default.isLogin()) {
  10474. context.commit('accessToken', null);
  10475. }
  10476. _user.default.getAccessToken().then(function (accessToken) {
  10477. context.commit('accessToken', accessToken);
  10478. _user.default.getInfo().then(function (data) {
  10479. context.commit('info', data);
  10480. }).catch(function (e) {
  10481. });
  10482. }).catch(function (e) {
  10483. });
  10484. },
  10485. refreshInfo: function refreshInfo(context) {
  10486. if (!_user.default.isLogin()) {
  10487. context.commit('accessToken', null);
  10488. }
  10489. _user.default.getAccessToken().then(function (accessToken) {
  10490. context.commit('accessToken', accessToken);
  10491. _user.default.getInfo({
  10492. refresh: true }).
  10493. then(function (data) {
  10494. context.commit('info', data);
  10495. }).catch(function (e) {
  10496. });
  10497. }).catch(function (e) {
  10498. });
  10499. },
  10500. setTempParentId: function setTempParentId(context, data) {
  10501. context.commit('tempParentId', data);
  10502. },
  10503. loadAccessTokenFormCache: function loadAccessTokenFormCache(context) {
  10504. if (context.accessToken) return;
  10505. _user.default.getAccessToken({
  10506. cacheOnly: true }).
  10507. then(function (accessToken) {
  10508. if (!accessToken) return;
  10509. context.commit('accessToken', accessToken);
  10510. }).catch(function (e) {
  10511. });
  10512. },
  10513. logout: function logout(context) {
  10514. context.commit('accessToken', null);
  10515. _user.default.loginByToken(null);
  10516. } };var _default =
  10517. {
  10518. namespaced: true,
  10519. state: state,
  10520. getters: getters,
  10521. mutations: mutations,
  10522. actions: actions };exports.default = _default;
  10523. /***/ }),
  10524. /***/ 27:
  10525. /*!**********************************************!*\
  10526. !*** C:/Users/Admin/Desktop/商城/core/user.js ***!
  10527. \**********************************************/
  10528. /*! no static exports found */
  10529. /***/ (function(module, exports, __webpack_require__) {
  10530. "use strict";
  10531. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _request = _interopRequireDefault(__webpack_require__(/*! ./request.js */ 15));
  10532. var _appOnLaunch = _interopRequireDefault(__webpack_require__(/*! ./appOnLaunch.js */ 24));
  10533. var _cache = __webpack_require__(/*! ./cache.js */ 21);
  10534. var _event = _interopRequireDefault(__webpack_require__(/*! ./event.js */ 28));
  10535. var _const = _interopRequireDefault(__webpack_require__(/*! ./const.js */ 29));
  10536. var _index = _interopRequireDefault(__webpack_require__(/*! ../store/index.js */ 11));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  10537. var storageKey = '_USER_ACCESS_TOKEN';
  10538. var userInfo = null;var _default =
  10539. {
  10540. getUserInfoResolve: null,
  10541. getUserInfoReject: null,
  10542. getAccessToken: function getAccessToken(options) {var _this = this;
  10543. options = options || {};
  10544. if (typeof options.cacheOnly === 'undefined') {
  10545. options.cacheOnly = false;
  10546. }
  10547. return new Promise(function (resolve, reject) {
  10548. var accessToken = (0, _cache.getStorageSync)(storageKey);
  10549. if (accessToken) {
  10550. return resolve(accessToken);
  10551. }
  10552. if (options.cacheOnly) {
  10553. return resolve(accessToken);
  10554. }
  10555. var pages = getCurrentPages();
  10556. var currentPage = pages[pages.length - 1];
  10557. currentPage.$vm.$store.commit('user/showLoginModal', true);
  10558. _this.getUserInfoResolve = function (userInfoResult) {
  10559. console.log('getUserInfoResolve->', userInfoResult);
  10560. uni.showLoading({
  10561. mask: true,
  10562. title: '正在登录' });
  10563. uni.login({
  10564. scopes: 'auth_base',
  10565. success: function success(loginResult) {
  10566. var data = {
  10567. encryptedData: userInfoResult.detail.encryptedData,
  10568. iv: userInfoResult.detail.iv,
  10569. rawData: userInfoResult.detail.rawData,
  10570. signature: userInfoResult.detail.signature,
  10571. code: loginResult.code };
  10572. (0, _request.default)({
  10573. url: _appOnLaunch.default.passport.login,
  10574. method: 'post',
  10575. data: data }).
  10576. then(function (response) {
  10577. uni.hideLoading();
  10578. if (response.code === 0) {
  10579. _event.default.trigger(_const.default.EVENT_USER_LOGIN);
  10580. (0, _cache.setStorageSync)(storageKey, response.data.access_token);
  10581. return resolve(response.data.access_token);
  10582. } else {
  10583. return reject(response.msg);
  10584. }
  10585. }).catch(function (e) {
  10586. uni.hideLoading();
  10587. reject(e);
  10588. });
  10589. } });
  10590. };
  10591. _this.getUserInfoReject = function (e) {
  10592. reject(e);
  10593. };
  10594. });
  10595. },
  10596. getInfo: function getInfo(options) {var _this2 = this;
  10597. options = options || {};
  10598. if (typeof options.refresh === 'undefined') {
  10599. options.refresh = false;
  10600. }
  10601. return new Promise(function (resolve, reject) {
  10602. if (options.refresh) {
  10603. userInfo = null;
  10604. }
  10605. if (userInfo) {
  10606. return resolve(userInfo);
  10607. }
  10608. _this2.getAccessToken().then(function (accessToken) {
  10609. uni.showNavigationBarLoading();
  10610. (0, _request.default)({
  10611. url: _appOnLaunch.default.user.user_info }).
  10612. then(function (response) {
  10613. uni.hideNavigationBarLoading();
  10614. if (response.code === 0) {
  10615. userInfo = response.data;
  10616. _event.default.trigger(_const.default.EVENT_USER_REGISTER, userInfo);
  10617. if (typeof userInfo.register !== 'undefined') {
  10618. var register = userInfo.register;
  10619. if (register.coupon_list) {
  10620. var coupon = {
  10621. list: register.coupon_list,
  10622. type: 'register' };
  10623. _index.default.dispatch('page/actionSetCoupon', coupon);
  10624. }
  10625. }
  10626. return resolve(userInfo);
  10627. } else {
  10628. return reject(response.msg);
  10629. }
  10630. }).catch(function (e) {
  10631. uni.hideNavigationBarLoading();
  10632. return reject(e);
  10633. });
  10634. }).catch(function (e) {
  10635. return reject(e);
  10636. });
  10637. });
  10638. },
  10639. isLogin: function isLogin() {
  10640. if (_index.default && _index.default.state.user && _index.default.state.user.accessToken) return true;
  10641. return !!(0, _cache.getStorageSync)(storageKey);
  10642. },
  10643. loginByToken: function loginByToken(token) {
  10644. (0, _cache.setStorageSync)(storageKey, token);
  10645. } };exports.default = _default;
  10646. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  10647. /***/ }),
  10648. /***/ 28:
  10649. /*!***********************************************!*\
  10650. !*** C:/Users/Admin/Desktop/商城/core/event.js ***!
  10651. \***********************************************/
  10652. /*! no static exports found */
  10653. /***/ (function(module, exports) {
  10654. function MyPromise(resolve) {
  10655. this.resolveFunc = function () {
  10656. };
  10657. this.rejectFunc = function () {
  10658. };
  10659. resolve(this.resolve.bind(this), this.reject.bind(this));
  10660. }
  10661. MyPromise.prototype.resolve = function (val) {var _this = this;
  10662. setTimeout(function () {
  10663. _this.resolveFunc(val);
  10664. }, 0);
  10665. };
  10666. MyPromise.prototype.reject = function (val) {var _this2 = this;
  10667. setTimeout(function () {
  10668. _this2.rejectFunc(val);
  10669. }, 0);
  10670. };
  10671. MyPromise.prototype.then = function (resolve, reject) {
  10672. this.resolveFunc = resolve;
  10673. this.rejectFunc = reject;
  10674. return this;
  10675. };
  10676. module.exports = {
  10677. _resolveStorage: {},
  10678. _addResolve: function _addResolve(eventName, resolve, removeEventAfterTrigger) {
  10679. if (!this._resolveStorage[eventName]) {
  10680. this._resolveStorage[eventName] = [];
  10681. }
  10682. this._resolveStorage[eventName].push({
  10683. resolve: resolve,
  10684. removeEventAfterTrigger: removeEventAfterTrigger });
  10685. },
  10686. /**
  10687. * 定义触发器
  10688. * @param eventName
  10689. * @param removeEventAfterTrigger
  10690. * @returns {Promise<any>}
  10691. */
  10692. on: function on(eventName, removeEventAfterTrigger) {var _this3 = this;
  10693. return new MyPromise(function (fn) {
  10694. if (typeof removeEventAfterTrigger === 'undefined') {
  10695. removeEventAfterTrigger = true;
  10696. }
  10697. _this3._addResolve(eventName, fn, removeEventAfterTrigger);
  10698. });
  10699. },
  10700. /**
  10701. * 触发事件
  10702. * @param eventName
  10703. * @param e 传入数据(可选)
  10704. */
  10705. trigger: function trigger(eventName, e) {
  10706. if (!this._resolveStorage[eventName] || !this._resolveStorage[eventName].length) {
  10707. return;
  10708. }
  10709. var saveEvens = [];
  10710. for (var i in this._resolveStorage[eventName]) {
  10711. this._resolveStorage[eventName][i].resolve(e);
  10712. if (!this._resolveStorage[eventName][i].removeEventAfterTrigger) {
  10713. saveEvens.push(this._resolveStorage[eventName][i]);
  10714. }
  10715. }
  10716. this._resolveStorage[eventName] = saveEvens;
  10717. } };
  10718. /***/ }),
  10719. /***/ 29:
  10720. /*!***********************************************!*\
  10721. !*** C:/Users/Admin/Desktop/商城/core/const.js ***!
  10722. \***********************************************/
  10723. /*! no static exports found */
  10724. /***/ (function(module, exports, __webpack_require__) {
  10725. "use strict";
  10726. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  10727. EVENT_USER_LOGIN: 'event_user_login', // 用户登录事件
  10728. EVENT_USER_REGISTER: 'event_user_register', // 用户注册事件
  10729. EVENT_VIDEO_END: 'event_video_end', // 视频播放结束事件
  10730. EVENT_POPUP: 'popUpEvent' // 弹窗广告弹出事件
  10731. };exports.default = _default;
  10732. /***/ }),
  10733. /***/ 3:
  10734. /*!***********************************!*\
  10735. !*** (webpack)/buildin/global.js ***!
  10736. \***********************************/
  10737. /*! no static exports found */
  10738. /***/ (function(module, exports) {
  10739. var g;
  10740. // This works in non-strict mode
  10741. g = (function() {
  10742. return this;
  10743. })();
  10744. try {
  10745. // This works if eval is allowed (see CSP)
  10746. g = g || new Function("return this")();
  10747. } catch (e) {
  10748. // This works if the window reference is available
  10749. if (typeof window === "object") g = window;
  10750. }
  10751. // g can still be undefined, but nothing to do about it...
  10752. // We return undefined, instead of nothing here, so it's
  10753. // easier to handle this case. if(!global) { ...}
  10754. module.exports = g;
  10755. /***/ }),
  10756. /***/ 30:
  10757. /*!**********************************************************************!*\
  10758. !*** C:/Users/Admin/Desktop/商城/store/modules/globalConfiguration.js ***!
  10759. \**********************************************************************/
  10760. /*! no static exports found */
  10761. /***/ (function(module, exports, __webpack_require__) {
  10762. "use strict";
  10763. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var state = {
  10764. reportAndError: {
  10765. boolean: false,
  10766. content: '网络开了会儿小差, 请刷新重试下哦~' },
  10767. tabBarBoolean: false,
  10768. systemInfo: {
  10769. SDKVersion: "",
  10770. batteryLevel: 0,
  10771. brand: "",
  10772. errMsg: "",
  10773. fontSizeSetting: 0,
  10774. language: "0",
  10775. model: "",
  10776. pixelRatio: 0,
  10777. platform: "",
  10778. safeArea: {
  10779. bottom: 0,
  10780. height: 0,
  10781. left: 0,
  10782. right: 0,
  10783. top: 0,
  10784. width: 0 },
  10785. screenHeight: 0,
  10786. screenWidth: 0,
  10787. statusBarHeight: 0,
  10788. system: "",
  10789. version: "",
  10790. windowHeight: 0,
  10791. windowWidth: 0 },
  10792. tabBarHeight: 0,
  10793. iphone: false,
  10794. iphoneHeight: 0,
  10795. promptBox: {
  10796. text: '',
  10797. show: false,
  10798. call: -1 },
  10799. imageWidth: 0 };
  10800. var getters = {
  10801. reportAndErrorObj: function reportAndErrorObj(state) {
  10802. return state.reportAndError;
  10803. } };
  10804. var mutations = {
  10805. reportAndErrorObj: function reportAndErrorObj(state, data) {
  10806. state.reportAndError = data;
  10807. },
  10808. reportAndErrorB: function reportAndErrorB(state, data) {
  10809. state.reportAndError.boolean = data;
  10810. },
  10811. setTabBarBoolean: function setTabBarBoolean(state, data) {
  10812. var pages = getCurrentPages();
  10813. var currPage = null;
  10814. if (pages.length) {
  10815. currPage = pages[pages.length - 1];
  10816. }
  10817. var currentRoute = undefined;
  10818. currentRoute = "/".concat(currPage.route.split("?")[0]);
  10819. for (var i = 0; i < data.length; i++) {
  10820. if (currentRoute.includes(data[i].url.split('?')[0])) {
  10821. return state.tabBarBoolean = true;
  10822. }
  10823. }
  10824. return state.tabBarBoolean = false;
  10825. },
  10826. setSystemInfo: function setSystemInfo(state, data) {
  10827. state.systemInfo = data;
  10828. state.imageWidth = data.windowWidth;
  10829. },
  10830. setPromptBox: function setPromptBox(state, data) {
  10831. state.promptBox = data;
  10832. },
  10833. setPromptBoxCall: function setPromptBoxCall(state, data) {
  10834. state.promptBox.call = data;
  10835. },
  10836. setHeight: function setHeight(state, data) {
  10837. state.tabBarHeight = data;
  10838. },
  10839. setiPhoneHeight: function setiPhoneHeight(state, data) {
  10840. state.iphoneHeight = data;
  10841. },
  10842. setiPhoneBoolean: function setiPhoneBoolean(state, data) {
  10843. state.iphone = data;
  10844. },
  10845. setImageWidth: function setImageWidth(state, data) {
  10846. state.imageWidth = state.systemInfo.windowWidth - state.systemInfo.windowWidth / 750 * data;
  10847. } };
  10848. var actions = {
  10849. setImageWidth: function setImageWidth(content, data) {
  10850. content.commit('setImageWidth', data);
  10851. },
  10852. reportAndErrorObj: function reportAndErrorObj(content, data) {
  10853. content.commit('reportAndErrorObj', data);
  10854. },
  10855. reportAndErrorB: function reportAndErrorB(content, data) {
  10856. content.commit('reportAndErrorB', data);
  10857. },
  10858. setTabBarBoolean: function setTabBarBoolean(content, data) {
  10859. content.commit('setTabBarBoolean', data);
  10860. },
  10861. setSystemInfo: function setSystemInfo(content, data) {
  10862. content.commit('setSystemInfo', data);
  10863. },
  10864. setHeight: function setHeight(content, data) {
  10865. content.commit('setHeight', data);
  10866. },
  10867. setiPhoneBoolean: function setiPhoneBoolean(content, data) {
  10868. content.commit('setiPhoneBoolean', data);
  10869. },
  10870. setPromptBox: function setPromptBox(content, data) {
  10871. content.commit('setPromptBox', data);
  10872. },
  10873. setPromptBoxCall: function setPromptBoxCall(content, data) {
  10874. content.commit('setPromptBoxCall', data);
  10875. },
  10876. setiPhoneHeight: function setiPhoneHeight(content, data) {
  10877. content.commit('setiPhoneHeight', data);
  10878. } };var _default =
  10879. {
  10880. namespaced: true,
  10881. state: state,
  10882. getters: getters,
  10883. mutations: mutations,
  10884. actions: actions };exports.default = _default;
  10885. /***/ }),
  10886. /***/ 3045:
  10887. /*!******************************************************************************************!*\
  10888. !*** C:/Users/Admin/Desktop/商城/components/page-component/app-check-in/check-in-award.js ***!
  10889. \******************************************************************************************/
  10890. /*! no static exports found */
  10891. /***/ (function(module, exports, __webpack_require__) {
  10892. "use strict";
  10893. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _request = _interopRequireDefault(__webpack_require__(/*! ../../../core/request.js */ 15));
  10894. var _appOnLaunch = _interopRequireDefault(__webpack_require__(/*! ../../../core/appOnLaunch.js */ 24));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}var _default =
  10895. {
  10896. getAward: function getAward(status, day) {var _this = this;
  10897. return new Promise(function (resolve, reject) {
  10898. (0, _request.default)({
  10899. url: _appOnLaunch.default.check_in.sign_in,
  10900. data: {
  10901. status: status,
  10902. day: day ? day : 1 } }).
  10903. then(function (response) {
  10904. if (response.code == 0) {
  10905. _this.checkInResult(response.data.queueId, response.data.token).then(function (result) {
  10906. return resolve(result);
  10907. }).catch(function (e) {
  10908. return reject(e);
  10909. });
  10910. } else {
  10911. return reject(response.msg);
  10912. }
  10913. }).catch(function (response) {
  10914. return reject(response);
  10915. });
  10916. });
  10917. },
  10918. checkInResult: function checkInResult(queueId, token) {var _this2 = this;
  10919. return new Promise(function (resolve, reject) {
  10920. (0, _request.default)({
  10921. url: _appOnLaunch.default.check_in.sign_in_result,
  10922. data: {
  10923. queueId: queueId,
  10924. token: token } }).
  10925. then(function (response) {
  10926. if (response.code == 0) {
  10927. if (response.data.retry == 1) {
  10928. _this2.checkInResult(queueId, token).then(function (result) {
  10929. return resolve(result);
  10930. }).catch(function (e) {
  10931. return reject(e);
  10932. });
  10933. } else {
  10934. return resolve(response.data);
  10935. }
  10936. } else {
  10937. return reject(response.msg);
  10938. }
  10939. }).catch(function (response) {
  10940. return reject(response);
  10941. });
  10942. });
  10943. } };exports.default = _default;
  10944. /***/ }),
  10945. /***/ 31:
  10946. /*!********************************************************!*\
  10947. !*** C:/Users/Admin/Desktop/商城/store/modules/index.js ***!
  10948. \********************************************************/
  10949. /*! no static exports found */
  10950. /***/ (function(module, exports, __webpack_require__) {
  10951. "use strict";
  10952. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _appOnLaunch = _interopRequireDefault(__webpack_require__(/*! ../../core/appOnLaunch.js */ 24));
  10953. var _request = _interopRequireDefault(__webpack_require__(/*! ../../core/request.js */ 15));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  10954. var state = {
  10955. home_pages: {},
  10956. type: '' };
  10957. var getters = {};
  10958. var mutations = {
  10959. getHomePages: function getHomePages(state, data) {
  10960. console.table(data);
  10961. state.type = data.type;
  10962. state.home_pages = data.home_pages;
  10963. } };
  10964. var actions = {
  10965. getHomePages: function getHomePages(content) {
  10966. (0, _request.default)({ url: "".concat(_appOnLaunch.default.index.index, "&page_id=0&longitude=&latitude=") }).then(function (response) {
  10967. content.commit('getHomePages', response.data);
  10968. }).catch(function (err) {
  10969. console.log(err);
  10970. });
  10971. } };var _default =
  10972. {
  10973. namespaced: true,
  10974. state: state,
  10975. getters: getters,
  10976. mutations: mutations,
  10977. actions: actions };exports.default = _default;
  10978. /***/ }),
  10979. /***/ 318:
  10980. /*!********************************************************!*\
  10981. !*** C:/Users/Admin/Desktop/商城/pages/goods/all-pay.js ***!
  10982. \********************************************************/
  10983. /*! no static exports found */
  10984. /***/ (function(module, exports, __webpack_require__) {
  10985. "use strict";
  10986. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;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;}var that = null;
  10987. var allPay = function allPay(data, sign, _this, item) {
  10988. that = _this;
  10989. switch (sign) {
  10990. case 'advance':
  10991. var body = {
  10992. goods_id: data.goods_id,
  10993. goods_attr_id: data.id,
  10994. goods_num: data.number };
  10995. that.$request({
  10996. url: that.$api.advance.order_submit,
  10997. method: 'post',
  10998. data: _objectSpread({},
  10999. body) }).
  11000. then(function (res) {
  11001. if (res.code === 0) {
  11002. get_token(res.data);
  11003. }
  11004. });
  11005. break;
  11006. case 'gift':
  11007. var select_data = {
  11008. name: item.name,
  11009. price: data.price,
  11010. attr: {
  11011. id: data.id,
  11012. attr_list: data.attr_list,
  11013. stock: data.stock,
  11014. goods_id: data.goods_id },
  11015. attr_str: '',
  11016. pic_url: data.pic_url ? data.pic_url : item.cover_pic,
  11017. number: data.number };
  11018. for (var i = 0; i < data.attr_list.length; i++) {
  11019. select_data.attr_str += "".concat(data.attr_list[i].attr_group_name, ":").concat(data.attr_list[i].attr_name, " ");
  11020. }
  11021. if (that.$storage.getStorageSync('GIFT_CART')) {
  11022. var again = 0;
  11023. var storage = that.$storage.getStorageSync('GIFT_CART');
  11024. for (var _i = 0; _i < storage.length; _i++) {
  11025. if (storage[_i].attr.id === data.id) {
  11026. storage[_i].number += data.number;
  11027. } else {
  11028. again += 1;
  11029. }
  11030. }
  11031. if (again === storage.length) {
  11032. storage.push(select_data);
  11033. }
  11034. that.$storage.setStorageSync('GIFT_CART', storage);
  11035. } else {
  11036. that.$storage.setStorageSync('GIFT_CART', [select_data]);
  11037. }
  11038. uni.showToast({
  11039. title: '加入成功',
  11040. icon: 'none' });
  11041. break;
  11042. case "pintuan":
  11043. // that.$jump({
  11044. // open_type: 'navigate',
  11045. // url: `/pages/order-submit/order-submit?mch_list=${JSON.stringify(mch_list)}&preview_url=${encodeURIComponent(that.$api.pt.order_preview)}&submit_url=${encodeURIComponent(that.$api.pt.order_submit)}&order_page_url=/plugins/pt/order/order&plugin=pt`
  11046. // });
  11047. break;
  11048. default:
  11049. break;}
  11050. };
  11051. function get_token(data) {
  11052. that.$request({
  11053. url: that.$api.advance.pay_data,
  11054. method: 'post',
  11055. data: _objectSpread({},
  11056. data) }).
  11057. then(function (res) {
  11058. if (res.code === 0) {
  11059. if (res.data.hasOwnProperty('id')) {
  11060. that.$payment.pay(res.data.id).then(function () {
  11061. // 支付成功
  11062. uni.navigateTo({
  11063. url: "/plugins/advance/order/order" });
  11064. }).catch(function () {
  11065. // 支付失败
  11066. uni.navigateTo({
  11067. url: "/plugins/advance/order/order" });
  11068. });
  11069. } else {
  11070. setTimeout(function () {
  11071. get_token(data);
  11072. }, 1000);
  11073. }
  11074. } else {
  11075. uni.showModal({
  11076. title: '提示',
  11077. content: res.msg });
  11078. }
  11079. });
  11080. }var _default =
  11081. allPay;exports.default = _default;
  11082. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  11083. /***/ }),
  11084. /***/ 32:
  11085. /*!**************************************************************!*\
  11086. !*** C:/Users/Admin/Desktop/商城/store/modules/orderSubmit.js ***!
  11087. \**************************************************************/
  11088. /*! no static exports found */
  11089. /***/ (function(module, exports, __webpack_require__) {
  11090. "use strict";
  11091. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var state = {
  11092. formData: null };
  11093. var mutations = {
  11094. mutSetFormData: function mutSetFormData(state, data) {
  11095. state.formData = data;
  11096. } };
  11097. var actions = {};var _default =
  11098. {
  11099. namespaced: true,
  11100. state: state,
  11101. mutations: mutations,
  11102. actions: actions };exports.default = _default;
  11103. /***/ }),
  11104. /***/ 33:
  11105. /*!*************************************************************!*\
  11106. !*** C:/Users/Admin/Desktop/商城/store/modules/pagination.js ***!
  11107. \*************************************************************/
  11108. /*! no static exports found */
  11109. /***/ (function(module, exports, __webpack_require__) {
  11110. "use strict";
  11111. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var state = {
  11112. year: 1 };var _default =
  11113. {
  11114. namespaced: true,
  11115. state: state };exports.default = _default;
  11116. /***/ }),
  11117. /***/ 34:
  11118. /*!**********************************************************!*\
  11119. !*** C:/Users/Admin/Desktop/商城/store/modules/loading.js ***!
  11120. \**********************************************************/
  11121. /*! no static exports found */
  11122. /***/ (function(module, exports, __webpack_require__) {
  11123. "use strict";
  11124. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _regenerator = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@vue/babel-preset-app/node_modules/@babel/runtime/regenerator */ 16));var _mallConfig = _interopRequireDefault(__webpack_require__(/*! ../../core/mallConfig.js */ 14));
  11125. var _user = _interopRequireDefault(__webpack_require__(/*! ../../core/user */ 27));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);});};}
  11126. var state = {
  11127. type: 'global',
  11128. text: '加载中',
  11129. color: '#ffffff',
  11130. backgroundImage: '',
  11131. isShow: false };
  11132. var getters = {
  11133. getType: function getType(state) {
  11134. return state.type;
  11135. },
  11136. getText: function getText(state) {
  11137. return state.text;
  11138. },
  11139. getColor: function getColor(state) {
  11140. return state.color;
  11141. },
  11142. getBackgroundImage: function () {var _getBackgroundImage = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee(state) {return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:return _context.abrupt("return",
  11143. state.backgroundImage);case 1:case "end":return _context.stop();}}}, _callee);}));function getBackgroundImage(_x) {return _getBackgroundImage.apply(this, arguments);}return getBackgroundImage;}(),
  11144. getIsShow: function getIsShow(state) {
  11145. return state.isShow;
  11146. } };
  11147. var mutations = {
  11148. mutSetLoading: function mutSetLoading(state, data) {
  11149. for (var item in data) {
  11150. state[item] = data[item];
  11151. }
  11152. if (!state.backgroundImage) {
  11153. _mallConfig.default.getConfig().then(function (config) {
  11154. state.backgroundImage = config.__wxapp_img.mall.loading;
  11155. });
  11156. }
  11157. } };
  11158. var actions = {
  11159. actionGetLoading: function actionGetLoading(context, data) {
  11160. context.commit('mutSetLoading', data);
  11161. } };var _default =
  11162. {
  11163. namespaced: true,
  11164. state: state,
  11165. getters: getters,
  11166. mutations: mutations,
  11167. actions: actions };exports.default = _default;
  11168. /***/ }),
  11169. /***/ 35:
  11170. /*!**********************************************************!*\
  11171. !*** C:/Users/Admin/Desktop/商城/store/modules/payment.js ***!
  11172. \**********************************************************/
  11173. /*! no static exports found */
  11174. /***/ (function(module, exports, __webpack_require__) {
  11175. "use strict";
  11176. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var state = {
  11177. id: null,
  11178. showPayment: false,
  11179. payData: null,
  11180. payType: null,
  11181. resolve: null,
  11182. reject: null };
  11183. var getters = {
  11184. id: function id(state) {
  11185. return state.id;
  11186. },
  11187. showPayment: function showPayment(state) {
  11188. return state.showPayment;
  11189. },
  11190. payData: function payData(state) {
  11191. return state.payData;
  11192. },
  11193. payType: function payType(state) {
  11194. return state.payType;
  11195. },
  11196. resolve: function resolve(state) {
  11197. return state.resolve;
  11198. },
  11199. reject: function reject(state) {
  11200. return state.reject;
  11201. } };
  11202. var mutations = {
  11203. id: function id(state, data) {
  11204. state.id = data;
  11205. },
  11206. showPayment: function showPayment(state, data) {
  11207. state.showPayment = data;
  11208. },
  11209. payData: function payData(state, data) {
  11210. state.payData = data;
  11211. },
  11212. payType: function payType(state, data) {
  11213. state.payType = data;
  11214. },
  11215. resolve: function resolve(state, data) {
  11216. state.resolve = data;
  11217. },
  11218. reject: function reject(state, data) {
  11219. state.reject = data;
  11220. },
  11221. setAll: function setAll(state, data) {
  11222. for (var k in data) {
  11223. state[k] = data[k];
  11224. }
  11225. console.log('in payment.js setAll ok:', state);
  11226. } };
  11227. var actions = {
  11228. reset: function reset(context) {
  11229. context.commit('id', null);
  11230. context.commit('showPayment', false);
  11231. context.commit('payData', null);
  11232. context.commit('payType', null);
  11233. context.commit('resolve', null);
  11234. context.commit('reject', null);
  11235. } };var _default =
  11236. {
  11237. namespaced: true,
  11238. state: state,
  11239. getters: getters,
  11240. mutations: mutations,
  11241. actions: actions };exports.default = _default;
  11242. /***/ }),
  11243. /***/ 36:
  11244. /*!***********************************************************!*\
  11245. !*** C:/Users/Admin/Desktop/商城/store/modules/scanCode.js ***!
  11246. \***********************************************************/
  11247. /*! no static exports found */
  11248. /***/ (function(module, exports, __webpack_require__) {
  11249. "use strict";
  11250. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var state = {
  11251. userCoupon: null };
  11252. var mutations = {
  11253. mutSetUserCoupon: function mutSetUserCoupon(state, data) {
  11254. state.userCoupon = data;
  11255. } };
  11256. var actions = {};var _default =
  11257. {
  11258. namespaced: true,
  11259. state: state,
  11260. mutations: mutations,
  11261. actions: actions };exports.default = _default;
  11262. /***/ }),
  11263. /***/ 37:
  11264. /*!*******************************************************!*\
  11265. !*** C:/Users/Admin/Desktop/商城/store/modules/page.js ***!
  11266. \*******************************************************/
  11267. /*! no static exports found */
  11268. /***/ (function(module, exports, __webpack_require__) {
  11269. "use strict";
  11270. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var state = {
  11271. scrollTop: 0,
  11272. isScanQrCode: false,
  11273. coupon: {
  11274. list: [],
  11275. type: '' },
  11276. query: null };
  11277. var getters = {
  11278. getScrollTop: function getScrollTop(state) {
  11279. return state.scrollTop;
  11280. },
  11281. getIsScanQrCode: function getIsScanQrCode(state) {
  11282. return state.isScanQrCode;
  11283. },
  11284. getCoupon: function getCoupon(state) {
  11285. return state.coupon;
  11286. },
  11287. getQuery: function getQuery(state) {
  11288. return state.query;
  11289. } };
  11290. var mutations = {
  11291. mutSetScrollTop: function mutSetScrollTop(state, data) {
  11292. state.scrollTop = data;
  11293. },
  11294. mutSetIsScanQrCode: function mutSetIsScanQrCode(state, data) {
  11295. state.isScanQrCode = data;
  11296. },
  11297. mutSetCoupon: function mutSetCoupon(state, data) {
  11298. state.coupon = data;
  11299. },
  11300. mutSetQuery: function mutSetQuery(state, data) {
  11301. state.query = data;
  11302. } };
  11303. var actions = {
  11304. actionSetScrollTop: function actionSetScrollTop(context, data) {
  11305. context.commit('mutSetScrollTop', data);
  11306. },
  11307. actionSetIsScanQrCode: function actionSetIsScanQrCode(context, data) {
  11308. context.commit('mutSetIsScanQrCode', data);
  11309. },
  11310. actionSetCoupon: function actionSetCoupon(context, data) {
  11311. context.commit('mutSetCoupon', data);
  11312. },
  11313. actionSetQeury: function actionSetQeury(context, data) {
  11314. context.commit('mutSetQuery', data);
  11315. } };var _default =
  11316. {
  11317. namespaced: true,
  11318. state: state,
  11319. getters: getters,
  11320. mutations: mutations,
  11321. actions: actions };exports.default = _default;
  11322. /***/ }),
  11323. /***/ 38:
  11324. /*!*************************************************************!*\
  11325. !*** C:/Users/Admin/Desktop/商城/store/modules/userCenter.js ***!
  11326. \*************************************************************/
  11327. /*! no static exports found */
  11328. /***/ (function(module, exports, __webpack_require__) {
  11329. "use strict";
  11330. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _appOnLaunch = _interopRequireDefault(__webpack_require__(/*! ../../core/appOnLaunch.js */ 24));
  11331. var _request = _interopRequireDefault(__webpack_require__(/*! ../../core/request.js */ 15));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  11332. var state = {
  11333. data: null };
  11334. var getters = {
  11335. data: function data(state) {
  11336. return state.data;
  11337. },
  11338. foot_bar: function foot_bar(state) {
  11339. return state.data.foot_bar;
  11340. } };
  11341. var mutations = {
  11342. data: function data(state, _data) {
  11343. state.data = _data;
  11344. } };
  11345. var actions = {
  11346. data: function data(context) {
  11347. (0, _request.default)({
  11348. url: _appOnLaunch.default.user.config }).
  11349. then(function (response) {
  11350. if (response.code === 0) {
  11351. if (response.data &&
  11352. response.data.config &&
  11353. response.data.config.user_center) {
  11354. context.commit('data', response.data.config.user_center);
  11355. }
  11356. }
  11357. }).catch(function (e) {
  11358. });
  11359. } };var _default =
  11360. {
  11361. namespaced: true,
  11362. state: state,
  11363. getters: getters,
  11364. mutations: mutations,
  11365. actions: actions };exports.default = _default;
  11366. /***/ }),
  11367. /***/ 381:
  11368. /*!****************************************************************!*\
  11369. !*** C:/Users/Admin/Desktop/商城/pages/address/address-parse.js ***!
  11370. \****************************************************************/
  11371. /*! no static exports found */
  11372. /***/ (function(module, exports, __webpack_require__) {
  11373. "use strict";
  11374. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;function _createForOfIteratorHelper(o) {if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) {var i = 0;var F = function F() {};return { s: F, n: function n() {if (i >= o.length) return { done: true };return { done: false, value: o[i++] };}, e: function e(_e) {throw _e;}, f: F };}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var it,normalCompletion = true,didErr = false,err;return { s: function s() {it = o[Symbol.iterator]();}, n: function n() {var step = it.next();normalCompletion = step.done;return step;}, e: function e(_e2) {didErr = true;err = _e2;}, f: function f() {try {if (!normalCompletion && it.return != null) it.return();} finally {if (didErr) throw err;}} };}function _unsupportedIterableToArray(o, minLen) {if (!o) return;if (typeof o === "string") return _arrayLikeToArray(o, minLen);var n = Object.prototype.toString.call(o).slice(8, -1);if (n === "Object" && o.constructor) n = o.constructor.name;if (n === "Map" || n === "Set") return Array.from(n);if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);}function _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;}
  11375. /**
  11376. * 需要解析的地址,type是解析的方式,默认是正则匹配
  11377. * @param address
  11378. * @param options:type: 0:正则,1:树查找, textFilter: 清洗的字段
  11379. * @returns {{}|({area: Array, province: Array, phone: string, city: Array, name: string, detail: Array} & {area: (*|string), province: (*|string), city: (*|string), detail: (Array|boolean|string|string)})}
  11380. * @constructor
  11381. */
  11382. var AddressParse = function AddressParse(address, options, provinceString, cityString, areaString) {var _ref =
  11383. typeof options === 'object' ? options : {},_ref$type = _ref.type,type = _ref$type === void 0 ? 0 : _ref$type,_ref$textFilter = _ref.textFilter,textFilter = _ref$textFilter === void 0 ? [] : _ref$textFilter;
  11384. if (!address) {
  11385. return {};
  11386. }
  11387. var parseResult = {
  11388. phone: '',
  11389. province: [],
  11390. city: [],
  11391. area: [],
  11392. detail: [],
  11393. name: '' };
  11394. address = cleanAddress(address, textFilter);
  11395. // 识别手机号
  11396. var resultPhone = filterPhone(address);
  11397. address = resultPhone.address;
  11398. parseResult.phone = resultPhone.phone;
  11399. var resultCode = filterPostalCode(address);
  11400. address = resultCode.address;
  11401. parseResult.postalCode = resultCode.postalCode;
  11402. // 地址分割
  11403. var splitAddress = address.split(' ').filter(function (item) {return item;}).map(function (item) {return item.trim();});
  11404. // 找省市区和详细地址
  11405. splitAddress.forEach(function (item) {
  11406. // 识别地址
  11407. if (!parseResult.province[0] || !parseResult.city[0] || !parseResult.area[0]) {
  11408. // 两个方法都可以解析,正则和树查找
  11409. var parse;
  11410. type === 1 && (parse = parseRegion(item, parseResult));
  11411. type === 0 && (parse = parseRegionWithRegexp(item, parseResult, provinceString, cityString, areaString));var _parse =
  11412. parse,_province = _parse.province,_city = _parse.city,_area = _parse.area,_detail = _parse.detail;
  11413. parseResult.province = _province || [];
  11414. parseResult.area = _area || [];
  11415. parseResult.city = _city || [];
  11416. parseResult.detail = parseResult.detail.concat(_detail || []);
  11417. } else {
  11418. parseResult.detail.push(item);
  11419. }
  11420. });
  11421. // 地址都解析完了,如果还没有姓名,那么姓名应该是在详细地址里面,取详细地址里面长度最小的那个
  11422. if (!parseResult.name) {
  11423. var _detail2 = JSON.parse(JSON.stringify(parseResult.detail));
  11424. _detail2.sort(function (a, b) {return a.length - b.length;});
  11425. // console.log(judgeFragmentIsName(detail[0]));
  11426. parseResult.name = _detail2[0];
  11427. var nameIndex = parseResult.detail.findIndex(function (item) {return item === parseResult.name;});
  11428. parseResult.detail.splice(nameIndex, 1);
  11429. }
  11430. // log(JSON.stringify(parseResult));
  11431. var province = parseResult.province[0];
  11432. var city = parseResult.city[0];
  11433. var area = parseResult.area[0];
  11434. var detail = parseResult.detail;
  11435. return Object.assign(parseResult, {
  11436. province: province && province.name || '',
  11437. city: city && city.name || '',
  11438. area: area && area.name || '',
  11439. detail: detail && detail.length > 0 && detail.join('') || '' });
  11440. };
  11441. /**
  11442. * 利用正则表达式解析
  11443. * @param fragment
  11444. * @param hasParseResult
  11445. * @returns {{area: (Array|*|string), province: (Array|*|string), city: (Array|*|string|string), detail: (*|Array)}}
  11446. */
  11447. var parseRegionWithRegexp = function parseRegionWithRegexp(fragment, hasParseResult, provinceString, cityString, areaString) {
  11448. // log('----- 当前使用正则匹配模式 -----')
  11449. var province = hasParseResult.province || [],city = hasParseResult.city || [],area = hasParseResult.area || [],
  11450. detail = [];
  11451. var matchStr = '';
  11452. if (province.length === 0) {
  11453. for (var i = 1; i < fragment.length; i++) {
  11454. var str = fragment.substring(0, i + 1);
  11455. var regexProvince = new RegExp("{\"code\":\"[0-9]{1,6}\",\"name\":\"".concat(str, "[\u4E00-\u9FA5]*?\"}"), 'g');
  11456. var matchProvince = provinceString.match(regexProvince);
  11457. if (matchProvince) {
  11458. var provinceObj = JSON.parse(matchProvince[0]);
  11459. if (matchProvince.length === 1) {
  11460. province = [];
  11461. matchStr = str;
  11462. province.push(provinceObj);
  11463. }
  11464. } else {
  11465. break;
  11466. }
  11467. }
  11468. if (province[0]) {
  11469. fragment = fragment.replace(matchStr, '');
  11470. }
  11471. }
  11472. if (city.length === 0) {
  11473. for (var _i = 1; _i < fragment.length; _i++) {
  11474. var _str = fragment.substring(0, _i + 1);
  11475. var regexCity = new RegExp("{\"code\":\"[0-9]{1,6}\",\"name\":\"".concat(_str, "[\u4E00-\u9FA5]*?\",\"provinceCode\":\"").concat(province[0] ? "".concat(province[0].code) : '[0-9]{1,6}', "\"}"), 'g');
  11476. var matchCity = cityString.match(regexCity);
  11477. if (matchCity) {
  11478. var cityObj = JSON.parse(matchCity[0]);
  11479. if (matchCity.length === 1) {
  11480. city = [];
  11481. matchStr = _str;
  11482. city.push(cityObj);
  11483. }
  11484. } else {
  11485. break;
  11486. }
  11487. }
  11488. if (city[0]) {var
  11489. provinceCode = city[0].provinceCode;
  11490. fragment = fragment.replace(matchStr, '');
  11491. if (province.length === 0) {
  11492. var _regexProvince = new RegExp("{\"code\":\"".concat(provinceCode, "\",\"name\":\"[\u4E00-\u9FA5]+?\"}"), 'g');
  11493. var _matchProvince = provinceString.match(_regexProvince);
  11494. province.push(JSON.parse(_matchProvince[0]));
  11495. }
  11496. }
  11497. }
  11498. if (area.length === 0) {
  11499. for (var _i2 = 1; _i2 < fragment.length; _i2++) {
  11500. var _str2 = fragment.substring(0, _i2 + 1);
  11501. var regexArea = new RegExp("{\"code\":\"[0-9]{1,6}\",\"name\":\"".concat(_str2, "[\u4E00-\u9FA5]*?\",\"cityCode\":\"").concat(city[0] ? city[0].code : '[0-9]{1,6}', "\",\"provinceCode\":\"").concat(province[0] ? "".concat(province[0].code) : '[0-9]{1,6}', "\"}"), 'g');
  11502. var matchArea = areaString.match(regexArea);
  11503. if (matchArea) {
  11504. var areaObj = JSON.parse(matchArea[0]);
  11505. if (matchArea.length === 1) {
  11506. area = [];
  11507. matchStr = _str2;
  11508. area.push(areaObj);
  11509. }
  11510. } else {
  11511. break;
  11512. }
  11513. }
  11514. if (area[0]) {var _area$ =
  11515. area[0],_provinceCode = _area$.provinceCode,cityCode = _area$.cityCode;
  11516. fragment = fragment.replace(matchStr, '');
  11517. if (province.length === 0) {
  11518. var _regexProvince2 = new RegExp("{\"code\":\"".concat(_provinceCode, "\",\"name\":\"[\u4E00-\u9FA5]+?\"}"), 'g');
  11519. var _matchProvince2 = provinceString.match(_regexProvince2);
  11520. province.push(JSON.parse(_matchProvince2[0]));
  11521. }
  11522. if (city.length === 0) {
  11523. var _regexCity = new RegExp("{\"code\":\"".concat(cityCode, "\",\"name\":\"[\u4E00-\u9FA5]+?\",\"provinceCode\":\"").concat(_provinceCode, "\"}"), 'g');
  11524. var _matchCity = cityString.match(_regexCity);
  11525. city.push(JSON.parse(_matchCity[0]));
  11526. }
  11527. }
  11528. }
  11529. // 解析完省市区如果还存在地址,则默认为详细地址
  11530. if (fragment.length > 0) {
  11531. detail.push(fragment);
  11532. }
  11533. return {
  11534. province: province,
  11535. city: city,
  11536. area: area,
  11537. detail: detail };
  11538. };
  11539. /**
  11540. * 利用树向下查找解析
  11541. * @param fragment
  11542. * @param hasParseResult
  11543. * @returns {{area: Array, province: Array, city: Array, detail: Array}}
  11544. */
  11545. var parseRegion = function parseRegion(fragment, hasParseResult) {
  11546. // log('----- 当前使用树查找模式 -----')
  11547. var province = [],city = [],area = [],detail = [];
  11548. if (hasParseResult.province[0]) {
  11549. province = hasParseResult.province;
  11550. } else {
  11551. // 从省开始查找
  11552. var _iterator = _createForOfIteratorHelper(provinces),_step;try {for (_iterator.s(); !(_step = _iterator.n()).done;) {var tempProvince = _step.value;var
  11553. name = tempProvince.name;
  11554. var replaceName = '';
  11555. for (var i = name.length; i > 1; i--) {
  11556. var temp = name.substring(0, i);
  11557. if (fragment.indexOf(temp) === 0) {
  11558. replaceName = temp;
  11559. break;
  11560. }
  11561. }
  11562. if (replaceName) {
  11563. province.push(tempProvince);
  11564. fragment = fragment.replace(replaceName, '');
  11565. break;
  11566. }
  11567. }} catch (err) {_iterator.e(err);} finally {_iterator.f();}
  11568. }
  11569. if (hasParseResult.city[0]) {
  11570. city = hasParseResult.city;
  11571. } else {
  11572. // 从市区开始查找
  11573. var _iterator2 = _createForOfIteratorHelper(cities),_step2;try {var _loop = function _loop() {var tempCity = _step2.value;var
  11574. name = tempCity.name,provinceCode = tempCity.provinceCode;
  11575. var currentProvince = province[0];
  11576. // 有省
  11577. if (currentProvince) {
  11578. if (currentProvince.code === provinceCode) {
  11579. var _replaceName = '';
  11580. for (var _i3 = name.length; _i3 > 1; _i3--) {
  11581. var _temp = name.substring(0, _i3);
  11582. if (fragment.indexOf(_temp) === 0) {
  11583. _replaceName = _temp;
  11584. break;
  11585. }
  11586. }
  11587. if (_replaceName) {
  11588. city.push(tempCity);
  11589. fragment = fragment.replace(_replaceName, '');
  11590. return "break";
  11591. }
  11592. }
  11593. } else {
  11594. // 没有省,市不可能重名
  11595. for (var _i4 = name.length; _i4 > 1; _i4--) {
  11596. var _replaceName2 = name.substring(0, _i4);
  11597. if (fragment.indexOf(_replaceName2) === 0) {
  11598. city.push(tempCity);
  11599. province.push(provinces.find(function (item) {return item.code === provinceCode;}));
  11600. fragment = fragment.replace(_replaceName2, '');
  11601. break;
  11602. }
  11603. }
  11604. if (city.length > 0) {
  11605. return "break";
  11606. }
  11607. }};for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {var _ret = _loop();if (_ret === "break") break;
  11608. }} catch (err) {_iterator2.e(err);} finally {_iterator2.f();}
  11609. }
  11610. // 从区市县开始查找
  11611. var _iterator3 = _createForOfIteratorHelper(areas),_step3;try {var _loop2 = function _loop2() {var tempArea = _step3.value;var
  11612. name = tempArea.name,provinceCode = tempArea.provinceCode,cityCode = tempArea.cityCode;
  11613. var currentProvince = province[0];
  11614. var currentCity = city[0];
  11615. // 有省或者市
  11616. if (currentProvince || currentCity) {
  11617. if (currentProvince && currentProvince.code === provinceCode ||
  11618. (currentCity && currentCity.code) === cityCode) {
  11619. var _replaceName3 = '';
  11620. for (var _i5 = name.length; _i5 > 1; _i5--) {
  11621. var _temp2 = name.substring(0, _i5);
  11622. if (fragment.indexOf(_temp2) === 0) {
  11623. _replaceName3 = _temp2;
  11624. break;
  11625. }
  11626. }
  11627. if (_replaceName3) {
  11628. area.push(tempArea);
  11629. !currentCity && city.push(cities.find(function (item) {return item.code === cityCode;}));
  11630. !currentProvince && province.push(provinces.find(function (item) {return item.code === provinceCode;}));
  11631. fragment = fragment.replace(_replaceName3, '');
  11632. return "break";
  11633. }
  11634. }
  11635. } else {
  11636. // 没有省市,区县市有可能重名,这里暂时不处理,因为概率极低,可以根据添加市解决
  11637. for (var _i6 = name.length; _i6 > 1; _i6--) {
  11638. var _replaceName4 = name.substring(0, _i6);
  11639. if (fragment.indexOf(_replaceName4) === 0) {
  11640. area.push(tempArea);
  11641. city.push(cities.find(function (item) {return item.code === cityCode;}));
  11642. province.push(provinces.find(function (item) {return item.code === provinceCode;}));
  11643. fragment = fragment.replace(_replaceName4, '');
  11644. break;
  11645. }
  11646. }
  11647. if (area.length > 0) {
  11648. return "break";
  11649. }
  11650. }};for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {var _ret2 = _loop2();if (_ret2 === "break") break;
  11651. }
  11652. // 解析完省市区如果还存在地址,则默认为详细地址
  11653. } catch (err) {_iterator3.e(err);} finally {_iterator3.f();}if (fragment.length > 0) {
  11654. detail.push(fragment);
  11655. }
  11656. return {
  11657. province: province,
  11658. city: city,
  11659. area: area,
  11660. detail: detail };
  11661. };
  11662. /**
  11663. * 匹配电话
  11664. * @param address
  11665. * @returns {{address: *, phone: string}}
  11666. */
  11667. var filterPhone = function filterPhone(address) {
  11668. var phone = '';
  11669. // 整理电话格式
  11670. address = address.replace(/(\d{3})-(\d{4})-(\d{4})/g, '$1$2$3');
  11671. address = address.replace(/(\d{3}) (\d{4}) (\d{4})/g, '$1$2$3');
  11672. address = address.replace(/(\d{4}) \d{4} \d{4}/g, '$1$2$3');
  11673. address = address.replace(/(\d{4})/g, '$1');
  11674. var mobileReg = /(\d{7,12})|(\d{3,4}-\d{6,8})|(86-[1][0-9]{10})|(86[1][0-9]{10})|([1][0-9]{10})/g;
  11675. var mobile = mobileReg.exec(address);
  11676. if (mobile) {
  11677. phone = mobile[0];
  11678. address = address.replace(mobile[0], ' ');
  11679. }
  11680. return { address: address, phone: phone };
  11681. };
  11682. /**
  11683. * 匹配邮编
  11684. * @param address
  11685. * @returns {{address: *, postalCode: string}}
  11686. */
  11687. var filterPostalCode = function filterPostalCode(address) {
  11688. var postalCode = '';
  11689. var postalCodeReg = /\d{6}/g;
  11690. var code = postalCodeReg.exec(address);
  11691. if (code) {
  11692. postalCode = code[0];
  11693. address = address.replace(code[0], ' ');
  11694. }
  11695. return { address: address, postalCode: postalCode };
  11696. };
  11697. /**
  11698. * 地址清洗
  11699. * @param address
  11700. * @returns {*}
  11701. */
  11702. var cleanAddress = function cleanAddress(address) {var textFilter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  11703. // 去换行等
  11704. address = address.
  11705. replace(/\r\n/g, ' ').
  11706. replace(/\n/g, ' ').
  11707. replace(/\t/g, ' ');
  11708. // 自定义去除关键字,可自行添加
  11709. var search = [
  11710. '详细地址',
  11711. '收货地址',
  11712. '收件地址',
  11713. '地址',
  11714. '所在地区',
  11715. '地区',
  11716. '姓名',
  11717. '收货人',
  11718. '收件人',
  11719. '联系人',
  11720. '收',
  11721. '邮编',
  11722. '联系电话',
  11723. '电话',
  11724. '联系人手机号码',
  11725. '手机号码',
  11726. '手机号'].
  11727. concat(textFilter);
  11728. search.forEach(function (str) {
  11729. address = address.replace(new RegExp(str, 'g'), ' ');
  11730. });
  11731. var pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\]\.<>/?~!@#¥……&*()——|{}【】‘;:”“’。,、?]", 'g');
  11732. address = address.replace(pattern, ' ');
  11733. // 多个空格replace为一个
  11734. address = address.replace(/ {2,}/g, ' ');
  11735. return address;
  11736. };var _default =
  11737. AddressParse;exports.default = _default;
  11738. /***/ }),
  11739. /***/ 39:
  11740. /*!**********************************************************!*\
  11741. !*** C:/Users/Admin/Desktop/商城/store/modules/iphoneX.js ***!
  11742. \**********************************************************/
  11743. /*! no static exports found */
  11744. /***/ (function(module, exports, __webpack_require__) {
  11745. "use strict";
  11746. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var state = {
  11747. emptyHeight: 0,
  11748. botNavHei: 110,
  11749. XBoolean: false };
  11750. var getters = {
  11751. getBoolEmpty: function getBoolEmpty(state) {
  11752. return {
  11753. emptyHeight: state.emptyHeight,
  11754. XBoolean: state.XBoolean };
  11755. },
  11756. getNavHei: function getNavHei(state) {
  11757. return state.botNavHei;
  11758. },
  11759. getBotHeight: function getBotHeight(state) {
  11760. return state.emptyHeight + state.botNavHei;
  11761. },
  11762. getAll: function getAll(state) {
  11763. return state;
  11764. },
  11765. getEmpty: function getEmpty(state) {
  11766. return state.emptyHeight;
  11767. } };
  11768. var mutations = {
  11769. setXBoolean: function setXBoolean(state, data) {
  11770. state.XBoolean = data;
  11771. },
  11772. setEmptyHeight: function setEmptyHeight(state, data) {
  11773. state.emptyHeight = data;
  11774. } };
  11775. var actions = {
  11776. setIphone: function setIphone(content, data) {
  11777. if (data.model.indexOf('iPhone X') > -1 || data.model.indexOf('iPhone12') > -1 || data.model.indexOf('iPhone 11') > -1) {
  11778. content.commit('setXBoolean', true);
  11779. content.commit('setEmptyHeight', 50);
  11780. }
  11781. } };var _default =
  11782. {
  11783. namespaced: true,
  11784. state: state,
  11785. getters: getters,
  11786. mutations: mutations,
  11787. actions: actions };exports.default = _default;
  11788. /***/ }),
  11789. /***/ 4:
  11790. /*!********************************************!*\
  11791. !*** C:/Users/Admin/Desktop/商城/pages.json ***!
  11792. \********************************************/
  11793. /*! no static exports found */
  11794. /***/ (function(module, exports) {
  11795. /***/ }),
  11796. /***/ 40:
  11797. /*!*******************************************************!*\
  11798. !*** C:/Users/Admin/Desktop/商城/store/modules/gift.js ***!
  11799. \*******************************************************/
  11800. /*! no static exports found */
  11801. /***/ (function(module, exports, __webpack_require__) {
  11802. "use strict";
  11803. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _request = _interopRequireDefault(__webpack_require__(/*! ../../core/request.js */ 15));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  11804. var state = {
  11805. theme: '',
  11806. address_id: '',
  11807. store_id: '',
  11808. form_data: {},
  11809. big_gift_pic: '' };
  11810. var getters = {};
  11811. var mutations = {
  11812. addressId: function addressId(state, data) {
  11813. state.address_id = data;
  11814. },
  11815. storeId: function storeId(state, data) {
  11816. state.store_id = data;
  11817. },
  11818. setGiftPic: function setGiftPic(state, data) {
  11819. state.big_gift_pic = data;
  11820. },
  11821. setTheme: function setTheme(state, data) {
  11822. switch (data) {
  11823. case 1:
  11824. state.theme = 'streamer-gold-gift';
  11825. break;
  11826. case 2:
  11827. state.theme = 'romantic-powder-gift';
  11828. break;
  11829. case 3:
  11830. state.theme = 'taste-red-gift';
  11831. break;
  11832. case 4:
  11833. state.theme = 'elegant-purple-gift';
  11834. break;
  11835. case 5:
  11836. state.theme = 'fresh-green-gift';
  11837. break;
  11838. case 6:
  11839. state.theme = 'business-blue-gift';
  11840. break;
  11841. default:
  11842. state.theme = 'streamer-gold-gift';}
  11843. },
  11844. setFormData: function setFormData(state, data) {
  11845. state.form_data = data;
  11846. } };
  11847. var actions = {
  11848. // 获取后台 Gift插件 参数配置
  11849. getConfig: function getConfig(content, data) {
  11850. // uni.showLoading({
  11851. // title: '加载中',
  11852. // });
  11853. (0, _request.default)({
  11854. url: data,
  11855. method: 'get' }).
  11856. then(function (res) {
  11857. uni.hideLoading();
  11858. if (res.code === 0) {
  11859. context.commit('setTheme', Number(res.data.theme.id));
  11860. // uni.setNavigationBarTitle({
  11861. // title: res.data.title,
  11862. // });
  11863. } else if (res.code === 1) {
  11864. console.log(res);
  11865. }
  11866. }).catch(function () {
  11867. uni.hideLoading();
  11868. });
  11869. } };var _default =
  11870. {
  11871. namespaced: true,
  11872. state: state,
  11873. getters: getters,
  11874. mutations: mutations,
  11875. actions: actions };exports.default = _default;
  11876. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  11877. /***/ }),
  11878. /***/ 41:
  11879. /*!********************************************!*\
  11880. !*** C:/Users/Admin/Desktop/商城/version.js ***!
  11881. \********************************************/
  11882. /*! no static exports found */
  11883. /***/ (function(module, exports) {
  11884. module.exports = '4.2.60';
  11885. /***/ }),
  11886. /***/ 42:
  11887. /*!******************************************!*\
  11888. !*** C:/Users/Admin/Desktop/商城/uni.scss ***!
  11889. \******************************************/
  11890. /*! no static exports found */
  11891. /***/ (function(module, exports, __webpack_require__) {
  11892. // extracted by mini-css-extract-plugin
  11893. if(false) { var cssReload; }
  11894. /***/ }),
  11895. /***/ 43:
  11896. /*!*****************************************************!*\
  11897. !*** C:/Users/Admin/Desktop/商城/core/showLoading.js ***!
  11898. \*****************************************************/
  11899. /*! no static exports found */
  11900. /***/ (function(module, exports, __webpack_require__) {
  11901. "use strict";
  11902. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _regenerator = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@vue/babel-preset-app/node_modules/@babel/runtime/regenerator */ 16));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);});};}var showLoading = /*#__PURE__*/function () {var _ref = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee(args) {var defaultArgs;return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:
  11903. defaultArgs = {
  11904. type: 'global',
  11905. text: '加载中',
  11906. color: '#ffffff',
  11907. backgroundImage: '' };
  11908. args = Object.assign(defaultArgs, args);
  11909. args.isShow = true;
  11910. this.$store.dispatch('loading/actionGetLoading', args);case 4:case "end":return _context.stop();}}}, _callee, this);}));return function showLoading(_x) {return _ref.apply(this, arguments);};}();var _default =
  11911. showLoading;exports.default = _default;
  11912. /***/ }),
  11913. /***/ 44:
  11914. /*!*****************************************************!*\
  11915. !*** C:/Users/Admin/Desktop/商城/core/hideLoading.js ***!
  11916. \*****************************************************/
  11917. /*! no static exports found */
  11918. /***/ (function(module, exports, __webpack_require__) {
  11919. "use strict";
  11920. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _regenerator = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@vue/babel-preset-app/node_modules/@babel/runtime/regenerator */ 16));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);});};}var hideLoading = /*#__PURE__*/function () {var _ref = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee(args) {return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:
  11921. args = args || {};
  11922. args.isShow = false;
  11923. this.$store.dispatch('loading/actionGetLoading', args);case 3:case "end":return _context.stop();}}}, _callee, this);}));return function hideLoading(_x) {return _ref.apply(this, arguments);};}();var _default =
  11924. hideLoading;exports.default = _default;
  11925. /***/ }),
  11926. /***/ 45:
  11927. /*!**************************************************!*\
  11928. !*** C:/Users/Admin/Desktop/商城/core/platDiff.js ***!
  11929. \**************************************************/
  11930. /*! no static exports found */
  11931. /***/ (function(module, exports, __webpack_require__) {
  11932. "use strict";
  11933. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var utils = _interopRequireWildcard(__webpack_require__(/*! ./utils.js */ 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;}var _default =
  11934. {
  11935. // 获取不带options的路由
  11936. route: function route() {var page = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  11937. if (!page) {
  11938. var pages = getCurrentPages();
  11939. if (pages.length) {
  11940. page = pages[pages.length - 1];
  11941. }
  11942. }
  11943. var route = '';
  11944. route = "/".concat(page.route.split('?')[0]);
  11945. return route;
  11946. },
  11947. // 获取带options的路由
  11948. routeWithOption: function routeWithOption() {var page = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  11949. if (!page) {
  11950. var pages = getCurrentPages();
  11951. if (pages.length) {
  11952. page = pages[pages.length - 1];
  11953. }
  11954. }
  11955. var route = '';
  11956. route = "/".concat(page.route.split('?')[0]);
  11957. if (page.options) {
  11958. route += '?' + utils.objectToUrlParams(page.options);
  11959. }
  11960. return route;
  11961. },
  11962. // 获取带options(去除某些特定参数的)的路由 page_count--created时总页面数量
  11963. tabBarUrl: function tabBarUrl() {var page = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;var page_count = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  11964. if (!page) {
  11965. var pages = getCurrentPages();
  11966. if (pages.length) {
  11967. var diff = pages.length - page_count > 0 && page_count > 0 ? pages.length - page_count : 0;
  11968. page = pages[pages.length - 1 - diff];
  11969. }
  11970. }
  11971. var route = '';
  11972. route = "/".concat(page.route.split('?')[0]);
  11973. if (page.options) {
  11974. var params = {};
  11975. for (var key in page.options) {
  11976. if (!(key == 'user_id' || key == 'scene' || key == 'params' || key == 'first_id' || key == 'select_cat_id' || key == 'path' ||
  11977. key == 'share_openid' || key == 'custom_params' || key == 'room_id' || key == 'openid')) {
  11978. if (key == 'page_id') {
  11979. if (page.options[key] > 0) {
  11980. params[key] = page.options[key];
  11981. }
  11982. } else {
  11983. params[key] = page.options[key];
  11984. }
  11985. }
  11986. }
  11987. params = utils.objectToUrlParams(params);
  11988. if (params) {
  11989. route += '?' + params;
  11990. }
  11991. }
  11992. console.log(route);
  11993. return route;
  11994. } };exports.default = _default;
  11995. /***/ }),
  11996. /***/ 46:
  11997. /*!*********************************************************!*\
  11998. !*** C:/Users/Admin/Desktop/商城/core/lazyLoadingData.js ***!
  11999. \*********************************************************/
  12000. /*! no static exports found */
  12001. /***/ (function(module, exports, __webpack_require__) {
  12002. "use strict";
  12003. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var lazyLoadingData = function lazyLoadingData(element) {var _this = this;
  12004. return new Promise(function (resolve, reject) {
  12005. try {
  12006. var query = null;
  12007. query = _this.createSelectorQuery();
  12008. query.select(".".concat(element)).boundingClientRect();
  12009. query.exec(function (res) {
  12010. resolve(res);
  12011. });
  12012. } catch (err) {
  12013. reject(err);
  12014. }
  12015. });
  12016. };var _default =
  12017. lazyLoadingData;exports.default = _default;
  12018. /***/ }),
  12019. /***/ 47:
  12020. /*!**********************************************!*\
  12021. !*** C:/Users/Admin/Desktop/商城/core/jump.js ***!
  12022. \**********************************************/
  12023. /*! no static exports found */
  12024. /***/ (function(module, exports, __webpack_require__) {
  12025. "use strict";
  12026. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;
  12027. var _formId = __webpack_require__(/*! ./formId.js */ 19);
  12028. var _cache = __webpack_require__(/*! ./cache.js */ 21);
  12029. var jump = function jump(data) {
  12030. if (data.form) (0, _formId.push)(data.e.detail.formId);
  12031. switch (data.open_type) {
  12032. case 'redirect':
  12033. uni.redirectTo({
  12034. url: data.url });
  12035. break;
  12036. case 'navigate':
  12037. console.log(data.url);
  12038. uni.navigateTo({
  12039. url: data.url });
  12040. break;
  12041. case 'app_admin':
  12042. if (data.$store.state.user.info.identity.is_admin == 1) {
  12043. uni.navigateTo({
  12044. url: data.url });
  12045. }
  12046. break;
  12047. case 'tel':
  12048. if (data.params) {
  12049. uni.makePhoneCall({
  12050. phoneNumber: data.params[0].value });
  12051. } else if (data.number) {
  12052. uni.makePhoneCall({
  12053. phoneNumber: data.number });
  12054. }
  12055. break;
  12056. case 'web':
  12057. uni.navigateTo({
  12058. url: data.url });
  12059. break;
  12060. case 'app':
  12061. if (data.url) {
  12062. var originalPath = data.url.split('?')[1];
  12063. uni.navigateToMiniProgram({
  12064. appId: originalPath.slice(0, 25).split('=')[1],
  12065. path: originalPath.slice(originalPath.indexOf('&') + 1, originalPath.length).split('=')[1],
  12066. success: function success(res) {
  12067. console.log(res);
  12068. },
  12069. fail: function fail(res) {
  12070. console.log(res);
  12071. } });
  12072. } else if (data.appId) {
  12073. uni.navigateToMiniProgram({
  12074. appId: data.appId,
  12075. success: function success(res) {
  12076. console.log(res);
  12077. },
  12078. fail: function fail(res) {
  12079. console.log(res);
  12080. } });
  12081. }
  12082. break;
  12083. case 'clear_cache':
  12084. (0, _cache.clearStorage)();
  12085. break;
  12086. case 'map':
  12087. uni.openLocation({
  12088. latitude: Number(data.latitude),
  12089. longitude: Number(data.longitude),
  12090. name: data.address,
  12091. success: function success() {
  12092. console.log('success');
  12093. } });
  12094. break;
  12095. case 'reload':
  12096. uni.redirectTo({
  12097. url: this.$platDiff.routeWithOption() });
  12098. break;}
  12099. };var _default =
  12100. jump;exports.default = _default;
  12101. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  12102. /***/ }),
  12103. /***/ 48:
  12104. /*!*************************************************!*\
  12105. !*** C:/Users/Admin/Desktop/商城/core/popupAd.js ***!
  12106. \*************************************************/
  12107. /*! no static exports found */
  12108. /***/ (function(module, exports, __webpack_require__) {
  12109. "use strict";
  12110. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  12111. list: {},
  12112. show: null,
  12113. first: {},
  12114. is_storage: false,
  12115. setList: function setList(mark) {
  12116. if (typeof this.list[mark] === 'undefined') {
  12117. this.list[mark] = true;
  12118. }
  12119. } };exports.default = _default;
  12120. /***/ }),
  12121. /***/ 49:
  12122. /*!*********************************************************!*\
  12123. !*** C:/Users/Admin/Desktop/商城/core/shareAppMessage.js ***!
  12124. \*********************************************************/
  12125. /*! no static exports found */
  12126. /***/ (function(module, exports, __webpack_require__) {
  12127. "use strict";
  12128. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _utils = __webpack_require__(/*! ./utils */ 20);
  12129. var _request = _interopRequireDefault(__webpack_require__(/*! ../core/request.js */ 15));
  12130. var _appOnLaunch = _interopRequireDefault(__webpack_require__(/*! ../core/appOnLaunch.js */ 24));
  12131. var _index = _interopRequireDefault(__webpack_require__(/*! ../store/index.js */ 11));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  12132. var shareAppMessage = function shareAppMessage(args) {
  12133. console.log(args);
  12134. args = args || {
  12135. title: '这是一个分享页面',
  12136. path: '/pages/index/index',
  12137. params: {} };
  12138. if (typeof args.params === 'undefined') {
  12139. args.params = {};
  12140. }
  12141. var user_id = 0;
  12142. if (this.$user.isLogin() && this.$store.state.user.info) {
  12143. user_id = this.$store.state.user.info.options.user_id;
  12144. }
  12145. if (typeof args.path === 'undefined' || args.path === '/pages/index/index' && typeof args.params.page_id === 'undefined') {
  12146. args.path = "/pages/index/index?user_id=".concat(user_id);
  12147. if (Object.keys(args.params).length != 0) {
  12148. args.path += "&" + (0, _utils.objectToUrlParams)(args.params);
  12149. }
  12150. } else {
  12151. args.params.path = args.path;
  12152. args.params.user_id = user_id;
  12153. args.path = "/pages/index/index?scene=share&user_id=".concat(user_id, "&params=").concat(JSON.stringify(args.params));
  12154. }
  12155. setTimeout(function () {
  12156. (0, _request.default)({
  12157. url: _appOnLaunch.default.coupon.share_coupon }).
  12158. then(function (response) {
  12159. if (response.code === 0) {
  12160. var coupon = {
  12161. list: response.data.list,
  12162. type: 'share' };
  12163. _index.default.dispatch('page/actionSetCoupon', coupon);
  12164. }
  12165. }).catch(function (e) {
  12166. });
  12167. }, 1000);
  12168. console.log(args);
  12169. return args;
  12170. };var _default =
  12171. shareAppMessage;exports.default = _default;
  12172. /***/ }),
  12173. /***/ 50:
  12174. /*!***************************************************!*\
  12175. !*** C:/Users/Admin/Desktop/商城/core/subscribe.js ***!
  12176. \***************************************************/
  12177. /*! no static exports found */
  12178. /***/ (function(module, exports, __webpack_require__) {
  12179. "use strict";
  12180. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var subscribe = function subscribe(templateId) {
  12181. return new Promise(function (resolve, reject) {
  12182. if (wx.requestSubscribeMessage) {
  12183. wx.requestSubscribeMessage({
  12184. tmplIds: templateId,
  12185. success: function success(res) {
  12186. resolve(res);
  12187. },
  12188. fail: function fail(res) {
  12189. reject(res);
  12190. } });
  12191. } else {
  12192. uni.showModal({
  12193. title: '提示',
  12194. content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。',
  12195. showCancel: false,
  12196. success: function success(res) {
  12197. reject({});
  12198. } });
  12199. }
  12200. });
  12201. };var _default =
  12202. subscribe;exports.default = _default;
  12203. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  12204. /***/ }),
  12205. /***/ 610:
  12206. /*!*********************************************************************!*\
  12207. !*** C:/Users/Admin/Desktop/商城/components/u-charts/u-charts.min.js ***!
  12208. \*********************************************************************/
  12209. /*! no static exports found */
  12210. /***/ (function(module, exports, __webpack_require__) {
  12211. "use strict";
  12212. /* WEBPACK VAR INJECTION */(function(uni) {var config = { yAxisWidth: 15, yAxisSplit: 5, xAxisHeight: 15, xAxisLineHeight: 15, legendHeight: 15, yAxisTitleWidth: 15, padding: [10, 10, 10, 10], pixelRatio: 1, rotate: !1, columePadding: 3, fontSize: 13, dataPointShape: ["circle", "circle", "circle", "circle"], colors: ["#1890ff", "#2fc25b", "#facc14", "#f04864", "#8543e0", "#90ed7d"], pieChartLinePadding: 15, pieChartTextPadding: 5, xAxisTextPadding: 3, titleColor: "#333333", titleFontSize: 20, subtitleColor: "#999999", subtitleFontSize: 15, toolTipPadding: 3, toolTipBackground: "#000000", toolTipOpacity: .7, toolTipLineHeight: 20, radarGridCount: 3, radarLabelTextMargin: 15, gaugeLabelTextMargin: 15 };var assign = Object.assign ? Object.assign : function (e) {if (null == e) throw new TypeError("Cannot convert undefined or null to object");for (var t, i = Object(e), a = 1; a < arguments.length; a++) {if (t = arguments[a], null != t) for (var o in t) {Object.prototype.hasOwnProperty.call(t, o) && (i[o] = t[o]);}}return i;};var util = { toFixed: function toFixed(e, t) {return t = t || 2, this.isFloat(e) && (e = e.toFixed(t)), e;}, isFloat: function isFloat(e) {return 0 != e % 1;}, approximatelyEqual: function approximatelyEqual(e, t) {return 1e-10 > Math.abs(e - t);}, isSameSign: function isSameSign(e, t) {var i = Math.abs;return i(e) === e && i(t) === t || i(e) !== e && i(t) !== t;}, isSameXCoordinateArea: function isSameXCoordinateArea(e, t) {return this.isSameSign(e.x, t.x);}, isCollision: function isCollision(e, t) {e.end = {}, e.end.x = e.start.x + e.width, e.end.y = e.start.y - e.height, t.end = {}, t.end.x = t.start.x + t.width, t.end.y = t.start.y - t.height;var i = t.start.x > e.end.x || t.end.x < e.start.x || t.end.y > e.start.y || t.start.y < e.end.y;return !i;} };function getH5Offset(t) {return t.mp = { changedTouches: [] }, t.mp.changedTouches.push({ x: t.offsetX, y: t.offsetY }), t;}function hexToRgb(e, t) {var i = /^#?([a-f\d])([a-f\d])([a-f\d])$/i,a = e.replace(i, function (e, t, i, a) {return t + t + i + i + a + a;}),o = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a),n = parseInt(o[1], 16),l = parseInt(o[2], 16),r = parseInt(o[3], 16);return "rgba(" + n + "," + l + "," + r + "," + t + ")";}function findRange(e, t, i) {if (isNaN(e)) throw new Error("[uCharts] unvalid series data!");i = i || 10, t = t ? t : "upper";for (var a = 1; 1 > i;) {i *= 10, a *= 10;}for (e = "upper" === t ? Math.ceil(e * a) : Math.floor(e * a); 0 != e % i;) {"upper" === t ? e++ : e--;}return e / a;}function calCandleMA(e, t, i, a) {var o = [];for (var n, l = 0; l < e.length; l++) {n = { data: [], name: t[l], color: i[l] };for (var _t = 0, _i = a.length; _t < _i; _t++) {if (_t < e[l]) {n.data.push(null);continue;}var _i2 = 0;for (var _o = 0; _o < e[l]; _o++) {_i2 += a[_t - _o][1];}n.data.push(+(_i2 / e[l]).toFixed(3));}o.push(n);}return o;}function calValidDistance(e, t, i, a, o) {var n = o.width - o.area[1] - o.area[3],l = i.eachSpacing * (o.chartData.xAxisData.xAxisPoints.length - 1),r = t;return 0 <= t ? (r = 0, e.event.trigger("scrollLeft")) : Math.abs(t) >= l - n && (r = n - l, e.event.trigger("scrollRight")), r;}function isInAngleRange(e, t, i) {function a(e) {for (; 0 > e;) {e += 2 * o;}for (; e > 2 * o;) {e -= 2 * o;}return e;}var o = Math.PI;return e = a(e), t = a(t), i = a(i), t > i && (i += 2 * o, e < t && (e += 2 * o)), e >= t && e <= i;}function calRotateTranslate(e, t, i) {var a = e,o = i - t,n = a + (i - o - a) / 1.4142135623730951;n *= -1;return { transX: n, transY: (i - o) * (1.4142135623730951 - 1) - (i - o - a) / 1.4142135623730951 };}function createCurveControlPoints(e, t) {function i(e, t) {return !!(e[t - 1] && e[t + 1]) && (e[t].y >= Math.max(e[t - 1].y, e[t + 1].y) || e[t].y <= Math.min(e[t - 1].y, e[t + 1].y));}var o = .2,a = .2,n = null,l = null,r = null,s = null;if (1 > t ? (n = e[0].x + (e[1].x - e[0].x) * o, l = e[0].y + (e[1].y - e[0].y) * o) : (n = e[t].x + (e[t + 1].x - e[t - 1].x) * o, l = e[t].y + (e[t + 1].y - e[t - 1].y) * o), t > e.length - 3) {var d = e.length - 1;r = e[d].x - (e[d].x - e[d - 1].x) * a, s = e[d].y - (e[d].y - e[d - 1].y) * a;} else r = e[t + 1].x - (e[t + 2].x - e[t].x) * a, s = e[t + 1].y - (e[t + 2].y - e[t].y) * a;return i(e, t + 1) && (s = e[t + 1].y), i(e, t) && (l = e[t].y), { ctrA: { x: n, y: l }, ctrB: { x: r, y: s } };}function convertCoordinateOrigin(e, t, i) {return { x: i.x + e, y: i.y - t };}function avoidCollision(e, t) {if (t) for (; util.isCollision(e, t);) {0 < e.start.x ? e.start.y-- : 0 > e.start.x ? e.start.y++ : 0 < e.start.y ? e.start.y++ : e.start.y--;}return e;}function fillSeries(e, t, i) {var a = 0;return e.map(function (e) {if (e.color || (e.color = i.colors[a], a = (a + 1) % i.colors.length), e.index || (e.index = 0), e.type || (e.type = t.type), "undefined" == typeof e.show && (e.show = !0), e.type || (e.type = t.type), e.pointShape || (e.pointShape = "circle"), !e.legendShape) switch (e.type) {case "line":e.legendShape = "line";break;case "column":e.legendShape = "rect";break;case "area":e.legendShape = "triangle";break;default:e.legendShape = "circle";}return e;});}function getDataRange(e, t) {var i = 0,a = t - e;return i = 1e4 <= a ? 1e3 : 1e3 <= a ? 100 : 100 <= a ? 10 : 10 <= a ? 5 : 1 <= a ? 1 : .1 <= a ? .1 : .01 <= a ? .01 : .001 <= a ? .001 : 1e-4 <= a ? 1e-4 : 1e-5 <= a ? 1e-5 : 1e-6, { minRange: findRange(e, "lower", i), maxRange: findRange(t, "upper", i) };}function measureText(e) {var t = 1 < arguments.length && arguments[1] !== void 0 ? arguments[1] : config.fontSize;e = e + "";var e = e.split(""),a = 0;for (var _t2, o = 0; o < e.length; o++) {_t2 = e[o], a += /[a-zA-Z]/.test(_t2) ? 7 : /[0-9]/.test(_t2) ? 5.5 : /\./.test(_t2) ? 2.7 : /-/.test(_t2) ? 3.25 : /[\u4e00-\u9fa5]/.test(_t2) ? 10 : /\(|\)/.test(_t2) ? 3.73 : /\s/.test(_t2) ? 2.5 : /%/.test(_t2) ? 8 : 10;}return a * t / 10;}function dataCombine(e) {return e.reduce(function (e, t) {return (e.data ? e.data : e).concat(t.data);}, []);}function dataCombineStack(e, t) {for (var o = Array(t), a = 0; a < o.length; a++) {o[a] = 0;}for (var n = 0; n < e.length; n++) {for (var a = 0; a < o.length; a++) {o[a] += e[n].data[a];}}return e.reduce(function (e, t) {return (e.data ? e.data : e).concat(t.data).concat(o);}, []);}function getTouches(t, i, a) {var e, o;return t.clientX ? i.rotate ? (o = i.height - t.clientX * i.pixelRatio, e = (t.pageY - a.currentTarget.offsetTop - i.height / i.pixelRatio / 2 * (i.pixelRatio - 1)) * i.pixelRatio) : (e = t.clientX * i.pixelRatio, o = (t.pageY - a.currentTarget.offsetTop - i.height / i.pixelRatio / 2 * (i.pixelRatio - 1)) * i.pixelRatio) : i.rotate ? (o = i.height - t.x * i.pixelRatio, e = t.y * i.pixelRatio) : (e = t.x * i.pixelRatio, o = t.y * i.pixelRatio), { x: e, y: o };}function getSeriesDataItem(e, t) {var i = [];for (var a, o = 0; o < e.length; o++) {if (a = e[o], null !== a.data[t] && "undefined" != typeof a.data[t] && a.show) {var _e = {};_e.color = a.color, _e.type = a.type, _e.style = a.style, _e.pointShape = a.pointShape, _e.disableLegend = a.disableLegend, _e.name = a.name, _e.show = a.show, _e.data = a.format ? a.format(a.data[t]) : a.data[t], i.push(_e);}}return i;}function getMaxTextListLength(e) {var t = e.map(function (e) {return measureText(e);});return Math.max.apply(null, t);}function getRadarCoordinateSeries(e) {for (var t = Math.PI, a = [], o = 0; o < e; o++) {a.push(2 * t / e * o);}return a.map(function (e) {return -1 * e + t / 2;});}function getToolTipData(e, t, a, i) {var o = 4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : {},n = e.map(function (e) {return { text: o.format ? o.format(e, i[a]) : e.name + ": " + e.data, color: e.color };}),l = [],r = { x: 0, y: 0 };for (var _o2, _n = 0; _n < t.length; _n++) {_o2 = t[_n], "undefined" != typeof _o2[a] && null !== _o2[a] && l.push(_o2[a]);}for (var _o3, _n2 = 0; _n2 < l.length; _n2++) {_o3 = l[_n2], r.x = Math.round(_o3.x), r.y += _o3.y;}return r.y /= l.length, { textList: n, offset: r };}function getMixToolTipData(e, t, a, i) {var o = 4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : {},n = e.map(function (e) {return { text: o.format ? o.format(e, i[a]) : e.name + ": " + e.data, color: e.color, disableLegend: !!e.disableLegend };});n = n.filter(function (e) {if (!0 !== e.disableLegend) return e;});var l = [],r = { x: 0, y: 0 };for (var _o4, _n3 = 0; _n3 < t.length; _n3++) {_o4 = t[_n3], "undefined" != typeof _o4[a] && null !== _o4[a] && l.push(_o4[a]);}for (var _o5, _n4 = 0; _n4 < l.length; _n4++) {_o5 = l[_n4], r.x = Math.round(_o5.x), r.y += _o5.y;}return r.y /= l.length, { textList: n, offset: r };}function getCandleToolTipData(e, t, a, o, i, n) {6 < arguments.length && void 0 !== arguments[6] ? arguments[6] : {};var l = n.color.upFill,r = n.color.downFill,s = [l, l, r, l];var d = [];var h = { text: i[o], color: null };d.push(h), t.map(function (t) {0 == o && 0 > t.data[1] - t.data[0] ? s[1] = r : (t.data[0] < e[o - 1][1] && (s[0] = r), t.data[1] < t.data[0] && (s[1] = r), t.data[2] > e[o - 1][1] && (s[2] = l), t.data[3] < e[o - 1][1] && (s[3] = r));var i = { text: "\u5F00\u76D8\uFF1A" + t.data[0], color: s[0] },a = { text: "\u6536\u76D8\uFF1A" + t.data[1], color: s[1] },n = { text: "\u6700\u4F4E\uFF1A" + t.data[2], color: s[2] },h = { text: "\u6700\u9AD8\uFF1A" + t.data[3], color: s[3] };d.push(i, a, n, h);});var x = [],c = { x: 0, y: 0 };for (var _l, _r = 0; _r < a.length; _r++) {_l = a[_r], "undefined" != typeof _l[o] && null !== _l[o] && x.push(_l[o]);}return c.x = Math.round(x[0][0].x), { textList: d, offset: c };}function filterSeries(e) {var t = [];for (var a = 0; a < e.length; a++) {!0 == e[a].show && t.push(e[a]);}return t;}function findCurrentIndex(e, t, i, a) {var o = 4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : 0,n = -1,l = 0;return ("line" == i.type || "area" == i.type) && "justify" == i.xAxis.boundaryGap && (l = i.chartData.eachSpacing / 2), isInExactChartArea(e, i, a) && t.forEach(function (t, i) {e.x + o + l > t && (n = i);}), n;}function findLegendIndex(e, t) {var i = -1;if (isInExactLegendArea(e, t.area)) {var a = t.points,o = -1;for (var _t3, n = 0, l = a.length; n < l; n++) {_t3 = a[n];for (var _a = 0; _a < _t3.length; _a++) {o += 1;var _n5 = _t3[_a].area;if (e.x > _n5[0] && e.x < _n5[2] && e.y > _n5[1] && e.y < _n5[3]) {i = o;break;}}}return i;}return i;}function isInExactLegendArea(e, t) {return e.x > t.start.x && e.x < t.end.x && e.y > t.start.y && e.y < t.end.y;}function isInExactChartArea(e, t) {return e.x <= t.width - t.area[1] + 10 && e.x >= t.area[3] - 10 && e.y >= t.area[0] && e.y <= t.height - t.area[2];}function findRadarChartCurrentIndex(e, t, i) {var a = Math.PI,o = 2 * a / i,n = -1;if (isInExactPieChartArea(e, t.center, t.radius)) {var l = function l(e) {return 0 > e && (e += 2 * a), e > 2 * a && (e -= 2 * a), e;},r = Math.atan2(t.center.y - e.y, e.x - t.center.x);r = -1 * r, 0 > r && (r += 2 * a);var s = t.angleList.map(function (e) {return e = l(-1 * e), e;});s.forEach(function (e, t) {var i = l(e - o / 2),s = l(e + o / 2);s < i && (s += 2 * a), (r >= i && r <= s || r + 2 * a >= i && r + 2 * a <= s) && (n = t);});}return n;}function findFunnelChartCurrentIndex(e, t) {for (var a, o = -1, n = 0, l = t.series.length; n < l; n++) {if (a = t.series[n], e.x > a.funnelArea[0] && e.x < a.funnelArea[2] && e.y > a.funnelArea[1] && e.y < a.funnelArea[3]) {o = n;break;}}return o;}function findWordChartCurrentIndex(e, t) {for (var a, o = -1, n = 0, l = t.length; n < l; n++) {if (a = t[n], e.x > a.area[0] && e.x < a.area[2] && e.y > a.area[1] && e.y < a.area[3]) {o = n;break;}}return o;}function findMapChartCurrentIndex(e, t) {for (var a, o = -1, n = t.chartData.mapData, l = t.series, r = pointToCoordinate(e.y, e.x, n.bounds, n.scale, n.xoffset, n.yoffset), s = [r.x, r.y], d = 0, h = l.length; d < h; d++) {if (a = l[d].geometry.coordinates, isPoiWithinPoly(s, a)) {o = d;break;}}return o;}function findPieChartCurrentIndex(e, t) {var a = -1;if (isInExactPieChartArea(e, t.center, t.radius)) {var o = Math.atan2(t.center.y - e.y, e.x - t.center.x);o = -o;for (var n, l = 0, r = t.series.length; l < r; l++) {if (n = t.series[l], isInAngleRange(o, n._start_, n._start_ + 2 * n._proportion_ * Math.PI)) {a = l;break;}}}return a;}function isInExactPieChartArea(e, t, i) {var a = Math.pow;return a(e.x - t.x, 2) + a(e.y - t.y, 2) <= a(i, 2);}function splitPoints(e) {var t = [],i = [];return e.forEach(function (e) {null === e ? (i.length && t.push(i), i = []) : i.push(e);}), i.length && t.push(i), t;}function calLegendData(e, t, i, a) {var o = Math.max,n = Math.floor;var l = { area: { start: { x: 0, y: 0 }, end: { x: 0, y: 0 }, width: 0, height: 0, wholeWidth: 0, wholeHeight: 0 }, points: [], widthArr: [], heightArr: [] };if (!1 === t.legend.show) return a.legendData = l, l;var r = t.legend.padding,s = t.legend.margin,d = t.legend.fontSize,h = 15 * t.pixelRatio,x = 5 * t.pixelRatio,c = o(t.legend.lineHeight * t.pixelRatio, d);if ("top" == t.legend.position || "bottom" == t.legend.position) {var _a2 = [],_n6 = 0,p = [],g = [];for (var _o6 = 0; _o6 < e.length; _o6++) {var _i3 = e[_o6],_l2 = h + x + measureText(_i3.name || "undefined", d) + t.legend.itemGap;_n6 + _l2 > t.width - t.padding[1] - t.padding[3] ? (_a2.push(g), p.push(_n6 - t.legend.itemGap), _n6 = _l2, g = [_i3]) : (_n6 += _l2, g.push(_i3));}if (g.length) {_a2.push(g), p.push(_n6 - t.legend.itemGap), l.widthArr = p;var _e2 = o.apply(null, p);switch (t.legend.float) {case "left":l.area.start.x = t.padding[3], l.area.end.x = t.padding[3] + 2 * r;break;case "right":l.area.start.x = t.width - t.padding[1] - _e2 - 2 * r, l.area.end.x = t.width - t.padding[1];break;default:l.area.start.x = (t.width - _e2) / 2 - r, l.area.end.x = (t.width + _e2) / 2 + r;}l.area.width = _e2 + 2 * r, l.area.wholeWidth = _e2 + 2 * r, l.area.height = _a2.length * c + 2 * r, l.area.wholeHeight = _a2.length * c + 2 * r + 2 * s, l.points = _a2;}} else {var _i4 = e.length,_a3 = t.height - t.padding[0] - t.padding[2] - 2 * s - 2 * r,_o7 = Math.min(n(_a3 / c), _i4);switch (l.area.height = _o7 * c + 2 * r, l.area.wholeHeight = _o7 * c + 2 * r, t.legend.float) {case "top":l.area.start.y = t.padding[0] + s, l.area.end.y = t.padding[0] + s + l.area.height;break;case "bottom":l.area.start.y = t.height - t.padding[2] - s - l.area.height, l.area.end.y = t.height - t.padding[2] - s;break;default:l.area.start.y = (t.height - l.area.height) / 2, l.area.end.y = (t.height + l.area.height) / 2;}var _p = 0 == _i4 % _o7 ? _i4 / _o7 : n(_i4 / _o7 + 1),_g = [];for (var _t4, _a4 = 0; _a4 < _p; _a4++) {_t4 = e.slice(_a4 * _o7, _a4 * _o7 + _o7), _g.push(_t4);}if (l.points = _g, _g.length) {for (var _e4 = 0; _e4 < _g.length; _e4++) {var _i5 = _g[_e4],_a5 = 0;for (var _e5, _o8 = 0; _o8 < _i5.length; _o8++) {_e5 = h + x + measureText(_i5[_o8].name || "undefined", d) + t.legend.itemGap, _e5 > _a5 && (_a5 = _e5);}l.widthArr.push(_a5), l.heightArr.push(_i5.length * c + 2 * r);}var _e3 = 0;for (var _t5 = 0; _t5 < l.widthArr.length; _t5++) {_e3 += l.widthArr[_t5];}l.area.width = _e3 - t.legend.itemGap + 2 * r, l.area.wholeWidth = l.area.width + r;}}switch (t.legend.position) {case "top":l.area.start.y = t.padding[0] + s, l.area.end.y = t.padding[0] + s + l.area.height;break;case "bottom":l.area.start.y = t.height - t.padding[2] - l.area.height - s, l.area.end.y = t.height - t.padding[2] - s;break;case "left":l.area.start.x = t.padding[3], l.area.end.x = t.padding[3] + l.area.width;break;case "right":l.area.start.x = t.width - t.padding[1] - l.area.width, l.area.end.x = t.width - t.padding[1];}return a.legendData = l, l;}function calCategoriesData(e, t, i, a) {var o = { angle: 0, xAxisHeight: i.xAxisHeight },n = e.map(function (e) {return measureText(e);}),l = Math.max.apply(this, n);return !0 == t.xAxis.rotateLabel && l + 2 * i.xAxisTextPadding > a && (o.angle = 45 * Math.PI / 180, o.xAxisHeight = 2 * i.xAxisTextPadding + l * Math.sin(o.angle)), o;}function getRadarDataPoints(e, t, i, a, o) {var n = Math.max,l = 5 < arguments.length && void 0 !== arguments[5] ? arguments[5] : 1,r = o.extra.radar || {};r.max = r.max || 0;var s = n(r.max, n.apply(null, dataCombine(a))),d = [];var _loop = function _loop(_n7) {var o = a[_n7],r = {};r.color = o.color, r.legendShape = o.legendShape, r.pointShape = o.pointShape, r.data = [], o.data.forEach(function (a, o) {var n = {};n.angle = e[o], n.proportion = a / s, n.position = convertCoordinateOrigin(i * n.proportion * l * Math.cos(n.angle), i * n.proportion * l * Math.sin(n.angle), t), r.data.push(n);}), d.push(r);};for (var _n7 = 0; _n7 < a.length; _n7++) {_loop(_n7);}return d;}function getPieDataPoints(e, t) {var a = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : 1,o = 0,n = 0;for (var _a6, _n8 = 0; _n8 < e.length; _n8++) {_a6 = e[_n8], _a6.data = null === _a6.data ? 0 : _a6.data, o += _a6.data;}for (var _n9, l = 0; l < e.length; l++) {_n9 = e[l], _n9.data = null === _n9.data ? 0 : _n9.data, _n9._proportion_ = 0 === o ? 1 / e.length * a : _n9.data / o * a, _n9._radius_ = t;}for (var _a7, _o9 = 0; _o9 < e.length; _o9++) {_a7 = e[_o9], _a7._start_ = n, n += 2 * _a7._proportion_ * Math.PI;}return e;}function getFunnelDataPoints(e, t) {var a = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : 1;e = e.sort(function (e, t) {return parseInt(t.data) - parseInt(e.data);});for (var o = 0; o < e.length; o++) {e[o].radius = e[o].data / e[0].data * t * a, e[o]._proportion_ = e[o].data / e[0].data;}return e.reverse();}function getRoseDataPoints(e, t, a, o) {var n = 4 < arguments.length && arguments[4] !== void 0 ? arguments[4] : 1,l = 0,r = 0,s = [];for (var _n10, _r2 = 0; _r2 < e.length; _r2++) {_n10 = e[_r2], _n10.data = null === _n10.data ? 0 : _n10.data, l += _n10.data, s.push(_n10.data);}var d = Math.min.apply(null, s),h = Math.max.apply(null, s);for (var _r3, _s = 0; _s < e.length; _s++) {_r3 = e[_s], _r3.data = null === _r3.data ? 0 : _r3.data, 0 === l || "area" == t ? (_r3._proportion_ = _r3.data / l * n, _r3._rose_proportion_ = 1 / e.length * n) : (_r3._proportion_ = _r3.data / l * n, _r3._rose_proportion_ = _r3.data / l * n), _r3._radius_ = a + (o - a) * ((_r3.data - d) / (h - d));}for (var _n11, _l3 = 0; _l3 < e.length; _l3++) {_n11 = e[_l3], _n11._start_ = r, r += 2 * _n11._rose_proportion_ * Math.PI;}return e;}function getArcbarDataPoints(e, t) {var a = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : 1;1 == a && (a = .999999);for (var o, n = 0; n < e.length; n++) {o = e[n], o.data = null === o.data ? 0 : o.data;var i = void 0;i = "circle" == t.type ? 2 : t.endAngle < t.startAngle ? 2 + t.endAngle - t.startAngle : t.startAngle - t.endAngle, o._proportion_ = i * o.data * a + t.startAngle, 2 <= o._proportion_ && (o._proportion_ %= 2);}return e;}function getGaugeAxisPoints(e, t, a) {var o = t;for (var n = 0; n < e.length; n++) {e[n].value = null === e[n].value ? 0 : e[n].value, e[n]._startAngle_ = o, e[n]._endAngle_ = (t - a + 1) * e[n].value + t, 2 <= e[n]._endAngle_ && (e[n]._endAngle_ %= 2), o = e[n]._endAngle_;}return e;}function getGaugeDataPoints(e, t, a) {var o = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : 1;for (var n, l = 0; l < e.length; l++) {if (n = e[l], n.data = null === n.data ? 0 : n.data, "auto" == a.pointer.color) {for (var _e6 = 0; _e6 < t.length; _e6++) {if (n.data <= t[_e6].value) {n.color = t[_e6].color;break;}}} else n.color = a.pointer.color;var i = a.startAngle - a.endAngle + 1;n._endAngle_ = i * n.data + a.startAngle, n._oldAngle_ = a.oldAngle, a.oldAngle < a.endAngle && (n._oldAngle_ += 2), n._proportion_ = n.data >= a.oldData ? (n._endAngle_ - n._oldAngle_) * o + a.oldAngle : n._oldAngle_ - (n._oldAngle_ - n._endAngle_) * o, 2 <= n._proportion_ && (n._proportion_ %= 2);}return e;}function getPieTextMaxLength(e) {e = getPieDataPoints(e);var t = 0;for (var a = 0; a < e.length; a++) {var i = e[a],o = i.format ? i.format(+i._proportion_.toFixed(2)) : util.toFixed(100 * i._proportion_) + "%";t = Math.max(t, measureText(o));}return t;}function fixColumeData(e, t, i, a, o, n) {return e.map(function (e) {return null === e ? null : (e.width = Math.ceil((t - 2 * o.columePadding) / i), n.extra.column && n.extra.column.width && 0 < +n.extra.column.width && (e.width = Math.min(e.width, +n.extra.column.width)), 0 >= e.width && (e.width = 1), e.x += (a + .5 - i / 2) * e.width, e);});}function fixColumeMeterData(e, t, i, a, o, n, l) {return e.map(function (e) {return null === e ? null : (e.width = Math.ceil((t - 2 * o.columePadding) / 2), n.extra.column && n.extra.column.width && 0 < +n.extra.column.width && (e.width = Math.min(e.width, +n.extra.column.width)), 0 < a && (e.width -= 2 * l), e);});}function fixColumeStackData(e, t, i, a, o, n) {return e.map(function (e) {return null === e ? null : (e.width = Math.ceil((t - 2 * o.columePadding) / 2), n.extra.column && n.extra.column.width && 0 < +n.extra.column.width && (e.width = Math.min(e.width, +n.extra.column.width)), e);});}function getXAxisPoints(e, t) {var i = t.width - t.area[1] - t.area[3],a = t.enableScroll ? Math.min(t.xAxis.itemCount, e.length) : e.length;("line" == t.type || "area" == t.type) && 1 < a && "justify" == t.xAxis.boundaryGap && (a -= 1);var o = i / a,n = [],l = t.area[3],r = t.width - t.area[1];return e.forEach(function (e, t) {n.push(l + t * o);}), "justify" !== t.xAxis.boundaryGap && (!0 === t.enableScroll ? n.push(l + e.length * o) : n.push(r)), { xAxisPoints: n, startX: l, endX: r, eachSpacing: o };}function getCandleDataPoints(e, t, i, a, o, n) {var l = Math.round,r = 7 < arguments.length && void 0 !== arguments[7] ? arguments[7] : 1,s = [],d = n.height - n.area[0] - n.area[2];return e.forEach(function (e, h) {if (null === e) s.push(null);else {var x = [];e.forEach(function (e) {var s = { x: a[h] + l(o / 2) },c = e.value || e,p = d * (c - t) / (i - t);p *= r, s.y = n.height - l(p) - n.area[2], x.push(s);}), s.push(x);}}), s;}function getDataPoints(e, t, i, a, o, n) {var l = Math.round,r = 7 < arguments.length && void 0 !== arguments[7] ? arguments[7] : 1,s = "center";("line" == n.type || "area" == n.type) && (s = n.xAxis.boundaryGap);var d = [],h = n.height - n.area[0] - n.area[2];return e.forEach(function (e, x) {if (null === e) d.push(null);else {var c = {};c.color = e.color, c.x = a[x], "center" == s && (c.x += l(o / 2));var p = e;"object" == typeof e && null != e && (p = e.value);var g = h * (p - t) / (i - t);g *= r, c.y = n.height - l(g) - n.area[2], d.push(c);}}), d;}function getStackDataPoints(e, t, i, a, o, n, l, r, s) {var d = Math.round,h = 9 < arguments.length && void 0 !== arguments[9] ? arguments[9] : 1,x = [],c = n.height - n.area[0] - n.area[2];return e.forEach(function (e, l) {if (null === e) x.push(null);else {var p = { color: e.color, x: a[l] + d(o / 2) };if (0 < r) {var g = 0;for (var _e7 = 0; _e7 <= r; _e7++) {g += s[_e7].data[l];}var y = g - e,f = c * (g - t) / (i - t),u = c * (y - t) / (i - t);} else var g = e,f = c * (g - t) / (i - t),u = 0;var m = u;f *= h, m *= h, p.y = n.height - d(f) - n.area[2], p.y0 = n.height - d(m) - n.area[2], x.push(p);}}), x;}function getYAxisTextList(e, t, a, o) {var n,l = Math.min,r = Math.max,s = 4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : -1;n = "stack" == o ? dataCombineStack(e, t.categories.length) : dataCombine(e);var d = [];n = n.filter(function (e) {return "object" == typeof e && null !== e ? e.constructor == Array ? null !== e : null !== e.value : null !== e;}), n.map(function (e) {"object" == typeof e ? e.constructor == Array ? e.map(function (e) {d.push(e);}) : d.push(e.value) : d.push(e);});var h = 0,x = 0;if (0 < d.length && (h = l.apply(this, d), x = r.apply(this, d)), -1 < s ? ("number" == typeof t.yAxis.data[s].min && (h = l(t.yAxis.data[s].min, h)), "number" == typeof t.yAxis.data[s].max && (x = r(t.yAxis.data[s].max, x))) : ("number" == typeof t.yAxis.min && (h = l(t.yAxis.min, h)), "number" == typeof t.yAxis.max && (x = r(t.yAxis.max, x))), h === x) {var c = x || 10;x += c;}for (var p = getDataRange(h, x), g = p.minRange, y = p.maxRange, f = [], u = (y - g) / a.yAxisSplit, m = 0; m <= a.yAxisSplit; m++) {f.push(g + u * m);}return f.reverse();}function calYAxisData(e, t, a) {var o = Math.max,n = assign({}, { type: "" }, t.extra.column),l = t.yAxis.data.length,r = Array(l);if (0 < l) {for (var _t6 = 0; _t6 < l; _t6++) {r[_t6] = [];for (var _i6 = 0; _i6 < e.length; _i6++) {e[_i6].index == _t6 && r[_t6].push(e[_i6]);}}var s = Array(l),d = Array(l),h = Array(l);var _loop2 = function _loop2(x, _e9) {_e9 = t.yAxis.data[x], !0 == t.yAxis.disabled && (_e9.disabled = !0), s[x] = getYAxisTextList(r[x], t, a, n.type, x);var i = _e9.fontSize || a.fontSize;h[x] = { position: _e9.position ? _e9.position : "left", width: 0 }, d[x] = s[x].map(function (t) {_e8 = _e9;return t = util.toFixed(t, 6), t = _e9.format ? _e9.format(+t) : t, h[x].width = o(h[x].width, measureText(t, i) + 5), t;});var l = _e9.calibration ? 4 * t.pixelRatio : 0;h[x].width += l + 3 * t.pixelRatio, !0 === _e9.disabled && (h[x].width = 0);_e8 = _e9;};for (var _e8, x = 0; x < l; x++) {_loop2(x, _e8);}} else {var s = [,],d = [,],h = [,];s[0] = getYAxisTextList(e, t, a, n.type), h[0] = { position: "left", width: 0 };var i = t.yAxis.fontSize || a.fontSize;d[0] = s[0].map(function (e) {return e = util.toFixed(e, 6), e = t.yAxis.format ? t.yAxis.format(+e) : e, h[0].width = o(h[0].width, measureText(e, i) + 5), e;}), h[0].width += 3 * t.pixelRatio, !0 === t.yAxis.disabled ? (h[0] = { position: "left", width: 0 }, t.yAxis.data[0] = { disabled: !0 }) : t.yAxis.data[0] = { disabled: !1, position: "left", max: t.yAxis.max, min: t.yAxis.min, format: t.yAxis.format };}return { rangesFormat: d, ranges: s, yAxisWidth: h };}function calTooltipYAxisData(e, t, a) {var o = [].concat(a.chartData.yAxisData.ranges),n = a.height - a.area[0] - a.area[2],l = a.area[0],r = [];for (var s = 0; s < o.length; s++) {var _t7 = o[s].shift(),i = o[s].pop(),d = _t7 - (_t7 - i) * (e - l) / n;d = a.yAxis.data[s].format ? a.yAxis.data[s].format(+d) : d.toFixed(0), r.push(d + "");}return r;}function calMarkLineData(e, t) {var a,o,n = t.height - t.area[0] - t.area[2];for (var l = 0; l < e.length; l++) {e[l].yAxisIndex = e[l].yAxisIndex ? e[l].yAxisIndex : 0;var i = [].concat(t.chartData.yAxisData.ranges[e[l].yAxisIndex]);a = i.pop(), o = i.shift();var r = n * (e[l].value - a) / (o - a);e[l].y = t.height - Math.round(r) - t.area[2];}return e;}function contextRotate(e, t) {var i = Math.PI;!0 === t.rotateLock ? !0 !== t._rotate_ && (e.translate(t.height, 0), e.rotate(90 * i / 180), t._rotate_ = !0) : (e.translate(t.height, 0), e.rotate(90 * i / 180));}function drawPointShape(e, t, i, a, o) {a.beginPath(), a.setStrokeStyle("#ffffff"), a.setLineWidth(1 * o.pixelRatio), a.setFillStyle(t), "diamond" === i ? e.forEach(function (e) {null !== e && (a.moveTo(e.x, e.y - 4.5), a.lineTo(e.x - 4.5, e.y), a.lineTo(e.x, e.y + 4.5), a.lineTo(e.x + 4.5, e.y), a.lineTo(e.x, e.y - 4.5));}) : "circle" === i ? e.forEach(function (e) {null !== e && (a.moveTo(e.x + 3.5 * o.pixelRatio, e.y), a.arc(e.x, e.y, 4 * o.pixelRatio, 0, 2 * Math.PI, !1));}) : "rect" === i ? e.forEach(function (e) {null !== e && (a.moveTo(e.x - 3.5, e.y - 3.5), a.rect(e.x - 3.5, e.y - 3.5, 7, 7));}) : "triangle" == i && e.forEach(function (e) {null !== e && (a.moveTo(e.x, e.y - 4.5), a.lineTo(e.x - 4.5, e.y + 4.5), a.lineTo(e.x + 4.5, e.y + 4.5), a.lineTo(e.x, e.y - 4.5));}), a.closePath(), a.fill(), a.stroke();}function drawRingTitle(e, t, i, a) {var o = e.title.fontSize || t.titleFontSize,n = e.subtitle.fontSize || t.subtitleFontSize,l = e.title.name || "",r = e.subtitle.name || "",s = e.title.color || t.titleColor,d = e.subtitle.color || t.subtitleColor,h = l ? o : 0,x = r ? n : 0,c = 5;if (r) {var p = measureText(r, n),g = a.x - p / 2 + (e.subtitle.offsetX || 0),y = a.y + n / 2 + (e.subtitle.offsetY || 0);l && (y += (h + c) / 2), i.beginPath(), i.setFontSize(n), i.setFillStyle(d), i.fillText(r, g, y), i.closePath(), i.stroke();}if (l) {var f = measureText(l, o),u = a.x - f / 2 + (e.title.offsetX || 0),m = a.y + o / 2 + (e.title.offsetY || 0);r && (m -= (x + c) / 2), i.beginPath(), i.setFontSize(o), i.setFillStyle(s), i.fillText(l, u, m), i.closePath(), i.stroke();}}function drawPointText(e, t, i, a) {var o = t.data;e.forEach(function (e, n) {if (null !== e) {a.beginPath(), a.setFontSize(t.textSize || i.fontSize), a.setFillStyle(t.textColor || "#666666");var l = o[n];"object" == typeof o[n] && null !== o[n] && (l = o[n].value);var r = t.format ? t.format(l) : l;a.fillText(r + "", e.x - measureText(r, t.textSize || i.fontSize) / 2, e.y - 2), a.closePath(), a.stroke();}});}function drawGaugeLabel(e, t, i, a, o, n) {var l = Math.PI;t -= e.width / 2 + o.gaugeLabelTextMargin;var r = e.startAngle - e.endAngle + 1,s = r / e.splitLine.splitNumber,d = e.endNumber - e.startNumber,h = d / e.splitLine.splitNumber,x = e.startAngle,c = e.startNumber;for (var _r4 = 0; _r4 < e.splitLine.splitNumber + 1; _r4++) {var p = { x: t * Math.cos(x * l), y: t * Math.sin(x * l) },g = e.labelFormat ? e.labelFormat(c) : c;p.x += i.x - measureText(g) / 2, p.y += i.y;var y = p.x,f = p.y;n.beginPath(), n.setFontSize(o.fontSize), n.setFillStyle(e.labelColor || "#666666"), n.fillText(g, y, f + o.fontSize / 2), n.closePath(), n.stroke(), x += s, 2 <= x && (x %= 2), c += h;}}function drawRadarLabel(e, t, i, a, o, n) {var l = a.extra.radar || {};t += o.radarLabelTextMargin, e.forEach(function (e, r) {var s = { x: t * Math.cos(e), y: t * Math.sin(e) },d = convertCoordinateOrigin(s.x, s.y, i),h = d.x,x = d.y;util.approximatelyEqual(s.x, 0) ? h -= measureText(a.categories[r] || "") / 2 : 0 > s.x && (h -= measureText(a.categories[r] || "")), n.beginPath(), n.setFontSize(o.fontSize), n.setFillStyle(l.labelColor || "#666666"), n.fillText(a.categories[r] || "", h, x + o.fontSize / 2), n.closePath(), n.stroke();});}function drawPieText(e, t, a, o, i, n) {var l = Math.cos,r = Math.sin,s = Math.min,d = Math.max,h = Math.PI,x = a.pieChartLinePadding,c = [],p = null,g = e.map(function (e) {var t = e.format ? e.format(+e._proportion_.toFixed(2)) : util.toFixed(100 * e._proportion_.toFixed(4)) + "%";e._rose_proportion_ && (e._proportion_ = e._rose_proportion_);var i = 2 * h - (e._start_ + 2 * h * e._proportion_ / 2),a = e.color,o = e._radius_;return { arc: i, text: t, color: a, radius: o, textColor: e.textColor, textSize: e.textSize };});for (var _h = 0; _h < g.length; _h++) {var _e10 = g[_h],_t8 = l(_e10.arc) * (_e10.radius + x),_i7 = r(_e10.arc) * (_e10.radius + x),_o10 = l(_e10.arc) * _e10.radius,_n12 = r(_e10.arc) * _e10.radius,y = 0 <= _t8 ? _t8 + a.pieChartTextPadding : _t8 - a.pieChartTextPadding,f = _i7,u = measureText(_e10.text),m = f;p && util.isSameXCoordinateArea(p.start, { x: y }) && (0 < y ? m = s(f, p.start.y) : 0 > _t8 ? m = d(f, p.start.y) : 0 < f ? m = d(f, p.start.y) : m = s(f, p.start.y)), 0 > y && (y -= u);var S = { lineStart: { x: _o10, y: _n12 }, lineEnd: { x: _t8, y: _i7 }, start: { x: y, y: m }, width: u, height: a.fontSize, text: _e10.text, color: _e10.color, textColor: _e10.textColor, textSize: _e10.textSize };p = avoidCollision(S, p), c.push(p);}for (var _l4 = 0; _l4 < c.length; _l4++) {var _e11 = c[_l4],_i8 = convertCoordinateOrigin(_e11.lineStart.x, _e11.lineStart.y, n),_r5 = convertCoordinateOrigin(_e11.lineEnd.x, _e11.lineEnd.y, n),_s2 = convertCoordinateOrigin(_e11.start.x, _e11.start.y, n);o.setLineWidth(1 * t.pixelRatio), o.setFontSize(a.fontSize), o.beginPath(), o.setStrokeStyle(_e11.color), o.setFillStyle(_e11.color), o.moveTo(_i8.x, _i8.y);var _d = 0 > _e11.start.x ? _s2.x + _e11.width : _s2.x,_x = 0 > _e11.start.x ? _s2.x - 5 : _s2.x + 5;o.quadraticCurveTo(_r5.x, _r5.y, _d, _s2.y), o.moveTo(_i8.x, _i8.y), o.stroke(), o.closePath(), o.beginPath(), o.moveTo(_s2.x + _e11.width, _s2.y), o.arc(_d, _s2.y, 2, 0, 2 * h), o.closePath(), o.fill(), o.beginPath(), o.setFontSize(_e11.textSize || a.fontSize), o.setFillStyle(_e11.textColor || "#666666"), o.fillText(_e11.text, _x, _s2.y + 3), o.closePath(), o.stroke(), o.closePath();}}function drawToolTipSplitLine(e, t, i, a) {var o = t.extra.tooltip || {};o.gridType = null == o.gridType ? "solid" : o.gridType, o.dashLength = null == o.dashLength ? 4 : o.dashLength;var n = t.area[0],l = t.height - t.area[2];if ("dash" == o.gridType && a.setLineDash([o.dashLength, o.dashLength]), a.setStrokeStyle(o.gridColor || "#cccccc"), a.setLineWidth(1 * t.pixelRatio), a.beginPath(), a.moveTo(e, n), a.lineTo(e, l), a.stroke(), a.setLineDash([]), o.xAxisLabel) {var _n13 = t.categories[t.tooltip.index];a.setFontSize(i.fontSize);var r = measureText(_n13, i.fontSize),s = e - .5 * r,d = l;a.beginPath(), a.setFillStyle(hexToRgb(o.labelBgColor || i.toolTipBackground, o.labelBgOpacity || i.toolTipOpacity)), a.setStrokeStyle(o.labelBgColor || i.toolTipBackground), a.setLineWidth(1 * t.pixelRatio), a.rect(s - i.toolTipPadding, d, r + 2 * i.toolTipPadding, i.fontSize + 2 * i.toolTipPadding), a.closePath(), a.stroke(), a.fill(), a.beginPath(), a.setFontSize(i.fontSize), a.setFillStyle(o.labelFontColor || i.fontColor), a.fillText(_n13 + "", s, d + i.toolTipPadding + i.fontSize), a.closePath(), a.stroke();}}function drawMarkLine(e, t, a) {var o = assign({}, { type: "solid", dashLength: 4, data: [] }, e.extra.markLine),n = e.area[3],l = e.width - e.area[1],r = calMarkLineData(o.data, e);for (var s, d = 0; d < r.length; d++) {if (s = assign({}, { lineColor: "#DE4A42", showLabel: !1, labelFontColor: "#666666", labelBgColor: "#DFE8FF", labelBgOpacity: .8, yAxisIndex: 0 }, r[d]), "dash" == o.type && a.setLineDash([o.dashLength, o.dashLength]), a.setStrokeStyle(s.lineColor), a.setLineWidth(1 * e.pixelRatio), a.beginPath(), a.moveTo(n, s.y), a.lineTo(l, s.y), a.stroke(), a.setLineDash([]), s.showLabel) {var i = e.yAxis.format ? e.yAxis.format(+s.value) : s.value;a.setFontSize(t.fontSize);var _o11 = measureText(i, t.fontSize),_n14 = e.padding[3] + t.yAxisTitleWidth - t.toolTipPadding,_l5 = Math.max(e.area[3], _o11 + 2 * t.toolTipPadding),_r6 = _l5 - _n14,_d2 = s.y;a.setFillStyle(hexToRgb(s.labelBgColor, s.labelBgOpacity)), a.setStrokeStyle(s.labelBgColor), a.setLineWidth(1 * e.pixelRatio), a.beginPath(), a.rect(_n14, _d2 - .5 * t.fontSize - t.toolTipPadding, _r6, t.fontSize + 2 * t.toolTipPadding), a.closePath(), a.stroke(), a.fill(), a.beginPath(), a.setFontSize(t.fontSize), a.setFillStyle(s.labelFontColor), a.fillText(i + "", _n14 + (_r6 - _o11) / 2, _d2 + .5 * t.fontSize), a.stroke();}}}function drawToolTipHorizentalLine(e, t, a, i) {var o = Math.max,n = assign({}, { gridType: "solid", dashLength: 4 }, e.extra.tooltip),l = e.area[3],r = e.width - e.area[1];if ("dash" == n.gridType && a.setLineDash([n.dashLength, n.dashLength]), a.setStrokeStyle(n.gridColor || "#cccccc"), a.setLineWidth(1 * e.pixelRatio), a.beginPath(), a.moveTo(l, e.tooltip.offset.y), a.lineTo(r, e.tooltip.offset.y), a.stroke(), a.setLineDash([]), n.yAxisLabel) {var _l6 = calTooltipYAxisData(e.tooltip.offset.y, e.series, e, t, i),_r7 = e.chartData.yAxisData.yAxisWidth,s = e.area[3],d = e.width - e.area[1];for (var h = 0; h < _l6.length; h++) {a.setFontSize(t.fontSize);var _i9 = void 0,x = void 0,c = void 0,p = measureText(_l6[h], t.fontSize);"left" == _r7[h].position ? (_i9 = s - _r7[h].width, x = o(_i9, _i9 + p + 2 * t.toolTipPadding)) : (_i9 = d, x = o(_i9 + _r7[h].width, _i9 + p + 2 * t.toolTipPadding)), c = x - _i9;var g = _i9 + (c - p) / 2,y = e.tooltip.offset.y;a.beginPath(), a.setFillStyle(hexToRgb(n.labelBgColor || t.toolTipBackground, n.labelBgOpacity || t.toolTipOpacity)), a.setStrokeStyle(n.labelBgColor || t.toolTipBackground), a.setLineWidth(1 * e.pixelRatio), a.rect(_i9, y - .5 * t.fontSize - t.toolTipPadding, c, t.fontSize + 2 * t.toolTipPadding), a.closePath(), a.stroke(), a.fill(), a.beginPath(), a.setFontSize(t.fontSize), a.setFillStyle(n.labelFontColor || t.fontColor), a.fillText(_l6[h], g, y + .5 * t.fontSize), a.closePath(), a.stroke(), "left" == _r7[h].position ? s -= _r7[h].width + e.yAxis.padding : d += _r7[h].width + e.yAxis.padding;}}}function drawToolTipSplitArea(e, t, i, a, o) {var n = assign({}, { activeBgColor: "#000000", activeBgOpacity: .08 }, t.extra.tooltip),l = t.area[0],r = t.height - t.area[2];a.beginPath(), a.setFillStyle(hexToRgb(n.activeBgColor, n.activeBgOpacity)), a.rect(e - o / 2, l, o, r - l), a.closePath(), a.fill();}function drawToolTip(e, t, i, a, o) {var n = Math.round,l = assign({}, { showBox: !0, bgColor: "#000000", bgOpacity: .7, fontColor: "#FFFFFF" }, i.extra.tooltip),r = 4 * i.pixelRatio,s = 5 * i.pixelRatio,d = 8 * i.pixelRatio,h = !1;("line" == i.type || "area" == i.type || "candle" == i.type || "mix" == i.type) && drawToolTipSplitLine(i.tooltip.offset.x, i, a, o), t = assign({ x: 0, y: 0 }, t), t.y -= 8 * i.pixelRatio;var x = e.map(function (e) {return measureText(e.text, a.fontSize);}),c = r + s + 4 * a.toolTipPadding + Math.max.apply(null, x),p = 2 * a.toolTipPadding + e.length * a.toolTipLineHeight;!1 == l.showBox || (t.x - Math.abs(i._scrollDistance_) + d + c > i.width && (h = !0), p + t.y > i.height && (t.y = i.height - p), o.beginPath(), o.setFillStyle(hexToRgb(l.bgColor || a.toolTipBackground, l.bgOpacity || a.toolTipOpacity)), h ? (o.moveTo(t.x, t.y + 10 * i.pixelRatio), o.lineTo(t.x - d, t.y + 10 * i.pixelRatio - 5 * i.pixelRatio), o.lineTo(t.x - d, t.y), o.lineTo(t.x - d - n(c), t.y), o.lineTo(t.x - d - n(c), t.y + p), o.lineTo(t.x - d, t.y + p), o.lineTo(t.x - d, t.y + 10 * i.pixelRatio + 5 * i.pixelRatio), o.lineTo(t.x, t.y + 10 * i.pixelRatio)) : (o.moveTo(t.x, t.y + 10 * i.pixelRatio), o.lineTo(t.x + d, t.y + 10 * i.pixelRatio - 5 * i.pixelRatio), o.lineTo(t.x + d, t.y), o.lineTo(t.x + d + n(c), t.y), o.lineTo(t.x + d + n(c), t.y + p), o.lineTo(t.x + d, t.y + p), o.lineTo(t.x + d, t.y + 10 * i.pixelRatio + 5 * i.pixelRatio), o.lineTo(t.x, t.y + 10 * i.pixelRatio)), o.closePath(), o.fill(), e.forEach(function (e, i) {if (null !== e.color) {o.beginPath(), o.setFillStyle(e.color);var n = t.x + d + 2 * a.toolTipPadding,l = t.y + (a.toolTipLineHeight - a.fontSize) / 2 + a.toolTipLineHeight * i + a.toolTipPadding + 1;h && (n = t.x - c - d + 2 * a.toolTipPadding), o.fillRect(n, l, r, a.fontSize), o.closePath();}}), e.forEach(function (e, i) {var n = t.x + d + 2 * a.toolTipPadding + r + s;h && (n = t.x - c - d + 2 * a.toolTipPadding + +r + s);var x = t.y + (a.toolTipLineHeight - a.fontSize) / 2 + a.toolTipLineHeight * i + a.toolTipPadding;o.beginPath(), o.setFontSize(a.fontSize), o.setFillStyle(l.fontColor), o.fillText(e.text, n, x + a.fontSize), o.closePath(), o.stroke();}));}function drawYAxisTitle(e, t, i, a) {var o = i.xAxisHeight + (t.height - i.xAxisHeight - measureText(e)) / 2;a.save(), a.beginPath(), a.setFontSize(i.fontSize), a.setFillStyle(t.yAxis.titleFontColor || "#333333"), a.translate(0, t.height), a.rotate(-90 * Math.PI / 180), a.fillText(e, o, t.padding[3] + .5 * i.fontSize), a.closePath(), a.stroke(), a.restore();}function drawColumnDataPoints(e, t, i, a) {var o = 4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : 1,n = t.chartData.xAxisData,l = n.xAxisPoints,r = n.eachSpacing,s = assign({}, { type: "group", width: r / 2, meter: { border: 4, fillColor: "#FFFFFF" } }, t.extra.column),d = [];a.save();var h = -2,x = l.length + 2;return t._scrollDistance_ && 0 !== t._scrollDistance_ && !0 === t.enableScroll && (a.translate(t._scrollDistance_, 0), h = Math.floor(-t._scrollDistance_ / r) - 2, x = h + t.xAxis.itemCount + 4), t.tooltip && t.tooltip.textList && t.tooltip.textList.length && 1 === o && drawToolTipSplitArea(t.tooltip.offset.x, t, i, a, r), e.forEach(function (n, c) {var p, g, y;p = [].concat(t.chartData.yAxisData.ranges[n.index]), g = p.pop(), y = p.shift();var f = n.data;switch (s.type) {case "group":var u = getDataPoints(f, g, y, l, r, t, i, o),m = getStackDataPoints(f, g, y, l, r, t, i, c, e, o);d.push(m), u = fixColumeData(u, r, e.length, c, i, t);for (var _e12, _o12 = 0; _o12 < u.length; _o12++) {if (_e12 = u[_o12], null !== _e12 && _o12 > h && _o12 < x) {a.beginPath(), a.setStrokeStyle(_e12.color || n.color), a.setLineWidth(1), a.setFillStyle(_e12.color || n.color);var S = _e12.x - _e12.width / 2,T = t.height - _e12.y - t.area[2];a.moveTo(S - 1, _e12.y), a.lineTo(S + _e12.width - 2, _e12.y), a.lineTo(S + _e12.width - 2, t.height - t.area[2]), a.lineTo(S, t.height - t.area[2]), a.lineTo(S, _e12.y), a.closePath(), a.stroke(), a.fill();}};break;case "stack":var u = getStackDataPoints(f, g, y, l, r, t, i, c, e, o);d.push(u), u = fixColumeStackData(u, r, e.length, c, i, t, e);for (var _e13, _o13 = 0; _o13 < u.length; _o13++) {if (_e13 = u[_o13], null !== _e13 && _o13 > h && _o13 < x) {a.beginPath(), a.setFillStyle(_e13.color || n.color);var S = _e13.x - _e13.width / 2 + 1,T = t.height - _e13.y - t.area[2],A = t.height - _e13.y0 - t.area[2];0 < c && (T -= A), a.moveTo(S, _e13.y), a.fillRect(S, _e13.y, _e13.width - 2, T), a.closePath(), a.fill();}};break;case "meter":var u = getDataPoints(f, g, y, l, r, t, i, o);if (d.push(u), u = fixColumeMeterData(u, r, e.length, c, i, t, s.meter.border), 0 == c) {for (var _e14, _o14 = 0; _o14 < u.length; _o14++) {if (_e14 = u[_o14], null !== _e14 && _o14 > h && _o14 < x) {a.beginPath(), a.setFillStyle(s.meter.fillColor);var S = _e14.x - _e14.width / 2,T = t.height - _e14.y - t.area[2];a.moveTo(S, _e14.y), a.fillRect(S, _e14.y, _e14.width, T), a.closePath(), a.fill(), 0 < s.meter.border && (a.beginPath(), a.setStrokeStyle(n.color), a.setLineWidth(s.meter.border * t.pixelRatio), a.moveTo(S + .5 * s.meter.border, _e14.y + T), a.lineTo(S + .5 * s.meter.border, _e14.y + .5 * s.meter.border), a.lineTo(S + _e14.width - .5 * s.meter.border, _e14.y + .5 * s.meter.border), a.lineTo(S + _e14.width - .5 * s.meter.border, _e14.y + T), a.stroke());}}} else for (var _e15, _o15 = 0; _o15 < u.length; _o15++) {if (_e15 = u[_o15], null !== _e15 && _o15 > h && _o15 < x) {a.beginPath(), a.setFillStyle(_e15.color || n.color);var S = _e15.x - _e15.width / 2,T = t.height - _e15.y - t.area[2];a.moveTo(S, _e15.y), a.fillRect(S, _e15.y, _e15.width, T), a.closePath(), a.fill();}}}}), !1 !== t.dataLabel && 1 === o && e.forEach(function (n, d) {var h, x, c;h = [].concat(t.chartData.yAxisData.ranges[n.index]), x = h.pop(), c = h.shift();var p = n.data;switch (s.type) {case "group":var g = getDataPoints(p, x, c, l, r, t, i, o);g = fixColumeData(g, r, e.length, d, i, t), drawPointText(g, n, i, a);break;case "stack":var g = getStackDataPoints(p, x, c, l, r, t, i, d, e, o);drawPointText(g, n, i, a);break;case "meter":var g = getDataPoints(p, x, c, l, r, t, i, o);drawPointText(g, n, i, a);}}), a.restore(), { xAxisPoints: l, calPoints: d, eachSpacing: r };}function drawCandleDataPoints(e, t, a, i, o) {var n = 5 < arguments.length && void 0 !== arguments[5] ? arguments[5] : 1,l = assign({}, { color: {}, average: {} }, a.extra.candle);l.color = assign({}, { upLine: "#f04864", upFill: "#f04864", downLine: "#2fc25b", downFill: "#2fc25b" }, l.color), l.average = assign({}, { show: !1, name: [], day: [], color: i.colors }, l.average), a.extra.candle = l;var r = a.chartData.xAxisData,s = r.xAxisPoints,d = r.eachSpacing,h = [];o.save();var x = -2,c = s.length + 2,p = 0,g = a.width + d;return a._scrollDistance_ && 0 !== a._scrollDistance_ && !0 === a.enableScroll && (o.translate(a._scrollDistance_, 0), x = Math.floor(-a._scrollDistance_ / d) - 2, c = x + a.xAxis.itemCount + 4, p = -a._scrollDistance_ - d + a.area[3], g = p + (a.xAxis.itemCount + 4) * d), l.average.show && t.forEach(function (e) {var t, l, r;t = [].concat(a.chartData.yAxisData.ranges[e.index]), l = t.pop(), r = t.shift();var h = e.data,x = getDataPoints(h, l, r, s, d, a, i, n),c = splitPoints(x);for (var _t9, _a8 = 0; _a8 < c.length; _a8++) {if (_t9 = c[_a8], o.beginPath(), o.setStrokeStyle(e.color), o.setLineWidth(1), 1 === _t9.length) o.moveTo(_t9[0].x, _t9[0].y), o.arc(_t9[0].x, _t9[0].y, 1, 0, 2 * Math.PI);else {o.moveTo(_t9[0].x, _t9[0].y);var _e16 = 0;for (var _i10, _a9 = 0; _a9 < _t9.length; _a9++) {if (_i10 = _t9[_a9], 0 == _e16 && _i10.x > p && (o.moveTo(_i10.x, _i10.y), _e16 = 1), 0 < _a9 && _i10.x > p && _i10.x < g) {var y = createCurveControlPoints(_t9, _a9 - 1);o.bezierCurveTo(y.ctrA.x, y.ctrA.y, y.ctrB.x, y.ctrB.y, _i10.x, _i10.y);}}o.moveTo(_t9[0].x, _t9[0].y);}o.closePath(), o.stroke();}}), e.forEach(function (e) {var t, r, p;t = [].concat(a.chartData.yAxisData.ranges[e.index]), r = t.pop(), p = t.shift();var g = e.data,y = getCandleDataPoints(g, r, p, s, d, a, i, n);h.push(y);var f = splitPoints(y);for (var _t10 = 0; _t10 < f[0].length; _t10++) {if (_t10 > x && _t10 < c) {var _e17 = f[0][_t10];o.beginPath(), 0 < g[_t10][1] - g[_t10][0] ? (o.setStrokeStyle(l.color.upLine), o.setFillStyle(l.color.upFill), o.setLineWidth(1 * a.pixelRatio), o.moveTo(_e17[3].x, _e17[3].y), o.lineTo(_e17[1].x, _e17[1].y), o.lineTo(_e17[1].x - d / 4, _e17[1].y), o.lineTo(_e17[0].x - d / 4, _e17[0].y), o.lineTo(_e17[0].x, _e17[0].y), o.lineTo(_e17[2].x, _e17[2].y), o.lineTo(_e17[0].x, _e17[0].y), o.lineTo(_e17[0].x + d / 4, _e17[0].y), o.lineTo(_e17[1].x + d / 4, _e17[1].y), o.lineTo(_e17[1].x, _e17[1].y), o.moveTo(_e17[3].x, _e17[3].y)) : (o.setStrokeStyle(l.color.downLine), o.setFillStyle(l.color.downFill), o.setLineWidth(1 * a.pixelRatio), o.moveTo(_e17[3].x, _e17[3].y), o.lineTo(_e17[0].x, _e17[0].y), o.lineTo(_e17[0].x - d / 4, _e17[0].y), o.lineTo(_e17[1].x - d / 4, _e17[1].y), o.lineTo(_e17[1].x, _e17[1].y), o.lineTo(_e17[2].x, _e17[2].y), o.lineTo(_e17[1].x, _e17[1].y), o.lineTo(_e17[1].x + d / 4, _e17[1].y), o.lineTo(_e17[0].x + d / 4, _e17[0].y), o.lineTo(_e17[0].x, _e17[0].y), o.moveTo(_e17[3].x, _e17[3].y)), o.closePath(), o.fill(), o.stroke();}}}), o.restore(), { xAxisPoints: s, calPoints: h, eachSpacing: d };}function drawAreaDataPoints(e, t, i, a) {var o = 4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : 1,n = assign({}, { type: "straight", opacity: .2, addLine: !1, width: 2 }, t.extra.area);var l = t.chartData.xAxisData,r = l.xAxisPoints,s = l.eachSpacing,d = t.height - t.area[2],h = [];a.save();var x = 0,c = t.width + s;return t._scrollDistance_ && 0 !== t._scrollDistance_ && !0 === t.enableScroll && (a.translate(t._scrollDistance_, 0), x = -t._scrollDistance_ - s + t.area[3], c = x + (t.xAxis.itemCount + 4) * s), e.forEach(function (e) {var l, p, g;l = [].concat(t.chartData.yAxisData.ranges[e.index]), p = l.pop(), g = l.shift();var y = e.data,f = getDataPoints(y, p, g, r, s, t, i, o);h.push(f);var u = splitPoints(f);for (var _o16, _l7 = 0; _l7 < u.length; _l7++) {if (_o16 = u[_l7], a.beginPath(), a.setStrokeStyle(hexToRgb(e.color, n.opacity)), a.setFillStyle(hexToRgb(e.color, n.opacity)), a.setLineWidth(n.width * t.pixelRatio), 1 < _o16.length) {var _e18 = _o16[0],_t11 = _o16[_o16.length - 1];a.moveTo(_e18.x, _e18.y);var _i11 = 0;if ("curve" === n.type) {for (var _e19, _t12 = 0; _t12 < _o16.length; _t12++) {if (_e19 = _o16[_t12], 0 == _i11 && _e19.x > x && (a.moveTo(_e19.x, _e19.y), _i11 = 1), 0 < _t12 && _e19.x > x && _e19.x < c) {var _i12 = createCurveControlPoints(_o16, _t12 - 1);a.bezierCurveTo(_i12.ctrA.x, _i12.ctrA.y, _i12.ctrB.x, _i12.ctrB.y, _e19.x, _e19.y);}}} else for (var _e20, _t13 = 0; _t13 < _o16.length; _t13++) {_e20 = _o16[_t13], 0 == _i11 && _e20.x > x && (a.moveTo(_e20.x, _e20.y), _i11 = 1), 0 < _t13 && _e20.x > x && _e20.x < c && a.lineTo(_e20.x, _e20.y);}a.lineTo(_t11.x, d), a.lineTo(_e18.x, d), a.lineTo(_e18.x, _e18.y);} else {var _e21 = _o16[0];a.moveTo(_e21.x - s / 2, _e21.y), a.lineTo(_e21.x + s / 2, _e21.y), a.lineTo(_e21.x + s / 2, d), a.lineTo(_e21.x - s / 2, d), a.moveTo(_e21.x - s / 2, _e21.y);}if (a.closePath(), a.fill(), n.addLine) {if ("dash" == e.lineType) {var _i13 = e.dashLength ? e.dashLength : 8;_i13 *= t.pixelRatio, a.setLineDash([_i13, _i13]);}if (a.beginPath(), a.setStrokeStyle(e.color), a.setLineWidth(n.width * t.pixelRatio), 1 === _o16.length) a.moveTo(_o16[0].x, _o16[0].y), a.arc(_o16[0].x, _o16[0].y, 1, 0, 2 * Math.PI);else {a.moveTo(_o16[0].x, _o16[0].y);var _e22 = 0;if ("curve" === n.type) {for (var _t14, _i14 = 0; _i14 < _o16.length; _i14++) {if (_t14 = _o16[_i14], 0 == _e22 && _t14.x > x && (a.moveTo(_t14.x, _t14.y), _e22 = 1), 0 < _i14 && _t14.x > x && _t14.x < c) {var _e23 = createCurveControlPoints(_o16, _i14 - 1);a.bezierCurveTo(_e23.ctrA.x, _e23.ctrA.y, _e23.ctrB.x, _e23.ctrB.y, _t14.x, _t14.y);}}} else for (var _t15, _i15 = 0; _i15 < _o16.length; _i15++) {_t15 = _o16[_i15], 0 == _e22 && _t15.x > x && (a.moveTo(_t15.x, _t15.y), _e22 = 1), 0 < _i15 && _t15.x > x && _t15.x < c && a.lineTo(_t15.x, _t15.y);}a.moveTo(_o16[0].x, _o16[0].y);}a.stroke(), a.setLineDash([]);}}!1 !== t.dataPointShape && drawPointShape(f, e.color, e.pointShape, a, t);}), !1 !== t.dataLabel && 1 === o && e.forEach(function (e) {var n, l, d;n = [].concat(t.chartData.yAxisData.ranges[e.index]), l = n.pop(), d = n.shift();var h = e.data,x = getDataPoints(h, l, d, r, s, t, i, o);drawPointText(x, e, i, a);}), a.restore(), { xAxisPoints: r, calPoints: h, eachSpacing: s };}function drawLineDataPoints(e, t, i, a) {var o = 4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : 1,n = assign({}, { type: "straight", width: 2 }, t.extra.line);n.width *= t.pixelRatio;var l = t.chartData.xAxisData,r = l.xAxisPoints,s = l.eachSpacing;var d = [];a.save();var h = 0,x = t.width + s;return t._scrollDistance_ && 0 !== t._scrollDistance_ && !0 === t.enableScroll && (a.translate(t._scrollDistance_, 0), h = -t._scrollDistance_ - s + t.area[3], x = h + (t.xAxis.itemCount + 4) * s), e.forEach(function (e) {var l, c, p;l = [].concat(t.chartData.yAxisData.ranges[e.index]), c = l.pop(), p = l.shift();var g = e.data,y = getDataPoints(g, c, p, r, s, t, i, o);d.push(y);var f = splitPoints(y);if ("dash" == e.lineType) {var _i16 = e.dashLength ? e.dashLength : 8;_i16 *= t.pixelRatio, a.setLineDash([_i16, _i16]);}a.beginPath(), a.setStrokeStyle(e.color), a.setLineWidth(n.width), f.forEach(function (e) {if (1 === e.length) a.moveTo(e[0].x, e[0].y), a.arc(e[0].x, e[0].y, 1, 0, 2 * Math.PI);else {a.moveTo(e[0].x, e[0].y);var _i17 = 0;if ("curve" === n.type) {for (var _o17, _n15 = 0; _n15 < e.length; _n15++) {if (_o17 = e[_n15], 0 == _i17 && _o17.x > h && (a.moveTo(_o17.x, _o17.y), _i17 = 1), 0 < _n15 && _o17.x > h && _o17.x < x) {var t = createCurveControlPoints(e, _n15 - 1);a.bezierCurveTo(t.ctrA.x, t.ctrA.y, t.ctrB.x, t.ctrB.y, _o17.x, _o17.y);}}} else for (var _t16, _o18 = 0; _o18 < e.length; _o18++) {_t16 = e[_o18], 0 == _i17 && _t16.x > h && (a.moveTo(_t16.x, _t16.y), _i17 = 1), 0 < _o18 && _t16.x > h && _t16.x < x && a.lineTo(_t16.x, _t16.y);}a.moveTo(e[0].x, e[0].y);}}), a.stroke(), a.setLineDash([]), !1 !== t.dataPointShape && drawPointShape(y, e.color, e.pointShape, a, t);}), !1 !== t.dataLabel && 1 === o && e.forEach(function (e) {var n, l, d;n = [].concat(t.chartData.yAxisData.ranges[e.index]), l = n.pop(), d = n.shift();var h = e.data,x = getDataPoints(h, l, d, r, s, t, i, o);drawPointText(x, e, i, a);}), a.restore(), { xAxisPoints: r, calPoints: d, eachSpacing: s };}function drawMixDataPoints(e, t, i, a) {var o = 4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : 1,n = t.chartData.xAxisData,l = n.xAxisPoints,r = n.eachSpacing,s = t.height - t.area[2],d = [];var h = 0,x = 0;e.forEach(function (e) {"column" == e.type && (x += 1);}), a.save();var c = -2,p = l.length + 2,g = 0,y = t.width + r;if (t._scrollDistance_ && 0 !== t._scrollDistance_ && !0 === t.enableScroll && (a.translate(t._scrollDistance_, 0), c = Math.floor(-t._scrollDistance_ / r) - 2, p = c + t.xAxis.itemCount + 4, g = -t._scrollDistance_ - r + t.area[3], y = g + (t.xAxis.itemCount + 4) * r), e.forEach(function (e) {var n, f, u;n = [].concat(t.chartData.yAxisData.ranges[e.index]), f = n.pop(), u = n.shift();var m = e.data,S = getDataPoints(m, f, u, l, r, t, i, o);if (d.push(S), "column" == e.type) {S = fixColumeData(S, r, x, h, i, t);for (var _o19, _n16 = 0; _n16 < S.length; _n16++) {if (_o19 = S[_n16], null !== _o19 && _n16 > c && _n16 < p) {a.beginPath(), a.setStrokeStyle(_o19.color || e.color), a.setLineWidth(1), a.setFillStyle(_o19.color || e.color);var T = _o19.x - _o19.width / 2,A = t.height - _o19.y - t.area[2];a.moveTo(T, _o19.y), a.moveTo(T - 1, _o19.y), a.lineTo(T + _o19.width - 2, _o19.y), a.lineTo(T + _o19.width - 2, t.height - t.area[2]), a.lineTo(T, t.height - t.area[2]), a.lineTo(T, _o19.y), a.closePath(), a.stroke(), a.fill(), a.closePath(), a.fill();}}h += 1;}if ("area" == e.type) {var _o20 = splitPoints(S);for (var _n17, _l8 = 0; _l8 < _o20.length; _l8++) {if (_n17 = _o20[_l8], a.beginPath(), a.setStrokeStyle(e.color), a.setFillStyle(hexToRgb(e.color, .2)), a.setLineWidth(2 * t.pixelRatio), 1 < _n17.length) {var b = _n17[0];var _t17 = _n17[_n17.length - 1];a.moveTo(b.x, b.y);var _i18 = 0;if ("curve" === e.style) {for (var _e24, _t18 = 0; _t18 < _n17.length; _t18++) {if (_e24 = _n17[_t18], 0 == _i18 && _e24.x > g && (a.moveTo(_e24.x, _e24.y), _i18 = 1), 0 < _t18 && _e24.x > g && _e24.x < y) {var P = createCurveControlPoints(_n17, _t18 - 1);a.bezierCurveTo(P.ctrA.x, P.ctrA.y, P.ctrB.x, P.ctrB.y, _e24.x, _e24.y);}}} else for (var _e25, _t19 = 0; _t19 < _n17.length; _t19++) {_e25 = _n17[_t19], 0 == _i18 && _e25.x > g && (a.moveTo(_e25.x, _e25.y), _i18 = 1), 0 < _t19 && _e25.x > g && _e25.x < y && a.lineTo(_e25.x, _e25.y);}a.lineTo(_t17.x, s), a.lineTo(b.x, s), a.lineTo(b.x, b.y);} else {var _e26 = _n17[0];a.moveTo(_e26.x - r / 2, _e26.y), a.lineTo(_e26.x + r / 2, _e26.y), a.lineTo(_e26.x + r / 2, s), a.lineTo(_e26.x - r / 2, s), a.moveTo(_e26.x - r / 2, _e26.y);}a.closePath(), a.fill();}}if ("line" == e.type) {var _ = splitPoints(S);_.forEach(function (i) {if ("dash" == e.lineType) {var _i19 = e.dashLength ? e.dashLength : 8;_i19 *= t.pixelRatio, a.setLineDash([_i19, _i19]);}if (a.beginPath(), a.setStrokeStyle(e.color), a.setLineWidth(2 * t.pixelRatio), 1 === i.length) a.moveTo(i[0].x, i[0].y), a.arc(i[0].x, i[0].y, 1, 0, 2 * Math.PI);else {a.moveTo(i[0].x, i[0].y);var _t20 = 0;if ("curve" == e.style) {for (var _e27, _n18 = 0; _n18 < i.length; _n18++) {if (_e27 = i[_n18], 0 == _t20 && _e27.x > g && (a.moveTo(_e27.x, _e27.y), _t20 = 1), 0 < _n18 && _e27.x > g && _e27.x < y) {var o = createCurveControlPoints(i, _n18 - 1);a.bezierCurveTo(o.ctrA.x, o.ctrA.y, o.ctrB.x, o.ctrB.y, _e27.x, _e27.y);}}} else for (var _e28, _o21 = 0; _o21 < i.length; _o21++) {_e28 = i[_o21], 0 == _t20 && _e28.x > g && (a.moveTo(_e28.x, _e28.y), _t20 = 1), 0 < _o21 && _e28.x > g && _e28.x < y && a.lineTo(_e28.x, _e28.y);}a.moveTo(i[0].x, i[0].y);}a.stroke(), a.setLineDash([]);});}"point" == e.type && (e.addPoint = !0), !0 == e.addPoint && "column" !== e.type && drawPointShape(S, e.color, e.pointShape, a, t);}), !1 !== t.dataLabel && 1 === o) {var h = 0;e.forEach(function (e) {var n, s, d;n = [].concat(t.chartData.yAxisData.ranges[e.index]), s = n.pop(), d = n.shift();var c = e.data,p = getDataPoints(c, s, d, l, r, t, i, o);"column" === e.type ? (p = fixColumeData(p, r, x, h, i, t), drawPointText(p, e, i, a), h += 1) : drawPointText(p, e, i, a);});}return a.restore(), { xAxisPoints: l, calPoints: d, eachSpacing: r };}function drawToolTipBridge(e, t, i, a, o, n) {var l = e.extra.tooltip || {};l.horizentalLine && e.tooltip && 1 === a && ("line" == e.type || "area" == e.type || "column" == e.type || "candle" == e.type || "mix" == e.type) && drawToolTipHorizentalLine(e, t, i, o, n), i.save(), e._scrollDistance_ && 0 !== e._scrollDistance_ && !0 === e.enableScroll && i.translate(e._scrollDistance_, 0), e.tooltip && e.tooltip.textList && e.tooltip.textList.length && 1 === a && drawToolTip(e.tooltip.textList, e.tooltip.offset, e, t, i, o, n), i.restore();}function drawXAxis(e, t, i, a) {var o = Math.ceil;var n = t.chartData.xAxisData,l = n.xAxisPoints,r = n.startX,s = n.endX,d = n.eachSpacing;var h = "center";("line" == t.type || "area" == t.type) && (h = t.xAxis.boundaryGap);var x = t.height - t.area[2],c = t.area[0];if (t.enableScroll && t.xAxis.scrollShow) {var p = t.height - t.area[2] + i.xAxisHeight,g = s - r,y = d * (l.length - 1),f = 0;t._scrollDistance_ && (f = -t._scrollDistance_ * g / y), a.beginPath(), a.setLineCap("round"), a.setLineWidth(6 * t.pixelRatio), a.setStrokeStyle(t.xAxis.scrollBackgroundColor || "#EFEBEF"), a.moveTo(r, p), a.lineTo(s, p), a.stroke(), a.closePath(), a.beginPath(), a.setLineCap("round"), a.setLineWidth(6 * t.pixelRatio), a.setStrokeStyle(t.xAxis.scrollColor || "#A6A6A6"), a.moveTo(r + f, p), a.lineTo(r + f + g * g / y, p), a.stroke(), a.closePath(), a.setLineCap("butt");}if (a.save(), t._scrollDistance_ && 0 !== t._scrollDistance_ && a.translate(t._scrollDistance_, 0), !0 === t.xAxis.calibration && (a.setStrokeStyle(t.xAxis.gridColor || "#cccccc"), a.setLineCap("butt"), a.setLineWidth(1 * t.pixelRatio), l.forEach(function (e, i) {0 < i && (a.beginPath(), a.moveTo(e - d / 2, x), a.lineTo(e - d / 2, x + 3 * t.pixelRatio), a.closePath(), a.stroke());})), !0 !== t.xAxis.disableGrid && (a.setStrokeStyle(t.xAxis.gridColor || "#cccccc"), a.setLineCap("butt"), a.setLineWidth(1 * t.pixelRatio), "dash" == t.xAxis.gridType && a.setLineDash([t.xAxis.dashLength, t.xAxis.dashLength]), t.xAxis.gridEval = t.xAxis.gridEval || 1, l.forEach(function (e, i) {0 == i % t.xAxis.gridEval && (a.beginPath(), a.moveTo(e, x), a.lineTo(e, c), a.stroke());}), a.setLineDash([])), !0 !== t.xAxis.disabled) {var _n19 = e.length;t.xAxis.labelCount && (_n19 = t.xAxis.itemCount ? o(e.length / t.xAxis.itemCount * t.xAxis.labelCount) : t.xAxis.labelCount, _n19 -= 1);var _r8 = o(e.length / _n19),_s3 = [],_c = e.length;for (var _t21 = 0; _t21 < _c; _t21++) {0 == _t21 % _r8 ? _s3.push(e[_t21]) : _s3.push("");}_s3[_c - 1] = e[_c - 1];var u = t.xAxis.fontSize || i.fontSize;0 === i._xAxisTextAngle_ ? _s3.forEach(function (e, o) {var n = -measureText(e, u) / 2;"center" == h && (n += d / 2);var r = 0;t.xAxis.scrollShow && (r = 6 * t.pixelRatio), a.beginPath(), a.setFontSize(u), a.setFillStyle(t.xAxis.fontColor || "#666666"), a.fillText(e, l[o] + n, x + u + (i.xAxisHeight - r - u) / 2), a.closePath(), a.stroke();}) : _s3.forEach(function (e, o) {a.save(), a.beginPath(), a.setFontSize(u), a.setFillStyle(t.xAxis.fontColor || "#666666");var n = measureText(e),r = -n;"center" == h && (r += d / 2);var s = calRotateTranslate(l[o] + d / 2, x + u / 2 + 5, t.height),c = s.transX + 15,p = s.transY;a.rotate(-1 * i._xAxisTextAngle_), a.translate(c, p), a.fillText(e, l[o] + r, x + u + 5), a.closePath(), a.stroke(), a.restore();});}a.restore(), t.xAxis.axisLine && (a.beginPath(), a.setStrokeStyle(t.xAxis.axisLineColor), a.setLineWidth(1 * t.pixelRatio), a.moveTo(r, t.height - t.area[2]), a.lineTo(s, t.height - t.area[2]), a.stroke());}function drawYAxisGrid(e, t, a, i) {if (!0 === t.yAxis.disableGrid) return;var o = t.height - t.area[0] - t.area[2],n = o / a.yAxisSplit,l = t.area[3],r = t.chartData.xAxisData.xAxisPoints,s = t.chartData.xAxisData.eachSpacing,d = s * (r.length - 1),h = [];for (var _o22 = 0; _o22 < a.yAxisSplit + 1; _o22++) {h.push(t.height - t.area[2] - n * _o22);}i.save(), t._scrollDistance_ && 0 !== t._scrollDistance_ && i.translate(t._scrollDistance_, 0), "dash" == t.yAxis.gridType && i.setLineDash([t.yAxis.dashLength, t.yAxis.dashLength]), i.setStrokeStyle(t.yAxis.gridColor), i.setLineWidth(1 * t.pixelRatio), h.forEach(function (e) {i.beginPath(), i.moveTo(l, e), i.lineTo(l + d, e), i.stroke();}), i.setLineDash([]), i.restore();}function drawYAxis(e, t, a, o) {if (!0 === t.yAxis.disabled) return;var i = t.height - t.area[0] - t.area[2],n = i / a.yAxisSplit,l = t.area[3],r = t.width - t.area[1],s = t.height - t.area[2],d = s + a.xAxisHeight;t.xAxis.scrollShow && (d -= 3 * t.pixelRatio), t.xAxis.rotateLabel && (d = t.height - t.area[2] + 3), o.beginPath(), o.setFillStyle(t.background || "#ffffff"), 0 > t._scrollDistance_ && o.fillRect(0, 0, l, d), !0 == t.enableScroll && o.fillRect(r, 0, t.width, d), o.closePath(), o.stroke();var h = [];for (var _l9 = 0; _l9 <= a.yAxisSplit; _l9++) {h.push(t.area[0] + n * _l9);}var x = t.area[3],c = t.width - t.area[1];var _loop3 = function _loop3(_n21, _l10) {if (_n21 = t.yAxis.data[_l10], !0 !== _n21.disabled) {var _e29 = t.chartData.yAxisData.rangesFormat[_l10],_i20 = _n21.fontSize || a.fontSize,_r9 = t.chartData.yAxisData.yAxisWidth[_l10];if (_e29.forEach(function (e, a) {var l = h[a] ? h[a] : s;o.beginPath(), o.setFontSize(_i20), o.setLineWidth(1 * t.pixelRatio), o.setStrokeStyle(_n21.axisLineColor || "#cccccc"), o.setFillStyle(_n21.fontColor || "#666666"), "left" == _r9.position ? (o.fillText(e + "", x - _r9.width, l + _i20 / 2), !0 == _n21.calibration && (o.moveTo(x, l), o.lineTo(x - 3 * t.pixelRatio, l))) : (o.fillText(e + "", c + 4 * t.pixelRatio, l + _i20 / 2), !0 == _n21.calibration && (o.moveTo(c, l), o.lineTo(c + 3 * t.pixelRatio, l))), o.closePath(), o.stroke();}), !1 !== _n21.axisLine && (o.beginPath(), o.setStrokeStyle(_n21.axisLineColor || "#cccccc"), o.setLineWidth(1 * t.pixelRatio), "left" == _r9.position ? (o.moveTo(x, t.height - t.area[2]), o.lineTo(x, t.area[0])) : (o.moveTo(c, t.height - t.area[2]), o.lineTo(c, t.area[0])), o.stroke()), t.yAxis.showTitle) {var _e30 = _n21.titleFontSize || a.fontSize,_i21 = _n21.title;o.beginPath(), o.setFontSize(_e30), o.setFillStyle(_n21.titleFontColor || "#666666"), "left" == _r9.position ? o.fillText(_i21, x - measureText(_i21, _e30) / 2, t.area[0] - 10 * t.pixelRatio) : o.fillText(_i21, c - measureText(_i21, _e30) / 2, t.area[0] - 10 * t.pixelRatio), o.closePath(), o.stroke();}"left" == _r9.position ? x -= _r9.width + t.yAxis.padding : c += _r9.width + t.yAxis.padding;}_n20 = _n21;};for (var _n20, _l10 = 0; _l10 < t.yAxis.data.length; _l10++) {_loop3(_n20, _l10);}}function drawLegend(e, t, i, a, o) {if (!1 === t.legend.show) return;var n = o.legendData,l = n.points,r = n.area,s = t.legend.padding,d = t.legend.fontSize,h = 15 * t.pixelRatio,x = 5 * t.pixelRatio,c = t.legend.itemGap,p = Math.max(t.legend.lineHeight * t.pixelRatio, d);a.beginPath(), a.setLineWidth(t.legend.borderWidth), a.setStrokeStyle(t.legend.borderColor), a.setFillStyle(t.legend.backgroundColor), a.moveTo(r.start.x, r.start.y), a.rect(r.start.x, r.start.y, r.width, r.height), a.closePath(), a.fill(), a.stroke(), l.forEach(function (e, o) {var l = 0,g = 0;l = n.widthArr[o], g = n.heightArr[o];var y = 0,f = 0;"top" == t.legend.position || "bottom" == t.legend.position ? (y = r.start.x + (r.width - l) / 2, f = r.start.y + s + o * p) : (l = 0 == o ? 0 : n.widthArr[o - 1], y = r.start.x + s + l, f = r.start.y + s + (r.height - g) / 2), a.setFontSize(i.fontSize);for (var _n22, _l11 = 0; _l11 < e.length; _l11++) {switch (_n22 = e[_l11], _n22.area = [0, 0, 0, 0], _n22.area[0] = y, _n22.area[1] = f, _n22.area[3] = f + p, a.beginPath(), a.setLineWidth(1 * t.pixelRatio), a.setStrokeStyle(_n22.show ? _n22.color : t.legend.hiddenColor), a.setFillStyle(_n22.show ? _n22.color : t.legend.hiddenColor), _n22.legendShape) {case "line":a.moveTo(y, f + .5 * p - 2 * t.pixelRatio), a.fillRect(y, f + .5 * p - 2 * t.pixelRatio, 15 * t.pixelRatio, 4 * t.pixelRatio);break;case "triangle":a.moveTo(y + 7.5 * t.pixelRatio, f + .5 * p - 5 * t.pixelRatio), a.lineTo(y + 2.5 * t.pixelRatio, f + .5 * p + 5 * t.pixelRatio), a.lineTo(y + 12.5 * t.pixelRatio, f + .5 * p + 5 * t.pixelRatio), a.lineTo(y + 7.5 * t.pixelRatio, f + .5 * p - 5 * t.pixelRatio);break;case "diamond":a.moveTo(y + 7.5 * t.pixelRatio, f + .5 * p - 5 * t.pixelRatio), a.lineTo(y + 2.5 * t.pixelRatio, f + .5 * p), a.lineTo(y + 7.5 * t.pixelRatio, f + .5 * p + 5 * t.pixelRatio), a.lineTo(y + 12.5 * t.pixelRatio, f + .5 * p), a.lineTo(y + 7.5 * t.pixelRatio, f + .5 * p - 5 * t.pixelRatio);break;case "circle":a.moveTo(y + 7.5 * t.pixelRatio, f + .5 * p), a.arc(y + 7.5 * t.pixelRatio, f + .5 * p, 5 * t.pixelRatio, 0, 2 * Math.PI);break;case "rect":a.moveTo(y, f + .5 * p - 5 * t.pixelRatio), a.fillRect(y, f + .5 * p - 5 * t.pixelRatio, 15 * t.pixelRatio, 10 * t.pixelRatio);break;default:a.moveTo(y, f + .5 * p - 5 * t.pixelRatio), a.fillRect(y, f + .5 * p - 5 * t.pixelRatio, 15 * t.pixelRatio, 10 * t.pixelRatio);}a.closePath(), a.fill(), a.stroke(), y += h + x;a.beginPath(), a.setFontSize(d), a.setFillStyle(_n22.show ? t.legend.fontColor : t.legend.hiddenColor), a.fillText(_n22.name, y, f + (.5 * p + .5 * d - 2)), a.closePath(), a.stroke(), "top" == t.legend.position || "bottom" == t.legend.position ? (y += measureText(_n22.name, d) + c, _n22.area[2] = y) : (_n22.area[2] = y + measureText(_n22.name, d) + c, y -= h + x, f += p);}});}function drawPieDataPoints(e, t, a, o) {var n = Math.PI,l = 4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : 1,r = assign({}, { activeOpacity: .5, activeRadius: 10 * t.pixelRatio, offsetAngle: 0, labelWidth: 15 * t.pixelRatio, ringWidth: 0, border: !1, borderWidth: 2, borderColor: "#FFFFFF" }, t.extra.pie),s = { x: t.area[3] + (t.width - t.area[1] - t.area[3]) / 2, y: t.area[0] + (t.height - t.area[0] - t.area[2]) / 2 };0 == a.pieChartLinePadding && (a.pieChartLinePadding = r.activeRadius);var d = Math.min((t.width - t.area[1] - t.area[3]) / 2 - a.pieChartLinePadding - a.pieChartTextPadding - a._pieTextMaxLength_, (t.height - t.area[0] - t.area[2]) / 2 - a.pieChartLinePadding - a.pieChartTextPadding);e = getPieDataPoints(e, d, l);var h = r.activeRadius;if (e = e.map(function (e) {return e._start_ += r.offsetAngle * n / 180, e;}), e.forEach(function (e, i) {t.tooltip && t.tooltip.index == i && (o.beginPath(), o.setFillStyle(hexToRgb(e.color, t.extra.pie.activeOpacity || .5)), o.moveTo(s.x, s.y), o.arc(s.x, s.y, e._radius_ + h, e._start_, e._start_ + 2 * e._proportion_ * n), o.closePath(), o.fill()), o.beginPath(), o.setLineWidth(r.borderWidth * t.pixelRatio), o.lineJoin = "round", o.setStrokeStyle(r.borderColor), o.setFillStyle(e.color), o.moveTo(s.x, s.y), o.arc(s.x, s.y, e._radius_, e._start_, e._start_ + 2 * e._proportion_ * n), o.closePath(), o.fill(), !0 == r.border && o.stroke();}), "ring" === t.type) {var x = .6 * d;"number" == typeof t.extra.pie.ringWidth && 0 < t.extra.pie.ringWidth && (x = Math.max(0, d - t.extra.pie.ringWidth)), o.beginPath(), o.setFillStyle(t.background || "#ffffff"), o.moveTo(s.x, s.y), o.arc(s.x, s.y, x, 0, 2 * n), o.closePath(), o.fill();}if (!1 !== t.dataLabel && 1 === l) {for (var c = !1, p = 0, g = e.length; p < g; p++) {if (0 < e[p].data) {c = !0;break;}}c && drawPieText(e, t, a, o, d, s);}return 1 === l && "ring" === t.type && drawRingTitle(t, a, o, s), { center: s, radius: d, series: e };}function drawRoseDataPoints(e, t, a, o) {var n = Math.PI,l = 4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : 1,r = assign({}, { type: "area", activeOpacity: .5, activeRadius: 10 * t.pixelRatio, offsetAngle: 0, labelWidth: 15 * t.pixelRatio, border: !1, borderWidth: 2, borderColor: "#FFFFFF" }, t.extra.rose);0 == a.pieChartLinePadding && (a.pieChartLinePadding = r.activeRadius);var s = { x: t.area[3] + (t.width - t.area[1] - t.area[3]) / 2, y: t.area[0] + (t.height - t.area[0] - t.area[2]) / 2 },d = Math.min((t.width - t.area[1] - t.area[3]) / 2 - a.pieChartLinePadding - a.pieChartTextPadding - a._pieTextMaxLength_, (t.height - t.area[0] - t.area[2]) / 2 - a.pieChartLinePadding - a.pieChartTextPadding),h = r.minRadius || .5 * d;e = getRoseDataPoints(e, r.type, h, d, l);var x = r.activeRadius;if (e = e.map(function (e) {return e._start_ += (r.offsetAngle || 0) * n / 180, e;}), e.forEach(function (e, i) {t.tooltip && t.tooltip.index == i && (o.beginPath(), o.setFillStyle(hexToRgb(e.color, r.activeOpacity || .5)), o.moveTo(s.x, s.y), o.arc(s.x, s.y, x + e._radius_, e._start_, e._start_ + 2 * e._rose_proportion_ * n), o.closePath(), o.fill()), o.beginPath(), o.setLineWidth(r.borderWidth * t.pixelRatio), o.lineJoin = "round", o.setStrokeStyle(r.borderColor), o.setFillStyle(e.color), o.moveTo(s.x, s.y), o.arc(s.x, s.y, e._radius_, e._start_, e._start_ + 2 * e._rose_proportion_ * n), o.closePath(), o.fill(), !0 == r.border && o.stroke();}), !1 !== t.dataLabel && 1 === l) {for (var c = !1, p = 0, g = e.length; p < g; p++) {if (0 < e[p].data) {c = !0;break;}}c && drawPieText(e, t, a, o, d, s);}return { center: s, radius: d, series: e };}function drawArcbarDataPoints(e, t, i, a) {var o = Math.PI,n = 4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : 1,l = assign({}, { startAngle: .75, endAngle: .25, type: "price-sort-default.png", width: 12 * t.pixelRatio }, t.extra.arcbar);e = getArcbarDataPoints(e, l, n);var r = { x: t.width / 2, y: t.height / 2 },s = Math.min(r.x, r.y);s -= 5 * t.pixelRatio, s -= l.width / 2, a.setLineWidth(l.width), a.setStrokeStyle(l.backgroundColor || "#E9E9E9"), a.setLineCap("round"), a.beginPath(), "price-sort-default.png" == l.type ? a.arc(r.x, r.y, s, l.startAngle * o, l.endAngle * o, !1) : a.arc(r.x, r.y, s, 0, 2 * o, !1), a.stroke();for (var _n23, d = 0; d < e.length; d++) {_n23 = e[d], a.setLineWidth(l.width), a.setStrokeStyle(_n23.color), a.setLineCap("round"), a.beginPath(), a.arc(r.x, r.y, s, l.startAngle * o, _n23._proportion_ * o, !1), a.stroke();}return drawRingTitle(t, i, a, r), { center: r, radius: s, series: e };}function drawGaugeDataPoints(e, t, a, i, o) {var n = Math.PI,l = 5 < arguments.length && void 0 !== arguments[5] ? arguments[5] : 1,r = assign({}, { type: "price-sort-default.png", startAngle: .75, endAngle: .25, width: 15, splitLine: { fixRadius: 0, splitNumber: 10, width: 15, color: "#FFFFFF", childNumber: 5, childWidth: 5 }, pointer: { width: 15, color: "auto" } }, a.extra.gauge);null == r.oldAngle && (r.oldAngle = r.startAngle), null == r.oldData && (r.oldData = 0), e = getGaugeAxisPoints(e, r.startAngle, r.endAngle);var s = { x: a.width / 2, y: a.height / 2 },d = Math.min(s.x, s.y);d -= 5 * a.pixelRatio, d -= r.width / 2;var h = d - r.width,x = 0;if ("progress" == r.type) {var c = d - 3 * r.width;o.beginPath();var _e31 = o.createLinearGradient(s.x, s.y - c, s.x, s.y + c);_e31.addColorStop("0", hexToRgb(t[0].color, .3)), _e31.addColorStop("1.0", hexToRgb("#FFFFFF", .1)), o.setFillStyle(_e31), o.arc(s.x, s.y, c, 0, 2 * n, !1), o.fill(), o.setLineWidth(r.width), o.setStrokeStyle(hexToRgb(t[0].color, .3)), o.setLineCap("round"), o.beginPath(), o.arc(s.x, s.y, h, r.startAngle * n, r.endAngle * n, !1), o.stroke(), x = r.startAngle - r.endAngle + 1;var _i22 = x / r.splitLine.splitNumber,p = x / r.splitLine.splitNumber / r.splitLine.childNumber,g = -d - .5 * r.width - r.splitLine.fixRadius,y = -d - r.width - r.splitLine.fixRadius + r.splitLine.width;o.save(), o.translate(s.x, s.y), o.rotate((r.startAngle - 1) * n);var f = r.splitLine.splitNumber * r.splitLine.childNumber + 1,u = t[0].data * l;for (var _e32 = 0; _e32 < f; _e32++) {o.beginPath(), u > _e32 / f ? o.setStrokeStyle(hexToRgb(t[0].color, 1)) : o.setStrokeStyle(hexToRgb(t[0].color, .3)), o.setLineWidth(3 * a.pixelRatio), o.moveTo(g, 0), o.lineTo(y, 0), o.stroke(), o.rotate(p * n);}o.restore(), t = getArcbarDataPoints(t, r, l), o.setLineWidth(r.width);var m = o.createLinearGradient(s.x - h, s.y, s.x + h, s.y);m.addColorStop("0", hexToRgb(t[0].color, .2)), m.addColorStop("1.0", hexToRgb(t[0].color, 1)), o.setStrokeStyle(m), o.setLineCap("round"), o.beginPath(), o.arc(s.x, s.y, h, r.startAngle * n, t[0]._proportion_ * n, !1), o.stroke();var S = d - 2.5 * r.width;o.save(), o.translate(s.x, s.y), o.rotate((t[0]._proportion_ - 1) * n), o.beginPath(), o.setLineWidth(r.width / 3);var T = o.createLinearGradient(0, .6 * -S, 0, .6 * S);T.addColorStop("0", hexToRgb("#FFFFFF", 0)), T.addColorStop("0.5", hexToRgb(t[0].color, 1)), T.addColorStop("1.0", hexToRgb("#FFFFFF", 0)), o.setStrokeStyle(T), o.arc(0, 0, S, .85 * n, 1.15 * n, !1), o.stroke(), o.beginPath(), o.setLineWidth(1), o.setStrokeStyle(t[0].color), o.setFillStyle(t[0].color), o.moveTo(-S - r.width / 3 / 2, -4), o.lineTo(-S - r.width / 3 / 2 - 4, 0), o.lineTo(-S - r.width / 3 / 2, 4), o.lineTo(-S - r.width / 3 / 2, -4), o.stroke(), o.fill(), o.restore();} else {o.setLineWidth(r.width), o.setLineCap("butt");for (var _t22, _a10 = 0; _a10 < e.length; _a10++) {_t22 = e[_a10], o.beginPath(), o.setStrokeStyle(_t22.color), o.arc(s.x, s.y, d, _t22._startAngle_ * n, _t22._endAngle_ * n, !1), o.stroke();}o.save(), x = r.startAngle - r.endAngle + 1;var _c2 = x / r.splitLine.splitNumber,_p2 = x / r.splitLine.splitNumber / r.splitLine.childNumber,_g2 = -d - .5 * r.width - r.splitLine.fixRadius,_y = -d - .5 * r.width - r.splitLine.fixRadius + r.splitLine.width,_f = -d - .5 * r.width - r.splitLine.fixRadius + r.splitLine.childWidth;o.translate(s.x, s.y), o.rotate((r.startAngle - 1) * n);for (var _e33 = 0; _e33 < r.splitLine.splitNumber + 1; _e33++) {o.beginPath(), o.setStrokeStyle(r.splitLine.color), o.setLineWidth(2 * a.pixelRatio), o.moveTo(_g2, 0), o.lineTo(_y, 0), o.stroke(), o.rotate(_c2 * n);}o.restore(), o.save(), o.translate(s.x, s.y), o.rotate((r.startAngle - 1) * n);for (var _e34 = 0; _e34 < r.splitLine.splitNumber * r.splitLine.childNumber + 1; _e34++) {o.beginPath(), o.setStrokeStyle(r.splitLine.color), o.setLineWidth(1 * a.pixelRatio), o.moveTo(_g2, 0), o.lineTo(_f, 0), o.stroke(), o.rotate(_p2 * n);}o.restore(), t = getGaugeDataPoints(t, e, r, l);for (var _e35, _a11 = 0; _a11 < t.length; _a11++) {_e35 = t[_a11], o.save(), o.translate(s.x, s.y), o.rotate((_e35._proportion_ - 1) * n), o.beginPath(), o.setFillStyle(_e35.color), o.moveTo(r.pointer.width, 0), o.lineTo(0, -r.pointer.width / 2), o.lineTo(-h, 0), o.lineTo(0, r.pointer.width / 2), o.lineTo(r.pointer.width, 0), o.closePath(), o.fill(), o.beginPath(), o.setFillStyle("#FFFFFF"), o.arc(0, 0, r.pointer.width / 6, 0, 2 * n, !1), o.fill(), o.restore();}!1 !== a.dataLabel && drawGaugeLabel(r, d, s, a, i, o);}return drawRingTitle(a, i, o, s), 1 === l && "gauge" === a.type && (a.extra.gauge.oldAngle = t[0]._proportion_, a.extra.gauge.oldData = t[0].data), { center: s, radius: d, innerRadius: h, categories: e, totalAngle: x };}function drawRadarDataPoints(e, t, a, o) {var n = Math.cos,l = Math.sin,r = 4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : 1,s = assign({}, { gridColor: "#cccccc", labelColor: "#666666", opacity: .2 }, t.extra.radar),d = getRadarCoordinateSeries(t.categories.length),h = { x: t.area[3] + (t.width - t.area[1] - t.area[3]) / 2, y: t.area[0] + (t.height - t.area[0] - t.area[2]) / 2 },x = Math.min(h.x - (getMaxTextListLength(t.categories) + a.radarLabelTextMargin), h.y - a.radarLabelTextMargin);x -= t.padding[1], o.beginPath(), o.setLineWidth(1 * t.pixelRatio), o.setStrokeStyle(s.gridColor), d.forEach(function (e) {var t = convertCoordinateOrigin(x * n(e), x * l(e), h);o.moveTo(h.x, h.y), o.lineTo(t.x, t.y);}), o.stroke(), o.closePath();for (var c = function c(e) {var i = {};o.beginPath(), o.setLineWidth(1 * t.pixelRatio), o.setStrokeStyle(s.gridColor), d.forEach(function (t, r) {var s = convertCoordinateOrigin(x / a.radarGridCount * e * n(t), x / a.radarGridCount * e * l(t), h);0 === r ? (i = s, o.moveTo(s.x, s.y)) : o.lineTo(s.x, s.y);}), o.lineTo(i.x, i.y), o.stroke(), o.closePath();}, p = 1; p <= a.radarGridCount; p++) {c(p);}var g = getRadarDataPoints(d, h, x, e, t, r);return g.forEach(function (e) {if (o.beginPath(), o.setFillStyle(hexToRgb(e.color, s.opacity)), e.data.forEach(function (e, t) {0 === t ? o.moveTo(e.position.x, e.position.y) : o.lineTo(e.position.x, e.position.y);}), o.closePath(), o.fill(), !1 !== t.dataPointShape) {var i = e.data.map(function (e) {return e.position;});drawPointShape(i, e.color, e.pointShape, o, t);}}), drawRadarLabel(d, x, h, t, a, o), { center: h, radius: x, angleList: d };}function normalInt(e, t, a) {a = 0 == a ? 1 : a;for (var o = [], n = 0; n < a; n++) {o[n] = Math.random();}return Math.floor(o.reduce(function (e, t) {return e + t;}) / a * (t - e)) + e;}function collisionNew(e, t, a, o) {var n = !1;for (var l = 0; l < t.length; l++) {if (t[l].area) if (!(e[3] < t[l].area[1] || e[0] > t[l].area[2] || e[1] > t[l].area[3] || e[2] < t[l].area[0])) {n = !0;break;} else if (0 > e[0] || 0 > e[1] || e[2] > a || e[3] > o) {n = !0;break;} else n = !1;}return n;}function getBoundingBox(e) {var t,a = {};a.xMin = 180, a.xMax = 0, a.yMin = 90, a.yMax = 0;for (var o, n = 0; n < e.length; n++) {o = e[n].geometry.coordinates;for (var l = 0; l < o.length; l++) {t = o[l], 1 == t.length && (t = t[0]);for (var r = 0; r < t.length; r++) {var s = t[r][0],d = t[r][1],h = { x: s, y: d };a.xMin = a.xMin < h.x ? a.xMin : h.x, a.xMax = a.xMax > h.x ? a.xMax : h.x, a.yMin = a.yMin < h.y ? a.yMin : h.y, a.yMax = a.yMax > h.y ? a.yMax : h.y;}}}return a;}function coordinateToPoint(e, t, i, a, o, n) {return { x: (t - i.xMin) * a + o, y: (i.yMax - e) * a + n };}function pointToCoordinate(e, t, i, a, o, n) {return { x: (t - o) / a + i.xMin, y: i.yMax - (e - n) / a };}function isRayIntersectsSegment(e, t, i) {if (t[1] == i[1]) return !1;if (t[1] > e[1] && i[1] > e[1]) return !1;if (t[1] < e[1] && i[1] < e[1]) return !1;if (t[1] == e[1] && i[1] > e[1]) return !1;if (i[1] == e[1] && t[1] > e[1]) return !1;if (t[0] < e[0] && i[1] < e[1]) return !1;var a = i[0] - (i[0] - t[0]) * (i[1] - e[1]) / (i[1] - t[1]);return !(a < e[0]);}function isPoiWithinPoly(e, t) {var i = 0;for (var a, o = 0; o < t.length; o++) {a = t[o][0], 1 == t.length && (a = t[o][0]);for (var _t23 = 0; _t23 < a.length - 1; _t23++) {var _o23 = a[_t23],n = a[_t23 + 1];isRayIntersectsSegment(e, _o23, n) && (i += 1);}}return !(1 != i % 2);}function drawMapDataPoints(e, t, a, o) {var n,l,r = Math.abs,s = assign({}, { border: !0, borderWidth: 1, borderColor: "#666666", fillOpacity: .6, activeBorderColor: "#f04864", activeFillColor: "#facc14", activeFillOpacity: 1 }, t.extra.map),d = e,h = getBoundingBox(d),x = t.width / r(h.xMax - h.xMin),c = t.height / r(h.yMax - h.yMin),p = x < c ? x : c,g = t.width / 2 - r(h.xMax - h.xMin) / 2 * p,y = t.height / 2 - r(h.yMax - h.yMin) / 2 * p;o.beginPath(), o.clearRect(0, 0, t.width, t.height), o.setFillStyle(t.background || "#FFFFFF"), o.rect(0, 0, t.width, t.height), o.fill();for (var f = 0; f < d.length; f++) {o.beginPath(), o.setLineWidth(s.borderWidth * t.pixelRatio), o.setStrokeStyle(s.borderColor), o.setFillStyle(hexToRgb(e[f].color, s.fillOpacity)), t.tooltip && t.tooltip.index == f && (o.setStrokeStyle(s.activeBorderColor), o.setFillStyle(hexToRgb(s.activeFillColor, s.activeFillOpacity)));for (var u = d[f].geometry.coordinates, m = 0; m < u.length; m++) {n = u[m], 1 == n.length && (n = n[0]);for (var S = 0; S < n.length; S++) {l = coordinateToPoint(n[S][1], n[S][0], h, p, g, y), 0 == S ? (o.beginPath(), o.moveTo(l.x, l.y)) : o.lineTo(l.x, l.y);}o.fill(), !0 == s.border && o.stroke();}if (!0 == t.dataLabel) {var T = d[f].properties.centroid;if (T) {l = coordinateToPoint(T[1], T[0], h, p, g, y);var _e36 = d[f].textSize || a.fontSize,_t24 = d[f].properties.name;o.beginPath(), o.setFontSize(_e36), o.setFillStyle(d[f].textColor || "#666666"), o.fillText(_t24, l.x - measureText(_t24, _e36) / 2, l.y + _e36 / 2), o.closePath(), o.stroke();}}}t.chartData.mapData = { bounds: h, scale: p, xoffset: g, yoffset: y }, drawToolTipBridge(t, a, o, 1), o.draw();}function getWordCloudPoint(e, t) {var a = e.series.sort(function (e, t) {return parseInt(t.textSize) - parseInt(e.textSize);});switch (t) {case "normal":for (var _t25 = 0; _t25 < a.length; _t25++) {var i = void 0,_o24 = void 0,n = void 0,l = a[_t25].name,r = a[_t25].textSize,s = measureText(l, r),d = 0;for (;;) {d++, i = normalInt(-e.width / 2, e.width / 2, 5) - s / 2, _o24 = normalInt(-e.height / 2, e.height / 2, 5) + r / 2, n = [i - 5 + e.width / 2, _o24 - 5 - r + e.height / 2, i + s + 5 + e.width / 2, _o24 + 5 + e.height / 2];var _t26 = collisionNew(n, a, e.width, e.height);if (!_t26) break;if (1e3 == d) {n = [-100, -100, -100, -100];break;}}a[_t25].area = n;}break;case "vertical":var o = function o() {return !!(.7 < Math.random());};;for (var _t27 = 0; _t27 < a.length; _t27++) {var _i23 = void 0,_n24 = void 0,_l12 = void 0,_r10 = void 0,_s4 = a[_t27].name,_d3 = a[_t27].textSize,h = measureText(_s4, _d3),x = o(),c = 0;for (;;) {c++;var _t28 = void 0;if (x ? (_i23 = normalInt(-e.width / 2, e.width / 2, 5) - h / 2, _n24 = normalInt(-e.height / 2, e.height / 2, 5) + _d3 / 2, _l12 = [_n24 - 5 - h + e.width / 2, -_i23 - 5 + e.height / 2, _n24 + 5 + e.width / 2, -_i23 + _d3 + 5 + e.height / 2], _r10 = [e.width - (e.width / 2 - e.height / 2) - (-_i23 + _d3 + 5 + e.height / 2) - 5, e.height / 2 - e.width / 2 + (_n24 - 5 - h + e.width / 2) - 5, e.width - (e.width / 2 - e.height / 2) - (-_i23 + _d3 + 5 + e.height / 2) + _d3, e.height / 2 - e.width / 2 + (_n24 - 5 - h + e.width / 2) + h + 5], _t28 = collisionNew(_r10, a, e.height, e.width)) : (_i23 = normalInt(-e.width / 2, e.width / 2, 5) - h / 2, _n24 = normalInt(-e.height / 2, e.height / 2, 5) + _d3 / 2, _l12 = [_i23 - 5 + e.width / 2, _n24 - 5 - _d3 + e.height / 2, _i23 + h + 5 + e.width / 2, _n24 + 5 + e.height / 2], _t28 = collisionNew(_l12, a, e.width, e.height)), !_t28) break;if (1e3 == c) {_l12 = [-1e3, -1e3, -1e3, -1e3];break;}}x ? (a[_t27].area = _r10, a[_t27].areav = _l12) : a[_t27].area = _l12, a[_t27].rotate = x;};}return a;}function drawWordCloudDataPoints(e, t, i, a) {var o = 4 < arguments.length && arguments[4] !== void 0 ? arguments[4] : 1,n = assign({}, { type: "normal", autoColors: !0 }, t.extra.word);a.beginPath(), a.setFillStyle(t.background || "#FFFFFF"), a.rect(0, 0, t.width, t.height), a.fill(), a.save();var l = t.chartData.wordCloudData;a.translate(t.width / 2, t.height / 2);for (var _n25 = 0; _n25 < l.length; _n25++) {a.save(), l[_n25].rotate && a.rotate(90 * Math.PI / 180);var _e37 = l[_n25].name,_i24 = l[_n25].textSize,r = measureText(_e37, _i24);a.beginPath(), a.setStrokeStyle(l[_n25].color), a.setFillStyle(l[_n25].color), a.setFontSize(_i24), l[_n25].rotate ? 0 < l[_n25].areav[0] && (t.tooltip ? t.tooltip.index == _n25 ? a.strokeText(_e37, (l[_n25].areav[0] + 5 - t.width / 2) * o - r * (1 - o) / 2, (l[_n25].areav[1] + 5 + _i24 - t.height / 2) * o) : a.fillText(_e37, (l[_n25].areav[0] + 5 - t.width / 2) * o - r * (1 - o) / 2, (l[_n25].areav[1] + 5 + _i24 - t.height / 2) * o) : a.fillText(_e37, (l[_n25].areav[0] + 5 - t.width / 2) * o - r * (1 - o) / 2, (l[_n25].areav[1] + 5 + _i24 - t.height / 2) * o)) : 0 < l[_n25].area[0] && (t.tooltip ? t.tooltip.index == _n25 ? a.strokeText(_e37, (l[_n25].area[0] + 5 - t.width / 2) * o - r * (1 - o) / 2, (l[_n25].area[1] + 5 + _i24 - t.height / 2) * o) : a.fillText(_e37, (l[_n25].area[0] + 5 - t.width / 2) * o - r * (1 - o) / 2, (l[_n25].area[1] + 5 + _i24 - t.height / 2) * o) : a.fillText(_e37, (l[_n25].area[0] + 5 - t.width / 2) * o - r * (1 - o) / 2, (l[_n25].area[1] + 5 + _i24 - t.height / 2) * o)), a.stroke(), a.restore();}a.restore();}function drawFunnelDataPoints(e, t, i, a) {var o = 4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : 1,n = assign({}, { activeWidth: 10, activeOpacity: .3, border: !1, borderWidth: 2, borderColor: "#FFFFFF", fillOpacity: 1, labelAlign: "right" }, t.extra.funnel),l = (t.height - t.area[0] - t.area[2]) / e.length,r = { x: t.area[3] + (t.width - t.area[1] - t.area[3]) / 2, y: t.height - t.area[2] },s = n.activeWidth,d = Math.min((t.width - t.area[1] - t.area[3]) / 2 - s, (t.height - t.area[0] - t.area[2]) / 2 - s);e = getFunnelDataPoints(e, d, o), a.save(), a.translate(r.x, r.y);for (var _o25 = 0; _o25 < e.length; _o25++) {0 == _o25 ? (t.tooltip && t.tooltip.index == _o25 && (a.beginPath(), a.setFillStyle(hexToRgb(e[_o25].color, n.activeOpacity)), a.moveTo(-s, 0), a.lineTo(-e[_o25].radius - s, -l), a.lineTo(e[_o25].radius + s, -l), a.lineTo(s, 0), a.lineTo(-s, 0), a.closePath(), a.fill()), e[_o25].funnelArea = [r.x - e[_o25].radius, r.y - l, r.x + e[_o25].radius, r.y], a.beginPath(), a.setLineWidth(n.borderWidth * t.pixelRatio), a.setStrokeStyle(n.borderColor), a.setFillStyle(hexToRgb(e[_o25].color, n.fillOpacity)), a.moveTo(0, 0), a.lineTo(-e[_o25].radius, -l), a.lineTo(e[_o25].radius, -l), a.lineTo(0, 0), a.closePath(), a.fill(), !0 == n.border && a.stroke()) : (t.tooltip && t.tooltip.index == _o25 && (a.beginPath(), a.setFillStyle(hexToRgb(e[_o25].color, n.activeOpacity)), a.moveTo(0, 0), a.lineTo(-e[_o25 - 1].radius - s, 0), a.lineTo(-e[_o25].radius - s, -l), a.lineTo(e[_o25].radius + s, -l), a.lineTo(e[_o25 - 1].radius + s, 0), a.lineTo(0, 0), a.closePath(), a.fill()), e[_o25].funnelArea = [r.x - e[_o25].radius, r.y - l * (_o25 + 1), r.x + e[_o25].radius, r.y - l * _o25], a.beginPath(), a.setLineWidth(n.borderWidth * t.pixelRatio), a.setStrokeStyle(n.borderColor), a.setFillStyle(hexToRgb(e[_o25].color, n.fillOpacity)), a.moveTo(0, 0), a.lineTo(-e[_o25 - 1].radius, 0), a.lineTo(-e[_o25].radius, -l), a.lineTo(e[_o25].radius, -l), a.lineTo(e[_o25 - 1].radius, 0), a.lineTo(0, 0), a.closePath(), a.fill(), !0 == n.border && a.stroke()), a.translate(0, -l);}return a.restore(), !1 !== t.dataLabel && 1 === o && drawFunnelText(e, t, a, l, n.labelAlign, s, r), { center: r, radius: d, series: e };}function drawFunnelText(e, t, a, o, n, l, r) {var s = Math.PI;for (var d = 0; d < e.length; d++) {var i = void 0,h = void 0,x = void 0,c = void 0,p = e[d],g = p.format ? p.format(+p._proportion_.toFixed(2)) : util.toFixed(100 * p._proportion_) + "%";"right" == n ? (i = 0 == d ? (p.funnelArea[2] + r.x) / 2 : (p.funnelArea[2] + e[d - 1].funnelArea[2]) / 2, h = i + 2 * l, x = p.funnelArea[1] + o / 2, c = p.textSize || t.fontSize, a.setLineWidth(1 * t.pixelRatio), a.setStrokeStyle(p.color), a.setFillStyle(p.color), a.beginPath(), a.moveTo(i, x), a.lineTo(h, x), a.stroke(), a.closePath(), a.beginPath(), a.moveTo(h, x), a.arc(h, x, 2, 0, 2 * s), a.closePath(), a.fill(), a.beginPath(), a.setFontSize(c), a.setFillStyle(p.textColor || "#666666"), a.fillText(g, h + 5, x + c / 2 - 2), a.closePath(), a.stroke(), a.closePath()) : (i = 0 == d ? (p.funnelArea[0] + r.x) / 2 : (p.funnelArea[0] + e[d - 1].funnelArea[0]) / 2, h = i - 2 * l, x = p.funnelArea[1] + o / 2, c = p.textSize || t.fontSize, a.setLineWidth(1 * t.pixelRatio), a.setStrokeStyle(p.color), a.setFillStyle(p.color), a.beginPath(), a.moveTo(i, x), a.lineTo(h, x), a.stroke(), a.closePath(), a.beginPath(), a.moveTo(h, x), a.arc(h, x, 2, 0, 2 * s), a.closePath(), a.fill(), a.beginPath(), a.setFontSize(c), a.setFillStyle(p.textColor || "#666666"), a.fillText(g, h - 5 - measureText(g), x + c / 2 - 2), a.closePath(), a.stroke(), a.closePath());}}function drawCanvas(e, t) {t.draw();}var Timing = { easeIn: function easeIn(e) {return Math.pow(e, 3);}, easeOut: function easeOut(e) {return Math.pow(e - 1, 3) + 1;}, easeInOut: function easeInOut(e) {var t = Math.pow;return 1 > (e /= .5) ? .5 * t(e, 3) : .5 * (t(e - 2, 3) + 2);}, linear: function linear(e) {return e;} };function Animation(e) {this.isStop = !1, e.duration = "undefined" == typeof e.duration ? 1e3 : e.duration, e.timing = e.timing || "linear";var t = function () {return "undefined" == typeof setTimeout ? "undefined" == typeof requestAnimationFrame ? function (e) {e(null);} : requestAnimationFrame : function (e, t) {setTimeout(function () {var t = +new Date();e(t);}, t);};}(),i = null,_a12 = function a(o) {if (null === o || !0 === this.isStop) return e.onProcess && e.onProcess(1), void (e.onAnimationFinish && e.onAnimationFinish());if (null === i && (i = o), o - i < e.duration) {var n = (o - i) / e.duration,l = Timing[e.timing];n = l(n), e.onProcess && e.onProcess(n), t(_a12, 17);} else e.onProcess && e.onProcess(1), e.onAnimationFinish && e.onAnimationFinish();};_a12 = _a12.bind(this), t(_a12, 17);}Animation.prototype.stop = function () {this.isStop = !0;};function drawCharts(e, t, a, i) {var o = this,n = t.series,l = t.categories;n = fillSeries(n, t, a);var r = t.animation ? t.duration : 0;this.animationInstance && this.animationInstance.stop();var s = null;if ("candle" == e) {var _e38 = assign({}, t.extra.candle.average);_e38.show ? (s = calCandleMA(_e38.day, _e38.name, _e38.color, n[0].data), s = fillSeries(s, t, a), t.seriesMA = s) : t.seriesMA ? s = t.seriesMA = fillSeries(t.seriesMA, t, a) : s = n;} else s = n;t._series_ = n = filterSeries(n), t.area = [,,,,];for (var _o26 = 0; 4 > _o26; _o26++) {t.area[_o26] = t.padding[_o26];}var d = calLegendData(s, t, a, t.chartData),h = d.area.wholeHeight,x = d.area.wholeWidth;switch (t.legend.position) {case "top":t.area[0] += h;break;case "bottom":t.area[2] += h;break;case "left":t.area[3] += x;break;case "right":t.area[1] += x;}var c = {},p = 0;if ("line" === t.type || "column" === t.type || "area" === t.type || "mix" === t.type || "candle" === t.type) {if (c = calYAxisData(n, t, a), p = c.yAxisWidth, t.yAxis.showTitle) {var _e40 = 0;for (var _o28 = 0; _o28 < t.yAxis.data.length; _o28++) {_e40 = Math.max(_e40, t.yAxis.data[_o28].titleFontSize ? t.yAxis.data[_o28].titleFontSize : a.fontSize);}t.area[0] += (_e40 + 6) * t.pixelRatio;}var _e39 = 0,_o27 = 0;for (var _a13 = 0; _a13 < p.length; _a13++) {"left" == p[_a13].position ? (t.area[3] += 0 < _o27 ? p[_a13].width + t.yAxis.padding : p[_a13].width, _o27 += 1) : (t.area[1] += 0 < _e39 ? p[_a13].width + t.yAxis.padding : p[_a13].width, _e39 += 1);}} else a.yAxisWidth = p;if (t.chartData.yAxisData = c, t.categories && t.categories.length) {t.chartData.xAxisData = getXAxisPoints(t.categories, t, a);var _e41 = calCategoriesData(t.categories, t, a, t.chartData.xAxisData.eachSpacing),_i25 = _e41.xAxisHeight,_o29 = _e41.angle;a.xAxisHeight = _i25, a._xAxisTextAngle_ = _o29, t.area[2] += _i25, t.chartData.categoriesData = _e41;} else t.chartData.xAxisData = { xAxisPoints: [] };if (t.enableScroll && "right" == t.xAxis.scrollAlign && void 0 === t._scrollDistance_) {var _e42 = 0,_i26 = t.chartData.xAxisData.xAxisPoints,_a14 = t.chartData.xAxisData.startX,_n26 = t.chartData.xAxisData.endX,_l13 = t.chartData.xAxisData.eachSpacing,_r11 = _l13 * (_i26.length - 1);_e42 = _n26 - _a14 - _r11, o.scrollOption = { currentOffset: _e42, startTouchX: _e42, distance: 0, lastMoveTime: 0 }, t._scrollDistance_ = _e42;}switch (("pie" === e || "ring" === e || "rose" === e) && (a._pieTextMaxLength_ = !1 === t.dataLabel ? 0 : getPieTextMaxLength(s)), e) {case "word":var _d4 = assign({}, { type: "normal", autoColors: !0 }, t.extra.word);(!0 == t.updateData || null == t.updateData) && (t.chartData.wordCloudData = getWordCloudPoint(t, _d4.type)), this.animationInstance = new Animation({ timing: "easeInOut", duration: r, onProcess: function onProcess(e) {i.clearRect(0, 0, t.width, t.height), t.rotate && contextRotate(i, t), drawWordCloudDataPoints(n, t, a, i, e), drawCanvas(t, i);}, onAnimationFinish: function onAnimationFinish() {o.event.trigger("renderComplete");} });break;case "map":i.clearRect(0, 0, t.width, t.height), drawMapDataPoints(n, t, a, i);break;case "funnel":this.animationInstance = new Animation({ timing: "easeInOut", duration: r, onProcess: function onProcess(e) {i.clearRect(0, 0, t.width, t.height), t.rotate && contextRotate(i, t), t.chartData.funnelData = drawFunnelDataPoints(n, t, a, i, e), drawLegend(t.series, t, a, i, t.chartData), drawToolTipBridge(t, a, i, e), drawCanvas(t, i);}, onAnimationFinish: function onAnimationFinish() {o.event.trigger("renderComplete");} });break;case "line":this.animationInstance = new Animation({ timing: "easeIn", duration: r, onProcess: function onProcess(e) {i.clearRect(0, 0, t.width, t.height), t.rotate && contextRotate(i, t), drawYAxisGrid(l, t, a, i), drawXAxis(l, t, a, i);var o = drawLineDataPoints(n, t, a, i, e),r = o.xAxisPoints,s = o.calPoints,d = o.eachSpacing;t.chartData.xAxisPoints = r, t.chartData.calPoints = s, t.chartData.eachSpacing = d, drawYAxis(n, t, a, i), !1 !== t.enableMarkLine && 1 === e && drawMarkLine(t, a, i), drawLegend(t.series, t, a, i, t.chartData), drawToolTipBridge(t, a, i, e, d, r), drawCanvas(t, i);}, onAnimationFinish: function onAnimationFinish() {o.event.trigger("renderComplete");} });break;case "mix":this.animationInstance = new Animation({ timing: "easeIn", duration: r, onProcess: function onProcess(e) {i.clearRect(0, 0, t.width, t.height), t.rotate && contextRotate(i, t), drawYAxisGrid(l, t, a, i), drawXAxis(l, t, a, i);var o = drawMixDataPoints(n, t, a, i, e),r = o.xAxisPoints,s = o.calPoints,d = o.eachSpacing;t.chartData.xAxisPoints = r, t.chartData.calPoints = s, t.chartData.eachSpacing = d, drawYAxis(n, t, a, i), !1 !== t.enableMarkLine && 1 === e && drawMarkLine(t, a, i), drawLegend(t.series, t, a, i, t.chartData), drawToolTipBridge(t, a, i, e, d, r), drawCanvas(t, i);}, onAnimationFinish: function onAnimationFinish() {o.event.trigger("renderComplete");} });break;case "column":this.animationInstance = new Animation({ timing: "easeIn", duration: r, onProcess: function onProcess(e) {i.clearRect(0, 0, t.width, t.height), t.rotate && contextRotate(i, t), drawYAxisGrid(l, t, a, i), drawXAxis(l, t, a, i);var o = drawColumnDataPoints(n, t, a, i, e),r = o.xAxisPoints,s = o.calPoints,d = o.eachSpacing;t.chartData.xAxisPoints = r, t.chartData.calPoints = s, t.chartData.eachSpacing = d, drawYAxis(n, t, a, i), !1 !== t.enableMarkLine && 1 === e && drawMarkLine(t, a, i), drawLegend(t.series, t, a, i, t.chartData), drawToolTipBridge(t, a, i, e, d, r), drawCanvas(t, i);}, onAnimationFinish: function onAnimationFinish() {o.event.trigger("renderComplete");} });break;case "area":this.animationInstance = new Animation({ timing: "easeIn", duration: r, onProcess: function onProcess(e) {i.clearRect(0, 0, t.width, t.height), t.rotate && contextRotate(i, t), drawYAxisGrid(l, t, a, i), drawXAxis(l, t, a, i);var o = drawAreaDataPoints(n, t, a, i, e),r = o.xAxisPoints,s = o.calPoints,d = o.eachSpacing;t.chartData.xAxisPoints = r, t.chartData.calPoints = s, t.chartData.eachSpacing = d, drawYAxis(n, t, a, i), !1 !== t.enableMarkLine && 1 === e && drawMarkLine(t, a, i), drawLegend(t.series, t, a, i, t.chartData), drawToolTipBridge(t, a, i, e, d, r), drawCanvas(t, i);}, onAnimationFinish: function onAnimationFinish() {o.event.trigger("renderComplete");} });break;case "ring":case "pie":this.animationInstance = new Animation({ timing: "easeInOut", duration: r, onProcess: function onProcess(e) {i.clearRect(0, 0, t.width, t.height), t.rotate && contextRotate(i, t), t.chartData.pieData = drawPieDataPoints(n, t, a, i, e), drawLegend(t.series, t, a, i, t.chartData), drawToolTipBridge(t, a, i, e), drawCanvas(t, i);}, onAnimationFinish: function onAnimationFinish() {o.event.trigger("renderComplete");} });break;case "rose":this.animationInstance = new Animation({ timing: "easeInOut", duration: r, onProcess: function onProcess(e) {i.clearRect(0, 0, t.width, t.height), t.rotate && contextRotate(i, t), t.chartData.pieData = drawRoseDataPoints(n, t, a, i, e), drawLegend(t.series, t, a, i, t.chartData), drawToolTipBridge(t, a, i, e), drawCanvas(t, i);}, onAnimationFinish: function onAnimationFinish() {o.event.trigger("renderComplete");} });break;case "radar":this.animationInstance = new Animation({ timing: "easeInOut", duration: r, onProcess: function onProcess(e) {i.clearRect(0, 0, t.width, t.height), t.rotate && contextRotate(i, t), t.chartData.radarData = drawRadarDataPoints(n, t, a, i, e), drawLegend(t.series, t, a, i, t.chartData), drawToolTipBridge(t, a, i, e), drawCanvas(t, i);}, onAnimationFinish: function onAnimationFinish() {o.event.trigger("renderComplete");} });break;case "arcbar":this.animationInstance = new Animation({ timing: "easeInOut", duration: r, onProcess: function onProcess(e) {i.clearRect(0, 0, t.width, t.height), t.rotate && contextRotate(i, t), t.chartData.arcbarData = drawArcbarDataPoints(n, t, a, i, e), drawCanvas(t, i);}, onAnimationFinish: function onAnimationFinish() {o.event.trigger("renderComplete");} });break;case "gauge":this.animationInstance = new Animation({ timing: "easeInOut", duration: r, onProcess: function onProcess(e) {i.clearRect(0, 0, t.width, t.height), t.rotate && contextRotate(i, t), t.chartData.gaugeData = drawGaugeDataPoints(l, n, t, a, i, e), drawCanvas(t, i);}, onAnimationFinish: function onAnimationFinish() {o.event.trigger("renderComplete");} });break;case "candle":this.animationInstance = new Animation({ timing: "easeIn", duration: r, onProcess: function onProcess(e) {i.clearRect(0, 0, t.width, t.height), t.rotate && contextRotate(i, t), drawYAxisGrid(l, t, a, i), drawXAxis(l, t, a, i);var o = drawCandleDataPoints(n, s, t, a, i, e),r = o.xAxisPoints,d = o.calPoints,h = o.eachSpacing;t.chartData.xAxisPoints = r, t.chartData.calPoints = d, t.chartData.eachSpacing = h, drawYAxis(n, t, a, i), !1 !== t.enableMarkLine && 1 === e && drawMarkLine(t, a, i), s ? drawLegend(s, t, a, i, t.chartData) : drawLegend(t.series, t, a, i, t.chartData), drawToolTipBridge(t, a, i, e, h, r), drawCanvas(t, i);}, onAnimationFinish: function onAnimationFinish() {o.event.trigger("renderComplete");} });}}function Event() {this.events = {};}Event.prototype.addEventListener = function (e, t) {this.events[e] = this.events[e] || [], this.events[e].push(t);}, Event.prototype.trigger = function () {for (var e = arguments.length, t = Array(e), i = 0; i < e; i++) {t[i] = arguments[i];}var a = t[0],o = t.slice(1);!this.events[a] || this.events[a].forEach(function (e) {try {e.apply(null, o);} catch (t) {console.error(t);}});};var Charts = function Charts(e) {e.pixelRatio = e.pixelRatio ? e.pixelRatio : 1, e.fontSize = e.fontSize ? e.fontSize * e.pixelRatio : 13 * e.pixelRatio, e.title = assign({}, e.title), e.subtitle = assign({}, e.subtitle), e.duration = e.duration ? e.duration : 1e3, e.yAxis = assign({}, { data: [], showTitle: !1, disabled: !1, disableGrid: !1, splitNumber: 5, gridType: "solid", dashLength: 4 * e.pixelRatio, gridColor: "#cccccc", padding: 10, fontColor: "#666666" }, e.yAxis), e.yAxis.dashLength *= e.pixelRatio, e.yAxis.padding *= e.pixelRatio, e.xAxis = assign({}, { rotateLabel: !1, type: "calibration", gridType: "solid", dashLength: 4, scrollAlign: "left", boundaryGap: "center", axisLine: !0, axisLineColor: "#cccccc" }, e.xAxis), e.xAxis.dashLength *= e.pixelRatio, e.legend = assign({}, { show: !0, position: "bottom", float: "center", backgroundColor: "rgba(0,0,0,0)", borderColor: "rgba(0,0,0,0)", borderWidth: 0, padding: 5, margin: 5, itemGap: 10, fontSize: e.fontSize, lineHeight: e.fontSize, fontColor: "#333333", format: {}, hiddenColor: "#CECECE" }, e.legend), e.legend.borderWidth *= e.pixelRatio, e.legend.itemGap *= e.pixelRatio, e.legend.padding *= e.pixelRatio, e.legend.margin *= e.pixelRatio, e.extra = assign({}, e.extra), e.rotate = !!e.rotate, e.animation = !!e.animation;var t = JSON.parse(JSON.stringify(config));if (t.colors = e.colors ? e.colors : t.colors, t.yAxisTitleWidth = !0 !== e.yAxis.disabled && e.yAxis.title ? t.yAxisTitleWidth : 0, ("pie" == e.type || "ring" == e.type) && (t.pieChartLinePadding = !1 === e.dataLabel ? 0 : e.extra.pie.labelWidth * e.pixelRatio || t.pieChartLinePadding * e.pixelRatio), "rose" == e.type && (t.pieChartLinePadding = !1 === e.dataLabel ? 0 : e.extra.rose.labelWidth * e.pixelRatio || t.pieChartLinePadding * e.pixelRatio), t.pieChartTextPadding = !1 === e.dataLabel ? 0 : t.pieChartTextPadding * e.pixelRatio, t.yAxisSplit = e.yAxis.splitNumber ? e.yAxis.splitNumber : config.yAxisSplit, t.rotate = e.rotate, e.rotate) {var _t29 = e.width,i = e.height;e.width = i, e.height = _t29;}e.padding = e.padding ? e.padding : t.padding;for (var _t30 = 0; 4 > _t30; _t30++) {e.padding[_t30] *= e.pixelRatio;}t.yAxisWidth = config.yAxisWidth * e.pixelRatio, t.xAxisHeight = config.xAxisHeight * e.pixelRatio, e.enableScroll && e.xAxis.scrollShow && (t.xAxisHeight += 6 * e.pixelRatio), t.xAxisLineHeight = config.xAxisLineHeight * e.pixelRatio, t.fontSize = e.fontSize, t.titleFontSize = config.titleFontSize * e.pixelRatio, t.subtitleFontSize = config.subtitleFontSize * e.pixelRatio, t.toolTipPadding = config.toolTipPadding * e.pixelRatio, t.toolTipLineHeight = config.toolTipLineHeight * e.pixelRatio, t.columePadding = config.columePadding * e.pixelRatio, e.$this = e.$this ? e.$this : this, this.context = uni.createCanvasContext(e.canvasId, e.$this), e.chartData = {}, this.event = new Event(), this.scrollOption = { currentOffset: 0, startTouchX: 0, distance: 0, lastMoveTime: 0 }, this.opts = e, this.config = t, drawCharts.call(this, e.type, e, t, this.context);};Charts.prototype.updateData = function () {var e = 0 < arguments.length && arguments[0] !== void 0 ? arguments[0] : {};this.opts = assign({}, this.opts, e), this.opts.updateData = !0;var t = e.scrollPosition || "current";switch (t) {case "current":this.opts._scrollDistance_ = this.scrollOption.currentOffset;break;case "left":this.opts._scrollDistance_ = 0, this.scrollOption = { currentOffset: 0, startTouchX: 0, distance: 0, lastMoveTime: 0 };break;case "right":var _e43 = calYAxisData(this.opts.series, this.opts, this.config),i = _e43.yAxisWidth;this.config.yAxisWidth = i;var a = 0,o = getXAxisPoints(this.opts.categories, this.opts, this.config),n = o.xAxisPoints,l = o.startX,r = o.endX,s = o.eachSpacing,d = s * (n.length - 1);a = r - l - d, this.scrollOption = { currentOffset: a, startTouchX: a, distance: 0, lastMoveTime: 0 }, this.opts._scrollDistance_ = a;}drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);}, Charts.prototype.zoom = function () {var e = Math.round,t = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : this.opts.xAxis.itemCount;if (!0 !== this.opts.enableScroll) return void console.log("\u8BF7\u542F\u7528\u6EDA\u52A8\u6761\u540E\u4F7F\u7528\uFF01");var i = e(Math.abs(this.scrollOption.currentOffset) / this.opts.chartData.eachSpacing) + e(this.opts.xAxis.itemCount / 2);this.opts.animation = !1, this.opts.xAxis.itemCount = t.itemCount;var a = calYAxisData(this.opts.series, this.opts, this.config),o = a.yAxisWidth;this.config.yAxisWidth = o;var n = 0,l = getXAxisPoints(this.opts.categories, this.opts, this.config),r = l.xAxisPoints,s = l.startX,d = l.endX,h = l.eachSpacing,x = d - s,c = x - h * (r.length - 1);n = x / 2 - h * i, 0 < n && (n = 0), n < c && (n = c), this.scrollOption = { currentOffset: n, startTouchX: n, distance: 0, lastMoveTime: 0 }, this.opts._scrollDistance_ = n, drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);}, Charts.prototype.stopAnimation = function () {this.animationInstance && this.animationInstance.stop();}, Charts.prototype.addEventListener = function (e, t) {this.event.addEventListener(e, t);}, Charts.prototype.getCurrentDataIndex = function (t) {var e = null;if (e = t.changedTouches ? t.changedTouches[0] : t.mp.changedTouches[0], e) {var i = getTouches(e, this.opts, t);return "pie" === this.opts.type || "ring" === this.opts.type || "rose" === this.opts.type ? findPieChartCurrentIndex({ x: i.x, y: i.y }, this.opts.chartData.pieData) : "radar" === this.opts.type ? findRadarChartCurrentIndex({ x: i.x, y: i.y }, this.opts.chartData.radarData, this.opts.categories.length) : "funnel" === this.opts.type ? findFunnelChartCurrentIndex({ x: i.x, y: i.y }, this.opts.chartData.funnelData) : "map" === this.opts.type ? findMapChartCurrentIndex({ x: i.x, y: i.y }, this.opts) : "word" === this.opts.type ? findWordChartCurrentIndex({ x: i.x, y: i.y }, this.opts.chartData.wordCloudData) : findCurrentIndex({ x: i.x, y: i.y }, this.opts.chartData.xAxisPoints, this.opts, this.config, Math.abs(this.scrollOption.currentOffset));}return -1;}, Charts.prototype.getLegendDataIndex = function (t) {var e = null;if (e = t.changedTouches ? t.changedTouches[0] : t.mp.changedTouches[0], e) {var i = getTouches(e, this.opts, t);return findLegendIndex({ x: i.x, y: i.y }, this.opts.chartData.legendData);}return -1;}, Charts.prototype.touchLegend = function (t) {var e = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {},i = null;if (i = t.changedTouches ? t.changedTouches[0] : t.mp.changedTouches[0], i) {var a = getTouches(i, this.opts, t),o = this.getLegendDataIndex(t);0 <= o && (this.opts.series[o].show = !this.opts.series[o].show, this.opts.animation = !!e.animation, this.opts._scrollDistance_ = this.scrollOption.currentOffset, drawCharts.call(this, this.opts.type, this.opts, this.config, this.context));}}, Charts.prototype.showToolTip = function (t) {var e = 1 < arguments.length && arguments[1] !== void 0 ? arguments[1] : {},i = null;i = t.changedTouches ? t.changedTouches[0] : t.mp.changedTouches[0], i || console.log("touchError");var a = getTouches(i, this.opts, t),o = this.scrollOption.currentOffset,n = assign({}, this.opts, { _scrollDistance_: o, animation: !1 });if ("line" === this.opts.type || "area" === this.opts.type || "column" === this.opts.type) {var l = this.getCurrentDataIndex(t);if (-1 < l) {var r = getSeriesDataItem(this.opts.series, l);if (0 !== r.length) {var s = getToolTipData(r, this.opts.chartData.calPoints, l, this.opts.categories, e),d = s.textList,h = s.offset;h.y = a.y, n.tooltip = { textList: d, offset: h, option: e, index: l };}}drawCharts.call(this, n.type, n, this.config, this.context);}if ("mix" === this.opts.type) {var l = this.getCurrentDataIndex(t);if (-1 < l) {var o = this.scrollOption.currentOffset,n = assign({}, this.opts, { _scrollDistance_: o, animation: !1 }),r = getSeriesDataItem(this.opts.series, l);if (0 !== r.length) {var x = getMixToolTipData(r, this.opts.chartData.calPoints, l, this.opts.categories, e),d = x.textList,h = x.offset;h.y = a.y, n.tooltip = { textList: d, offset: h, option: e, index: l };}}drawCharts.call(this, n.type, n, this.config, this.context);}if ("candle" === this.opts.type) {var l = this.getCurrentDataIndex(t);if (-1 < l) {var o = this.scrollOption.currentOffset,n = assign({}, this.opts, { _scrollDistance_: o, animation: !1 }),r = getSeriesDataItem(this.opts.series, l);if (0 !== r.length) {var s = getCandleToolTipData(this.opts.series[0].data, r, this.opts.chartData.calPoints, l, this.opts.categories, this.opts.extra.candle, e),d = s.textList,h = s.offset;h.y = a.y, n.tooltip = { textList: d, offset: h, option: e, index: l };}}drawCharts.call(this, n.type, n, this.config, this.context);}if ("pie" === this.opts.type || "ring" === this.opts.type || "rose" === this.opts.type || "funnel" === this.opts.type) {var l = this.getCurrentDataIndex(t);if (-1 < l) {var o = this.scrollOption.currentOffset,n = assign({}, this.opts, { _scrollDistance_: o, animation: !1 }),r = this.opts._series_[l],d = [{ text: e.format ? e.format(r) : r.name + ": " + r.data, color: r.color }],h = { x: a.x, y: a.y };n.tooltip = { textList: d, offset: h, option: e, index: l };}drawCharts.call(this, n.type, n, this.config, this.context);}if ("map" === this.opts.type || "word" === this.opts.type) {var l = this.getCurrentDataIndex(t);if (-1 < l) {var o = this.scrollOption.currentOffset,n = assign({}, this.opts, { _scrollDistance_: o, animation: !1 }),r = this.opts._series_[l],d = [{ text: e.format ? e.format(r) : r.properties.name, color: r.color }],h = { x: a.x, y: a.y };n.tooltip = { textList: d, offset: h, option: e, index: l };}n.updateData = !1, drawCharts.call(this, n.type, n, this.config, this.context);}if ("radar" === this.opts.type) {var l = this.getCurrentDataIndex(t);if (-1 < l) {var o = this.scrollOption.currentOffset,n = assign({}, this.opts, { _scrollDistance_: o, animation: !1 }),r = getSeriesDataItem(this.opts.series, l);if (0 !== r.length) {var d = r.map(function (t) {return { text: e.format ? e.format(t) : t.name + ": " + t.data, color: t.color };}),h = { x: a.x, y: a.y };n.tooltip = { textList: d, offset: h, option: e, index: l };}}drawCharts.call(this, n.type, n, this.config, this.context);}}, Charts.prototype.translate = function (e) {this.scrollOption = { currentOffset: e, startTouchX: e, distance: 0, lastMoveTime: 0 };var t = assign({}, this.opts, { _scrollDistance_: e, animation: !1 });drawCharts.call(this, this.opts.type, t, this.config, this.context);}, Charts.prototype.scrollStart = function (t) {var e = null;e = t.changedTouches ? t.changedTouches[0] : t.mp.changedTouches[0];var i = getTouches(e, this.opts, t);e && !0 === this.opts.enableScroll && (this.scrollOption.startTouchX = i.x);}, Charts.prototype.scroll = function (t) {0 === this.scrollOption.lastMoveTime && (this.scrollOption.lastMoveTime = Date.now());var e = this.opts.extra.touchMoveLimit || 20,i = Date.now(),a = i - this.scrollOption.lastMoveTime;if (!(a < Math.floor(1e3 / e))) {this.scrollOption.lastMoveTime = i;var o = null;if (o = t.changedTouches ? t.changedTouches[0] : t.mp.changedTouches[0], o && !0 === this.opts.enableScroll) {var n,l = getTouches(o, this.opts, t);n = l.x - this.scrollOption.startTouchX;var r = this.scrollOption.currentOffset,s = calValidDistance(this, r + n, this.opts.chartData, this.config, this.opts);this.scrollOption.distance = n = s - r;var d = assign({}, this.opts, { _scrollDistance_: r + n, animation: !1 });return drawCharts.call(this, d.type, d, this.config, this.context), r + n;}}}, Charts.prototype.scrollEnd = function () {if (!0 === this.opts.enableScroll) {var e = this.scrollOption,t = e.currentOffset,i = e.distance;this.scrollOption.currentOffset = t + i, this.scrollOption.distance = 0;}}, true && "object" == typeof module.exports && (module.exports = Charts);
  12213. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  12214. /***/ })
  12215. }]);
  12216. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map