vendor.js 399 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],{
  2. /***/ 1:
  3. /*!*********************************************************!*\
  4. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js ***!
  5. \*********************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. "use strict";
  9. Object.defineProperty(exports, "__esModule", {
  10. value: true
  11. });
  12. exports.default = void 0;
  13. var objectKeys = ['qy', 'env', 'error', 'version', 'lanDebug', 'cloud', 'serviceMarket', 'router', 'worklet', '__webpack_require_UNI_MP_PLUGIN__'];
  14. var singlePageDisableKey = ['lanDebug', 'router', 'worklet'];
  15. var target = typeof globalThis !== 'undefined' ? globalThis : function () {
  16. return this;
  17. }();
  18. var key = ['w', 'x'].join('');
  19. var oldWx = target[key];
  20. var launchOption = oldWx.getLaunchOptionsSync ? oldWx.getLaunchOptionsSync() : null;
  21. function isWxKey(key) {
  22. if (launchOption && launchOption.scene === 1154 && singlePageDisableKey.includes(key)) {
  23. return false;
  24. }
  25. return objectKeys.indexOf(key) > -1 || typeof oldWx[key] === 'function';
  26. }
  27. function initWx() {
  28. var newWx = {};
  29. for (var _key in oldWx) {
  30. if (isWxKey(_key)) {
  31. // TODO wrapper function
  32. newWx[_key] = oldWx[_key];
  33. }
  34. }
  35. return newWx;
  36. }
  37. target[key] = initWx();
  38. var _default = target[key];
  39. exports.default = _default;
  40. /***/ }),
  41. /***/ 10:
  42. /*!****************************************************************!*\
  43. !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
  44. \****************************************************************/
  45. /*! no static exports found */
  46. /***/ (function(module, exports) {
  47. function _nonIterableRest() {
  48. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  49. }
  50. module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
  51. /***/ }),
  52. /***/ 11:
  53. /*!***************************************************************!*\
  54. !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
  55. \***************************************************************/
  56. /*! no static exports found */
  57. /***/ (function(module, exports, __webpack_require__) {
  58. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  59. function _defineProperty(obj, key, value) {
  60. key = toPropertyKey(key);
  61. if (key in obj) {
  62. Object.defineProperty(obj, key, {
  63. value: value,
  64. enumerable: true,
  65. configurable: true,
  66. writable: true
  67. });
  68. } else {
  69. obj[key] = value;
  70. }
  71. return obj;
  72. }
  73. module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
  74. /***/ }),
  75. /***/ 12:
  76. /*!**************************************************************!*\
  77. !*** ./node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
  78. \**************************************************************/
  79. /*! no static exports found */
  80. /***/ (function(module, exports, __webpack_require__) {
  81. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  82. var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ 14);
  83. function _toPropertyKey(arg) {
  84. var key = toPrimitive(arg, "string");
  85. return _typeof(key) === "symbol" ? key : String(key);
  86. }
  87. module.exports = _toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
  88. /***/ }),
  89. /***/ 120:
  90. /*!***************************************************************!*\
  91. !*** E:/work/Project_newGit/UniappShell/api/system/msgApi.js ***!
  92. \***************************************************************/
  93. /*! no static exports found */
  94. /***/ (function(module, exports, __webpack_require__) {
  95. "use strict";
  96. Object.defineProperty(exports, "__esModule", {
  97. value: true
  98. });
  99. exports.deleteMsgById = deleteMsgById;
  100. exports.getMsgById = getMsgById;
  101. exports.getMsgReceivedByPage = getMsgReceivedByPage;
  102. exports.getMsgSentByPage = getMsgSentByPage;
  103. exports.getUnReadCounter = getUnReadCounter;
  104. exports.putAllReadStatus = putAllReadStatus;
  105. exports.putReadStatus = putReadStatus;
  106. exports.sendMsg = sendMsg;
  107. var _request = __webpack_require__(/*! @/libs/request.js */ 43);
  108. /**
  109. * 分页查询发送消息
  110. * @param data
  111. * @returns
  112. */
  113. function getMsgSentByPage(data) {
  114. return (0, _request.request)({
  115. url: '/msg/sent/page',
  116. method: 'GET',
  117. data: data
  118. });
  119. }
  120. /**
  121. * 分页查询接收消息
  122. * @param data
  123. * @returns
  124. */
  125. function getMsgReceivedByPage(data) {
  126. return (0, _request.request)({
  127. url: '/msg/received/page',
  128. method: 'GET',
  129. data: data
  130. });
  131. }
  132. /**
  133. * 基于ID获取消息详情
  134. * @param msgId
  135. * @returns
  136. */
  137. function getMsgById(msgId) {
  138. return (0, _request.request)({
  139. url: "/msg/".concat(msgId),
  140. method: 'GET'
  141. });
  142. }
  143. /**
  144. * 基于ID置已读状态
  145. * @param msgId
  146. * @returns
  147. */
  148. function putReadStatus(msgId) {
  149. return (0, _request.request)({
  150. url: "/msg/read/".concat(msgId),
  151. method: 'PUT'
  152. });
  153. }
  154. /**
  155. * 获取未读消息数目
  156. * @returns
  157. */
  158. function getUnReadCounter() {
  159. return (0, _request.request)({
  160. url: "/msg/unread/count",
  161. method: 'GET'
  162. });
  163. }
  164. /**
  165. * 发送消息
  166. * @param data
  167. * @returns
  168. */
  169. function sendMsg(data) {
  170. return (0, _request.request)({
  171. url: "/msg/send",
  172. method: 'POST',
  173. data: data
  174. });
  175. }
  176. /**
  177. * 删除消息
  178. * @param msgId
  179. * @returns
  180. */
  181. function deleteMsgById(msgId) {
  182. return (0, _request.request)({
  183. url: "/msg/".concat(msgId),
  184. method: 'DELETE'
  185. });
  186. }
  187. /**
  188. * 全部已读
  189. * @param msgId
  190. * @returns
  191. */
  192. function putAllReadStatus() {
  193. return (0, _request.request)({
  194. url: "/msg/all/read",
  195. method: 'PUT'
  196. });
  197. }
  198. /***/ }),
  199. /***/ 13:
  200. /*!*******************************************************!*\
  201. !*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
  202. \*******************************************************/
  203. /*! no static exports found */
  204. /***/ (function(module, exports) {
  205. function _typeof(obj) {
  206. "@babel/helpers - typeof";
  207. return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
  208. return typeof obj;
  209. } : function (obj) {
  210. return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  211. }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
  212. }
  213. module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
  214. /***/ }),
  215. /***/ 14:
  216. /*!************************************************************!*\
  217. !*** ./node_modules/@babel/runtime/helpers/toPrimitive.js ***!
  218. \************************************************************/
  219. /*! no static exports found */
  220. /***/ (function(module, exports, __webpack_require__) {
  221. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  222. function _toPrimitive(input, hint) {
  223. if (_typeof(input) !== "object" || input === null) return input;
  224. var prim = input[Symbol.toPrimitive];
  225. if (prim !== undefined) {
  226. var res = prim.call(input, hint || "default");
  227. if (_typeof(res) !== "object") return res;
  228. throw new TypeError("@@toPrimitive must return a primitive value.");
  229. }
  230. return (hint === "string" ? String : Number)(input);
  231. }
  232. module.exports = _toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
  233. /***/ }),
  234. /***/ 15:
  235. /*!**********************************************************!*\
  236. !*** ./node_modules/@babel/runtime/helpers/construct.js ***!
  237. \**********************************************************/
  238. /*! no static exports found */
  239. /***/ (function(module, exports, __webpack_require__) {
  240. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  241. var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ 17);
  242. function _construct(Parent, args, Class) {
  243. if (isNativeReflectConstruct()) {
  244. module.exports = _construct = Reflect.construct.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports;
  245. } else {
  246. module.exports = _construct = function _construct(Parent, args, Class) {
  247. var a = [null];
  248. a.push.apply(a, args);
  249. var Constructor = Function.bind.apply(Parent, a);
  250. var instance = new Constructor();
  251. if (Class) setPrototypeOf(instance, Class.prototype);
  252. return instance;
  253. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  254. }
  255. return _construct.apply(null, arguments);
  256. }
  257. module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  258. /***/ }),
  259. /***/ 150:
  260. /*!**********************************************************************************************!*\
  261. !*** E:/work/Project_newGit/UniappShell/uni_modules/uni-icons/components/uni-icons/icons.js ***!
  262. \**********************************************************************************************/
  263. /*! no static exports found */
  264. /***/ (function(module, exports, __webpack_require__) {
  265. "use strict";
  266. Object.defineProperty(exports, "__esModule", {
  267. value: true
  268. });
  269. exports.default = void 0;
  270. var _default = {
  271. "id": "2852637",
  272. "name": "uniui图标库",
  273. "font_family": "uniicons",
  274. "css_prefix_text": "uniui-",
  275. "description": "",
  276. "glyphs": [{
  277. "icon_id": "25027049",
  278. "name": "yanse",
  279. "font_class": "color",
  280. "unicode": "e6cf",
  281. "unicode_decimal": 59087
  282. }, {
  283. "icon_id": "25027048",
  284. "name": "wallet",
  285. "font_class": "wallet",
  286. "unicode": "e6b1",
  287. "unicode_decimal": 59057
  288. }, {
  289. "icon_id": "25015720",
  290. "name": "settings-filled",
  291. "font_class": "settings-filled",
  292. "unicode": "e6ce",
  293. "unicode_decimal": 59086
  294. }, {
  295. "icon_id": "25015434",
  296. "name": "shimingrenzheng-filled",
  297. "font_class": "auth-filled",
  298. "unicode": "e6cc",
  299. "unicode_decimal": 59084
  300. }, {
  301. "icon_id": "24934246",
  302. "name": "shop-filled",
  303. "font_class": "shop-filled",
  304. "unicode": "e6cd",
  305. "unicode_decimal": 59085
  306. }, {
  307. "icon_id": "24934159",
  308. "name": "staff-filled-01",
  309. "font_class": "staff-filled",
  310. "unicode": "e6cb",
  311. "unicode_decimal": 59083
  312. }, {
  313. "icon_id": "24932461",
  314. "name": "VIP-filled",
  315. "font_class": "vip-filled",
  316. "unicode": "e6c6",
  317. "unicode_decimal": 59078
  318. }, {
  319. "icon_id": "24932462",
  320. "name": "plus_circle_fill",
  321. "font_class": "plus-filled",
  322. "unicode": "e6c7",
  323. "unicode_decimal": 59079
  324. }, {
  325. "icon_id": "24932463",
  326. "name": "folder_add-filled",
  327. "font_class": "folder-add-filled",
  328. "unicode": "e6c8",
  329. "unicode_decimal": 59080
  330. }, {
  331. "icon_id": "24932464",
  332. "name": "yanse-filled",
  333. "font_class": "color-filled",
  334. "unicode": "e6c9",
  335. "unicode_decimal": 59081
  336. }, {
  337. "icon_id": "24932465",
  338. "name": "tune-filled",
  339. "font_class": "tune-filled",
  340. "unicode": "e6ca",
  341. "unicode_decimal": 59082
  342. }, {
  343. "icon_id": "24932455",
  344. "name": "a-rilidaka-filled",
  345. "font_class": "calendar-filled",
  346. "unicode": "e6c0",
  347. "unicode_decimal": 59072
  348. }, {
  349. "icon_id": "24932456",
  350. "name": "notification-filled",
  351. "font_class": "notification-filled",
  352. "unicode": "e6c1",
  353. "unicode_decimal": 59073
  354. }, {
  355. "icon_id": "24932457",
  356. "name": "wallet-filled",
  357. "font_class": "wallet-filled",
  358. "unicode": "e6c2",
  359. "unicode_decimal": 59074
  360. }, {
  361. "icon_id": "24932458",
  362. "name": "paihangbang-filled",
  363. "font_class": "medal-filled",
  364. "unicode": "e6c3",
  365. "unicode_decimal": 59075
  366. }, {
  367. "icon_id": "24932459",
  368. "name": "gift-filled",
  369. "font_class": "gift-filled",
  370. "unicode": "e6c4",
  371. "unicode_decimal": 59076
  372. }, {
  373. "icon_id": "24932460",
  374. "name": "fire-filled",
  375. "font_class": "fire-filled",
  376. "unicode": "e6c5",
  377. "unicode_decimal": 59077
  378. }, {
  379. "icon_id": "24928001",
  380. "name": "refreshempty",
  381. "font_class": "refreshempty",
  382. "unicode": "e6bf",
  383. "unicode_decimal": 59071
  384. }, {
  385. "icon_id": "24926853",
  386. "name": "location-ellipse",
  387. "font_class": "location-filled",
  388. "unicode": "e6af",
  389. "unicode_decimal": 59055
  390. }, {
  391. "icon_id": "24926735",
  392. "name": "person-filled",
  393. "font_class": "person-filled",
  394. "unicode": "e69d",
  395. "unicode_decimal": 59037
  396. }, {
  397. "icon_id": "24926703",
  398. "name": "personadd-filled",
  399. "font_class": "personadd-filled",
  400. "unicode": "e698",
  401. "unicode_decimal": 59032
  402. }, {
  403. "icon_id": "24923351",
  404. "name": "back",
  405. "font_class": "back",
  406. "unicode": "e6b9",
  407. "unicode_decimal": 59065
  408. }, {
  409. "icon_id": "24923352",
  410. "name": "forward",
  411. "font_class": "forward",
  412. "unicode": "e6ba",
  413. "unicode_decimal": 59066
  414. }, {
  415. "icon_id": "24923353",
  416. "name": "arrowthinright",
  417. "font_class": "arrow-right",
  418. "unicode": "e6bb",
  419. "unicode_decimal": 59067
  420. }, {
  421. "icon_id": "24923353",
  422. "name": "arrowthinright",
  423. "font_class": "arrowthinright",
  424. "unicode": "e6bb",
  425. "unicode_decimal": 59067
  426. }, {
  427. "icon_id": "24923354",
  428. "name": "arrowthinleft",
  429. "font_class": "arrow-left",
  430. "unicode": "e6bc",
  431. "unicode_decimal": 59068
  432. }, {
  433. "icon_id": "24923354",
  434. "name": "arrowthinleft",
  435. "font_class": "arrowthinleft",
  436. "unicode": "e6bc",
  437. "unicode_decimal": 59068
  438. }, {
  439. "icon_id": "24923355",
  440. "name": "arrowthinup",
  441. "font_class": "arrow-up",
  442. "unicode": "e6bd",
  443. "unicode_decimal": 59069
  444. }, {
  445. "icon_id": "24923355",
  446. "name": "arrowthinup",
  447. "font_class": "arrowthinup",
  448. "unicode": "e6bd",
  449. "unicode_decimal": 59069
  450. }, {
  451. "icon_id": "24923356",
  452. "name": "arrowthindown",
  453. "font_class": "arrow-down",
  454. "unicode": "e6be",
  455. "unicode_decimal": 59070
  456. }, {
  457. "icon_id": "24923356",
  458. "name": "arrowthindown",
  459. "font_class": "arrowthindown",
  460. "unicode": "e6be",
  461. "unicode_decimal": 59070
  462. }, {
  463. "icon_id": "24923349",
  464. "name": "arrowdown",
  465. "font_class": "bottom",
  466. "unicode": "e6b8",
  467. "unicode_decimal": 59064
  468. }, {
  469. "icon_id": "24923349",
  470. "name": "arrowdown",
  471. "font_class": "arrowdown",
  472. "unicode": "e6b8",
  473. "unicode_decimal": 59064
  474. }, {
  475. "icon_id": "24923346",
  476. "name": "arrowright",
  477. "font_class": "right",
  478. "unicode": "e6b5",
  479. "unicode_decimal": 59061
  480. }, {
  481. "icon_id": "24923346",
  482. "name": "arrowright",
  483. "font_class": "arrowright",
  484. "unicode": "e6b5",
  485. "unicode_decimal": 59061
  486. }, {
  487. "icon_id": "24923347",
  488. "name": "arrowup",
  489. "font_class": "top",
  490. "unicode": "e6b6",
  491. "unicode_decimal": 59062
  492. }, {
  493. "icon_id": "24923347",
  494. "name": "arrowup",
  495. "font_class": "arrowup",
  496. "unicode": "e6b6",
  497. "unicode_decimal": 59062
  498. }, {
  499. "icon_id": "24923348",
  500. "name": "arrowleft",
  501. "font_class": "left",
  502. "unicode": "e6b7",
  503. "unicode_decimal": 59063
  504. }, {
  505. "icon_id": "24923348",
  506. "name": "arrowleft",
  507. "font_class": "arrowleft",
  508. "unicode": "e6b7",
  509. "unicode_decimal": 59063
  510. }, {
  511. "icon_id": "24923334",
  512. "name": "eye",
  513. "font_class": "eye",
  514. "unicode": "e651",
  515. "unicode_decimal": 58961
  516. }, {
  517. "icon_id": "24923335",
  518. "name": "eye-filled",
  519. "font_class": "eye-filled",
  520. "unicode": "e66a",
  521. "unicode_decimal": 58986
  522. }, {
  523. "icon_id": "24923336",
  524. "name": "eye-slash",
  525. "font_class": "eye-slash",
  526. "unicode": "e6b3",
  527. "unicode_decimal": 59059
  528. }, {
  529. "icon_id": "24923337",
  530. "name": "eye-slash-filled",
  531. "font_class": "eye-slash-filled",
  532. "unicode": "e6b4",
  533. "unicode_decimal": 59060
  534. }, {
  535. "icon_id": "24923305",
  536. "name": "info-filled",
  537. "font_class": "info-filled",
  538. "unicode": "e649",
  539. "unicode_decimal": 58953
  540. }, {
  541. "icon_id": "24923299",
  542. "name": "reload-01",
  543. "font_class": "reload",
  544. "unicode": "e6b2",
  545. "unicode_decimal": 59058
  546. }, {
  547. "icon_id": "24923195",
  548. "name": "mic_slash_fill",
  549. "font_class": "micoff-filled",
  550. "unicode": "e6b0",
  551. "unicode_decimal": 59056
  552. }, {
  553. "icon_id": "24923165",
  554. "name": "map-pin-ellipse",
  555. "font_class": "map-pin-ellipse",
  556. "unicode": "e6ac",
  557. "unicode_decimal": 59052
  558. }, {
  559. "icon_id": "24923166",
  560. "name": "map-pin",
  561. "font_class": "map-pin",
  562. "unicode": "e6ad",
  563. "unicode_decimal": 59053
  564. }, {
  565. "icon_id": "24923167",
  566. "name": "location",
  567. "font_class": "location",
  568. "unicode": "e6ae",
  569. "unicode_decimal": 59054
  570. }, {
  571. "icon_id": "24923064",
  572. "name": "starhalf",
  573. "font_class": "starhalf",
  574. "unicode": "e683",
  575. "unicode_decimal": 59011
  576. }, {
  577. "icon_id": "24923065",
  578. "name": "star",
  579. "font_class": "star",
  580. "unicode": "e688",
  581. "unicode_decimal": 59016
  582. }, {
  583. "icon_id": "24923066",
  584. "name": "star-filled",
  585. "font_class": "star-filled",
  586. "unicode": "e68f",
  587. "unicode_decimal": 59023
  588. }, {
  589. "icon_id": "24899646",
  590. "name": "a-rilidaka",
  591. "font_class": "calendar",
  592. "unicode": "e6a0",
  593. "unicode_decimal": 59040
  594. }, {
  595. "icon_id": "24899647",
  596. "name": "fire",
  597. "font_class": "fire",
  598. "unicode": "e6a1",
  599. "unicode_decimal": 59041
  600. }, {
  601. "icon_id": "24899648",
  602. "name": "paihangbang",
  603. "font_class": "medal",
  604. "unicode": "e6a2",
  605. "unicode_decimal": 59042
  606. }, {
  607. "icon_id": "24899649",
  608. "name": "font",
  609. "font_class": "font",
  610. "unicode": "e6a3",
  611. "unicode_decimal": 59043
  612. }, {
  613. "icon_id": "24899650",
  614. "name": "gift",
  615. "font_class": "gift",
  616. "unicode": "e6a4",
  617. "unicode_decimal": 59044
  618. }, {
  619. "icon_id": "24899651",
  620. "name": "link",
  621. "font_class": "link",
  622. "unicode": "e6a5",
  623. "unicode_decimal": 59045
  624. }, {
  625. "icon_id": "24899652",
  626. "name": "notification",
  627. "font_class": "notification",
  628. "unicode": "e6a6",
  629. "unicode_decimal": 59046
  630. }, {
  631. "icon_id": "24899653",
  632. "name": "staff",
  633. "font_class": "staff",
  634. "unicode": "e6a7",
  635. "unicode_decimal": 59047
  636. }, {
  637. "icon_id": "24899654",
  638. "name": "VIP",
  639. "font_class": "vip",
  640. "unicode": "e6a8",
  641. "unicode_decimal": 59048
  642. }, {
  643. "icon_id": "24899655",
  644. "name": "folder_add",
  645. "font_class": "folder-add",
  646. "unicode": "e6a9",
  647. "unicode_decimal": 59049
  648. }, {
  649. "icon_id": "24899656",
  650. "name": "tune",
  651. "font_class": "tune",
  652. "unicode": "e6aa",
  653. "unicode_decimal": 59050
  654. }, {
  655. "icon_id": "24899657",
  656. "name": "shimingrenzheng",
  657. "font_class": "auth",
  658. "unicode": "e6ab",
  659. "unicode_decimal": 59051
  660. }, {
  661. "icon_id": "24899565",
  662. "name": "person",
  663. "font_class": "person",
  664. "unicode": "e699",
  665. "unicode_decimal": 59033
  666. }, {
  667. "icon_id": "24899566",
  668. "name": "email-filled",
  669. "font_class": "email-filled",
  670. "unicode": "e69a",
  671. "unicode_decimal": 59034
  672. }, {
  673. "icon_id": "24899567",
  674. "name": "phone-filled",
  675. "font_class": "phone-filled",
  676. "unicode": "e69b",
  677. "unicode_decimal": 59035
  678. }, {
  679. "icon_id": "24899568",
  680. "name": "phone",
  681. "font_class": "phone",
  682. "unicode": "e69c",
  683. "unicode_decimal": 59036
  684. }, {
  685. "icon_id": "24899570",
  686. "name": "email",
  687. "font_class": "email",
  688. "unicode": "e69e",
  689. "unicode_decimal": 59038
  690. }, {
  691. "icon_id": "24899571",
  692. "name": "personadd",
  693. "font_class": "personadd",
  694. "unicode": "e69f",
  695. "unicode_decimal": 59039
  696. }, {
  697. "icon_id": "24899558",
  698. "name": "chatboxes-filled",
  699. "font_class": "chatboxes-filled",
  700. "unicode": "e692",
  701. "unicode_decimal": 59026
  702. }, {
  703. "icon_id": "24899559",
  704. "name": "contact",
  705. "font_class": "contact",
  706. "unicode": "e693",
  707. "unicode_decimal": 59027
  708. }, {
  709. "icon_id": "24899560",
  710. "name": "chatbubble-filled",
  711. "font_class": "chatbubble-filled",
  712. "unicode": "e694",
  713. "unicode_decimal": 59028
  714. }, {
  715. "icon_id": "24899561",
  716. "name": "contact-filled",
  717. "font_class": "contact-filled",
  718. "unicode": "e695",
  719. "unicode_decimal": 59029
  720. }, {
  721. "icon_id": "24899562",
  722. "name": "chatboxes",
  723. "font_class": "chatboxes",
  724. "unicode": "e696",
  725. "unicode_decimal": 59030
  726. }, {
  727. "icon_id": "24899563",
  728. "name": "chatbubble",
  729. "font_class": "chatbubble",
  730. "unicode": "e697",
  731. "unicode_decimal": 59031
  732. }, {
  733. "icon_id": "24881290",
  734. "name": "upload-filled",
  735. "font_class": "upload-filled",
  736. "unicode": "e68e",
  737. "unicode_decimal": 59022
  738. }, {
  739. "icon_id": "24881292",
  740. "name": "upload",
  741. "font_class": "upload",
  742. "unicode": "e690",
  743. "unicode_decimal": 59024
  744. }, {
  745. "icon_id": "24881293",
  746. "name": "weixin",
  747. "font_class": "weixin",
  748. "unicode": "e691",
  749. "unicode_decimal": 59025
  750. }, {
  751. "icon_id": "24881274",
  752. "name": "compose",
  753. "font_class": "compose",
  754. "unicode": "e67f",
  755. "unicode_decimal": 59007
  756. }, {
  757. "icon_id": "24881275",
  758. "name": "qq",
  759. "font_class": "qq",
  760. "unicode": "e680",
  761. "unicode_decimal": 59008
  762. }, {
  763. "icon_id": "24881276",
  764. "name": "download-filled",
  765. "font_class": "download-filled",
  766. "unicode": "e681",
  767. "unicode_decimal": 59009
  768. }, {
  769. "icon_id": "24881277",
  770. "name": "pengyouquan",
  771. "font_class": "pyq",
  772. "unicode": "e682",
  773. "unicode_decimal": 59010
  774. }, {
  775. "icon_id": "24881279",
  776. "name": "sound",
  777. "font_class": "sound",
  778. "unicode": "e684",
  779. "unicode_decimal": 59012
  780. }, {
  781. "icon_id": "24881280",
  782. "name": "trash-filled",
  783. "font_class": "trash-filled",
  784. "unicode": "e685",
  785. "unicode_decimal": 59013
  786. }, {
  787. "icon_id": "24881281",
  788. "name": "sound-filled",
  789. "font_class": "sound-filled",
  790. "unicode": "e686",
  791. "unicode_decimal": 59014
  792. }, {
  793. "icon_id": "24881282",
  794. "name": "trash",
  795. "font_class": "trash",
  796. "unicode": "e687",
  797. "unicode_decimal": 59015
  798. }, {
  799. "icon_id": "24881284",
  800. "name": "videocam-filled",
  801. "font_class": "videocam-filled",
  802. "unicode": "e689",
  803. "unicode_decimal": 59017
  804. }, {
  805. "icon_id": "24881285",
  806. "name": "spinner-cycle",
  807. "font_class": "spinner-cycle",
  808. "unicode": "e68a",
  809. "unicode_decimal": 59018
  810. }, {
  811. "icon_id": "24881286",
  812. "name": "weibo",
  813. "font_class": "weibo",
  814. "unicode": "e68b",
  815. "unicode_decimal": 59019
  816. }, {
  817. "icon_id": "24881288",
  818. "name": "videocam",
  819. "font_class": "videocam",
  820. "unicode": "e68c",
  821. "unicode_decimal": 59020
  822. }, {
  823. "icon_id": "24881289",
  824. "name": "download",
  825. "font_class": "download",
  826. "unicode": "e68d",
  827. "unicode_decimal": 59021
  828. }, {
  829. "icon_id": "24879601",
  830. "name": "help",
  831. "font_class": "help",
  832. "unicode": "e679",
  833. "unicode_decimal": 59001
  834. }, {
  835. "icon_id": "24879602",
  836. "name": "navigate-filled",
  837. "font_class": "navigate-filled",
  838. "unicode": "e67a",
  839. "unicode_decimal": 59002
  840. }, {
  841. "icon_id": "24879603",
  842. "name": "plusempty",
  843. "font_class": "plusempty",
  844. "unicode": "e67b",
  845. "unicode_decimal": 59003
  846. }, {
  847. "icon_id": "24879604",
  848. "name": "smallcircle",
  849. "font_class": "smallcircle",
  850. "unicode": "e67c",
  851. "unicode_decimal": 59004
  852. }, {
  853. "icon_id": "24879605",
  854. "name": "minus-filled",
  855. "font_class": "minus-filled",
  856. "unicode": "e67d",
  857. "unicode_decimal": 59005
  858. }, {
  859. "icon_id": "24879606",
  860. "name": "micoff",
  861. "font_class": "micoff",
  862. "unicode": "e67e",
  863. "unicode_decimal": 59006
  864. }, {
  865. "icon_id": "24879588",
  866. "name": "closeempty",
  867. "font_class": "closeempty",
  868. "unicode": "e66c",
  869. "unicode_decimal": 58988
  870. }, {
  871. "icon_id": "24879589",
  872. "name": "clear",
  873. "font_class": "clear",
  874. "unicode": "e66d",
  875. "unicode_decimal": 58989
  876. }, {
  877. "icon_id": "24879590",
  878. "name": "navigate",
  879. "font_class": "navigate",
  880. "unicode": "e66e",
  881. "unicode_decimal": 58990
  882. }, {
  883. "icon_id": "24879591",
  884. "name": "minus",
  885. "font_class": "minus",
  886. "unicode": "e66f",
  887. "unicode_decimal": 58991
  888. }, {
  889. "icon_id": "24879592",
  890. "name": "image",
  891. "font_class": "image",
  892. "unicode": "e670",
  893. "unicode_decimal": 58992
  894. }, {
  895. "icon_id": "24879593",
  896. "name": "mic",
  897. "font_class": "mic",
  898. "unicode": "e671",
  899. "unicode_decimal": 58993
  900. }, {
  901. "icon_id": "24879594",
  902. "name": "paperplane",
  903. "font_class": "paperplane",
  904. "unicode": "e672",
  905. "unicode_decimal": 58994
  906. }, {
  907. "icon_id": "24879595",
  908. "name": "close",
  909. "font_class": "close",
  910. "unicode": "e673",
  911. "unicode_decimal": 58995
  912. }, {
  913. "icon_id": "24879596",
  914. "name": "help-filled",
  915. "font_class": "help-filled",
  916. "unicode": "e674",
  917. "unicode_decimal": 58996
  918. }, {
  919. "icon_id": "24879597",
  920. "name": "plus-filled",
  921. "font_class": "paperplane-filled",
  922. "unicode": "e675",
  923. "unicode_decimal": 58997
  924. }, {
  925. "icon_id": "24879598",
  926. "name": "plus",
  927. "font_class": "plus",
  928. "unicode": "e676",
  929. "unicode_decimal": 58998
  930. }, {
  931. "icon_id": "24879599",
  932. "name": "mic-filled",
  933. "font_class": "mic-filled",
  934. "unicode": "e677",
  935. "unicode_decimal": 58999
  936. }, {
  937. "icon_id": "24879600",
  938. "name": "image-filled",
  939. "font_class": "image-filled",
  940. "unicode": "e678",
  941. "unicode_decimal": 59000
  942. }, {
  943. "icon_id": "24855900",
  944. "name": "locked-filled",
  945. "font_class": "locked-filled",
  946. "unicode": "e668",
  947. "unicode_decimal": 58984
  948. }, {
  949. "icon_id": "24855901",
  950. "name": "info",
  951. "font_class": "info",
  952. "unicode": "e669",
  953. "unicode_decimal": 58985
  954. }, {
  955. "icon_id": "24855903",
  956. "name": "locked",
  957. "font_class": "locked",
  958. "unicode": "e66b",
  959. "unicode_decimal": 58987
  960. }, {
  961. "icon_id": "24855884",
  962. "name": "camera-filled",
  963. "font_class": "camera-filled",
  964. "unicode": "e658",
  965. "unicode_decimal": 58968
  966. }, {
  967. "icon_id": "24855885",
  968. "name": "chat-filled",
  969. "font_class": "chat-filled",
  970. "unicode": "e659",
  971. "unicode_decimal": 58969
  972. }, {
  973. "icon_id": "24855886",
  974. "name": "camera",
  975. "font_class": "camera",
  976. "unicode": "e65a",
  977. "unicode_decimal": 58970
  978. }, {
  979. "icon_id": "24855887",
  980. "name": "circle",
  981. "font_class": "circle",
  982. "unicode": "e65b",
  983. "unicode_decimal": 58971
  984. }, {
  985. "icon_id": "24855888",
  986. "name": "checkmarkempty",
  987. "font_class": "checkmarkempty",
  988. "unicode": "e65c",
  989. "unicode_decimal": 58972
  990. }, {
  991. "icon_id": "24855889",
  992. "name": "chat",
  993. "font_class": "chat",
  994. "unicode": "e65d",
  995. "unicode_decimal": 58973
  996. }, {
  997. "icon_id": "24855890",
  998. "name": "circle-filled",
  999. "font_class": "circle-filled",
  1000. "unicode": "e65e",
  1001. "unicode_decimal": 58974
  1002. }, {
  1003. "icon_id": "24855891",
  1004. "name": "flag",
  1005. "font_class": "flag",
  1006. "unicode": "e65f",
  1007. "unicode_decimal": 58975
  1008. }, {
  1009. "icon_id": "24855892",
  1010. "name": "flag-filled",
  1011. "font_class": "flag-filled",
  1012. "unicode": "e660",
  1013. "unicode_decimal": 58976
  1014. }, {
  1015. "icon_id": "24855893",
  1016. "name": "gear-filled",
  1017. "font_class": "gear-filled",
  1018. "unicode": "e661",
  1019. "unicode_decimal": 58977
  1020. }, {
  1021. "icon_id": "24855894",
  1022. "name": "home",
  1023. "font_class": "home",
  1024. "unicode": "e662",
  1025. "unicode_decimal": 58978
  1026. }, {
  1027. "icon_id": "24855895",
  1028. "name": "home-filled",
  1029. "font_class": "home-filled",
  1030. "unicode": "e663",
  1031. "unicode_decimal": 58979
  1032. }, {
  1033. "icon_id": "24855896",
  1034. "name": "gear",
  1035. "font_class": "gear",
  1036. "unicode": "e664",
  1037. "unicode_decimal": 58980
  1038. }, {
  1039. "icon_id": "24855897",
  1040. "name": "smallcircle-filled",
  1041. "font_class": "smallcircle-filled",
  1042. "unicode": "e665",
  1043. "unicode_decimal": 58981
  1044. }, {
  1045. "icon_id": "24855898",
  1046. "name": "map-filled",
  1047. "font_class": "map-filled",
  1048. "unicode": "e666",
  1049. "unicode_decimal": 58982
  1050. }, {
  1051. "icon_id": "24855899",
  1052. "name": "map",
  1053. "font_class": "map",
  1054. "unicode": "e667",
  1055. "unicode_decimal": 58983
  1056. }, {
  1057. "icon_id": "24855825",
  1058. "name": "refresh-filled",
  1059. "font_class": "refresh-filled",
  1060. "unicode": "e656",
  1061. "unicode_decimal": 58966
  1062. }, {
  1063. "icon_id": "24855826",
  1064. "name": "refresh",
  1065. "font_class": "refresh",
  1066. "unicode": "e657",
  1067. "unicode_decimal": 58967
  1068. }, {
  1069. "icon_id": "24855808",
  1070. "name": "cloud-upload",
  1071. "font_class": "cloud-upload",
  1072. "unicode": "e645",
  1073. "unicode_decimal": 58949
  1074. }, {
  1075. "icon_id": "24855809",
  1076. "name": "cloud-download-filled",
  1077. "font_class": "cloud-download-filled",
  1078. "unicode": "e646",
  1079. "unicode_decimal": 58950
  1080. }, {
  1081. "icon_id": "24855810",
  1082. "name": "cloud-download",
  1083. "font_class": "cloud-download",
  1084. "unicode": "e647",
  1085. "unicode_decimal": 58951
  1086. }, {
  1087. "icon_id": "24855811",
  1088. "name": "cloud-upload-filled",
  1089. "font_class": "cloud-upload-filled",
  1090. "unicode": "e648",
  1091. "unicode_decimal": 58952
  1092. }, {
  1093. "icon_id": "24855813",
  1094. "name": "redo",
  1095. "font_class": "redo",
  1096. "unicode": "e64a",
  1097. "unicode_decimal": 58954
  1098. }, {
  1099. "icon_id": "24855814",
  1100. "name": "images-filled",
  1101. "font_class": "images-filled",
  1102. "unicode": "e64b",
  1103. "unicode_decimal": 58955
  1104. }, {
  1105. "icon_id": "24855815",
  1106. "name": "undo-filled",
  1107. "font_class": "undo-filled",
  1108. "unicode": "e64c",
  1109. "unicode_decimal": 58956
  1110. }, {
  1111. "icon_id": "24855816",
  1112. "name": "more",
  1113. "font_class": "more",
  1114. "unicode": "e64d",
  1115. "unicode_decimal": 58957
  1116. }, {
  1117. "icon_id": "24855817",
  1118. "name": "more-filled",
  1119. "font_class": "more-filled",
  1120. "unicode": "e64e",
  1121. "unicode_decimal": 58958
  1122. }, {
  1123. "icon_id": "24855818",
  1124. "name": "undo",
  1125. "font_class": "undo",
  1126. "unicode": "e64f",
  1127. "unicode_decimal": 58959
  1128. }, {
  1129. "icon_id": "24855819",
  1130. "name": "images",
  1131. "font_class": "images",
  1132. "unicode": "e650",
  1133. "unicode_decimal": 58960
  1134. }, {
  1135. "icon_id": "24855821",
  1136. "name": "paperclip",
  1137. "font_class": "paperclip",
  1138. "unicode": "e652",
  1139. "unicode_decimal": 58962
  1140. }, {
  1141. "icon_id": "24855822",
  1142. "name": "settings",
  1143. "font_class": "settings",
  1144. "unicode": "e653",
  1145. "unicode_decimal": 58963
  1146. }, {
  1147. "icon_id": "24855823",
  1148. "name": "search",
  1149. "font_class": "search",
  1150. "unicode": "e654",
  1151. "unicode_decimal": 58964
  1152. }, {
  1153. "icon_id": "24855824",
  1154. "name": "redo-filled",
  1155. "font_class": "redo-filled",
  1156. "unicode": "e655",
  1157. "unicode_decimal": 58965
  1158. }, {
  1159. "icon_id": "24841702",
  1160. "name": "list",
  1161. "font_class": "list",
  1162. "unicode": "e644",
  1163. "unicode_decimal": 58948
  1164. }, {
  1165. "icon_id": "24841489",
  1166. "name": "mail-open-filled",
  1167. "font_class": "mail-open-filled",
  1168. "unicode": "e63a",
  1169. "unicode_decimal": 58938
  1170. }, {
  1171. "icon_id": "24841491",
  1172. "name": "hand-thumbsdown-filled",
  1173. "font_class": "hand-down-filled",
  1174. "unicode": "e63c",
  1175. "unicode_decimal": 58940
  1176. }, {
  1177. "icon_id": "24841492",
  1178. "name": "hand-thumbsdown",
  1179. "font_class": "hand-down",
  1180. "unicode": "e63d",
  1181. "unicode_decimal": 58941
  1182. }, {
  1183. "icon_id": "24841493",
  1184. "name": "hand-thumbsup-filled",
  1185. "font_class": "hand-up-filled",
  1186. "unicode": "e63e",
  1187. "unicode_decimal": 58942
  1188. }, {
  1189. "icon_id": "24841494",
  1190. "name": "hand-thumbsup",
  1191. "font_class": "hand-up",
  1192. "unicode": "e63f",
  1193. "unicode_decimal": 58943
  1194. }, {
  1195. "icon_id": "24841496",
  1196. "name": "heart-filled",
  1197. "font_class": "heart-filled",
  1198. "unicode": "e641",
  1199. "unicode_decimal": 58945
  1200. }, {
  1201. "icon_id": "24841498",
  1202. "name": "mail-open",
  1203. "font_class": "mail-open",
  1204. "unicode": "e643",
  1205. "unicode_decimal": 58947
  1206. }, {
  1207. "icon_id": "24841488",
  1208. "name": "heart",
  1209. "font_class": "heart",
  1210. "unicode": "e639",
  1211. "unicode_decimal": 58937
  1212. }, {
  1213. "icon_id": "24839963",
  1214. "name": "loop",
  1215. "font_class": "loop",
  1216. "unicode": "e633",
  1217. "unicode_decimal": 58931
  1218. }, {
  1219. "icon_id": "24839866",
  1220. "name": "pulldown",
  1221. "font_class": "pulldown",
  1222. "unicode": "e632",
  1223. "unicode_decimal": 58930
  1224. }, {
  1225. "icon_id": "24813798",
  1226. "name": "scan",
  1227. "font_class": "scan",
  1228. "unicode": "e62a",
  1229. "unicode_decimal": 58922
  1230. }, {
  1231. "icon_id": "24813786",
  1232. "name": "bars",
  1233. "font_class": "bars",
  1234. "unicode": "e627",
  1235. "unicode_decimal": 58919
  1236. }, {
  1237. "icon_id": "24813788",
  1238. "name": "cart-filled",
  1239. "font_class": "cart-filled",
  1240. "unicode": "e629",
  1241. "unicode_decimal": 58921
  1242. }, {
  1243. "icon_id": "24813790",
  1244. "name": "checkbox",
  1245. "font_class": "checkbox",
  1246. "unicode": "e62b",
  1247. "unicode_decimal": 58923
  1248. }, {
  1249. "icon_id": "24813791",
  1250. "name": "checkbox-filled",
  1251. "font_class": "checkbox-filled",
  1252. "unicode": "e62c",
  1253. "unicode_decimal": 58924
  1254. }, {
  1255. "icon_id": "24813794",
  1256. "name": "shop",
  1257. "font_class": "shop",
  1258. "unicode": "e62f",
  1259. "unicode_decimal": 58927
  1260. }, {
  1261. "icon_id": "24813795",
  1262. "name": "headphones",
  1263. "font_class": "headphones",
  1264. "unicode": "e630",
  1265. "unicode_decimal": 58928
  1266. }, {
  1267. "icon_id": "24813796",
  1268. "name": "cart",
  1269. "font_class": "cart",
  1270. "unicode": "e631",
  1271. "unicode_decimal": 58929
  1272. }]
  1273. };
  1274. exports.default = _default;
  1275. /***/ }),
  1276. /***/ 16:
  1277. /*!***************************************************************!*\
  1278. !*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
  1279. \***************************************************************/
  1280. /*! no static exports found */
  1281. /***/ (function(module, exports) {
  1282. function _setPrototypeOf(o, p) {
  1283. module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  1284. o.__proto__ = p;
  1285. return o;
  1286. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1287. return _setPrototypeOf(o, p);
  1288. }
  1289. module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1290. /***/ }),
  1291. /***/ 17:
  1292. /*!*************************************************************************!*\
  1293. !*** ./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
  1294. \*************************************************************************/
  1295. /*! no static exports found */
  1296. /***/ (function(module, exports) {
  1297. function _isNativeReflectConstruct() {
  1298. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  1299. if (Reflect.construct.sham) return false;
  1300. if (typeof Proxy === "function") return true;
  1301. try {
  1302. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  1303. return true;
  1304. } catch (e) {
  1305. return false;
  1306. }
  1307. }
  1308. module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1309. /***/ }),
  1310. /***/ 18:
  1311. /*!******************************************************************!*\
  1312. !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
  1313. \******************************************************************/
  1314. /*! no static exports found */
  1315. /***/ (function(module, exports, __webpack_require__) {
  1316. var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ 19);
  1317. var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ 20);
  1318. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  1319. var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ 21);
  1320. function _toConsumableArray(arr) {
  1321. return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
  1322. }
  1323. module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1324. /***/ }),
  1325. /***/ 184:
  1326. /*!*****************************************************************************************************************!*\
  1327. !*** E:/work/Project_newGit/UniappShell/uni_modules/uni-swipe-action/components/uni-swipe-action-item/mpwxs.js ***!
  1328. \*****************************************************************************************************************/
  1329. /*! no static exports found */
  1330. /***/ (function(module, exports, __webpack_require__) {
  1331. "use strict";
  1332. Object.defineProperty(exports, "__esModule", {
  1333. value: true
  1334. });
  1335. exports.default = void 0;
  1336. var mpMixins = {};
  1337. var is_pc = null;
  1338. mpMixins = {
  1339. data: function data() {
  1340. return {
  1341. is_show: 'none'
  1342. };
  1343. },
  1344. watch: {
  1345. show: function show(newVal) {
  1346. this.is_show = this.show;
  1347. }
  1348. },
  1349. created: function created() {
  1350. this.swipeaction = this.getSwipeAction();
  1351. if (this.swipeaction.children !== undefined) {
  1352. this.swipeaction.children.push(this);
  1353. }
  1354. },
  1355. mounted: function mounted() {
  1356. this.is_show = this.show;
  1357. },
  1358. methods: {
  1359. // wxs 中调用
  1360. closeSwipe: function closeSwipe(e) {
  1361. if (!this.autoClose) return;
  1362. this.swipeaction.closeOther(this);
  1363. },
  1364. change: function change(e) {
  1365. this.$emit('change', e.open);
  1366. if (this.is_show !== e.open) {
  1367. this.is_show = e.open;
  1368. }
  1369. },
  1370. appTouchStart: function appTouchStart(e) {
  1371. if (is_pc) return;
  1372. var clientX = e.changedTouches[0].clientX;
  1373. this.clientX = clientX;
  1374. this.timestamp = new Date().getTime();
  1375. },
  1376. appTouchEnd: function appTouchEnd(e, index, item, position) {
  1377. if (is_pc) return;
  1378. var clientX = e.changedTouches[0].clientX;
  1379. // fixed by xxxx 模拟点击事件,解决 ios 13 点击区域错位的问题
  1380. var diff = Math.abs(this.clientX - clientX);
  1381. var time = new Date().getTime() - this.timestamp;
  1382. if (diff < 40 && time < 300) {
  1383. this.$emit('click', {
  1384. content: item,
  1385. index: index,
  1386. position: position
  1387. });
  1388. }
  1389. },
  1390. onClickForPC: function onClickForPC(index, item, position) {
  1391. if (!is_pc) return;
  1392. }
  1393. }
  1394. };
  1395. var _default = mpMixins;
  1396. exports.default = _default;
  1397. /***/ }),
  1398. /***/ 185:
  1399. /*!********************************************************************************************************************!*\
  1400. !*** E:/work/Project_newGit/UniappShell/uni_modules/uni-swipe-action/components/uni-swipe-action-item/bindingx.js ***!
  1401. \********************************************************************************************************************/
  1402. /*! no static exports found */
  1403. /***/ (function(module, exports, __webpack_require__) {
  1404. "use strict";
  1405. Object.defineProperty(exports, "__esModule", {
  1406. value: true
  1407. });
  1408. exports.default = void 0;
  1409. var bindIngXMixins = {};
  1410. var _default = bindIngXMixins;
  1411. exports.default = _default;
  1412. /***/ }),
  1413. /***/ 186:
  1414. /*!*******************************************************************************************************************!*\
  1415. !*** E:/work/Project_newGit/UniappShell/uni_modules/uni-swipe-action/components/uni-swipe-action-item/mpother.js ***!
  1416. \*******************************************************************************************************************/
  1417. /*! no static exports found */
  1418. /***/ (function(module, exports, __webpack_require__) {
  1419. "use strict";
  1420. Object.defineProperty(exports, "__esModule", {
  1421. value: true
  1422. });
  1423. exports.default = void 0;
  1424. var otherMixins = {};
  1425. var _default = otherMixins;
  1426. exports.default = _default;
  1427. /***/ }),
  1428. /***/ 19:
  1429. /*!******************************************************************!*\
  1430. !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
  1431. \******************************************************************/
  1432. /*! no static exports found */
  1433. /***/ (function(module, exports, __webpack_require__) {
  1434. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  1435. function _arrayWithoutHoles(arr) {
  1436. if (Array.isArray(arr)) return arrayLikeToArray(arr);
  1437. }
  1438. module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1439. /***/ }),
  1440. /***/ 2:
  1441. /*!************************************************************!*\
  1442. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  1443. \************************************************************/
  1444. /*! no static exports found */
  1445. /***/ (function(module, exports, __webpack_require__) {
  1446. "use strict";
  1447. /* WEBPACK VAR INJECTION */(function(wx, global) {
  1448. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  1449. Object.defineProperty(exports, "__esModule", {
  1450. value: true
  1451. });
  1452. exports.createApp = createApp;
  1453. exports.createComponent = createComponent;
  1454. exports.createPage = createPage;
  1455. exports.createPlugin = createPlugin;
  1456. exports.createSubpackageApp = createSubpackageApp;
  1457. exports.default = void 0;
  1458. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  1459. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  1460. var _construct2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/construct */ 15));
  1461. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  1462. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  1463. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  1464. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  1465. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  1466. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  1467. var realAtob;
  1468. var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  1469. var b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  1470. if (typeof atob !== 'function') {
  1471. realAtob = function realAtob(str) {
  1472. str = String(str).replace(/[\t\n\f\r ]+/g, '');
  1473. if (!b64re.test(str)) {
  1474. throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  1475. }
  1476. // Adding the padding if missing, for semplicity
  1477. str += '=='.slice(2 - (str.length & 3));
  1478. var bitmap;
  1479. var result = '';
  1480. var r1;
  1481. var r2;
  1482. var i = 0;
  1483. for (; i < str.length;) {
  1484. bitmap = b64.indexOf(str.charAt(i++)) << 18 | b64.indexOf(str.charAt(i++)) << 12 | (r1 = b64.indexOf(str.charAt(i++))) << 6 | (r2 = b64.indexOf(str.charAt(i++)));
  1485. result += r1 === 64 ? String.fromCharCode(bitmap >> 16 & 255) : r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255) : String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255);
  1486. }
  1487. return result;
  1488. };
  1489. } else {
  1490. // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
  1491. realAtob = atob;
  1492. }
  1493. function b64DecodeUnicode(str) {
  1494. return decodeURIComponent(realAtob(str).split('').map(function (c) {
  1495. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  1496. }).join(''));
  1497. }
  1498. function getCurrentUserInfo() {
  1499. var token = wx.getStorageSync('uni_id_token') || '';
  1500. var tokenArr = token.split('.');
  1501. if (!token || tokenArr.length !== 3) {
  1502. return {
  1503. uid: null,
  1504. role: [],
  1505. permission: [],
  1506. tokenExpired: 0
  1507. };
  1508. }
  1509. var userInfo;
  1510. try {
  1511. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  1512. } catch (error) {
  1513. throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
  1514. }
  1515. userInfo.tokenExpired = userInfo.exp * 1000;
  1516. delete userInfo.exp;
  1517. delete userInfo.iat;
  1518. return userInfo;
  1519. }
  1520. function uniIdMixin(Vue) {
  1521. Vue.prototype.uniIDHasRole = function (roleId) {
  1522. var _getCurrentUserInfo = getCurrentUserInfo(),
  1523. role = _getCurrentUserInfo.role;
  1524. return role.indexOf(roleId) > -1;
  1525. };
  1526. Vue.prototype.uniIDHasPermission = function (permissionId) {
  1527. var _getCurrentUserInfo2 = getCurrentUserInfo(),
  1528. permission = _getCurrentUserInfo2.permission;
  1529. return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
  1530. };
  1531. Vue.prototype.uniIDTokenValid = function () {
  1532. var _getCurrentUserInfo3 = getCurrentUserInfo(),
  1533. tokenExpired = _getCurrentUserInfo3.tokenExpired;
  1534. return tokenExpired > Date.now();
  1535. };
  1536. }
  1537. var _toString = Object.prototype.toString;
  1538. var hasOwnProperty = Object.prototype.hasOwnProperty;
  1539. function isFn(fn) {
  1540. return typeof fn === 'function';
  1541. }
  1542. function isStr(str) {
  1543. return typeof str === 'string';
  1544. }
  1545. function isObject(obj) {
  1546. return obj !== null && (0, _typeof2.default)(obj) === 'object';
  1547. }
  1548. function isPlainObject(obj) {
  1549. return _toString.call(obj) === '[object Object]';
  1550. }
  1551. function hasOwn(obj, key) {
  1552. return hasOwnProperty.call(obj, key);
  1553. }
  1554. function noop() {}
  1555. /**
  1556. * Create a cached version of a pure function.
  1557. */
  1558. function cached(fn) {
  1559. var cache = Object.create(null);
  1560. return function cachedFn(str) {
  1561. var hit = cache[str];
  1562. return hit || (cache[str] = fn(str));
  1563. };
  1564. }
  1565. /**
  1566. * Camelize a hyphen-delimited string.
  1567. */
  1568. var camelizeRE = /-(\w)/g;
  1569. var camelize = cached(function (str) {
  1570. return str.replace(camelizeRE, function (_, c) {
  1571. return c ? c.toUpperCase() : '';
  1572. });
  1573. });
  1574. function sortObject(obj) {
  1575. var sortObj = {};
  1576. if (isPlainObject(obj)) {
  1577. Object.keys(obj).sort().forEach(function (key) {
  1578. sortObj[key] = obj[key];
  1579. });
  1580. }
  1581. return !Object.keys(sortObj) ? obj : sortObj;
  1582. }
  1583. var HOOKS = ['invoke', 'success', 'fail', 'complete', 'returnValue'];
  1584. var globalInterceptors = {};
  1585. var scopedInterceptors = {};
  1586. function mergeHook(parentVal, childVal) {
  1587. var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;
  1588. return res ? dedupeHooks(res) : res;
  1589. }
  1590. function dedupeHooks(hooks) {
  1591. var res = [];
  1592. for (var i = 0; i < hooks.length; i++) {
  1593. if (res.indexOf(hooks[i]) === -1) {
  1594. res.push(hooks[i]);
  1595. }
  1596. }
  1597. return res;
  1598. }
  1599. function removeHook(hooks, hook) {
  1600. var index = hooks.indexOf(hook);
  1601. if (index !== -1) {
  1602. hooks.splice(index, 1);
  1603. }
  1604. }
  1605. function mergeInterceptorHook(interceptor, option) {
  1606. Object.keys(option).forEach(function (hook) {
  1607. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  1608. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  1609. }
  1610. });
  1611. }
  1612. function removeInterceptorHook(interceptor, option) {
  1613. if (!interceptor || !option) {
  1614. return;
  1615. }
  1616. Object.keys(option).forEach(function (hook) {
  1617. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  1618. removeHook(interceptor[hook], option[hook]);
  1619. }
  1620. });
  1621. }
  1622. function addInterceptor(method, option) {
  1623. if (typeof method === 'string' && isPlainObject(option)) {
  1624. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  1625. } else if (isPlainObject(method)) {
  1626. mergeInterceptorHook(globalInterceptors, method);
  1627. }
  1628. }
  1629. function removeInterceptor(method, option) {
  1630. if (typeof method === 'string') {
  1631. if (isPlainObject(option)) {
  1632. removeInterceptorHook(scopedInterceptors[method], option);
  1633. } else {
  1634. delete scopedInterceptors[method];
  1635. }
  1636. } else if (isPlainObject(method)) {
  1637. removeInterceptorHook(globalInterceptors, method);
  1638. }
  1639. }
  1640. function wrapperHook(hook, params) {
  1641. return function (data) {
  1642. return hook(data, params) || data;
  1643. };
  1644. }
  1645. function isPromise(obj) {
  1646. return !!obj && ((0, _typeof2.default)(obj) === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  1647. }
  1648. function queue(hooks, data, params) {
  1649. var promise = false;
  1650. for (var i = 0; i < hooks.length; i++) {
  1651. var hook = hooks[i];
  1652. if (promise) {
  1653. promise = Promise.resolve(wrapperHook(hook, params));
  1654. } else {
  1655. var res = hook(data, params);
  1656. if (isPromise(res)) {
  1657. promise = Promise.resolve(res);
  1658. }
  1659. if (res === false) {
  1660. return {
  1661. then: function then() {}
  1662. };
  1663. }
  1664. }
  1665. }
  1666. return promise || {
  1667. then: function then(callback) {
  1668. return callback(data);
  1669. }
  1670. };
  1671. }
  1672. function wrapperOptions(interceptor) {
  1673. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  1674. ['success', 'fail', 'complete'].forEach(function (name) {
  1675. if (Array.isArray(interceptor[name])) {
  1676. var oldCallback = options[name];
  1677. options[name] = function callbackInterceptor(res) {
  1678. queue(interceptor[name], res, options).then(function (res) {
  1679. /* eslint-disable no-mixed-operators */
  1680. return isFn(oldCallback) && oldCallback(res) || res;
  1681. });
  1682. };
  1683. }
  1684. });
  1685. return options;
  1686. }
  1687. function wrapperReturnValue(method, returnValue) {
  1688. var returnValueHooks = [];
  1689. if (Array.isArray(globalInterceptors.returnValue)) {
  1690. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(globalInterceptors.returnValue));
  1691. }
  1692. var interceptor = scopedInterceptors[method];
  1693. if (interceptor && Array.isArray(interceptor.returnValue)) {
  1694. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(interceptor.returnValue));
  1695. }
  1696. returnValueHooks.forEach(function (hook) {
  1697. returnValue = hook(returnValue) || returnValue;
  1698. });
  1699. return returnValue;
  1700. }
  1701. function getApiInterceptorHooks(method) {
  1702. var interceptor = Object.create(null);
  1703. Object.keys(globalInterceptors).forEach(function (hook) {
  1704. if (hook !== 'returnValue') {
  1705. interceptor[hook] = globalInterceptors[hook].slice();
  1706. }
  1707. });
  1708. var scopedInterceptor = scopedInterceptors[method];
  1709. if (scopedInterceptor) {
  1710. Object.keys(scopedInterceptor).forEach(function (hook) {
  1711. if (hook !== 'returnValue') {
  1712. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  1713. }
  1714. });
  1715. }
  1716. return interceptor;
  1717. }
  1718. function invokeApi(method, api, options) {
  1719. for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
  1720. params[_key - 3] = arguments[_key];
  1721. }
  1722. var interceptor = getApiInterceptorHooks(method);
  1723. if (interceptor && Object.keys(interceptor).length) {
  1724. if (Array.isArray(interceptor.invoke)) {
  1725. var res = queue(interceptor.invoke, options);
  1726. return res.then(function (options) {
  1727. // 重新访问 getApiInterceptorHooks, 允许 invoke 中再次调用 addInterceptor,removeInterceptor
  1728. return api.apply(void 0, [wrapperOptions(getApiInterceptorHooks(method), options)].concat(params));
  1729. });
  1730. } else {
  1731. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  1732. }
  1733. }
  1734. return api.apply(void 0, [options].concat(params));
  1735. }
  1736. var promiseInterceptor = {
  1737. returnValue: function returnValue(res) {
  1738. if (!isPromise(res)) {
  1739. return res;
  1740. }
  1741. return new Promise(function (resolve, reject) {
  1742. res.then(function (res) {
  1743. if (res[0]) {
  1744. reject(res[0]);
  1745. } else {
  1746. resolve(res[1]);
  1747. }
  1748. });
  1749. });
  1750. }
  1751. };
  1752. var SYNC_API_RE = /^\$|Window$|WindowStyle$|sendHostEvent|sendNativeEvent|restoreGlobal|requireGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getLocale|setLocale|invokePushCallback|getWindowInfo|getDeviceInfo|getAppBaseInfo|getSystemSetting|getAppAuthorizeSetting|initUTS|requireUTS|registerUTS/;
  1753. var CONTEXT_API_RE = /^create|Manager$/;
  1754. // Context例外情况
  1755. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  1756. // 同步例外情况
  1757. var ASYNC_API = ['createBLEConnection', 'createPushMessage'];
  1758. var CALLBACK_API_RE = /^on|^off/;
  1759. function isContextApi(name) {
  1760. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  1761. }
  1762. function isSyncApi(name) {
  1763. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  1764. }
  1765. function isCallbackApi(name) {
  1766. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  1767. }
  1768. function handlePromise(promise) {
  1769. return promise.then(function (data) {
  1770. return [null, data];
  1771. }).catch(function (err) {
  1772. return [err];
  1773. });
  1774. }
  1775. function shouldPromise(name) {
  1776. if (isContextApi(name) || isSyncApi(name) || isCallbackApi(name)) {
  1777. return false;
  1778. }
  1779. return true;
  1780. }
  1781. /* eslint-disable no-extend-native */
  1782. if (!Promise.prototype.finally) {
  1783. Promise.prototype.finally = function (callback) {
  1784. var promise = this.constructor;
  1785. return this.then(function (value) {
  1786. return promise.resolve(callback()).then(function () {
  1787. return value;
  1788. });
  1789. }, function (reason) {
  1790. return promise.resolve(callback()).then(function () {
  1791. throw reason;
  1792. });
  1793. });
  1794. };
  1795. }
  1796. function promisify(name, api) {
  1797. if (!shouldPromise(name) || !isFn(api)) {
  1798. return api;
  1799. }
  1800. return function promiseApi() {
  1801. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1802. for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  1803. params[_key2 - 1] = arguments[_key2];
  1804. }
  1805. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  1806. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  1807. }
  1808. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  1809. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  1810. success: resolve,
  1811. fail: reject
  1812. })].concat(params));
  1813. })));
  1814. };
  1815. }
  1816. var EPS = 1e-4;
  1817. var BASE_DEVICE_WIDTH = 750;
  1818. var isIOS = false;
  1819. var deviceWidth = 0;
  1820. var deviceDPR = 0;
  1821. function checkDeviceWidth() {
  1822. var _wx$getSystemInfoSync = wx.getSystemInfoSync(),
  1823. platform = _wx$getSystemInfoSync.platform,
  1824. pixelRatio = _wx$getSystemInfoSync.pixelRatio,
  1825. windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  1826. deviceWidth = windowWidth;
  1827. deviceDPR = pixelRatio;
  1828. isIOS = platform === 'ios';
  1829. }
  1830. function upx2px(number, newDeviceWidth) {
  1831. if (deviceWidth === 0) {
  1832. checkDeviceWidth();
  1833. }
  1834. number = Number(number);
  1835. if (number === 0) {
  1836. return 0;
  1837. }
  1838. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  1839. if (result < 0) {
  1840. result = -result;
  1841. }
  1842. result = Math.floor(result + EPS);
  1843. if (result === 0) {
  1844. if (deviceDPR === 1 || !isIOS) {
  1845. result = 1;
  1846. } else {
  1847. result = 0.5;
  1848. }
  1849. }
  1850. return number < 0 ? -result : result;
  1851. }
  1852. var LOCALE_ZH_HANS = 'zh-Hans';
  1853. var LOCALE_ZH_HANT = 'zh-Hant';
  1854. var LOCALE_EN = 'en';
  1855. var LOCALE_FR = 'fr';
  1856. var LOCALE_ES = 'es';
  1857. var messages = {};
  1858. var locale;
  1859. {
  1860. locale = normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  1861. }
  1862. function initI18nMessages() {
  1863. if (!isEnableLocale()) {
  1864. return;
  1865. }
  1866. var localeKeys = Object.keys(__uniConfig.locales);
  1867. if (localeKeys.length) {
  1868. localeKeys.forEach(function (locale) {
  1869. var curMessages = messages[locale];
  1870. var userMessages = __uniConfig.locales[locale];
  1871. if (curMessages) {
  1872. Object.assign(curMessages, userMessages);
  1873. } else {
  1874. messages[locale] = userMessages;
  1875. }
  1876. });
  1877. }
  1878. }
  1879. initI18nMessages();
  1880. var i18n = (0, _uniI18n.initVueI18n)(locale, {});
  1881. var t = i18n.t;
  1882. var i18nMixin = i18n.mixin = {
  1883. beforeCreate: function beforeCreate() {
  1884. var _this = this;
  1885. var unwatch = i18n.i18n.watchLocale(function () {
  1886. _this.$forceUpdate();
  1887. });
  1888. this.$once('hook:beforeDestroy', function () {
  1889. unwatch();
  1890. });
  1891. },
  1892. methods: {
  1893. $$t: function $$t(key, values) {
  1894. return t(key, values);
  1895. }
  1896. }
  1897. };
  1898. var setLocale = i18n.setLocale;
  1899. var getLocale = i18n.getLocale;
  1900. function initAppLocale(Vue, appVm, locale) {
  1901. var state = Vue.observable({
  1902. locale: locale || i18n.getLocale()
  1903. });
  1904. var localeWatchers = [];
  1905. appVm.$watchLocale = function (fn) {
  1906. localeWatchers.push(fn);
  1907. };
  1908. Object.defineProperty(appVm, '$locale', {
  1909. get: function get() {
  1910. return state.locale;
  1911. },
  1912. set: function set(v) {
  1913. state.locale = v;
  1914. localeWatchers.forEach(function (watch) {
  1915. return watch(v);
  1916. });
  1917. }
  1918. });
  1919. }
  1920. function isEnableLocale() {
  1921. return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length;
  1922. }
  1923. function include(str, parts) {
  1924. return !!parts.find(function (part) {
  1925. return str.indexOf(part) !== -1;
  1926. });
  1927. }
  1928. function startsWith(str, parts) {
  1929. return parts.find(function (part) {
  1930. return str.indexOf(part) === 0;
  1931. });
  1932. }
  1933. function normalizeLocale(locale, messages) {
  1934. if (!locale) {
  1935. return;
  1936. }
  1937. locale = locale.trim().replace(/_/g, '-');
  1938. if (messages && messages[locale]) {
  1939. return locale;
  1940. }
  1941. locale = locale.toLowerCase();
  1942. if (locale === 'chinese') {
  1943. // 支付宝
  1944. return LOCALE_ZH_HANS;
  1945. }
  1946. if (locale.indexOf('zh') === 0) {
  1947. if (locale.indexOf('-hans') > -1) {
  1948. return LOCALE_ZH_HANS;
  1949. }
  1950. if (locale.indexOf('-hant') > -1) {
  1951. return LOCALE_ZH_HANT;
  1952. }
  1953. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  1954. return LOCALE_ZH_HANT;
  1955. }
  1956. return LOCALE_ZH_HANS;
  1957. }
  1958. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  1959. if (lang) {
  1960. return lang;
  1961. }
  1962. }
  1963. // export function initI18n() {
  1964. // const localeKeys = Object.keys(__uniConfig.locales || {})
  1965. // if (localeKeys.length) {
  1966. // localeKeys.forEach((locale) =>
  1967. // i18n.add(locale, __uniConfig.locales[locale])
  1968. // )
  1969. // }
  1970. // }
  1971. function getLocale$1() {
  1972. // 优先使用 $locale
  1973. if (isFn(getApp)) {
  1974. var app = getApp({
  1975. allowDefault: true
  1976. });
  1977. if (app && app.$vm) {
  1978. return app.$vm.$locale;
  1979. }
  1980. }
  1981. return normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  1982. }
  1983. function setLocale$1(locale) {
  1984. var app = isFn(getApp) ? getApp() : false;
  1985. if (!app) {
  1986. return false;
  1987. }
  1988. var oldLocale = app.$vm.$locale;
  1989. if (oldLocale !== locale) {
  1990. app.$vm.$locale = locale;
  1991. onLocaleChangeCallbacks.forEach(function (fn) {
  1992. return fn({
  1993. locale: locale
  1994. });
  1995. });
  1996. return true;
  1997. }
  1998. return false;
  1999. }
  2000. var onLocaleChangeCallbacks = [];
  2001. function onLocaleChange(fn) {
  2002. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  2003. onLocaleChangeCallbacks.push(fn);
  2004. }
  2005. }
  2006. if (typeof global !== 'undefined') {
  2007. global.getLocale = getLocale$1;
  2008. }
  2009. var interceptors = {
  2010. promiseInterceptor: promiseInterceptor
  2011. };
  2012. var baseApi = /*#__PURE__*/Object.freeze({
  2013. __proto__: null,
  2014. upx2px: upx2px,
  2015. getLocale: getLocale$1,
  2016. setLocale: setLocale$1,
  2017. onLocaleChange: onLocaleChange,
  2018. addInterceptor: addInterceptor,
  2019. removeInterceptor: removeInterceptor,
  2020. interceptors: interceptors
  2021. });
  2022. function findExistsPageIndex(url) {
  2023. var pages = getCurrentPages();
  2024. var len = pages.length;
  2025. while (len--) {
  2026. var page = pages[len];
  2027. if (page.$page && page.$page.fullPath === url) {
  2028. return len;
  2029. }
  2030. }
  2031. return -1;
  2032. }
  2033. var redirectTo = {
  2034. name: function name(fromArgs) {
  2035. if (fromArgs.exists === 'back' && fromArgs.delta) {
  2036. return 'navigateBack';
  2037. }
  2038. return 'redirectTo';
  2039. },
  2040. args: function args(fromArgs) {
  2041. if (fromArgs.exists === 'back' && fromArgs.url) {
  2042. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  2043. if (existsPageIndex !== -1) {
  2044. var delta = getCurrentPages().length - 1 - existsPageIndex;
  2045. if (delta > 0) {
  2046. fromArgs.delta = delta;
  2047. }
  2048. }
  2049. }
  2050. }
  2051. };
  2052. var previewImage = {
  2053. args: function args(fromArgs) {
  2054. var currentIndex = parseInt(fromArgs.current);
  2055. if (isNaN(currentIndex)) {
  2056. return;
  2057. }
  2058. var urls = fromArgs.urls;
  2059. if (!Array.isArray(urls)) {
  2060. return;
  2061. }
  2062. var len = urls.length;
  2063. if (!len) {
  2064. return;
  2065. }
  2066. if (currentIndex < 0) {
  2067. currentIndex = 0;
  2068. } else if (currentIndex >= len) {
  2069. currentIndex = len - 1;
  2070. }
  2071. if (currentIndex > 0) {
  2072. fromArgs.current = urls[currentIndex];
  2073. fromArgs.urls = urls.filter(function (item, index) {
  2074. return index < currentIndex ? item !== urls[currentIndex] : true;
  2075. });
  2076. } else {
  2077. fromArgs.current = urls[0];
  2078. }
  2079. return {
  2080. indicator: false,
  2081. loop: false
  2082. };
  2083. }
  2084. };
  2085. var UUID_KEY = '__DC_STAT_UUID';
  2086. var deviceId;
  2087. function useDeviceId(result) {
  2088. deviceId = deviceId || wx.getStorageSync(UUID_KEY);
  2089. if (!deviceId) {
  2090. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  2091. wx.setStorage({
  2092. key: UUID_KEY,
  2093. data: deviceId
  2094. });
  2095. }
  2096. result.deviceId = deviceId;
  2097. }
  2098. function addSafeAreaInsets(result) {
  2099. if (result.safeArea) {
  2100. var safeArea = result.safeArea;
  2101. result.safeAreaInsets = {
  2102. top: safeArea.top,
  2103. left: safeArea.left,
  2104. right: result.windowWidth - safeArea.right,
  2105. bottom: result.screenHeight - safeArea.bottom
  2106. };
  2107. }
  2108. }
  2109. function populateParameters(result) {
  2110. var _result$brand = result.brand,
  2111. brand = _result$brand === void 0 ? '' : _result$brand,
  2112. _result$model = result.model,
  2113. model = _result$model === void 0 ? '' : _result$model,
  2114. _result$system = result.system,
  2115. system = _result$system === void 0 ? '' : _result$system,
  2116. _result$language = result.language,
  2117. language = _result$language === void 0 ? '' : _result$language,
  2118. theme = result.theme,
  2119. version = result.version,
  2120. platform = result.platform,
  2121. fontSizeSetting = result.fontSizeSetting,
  2122. SDKVersion = result.SDKVersion,
  2123. pixelRatio = result.pixelRatio,
  2124. deviceOrientation = result.deviceOrientation;
  2125. // const isQuickApp = "mp-weixin".indexOf('quickapp-webview') !== -1
  2126. var extraParam = {};
  2127. // osName osVersion
  2128. var osName = '';
  2129. var osVersion = '';
  2130. {
  2131. osName = system.split(' ')[0] || '';
  2132. osVersion = system.split(' ')[1] || '';
  2133. }
  2134. var hostVersion = version;
  2135. // deviceType
  2136. var deviceType = getGetDeviceType(result, model);
  2137. // deviceModel
  2138. var deviceBrand = getDeviceBrand(brand);
  2139. // hostName
  2140. var _hostName = getHostName(result);
  2141. // deviceOrientation
  2142. var _deviceOrientation = deviceOrientation; // 仅 微信 百度 支持
  2143. // devicePixelRatio
  2144. var _devicePixelRatio = pixelRatio;
  2145. // SDKVersion
  2146. var _SDKVersion = SDKVersion;
  2147. // hostLanguage
  2148. var hostLanguage = language.replace(/_/g, '-');
  2149. // wx.getAccountInfoSync
  2150. var parameters = {
  2151. appId: "__UNI__73F6024",
  2152. appName: "六院联创",
  2153. appVersion: "1.0.0",
  2154. appVersionCode: "100",
  2155. appLanguage: getAppLanguage(hostLanguage),
  2156. uniCompileVersion: "3.96",
  2157. uniRuntimeVersion: "3.96",
  2158. uniPlatform: undefined || "mp-weixin",
  2159. deviceBrand: deviceBrand,
  2160. deviceModel: model,
  2161. deviceType: deviceType,
  2162. devicePixelRatio: _devicePixelRatio,
  2163. deviceOrientation: _deviceOrientation,
  2164. osName: osName.toLocaleLowerCase(),
  2165. osVersion: osVersion,
  2166. hostTheme: theme,
  2167. hostVersion: hostVersion,
  2168. hostLanguage: hostLanguage,
  2169. hostName: _hostName,
  2170. hostSDKVersion: _SDKVersion,
  2171. hostFontSizeSetting: fontSizeSetting,
  2172. windowTop: 0,
  2173. windowBottom: 0,
  2174. // TODO
  2175. osLanguage: undefined,
  2176. osTheme: undefined,
  2177. ua: undefined,
  2178. hostPackageName: undefined,
  2179. browserName: undefined,
  2180. browserVersion: undefined
  2181. };
  2182. Object.assign(result, parameters, extraParam);
  2183. }
  2184. function getGetDeviceType(result, model) {
  2185. var deviceType = result.deviceType || 'phone';
  2186. {
  2187. var deviceTypeMaps = {
  2188. ipad: 'pad',
  2189. windows: 'pc',
  2190. mac: 'pc'
  2191. };
  2192. var deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
  2193. var _model = model.toLocaleLowerCase();
  2194. for (var index = 0; index < deviceTypeMapsKeys.length; index++) {
  2195. var _m = deviceTypeMapsKeys[index];
  2196. if (_model.indexOf(_m) !== -1) {
  2197. deviceType = deviceTypeMaps[_m];
  2198. break;
  2199. }
  2200. }
  2201. }
  2202. return deviceType;
  2203. }
  2204. function getDeviceBrand(brand) {
  2205. var deviceBrand = brand;
  2206. if (deviceBrand) {
  2207. deviceBrand = brand.toLocaleLowerCase();
  2208. }
  2209. return deviceBrand;
  2210. }
  2211. function getAppLanguage(defaultLanguage) {
  2212. return getLocale$1 ? getLocale$1() : defaultLanguage;
  2213. }
  2214. function getHostName(result) {
  2215. var _platform = 'WeChat';
  2216. var _hostName = result.hostName || _platform; // mp-jd
  2217. {
  2218. if (result.environment) {
  2219. _hostName = result.environment;
  2220. } else if (result.host && result.host.env) {
  2221. _hostName = result.host.env;
  2222. }
  2223. }
  2224. return _hostName;
  2225. }
  2226. var getSystemInfo = {
  2227. returnValue: function returnValue(result) {
  2228. useDeviceId(result);
  2229. addSafeAreaInsets(result);
  2230. populateParameters(result);
  2231. }
  2232. };
  2233. var showActionSheet = {
  2234. args: function args(fromArgs) {
  2235. if ((0, _typeof2.default)(fromArgs) === 'object') {
  2236. fromArgs.alertText = fromArgs.title;
  2237. }
  2238. }
  2239. };
  2240. var getAppBaseInfo = {
  2241. returnValue: function returnValue(result) {
  2242. var _result = result,
  2243. version = _result.version,
  2244. language = _result.language,
  2245. SDKVersion = _result.SDKVersion,
  2246. theme = _result.theme;
  2247. var _hostName = getHostName(result);
  2248. var hostLanguage = language.replace('_', '-');
  2249. result = sortObject(Object.assign(result, {
  2250. appId: "__UNI__73F6024",
  2251. appName: "六院联创",
  2252. appVersion: "1.0.0",
  2253. appVersionCode: "100",
  2254. appLanguage: getAppLanguage(hostLanguage),
  2255. hostVersion: version,
  2256. hostLanguage: hostLanguage,
  2257. hostName: _hostName,
  2258. hostSDKVersion: SDKVersion,
  2259. hostTheme: theme
  2260. }));
  2261. }
  2262. };
  2263. var getDeviceInfo = {
  2264. returnValue: function returnValue(result) {
  2265. var _result2 = result,
  2266. brand = _result2.brand,
  2267. model = _result2.model;
  2268. var deviceType = getGetDeviceType(result, model);
  2269. var deviceBrand = getDeviceBrand(brand);
  2270. useDeviceId(result);
  2271. result = sortObject(Object.assign(result, {
  2272. deviceType: deviceType,
  2273. deviceBrand: deviceBrand,
  2274. deviceModel: model
  2275. }));
  2276. }
  2277. };
  2278. var getWindowInfo = {
  2279. returnValue: function returnValue(result) {
  2280. addSafeAreaInsets(result);
  2281. result = sortObject(Object.assign(result, {
  2282. windowTop: 0,
  2283. windowBottom: 0
  2284. }));
  2285. }
  2286. };
  2287. var getAppAuthorizeSetting = {
  2288. returnValue: function returnValue(result) {
  2289. var locationReducedAccuracy = result.locationReducedAccuracy;
  2290. result.locationAccuracy = 'unsupported';
  2291. if (locationReducedAccuracy === true) {
  2292. result.locationAccuracy = 'reduced';
  2293. } else if (locationReducedAccuracy === false) {
  2294. result.locationAccuracy = 'full';
  2295. }
  2296. }
  2297. };
  2298. // import navigateTo from 'uni-helpers/navigate-to'
  2299. var compressImage = {
  2300. args: function args(fromArgs) {
  2301. // https://developers.weixin.qq.com/community/develop/doc/000c08940c865011298e0a43256800?highLine=compressHeight
  2302. if (fromArgs.compressedHeight && !fromArgs.compressHeight) {
  2303. fromArgs.compressHeight = fromArgs.compressedHeight;
  2304. }
  2305. if (fromArgs.compressedWidth && !fromArgs.compressWidth) {
  2306. fromArgs.compressWidth = fromArgs.compressedWidth;
  2307. }
  2308. }
  2309. };
  2310. var protocols = {
  2311. redirectTo: redirectTo,
  2312. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  2313. previewImage: previewImage,
  2314. getSystemInfo: getSystemInfo,
  2315. getSystemInfoSync: getSystemInfo,
  2316. showActionSheet: showActionSheet,
  2317. getAppBaseInfo: getAppBaseInfo,
  2318. getDeviceInfo: getDeviceInfo,
  2319. getWindowInfo: getWindowInfo,
  2320. getAppAuthorizeSetting: getAppAuthorizeSetting,
  2321. compressImage: compressImage
  2322. };
  2323. var todos = ['vibrate', 'preloadPage', 'unPreloadPage', 'loadSubPackage'];
  2324. var canIUses = [];
  2325. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  2326. function processCallback(methodName, method, returnValue) {
  2327. return function (res) {
  2328. return method(processReturnValue(methodName, res, returnValue));
  2329. };
  2330. }
  2331. function processArgs(methodName, fromArgs) {
  2332. var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  2333. var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  2334. var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  2335. if (isPlainObject(fromArgs)) {
  2336. // 一般 api 的参数解析
  2337. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  2338. if (isFn(argsOption)) {
  2339. argsOption = argsOption(fromArgs, toArgs) || {};
  2340. }
  2341. for (var key in fromArgs) {
  2342. if (hasOwn(argsOption, key)) {
  2343. var keyOption = argsOption[key];
  2344. if (isFn(keyOption)) {
  2345. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  2346. }
  2347. if (!keyOption) {
  2348. // 不支持的参数
  2349. console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  2350. } else if (isStr(keyOption)) {
  2351. // 重写参数 key
  2352. toArgs[keyOption] = fromArgs[key];
  2353. } else if (isPlainObject(keyOption)) {
  2354. // {name:newName,value:value}可重新指定参数 key:value
  2355. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  2356. }
  2357. } else if (CALLBACKS.indexOf(key) !== -1) {
  2358. if (isFn(fromArgs[key])) {
  2359. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  2360. }
  2361. } else {
  2362. if (!keepFromArgs) {
  2363. toArgs[key] = fromArgs[key];
  2364. }
  2365. }
  2366. }
  2367. return toArgs;
  2368. } else if (isFn(fromArgs)) {
  2369. fromArgs = processCallback(methodName, fromArgs, returnValue);
  2370. }
  2371. return fromArgs;
  2372. }
  2373. function processReturnValue(methodName, res, returnValue) {
  2374. var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  2375. if (isFn(protocols.returnValue)) {
  2376. // 处理通用 returnValue
  2377. res = protocols.returnValue(methodName, res);
  2378. }
  2379. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  2380. }
  2381. function wrapper(methodName, method) {
  2382. if (hasOwn(protocols, methodName)) {
  2383. var protocol = protocols[methodName];
  2384. if (!protocol) {
  2385. // 暂不支持的 api
  2386. return function () {
  2387. console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  2388. };
  2389. }
  2390. return function (arg1, arg2) {
  2391. // 目前 api 最多两个参数
  2392. var options = protocol;
  2393. if (isFn(protocol)) {
  2394. options = protocol(arg1);
  2395. }
  2396. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  2397. var args = [arg1];
  2398. if (typeof arg2 !== 'undefined') {
  2399. args.push(arg2);
  2400. }
  2401. if (isFn(options.name)) {
  2402. methodName = options.name(arg1);
  2403. } else if (isStr(options.name)) {
  2404. methodName = options.name;
  2405. }
  2406. var returnValue = wx[methodName].apply(wx, args);
  2407. if (isSyncApi(methodName)) {
  2408. // 同步 api
  2409. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  2410. }
  2411. return returnValue;
  2412. };
  2413. }
  2414. return method;
  2415. }
  2416. var todoApis = Object.create(null);
  2417. var TODOS = ['onTabBarMidButtonTap', 'subscribePush', 'unsubscribePush', 'onPush', 'offPush', 'share'];
  2418. function createTodoApi(name) {
  2419. return function todoApi(_ref) {
  2420. var fail = _ref.fail,
  2421. complete = _ref.complete;
  2422. var res = {
  2423. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported")
  2424. };
  2425. isFn(fail) && fail(res);
  2426. isFn(complete) && complete(res);
  2427. };
  2428. }
  2429. TODOS.forEach(function (name) {
  2430. todoApis[name] = createTodoApi(name);
  2431. });
  2432. var providers = {
  2433. oauth: ['weixin'],
  2434. share: ['weixin'],
  2435. payment: ['wxpay'],
  2436. push: ['weixin']
  2437. };
  2438. function getProvider(_ref2) {
  2439. var service = _ref2.service,
  2440. success = _ref2.success,
  2441. fail = _ref2.fail,
  2442. complete = _ref2.complete;
  2443. var res = false;
  2444. if (providers[service]) {
  2445. res = {
  2446. errMsg: 'getProvider:ok',
  2447. service: service,
  2448. provider: providers[service]
  2449. };
  2450. isFn(success) && success(res);
  2451. } else {
  2452. res = {
  2453. errMsg: 'getProvider:fail service not found'
  2454. };
  2455. isFn(fail) && fail(res);
  2456. }
  2457. isFn(complete) && complete(res);
  2458. }
  2459. var extraApi = /*#__PURE__*/Object.freeze({
  2460. __proto__: null,
  2461. getProvider: getProvider
  2462. });
  2463. var getEmitter = function () {
  2464. var Emitter;
  2465. return function getUniEmitter() {
  2466. if (!Emitter) {
  2467. Emitter = new _vue.default();
  2468. }
  2469. return Emitter;
  2470. };
  2471. }();
  2472. function apply(ctx, method, args) {
  2473. return ctx[method].apply(ctx, args);
  2474. }
  2475. function $on() {
  2476. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  2477. }
  2478. function $off() {
  2479. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  2480. }
  2481. function $once() {
  2482. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  2483. }
  2484. function $emit() {
  2485. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  2486. }
  2487. var eventApi = /*#__PURE__*/Object.freeze({
  2488. __proto__: null,
  2489. $on: $on,
  2490. $off: $off,
  2491. $once: $once,
  2492. $emit: $emit
  2493. });
  2494. /**
  2495. * 框架内 try-catch
  2496. */
  2497. /**
  2498. * 开发者 try-catch
  2499. */
  2500. function tryCatch(fn) {
  2501. return function () {
  2502. try {
  2503. return fn.apply(fn, arguments);
  2504. } catch (e) {
  2505. // TODO
  2506. console.error(e);
  2507. }
  2508. };
  2509. }
  2510. function getApiCallbacks(params) {
  2511. var apiCallbacks = {};
  2512. for (var name in params) {
  2513. var param = params[name];
  2514. if (isFn(param)) {
  2515. apiCallbacks[name] = tryCatch(param);
  2516. delete params[name];
  2517. }
  2518. }
  2519. return apiCallbacks;
  2520. }
  2521. var cid;
  2522. var cidErrMsg;
  2523. var enabled;
  2524. function normalizePushMessage(message) {
  2525. try {
  2526. return JSON.parse(message);
  2527. } catch (e) {}
  2528. return message;
  2529. }
  2530. function invokePushCallback(args) {
  2531. if (args.type === 'enabled') {
  2532. enabled = true;
  2533. } else if (args.type === 'clientId') {
  2534. cid = args.cid;
  2535. cidErrMsg = args.errMsg;
  2536. invokeGetPushCidCallbacks(cid, args.errMsg);
  2537. } else if (args.type === 'pushMsg') {
  2538. var message = {
  2539. type: 'receive',
  2540. data: normalizePushMessage(args.message)
  2541. };
  2542. for (var i = 0; i < onPushMessageCallbacks.length; i++) {
  2543. var callback = onPushMessageCallbacks[i];
  2544. callback(message);
  2545. // 该消息已被阻止
  2546. if (message.stopped) {
  2547. break;
  2548. }
  2549. }
  2550. } else if (args.type === 'click') {
  2551. onPushMessageCallbacks.forEach(function (callback) {
  2552. callback({
  2553. type: 'click',
  2554. data: normalizePushMessage(args.message)
  2555. });
  2556. });
  2557. }
  2558. }
  2559. var getPushCidCallbacks = [];
  2560. function invokeGetPushCidCallbacks(cid, errMsg) {
  2561. getPushCidCallbacks.forEach(function (callback) {
  2562. callback(cid, errMsg);
  2563. });
  2564. getPushCidCallbacks.length = 0;
  2565. }
  2566. function getPushClientId(args) {
  2567. if (!isPlainObject(args)) {
  2568. args = {};
  2569. }
  2570. var _getApiCallbacks = getApiCallbacks(args),
  2571. success = _getApiCallbacks.success,
  2572. fail = _getApiCallbacks.fail,
  2573. complete = _getApiCallbacks.complete;
  2574. var hasSuccess = isFn(success);
  2575. var hasFail = isFn(fail);
  2576. var hasComplete = isFn(complete);
  2577. Promise.resolve().then(function () {
  2578. if (typeof enabled === 'undefined') {
  2579. enabled = false;
  2580. cid = '';
  2581. cidErrMsg = 'uniPush is not enabled';
  2582. }
  2583. getPushCidCallbacks.push(function (cid, errMsg) {
  2584. var res;
  2585. if (cid) {
  2586. res = {
  2587. errMsg: 'getPushClientId:ok',
  2588. cid: cid
  2589. };
  2590. hasSuccess && success(res);
  2591. } else {
  2592. res = {
  2593. errMsg: 'getPushClientId:fail' + (errMsg ? ' ' + errMsg : '')
  2594. };
  2595. hasFail && fail(res);
  2596. }
  2597. hasComplete && complete(res);
  2598. });
  2599. if (typeof cid !== 'undefined') {
  2600. invokeGetPushCidCallbacks(cid, cidErrMsg);
  2601. }
  2602. });
  2603. }
  2604. var onPushMessageCallbacks = [];
  2605. // 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现
  2606. var onPushMessage = function onPushMessage(fn) {
  2607. if (onPushMessageCallbacks.indexOf(fn) === -1) {
  2608. onPushMessageCallbacks.push(fn);
  2609. }
  2610. };
  2611. var offPushMessage = function offPushMessage(fn) {
  2612. if (!fn) {
  2613. onPushMessageCallbacks.length = 0;
  2614. } else {
  2615. var index = onPushMessageCallbacks.indexOf(fn);
  2616. if (index > -1) {
  2617. onPushMessageCallbacks.splice(index, 1);
  2618. }
  2619. }
  2620. };
  2621. var baseInfo = wx.getAppBaseInfo && wx.getAppBaseInfo();
  2622. if (!baseInfo) {
  2623. baseInfo = wx.getSystemInfoSync();
  2624. }
  2625. var host = baseInfo ? baseInfo.host : null;
  2626. var shareVideoMessage = host && host.env === 'SAAASDK' ? wx.miniapp.shareVideoMessage : wx.shareVideoMessage;
  2627. var api = /*#__PURE__*/Object.freeze({
  2628. __proto__: null,
  2629. shareVideoMessage: shareVideoMessage,
  2630. getPushClientId: getPushClientId,
  2631. onPushMessage: onPushMessage,
  2632. offPushMessage: offPushMessage,
  2633. invokePushCallback: invokePushCallback
  2634. });
  2635. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  2636. function findVmByVueId(vm, vuePid) {
  2637. var $children = vm.$children;
  2638. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  2639. for (var i = $children.length - 1; i >= 0; i--) {
  2640. var childVm = $children[i];
  2641. if (childVm.$scope._$vueId === vuePid) {
  2642. return childVm;
  2643. }
  2644. }
  2645. // 反向递归查找
  2646. var parentVm;
  2647. for (var _i = $children.length - 1; _i >= 0; _i--) {
  2648. parentVm = findVmByVueId($children[_i], vuePid);
  2649. if (parentVm) {
  2650. return parentVm;
  2651. }
  2652. }
  2653. }
  2654. function initBehavior(options) {
  2655. return Behavior(options);
  2656. }
  2657. function isPage() {
  2658. return !!this.route;
  2659. }
  2660. function initRelation(detail) {
  2661. this.triggerEvent('__l', detail);
  2662. }
  2663. function selectAllComponents(mpInstance, selector, $refs) {
  2664. var components = mpInstance.selectAllComponents(selector) || [];
  2665. components.forEach(function (component) {
  2666. var ref = component.dataset.ref;
  2667. $refs[ref] = component.$vm || toSkip(component);
  2668. {
  2669. if (component.dataset.vueGeneric === 'scoped') {
  2670. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  2671. selectAllComponents(scopedComponent, selector, $refs);
  2672. });
  2673. }
  2674. }
  2675. });
  2676. }
  2677. function syncRefs(refs, newRefs) {
  2678. var oldKeys = (0, _construct2.default)(Set, (0, _toConsumableArray2.default)(Object.keys(refs)));
  2679. var newKeys = Object.keys(newRefs);
  2680. newKeys.forEach(function (key) {
  2681. var oldValue = refs[key];
  2682. var newValue = newRefs[key];
  2683. if (Array.isArray(oldValue) && Array.isArray(newValue) && oldValue.length === newValue.length && newValue.every(function (value) {
  2684. return oldValue.includes(value);
  2685. })) {
  2686. return;
  2687. }
  2688. refs[key] = newValue;
  2689. oldKeys.delete(key);
  2690. });
  2691. oldKeys.forEach(function (key) {
  2692. delete refs[key];
  2693. });
  2694. return refs;
  2695. }
  2696. function initRefs(vm) {
  2697. var mpInstance = vm.$scope;
  2698. var refs = {};
  2699. Object.defineProperty(vm, '$refs', {
  2700. get: function get() {
  2701. var $refs = {};
  2702. selectAllComponents(mpInstance, '.vue-ref', $refs);
  2703. // TODO 暂不考虑 for 中的 scoped
  2704. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for') || [];
  2705. forComponents.forEach(function (component) {
  2706. var ref = component.dataset.ref;
  2707. if (!$refs[ref]) {
  2708. $refs[ref] = [];
  2709. }
  2710. $refs[ref].push(component.$vm || toSkip(component));
  2711. });
  2712. return syncRefs(refs, $refs);
  2713. }
  2714. });
  2715. }
  2716. function handleLink(event) {
  2717. var _ref3 = event.detail || event.value,
  2718. vuePid = _ref3.vuePid,
  2719. vueOptions = _ref3.vueOptions; // detail 是微信,value 是百度(dipatch)
  2720. var parentVm;
  2721. if (vuePid) {
  2722. parentVm = findVmByVueId(this.$vm, vuePid);
  2723. }
  2724. if (!parentVm) {
  2725. parentVm = this.$vm;
  2726. }
  2727. vueOptions.parent = parentVm;
  2728. }
  2729. function markMPComponent(component) {
  2730. // 在 Vue 中标记为小程序组件
  2731. var IS_MP = '__v_isMPComponent';
  2732. Object.defineProperty(component, IS_MP, {
  2733. configurable: true,
  2734. enumerable: false,
  2735. value: true
  2736. });
  2737. return component;
  2738. }
  2739. function toSkip(obj) {
  2740. var OB = '__ob__';
  2741. var SKIP = '__v_skip';
  2742. if (isObject(obj) && Object.isExtensible(obj)) {
  2743. // 避免被 @vue/composition-api 观测
  2744. Object.defineProperty(obj, OB, {
  2745. configurable: true,
  2746. enumerable: false,
  2747. value: (0, _defineProperty2.default)({}, SKIP, true)
  2748. });
  2749. }
  2750. return obj;
  2751. }
  2752. var WORKLET_RE = /_(.*)_worklet_factory_/;
  2753. function initWorkletMethods(mpMethods, vueMethods) {
  2754. if (vueMethods) {
  2755. Object.keys(vueMethods).forEach(function (name) {
  2756. var matches = name.match(WORKLET_RE);
  2757. if (matches) {
  2758. var workletName = matches[1];
  2759. mpMethods[name] = vueMethods[name];
  2760. mpMethods[workletName] = vueMethods[workletName];
  2761. }
  2762. });
  2763. }
  2764. }
  2765. var MPPage = Page;
  2766. var MPComponent = Component;
  2767. var customizeRE = /:/g;
  2768. var customize = cached(function (str) {
  2769. return camelize(str.replace(customizeRE, '-'));
  2770. });
  2771. function initTriggerEvent(mpInstance) {
  2772. var oldTriggerEvent = mpInstance.triggerEvent;
  2773. var newTriggerEvent = function newTriggerEvent(event) {
  2774. for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
  2775. args[_key3 - 1] = arguments[_key3];
  2776. }
  2777. // 事件名统一转驼峰格式,仅处理:当前组件为 vue 组件、当前组件为 vue 组件子组件
  2778. if (this.$vm || this.dataset && this.dataset.comType) {
  2779. event = customize(event);
  2780. } else {
  2781. // 针对微信/QQ小程序单独补充驼峰格式事件,以兼容历史项目
  2782. var newEvent = customize(event);
  2783. if (newEvent !== event) {
  2784. oldTriggerEvent.apply(this, [newEvent].concat(args));
  2785. }
  2786. }
  2787. return oldTriggerEvent.apply(this, [event].concat(args));
  2788. };
  2789. try {
  2790. // 京东小程序 triggerEvent 为只读
  2791. mpInstance.triggerEvent = newTriggerEvent;
  2792. } catch (error) {
  2793. mpInstance._triggerEvent = newTriggerEvent;
  2794. }
  2795. }
  2796. function initHook(name, options, isComponent) {
  2797. var oldHook = options[name];
  2798. options[name] = function () {
  2799. markMPComponent(this);
  2800. initTriggerEvent(this);
  2801. if (oldHook) {
  2802. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  2803. args[_key4] = arguments[_key4];
  2804. }
  2805. return oldHook.apply(this, args);
  2806. }
  2807. };
  2808. }
  2809. if (!MPPage.__$wrappered) {
  2810. MPPage.__$wrappered = true;
  2811. Page = function Page() {
  2812. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  2813. initHook('onLoad', options);
  2814. return MPPage(options);
  2815. };
  2816. Page.after = MPPage.after;
  2817. Component = function Component() {
  2818. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  2819. initHook('created', options);
  2820. return MPComponent(options);
  2821. };
  2822. }
  2823. var PAGE_EVENT_HOOKS = ['onPullDownRefresh', 'onReachBottom', 'onAddToFavorites', 'onShareTimeline', 'onShareAppMessage', 'onPageScroll', 'onResize', 'onTabItemTap'];
  2824. function initMocks(vm, mocks) {
  2825. var mpInstance = vm.$mp[vm.mpType];
  2826. mocks.forEach(function (mock) {
  2827. if (hasOwn(mpInstance, mock)) {
  2828. vm[mock] = mpInstance[mock];
  2829. }
  2830. });
  2831. }
  2832. function hasHook(hook, vueOptions) {
  2833. if (!vueOptions) {
  2834. return true;
  2835. }
  2836. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  2837. return true;
  2838. }
  2839. vueOptions = vueOptions.default || vueOptions;
  2840. if (isFn(vueOptions)) {
  2841. if (isFn(vueOptions.extendOptions[hook])) {
  2842. return true;
  2843. }
  2844. if (vueOptions.super && vueOptions.super.options && Array.isArray(vueOptions.super.options[hook])) {
  2845. return true;
  2846. }
  2847. return false;
  2848. }
  2849. if (isFn(vueOptions[hook]) || Array.isArray(vueOptions[hook])) {
  2850. return true;
  2851. }
  2852. var mixins = vueOptions.mixins;
  2853. if (Array.isArray(mixins)) {
  2854. return !!mixins.find(function (mixin) {
  2855. return hasHook(hook, mixin);
  2856. });
  2857. }
  2858. }
  2859. function initHooks(mpOptions, hooks, vueOptions) {
  2860. hooks.forEach(function (hook) {
  2861. if (hasHook(hook, vueOptions)) {
  2862. mpOptions[hook] = function (args) {
  2863. return this.$vm && this.$vm.__call_hook(hook, args);
  2864. };
  2865. }
  2866. });
  2867. }
  2868. function initUnknownHooks(mpOptions, vueOptions) {
  2869. var excludes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  2870. findHooks(vueOptions).forEach(function (hook) {
  2871. return initHook$1(mpOptions, hook, excludes);
  2872. });
  2873. }
  2874. function findHooks(vueOptions) {
  2875. var hooks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  2876. if (vueOptions) {
  2877. Object.keys(vueOptions).forEach(function (name) {
  2878. if (name.indexOf('on') === 0 && isFn(vueOptions[name])) {
  2879. hooks.push(name);
  2880. }
  2881. });
  2882. }
  2883. return hooks;
  2884. }
  2885. function initHook$1(mpOptions, hook, excludes) {
  2886. if (excludes.indexOf(hook) === -1 && !hasOwn(mpOptions, hook)) {
  2887. mpOptions[hook] = function (args) {
  2888. return this.$vm && this.$vm.__call_hook(hook, args);
  2889. };
  2890. }
  2891. }
  2892. function initVueComponent(Vue, vueOptions) {
  2893. vueOptions = vueOptions.default || vueOptions;
  2894. var VueComponent;
  2895. if (isFn(vueOptions)) {
  2896. VueComponent = vueOptions;
  2897. } else {
  2898. VueComponent = Vue.extend(vueOptions);
  2899. }
  2900. vueOptions = VueComponent.options;
  2901. return [VueComponent, vueOptions];
  2902. }
  2903. function initSlots(vm, vueSlots) {
  2904. if (Array.isArray(vueSlots) && vueSlots.length) {
  2905. var $slots = Object.create(null);
  2906. vueSlots.forEach(function (slotName) {
  2907. $slots[slotName] = true;
  2908. });
  2909. vm.$scopedSlots = vm.$slots = $slots;
  2910. }
  2911. }
  2912. function initVueIds(vueIds, mpInstance) {
  2913. vueIds = (vueIds || '').split(',');
  2914. var len = vueIds.length;
  2915. if (len === 1) {
  2916. mpInstance._$vueId = vueIds[0];
  2917. } else if (len === 2) {
  2918. mpInstance._$vueId = vueIds[0];
  2919. mpInstance._$vuePid = vueIds[1];
  2920. }
  2921. }
  2922. function initData(vueOptions, context) {
  2923. var data = vueOptions.data || {};
  2924. var methods = vueOptions.methods || {};
  2925. if (typeof data === 'function') {
  2926. try {
  2927. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  2928. } catch (e) {
  2929. if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"六院联创","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  2930. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  2931. }
  2932. }
  2933. } else {
  2934. try {
  2935. // 对 data 格式化
  2936. data = JSON.parse(JSON.stringify(data));
  2937. } catch (e) {}
  2938. }
  2939. if (!isPlainObject(data)) {
  2940. data = {};
  2941. }
  2942. Object.keys(methods).forEach(function (methodName) {
  2943. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  2944. data[methodName] = methods[methodName];
  2945. }
  2946. });
  2947. return data;
  2948. }
  2949. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  2950. function createObserver(name) {
  2951. return function observer(newVal, oldVal) {
  2952. if (this.$vm) {
  2953. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  2954. }
  2955. };
  2956. }
  2957. function initBehaviors(vueOptions, initBehavior) {
  2958. var vueBehaviors = vueOptions.behaviors;
  2959. var vueExtends = vueOptions.extends;
  2960. var vueMixins = vueOptions.mixins;
  2961. var vueProps = vueOptions.props;
  2962. if (!vueProps) {
  2963. vueOptions.props = vueProps = [];
  2964. }
  2965. var behaviors = [];
  2966. if (Array.isArray(vueBehaviors)) {
  2967. vueBehaviors.forEach(function (behavior) {
  2968. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  2969. if (behavior === 'uni://form-field') {
  2970. if (Array.isArray(vueProps)) {
  2971. vueProps.push('name');
  2972. vueProps.push('value');
  2973. } else {
  2974. vueProps.name = {
  2975. type: String,
  2976. default: ''
  2977. };
  2978. vueProps.value = {
  2979. type: [String, Number, Boolean, Array, Object, Date],
  2980. default: ''
  2981. };
  2982. }
  2983. }
  2984. });
  2985. }
  2986. if (isPlainObject(vueExtends) && vueExtends.props) {
  2987. behaviors.push(initBehavior({
  2988. properties: initProperties(vueExtends.props, true)
  2989. }));
  2990. }
  2991. if (Array.isArray(vueMixins)) {
  2992. vueMixins.forEach(function (vueMixin) {
  2993. if (isPlainObject(vueMixin) && vueMixin.props) {
  2994. behaviors.push(initBehavior({
  2995. properties: initProperties(vueMixin.props, true)
  2996. }));
  2997. }
  2998. });
  2999. }
  3000. return behaviors;
  3001. }
  3002. function parsePropType(key, type, defaultValue, file) {
  3003. // [String]=>String
  3004. if (Array.isArray(type) && type.length === 1) {
  3005. return type[0];
  3006. }
  3007. return type;
  3008. }
  3009. function initProperties(props) {
  3010. var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  3011. var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  3012. var options = arguments.length > 3 ? arguments[3] : undefined;
  3013. var properties = {};
  3014. if (!isBehavior) {
  3015. properties.vueId = {
  3016. type: String,
  3017. value: ''
  3018. };
  3019. {
  3020. if (options.virtualHost) {
  3021. properties.virtualHostStyle = {
  3022. type: null,
  3023. value: ''
  3024. };
  3025. properties.virtualHostClass = {
  3026. type: null,
  3027. value: ''
  3028. };
  3029. }
  3030. }
  3031. // scopedSlotsCompiler auto
  3032. properties.scopedSlotsCompiler = {
  3033. type: String,
  3034. value: ''
  3035. };
  3036. properties.vueSlots = {
  3037. // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  3038. type: null,
  3039. value: [],
  3040. observer: function observer(newVal, oldVal) {
  3041. var $slots = Object.create(null);
  3042. newVal.forEach(function (slotName) {
  3043. $slots[slotName] = true;
  3044. });
  3045. this.setData({
  3046. $slots: $slots
  3047. });
  3048. }
  3049. };
  3050. }
  3051. if (Array.isArray(props)) {
  3052. // ['title']
  3053. props.forEach(function (key) {
  3054. properties[key] = {
  3055. type: null,
  3056. observer: createObserver(key)
  3057. };
  3058. });
  3059. } else if (isPlainObject(props)) {
  3060. // {title:{type:String,default:''},content:String}
  3061. Object.keys(props).forEach(function (key) {
  3062. var opts = props[key];
  3063. if (isPlainObject(opts)) {
  3064. // title:{type:String,default:''}
  3065. var value = opts.default;
  3066. if (isFn(value)) {
  3067. value = value();
  3068. }
  3069. opts.type = parsePropType(key, opts.type);
  3070. properties[key] = {
  3071. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  3072. value: value,
  3073. observer: createObserver(key)
  3074. };
  3075. } else {
  3076. // content:String
  3077. var type = parsePropType(key, opts);
  3078. properties[key] = {
  3079. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  3080. observer: createObserver(key)
  3081. };
  3082. }
  3083. });
  3084. }
  3085. return properties;
  3086. }
  3087. function wrapper$1(event) {
  3088. // TODO 又得兼容 mpvue 的 mp 对象
  3089. try {
  3090. event.mp = JSON.parse(JSON.stringify(event));
  3091. } catch (e) {}
  3092. event.stopPropagation = noop;
  3093. event.preventDefault = noop;
  3094. event.target = event.target || {};
  3095. if (!hasOwn(event, 'detail')) {
  3096. event.detail = {};
  3097. }
  3098. if (hasOwn(event, 'markerId')) {
  3099. event.detail = (0, _typeof2.default)(event.detail) === 'object' ? event.detail : {};
  3100. event.detail.markerId = event.markerId;
  3101. }
  3102. if (isPlainObject(event.detail)) {
  3103. event.target = Object.assign({}, event.target, event.detail);
  3104. }
  3105. return event;
  3106. }
  3107. function getExtraValue(vm, dataPathsArray) {
  3108. var context = vm;
  3109. dataPathsArray.forEach(function (dataPathArray) {
  3110. var dataPath = dataPathArray[0];
  3111. var value = dataPathArray[2];
  3112. if (dataPath || typeof value !== 'undefined') {
  3113. // ['','',index,'disable']
  3114. var propPath = dataPathArray[1];
  3115. var valuePath = dataPathArray[3];
  3116. var vFor;
  3117. if (Number.isInteger(dataPath)) {
  3118. vFor = dataPath;
  3119. } else if (!dataPath) {
  3120. vFor = context;
  3121. } else if (typeof dataPath === 'string' && dataPath) {
  3122. if (dataPath.indexOf('#s#') === 0) {
  3123. vFor = dataPath.substr(3);
  3124. } else {
  3125. vFor = vm.__get_value(dataPath, context);
  3126. }
  3127. }
  3128. if (Number.isInteger(vFor)) {
  3129. context = value;
  3130. } else if (!propPath) {
  3131. context = vFor[value];
  3132. } else {
  3133. if (Array.isArray(vFor)) {
  3134. context = vFor.find(function (vForItem) {
  3135. return vm.__get_value(propPath, vForItem) === value;
  3136. });
  3137. } else if (isPlainObject(vFor)) {
  3138. context = Object.keys(vFor).find(function (vForKey) {
  3139. return vm.__get_value(propPath, vFor[vForKey]) === value;
  3140. });
  3141. } else {
  3142. console.error('v-for 暂不支持循环数据:', vFor);
  3143. }
  3144. }
  3145. if (valuePath) {
  3146. context = vm.__get_value(valuePath, context);
  3147. }
  3148. }
  3149. });
  3150. return context;
  3151. }
  3152. function processEventExtra(vm, extra, event, __args__) {
  3153. var extraObj = {};
  3154. if (Array.isArray(extra) && extra.length) {
  3155. /**
  3156. *[
  3157. * ['data.items', 'data.id', item.data.id],
  3158. * ['metas', 'id', meta.id]
  3159. *],
  3160. *[
  3161. * ['data.items', 'data.id', item.data.id],
  3162. * ['metas', 'id', meta.id]
  3163. *],
  3164. *'test'
  3165. */
  3166. extra.forEach(function (dataPath, index) {
  3167. if (typeof dataPath === 'string') {
  3168. if (!dataPath) {
  3169. // model,prop.sync
  3170. extraObj['$' + index] = vm;
  3171. } else {
  3172. if (dataPath === '$event') {
  3173. // $event
  3174. extraObj['$' + index] = event;
  3175. } else if (dataPath === 'arguments') {
  3176. extraObj['$' + index] = event.detail ? event.detail.__args__ || __args__ : __args__;
  3177. } else if (dataPath.indexOf('$event.') === 0) {
  3178. // $event.target.value
  3179. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  3180. } else {
  3181. extraObj['$' + index] = vm.__get_value(dataPath);
  3182. }
  3183. }
  3184. } else {
  3185. extraObj['$' + index] = getExtraValue(vm, dataPath);
  3186. }
  3187. });
  3188. }
  3189. return extraObj;
  3190. }
  3191. function getObjByArray(arr) {
  3192. var obj = {};
  3193. for (var i = 1; i < arr.length; i++) {
  3194. var element = arr[i];
  3195. obj[element[0]] = element[1];
  3196. }
  3197. return obj;
  3198. }
  3199. function processEventArgs(vm, event) {
  3200. var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  3201. var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
  3202. var isCustom = arguments.length > 4 ? arguments[4] : undefined;
  3203. var methodName = arguments.length > 5 ? arguments[5] : undefined;
  3204. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  3205. // fixed 用户直接触发 mpInstance.triggerEvent
  3206. var __args__ = isPlainObject(event.detail) ? event.detail.__args__ || [event.detail] : [event.detail];
  3207. if (isCustom) {
  3208. // 自定义事件
  3209. isCustomMPEvent = event.currentTarget && event.currentTarget.dataset && event.currentTarget.dataset.comType === 'wx';
  3210. if (!args.length) {
  3211. // 无参数,直接传入 event 或 detail 数组
  3212. if (isCustomMPEvent) {
  3213. return [event];
  3214. }
  3215. return __args__;
  3216. }
  3217. }
  3218. var extraObj = processEventExtra(vm, extra, event, __args__);
  3219. var ret = [];
  3220. args.forEach(function (arg) {
  3221. if (arg === '$event') {
  3222. if (methodName === '__set_model' && !isCustom) {
  3223. // input v-model value
  3224. ret.push(event.target.value);
  3225. } else {
  3226. if (isCustom && !isCustomMPEvent) {
  3227. ret.push(__args__[0]);
  3228. } else {
  3229. // wxcomponent 组件或内置组件
  3230. ret.push(event);
  3231. }
  3232. }
  3233. } else {
  3234. if (Array.isArray(arg) && arg[0] === 'o') {
  3235. ret.push(getObjByArray(arg));
  3236. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  3237. ret.push(extraObj[arg]);
  3238. } else {
  3239. ret.push(arg);
  3240. }
  3241. }
  3242. });
  3243. return ret;
  3244. }
  3245. var ONCE = '~';
  3246. var CUSTOM = '^';
  3247. function isMatchEventType(eventType, optType) {
  3248. return eventType === optType || optType === 'regionchange' && (eventType === 'begin' || eventType === 'end');
  3249. }
  3250. function getContextVm(vm) {
  3251. var $parent = vm.$parent;
  3252. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  3253. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  3254. $parent = $parent.$parent;
  3255. }
  3256. return $parent && $parent.$parent;
  3257. }
  3258. function handleEvent(event) {
  3259. var _this2 = this;
  3260. event = wrapper$1(event);
  3261. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  3262. var dataset = (event.currentTarget || event.target).dataset;
  3263. if (!dataset) {
  3264. return console.warn('事件信息不存在');
  3265. }
  3266. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  3267. if (!eventOpts) {
  3268. return console.warn('事件信息不存在');
  3269. }
  3270. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  3271. var eventType = event.type;
  3272. var ret = [];
  3273. eventOpts.forEach(function (eventOpt) {
  3274. var type = eventOpt[0];
  3275. var eventsArray = eventOpt[1];
  3276. var isCustom = type.charAt(0) === CUSTOM;
  3277. type = isCustom ? type.slice(1) : type;
  3278. var isOnce = type.charAt(0) === ONCE;
  3279. type = isOnce ? type.slice(1) : type;
  3280. if (eventsArray && isMatchEventType(eventType, type)) {
  3281. eventsArray.forEach(function (eventArray) {
  3282. var methodName = eventArray[0];
  3283. if (methodName) {
  3284. var handlerCtx = _this2.$vm;
  3285. if (handlerCtx.$options.generic) {
  3286. // mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  3287. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  3288. }
  3289. if (methodName === '$emit') {
  3290. handlerCtx.$emit.apply(handlerCtx, processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName));
  3291. return;
  3292. }
  3293. var handler = handlerCtx[methodName];
  3294. if (!isFn(handler)) {
  3295. var _type = _this2.$vm.mpType === 'page' ? 'Page' : 'Component';
  3296. var path = _this2.route || _this2.is;
  3297. throw new Error("".concat(_type, " \"").concat(path, "\" does not have a method \"").concat(methodName, "\""));
  3298. }
  3299. if (isOnce) {
  3300. if (handler.once) {
  3301. return;
  3302. }
  3303. handler.once = true;
  3304. }
  3305. var params = processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName);
  3306. params = Array.isArray(params) ? params : [];
  3307. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  3308. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  3309. // eslint-disable-next-line no-sparse-arrays
  3310. params = params.concat([,,,,,,,,,, event]);
  3311. }
  3312. ret.push(handler.apply(handlerCtx, params));
  3313. }
  3314. });
  3315. }
  3316. });
  3317. if (eventType === 'input' && ret.length === 1 && typeof ret[0] !== 'undefined') {
  3318. return ret[0];
  3319. }
  3320. }
  3321. var eventChannels = {};
  3322. function getEventChannel(id) {
  3323. var eventChannel = eventChannels[id];
  3324. delete eventChannels[id];
  3325. return eventChannel;
  3326. }
  3327. var hooks = ['onShow', 'onHide', 'onError', 'onPageNotFound', 'onThemeChange', 'onUnhandledRejection'];
  3328. function initEventChannel() {
  3329. _vue.default.prototype.getOpenerEventChannel = function () {
  3330. // 微信小程序使用自身getOpenerEventChannel
  3331. {
  3332. return this.$scope.getOpenerEventChannel();
  3333. }
  3334. };
  3335. var callHook = _vue.default.prototype.__call_hook;
  3336. _vue.default.prototype.__call_hook = function (hook, args) {
  3337. if (hook === 'onLoad' && args && args.__id__) {
  3338. this.__eventChannel__ = getEventChannel(args.__id__);
  3339. delete args.__id__;
  3340. }
  3341. return callHook.call(this, hook, args);
  3342. };
  3343. }
  3344. function initScopedSlotsParams() {
  3345. var center = {};
  3346. var parents = {};
  3347. function currentId(fn) {
  3348. var vueIds = this.$options.propsData.vueId;
  3349. if (vueIds) {
  3350. var vueId = vueIds.split(',')[0];
  3351. fn(vueId);
  3352. }
  3353. }
  3354. _vue.default.prototype.$hasSSP = function (vueId) {
  3355. var slot = center[vueId];
  3356. if (!slot) {
  3357. parents[vueId] = this;
  3358. this.$on('hook:destroyed', function () {
  3359. delete parents[vueId];
  3360. });
  3361. }
  3362. return slot;
  3363. };
  3364. _vue.default.prototype.$getSSP = function (vueId, name, needAll) {
  3365. var slot = center[vueId];
  3366. if (slot) {
  3367. var params = slot[name] || [];
  3368. if (needAll) {
  3369. return params;
  3370. }
  3371. return params[0];
  3372. }
  3373. };
  3374. _vue.default.prototype.$setSSP = function (name, value) {
  3375. var index = 0;
  3376. currentId.call(this, function (vueId) {
  3377. var slot = center[vueId];
  3378. var params = slot[name] = slot[name] || [];
  3379. params.push(value);
  3380. index = params.length - 1;
  3381. });
  3382. return index;
  3383. };
  3384. _vue.default.prototype.$initSSP = function () {
  3385. currentId.call(this, function (vueId) {
  3386. center[vueId] = {};
  3387. });
  3388. };
  3389. _vue.default.prototype.$callSSP = function () {
  3390. currentId.call(this, function (vueId) {
  3391. if (parents[vueId]) {
  3392. parents[vueId].$forceUpdate();
  3393. }
  3394. });
  3395. };
  3396. _vue.default.mixin({
  3397. destroyed: function destroyed() {
  3398. var propsData = this.$options.propsData;
  3399. var vueId = propsData && propsData.vueId;
  3400. if (vueId) {
  3401. delete center[vueId];
  3402. delete parents[vueId];
  3403. }
  3404. }
  3405. });
  3406. }
  3407. function parseBaseApp(vm, _ref4) {
  3408. var mocks = _ref4.mocks,
  3409. initRefs = _ref4.initRefs;
  3410. initEventChannel();
  3411. {
  3412. initScopedSlotsParams();
  3413. }
  3414. if (vm.$options.store) {
  3415. _vue.default.prototype.$store = vm.$options.store;
  3416. }
  3417. uniIdMixin(_vue.default);
  3418. _vue.default.prototype.mpHost = "mp-weixin";
  3419. _vue.default.mixin({
  3420. beforeCreate: function beforeCreate() {
  3421. if (!this.$options.mpType) {
  3422. return;
  3423. }
  3424. this.mpType = this.$options.mpType;
  3425. this.$mp = (0, _defineProperty2.default)({
  3426. data: {}
  3427. }, this.mpType, this.$options.mpInstance);
  3428. this.$scope = this.$options.mpInstance;
  3429. delete this.$options.mpType;
  3430. delete this.$options.mpInstance;
  3431. if (this.mpType === 'page' && typeof getApp === 'function') {
  3432. // hack vue-i18n
  3433. var app = getApp();
  3434. if (app.$vm && app.$vm.$i18n) {
  3435. this._i18n = app.$vm.$i18n;
  3436. }
  3437. }
  3438. if (this.mpType !== 'app') {
  3439. initRefs(this);
  3440. initMocks(this, mocks);
  3441. }
  3442. }
  3443. });
  3444. var appOptions = {
  3445. onLaunch: function onLaunch(args) {
  3446. if (this.$vm) {
  3447. // 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  3448. return;
  3449. }
  3450. {
  3451. if (wx.canIUse && !wx.canIUse('nextTick')) {
  3452. // 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  3453. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  3454. }
  3455. }
  3456. this.$vm = vm;
  3457. this.$vm.$mp = {
  3458. app: this
  3459. };
  3460. this.$vm.$scope = this;
  3461. // vm 上也挂载 globalData
  3462. this.$vm.globalData = this.globalData;
  3463. this.$vm._isMounted = true;
  3464. this.$vm.__call_hook('mounted', args);
  3465. this.$vm.__call_hook('onLaunch', args);
  3466. }
  3467. };
  3468. // 兼容旧版本 globalData
  3469. appOptions.globalData = vm.$options.globalData || {};
  3470. // 将 methods 中的方法挂在 getApp() 中
  3471. var methods = vm.$options.methods;
  3472. if (methods) {
  3473. Object.keys(methods).forEach(function (name) {
  3474. appOptions[name] = methods[name];
  3475. });
  3476. }
  3477. initAppLocale(_vue.default, vm, normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN);
  3478. initHooks(appOptions, hooks);
  3479. initUnknownHooks(appOptions, vm.$options);
  3480. return appOptions;
  3481. }
  3482. function parseApp(vm) {
  3483. return parseBaseApp(vm, {
  3484. mocks: mocks,
  3485. initRefs: initRefs
  3486. });
  3487. }
  3488. function createApp(vm) {
  3489. App(parseApp(vm));
  3490. return vm;
  3491. }
  3492. var encodeReserveRE = /[!'()*]/g;
  3493. var encodeReserveReplacer = function encodeReserveReplacer(c) {
  3494. return '%' + c.charCodeAt(0).toString(16);
  3495. };
  3496. var commaRE = /%2C/g;
  3497. // fixed encodeURIComponent which is more conformant to RFC3986:
  3498. // - escapes [!'()*]
  3499. // - preserve commas
  3500. var encode = function encode(str) {
  3501. return encodeURIComponent(str).replace(encodeReserveRE, encodeReserveReplacer).replace(commaRE, ',');
  3502. };
  3503. function stringifyQuery(obj) {
  3504. var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  3505. var res = obj ? Object.keys(obj).map(function (key) {
  3506. var val = obj[key];
  3507. if (val === undefined) {
  3508. return '';
  3509. }
  3510. if (val === null) {
  3511. return encodeStr(key);
  3512. }
  3513. if (Array.isArray(val)) {
  3514. var result = [];
  3515. val.forEach(function (val2) {
  3516. if (val2 === undefined) {
  3517. return;
  3518. }
  3519. if (val2 === null) {
  3520. result.push(encodeStr(key));
  3521. } else {
  3522. result.push(encodeStr(key) + '=' + encodeStr(val2));
  3523. }
  3524. });
  3525. return result.join('&');
  3526. }
  3527. return encodeStr(key) + '=' + encodeStr(val);
  3528. }).filter(function (x) {
  3529. return x.length > 0;
  3530. }).join('&') : null;
  3531. return res ? "?".concat(res) : '';
  3532. }
  3533. function parseBaseComponent(vueComponentOptions) {
  3534. var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  3535. isPage = _ref5.isPage,
  3536. initRelation = _ref5.initRelation;
  3537. var needVueOptions = arguments.length > 2 ? arguments[2] : undefined;
  3538. var _initVueComponent = initVueComponent(_vue.default, vueComponentOptions),
  3539. _initVueComponent2 = (0, _slicedToArray2.default)(_initVueComponent, 2),
  3540. VueComponent = _initVueComponent2[0],
  3541. vueOptions = _initVueComponent2[1];
  3542. var options = _objectSpread({
  3543. multipleSlots: true,
  3544. // styleIsolation: 'apply-shared',
  3545. addGlobalClass: true
  3546. }, vueOptions.options || {});
  3547. {
  3548. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  3549. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  3550. Object.assign(options, vueOptions['mp-weixin'].options);
  3551. }
  3552. }
  3553. var componentOptions = {
  3554. options: options,
  3555. data: initData(vueOptions, _vue.default.prototype),
  3556. behaviors: initBehaviors(vueOptions, initBehavior),
  3557. properties: initProperties(vueOptions.props, false, vueOptions.__file, options),
  3558. lifetimes: {
  3559. attached: function attached() {
  3560. var properties = this.properties;
  3561. var options = {
  3562. mpType: isPage.call(this) ? 'page' : 'component',
  3563. mpInstance: this,
  3564. propsData: properties
  3565. };
  3566. initVueIds(properties.vueId, this);
  3567. // 处理父子关系
  3568. initRelation.call(this, {
  3569. vuePid: this._$vuePid,
  3570. vueOptions: options
  3571. });
  3572. // 初始化 vue 实例
  3573. this.$vm = new VueComponent(options);
  3574. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  3575. initSlots(this.$vm, properties.vueSlots);
  3576. // 触发首次 setData
  3577. this.$vm.$mount();
  3578. },
  3579. ready: function ready() {
  3580. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  3581. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  3582. if (this.$vm) {
  3583. this.$vm._isMounted = true;
  3584. this.$vm.__call_hook('mounted');
  3585. this.$vm.__call_hook('onReady');
  3586. }
  3587. },
  3588. detached: function detached() {
  3589. this.$vm && this.$vm.$destroy();
  3590. }
  3591. },
  3592. pageLifetimes: {
  3593. show: function show(args) {
  3594. this.$vm && this.$vm.__call_hook('onPageShow', args);
  3595. },
  3596. hide: function hide() {
  3597. this.$vm && this.$vm.__call_hook('onPageHide');
  3598. },
  3599. resize: function resize(size) {
  3600. this.$vm && this.$vm.__call_hook('onPageResize', size);
  3601. }
  3602. },
  3603. methods: {
  3604. __l: handleLink,
  3605. __e: handleEvent
  3606. }
  3607. };
  3608. // externalClasses
  3609. if (vueOptions.externalClasses) {
  3610. componentOptions.externalClasses = vueOptions.externalClasses;
  3611. }
  3612. if (Array.isArray(vueOptions.wxsCallMethods)) {
  3613. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  3614. componentOptions.methods[callMethod] = function (args) {
  3615. return this.$vm[callMethod](args);
  3616. };
  3617. });
  3618. }
  3619. if (needVueOptions) {
  3620. return [componentOptions, vueOptions, VueComponent];
  3621. }
  3622. if (isPage) {
  3623. return componentOptions;
  3624. }
  3625. return [componentOptions, VueComponent];
  3626. }
  3627. function parseComponent(vueComponentOptions, needVueOptions) {
  3628. return parseBaseComponent(vueComponentOptions, {
  3629. isPage: isPage,
  3630. initRelation: initRelation
  3631. }, needVueOptions);
  3632. }
  3633. var hooks$1 = ['onShow', 'onHide', 'onUnload'];
  3634. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  3635. function parseBasePage(vuePageOptions) {
  3636. var _parseComponent = parseComponent(vuePageOptions, true),
  3637. _parseComponent2 = (0, _slicedToArray2.default)(_parseComponent, 2),
  3638. pageOptions = _parseComponent2[0],
  3639. vueOptions = _parseComponent2[1];
  3640. initHooks(pageOptions.methods, hooks$1, vueOptions);
  3641. pageOptions.methods.onLoad = function (query) {
  3642. this.options = query;
  3643. var copyQuery = Object.assign({}, query);
  3644. delete copyQuery.__id__;
  3645. this.$page = {
  3646. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery)
  3647. };
  3648. this.$vm.$mp.query = query; // 兼容 mpvue
  3649. this.$vm.__call_hook('onLoad', query);
  3650. };
  3651. {
  3652. initUnknownHooks(pageOptions.methods, vuePageOptions, ['onReady']);
  3653. }
  3654. {
  3655. initWorkletMethods(pageOptions.methods, vueOptions.methods);
  3656. }
  3657. return pageOptions;
  3658. }
  3659. function parsePage(vuePageOptions) {
  3660. return parseBasePage(vuePageOptions);
  3661. }
  3662. function createPage(vuePageOptions) {
  3663. {
  3664. return Component(parsePage(vuePageOptions));
  3665. }
  3666. }
  3667. function createComponent(vueOptions) {
  3668. {
  3669. return Component(parseComponent(vueOptions));
  3670. }
  3671. }
  3672. function createSubpackageApp(vm) {
  3673. var appOptions = parseApp(vm);
  3674. var app = getApp({
  3675. allowDefault: true
  3676. });
  3677. vm.$scope = app;
  3678. var globalData = app.globalData;
  3679. if (globalData) {
  3680. Object.keys(appOptions.globalData).forEach(function (name) {
  3681. if (!hasOwn(globalData, name)) {
  3682. globalData[name] = appOptions.globalData[name];
  3683. }
  3684. });
  3685. }
  3686. Object.keys(appOptions).forEach(function (name) {
  3687. if (!hasOwn(app, name)) {
  3688. app[name] = appOptions[name];
  3689. }
  3690. });
  3691. if (isFn(appOptions.onShow) && wx.onAppShow) {
  3692. wx.onAppShow(function () {
  3693. for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  3694. args[_key5] = arguments[_key5];
  3695. }
  3696. vm.__call_hook('onShow', args);
  3697. });
  3698. }
  3699. if (isFn(appOptions.onHide) && wx.onAppHide) {
  3700. wx.onAppHide(function () {
  3701. for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
  3702. args[_key6] = arguments[_key6];
  3703. }
  3704. vm.__call_hook('onHide', args);
  3705. });
  3706. }
  3707. if (isFn(appOptions.onLaunch)) {
  3708. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  3709. vm.__call_hook('onLaunch', args);
  3710. }
  3711. return vm;
  3712. }
  3713. function createPlugin(vm) {
  3714. var appOptions = parseApp(vm);
  3715. if (isFn(appOptions.onShow) && wx.onAppShow) {
  3716. wx.onAppShow(function () {
  3717. for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  3718. args[_key7] = arguments[_key7];
  3719. }
  3720. vm.__call_hook('onShow', args);
  3721. });
  3722. }
  3723. if (isFn(appOptions.onHide) && wx.onAppHide) {
  3724. wx.onAppHide(function () {
  3725. for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
  3726. args[_key8] = arguments[_key8];
  3727. }
  3728. vm.__call_hook('onHide', args);
  3729. });
  3730. }
  3731. if (isFn(appOptions.onLaunch)) {
  3732. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  3733. vm.__call_hook('onLaunch', args);
  3734. }
  3735. return vm;
  3736. }
  3737. todos.forEach(function (todoApi) {
  3738. protocols[todoApi] = false;
  3739. });
  3740. canIUses.forEach(function (canIUseApi) {
  3741. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name : canIUseApi;
  3742. if (!wx.canIUse(apiName)) {
  3743. protocols[canIUseApi] = false;
  3744. }
  3745. });
  3746. var uni = {};
  3747. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  3748. uni = new Proxy({}, {
  3749. get: function get(target, name) {
  3750. if (hasOwn(target, name)) {
  3751. return target[name];
  3752. }
  3753. if (baseApi[name]) {
  3754. return baseApi[name];
  3755. }
  3756. if (api[name]) {
  3757. return promisify(name, api[name]);
  3758. }
  3759. {
  3760. if (extraApi[name]) {
  3761. return promisify(name, extraApi[name]);
  3762. }
  3763. if (todoApis[name]) {
  3764. return promisify(name, todoApis[name]);
  3765. }
  3766. }
  3767. if (eventApi[name]) {
  3768. return eventApi[name];
  3769. }
  3770. return promisify(name, wrapper(name, wx[name]));
  3771. },
  3772. set: function set(target, name, value) {
  3773. target[name] = value;
  3774. return true;
  3775. }
  3776. });
  3777. } else {
  3778. Object.keys(baseApi).forEach(function (name) {
  3779. uni[name] = baseApi[name];
  3780. });
  3781. {
  3782. Object.keys(todoApis).forEach(function (name) {
  3783. uni[name] = promisify(name, todoApis[name]);
  3784. });
  3785. Object.keys(extraApi).forEach(function (name) {
  3786. uni[name] = promisify(name, extraApi[name]);
  3787. });
  3788. }
  3789. Object.keys(eventApi).forEach(function (name) {
  3790. uni[name] = eventApi[name];
  3791. });
  3792. Object.keys(api).forEach(function (name) {
  3793. uni[name] = promisify(name, api[name]);
  3794. });
  3795. Object.keys(wx).forEach(function (name) {
  3796. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  3797. uni[name] = promisify(name, wrapper(name, wx[name]));
  3798. }
  3799. });
  3800. }
  3801. wx.createApp = createApp;
  3802. wx.createPage = createPage;
  3803. wx.createComponent = createComponent;
  3804. wx.createSubpackageApp = createSubpackageApp;
  3805. wx.createPlugin = createPlugin;
  3806. var uni$1 = uni;
  3807. var _default = uni$1;
  3808. exports.default = _default;
  3809. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 3)))
  3810. /***/ }),
  3811. /***/ 20:
  3812. /*!****************************************************************!*\
  3813. !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
  3814. \****************************************************************/
  3815. /*! no static exports found */
  3816. /***/ (function(module, exports) {
  3817. function _iterableToArray(iter) {
  3818. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  3819. }
  3820. module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3821. /***/ }),
  3822. /***/ 21:
  3823. /*!******************************************************************!*\
  3824. !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
  3825. \******************************************************************/
  3826. /*! no static exports found */
  3827. /***/ (function(module, exports) {
  3828. function _nonIterableSpread() {
  3829. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  3830. }
  3831. module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3832. /***/ }),
  3833. /***/ 210:
  3834. /*!******************************************************************************************************************!*\
  3835. !*** E:/work/Project_newGit/UniappShell/uni_modules/uni-transition/components/uni-transition/createAnimation.js ***!
  3836. \******************************************************************************************************************/
  3837. /*! no static exports found */
  3838. /***/ (function(module, exports, __webpack_require__) {
  3839. "use strict";
  3840. /* WEBPACK VAR INJECTION */(function(uni) {
  3841. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  3842. Object.defineProperty(exports, "__esModule", {
  3843. value: true
  3844. });
  3845. exports.createAnimation = createAnimation;
  3846. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  3847. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  3848. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  3849. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  3850. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  3851. // const defaultOption = {
  3852. // duration: 300,
  3853. // timingFunction: 'linear',
  3854. // delay: 0,
  3855. // transformOrigin: '50% 50% 0'
  3856. // }
  3857. var MPAnimation = /*#__PURE__*/function () {
  3858. function MPAnimation(options, _this) {
  3859. (0, _classCallCheck2.default)(this, MPAnimation);
  3860. this.options = options;
  3861. this.animation = uni.createAnimation(options);
  3862. this.currentStepAnimates = {};
  3863. this.next = 0;
  3864. this.$ = _this;
  3865. }
  3866. (0, _createClass2.default)(MPAnimation, [{
  3867. key: "_nvuePushAnimates",
  3868. value: function _nvuePushAnimates(type, args) {
  3869. var aniObj = this.currentStepAnimates[this.next];
  3870. var styles = {};
  3871. if (!aniObj) {
  3872. styles = {
  3873. styles: {},
  3874. config: {}
  3875. };
  3876. } else {
  3877. styles = aniObj;
  3878. }
  3879. if (animateTypes1.includes(type)) {
  3880. if (!styles.styles.transform) {
  3881. styles.styles.transform = '';
  3882. }
  3883. var unit = '';
  3884. if (type === 'rotate') {
  3885. unit = 'deg';
  3886. }
  3887. styles.styles.transform += "".concat(type, "(").concat(args + unit, ") ");
  3888. } else {
  3889. styles.styles[type] = "".concat(args);
  3890. }
  3891. this.currentStepAnimates[this.next] = styles;
  3892. }
  3893. }, {
  3894. key: "_animateRun",
  3895. value: function _animateRun() {
  3896. var styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  3897. var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  3898. var ref = this.$.$refs['ani'].ref;
  3899. if (!ref) return;
  3900. return new Promise(function (resolve, reject) {
  3901. nvueAnimation.transition(ref, _objectSpread({
  3902. styles: styles
  3903. }, config), function (res) {
  3904. resolve();
  3905. });
  3906. });
  3907. }
  3908. }, {
  3909. key: "_nvueNextAnimate",
  3910. value: function _nvueNextAnimate(animates) {
  3911. var _this2 = this;
  3912. var step = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  3913. var fn = arguments.length > 2 ? arguments[2] : undefined;
  3914. var obj = animates[step];
  3915. if (obj) {
  3916. var styles = obj.styles,
  3917. config = obj.config;
  3918. this._animateRun(styles, config).then(function () {
  3919. step += 1;
  3920. _this2._nvueNextAnimate(animates, step, fn);
  3921. });
  3922. } else {
  3923. this.currentStepAnimates = {};
  3924. typeof fn === 'function' && fn();
  3925. this.isEnd = true;
  3926. }
  3927. }
  3928. }, {
  3929. key: "step",
  3930. value: function step() {
  3931. var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  3932. this.animation.step(config);
  3933. return this;
  3934. }
  3935. }, {
  3936. key: "run",
  3937. value: function run(fn) {
  3938. this.$.animationData = this.animation.export();
  3939. this.$.timer = setTimeout(function () {
  3940. typeof fn === 'function' && fn();
  3941. }, this.$.durationTime);
  3942. }
  3943. }]);
  3944. return MPAnimation;
  3945. }();
  3946. var animateTypes1 = ['matrix', 'matrix3d', 'rotate', 'rotate3d', 'rotateX', 'rotateY', 'rotateZ', 'scale', 'scale3d', 'scaleX', 'scaleY', 'scaleZ', 'skew', 'skewX', 'skewY', 'translate', 'translate3d', 'translateX', 'translateY', 'translateZ'];
  3947. var animateTypes2 = ['opacity', 'backgroundColor'];
  3948. var animateTypes3 = ['width', 'height', 'left', 'right', 'top', 'bottom'];
  3949. animateTypes1.concat(animateTypes2, animateTypes3).forEach(function (type) {
  3950. MPAnimation.prototype[type] = function () {
  3951. var _this$animation;
  3952. (_this$animation = this.animation)[type].apply(_this$animation, arguments);
  3953. return this;
  3954. };
  3955. });
  3956. function createAnimation(option, _this) {
  3957. if (!_this) return;
  3958. clearTimeout(_this.timer);
  3959. return new MPAnimation(option, _this);
  3960. }
  3961. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  3962. /***/ }),
  3963. /***/ 22:
  3964. /*!*************************************************************!*\
  3965. !*** ./node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js ***!
  3966. \*************************************************************/
  3967. /*! no static exports found */
  3968. /***/ (function(module, exports, __webpack_require__) {
  3969. "use strict";
  3970. /* WEBPACK VAR INJECTION */(function(uni, global) {
  3971. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  3972. Object.defineProperty(exports, "__esModule", {
  3973. value: true
  3974. });
  3975. exports.LOCALE_ZH_HANT = exports.LOCALE_ZH_HANS = exports.LOCALE_FR = exports.LOCALE_ES = exports.LOCALE_EN = exports.I18n = exports.Formatter = void 0;
  3976. exports.compileI18nJsonStr = compileI18nJsonStr;
  3977. exports.hasI18nJson = hasI18nJson;
  3978. exports.initVueI18n = initVueI18n;
  3979. exports.isI18nStr = isI18nStr;
  3980. exports.isString = void 0;
  3981. exports.normalizeLocale = normalizeLocale;
  3982. exports.parseI18nJson = parseI18nJson;
  3983. exports.resolveLocale = resolveLocale;
  3984. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  3985. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  3986. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  3987. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  3988. var isObject = function isObject(val) {
  3989. return val !== null && (0, _typeof2.default)(val) === 'object';
  3990. };
  3991. var defaultDelimiters = ['{', '}'];
  3992. var BaseFormatter = /*#__PURE__*/function () {
  3993. function BaseFormatter() {
  3994. (0, _classCallCheck2.default)(this, BaseFormatter);
  3995. this._caches = Object.create(null);
  3996. }
  3997. (0, _createClass2.default)(BaseFormatter, [{
  3998. key: "interpolate",
  3999. value: function interpolate(message, values) {
  4000. var delimiters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultDelimiters;
  4001. if (!values) {
  4002. return [message];
  4003. }
  4004. var tokens = this._caches[message];
  4005. if (!tokens) {
  4006. tokens = parse(message, delimiters);
  4007. this._caches[message] = tokens;
  4008. }
  4009. return compile(tokens, values);
  4010. }
  4011. }]);
  4012. return BaseFormatter;
  4013. }();
  4014. exports.Formatter = BaseFormatter;
  4015. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  4016. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  4017. function parse(format, _ref) {
  4018. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  4019. startDelimiter = _ref2[0],
  4020. endDelimiter = _ref2[1];
  4021. var tokens = [];
  4022. var position = 0;
  4023. var text = '';
  4024. while (position < format.length) {
  4025. var char = format[position++];
  4026. if (char === startDelimiter) {
  4027. if (text) {
  4028. tokens.push({
  4029. type: 'text',
  4030. value: text
  4031. });
  4032. }
  4033. text = '';
  4034. var sub = '';
  4035. char = format[position++];
  4036. while (char !== undefined && char !== endDelimiter) {
  4037. sub += char;
  4038. char = format[position++];
  4039. }
  4040. var isClosed = char === endDelimiter;
  4041. var type = RE_TOKEN_LIST_VALUE.test(sub) ? 'list' : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? 'named' : 'unknown';
  4042. tokens.push({
  4043. value: sub,
  4044. type: type
  4045. });
  4046. }
  4047. // else if (char === '%') {
  4048. // // when found rails i18n syntax, skip text capture
  4049. // if (format[position] !== '{') {
  4050. // text += char
  4051. // }
  4052. // }
  4053. else {
  4054. text += char;
  4055. }
  4056. }
  4057. text && tokens.push({
  4058. type: 'text',
  4059. value: text
  4060. });
  4061. return tokens;
  4062. }
  4063. function compile(tokens, values) {
  4064. var compiled = [];
  4065. var index = 0;
  4066. var mode = Array.isArray(values) ? 'list' : isObject(values) ? 'named' : 'unknown';
  4067. if (mode === 'unknown') {
  4068. return compiled;
  4069. }
  4070. while (index < tokens.length) {
  4071. var token = tokens[index];
  4072. switch (token.type) {
  4073. case 'text':
  4074. compiled.push(token.value);
  4075. break;
  4076. case 'list':
  4077. compiled.push(values[parseInt(token.value, 10)]);
  4078. break;
  4079. case 'named':
  4080. if (mode === 'named') {
  4081. compiled.push(values[token.value]);
  4082. } else {
  4083. if (true) {
  4084. console.warn("Type of token '".concat(token.type, "' and format of value '").concat(mode, "' don't match!"));
  4085. }
  4086. }
  4087. break;
  4088. case 'unknown':
  4089. if (true) {
  4090. console.warn("Detect 'unknown' type of token!");
  4091. }
  4092. break;
  4093. }
  4094. index++;
  4095. }
  4096. return compiled;
  4097. }
  4098. var LOCALE_ZH_HANS = 'zh-Hans';
  4099. exports.LOCALE_ZH_HANS = LOCALE_ZH_HANS;
  4100. var LOCALE_ZH_HANT = 'zh-Hant';
  4101. exports.LOCALE_ZH_HANT = LOCALE_ZH_HANT;
  4102. var LOCALE_EN = 'en';
  4103. exports.LOCALE_EN = LOCALE_EN;
  4104. var LOCALE_FR = 'fr';
  4105. exports.LOCALE_FR = LOCALE_FR;
  4106. var LOCALE_ES = 'es';
  4107. exports.LOCALE_ES = LOCALE_ES;
  4108. var hasOwnProperty = Object.prototype.hasOwnProperty;
  4109. var hasOwn = function hasOwn(val, key) {
  4110. return hasOwnProperty.call(val, key);
  4111. };
  4112. var defaultFormatter = new BaseFormatter();
  4113. function include(str, parts) {
  4114. return !!parts.find(function (part) {
  4115. return str.indexOf(part) !== -1;
  4116. });
  4117. }
  4118. function startsWith(str, parts) {
  4119. return parts.find(function (part) {
  4120. return str.indexOf(part) === 0;
  4121. });
  4122. }
  4123. function normalizeLocale(locale, messages) {
  4124. if (!locale) {
  4125. return;
  4126. }
  4127. locale = locale.trim().replace(/_/g, '-');
  4128. if (messages && messages[locale]) {
  4129. return locale;
  4130. }
  4131. locale = locale.toLowerCase();
  4132. if (locale === 'chinese') {
  4133. // 支付宝
  4134. return LOCALE_ZH_HANS;
  4135. }
  4136. if (locale.indexOf('zh') === 0) {
  4137. if (locale.indexOf('-hans') > -1) {
  4138. return LOCALE_ZH_HANS;
  4139. }
  4140. if (locale.indexOf('-hant') > -1) {
  4141. return LOCALE_ZH_HANT;
  4142. }
  4143. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  4144. return LOCALE_ZH_HANT;
  4145. }
  4146. return LOCALE_ZH_HANS;
  4147. }
  4148. var locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  4149. if (messages && Object.keys(messages).length > 0) {
  4150. locales = Object.keys(messages);
  4151. }
  4152. var lang = startsWith(locale, locales);
  4153. if (lang) {
  4154. return lang;
  4155. }
  4156. }
  4157. var I18n = /*#__PURE__*/function () {
  4158. function I18n(_ref3) {
  4159. var locale = _ref3.locale,
  4160. fallbackLocale = _ref3.fallbackLocale,
  4161. messages = _ref3.messages,
  4162. watcher = _ref3.watcher,
  4163. formater = _ref3.formater;
  4164. (0, _classCallCheck2.default)(this, I18n);
  4165. this.locale = LOCALE_EN;
  4166. this.fallbackLocale = LOCALE_EN;
  4167. this.message = {};
  4168. this.messages = {};
  4169. this.watchers = [];
  4170. if (fallbackLocale) {
  4171. this.fallbackLocale = fallbackLocale;
  4172. }
  4173. this.formater = formater || defaultFormatter;
  4174. this.messages = messages || {};
  4175. this.setLocale(locale || LOCALE_EN);
  4176. if (watcher) {
  4177. this.watchLocale(watcher);
  4178. }
  4179. }
  4180. (0, _createClass2.default)(I18n, [{
  4181. key: "setLocale",
  4182. value: function setLocale(locale) {
  4183. var _this = this;
  4184. var oldLocale = this.locale;
  4185. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  4186. if (!this.messages[this.locale]) {
  4187. // 可能初始化时不存在
  4188. this.messages[this.locale] = {};
  4189. }
  4190. this.message = this.messages[this.locale];
  4191. // 仅发生变化时,通知
  4192. if (oldLocale !== this.locale) {
  4193. this.watchers.forEach(function (watcher) {
  4194. watcher(_this.locale, oldLocale);
  4195. });
  4196. }
  4197. }
  4198. }, {
  4199. key: "getLocale",
  4200. value: function getLocale() {
  4201. return this.locale;
  4202. }
  4203. }, {
  4204. key: "watchLocale",
  4205. value: function watchLocale(fn) {
  4206. var _this2 = this;
  4207. var index = this.watchers.push(fn) - 1;
  4208. return function () {
  4209. _this2.watchers.splice(index, 1);
  4210. };
  4211. }
  4212. }, {
  4213. key: "add",
  4214. value: function add(locale, message) {
  4215. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  4216. var curMessages = this.messages[locale];
  4217. if (curMessages) {
  4218. if (override) {
  4219. Object.assign(curMessages, message);
  4220. } else {
  4221. Object.keys(message).forEach(function (key) {
  4222. if (!hasOwn(curMessages, key)) {
  4223. curMessages[key] = message[key];
  4224. }
  4225. });
  4226. }
  4227. } else {
  4228. this.messages[locale] = message;
  4229. }
  4230. }
  4231. }, {
  4232. key: "f",
  4233. value: function f(message, values, delimiters) {
  4234. return this.formater.interpolate(message, values, delimiters).join('');
  4235. }
  4236. }, {
  4237. key: "t",
  4238. value: function t(key, locale, values) {
  4239. var message = this.message;
  4240. if (typeof locale === 'string') {
  4241. locale = normalizeLocale(locale, this.messages);
  4242. locale && (message = this.messages[locale]);
  4243. } else {
  4244. values = locale;
  4245. }
  4246. if (!hasOwn(message, key)) {
  4247. console.warn("Cannot translate the value of keypath ".concat(key, ". Use the value of keypath as default."));
  4248. return key;
  4249. }
  4250. return this.formater.interpolate(message[key], values).join('');
  4251. }
  4252. }]);
  4253. return I18n;
  4254. }();
  4255. exports.I18n = I18n;
  4256. function watchAppLocale(appVm, i18n) {
  4257. // 需要保证 watch 的触发在组件渲染之前
  4258. if (appVm.$watchLocale) {
  4259. // vue2
  4260. appVm.$watchLocale(function (newLocale) {
  4261. i18n.setLocale(newLocale);
  4262. });
  4263. } else {
  4264. appVm.$watch(function () {
  4265. return appVm.$locale;
  4266. }, function (newLocale) {
  4267. i18n.setLocale(newLocale);
  4268. });
  4269. }
  4270. }
  4271. function getDefaultLocale() {
  4272. if (typeof uni !== 'undefined' && uni.getLocale) {
  4273. return uni.getLocale();
  4274. }
  4275. // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale
  4276. if (typeof global !== 'undefined' && global.getLocale) {
  4277. return global.getLocale();
  4278. }
  4279. return LOCALE_EN;
  4280. }
  4281. function initVueI18n(locale) {
  4282. var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  4283. var fallbackLocale = arguments.length > 2 ? arguments[2] : undefined;
  4284. var watcher = arguments.length > 3 ? arguments[3] : undefined;
  4285. // 兼容旧版本入参
  4286. if (typeof locale !== 'string') {
  4287. var _ref4 = [messages, locale];
  4288. locale = _ref4[0];
  4289. messages = _ref4[1];
  4290. }
  4291. if (typeof locale !== 'string') {
  4292. // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined
  4293. locale = getDefaultLocale();
  4294. }
  4295. if (typeof fallbackLocale !== 'string') {
  4296. fallbackLocale = typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale || LOCALE_EN;
  4297. }
  4298. var i18n = new I18n({
  4299. locale: locale,
  4300. fallbackLocale: fallbackLocale,
  4301. messages: messages,
  4302. watcher: watcher
  4303. });
  4304. var _t = function t(key, values) {
  4305. if (typeof getApp !== 'function') {
  4306. // app view
  4307. /* eslint-disable no-func-assign */
  4308. _t = function t(key, values) {
  4309. return i18n.t(key, values);
  4310. };
  4311. } else {
  4312. var isWatchedAppLocale = false;
  4313. _t = function t(key, values) {
  4314. var appVm = getApp().$vm;
  4315. // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化
  4316. // options: {
  4317. // type: Array,
  4318. // default () {
  4319. // return [{
  4320. // icon: 'shop',
  4321. // text: t("uni-goods-nav.options.shop"),
  4322. // }, {
  4323. // icon: 'cart',
  4324. // text: t("uni-goods-nav.options.cart")
  4325. // }]
  4326. // }
  4327. // },
  4328. if (appVm) {
  4329. // 触发响应式
  4330. appVm.$locale;
  4331. if (!isWatchedAppLocale) {
  4332. isWatchedAppLocale = true;
  4333. watchAppLocale(appVm, i18n);
  4334. }
  4335. }
  4336. return i18n.t(key, values);
  4337. };
  4338. }
  4339. return _t(key, values);
  4340. };
  4341. return {
  4342. i18n: i18n,
  4343. f: function f(message, values, delimiters) {
  4344. return i18n.f(message, values, delimiters);
  4345. },
  4346. t: function t(key, values) {
  4347. return _t(key, values);
  4348. },
  4349. add: function add(locale, message) {
  4350. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  4351. return i18n.add(locale, message, override);
  4352. },
  4353. watch: function watch(fn) {
  4354. return i18n.watchLocale(fn);
  4355. },
  4356. getLocale: function getLocale() {
  4357. return i18n.getLocale();
  4358. },
  4359. setLocale: function setLocale(newLocale) {
  4360. return i18n.setLocale(newLocale);
  4361. }
  4362. };
  4363. }
  4364. var isString = function isString(val) {
  4365. return typeof val === 'string';
  4366. };
  4367. exports.isString = isString;
  4368. var formater;
  4369. function hasI18nJson(jsonObj, delimiters) {
  4370. if (!formater) {
  4371. formater = new BaseFormatter();
  4372. }
  4373. return walkJsonObj(jsonObj, function (jsonObj, key) {
  4374. var value = jsonObj[key];
  4375. if (isString(value)) {
  4376. if (isI18nStr(value, delimiters)) {
  4377. return true;
  4378. }
  4379. } else {
  4380. return hasI18nJson(value, delimiters);
  4381. }
  4382. });
  4383. }
  4384. function parseI18nJson(jsonObj, values, delimiters) {
  4385. if (!formater) {
  4386. formater = new BaseFormatter();
  4387. }
  4388. walkJsonObj(jsonObj, function (jsonObj, key) {
  4389. var value = jsonObj[key];
  4390. if (isString(value)) {
  4391. if (isI18nStr(value, delimiters)) {
  4392. jsonObj[key] = compileStr(value, values, delimiters);
  4393. }
  4394. } else {
  4395. parseI18nJson(value, values, delimiters);
  4396. }
  4397. });
  4398. return jsonObj;
  4399. }
  4400. function compileI18nJsonStr(jsonStr, _ref5) {
  4401. var locale = _ref5.locale,
  4402. locales = _ref5.locales,
  4403. delimiters = _ref5.delimiters;
  4404. if (!isI18nStr(jsonStr, delimiters)) {
  4405. return jsonStr;
  4406. }
  4407. if (!formater) {
  4408. formater = new BaseFormatter();
  4409. }
  4410. var localeValues = [];
  4411. Object.keys(locales).forEach(function (name) {
  4412. if (name !== locale) {
  4413. localeValues.push({
  4414. locale: name,
  4415. values: locales[name]
  4416. });
  4417. }
  4418. });
  4419. localeValues.unshift({
  4420. locale: locale,
  4421. values: locales[locale]
  4422. });
  4423. try {
  4424. return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);
  4425. } catch (e) {}
  4426. return jsonStr;
  4427. }
  4428. function isI18nStr(value, delimiters) {
  4429. return value.indexOf(delimiters[0]) > -1;
  4430. }
  4431. function compileStr(value, values, delimiters) {
  4432. return formater.interpolate(value, values, delimiters).join('');
  4433. }
  4434. function compileValue(jsonObj, key, localeValues, delimiters) {
  4435. var value = jsonObj[key];
  4436. if (isString(value)) {
  4437. // 存在国际化
  4438. if (isI18nStr(value, delimiters)) {
  4439. jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);
  4440. if (localeValues.length > 1) {
  4441. // 格式化国际化语言
  4442. var valueLocales = jsonObj[key + 'Locales'] = {};
  4443. localeValues.forEach(function (localValue) {
  4444. valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);
  4445. });
  4446. }
  4447. }
  4448. } else {
  4449. compileJsonObj(value, localeValues, delimiters);
  4450. }
  4451. }
  4452. function compileJsonObj(jsonObj, localeValues, delimiters) {
  4453. walkJsonObj(jsonObj, function (jsonObj, key) {
  4454. compileValue(jsonObj, key, localeValues, delimiters);
  4455. });
  4456. return jsonObj;
  4457. }
  4458. function walkJsonObj(jsonObj, walk) {
  4459. if (Array.isArray(jsonObj)) {
  4460. for (var i = 0; i < jsonObj.length; i++) {
  4461. if (walk(jsonObj, i)) {
  4462. return true;
  4463. }
  4464. }
  4465. } else if (isObject(jsonObj)) {
  4466. for (var key in jsonObj) {
  4467. if (walk(jsonObj, key)) {
  4468. return true;
  4469. }
  4470. }
  4471. }
  4472. return false;
  4473. }
  4474. function resolveLocale(locales) {
  4475. return function (locale) {
  4476. if (!locale) {
  4477. return locale;
  4478. }
  4479. locale = normalizeLocale(locale) || locale;
  4480. return resolveLocaleChain(locale).find(function (locale) {
  4481. return locales.indexOf(locale) > -1;
  4482. });
  4483. };
  4484. }
  4485. function resolveLocaleChain(locale) {
  4486. var chain = [];
  4487. var tokens = locale.split('-');
  4488. while (tokens.length) {
  4489. chain.push(tokens.join('-'));
  4490. tokens.pop();
  4491. }
  4492. return chain;
  4493. }
  4494. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 3)))
  4495. /***/ }),
  4496. /***/ 23:
  4497. /*!***************************************************************!*\
  4498. !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
  4499. \***************************************************************/
  4500. /*! no static exports found */
  4501. /***/ (function(module, exports) {
  4502. function _classCallCheck(instance, Constructor) {
  4503. if (!(instance instanceof Constructor)) {
  4504. throw new TypeError("Cannot call a class as a function");
  4505. }
  4506. }
  4507. module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
  4508. /***/ }),
  4509. /***/ 24:
  4510. /*!************************************************************!*\
  4511. !*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
  4512. \************************************************************/
  4513. /*! no static exports found */
  4514. /***/ (function(module, exports, __webpack_require__) {
  4515. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  4516. function _defineProperties(target, props) {
  4517. for (var i = 0; i < props.length; i++) {
  4518. var descriptor = props[i];
  4519. descriptor.enumerable = descriptor.enumerable || false;
  4520. descriptor.configurable = true;
  4521. if ("value" in descriptor) descriptor.writable = true;
  4522. Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
  4523. }
  4524. }
  4525. function _createClass(Constructor, protoProps, staticProps) {
  4526. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  4527. if (staticProps) _defineProperties(Constructor, staticProps);
  4528. Object.defineProperty(Constructor, "prototype", {
  4529. writable: false
  4530. });
  4531. return Constructor;
  4532. }
  4533. module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
  4534. /***/ }),
  4535. /***/ 25:
  4536. /*!******************************************************************************************!*\
  4537. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  4538. \******************************************************************************************/
  4539. /*! exports provided: default */
  4540. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  4541. "use strict";
  4542. __webpack_require__.r(__webpack_exports__);
  4543. /* WEBPACK VAR INJECTION */(function(global) {/*!
  4544. * Vue.js v2.6.11
  4545. * (c) 2014-2023 Evan You
  4546. * Released under the MIT License.
  4547. */
  4548. /* */
  4549. var emptyObject = Object.freeze({});
  4550. // These helpers produce better VM code in JS engines due to their
  4551. // explicitness and function inlining.
  4552. function isUndef (v) {
  4553. return v === undefined || v === null
  4554. }
  4555. function isDef (v) {
  4556. return v !== undefined && v !== null
  4557. }
  4558. function isTrue (v) {
  4559. return v === true
  4560. }
  4561. function isFalse (v) {
  4562. return v === false
  4563. }
  4564. /**
  4565. * Check if value is primitive.
  4566. */
  4567. function isPrimitive (value) {
  4568. return (
  4569. typeof value === 'string' ||
  4570. typeof value === 'number' ||
  4571. // $flow-disable-line
  4572. typeof value === 'symbol' ||
  4573. typeof value === 'boolean'
  4574. )
  4575. }
  4576. /**
  4577. * Quick object check - this is primarily used to tell
  4578. * Objects from primitive values when we know the value
  4579. * is a JSON-compliant type.
  4580. */
  4581. function isObject (obj) {
  4582. return obj !== null && typeof obj === 'object'
  4583. }
  4584. /**
  4585. * Get the raw type string of a value, e.g., [object Object].
  4586. */
  4587. var _toString = Object.prototype.toString;
  4588. function toRawType (value) {
  4589. return _toString.call(value).slice(8, -1)
  4590. }
  4591. /**
  4592. * Strict object type check. Only returns true
  4593. * for plain JavaScript objects.
  4594. */
  4595. function isPlainObject (obj) {
  4596. return _toString.call(obj) === '[object Object]'
  4597. }
  4598. function isRegExp (v) {
  4599. return _toString.call(v) === '[object RegExp]'
  4600. }
  4601. /**
  4602. * Check if val is a valid array index.
  4603. */
  4604. function isValidArrayIndex (val) {
  4605. var n = parseFloat(String(val));
  4606. return n >= 0 && Math.floor(n) === n && isFinite(val)
  4607. }
  4608. function isPromise (val) {
  4609. return (
  4610. isDef(val) &&
  4611. typeof val.then === 'function' &&
  4612. typeof val.catch === 'function'
  4613. )
  4614. }
  4615. /**
  4616. * Convert a value to a string that is actually rendered.
  4617. */
  4618. function toString (val) {
  4619. return val == null
  4620. ? ''
  4621. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  4622. ? JSON.stringify(val, null, 2)
  4623. : String(val)
  4624. }
  4625. /**
  4626. * Convert an input value to a number for persistence.
  4627. * If the conversion fails, return original string.
  4628. */
  4629. function toNumber (val) {
  4630. var n = parseFloat(val);
  4631. return isNaN(n) ? val : n
  4632. }
  4633. /**
  4634. * Make a map and return a function for checking if a key
  4635. * is in that map.
  4636. */
  4637. function makeMap (
  4638. str,
  4639. expectsLowerCase
  4640. ) {
  4641. var map = Object.create(null);
  4642. var list = str.split(',');
  4643. for (var i = 0; i < list.length; i++) {
  4644. map[list[i]] = true;
  4645. }
  4646. return expectsLowerCase
  4647. ? function (val) { return map[val.toLowerCase()]; }
  4648. : function (val) { return map[val]; }
  4649. }
  4650. /**
  4651. * Check if a tag is a built-in tag.
  4652. */
  4653. var isBuiltInTag = makeMap('slot,component', true);
  4654. /**
  4655. * Check if an attribute is a reserved attribute.
  4656. */
  4657. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  4658. /**
  4659. * Remove an item from an array.
  4660. */
  4661. function remove (arr, item) {
  4662. if (arr.length) {
  4663. var index = arr.indexOf(item);
  4664. if (index > -1) {
  4665. return arr.splice(index, 1)
  4666. }
  4667. }
  4668. }
  4669. /**
  4670. * Check whether an object has the property.
  4671. */
  4672. var hasOwnProperty = Object.prototype.hasOwnProperty;
  4673. function hasOwn (obj, key) {
  4674. return hasOwnProperty.call(obj, key)
  4675. }
  4676. /**
  4677. * Create a cached version of a pure function.
  4678. */
  4679. function cached (fn) {
  4680. var cache = Object.create(null);
  4681. return (function cachedFn (str) {
  4682. var hit = cache[str];
  4683. return hit || (cache[str] = fn(str))
  4684. })
  4685. }
  4686. /**
  4687. * Camelize a hyphen-delimited string.
  4688. */
  4689. var camelizeRE = /-(\w)/g;
  4690. var camelize = cached(function (str) {
  4691. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  4692. });
  4693. /**
  4694. * Capitalize a string.
  4695. */
  4696. var capitalize = cached(function (str) {
  4697. return str.charAt(0).toUpperCase() + str.slice(1)
  4698. });
  4699. /**
  4700. * Hyphenate a camelCase string.
  4701. */
  4702. var hyphenateRE = /\B([A-Z])/g;
  4703. var hyphenate = cached(function (str) {
  4704. return str.replace(hyphenateRE, '-$1').toLowerCase()
  4705. });
  4706. /**
  4707. * Simple bind polyfill for environments that do not support it,
  4708. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  4709. * since native bind is now performant enough in most browsers.
  4710. * But removing it would mean breaking code that was able to run in
  4711. * PhantomJS 1.x, so this must be kept for backward compatibility.
  4712. */
  4713. /* istanbul ignore next */
  4714. function polyfillBind (fn, ctx) {
  4715. function boundFn (a) {
  4716. var l = arguments.length;
  4717. return l
  4718. ? l > 1
  4719. ? fn.apply(ctx, arguments)
  4720. : fn.call(ctx, a)
  4721. : fn.call(ctx)
  4722. }
  4723. boundFn._length = fn.length;
  4724. return boundFn
  4725. }
  4726. function nativeBind (fn, ctx) {
  4727. return fn.bind(ctx)
  4728. }
  4729. var bind = Function.prototype.bind
  4730. ? nativeBind
  4731. : polyfillBind;
  4732. /**
  4733. * Convert an Array-like object to a real Array.
  4734. */
  4735. function toArray (list, start) {
  4736. start = start || 0;
  4737. var i = list.length - start;
  4738. var ret = new Array(i);
  4739. while (i--) {
  4740. ret[i] = list[i + start];
  4741. }
  4742. return ret
  4743. }
  4744. /**
  4745. * Mix properties into target object.
  4746. */
  4747. function extend (to, _from) {
  4748. for (var key in _from) {
  4749. to[key] = _from[key];
  4750. }
  4751. return to
  4752. }
  4753. /**
  4754. * Merge an Array of Objects into a single Object.
  4755. */
  4756. function toObject (arr) {
  4757. var res = {};
  4758. for (var i = 0; i < arr.length; i++) {
  4759. if (arr[i]) {
  4760. extend(res, arr[i]);
  4761. }
  4762. }
  4763. return res
  4764. }
  4765. /* eslint-disable no-unused-vars */
  4766. /**
  4767. * Perform no operation.
  4768. * Stubbing args to make Flow happy without leaving useless transpiled code
  4769. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  4770. */
  4771. function noop (a, b, c) {}
  4772. /**
  4773. * Always return false.
  4774. */
  4775. var no = function (a, b, c) { return false; };
  4776. /* eslint-enable no-unused-vars */
  4777. /**
  4778. * Return the same value.
  4779. */
  4780. var identity = function (_) { return _; };
  4781. /**
  4782. * Check if two values are loosely equal - that is,
  4783. * if they are plain objects, do they have the same shape?
  4784. */
  4785. function looseEqual (a, b) {
  4786. if (a === b) { return true }
  4787. var isObjectA = isObject(a);
  4788. var isObjectB = isObject(b);
  4789. if (isObjectA && isObjectB) {
  4790. try {
  4791. var isArrayA = Array.isArray(a);
  4792. var isArrayB = Array.isArray(b);
  4793. if (isArrayA && isArrayB) {
  4794. return a.length === b.length && a.every(function (e, i) {
  4795. return looseEqual(e, b[i])
  4796. })
  4797. } else if (a instanceof Date && b instanceof Date) {
  4798. return a.getTime() === b.getTime()
  4799. } else if (!isArrayA && !isArrayB) {
  4800. var keysA = Object.keys(a);
  4801. var keysB = Object.keys(b);
  4802. return keysA.length === keysB.length && keysA.every(function (key) {
  4803. return looseEqual(a[key], b[key])
  4804. })
  4805. } else {
  4806. /* istanbul ignore next */
  4807. return false
  4808. }
  4809. } catch (e) {
  4810. /* istanbul ignore next */
  4811. return false
  4812. }
  4813. } else if (!isObjectA && !isObjectB) {
  4814. return String(a) === String(b)
  4815. } else {
  4816. return false
  4817. }
  4818. }
  4819. /**
  4820. * Return the first index at which a loosely equal value can be
  4821. * found in the array (if value is a plain object, the array must
  4822. * contain an object of the same shape), or -1 if it is not present.
  4823. */
  4824. function looseIndexOf (arr, val) {
  4825. for (var i = 0; i < arr.length; i++) {
  4826. if (looseEqual(arr[i], val)) { return i }
  4827. }
  4828. return -1
  4829. }
  4830. /**
  4831. * Ensure a function is called only once.
  4832. */
  4833. function once (fn) {
  4834. var called = false;
  4835. return function () {
  4836. if (!called) {
  4837. called = true;
  4838. fn.apply(this, arguments);
  4839. }
  4840. }
  4841. }
  4842. var ASSET_TYPES = [
  4843. 'component',
  4844. 'directive',
  4845. 'filter'
  4846. ];
  4847. var LIFECYCLE_HOOKS = [
  4848. 'beforeCreate',
  4849. 'created',
  4850. 'beforeMount',
  4851. 'mounted',
  4852. 'beforeUpdate',
  4853. 'updated',
  4854. 'beforeDestroy',
  4855. 'destroyed',
  4856. 'activated',
  4857. 'deactivated',
  4858. 'errorCaptured',
  4859. 'serverPrefetch'
  4860. ];
  4861. /* */
  4862. var config = ({
  4863. /**
  4864. * Option merge strategies (used in core/util/options)
  4865. */
  4866. // $flow-disable-line
  4867. optionMergeStrategies: Object.create(null),
  4868. /**
  4869. * Whether to suppress warnings.
  4870. */
  4871. silent: false,
  4872. /**
  4873. * Show production mode tip message on boot?
  4874. */
  4875. productionTip: "development" !== 'production',
  4876. /**
  4877. * Whether to enable devtools
  4878. */
  4879. devtools: "development" !== 'production',
  4880. /**
  4881. * Whether to record perf
  4882. */
  4883. performance: false,
  4884. /**
  4885. * Error handler for watcher errors
  4886. */
  4887. errorHandler: null,
  4888. /**
  4889. * Warn handler for watcher warns
  4890. */
  4891. warnHandler: null,
  4892. /**
  4893. * Ignore certain custom elements
  4894. */
  4895. ignoredElements: [],
  4896. /**
  4897. * Custom user key aliases for v-on
  4898. */
  4899. // $flow-disable-line
  4900. keyCodes: Object.create(null),
  4901. /**
  4902. * Check if a tag is reserved so that it cannot be registered as a
  4903. * component. This is platform-dependent and may be overwritten.
  4904. */
  4905. isReservedTag: no,
  4906. /**
  4907. * Check if an attribute is reserved so that it cannot be used as a component
  4908. * prop. This is platform-dependent and may be overwritten.
  4909. */
  4910. isReservedAttr: no,
  4911. /**
  4912. * Check if a tag is an unknown element.
  4913. * Platform-dependent.
  4914. */
  4915. isUnknownElement: no,
  4916. /**
  4917. * Get the namespace of an element
  4918. */
  4919. getTagNamespace: noop,
  4920. /**
  4921. * Parse the real tag name for the specific platform.
  4922. */
  4923. parsePlatformTagName: identity,
  4924. /**
  4925. * Check if an attribute must be bound using property, e.g. value
  4926. * Platform-dependent.
  4927. */
  4928. mustUseProp: no,
  4929. /**
  4930. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  4931. * This will significantly reduce performance if set to false.
  4932. */
  4933. async: true,
  4934. /**
  4935. * Exposed for legacy reasons
  4936. */
  4937. _lifecycleHooks: LIFECYCLE_HOOKS
  4938. });
  4939. /* */
  4940. /**
  4941. * unicode letters used for parsing html tags, component names and property paths.
  4942. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  4943. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  4944. */
  4945. 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/;
  4946. /**
  4947. * Check if a string starts with $ or _
  4948. */
  4949. function isReserved (str) {
  4950. var c = (str + '').charCodeAt(0);
  4951. return c === 0x24 || c === 0x5F
  4952. }
  4953. /**
  4954. * Define a property.
  4955. */
  4956. function def (obj, key, val, enumerable) {
  4957. Object.defineProperty(obj, key, {
  4958. value: val,
  4959. enumerable: !!enumerable,
  4960. writable: true,
  4961. configurable: true
  4962. });
  4963. }
  4964. /**
  4965. * Parse simple path.
  4966. */
  4967. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  4968. function parsePath (path) {
  4969. if (bailRE.test(path)) {
  4970. return
  4971. }
  4972. var segments = path.split('.');
  4973. return function (obj) {
  4974. for (var i = 0; i < segments.length; i++) {
  4975. if (!obj) { return }
  4976. obj = obj[segments[i]];
  4977. }
  4978. return obj
  4979. }
  4980. }
  4981. /* */
  4982. // can we use __proto__?
  4983. var hasProto = '__proto__' in {};
  4984. // Browser environment sniffing
  4985. var inBrowser = typeof window !== 'undefined';
  4986. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  4987. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  4988. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  4989. var isIE = UA && /msie|trident/.test(UA);
  4990. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  4991. var isEdge = UA && UA.indexOf('edge/') > 0;
  4992. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  4993. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  4994. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  4995. var isPhantomJS = UA && /phantomjs/.test(UA);
  4996. var isFF = UA && UA.match(/firefox\/(\d+)/);
  4997. // Firefox has a "watch" function on Object.prototype...
  4998. var nativeWatch = ({}).watch;
  4999. if (inBrowser) {
  5000. try {
  5001. var opts = {};
  5002. Object.defineProperty(opts, 'passive', ({
  5003. get: function get () {
  5004. }
  5005. })); // https://github.com/facebook/flow/issues/285
  5006. window.addEventListener('test-passive', null, opts);
  5007. } catch (e) {}
  5008. }
  5009. // this needs to be lazy-evaled because vue may be required before
  5010. // vue-server-renderer can set VUE_ENV
  5011. var _isServer;
  5012. var isServerRendering = function () {
  5013. if (_isServer === undefined) {
  5014. /* istanbul ignore if */
  5015. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  5016. // detect presence of vue-server-renderer and avoid
  5017. // Webpack shimming the process
  5018. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  5019. } else {
  5020. _isServer = false;
  5021. }
  5022. }
  5023. return _isServer
  5024. };
  5025. // detect devtools
  5026. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  5027. /* istanbul ignore next */
  5028. function isNative (Ctor) {
  5029. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  5030. }
  5031. var hasSymbol =
  5032. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  5033. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  5034. var _Set;
  5035. /* istanbul ignore if */ // $flow-disable-line
  5036. if (typeof Set !== 'undefined' && isNative(Set)) {
  5037. // use native Set when available.
  5038. _Set = Set;
  5039. } else {
  5040. // a non-standard Set polyfill that only works with primitive keys.
  5041. _Set = /*@__PURE__*/(function () {
  5042. function Set () {
  5043. this.set = Object.create(null);
  5044. }
  5045. Set.prototype.has = function has (key) {
  5046. return this.set[key] === true
  5047. };
  5048. Set.prototype.add = function add (key) {
  5049. this.set[key] = true;
  5050. };
  5051. Set.prototype.clear = function clear () {
  5052. this.set = Object.create(null);
  5053. };
  5054. return Set;
  5055. }());
  5056. }
  5057. /* */
  5058. var warn = noop;
  5059. var tip = noop;
  5060. var generateComponentTrace = (noop); // work around flow check
  5061. var formatComponentName = (noop);
  5062. if (true) {
  5063. var hasConsole = typeof console !== 'undefined';
  5064. var classifyRE = /(?:^|[-_])(\w)/g;
  5065. var classify = function (str) { return str
  5066. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  5067. .replace(/[-_]/g, ''); };
  5068. warn = function (msg, vm) {
  5069. var trace = vm ? generateComponentTrace(vm) : '';
  5070. if (config.warnHandler) {
  5071. config.warnHandler.call(null, msg, vm, trace);
  5072. } else if (hasConsole && (!config.silent)) {
  5073. console.error(("[Vue warn]: " + msg + trace));
  5074. }
  5075. };
  5076. tip = function (msg, vm) {
  5077. if (hasConsole && (!config.silent)) {
  5078. console.warn("[Vue tip]: " + msg + (
  5079. vm ? generateComponentTrace(vm) : ''
  5080. ));
  5081. }
  5082. };
  5083. formatComponentName = function (vm, includeFile) {
  5084. if (vm.$root === vm) {
  5085. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  5086. return ('') + vm.$options.__file
  5087. }
  5088. return '<Root>'
  5089. }
  5090. var options = typeof vm === 'function' && vm.cid != null
  5091. ? vm.options
  5092. : vm._isVue
  5093. ? vm.$options || vm.constructor.options
  5094. : vm;
  5095. var name = options.name || options._componentTag;
  5096. var file = options.__file;
  5097. if (!name && file) {
  5098. var match = file.match(/([^/\\]+)\.vue$/);
  5099. name = match && match[1];
  5100. }
  5101. return (
  5102. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  5103. (file && includeFile !== false ? (" at " + file) : '')
  5104. )
  5105. };
  5106. var repeat = function (str, n) {
  5107. var res = '';
  5108. while (n) {
  5109. if (n % 2 === 1) { res += str; }
  5110. if (n > 1) { str += str; }
  5111. n >>= 1;
  5112. }
  5113. return res
  5114. };
  5115. generateComponentTrace = function (vm) {
  5116. if (vm._isVue && vm.$parent) {
  5117. var tree = [];
  5118. var currentRecursiveSequence = 0;
  5119. while (vm && vm.$options.name !== 'PageBody') {
  5120. if (tree.length > 0) {
  5121. var last = tree[tree.length - 1];
  5122. if (last.constructor === vm.constructor) {
  5123. currentRecursiveSequence++;
  5124. vm = vm.$parent;
  5125. continue
  5126. } else if (currentRecursiveSequence > 0) {
  5127. tree[tree.length - 1] = [last, currentRecursiveSequence];
  5128. currentRecursiveSequence = 0;
  5129. }
  5130. }
  5131. !vm.$options.isReserved && tree.push(vm);
  5132. vm = vm.$parent;
  5133. }
  5134. return '\n\nfound in\n\n' + tree
  5135. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  5136. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  5137. : formatComponentName(vm))); })
  5138. .join('\n')
  5139. } else {
  5140. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  5141. }
  5142. };
  5143. }
  5144. /* */
  5145. var uid = 0;
  5146. /**
  5147. * A dep is an observable that can have multiple
  5148. * directives subscribing to it.
  5149. */
  5150. var Dep = function Dep () {
  5151. this.id = uid++;
  5152. this.subs = [];
  5153. };
  5154. Dep.prototype.addSub = function addSub (sub) {
  5155. this.subs.push(sub);
  5156. };
  5157. Dep.prototype.removeSub = function removeSub (sub) {
  5158. remove(this.subs, sub);
  5159. };
  5160. Dep.prototype.depend = function depend () {
  5161. if (Dep.SharedObject.target) {
  5162. Dep.SharedObject.target.addDep(this);
  5163. }
  5164. };
  5165. Dep.prototype.notify = function notify () {
  5166. // stabilize the subscriber list first
  5167. var subs = this.subs.slice();
  5168. if ( true && !config.async) {
  5169. // subs aren't sorted in scheduler if not running async
  5170. // we need to sort them now to make sure they fire in correct
  5171. // order
  5172. subs.sort(function (a, b) { return a.id - b.id; });
  5173. }
  5174. for (var i = 0, l = subs.length; i < l; i++) {
  5175. subs[i].update();
  5176. }
  5177. };
  5178. // The current target watcher being evaluated.
  5179. // This is globally unique because only one watcher
  5180. // can be evaluated at a time.
  5181. // fixed by xxxxxx (nvue shared vuex)
  5182. /* eslint-disable no-undef */
  5183. Dep.SharedObject = {};
  5184. Dep.SharedObject.target = null;
  5185. Dep.SharedObject.targetStack = [];
  5186. function pushTarget (target) {
  5187. Dep.SharedObject.targetStack.push(target);
  5188. Dep.SharedObject.target = target;
  5189. Dep.target = target;
  5190. }
  5191. function popTarget () {
  5192. Dep.SharedObject.targetStack.pop();
  5193. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  5194. Dep.target = Dep.SharedObject.target;
  5195. }
  5196. /* */
  5197. var VNode = function VNode (
  5198. tag,
  5199. data,
  5200. children,
  5201. text,
  5202. elm,
  5203. context,
  5204. componentOptions,
  5205. asyncFactory
  5206. ) {
  5207. this.tag = tag;
  5208. this.data = data;
  5209. this.children = children;
  5210. this.text = text;
  5211. this.elm = elm;
  5212. this.ns = undefined;
  5213. this.context = context;
  5214. this.fnContext = undefined;
  5215. this.fnOptions = undefined;
  5216. this.fnScopeId = undefined;
  5217. this.key = data && data.key;
  5218. this.componentOptions = componentOptions;
  5219. this.componentInstance = undefined;
  5220. this.parent = undefined;
  5221. this.raw = false;
  5222. this.isStatic = false;
  5223. this.isRootInsert = true;
  5224. this.isComment = false;
  5225. this.isCloned = false;
  5226. this.isOnce = false;
  5227. this.asyncFactory = asyncFactory;
  5228. this.asyncMeta = undefined;
  5229. this.isAsyncPlaceholder = false;
  5230. };
  5231. var prototypeAccessors = { child: { configurable: true } };
  5232. // DEPRECATED: alias for componentInstance for backwards compat.
  5233. /* istanbul ignore next */
  5234. prototypeAccessors.child.get = function () {
  5235. return this.componentInstance
  5236. };
  5237. Object.defineProperties( VNode.prototype, prototypeAccessors );
  5238. var createEmptyVNode = function (text) {
  5239. if ( text === void 0 ) text = '';
  5240. var node = new VNode();
  5241. node.text = text;
  5242. node.isComment = true;
  5243. return node
  5244. };
  5245. function createTextVNode (val) {
  5246. return new VNode(undefined, undefined, undefined, String(val))
  5247. }
  5248. // optimized shallow clone
  5249. // used for static nodes and slot nodes because they may be reused across
  5250. // multiple renders, cloning them avoids errors when DOM manipulations rely
  5251. // on their elm reference.
  5252. function cloneVNode (vnode) {
  5253. var cloned = new VNode(
  5254. vnode.tag,
  5255. vnode.data,
  5256. // #7975
  5257. // clone children array to avoid mutating original in case of cloning
  5258. // a child.
  5259. vnode.children && vnode.children.slice(),
  5260. vnode.text,
  5261. vnode.elm,
  5262. vnode.context,
  5263. vnode.componentOptions,
  5264. vnode.asyncFactory
  5265. );
  5266. cloned.ns = vnode.ns;
  5267. cloned.isStatic = vnode.isStatic;
  5268. cloned.key = vnode.key;
  5269. cloned.isComment = vnode.isComment;
  5270. cloned.fnContext = vnode.fnContext;
  5271. cloned.fnOptions = vnode.fnOptions;
  5272. cloned.fnScopeId = vnode.fnScopeId;
  5273. cloned.asyncMeta = vnode.asyncMeta;
  5274. cloned.isCloned = true;
  5275. return cloned
  5276. }
  5277. /*
  5278. * not type checking this file because flow doesn't play well with
  5279. * dynamically accessing methods on Array prototype
  5280. */
  5281. var arrayProto = Array.prototype;
  5282. var arrayMethods = Object.create(arrayProto);
  5283. var methodsToPatch = [
  5284. 'push',
  5285. 'pop',
  5286. 'shift',
  5287. 'unshift',
  5288. 'splice',
  5289. 'sort',
  5290. 'reverse'
  5291. ];
  5292. /**
  5293. * Intercept mutating methods and emit events
  5294. */
  5295. methodsToPatch.forEach(function (method) {
  5296. // cache original method
  5297. var original = arrayProto[method];
  5298. def(arrayMethods, method, function mutator () {
  5299. var args = [], len = arguments.length;
  5300. while ( len-- ) args[ len ] = arguments[ len ];
  5301. var result = original.apply(this, args);
  5302. var ob = this.__ob__;
  5303. var inserted;
  5304. switch (method) {
  5305. case 'push':
  5306. case 'unshift':
  5307. inserted = args;
  5308. break
  5309. case 'splice':
  5310. inserted = args.slice(2);
  5311. break
  5312. }
  5313. if (inserted) { ob.observeArray(inserted); }
  5314. // notify change
  5315. ob.dep.notify();
  5316. return result
  5317. });
  5318. });
  5319. /* */
  5320. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  5321. /**
  5322. * In some cases we may want to disable observation inside a component's
  5323. * update computation.
  5324. */
  5325. var shouldObserve = true;
  5326. function toggleObserving (value) {
  5327. shouldObserve = value;
  5328. }
  5329. /**
  5330. * Observer class that is attached to each observed
  5331. * object. Once attached, the observer converts the target
  5332. * object's property keys into getter/setters that
  5333. * collect dependencies and dispatch updates.
  5334. */
  5335. var Observer = function Observer (value) {
  5336. this.value = value;
  5337. this.dep = new Dep();
  5338. this.vmCount = 0;
  5339. def(value, '__ob__', this);
  5340. if (Array.isArray(value)) {
  5341. if (hasProto) {
  5342. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  5343. if(value.push !== value.__proto__.push){
  5344. copyAugment(value, arrayMethods, arrayKeys);
  5345. } else {
  5346. protoAugment(value, arrayMethods);
  5347. }
  5348. }
  5349. } else {
  5350. copyAugment(value, arrayMethods, arrayKeys);
  5351. }
  5352. this.observeArray(value);
  5353. } else {
  5354. this.walk(value);
  5355. }
  5356. };
  5357. /**
  5358. * Walk through all properties and convert them into
  5359. * getter/setters. This method should only be called when
  5360. * value type is Object.
  5361. */
  5362. Observer.prototype.walk = function walk (obj) {
  5363. var keys = Object.keys(obj);
  5364. for (var i = 0; i < keys.length; i++) {
  5365. defineReactive$$1(obj, keys[i]);
  5366. }
  5367. };
  5368. /**
  5369. * Observe a list of Array items.
  5370. */
  5371. Observer.prototype.observeArray = function observeArray (items) {
  5372. for (var i = 0, l = items.length; i < l; i++) {
  5373. observe(items[i]);
  5374. }
  5375. };
  5376. // helpers
  5377. /**
  5378. * Augment a target Object or Array by intercepting
  5379. * the prototype chain using __proto__
  5380. */
  5381. function protoAugment (target, src) {
  5382. /* eslint-disable no-proto */
  5383. target.__proto__ = src;
  5384. /* eslint-enable no-proto */
  5385. }
  5386. /**
  5387. * Augment a target Object or Array by defining
  5388. * hidden properties.
  5389. */
  5390. /* istanbul ignore next */
  5391. function copyAugment (target, src, keys) {
  5392. for (var i = 0, l = keys.length; i < l; i++) {
  5393. var key = keys[i];
  5394. def(target, key, src[key]);
  5395. }
  5396. }
  5397. /**
  5398. * Attempt to create an observer instance for a value,
  5399. * returns the new observer if successfully observed,
  5400. * or the existing observer if the value already has one.
  5401. */
  5402. function observe (value, asRootData) {
  5403. if (!isObject(value) || value instanceof VNode) {
  5404. return
  5405. }
  5406. var ob;
  5407. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  5408. ob = value.__ob__;
  5409. } else if (
  5410. shouldObserve &&
  5411. !isServerRendering() &&
  5412. (Array.isArray(value) || isPlainObject(value)) &&
  5413. Object.isExtensible(value) &&
  5414. !value._isVue &&
  5415. !value.__v_isMPComponent
  5416. ) {
  5417. ob = new Observer(value);
  5418. }
  5419. if (asRootData && ob) {
  5420. ob.vmCount++;
  5421. }
  5422. return ob
  5423. }
  5424. /**
  5425. * Define a reactive property on an Object.
  5426. */
  5427. function defineReactive$$1 (
  5428. obj,
  5429. key,
  5430. val,
  5431. customSetter,
  5432. shallow
  5433. ) {
  5434. var dep = new Dep();
  5435. var property = Object.getOwnPropertyDescriptor(obj, key);
  5436. if (property && property.configurable === false) {
  5437. return
  5438. }
  5439. // cater for pre-defined getter/setters
  5440. var getter = property && property.get;
  5441. var setter = property && property.set;
  5442. if ((!getter || setter) && arguments.length === 2) {
  5443. val = obj[key];
  5444. }
  5445. var childOb = !shallow && observe(val);
  5446. Object.defineProperty(obj, key, {
  5447. enumerable: true,
  5448. configurable: true,
  5449. get: function reactiveGetter () {
  5450. var value = getter ? getter.call(obj) : val;
  5451. if (Dep.SharedObject.target) { // fixed by xxxxxx
  5452. dep.depend();
  5453. if (childOb) {
  5454. childOb.dep.depend();
  5455. if (Array.isArray(value)) {
  5456. dependArray(value);
  5457. }
  5458. }
  5459. }
  5460. return value
  5461. },
  5462. set: function reactiveSetter (newVal) {
  5463. var value = getter ? getter.call(obj) : val;
  5464. /* eslint-disable no-self-compare */
  5465. if (newVal === value || (newVal !== newVal && value !== value)) {
  5466. return
  5467. }
  5468. /* eslint-enable no-self-compare */
  5469. if ( true && customSetter) {
  5470. customSetter();
  5471. }
  5472. // #7981: for accessor properties without setter
  5473. if (getter && !setter) { return }
  5474. if (setter) {
  5475. setter.call(obj, newVal);
  5476. } else {
  5477. val = newVal;
  5478. }
  5479. childOb = !shallow && observe(newVal);
  5480. dep.notify();
  5481. }
  5482. });
  5483. }
  5484. /**
  5485. * Set a property on an object. Adds the new property and
  5486. * triggers change notification if the property doesn't
  5487. * already exist.
  5488. */
  5489. function set (target, key, val) {
  5490. if ( true &&
  5491. (isUndef(target) || isPrimitive(target))
  5492. ) {
  5493. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  5494. }
  5495. if (Array.isArray(target) && isValidArrayIndex(key)) {
  5496. target.length = Math.max(target.length, key);
  5497. target.splice(key, 1, val);
  5498. return val
  5499. }
  5500. if (key in target && !(key in Object.prototype)) {
  5501. target[key] = val;
  5502. return val
  5503. }
  5504. var ob = (target).__ob__;
  5505. if (target._isVue || (ob && ob.vmCount)) {
  5506. true && warn(
  5507. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  5508. 'at runtime - declare it upfront in the data option.'
  5509. );
  5510. return val
  5511. }
  5512. if (!ob) {
  5513. target[key] = val;
  5514. return val
  5515. }
  5516. defineReactive$$1(ob.value, key, val);
  5517. ob.dep.notify();
  5518. return val
  5519. }
  5520. /**
  5521. * Delete a property and trigger change if necessary.
  5522. */
  5523. function del (target, key) {
  5524. if ( true &&
  5525. (isUndef(target) || isPrimitive(target))
  5526. ) {
  5527. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  5528. }
  5529. if (Array.isArray(target) && isValidArrayIndex(key)) {
  5530. target.splice(key, 1);
  5531. return
  5532. }
  5533. var ob = (target).__ob__;
  5534. if (target._isVue || (ob && ob.vmCount)) {
  5535. true && warn(
  5536. 'Avoid deleting properties on a Vue instance or its root $data ' +
  5537. '- just set it to null.'
  5538. );
  5539. return
  5540. }
  5541. if (!hasOwn(target, key)) {
  5542. return
  5543. }
  5544. delete target[key];
  5545. if (!ob) {
  5546. return
  5547. }
  5548. ob.dep.notify();
  5549. }
  5550. /**
  5551. * Collect dependencies on array elements when the array is touched, since
  5552. * we cannot intercept array element access like property getters.
  5553. */
  5554. function dependArray (value) {
  5555. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  5556. e = value[i];
  5557. e && e.__ob__ && e.__ob__.dep.depend();
  5558. if (Array.isArray(e)) {
  5559. dependArray(e);
  5560. }
  5561. }
  5562. }
  5563. /* */
  5564. /**
  5565. * Option overwriting strategies are functions that handle
  5566. * how to merge a parent option value and a child option
  5567. * value into the final value.
  5568. */
  5569. var strats = config.optionMergeStrategies;
  5570. /**
  5571. * Options with restrictions
  5572. */
  5573. if (true) {
  5574. strats.el = strats.propsData = function (parent, child, vm, key) {
  5575. if (!vm) {
  5576. warn(
  5577. "option \"" + key + "\" can only be used during instance " +
  5578. 'creation with the `new` keyword.'
  5579. );
  5580. }
  5581. return defaultStrat(parent, child)
  5582. };
  5583. }
  5584. /**
  5585. * Helper that recursively merges two data objects together.
  5586. */
  5587. function mergeData (to, from) {
  5588. if (!from) { return to }
  5589. var key, toVal, fromVal;
  5590. var keys = hasSymbol
  5591. ? Reflect.ownKeys(from)
  5592. : Object.keys(from);
  5593. for (var i = 0; i < keys.length; i++) {
  5594. key = keys[i];
  5595. // in case the object is already observed...
  5596. if (key === '__ob__') { continue }
  5597. toVal = to[key];
  5598. fromVal = from[key];
  5599. if (!hasOwn(to, key)) {
  5600. set(to, key, fromVal);
  5601. } else if (
  5602. toVal !== fromVal &&
  5603. isPlainObject(toVal) &&
  5604. isPlainObject(fromVal)
  5605. ) {
  5606. mergeData(toVal, fromVal);
  5607. }
  5608. }
  5609. return to
  5610. }
  5611. /**
  5612. * Data
  5613. */
  5614. function mergeDataOrFn (
  5615. parentVal,
  5616. childVal,
  5617. vm
  5618. ) {
  5619. if (!vm) {
  5620. // in a Vue.extend merge, both should be functions
  5621. if (!childVal) {
  5622. return parentVal
  5623. }
  5624. if (!parentVal) {
  5625. return childVal
  5626. }
  5627. // when parentVal & childVal are both present,
  5628. // we need to return a function that returns the
  5629. // merged result of both functions... no need to
  5630. // check if parentVal is a function here because
  5631. // it has to be a function to pass previous merges.
  5632. return function mergedDataFn () {
  5633. return mergeData(
  5634. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  5635. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  5636. )
  5637. }
  5638. } else {
  5639. return function mergedInstanceDataFn () {
  5640. // instance merge
  5641. var instanceData = typeof childVal === 'function'
  5642. ? childVal.call(vm, vm)
  5643. : childVal;
  5644. var defaultData = typeof parentVal === 'function'
  5645. ? parentVal.call(vm, vm)
  5646. : parentVal;
  5647. if (instanceData) {
  5648. return mergeData(instanceData, defaultData)
  5649. } else {
  5650. return defaultData
  5651. }
  5652. }
  5653. }
  5654. }
  5655. strats.data = function (
  5656. parentVal,
  5657. childVal,
  5658. vm
  5659. ) {
  5660. if (!vm) {
  5661. if (childVal && typeof childVal !== 'function') {
  5662. true && warn(
  5663. 'The "data" option should be a function ' +
  5664. 'that returns a per-instance value in component ' +
  5665. 'definitions.',
  5666. vm
  5667. );
  5668. return parentVal
  5669. }
  5670. return mergeDataOrFn(parentVal, childVal)
  5671. }
  5672. return mergeDataOrFn(parentVal, childVal, vm)
  5673. };
  5674. /**
  5675. * Hooks and props are merged as arrays.
  5676. */
  5677. function mergeHook (
  5678. parentVal,
  5679. childVal
  5680. ) {
  5681. var res = childVal
  5682. ? parentVal
  5683. ? parentVal.concat(childVal)
  5684. : Array.isArray(childVal)
  5685. ? childVal
  5686. : [childVal]
  5687. : parentVal;
  5688. return res
  5689. ? dedupeHooks(res)
  5690. : res
  5691. }
  5692. function dedupeHooks (hooks) {
  5693. var res = [];
  5694. for (var i = 0; i < hooks.length; i++) {
  5695. if (res.indexOf(hooks[i]) === -1) {
  5696. res.push(hooks[i]);
  5697. }
  5698. }
  5699. return res
  5700. }
  5701. LIFECYCLE_HOOKS.forEach(function (hook) {
  5702. strats[hook] = mergeHook;
  5703. });
  5704. /**
  5705. * Assets
  5706. *
  5707. * When a vm is present (instance creation), we need to do
  5708. * a three-way merge between constructor options, instance
  5709. * options and parent options.
  5710. */
  5711. function mergeAssets (
  5712. parentVal,
  5713. childVal,
  5714. vm,
  5715. key
  5716. ) {
  5717. var res = Object.create(parentVal || null);
  5718. if (childVal) {
  5719. true && assertObjectType(key, childVal, vm);
  5720. return extend(res, childVal)
  5721. } else {
  5722. return res
  5723. }
  5724. }
  5725. ASSET_TYPES.forEach(function (type) {
  5726. strats[type + 's'] = mergeAssets;
  5727. });
  5728. /**
  5729. * Watchers.
  5730. *
  5731. * Watchers hashes should not overwrite one
  5732. * another, so we merge them as arrays.
  5733. */
  5734. strats.watch = function (
  5735. parentVal,
  5736. childVal,
  5737. vm,
  5738. key
  5739. ) {
  5740. // work around Firefox's Object.prototype.watch...
  5741. if (parentVal === nativeWatch) { parentVal = undefined; }
  5742. if (childVal === nativeWatch) { childVal = undefined; }
  5743. /* istanbul ignore if */
  5744. if (!childVal) { return Object.create(parentVal || null) }
  5745. if (true) {
  5746. assertObjectType(key, childVal, vm);
  5747. }
  5748. if (!parentVal) { return childVal }
  5749. var ret = {};
  5750. extend(ret, parentVal);
  5751. for (var key$1 in childVal) {
  5752. var parent = ret[key$1];
  5753. var child = childVal[key$1];
  5754. if (parent && !Array.isArray(parent)) {
  5755. parent = [parent];
  5756. }
  5757. ret[key$1] = parent
  5758. ? parent.concat(child)
  5759. : Array.isArray(child) ? child : [child];
  5760. }
  5761. return ret
  5762. };
  5763. /**
  5764. * Other object hashes.
  5765. */
  5766. strats.props =
  5767. strats.methods =
  5768. strats.inject =
  5769. strats.computed = function (
  5770. parentVal,
  5771. childVal,
  5772. vm,
  5773. key
  5774. ) {
  5775. if (childVal && "development" !== 'production') {
  5776. assertObjectType(key, childVal, vm);
  5777. }
  5778. if (!parentVal) { return childVal }
  5779. var ret = Object.create(null);
  5780. extend(ret, parentVal);
  5781. if (childVal) { extend(ret, childVal); }
  5782. return ret
  5783. };
  5784. strats.provide = mergeDataOrFn;
  5785. /**
  5786. * Default strategy.
  5787. */
  5788. var defaultStrat = function (parentVal, childVal) {
  5789. return childVal === undefined
  5790. ? parentVal
  5791. : childVal
  5792. };
  5793. /**
  5794. * Validate component names
  5795. */
  5796. function checkComponents (options) {
  5797. for (var key in options.components) {
  5798. validateComponentName(key);
  5799. }
  5800. }
  5801. function validateComponentName (name) {
  5802. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  5803. warn(
  5804. 'Invalid component name: "' + name + '". Component names ' +
  5805. 'should conform to valid custom element name in html5 specification.'
  5806. );
  5807. }
  5808. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  5809. warn(
  5810. 'Do not use built-in or reserved HTML elements as component ' +
  5811. 'id: ' + name
  5812. );
  5813. }
  5814. }
  5815. /**
  5816. * Ensure all props option syntax are normalized into the
  5817. * Object-based format.
  5818. */
  5819. function normalizeProps (options, vm) {
  5820. var props = options.props;
  5821. if (!props) { return }
  5822. var res = {};
  5823. var i, val, name;
  5824. if (Array.isArray(props)) {
  5825. i = props.length;
  5826. while (i--) {
  5827. val = props[i];
  5828. if (typeof val === 'string') {
  5829. name = camelize(val);
  5830. res[name] = { type: null };
  5831. } else if (true) {
  5832. warn('props must be strings when using array syntax.');
  5833. }
  5834. }
  5835. } else if (isPlainObject(props)) {
  5836. for (var key in props) {
  5837. val = props[key];
  5838. name = camelize(key);
  5839. res[name] = isPlainObject(val)
  5840. ? val
  5841. : { type: val };
  5842. }
  5843. } else if (true) {
  5844. warn(
  5845. "Invalid value for option \"props\": expected an Array or an Object, " +
  5846. "but got " + (toRawType(props)) + ".",
  5847. vm
  5848. );
  5849. }
  5850. options.props = res;
  5851. }
  5852. /**
  5853. * Normalize all injections into Object-based format
  5854. */
  5855. function normalizeInject (options, vm) {
  5856. var inject = options.inject;
  5857. if (!inject) { return }
  5858. var normalized = options.inject = {};
  5859. if (Array.isArray(inject)) {
  5860. for (var i = 0; i < inject.length; i++) {
  5861. normalized[inject[i]] = { from: inject[i] };
  5862. }
  5863. } else if (isPlainObject(inject)) {
  5864. for (var key in inject) {
  5865. var val = inject[key];
  5866. normalized[key] = isPlainObject(val)
  5867. ? extend({ from: key }, val)
  5868. : { from: val };
  5869. }
  5870. } else if (true) {
  5871. warn(
  5872. "Invalid value for option \"inject\": expected an Array or an Object, " +
  5873. "but got " + (toRawType(inject)) + ".",
  5874. vm
  5875. );
  5876. }
  5877. }
  5878. /**
  5879. * Normalize raw function directives into object format.
  5880. */
  5881. function normalizeDirectives (options) {
  5882. var dirs = options.directives;
  5883. if (dirs) {
  5884. for (var key in dirs) {
  5885. var def$$1 = dirs[key];
  5886. if (typeof def$$1 === 'function') {
  5887. dirs[key] = { bind: def$$1, update: def$$1 };
  5888. }
  5889. }
  5890. }
  5891. }
  5892. function assertObjectType (name, value, vm) {
  5893. if (!isPlainObject(value)) {
  5894. warn(
  5895. "Invalid value for option \"" + name + "\": expected an Object, " +
  5896. "but got " + (toRawType(value)) + ".",
  5897. vm
  5898. );
  5899. }
  5900. }
  5901. /**
  5902. * Merge two option objects into a new one.
  5903. * Core utility used in both instantiation and inheritance.
  5904. */
  5905. function mergeOptions (
  5906. parent,
  5907. child,
  5908. vm
  5909. ) {
  5910. if (true) {
  5911. checkComponents(child);
  5912. }
  5913. if (typeof child === 'function') {
  5914. child = child.options;
  5915. }
  5916. normalizeProps(child, vm);
  5917. normalizeInject(child, vm);
  5918. normalizeDirectives(child);
  5919. // Apply extends and mixins on the child options,
  5920. // but only if it is a raw options object that isn't
  5921. // the result of another mergeOptions call.
  5922. // Only merged options has the _base property.
  5923. if (!child._base) {
  5924. if (child.extends) {
  5925. parent = mergeOptions(parent, child.extends, vm);
  5926. }
  5927. if (child.mixins) {
  5928. for (var i = 0, l = child.mixins.length; i < l; i++) {
  5929. parent = mergeOptions(parent, child.mixins[i], vm);
  5930. }
  5931. }
  5932. }
  5933. var options = {};
  5934. var key;
  5935. for (key in parent) {
  5936. mergeField(key);
  5937. }
  5938. for (key in child) {
  5939. if (!hasOwn(parent, key)) {
  5940. mergeField(key);
  5941. }
  5942. }
  5943. function mergeField (key) {
  5944. var strat = strats[key] || defaultStrat;
  5945. options[key] = strat(parent[key], child[key], vm, key);
  5946. }
  5947. return options
  5948. }
  5949. /**
  5950. * Resolve an asset.
  5951. * This function is used because child instances need access
  5952. * to assets defined in its ancestor chain.
  5953. */
  5954. function resolveAsset (
  5955. options,
  5956. type,
  5957. id,
  5958. warnMissing
  5959. ) {
  5960. /* istanbul ignore if */
  5961. if (typeof id !== 'string') {
  5962. return
  5963. }
  5964. var assets = options[type];
  5965. // check local registration variations first
  5966. if (hasOwn(assets, id)) { return assets[id] }
  5967. var camelizedId = camelize(id);
  5968. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  5969. var PascalCaseId = capitalize(camelizedId);
  5970. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  5971. // fallback to prototype chain
  5972. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  5973. if ( true && warnMissing && !res) {
  5974. warn(
  5975. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  5976. options
  5977. );
  5978. }
  5979. return res
  5980. }
  5981. /* */
  5982. function validateProp (
  5983. key,
  5984. propOptions,
  5985. propsData,
  5986. vm
  5987. ) {
  5988. var prop = propOptions[key];
  5989. var absent = !hasOwn(propsData, key);
  5990. var value = propsData[key];
  5991. // boolean casting
  5992. var booleanIndex = getTypeIndex(Boolean, prop.type);
  5993. if (booleanIndex > -1) {
  5994. if (absent && !hasOwn(prop, 'default')) {
  5995. value = false;
  5996. } else if (value === '' || value === hyphenate(key)) {
  5997. // only cast empty string / same name to boolean if
  5998. // boolean has higher priority
  5999. var stringIndex = getTypeIndex(String, prop.type);
  6000. if (stringIndex < 0 || booleanIndex < stringIndex) {
  6001. value = true;
  6002. }
  6003. }
  6004. }
  6005. // check default value
  6006. if (value === undefined) {
  6007. value = getPropDefaultValue(vm, prop, key);
  6008. // since the default value is a fresh copy,
  6009. // make sure to observe it.
  6010. var prevShouldObserve = shouldObserve;
  6011. toggleObserving(true);
  6012. observe(value);
  6013. toggleObserving(prevShouldObserve);
  6014. }
  6015. if (
  6016. true
  6017. ) {
  6018. assertProp(prop, key, value, vm, absent);
  6019. }
  6020. return value
  6021. }
  6022. /**
  6023. * Get the default value of a prop.
  6024. */
  6025. function getPropDefaultValue (vm, prop, key) {
  6026. // no default, return undefined
  6027. if (!hasOwn(prop, 'default')) {
  6028. return undefined
  6029. }
  6030. var def = prop.default;
  6031. // warn against non-factory defaults for Object & Array
  6032. if ( true && isObject(def)) {
  6033. warn(
  6034. 'Invalid default value for prop "' + key + '": ' +
  6035. 'Props with type Object/Array must use a factory function ' +
  6036. 'to return the default value.',
  6037. vm
  6038. );
  6039. }
  6040. // the raw prop value was also undefined from previous render,
  6041. // return previous default value to avoid unnecessary watcher trigger
  6042. if (vm && vm.$options.propsData &&
  6043. vm.$options.propsData[key] === undefined &&
  6044. vm._props[key] !== undefined
  6045. ) {
  6046. return vm._props[key]
  6047. }
  6048. // call factory function for non-Function types
  6049. // a value is Function if its prototype is function even across different execution context
  6050. return typeof def === 'function' && getType(prop.type) !== 'Function'
  6051. ? def.call(vm)
  6052. : def
  6053. }
  6054. /**
  6055. * Assert whether a prop is valid.
  6056. */
  6057. function assertProp (
  6058. prop,
  6059. name,
  6060. value,
  6061. vm,
  6062. absent
  6063. ) {
  6064. if (prop.required && absent) {
  6065. warn(
  6066. 'Missing required prop: "' + name + '"',
  6067. vm
  6068. );
  6069. return
  6070. }
  6071. if (value == null && !prop.required) {
  6072. return
  6073. }
  6074. var type = prop.type;
  6075. var valid = !type || type === true;
  6076. var expectedTypes = [];
  6077. if (type) {
  6078. if (!Array.isArray(type)) {
  6079. type = [type];
  6080. }
  6081. for (var i = 0; i < type.length && !valid; i++) {
  6082. var assertedType = assertType(value, type[i]);
  6083. expectedTypes.push(assertedType.expectedType || '');
  6084. valid = assertedType.valid;
  6085. }
  6086. }
  6087. if (!valid) {
  6088. warn(
  6089. getInvalidTypeMessage(name, value, expectedTypes),
  6090. vm
  6091. );
  6092. return
  6093. }
  6094. var validator = prop.validator;
  6095. if (validator) {
  6096. if (!validator(value)) {
  6097. warn(
  6098. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  6099. vm
  6100. );
  6101. }
  6102. }
  6103. }
  6104. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  6105. function assertType (value, type) {
  6106. var valid;
  6107. var expectedType = getType(type);
  6108. if (simpleCheckRE.test(expectedType)) {
  6109. var t = typeof value;
  6110. valid = t === expectedType.toLowerCase();
  6111. // for primitive wrapper objects
  6112. if (!valid && t === 'object') {
  6113. valid = value instanceof type;
  6114. }
  6115. } else if (expectedType === 'Object') {
  6116. valid = isPlainObject(value);
  6117. } else if (expectedType === 'Array') {
  6118. valid = Array.isArray(value);
  6119. } else {
  6120. valid = value instanceof type;
  6121. }
  6122. return {
  6123. valid: valid,
  6124. expectedType: expectedType
  6125. }
  6126. }
  6127. /**
  6128. * Use function string name to check built-in types,
  6129. * because a simple equality check will fail when running
  6130. * across different vms / iframes.
  6131. */
  6132. function getType (fn) {
  6133. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  6134. return match ? match[1] : ''
  6135. }
  6136. function isSameType (a, b) {
  6137. return getType(a) === getType(b)
  6138. }
  6139. function getTypeIndex (type, expectedTypes) {
  6140. if (!Array.isArray(expectedTypes)) {
  6141. return isSameType(expectedTypes, type) ? 0 : -1
  6142. }
  6143. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  6144. if (isSameType(expectedTypes[i], type)) {
  6145. return i
  6146. }
  6147. }
  6148. return -1
  6149. }
  6150. function getInvalidTypeMessage (name, value, expectedTypes) {
  6151. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  6152. " Expected " + (expectedTypes.map(capitalize).join(', '));
  6153. var expectedType = expectedTypes[0];
  6154. var receivedType = toRawType(value);
  6155. var expectedValue = styleValue(value, expectedType);
  6156. var receivedValue = styleValue(value, receivedType);
  6157. // check if we need to specify expected value
  6158. if (expectedTypes.length === 1 &&
  6159. isExplicable(expectedType) &&
  6160. !isBoolean(expectedType, receivedType)) {
  6161. message += " with value " + expectedValue;
  6162. }
  6163. message += ", got " + receivedType + " ";
  6164. // check if we need to specify received value
  6165. if (isExplicable(receivedType)) {
  6166. message += "with value " + receivedValue + ".";
  6167. }
  6168. return message
  6169. }
  6170. function styleValue (value, type) {
  6171. if (type === 'String') {
  6172. return ("\"" + value + "\"")
  6173. } else if (type === 'Number') {
  6174. return ("" + (Number(value)))
  6175. } else {
  6176. return ("" + value)
  6177. }
  6178. }
  6179. function isExplicable (value) {
  6180. var explicitTypes = ['string', 'number', 'boolean'];
  6181. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  6182. }
  6183. function isBoolean () {
  6184. var args = [], len = arguments.length;
  6185. while ( len-- ) args[ len ] = arguments[ len ];
  6186. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  6187. }
  6188. /* */
  6189. function handleError (err, vm, info) {
  6190. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  6191. // See: https://github.com/vuejs/vuex/issues/1505
  6192. pushTarget();
  6193. try {
  6194. if (vm) {
  6195. var cur = vm;
  6196. while ((cur = cur.$parent)) {
  6197. var hooks = cur.$options.errorCaptured;
  6198. if (hooks) {
  6199. for (var i = 0; i < hooks.length; i++) {
  6200. try {
  6201. var capture = hooks[i].call(cur, err, vm, info) === false;
  6202. if (capture) { return }
  6203. } catch (e) {
  6204. globalHandleError(e, cur, 'errorCaptured hook');
  6205. }
  6206. }
  6207. }
  6208. }
  6209. }
  6210. globalHandleError(err, vm, info);
  6211. } finally {
  6212. popTarget();
  6213. }
  6214. }
  6215. function invokeWithErrorHandling (
  6216. handler,
  6217. context,
  6218. args,
  6219. vm,
  6220. info
  6221. ) {
  6222. var res;
  6223. try {
  6224. res = args ? handler.apply(context, args) : handler.call(context);
  6225. if (res && !res._isVue && isPromise(res) && !res._handled) {
  6226. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  6227. // issue #9511
  6228. // avoid catch triggering multiple times when nested calls
  6229. res._handled = true;
  6230. }
  6231. } catch (e) {
  6232. handleError(e, vm, info);
  6233. }
  6234. return res
  6235. }
  6236. function globalHandleError (err, vm, info) {
  6237. if (config.errorHandler) {
  6238. try {
  6239. return config.errorHandler.call(null, err, vm, info)
  6240. } catch (e) {
  6241. // if the user intentionally throws the original error in the handler,
  6242. // do not log it twice
  6243. if (e !== err) {
  6244. logError(e, null, 'config.errorHandler');
  6245. }
  6246. }
  6247. }
  6248. logError(err, vm, info);
  6249. }
  6250. function logError (err, vm, info) {
  6251. if (true) {
  6252. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  6253. }
  6254. /* istanbul ignore else */
  6255. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  6256. console.error(err);
  6257. } else {
  6258. throw err
  6259. }
  6260. }
  6261. /* */
  6262. var callbacks = [];
  6263. var pending = false;
  6264. function flushCallbacks () {
  6265. pending = false;
  6266. var copies = callbacks.slice(0);
  6267. callbacks.length = 0;
  6268. for (var i = 0; i < copies.length; i++) {
  6269. copies[i]();
  6270. }
  6271. }
  6272. // Here we have async deferring wrappers using microtasks.
  6273. // In 2.5 we used (macro) tasks (in combination with microtasks).
  6274. // However, it has subtle problems when state is changed right before repaint
  6275. // (e.g. #6813, out-in transitions).
  6276. // Also, using (macro) tasks in event handler would cause some weird behaviors
  6277. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  6278. // So we now use microtasks everywhere, again.
  6279. // A major drawback of this tradeoff is that there are some scenarios
  6280. // where microtasks have too high a priority and fire in between supposedly
  6281. // sequential events (e.g. #4521, #6690, which have workarounds)
  6282. // or even between bubbling of the same event (#6566).
  6283. var timerFunc;
  6284. // The nextTick behavior leverages the microtask queue, which can be accessed
  6285. // via either native Promise.then or MutationObserver.
  6286. // MutationObserver has wider support, however it is seriously bugged in
  6287. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  6288. // completely stops working after triggering a few times... so, if native
  6289. // Promise is available, we will use it:
  6290. /* istanbul ignore next, $flow-disable-line */
  6291. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  6292. var p = Promise.resolve();
  6293. timerFunc = function () {
  6294. p.then(flushCallbacks);
  6295. // In problematic UIWebViews, Promise.then doesn't completely break, but
  6296. // it can get stuck in a weird state where callbacks are pushed into the
  6297. // microtask queue but the queue isn't being flushed, until the browser
  6298. // needs to do some other work, e.g. handle a timer. Therefore we can
  6299. // "force" the microtask queue to be flushed by adding an empty timer.
  6300. if (isIOS) { setTimeout(noop); }
  6301. };
  6302. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  6303. isNative(MutationObserver) ||
  6304. // PhantomJS and iOS 7.x
  6305. MutationObserver.toString() === '[object MutationObserverConstructor]'
  6306. )) {
  6307. // Use MutationObserver where native Promise is not available,
  6308. // e.g. PhantomJS, iOS7, Android 4.4
  6309. // (#6466 MutationObserver is unreliable in IE11)
  6310. var counter = 1;
  6311. var observer = new MutationObserver(flushCallbacks);
  6312. var textNode = document.createTextNode(String(counter));
  6313. observer.observe(textNode, {
  6314. characterData: true
  6315. });
  6316. timerFunc = function () {
  6317. counter = (counter + 1) % 2;
  6318. textNode.data = String(counter);
  6319. };
  6320. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  6321. // Fallback to setImmediate.
  6322. // Technically it leverages the (macro) task queue,
  6323. // but it is still a better choice than setTimeout.
  6324. timerFunc = function () {
  6325. setImmediate(flushCallbacks);
  6326. };
  6327. } else {
  6328. // Fallback to setTimeout.
  6329. timerFunc = function () {
  6330. setTimeout(flushCallbacks, 0);
  6331. };
  6332. }
  6333. function nextTick (cb, ctx) {
  6334. var _resolve;
  6335. callbacks.push(function () {
  6336. if (cb) {
  6337. try {
  6338. cb.call(ctx);
  6339. } catch (e) {
  6340. handleError(e, ctx, 'nextTick');
  6341. }
  6342. } else if (_resolve) {
  6343. _resolve(ctx);
  6344. }
  6345. });
  6346. if (!pending) {
  6347. pending = true;
  6348. timerFunc();
  6349. }
  6350. // $flow-disable-line
  6351. if (!cb && typeof Promise !== 'undefined') {
  6352. return new Promise(function (resolve) {
  6353. _resolve = resolve;
  6354. })
  6355. }
  6356. }
  6357. /* */
  6358. /* not type checking this file because flow doesn't play well with Proxy */
  6359. var initProxy;
  6360. if (true) {
  6361. var allowedGlobals = makeMap(
  6362. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  6363. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  6364. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  6365. 'require' // for Webpack/Browserify
  6366. );
  6367. var warnNonPresent = function (target, key) {
  6368. warn(
  6369. "Property or method \"" + key + "\" is not defined on the instance but " +
  6370. 'referenced during render. Make sure that this property is reactive, ' +
  6371. 'either in the data option, or for class-based components, by ' +
  6372. 'initializing the property. ' +
  6373. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  6374. target
  6375. );
  6376. };
  6377. var warnReservedPrefix = function (target, key) {
  6378. warn(
  6379. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  6380. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  6381. 'prevent conflicts with Vue internals. ' +
  6382. 'See: https://vuejs.org/v2/api/#data',
  6383. target
  6384. );
  6385. };
  6386. var hasProxy =
  6387. typeof Proxy !== 'undefined' && isNative(Proxy);
  6388. if (hasProxy) {
  6389. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  6390. config.keyCodes = new Proxy(config.keyCodes, {
  6391. set: function set (target, key, value) {
  6392. if (isBuiltInModifier(key)) {
  6393. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  6394. return false
  6395. } else {
  6396. target[key] = value;
  6397. return true
  6398. }
  6399. }
  6400. });
  6401. }
  6402. var hasHandler = {
  6403. has: function has (target, key) {
  6404. var has = key in target;
  6405. var isAllowed = allowedGlobals(key) ||
  6406. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  6407. if (!has && !isAllowed) {
  6408. if (key in target.$data) { warnReservedPrefix(target, key); }
  6409. else { warnNonPresent(target, key); }
  6410. }
  6411. return has || !isAllowed
  6412. }
  6413. };
  6414. var getHandler = {
  6415. get: function get (target, key) {
  6416. if (typeof key === 'string' && !(key in target)) {
  6417. if (key in target.$data) { warnReservedPrefix(target, key); }
  6418. else { warnNonPresent(target, key); }
  6419. }
  6420. return target[key]
  6421. }
  6422. };
  6423. initProxy = function initProxy (vm) {
  6424. if (hasProxy) {
  6425. // determine which proxy handler to use
  6426. var options = vm.$options;
  6427. var handlers = options.render && options.render._withStripped
  6428. ? getHandler
  6429. : hasHandler;
  6430. vm._renderProxy = new Proxy(vm, handlers);
  6431. } else {
  6432. vm._renderProxy = vm;
  6433. }
  6434. };
  6435. }
  6436. /* */
  6437. var seenObjects = new _Set();
  6438. /**
  6439. * Recursively traverse an object to evoke all converted
  6440. * getters, so that every nested property inside the object
  6441. * is collected as a "deep" dependency.
  6442. */
  6443. function traverse (val) {
  6444. _traverse(val, seenObjects);
  6445. seenObjects.clear();
  6446. }
  6447. function _traverse (val, seen) {
  6448. var i, keys;
  6449. var isA = Array.isArray(val);
  6450. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  6451. return
  6452. }
  6453. if (val.__ob__) {
  6454. var depId = val.__ob__.dep.id;
  6455. if (seen.has(depId)) {
  6456. return
  6457. }
  6458. seen.add(depId);
  6459. }
  6460. if (isA) {
  6461. i = val.length;
  6462. while (i--) { _traverse(val[i], seen); }
  6463. } else {
  6464. keys = Object.keys(val);
  6465. i = keys.length;
  6466. while (i--) { _traverse(val[keys[i]], seen); }
  6467. }
  6468. }
  6469. var mark;
  6470. var measure;
  6471. if (true) {
  6472. var perf = inBrowser && window.performance;
  6473. /* istanbul ignore if */
  6474. if (
  6475. perf &&
  6476. perf.mark &&
  6477. perf.measure &&
  6478. perf.clearMarks &&
  6479. perf.clearMeasures
  6480. ) {
  6481. mark = function (tag) { return perf.mark(tag); };
  6482. measure = function (name, startTag, endTag) {
  6483. perf.measure(name, startTag, endTag);
  6484. perf.clearMarks(startTag);
  6485. perf.clearMarks(endTag);
  6486. // perf.clearMeasures(name)
  6487. };
  6488. }
  6489. }
  6490. /* */
  6491. var normalizeEvent = cached(function (name) {
  6492. var passive = name.charAt(0) === '&';
  6493. name = passive ? name.slice(1) : name;
  6494. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  6495. name = once$$1 ? name.slice(1) : name;
  6496. var capture = name.charAt(0) === '!';
  6497. name = capture ? name.slice(1) : name;
  6498. return {
  6499. name: name,
  6500. once: once$$1,
  6501. capture: capture,
  6502. passive: passive
  6503. }
  6504. });
  6505. function createFnInvoker (fns, vm) {
  6506. function invoker () {
  6507. var arguments$1 = arguments;
  6508. var fns = invoker.fns;
  6509. if (Array.isArray(fns)) {
  6510. var cloned = fns.slice();
  6511. for (var i = 0; i < cloned.length; i++) {
  6512. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  6513. }
  6514. } else {
  6515. // return handler return value for single handlers
  6516. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  6517. }
  6518. }
  6519. invoker.fns = fns;
  6520. return invoker
  6521. }
  6522. function updateListeners (
  6523. on,
  6524. oldOn,
  6525. add,
  6526. remove$$1,
  6527. createOnceHandler,
  6528. vm
  6529. ) {
  6530. var name, def$$1, cur, old, event;
  6531. for (name in on) {
  6532. def$$1 = cur = on[name];
  6533. old = oldOn[name];
  6534. event = normalizeEvent(name);
  6535. if (isUndef(cur)) {
  6536. true && warn(
  6537. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  6538. vm
  6539. );
  6540. } else if (isUndef(old)) {
  6541. if (isUndef(cur.fns)) {
  6542. cur = on[name] = createFnInvoker(cur, vm);
  6543. }
  6544. if (isTrue(event.once)) {
  6545. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  6546. }
  6547. add(event.name, cur, event.capture, event.passive, event.params);
  6548. } else if (cur !== old) {
  6549. old.fns = cur;
  6550. on[name] = old;
  6551. }
  6552. }
  6553. for (name in oldOn) {
  6554. if (isUndef(on[name])) {
  6555. event = normalizeEvent(name);
  6556. remove$$1(event.name, oldOn[name], event.capture);
  6557. }
  6558. }
  6559. }
  6560. /* */
  6561. /* */
  6562. // fixed by xxxxxx (mp properties)
  6563. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  6564. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  6565. if (isUndef(propOptions)) {
  6566. return res
  6567. }
  6568. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  6569. var attrs = data.attrs;
  6570. var props = data.props;
  6571. if (isDef(attrs) || isDef(props)) {
  6572. for (var key in propOptions) {
  6573. var altKey = hyphenate(key);
  6574. var result = checkProp(res, props, key, altKey, true) ||
  6575. checkProp(res, attrs, key, altKey, false);
  6576. // externalClass
  6577. if (
  6578. result &&
  6579. res[key] &&
  6580. externalClasses.indexOf(altKey) !== -1 &&
  6581. context[camelize(res[key])]
  6582. ) {
  6583. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  6584. res[key] = context[camelize(res[key])];
  6585. }
  6586. }
  6587. }
  6588. return res
  6589. }
  6590. function extractPropsFromVNodeData (
  6591. data,
  6592. Ctor,
  6593. tag,
  6594. context// fixed by xxxxxx
  6595. ) {
  6596. // we are only extracting raw values here.
  6597. // validation and default values are handled in the child
  6598. // component itself.
  6599. var propOptions = Ctor.options.props;
  6600. if (isUndef(propOptions)) {
  6601. // fixed by xxxxxx
  6602. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  6603. }
  6604. var res = {};
  6605. var attrs = data.attrs;
  6606. var props = data.props;
  6607. if (isDef(attrs) || isDef(props)) {
  6608. for (var key in propOptions) {
  6609. var altKey = hyphenate(key);
  6610. if (true) {
  6611. var keyInLowerCase = key.toLowerCase();
  6612. if (
  6613. key !== keyInLowerCase &&
  6614. attrs && hasOwn(attrs, keyInLowerCase)
  6615. ) {
  6616. tip(
  6617. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  6618. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  6619. " \"" + key + "\". " +
  6620. "Note that HTML attributes are case-insensitive and camelCased " +
  6621. "props need to use their kebab-case equivalents when using in-DOM " +
  6622. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  6623. );
  6624. }
  6625. }
  6626. checkProp(res, props, key, altKey, true) ||
  6627. checkProp(res, attrs, key, altKey, false);
  6628. }
  6629. }
  6630. // fixed by xxxxxx
  6631. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  6632. }
  6633. function checkProp (
  6634. res,
  6635. hash,
  6636. key,
  6637. altKey,
  6638. preserve
  6639. ) {
  6640. if (isDef(hash)) {
  6641. if (hasOwn(hash, key)) {
  6642. res[key] = hash[key];
  6643. if (!preserve) {
  6644. delete hash[key];
  6645. }
  6646. return true
  6647. } else if (hasOwn(hash, altKey)) {
  6648. res[key] = hash[altKey];
  6649. if (!preserve) {
  6650. delete hash[altKey];
  6651. }
  6652. return true
  6653. }
  6654. }
  6655. return false
  6656. }
  6657. /* */
  6658. // The template compiler attempts to minimize the need for normalization by
  6659. // statically analyzing the template at compile time.
  6660. //
  6661. // For plain HTML markup, normalization can be completely skipped because the
  6662. // generated render function is guaranteed to return Array<VNode>. There are
  6663. // two cases where extra normalization is needed:
  6664. // 1. When the children contains components - because a functional component
  6665. // may return an Array instead of a single root. In this case, just a simple
  6666. // normalization is needed - if any child is an Array, we flatten the whole
  6667. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  6668. // because functional components already normalize their own children.
  6669. function simpleNormalizeChildren (children) {
  6670. for (var i = 0; i < children.length; i++) {
  6671. if (Array.isArray(children[i])) {
  6672. return Array.prototype.concat.apply([], children)
  6673. }
  6674. }
  6675. return children
  6676. }
  6677. // 2. When the children contains constructs that always generated nested Arrays,
  6678. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  6679. // with hand-written render functions / JSX. In such cases a full normalization
  6680. // is needed to cater to all possible types of children values.
  6681. function normalizeChildren (children) {
  6682. return isPrimitive(children)
  6683. ? [createTextVNode(children)]
  6684. : Array.isArray(children)
  6685. ? normalizeArrayChildren(children)
  6686. : undefined
  6687. }
  6688. function isTextNode (node) {
  6689. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  6690. }
  6691. function normalizeArrayChildren (children, nestedIndex) {
  6692. var res = [];
  6693. var i, c, lastIndex, last;
  6694. for (i = 0; i < children.length; i++) {
  6695. c = children[i];
  6696. if (isUndef(c) || typeof c === 'boolean') { continue }
  6697. lastIndex = res.length - 1;
  6698. last = res[lastIndex];
  6699. // nested
  6700. if (Array.isArray(c)) {
  6701. if (c.length > 0) {
  6702. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  6703. // merge adjacent text nodes
  6704. if (isTextNode(c[0]) && isTextNode(last)) {
  6705. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  6706. c.shift();
  6707. }
  6708. res.push.apply(res, c);
  6709. }
  6710. } else if (isPrimitive(c)) {
  6711. if (isTextNode(last)) {
  6712. // merge adjacent text nodes
  6713. // this is necessary for SSR hydration because text nodes are
  6714. // essentially merged when rendered to HTML strings
  6715. res[lastIndex] = createTextVNode(last.text + c);
  6716. } else if (c !== '') {
  6717. // convert primitive to vnode
  6718. res.push(createTextVNode(c));
  6719. }
  6720. } else {
  6721. if (isTextNode(c) && isTextNode(last)) {
  6722. // merge adjacent text nodes
  6723. res[lastIndex] = createTextVNode(last.text + c.text);
  6724. } else {
  6725. // default key for nested array children (likely generated by v-for)
  6726. if (isTrue(children._isVList) &&
  6727. isDef(c.tag) &&
  6728. isUndef(c.key) &&
  6729. isDef(nestedIndex)) {
  6730. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  6731. }
  6732. res.push(c);
  6733. }
  6734. }
  6735. }
  6736. return res
  6737. }
  6738. /* */
  6739. function initProvide (vm) {
  6740. var provide = vm.$options.provide;
  6741. if (provide) {
  6742. vm._provided = typeof provide === 'function'
  6743. ? provide.call(vm)
  6744. : provide;
  6745. }
  6746. }
  6747. function initInjections (vm) {
  6748. var result = resolveInject(vm.$options.inject, vm);
  6749. if (result) {
  6750. toggleObserving(false);
  6751. Object.keys(result).forEach(function (key) {
  6752. /* istanbul ignore else */
  6753. if (true) {
  6754. defineReactive$$1(vm, key, result[key], function () {
  6755. warn(
  6756. "Avoid mutating an injected value directly since the changes will be " +
  6757. "overwritten whenever the provided component re-renders. " +
  6758. "injection being mutated: \"" + key + "\"",
  6759. vm
  6760. );
  6761. });
  6762. } else {}
  6763. });
  6764. toggleObserving(true);
  6765. }
  6766. }
  6767. function resolveInject (inject, vm) {
  6768. if (inject) {
  6769. // inject is :any because flow is not smart enough to figure out cached
  6770. var result = Object.create(null);
  6771. var keys = hasSymbol
  6772. ? Reflect.ownKeys(inject)
  6773. : Object.keys(inject);
  6774. for (var i = 0; i < keys.length; i++) {
  6775. var key = keys[i];
  6776. // #6574 in case the inject object is observed...
  6777. if (key === '__ob__') { continue }
  6778. var provideKey = inject[key].from;
  6779. var source = vm;
  6780. while (source) {
  6781. if (source._provided && hasOwn(source._provided, provideKey)) {
  6782. result[key] = source._provided[provideKey];
  6783. break
  6784. }
  6785. source = source.$parent;
  6786. }
  6787. if (!source) {
  6788. if ('default' in inject[key]) {
  6789. var provideDefault = inject[key].default;
  6790. result[key] = typeof provideDefault === 'function'
  6791. ? provideDefault.call(vm)
  6792. : provideDefault;
  6793. } else if (true) {
  6794. warn(("Injection \"" + key + "\" not found"), vm);
  6795. }
  6796. }
  6797. }
  6798. return result
  6799. }
  6800. }
  6801. /* */
  6802. /**
  6803. * Runtime helper for resolving raw children VNodes into a slot object.
  6804. */
  6805. function resolveSlots (
  6806. children,
  6807. context
  6808. ) {
  6809. if (!children || !children.length) {
  6810. return {}
  6811. }
  6812. var slots = {};
  6813. for (var i = 0, l = children.length; i < l; i++) {
  6814. var child = children[i];
  6815. var data = child.data;
  6816. // remove slot attribute if the node is resolved as a Vue slot node
  6817. if (data && data.attrs && data.attrs.slot) {
  6818. delete data.attrs.slot;
  6819. }
  6820. // named slots should only be respected if the vnode was rendered in the
  6821. // same context.
  6822. if ((child.context === context || child.fnContext === context) &&
  6823. data && data.slot != null
  6824. ) {
  6825. var name = data.slot;
  6826. var slot = (slots[name] || (slots[name] = []));
  6827. if (child.tag === 'template') {
  6828. slot.push.apply(slot, child.children || []);
  6829. } else {
  6830. slot.push(child);
  6831. }
  6832. } else {
  6833. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  6834. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  6835. (slots['page'] || (slots['page'] = [])).push(child);
  6836. }else{
  6837. (slots.default || (slots.default = [])).push(child);
  6838. }
  6839. }
  6840. }
  6841. // ignore slots that contains only whitespace
  6842. for (var name$1 in slots) {
  6843. if (slots[name$1].every(isWhitespace)) {
  6844. delete slots[name$1];
  6845. }
  6846. }
  6847. return slots
  6848. }
  6849. function isWhitespace (node) {
  6850. return (node.isComment && !node.asyncFactory) || node.text === ' '
  6851. }
  6852. /* */
  6853. function normalizeScopedSlots (
  6854. slots,
  6855. normalSlots,
  6856. prevSlots
  6857. ) {
  6858. var res;
  6859. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  6860. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  6861. var key = slots && slots.$key;
  6862. if (!slots) {
  6863. res = {};
  6864. } else if (slots._normalized) {
  6865. // fast path 1: child component re-render only, parent did not change
  6866. return slots._normalized
  6867. } else if (
  6868. isStable &&
  6869. prevSlots &&
  6870. prevSlots !== emptyObject &&
  6871. key === prevSlots.$key &&
  6872. !hasNormalSlots &&
  6873. !prevSlots.$hasNormal
  6874. ) {
  6875. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  6876. // only need to normalize once
  6877. return prevSlots
  6878. } else {
  6879. res = {};
  6880. for (var key$1 in slots) {
  6881. if (slots[key$1] && key$1[0] !== '$') {
  6882. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  6883. }
  6884. }
  6885. }
  6886. // expose normal slots on scopedSlots
  6887. for (var key$2 in normalSlots) {
  6888. if (!(key$2 in res)) {
  6889. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  6890. }
  6891. }
  6892. // avoriaz seems to mock a non-extensible $scopedSlots object
  6893. // and when that is passed down this would cause an error
  6894. if (slots && Object.isExtensible(slots)) {
  6895. (slots)._normalized = res;
  6896. }
  6897. def(res, '$stable', isStable);
  6898. def(res, '$key', key);
  6899. def(res, '$hasNormal', hasNormalSlots);
  6900. return res
  6901. }
  6902. function normalizeScopedSlot(normalSlots, key, fn) {
  6903. var normalized = function () {
  6904. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  6905. res = res && typeof res === 'object' && !Array.isArray(res)
  6906. ? [res] // single vnode
  6907. : normalizeChildren(res);
  6908. return res && (
  6909. res.length === 0 ||
  6910. (res.length === 1 && res[0].isComment) // #9658
  6911. ) ? undefined
  6912. : res
  6913. };
  6914. // this is a slot using the new v-slot syntax without scope. although it is
  6915. // compiled as a scoped slot, render fn users would expect it to be present
  6916. // on this.$slots because the usage is semantically a normal slot.
  6917. if (fn.proxy) {
  6918. Object.defineProperty(normalSlots, key, {
  6919. get: normalized,
  6920. enumerable: true,
  6921. configurable: true
  6922. });
  6923. }
  6924. return normalized
  6925. }
  6926. function proxyNormalSlot(slots, key) {
  6927. return function () { return slots[key]; }
  6928. }
  6929. /* */
  6930. /**
  6931. * Runtime helper for rendering v-for lists.
  6932. */
  6933. function renderList (
  6934. val,
  6935. render
  6936. ) {
  6937. var ret, i, l, keys, key;
  6938. if (Array.isArray(val) || typeof val === 'string') {
  6939. ret = new Array(val.length);
  6940. for (i = 0, l = val.length; i < l; i++) {
  6941. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  6942. }
  6943. } else if (typeof val === 'number') {
  6944. ret = new Array(val);
  6945. for (i = 0; i < val; i++) {
  6946. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  6947. }
  6948. } else if (isObject(val)) {
  6949. if (hasSymbol && val[Symbol.iterator]) {
  6950. ret = [];
  6951. var iterator = val[Symbol.iterator]();
  6952. var result = iterator.next();
  6953. while (!result.done) {
  6954. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  6955. result = iterator.next();
  6956. }
  6957. } else {
  6958. keys = Object.keys(val);
  6959. ret = new Array(keys.length);
  6960. for (i = 0, l = keys.length; i < l; i++) {
  6961. key = keys[i];
  6962. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  6963. }
  6964. }
  6965. }
  6966. if (!isDef(ret)) {
  6967. ret = [];
  6968. }
  6969. (ret)._isVList = true;
  6970. return ret
  6971. }
  6972. /* */
  6973. /**
  6974. * Runtime helper for rendering <slot>
  6975. */
  6976. function renderSlot (
  6977. name,
  6978. fallback,
  6979. props,
  6980. bindObject
  6981. ) {
  6982. var scopedSlotFn = this.$scopedSlots[name];
  6983. var nodes;
  6984. if (scopedSlotFn) { // scoped slot
  6985. props = props || {};
  6986. if (bindObject) {
  6987. if ( true && !isObject(bindObject)) {
  6988. warn(
  6989. 'slot v-bind without argument expects an Object',
  6990. this
  6991. );
  6992. }
  6993. props = extend(extend({}, bindObject), props);
  6994. }
  6995. // fixed by xxxxxx app-plus scopedSlot
  6996. nodes = scopedSlotFn(props, this, props._i) || fallback;
  6997. } else {
  6998. nodes = this.$slots[name] || fallback;
  6999. }
  7000. var target = props && props.slot;
  7001. if (target) {
  7002. return this.$createElement('template', { slot: target }, nodes)
  7003. } else {
  7004. return nodes
  7005. }
  7006. }
  7007. /* */
  7008. /**
  7009. * Runtime helper for resolving filters
  7010. */
  7011. function resolveFilter (id) {
  7012. return resolveAsset(this.$options, 'filters', id, true) || identity
  7013. }
  7014. /* */
  7015. function isKeyNotMatch (expect, actual) {
  7016. if (Array.isArray(expect)) {
  7017. return expect.indexOf(actual) === -1
  7018. } else {
  7019. return expect !== actual
  7020. }
  7021. }
  7022. /**
  7023. * Runtime helper for checking keyCodes from config.
  7024. * exposed as Vue.prototype._k
  7025. * passing in eventKeyName as last argument separately for backwards compat
  7026. */
  7027. function checkKeyCodes (
  7028. eventKeyCode,
  7029. key,
  7030. builtInKeyCode,
  7031. eventKeyName,
  7032. builtInKeyName
  7033. ) {
  7034. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  7035. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  7036. return isKeyNotMatch(builtInKeyName, eventKeyName)
  7037. } else if (mappedKeyCode) {
  7038. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  7039. } else if (eventKeyName) {
  7040. return hyphenate(eventKeyName) !== key
  7041. }
  7042. }
  7043. /* */
  7044. /**
  7045. * Runtime helper for merging v-bind="object" into a VNode's data.
  7046. */
  7047. function bindObjectProps (
  7048. data,
  7049. tag,
  7050. value,
  7051. asProp,
  7052. isSync
  7053. ) {
  7054. if (value) {
  7055. if (!isObject(value)) {
  7056. true && warn(
  7057. 'v-bind without argument expects an Object or Array value',
  7058. this
  7059. );
  7060. } else {
  7061. if (Array.isArray(value)) {
  7062. value = toObject(value);
  7063. }
  7064. var hash;
  7065. var loop = function ( key ) {
  7066. if (
  7067. key === 'class' ||
  7068. key === 'style' ||
  7069. isReservedAttribute(key)
  7070. ) {
  7071. hash = data;
  7072. } else {
  7073. var type = data.attrs && data.attrs.type;
  7074. hash = asProp || config.mustUseProp(tag, type, key)
  7075. ? data.domProps || (data.domProps = {})
  7076. : data.attrs || (data.attrs = {});
  7077. }
  7078. var camelizedKey = camelize(key);
  7079. var hyphenatedKey = hyphenate(key);
  7080. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  7081. hash[key] = value[key];
  7082. if (isSync) {
  7083. var on = data.on || (data.on = {});
  7084. on[("update:" + key)] = function ($event) {
  7085. value[key] = $event;
  7086. };
  7087. }
  7088. }
  7089. };
  7090. for (var key in value) loop( key );
  7091. }
  7092. }
  7093. return data
  7094. }
  7095. /* */
  7096. /**
  7097. * Runtime helper for rendering static trees.
  7098. */
  7099. function renderStatic (
  7100. index,
  7101. isInFor
  7102. ) {
  7103. var cached = this._staticTrees || (this._staticTrees = []);
  7104. var tree = cached[index];
  7105. // if has already-rendered static tree and not inside v-for,
  7106. // we can reuse the same tree.
  7107. if (tree && !isInFor) {
  7108. return tree
  7109. }
  7110. // otherwise, render a fresh tree.
  7111. tree = cached[index] = this.$options.staticRenderFns[index].call(
  7112. this._renderProxy,
  7113. null,
  7114. this // for render fns generated for functional component templates
  7115. );
  7116. markStatic(tree, ("__static__" + index), false);
  7117. return tree
  7118. }
  7119. /**
  7120. * Runtime helper for v-once.
  7121. * Effectively it means marking the node as static with a unique key.
  7122. */
  7123. function markOnce (
  7124. tree,
  7125. index,
  7126. key
  7127. ) {
  7128. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  7129. return tree
  7130. }
  7131. function markStatic (
  7132. tree,
  7133. key,
  7134. isOnce
  7135. ) {
  7136. if (Array.isArray(tree)) {
  7137. for (var i = 0; i < tree.length; i++) {
  7138. if (tree[i] && typeof tree[i] !== 'string') {
  7139. markStaticNode(tree[i], (key + "_" + i), isOnce);
  7140. }
  7141. }
  7142. } else {
  7143. markStaticNode(tree, key, isOnce);
  7144. }
  7145. }
  7146. function markStaticNode (node, key, isOnce) {
  7147. node.isStatic = true;
  7148. node.key = key;
  7149. node.isOnce = isOnce;
  7150. }
  7151. /* */
  7152. function bindObjectListeners (data, value) {
  7153. if (value) {
  7154. if (!isPlainObject(value)) {
  7155. true && warn(
  7156. 'v-on without argument expects an Object value',
  7157. this
  7158. );
  7159. } else {
  7160. var on = data.on = data.on ? extend({}, data.on) : {};
  7161. for (var key in value) {
  7162. var existing = on[key];
  7163. var ours = value[key];
  7164. on[key] = existing ? [].concat(existing, ours) : ours;
  7165. }
  7166. }
  7167. }
  7168. return data
  7169. }
  7170. /* */
  7171. function resolveScopedSlots (
  7172. fns, // see flow/vnode
  7173. res,
  7174. // the following are added in 2.6
  7175. hasDynamicKeys,
  7176. contentHashKey
  7177. ) {
  7178. res = res || { $stable: !hasDynamicKeys };
  7179. for (var i = 0; i < fns.length; i++) {
  7180. var slot = fns[i];
  7181. if (Array.isArray(slot)) {
  7182. resolveScopedSlots(slot, res, hasDynamicKeys);
  7183. } else if (slot) {
  7184. // marker for reverse proxying v-slot without scope on this.$slots
  7185. if (slot.proxy) {
  7186. slot.fn.proxy = true;
  7187. }
  7188. res[slot.key] = slot.fn;
  7189. }
  7190. }
  7191. if (contentHashKey) {
  7192. (res).$key = contentHashKey;
  7193. }
  7194. return res
  7195. }
  7196. /* */
  7197. function bindDynamicKeys (baseObj, values) {
  7198. for (var i = 0; i < values.length; i += 2) {
  7199. var key = values[i];
  7200. if (typeof key === 'string' && key) {
  7201. baseObj[values[i]] = values[i + 1];
  7202. } else if ( true && key !== '' && key !== null) {
  7203. // null is a special value for explicitly removing a binding
  7204. warn(
  7205. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  7206. this
  7207. );
  7208. }
  7209. }
  7210. return baseObj
  7211. }
  7212. // helper to dynamically append modifier runtime markers to event names.
  7213. // ensure only append when value is already string, otherwise it will be cast
  7214. // to string and cause the type check to miss.
  7215. function prependModifier (value, symbol) {
  7216. return typeof value === 'string' ? symbol + value : value
  7217. }
  7218. /* */
  7219. function installRenderHelpers (target) {
  7220. target._o = markOnce;
  7221. target._n = toNumber;
  7222. target._s = toString;
  7223. target._l = renderList;
  7224. target._t = renderSlot;
  7225. target._q = looseEqual;
  7226. target._i = looseIndexOf;
  7227. target._m = renderStatic;
  7228. target._f = resolveFilter;
  7229. target._k = checkKeyCodes;
  7230. target._b = bindObjectProps;
  7231. target._v = createTextVNode;
  7232. target._e = createEmptyVNode;
  7233. target._u = resolveScopedSlots;
  7234. target._g = bindObjectListeners;
  7235. target._d = bindDynamicKeys;
  7236. target._p = prependModifier;
  7237. }
  7238. /* */
  7239. function FunctionalRenderContext (
  7240. data,
  7241. props,
  7242. children,
  7243. parent,
  7244. Ctor
  7245. ) {
  7246. var this$1 = this;
  7247. var options = Ctor.options;
  7248. // ensure the createElement function in functional components
  7249. // gets a unique context - this is necessary for correct named slot check
  7250. var contextVm;
  7251. if (hasOwn(parent, '_uid')) {
  7252. contextVm = Object.create(parent);
  7253. // $flow-disable-line
  7254. contextVm._original = parent;
  7255. } else {
  7256. // the context vm passed in is a functional context as well.
  7257. // in this case we want to make sure we are able to get a hold to the
  7258. // real context instance.
  7259. contextVm = parent;
  7260. // $flow-disable-line
  7261. parent = parent._original;
  7262. }
  7263. var isCompiled = isTrue(options._compiled);
  7264. var needNormalization = !isCompiled;
  7265. this.data = data;
  7266. this.props = props;
  7267. this.children = children;
  7268. this.parent = parent;
  7269. this.listeners = data.on || emptyObject;
  7270. this.injections = resolveInject(options.inject, parent);
  7271. this.slots = function () {
  7272. if (!this$1.$slots) {
  7273. normalizeScopedSlots(
  7274. data.scopedSlots,
  7275. this$1.$slots = resolveSlots(children, parent)
  7276. );
  7277. }
  7278. return this$1.$slots
  7279. };
  7280. Object.defineProperty(this, 'scopedSlots', ({
  7281. enumerable: true,
  7282. get: function get () {
  7283. return normalizeScopedSlots(data.scopedSlots, this.slots())
  7284. }
  7285. }));
  7286. // support for compiled functional template
  7287. if (isCompiled) {
  7288. // exposing $options for renderStatic()
  7289. this.$options = options;
  7290. // pre-resolve slots for renderSlot()
  7291. this.$slots = this.slots();
  7292. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  7293. }
  7294. if (options._scopeId) {
  7295. this._c = function (a, b, c, d) {
  7296. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  7297. if (vnode && !Array.isArray(vnode)) {
  7298. vnode.fnScopeId = options._scopeId;
  7299. vnode.fnContext = parent;
  7300. }
  7301. return vnode
  7302. };
  7303. } else {
  7304. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  7305. }
  7306. }
  7307. installRenderHelpers(FunctionalRenderContext.prototype);
  7308. function createFunctionalComponent (
  7309. Ctor,
  7310. propsData,
  7311. data,
  7312. contextVm,
  7313. children
  7314. ) {
  7315. var options = Ctor.options;
  7316. var props = {};
  7317. var propOptions = options.props;
  7318. if (isDef(propOptions)) {
  7319. for (var key in propOptions) {
  7320. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  7321. }
  7322. } else {
  7323. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  7324. if (isDef(data.props)) { mergeProps(props, data.props); }
  7325. }
  7326. var renderContext = new FunctionalRenderContext(
  7327. data,
  7328. props,
  7329. children,
  7330. contextVm,
  7331. Ctor
  7332. );
  7333. var vnode = options.render.call(null, renderContext._c, renderContext);
  7334. if (vnode instanceof VNode) {
  7335. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  7336. } else if (Array.isArray(vnode)) {
  7337. var vnodes = normalizeChildren(vnode) || [];
  7338. var res = new Array(vnodes.length);
  7339. for (var i = 0; i < vnodes.length; i++) {
  7340. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  7341. }
  7342. return res
  7343. }
  7344. }
  7345. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  7346. // #7817 clone node before setting fnContext, otherwise if the node is reused
  7347. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  7348. // that should not be matched to match.
  7349. var clone = cloneVNode(vnode);
  7350. clone.fnContext = contextVm;
  7351. clone.fnOptions = options;
  7352. if (true) {
  7353. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  7354. }
  7355. if (data.slot) {
  7356. (clone.data || (clone.data = {})).slot = data.slot;
  7357. }
  7358. return clone
  7359. }
  7360. function mergeProps (to, from) {
  7361. for (var key in from) {
  7362. to[camelize(key)] = from[key];
  7363. }
  7364. }
  7365. /* */
  7366. /* */
  7367. /* */
  7368. /* */
  7369. // inline hooks to be invoked on component VNodes during patch
  7370. var componentVNodeHooks = {
  7371. init: function init (vnode, hydrating) {
  7372. if (
  7373. vnode.componentInstance &&
  7374. !vnode.componentInstance._isDestroyed &&
  7375. vnode.data.keepAlive
  7376. ) {
  7377. // kept-alive components, treat as a patch
  7378. var mountedNode = vnode; // work around flow
  7379. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  7380. } else {
  7381. var child = vnode.componentInstance = createComponentInstanceForVnode(
  7382. vnode,
  7383. activeInstance
  7384. );
  7385. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  7386. }
  7387. },
  7388. prepatch: function prepatch (oldVnode, vnode) {
  7389. var options = vnode.componentOptions;
  7390. var child = vnode.componentInstance = oldVnode.componentInstance;
  7391. updateChildComponent(
  7392. child,
  7393. options.propsData, // updated props
  7394. options.listeners, // updated listeners
  7395. vnode, // new parent vnode
  7396. options.children // new children
  7397. );
  7398. },
  7399. insert: function insert (vnode) {
  7400. var context = vnode.context;
  7401. var componentInstance = vnode.componentInstance;
  7402. if (!componentInstance._isMounted) {
  7403. callHook(componentInstance, 'onServiceCreated');
  7404. callHook(componentInstance, 'onServiceAttached');
  7405. componentInstance._isMounted = true;
  7406. callHook(componentInstance, 'mounted');
  7407. }
  7408. if (vnode.data.keepAlive) {
  7409. if (context._isMounted) {
  7410. // vue-router#1212
  7411. // During updates, a kept-alive component's child components may
  7412. // change, so directly walking the tree here may call activated hooks
  7413. // on incorrect children. Instead we push them into a queue which will
  7414. // be processed after the whole patch process ended.
  7415. queueActivatedComponent(componentInstance);
  7416. } else {
  7417. activateChildComponent(componentInstance, true /* direct */);
  7418. }
  7419. }
  7420. },
  7421. destroy: function destroy (vnode) {
  7422. var componentInstance = vnode.componentInstance;
  7423. if (!componentInstance._isDestroyed) {
  7424. if (!vnode.data.keepAlive) {
  7425. componentInstance.$destroy();
  7426. } else {
  7427. deactivateChildComponent(componentInstance, true /* direct */);
  7428. }
  7429. }
  7430. }
  7431. };
  7432. var hooksToMerge = Object.keys(componentVNodeHooks);
  7433. function createComponent (
  7434. Ctor,
  7435. data,
  7436. context,
  7437. children,
  7438. tag
  7439. ) {
  7440. if (isUndef(Ctor)) {
  7441. return
  7442. }
  7443. var baseCtor = context.$options._base;
  7444. // plain options object: turn it into a constructor
  7445. if (isObject(Ctor)) {
  7446. Ctor = baseCtor.extend(Ctor);
  7447. }
  7448. // if at this stage it's not a constructor or an async component factory,
  7449. // reject.
  7450. if (typeof Ctor !== 'function') {
  7451. if (true) {
  7452. warn(("Invalid Component definition: " + (String(Ctor))), context);
  7453. }
  7454. return
  7455. }
  7456. // async component
  7457. var asyncFactory;
  7458. if (isUndef(Ctor.cid)) {
  7459. asyncFactory = Ctor;
  7460. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  7461. if (Ctor === undefined) {
  7462. // return a placeholder node for async component, which is rendered
  7463. // as a comment node but preserves all the raw information for the node.
  7464. // the information will be used for async server-rendering and hydration.
  7465. return createAsyncPlaceholder(
  7466. asyncFactory,
  7467. data,
  7468. context,
  7469. children,
  7470. tag
  7471. )
  7472. }
  7473. }
  7474. data = data || {};
  7475. // resolve constructor options in case global mixins are applied after
  7476. // component constructor creation
  7477. resolveConstructorOptions(Ctor);
  7478. // transform component v-model data into props & events
  7479. if (isDef(data.model)) {
  7480. transformModel(Ctor.options, data);
  7481. }
  7482. // extract props
  7483. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  7484. // functional component
  7485. if (isTrue(Ctor.options.functional)) {
  7486. return createFunctionalComponent(Ctor, propsData, data, context, children)
  7487. }
  7488. // extract listeners, since these needs to be treated as
  7489. // child component listeners instead of DOM listeners
  7490. var listeners = data.on;
  7491. // replace with listeners with .native modifier
  7492. // so it gets processed during parent component patch.
  7493. data.on = data.nativeOn;
  7494. if (isTrue(Ctor.options.abstract)) {
  7495. // abstract components do not keep anything
  7496. // other than props & listeners & slot
  7497. // work around flow
  7498. var slot = data.slot;
  7499. data = {};
  7500. if (slot) {
  7501. data.slot = slot;
  7502. }
  7503. }
  7504. // install component management hooks onto the placeholder node
  7505. installComponentHooks(data);
  7506. // return a placeholder vnode
  7507. var name = Ctor.options.name || tag;
  7508. var vnode = new VNode(
  7509. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  7510. data, undefined, undefined, undefined, context,
  7511. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  7512. asyncFactory
  7513. );
  7514. return vnode
  7515. }
  7516. function createComponentInstanceForVnode (
  7517. vnode, // we know it's MountedComponentVNode but flow doesn't
  7518. parent // activeInstance in lifecycle state
  7519. ) {
  7520. var options = {
  7521. _isComponent: true,
  7522. _parentVnode: vnode,
  7523. parent: parent
  7524. };
  7525. // check inline-template render functions
  7526. var inlineTemplate = vnode.data.inlineTemplate;
  7527. if (isDef(inlineTemplate)) {
  7528. options.render = inlineTemplate.render;
  7529. options.staticRenderFns = inlineTemplate.staticRenderFns;
  7530. }
  7531. return new vnode.componentOptions.Ctor(options)
  7532. }
  7533. function installComponentHooks (data) {
  7534. var hooks = data.hook || (data.hook = {});
  7535. for (var i = 0; i < hooksToMerge.length; i++) {
  7536. var key = hooksToMerge[i];
  7537. var existing = hooks[key];
  7538. var toMerge = componentVNodeHooks[key];
  7539. if (existing !== toMerge && !(existing && existing._merged)) {
  7540. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  7541. }
  7542. }
  7543. }
  7544. function mergeHook$1 (f1, f2) {
  7545. var merged = function (a, b) {
  7546. // flow complains about extra args which is why we use any
  7547. f1(a, b);
  7548. f2(a, b);
  7549. };
  7550. merged._merged = true;
  7551. return merged
  7552. }
  7553. // transform component v-model info (value and callback) into
  7554. // prop and event handler respectively.
  7555. function transformModel (options, data) {
  7556. var prop = (options.model && options.model.prop) || 'value';
  7557. var event = (options.model && options.model.event) || 'input'
  7558. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  7559. var on = data.on || (data.on = {});
  7560. var existing = on[event];
  7561. var callback = data.model.callback;
  7562. if (isDef(existing)) {
  7563. if (
  7564. Array.isArray(existing)
  7565. ? existing.indexOf(callback) === -1
  7566. : existing !== callback
  7567. ) {
  7568. on[event] = [callback].concat(existing);
  7569. }
  7570. } else {
  7571. on[event] = callback;
  7572. }
  7573. }
  7574. /* */
  7575. var SIMPLE_NORMALIZE = 1;
  7576. var ALWAYS_NORMALIZE = 2;
  7577. // wrapper function for providing a more flexible interface
  7578. // without getting yelled at by flow
  7579. function createElement (
  7580. context,
  7581. tag,
  7582. data,
  7583. children,
  7584. normalizationType,
  7585. alwaysNormalize
  7586. ) {
  7587. if (Array.isArray(data) || isPrimitive(data)) {
  7588. normalizationType = children;
  7589. children = data;
  7590. data = undefined;
  7591. }
  7592. if (isTrue(alwaysNormalize)) {
  7593. normalizationType = ALWAYS_NORMALIZE;
  7594. }
  7595. return _createElement(context, tag, data, children, normalizationType)
  7596. }
  7597. function _createElement (
  7598. context,
  7599. tag,
  7600. data,
  7601. children,
  7602. normalizationType
  7603. ) {
  7604. if (isDef(data) && isDef((data).__ob__)) {
  7605. true && warn(
  7606. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  7607. 'Always create fresh vnode data objects in each render!',
  7608. context
  7609. );
  7610. return createEmptyVNode()
  7611. }
  7612. // object syntax in v-bind
  7613. if (isDef(data) && isDef(data.is)) {
  7614. tag = data.is;
  7615. }
  7616. if (!tag) {
  7617. // in case of component :is set to falsy value
  7618. return createEmptyVNode()
  7619. }
  7620. // warn against non-primitive key
  7621. if ( true &&
  7622. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  7623. ) {
  7624. {
  7625. warn(
  7626. 'Avoid using non-primitive value as key, ' +
  7627. 'use string/number value instead.',
  7628. context
  7629. );
  7630. }
  7631. }
  7632. // support single function children as default scoped slot
  7633. if (Array.isArray(children) &&
  7634. typeof children[0] === 'function'
  7635. ) {
  7636. data = data || {};
  7637. data.scopedSlots = { default: children[0] };
  7638. children.length = 0;
  7639. }
  7640. if (normalizationType === ALWAYS_NORMALIZE) {
  7641. children = normalizeChildren(children);
  7642. } else if (normalizationType === SIMPLE_NORMALIZE) {
  7643. children = simpleNormalizeChildren(children);
  7644. }
  7645. var vnode, ns;
  7646. if (typeof tag === 'string') {
  7647. var Ctor;
  7648. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  7649. if (config.isReservedTag(tag)) {
  7650. // platform built-in elements
  7651. if ( true && isDef(data) && isDef(data.nativeOn)) {
  7652. warn(
  7653. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  7654. context
  7655. );
  7656. }
  7657. vnode = new VNode(
  7658. config.parsePlatformTagName(tag), data, children,
  7659. undefined, undefined, context
  7660. );
  7661. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  7662. // component
  7663. vnode = createComponent(Ctor, data, context, children, tag);
  7664. } else {
  7665. // unknown or unlisted namespaced elements
  7666. // check at runtime because it may get assigned a namespace when its
  7667. // parent normalizes children
  7668. vnode = new VNode(
  7669. tag, data, children,
  7670. undefined, undefined, context
  7671. );
  7672. }
  7673. } else {
  7674. // direct component options / constructor
  7675. vnode = createComponent(tag, data, context, children);
  7676. }
  7677. if (Array.isArray(vnode)) {
  7678. return vnode
  7679. } else if (isDef(vnode)) {
  7680. if (isDef(ns)) { applyNS(vnode, ns); }
  7681. if (isDef(data)) { registerDeepBindings(data); }
  7682. return vnode
  7683. } else {
  7684. return createEmptyVNode()
  7685. }
  7686. }
  7687. function applyNS (vnode, ns, force) {
  7688. vnode.ns = ns;
  7689. if (vnode.tag === 'foreignObject') {
  7690. // use default namespace inside foreignObject
  7691. ns = undefined;
  7692. force = true;
  7693. }
  7694. if (isDef(vnode.children)) {
  7695. for (var i = 0, l = vnode.children.length; i < l; i++) {
  7696. var child = vnode.children[i];
  7697. if (isDef(child.tag) && (
  7698. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  7699. applyNS(child, ns, force);
  7700. }
  7701. }
  7702. }
  7703. }
  7704. // ref #5318
  7705. // necessary to ensure parent re-render when deep bindings like :style and
  7706. // :class are used on slot nodes
  7707. function registerDeepBindings (data) {
  7708. if (isObject(data.style)) {
  7709. traverse(data.style);
  7710. }
  7711. if (isObject(data.class)) {
  7712. traverse(data.class);
  7713. }
  7714. }
  7715. /* */
  7716. function initRender (vm) {
  7717. vm._vnode = null; // the root of the child tree
  7718. vm._staticTrees = null; // v-once cached trees
  7719. var options = vm.$options;
  7720. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  7721. var renderContext = parentVnode && parentVnode.context;
  7722. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  7723. vm.$scopedSlots = emptyObject;
  7724. // bind the createElement fn to this instance
  7725. // so that we get proper render context inside it.
  7726. // args order: tag, data, children, normalizationType, alwaysNormalize
  7727. // internal version is used by render functions compiled from templates
  7728. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  7729. // normalization is always applied for the public version, used in
  7730. // user-written render functions.
  7731. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  7732. // $attrs & $listeners are exposed for easier HOC creation.
  7733. // they need to be reactive so that HOCs using them are always updated
  7734. var parentData = parentVnode && parentVnode.data;
  7735. /* istanbul ignore else */
  7736. if (true) {
  7737. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  7738. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  7739. }, true);
  7740. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  7741. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  7742. }, true);
  7743. } else {}
  7744. }
  7745. var currentRenderingInstance = null;
  7746. function renderMixin (Vue) {
  7747. // install runtime convenience helpers
  7748. installRenderHelpers(Vue.prototype);
  7749. Vue.prototype.$nextTick = function (fn) {
  7750. return nextTick(fn, this)
  7751. };
  7752. Vue.prototype._render = function () {
  7753. var vm = this;
  7754. var ref = vm.$options;
  7755. var render = ref.render;
  7756. var _parentVnode = ref._parentVnode;
  7757. if (_parentVnode) {
  7758. vm.$scopedSlots = normalizeScopedSlots(
  7759. _parentVnode.data.scopedSlots,
  7760. vm.$slots,
  7761. vm.$scopedSlots
  7762. );
  7763. }
  7764. // set parent vnode. this allows render functions to have access
  7765. // to the data on the placeholder node.
  7766. vm.$vnode = _parentVnode;
  7767. // render self
  7768. var vnode;
  7769. try {
  7770. // There's no need to maintain a stack because all render fns are called
  7771. // separately from one another. Nested component's render fns are called
  7772. // when parent component is patched.
  7773. currentRenderingInstance = vm;
  7774. vnode = render.call(vm._renderProxy, vm.$createElement);
  7775. } catch (e) {
  7776. handleError(e, vm, "render");
  7777. // return error render result,
  7778. // or previous vnode to prevent render error causing blank component
  7779. /* istanbul ignore else */
  7780. if ( true && vm.$options.renderError) {
  7781. try {
  7782. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  7783. } catch (e) {
  7784. handleError(e, vm, "renderError");
  7785. vnode = vm._vnode;
  7786. }
  7787. } else {
  7788. vnode = vm._vnode;
  7789. }
  7790. } finally {
  7791. currentRenderingInstance = null;
  7792. }
  7793. // if the returned array contains only a single node, allow it
  7794. if (Array.isArray(vnode) && vnode.length === 1) {
  7795. vnode = vnode[0];
  7796. }
  7797. // return empty vnode in case the render function errored out
  7798. if (!(vnode instanceof VNode)) {
  7799. if ( true && Array.isArray(vnode)) {
  7800. warn(
  7801. 'Multiple root nodes returned from render function. Render function ' +
  7802. 'should return a single root node.',
  7803. vm
  7804. );
  7805. }
  7806. vnode = createEmptyVNode();
  7807. }
  7808. // set parent
  7809. vnode.parent = _parentVnode;
  7810. return vnode
  7811. };
  7812. }
  7813. /* */
  7814. function ensureCtor (comp, base) {
  7815. if (
  7816. comp.__esModule ||
  7817. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  7818. ) {
  7819. comp = comp.default;
  7820. }
  7821. return isObject(comp)
  7822. ? base.extend(comp)
  7823. : comp
  7824. }
  7825. function createAsyncPlaceholder (
  7826. factory,
  7827. data,
  7828. context,
  7829. children,
  7830. tag
  7831. ) {
  7832. var node = createEmptyVNode();
  7833. node.asyncFactory = factory;
  7834. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  7835. return node
  7836. }
  7837. function resolveAsyncComponent (
  7838. factory,
  7839. baseCtor
  7840. ) {
  7841. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  7842. return factory.errorComp
  7843. }
  7844. if (isDef(factory.resolved)) {
  7845. return factory.resolved
  7846. }
  7847. var owner = currentRenderingInstance;
  7848. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  7849. // already pending
  7850. factory.owners.push(owner);
  7851. }
  7852. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  7853. return factory.loadingComp
  7854. }
  7855. if (owner && !isDef(factory.owners)) {
  7856. var owners = factory.owners = [owner];
  7857. var sync = true;
  7858. var timerLoading = null;
  7859. var timerTimeout = null
  7860. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  7861. var forceRender = function (renderCompleted) {
  7862. for (var i = 0, l = owners.length; i < l; i++) {
  7863. (owners[i]).$forceUpdate();
  7864. }
  7865. if (renderCompleted) {
  7866. owners.length = 0;
  7867. if (timerLoading !== null) {
  7868. clearTimeout(timerLoading);
  7869. timerLoading = null;
  7870. }
  7871. if (timerTimeout !== null) {
  7872. clearTimeout(timerTimeout);
  7873. timerTimeout = null;
  7874. }
  7875. }
  7876. };
  7877. var resolve = once(function (res) {
  7878. // cache resolved
  7879. factory.resolved = ensureCtor(res, baseCtor);
  7880. // invoke callbacks only if this is not a synchronous resolve
  7881. // (async resolves are shimmed as synchronous during SSR)
  7882. if (!sync) {
  7883. forceRender(true);
  7884. } else {
  7885. owners.length = 0;
  7886. }
  7887. });
  7888. var reject = once(function (reason) {
  7889. true && warn(
  7890. "Failed to resolve async component: " + (String(factory)) +
  7891. (reason ? ("\nReason: " + reason) : '')
  7892. );
  7893. if (isDef(factory.errorComp)) {
  7894. factory.error = true;
  7895. forceRender(true);
  7896. }
  7897. });
  7898. var res = factory(resolve, reject);
  7899. if (isObject(res)) {
  7900. if (isPromise(res)) {
  7901. // () => Promise
  7902. if (isUndef(factory.resolved)) {
  7903. res.then(resolve, reject);
  7904. }
  7905. } else if (isPromise(res.component)) {
  7906. res.component.then(resolve, reject);
  7907. if (isDef(res.error)) {
  7908. factory.errorComp = ensureCtor(res.error, baseCtor);
  7909. }
  7910. if (isDef(res.loading)) {
  7911. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  7912. if (res.delay === 0) {
  7913. factory.loading = true;
  7914. } else {
  7915. timerLoading = setTimeout(function () {
  7916. timerLoading = null;
  7917. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  7918. factory.loading = true;
  7919. forceRender(false);
  7920. }
  7921. }, res.delay || 200);
  7922. }
  7923. }
  7924. if (isDef(res.timeout)) {
  7925. timerTimeout = setTimeout(function () {
  7926. timerTimeout = null;
  7927. if (isUndef(factory.resolved)) {
  7928. reject(
  7929. true
  7930. ? ("timeout (" + (res.timeout) + "ms)")
  7931. : undefined
  7932. );
  7933. }
  7934. }, res.timeout);
  7935. }
  7936. }
  7937. }
  7938. sync = false;
  7939. // return in case resolved synchronously
  7940. return factory.loading
  7941. ? factory.loadingComp
  7942. : factory.resolved
  7943. }
  7944. }
  7945. /* */
  7946. function isAsyncPlaceholder (node) {
  7947. return node.isComment && node.asyncFactory
  7948. }
  7949. /* */
  7950. function getFirstComponentChild (children) {
  7951. if (Array.isArray(children)) {
  7952. for (var i = 0; i < children.length; i++) {
  7953. var c = children[i];
  7954. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  7955. return c
  7956. }
  7957. }
  7958. }
  7959. }
  7960. /* */
  7961. /* */
  7962. function initEvents (vm) {
  7963. vm._events = Object.create(null);
  7964. vm._hasHookEvent = false;
  7965. // init parent attached events
  7966. var listeners = vm.$options._parentListeners;
  7967. if (listeners) {
  7968. updateComponentListeners(vm, listeners);
  7969. }
  7970. }
  7971. var target;
  7972. function add (event, fn) {
  7973. target.$on(event, fn);
  7974. }
  7975. function remove$1 (event, fn) {
  7976. target.$off(event, fn);
  7977. }
  7978. function createOnceHandler (event, fn) {
  7979. var _target = target;
  7980. return function onceHandler () {
  7981. var res = fn.apply(null, arguments);
  7982. if (res !== null) {
  7983. _target.$off(event, onceHandler);
  7984. }
  7985. }
  7986. }
  7987. function updateComponentListeners (
  7988. vm,
  7989. listeners,
  7990. oldListeners
  7991. ) {
  7992. target = vm;
  7993. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  7994. target = undefined;
  7995. }
  7996. function eventsMixin (Vue) {
  7997. var hookRE = /^hook:/;
  7998. Vue.prototype.$on = function (event, fn) {
  7999. var vm = this;
  8000. if (Array.isArray(event)) {
  8001. for (var i = 0, l = event.length; i < l; i++) {
  8002. vm.$on(event[i], fn);
  8003. }
  8004. } else {
  8005. (vm._events[event] || (vm._events[event] = [])).push(fn);
  8006. // optimize hook:event cost by using a boolean flag marked at registration
  8007. // instead of a hash lookup
  8008. if (hookRE.test(event)) {
  8009. vm._hasHookEvent = true;
  8010. }
  8011. }
  8012. return vm
  8013. };
  8014. Vue.prototype.$once = function (event, fn) {
  8015. var vm = this;
  8016. function on () {
  8017. vm.$off(event, on);
  8018. fn.apply(vm, arguments);
  8019. }
  8020. on.fn = fn;
  8021. vm.$on(event, on);
  8022. return vm
  8023. };
  8024. Vue.prototype.$off = function (event, fn) {
  8025. var vm = this;
  8026. // all
  8027. if (!arguments.length) {
  8028. vm._events = Object.create(null);
  8029. return vm
  8030. }
  8031. // array of events
  8032. if (Array.isArray(event)) {
  8033. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  8034. vm.$off(event[i$1], fn);
  8035. }
  8036. return vm
  8037. }
  8038. // specific event
  8039. var cbs = vm._events[event];
  8040. if (!cbs) {
  8041. return vm
  8042. }
  8043. if (!fn) {
  8044. vm._events[event] = null;
  8045. return vm
  8046. }
  8047. // specific handler
  8048. var cb;
  8049. var i = cbs.length;
  8050. while (i--) {
  8051. cb = cbs[i];
  8052. if (cb === fn || cb.fn === fn) {
  8053. cbs.splice(i, 1);
  8054. break
  8055. }
  8056. }
  8057. return vm
  8058. };
  8059. Vue.prototype.$emit = function (event) {
  8060. var vm = this;
  8061. if (true) {
  8062. var lowerCaseEvent = event.toLowerCase();
  8063. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  8064. tip(
  8065. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  8066. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  8067. "Note that HTML attributes are case-insensitive and you cannot use " +
  8068. "v-on to listen to camelCase events when using in-DOM templates. " +
  8069. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  8070. );
  8071. }
  8072. }
  8073. var cbs = vm._events[event];
  8074. if (cbs) {
  8075. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  8076. var args = toArray(arguments, 1);
  8077. var info = "event handler for \"" + event + "\"";
  8078. for (var i = 0, l = cbs.length; i < l; i++) {
  8079. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  8080. }
  8081. }
  8082. return vm
  8083. };
  8084. }
  8085. /* */
  8086. var activeInstance = null;
  8087. var isUpdatingChildComponent = false;
  8088. function setActiveInstance(vm) {
  8089. var prevActiveInstance = activeInstance;
  8090. activeInstance = vm;
  8091. return function () {
  8092. activeInstance = prevActiveInstance;
  8093. }
  8094. }
  8095. function initLifecycle (vm) {
  8096. var options = vm.$options;
  8097. // locate first non-abstract parent
  8098. var parent = options.parent;
  8099. if (parent && !options.abstract) {
  8100. while (parent.$options.abstract && parent.$parent) {
  8101. parent = parent.$parent;
  8102. }
  8103. parent.$children.push(vm);
  8104. }
  8105. vm.$parent = parent;
  8106. vm.$root = parent ? parent.$root : vm;
  8107. vm.$children = [];
  8108. vm.$refs = {};
  8109. vm._watcher = null;
  8110. vm._inactive = null;
  8111. vm._directInactive = false;
  8112. vm._isMounted = false;
  8113. vm._isDestroyed = false;
  8114. vm._isBeingDestroyed = false;
  8115. }
  8116. function lifecycleMixin (Vue) {
  8117. Vue.prototype._update = function (vnode, hydrating) {
  8118. var vm = this;
  8119. var prevEl = vm.$el;
  8120. var prevVnode = vm._vnode;
  8121. var restoreActiveInstance = setActiveInstance(vm);
  8122. vm._vnode = vnode;
  8123. // Vue.prototype.__patch__ is injected in entry points
  8124. // based on the rendering backend used.
  8125. if (!prevVnode) {
  8126. // initial render
  8127. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  8128. } else {
  8129. // updates
  8130. vm.$el = vm.__patch__(prevVnode, vnode);
  8131. }
  8132. restoreActiveInstance();
  8133. // update __vue__ reference
  8134. if (prevEl) {
  8135. prevEl.__vue__ = null;
  8136. }
  8137. if (vm.$el) {
  8138. vm.$el.__vue__ = vm;
  8139. }
  8140. // if parent is an HOC, update its $el as well
  8141. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  8142. vm.$parent.$el = vm.$el;
  8143. }
  8144. // updated hook is called by the scheduler to ensure that children are
  8145. // updated in a parent's updated hook.
  8146. };
  8147. Vue.prototype.$forceUpdate = function () {
  8148. var vm = this;
  8149. if (vm._watcher) {
  8150. vm._watcher.update();
  8151. }
  8152. };
  8153. Vue.prototype.$destroy = function () {
  8154. var vm = this;
  8155. if (vm._isBeingDestroyed) {
  8156. return
  8157. }
  8158. callHook(vm, 'beforeDestroy');
  8159. vm._isBeingDestroyed = true;
  8160. // remove self from parent
  8161. var parent = vm.$parent;
  8162. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  8163. remove(parent.$children, vm);
  8164. }
  8165. // teardown watchers
  8166. if (vm._watcher) {
  8167. vm._watcher.teardown();
  8168. }
  8169. var i = vm._watchers.length;
  8170. while (i--) {
  8171. vm._watchers[i].teardown();
  8172. }
  8173. // remove reference from data ob
  8174. // frozen object may not have observer.
  8175. if (vm._data.__ob__) {
  8176. vm._data.__ob__.vmCount--;
  8177. }
  8178. // call the last hook...
  8179. vm._isDestroyed = true;
  8180. // invoke destroy hooks on current rendered tree
  8181. vm.__patch__(vm._vnode, null);
  8182. // fire destroyed hook
  8183. callHook(vm, 'destroyed');
  8184. // turn off all instance listeners.
  8185. vm.$off();
  8186. // remove __vue__ reference
  8187. if (vm.$el) {
  8188. vm.$el.__vue__ = null;
  8189. }
  8190. // release circular reference (#6759)
  8191. if (vm.$vnode) {
  8192. vm.$vnode.parent = null;
  8193. }
  8194. };
  8195. }
  8196. function updateChildComponent (
  8197. vm,
  8198. propsData,
  8199. listeners,
  8200. parentVnode,
  8201. renderChildren
  8202. ) {
  8203. if (true) {
  8204. isUpdatingChildComponent = true;
  8205. }
  8206. // determine whether component has slot children
  8207. // we need to do this before overwriting $options._renderChildren.
  8208. // check if there are dynamic scopedSlots (hand-written or compiled but with
  8209. // dynamic slot names). Static scoped slots compiled from template has the
  8210. // "$stable" marker.
  8211. var newScopedSlots = parentVnode.data.scopedSlots;
  8212. var oldScopedSlots = vm.$scopedSlots;
  8213. var hasDynamicScopedSlot = !!(
  8214. (newScopedSlots && !newScopedSlots.$stable) ||
  8215. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  8216. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  8217. );
  8218. // Any static slot children from the parent may have changed during parent's
  8219. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  8220. // update is necessary to ensure correctness.
  8221. var needsForceUpdate = !!(
  8222. renderChildren || // has new static slots
  8223. vm.$options._renderChildren || // has old static slots
  8224. hasDynamicScopedSlot
  8225. );
  8226. vm.$options._parentVnode = parentVnode;
  8227. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  8228. if (vm._vnode) { // update child tree's parent
  8229. vm._vnode.parent = parentVnode;
  8230. }
  8231. vm.$options._renderChildren = renderChildren;
  8232. // update $attrs and $listeners hash
  8233. // these are also reactive so they may trigger child update if the child
  8234. // used them during render
  8235. vm.$attrs = parentVnode.data.attrs || emptyObject;
  8236. vm.$listeners = listeners || emptyObject;
  8237. // update props
  8238. if (propsData && vm.$options.props) {
  8239. toggleObserving(false);
  8240. var props = vm._props;
  8241. var propKeys = vm.$options._propKeys || [];
  8242. for (var i = 0; i < propKeys.length; i++) {
  8243. var key = propKeys[i];
  8244. var propOptions = vm.$options.props; // wtf flow?
  8245. props[key] = validateProp(key, propOptions, propsData, vm);
  8246. }
  8247. toggleObserving(true);
  8248. // keep a copy of raw propsData
  8249. vm.$options.propsData = propsData;
  8250. }
  8251. // fixed by xxxxxx update properties(mp runtime)
  8252. vm._$updateProperties && vm._$updateProperties(vm);
  8253. // update listeners
  8254. listeners = listeners || emptyObject;
  8255. var oldListeners = vm.$options._parentListeners;
  8256. vm.$options._parentListeners = listeners;
  8257. updateComponentListeners(vm, listeners, oldListeners);
  8258. // resolve slots + force update if has children
  8259. if (needsForceUpdate) {
  8260. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  8261. vm.$forceUpdate();
  8262. }
  8263. if (true) {
  8264. isUpdatingChildComponent = false;
  8265. }
  8266. }
  8267. function isInInactiveTree (vm) {
  8268. while (vm && (vm = vm.$parent)) {
  8269. if (vm._inactive) { return true }
  8270. }
  8271. return false
  8272. }
  8273. function activateChildComponent (vm, direct) {
  8274. if (direct) {
  8275. vm._directInactive = false;
  8276. if (isInInactiveTree(vm)) {
  8277. return
  8278. }
  8279. } else if (vm._directInactive) {
  8280. return
  8281. }
  8282. if (vm._inactive || vm._inactive === null) {
  8283. vm._inactive = false;
  8284. for (var i = 0; i < vm.$children.length; i++) {
  8285. activateChildComponent(vm.$children[i]);
  8286. }
  8287. callHook(vm, 'activated');
  8288. }
  8289. }
  8290. function deactivateChildComponent (vm, direct) {
  8291. if (direct) {
  8292. vm._directInactive = true;
  8293. if (isInInactiveTree(vm)) {
  8294. return
  8295. }
  8296. }
  8297. if (!vm._inactive) {
  8298. vm._inactive = true;
  8299. for (var i = 0; i < vm.$children.length; i++) {
  8300. deactivateChildComponent(vm.$children[i]);
  8301. }
  8302. callHook(vm, 'deactivated');
  8303. }
  8304. }
  8305. function callHook (vm, hook) {
  8306. // #7573 disable dep collection when invoking lifecycle hooks
  8307. pushTarget();
  8308. var handlers = vm.$options[hook];
  8309. var info = hook + " hook";
  8310. if (handlers) {
  8311. for (var i = 0, j = handlers.length; i < j; i++) {
  8312. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  8313. }
  8314. }
  8315. if (vm._hasHookEvent) {
  8316. vm.$emit('hook:' + hook);
  8317. }
  8318. popTarget();
  8319. }
  8320. /* */
  8321. var MAX_UPDATE_COUNT = 100;
  8322. var queue = [];
  8323. var activatedChildren = [];
  8324. var has = {};
  8325. var circular = {};
  8326. var waiting = false;
  8327. var flushing = false;
  8328. var index = 0;
  8329. /**
  8330. * Reset the scheduler's state.
  8331. */
  8332. function resetSchedulerState () {
  8333. index = queue.length = activatedChildren.length = 0;
  8334. has = {};
  8335. if (true) {
  8336. circular = {};
  8337. }
  8338. waiting = flushing = false;
  8339. }
  8340. // Async edge case #6566 requires saving the timestamp when event listeners are
  8341. // attached. However, calling performance.now() has a perf overhead especially
  8342. // if the page has thousands of event listeners. Instead, we take a timestamp
  8343. // every time the scheduler flushes and use that for all event listeners
  8344. // attached during that flush.
  8345. var currentFlushTimestamp = 0;
  8346. // Async edge case fix requires storing an event listener's attach timestamp.
  8347. var getNow = Date.now;
  8348. // Determine what event timestamp the browser is using. Annoyingly, the
  8349. // timestamp can either be hi-res (relative to page load) or low-res
  8350. // (relative to UNIX epoch), so in order to compare time we have to use the
  8351. // same timestamp type when saving the flush timestamp.
  8352. // All IE versions use low-res event timestamps, and have problematic clock
  8353. // implementations (#9632)
  8354. if (inBrowser && !isIE) {
  8355. var performance = window.performance;
  8356. if (
  8357. performance &&
  8358. typeof performance.now === 'function' &&
  8359. getNow() > document.createEvent('Event').timeStamp
  8360. ) {
  8361. // if the event timestamp, although evaluated AFTER the Date.now(), is
  8362. // smaller than it, it means the event is using a hi-res timestamp,
  8363. // and we need to use the hi-res version for event listener timestamps as
  8364. // well.
  8365. getNow = function () { return performance.now(); };
  8366. }
  8367. }
  8368. /**
  8369. * Flush both queues and run the watchers.
  8370. */
  8371. function flushSchedulerQueue () {
  8372. currentFlushTimestamp = getNow();
  8373. flushing = true;
  8374. var watcher, id;
  8375. // Sort queue before flush.
  8376. // This ensures that:
  8377. // 1. Components are updated from parent to child. (because parent is always
  8378. // created before the child)
  8379. // 2. A component's user watchers are run before its render watcher (because
  8380. // user watchers are created before the render watcher)
  8381. // 3. If a component is destroyed during a parent component's watcher run,
  8382. // its watchers can be skipped.
  8383. queue.sort(function (a, b) { return a.id - b.id; });
  8384. // do not cache length because more watchers might be pushed
  8385. // as we run existing watchers
  8386. for (index = 0; index < queue.length; index++) {
  8387. watcher = queue[index];
  8388. if (watcher.before) {
  8389. watcher.before();
  8390. }
  8391. id = watcher.id;
  8392. has[id] = null;
  8393. watcher.run();
  8394. // in dev build, check and stop circular updates.
  8395. if ( true && has[id] != null) {
  8396. circular[id] = (circular[id] || 0) + 1;
  8397. if (circular[id] > MAX_UPDATE_COUNT) {
  8398. warn(
  8399. 'You may have an infinite update loop ' + (
  8400. watcher.user
  8401. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  8402. : "in a component render function."
  8403. ),
  8404. watcher.vm
  8405. );
  8406. break
  8407. }
  8408. }
  8409. }
  8410. // keep copies of post queues before resetting state
  8411. var activatedQueue = activatedChildren.slice();
  8412. var updatedQueue = queue.slice();
  8413. resetSchedulerState();
  8414. // call component updated and activated hooks
  8415. callActivatedHooks(activatedQueue);
  8416. callUpdatedHooks(updatedQueue);
  8417. // devtool hook
  8418. /* istanbul ignore if */
  8419. if (devtools && config.devtools) {
  8420. devtools.emit('flush');
  8421. }
  8422. }
  8423. function callUpdatedHooks (queue) {
  8424. var i = queue.length;
  8425. while (i--) {
  8426. var watcher = queue[i];
  8427. var vm = watcher.vm;
  8428. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  8429. callHook(vm, 'updated');
  8430. }
  8431. }
  8432. }
  8433. /**
  8434. * Queue a kept-alive component that was activated during patch.
  8435. * The queue will be processed after the entire tree has been patched.
  8436. */
  8437. function queueActivatedComponent (vm) {
  8438. // setting _inactive to false here so that a render function can
  8439. // rely on checking whether it's in an inactive tree (e.g. router-view)
  8440. vm._inactive = false;
  8441. activatedChildren.push(vm);
  8442. }
  8443. function callActivatedHooks (queue) {
  8444. for (var i = 0; i < queue.length; i++) {
  8445. queue[i]._inactive = true;
  8446. activateChildComponent(queue[i], true /* true */);
  8447. }
  8448. }
  8449. /**
  8450. * Push a watcher into the watcher queue.
  8451. * Jobs with duplicate IDs will be skipped unless it's
  8452. * pushed when the queue is being flushed.
  8453. */
  8454. function queueWatcher (watcher) {
  8455. var id = watcher.id;
  8456. if (has[id] == null) {
  8457. has[id] = true;
  8458. if (!flushing) {
  8459. queue.push(watcher);
  8460. } else {
  8461. // if already flushing, splice the watcher based on its id
  8462. // if already past its id, it will be run next immediately.
  8463. var i = queue.length - 1;
  8464. while (i > index && queue[i].id > watcher.id) {
  8465. i--;
  8466. }
  8467. queue.splice(i + 1, 0, watcher);
  8468. }
  8469. // queue the flush
  8470. if (!waiting) {
  8471. waiting = true;
  8472. if ( true && !config.async) {
  8473. flushSchedulerQueue();
  8474. return
  8475. }
  8476. nextTick(flushSchedulerQueue);
  8477. }
  8478. }
  8479. }
  8480. /* */
  8481. var uid$2 = 0;
  8482. /**
  8483. * A watcher parses an expression, collects dependencies,
  8484. * and fires callback when the expression value changes.
  8485. * This is used for both the $watch() api and directives.
  8486. */
  8487. var Watcher = function Watcher (
  8488. vm,
  8489. expOrFn,
  8490. cb,
  8491. options,
  8492. isRenderWatcher
  8493. ) {
  8494. this.vm = vm;
  8495. if (isRenderWatcher) {
  8496. vm._watcher = this;
  8497. }
  8498. vm._watchers.push(this);
  8499. // options
  8500. if (options) {
  8501. this.deep = !!options.deep;
  8502. this.user = !!options.user;
  8503. this.lazy = !!options.lazy;
  8504. this.sync = !!options.sync;
  8505. this.before = options.before;
  8506. } else {
  8507. this.deep = this.user = this.lazy = this.sync = false;
  8508. }
  8509. this.cb = cb;
  8510. this.id = ++uid$2; // uid for batching
  8511. this.active = true;
  8512. this.dirty = this.lazy; // for lazy watchers
  8513. this.deps = [];
  8514. this.newDeps = [];
  8515. this.depIds = new _Set();
  8516. this.newDepIds = new _Set();
  8517. this.expression = true
  8518. ? expOrFn.toString()
  8519. : undefined;
  8520. // parse expression for getter
  8521. if (typeof expOrFn === 'function') {
  8522. this.getter = expOrFn;
  8523. } else {
  8524. this.getter = parsePath(expOrFn);
  8525. if (!this.getter) {
  8526. this.getter = noop;
  8527. true && warn(
  8528. "Failed watching path: \"" + expOrFn + "\" " +
  8529. 'Watcher only accepts simple dot-delimited paths. ' +
  8530. 'For full control, use a function instead.',
  8531. vm
  8532. );
  8533. }
  8534. }
  8535. this.value = this.lazy
  8536. ? undefined
  8537. : this.get();
  8538. };
  8539. /**
  8540. * Evaluate the getter, and re-collect dependencies.
  8541. */
  8542. Watcher.prototype.get = function get () {
  8543. pushTarget(this);
  8544. var value;
  8545. var vm = this.vm;
  8546. try {
  8547. value = this.getter.call(vm, vm);
  8548. } catch (e) {
  8549. if (this.user) {
  8550. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  8551. } else {
  8552. throw e
  8553. }
  8554. } finally {
  8555. // "touch" every property so they are all tracked as
  8556. // dependencies for deep watching
  8557. if (this.deep) {
  8558. traverse(value);
  8559. }
  8560. popTarget();
  8561. this.cleanupDeps();
  8562. }
  8563. return value
  8564. };
  8565. /**
  8566. * Add a dependency to this directive.
  8567. */
  8568. Watcher.prototype.addDep = function addDep (dep) {
  8569. var id = dep.id;
  8570. if (!this.newDepIds.has(id)) {
  8571. this.newDepIds.add(id);
  8572. this.newDeps.push(dep);
  8573. if (!this.depIds.has(id)) {
  8574. dep.addSub(this);
  8575. }
  8576. }
  8577. };
  8578. /**
  8579. * Clean up for dependency collection.
  8580. */
  8581. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  8582. var i = this.deps.length;
  8583. while (i--) {
  8584. var dep = this.deps[i];
  8585. if (!this.newDepIds.has(dep.id)) {
  8586. dep.removeSub(this);
  8587. }
  8588. }
  8589. var tmp = this.depIds;
  8590. this.depIds = this.newDepIds;
  8591. this.newDepIds = tmp;
  8592. this.newDepIds.clear();
  8593. tmp = this.deps;
  8594. this.deps = this.newDeps;
  8595. this.newDeps = tmp;
  8596. this.newDeps.length = 0;
  8597. };
  8598. /**
  8599. * Subscriber interface.
  8600. * Will be called when a dependency changes.
  8601. */
  8602. Watcher.prototype.update = function update () {
  8603. /* istanbul ignore else */
  8604. if (this.lazy) {
  8605. this.dirty = true;
  8606. } else if (this.sync) {
  8607. this.run();
  8608. } else {
  8609. queueWatcher(this);
  8610. }
  8611. };
  8612. /**
  8613. * Scheduler job interface.
  8614. * Will be called by the scheduler.
  8615. */
  8616. Watcher.prototype.run = function run () {
  8617. if (this.active) {
  8618. var value = this.get();
  8619. if (
  8620. value !== this.value ||
  8621. // Deep watchers and watchers on Object/Arrays should fire even
  8622. // when the value is the same, because the value may
  8623. // have mutated.
  8624. isObject(value) ||
  8625. this.deep
  8626. ) {
  8627. // set new value
  8628. var oldValue = this.value;
  8629. this.value = value;
  8630. if (this.user) {
  8631. try {
  8632. this.cb.call(this.vm, value, oldValue);
  8633. } catch (e) {
  8634. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  8635. }
  8636. } else {
  8637. this.cb.call(this.vm, value, oldValue);
  8638. }
  8639. }
  8640. }
  8641. };
  8642. /**
  8643. * Evaluate the value of the watcher.
  8644. * This only gets called for lazy watchers.
  8645. */
  8646. Watcher.prototype.evaluate = function evaluate () {
  8647. this.value = this.get();
  8648. this.dirty = false;
  8649. };
  8650. /**
  8651. * Depend on all deps collected by this watcher.
  8652. */
  8653. Watcher.prototype.depend = function depend () {
  8654. var i = this.deps.length;
  8655. while (i--) {
  8656. this.deps[i].depend();
  8657. }
  8658. };
  8659. /**
  8660. * Remove self from all dependencies' subscriber list.
  8661. */
  8662. Watcher.prototype.teardown = function teardown () {
  8663. if (this.active) {
  8664. // remove self from vm's watcher list
  8665. // this is a somewhat expensive operation so we skip it
  8666. // if the vm is being destroyed.
  8667. if (!this.vm._isBeingDestroyed) {
  8668. remove(this.vm._watchers, this);
  8669. }
  8670. var i = this.deps.length;
  8671. while (i--) {
  8672. this.deps[i].removeSub(this);
  8673. }
  8674. this.active = false;
  8675. }
  8676. };
  8677. /* */
  8678. var sharedPropertyDefinition = {
  8679. enumerable: true,
  8680. configurable: true,
  8681. get: noop,
  8682. set: noop
  8683. };
  8684. function proxy (target, sourceKey, key) {
  8685. sharedPropertyDefinition.get = function proxyGetter () {
  8686. return this[sourceKey][key]
  8687. };
  8688. sharedPropertyDefinition.set = function proxySetter (val) {
  8689. this[sourceKey][key] = val;
  8690. };
  8691. Object.defineProperty(target, key, sharedPropertyDefinition);
  8692. }
  8693. function initState (vm) {
  8694. vm._watchers = [];
  8695. var opts = vm.$options;
  8696. if (opts.props) { initProps(vm, opts.props); }
  8697. if (opts.methods) { initMethods(vm, opts.methods); }
  8698. if (opts.data) {
  8699. initData(vm);
  8700. } else {
  8701. observe(vm._data = {}, true /* asRootData */);
  8702. }
  8703. if (opts.computed) { initComputed(vm, opts.computed); }
  8704. if (opts.watch && opts.watch !== nativeWatch) {
  8705. initWatch(vm, opts.watch);
  8706. }
  8707. }
  8708. function initProps (vm, propsOptions) {
  8709. var propsData = vm.$options.propsData || {};
  8710. var props = vm._props = {};
  8711. // cache prop keys so that future props updates can iterate using Array
  8712. // instead of dynamic object key enumeration.
  8713. var keys = vm.$options._propKeys = [];
  8714. var isRoot = !vm.$parent;
  8715. // root instance props should be converted
  8716. if (!isRoot) {
  8717. toggleObserving(false);
  8718. }
  8719. var loop = function ( key ) {
  8720. keys.push(key);
  8721. var value = validateProp(key, propsOptions, propsData, vm);
  8722. /* istanbul ignore else */
  8723. if (true) {
  8724. var hyphenatedKey = hyphenate(key);
  8725. if (isReservedAttribute(hyphenatedKey) ||
  8726. config.isReservedAttr(hyphenatedKey)) {
  8727. warn(
  8728. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  8729. vm
  8730. );
  8731. }
  8732. defineReactive$$1(props, key, value, function () {
  8733. if (!isRoot && !isUpdatingChildComponent) {
  8734. {
  8735. if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou' || vm.mpHost === 'mp-xhs'){//百度、快手、小红书 observer 在 setData callback 之后触发,直接忽略该 warn
  8736. return
  8737. }
  8738. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  8739. if(
  8740. key === 'value' &&
  8741. Array.isArray(vm.$options.behaviors) &&
  8742. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  8743. ){
  8744. return
  8745. }
  8746. if(vm._getFormData){
  8747. return
  8748. }
  8749. var $parent = vm.$parent;
  8750. while($parent){
  8751. if($parent.__next_tick_pending){
  8752. return
  8753. }
  8754. $parent = $parent.$parent;
  8755. }
  8756. }
  8757. warn(
  8758. "Avoid mutating a prop directly since the value will be " +
  8759. "overwritten whenever the parent component re-renders. " +
  8760. "Instead, use a data or computed property based on the prop's " +
  8761. "value. Prop being mutated: \"" + key + "\"",
  8762. vm
  8763. );
  8764. }
  8765. });
  8766. } else {}
  8767. // static props are already proxied on the component's prototype
  8768. // during Vue.extend(). We only need to proxy props defined at
  8769. // instantiation here.
  8770. if (!(key in vm)) {
  8771. proxy(vm, "_props", key);
  8772. }
  8773. };
  8774. for (var key in propsOptions) loop( key );
  8775. toggleObserving(true);
  8776. }
  8777. function initData (vm) {
  8778. var data = vm.$options.data;
  8779. data = vm._data = typeof data === 'function'
  8780. ? getData(data, vm)
  8781. : data || {};
  8782. if (!isPlainObject(data)) {
  8783. data = {};
  8784. true && warn(
  8785. 'data functions should return an object:\n' +
  8786. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  8787. vm
  8788. );
  8789. }
  8790. // proxy data on instance
  8791. var keys = Object.keys(data);
  8792. var props = vm.$options.props;
  8793. var methods = vm.$options.methods;
  8794. var i = keys.length;
  8795. while (i--) {
  8796. var key = keys[i];
  8797. if (true) {
  8798. if (methods && hasOwn(methods, key)) {
  8799. warn(
  8800. ("Method \"" + key + "\" has already been defined as a data property."),
  8801. vm
  8802. );
  8803. }
  8804. }
  8805. if (props && hasOwn(props, key)) {
  8806. true && warn(
  8807. "The data property \"" + key + "\" is already declared as a prop. " +
  8808. "Use prop default value instead.",
  8809. vm
  8810. );
  8811. } else if (!isReserved(key)) {
  8812. proxy(vm, "_data", key);
  8813. }
  8814. }
  8815. // observe data
  8816. observe(data, true /* asRootData */);
  8817. }
  8818. function getData (data, vm) {
  8819. // #7573 disable dep collection when invoking data getters
  8820. pushTarget();
  8821. try {
  8822. return data.call(vm, vm)
  8823. } catch (e) {
  8824. handleError(e, vm, "data()");
  8825. return {}
  8826. } finally {
  8827. popTarget();
  8828. }
  8829. }
  8830. var computedWatcherOptions = { lazy: true };
  8831. function initComputed (vm, computed) {
  8832. // $flow-disable-line
  8833. var watchers = vm._computedWatchers = Object.create(null);
  8834. // computed properties are just getters during SSR
  8835. var isSSR = isServerRendering();
  8836. for (var key in computed) {
  8837. var userDef = computed[key];
  8838. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  8839. if ( true && getter == null) {
  8840. warn(
  8841. ("Getter is missing for computed property \"" + key + "\"."),
  8842. vm
  8843. );
  8844. }
  8845. if (!isSSR) {
  8846. // create internal watcher for the computed property.
  8847. watchers[key] = new Watcher(
  8848. vm,
  8849. getter || noop,
  8850. noop,
  8851. computedWatcherOptions
  8852. );
  8853. }
  8854. // component-defined computed properties are already defined on the
  8855. // component prototype. We only need to define computed properties defined
  8856. // at instantiation here.
  8857. if (!(key in vm)) {
  8858. defineComputed(vm, key, userDef);
  8859. } else if (true) {
  8860. if (key in vm.$data) {
  8861. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  8862. } else if (vm.$options.props && key in vm.$options.props) {
  8863. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  8864. }
  8865. }
  8866. }
  8867. }
  8868. function defineComputed (
  8869. target,
  8870. key,
  8871. userDef
  8872. ) {
  8873. var shouldCache = !isServerRendering();
  8874. if (typeof userDef === 'function') {
  8875. sharedPropertyDefinition.get = shouldCache
  8876. ? createComputedGetter(key)
  8877. : createGetterInvoker(userDef);
  8878. sharedPropertyDefinition.set = noop;
  8879. } else {
  8880. sharedPropertyDefinition.get = userDef.get
  8881. ? shouldCache && userDef.cache !== false
  8882. ? createComputedGetter(key)
  8883. : createGetterInvoker(userDef.get)
  8884. : noop;
  8885. sharedPropertyDefinition.set = userDef.set || noop;
  8886. }
  8887. if ( true &&
  8888. sharedPropertyDefinition.set === noop) {
  8889. sharedPropertyDefinition.set = function () {
  8890. warn(
  8891. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  8892. this
  8893. );
  8894. };
  8895. }
  8896. Object.defineProperty(target, key, sharedPropertyDefinition);
  8897. }
  8898. function createComputedGetter (key) {
  8899. return function computedGetter () {
  8900. var watcher = this._computedWatchers && this._computedWatchers[key];
  8901. if (watcher) {
  8902. if (watcher.dirty) {
  8903. watcher.evaluate();
  8904. }
  8905. if (Dep.SharedObject.target) {// fixed by xxxxxx
  8906. watcher.depend();
  8907. }
  8908. return watcher.value
  8909. }
  8910. }
  8911. }
  8912. function createGetterInvoker(fn) {
  8913. return function computedGetter () {
  8914. return fn.call(this, this)
  8915. }
  8916. }
  8917. function initMethods (vm, methods) {
  8918. var props = vm.$options.props;
  8919. for (var key in methods) {
  8920. if (true) {
  8921. if (typeof methods[key] !== 'function') {
  8922. warn(
  8923. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  8924. "Did you reference the function correctly?",
  8925. vm
  8926. );
  8927. }
  8928. if (props && hasOwn(props, key)) {
  8929. warn(
  8930. ("Method \"" + key + "\" has already been defined as a prop."),
  8931. vm
  8932. );
  8933. }
  8934. if ((key in vm) && isReserved(key)) {
  8935. warn(
  8936. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  8937. "Avoid defining component methods that start with _ or $."
  8938. );
  8939. }
  8940. }
  8941. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  8942. }
  8943. }
  8944. function initWatch (vm, watch) {
  8945. for (var key in watch) {
  8946. var handler = watch[key];
  8947. if (Array.isArray(handler)) {
  8948. for (var i = 0; i < handler.length; i++) {
  8949. createWatcher(vm, key, handler[i]);
  8950. }
  8951. } else {
  8952. createWatcher(vm, key, handler);
  8953. }
  8954. }
  8955. }
  8956. function createWatcher (
  8957. vm,
  8958. expOrFn,
  8959. handler,
  8960. options
  8961. ) {
  8962. if (isPlainObject(handler)) {
  8963. options = handler;
  8964. handler = handler.handler;
  8965. }
  8966. if (typeof handler === 'string') {
  8967. handler = vm[handler];
  8968. }
  8969. return vm.$watch(expOrFn, handler, options)
  8970. }
  8971. function stateMixin (Vue) {
  8972. // flow somehow has problems with directly declared definition object
  8973. // when using Object.defineProperty, so we have to procedurally build up
  8974. // the object here.
  8975. var dataDef = {};
  8976. dataDef.get = function () { return this._data };
  8977. var propsDef = {};
  8978. propsDef.get = function () { return this._props };
  8979. if (true) {
  8980. dataDef.set = function () {
  8981. warn(
  8982. 'Avoid replacing instance root $data. ' +
  8983. 'Use nested data properties instead.',
  8984. this
  8985. );
  8986. };
  8987. propsDef.set = function () {
  8988. warn("$props is readonly.", this);
  8989. };
  8990. }
  8991. Object.defineProperty(Vue.prototype, '$data', dataDef);
  8992. Object.defineProperty(Vue.prototype, '$props', propsDef);
  8993. Vue.prototype.$set = set;
  8994. Vue.prototype.$delete = del;
  8995. Vue.prototype.$watch = function (
  8996. expOrFn,
  8997. cb,
  8998. options
  8999. ) {
  9000. var vm = this;
  9001. if (isPlainObject(cb)) {
  9002. return createWatcher(vm, expOrFn, cb, options)
  9003. }
  9004. options = options || {};
  9005. options.user = true;
  9006. var watcher = new Watcher(vm, expOrFn, cb, options);
  9007. if (options.immediate) {
  9008. try {
  9009. cb.call(vm, watcher.value);
  9010. } catch (error) {
  9011. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  9012. }
  9013. }
  9014. return function unwatchFn () {
  9015. watcher.teardown();
  9016. }
  9017. };
  9018. }
  9019. /* */
  9020. var uid$3 = 0;
  9021. function initMixin (Vue) {
  9022. Vue.prototype._init = function (options) {
  9023. var vm = this;
  9024. // a uid
  9025. vm._uid = uid$3++;
  9026. var startTag, endTag;
  9027. /* istanbul ignore if */
  9028. if ( true && config.performance && mark) {
  9029. startTag = "vue-perf-start:" + (vm._uid);
  9030. endTag = "vue-perf-end:" + (vm._uid);
  9031. mark(startTag);
  9032. }
  9033. // a flag to avoid this being observed
  9034. vm._isVue = true;
  9035. // merge options
  9036. if (options && options._isComponent) {
  9037. // optimize internal component instantiation
  9038. // since dynamic options merging is pretty slow, and none of the
  9039. // internal component options needs special treatment.
  9040. initInternalComponent(vm, options);
  9041. } else {
  9042. vm.$options = mergeOptions(
  9043. resolveConstructorOptions(vm.constructor),
  9044. options || {},
  9045. vm
  9046. );
  9047. }
  9048. /* istanbul ignore else */
  9049. if (true) {
  9050. initProxy(vm);
  9051. } else {}
  9052. // expose real self
  9053. vm._self = vm;
  9054. initLifecycle(vm);
  9055. initEvents(vm);
  9056. initRender(vm);
  9057. callHook(vm, 'beforeCreate');
  9058. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  9059. initState(vm);
  9060. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  9061. !vm._$fallback && callHook(vm, 'created');
  9062. /* istanbul ignore if */
  9063. if ( true && config.performance && mark) {
  9064. vm._name = formatComponentName(vm, false);
  9065. mark(endTag);
  9066. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  9067. }
  9068. if (vm.$options.el) {
  9069. vm.$mount(vm.$options.el);
  9070. }
  9071. };
  9072. }
  9073. function initInternalComponent (vm, options) {
  9074. var opts = vm.$options = Object.create(vm.constructor.options);
  9075. // doing this because it's faster than dynamic enumeration.
  9076. var parentVnode = options._parentVnode;
  9077. opts.parent = options.parent;
  9078. opts._parentVnode = parentVnode;
  9079. var vnodeComponentOptions = parentVnode.componentOptions;
  9080. opts.propsData = vnodeComponentOptions.propsData;
  9081. opts._parentListeners = vnodeComponentOptions.listeners;
  9082. opts._renderChildren = vnodeComponentOptions.children;
  9083. opts._componentTag = vnodeComponentOptions.tag;
  9084. if (options.render) {
  9085. opts.render = options.render;
  9086. opts.staticRenderFns = options.staticRenderFns;
  9087. }
  9088. }
  9089. function resolveConstructorOptions (Ctor) {
  9090. var options = Ctor.options;
  9091. if (Ctor.super) {
  9092. var superOptions = resolveConstructorOptions(Ctor.super);
  9093. var cachedSuperOptions = Ctor.superOptions;
  9094. if (superOptions !== cachedSuperOptions) {
  9095. // super option changed,
  9096. // need to resolve new options.
  9097. Ctor.superOptions = superOptions;
  9098. // check if there are any late-modified/attached options (#4976)
  9099. var modifiedOptions = resolveModifiedOptions(Ctor);
  9100. // update base extend options
  9101. if (modifiedOptions) {
  9102. extend(Ctor.extendOptions, modifiedOptions);
  9103. }
  9104. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  9105. if (options.name) {
  9106. options.components[options.name] = Ctor;
  9107. }
  9108. }
  9109. }
  9110. return options
  9111. }
  9112. function resolveModifiedOptions (Ctor) {
  9113. var modified;
  9114. var latest = Ctor.options;
  9115. var sealed = Ctor.sealedOptions;
  9116. for (var key in latest) {
  9117. if (latest[key] !== sealed[key]) {
  9118. if (!modified) { modified = {}; }
  9119. modified[key] = latest[key];
  9120. }
  9121. }
  9122. return modified
  9123. }
  9124. function Vue (options) {
  9125. if ( true &&
  9126. !(this instanceof Vue)
  9127. ) {
  9128. warn('Vue is a constructor and should be called with the `new` keyword');
  9129. }
  9130. this._init(options);
  9131. }
  9132. initMixin(Vue);
  9133. stateMixin(Vue);
  9134. eventsMixin(Vue);
  9135. lifecycleMixin(Vue);
  9136. renderMixin(Vue);
  9137. /* */
  9138. function initUse (Vue) {
  9139. Vue.use = function (plugin) {
  9140. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  9141. if (installedPlugins.indexOf(plugin) > -1) {
  9142. return this
  9143. }
  9144. // additional parameters
  9145. var args = toArray(arguments, 1);
  9146. args.unshift(this);
  9147. if (typeof plugin.install === 'function') {
  9148. plugin.install.apply(plugin, args);
  9149. } else if (typeof plugin === 'function') {
  9150. plugin.apply(null, args);
  9151. }
  9152. installedPlugins.push(plugin);
  9153. return this
  9154. };
  9155. }
  9156. /* */
  9157. function initMixin$1 (Vue) {
  9158. Vue.mixin = function (mixin) {
  9159. this.options = mergeOptions(this.options, mixin);
  9160. return this
  9161. };
  9162. }
  9163. /* */
  9164. function initExtend (Vue) {
  9165. /**
  9166. * Each instance constructor, including Vue, has a unique
  9167. * cid. This enables us to create wrapped "child
  9168. * constructors" for prototypal inheritance and cache them.
  9169. */
  9170. Vue.cid = 0;
  9171. var cid = 1;
  9172. /**
  9173. * Class inheritance
  9174. */
  9175. Vue.extend = function (extendOptions) {
  9176. extendOptions = extendOptions || {};
  9177. var Super = this;
  9178. var SuperId = Super.cid;
  9179. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  9180. if (cachedCtors[SuperId]) {
  9181. return cachedCtors[SuperId]
  9182. }
  9183. var name = extendOptions.name || Super.options.name;
  9184. if ( true && name) {
  9185. validateComponentName(name);
  9186. }
  9187. var Sub = function VueComponent (options) {
  9188. this._init(options);
  9189. };
  9190. Sub.prototype = Object.create(Super.prototype);
  9191. Sub.prototype.constructor = Sub;
  9192. Sub.cid = cid++;
  9193. Sub.options = mergeOptions(
  9194. Super.options,
  9195. extendOptions
  9196. );
  9197. Sub['super'] = Super;
  9198. // For props and computed properties, we define the proxy getters on
  9199. // the Vue instances at extension time, on the extended prototype. This
  9200. // avoids Object.defineProperty calls for each instance created.
  9201. if (Sub.options.props) {
  9202. initProps$1(Sub);
  9203. }
  9204. if (Sub.options.computed) {
  9205. initComputed$1(Sub);
  9206. }
  9207. // allow further extension/mixin/plugin usage
  9208. Sub.extend = Super.extend;
  9209. Sub.mixin = Super.mixin;
  9210. Sub.use = Super.use;
  9211. // create asset registers, so extended classes
  9212. // can have their private assets too.
  9213. ASSET_TYPES.forEach(function (type) {
  9214. Sub[type] = Super[type];
  9215. });
  9216. // enable recursive self-lookup
  9217. if (name) {
  9218. Sub.options.components[name] = Sub;
  9219. }
  9220. // keep a reference to the super options at extension time.
  9221. // later at instantiation we can check if Super's options have
  9222. // been updated.
  9223. Sub.superOptions = Super.options;
  9224. Sub.extendOptions = extendOptions;
  9225. Sub.sealedOptions = extend({}, Sub.options);
  9226. // cache constructor
  9227. cachedCtors[SuperId] = Sub;
  9228. return Sub
  9229. };
  9230. }
  9231. function initProps$1 (Comp) {
  9232. var props = Comp.options.props;
  9233. for (var key in props) {
  9234. proxy(Comp.prototype, "_props", key);
  9235. }
  9236. }
  9237. function initComputed$1 (Comp) {
  9238. var computed = Comp.options.computed;
  9239. for (var key in computed) {
  9240. defineComputed(Comp.prototype, key, computed[key]);
  9241. }
  9242. }
  9243. /* */
  9244. function initAssetRegisters (Vue) {
  9245. /**
  9246. * Create asset registration methods.
  9247. */
  9248. ASSET_TYPES.forEach(function (type) {
  9249. Vue[type] = function (
  9250. id,
  9251. definition
  9252. ) {
  9253. if (!definition) {
  9254. return this.options[type + 's'][id]
  9255. } else {
  9256. /* istanbul ignore if */
  9257. if ( true && type === 'component') {
  9258. validateComponentName(id);
  9259. }
  9260. if (type === 'component' && isPlainObject(definition)) {
  9261. definition.name = definition.name || id;
  9262. definition = this.options._base.extend(definition);
  9263. }
  9264. if (type === 'directive' && typeof definition === 'function') {
  9265. definition = { bind: definition, update: definition };
  9266. }
  9267. this.options[type + 's'][id] = definition;
  9268. return definition
  9269. }
  9270. };
  9271. });
  9272. }
  9273. /* */
  9274. function getComponentName (opts) {
  9275. return opts && (opts.Ctor.options.name || opts.tag)
  9276. }
  9277. function matches (pattern, name) {
  9278. if (Array.isArray(pattern)) {
  9279. return pattern.indexOf(name) > -1
  9280. } else if (typeof pattern === 'string') {
  9281. return pattern.split(',').indexOf(name) > -1
  9282. } else if (isRegExp(pattern)) {
  9283. return pattern.test(name)
  9284. }
  9285. /* istanbul ignore next */
  9286. return false
  9287. }
  9288. function pruneCache (keepAliveInstance, filter) {
  9289. var cache = keepAliveInstance.cache;
  9290. var keys = keepAliveInstance.keys;
  9291. var _vnode = keepAliveInstance._vnode;
  9292. for (var key in cache) {
  9293. var cachedNode = cache[key];
  9294. if (cachedNode) {
  9295. var name = getComponentName(cachedNode.componentOptions);
  9296. if (name && !filter(name)) {
  9297. pruneCacheEntry(cache, key, keys, _vnode);
  9298. }
  9299. }
  9300. }
  9301. }
  9302. function pruneCacheEntry (
  9303. cache,
  9304. key,
  9305. keys,
  9306. current
  9307. ) {
  9308. var cached$$1 = cache[key];
  9309. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  9310. cached$$1.componentInstance.$destroy();
  9311. }
  9312. cache[key] = null;
  9313. remove(keys, key);
  9314. }
  9315. var patternTypes = [String, RegExp, Array];
  9316. var KeepAlive = {
  9317. name: 'keep-alive',
  9318. abstract: true,
  9319. props: {
  9320. include: patternTypes,
  9321. exclude: patternTypes,
  9322. max: [String, Number]
  9323. },
  9324. created: function created () {
  9325. this.cache = Object.create(null);
  9326. this.keys = [];
  9327. },
  9328. destroyed: function destroyed () {
  9329. for (var key in this.cache) {
  9330. pruneCacheEntry(this.cache, key, this.keys);
  9331. }
  9332. },
  9333. mounted: function mounted () {
  9334. var this$1 = this;
  9335. this.$watch('include', function (val) {
  9336. pruneCache(this$1, function (name) { return matches(val, name); });
  9337. });
  9338. this.$watch('exclude', function (val) {
  9339. pruneCache(this$1, function (name) { return !matches(val, name); });
  9340. });
  9341. },
  9342. render: function render () {
  9343. var slot = this.$slots.default;
  9344. var vnode = getFirstComponentChild(slot);
  9345. var componentOptions = vnode && vnode.componentOptions;
  9346. if (componentOptions) {
  9347. // check pattern
  9348. var name = getComponentName(componentOptions);
  9349. var ref = this;
  9350. var include = ref.include;
  9351. var exclude = ref.exclude;
  9352. if (
  9353. // not included
  9354. (include && (!name || !matches(include, name))) ||
  9355. // excluded
  9356. (exclude && name && matches(exclude, name))
  9357. ) {
  9358. return vnode
  9359. }
  9360. var ref$1 = this;
  9361. var cache = ref$1.cache;
  9362. var keys = ref$1.keys;
  9363. var key = vnode.key == null
  9364. // same constructor may get registered as different local components
  9365. // so cid alone is not enough (#3269)
  9366. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  9367. : vnode.key;
  9368. if (cache[key]) {
  9369. vnode.componentInstance = cache[key].componentInstance;
  9370. // make current key freshest
  9371. remove(keys, key);
  9372. keys.push(key);
  9373. } else {
  9374. cache[key] = vnode;
  9375. keys.push(key);
  9376. // prune oldest entry
  9377. if (this.max && keys.length > parseInt(this.max)) {
  9378. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  9379. }
  9380. }
  9381. vnode.data.keepAlive = true;
  9382. }
  9383. return vnode || (slot && slot[0])
  9384. }
  9385. };
  9386. var builtInComponents = {
  9387. KeepAlive: KeepAlive
  9388. };
  9389. /* */
  9390. function initGlobalAPI (Vue) {
  9391. // config
  9392. var configDef = {};
  9393. configDef.get = function () { return config; };
  9394. if (true) {
  9395. configDef.set = function () {
  9396. warn(
  9397. 'Do not replace the Vue.config object, set individual fields instead.'
  9398. );
  9399. };
  9400. }
  9401. Object.defineProperty(Vue, 'config', configDef);
  9402. // exposed util methods.
  9403. // NOTE: these are not considered part of the public API - avoid relying on
  9404. // them unless you are aware of the risk.
  9405. Vue.util = {
  9406. warn: warn,
  9407. extend: extend,
  9408. mergeOptions: mergeOptions,
  9409. defineReactive: defineReactive$$1
  9410. };
  9411. Vue.set = set;
  9412. Vue.delete = del;
  9413. Vue.nextTick = nextTick;
  9414. // 2.6 explicit observable API
  9415. Vue.observable = function (obj) {
  9416. observe(obj);
  9417. return obj
  9418. };
  9419. Vue.options = Object.create(null);
  9420. ASSET_TYPES.forEach(function (type) {
  9421. Vue.options[type + 's'] = Object.create(null);
  9422. });
  9423. // this is used to identify the "base" constructor to extend all plain-object
  9424. // components with in Weex's multi-instance scenarios.
  9425. Vue.options._base = Vue;
  9426. extend(Vue.options.components, builtInComponents);
  9427. initUse(Vue);
  9428. initMixin$1(Vue);
  9429. initExtend(Vue);
  9430. initAssetRegisters(Vue);
  9431. }
  9432. initGlobalAPI(Vue);
  9433. Object.defineProperty(Vue.prototype, '$isServer', {
  9434. get: isServerRendering
  9435. });
  9436. Object.defineProperty(Vue.prototype, '$ssrContext', {
  9437. get: function get () {
  9438. /* istanbul ignore next */
  9439. return this.$vnode && this.$vnode.ssrContext
  9440. }
  9441. });
  9442. // expose FunctionalRenderContext for ssr runtime helper installation
  9443. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  9444. value: FunctionalRenderContext
  9445. });
  9446. Vue.version = '2.6.11';
  9447. /**
  9448. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  9449. */
  9450. var ARRAYTYPE = '[object Array]';
  9451. var OBJECTTYPE = '[object Object]';
  9452. var NULLTYPE = '[object Null]';
  9453. var UNDEFINEDTYPE = '[object Undefined]';
  9454. // const FUNCTIONTYPE = '[object Function]'
  9455. function diff(current, pre) {
  9456. var result = {};
  9457. syncKeys(current, pre);
  9458. _diff(current, pre, '', result);
  9459. return result
  9460. }
  9461. function syncKeys(current, pre) {
  9462. if (current === pre) { return }
  9463. var rootCurrentType = type(current);
  9464. var rootPreType = type(pre);
  9465. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  9466. if(Object.keys(current).length >= Object.keys(pre).length){
  9467. for (var key in pre) {
  9468. var currentValue = current[key];
  9469. if (currentValue === undefined) {
  9470. current[key] = null;
  9471. } else {
  9472. syncKeys(currentValue, pre[key]);
  9473. }
  9474. }
  9475. }
  9476. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  9477. if (current.length >= pre.length) {
  9478. pre.forEach(function (item, index) {
  9479. syncKeys(current[index], item);
  9480. });
  9481. }
  9482. }
  9483. }
  9484. function nullOrUndefined(currentType, preType) {
  9485. if(
  9486. (currentType === NULLTYPE || currentType === UNDEFINEDTYPE) &&
  9487. (preType === NULLTYPE || preType === UNDEFINEDTYPE)
  9488. ) {
  9489. return false
  9490. }
  9491. return true
  9492. }
  9493. function _diff(current, pre, path, result) {
  9494. if (current === pre) { return }
  9495. var rootCurrentType = type(current);
  9496. var rootPreType = type(pre);
  9497. if (rootCurrentType == OBJECTTYPE) {
  9498. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  9499. setResult(result, path, current);
  9500. } else {
  9501. var loop = function ( key ) {
  9502. var currentValue = current[key];
  9503. var preValue = pre[key];
  9504. var currentType = type(currentValue);
  9505. var preType = type(preValue);
  9506. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  9507. if (currentValue !== pre[key] && nullOrUndefined(currentType, preType)) {
  9508. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9509. }
  9510. } else if (currentType == ARRAYTYPE) {
  9511. if (preType != ARRAYTYPE) {
  9512. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9513. } else {
  9514. if (currentValue.length < preValue.length) {
  9515. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9516. } else {
  9517. currentValue.forEach(function (item, index) {
  9518. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  9519. });
  9520. }
  9521. }
  9522. } else if (currentType == OBJECTTYPE) {
  9523. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  9524. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9525. } else {
  9526. for (var subKey in currentValue) {
  9527. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  9528. }
  9529. }
  9530. }
  9531. };
  9532. for (var key in current) loop( key );
  9533. }
  9534. } else if (rootCurrentType == ARRAYTYPE) {
  9535. if (rootPreType != ARRAYTYPE) {
  9536. setResult(result, path, current);
  9537. } else {
  9538. if (current.length < pre.length) {
  9539. setResult(result, path, current);
  9540. } else {
  9541. current.forEach(function (item, index) {
  9542. _diff(item, pre[index], path + '[' + index + ']', result);
  9543. });
  9544. }
  9545. }
  9546. } else {
  9547. setResult(result, path, current);
  9548. }
  9549. }
  9550. function setResult(result, k, v) {
  9551. // if (type(v) != FUNCTIONTYPE) {
  9552. result[k] = v;
  9553. // }
  9554. }
  9555. function type(obj) {
  9556. return Object.prototype.toString.call(obj)
  9557. }
  9558. /* */
  9559. function flushCallbacks$1(vm) {
  9560. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  9561. if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"六院联创","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  9562. var mpInstance = vm.$scope;
  9563. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  9564. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  9565. }
  9566. var copies = vm.__next_tick_callbacks.slice(0);
  9567. vm.__next_tick_callbacks.length = 0;
  9568. for (var i = 0; i < copies.length; i++) {
  9569. copies[i]();
  9570. }
  9571. }
  9572. }
  9573. function hasRenderWatcher(vm) {
  9574. return queue.find(function (watcher) { return vm._watcher === watcher; })
  9575. }
  9576. function nextTick$1(vm, cb) {
  9577. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  9578. //2.nextTick 之前存在 render watcher
  9579. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  9580. if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"六院联创","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  9581. var mpInstance = vm.$scope;
  9582. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  9583. ']:nextVueTick');
  9584. }
  9585. return nextTick(cb, vm)
  9586. }else{
  9587. if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"六院联创","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  9588. var mpInstance$1 = vm.$scope;
  9589. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  9590. ']:nextMPTick');
  9591. }
  9592. }
  9593. var _resolve;
  9594. if (!vm.__next_tick_callbacks) {
  9595. vm.__next_tick_callbacks = [];
  9596. }
  9597. vm.__next_tick_callbacks.push(function () {
  9598. if (cb) {
  9599. try {
  9600. cb.call(vm);
  9601. } catch (e) {
  9602. handleError(e, vm, 'nextTick');
  9603. }
  9604. } else if (_resolve) {
  9605. _resolve(vm);
  9606. }
  9607. });
  9608. // $flow-disable-line
  9609. if (!cb && typeof Promise !== 'undefined') {
  9610. return new Promise(function (resolve) {
  9611. _resolve = resolve;
  9612. })
  9613. }
  9614. }
  9615. /* */
  9616. function clearInstance(key, value) {
  9617. // 简易去除 Vue 和小程序组件实例
  9618. if (value) {
  9619. if (value._isVue || value.__v_isMPComponent) {
  9620. return {}
  9621. }
  9622. }
  9623. return value
  9624. }
  9625. function cloneWithData(vm) {
  9626. // 确保当前 vm 所有数据被同步
  9627. var ret = Object.create(null);
  9628. var dataKeys = [].concat(
  9629. Object.keys(vm._data || {}),
  9630. Object.keys(vm._computedWatchers || {}));
  9631. dataKeys.reduce(function(ret, key) {
  9632. ret[key] = vm[key];
  9633. return ret
  9634. }, ret);
  9635. // vue-composition-api
  9636. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  9637. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  9638. if (rawBindings) {
  9639. Object.keys(rawBindings).forEach(function (key) {
  9640. ret[key] = vm[key];
  9641. });
  9642. }
  9643. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  9644. Object.assign(ret, vm.$mp.data || {});
  9645. if (
  9646. Array.isArray(vm.$options.behaviors) &&
  9647. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  9648. ) { //form-field
  9649. ret['name'] = vm.name;
  9650. ret['value'] = vm.value;
  9651. }
  9652. return JSON.parse(JSON.stringify(ret, clearInstance))
  9653. }
  9654. var patch = function(oldVnode, vnode) {
  9655. var this$1 = this;
  9656. if (vnode === null) { //destroy
  9657. return
  9658. }
  9659. if (this.mpType === 'page' || this.mpType === 'component') {
  9660. var mpInstance = this.$scope;
  9661. var data = Object.create(null);
  9662. try {
  9663. data = cloneWithData(this);
  9664. } catch (err) {
  9665. console.error(err);
  9666. }
  9667. data.__webviewId__ = mpInstance.data.__webviewId__;
  9668. var mpData = Object.create(null);
  9669. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  9670. mpData[key] = mpInstance.data[key];
  9671. });
  9672. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  9673. if (Object.keys(diffData).length) {
  9674. if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"六院联创","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  9675. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  9676. ']差量更新',
  9677. JSON.stringify(diffData));
  9678. }
  9679. this.__next_tick_pending = true;
  9680. mpInstance.setData(diffData, function () {
  9681. this$1.__next_tick_pending = false;
  9682. flushCallbacks$1(this$1);
  9683. });
  9684. } else {
  9685. flushCallbacks$1(this);
  9686. }
  9687. }
  9688. };
  9689. /* */
  9690. function createEmptyRender() {
  9691. }
  9692. function mountComponent$1(
  9693. vm,
  9694. el,
  9695. hydrating
  9696. ) {
  9697. if (!vm.mpType) {//main.js 中的 new Vue
  9698. return vm
  9699. }
  9700. if (vm.mpType === 'app') {
  9701. vm.$options.render = createEmptyRender;
  9702. }
  9703. if (!vm.$options.render) {
  9704. vm.$options.render = createEmptyRender;
  9705. if (true) {
  9706. /* istanbul ignore if */
  9707. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  9708. vm.$options.el || el) {
  9709. warn(
  9710. 'You are using the runtime-only build of Vue where the template ' +
  9711. 'compiler is not available. Either pre-compile the templates into ' +
  9712. 'render functions, or use the compiler-included build.',
  9713. vm
  9714. );
  9715. } else {
  9716. warn(
  9717. 'Failed to mount component: template or render function not defined.',
  9718. vm
  9719. );
  9720. }
  9721. }
  9722. }
  9723. !vm._$fallback && callHook(vm, 'beforeMount');
  9724. var updateComponent = function () {
  9725. vm._update(vm._render(), hydrating);
  9726. };
  9727. // we set this to vm._watcher inside the watcher's constructor
  9728. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  9729. // component's mounted hook), which relies on vm._watcher being already defined
  9730. new Watcher(vm, updateComponent, noop, {
  9731. before: function before() {
  9732. if (vm._isMounted && !vm._isDestroyed) {
  9733. callHook(vm, 'beforeUpdate');
  9734. }
  9735. }
  9736. }, true /* isRenderWatcher */);
  9737. hydrating = false;
  9738. return vm
  9739. }
  9740. /* */
  9741. function renderClass (
  9742. staticClass,
  9743. dynamicClass
  9744. ) {
  9745. if (isDef(staticClass) || isDef(dynamicClass)) {
  9746. return concat(staticClass, stringifyClass(dynamicClass))
  9747. }
  9748. /* istanbul ignore next */
  9749. return ''
  9750. }
  9751. function concat (a, b) {
  9752. return a ? b ? (a + ' ' + b) : a : (b || '')
  9753. }
  9754. function stringifyClass (value) {
  9755. if (Array.isArray(value)) {
  9756. return stringifyArray(value)
  9757. }
  9758. if (isObject(value)) {
  9759. return stringifyObject(value)
  9760. }
  9761. if (typeof value === 'string') {
  9762. return value
  9763. }
  9764. /* istanbul ignore next */
  9765. return ''
  9766. }
  9767. function stringifyArray (value) {
  9768. var res = '';
  9769. var stringified;
  9770. for (var i = 0, l = value.length; i < l; i++) {
  9771. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  9772. if (res) { res += ' '; }
  9773. res += stringified;
  9774. }
  9775. }
  9776. return res
  9777. }
  9778. function stringifyObject (value) {
  9779. var res = '';
  9780. for (var key in value) {
  9781. if (value[key]) {
  9782. if (res) { res += ' '; }
  9783. res += key;
  9784. }
  9785. }
  9786. return res
  9787. }
  9788. /* */
  9789. var parseStyleText = cached(function (cssText) {
  9790. var res = {};
  9791. var listDelimiter = /;(?![^(]*\))/g;
  9792. var propertyDelimiter = /:(.+)/;
  9793. cssText.split(listDelimiter).forEach(function (item) {
  9794. if (item) {
  9795. var tmp = item.split(propertyDelimiter);
  9796. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  9797. }
  9798. });
  9799. return res
  9800. });
  9801. // normalize possible array / string values into Object
  9802. function normalizeStyleBinding (bindingStyle) {
  9803. if (Array.isArray(bindingStyle)) {
  9804. return toObject(bindingStyle)
  9805. }
  9806. if (typeof bindingStyle === 'string') {
  9807. return parseStyleText(bindingStyle)
  9808. }
  9809. return bindingStyle
  9810. }
  9811. /* */
  9812. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  9813. function getTarget(obj, path) {
  9814. var parts = path.split('.');
  9815. var key = parts[0];
  9816. if (key.indexOf('__$n') === 0) { //number index
  9817. key = parseInt(key.replace('__$n', ''));
  9818. }
  9819. if (parts.length === 1) {
  9820. return obj[key]
  9821. }
  9822. return getTarget(obj[key], parts.slice(1).join('.'))
  9823. }
  9824. function internalMixin(Vue) {
  9825. Vue.config.errorHandler = function(err, vm, info) {
  9826. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  9827. console.error(err);
  9828. /* eslint-disable no-undef */
  9829. var app = typeof getApp === 'function' && getApp();
  9830. if (app && app.onError) {
  9831. app.onError(err);
  9832. }
  9833. };
  9834. var oldEmit = Vue.prototype.$emit;
  9835. Vue.prototype.$emit = function(event) {
  9836. if (this.$scope && event) {
  9837. var triggerEvent = this.$scope['_triggerEvent'] || this.$scope['triggerEvent'];
  9838. if (triggerEvent) {
  9839. try {
  9840. triggerEvent.call(this.$scope, event, {
  9841. __args__: toArray(arguments, 1)
  9842. });
  9843. } catch (error) {
  9844. }
  9845. }
  9846. }
  9847. return oldEmit.apply(this, arguments)
  9848. };
  9849. Vue.prototype.$nextTick = function(fn) {
  9850. return nextTick$1(this, fn)
  9851. };
  9852. MP_METHODS.forEach(function (method) {
  9853. Vue.prototype[method] = function(args) {
  9854. if (this.$scope && this.$scope[method]) {
  9855. return this.$scope[method](args)
  9856. }
  9857. // mp-alipay
  9858. if (typeof my === 'undefined') {
  9859. return
  9860. }
  9861. if (method === 'createSelectorQuery') {
  9862. /* eslint-disable no-undef */
  9863. return my.createSelectorQuery(args)
  9864. } else if (method === 'createIntersectionObserver') {
  9865. /* eslint-disable no-undef */
  9866. return my.createIntersectionObserver(args)
  9867. }
  9868. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  9869. };
  9870. });
  9871. Vue.prototype.__init_provide = initProvide;
  9872. Vue.prototype.__init_injections = initInjections;
  9873. Vue.prototype.__call_hook = function(hook, args) {
  9874. var vm = this;
  9875. // #7573 disable dep collection when invoking lifecycle hooks
  9876. pushTarget();
  9877. var handlers = vm.$options[hook];
  9878. var info = hook + " hook";
  9879. var ret;
  9880. if (handlers) {
  9881. for (var i = 0, j = handlers.length; i < j; i++) {
  9882. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  9883. }
  9884. }
  9885. if (vm._hasHookEvent) {
  9886. vm.$emit('hook:' + hook, args);
  9887. }
  9888. popTarget();
  9889. return ret
  9890. };
  9891. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  9892. if (Array.isArray(modifiers)) {
  9893. if (modifiers.indexOf('trim') !== -1) {
  9894. value = value.trim();
  9895. }
  9896. if (modifiers.indexOf('number') !== -1) {
  9897. value = this._n(value);
  9898. }
  9899. }
  9900. if (!target) {
  9901. target = this;
  9902. }
  9903. // 解决动态属性添加
  9904. Vue.set(target, key, value);
  9905. };
  9906. Vue.prototype.__set_sync = function(target, key, value) {
  9907. if (!target) {
  9908. target = this;
  9909. }
  9910. // 解决动态属性添加
  9911. Vue.set(target, key, value);
  9912. };
  9913. Vue.prototype.__get_orig = function(item) {
  9914. if (isPlainObject(item)) {
  9915. return item['$orig'] || item
  9916. }
  9917. return item
  9918. };
  9919. Vue.prototype.__get_value = function(dataPath, target) {
  9920. return getTarget(target || this, dataPath)
  9921. };
  9922. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  9923. return renderClass(staticClass, dynamicClass)
  9924. };
  9925. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  9926. if (!dynamicStyle && !staticStyle) {
  9927. return ''
  9928. }
  9929. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  9930. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  9931. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  9932. };
  9933. Vue.prototype.__map = function(val, iteratee) {
  9934. //TODO 暂不考虑 string
  9935. var ret, i, l, keys, key;
  9936. if (Array.isArray(val)) {
  9937. ret = new Array(val.length);
  9938. for (i = 0, l = val.length; i < l; i++) {
  9939. ret[i] = iteratee(val[i], i);
  9940. }
  9941. return ret
  9942. } else if (isObject(val)) {
  9943. keys = Object.keys(val);
  9944. ret = Object.create(null);
  9945. for (i = 0, l = keys.length; i < l; i++) {
  9946. key = keys[i];
  9947. ret[key] = iteratee(val[key], key, i);
  9948. }
  9949. return ret
  9950. } else if (typeof val === 'number') {
  9951. ret = new Array(val);
  9952. for (i = 0, l = val; i < l; i++) {
  9953. // 第一个参数暂时仍和小程序一致
  9954. ret[i] = iteratee(i, i);
  9955. }
  9956. return ret
  9957. }
  9958. return []
  9959. };
  9960. }
  9961. /* */
  9962. var LIFECYCLE_HOOKS$1 = [
  9963. //App
  9964. 'onLaunch',
  9965. 'onShow',
  9966. 'onHide',
  9967. 'onUniNViewMessage',
  9968. 'onPageNotFound',
  9969. 'onThemeChange',
  9970. 'onError',
  9971. 'onUnhandledRejection',
  9972. //Page
  9973. 'onInit',
  9974. 'onLoad',
  9975. // 'onShow',
  9976. 'onReady',
  9977. // 'onHide',
  9978. 'onUnload',
  9979. 'onPullDownRefresh',
  9980. 'onReachBottom',
  9981. 'onTabItemTap',
  9982. 'onAddToFavorites',
  9983. 'onShareTimeline',
  9984. 'onShareAppMessage',
  9985. 'onResize',
  9986. 'onPageScroll',
  9987. 'onNavigationBarButtonTap',
  9988. 'onBackPress',
  9989. 'onNavigationBarSearchInputChanged',
  9990. 'onNavigationBarSearchInputConfirmed',
  9991. 'onNavigationBarSearchInputClicked',
  9992. 'onUploadDouyinVideo',
  9993. 'onNFCReadMessage',
  9994. //Component
  9995. // 'onReady', // 兼容旧版本,应该移除该事件
  9996. 'onPageShow',
  9997. 'onPageHide',
  9998. 'onPageResize'
  9999. ];
  10000. function lifecycleMixin$1(Vue) {
  10001. //fixed vue-class-component
  10002. var oldExtend = Vue.extend;
  10003. Vue.extend = function(extendOptions) {
  10004. extendOptions = extendOptions || {};
  10005. var methods = extendOptions.methods;
  10006. if (methods) {
  10007. Object.keys(methods).forEach(function (methodName) {
  10008. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  10009. extendOptions[methodName] = methods[methodName];
  10010. delete methods[methodName];
  10011. }
  10012. });
  10013. }
  10014. return oldExtend.call(this, extendOptions)
  10015. };
  10016. var strategies = Vue.config.optionMergeStrategies;
  10017. var mergeHook = strategies.created;
  10018. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  10019. strategies[hook] = mergeHook;
  10020. });
  10021. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  10022. }
  10023. /* */
  10024. // install platform patch function
  10025. Vue.prototype.__patch__ = patch;
  10026. // public mount method
  10027. Vue.prototype.$mount = function(
  10028. el ,
  10029. hydrating
  10030. ) {
  10031. return mountComponent$1(this, el, hydrating)
  10032. };
  10033. lifecycleMixin$1(Vue);
  10034. internalMixin(Vue);
  10035. /* */
  10036. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  10037. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  10038. /***/ }),
  10039. /***/ 26:
  10040. /*!*****************************************************!*\
  10041. !*** E:/work/Project_newGit/UniappShell/pages.json ***!
  10042. \*****************************************************/
  10043. /*! no static exports found */
  10044. /***/ (function(module, exports) {
  10045. /***/ }),
  10046. /***/ 3:
  10047. /*!***********************************!*\
  10048. !*** (webpack)/buildin/global.js ***!
  10049. \***********************************/
  10050. /*! no static exports found */
  10051. /***/ (function(module, exports) {
  10052. var g;
  10053. // This works in non-strict mode
  10054. g = (function() {
  10055. return this;
  10056. })();
  10057. try {
  10058. // This works if eval is allowed (see CSP)
  10059. g = g || new Function("return this")();
  10060. } catch (e) {
  10061. // This works if the window reference is available
  10062. if (typeof window === "object") g = window;
  10063. }
  10064. // g can still be undefined, but nothing to do about it...
  10065. // We return undefined, instead of nothing here, so it's
  10066. // easier to handle this case. if(!global) { ...}
  10067. module.exports = g;
  10068. /***/ }),
  10069. /***/ 32:
  10070. /*!**********************************************************************************************************!*\
  10071. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  10072. \**********************************************************************************************************/
  10073. /*! exports provided: default */
  10074. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  10075. "use strict";
  10076. __webpack_require__.r(__webpack_exports__);
  10077. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  10078. /* globals __VUE_SSR_CONTEXT__ */
  10079. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  10080. // This module is a runtime utility for cleaner component module output and will
  10081. // be included in the final webpack user bundle.
  10082. function normalizeComponent (
  10083. scriptExports,
  10084. render,
  10085. staticRenderFns,
  10086. functionalTemplate,
  10087. injectStyles,
  10088. scopeId,
  10089. moduleIdentifier, /* server only */
  10090. shadowMode, /* vue-cli only */
  10091. components, // fixed by xxxxxx auto components
  10092. renderjs // fixed by xxxxxx renderjs
  10093. ) {
  10094. // Vue.extend constructor export interop
  10095. var options = typeof scriptExports === 'function'
  10096. ? scriptExports.options
  10097. : scriptExports
  10098. // fixed by xxxxxx auto components
  10099. if (components) {
  10100. if (!options.components) {
  10101. options.components = {}
  10102. }
  10103. var hasOwn = Object.prototype.hasOwnProperty
  10104. for (var name in components) {
  10105. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  10106. options.components[name] = components[name]
  10107. }
  10108. }
  10109. }
  10110. // fixed by xxxxxx renderjs
  10111. if (renderjs) {
  10112. if(typeof renderjs.beforeCreate === 'function'){
  10113. renderjs.beforeCreate = [renderjs.beforeCreate]
  10114. }
  10115. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  10116. this[renderjs.__module] = this
  10117. });
  10118. (options.mixins || (options.mixins = [])).push(renderjs)
  10119. }
  10120. // render functions
  10121. if (render) {
  10122. options.render = render
  10123. options.staticRenderFns = staticRenderFns
  10124. options._compiled = true
  10125. }
  10126. // functional template
  10127. if (functionalTemplate) {
  10128. options.functional = true
  10129. }
  10130. // scopedId
  10131. if (scopeId) {
  10132. options._scopeId = 'data-v-' + scopeId
  10133. }
  10134. var hook
  10135. if (moduleIdentifier) { // server build
  10136. hook = function (context) {
  10137. // 2.3 injection
  10138. context =
  10139. context || // cached call
  10140. (this.$vnode && this.$vnode.ssrContext) || // stateful
  10141. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  10142. // 2.2 with runInNewContext: true
  10143. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  10144. context = __VUE_SSR_CONTEXT__
  10145. }
  10146. // inject component styles
  10147. if (injectStyles) {
  10148. injectStyles.call(this, context)
  10149. }
  10150. // register component module identifier for async chunk inferrence
  10151. if (context && context._registeredComponents) {
  10152. context._registeredComponents.add(moduleIdentifier)
  10153. }
  10154. }
  10155. // used by ssr in case component is cached and beforeCreate
  10156. // never gets called
  10157. options._ssrRegister = hook
  10158. } else if (injectStyles) {
  10159. hook = shadowMode
  10160. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  10161. : injectStyles
  10162. }
  10163. if (hook) {
  10164. if (options.functional) {
  10165. // for template-only hot-reload because in that case the render fn doesn't
  10166. // go through the normalizer
  10167. options._injectStyles = hook
  10168. // register for functioal component in vue file
  10169. var originalRender = options.render
  10170. options.render = function renderWithStyleInjection (h, context) {
  10171. hook.call(context)
  10172. return originalRender(h, context)
  10173. }
  10174. } else {
  10175. // inject component registration as beforeCreate hook
  10176. var existing = options.beforeCreate
  10177. options.beforeCreate = existing
  10178. ? [].concat(existing, hook)
  10179. : [hook]
  10180. }
  10181. }
  10182. return {
  10183. exports: scriptExports,
  10184. options: options
  10185. }
  10186. }
  10187. /***/ }),
  10188. /***/ 33:
  10189. /*!*******************************************************************!*\
  10190. !*** E:/work/Project_newGit/UniappShell/uni.promisify.adaptor.js ***!
  10191. \*******************************************************************/
  10192. /*! no static exports found */
  10193. /***/ (function(module, exports, __webpack_require__) {
  10194. /* WEBPACK VAR INJECTION */(function(uni) {var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  10195. uni.addInterceptor({
  10196. returnValue: function returnValue(res) {
  10197. if (!(!!res && (_typeof(res) === "object" || typeof res === "function") && typeof res.then === "function")) {
  10198. return res;
  10199. }
  10200. return new Promise(function (resolve, reject) {
  10201. res.then(function (res) {
  10202. return res[0] ? reject(res[0]) : resolve(res[1]);
  10203. });
  10204. });
  10205. }
  10206. });
  10207. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  10208. /***/ }),
  10209. /***/ 4:
  10210. /*!**********************************************************************!*\
  10211. !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
  10212. \**********************************************************************/
  10213. /*! no static exports found */
  10214. /***/ (function(module, exports) {
  10215. function _interopRequireDefault(obj) {
  10216. return obj && obj.__esModule ? obj : {
  10217. "default": obj
  10218. };
  10219. }
  10220. module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
  10221. /***/ }),
  10222. /***/ 40:
  10223. /*!*********************************************************!*\
  10224. !*** E:/work/Project_newGit/UniappShell/store/index.js ***!
  10225. \*********************************************************/
  10226. /*! no static exports found */
  10227. /***/ (function(module, exports, __webpack_require__) {
  10228. "use strict";
  10229. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  10230. Object.defineProperty(exports, "__esModule", {
  10231. value: true
  10232. });
  10233. exports.default = void 0;
  10234. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  10235. var _vuex = _interopRequireDefault(__webpack_require__(/*! vuex */ 41));
  10236. _vue.default.use(_vuex.default);
  10237. //实例store对象
  10238. var store = new _vuex.default.Store({
  10239. state: {
  10240. access_token: "",
  10241. jpush: null
  10242. },
  10243. mutations: {
  10244. setToken: function setToken(state, token) {
  10245. state.access_token = token;
  10246. },
  10247. initJpush: function initJpush(state, jpush) {
  10248. state.jpush = jpush;
  10249. }
  10250. }
  10251. });
  10252. //导出store对象
  10253. var _default = store;
  10254. exports.default = _default;
  10255. /***/ }),
  10256. /***/ 41:
  10257. /*!**************************************************************************************!*\
  10258. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vuex3/dist/vuex.common.js ***!
  10259. \**************************************************************************************/
  10260. /*! no static exports found */
  10261. /***/ (function(module, exports, __webpack_require__) {
  10262. "use strict";
  10263. /* WEBPACK VAR INJECTION */(function(global) {/*!
  10264. * vuex v3.6.2
  10265. * (c) 2021 Evan You
  10266. * @license MIT
  10267. */
  10268. function applyMixin (Vue) {
  10269. var version = Number(Vue.version.split('.')[0]);
  10270. if (version >= 2) {
  10271. Vue.mixin({ beforeCreate: vuexInit });
  10272. } else {
  10273. // override init and inject vuex init procedure
  10274. // for 1.x backwards compatibility.
  10275. var _init = Vue.prototype._init;
  10276. Vue.prototype._init = function (options) {
  10277. if ( options === void 0 ) options = {};
  10278. options.init = options.init
  10279. ? [vuexInit].concat(options.init)
  10280. : vuexInit;
  10281. _init.call(this, options);
  10282. };
  10283. }
  10284. /**
  10285. * Vuex init hook, injected into each instances init hooks list.
  10286. */
  10287. function vuexInit () {
  10288. var options = this.$options;
  10289. // store injection
  10290. if (options.store) {
  10291. this.$store = typeof options.store === 'function'
  10292. ? options.store()
  10293. : options.store;
  10294. } else if (options.parent && options.parent.$store) {
  10295. this.$store = options.parent.$store;
  10296. }
  10297. }
  10298. }
  10299. var target = typeof window !== 'undefined'
  10300. ? window
  10301. : typeof global !== 'undefined'
  10302. ? global
  10303. : {};
  10304. var devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  10305. function devtoolPlugin (store) {
  10306. if (!devtoolHook) { return }
  10307. store._devtoolHook = devtoolHook;
  10308. devtoolHook.emit('vuex:init', store);
  10309. devtoolHook.on('vuex:travel-to-state', function (targetState) {
  10310. store.replaceState(targetState);
  10311. });
  10312. store.subscribe(function (mutation, state) {
  10313. devtoolHook.emit('vuex:mutation', mutation, state);
  10314. }, { prepend: true });
  10315. store.subscribeAction(function (action, state) {
  10316. devtoolHook.emit('vuex:action', action, state);
  10317. }, { prepend: true });
  10318. }
  10319. /**
  10320. * Get the first item that pass the test
  10321. * by second argument function
  10322. *
  10323. * @param {Array} list
  10324. * @param {Function} f
  10325. * @return {*}
  10326. */
  10327. function find (list, f) {
  10328. return list.filter(f)[0]
  10329. }
  10330. /**
  10331. * Deep copy the given object considering circular structure.
  10332. * This function caches all nested objects and its copies.
  10333. * If it detects circular structure, use cached copy to avoid infinite loop.
  10334. *
  10335. * @param {*} obj
  10336. * @param {Array<Object>} cache
  10337. * @return {*}
  10338. */
  10339. function deepCopy (obj, cache) {
  10340. if ( cache === void 0 ) cache = [];
  10341. // just return if obj is immutable value
  10342. if (obj === null || typeof obj !== 'object') {
  10343. return obj
  10344. }
  10345. // if obj is hit, it is in circular structure
  10346. var hit = find(cache, function (c) { return c.original === obj; });
  10347. if (hit) {
  10348. return hit.copy
  10349. }
  10350. var copy = Array.isArray(obj) ? [] : {};
  10351. // put the copy into cache at first
  10352. // because we want to refer it in recursive deepCopy
  10353. cache.push({
  10354. original: obj,
  10355. copy: copy
  10356. });
  10357. Object.keys(obj).forEach(function (key) {
  10358. copy[key] = deepCopy(obj[key], cache);
  10359. });
  10360. return copy
  10361. }
  10362. /**
  10363. * forEach for object
  10364. */
  10365. function forEachValue (obj, fn) {
  10366. Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });
  10367. }
  10368. function isObject (obj) {
  10369. return obj !== null && typeof obj === 'object'
  10370. }
  10371. function isPromise (val) {
  10372. return val && typeof val.then === 'function'
  10373. }
  10374. function assert (condition, msg) {
  10375. if (!condition) { throw new Error(("[vuex] " + msg)) }
  10376. }
  10377. function partial (fn, arg) {
  10378. return function () {
  10379. return fn(arg)
  10380. }
  10381. }
  10382. // Base data struct for store's module, package with some attribute and method
  10383. var Module = function Module (rawModule, runtime) {
  10384. this.runtime = runtime;
  10385. // Store some children item
  10386. this._children = Object.create(null);
  10387. // Store the origin module object which passed by programmer
  10388. this._rawModule = rawModule;
  10389. var rawState = rawModule.state;
  10390. // Store the origin module's state
  10391. this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
  10392. };
  10393. var prototypeAccessors = { namespaced: { configurable: true } };
  10394. prototypeAccessors.namespaced.get = function () {
  10395. return !!this._rawModule.namespaced
  10396. };
  10397. Module.prototype.addChild = function addChild (key, module) {
  10398. this._children[key] = module;
  10399. };
  10400. Module.prototype.removeChild = function removeChild (key) {
  10401. delete this._children[key];
  10402. };
  10403. Module.prototype.getChild = function getChild (key) {
  10404. return this._children[key]
  10405. };
  10406. Module.prototype.hasChild = function hasChild (key) {
  10407. return key in this._children
  10408. };
  10409. Module.prototype.update = function update (rawModule) {
  10410. this._rawModule.namespaced = rawModule.namespaced;
  10411. if (rawModule.actions) {
  10412. this._rawModule.actions = rawModule.actions;
  10413. }
  10414. if (rawModule.mutations) {
  10415. this._rawModule.mutations = rawModule.mutations;
  10416. }
  10417. if (rawModule.getters) {
  10418. this._rawModule.getters = rawModule.getters;
  10419. }
  10420. };
  10421. Module.prototype.forEachChild = function forEachChild (fn) {
  10422. forEachValue(this._children, fn);
  10423. };
  10424. Module.prototype.forEachGetter = function forEachGetter (fn) {
  10425. if (this._rawModule.getters) {
  10426. forEachValue(this._rawModule.getters, fn);
  10427. }
  10428. };
  10429. Module.prototype.forEachAction = function forEachAction (fn) {
  10430. if (this._rawModule.actions) {
  10431. forEachValue(this._rawModule.actions, fn);
  10432. }
  10433. };
  10434. Module.prototype.forEachMutation = function forEachMutation (fn) {
  10435. if (this._rawModule.mutations) {
  10436. forEachValue(this._rawModule.mutations, fn);
  10437. }
  10438. };
  10439. Object.defineProperties( Module.prototype, prototypeAccessors );
  10440. var ModuleCollection = function ModuleCollection (rawRootModule) {
  10441. // register root module (Vuex.Store options)
  10442. this.register([], rawRootModule, false);
  10443. };
  10444. ModuleCollection.prototype.get = function get (path) {
  10445. return path.reduce(function (module, key) {
  10446. return module.getChild(key)
  10447. }, this.root)
  10448. };
  10449. ModuleCollection.prototype.getNamespace = function getNamespace (path) {
  10450. var module = this.root;
  10451. return path.reduce(function (namespace, key) {
  10452. module = module.getChild(key);
  10453. return namespace + (module.namespaced ? key + '/' : '')
  10454. }, '')
  10455. };
  10456. ModuleCollection.prototype.update = function update$1 (rawRootModule) {
  10457. update([], this.root, rawRootModule);
  10458. };
  10459. ModuleCollection.prototype.register = function register (path, rawModule, runtime) {
  10460. var this$1 = this;
  10461. if ( runtime === void 0 ) runtime = true;
  10462. if ((true)) {
  10463. assertRawModule(path, rawModule);
  10464. }
  10465. var newModule = new Module(rawModule, runtime);
  10466. if (path.length === 0) {
  10467. this.root = newModule;
  10468. } else {
  10469. var parent = this.get(path.slice(0, -1));
  10470. parent.addChild(path[path.length - 1], newModule);
  10471. }
  10472. // register nested modules
  10473. if (rawModule.modules) {
  10474. forEachValue(rawModule.modules, function (rawChildModule, key) {
  10475. this$1.register(path.concat(key), rawChildModule, runtime);
  10476. });
  10477. }
  10478. };
  10479. ModuleCollection.prototype.unregister = function unregister (path) {
  10480. var parent = this.get(path.slice(0, -1));
  10481. var key = path[path.length - 1];
  10482. var child = parent.getChild(key);
  10483. if (!child) {
  10484. if ((true)) {
  10485. console.warn(
  10486. "[vuex] trying to unregister module '" + key + "', which is " +
  10487. "not registered"
  10488. );
  10489. }
  10490. return
  10491. }
  10492. if (!child.runtime) {
  10493. return
  10494. }
  10495. parent.removeChild(key);
  10496. };
  10497. ModuleCollection.prototype.isRegistered = function isRegistered (path) {
  10498. var parent = this.get(path.slice(0, -1));
  10499. var key = path[path.length - 1];
  10500. if (parent) {
  10501. return parent.hasChild(key)
  10502. }
  10503. return false
  10504. };
  10505. function update (path, targetModule, newModule) {
  10506. if ((true)) {
  10507. assertRawModule(path, newModule);
  10508. }
  10509. // update target module
  10510. targetModule.update(newModule);
  10511. // update nested modules
  10512. if (newModule.modules) {
  10513. for (var key in newModule.modules) {
  10514. if (!targetModule.getChild(key)) {
  10515. if ((true)) {
  10516. console.warn(
  10517. "[vuex] trying to add a new module '" + key + "' on hot reloading, " +
  10518. 'manual reload is needed'
  10519. );
  10520. }
  10521. return
  10522. }
  10523. update(
  10524. path.concat(key),
  10525. targetModule.getChild(key),
  10526. newModule.modules[key]
  10527. );
  10528. }
  10529. }
  10530. }
  10531. var functionAssert = {
  10532. assert: function (value) { return typeof value === 'function'; },
  10533. expected: 'function'
  10534. };
  10535. var objectAssert = {
  10536. assert: function (value) { return typeof value === 'function' ||
  10537. (typeof value === 'object' && typeof value.handler === 'function'); },
  10538. expected: 'function or object with "handler" function'
  10539. };
  10540. var assertTypes = {
  10541. getters: functionAssert,
  10542. mutations: functionAssert,
  10543. actions: objectAssert
  10544. };
  10545. function assertRawModule (path, rawModule) {
  10546. Object.keys(assertTypes).forEach(function (key) {
  10547. if (!rawModule[key]) { return }
  10548. var assertOptions = assertTypes[key];
  10549. forEachValue(rawModule[key], function (value, type) {
  10550. assert(
  10551. assertOptions.assert(value),
  10552. makeAssertionMessage(path, key, type, value, assertOptions.expected)
  10553. );
  10554. });
  10555. });
  10556. }
  10557. function makeAssertionMessage (path, key, type, value, expected) {
  10558. var buf = key + " should be " + expected + " but \"" + key + "." + type + "\"";
  10559. if (path.length > 0) {
  10560. buf += " in module \"" + (path.join('.')) + "\"";
  10561. }
  10562. buf += " is " + (JSON.stringify(value)) + ".";
  10563. return buf
  10564. }
  10565. var Vue; // bind on install
  10566. var Store = function Store (options) {
  10567. var this$1 = this;
  10568. if ( options === void 0 ) options = {};
  10569. // Auto install if it is not done yet and `window` has `Vue`.
  10570. // To allow users to avoid auto-installation in some cases,
  10571. // this code should be placed here. See #731
  10572. if (!Vue && typeof window !== 'undefined' && window.Vue) {
  10573. install(window.Vue);
  10574. }
  10575. if ((true)) {
  10576. assert(Vue, "must call Vue.use(Vuex) before creating a store instance.");
  10577. assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser.");
  10578. assert(this instanceof Store, "store must be called with the new operator.");
  10579. }
  10580. var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];
  10581. var strict = options.strict; if ( strict === void 0 ) strict = false;
  10582. // store internal state
  10583. this._committing = false;
  10584. this._actions = Object.create(null);
  10585. this._actionSubscribers = [];
  10586. this._mutations = Object.create(null);
  10587. this._wrappedGetters = Object.create(null);
  10588. this._modules = new ModuleCollection(options);
  10589. this._modulesNamespaceMap = Object.create(null);
  10590. this._subscribers = [];
  10591. this._watcherVM = new Vue();
  10592. this._makeLocalGettersCache = Object.create(null);
  10593. // bind commit and dispatch to self
  10594. var store = this;
  10595. var ref = this;
  10596. var dispatch = ref.dispatch;
  10597. var commit = ref.commit;
  10598. this.dispatch = function boundDispatch (type, payload) {
  10599. return dispatch.call(store, type, payload)
  10600. };
  10601. this.commit = function boundCommit (type, payload, options) {
  10602. return commit.call(store, type, payload, options)
  10603. };
  10604. // strict mode
  10605. this.strict = strict;
  10606. var state = this._modules.root.state;
  10607. // init root module.
  10608. // this also recursively registers all sub-modules
  10609. // and collects all module getters inside this._wrappedGetters
  10610. installModule(this, state, [], this._modules.root);
  10611. // initialize the store vm, which is responsible for the reactivity
  10612. // (also registers _wrappedGetters as computed properties)
  10613. resetStoreVM(this, state);
  10614. // apply plugins
  10615. plugins.forEach(function (plugin) { return plugin(this$1); });
  10616. var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;
  10617. if (useDevtools) {
  10618. devtoolPlugin(this);
  10619. }
  10620. };
  10621. var prototypeAccessors$1 = { state: { configurable: true } };
  10622. prototypeAccessors$1.state.get = function () {
  10623. return this._vm._data.$$state
  10624. };
  10625. prototypeAccessors$1.state.set = function (v) {
  10626. if ((true)) {
  10627. assert(false, "use store.replaceState() to explicit replace store state.");
  10628. }
  10629. };
  10630. Store.prototype.commit = function commit (_type, _payload, _options) {
  10631. var this$1 = this;
  10632. // check object-style commit
  10633. var ref = unifyObjectStyle(_type, _payload, _options);
  10634. var type = ref.type;
  10635. var payload = ref.payload;
  10636. var options = ref.options;
  10637. var mutation = { type: type, payload: payload };
  10638. var entry = this._mutations[type];
  10639. if (!entry) {
  10640. if ((true)) {
  10641. console.error(("[vuex] unknown mutation type: " + type));
  10642. }
  10643. return
  10644. }
  10645. this._withCommit(function () {
  10646. entry.forEach(function commitIterator (handler) {
  10647. handler(payload);
  10648. });
  10649. });
  10650. this._subscribers
  10651. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  10652. .forEach(function (sub) { return sub(mutation, this$1.state); });
  10653. if (
  10654. ( true) &&
  10655. options && options.silent
  10656. ) {
  10657. console.warn(
  10658. "[vuex] mutation type: " + type + ". Silent option has been removed. " +
  10659. 'Use the filter functionality in the vue-devtools'
  10660. );
  10661. }
  10662. };
  10663. Store.prototype.dispatch = function dispatch (_type, _payload) {
  10664. var this$1 = this;
  10665. // check object-style dispatch
  10666. var ref = unifyObjectStyle(_type, _payload);
  10667. var type = ref.type;
  10668. var payload = ref.payload;
  10669. var action = { type: type, payload: payload };
  10670. var entry = this._actions[type];
  10671. if (!entry) {
  10672. if ((true)) {
  10673. console.error(("[vuex] unknown action type: " + type));
  10674. }
  10675. return
  10676. }
  10677. try {
  10678. this._actionSubscribers
  10679. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  10680. .filter(function (sub) { return sub.before; })
  10681. .forEach(function (sub) { return sub.before(action, this$1.state); });
  10682. } catch (e) {
  10683. if ((true)) {
  10684. console.warn("[vuex] error in before action subscribers: ");
  10685. console.error(e);
  10686. }
  10687. }
  10688. var result = entry.length > 1
  10689. ? Promise.all(entry.map(function (handler) { return handler(payload); }))
  10690. : entry[0](payload);
  10691. return new Promise(function (resolve, reject) {
  10692. result.then(function (res) {
  10693. try {
  10694. this$1._actionSubscribers
  10695. .filter(function (sub) { return sub.after; })
  10696. .forEach(function (sub) { return sub.after(action, this$1.state); });
  10697. } catch (e) {
  10698. if ((true)) {
  10699. console.warn("[vuex] error in after action subscribers: ");
  10700. console.error(e);
  10701. }
  10702. }
  10703. resolve(res);
  10704. }, function (error) {
  10705. try {
  10706. this$1._actionSubscribers
  10707. .filter(function (sub) { return sub.error; })
  10708. .forEach(function (sub) { return sub.error(action, this$1.state, error); });
  10709. } catch (e) {
  10710. if ((true)) {
  10711. console.warn("[vuex] error in error action subscribers: ");
  10712. console.error(e);
  10713. }
  10714. }
  10715. reject(error);
  10716. });
  10717. })
  10718. };
  10719. Store.prototype.subscribe = function subscribe (fn, options) {
  10720. return genericSubscribe(fn, this._subscribers, options)
  10721. };
  10722. Store.prototype.subscribeAction = function subscribeAction (fn, options) {
  10723. var subs = typeof fn === 'function' ? { before: fn } : fn;
  10724. return genericSubscribe(subs, this._actionSubscribers, options)
  10725. };
  10726. Store.prototype.watch = function watch (getter, cb, options) {
  10727. var this$1 = this;
  10728. if ((true)) {
  10729. assert(typeof getter === 'function', "store.watch only accepts a function.");
  10730. }
  10731. return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)
  10732. };
  10733. Store.prototype.replaceState = function replaceState (state) {
  10734. var this$1 = this;
  10735. this._withCommit(function () {
  10736. this$1._vm._data.$$state = state;
  10737. });
  10738. };
  10739. Store.prototype.registerModule = function registerModule (path, rawModule, options) {
  10740. if ( options === void 0 ) options = {};
  10741. if (typeof path === 'string') { path = [path]; }
  10742. if ((true)) {
  10743. assert(Array.isArray(path), "module path must be a string or an Array.");
  10744. assert(path.length > 0, 'cannot register the root module by using registerModule.');
  10745. }
  10746. this._modules.register(path, rawModule);
  10747. installModule(this, this.state, path, this._modules.get(path), options.preserveState);
  10748. // reset store to update getters...
  10749. resetStoreVM(this, this.state);
  10750. };
  10751. Store.prototype.unregisterModule = function unregisterModule (path) {
  10752. var this$1 = this;
  10753. if (typeof path === 'string') { path = [path]; }
  10754. if ((true)) {
  10755. assert(Array.isArray(path), "module path must be a string or an Array.");
  10756. }
  10757. this._modules.unregister(path);
  10758. this._withCommit(function () {
  10759. var parentState = getNestedState(this$1.state, path.slice(0, -1));
  10760. Vue.delete(parentState, path[path.length - 1]);
  10761. });
  10762. resetStore(this);
  10763. };
  10764. Store.prototype.hasModule = function hasModule (path) {
  10765. if (typeof path === 'string') { path = [path]; }
  10766. if ((true)) {
  10767. assert(Array.isArray(path), "module path must be a string or an Array.");
  10768. }
  10769. return this._modules.isRegistered(path)
  10770. };
  10771. Store.prototype[[104,111,116,85,112,100,97,116,101].map(function (item) {return String.fromCharCode(item)}).join('')] = function (newOptions) {
  10772. this._modules.update(newOptions);
  10773. resetStore(this, true);
  10774. };
  10775. Store.prototype._withCommit = function _withCommit (fn) {
  10776. var committing = this._committing;
  10777. this._committing = true;
  10778. fn();
  10779. this._committing = committing;
  10780. };
  10781. Object.defineProperties( Store.prototype, prototypeAccessors$1 );
  10782. function genericSubscribe (fn, subs, options) {
  10783. if (subs.indexOf(fn) < 0) {
  10784. options && options.prepend
  10785. ? subs.unshift(fn)
  10786. : subs.push(fn);
  10787. }
  10788. return function () {
  10789. var i = subs.indexOf(fn);
  10790. if (i > -1) {
  10791. subs.splice(i, 1);
  10792. }
  10793. }
  10794. }
  10795. function resetStore (store, hot) {
  10796. store._actions = Object.create(null);
  10797. store._mutations = Object.create(null);
  10798. store._wrappedGetters = Object.create(null);
  10799. store._modulesNamespaceMap = Object.create(null);
  10800. var state = store.state;
  10801. // init all modules
  10802. installModule(store, state, [], store._modules.root, true);
  10803. // reset vm
  10804. resetStoreVM(store, state, hot);
  10805. }
  10806. function resetStoreVM (store, state, hot) {
  10807. var oldVm = store._vm;
  10808. // bind store public getters
  10809. store.getters = {};
  10810. // reset local getters cache
  10811. store._makeLocalGettersCache = Object.create(null);
  10812. var wrappedGetters = store._wrappedGetters;
  10813. var computed = {};
  10814. forEachValue(wrappedGetters, function (fn, key) {
  10815. // use computed to leverage its lazy-caching mechanism
  10816. // direct inline function use will lead to closure preserving oldVm.
  10817. // using partial to return function with only arguments preserved in closure environment.
  10818. computed[key] = partial(fn, store);
  10819. Object.defineProperty(store.getters, key, {
  10820. get: function () { return store._vm[key]; },
  10821. enumerable: true // for local getters
  10822. });
  10823. });
  10824. // use a Vue instance to store the state tree
  10825. // suppress warnings just in case the user has added
  10826. // some funky global mixins
  10827. var silent = Vue.config.silent;
  10828. Vue.config.silent = true;
  10829. store._vm = new Vue({
  10830. data: {
  10831. $$state: state
  10832. },
  10833. computed: computed
  10834. });
  10835. Vue.config.silent = silent;
  10836. // enable strict mode for new vm
  10837. if (store.strict) {
  10838. enableStrictMode(store);
  10839. }
  10840. if (oldVm) {
  10841. if (hot) {
  10842. // dispatch changes in all subscribed watchers
  10843. // to force getter re-evaluation for hot reloading.
  10844. store._withCommit(function () {
  10845. oldVm._data.$$state = null;
  10846. });
  10847. }
  10848. Vue.nextTick(function () { return oldVm.$destroy(); });
  10849. }
  10850. }
  10851. function installModule (store, rootState, path, module, hot) {
  10852. var isRoot = !path.length;
  10853. var namespace = store._modules.getNamespace(path);
  10854. // register in namespace map
  10855. if (module.namespaced) {
  10856. if (store._modulesNamespaceMap[namespace] && ("development" !== 'production')) {
  10857. console.error(("[vuex] duplicate namespace " + namespace + " for the namespaced module " + (path.join('/'))));
  10858. }
  10859. store._modulesNamespaceMap[namespace] = module;
  10860. }
  10861. // set state
  10862. if (!isRoot && !hot) {
  10863. var parentState = getNestedState(rootState, path.slice(0, -1));
  10864. var moduleName = path[path.length - 1];
  10865. store._withCommit(function () {
  10866. if ((true)) {
  10867. if (moduleName in parentState) {
  10868. console.warn(
  10869. ("[vuex] state field \"" + moduleName + "\" was overridden by a module with the same name at \"" + (path.join('.')) + "\"")
  10870. );
  10871. }
  10872. }
  10873. Vue.set(parentState, moduleName, module.state);
  10874. });
  10875. }
  10876. var local = module.context = makeLocalContext(store, namespace, path);
  10877. module.forEachMutation(function (mutation, key) {
  10878. var namespacedType = namespace + key;
  10879. registerMutation(store, namespacedType, mutation, local);
  10880. });
  10881. module.forEachAction(function (action, key) {
  10882. var type = action.root ? key : namespace + key;
  10883. var handler = action.handler || action;
  10884. registerAction(store, type, handler, local);
  10885. });
  10886. module.forEachGetter(function (getter, key) {
  10887. var namespacedType = namespace + key;
  10888. registerGetter(store, namespacedType, getter, local);
  10889. });
  10890. module.forEachChild(function (child, key) {
  10891. installModule(store, rootState, path.concat(key), child, hot);
  10892. });
  10893. }
  10894. /**
  10895. * make localized dispatch, commit, getters and state
  10896. * if there is no namespace, just use root ones
  10897. */
  10898. function makeLocalContext (store, namespace, path) {
  10899. var noNamespace = namespace === '';
  10900. var local = {
  10901. dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
  10902. var args = unifyObjectStyle(_type, _payload, _options);
  10903. var payload = args.payload;
  10904. var options = args.options;
  10905. var type = args.type;
  10906. if (!options || !options.root) {
  10907. type = namespace + type;
  10908. if (( true) && !store._actions[type]) {
  10909. console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type));
  10910. return
  10911. }
  10912. }
  10913. return store.dispatch(type, payload)
  10914. },
  10915. commit: noNamespace ? store.commit : function (_type, _payload, _options) {
  10916. var args = unifyObjectStyle(_type, _payload, _options);
  10917. var payload = args.payload;
  10918. var options = args.options;
  10919. var type = args.type;
  10920. if (!options || !options.root) {
  10921. type = namespace + type;
  10922. if (( true) && !store._mutations[type]) {
  10923. console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type));
  10924. return
  10925. }
  10926. }
  10927. store.commit(type, payload, options);
  10928. }
  10929. };
  10930. // getters and state object must be gotten lazily
  10931. // because they will be changed by vm update
  10932. Object.defineProperties(local, {
  10933. getters: {
  10934. get: noNamespace
  10935. ? function () { return store.getters; }
  10936. : function () { return makeLocalGetters(store, namespace); }
  10937. },
  10938. state: {
  10939. get: function () { return getNestedState(store.state, path); }
  10940. }
  10941. });
  10942. return local
  10943. }
  10944. function makeLocalGetters (store, namespace) {
  10945. if (!store._makeLocalGettersCache[namespace]) {
  10946. var gettersProxy = {};
  10947. var splitPos = namespace.length;
  10948. Object.keys(store.getters).forEach(function (type) {
  10949. // skip if the target getter is not match this namespace
  10950. if (type.slice(0, splitPos) !== namespace) { return }
  10951. // extract local getter type
  10952. var localType = type.slice(splitPos);
  10953. // Add a port to the getters proxy.
  10954. // Define as getter property because
  10955. // we do not want to evaluate the getters in this time.
  10956. Object.defineProperty(gettersProxy, localType, {
  10957. get: function () { return store.getters[type]; },
  10958. enumerable: true
  10959. });
  10960. });
  10961. store._makeLocalGettersCache[namespace] = gettersProxy;
  10962. }
  10963. return store._makeLocalGettersCache[namespace]
  10964. }
  10965. function registerMutation (store, type, handler, local) {
  10966. var entry = store._mutations[type] || (store._mutations[type] = []);
  10967. entry.push(function wrappedMutationHandler (payload) {
  10968. handler.call(store, local.state, payload);
  10969. });
  10970. }
  10971. function registerAction (store, type, handler, local) {
  10972. var entry = store._actions[type] || (store._actions[type] = []);
  10973. entry.push(function wrappedActionHandler (payload) {
  10974. var res = handler.call(store, {
  10975. dispatch: local.dispatch,
  10976. commit: local.commit,
  10977. getters: local.getters,
  10978. state: local.state,
  10979. rootGetters: store.getters,
  10980. rootState: store.state
  10981. }, payload);
  10982. if (!isPromise(res)) {
  10983. res = Promise.resolve(res);
  10984. }
  10985. if (store._devtoolHook) {
  10986. return res.catch(function (err) {
  10987. store._devtoolHook.emit('vuex:error', err);
  10988. throw err
  10989. })
  10990. } else {
  10991. return res
  10992. }
  10993. });
  10994. }
  10995. function registerGetter (store, type, rawGetter, local) {
  10996. if (store._wrappedGetters[type]) {
  10997. if ((true)) {
  10998. console.error(("[vuex] duplicate getter key: " + type));
  10999. }
  11000. return
  11001. }
  11002. store._wrappedGetters[type] = function wrappedGetter (store) {
  11003. return rawGetter(
  11004. local.state, // local state
  11005. local.getters, // local getters
  11006. store.state, // root state
  11007. store.getters // root getters
  11008. )
  11009. };
  11010. }
  11011. function enableStrictMode (store) {
  11012. store._vm.$watch(function () { return this._data.$$state }, function () {
  11013. if ((true)) {
  11014. assert(store._committing, "do not mutate vuex store state outside mutation handlers.");
  11015. }
  11016. }, { deep: true, sync: true });
  11017. }
  11018. function getNestedState (state, path) {
  11019. return path.reduce(function (state, key) { return state[key]; }, state)
  11020. }
  11021. function unifyObjectStyle (type, payload, options) {
  11022. if (isObject(type) && type.type) {
  11023. options = payload;
  11024. payload = type;
  11025. type = type.type;
  11026. }
  11027. if ((true)) {
  11028. assert(typeof type === 'string', ("expects string as the type, but found " + (typeof type) + "."));
  11029. }
  11030. return { type: type, payload: payload, options: options }
  11031. }
  11032. function install (_Vue) {
  11033. if (Vue && _Vue === Vue) {
  11034. if ((true)) {
  11035. console.error(
  11036. '[vuex] already installed. Vue.use(Vuex) should be called only once.'
  11037. );
  11038. }
  11039. return
  11040. }
  11041. Vue = _Vue;
  11042. applyMixin(Vue);
  11043. }
  11044. /**
  11045. * Reduce the code which written in Vue.js for getting the state.
  11046. * @param {String} [namespace] - Module's namespace
  11047. * @param {Object|Array} states # Object's item can be a function which accept state and getters for param, you can do something for state and getters in it.
  11048. * @param {Object}
  11049. */
  11050. var mapState = normalizeNamespace(function (namespace, states) {
  11051. var res = {};
  11052. if (( true) && !isValidMap(states)) {
  11053. console.error('[vuex] mapState: mapper parameter must be either an Array or an Object');
  11054. }
  11055. normalizeMap(states).forEach(function (ref) {
  11056. var key = ref.key;
  11057. var val = ref.val;
  11058. res[key] = function mappedState () {
  11059. var state = this.$store.state;
  11060. var getters = this.$store.getters;
  11061. if (namespace) {
  11062. var module = getModuleByNamespace(this.$store, 'mapState', namespace);
  11063. if (!module) {
  11064. return
  11065. }
  11066. state = module.context.state;
  11067. getters = module.context.getters;
  11068. }
  11069. return typeof val === 'function'
  11070. ? val.call(this, state, getters)
  11071. : state[val]
  11072. };
  11073. // mark vuex getter for devtools
  11074. res[key].vuex = true;
  11075. });
  11076. return res
  11077. });
  11078. /**
  11079. * Reduce the code which written in Vue.js for committing the mutation
  11080. * @param {String} [namespace] - Module's namespace
  11081. * @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept another params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function.
  11082. * @return {Object}
  11083. */
  11084. var mapMutations = normalizeNamespace(function (namespace, mutations) {
  11085. var res = {};
  11086. if (( true) && !isValidMap(mutations)) {
  11087. console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object');
  11088. }
  11089. normalizeMap(mutations).forEach(function (ref) {
  11090. var key = ref.key;
  11091. var val = ref.val;
  11092. res[key] = function mappedMutation () {
  11093. var args = [], len = arguments.length;
  11094. while ( len-- ) args[ len ] = arguments[ len ];
  11095. // Get the commit method from store
  11096. var commit = this.$store.commit;
  11097. if (namespace) {
  11098. var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
  11099. if (!module) {
  11100. return
  11101. }
  11102. commit = module.context.commit;
  11103. }
  11104. return typeof val === 'function'
  11105. ? val.apply(this, [commit].concat(args))
  11106. : commit.apply(this.$store, [val].concat(args))
  11107. };
  11108. });
  11109. return res
  11110. });
  11111. /**
  11112. * Reduce the code which written in Vue.js for getting the getters
  11113. * @param {String} [namespace] - Module's namespace
  11114. * @param {Object|Array} getters
  11115. * @return {Object}
  11116. */
  11117. var mapGetters = normalizeNamespace(function (namespace, getters) {
  11118. var res = {};
  11119. if (( true) && !isValidMap(getters)) {
  11120. console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object');
  11121. }
  11122. normalizeMap(getters).forEach(function (ref) {
  11123. var key = ref.key;
  11124. var val = ref.val;
  11125. // The namespace has been mutated by normalizeNamespace
  11126. val = namespace + val;
  11127. res[key] = function mappedGetter () {
  11128. if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
  11129. return
  11130. }
  11131. if (( true) && !(val in this.$store.getters)) {
  11132. console.error(("[vuex] unknown getter: " + val));
  11133. return
  11134. }
  11135. return this.$store.getters[val]
  11136. };
  11137. // mark vuex getter for devtools
  11138. res[key].vuex = true;
  11139. });
  11140. return res
  11141. });
  11142. /**
  11143. * Reduce the code which written in Vue.js for dispatch the action
  11144. * @param {String} [namespace] - Module's namespace
  11145. * @param {Object|Array} actions # Object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. You can dispatch action and do any other things in this function. specially, You need to pass anthor params from the mapped function.
  11146. * @return {Object}
  11147. */
  11148. var mapActions = normalizeNamespace(function (namespace, actions) {
  11149. var res = {};
  11150. if (( true) && !isValidMap(actions)) {
  11151. console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object');
  11152. }
  11153. normalizeMap(actions).forEach(function (ref) {
  11154. var key = ref.key;
  11155. var val = ref.val;
  11156. res[key] = function mappedAction () {
  11157. var args = [], len = arguments.length;
  11158. while ( len-- ) args[ len ] = arguments[ len ];
  11159. // get dispatch function from store
  11160. var dispatch = this.$store.dispatch;
  11161. if (namespace) {
  11162. var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
  11163. if (!module) {
  11164. return
  11165. }
  11166. dispatch = module.context.dispatch;
  11167. }
  11168. return typeof val === 'function'
  11169. ? val.apply(this, [dispatch].concat(args))
  11170. : dispatch.apply(this.$store, [val].concat(args))
  11171. };
  11172. });
  11173. return res
  11174. });
  11175. /**
  11176. * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object
  11177. * @param {String} namespace
  11178. * @return {Object}
  11179. */
  11180. var createNamespacedHelpers = function (namespace) { return ({
  11181. mapState: mapState.bind(null, namespace),
  11182. mapGetters: mapGetters.bind(null, namespace),
  11183. mapMutations: mapMutations.bind(null, namespace),
  11184. mapActions: mapActions.bind(null, namespace)
  11185. }); };
  11186. /**
  11187. * Normalize the map
  11188. * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]
  11189. * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]
  11190. * @param {Array|Object} map
  11191. * @return {Object}
  11192. */
  11193. function normalizeMap (map) {
  11194. if (!isValidMap(map)) {
  11195. return []
  11196. }
  11197. return Array.isArray(map)
  11198. ? map.map(function (key) { return ({ key: key, val: key }); })
  11199. : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })
  11200. }
  11201. /**
  11202. * Validate whether given map is valid or not
  11203. * @param {*} map
  11204. * @return {Boolean}
  11205. */
  11206. function isValidMap (map) {
  11207. return Array.isArray(map) || isObject(map)
  11208. }
  11209. /**
  11210. * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map.
  11211. * @param {Function} fn
  11212. * @return {Function}
  11213. */
  11214. function normalizeNamespace (fn) {
  11215. return function (namespace, map) {
  11216. if (typeof namespace !== 'string') {
  11217. map = namespace;
  11218. namespace = '';
  11219. } else if (namespace.charAt(namespace.length - 1) !== '/') {
  11220. namespace += '/';
  11221. }
  11222. return fn(namespace, map)
  11223. }
  11224. }
  11225. /**
  11226. * Search a special module from store by namespace. if module not exist, print error message.
  11227. * @param {Object} store
  11228. * @param {String} helper
  11229. * @param {String} namespace
  11230. * @return {Object}
  11231. */
  11232. function getModuleByNamespace (store, helper, namespace) {
  11233. var module = store._modulesNamespaceMap[namespace];
  11234. if (( true) && !module) {
  11235. console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace));
  11236. }
  11237. return module
  11238. }
  11239. // Credits: borrowed code from fcomb/redux-logger
  11240. function createLogger (ref) {
  11241. if ( ref === void 0 ) ref = {};
  11242. var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;
  11243. var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };
  11244. var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };
  11245. var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };
  11246. var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };
  11247. var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };
  11248. var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;
  11249. var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;
  11250. var logger = ref.logger; if ( logger === void 0 ) logger = console;
  11251. return function (store) {
  11252. var prevState = deepCopy(store.state);
  11253. if (typeof logger === 'undefined') {
  11254. return
  11255. }
  11256. if (logMutations) {
  11257. store.subscribe(function (mutation, state) {
  11258. var nextState = deepCopy(state);
  11259. if (filter(mutation, prevState, nextState)) {
  11260. var formattedTime = getFormattedTime();
  11261. var formattedMutation = mutationTransformer(mutation);
  11262. var message = "mutation " + (mutation.type) + formattedTime;
  11263. startMessage(logger, message, collapsed);
  11264. logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));
  11265. logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);
  11266. logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));
  11267. endMessage(logger);
  11268. }
  11269. prevState = nextState;
  11270. });
  11271. }
  11272. if (logActions) {
  11273. store.subscribeAction(function (action, state) {
  11274. if (actionFilter(action, state)) {
  11275. var formattedTime = getFormattedTime();
  11276. var formattedAction = actionTransformer(action);
  11277. var message = "action " + (action.type) + formattedTime;
  11278. startMessage(logger, message, collapsed);
  11279. logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);
  11280. endMessage(logger);
  11281. }
  11282. });
  11283. }
  11284. }
  11285. }
  11286. function startMessage (logger, message, collapsed) {
  11287. var startMessage = collapsed
  11288. ? logger.groupCollapsed
  11289. : logger.group;
  11290. // render
  11291. try {
  11292. startMessage.call(logger, message);
  11293. } catch (e) {
  11294. logger.log(message);
  11295. }
  11296. }
  11297. function endMessage (logger) {
  11298. try {
  11299. logger.groupEnd();
  11300. } catch (e) {
  11301. logger.log('—— log end ——');
  11302. }
  11303. }
  11304. function getFormattedTime () {
  11305. var time = new Date();
  11306. return (" @ " + (pad(time.getHours(), 2)) + ":" + (pad(time.getMinutes(), 2)) + ":" + (pad(time.getSeconds(), 2)) + "." + (pad(time.getMilliseconds(), 3)))
  11307. }
  11308. function repeat (str, times) {
  11309. return (new Array(times + 1)).join(str)
  11310. }
  11311. function pad (num, maxLength) {
  11312. return repeat('0', maxLength - num.toString().length) + num
  11313. }
  11314. var index_cjs = {
  11315. Store: Store,
  11316. install: install,
  11317. version: '3.6.2',
  11318. mapState: mapState,
  11319. mapMutations: mapMutations,
  11320. mapGetters: mapGetters,
  11321. mapActions: mapActions,
  11322. createNamespacedHelpers: createNamespacedHelpers,
  11323. createLogger: createLogger
  11324. };
  11325. module.exports = index_cjs;
  11326. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  11327. /***/ }),
  11328. /***/ 42:
  11329. /*!*************************************************************!*\
  11330. !*** E:/work/Project_newGit/UniappShell/api/system/user.js ***!
  11331. \*************************************************************/
  11332. /*! no static exports found */
  11333. /***/ (function(module, exports, __webpack_require__) {
  11334. "use strict";
  11335. Object.defineProperty(exports, "__esModule", {
  11336. value: true
  11337. });
  11338. exports.getUserInfo = getUserInfo;
  11339. exports.getUserList = getUserList;
  11340. exports.getUserProfile = getUserProfile;
  11341. exports.login = login;
  11342. exports.logout = logout;
  11343. exports.register = register;
  11344. exports.updatePwd = updatePwd;
  11345. exports.updateUserProfile = updateUserProfile;
  11346. exports.uploadFile = uploadFile;
  11347. exports.wxWorkLogin = wxWorkLogin;
  11348. var _request = __webpack_require__(/*! @/libs/request.js */ 43);
  11349. function login(data) {
  11350. return (0, _request.request)({
  11351. url: '/login',
  11352. method: 'post',
  11353. header: {
  11354. 'content-type': "application/x-www-form-urlencoded"
  11355. },
  11356. data: data
  11357. });
  11358. }
  11359. // 获取用户基本信息
  11360. function getUserProfile() {
  11361. return (0, _request.request)({
  11362. url: '/user/profile',
  11363. method: 'GET'
  11364. });
  11365. }
  11366. // 更新用户基本信息
  11367. function updateUserProfile(data) {
  11368. return (0, _request.request)({
  11369. url: '/user/profile/update',
  11370. method: 'PUT',
  11371. data: data
  11372. });
  11373. }
  11374. function getUserInfo() {
  11375. return (0, _request.request)({
  11376. url: '/user/profile'
  11377. });
  11378. }
  11379. function logout() {
  11380. return (0, _request.request)({
  11381. url: '/logout',
  11382. method: 'GET'
  11383. });
  11384. }
  11385. function register(data) {
  11386. return (0, _request.request)({
  11387. url: '/user/register',
  11388. method: 'post',
  11389. data: data
  11390. });
  11391. }
  11392. /**公用上传接口 */
  11393. function uploadFile(data) {
  11394. return (0, _request.request)({
  11395. url: '/upload/file',
  11396. method: "post",
  11397. headers: {
  11398. 'Content-Type': 'multipart/form-data'
  11399. },
  11400. data: data
  11401. });
  11402. }
  11403. function updatePwd(data) {
  11404. return (0, _request.request)({
  11405. url: '/user/updatePassword',
  11406. method: "PUT",
  11407. data: data
  11408. });
  11409. }
  11410. //查询用户的带岗位
  11411. function getUserList() {
  11412. return (0, _request.request)({
  11413. url: '/user/select',
  11414. method: 'get'
  11415. });
  11416. }
  11417. //企业微信登录
  11418. function wxWorkLogin(_ref) {
  11419. var userId = _ref.userId,
  11420. code = _ref.code;
  11421. return (0, _request.request)({
  11422. url: "/user/updateWxUserId/".concat(userId, "/").concat(code),
  11423. method: 'post'
  11424. });
  11425. }
  11426. /***/ }),
  11427. /***/ 43:
  11428. /*!**********************************************************!*\
  11429. !*** E:/work/Project_newGit/UniappShell/libs/request.js ***!
  11430. \**********************************************************/
  11431. /*! no static exports found */
  11432. /***/ (function(module, exports, __webpack_require__) {
  11433. "use strict";
  11434. /* WEBPACK VAR INJECTION */(function(uni) {
  11435. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  11436. Object.defineProperty(exports, "__esModule", {
  11437. value: true
  11438. });
  11439. exports.request = request;
  11440. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 44));
  11441. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  11442. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 46));
  11443. var _index = _interopRequireDefault(__webpack_require__(/*! @/config/index.js */ 47));
  11444. var _auth = __webpack_require__(/*! @/libs/auth.js */ 48);
  11445. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  11446. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  11447. var baseUrl = true ? _index.default.base.dev : undefined;
  11448. function request(_x) {
  11449. return _request.apply(this, arguments);
  11450. }
  11451. function _request() {
  11452. _request = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(params) {
  11453. return _regenerator.default.wrap(function _callee$(_context) {
  11454. while (1) {
  11455. switch (_context.prev = _context.next) {
  11456. case 0:
  11457. return _context.abrupt("return", new Promise(function (resolve, reject) {
  11458. try {
  11459. uni.showLoading({
  11460. title: '加载中',
  11461. mask: true
  11462. });
  11463. uni.request(_objectSpread(_objectSpread({}, formatRequestBody(params)), {}, {
  11464. success: function success(response) {
  11465. var data = response.data;
  11466. var code = data.code;
  11467. var msg = data.msg;
  11468. if (code === 200) {
  11469. resolve(data);
  11470. } else {
  11471. if (code === 401) {
  11472. uni.showToast({
  11473. title: "登录失效!",
  11474. mask: true,
  11475. icon: "none",
  11476. duration: 3000,
  11477. complete: function complete() {
  11478. // let pages=getCurrentPages()
  11479. // console.log({
  11480. // page:pages[pages.length-1].$route.fullPath
  11481. // })
  11482. // let qrcode=uni.getStorageSync('qrcode')
  11483. // if(qrcode){uni.setStorageSync('qrcode',qrcode)}
  11484. uni.clearStorageSync();
  11485. setTimeout(function () {
  11486. uni.reLaunch({
  11487. url: '/pages/login/index'
  11488. });
  11489. }, 3000);
  11490. }
  11491. });
  11492. } else {
  11493. reject(data);
  11494. uni.showToast({
  11495. title: msg,
  11496. mask: true,
  11497. duration: 3000,
  11498. icon: "none"
  11499. });
  11500. }
  11501. }
  11502. },
  11503. fail: function fail(res) {
  11504. uni.showToast({
  11505. title: res,
  11506. mask: true,
  11507. icon: "none"
  11508. });
  11509. reject(res);
  11510. },
  11511. complete: function complete(res) {
  11512. uni.hideLoading();
  11513. }
  11514. }));
  11515. } catch (err) {
  11516. console.log(err);
  11517. reject(err);
  11518. }
  11519. }));
  11520. case 1:
  11521. case "end":
  11522. return _context.stop();
  11523. }
  11524. }
  11525. }, _callee);
  11526. }));
  11527. return _request.apply(this, arguments);
  11528. }
  11529. function formatRequestBody(params) {
  11530. var url = params.url;
  11531. url = baseUrl + url;
  11532. var data = _objectSpread({}, params.data);
  11533. var header = _objectSpread(_objectSpread({}, params.header), {}, {
  11534. AppID: _index.default.appID,
  11535. AppKey: _index.default.appKey,
  11536. AppSecret: _index.default.appSecret
  11537. });
  11538. if ((0, _auth.getToken)()) {
  11539. header[_index.default.TokenKey] = (0, _auth.getToken)();
  11540. }
  11541. var method = params.method || "get";
  11542. var dataType = params.dataType || "json";
  11543. var requestBody = {
  11544. url: url,
  11545. data: data,
  11546. header: header,
  11547. method: method,
  11548. dataType: dataType
  11549. };
  11550. return requestBody;
  11551. }
  11552. ;
  11553. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  11554. /***/ }),
  11555. /***/ 44:
  11556. /*!************************************************************************************************!*\
  11557. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/@babel/runtime/regenerator/index.js ***!
  11558. \************************************************************************************************/
  11559. /*! no static exports found */
  11560. /***/ (function(module, exports, __webpack_require__) {
  11561. // TODO(Babel 8): Remove this file.
  11562. var runtime = __webpack_require__(/*! @babel/runtime/helpers/regeneratorRuntime */ 45)();
  11563. module.exports = runtime;
  11564. /***/ }),
  11565. /***/ 45:
  11566. /*!*******************************************************************!*\
  11567. !*** ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
  11568. \*******************************************************************/
  11569. /*! no static exports found */
  11570. /***/ (function(module, exports, __webpack_require__) {
  11571. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  11572. function _regeneratorRuntime() {
  11573. "use strict";
  11574. /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
  11575. module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
  11576. return exports;
  11577. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11578. var exports = {},
  11579. Op = Object.prototype,
  11580. hasOwn = Op.hasOwnProperty,
  11581. defineProperty = Object.defineProperty || function (obj, key, desc) {
  11582. obj[key] = desc.value;
  11583. },
  11584. $Symbol = "function" == typeof Symbol ? Symbol : {},
  11585. iteratorSymbol = $Symbol.iterator || "@@iterator",
  11586. asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
  11587. toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  11588. function define(obj, key, value) {
  11589. return Object.defineProperty(obj, key, {
  11590. value: value,
  11591. enumerable: !0,
  11592. configurable: !0,
  11593. writable: !0
  11594. }), obj[key];
  11595. }
  11596. try {
  11597. define({}, "");
  11598. } catch (err) {
  11599. define = function define(obj, key, value) {
  11600. return obj[key] = value;
  11601. };
  11602. }
  11603. function wrap(innerFn, outerFn, self, tryLocsList) {
  11604. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
  11605. generator = Object.create(protoGenerator.prototype),
  11606. context = new Context(tryLocsList || []);
  11607. return defineProperty(generator, "_invoke", {
  11608. value: makeInvokeMethod(innerFn, self, context)
  11609. }), generator;
  11610. }
  11611. function tryCatch(fn, obj, arg) {
  11612. try {
  11613. return {
  11614. type: "normal",
  11615. arg: fn.call(obj, arg)
  11616. };
  11617. } catch (err) {
  11618. return {
  11619. type: "throw",
  11620. arg: err
  11621. };
  11622. }
  11623. }
  11624. exports.wrap = wrap;
  11625. var ContinueSentinel = {};
  11626. function Generator() {}
  11627. function GeneratorFunction() {}
  11628. function GeneratorFunctionPrototype() {}
  11629. var IteratorPrototype = {};
  11630. define(IteratorPrototype, iteratorSymbol, function () {
  11631. return this;
  11632. });
  11633. var getProto = Object.getPrototypeOf,
  11634. NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  11635. NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
  11636. var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
  11637. function defineIteratorMethods(prototype) {
  11638. ["next", "throw", "return"].forEach(function (method) {
  11639. define(prototype, method, function (arg) {
  11640. return this._invoke(method, arg);
  11641. });
  11642. });
  11643. }
  11644. function AsyncIterator(generator, PromiseImpl) {
  11645. function invoke(method, arg, resolve, reject) {
  11646. var record = tryCatch(generator[method], generator, arg);
  11647. if ("throw" !== record.type) {
  11648. var result = record.arg,
  11649. value = result.value;
  11650. return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
  11651. invoke("next", value, resolve, reject);
  11652. }, function (err) {
  11653. invoke("throw", err, resolve, reject);
  11654. }) : PromiseImpl.resolve(value).then(function (unwrapped) {
  11655. result.value = unwrapped, resolve(result);
  11656. }, function (error) {
  11657. return invoke("throw", error, resolve, reject);
  11658. });
  11659. }
  11660. reject(record.arg);
  11661. }
  11662. var previousPromise;
  11663. defineProperty(this, "_invoke", {
  11664. value: function value(method, arg) {
  11665. function callInvokeWithMethodAndArg() {
  11666. return new PromiseImpl(function (resolve, reject) {
  11667. invoke(method, arg, resolve, reject);
  11668. });
  11669. }
  11670. return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
  11671. }
  11672. });
  11673. }
  11674. function makeInvokeMethod(innerFn, self, context) {
  11675. var state = "suspendedStart";
  11676. return function (method, arg) {
  11677. if ("executing" === state) throw new Error("Generator is already running");
  11678. if ("completed" === state) {
  11679. if ("throw" === method) throw arg;
  11680. return doneResult();
  11681. }
  11682. for (context.method = method, context.arg = arg;;) {
  11683. var delegate = context.delegate;
  11684. if (delegate) {
  11685. var delegateResult = maybeInvokeDelegate(delegate, context);
  11686. if (delegateResult) {
  11687. if (delegateResult === ContinueSentinel) continue;
  11688. return delegateResult;
  11689. }
  11690. }
  11691. if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
  11692. if ("suspendedStart" === state) throw state = "completed", context.arg;
  11693. context.dispatchException(context.arg);
  11694. } else "return" === context.method && context.abrupt("return", context.arg);
  11695. state = "executing";
  11696. var record = tryCatch(innerFn, self, context);
  11697. if ("normal" === record.type) {
  11698. if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
  11699. return {
  11700. value: record.arg,
  11701. done: context.done
  11702. };
  11703. }
  11704. "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
  11705. }
  11706. };
  11707. }
  11708. function maybeInvokeDelegate(delegate, context) {
  11709. var methodName = context.method,
  11710. method = delegate.iterator[methodName];
  11711. if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
  11712. var record = tryCatch(method, delegate.iterator, context.arg);
  11713. if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
  11714. var info = record.arg;
  11715. return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
  11716. }
  11717. function pushTryEntry(locs) {
  11718. var entry = {
  11719. tryLoc: locs[0]
  11720. };
  11721. 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
  11722. }
  11723. function resetTryEntry(entry) {
  11724. var record = entry.completion || {};
  11725. record.type = "normal", delete record.arg, entry.completion = record;
  11726. }
  11727. function Context(tryLocsList) {
  11728. this.tryEntries = [{
  11729. tryLoc: "root"
  11730. }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
  11731. }
  11732. function values(iterable) {
  11733. if (iterable) {
  11734. var iteratorMethod = iterable[iteratorSymbol];
  11735. if (iteratorMethod) return iteratorMethod.call(iterable);
  11736. if ("function" == typeof iterable.next) return iterable;
  11737. if (!isNaN(iterable.length)) {
  11738. var i = -1,
  11739. next = function next() {
  11740. for (; ++i < iterable.length;) {
  11741. if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
  11742. }
  11743. return next.value = undefined, next.done = !0, next;
  11744. };
  11745. return next.next = next;
  11746. }
  11747. }
  11748. return {
  11749. next: doneResult
  11750. };
  11751. }
  11752. function doneResult() {
  11753. return {
  11754. value: undefined,
  11755. done: !0
  11756. };
  11757. }
  11758. return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
  11759. value: GeneratorFunctionPrototype,
  11760. configurable: !0
  11761. }), defineProperty(GeneratorFunctionPrototype, "constructor", {
  11762. value: GeneratorFunction,
  11763. configurable: !0
  11764. }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
  11765. var ctor = "function" == typeof genFun && genFun.constructor;
  11766. return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
  11767. }, exports.mark = function (genFun) {
  11768. return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
  11769. }, exports.awrap = function (arg) {
  11770. return {
  11771. __await: arg
  11772. };
  11773. }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
  11774. return this;
  11775. }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
  11776. void 0 === PromiseImpl && (PromiseImpl = Promise);
  11777. var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
  11778. return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
  11779. return result.done ? result.value : iter.next();
  11780. });
  11781. }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
  11782. return this;
  11783. }), define(Gp, "toString", function () {
  11784. return "[object Generator]";
  11785. }), exports.keys = function (val) {
  11786. var object = Object(val),
  11787. keys = [];
  11788. for (var key in object) {
  11789. keys.push(key);
  11790. }
  11791. return keys.reverse(), function next() {
  11792. for (; keys.length;) {
  11793. var key = keys.pop();
  11794. if (key in object) return next.value = key, next.done = !1, next;
  11795. }
  11796. return next.done = !0, next;
  11797. };
  11798. }, exports.values = values, Context.prototype = {
  11799. constructor: Context,
  11800. reset: function reset(skipTempReset) {
  11801. if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {
  11802. "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
  11803. }
  11804. },
  11805. stop: function stop() {
  11806. this.done = !0;
  11807. var rootRecord = this.tryEntries[0].completion;
  11808. if ("throw" === rootRecord.type) throw rootRecord.arg;
  11809. return this.rval;
  11810. },
  11811. dispatchException: function dispatchException(exception) {
  11812. if (this.done) throw exception;
  11813. var context = this;
  11814. function handle(loc, caught) {
  11815. return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
  11816. }
  11817. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  11818. var entry = this.tryEntries[i],
  11819. record = entry.completion;
  11820. if ("root" === entry.tryLoc) return handle("end");
  11821. if (entry.tryLoc <= this.prev) {
  11822. var hasCatch = hasOwn.call(entry, "catchLoc"),
  11823. hasFinally = hasOwn.call(entry, "finallyLoc");
  11824. if (hasCatch && hasFinally) {
  11825. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  11826. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  11827. } else if (hasCatch) {
  11828. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  11829. } else {
  11830. if (!hasFinally) throw new Error("try statement without catch or finally");
  11831. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  11832. }
  11833. }
  11834. }
  11835. },
  11836. abrupt: function abrupt(type, arg) {
  11837. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  11838. var entry = this.tryEntries[i];
  11839. if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
  11840. var finallyEntry = entry;
  11841. break;
  11842. }
  11843. }
  11844. finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
  11845. var record = finallyEntry ? finallyEntry.completion : {};
  11846. return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
  11847. },
  11848. complete: function complete(record, afterLoc) {
  11849. if ("throw" === record.type) throw record.arg;
  11850. return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
  11851. },
  11852. finish: function finish(finallyLoc) {
  11853. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  11854. var entry = this.tryEntries[i];
  11855. if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
  11856. }
  11857. },
  11858. "catch": function _catch(tryLoc) {
  11859. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  11860. var entry = this.tryEntries[i];
  11861. if (entry.tryLoc === tryLoc) {
  11862. var record = entry.completion;
  11863. if ("throw" === record.type) {
  11864. var thrown = record.arg;
  11865. resetTryEntry(entry);
  11866. }
  11867. return thrown;
  11868. }
  11869. }
  11870. throw new Error("illegal catch attempt");
  11871. },
  11872. delegateYield: function delegateYield(iterable, resultName, nextLoc) {
  11873. return this.delegate = {
  11874. iterator: values(iterable),
  11875. resultName: resultName,
  11876. nextLoc: nextLoc
  11877. }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
  11878. }
  11879. }, exports;
  11880. }
  11881. module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11882. /***/ }),
  11883. /***/ 46:
  11884. /*!*****************************************************************!*\
  11885. !*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
  11886. \*****************************************************************/
  11887. /*! no static exports found */
  11888. /***/ (function(module, exports) {
  11889. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  11890. try {
  11891. var info = gen[key](arg);
  11892. var value = info.value;
  11893. } catch (error) {
  11894. reject(error);
  11895. return;
  11896. }
  11897. if (info.done) {
  11898. resolve(value);
  11899. } else {
  11900. Promise.resolve(value).then(_next, _throw);
  11901. }
  11902. }
  11903. function _asyncToGenerator(fn) {
  11904. return function () {
  11905. var self = this,
  11906. args = arguments;
  11907. return new Promise(function (resolve, reject) {
  11908. var gen = fn.apply(self, args);
  11909. function _next(value) {
  11910. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
  11911. }
  11912. function _throw(err) {
  11913. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  11914. }
  11915. _next(undefined);
  11916. });
  11917. };
  11918. }
  11919. module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11920. /***/ }),
  11921. /***/ 47:
  11922. /*!**********************************************************!*\
  11923. !*** E:/work/Project_newGit/UniappShell/config/index.js ***!
  11924. \**********************************************************/
  11925. /*! no static exports found */
  11926. /***/ (function(module, exports, __webpack_require__) {
  11927. "use strict";
  11928. Object.defineProperty(exports, "__esModule", {
  11929. value: true
  11930. });
  11931. exports.default = void 0;
  11932. var _default = {
  11933. base: {
  11934. // dev: 'http://1.15.92.205:7001',
  11935. dev: 'https://api.xazhyc.com',
  11936. // dev: 'http://192.168.3.253:7001',
  11937. pro: 'https://api.xazhyc.com'
  11938. },
  11939. appID: '10007',
  11940. appKey: '82a8bf439373e311',
  11941. appSecret: '82a8bf439373e311',
  11942. permitTplId: 7,
  11943. TokenKey: "Authorization"
  11944. };
  11945. exports.default = _default;
  11946. /***/ }),
  11947. /***/ 48:
  11948. /*!*******************************************************!*\
  11949. !*** E:/work/Project_newGit/UniappShell/libs/auth.js ***!
  11950. \*******************************************************/
  11951. /*! no static exports found */
  11952. /***/ (function(module, exports, __webpack_require__) {
  11953. "use strict";
  11954. /* WEBPACK VAR INJECTION */(function(uni) {
  11955. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  11956. Object.defineProperty(exports, "__esModule", {
  11957. value: true
  11958. });
  11959. exports.getToken = getToken;
  11960. exports.removeToken = removeToken;
  11961. exports.setToken = setToken;
  11962. var _index = _interopRequireDefault(__webpack_require__(/*! ../config/index.js */ 47));
  11963. var TokenKey = _index.default.TokenKey;
  11964. function getToken() {
  11965. return uni.getStorageSync(TokenKey);
  11966. }
  11967. function setToken(token) {
  11968. return uni.setStorageSync(TokenKey, token);
  11969. }
  11970. function removeToken() {
  11971. return uni.removeStorageSync(TokenKey);
  11972. }
  11973. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  11974. /***/ }),
  11975. /***/ 5:
  11976. /*!**************************************************************!*\
  11977. !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
  11978. \**************************************************************/
  11979. /*! no static exports found */
  11980. /***/ (function(module, exports, __webpack_require__) {
  11981. var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ 6);
  11982. var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ 7);
  11983. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  11984. var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ 10);
  11985. function _slicedToArray(arr, i) {
  11986. return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
  11987. }
  11988. module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11989. /***/ }),
  11990. /***/ 57:
  11991. /*!************************************************************!*\
  11992. !*** E:/work/Project_newGit/UniappShell/api/system/art.js ***!
  11993. \************************************************************/
  11994. /*! no static exports found */
  11995. /***/ (function(module, exports, __webpack_require__) {
  11996. "use strict";
  11997. Object.defineProperty(exports, "__esModule", {
  11998. value: true
  11999. });
  12000. exports.getArtByList = getArtByList;
  12001. exports.getArtByPage = getArtByPage;
  12002. exports.getArtCatTop = getArtCatTop;
  12003. exports.getNotices = getNotices;
  12004. exports.getRecentArtByList = getRecentArtByList;
  12005. exports.getRecentListByArtCatAndLimit = getRecentListByArtCatAndLimit;
  12006. exports.getRecentListByLimit = getRecentListByLimit;
  12007. var _request = __webpack_require__(/*! @/libs/request.js */ 43);
  12008. function getNotices(data) {
  12009. return (0, _request.request)({
  12010. url: "/art/page",
  12011. data: data
  12012. });
  12013. }
  12014. /**
  12015. * 最近文章列表:50笔
  12016. * @param data
  12017. */
  12018. function getRecentArtByList(data) {
  12019. return (0, _request.request)({
  12020. url: '/art/recent',
  12021. method: 'GET',
  12022. data: data
  12023. });
  12024. }
  12025. /**
  12026. * 获取获取第1层文章分类
  12027. * @param data
  12028. * @returns
  12029. */
  12030. function getArtCatTop(data) {
  12031. return (0, _request.request)({
  12032. url: '/art/cat/top',
  12033. method: 'GET',
  12034. data: data
  12035. });
  12036. }
  12037. /**
  12038. * 文章列表
  12039. * @param data
  12040. */
  12041. function getArtByList(data) {
  12042. return (0, _request.request)({
  12043. url: '/art',
  12044. method: 'GET',
  12045. data: data
  12046. });
  12047. }
  12048. /**
  12049. * 文章列表
  12050. * @param data
  12051. */
  12052. function getArtByPage(data) {
  12053. return (0, _request.request)({
  12054. url: '/art/page',
  12055. method: 'GET',
  12056. data: data
  12057. });
  12058. }
  12059. /**
  12060. * 最近文章列表
  12061. * @param limit 限制笔数
  12062. */
  12063. function getRecentListByLimit(limit) {
  12064. return (0, _request.request)({
  12065. url: "/art/recent/".concat(limit),
  12066. method: 'GET'
  12067. });
  12068. }
  12069. /**
  12070. * 某个类别下的最近文章列表
  12071. * @param artCatId 分类
  12072. * @param limit 限制笔数
  12073. */
  12074. function getRecentListByArtCatAndLimit(artCatId, limit) {
  12075. return (0, _request.request)({
  12076. url: "/art/recent/".concat(artCatId, "/").concat(limit),
  12077. method: 'GET'
  12078. });
  12079. }
  12080. /***/ }),
  12081. /***/ 58:
  12082. /*!***************************************************************!*\
  12083. !*** E:/work/Project_newGit/UniappShell/api/aqpt/alertApi.js ***!
  12084. \***************************************************************/
  12085. /*! no static exports found */
  12086. /***/ (function(module, exports, __webpack_require__) {
  12087. "use strict";
  12088. Object.defineProperty(exports, "__esModule", {
  12089. value: true
  12090. });
  12091. exports.cancelAlert = cancelAlert;
  12092. exports.completeAlert = completeAlert;
  12093. exports.counterByStatus = counterByStatus;
  12094. exports.deleteAlertById = deleteAlertById;
  12095. exports.getAlertById = getAlertById;
  12096. exports.getAlertByList = getAlertByList;
  12097. exports.getAlertByPage = getAlertByPage;
  12098. exports.getAlertCounter = getAlertCounter;
  12099. exports.getAlertWaitingByList = getAlertWaitingByList;
  12100. exports.transferAlert = transferAlert;
  12101. var _request = __webpack_require__(/*! @/libs/request.js */ 43);
  12102. /**
  12103. * 分页查询
  12104. */
  12105. function getAlertByPage(data) {
  12106. return (0, _request.request)({
  12107. url: '/alert/page',
  12108. method: 'GET',
  12109. data: data
  12110. });
  12111. }
  12112. /**
  12113. * 列表查询
  12114. */
  12115. function getAlertByList(data) {
  12116. return (0, _request.request)({
  12117. url: '/alert',
  12118. method: 'GET',
  12119. data: data
  12120. });
  12121. }
  12122. /**
  12123. * 列表查询待处理告警
  12124. */
  12125. function getAlertWaitingByList(data) {
  12126. return (0, _request.request)({
  12127. url: '/alert/waiting',
  12128. method: 'GET',
  12129. data: data
  12130. });
  12131. }
  12132. /**
  12133. * 基于ID查询Alert
  12134. */
  12135. function getAlertById(alertId) {
  12136. return (0, _request.request)({
  12137. url: "/alert/".concat(alertId),
  12138. method: 'GET'
  12139. });
  12140. }
  12141. /**
  12142. * 完成处理
  12143. * @param data
  12144. * @returns
  12145. */
  12146. function completeAlert(data) {
  12147. return (0, _request.request)({
  12148. url: "/alert/complete",
  12149. method: 'POST',
  12150. data: data
  12151. });
  12152. }
  12153. /**
  12154. * 转交他人
  12155. * @param alertId
  12156. * @param data
  12157. * @returns
  12158. */
  12159. function transferAlert(alertId, data) {
  12160. return (0, _request.request)({
  12161. url: "/alert/transfer/".concat(alertId),
  12162. method: 'POST',
  12163. data: data
  12164. });
  12165. }
  12166. /**
  12167. * 撤消
  12168. * @param alertId
  12169. * @returns
  12170. */
  12171. function cancelAlert(alertId) {
  12172. return (0, _request.request)({
  12173. url: "/alert/cancel/".concat(alertId),
  12174. method: 'GET'
  12175. });
  12176. }
  12177. /**
  12178. * 删除
  12179. */
  12180. function deleteAlertById(alertId) {
  12181. return (0, _request.request)({
  12182. url: "/alert/".concat(alertId),
  12183. method: 'DELETE'
  12184. });
  12185. }
  12186. /**
  12187. * 查询统计结果
  12188. */
  12189. function counterByStatus(data) {
  12190. return (0, _request.request)({
  12191. url: '/alert/statis/counterByStatus',
  12192. method: 'GET',
  12193. data: data
  12194. });
  12195. }
  12196. /**
  12197. * 查询统计结果
  12198. */
  12199. function getAlertCounter() {
  12200. return (0, _request.request)({
  12201. url: '/alert/statis/getCounter',
  12202. method: 'GET'
  12203. });
  12204. }
  12205. /***/ }),
  12206. /***/ 59:
  12207. /*!****************************************************************!*\
  12208. !*** E:/work/Project_newGit/UniappShell/api/aqpt/dangerApi.js ***!
  12209. \****************************************************************/
  12210. /*! no static exports found */
  12211. /***/ (function(module, exports, __webpack_require__) {
  12212. "use strict";
  12213. Object.defineProperty(exports, "__esModule", {
  12214. value: true
  12215. });
  12216. exports.deleteDangerById = deleteDangerById;
  12217. exports.getDangerById = getDangerById;
  12218. exports.getDangerByList = getDangerByList;
  12219. exports.getDangerByPage = getDangerByPage;
  12220. exports.getDangerWaitingByList = getDangerWaitingByList;
  12221. exports.getRecentDangerByList = getRecentDangerByList;
  12222. exports.handleDanger = handleDanger;
  12223. var _request = __webpack_require__(/*! @/libs/request.js */ 43);
  12224. /**
  12225. * 获取Danger列表
  12226. * @param data
  12227. * @returns
  12228. */
  12229. function getDangerByList(data) {
  12230. return (0, _request.request)({
  12231. url: '/danger',
  12232. method: 'GET',
  12233. data: data
  12234. });
  12235. }
  12236. /**
  12237. * 获取Danger列表
  12238. * @param data
  12239. * @returns
  12240. */
  12241. function getRecentDangerByList(data) {
  12242. return (0, _request.request)({
  12243. url: '/danger/recent',
  12244. method: 'GET',
  12245. data: data
  12246. });
  12247. }
  12248. /**
  12249. * 查询待处理Danger列表
  12250. * @param data
  12251. * @returns
  12252. */
  12253. function getDangerWaitingByList(data) {
  12254. return (0, _request.request)({
  12255. url: '/danger/waiting',
  12256. method: 'GET',
  12257. data: data
  12258. });
  12259. }
  12260. /**
  12261. * 获取Danger分页
  12262. * @param data
  12263. * @returns
  12264. */
  12265. function getDangerByPage(data) {
  12266. return (0, _request.request)({
  12267. url: '/danger/page',
  12268. method: 'GET',
  12269. data: data
  12270. });
  12271. }
  12272. /**
  12273. * 根据Id获取Danger
  12274. * @param dangerId
  12275. * @returns
  12276. */
  12277. function getDangerById(dangerId) {
  12278. return (0, _request.request)({
  12279. url: "/danger/".concat(dangerId),
  12280. method: 'GET'
  12281. });
  12282. }
  12283. /**
  12284. * 删除Danger
  12285. * @param dangerId
  12286. * @returns
  12287. */
  12288. function deleteDangerById(dangerId) {
  12289. return (0, _request.request)({
  12290. url: "/danger/".concat(dangerId),
  12291. method: 'DELETE'
  12292. });
  12293. }
  12294. /**
  12295. * 处理Danger
  12296. * @param data
  12297. * @returns
  12298. */
  12299. function handleDanger(data) {
  12300. return (0, _request.request)({
  12301. url: "/danger/handle",
  12302. method: 'POST',
  12303. data: data
  12304. });
  12305. }
  12306. /***/ }),
  12307. /***/ 6:
  12308. /*!***************************************************************!*\
  12309. !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
  12310. \***************************************************************/
  12311. /*! no static exports found */
  12312. /***/ (function(module, exports) {
  12313. function _arrayWithHoles(arr) {
  12314. if (Array.isArray(arr)) return arr;
  12315. }
  12316. module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  12317. /***/ }),
  12318. /***/ 60:
  12319. /*!**************************************************************!*\
  12320. !*** E:/work/Project_newGit/UniappShell/api/aqpt/taskApi.js ***!
  12321. \**************************************************************/
  12322. /*! no static exports found */
  12323. /***/ (function(module, exports, __webpack_require__) {
  12324. "use strict";
  12325. Object.defineProperty(exports, "__esModule", {
  12326. value: true
  12327. });
  12328. exports.cancelTask = cancelTask;
  12329. exports.createTask = createTask;
  12330. exports.deleteTaskById = deleteTaskById;
  12331. exports.getRecentTaskByList = getRecentTaskByList;
  12332. exports.getTaskById = getTaskById;
  12333. exports.getTaskByList = getTaskByList;
  12334. exports.getTaskByPage = getTaskByPage;
  12335. exports.getWaitingTaskByList = getWaitingTaskByList;
  12336. exports.handleTask = handleTask;
  12337. exports.transferTask = transferTask;
  12338. exports.updateTask = updateTask;
  12339. var _request = __webpack_require__(/*! @/libs/request.js */ 43);
  12340. /**
  12341. * 分页查询Task
  12342. * @param data
  12343. * @returns
  12344. */
  12345. function getTaskByPage(data) {
  12346. return (0, _request.request)({
  12347. url: '/task/page',
  12348. method: 'GET',
  12349. data: data
  12350. });
  12351. }
  12352. /**
  12353. * 列表查询Task
  12354. * @param data
  12355. * @returns
  12356. */
  12357. function getTaskByList(data) {
  12358. return (0, _request.request)({
  12359. url: '/task',
  12360. method: 'GET',
  12361. data: data
  12362. });
  12363. }
  12364. /**
  12365. * 列表查询未执行Task
  12366. * @param data
  12367. * @returns
  12368. */
  12369. function getWaitingTaskByList(data) {
  12370. return (0, _request.request)({
  12371. url: '/task/waiting',
  12372. method: 'GET',
  12373. data: data
  12374. });
  12375. }
  12376. /**
  12377. * 列表查询Task: 50笔
  12378. * @param data
  12379. * @returns
  12380. */
  12381. function getRecentTaskByList(data) {
  12382. return (0, _request.request)({
  12383. url: '/task/recent',
  12384. method: 'GET',
  12385. data: data
  12386. });
  12387. }
  12388. /**
  12389. * @param taskId
  12390. * @returns
  12391. */
  12392. function getTaskById(taskId) {
  12393. return (0, _request.request)({
  12394. url: "/task/".concat(taskId),
  12395. method: 'GET'
  12396. });
  12397. }
  12398. /**
  12399. * 添加Task
  12400. * @param data
  12401. * @returns
  12402. */
  12403. function createTask(data) {
  12404. return (0, _request.request)({
  12405. url: "/task/add",
  12406. method: 'POST',
  12407. data: data
  12408. });
  12409. }
  12410. /**
  12411. * 更新Task
  12412. * @param data
  12413. * @returns
  12414. */
  12415. function updateTask(data) {
  12416. return (0, _request.request)({
  12417. url: "/task/update",
  12418. method: 'PUT',
  12419. data: data
  12420. });
  12421. }
  12422. /**
  12423. * 删除Task
  12424. * @param taskId
  12425. * @returns
  12426. */
  12427. function deleteTaskById(taskId) {
  12428. return (0, _request.request)({
  12429. url: "/task/".concat(taskId),
  12430. method: 'DELETE'
  12431. });
  12432. }
  12433. /**
  12434. * Handle Task
  12435. * @param taskId
  12436. * @returns
  12437. */
  12438. function handleTask(taskId) {
  12439. return (0, _request.request)({
  12440. url: "/task/handle/".concat(taskId),
  12441. method: 'PUT'
  12442. });
  12443. }
  12444. /**
  12445. * Transfer Task
  12446. * @param data
  12447. * @returns
  12448. */
  12449. function transferTask(data) {
  12450. return (0, _request.request)({
  12451. url: "/task/transfer",
  12452. method: 'PUT',
  12453. data: data
  12454. });
  12455. }
  12456. /**
  12457. * Cancel Task
  12458. * @param taskId
  12459. * @returns
  12460. */
  12461. function cancelTask(taskId) {
  12462. return (0, _request.request)({
  12463. url: "/task/cancel/".concat(taskId),
  12464. method: 'PUT'
  12465. });
  12466. }
  12467. /***/ }),
  12468. /***/ 61:
  12469. /*!*******************************************************!*\
  12470. !*** E:/work/Project_newGit/UniappShell/libs/enum.js ***!
  12471. \*******************************************************/
  12472. /*! no static exports found */
  12473. /***/ (function(module, exports, __webpack_require__) {
  12474. "use strict";
  12475. Object.defineProperty(exports, "__esModule", {
  12476. value: true
  12477. });
  12478. exports.alertLevel = alertLevel;
  12479. exports.alertStatus = alertStatus;
  12480. exports.checkResult = checkResult;
  12481. exports.dangerLevel = dangerLevel;
  12482. exports.dangerRectifyCat = dangerRectifyCat;
  12483. exports.dangerSource = dangerSource;
  12484. exports.dangerStatus = dangerStatus;
  12485. exports.rectifyCat = rectifyCat;
  12486. exports.riskLevel = riskLevel;
  12487. exports.riskPointLevel = riskPointLevel;
  12488. exports.riskPointStatus = riskPointStatus;
  12489. exports.riskType = riskType;
  12490. exports.taskPriority = taskPriority;
  12491. exports.taskStatus = taskStatus;
  12492. exports.taskType = taskType;
  12493. exports.wfInsStatus = wfInsStatus;
  12494. exports.wfTaskInsStatus = wfTaskInsStatus;
  12495. // 风险类型
  12496. function riskType(val) {
  12497. var strs = ['默认', '人', '物', '管'];
  12498. return strs[val];
  12499. }
  12500. // 风险等级
  12501. function riskLevel(val) {
  12502. var strs = ['默认', '重大', '较大', '一般', '较小'];
  12503. return strs[val];
  12504. }
  12505. // 风险等级
  12506. function riskPointStatus(val) {
  12507. var strs = ['未知', '安全受控', '失控'];
  12508. return strs[val];
  12509. }
  12510. // 风险点等级
  12511. function riskPointLevel(val) {
  12512. var strs = ['默认', '重大', '较大', '一般', '较小'];
  12513. return strs[val];
  12514. }
  12515. function taskPriority(i) {
  12516. var strs = ['未知', '较低', '普通', '紧急', '非常紧急'];
  12517. return strs[i];
  12518. }
  12519. function taskType(i) {
  12520. var strs = ['未知', '常规', '审批任务', '巡检任务'];
  12521. return strs[i];
  12522. }
  12523. function taskStatus(i) {
  12524. var strs = ['待处理', '已完成'];
  12525. if (i === -1) {
  12526. return '已撤消';
  12527. } else {
  12528. return strs[i];
  12529. }
  12530. }
  12531. function checkResult(i) {
  12532. var strs = ['没执行', '通过', '没通过', '有隐患', '已完成'];
  12533. return strs[i];
  12534. }
  12535. function dangerStatus(i) {
  12536. if (i >= 0) {
  12537. var strs = ['未开始', '处理中', '已完成'];
  12538. return strs[i];
  12539. } else {
  12540. return '已撤销';
  12541. }
  12542. }
  12543. function dangerLevel(i) {
  12544. var strs = ['未知', '重大', '较大', '严重', '一般'];
  12545. return strs[i];
  12546. }
  12547. function dangerSource(i) {
  12548. var strs = ['自查', '内部反馈', '上级抽查', '政府执法'];
  12549. return strs[i];
  12550. }
  12551. function rectifyCat(i) {
  12552. var strs = ['自行整改', '外协整改'];
  12553. return strs[i];
  12554. }
  12555. function wfInsStatus(i) {
  12556. if (i >= 0) {
  12557. var strs = ['未开始', '执行中', '已完成'];
  12558. return strs[i];
  12559. } else {
  12560. return '已撤销';
  12561. }
  12562. }
  12563. function wfTaskInsStatus(i) {
  12564. var strs = ['未开始', '已完成'];
  12565. return strs[i];
  12566. }
  12567. function dangerRectifyCat(i) {
  12568. var strs = ['自行整改', '外协整改'];
  12569. return strs[i];
  12570. }
  12571. function alertLevel(i) {
  12572. var strs = ['未知', '1级', '2级', '3级', '4级', '5级', '6级'];
  12573. return strs[i];
  12574. }
  12575. function alertStatus(i) {
  12576. if (i >= 0) {
  12577. var strs = ['待处理', '已处理'];
  12578. return strs[i];
  12579. } else {
  12580. return '已撤销';
  12581. }
  12582. }
  12583. /***/ }),
  12584. /***/ 7:
  12585. /*!*********************************************************************!*\
  12586. !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
  12587. \*********************************************************************/
  12588. /*! no static exports found */
  12589. /***/ (function(module, exports) {
  12590. function _iterableToArrayLimit(arr, i) {
  12591. var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
  12592. if (null != _i) {
  12593. var _s,
  12594. _e,
  12595. _x,
  12596. _r,
  12597. _arr = [],
  12598. _n = !0,
  12599. _d = !1;
  12600. try {
  12601. if (_x = (_i = _i.call(arr)).next, 0 === i) {
  12602. if (Object(_i) !== _i) return;
  12603. _n = !1;
  12604. } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) {
  12605. ;
  12606. }
  12607. } catch (err) {
  12608. _d = !0, _e = err;
  12609. } finally {
  12610. try {
  12611. if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
  12612. } finally {
  12613. if (_d) throw _e;
  12614. }
  12615. }
  12616. return _arr;
  12617. }
  12618. }
  12619. module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
  12620. /***/ }),
  12621. /***/ 70:
  12622. /*!************************************************************!*\
  12623. !*** E:/work/Project_newGit/UniappShell/api/system/app.js ***!
  12624. \************************************************************/
  12625. /*! no static exports found */
  12626. /***/ (function(module, exports, __webpack_require__) {
  12627. "use strict";
  12628. Object.defineProperty(exports, "__esModule", {
  12629. value: true
  12630. });
  12631. exports.getAppList = getAppList;
  12632. exports.getAppVersion = getAppVersion;
  12633. exports.getQuickList = getQuickList;
  12634. var _request = __webpack_require__(/*! @/libs/request.js */ 43);
  12635. function getAppList() {
  12636. return (0, _request.request)({
  12637. url: "/mini/store"
  12638. });
  12639. }
  12640. function getQuickList() {
  12641. return (0, _request.request)({
  12642. url: "/mini/quick"
  12643. });
  12644. }
  12645. function getAppVersion() {
  12646. return (0, _request.request)({
  12647. url: "/setting/get/appVersion"
  12648. });
  12649. }
  12650. /***/ }),
  12651. /***/ 79:
  12652. /*!********************************************************!*\
  12653. !*** E:/work/Project_newGit/UniappShell/libs/index.js ***!
  12654. \********************************************************/
  12655. /*! no static exports found */
  12656. /***/ (function(module, exports, __webpack_require__) {
  12657. "use strict";
  12658. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  12659. Object.defineProperty(exports, "__esModule", {
  12660. value: true
  12661. });
  12662. exports.MessageTimeFormat = MessageTimeFormat;
  12663. exports.addClass = addClass;
  12664. exports.byteLength = byteLength;
  12665. exports.cleanArray = cleanArray;
  12666. exports.createUniqueString = createUniqueString;
  12667. exports.debounce = debounce;
  12668. exports.deepClone = deepClone;
  12669. exports.distanceTime = distanceTime;
  12670. exports.formatTime = formatTime;
  12671. exports.getQueryObject = getQueryObject;
  12672. exports.getTime = getTime;
  12673. exports.hasClass = hasClass;
  12674. exports.html2Text = html2Text;
  12675. exports.isEmpty = isEmpty;
  12676. exports.objectMerge = objectMerge;
  12677. exports.param = param;
  12678. exports.param2Obj = param2Obj;
  12679. exports.parseTime = parseTime;
  12680. exports.removeClass = removeClass;
  12681. exports.toggleClass = toggleClass;
  12682. exports.uniqueArr = uniqueArr;
  12683. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  12684. /**
  12685. * Created by PanJiaChen on 16/11/18.
  12686. */
  12687. /**
  12688. * Parse the time to string
  12689. * @param {(Object|string|number)} time
  12690. * @param {string} cFormat
  12691. * @returns {string | null}
  12692. */
  12693. function parseTime(time, cFormat) {
  12694. if (arguments.length === 0 || !time) {
  12695. return null;
  12696. }
  12697. var format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}';
  12698. var date;
  12699. if ((0, _typeof2.default)(time) === 'object') {
  12700. date = time;
  12701. } else {
  12702. if (typeof time === 'string') {
  12703. if (/^[0-9]+$/.test(time)) {
  12704. // support "1548221490638"
  12705. time = parseInt(time);
  12706. } else {
  12707. // support safari
  12708. // https://stackoverflow.com/questions/4310953/invalid-date-in-safari
  12709. time = time.replace(new RegExp(/-/gm), '/');
  12710. }
  12711. }
  12712. if (typeof time === 'number' && time.toString().length === 10) {
  12713. time = time * 1000;
  12714. }
  12715. date = new Date(time);
  12716. }
  12717. var formatObj = {
  12718. y: date.getFullYear(),
  12719. m: date.getMonth() + 1,
  12720. d: date.getDate(),
  12721. h: date.getHours(),
  12722. i: date.getMinutes(),
  12723. s: date.getSeconds(),
  12724. a: date.getDay()
  12725. };
  12726. var time_str = format.replace(/{([ymdhisa])+}/g, function (result, key) {
  12727. var value = formatObj[key];
  12728. // Note: getDay() returns 0 on Sunday
  12729. if (key === 'a') {
  12730. return ['日', '一', '二', '三', '四', '五', '六'][value];
  12731. }
  12732. return value.toString().padStart(2, '0');
  12733. });
  12734. return time_str;
  12735. }
  12736. /**
  12737. * @param {number} time
  12738. * @param {string} option
  12739. * @returns {string}
  12740. */
  12741. function formatTime(time, option) {
  12742. if (('' + time).length === 10) {
  12743. time = parseInt(time) * 1000;
  12744. } else {
  12745. time = +time;
  12746. }
  12747. var d = new Date(time);
  12748. var now = Date.now();
  12749. var diff = (now - d) / 1000;
  12750. if (diff < 30) {
  12751. return '刚刚';
  12752. } else if (diff < 3600) {
  12753. // less 1 hour
  12754. return Math.ceil(diff / 60) + '分钟前';
  12755. } else if (diff < 3600 * 24) {
  12756. return Math.ceil(diff / 3600) + '小时前';
  12757. } else if (diff < 3600 * 24 * 2) {
  12758. return '1天前';
  12759. }
  12760. if (option) {
  12761. return parseTime(time, option);
  12762. } else {
  12763. return d.getMonth() + 1 + '月' + d.getDate() + '日' + d.getHours() + '时' + d.getMinutes() + '分';
  12764. }
  12765. }
  12766. /**
  12767. * @param {string} url
  12768. * @returns {Object}
  12769. */
  12770. function getQueryObject(url) {
  12771. url = url == null ? window.location.href : url;
  12772. var search = url.substring(url.lastIndexOf('?') + 1);
  12773. var obj = {};
  12774. var reg = /([^?&=]+)=([^?&=]*)/g;
  12775. search.replace(reg, function (rs, $1, $2) {
  12776. var name = decodeURIComponent($1);
  12777. var val = decodeURIComponent($2);
  12778. val = String(val);
  12779. obj[name] = val;
  12780. return rs;
  12781. });
  12782. return obj;
  12783. }
  12784. /**
  12785. * @param {string} input value
  12786. * @returns {number} output value
  12787. */
  12788. function byteLength(str) {
  12789. // returns the byte length of an utf8 string
  12790. var s = str.length;
  12791. for (var i = str.length - 1; i >= 0; i--) {
  12792. var code = str.charCodeAt(i);
  12793. if (code > 0x7f && code <= 0x7ff) s++;else if (code > 0x7ff && code <= 0xffff) s += 2;
  12794. if (code >= 0xDC00 && code <= 0xDFFF) i--;
  12795. }
  12796. return s;
  12797. }
  12798. /**
  12799. * @param {Array} actual
  12800. * @returns {Array}
  12801. */
  12802. function cleanArray(actual) {
  12803. var newArray = [];
  12804. for (var i = 0; i < actual.length; i++) {
  12805. if (actual[i]) {
  12806. newArray.push(actual[i]);
  12807. }
  12808. }
  12809. return newArray;
  12810. }
  12811. /**
  12812. * @param {Object} json
  12813. * @returns {Array}
  12814. */
  12815. function param(json) {
  12816. if (!json) return '';
  12817. return cleanArray(Object.keys(json).map(function (key) {
  12818. if (json[key] === undefined) return '';
  12819. return encodeURIComponent(key) + '=' + encodeURIComponent(json[key]);
  12820. })).join('&');
  12821. }
  12822. /**
  12823. * @param {string} url
  12824. * @returns {Object}
  12825. */
  12826. function param2Obj(url) {
  12827. var search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ');
  12828. if (!search) {
  12829. return {};
  12830. }
  12831. var obj = {};
  12832. var searchArr = search.split('&');
  12833. searchArr.forEach(function (v) {
  12834. var index = v.indexOf('=');
  12835. if (index !== -1) {
  12836. var name = v.substring(0, index);
  12837. var val = v.substring(index + 1, v.length);
  12838. obj[name] = val;
  12839. }
  12840. });
  12841. return obj;
  12842. }
  12843. /**
  12844. * @param {string} val
  12845. * @returns {string}
  12846. */
  12847. function html2Text(val) {
  12848. var div = document.createElement('div');
  12849. div.innerHTML = val;
  12850. return div.textContent || div.innerText;
  12851. }
  12852. /**
  12853. * Merges two objects, giving the last one precedence
  12854. * @param {Object} target
  12855. * @param {(Object|Array)} source
  12856. * @returns {Object}
  12857. */
  12858. function objectMerge(target, source) {
  12859. if ((0, _typeof2.default)(target) !== 'object') {
  12860. target = {};
  12861. }
  12862. if (Array.isArray(source)) {
  12863. return source.slice();
  12864. }
  12865. Object.keys(source).forEach(function (property) {
  12866. var sourceProperty = source[property];
  12867. if ((0, _typeof2.default)(sourceProperty) === 'object') {
  12868. target[property] = objectMerge(target[property], sourceProperty);
  12869. } else {
  12870. target[property] = sourceProperty;
  12871. }
  12872. });
  12873. return target;
  12874. }
  12875. /**
  12876. * @param {HTMLElement} element
  12877. * @param {string} className
  12878. */
  12879. function toggleClass(element, className) {
  12880. if (!element || !className) {
  12881. return;
  12882. }
  12883. var classString = element.className;
  12884. var nameIndex = classString.indexOf(className);
  12885. if (nameIndex === -1) {
  12886. classString += '' + className;
  12887. } else {
  12888. classString = classString.substr(0, nameIndex) + classString.substr(nameIndex + className.length);
  12889. }
  12890. element.className = classString;
  12891. }
  12892. /**
  12893. * @param {string} type
  12894. * @returns {Date}
  12895. */
  12896. function getTime(type) {
  12897. if (type === 'start') {
  12898. return new Date().getTime() - 3600 * 1000 * 24 * 90;
  12899. } else {
  12900. return new Date(new Date().toDateString());
  12901. }
  12902. }
  12903. /**
  12904. * @param {Function} func
  12905. * @param {number} wait
  12906. * @param {boolean} immediate
  12907. * @return {*}
  12908. */
  12909. function debounce(func, wait, immediate) {
  12910. var timeout, args, context, timestamp, result;
  12911. var later = function later() {
  12912. // 据上一次触发时间间隔
  12913. var last = +new Date() - timestamp;
  12914. // 上次被包装函数被调用时间间隔 last 小于设定时间间隔 wait
  12915. if (last < wait && last > 0) {
  12916. timeout = setTimeout(later, wait - last);
  12917. } else {
  12918. timeout = null;
  12919. // 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用
  12920. if (!immediate) {
  12921. result = func.apply(context, args);
  12922. if (!timeout) context = args = null;
  12923. }
  12924. }
  12925. };
  12926. return function () {
  12927. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  12928. args[_key] = arguments[_key];
  12929. }
  12930. context = this;
  12931. timestamp = +new Date();
  12932. var callNow = immediate && !timeout;
  12933. // 如果延时不存在,重新设定延时
  12934. if (!timeout) timeout = setTimeout(later, wait);
  12935. if (callNow) {
  12936. result = func.apply(context, args);
  12937. context = args = null;
  12938. }
  12939. return result;
  12940. };
  12941. }
  12942. /**
  12943. * This is just a simple version of deep copy
  12944. * Has a lot of edge cases bug
  12945. * If you want to use a perfect deep copy, use lodash's _.cloneDeep
  12946. * @param {Object} source
  12947. * @returns {Object}
  12948. */
  12949. function deepClone(source) {
  12950. if (!source && (0, _typeof2.default)(source) !== 'object') {
  12951. throw new Error('error arguments', 'deepClone');
  12952. }
  12953. var targetObj = source.constructor === Array ? [] : {};
  12954. Object.keys(source).forEach(function (keys) {
  12955. if (source[keys] && (0, _typeof2.default)(source[keys]) === 'object') {
  12956. targetObj[keys] = deepClone(source[keys]);
  12957. } else {
  12958. targetObj[keys] = source[keys];
  12959. }
  12960. });
  12961. return targetObj;
  12962. }
  12963. /**
  12964. * @param {Array} arr
  12965. * @returns {Array}
  12966. */
  12967. function uniqueArr(arr) {
  12968. return Array.from(new Set(arr));
  12969. }
  12970. /**
  12971. * @returns {string}
  12972. */
  12973. function createUniqueString() {
  12974. var timestamp = +new Date() + '';
  12975. var randomNum = parseInt((1 + Math.random()) * 65536) + '';
  12976. return (+(randomNum + timestamp)).toString(32);
  12977. }
  12978. /**
  12979. * Check if an element has a class
  12980. * @param {HTMLElement} elm
  12981. * @param {string} cls
  12982. * @returns {boolean}
  12983. */
  12984. function hasClass(ele, cls) {
  12985. return !!ele.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)'));
  12986. }
  12987. /**
  12988. * Add class to element
  12989. * @param {HTMLElement} elm
  12990. * @param {string} cls
  12991. */
  12992. function addClass(ele, cls) {
  12993. if (!hasClass(ele, cls)) ele.className += ' ' + cls;
  12994. }
  12995. /**
  12996. * Remove class from element
  12997. * @param {HTMLElement} elm
  12998. * @param {string} cls
  12999. */
  13000. function removeClass(ele, cls) {
  13001. if (hasClass(ele, cls)) {
  13002. var reg = new RegExp('(\\s|^)' + cls + '(\\s|$)');
  13003. ele.className = ele.className.replace(reg, ' ');
  13004. }
  13005. }
  13006. function distanceTime(time) {
  13007. //获取当前时间
  13008. var date = new Date();
  13009. var now = date.getTime();
  13010. //设置截止时间
  13011. var endDate = new Date();
  13012. if (time) {
  13013. endDate = new Date(time);
  13014. }
  13015. var end = endDate.getTime();
  13016. //获取截止时间和当前时间的时间差
  13017. if (now >= end) {
  13018. return '已过期';
  13019. }
  13020. var leftTime = end - now;
  13021. //定义变量 d,h,m,s分别保存天数,小时,分钟,秒
  13022. var d, h, m, s;
  13023. //判断剩余天数,时,分,秒
  13024. if (leftTime >= 0) {
  13025. d = Math.floor(leftTime / 1000 / 60 / 60 / 24);
  13026. h = Math.floor(leftTime / 1000 / 60 / 60 % 24);
  13027. m = Math.floor(leftTime / 1000 / 60 % 60);
  13028. s = Math.floor(leftTime / 1000 % 60);
  13029. }
  13030. if (d > 0) {
  13031. return "".concat(d, "\u5929").concat(h, "\u5C0F\u65F6").concat(m, "\u5206\u949F");
  13032. } else {
  13033. if (h > 0) {
  13034. return "".concat(h, "\u5C0F\u65F6").concat(m, "\u5206\u949F");
  13035. } else {
  13036. return "".concat(m, "\u5206\u949F");
  13037. }
  13038. }
  13039. }
  13040. function isEmpty(value) {
  13041. if (value === undefined || value === "undefined" || value === "" || value === null) {
  13042. return true;
  13043. }
  13044. return false;
  13045. }
  13046. function MessageTimeFormat(d) {
  13047. var unix_stamp = '';
  13048. if (!d) return;
  13049. if ((0, _typeof2.default)(d) === 'object') {
  13050. unix_stamp = d.getTime();
  13051. } else {
  13052. unix_stamp = new Date(d).getTime();
  13053. }
  13054. var _today_obj = new Date();
  13055. var _today_date = {
  13056. y: _today_obj.getFullYear(),
  13057. m: _today_obj.getMonth() + 1 < 10 ? '0' + (_today_obj.getMonth() - -1) : _today_obj.getMonth() - -1,
  13058. d: _today_obj.getDate() < 10 ? '0' + _today_obj.getDate() : _today_obj.getDate()
  13059. };
  13060. var _today_stamp = Date.parse(_today_date.y + '/' + _today_date.m + '/' + _today_date.d + ' 00:00:00');
  13061. var stamp = [];
  13062. stamp[0] = _today_stamp + 86400000;
  13063. stamp[1] = _today_stamp;
  13064. stamp[2] = _today_stamp - 86400000;
  13065. stamp[3] = _today_stamp - 172800000;
  13066. stamp[4] = _today_stamp - 518400000; // 7天
  13067. stamp[5] = _today_stamp - 31536000000; // 365天
  13068. var _compare_obj = new Date();
  13069. _compare_obj.setTime(unix_stamp);
  13070. var return_str;
  13071. if (unix_stamp >= stamp[1] && unix_stamp < stamp[0]) {
  13072. return_str = _compare_obj.getHours() + ':' + (_compare_obj.getMinutes() < 10 ? '0' + _compare_obj.getMinutes() : _compare_obj.getMinutes());
  13073. } else if (unix_stamp >= stamp[2] && unix_stamp < stamp[1]) {
  13074. var yesterdayText = '昨天';
  13075. return_str = yesterdayText + ' ' + _compare_obj.getHours() + ':' + (_compare_obj.getMinutes() < 10 ? '0' + _compare_obj.getMinutes() : _compare_obj.getMinutes());
  13076. } else if (unix_stamp >= stamp[3] && unix_stamp < stamp[2]) {
  13077. var theDayBeforeYesterdayText = '前天';
  13078. return_str = theDayBeforeYesterdayText + ' ' + _compare_obj.getHours() + ':' + (_compare_obj.getMinutes() < 10 ? '0' + _compare_obj.getMinutes() : _compare_obj.getMinutes());
  13079. } else if (unix_stamp >= stamp[4] && unix_stamp < stamp[3]) {
  13080. // 7天内
  13081. var daynames = ['天', '一', '二', '三', '四', '五', '六'];
  13082. var dathStr = '星期' + daynames[_compare_obj.getDay()];
  13083. var SundayText = '星期天';
  13084. var MondayText = '星期一';
  13085. var TuesdayText = '星期二';
  13086. var WednesdayText = '星期三';
  13087. var ThursdayText = '星期四';
  13088. var FridayText = '星期五';
  13089. var SaturdayText = '星期六';
  13090. var dathStr2;
  13091. switch (dathStr) {
  13092. case '星期天':
  13093. dathStr2 = SundayText;
  13094. break;
  13095. case '星期一':
  13096. dathStr2 = MondayText;
  13097. break;
  13098. case '星期二':
  13099. dathStr2 = TuesdayText;
  13100. break;
  13101. case '星期三':
  13102. dathStr2 = WednesdayText;
  13103. break;
  13104. case '星期四':
  13105. dathStr2 = ThursdayText;
  13106. break;
  13107. case '星期五':
  13108. dathStr2 = FridayText;
  13109. break;
  13110. case '星期六':
  13111. dathStr2 = SaturdayText;
  13112. break;
  13113. default:
  13114. dathStr2 = dathStr;
  13115. break;
  13116. }
  13117. return_str = dathStr2 + ' ' + _compare_obj.getHours() + ':' + (_compare_obj.getMinutes() < 10 ? '0' + _compare_obj.getMinutes() : _compare_obj.getMinutes());
  13118. } else if (unix_stamp >= stamp[5] && unix_stamp < stamp[4]) {
  13119. // 365天内
  13120. var monthText = '月';
  13121. var dayText = '日';
  13122. return_str = _compare_obj.getMonth() - -1 + monthText + _compare_obj.getDate() + dayText + ' ' + _compare_obj.getHours() + ':' + (_compare_obj.getMinutes() < 10 ? '0' + _compare_obj.getMinutes() : _compare_obj.getMinutes());
  13123. } else {
  13124. var yearText = '年';
  13125. var _monthText = '月';
  13126. var _dayText = '日';
  13127. return_str = _compare_obj.getFullYear() + yearText + (_compare_obj.getMonth() - -1) + _monthText + _compare_obj.getDate() + _dayText + ' ' + _compare_obj.getHours() + ':' + (_compare_obj.getMinutes() < 10 ? '0' + _compare_obj.getMinutes() : _compare_obj.getMinutes());
  13128. }
  13129. return return_str;
  13130. }
  13131. /***/ }),
  13132. /***/ 8:
  13133. /*!***************************************************************************!*\
  13134. !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
  13135. \***************************************************************************/
  13136. /*! no static exports found */
  13137. /***/ (function(module, exports, __webpack_require__) {
  13138. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  13139. function _unsupportedIterableToArray(o, minLen) {
  13140. if (!o) return;
  13141. if (typeof o === "string") return arrayLikeToArray(o, minLen);
  13142. var n = Object.prototype.toString.call(o).slice(8, -1);
  13143. if (n === "Object" && o.constructor) n = o.constructor.name;
  13144. if (n === "Map" || n === "Set") return Array.from(o);
  13145. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
  13146. }
  13147. module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  13148. /***/ }),
  13149. /***/ 80:
  13150. /*!***************************************************************!*\
  13151. !*** E:/work/Project_newGit/UniappShell/api/system/upload.js ***!
  13152. \***************************************************************/
  13153. /*! no static exports found */
  13154. /***/ (function(module, exports, __webpack_require__) {
  13155. "use strict";
  13156. /* WEBPACK VAR INJECTION */(function(uni) {
  13157. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  13158. Object.defineProperty(exports, "__esModule", {
  13159. value: true
  13160. });
  13161. exports.upload = void 0;
  13162. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  13163. var _auth = __webpack_require__(/*! @/libs/auth.js */ 48);
  13164. var _index = _interopRequireDefault(__webpack_require__(/*! @/config/index.js */ 47));
  13165. var baseUrl = true ? _index.default.base.dev : undefined;
  13166. var upload = function upload(_ref) {
  13167. var formData = _ref.formData,
  13168. filePath = _ref.filePath,
  13169. callback = _ref.callback;
  13170. uni.showLoading({
  13171. mask: true,
  13172. title: "上传中"
  13173. });
  13174. return new Promise(function (resolve, reject) {
  13175. var _header;
  13176. var uploadTask = uni.uploadFile({
  13177. url: baseUrl + '/upload/file',
  13178. filePath: filePath,
  13179. header: (_header = {}, (0, _defineProperty2.default)(_header, _index.default.TokenKey, (0, _auth.getToken)()), (0, _defineProperty2.default)(_header, "AppID", _index.default.appID), (0, _defineProperty2.default)(_header, "AppKey", _index.default.appKey), (0, _defineProperty2.default)(_header, "AppSecret", _index.default.appSecret), _header),
  13180. name: 'file',
  13181. formData: formData,
  13182. success: function success(uploadFileRes) {
  13183. uni.hideLoading();
  13184. resolve(uploadFileRes.data);
  13185. },
  13186. fail: function fail(_ref2) {
  13187. var errMsg = _ref2.errMsg;
  13188. uni.hideLoading({
  13189. mask: true,
  13190. title: "上传失败"
  13191. });
  13192. reject(errMsg);
  13193. }
  13194. });
  13195. if (callback) {
  13196. callback(uploadTask);
  13197. }
  13198. });
  13199. };
  13200. exports.upload = upload;
  13201. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  13202. /***/ }),
  13203. /***/ 81:
  13204. /*!***********************************************************************!*\
  13205. !*** E:/work/Project_newGit/UniappShell/static/components/avatar.png ***!
  13206. \***********************************************************************/
  13207. /*! no static exports found */
  13208. /***/ (function(module, exports) {
  13209. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAD2BJREFUeF7tXXuMHVUZ/77ZC2VL3WKVAmLwAYRWkD+sCkjL01AKQikIiQoYHqaGagPrzje3JOBVEnbnzLKQhRI2lhIVNbFARaQtRCq4IrWAiTwsBOqDhFdFZNfSpWXvfOZbZ8t2X3fmzjkzZ7b3JDe77Z7znd/3nd+dxznfA2EKtq6urlmDg4NzEXEOM88FAPnMAoDpiDidmacDwP7y70j9HQDwLiLuYGb5XT5vA8AWRNzCzC+USqUtra2t8n9TqmHRtalUKvs1NzcvAIAFiCg/ZbEPMqTXm0IKZu4FgN6BgYHeSqXynqG5MhFbSAJ0dHQsRMQT5QMA8pmWibXGTrITAB5n5qFPuVx+KCccdU9bGAJ0dHQschxnETMvQsQj6tbY4EBmfhkR14dhuL5cLq83OJU20VYToAiLPtFKFIUMVhJAKXUhAFwOAGdqo3q+gjYAwGoiWpMvjLGzW0UApdSl0cKfbJuhNOF5LCLCTzTJSy3GCgIEQXAZM38bAL6YWqNiCNiMiHe4rntX3nBzJUBnZ+e8MAxXAMAFeRsip/nvdRynva2t7emc5odcCNDT07NPf39/mZll8ZvzUt6SeQcQsb2lpaVj6dKl72eNKXMCBEGwmJnLAHB81spaPt8mROxwXff+LHFmSgDf9yuI+P0sFSzaXMz8A8/zKlnhzoQASqnDASAAgCVZKVbwedYCgEtEW03rYZwAQRAsYWZZfCFBo8W3wFZEdF3XFTIYa0YJ0Ljkp18307cEYwRQSvkAQOlN0JAAAIqIPBOWMEIApVQ3AHzXBOC9WOatRLRct/7aCRAEwSPMfJpuoA15AIi40XXd03XaQisBlFLiMDFbJ8CGrDEW2EZE2hxetBFAKdUHAC2NBcvEAv1ENFPHTFoIoJR6DgCO1gGoISO2BZ4nomNi956gY2oCBEGwgZkXpgXSGJ/cAoj4kOu6qXwmUhHA9/1ViHhFcuiNEboswMx3ep53Zb3y6iZAY5OnXpPrH5dms6guAkTbu/fpV8WcRER8kpn/AAAvIeIr1Wr1FQCQj7TDmpqaDmPmwwDgSEScz8xfMIdGv2REPL+ebePEBIgOdsT92fq9fbk8NjU1rZOFd113WxKzB0EwW4hQrVbPKshtTg6OFiY9QKqHAPLNt/pUTx6OqtXqzbr89CUOoamp6ZoCPOyuJaLzkxA9EQEKcN/fiYjLXNe9M4kR4vYNguAKZl6ZYyBKTahJnwdiEyDy5PlVTQT5dXgLAL5JROtMQlBKnQUAPwaAj5qcJ41sRDwvrmdRLAKID19fX9/vLXbj+hsiHuu67rtpDBd3bBAE+zPzMwDw6bhjMu63aebMmSfF8TGMRYAgCK5j5h9mrETc6TYR0QlxO+vsp5R6wtYvBSJe77ruDbX0rUmAyHVbomGt895FxJdd1z2ylpIm/x4EwUvMbGOs4oDjOAtquZzXJIBS6h5L/fb7mPk4z/NeNLnAtWT7vn8UIv4JALQcztSaL+Hf7yWir042ZlICRBE7qxNOmkn3ejc+TICzeWMMES+fLAJpUgIopYTZ1oVrIeI9rutKAKk1LQiCNcw86bctJ7Cbiei4ieaekABRoKa87ljXqtXqqStWrHjUJmDt7e2nNDU1/c4mTCOwyOvxuAGpkxFADGxdlC4z3+V5noSOW9d831+NiJdZBwzgMSI6ZTxc4xIgis//pYWKADOf4HneJhux+b5/PCLKq6GN7aLx8hNMRABJb5LK0cCQBbR4wRjCNiTWYu+oDUS0aLTuYwgQpWUxup1a7wIg4m2u61rtbh4Ewa3M/J16dTQ5LgzDs0bnLhpDAJt9+m18+Bu9YJY/DI6JLRhDAN/3xWHCxp2tQSLax+Q3RJdspZTE+Zd0ydMlRxJXeZ63x87pHgSw+fIPAG8R0YG6jGFSjlLqX7aeFo6+DexBAJsv/zbs+8cljcXnA6LCHreBPQhg8eVfgD9FRIXw01NKPQkAn49LmCz7jb4N7CaAuD05jiP57KxsiCh+fZIL2PoWBEEvM8+3FWgYhmcOu8vtJoDlZ/5iy2eJ6FhbjToSl1JKnEU+ayvWkb4Cuwng+/5vEPFsW0GLCzcRfcJifLuhKaX+Ka7mtmJl5gc9z/uK4BsiQHd397SBgYF3EHE/W0EDQB8RHWAxvpEEeMdS/4AhjMz8XnNz8wHLly/fOUQApZTcW8Xnz+pGRDUdWGxQQCnFNuCogeEkIuodMqjv+9choq0+fyP1GPdAwyZj23yQNtJOzHy953k3DF8B5Bx73ONCm4wLAHcT0SWWYdoDjlLqpwBwsc0YI2yPEtGpwwR4w2CZFZ22eI2IDtUpULcspdSrAPAx3XINyHuTiA7GqMDSvw1MYEQkIp7ruu4DRoSnFBoEwTnM/OuUYjIbXiqVPoJKKam5I1GzRWkPE5GVCSmUUhI0e0ZRDAkA8zGKd1tVINDyGnOx53k/swmz7/vfQMS7bcJUCwsiXilXgE4A+F6tzpb9/Qki+pJNmJRSfwSAXCKUUtjhJiHAgwAgAY+FasxMnudJDuLcm+/7LiKq3IEkB7BOCGBtfFsMfc42HQ1cC0MULSxfoiK2TUKAvwBAIQ5ZxrNwtVr91IoVK/6Rh/Xb29s/2dTU9Pc85tY05zPyEGhrcGNsHffdd9+Dr776aslSmlm75ZZbDtq1a5fsnxS2iZONXAGKsnFRy9BSYEEeaI03pVRbVADD+FyGJ3hNCGD1yVVCA/QQkZSfM9aUUncAwFJjE2QruE8IsAsACuFtG9M28lB7s+4qndEhzzUFfNWbzGzvT0UCDCu8BhFvdl03VahWEAQnMLMsvFXRyDG/DLW6DRFgKt0Cxigs1byZeX2pVFrf2tr6ci2LyN+7urqOGBwclCrlQ9XK44wpaJ+hW8BUeQiMswbPIuKLzPyqfBzHebVarQ46jiPuWx9HxEOZ+Sib/fniKJmgz2tT4jVwIoUR8QUAeFhcoR3HeT0Mw9cB4I0dO3a8XqlUdowc19PTM72vr++QMAwPKZVKB8vPKELqDGaek8Cohek6/BpY6I2gUdb+r2QJBYDfMvNGInpJx2oopSR/sJTB+XKULfRDOuRaIOOZom8FD9twFTM/MGPGjI3Lli3bbtKwK1eunLF9+/bTEPEcAKg7TbtJjAlkD20FF/IwKFJyTRiGt5XL5VwcWjs6Ok5yHEdCwYv6hjB0GFTE4+CHo1wBVngGRZ5AQoQiOYPId+imojmEbGbm2zzPE8dL65rv+5cgohDBusxq4xlr2CGkEC5hiHi767rLrFv1cQAFQbCSma8qANb5RXEK9YioUA4XSikpmyvlc61tQ06hgk4pZatb+FvVavVC23ICxl3RKF3MGkuTRfzfLTwigI2BIU8TkZUx9nEJMNxPKfUUAMxLOs5w/w8CQ2wLDUta9cKwobSIt63ayujQMJuCQ+8novO0WN0yIUopqbiy2BJYHwSHWhQeXpgcAPUuog25A8aEh4syNiSIcBxnbltbmxzgTNnW2dk5JwzDLXkqOCZBhICxIEXM14noF3kaJqu5lVJfA4CfZzXf6HnGTRGTZ5IoZg48z5P35r2m+b6vENHNQ+Fxk0RFt4E8soROWtAgDwNlNWceBTkmTBMX7Qd0A0CmyZiZ+VJb9/ZNEyE6Oxi3kIPBuSdOFJlDqlhrQ70NLsAeorMOKZ80VWzWtwGbkz1kRYAsk0rUTBad8W1gDRFdlJWhbZ5HKSXVWbJwKqmdLj6r20AYhifn5cljGxkiz6LHTOOKVTAiugqYLhmzioi+ZVrhIslXSv3IsI9hvJIxEQHkcmSsaJRNRR9tIUkGxSfjF42KSGCkbBwibp82bdqhy5cv77fF+Dbg6O7ubtm5c6cErMwwgCdZ2biIAJcCgPbCkRKm5Xle4VLSGFiUMSJ9318n4WgG5kpeODIigYnSsYVz7zKwIOOKNORGVl/pWEFooni04zhHt7W1/TUroxZpns7Ozs+EYfi8TsypikdHVwGd5eO3EpGNFcl02jyVLKWURDAfnkrIB4PTlY8XOZ2dnfPCMOwFgGYNoMZsRGiQOaVEaCzcNeA4zoK2tranJzNQrPz7unwFmHmZ53m3T6kV06yM7/tXIeLKtGJHnvmnJkBPT88+fX19En93fBpgzLzY87zCJFNOo2u9Y33fPxcR7693fDRu08yZM09aunSpFLCctMW6AkQPhIuZWZwa07R5RPTnNAKm+lil1OcAYNLLdi0bIOJ5ruvGIlFsAsikaV2bBwcHZ1977bVSVbPRJrDAjTfeeGCpVNpWr4GSutQnIoCAUkrdBwBL6gFYlJo/9eimc0yKmkNriej8JFjqIYC8okgWjqSvKu8Q0YeTgNtb+yql/gMASSukbQWAhUQkP2O3xASIngeWMLNcCZK054nomCQD9ta+SqnnAODoJPrXe8BWFwF0PA8kUa7Rd3ILJL3vj5RWNwEiEqxCxCsaC5SfBZj5Ts/z6s5VlIoA0e1gQ5Q5Kz8r7KUzS0Y013XPTKN+agJEbwaJ71lpQDfGDllAyzOVFgJEJOgDgJbG4mRigX4imqljJm0EiEggRRtm6wDWkDGhBbYR0UG67KOVANEzwSPMLFk1G02zBRBxo+u6p+sUq50A0ZUg8xAznUaxVJaRo3QjBIhIIBmy9qqIX4PEUUTkmZBvjAACNu3hkQmFiyYzzSZPHF2NEiB6JpBtYynwmPTsIA7+qdxnq+QPcF13rUkljRMguh3I4gsJ6jpFNGkAS2XLoksVtEQHO/XokgkBhoE1bgm1l8j0JX80gkwJEN0SxLOonNa9rLYpC9djEyJ2xPXk0aVd5gQQ4OJj2N/fX2bmFZq8jXXZIw85A4jY3tLS0hHHh083wFwIMKxE5HIuJLhAt2IFkXev4zjttVy3TeqSKwGGFYsikKTiZyHy7GtYkM2IeIfrundpkJVKhBUEGNZAKSUBqZcDwMmptLJ3sCSBWE1EWSeGmtAiVhFgBBEkP4EQIdVZt0U82BAtvKSOt6pZSYBhC0Xpaoaqd0Y1/Kwy3mRgJCGTVC0Nw3B9uVyWjCtWNqsJMNJiRSBDURZ9pF0LQ4BRZFiIiCfKBwDkMy2nr9dOAHicmYc+5XJZ3OUL1QpJgJEWrlQq+zU3N0u9gwWIKD/nAoA2h4lRqykOL1uYWaKlewcGBnorlcp7hVrxUWALT4DxjN/V1TVrcHBwLiLOYWYhhHxmAcB0RJzOzNMBYH/5dzRe6gi/i4g7mFl+l8/bstiIKAv+QqlU2tLa2ir/N6Xa/wBXxyT5Pl8TYwAAAABJRU5ErkJggg=="
  13210. /***/ }),
  13211. /***/ 9:
  13212. /*!*****************************************************************!*\
  13213. !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
  13214. \*****************************************************************/
  13215. /*! no static exports found */
  13216. /***/ (function(module, exports) {
  13217. function _arrayLikeToArray(arr, len) {
  13218. if (len == null || len > arr.length) len = arr.length;
  13219. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  13220. arr2[i] = arr[i];
  13221. }
  13222. return arr2;
  13223. }
  13224. module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  13225. /***/ })
  13226. }]);
  13227. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map