vendor.js 503 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],{
  2. /***/ 1:
  3. /*!************************************************************!*\
  4. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  5. \************************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. "use strict";
  9. /* WEBPACK VAR INJECTION */(function(global) {Object.defineProperty(exports, "__esModule", { value: true });exports.createApp = createApp;exports.createComponent = createComponent;exports.createPage = createPage;exports.createPlugin = createPlugin;exports.createSubpackageApp = createSubpackageApp;exports.default = void 0;var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 3);
  10. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 4));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _slicedToArray(arr, i) {return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(arr, i) {if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"] != null) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}function _arrayWithHoles(arr) {if (Array.isArray(arr)) return arr;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toConsumableArray(arr) {return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();}function _nonIterableSpread() {throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o, minLen) {if (!o) return;if (typeof o === "string") return _arrayLikeToArray(o, minLen);var n = Object.prototype.toString.call(o).slice(8, -1);if (n === "Object" && o.constructor) n = o.constructor.name;if (n === "Map" || n === "Set") return Array.from(o);if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);}function _iterableToArray(iter) {if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);}function _arrayWithoutHoles(arr) {if (Array.isArray(arr)) return _arrayLikeToArray(arr);}function _arrayLikeToArray(arr, len) {if (len == null || len > arr.length) len = arr.length;for (var i = 0, arr2 = new Array(len); i < len; i++) {arr2[i] = arr[i];}return arr2;}
  11. var realAtob;
  12. var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  13. var b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  14. if (typeof atob !== 'function') {
  15. realAtob = function realAtob(str) {
  16. str = String(str).replace(/[\t\n\f\r ]+/g, '');
  17. if (!b64re.test(str)) {throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");}
  18. // Adding the padding if missing, for semplicity
  19. str += '=='.slice(2 - (str.length & 3));
  20. var bitmap;var result = '';var r1;var r2;var i = 0;
  21. for (; i < str.length;) {
  22. bitmap = b64.indexOf(str.charAt(i++)) << 18 | b64.indexOf(str.charAt(i++)) << 12 |
  23. (r1 = b64.indexOf(str.charAt(i++))) << 6 | (r2 = b64.indexOf(str.charAt(i++)));
  24. result += r1 === 64 ? String.fromCharCode(bitmap >> 16 & 255) :
  25. r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255) :
  26. String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255);
  27. }
  28. return result;
  29. };
  30. } else {
  31. // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
  32. realAtob = atob;
  33. }
  34. function b64DecodeUnicode(str) {
  35. return decodeURIComponent(realAtob(str).split('').map(function (c) {
  36. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  37. }).join(''));
  38. }
  39. function getCurrentUserInfo() {
  40. var token = wx.getStorageSync('uni_id_token') || '';
  41. var tokenArr = token.split('.');
  42. if (!token || tokenArr.length !== 3) {
  43. return {
  44. uid: null,
  45. role: [],
  46. permission: [],
  47. tokenExpired: 0 };
  48. }
  49. var userInfo;
  50. try {
  51. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  52. } catch (error) {
  53. throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
  54. }
  55. userInfo.tokenExpired = userInfo.exp * 1000;
  56. delete userInfo.exp;
  57. delete userInfo.iat;
  58. return userInfo;
  59. }
  60. function uniIdMixin(Vue) {
  61. Vue.prototype.uniIDHasRole = function (roleId) {var _getCurrentUserInfo =
  62. getCurrentUserInfo(),role = _getCurrentUserInfo.role;
  63. return role.indexOf(roleId) > -1;
  64. };
  65. Vue.prototype.uniIDHasPermission = function (permissionId) {var _getCurrentUserInfo2 =
  66. getCurrentUserInfo(),permission = _getCurrentUserInfo2.permission;
  67. return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
  68. };
  69. Vue.prototype.uniIDTokenValid = function () {var _getCurrentUserInfo3 =
  70. getCurrentUserInfo(),tokenExpired = _getCurrentUserInfo3.tokenExpired;
  71. return tokenExpired > Date.now();
  72. };
  73. }
  74. var _toString = Object.prototype.toString;
  75. var hasOwnProperty = Object.prototype.hasOwnProperty;
  76. function isFn(fn) {
  77. return typeof fn === 'function';
  78. }
  79. function isStr(str) {
  80. return typeof str === 'string';
  81. }
  82. function isPlainObject(obj) {
  83. return _toString.call(obj) === '[object Object]';
  84. }
  85. function hasOwn(obj, key) {
  86. return hasOwnProperty.call(obj, key);
  87. }
  88. function noop() {}
  89. /**
  90. * Create a cached version of a pure function.
  91. */
  92. function cached(fn) {
  93. var cache = Object.create(null);
  94. return function cachedFn(str) {
  95. var hit = cache[str];
  96. return hit || (cache[str] = fn(str));
  97. };
  98. }
  99. /**
  100. * Camelize a hyphen-delimited string.
  101. */
  102. var camelizeRE = /-(\w)/g;
  103. var camelize = cached(function (str) {
  104. return str.replace(camelizeRE, function (_, c) {return c ? c.toUpperCase() : '';});
  105. });
  106. function sortObject(obj) {
  107. var sortObj = {};
  108. if (isPlainObject(obj)) {
  109. Object.keys(obj).sort().forEach(function (key) {
  110. sortObj[key] = obj[key];
  111. });
  112. }
  113. return !Object.keys(sortObj) ? obj : sortObj;
  114. }
  115. var HOOKS = [
  116. 'invoke',
  117. 'success',
  118. 'fail',
  119. 'complete',
  120. 'returnValue'];
  121. var globalInterceptors = {};
  122. var scopedInterceptors = {};
  123. function mergeHook(parentVal, childVal) {
  124. var res = childVal ?
  125. parentVal ?
  126. parentVal.concat(childVal) :
  127. Array.isArray(childVal) ?
  128. childVal : [childVal] :
  129. parentVal;
  130. return res ?
  131. dedupeHooks(res) :
  132. res;
  133. }
  134. function dedupeHooks(hooks) {
  135. var res = [];
  136. for (var i = 0; i < hooks.length; i++) {
  137. if (res.indexOf(hooks[i]) === -1) {
  138. res.push(hooks[i]);
  139. }
  140. }
  141. return res;
  142. }
  143. function removeHook(hooks, hook) {
  144. var index = hooks.indexOf(hook);
  145. if (index !== -1) {
  146. hooks.splice(index, 1);
  147. }
  148. }
  149. function mergeInterceptorHook(interceptor, option) {
  150. Object.keys(option).forEach(function (hook) {
  151. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  152. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  153. }
  154. });
  155. }
  156. function removeInterceptorHook(interceptor, option) {
  157. if (!interceptor || !option) {
  158. return;
  159. }
  160. Object.keys(option).forEach(function (hook) {
  161. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  162. removeHook(interceptor[hook], option[hook]);
  163. }
  164. });
  165. }
  166. function addInterceptor(method, option) {
  167. if (typeof method === 'string' && isPlainObject(option)) {
  168. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  169. } else if (isPlainObject(method)) {
  170. mergeInterceptorHook(globalInterceptors, method);
  171. }
  172. }
  173. function removeInterceptor(method, option) {
  174. if (typeof method === 'string') {
  175. if (isPlainObject(option)) {
  176. removeInterceptorHook(scopedInterceptors[method], option);
  177. } else {
  178. delete scopedInterceptors[method];
  179. }
  180. } else if (isPlainObject(method)) {
  181. removeInterceptorHook(globalInterceptors, method);
  182. }
  183. }
  184. function wrapperHook(hook) {
  185. return function (data) {
  186. return hook(data) || data;
  187. };
  188. }
  189. function isPromise(obj) {
  190. return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  191. }
  192. function queue(hooks, data) {
  193. var promise = false;
  194. for (var i = 0; i < hooks.length; i++) {
  195. var hook = hooks[i];
  196. if (promise) {
  197. promise = Promise.resolve(wrapperHook(hook));
  198. } else {
  199. var res = hook(data);
  200. if (isPromise(res)) {
  201. promise = Promise.resolve(res);
  202. }
  203. if (res === false) {
  204. return {
  205. then: function then() {} };
  206. }
  207. }
  208. }
  209. return promise || {
  210. then: function then(callback) {
  211. return callback(data);
  212. } };
  213. }
  214. function wrapperOptions(interceptor) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  215. ['success', 'fail', 'complete'].forEach(function (name) {
  216. if (Array.isArray(interceptor[name])) {
  217. var oldCallback = options[name];
  218. options[name] = function callbackInterceptor(res) {
  219. queue(interceptor[name], res).then(function (res) {
  220. /* eslint-disable no-mixed-operators */
  221. return isFn(oldCallback) && oldCallback(res) || res;
  222. });
  223. };
  224. }
  225. });
  226. return options;
  227. }
  228. function wrapperReturnValue(method, returnValue) {
  229. var returnValueHooks = [];
  230. if (Array.isArray(globalInterceptors.returnValue)) {
  231. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(globalInterceptors.returnValue));
  232. }
  233. var interceptor = scopedInterceptors[method];
  234. if (interceptor && Array.isArray(interceptor.returnValue)) {
  235. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(interceptor.returnValue));
  236. }
  237. returnValueHooks.forEach(function (hook) {
  238. returnValue = hook(returnValue) || returnValue;
  239. });
  240. return returnValue;
  241. }
  242. function getApiInterceptorHooks(method) {
  243. var interceptor = Object.create(null);
  244. Object.keys(globalInterceptors).forEach(function (hook) {
  245. if (hook !== 'returnValue') {
  246. interceptor[hook] = globalInterceptors[hook].slice();
  247. }
  248. });
  249. var scopedInterceptor = scopedInterceptors[method];
  250. if (scopedInterceptor) {
  251. Object.keys(scopedInterceptor).forEach(function (hook) {
  252. if (hook !== 'returnValue') {
  253. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  254. }
  255. });
  256. }
  257. return interceptor;
  258. }
  259. function invokeApi(method, api, options) {for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {params[_key - 3] = arguments[_key];}
  260. var interceptor = getApiInterceptorHooks(method);
  261. if (interceptor && Object.keys(interceptor).length) {
  262. if (Array.isArray(interceptor.invoke)) {
  263. var res = queue(interceptor.invoke, options);
  264. return res.then(function (options) {
  265. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  266. });
  267. } else {
  268. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  269. }
  270. }
  271. return api.apply(void 0, [options].concat(params));
  272. }
  273. var promiseInterceptor = {
  274. returnValue: function returnValue(res) {
  275. if (!isPromise(res)) {
  276. return res;
  277. }
  278. return new Promise(function (resolve, reject) {
  279. res.then(function (res) {
  280. if (res[0]) {
  281. reject(res[0]);
  282. } else {
  283. resolve(res[1]);
  284. }
  285. });
  286. });
  287. } };
  288. var SYNC_API_RE =
  289. /^\$|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/;
  290. var CONTEXT_API_RE = /^create|Manager$/;
  291. // Context例外情况
  292. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  293. // 同步例外情况
  294. var ASYNC_API = ['createBLEConnection', 'createPushMessage'];
  295. var CALLBACK_API_RE = /^on|^off/;
  296. function isContextApi(name) {
  297. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  298. }
  299. function isSyncApi(name) {
  300. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  301. }
  302. function isCallbackApi(name) {
  303. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  304. }
  305. function handlePromise(promise) {
  306. return promise.then(function (data) {
  307. return [null, data];
  308. }).
  309. catch(function (err) {return [err];});
  310. }
  311. function shouldPromise(name) {
  312. if (
  313. isContextApi(name) ||
  314. isSyncApi(name) ||
  315. isCallbackApi(name))
  316. {
  317. return false;
  318. }
  319. return true;
  320. }
  321. /* eslint-disable no-extend-native */
  322. if (!Promise.prototype.finally) {
  323. Promise.prototype.finally = function (callback) {
  324. var promise = this.constructor;
  325. return this.then(
  326. function (value) {return promise.resolve(callback()).then(function () {return value;});},
  327. function (reason) {return promise.resolve(callback()).then(function () {
  328. throw reason;
  329. });});
  330. };
  331. }
  332. function promisify(name, api) {
  333. if (!shouldPromise(name)) {
  334. return api;
  335. }
  336. return function promiseApi() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {params[_key2 - 1] = arguments[_key2];}
  337. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  338. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  339. }
  340. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  341. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  342. success: resolve,
  343. fail: reject })].concat(
  344. params));
  345. })));
  346. };
  347. }
  348. var EPS = 1e-4;
  349. var BASE_DEVICE_WIDTH = 750;
  350. var isIOS = false;
  351. var deviceWidth = 0;
  352. var deviceDPR = 0;
  353. function checkDeviceWidth() {var _wx$getSystemInfoSync =
  354. wx.getSystemInfoSync(),platform = _wx$getSystemInfoSync.platform,pixelRatio = _wx$getSystemInfoSync.pixelRatio,windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  355. deviceWidth = windowWidth;
  356. deviceDPR = pixelRatio;
  357. isIOS = platform === 'ios';
  358. }
  359. function upx2px(number, newDeviceWidth) {
  360. if (deviceWidth === 0) {
  361. checkDeviceWidth();
  362. }
  363. number = Number(number);
  364. if (number === 0) {
  365. return 0;
  366. }
  367. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  368. if (result < 0) {
  369. result = -result;
  370. }
  371. result = Math.floor(result + EPS);
  372. if (result === 0) {
  373. if (deviceDPR === 1 || !isIOS) {
  374. result = 1;
  375. } else {
  376. result = 0.5;
  377. }
  378. }
  379. return number < 0 ? -result : result;
  380. }
  381. var LOCALE_ZH_HANS = 'zh-Hans';
  382. var LOCALE_ZH_HANT = 'zh-Hant';
  383. var LOCALE_EN = 'en';
  384. var LOCALE_FR = 'fr';
  385. var LOCALE_ES = 'es';
  386. var messages = {};
  387. var locale;
  388. {
  389. locale = normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  390. }
  391. function initI18nMessages() {
  392. if (!isEnableLocale()) {
  393. return;
  394. }
  395. var localeKeys = Object.keys(__uniConfig.locales);
  396. if (localeKeys.length) {
  397. localeKeys.forEach(function (locale) {
  398. var curMessages = messages[locale];
  399. var userMessages = __uniConfig.locales[locale];
  400. if (curMessages) {
  401. Object.assign(curMessages, userMessages);
  402. } else {
  403. messages[locale] = userMessages;
  404. }
  405. });
  406. }
  407. }
  408. initI18nMessages();
  409. var i18n = (0, _uniI18n.initVueI18n)(
  410. locale,
  411. {});
  412. var t = i18n.t;
  413. var i18nMixin = i18n.mixin = {
  414. beforeCreate: function beforeCreate() {var _this = this;
  415. var unwatch = i18n.i18n.watchLocale(function () {
  416. _this.$forceUpdate();
  417. });
  418. this.$once('hook:beforeDestroy', function () {
  419. unwatch();
  420. });
  421. },
  422. methods: {
  423. $$t: function $$t(key, values) {
  424. return t(key, values);
  425. } } };
  426. var setLocale = i18n.setLocale;
  427. var getLocale = i18n.getLocale;
  428. function initAppLocale(Vue, appVm, locale) {
  429. var state = Vue.observable({
  430. locale: locale || i18n.getLocale() });
  431. var localeWatchers = [];
  432. appVm.$watchLocale = function (fn) {
  433. localeWatchers.push(fn);
  434. };
  435. Object.defineProperty(appVm, '$locale', {
  436. get: function get() {
  437. return state.locale;
  438. },
  439. set: function set(v) {
  440. state.locale = v;
  441. localeWatchers.forEach(function (watch) {return watch(v);});
  442. } });
  443. }
  444. function isEnableLocale() {
  445. return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length;
  446. }
  447. function include(str, parts) {
  448. return !!parts.find(function (part) {return str.indexOf(part) !== -1;});
  449. }
  450. function startsWith(str, parts) {
  451. return parts.find(function (part) {return str.indexOf(part) === 0;});
  452. }
  453. function normalizeLocale(locale, messages) {
  454. if (!locale) {
  455. return;
  456. }
  457. locale = locale.trim().replace(/_/g, '-');
  458. if (messages && messages[locale]) {
  459. return locale;
  460. }
  461. locale = locale.toLowerCase();
  462. if (locale === 'chinese') {
  463. // 支付宝
  464. return LOCALE_ZH_HANS;
  465. }
  466. if (locale.indexOf('zh') === 0) {
  467. if (locale.indexOf('-hans') > -1) {
  468. return LOCALE_ZH_HANS;
  469. }
  470. if (locale.indexOf('-hant') > -1) {
  471. return LOCALE_ZH_HANT;
  472. }
  473. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  474. return LOCALE_ZH_HANT;
  475. }
  476. return LOCALE_ZH_HANS;
  477. }
  478. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  479. if (lang) {
  480. return lang;
  481. }
  482. }
  483. // export function initI18n() {
  484. // const localeKeys = Object.keys(__uniConfig.locales || {})
  485. // if (localeKeys.length) {
  486. // localeKeys.forEach((locale) =>
  487. // i18n.add(locale, __uniConfig.locales[locale])
  488. // )
  489. // }
  490. // }
  491. function getLocale$1() {
  492. // 优先使用 $locale
  493. var app = getApp({
  494. allowDefault: true });
  495. if (app && app.$vm) {
  496. return app.$vm.$locale;
  497. }
  498. return normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  499. }
  500. function setLocale$1(locale) {
  501. var app = getApp();
  502. if (!app) {
  503. return false;
  504. }
  505. var oldLocale = app.$vm.$locale;
  506. if (oldLocale !== locale) {
  507. app.$vm.$locale = locale;
  508. onLocaleChangeCallbacks.forEach(function (fn) {return fn({
  509. locale: locale });});
  510. return true;
  511. }
  512. return false;
  513. }
  514. var onLocaleChangeCallbacks = [];
  515. function onLocaleChange(fn) {
  516. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  517. onLocaleChangeCallbacks.push(fn);
  518. }
  519. }
  520. if (typeof global !== 'undefined') {
  521. global.getLocale = getLocale$1;
  522. }
  523. var interceptors = {
  524. promiseInterceptor: promiseInterceptor };
  525. var baseApi = /*#__PURE__*/Object.freeze({
  526. __proto__: null,
  527. upx2px: upx2px,
  528. getLocale: getLocale$1,
  529. setLocale: setLocale$1,
  530. onLocaleChange: onLocaleChange,
  531. addInterceptor: addInterceptor,
  532. removeInterceptor: removeInterceptor,
  533. interceptors: interceptors });
  534. function findExistsPageIndex(url) {
  535. var pages = getCurrentPages();
  536. var len = pages.length;
  537. while (len--) {
  538. var page = pages[len];
  539. if (page.$page && page.$page.fullPath === url) {
  540. return len;
  541. }
  542. }
  543. return -1;
  544. }
  545. var redirectTo = {
  546. name: function name(fromArgs) {
  547. if (fromArgs.exists === 'back' && fromArgs.delta) {
  548. return 'navigateBack';
  549. }
  550. return 'redirectTo';
  551. },
  552. args: function args(fromArgs) {
  553. if (fromArgs.exists === 'back' && fromArgs.url) {
  554. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  555. if (existsPageIndex !== -1) {
  556. var delta = getCurrentPages().length - 1 - existsPageIndex;
  557. if (delta > 0) {
  558. fromArgs.delta = delta;
  559. }
  560. }
  561. }
  562. } };
  563. var previewImage = {
  564. args: function args(fromArgs) {
  565. var currentIndex = parseInt(fromArgs.current);
  566. if (isNaN(currentIndex)) {
  567. return;
  568. }
  569. var urls = fromArgs.urls;
  570. if (!Array.isArray(urls)) {
  571. return;
  572. }
  573. var len = urls.length;
  574. if (!len) {
  575. return;
  576. }
  577. if (currentIndex < 0) {
  578. currentIndex = 0;
  579. } else if (currentIndex >= len) {
  580. currentIndex = len - 1;
  581. }
  582. if (currentIndex > 0) {
  583. fromArgs.current = urls[currentIndex];
  584. fromArgs.urls = urls.filter(
  585. function (item, index) {return index < currentIndex ? item !== urls[currentIndex] : true;});
  586. } else {
  587. fromArgs.current = urls[0];
  588. }
  589. return {
  590. indicator: false,
  591. loop: false };
  592. } };
  593. var UUID_KEY = '__DC_STAT_UUID';
  594. var deviceId;
  595. function useDeviceId(result) {
  596. deviceId = deviceId || wx.getStorageSync(UUID_KEY);
  597. if (!deviceId) {
  598. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  599. wx.setStorage({
  600. key: UUID_KEY,
  601. data: deviceId });
  602. }
  603. result.deviceId = deviceId;
  604. }
  605. function addSafeAreaInsets(result) {
  606. if (result.safeArea) {
  607. var safeArea = result.safeArea;
  608. result.safeAreaInsets = {
  609. top: safeArea.top,
  610. left: safeArea.left,
  611. right: result.windowWidth - safeArea.right,
  612. bottom: result.screenHeight - safeArea.bottom };
  613. }
  614. }
  615. function populateParameters(result) {var _result$brand =
  616. result.brand,brand = _result$brand === void 0 ? '' : _result$brand,_result$model = result.model,model = _result$model === void 0 ? '' : _result$model,_result$system = result.system,system = _result$system === void 0 ? '' : _result$system,_result$language = result.language,language = _result$language === void 0 ? '' : _result$language,theme = result.theme,version = result.version,platform = result.platform,fontSizeSetting = result.fontSizeSetting,SDKVersion = result.SDKVersion,pixelRatio = result.pixelRatio,deviceOrientation = result.deviceOrientation;
  617. // const isQuickApp = "mp-weixin".indexOf('quickapp-webview') !== -1
  618. // osName osVersion
  619. var osName = '';
  620. var osVersion = '';
  621. {
  622. osName = system.split(' ')[0] || '';
  623. osVersion = system.split(' ')[1] || '';
  624. }
  625. var hostVersion = version;
  626. // deviceType
  627. var deviceType = getGetDeviceType(result, model);
  628. // deviceModel
  629. var deviceBrand = getDeviceBrand(brand);
  630. // hostName
  631. var _hostName = getHostName(result);
  632. // deviceOrientation
  633. var _deviceOrientation = deviceOrientation; // 仅 微信 百度 支持
  634. // devicePixelRatio
  635. var _devicePixelRatio = pixelRatio;
  636. // SDKVersion
  637. var _SDKVersion = SDKVersion;
  638. // hostLanguage
  639. var hostLanguage = language.replace(/_/g, '-');
  640. // wx.getAccountInfoSync
  641. var parameters = {
  642. appId: "__UNI__C76B472",
  643. appName: "wechat",
  644. appVersion: "1.0.0",
  645. appVersionCode: "100",
  646. appLanguage: getAppLanguage(hostLanguage),
  647. uniCompileVersion: "3.5.3",
  648. uniRuntimeVersion: "3.5.3",
  649. uniPlatform: undefined || "mp-weixin",
  650. deviceBrand: deviceBrand,
  651. deviceModel: model,
  652. deviceType: deviceType,
  653. devicePixelRatio: _devicePixelRatio,
  654. deviceOrientation: _deviceOrientation,
  655. osName: osName.toLocaleLowerCase(),
  656. osVersion: osVersion,
  657. hostTheme: theme,
  658. hostVersion: hostVersion,
  659. hostLanguage: hostLanguage,
  660. hostName: _hostName,
  661. hostSDKVersion: _SDKVersion,
  662. hostFontSizeSetting: fontSizeSetting,
  663. windowTop: 0,
  664. windowBottom: 0,
  665. // TODO
  666. osLanguage: undefined,
  667. osTheme: undefined,
  668. ua: undefined,
  669. hostPackageName: undefined,
  670. browserName: undefined,
  671. browserVersion: undefined };
  672. Object.assign(result, parameters);
  673. }
  674. function getGetDeviceType(result, model) {
  675. var deviceType = result.deviceType || 'phone';
  676. {
  677. var deviceTypeMaps = {
  678. ipad: 'pad',
  679. windows: 'pc',
  680. mac: 'pc' };
  681. var deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
  682. var _model = model.toLocaleLowerCase();
  683. for (var index = 0; index < deviceTypeMapsKeys.length; index++) {
  684. var _m = deviceTypeMapsKeys[index];
  685. if (_model.indexOf(_m) !== -1) {
  686. deviceType = deviceTypeMaps[_m];
  687. break;
  688. }
  689. }
  690. }
  691. return deviceType;
  692. }
  693. function getDeviceBrand(brand) {
  694. var deviceBrand = brand;
  695. if (deviceBrand) {
  696. deviceBrand = brand.toLocaleLowerCase();
  697. }
  698. return deviceBrand;
  699. }
  700. function getAppLanguage(defaultLanguage) {
  701. return getLocale$1 ?
  702. getLocale$1() :
  703. defaultLanguage;
  704. }
  705. function getHostName(result) {
  706. var _platform = 'WeChat';
  707. var _hostName = result.hostName || _platform; // mp-jd
  708. {
  709. if (result.environment) {
  710. _hostName = result.environment;
  711. } else if (result.host && result.host.env) {
  712. _hostName = result.host.env;
  713. }
  714. }
  715. return _hostName;
  716. }
  717. var getSystemInfo = {
  718. returnValue: function returnValue(result) {
  719. useDeviceId(result);
  720. addSafeAreaInsets(result);
  721. populateParameters(result);
  722. } };
  723. var showActionSheet = {
  724. args: function args(fromArgs) {
  725. if (typeof fromArgs === 'object') {
  726. fromArgs.alertText = fromArgs.title;
  727. }
  728. } };
  729. var getAppBaseInfo = {
  730. returnValue: function returnValue(result) {var _result =
  731. result,version = _result.version,language = _result.language,SDKVersion = _result.SDKVersion,theme = _result.theme;
  732. var _hostName = getHostName(result);
  733. var hostLanguage = language.replace('_', '-');
  734. result = sortObject(Object.assign(result, {
  735. appId: "__UNI__C76B472",
  736. appName: "wechat",
  737. appVersion: "1.0.0",
  738. appVersionCode: "100",
  739. appLanguage: getAppLanguage(hostLanguage),
  740. hostVersion: version,
  741. hostLanguage: hostLanguage,
  742. hostName: _hostName,
  743. hostSDKVersion: SDKVersion,
  744. hostTheme: theme }));
  745. } };
  746. var getDeviceInfo = {
  747. returnValue: function returnValue(result) {var _result2 =
  748. result,brand = _result2.brand,model = _result2.model;
  749. var deviceType = getGetDeviceType(result, model);
  750. var deviceBrand = getDeviceBrand(brand);
  751. useDeviceId(result);
  752. result = sortObject(Object.assign(result, {
  753. deviceType: deviceType,
  754. deviceBrand: deviceBrand,
  755. deviceModel: model }));
  756. } };
  757. var getWindowInfo = {
  758. returnValue: function returnValue(result) {
  759. addSafeAreaInsets(result);
  760. result = sortObject(Object.assign(result, {
  761. windowTop: 0,
  762. windowBottom: 0 }));
  763. } };
  764. var getAppAuthorizeSetting = {
  765. returnValue: function returnValue(result) {var
  766. locationReducedAccuracy = result.locationReducedAccuracy;
  767. result.locationAccuracy = 'unsupported';
  768. if (locationReducedAccuracy === true) {
  769. result.locationAccuracy = 'reduced';
  770. } else if (locationReducedAccuracy === false) {
  771. result.locationAccuracy = 'full';
  772. }
  773. } };
  774. // import navigateTo from 'uni-helpers/navigate-to'
  775. var protocols = {
  776. redirectTo: redirectTo,
  777. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  778. previewImage: previewImage,
  779. getSystemInfo: getSystemInfo,
  780. getSystemInfoSync: getSystemInfo,
  781. showActionSheet: showActionSheet,
  782. getAppBaseInfo: getAppBaseInfo,
  783. getDeviceInfo: getDeviceInfo,
  784. getWindowInfo: getWindowInfo,
  785. getAppAuthorizeSetting: getAppAuthorizeSetting };
  786. var todos = [
  787. 'vibrate',
  788. 'preloadPage',
  789. 'unPreloadPage',
  790. 'loadSubPackage'];
  791. var canIUses = [];
  792. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  793. function processCallback(methodName, method, returnValue) {
  794. return function (res) {
  795. return method(processReturnValue(methodName, res, returnValue));
  796. };
  797. }
  798. function processArgs(methodName, fromArgs) {var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  799. if (isPlainObject(fromArgs)) {// 一般 api 的参数解析
  800. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  801. if (isFn(argsOption)) {
  802. argsOption = argsOption(fromArgs, toArgs) || {};
  803. }
  804. for (var key in fromArgs) {
  805. if (hasOwn(argsOption, key)) {
  806. var keyOption = argsOption[key];
  807. if (isFn(keyOption)) {
  808. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  809. }
  810. if (!keyOption) {// 不支持的参数
  811. console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  812. } else if (isStr(keyOption)) {// 重写参数 key
  813. toArgs[keyOption] = fromArgs[key];
  814. } else if (isPlainObject(keyOption)) {// {name:newName,value:value}可重新指定参数 key:value
  815. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  816. }
  817. } else if (CALLBACKS.indexOf(key) !== -1) {
  818. if (isFn(fromArgs[key])) {
  819. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  820. }
  821. } else {
  822. if (!keepFromArgs) {
  823. toArgs[key] = fromArgs[key];
  824. }
  825. }
  826. }
  827. return toArgs;
  828. } else if (isFn(fromArgs)) {
  829. fromArgs = processCallback(methodName, fromArgs, returnValue);
  830. }
  831. return fromArgs;
  832. }
  833. function processReturnValue(methodName, res, returnValue) {var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  834. if (isFn(protocols.returnValue)) {// 处理通用 returnValue
  835. res = protocols.returnValue(methodName, res);
  836. }
  837. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  838. }
  839. function wrapper(methodName, method) {
  840. if (hasOwn(protocols, methodName)) {
  841. var protocol = protocols[methodName];
  842. if (!protocol) {// 暂不支持的 api
  843. return function () {
  844. console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  845. };
  846. }
  847. return function (arg1, arg2) {// 目前 api 最多两个参数
  848. var options = protocol;
  849. if (isFn(protocol)) {
  850. options = protocol(arg1);
  851. }
  852. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  853. var args = [arg1];
  854. if (typeof arg2 !== 'undefined') {
  855. args.push(arg2);
  856. }
  857. if (isFn(options.name)) {
  858. methodName = options.name(arg1);
  859. } else if (isStr(options.name)) {
  860. methodName = options.name;
  861. }
  862. var returnValue = wx[methodName].apply(wx, args);
  863. if (isSyncApi(methodName)) {// 同步 api
  864. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  865. }
  866. return returnValue;
  867. };
  868. }
  869. return method;
  870. }
  871. var todoApis = Object.create(null);
  872. var TODOS = [
  873. 'onTabBarMidButtonTap',
  874. 'subscribePush',
  875. 'unsubscribePush',
  876. 'onPush',
  877. 'offPush',
  878. 'share'];
  879. function createTodoApi(name) {
  880. return function todoApi(_ref)
  881. {var fail = _ref.fail,complete = _ref.complete;
  882. var res = {
  883. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported") };
  884. isFn(fail) && fail(res);
  885. isFn(complete) && complete(res);
  886. };
  887. }
  888. TODOS.forEach(function (name) {
  889. todoApis[name] = createTodoApi(name);
  890. });
  891. var providers = {
  892. oauth: ['weixin'],
  893. share: ['weixin'],
  894. payment: ['wxpay'],
  895. push: ['weixin'] };
  896. function getProvider(_ref2)
  897. {var service = _ref2.service,success = _ref2.success,fail = _ref2.fail,complete = _ref2.complete;
  898. var res = false;
  899. if (providers[service]) {
  900. res = {
  901. errMsg: 'getProvider:ok',
  902. service: service,
  903. provider: providers[service] };
  904. isFn(success) && success(res);
  905. } else {
  906. res = {
  907. errMsg: 'getProvider:fail service not found' };
  908. isFn(fail) && fail(res);
  909. }
  910. isFn(complete) && complete(res);
  911. }
  912. var extraApi = /*#__PURE__*/Object.freeze({
  913. __proto__: null,
  914. getProvider: getProvider });
  915. var getEmitter = function () {
  916. var Emitter;
  917. return function getUniEmitter() {
  918. if (!Emitter) {
  919. Emitter = new _vue.default();
  920. }
  921. return Emitter;
  922. };
  923. }();
  924. function apply(ctx, method, args) {
  925. return ctx[method].apply(ctx, args);
  926. }
  927. function $on() {
  928. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  929. }
  930. function $off() {
  931. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  932. }
  933. function $once() {
  934. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  935. }
  936. function $emit() {
  937. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  938. }
  939. var eventApi = /*#__PURE__*/Object.freeze({
  940. __proto__: null,
  941. $on: $on,
  942. $off: $off,
  943. $once: $once,
  944. $emit: $emit });
  945. /**
  946. * 框架内 try-catch
  947. */
  948. /**
  949. * 开发者 try-catch
  950. */
  951. function tryCatch(fn) {
  952. return function () {
  953. try {
  954. return fn.apply(fn, arguments);
  955. } catch (e) {
  956. // TODO
  957. console.error(e);
  958. }
  959. };
  960. }
  961. function getApiCallbacks(params) {
  962. var apiCallbacks = {};
  963. for (var name in params) {
  964. var param = params[name];
  965. if (isFn(param)) {
  966. apiCallbacks[name] = tryCatch(param);
  967. delete params[name];
  968. }
  969. }
  970. return apiCallbacks;
  971. }
  972. var cid;
  973. var cidErrMsg;
  974. var enabled;
  975. function normalizePushMessage(message) {
  976. try {
  977. return JSON.parse(message);
  978. } catch (e) {}
  979. return message;
  980. }
  981. function invokePushCallback(
  982. args)
  983. {
  984. if (args.type === 'enabled') {
  985. enabled = true;
  986. } else if (args.type === 'clientId') {
  987. cid = args.cid;
  988. cidErrMsg = args.errMsg;
  989. invokeGetPushCidCallbacks(cid, args.errMsg);
  990. } else if (args.type === 'pushMsg') {
  991. var message = {
  992. type: 'receive',
  993. data: normalizePushMessage(args.message) };
  994. for (var i = 0; i < onPushMessageCallbacks.length; i++) {
  995. var callback = onPushMessageCallbacks[i];
  996. callback(message);
  997. // 该消息已被阻止
  998. if (message.stopped) {
  999. break;
  1000. }
  1001. }
  1002. } else if (args.type === 'click') {
  1003. onPushMessageCallbacks.forEach(function (callback) {
  1004. callback({
  1005. type: 'click',
  1006. data: normalizePushMessage(args.message) });
  1007. });
  1008. }
  1009. }
  1010. var getPushCidCallbacks = [];
  1011. function invokeGetPushCidCallbacks(cid, errMsg) {
  1012. getPushCidCallbacks.forEach(function (callback) {
  1013. callback(cid, errMsg);
  1014. });
  1015. getPushCidCallbacks.length = 0;
  1016. }
  1017. function getPushClientId(args) {
  1018. if (!isPlainObject(args)) {
  1019. args = {};
  1020. }var _getApiCallbacks =
  1021. getApiCallbacks(args),success = _getApiCallbacks.success,fail = _getApiCallbacks.fail,complete = _getApiCallbacks.complete;
  1022. var hasSuccess = isFn(success);
  1023. var hasFail = isFn(fail);
  1024. var hasComplete = isFn(complete);
  1025. Promise.resolve().then(function () {
  1026. if (typeof enabled === 'undefined') {
  1027. enabled = false;
  1028. cid = '';
  1029. cidErrMsg = 'unipush is not enabled';
  1030. }
  1031. getPushCidCallbacks.push(function (cid, errMsg) {
  1032. var res;
  1033. if (cid) {
  1034. res = {
  1035. errMsg: 'getPushClientId:ok',
  1036. cid: cid };
  1037. hasSuccess && success(res);
  1038. } else {
  1039. res = {
  1040. errMsg: 'getPushClientId:fail' + (errMsg ? ' ' + errMsg : '') };
  1041. hasFail && fail(res);
  1042. }
  1043. hasComplete && complete(res);
  1044. });
  1045. if (typeof cid !== 'undefined') {
  1046. invokeGetPushCidCallbacks(cid, cidErrMsg);
  1047. }
  1048. });
  1049. }
  1050. var onPushMessageCallbacks = [];
  1051. // 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现
  1052. var onPushMessage = function onPushMessage(fn) {
  1053. if (onPushMessageCallbacks.indexOf(fn) === -1) {
  1054. onPushMessageCallbacks.push(fn);
  1055. }
  1056. };
  1057. var offPushMessage = function offPushMessage(fn) {
  1058. if (!fn) {
  1059. onPushMessageCallbacks.length = 0;
  1060. } else {
  1061. var index = onPushMessageCallbacks.indexOf(fn);
  1062. if (index > -1) {
  1063. onPushMessageCallbacks.splice(index, 1);
  1064. }
  1065. }
  1066. };
  1067. var api = /*#__PURE__*/Object.freeze({
  1068. __proto__: null,
  1069. getPushClientId: getPushClientId,
  1070. onPushMessage: onPushMessage,
  1071. offPushMessage: offPushMessage,
  1072. invokePushCallback: invokePushCallback });
  1073. var MPPage = Page;
  1074. var MPComponent = Component;
  1075. var customizeRE = /:/g;
  1076. var customize = cached(function (str) {
  1077. return camelize(str.replace(customizeRE, '-'));
  1078. });
  1079. function initTriggerEvent(mpInstance) {
  1080. var oldTriggerEvent = mpInstance.triggerEvent;
  1081. var newTriggerEvent = function newTriggerEvent(event) {for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {args[_key3 - 1] = arguments[_key3];}
  1082. return oldTriggerEvent.apply(mpInstance, [customize(event)].concat(args));
  1083. };
  1084. try {
  1085. // 京东小程序 triggerEvent 为只读
  1086. mpInstance.triggerEvent = newTriggerEvent;
  1087. } catch (error) {
  1088. mpInstance._triggerEvent = newTriggerEvent;
  1089. }
  1090. }
  1091. function initHook(name, options, isComponent) {
  1092. var oldHook = options[name];
  1093. if (!oldHook) {
  1094. options[name] = function () {
  1095. initTriggerEvent(this);
  1096. };
  1097. } else {
  1098. options[name] = function () {
  1099. initTriggerEvent(this);for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {args[_key4] = arguments[_key4];}
  1100. return oldHook.apply(this, args);
  1101. };
  1102. }
  1103. }
  1104. if (!MPPage.__$wrappered) {
  1105. MPPage.__$wrappered = true;
  1106. Page = function Page() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1107. initHook('onLoad', options);
  1108. return MPPage(options);
  1109. };
  1110. Page.after = MPPage.after;
  1111. Component = function Component() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1112. initHook('created', options);
  1113. return MPComponent(options);
  1114. };
  1115. }
  1116. var PAGE_EVENT_HOOKS = [
  1117. 'onPullDownRefresh',
  1118. 'onReachBottom',
  1119. 'onAddToFavorites',
  1120. 'onShareTimeline',
  1121. 'onShareAppMessage',
  1122. 'onPageScroll',
  1123. 'onResize',
  1124. 'onTabItemTap'];
  1125. function initMocks(vm, mocks) {
  1126. var mpInstance = vm.$mp[vm.mpType];
  1127. mocks.forEach(function (mock) {
  1128. if (hasOwn(mpInstance, mock)) {
  1129. vm[mock] = mpInstance[mock];
  1130. }
  1131. });
  1132. }
  1133. function hasHook(hook, vueOptions) {
  1134. if (!vueOptions) {
  1135. return true;
  1136. }
  1137. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  1138. return true;
  1139. }
  1140. vueOptions = vueOptions.default || vueOptions;
  1141. if (isFn(vueOptions)) {
  1142. if (isFn(vueOptions.extendOptions[hook])) {
  1143. return true;
  1144. }
  1145. if (vueOptions.super &&
  1146. vueOptions.super.options &&
  1147. Array.isArray(vueOptions.super.options[hook])) {
  1148. return true;
  1149. }
  1150. return false;
  1151. }
  1152. if (isFn(vueOptions[hook])) {
  1153. return true;
  1154. }
  1155. var mixins = vueOptions.mixins;
  1156. if (Array.isArray(mixins)) {
  1157. return !!mixins.find(function (mixin) {return hasHook(hook, mixin);});
  1158. }
  1159. }
  1160. function initHooks(mpOptions, hooks, vueOptions) {
  1161. hooks.forEach(function (hook) {
  1162. if (hasHook(hook, vueOptions)) {
  1163. mpOptions[hook] = function (args) {
  1164. return this.$vm && this.$vm.__call_hook(hook, args);
  1165. };
  1166. }
  1167. });
  1168. }
  1169. function initVueComponent(Vue, vueOptions) {
  1170. vueOptions = vueOptions.default || vueOptions;
  1171. var VueComponent;
  1172. if (isFn(vueOptions)) {
  1173. VueComponent = vueOptions;
  1174. } else {
  1175. VueComponent = Vue.extend(vueOptions);
  1176. }
  1177. vueOptions = VueComponent.options;
  1178. return [VueComponent, vueOptions];
  1179. }
  1180. function initSlots(vm, vueSlots) {
  1181. if (Array.isArray(vueSlots) && vueSlots.length) {
  1182. var $slots = Object.create(null);
  1183. vueSlots.forEach(function (slotName) {
  1184. $slots[slotName] = true;
  1185. });
  1186. vm.$scopedSlots = vm.$slots = $slots;
  1187. }
  1188. }
  1189. function initVueIds(vueIds, mpInstance) {
  1190. vueIds = (vueIds || '').split(',');
  1191. var len = vueIds.length;
  1192. if (len === 1) {
  1193. mpInstance._$vueId = vueIds[0];
  1194. } else if (len === 2) {
  1195. mpInstance._$vueId = vueIds[0];
  1196. mpInstance._$vuePid = vueIds[1];
  1197. }
  1198. }
  1199. function initData(vueOptions, context) {
  1200. var data = vueOptions.data || {};
  1201. var methods = vueOptions.methods || {};
  1202. if (typeof data === 'function') {
  1203. try {
  1204. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  1205. } catch (e) {
  1206. if (Object({"VUE_APP_NAME":"wechat","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  1207. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  1208. }
  1209. }
  1210. } else {
  1211. try {
  1212. // 对 data 格式化
  1213. data = JSON.parse(JSON.stringify(data));
  1214. } catch (e) {}
  1215. }
  1216. if (!isPlainObject(data)) {
  1217. data = {};
  1218. }
  1219. Object.keys(methods).forEach(function (methodName) {
  1220. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  1221. data[methodName] = methods[methodName];
  1222. }
  1223. });
  1224. return data;
  1225. }
  1226. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  1227. function createObserver(name) {
  1228. return function observer(newVal, oldVal) {
  1229. if (this.$vm) {
  1230. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  1231. }
  1232. };
  1233. }
  1234. function initBehaviors(vueOptions, initBehavior) {
  1235. var vueBehaviors = vueOptions.behaviors;
  1236. var vueExtends = vueOptions.extends;
  1237. var vueMixins = vueOptions.mixins;
  1238. var vueProps = vueOptions.props;
  1239. if (!vueProps) {
  1240. vueOptions.props = vueProps = [];
  1241. }
  1242. var behaviors = [];
  1243. if (Array.isArray(vueBehaviors)) {
  1244. vueBehaviors.forEach(function (behavior) {
  1245. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  1246. if (behavior === 'uni://form-field') {
  1247. if (Array.isArray(vueProps)) {
  1248. vueProps.push('name');
  1249. vueProps.push('value');
  1250. } else {
  1251. vueProps.name = {
  1252. type: String,
  1253. default: '' };
  1254. vueProps.value = {
  1255. type: [String, Number, Boolean, Array, Object, Date],
  1256. default: '' };
  1257. }
  1258. }
  1259. });
  1260. }
  1261. if (isPlainObject(vueExtends) && vueExtends.props) {
  1262. behaviors.push(
  1263. initBehavior({
  1264. properties: initProperties(vueExtends.props, true) }));
  1265. }
  1266. if (Array.isArray(vueMixins)) {
  1267. vueMixins.forEach(function (vueMixin) {
  1268. if (isPlainObject(vueMixin) && vueMixin.props) {
  1269. behaviors.push(
  1270. initBehavior({
  1271. properties: initProperties(vueMixin.props, true) }));
  1272. }
  1273. });
  1274. }
  1275. return behaviors;
  1276. }
  1277. function parsePropType(key, type, defaultValue, file) {
  1278. // [String]=>String
  1279. if (Array.isArray(type) && type.length === 1) {
  1280. return type[0];
  1281. }
  1282. return type;
  1283. }
  1284. function initProperties(props) {var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';var options = arguments.length > 3 ? arguments[3] : undefined;
  1285. var properties = {};
  1286. if (!isBehavior) {
  1287. properties.vueId = {
  1288. type: String,
  1289. value: '' };
  1290. {
  1291. if (options.virtualHost) {
  1292. properties.virtualHostStyle = {
  1293. type: null,
  1294. value: '' };
  1295. properties.virtualHostClass = {
  1296. type: null,
  1297. value: '' };
  1298. }
  1299. }
  1300. // scopedSlotsCompiler auto
  1301. properties.scopedSlotsCompiler = {
  1302. type: String,
  1303. value: '' };
  1304. properties.vueSlots = { // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  1305. type: null,
  1306. value: [],
  1307. observer: function observer(newVal, oldVal) {
  1308. var $slots = Object.create(null);
  1309. newVal.forEach(function (slotName) {
  1310. $slots[slotName] = true;
  1311. });
  1312. this.setData({
  1313. $slots: $slots });
  1314. } };
  1315. }
  1316. if (Array.isArray(props)) {// ['title']
  1317. props.forEach(function (key) {
  1318. properties[key] = {
  1319. type: null,
  1320. observer: createObserver(key) };
  1321. });
  1322. } else if (isPlainObject(props)) {// {title:{type:String,default:''},content:String}
  1323. Object.keys(props).forEach(function (key) {
  1324. var opts = props[key];
  1325. if (isPlainObject(opts)) {// title:{type:String,default:''}
  1326. var value = opts.default;
  1327. if (isFn(value)) {
  1328. value = value();
  1329. }
  1330. opts.type = parsePropType(key, opts.type);
  1331. properties[key] = {
  1332. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  1333. value: value,
  1334. observer: createObserver(key) };
  1335. } else {// content:String
  1336. var type = parsePropType(key, opts);
  1337. properties[key] = {
  1338. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  1339. observer: createObserver(key) };
  1340. }
  1341. });
  1342. }
  1343. return properties;
  1344. }
  1345. function wrapper$1(event) {
  1346. // TODO 又得兼容 mpvue 的 mp 对象
  1347. try {
  1348. event.mp = JSON.parse(JSON.stringify(event));
  1349. } catch (e) {}
  1350. event.stopPropagation = noop;
  1351. event.preventDefault = noop;
  1352. event.target = event.target || {};
  1353. if (!hasOwn(event, 'detail')) {
  1354. event.detail = {};
  1355. }
  1356. if (hasOwn(event, 'markerId')) {
  1357. event.detail = typeof event.detail === 'object' ? event.detail : {};
  1358. event.detail.markerId = event.markerId;
  1359. }
  1360. if (isPlainObject(event.detail)) {
  1361. event.target = Object.assign({}, event.target, event.detail);
  1362. }
  1363. return event;
  1364. }
  1365. function getExtraValue(vm, dataPathsArray) {
  1366. var context = vm;
  1367. dataPathsArray.forEach(function (dataPathArray) {
  1368. var dataPath = dataPathArray[0];
  1369. var value = dataPathArray[2];
  1370. if (dataPath || typeof value !== 'undefined') {// ['','',index,'disable']
  1371. var propPath = dataPathArray[1];
  1372. var valuePath = dataPathArray[3];
  1373. var vFor;
  1374. if (Number.isInteger(dataPath)) {
  1375. vFor = dataPath;
  1376. } else if (!dataPath) {
  1377. vFor = context;
  1378. } else if (typeof dataPath === 'string' && dataPath) {
  1379. if (dataPath.indexOf('#s#') === 0) {
  1380. vFor = dataPath.substr(3);
  1381. } else {
  1382. vFor = vm.__get_value(dataPath, context);
  1383. }
  1384. }
  1385. if (Number.isInteger(vFor)) {
  1386. context = value;
  1387. } else if (!propPath) {
  1388. context = vFor[value];
  1389. } else {
  1390. if (Array.isArray(vFor)) {
  1391. context = vFor.find(function (vForItem) {
  1392. return vm.__get_value(propPath, vForItem) === value;
  1393. });
  1394. } else if (isPlainObject(vFor)) {
  1395. context = Object.keys(vFor).find(function (vForKey) {
  1396. return vm.__get_value(propPath, vFor[vForKey]) === value;
  1397. });
  1398. } else {
  1399. console.error('v-for 暂不支持循环数据:', vFor);
  1400. }
  1401. }
  1402. if (valuePath) {
  1403. context = vm.__get_value(valuePath, context);
  1404. }
  1405. }
  1406. });
  1407. return context;
  1408. }
  1409. function processEventExtra(vm, extra, event) {
  1410. var extraObj = {};
  1411. if (Array.isArray(extra) && extra.length) {
  1412. /**
  1413. *[
  1414. * ['data.items', 'data.id', item.data.id],
  1415. * ['metas', 'id', meta.id]
  1416. *],
  1417. *[
  1418. * ['data.items', 'data.id', item.data.id],
  1419. * ['metas', 'id', meta.id]
  1420. *],
  1421. *'test'
  1422. */
  1423. extra.forEach(function (dataPath, index) {
  1424. if (typeof dataPath === 'string') {
  1425. if (!dataPath) {// model,prop.sync
  1426. extraObj['$' + index] = vm;
  1427. } else {
  1428. if (dataPath === '$event') {// $event
  1429. extraObj['$' + index] = event;
  1430. } else if (dataPath === 'arguments') {
  1431. if (event.detail && event.detail.__args__) {
  1432. extraObj['$' + index] = event.detail.__args__;
  1433. } else {
  1434. extraObj['$' + index] = [event];
  1435. }
  1436. } else if (dataPath.indexOf('$event.') === 0) {// $event.target.value
  1437. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  1438. } else {
  1439. extraObj['$' + index] = vm.__get_value(dataPath);
  1440. }
  1441. }
  1442. } else {
  1443. extraObj['$' + index] = getExtraValue(vm, dataPath);
  1444. }
  1445. });
  1446. }
  1447. return extraObj;
  1448. }
  1449. function getObjByArray(arr) {
  1450. var obj = {};
  1451. for (var i = 1; i < arr.length; i++) {
  1452. var element = arr[i];
  1453. obj[element[0]] = element[1];
  1454. }
  1455. return obj;
  1456. }
  1457. function processEventArgs(vm, event) {var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];var isCustom = arguments.length > 4 ? arguments[4] : undefined;var methodName = arguments.length > 5 ? arguments[5] : undefined;
  1458. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  1459. if (isCustom) {// 自定义事件
  1460. isCustomMPEvent = event.currentTarget &&
  1461. event.currentTarget.dataset &&
  1462. event.currentTarget.dataset.comType === 'wx';
  1463. if (!args.length) {// 无参数,直接传入 event 或 detail 数组
  1464. if (isCustomMPEvent) {
  1465. return [event];
  1466. }
  1467. return event.detail.__args__ || event.detail;
  1468. }
  1469. }
  1470. var extraObj = processEventExtra(vm, extra, event);
  1471. var ret = [];
  1472. args.forEach(function (arg) {
  1473. if (arg === '$event') {
  1474. if (methodName === '__set_model' && !isCustom) {// input v-model value
  1475. ret.push(event.target.value);
  1476. } else {
  1477. if (isCustom && !isCustomMPEvent) {
  1478. ret.push(event.detail.__args__[0]);
  1479. } else {// wxcomponent 组件或内置组件
  1480. ret.push(event);
  1481. }
  1482. }
  1483. } else {
  1484. if (Array.isArray(arg) && arg[0] === 'o') {
  1485. ret.push(getObjByArray(arg));
  1486. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  1487. ret.push(extraObj[arg]);
  1488. } else {
  1489. ret.push(arg);
  1490. }
  1491. }
  1492. });
  1493. return ret;
  1494. }
  1495. var ONCE = '~';
  1496. var CUSTOM = '^';
  1497. function isMatchEventType(eventType, optType) {
  1498. return eventType === optType ||
  1499. optType === 'regionchange' && (
  1500. eventType === 'begin' ||
  1501. eventType === 'end');
  1502. }
  1503. function getContextVm(vm) {
  1504. var $parent = vm.$parent;
  1505. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  1506. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  1507. $parent = $parent.$parent;
  1508. }
  1509. return $parent && $parent.$parent;
  1510. }
  1511. function handleEvent(event) {var _this2 = this;
  1512. event = wrapper$1(event);
  1513. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  1514. var dataset = (event.currentTarget || event.target).dataset;
  1515. if (!dataset) {
  1516. return console.warn('事件信息不存在');
  1517. }
  1518. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  1519. if (!eventOpts) {
  1520. return console.warn('事件信息不存在');
  1521. }
  1522. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  1523. var eventType = event.type;
  1524. var ret = [];
  1525. eventOpts.forEach(function (eventOpt) {
  1526. var type = eventOpt[0];
  1527. var eventsArray = eventOpt[1];
  1528. var isCustom = type.charAt(0) === CUSTOM;
  1529. type = isCustom ? type.slice(1) : type;
  1530. var isOnce = type.charAt(0) === ONCE;
  1531. type = isOnce ? type.slice(1) : type;
  1532. if (eventsArray && isMatchEventType(eventType, type)) {
  1533. eventsArray.forEach(function (eventArray) {
  1534. var methodName = eventArray[0];
  1535. if (methodName) {
  1536. var handlerCtx = _this2.$vm;
  1537. if (handlerCtx.$options.generic) {// mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  1538. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  1539. }
  1540. if (methodName === '$emit') {
  1541. handlerCtx.$emit.apply(handlerCtx,
  1542. processEventArgs(
  1543. _this2.$vm,
  1544. event,
  1545. eventArray[1],
  1546. eventArray[2],
  1547. isCustom,
  1548. methodName));
  1549. return;
  1550. }
  1551. var handler = handlerCtx[methodName];
  1552. if (!isFn(handler)) {
  1553. var _type = _this2.$vm.mpType === 'page' ? 'Page' : 'Component';
  1554. var path = _this2.route || _this2.is;
  1555. throw new Error("".concat(_type, " \"").concat(path, "\" does not have a method \"").concat(methodName, "\""));
  1556. }
  1557. if (isOnce) {
  1558. if (handler.once) {
  1559. return;
  1560. }
  1561. handler.once = true;
  1562. }
  1563. var params = processEventArgs(
  1564. _this2.$vm,
  1565. event,
  1566. eventArray[1],
  1567. eventArray[2],
  1568. isCustom,
  1569. methodName);
  1570. params = Array.isArray(params) ? params : [];
  1571. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  1572. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  1573. // eslint-disable-next-line no-sparse-arrays
  1574. params = params.concat([,,,,,,,,,, event]);
  1575. }
  1576. ret.push(handler.apply(handlerCtx, params));
  1577. }
  1578. });
  1579. }
  1580. });
  1581. if (
  1582. eventType === 'input' &&
  1583. ret.length === 1 &&
  1584. typeof ret[0] !== 'undefined')
  1585. {
  1586. return ret[0];
  1587. }
  1588. }
  1589. var eventChannels = {};
  1590. var eventChannelStack = [];
  1591. function getEventChannel(id) {
  1592. if (id) {
  1593. var eventChannel = eventChannels[id];
  1594. delete eventChannels[id];
  1595. return eventChannel;
  1596. }
  1597. return eventChannelStack.shift();
  1598. }
  1599. var hooks = [
  1600. 'onShow',
  1601. 'onHide',
  1602. 'onError',
  1603. 'onPageNotFound',
  1604. 'onThemeChange',
  1605. 'onUnhandledRejection'];
  1606. function initEventChannel() {
  1607. _vue.default.prototype.getOpenerEventChannel = function () {
  1608. // 微信小程序使用自身getOpenerEventChannel
  1609. {
  1610. return this.$scope.getOpenerEventChannel();
  1611. }
  1612. };
  1613. var callHook = _vue.default.prototype.__call_hook;
  1614. _vue.default.prototype.__call_hook = function (hook, args) {
  1615. if (hook === 'onLoad' && args && args.__id__) {
  1616. this.__eventChannel__ = getEventChannel(args.__id__);
  1617. delete args.__id__;
  1618. }
  1619. return callHook.call(this, hook, args);
  1620. };
  1621. }
  1622. function initScopedSlotsParams() {
  1623. var center = {};
  1624. var parents = {};
  1625. _vue.default.prototype.$hasScopedSlotsParams = function (vueId) {
  1626. var has = center[vueId];
  1627. if (!has) {
  1628. parents[vueId] = this;
  1629. this.$on('hook:destroyed', function () {
  1630. delete parents[vueId];
  1631. });
  1632. }
  1633. return has;
  1634. };
  1635. _vue.default.prototype.$getScopedSlotsParams = function (vueId, name, key) {
  1636. var data = center[vueId];
  1637. if (data) {
  1638. var object = data[name] || {};
  1639. return key ? object[key] : object;
  1640. } else {
  1641. parents[vueId] = this;
  1642. this.$on('hook:destroyed', function () {
  1643. delete parents[vueId];
  1644. });
  1645. }
  1646. };
  1647. _vue.default.prototype.$setScopedSlotsParams = function (name, value) {
  1648. var vueIds = this.$options.propsData.vueId;
  1649. if (vueIds) {
  1650. var vueId = vueIds.split(',')[0];
  1651. var object = center[vueId] = center[vueId] || {};
  1652. object[name] = value;
  1653. if (parents[vueId]) {
  1654. parents[vueId].$forceUpdate();
  1655. }
  1656. }
  1657. };
  1658. _vue.default.mixin({
  1659. destroyed: function destroyed() {
  1660. var propsData = this.$options.propsData;
  1661. var vueId = propsData && propsData.vueId;
  1662. if (vueId) {
  1663. delete center[vueId];
  1664. delete parents[vueId];
  1665. }
  1666. } });
  1667. }
  1668. function parseBaseApp(vm, _ref3)
  1669. {var mocks = _ref3.mocks,initRefs = _ref3.initRefs;
  1670. initEventChannel();
  1671. {
  1672. initScopedSlotsParams();
  1673. }
  1674. if (vm.$options.store) {
  1675. _vue.default.prototype.$store = vm.$options.store;
  1676. }
  1677. uniIdMixin(_vue.default);
  1678. _vue.default.prototype.mpHost = "mp-weixin";
  1679. _vue.default.mixin({
  1680. beforeCreate: function beforeCreate() {
  1681. if (!this.$options.mpType) {
  1682. return;
  1683. }
  1684. this.mpType = this.$options.mpType;
  1685. this.$mp = _defineProperty({
  1686. data: {} },
  1687. this.mpType, this.$options.mpInstance);
  1688. this.$scope = this.$options.mpInstance;
  1689. delete this.$options.mpType;
  1690. delete this.$options.mpInstance;
  1691. if (this.mpType === 'page' && typeof getApp === 'function') {// hack vue-i18n
  1692. var app = getApp();
  1693. if (app.$vm && app.$vm.$i18n) {
  1694. this._i18n = app.$vm.$i18n;
  1695. }
  1696. }
  1697. if (this.mpType !== 'app') {
  1698. initRefs(this);
  1699. initMocks(this, mocks);
  1700. }
  1701. } });
  1702. var appOptions = {
  1703. onLaunch: function onLaunch(args) {
  1704. if (this.$vm) {// 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  1705. return;
  1706. }
  1707. {
  1708. if (wx.canIUse && !wx.canIUse('nextTick')) {// 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  1709. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  1710. }
  1711. }
  1712. this.$vm = vm;
  1713. this.$vm.$mp = {
  1714. app: this };
  1715. this.$vm.$scope = this;
  1716. // vm 上也挂载 globalData
  1717. this.$vm.globalData = this.globalData;
  1718. this.$vm._isMounted = true;
  1719. this.$vm.__call_hook('mounted', args);
  1720. this.$vm.__call_hook('onLaunch', args);
  1721. } };
  1722. // 兼容旧版本 globalData
  1723. appOptions.globalData = vm.$options.globalData || {};
  1724. // 将 methods 中的方法挂在 getApp() 中
  1725. var methods = vm.$options.methods;
  1726. if (methods) {
  1727. Object.keys(methods).forEach(function (name) {
  1728. appOptions[name] = methods[name];
  1729. });
  1730. }
  1731. initAppLocale(_vue.default, vm, normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN);
  1732. initHooks(appOptions, hooks);
  1733. return appOptions;
  1734. }
  1735. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1736. function findVmByVueId(vm, vuePid) {
  1737. var $children = vm.$children;
  1738. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1739. for (var i = $children.length - 1; i >= 0; i--) {
  1740. var childVm = $children[i];
  1741. if (childVm.$scope._$vueId === vuePid) {
  1742. return childVm;
  1743. }
  1744. }
  1745. // 反向递归查找
  1746. var parentVm;
  1747. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1748. parentVm = findVmByVueId($children[_i], vuePid);
  1749. if (parentVm) {
  1750. return parentVm;
  1751. }
  1752. }
  1753. }
  1754. function initBehavior(options) {
  1755. return Behavior(options);
  1756. }
  1757. function isPage() {
  1758. return !!this.route;
  1759. }
  1760. function initRelation(detail) {
  1761. this.triggerEvent('__l', detail);
  1762. }
  1763. function selectAllComponents(mpInstance, selector, $refs) {
  1764. var components = mpInstance.selectAllComponents(selector);
  1765. components.forEach(function (component) {
  1766. var ref = component.dataset.ref;
  1767. $refs[ref] = component.$vm || component;
  1768. {
  1769. if (component.dataset.vueGeneric === 'scoped') {
  1770. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  1771. selectAllComponents(scopedComponent, selector, $refs);
  1772. });
  1773. }
  1774. }
  1775. });
  1776. }
  1777. function initRefs(vm) {
  1778. var mpInstance = vm.$scope;
  1779. Object.defineProperty(vm, '$refs', {
  1780. get: function get() {
  1781. var $refs = {};
  1782. selectAllComponents(mpInstance, '.vue-ref', $refs);
  1783. // TODO 暂不考虑 for 中的 scoped
  1784. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for');
  1785. forComponents.forEach(function (component) {
  1786. var ref = component.dataset.ref;
  1787. if (!$refs[ref]) {
  1788. $refs[ref] = [];
  1789. }
  1790. $refs[ref].push(component.$vm || component);
  1791. });
  1792. return $refs;
  1793. } });
  1794. }
  1795. function handleLink(event) {var _ref4 =
  1796. event.detail || event.value,vuePid = _ref4.vuePid,vueOptions = _ref4.vueOptions; // detail 是微信,value 是百度(dipatch)
  1797. var parentVm;
  1798. if (vuePid) {
  1799. parentVm = findVmByVueId(this.$vm, vuePid);
  1800. }
  1801. if (!parentVm) {
  1802. parentVm = this.$vm;
  1803. }
  1804. vueOptions.parent = parentVm;
  1805. }
  1806. function parseApp(vm) {
  1807. return parseBaseApp(vm, {
  1808. mocks: mocks,
  1809. initRefs: initRefs });
  1810. }
  1811. function createApp(vm) {
  1812. App(parseApp(vm));
  1813. return vm;
  1814. }
  1815. var encodeReserveRE = /[!'()*]/g;
  1816. var encodeReserveReplacer = function encodeReserveReplacer(c) {return '%' + c.charCodeAt(0).toString(16);};
  1817. var commaRE = /%2C/g;
  1818. // fixed encodeURIComponent which is more conformant to RFC3986:
  1819. // - escapes [!'()*]
  1820. // - preserve commas
  1821. var encode = function encode(str) {return encodeURIComponent(str).
  1822. replace(encodeReserveRE, encodeReserveReplacer).
  1823. replace(commaRE, ',');};
  1824. function stringifyQuery(obj) {var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  1825. var res = obj ? Object.keys(obj).map(function (key) {
  1826. var val = obj[key];
  1827. if (val === undefined) {
  1828. return '';
  1829. }
  1830. if (val === null) {
  1831. return encodeStr(key);
  1832. }
  1833. if (Array.isArray(val)) {
  1834. var result = [];
  1835. val.forEach(function (val2) {
  1836. if (val2 === undefined) {
  1837. return;
  1838. }
  1839. if (val2 === null) {
  1840. result.push(encodeStr(key));
  1841. } else {
  1842. result.push(encodeStr(key) + '=' + encodeStr(val2));
  1843. }
  1844. });
  1845. return result.join('&');
  1846. }
  1847. return encodeStr(key) + '=' + encodeStr(val);
  1848. }).filter(function (x) {return x.length > 0;}).join('&') : null;
  1849. return res ? "?".concat(res) : '';
  1850. }
  1851. function parseBaseComponent(vueComponentOptions)
  1852. {var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},isPage = _ref5.isPage,initRelation = _ref5.initRelation;var _initVueComponent =
  1853. initVueComponent(_vue.default, vueComponentOptions),_initVueComponent2 = _slicedToArray(_initVueComponent, 2),VueComponent = _initVueComponent2[0],vueOptions = _initVueComponent2[1];
  1854. var options = _objectSpread({
  1855. multipleSlots: true,
  1856. addGlobalClass: true },
  1857. vueOptions.options || {});
  1858. {
  1859. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  1860. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  1861. Object.assign(options, vueOptions['mp-weixin'].options);
  1862. }
  1863. }
  1864. var componentOptions = {
  1865. options: options,
  1866. data: initData(vueOptions, _vue.default.prototype),
  1867. behaviors: initBehaviors(vueOptions, initBehavior),
  1868. properties: initProperties(vueOptions.props, false, vueOptions.__file, options),
  1869. lifetimes: {
  1870. attached: function attached() {
  1871. var properties = this.properties;
  1872. var options = {
  1873. mpType: isPage.call(this) ? 'page' : 'component',
  1874. mpInstance: this,
  1875. propsData: properties };
  1876. initVueIds(properties.vueId, this);
  1877. // 处理父子关系
  1878. initRelation.call(this, {
  1879. vuePid: this._$vuePid,
  1880. vueOptions: options });
  1881. // 初始化 vue 实例
  1882. this.$vm = new VueComponent(options);
  1883. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  1884. initSlots(this.$vm, properties.vueSlots);
  1885. // 触发首次 setData
  1886. this.$vm.$mount();
  1887. },
  1888. ready: function ready() {
  1889. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  1890. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  1891. if (this.$vm) {
  1892. this.$vm._isMounted = true;
  1893. this.$vm.__call_hook('mounted');
  1894. this.$vm.__call_hook('onReady');
  1895. }
  1896. },
  1897. detached: function detached() {
  1898. this.$vm && this.$vm.$destroy();
  1899. } },
  1900. pageLifetimes: {
  1901. show: function show(args) {
  1902. this.$vm && this.$vm.__call_hook('onPageShow', args);
  1903. },
  1904. hide: function hide() {
  1905. this.$vm && this.$vm.__call_hook('onPageHide');
  1906. },
  1907. resize: function resize(size) {
  1908. this.$vm && this.$vm.__call_hook('onPageResize', size);
  1909. } },
  1910. methods: {
  1911. __l: handleLink,
  1912. __e: handleEvent } };
  1913. // externalClasses
  1914. if (vueOptions.externalClasses) {
  1915. componentOptions.externalClasses = vueOptions.externalClasses;
  1916. }
  1917. if (Array.isArray(vueOptions.wxsCallMethods)) {
  1918. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  1919. componentOptions.methods[callMethod] = function (args) {
  1920. return this.$vm[callMethod](args);
  1921. };
  1922. });
  1923. }
  1924. if (isPage) {
  1925. return componentOptions;
  1926. }
  1927. return [componentOptions, VueComponent];
  1928. }
  1929. function parseComponent(vueComponentOptions) {
  1930. return parseBaseComponent(vueComponentOptions, {
  1931. isPage: isPage,
  1932. initRelation: initRelation });
  1933. }
  1934. var hooks$1 = [
  1935. 'onShow',
  1936. 'onHide',
  1937. 'onUnload'];
  1938. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  1939. function parseBasePage(vuePageOptions, _ref6)
  1940. {var isPage = _ref6.isPage,initRelation = _ref6.initRelation;
  1941. var pageOptions = parseComponent(vuePageOptions);
  1942. initHooks(pageOptions.methods, hooks$1, vuePageOptions);
  1943. pageOptions.methods.onLoad = function (query) {
  1944. this.options = query;
  1945. var copyQuery = Object.assign({}, query);
  1946. delete copyQuery.__id__;
  1947. this.$page = {
  1948. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery) };
  1949. this.$vm.$mp.query = query; // 兼容 mpvue
  1950. this.$vm.__call_hook('onLoad', query);
  1951. };
  1952. return pageOptions;
  1953. }
  1954. function parsePage(vuePageOptions) {
  1955. return parseBasePage(vuePageOptions, {
  1956. isPage: isPage,
  1957. initRelation: initRelation });
  1958. }
  1959. function createPage(vuePageOptions) {
  1960. {
  1961. return Component(parsePage(vuePageOptions));
  1962. }
  1963. }
  1964. function createComponent(vueOptions) {
  1965. {
  1966. return Component(parseComponent(vueOptions));
  1967. }
  1968. }
  1969. function createSubpackageApp(vm) {
  1970. var appOptions = parseApp(vm);
  1971. var app = getApp({
  1972. allowDefault: true });
  1973. vm.$scope = app;
  1974. var globalData = app.globalData;
  1975. if (globalData) {
  1976. Object.keys(appOptions.globalData).forEach(function (name) {
  1977. if (!hasOwn(globalData, name)) {
  1978. globalData[name] = appOptions.globalData[name];
  1979. }
  1980. });
  1981. }
  1982. Object.keys(appOptions).forEach(function (name) {
  1983. if (!hasOwn(app, name)) {
  1984. app[name] = appOptions[name];
  1985. }
  1986. });
  1987. if (isFn(appOptions.onShow) && wx.onAppShow) {
  1988. wx.onAppShow(function () {for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {args[_key5] = arguments[_key5];}
  1989. vm.__call_hook('onShow', args);
  1990. });
  1991. }
  1992. if (isFn(appOptions.onHide) && wx.onAppHide) {
  1993. wx.onAppHide(function () {for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {args[_key6] = arguments[_key6];}
  1994. vm.__call_hook('onHide', args);
  1995. });
  1996. }
  1997. if (isFn(appOptions.onLaunch)) {
  1998. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  1999. vm.__call_hook('onLaunch', args);
  2000. }
  2001. return vm;
  2002. }
  2003. function createPlugin(vm) {
  2004. var appOptions = parseApp(vm);
  2005. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2006. wx.onAppShow(function () {for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {args[_key7] = arguments[_key7];}
  2007. vm.__call_hook('onShow', args);
  2008. });
  2009. }
  2010. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2011. wx.onAppHide(function () {for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {args[_key8] = arguments[_key8];}
  2012. vm.__call_hook('onHide', args);
  2013. });
  2014. }
  2015. if (isFn(appOptions.onLaunch)) {
  2016. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2017. vm.__call_hook('onLaunch', args);
  2018. }
  2019. return vm;
  2020. }
  2021. todos.forEach(function (todoApi) {
  2022. protocols[todoApi] = false;
  2023. });
  2024. canIUses.forEach(function (canIUseApi) {
  2025. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name :
  2026. canIUseApi;
  2027. if (!wx.canIUse(apiName)) {
  2028. protocols[canIUseApi] = false;
  2029. }
  2030. });
  2031. var uni = {};
  2032. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  2033. uni = new Proxy({}, {
  2034. get: function get(target, name) {
  2035. if (hasOwn(target, name)) {
  2036. return target[name];
  2037. }
  2038. if (baseApi[name]) {
  2039. return baseApi[name];
  2040. }
  2041. if (api[name]) {
  2042. return promisify(name, api[name]);
  2043. }
  2044. {
  2045. if (extraApi[name]) {
  2046. return promisify(name, extraApi[name]);
  2047. }
  2048. if (todoApis[name]) {
  2049. return promisify(name, todoApis[name]);
  2050. }
  2051. }
  2052. if (eventApi[name]) {
  2053. return eventApi[name];
  2054. }
  2055. if (!hasOwn(wx, name) && !hasOwn(protocols, name)) {
  2056. return;
  2057. }
  2058. return promisify(name, wrapper(name, wx[name]));
  2059. },
  2060. set: function set(target, name, value) {
  2061. target[name] = value;
  2062. return true;
  2063. } });
  2064. } else {
  2065. Object.keys(baseApi).forEach(function (name) {
  2066. uni[name] = baseApi[name];
  2067. });
  2068. {
  2069. Object.keys(todoApis).forEach(function (name) {
  2070. uni[name] = promisify(name, todoApis[name]);
  2071. });
  2072. Object.keys(extraApi).forEach(function (name) {
  2073. uni[name] = promisify(name, todoApis[name]);
  2074. });
  2075. }
  2076. Object.keys(eventApi).forEach(function (name) {
  2077. uni[name] = eventApi[name];
  2078. });
  2079. Object.keys(api).forEach(function (name) {
  2080. uni[name] = promisify(name, api[name]);
  2081. });
  2082. Object.keys(wx).forEach(function (name) {
  2083. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  2084. uni[name] = promisify(name, wrapper(name, wx[name]));
  2085. }
  2086. });
  2087. }
  2088. wx.createApp = createApp;
  2089. wx.createPage = createPage;
  2090. wx.createComponent = createComponent;
  2091. wx.createSubpackageApp = createSubpackageApp;
  2092. wx.createPlugin = createPlugin;
  2093. var uni$1 = uni;var _default =
  2094. uni$1;exports.default = _default;
  2095. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 2)))
  2096. /***/ }),
  2097. /***/ 11:
  2098. /*!**********************************************************************************************************!*\
  2099. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  2100. \**********************************************************************************************************/
  2101. /*! exports provided: default */
  2102. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2103. "use strict";
  2104. __webpack_require__.r(__webpack_exports__);
  2105. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  2106. /* globals __VUE_SSR_CONTEXT__ */
  2107. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  2108. // This module is a runtime utility for cleaner component module output and will
  2109. // be included in the final webpack user bundle.
  2110. function normalizeComponent (
  2111. scriptExports,
  2112. render,
  2113. staticRenderFns,
  2114. functionalTemplate,
  2115. injectStyles,
  2116. scopeId,
  2117. moduleIdentifier, /* server only */
  2118. shadowMode, /* vue-cli only */
  2119. components, // fixed by xxxxxx auto components
  2120. renderjs // fixed by xxxxxx renderjs
  2121. ) {
  2122. // Vue.extend constructor export interop
  2123. var options = typeof scriptExports === 'function'
  2124. ? scriptExports.options
  2125. : scriptExports
  2126. // fixed by xxxxxx auto components
  2127. if (components) {
  2128. if (!options.components) {
  2129. options.components = {}
  2130. }
  2131. var hasOwn = Object.prototype.hasOwnProperty
  2132. for (var name in components) {
  2133. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  2134. options.components[name] = components[name]
  2135. }
  2136. }
  2137. }
  2138. // fixed by xxxxxx renderjs
  2139. if (renderjs) {
  2140. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  2141. this[renderjs.__module] = this
  2142. });
  2143. (options.mixins || (options.mixins = [])).push(renderjs)
  2144. }
  2145. // render functions
  2146. if (render) {
  2147. options.render = render
  2148. options.staticRenderFns = staticRenderFns
  2149. options._compiled = true
  2150. }
  2151. // functional template
  2152. if (functionalTemplate) {
  2153. options.functional = true
  2154. }
  2155. // scopedId
  2156. if (scopeId) {
  2157. options._scopeId = 'data-v-' + scopeId
  2158. }
  2159. var hook
  2160. if (moduleIdentifier) { // server build
  2161. hook = function (context) {
  2162. // 2.3 injection
  2163. context =
  2164. context || // cached call
  2165. (this.$vnode && this.$vnode.ssrContext) || // stateful
  2166. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  2167. // 2.2 with runInNewContext: true
  2168. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  2169. context = __VUE_SSR_CONTEXT__
  2170. }
  2171. // inject component styles
  2172. if (injectStyles) {
  2173. injectStyles.call(this, context)
  2174. }
  2175. // register component module identifier for async chunk inferrence
  2176. if (context && context._registeredComponents) {
  2177. context._registeredComponents.add(moduleIdentifier)
  2178. }
  2179. }
  2180. // used by ssr in case component is cached and beforeCreate
  2181. // never gets called
  2182. options._ssrRegister = hook
  2183. } else if (injectStyles) {
  2184. hook = shadowMode
  2185. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  2186. : injectStyles
  2187. }
  2188. if (hook) {
  2189. if (options.functional) {
  2190. // for template-only hot-reload because in that case the render fn doesn't
  2191. // go through the normalizer
  2192. options._injectStyles = hook
  2193. // register for functioal component in vue file
  2194. var originalRender = options.render
  2195. options.render = function renderWithStyleInjection (h, context) {
  2196. hook.call(context)
  2197. return originalRender(h, context)
  2198. }
  2199. } else {
  2200. // inject component registration as beforeCreate hook
  2201. var existing = options.beforeCreate
  2202. options.beforeCreate = existing
  2203. ? [].concat(existing, hook)
  2204. : [hook]
  2205. }
  2206. }
  2207. return {
  2208. exports: scriptExports,
  2209. options: options
  2210. }
  2211. }
  2212. /***/ }),
  2213. /***/ 12:
  2214. /*!******************************************************!*\
  2215. !*** D:/hongxing/storage-wechat/commons/commons.css ***!
  2216. \******************************************************/
  2217. /*! no static exports found */
  2218. /***/ (function(module, exports, __webpack_require__) {
  2219. // extracted by mini-css-extract-plugin
  2220. if(false) { var cssReload; }
  2221. /***/ }),
  2222. /***/ 13:
  2223. /*!***********************************************!*\
  2224. !*** D:/hongxing/storage-wechat/util/http.js ***!
  2225. \***********************************************/
  2226. /*! no static exports found */
  2227. /***/ (function(module, exports, __webpack_require__) {
  2228. "use strict";
  2229. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.get = get;exports.post = post;exports.default = void 0;var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 4));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  2230. //const BASE_URL = 'https://ymt.prpiano.com/api'
  2231. //const BASE_URL = 'https://ht.test.prpiano.com/api'
  2232. //xw
  2233. //const BASE_URL = 'http://10.0.52.100:82'
  2234. //dh
  2235. var BASE_URL;
  2236. var BASE_URL2;
  2237. //lb
  2238. //const BASE_URL = 'http://10.0.126.219:82'
  2239. if (true) {
  2240. //线上 https://bytesailing.cn/api/storage/cloudApi
  2241. BASE_URL = 'https://cfm.bytesail.cn/api/storage/cloudApi';
  2242. BASE_URL2 = 'https://cfm.bytesail.cn/api/storage/cloudApi';
  2243. } else {}
  2244. /**
  2245. * 封装get方法
  2246. * @param url
  2247. * @param data
  2248. * @returns {Promise}
  2249. */
  2250. function get(url) {var req = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  2251. return new Promise(function (resolve, reject) {
  2252. if (_vue.default.prototype.$token) {
  2253. var hander = {
  2254. 'Authorization': 'Basic c2FiZXI6c2FiZXJfc2VjcmV0' };
  2255. } else {
  2256. var hander = {};
  2257. }
  2258. uni.request({
  2259. url: BASE_URL + url,
  2260. data: req,
  2261. method: 'GET',
  2262. header: hander,
  2263. success: function success(res) {
  2264. resolve(res.data);
  2265. },
  2266. fail: function fail(err) {
  2267. return Promise.reject(err);
  2268. } });
  2269. });
  2270. }
  2271. /**
  2272. * 封装post请求
  2273. * @param url
  2274. * @param data
  2275. * @returns {Promise}
  2276. */
  2277. var urlList = [];
  2278. function post(url) {var req = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};var headers = arguments.length > 2 ? arguments[2] : undefined;
  2279. console.log(_vue.default.prototype.$token, 'token');
  2280. var httpUrl;
  2281. if (url.indexOf('/cloudApi') == -1) {
  2282. httpUrl = BASE_URL;
  2283. } else {
  2284. httpUrl = BASE_URL2;
  2285. }
  2286. if (urlList.indexOf(url) == -1 || url == '/wx/inventory/selectFabricWTypeDetails' || '/wx/inventory/selectInkEW') {
  2287. urlList.push(url);
  2288. setTimeout(function () {
  2289. urlList.splice(urlList.indexOf(url), 1);
  2290. }, 500);
  2291. } else {
  2292. return Promise.reject('请勿频繁提交');
  2293. }
  2294. return new Promise(function (resolve, reject) {
  2295. if (_vue.default.prototype.$token) {
  2296. var hander = {
  2297. 'Blade-Auth': 'bearer ' + _vue.default.prototype.$token.access_token,
  2298. 'Authorization': 'Basic c2FiZXI6c2FiZXJfc2VjcmV0',
  2299. 'Content-Type': 'application/json;charset=UTF-8' };
  2300. } else {
  2301. var hander = {};
  2302. }
  2303. if (headers) hander = headers;
  2304. uni.request({
  2305. url: httpUrl + url,
  2306. data: req,
  2307. method: 'POST',
  2308. header: hander,
  2309. success: function success(res) {
  2310. console.log(res);
  2311. if (res.data.code == 401) {
  2312. uni.showToast({
  2313. icon: "error",
  2314. title: '前往登录',
  2315. duration: 2000 });
  2316. _vue.default.prototype.$token = null;
  2317. uni.redirectTo({
  2318. url: "/pages/user/login" });
  2319. } else if (res.data.code == 500) {
  2320. uni.showToast({
  2321. icon: "error",
  2322. title: res.data.msg,
  2323. duration: 2000 });
  2324. } else if (res.data.code == 200) {
  2325. resolve(res.data);
  2326. } else if (!res.data.code) {
  2327. uni.showToast({
  2328. icon: "error",
  2329. title: '服务器错误',
  2330. duration: 2000 });
  2331. } else {
  2332. uni.showToast({
  2333. icon: "error",
  2334. title: res.data.msg,
  2335. duration: 2000 });
  2336. }
  2337. },
  2338. fail: function fail(err) {
  2339. uni.showToast({
  2340. icon: "error",
  2341. title: '服务器错误',
  2342. duration: 2000 });
  2343. return Promise.reject(err);
  2344. } });
  2345. });
  2346. }var _default =
  2347. {
  2348. post: post,
  2349. get: get };exports.default = _default;
  2350. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  2351. /***/ }),
  2352. /***/ 14:
  2353. /*!**********************************************************!*\
  2354. !*** D:/hongxing/storage-wechat/js_sdk/zww-md5/w_md5.js ***!
  2355. \**********************************************************/
  2356. /*! no static exports found */
  2357. /***/ (function(module, exports, __webpack_require__) {
  2358. "use strict";
  2359. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var w_md5 = {};
  2360. function hex_md5(string, bit) {
  2361. function md5_RotateLeft(lValue, iShiftBits) {
  2362. return lValue << iShiftBits | lValue >>> 32 - iShiftBits;
  2363. }
  2364. function md5_AddUnsigned(lX, lY) {
  2365. var lX4, lY4, lX8, lY8, lResult;
  2366. lX8 = lX & 0x80000000;
  2367. lY8 = lY & 0x80000000;
  2368. lX4 = lX & 0x40000000;
  2369. lY4 = lY & 0x40000000;
  2370. lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF);
  2371. if (lX4 & lY4) {
  2372. return lResult ^ 0x80000000 ^ lX8 ^ lY8;
  2373. }
  2374. if (lX4 | lY4) {
  2375. if (lResult & 0x40000000) {
  2376. return lResult ^ 0xC0000000 ^ lX8 ^ lY8;
  2377. } else {
  2378. return lResult ^ 0x40000000 ^ lX8 ^ lY8;
  2379. }
  2380. } else {
  2381. return lResult ^ lX8 ^ lY8;
  2382. }
  2383. }
  2384. function md5_F(x, y, z) {
  2385. return x & y | ~x & z;
  2386. }
  2387. function md5_G(x, y, z) {
  2388. return x & z | y & ~z;
  2389. }
  2390. function md5_H(x, y, z) {
  2391. return x ^ y ^ z;
  2392. }
  2393. function md5_I(x, y, z) {
  2394. return y ^ (x | ~z);
  2395. }
  2396. function md5_FF(a, b, c, d, x, s, ac) {
  2397. a = md5_AddUnsigned(a, md5_AddUnsigned(md5_AddUnsigned(md5_F(b, c, d), x), ac));
  2398. return md5_AddUnsigned(md5_RotateLeft(a, s), b);
  2399. };
  2400. function md5_GG(a, b, c, d, x, s, ac) {
  2401. a = md5_AddUnsigned(a, md5_AddUnsigned(md5_AddUnsigned(md5_G(b, c, d), x), ac));
  2402. return md5_AddUnsigned(md5_RotateLeft(a, s), b);
  2403. };
  2404. function md5_HH(a, b, c, d, x, s, ac) {
  2405. a = md5_AddUnsigned(a, md5_AddUnsigned(md5_AddUnsigned(md5_H(b, c, d), x), ac));
  2406. return md5_AddUnsigned(md5_RotateLeft(a, s), b);
  2407. };
  2408. function md5_II(a, b, c, d, x, s, ac) {
  2409. a = md5_AddUnsigned(a, md5_AddUnsigned(md5_AddUnsigned(md5_I(b, c, d), x), ac));
  2410. return md5_AddUnsigned(md5_RotateLeft(a, s), b);
  2411. };
  2412. function md5_ConvertToWordArray(string) {
  2413. var lWordCount;
  2414. var lMessageLength = string.length;
  2415. var lNumberOfWords_temp1 = lMessageLength + 8;
  2416. var lNumberOfWords_temp2 = (lNumberOfWords_temp1 - lNumberOfWords_temp1 % 64) / 64;
  2417. var lNumberOfWords = (lNumberOfWords_temp2 + 1) * 16;
  2418. var lWordArray = Array(lNumberOfWords - 1);
  2419. var lBytePosition = 0;
  2420. var lByteCount = 0;
  2421. while (lByteCount < lMessageLength) {
  2422. lWordCount = (lByteCount - lByteCount % 4) / 4;
  2423. lBytePosition = lByteCount % 4 * 8;
  2424. lWordArray[lWordCount] = lWordArray[lWordCount] | string.charCodeAt(lByteCount) << lBytePosition;
  2425. lByteCount++;
  2426. }
  2427. lWordCount = (lByteCount - lByteCount % 4) / 4;
  2428. lBytePosition = lByteCount % 4 * 8;
  2429. lWordArray[lWordCount] = lWordArray[lWordCount] | 0x80 << lBytePosition;
  2430. lWordArray[lNumberOfWords - 2] = lMessageLength << 3;
  2431. lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29;
  2432. return lWordArray;
  2433. };
  2434. function md5_WordToHex(lValue) {
  2435. var WordToHexValue = "",WordToHexValue_temp = "",lByte,lCount;
  2436. for (lCount = 0; lCount <= 3; lCount++) {
  2437. lByte = lValue >>> lCount * 8 & 255;
  2438. WordToHexValue_temp = "0" + lByte.toString(16);
  2439. WordToHexValue = WordToHexValue + WordToHexValue_temp.substr(WordToHexValue_temp.length - 2, 2);
  2440. }
  2441. return WordToHexValue;
  2442. };
  2443. function md5_Utf8Encode(string) {
  2444. string = string.replace(/\r\n/g, "\n");
  2445. var utftext = "";
  2446. for (var n = 0; n < string.length; n++) {
  2447. var c = string.charCodeAt(n);
  2448. if (c < 128) {
  2449. utftext += String.fromCharCode(c);
  2450. } else if (c > 127 && c < 2048) {
  2451. utftext += String.fromCharCode(c >> 6 | 192);
  2452. utftext += String.fromCharCode(c & 63 | 128);
  2453. } else {
  2454. utftext += String.fromCharCode(c >> 12 | 224);
  2455. utftext += String.fromCharCode(c >> 6 & 63 | 128);
  2456. utftext += String.fromCharCode(c & 63 | 128);
  2457. }
  2458. }
  2459. return utftext;
  2460. };
  2461. var x = Array();
  2462. var k, AA, BB, CC, DD, a, b, c, d;
  2463. var S11 = 7,S12 = 12,S13 = 17,S14 = 22;
  2464. var S21 = 5,S22 = 9,S23 = 14,S24 = 20;
  2465. var S31 = 4,S32 = 11,S33 = 16,S34 = 23;
  2466. var S41 = 6,S42 = 10,S43 = 15,S44 = 21;
  2467. string = md5_Utf8Encode(string);
  2468. x = md5_ConvertToWordArray(string);
  2469. a = 0x67452301;b = 0xEFCDAB89;c = 0x98BADCFE;d = 0x10325476;
  2470. for (k = 0; k < x.length; k += 16) {
  2471. AA = a;BB = b;CC = c;DD = d;
  2472. a = md5_FF(a, b, c, d, x[k + 0], S11, 0xD76AA478);
  2473. d = md5_FF(d, a, b, c, x[k + 1], S12, 0xE8C7B756);
  2474. c = md5_FF(c, d, a, b, x[k + 2], S13, 0x242070DB);
  2475. b = md5_FF(b, c, d, a, x[k + 3], S14, 0xC1BDCEEE);
  2476. a = md5_FF(a, b, c, d, x[k + 4], S11, 0xF57C0FAF);
  2477. d = md5_FF(d, a, b, c, x[k + 5], S12, 0x4787C62A);
  2478. c = md5_FF(c, d, a, b, x[k + 6], S13, 0xA8304613);
  2479. b = md5_FF(b, c, d, a, x[k + 7], S14, 0xFD469501);
  2480. a = md5_FF(a, b, c, d, x[k + 8], S11, 0x698098D8);
  2481. d = md5_FF(d, a, b, c, x[k + 9], S12, 0x8B44F7AF);
  2482. c = md5_FF(c, d, a, b, x[k + 10], S13, 0xFFFF5BB1);
  2483. b = md5_FF(b, c, d, a, x[k + 11], S14, 0x895CD7BE);
  2484. a = md5_FF(a, b, c, d, x[k + 12], S11, 0x6B901122);
  2485. d = md5_FF(d, a, b, c, x[k + 13], S12, 0xFD987193);
  2486. c = md5_FF(c, d, a, b, x[k + 14], S13, 0xA679438E);
  2487. b = md5_FF(b, c, d, a, x[k + 15], S14, 0x49B40821);
  2488. a = md5_GG(a, b, c, d, x[k + 1], S21, 0xF61E2562);
  2489. d = md5_GG(d, a, b, c, x[k + 6], S22, 0xC040B340);
  2490. c = md5_GG(c, d, a, b, x[k + 11], S23, 0x265E5A51);
  2491. b = md5_GG(b, c, d, a, x[k + 0], S24, 0xE9B6C7AA);
  2492. a = md5_GG(a, b, c, d, x[k + 5], S21, 0xD62F105D);
  2493. d = md5_GG(d, a, b, c, x[k + 10], S22, 0x2441453);
  2494. c = md5_GG(c, d, a, b, x[k + 15], S23, 0xD8A1E681);
  2495. b = md5_GG(b, c, d, a, x[k + 4], S24, 0xE7D3FBC8);
  2496. a = md5_GG(a, b, c, d, x[k + 9], S21, 0x21E1CDE6);
  2497. d = md5_GG(d, a, b, c, x[k + 14], S22, 0xC33707D6);
  2498. c = md5_GG(c, d, a, b, x[k + 3], S23, 0xF4D50D87);
  2499. b = md5_GG(b, c, d, a, x[k + 8], S24, 0x455A14ED);
  2500. a = md5_GG(a, b, c, d, x[k + 13], S21, 0xA9E3E905);
  2501. d = md5_GG(d, a, b, c, x[k + 2], S22, 0xFCEFA3F8);
  2502. c = md5_GG(c, d, a, b, x[k + 7], S23, 0x676F02D9);
  2503. b = md5_GG(b, c, d, a, x[k + 12], S24, 0x8D2A4C8A);
  2504. a = md5_HH(a, b, c, d, x[k + 5], S31, 0xFFFA3942);
  2505. d = md5_HH(d, a, b, c, x[k + 8], S32, 0x8771F681);
  2506. c = md5_HH(c, d, a, b, x[k + 11], S33, 0x6D9D6122);
  2507. b = md5_HH(b, c, d, a, x[k + 14], S34, 0xFDE5380C);
  2508. a = md5_HH(a, b, c, d, x[k + 1], S31, 0xA4BEEA44);
  2509. d = md5_HH(d, a, b, c, x[k + 4], S32, 0x4BDECFA9);
  2510. c = md5_HH(c, d, a, b, x[k + 7], S33, 0xF6BB4B60);
  2511. b = md5_HH(b, c, d, a, x[k + 10], S34, 0xBEBFBC70);
  2512. a = md5_HH(a, b, c, d, x[k + 13], S31, 0x289B7EC6);
  2513. d = md5_HH(d, a, b, c, x[k + 0], S32, 0xEAA127FA);
  2514. c = md5_HH(c, d, a, b, x[k + 3], S33, 0xD4EF3085);
  2515. b = md5_HH(b, c, d, a, x[k + 6], S34, 0x4881D05);
  2516. a = md5_HH(a, b, c, d, x[k + 9], S31, 0xD9D4D039);
  2517. d = md5_HH(d, a, b, c, x[k + 12], S32, 0xE6DB99E5);
  2518. c = md5_HH(c, d, a, b, x[k + 15], S33, 0x1FA27CF8);
  2519. b = md5_HH(b, c, d, a, x[k + 2], S34, 0xC4AC5665);
  2520. a = md5_II(a, b, c, d, x[k + 0], S41, 0xF4292244);
  2521. d = md5_II(d, a, b, c, x[k + 7], S42, 0x432AFF97);
  2522. c = md5_II(c, d, a, b, x[k + 14], S43, 0xAB9423A7);
  2523. b = md5_II(b, c, d, a, x[k + 5], S44, 0xFC93A039);
  2524. a = md5_II(a, b, c, d, x[k + 12], S41, 0x655B59C3);
  2525. d = md5_II(d, a, b, c, x[k + 3], S42, 0x8F0CCC92);
  2526. c = md5_II(c, d, a, b, x[k + 10], S43, 0xFFEFF47D);
  2527. b = md5_II(b, c, d, a, x[k + 1], S44, 0x85845DD1);
  2528. a = md5_II(a, b, c, d, x[k + 8], S41, 0x6FA87E4F);
  2529. d = md5_II(d, a, b, c, x[k + 15], S42, 0xFE2CE6E0);
  2530. c = md5_II(c, d, a, b, x[k + 6], S43, 0xA3014314);
  2531. b = md5_II(b, c, d, a, x[k + 13], S44, 0x4E0811A1);
  2532. a = md5_II(a, b, c, d, x[k + 4], S41, 0xF7537E82);
  2533. d = md5_II(d, a, b, c, x[k + 11], S42, 0xBD3AF235);
  2534. c = md5_II(c, d, a, b, x[k + 2], S43, 0x2AD7D2BB);
  2535. b = md5_II(b, c, d, a, x[k + 9], S44, 0xEB86D391);
  2536. a = md5_AddUnsigned(a, AA);
  2537. b = md5_AddUnsigned(b, BB);
  2538. c = md5_AddUnsigned(c, CC);
  2539. d = md5_AddUnsigned(d, DD);
  2540. }
  2541. if (bit == 32) {
  2542. return (md5_WordToHex(a) + md5_WordToHex(b) + md5_WordToHex(c) + md5_WordToHex(d)).toLowerCase();
  2543. }
  2544. return (md5_WordToHex(b) + md5_WordToHex(c)).toLowerCase();
  2545. }
  2546. //16位小写
  2547. w_md5.hex_md5_16 = function (string) {
  2548. return hex_md5(string, 16);
  2549. };
  2550. //16位大写
  2551. w_md5.hex_md5_16Upper = function (string) {
  2552. return hex_md5(string, 16).toUpperCase();
  2553. };
  2554. //32位小写
  2555. w_md5.hex_md5_32 = function (string) {
  2556. return hex_md5(string, 32);
  2557. };
  2558. //32位大写
  2559. w_md5.hex_md5_32Upper = function (string) {
  2560. return hex_md5(string, 32).toUpperCase();
  2561. };var _default =
  2562. w_md5;exports.default = _default;
  2563. /***/ }),
  2564. /***/ 2:
  2565. /*!***********************************!*\
  2566. !*** (webpack)/buildin/global.js ***!
  2567. \***********************************/
  2568. /*! no static exports found */
  2569. /***/ (function(module, exports) {
  2570. var g;
  2571. // This works in non-strict mode
  2572. g = (function() {
  2573. return this;
  2574. })();
  2575. try {
  2576. // This works if eval is allowed (see CSP)
  2577. g = g || new Function("return this")();
  2578. } catch (e) {
  2579. // This works if the window reference is available
  2580. if (typeof window === "object") g = window;
  2581. }
  2582. // g can still be undefined, but nothing to do about it...
  2583. // We return undefined, instead of nothing here, so it's
  2584. // easier to handle this case. if(!global) { ...}
  2585. module.exports = g;
  2586. /***/ }),
  2587. /***/ 21:
  2588. /*!********************************************************!*\
  2589. !*** D:/hongxing/storage-wechat/util/cacheConstant.js ***!
  2590. \********************************************************/
  2591. /*! no static exports found */
  2592. /***/ (function(module, exports, __webpack_require__) {
  2593. "use strict";
  2594. Object.defineProperty(exports, "__esModule", { value: true });exports.OPENID = exports.TOKEN_NAME = void 0; // 记录微信本地缓存key
  2595. var TOKEN_NAME = 'Authorization';exports.TOKEN_NAME = TOKEN_NAME;
  2596. var OPENID = 'openid';exports.OPENID = OPENID;
  2597. /***/ }),
  2598. /***/ 22:
  2599. /*!**********************************************!*\
  2600. !*** D:/hongxing/storage-wechat/util/api.js ***!
  2601. \**********************************************/
  2602. /*! no static exports found */
  2603. /***/ (function(module, exports, __webpack_require__) {
  2604. "use strict";
  2605. Object.defineProperty(exports, "__esModule", { value: true });exports.isBind = isBind;exports.getInfo = getInfo;exports.usernameLogin = usernameLogin;exports.getMaterialGroupList = getMaterialGroupList;exports.getPurchaseByMaterialIdList = getPurchaseByMaterialIdList;exports.addBatch = addBatch;
  2606. var _request = __webpack_require__(/*! ./request.js */ 23); // 后端接口集合
  2607. // 查看微信用户是否绑定管理系统
  2608. function isBind(data) {
  2609. return (0, _request.request)("/wx/login/isBind", data);
  2610. }
  2611. // 获取用户基本信息(菜单访问权限,用户id,用户名,角色权限字符)
  2612. function getInfo(data) {
  2613. return (0, _request.request)("/wx/login/getUserInfo", data);
  2614. }
  2615. // 用户名、密码、openid登录
  2616. function usernameLogin(data) {
  2617. return (0, _request.request)("/wx/login/usernameLogin", data);
  2618. }
  2619. // 生成二维码列表
  2620. function getMaterialGroupList(data) {
  2621. return (0, _request.request)("/wx/createQrcode/getMaterialGroupList", data);
  2622. }
  2623. // 选择入库单页面列表
  2624. function getPurchaseByMaterialIdList(data) {
  2625. return (0, _request.request)("/wx/createQrcode/getPurchaseByMaterialIdList", data);
  2626. }
  2627. // 添加二维码
  2628. function addBatch(data) {
  2629. return (0, _request.request)("/wx/createQrcode/addBatch", data);
  2630. }
  2631. /***/ }),
  2632. /***/ 23:
  2633. /*!**************************************************!*\
  2634. !*** D:/hongxing/storage-wechat/util/request.js ***!
  2635. \**************************************************/
  2636. /*! no static exports found */
  2637. /***/ (function(module, exports, __webpack_require__) {
  2638. "use strict";
  2639. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.request = request;
  2640. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 4));
  2641. var _cacheConstant = __webpack_require__(/*! ./cacheConstant */ 21);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} // 请求后端服务器工具类
  2642. var baseURL = "http://114.115.167.11:8081/api";
  2643. function request(url, data, method) {
  2644. console.log(url, data, method);
  2645. // 赋值token
  2646. var token = _vue.default.prototype.$token;
  2647. console.log();
  2648. console.log(!token);
  2649. if (token) {
  2650. var hander = {
  2651. 'Authorization': _vue.default.prototype.$token };
  2652. } else {
  2653. var hander = {};
  2654. }
  2655. // 默认执行get方法
  2656. method = method === undefined ? 'post' : method;
  2657. wx.showNavigationBarLoading();
  2658. return new Promise(function (resove, reject) {
  2659. uni.request({
  2660. url: baseURL + url,
  2661. method: method,
  2662. data: data,
  2663. header: hander,
  2664. success: function success(res) {
  2665. var data = res.data;
  2666. // 对错误进行拦截提示
  2667. if (data.code != 200) {
  2668. uni.showToast({
  2669. title: data.msg,
  2670. icon: 'none',
  2671. duration: 2000 });
  2672. reject();
  2673. }
  2674. resove(data.data);
  2675. },
  2676. fail: function fail(msg) {
  2677. console.log('请求失败=======', msg);
  2678. uni.showToast({
  2679. title: "网络异常,连接服务器失败",
  2680. icon: 'none',
  2681. duration: 2000 });
  2682. reject();
  2683. },
  2684. complete: function complete() {
  2685. uni.hideNavigationBarLoading();
  2686. } });
  2687. });
  2688. }
  2689. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  2690. /***/ }),
  2691. /***/ 3:
  2692. /*!*************************************************************!*\
  2693. !*** ./node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js ***!
  2694. \*************************************************************/
  2695. /*! no static exports found */
  2696. /***/ (function(module, exports, __webpack_require__) {
  2697. "use strict";
  2698. /* WEBPACK VAR INJECTION */(function(uni, global) {Object.defineProperty(exports, "__esModule", { value: true });exports.compileI18nJsonStr = compileI18nJsonStr;exports.hasI18nJson = hasI18nJson;exports.initVueI18n = initVueI18n;exports.isI18nStr = isI18nStr;exports.normalizeLocale = normalizeLocale;exports.parseI18nJson = parseI18nJson;exports.resolveLocale = resolveLocale;exports.isString = exports.LOCALE_ZH_HANT = exports.LOCALE_ZH_HANS = exports.LOCALE_FR = exports.LOCALE_ES = exports.LOCALE_EN = exports.I18n = exports.Formatter = void 0;function _slicedToArray(arr, i) {return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o, minLen) {if (!o) return;if (typeof o === "string") return _arrayLikeToArray(o, minLen);var n = Object.prototype.toString.call(o).slice(8, -1);if (n === "Object" && o.constructor) n = o.constructor.name;if (n === "Map" || n === "Set") return Array.from(o);if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);}function _arrayLikeToArray(arr, len) {if (len == null || len > arr.length) len = arr.length;for (var i = 0, arr2 = new Array(len); i < len; i++) {arr2[i] = arr[i];}return arr2;}function _iterableToArrayLimit(arr, i) {if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"] != null) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}function _arrayWithHoles(arr) {if (Array.isArray(arr)) return arr;}function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}function _createClass(Constructor, protoProps, staticProps) {if (protoProps) _defineProperties(Constructor.prototype, protoProps);if (staticProps) _defineProperties(Constructor, staticProps);return Constructor;}var isArray = Array.isArray;
  2699. var isObject = function isObject(val) {return val !== null && typeof val === 'object';};
  2700. var defaultDelimiters = ['{', '}'];var
  2701. BaseFormatter = /*#__PURE__*/function () {
  2702. function BaseFormatter() {_classCallCheck(this, BaseFormatter);
  2703. this._caches = Object.create(null);
  2704. }_createClass(BaseFormatter, [{ key: "interpolate", value: function interpolate(
  2705. message, values) {var delimiters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultDelimiters;
  2706. if (!values) {
  2707. return [message];
  2708. }
  2709. var tokens = this._caches[message];
  2710. if (!tokens) {
  2711. tokens = parse(message, delimiters);
  2712. this._caches[message] = tokens;
  2713. }
  2714. return compile(tokens, values);
  2715. } }]);return BaseFormatter;}();exports.Formatter = BaseFormatter;
  2716. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  2717. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  2718. function parse(format, _ref) {var _ref2 = _slicedToArray(_ref, 2),startDelimiter = _ref2[0],endDelimiter = _ref2[1];
  2719. var tokens = [];
  2720. var position = 0;
  2721. var text = '';
  2722. while (position < format.length) {
  2723. var char = format[position++];
  2724. if (char === startDelimiter) {
  2725. if (text) {
  2726. tokens.push({ type: 'text', value: text });
  2727. }
  2728. text = '';
  2729. var sub = '';
  2730. char = format[position++];
  2731. while (char !== undefined && char !== endDelimiter) {
  2732. sub += char;
  2733. char = format[position++];
  2734. }
  2735. var isClosed = char === endDelimiter;
  2736. var type = RE_TOKEN_LIST_VALUE.test(sub) ?
  2737. 'list' :
  2738. isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ?
  2739. 'named' :
  2740. 'unknown';
  2741. tokens.push({ value: sub, type: type });
  2742. }
  2743. // else if (char === '%') {
  2744. // // when found rails i18n syntax, skip text capture
  2745. // if (format[position] !== '{') {
  2746. // text += char
  2747. // }
  2748. // }
  2749. else {
  2750. text += char;
  2751. }
  2752. }
  2753. text && tokens.push({ type: 'text', value: text });
  2754. return tokens;
  2755. }
  2756. function compile(tokens, values) {
  2757. var compiled = [];
  2758. var index = 0;
  2759. var mode = isArray(values) ?
  2760. 'list' :
  2761. isObject(values) ?
  2762. 'named' :
  2763. 'unknown';
  2764. if (mode === 'unknown') {
  2765. return compiled;
  2766. }
  2767. while (index < tokens.length) {
  2768. var token = tokens[index];
  2769. switch (token.type) {
  2770. case 'text':
  2771. compiled.push(token.value);
  2772. break;
  2773. case 'list':
  2774. compiled.push(values[parseInt(token.value, 10)]);
  2775. break;
  2776. case 'named':
  2777. if (mode === 'named') {
  2778. compiled.push(values[token.value]);
  2779. } else
  2780. {
  2781. if (true) {
  2782. console.warn("Type of token '".concat(token.type, "' and format of value '").concat(mode, "' don't match!"));
  2783. }
  2784. }
  2785. break;
  2786. case 'unknown':
  2787. if (true) {
  2788. console.warn("Detect 'unknown' type of token!");
  2789. }
  2790. break;}
  2791. index++;
  2792. }
  2793. return compiled;
  2794. }
  2795. var LOCALE_ZH_HANS = 'zh-Hans';exports.LOCALE_ZH_HANS = LOCALE_ZH_HANS;
  2796. var LOCALE_ZH_HANT = 'zh-Hant';exports.LOCALE_ZH_HANT = LOCALE_ZH_HANT;
  2797. var LOCALE_EN = 'en';exports.LOCALE_EN = LOCALE_EN;
  2798. var LOCALE_FR = 'fr';exports.LOCALE_FR = LOCALE_FR;
  2799. var LOCALE_ES = 'es';exports.LOCALE_ES = LOCALE_ES;
  2800. var hasOwnProperty = Object.prototype.hasOwnProperty;
  2801. var hasOwn = function hasOwn(val, key) {return hasOwnProperty.call(val, key);};
  2802. var defaultFormatter = new BaseFormatter();
  2803. function include(str, parts) {
  2804. return !!parts.find(function (part) {return str.indexOf(part) !== -1;});
  2805. }
  2806. function startsWith(str, parts) {
  2807. return parts.find(function (part) {return str.indexOf(part) === 0;});
  2808. }
  2809. function normalizeLocale(locale, messages) {
  2810. if (!locale) {
  2811. return;
  2812. }
  2813. locale = locale.trim().replace(/_/g, '-');
  2814. if (messages && messages[locale]) {
  2815. return locale;
  2816. }
  2817. locale = locale.toLowerCase();
  2818. if (locale.indexOf('zh') === 0) {
  2819. if (locale.indexOf('-hans') > -1) {
  2820. return LOCALE_ZH_HANS;
  2821. }
  2822. if (locale.indexOf('-hant') > -1) {
  2823. return LOCALE_ZH_HANT;
  2824. }
  2825. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  2826. return LOCALE_ZH_HANT;
  2827. }
  2828. return LOCALE_ZH_HANS;
  2829. }
  2830. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  2831. if (lang) {
  2832. return lang;
  2833. }
  2834. }var
  2835. I18n = /*#__PURE__*/function () {
  2836. function I18n(_ref3) {var locale = _ref3.locale,fallbackLocale = _ref3.fallbackLocale,messages = _ref3.messages,watcher = _ref3.watcher,formater = _ref3.formater;_classCallCheck(this, I18n);
  2837. this.locale = LOCALE_EN;
  2838. this.fallbackLocale = LOCALE_EN;
  2839. this.message = {};
  2840. this.messages = {};
  2841. this.watchers = [];
  2842. if (fallbackLocale) {
  2843. this.fallbackLocale = fallbackLocale;
  2844. }
  2845. this.formater = formater || defaultFormatter;
  2846. this.messages = messages || {};
  2847. this.setLocale(locale || LOCALE_EN);
  2848. if (watcher) {
  2849. this.watchLocale(watcher);
  2850. }
  2851. }_createClass(I18n, [{ key: "setLocale", value: function setLocale(
  2852. locale) {var _this = this;
  2853. var oldLocale = this.locale;
  2854. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  2855. if (!this.messages[this.locale]) {
  2856. // 可能初始化时不存在
  2857. this.messages[this.locale] = {};
  2858. }
  2859. this.message = this.messages[this.locale];
  2860. // 仅发生变化时,通知
  2861. if (oldLocale !== this.locale) {
  2862. this.watchers.forEach(function (watcher) {
  2863. watcher(_this.locale, oldLocale);
  2864. });
  2865. }
  2866. } }, { key: "getLocale", value: function getLocale()
  2867. {
  2868. return this.locale;
  2869. } }, { key: "watchLocale", value: function watchLocale(
  2870. fn) {var _this2 = this;
  2871. var index = this.watchers.push(fn) - 1;
  2872. return function () {
  2873. _this2.watchers.splice(index, 1);
  2874. };
  2875. } }, { key: "add", value: function add(
  2876. locale, message) {var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  2877. var curMessages = this.messages[locale];
  2878. if (curMessages) {
  2879. if (override) {
  2880. Object.assign(curMessages, message);
  2881. } else
  2882. {
  2883. Object.keys(message).forEach(function (key) {
  2884. if (!hasOwn(curMessages, key)) {
  2885. curMessages[key] = message[key];
  2886. }
  2887. });
  2888. }
  2889. } else
  2890. {
  2891. this.messages[locale] = message;
  2892. }
  2893. } }, { key: "f", value: function f(
  2894. message, values, delimiters) {
  2895. return this.formater.interpolate(message, values, delimiters).join('');
  2896. } }, { key: "t", value: function t(
  2897. key, locale, values) {
  2898. var message = this.message;
  2899. if (typeof locale === 'string') {
  2900. locale = normalizeLocale(locale, this.messages);
  2901. locale && (message = this.messages[locale]);
  2902. } else
  2903. {
  2904. values = locale;
  2905. }
  2906. if (!hasOwn(message, key)) {
  2907. console.warn("Cannot translate the value of keypath ".concat(key, ". Use the value of keypath as default."));
  2908. return key;
  2909. }
  2910. return this.formater.interpolate(message[key], values).join('');
  2911. } }]);return I18n;}();exports.I18n = I18n;
  2912. function watchAppLocale(appVm, i18n) {
  2913. // 需要保证 watch 的触发在组件渲染之前
  2914. if (appVm.$watchLocale) {
  2915. // vue2
  2916. appVm.$watchLocale(function (newLocale) {
  2917. i18n.setLocale(newLocale);
  2918. });
  2919. } else
  2920. {
  2921. appVm.$watch(function () {return appVm.$locale;}, function (newLocale) {
  2922. i18n.setLocale(newLocale);
  2923. });
  2924. }
  2925. }
  2926. function getDefaultLocale() {
  2927. if (typeof uni !== 'undefined' && uni.getLocale) {
  2928. return uni.getLocale();
  2929. }
  2930. // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale
  2931. if (typeof global !== 'undefined' && global.getLocale) {
  2932. return global.getLocale();
  2933. }
  2934. return LOCALE_EN;
  2935. }
  2936. function initVueI18n(locale) {var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};var fallbackLocale = arguments.length > 2 ? arguments[2] : undefined;var watcher = arguments.length > 3 ? arguments[3] : undefined;
  2937. // 兼容旧版本入参
  2938. if (typeof locale !== 'string') {var _ref4 =
  2939. [
  2940. messages,
  2941. locale];locale = _ref4[0];messages = _ref4[1];
  2942. }
  2943. if (typeof locale !== 'string') {
  2944. // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined
  2945. locale = getDefaultLocale();
  2946. }
  2947. if (typeof fallbackLocale !== 'string') {
  2948. fallbackLocale =
  2949. typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale ||
  2950. LOCALE_EN;
  2951. }
  2952. var i18n = new I18n({
  2953. locale: locale,
  2954. fallbackLocale: fallbackLocale,
  2955. messages: messages,
  2956. watcher: watcher });
  2957. var _t = function t(key, values) {
  2958. if (typeof getApp !== 'function') {
  2959. // app view
  2960. /* eslint-disable no-func-assign */
  2961. _t = function t(key, values) {
  2962. return i18n.t(key, values);
  2963. };
  2964. } else
  2965. {
  2966. var isWatchedAppLocale = false;
  2967. _t = function t(key, values) {
  2968. var appVm = getApp().$vm;
  2969. // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化
  2970. // options: {
  2971. // type: Array,
  2972. // default () {
  2973. // return [{
  2974. // icon: 'shop',
  2975. // text: t("uni-goods-nav.options.shop"),
  2976. // }, {
  2977. // icon: 'cart',
  2978. // text: t("uni-goods-nav.options.cart")
  2979. // }]
  2980. // }
  2981. // },
  2982. if (appVm) {
  2983. // 触发响应式
  2984. appVm.$locale;
  2985. if (!isWatchedAppLocale) {
  2986. isWatchedAppLocale = true;
  2987. watchAppLocale(appVm, i18n);
  2988. }
  2989. }
  2990. return i18n.t(key, values);
  2991. };
  2992. }
  2993. return _t(key, values);
  2994. };
  2995. return {
  2996. i18n: i18n,
  2997. f: function f(message, values, delimiters) {
  2998. return i18n.f(message, values, delimiters);
  2999. },
  3000. t: function t(key, values) {
  3001. return _t(key, values);
  3002. },
  3003. add: function add(locale, message) {var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  3004. return i18n.add(locale, message, override);
  3005. },
  3006. watch: function watch(fn) {
  3007. return i18n.watchLocale(fn);
  3008. },
  3009. getLocale: function getLocale() {
  3010. return i18n.getLocale();
  3011. },
  3012. setLocale: function setLocale(newLocale) {
  3013. return i18n.setLocale(newLocale);
  3014. } };
  3015. }
  3016. var isString = function isString(val) {return typeof val === 'string';};exports.isString = isString;
  3017. var formater;
  3018. function hasI18nJson(jsonObj, delimiters) {
  3019. if (!formater) {
  3020. formater = new BaseFormatter();
  3021. }
  3022. return walkJsonObj(jsonObj, function (jsonObj, key) {
  3023. var value = jsonObj[key];
  3024. if (isString(value)) {
  3025. if (isI18nStr(value, delimiters)) {
  3026. return true;
  3027. }
  3028. } else
  3029. {
  3030. return hasI18nJson(value, delimiters);
  3031. }
  3032. });
  3033. }
  3034. function parseI18nJson(jsonObj, values, delimiters) {
  3035. if (!formater) {
  3036. formater = new BaseFormatter();
  3037. }
  3038. walkJsonObj(jsonObj, function (jsonObj, key) {
  3039. var value = jsonObj[key];
  3040. if (isString(value)) {
  3041. if (isI18nStr(value, delimiters)) {
  3042. jsonObj[key] = compileStr(value, values, delimiters);
  3043. }
  3044. } else
  3045. {
  3046. parseI18nJson(value, values, delimiters);
  3047. }
  3048. });
  3049. return jsonObj;
  3050. }
  3051. function compileI18nJsonStr(jsonStr, _ref5) {var locale = _ref5.locale,locales = _ref5.locales,delimiters = _ref5.delimiters;
  3052. if (!isI18nStr(jsonStr, delimiters)) {
  3053. return jsonStr;
  3054. }
  3055. if (!formater) {
  3056. formater = new BaseFormatter();
  3057. }
  3058. var localeValues = [];
  3059. Object.keys(locales).forEach(function (name) {
  3060. if (name !== locale) {
  3061. localeValues.push({
  3062. locale: name,
  3063. values: locales[name] });
  3064. }
  3065. });
  3066. localeValues.unshift({ locale: locale, values: locales[locale] });
  3067. try {
  3068. return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);
  3069. }
  3070. catch (e) {}
  3071. return jsonStr;
  3072. }
  3073. function isI18nStr(value, delimiters) {
  3074. return value.indexOf(delimiters[0]) > -1;
  3075. }
  3076. function compileStr(value, values, delimiters) {
  3077. return formater.interpolate(value, values, delimiters).join('');
  3078. }
  3079. function compileValue(jsonObj, key, localeValues, delimiters) {
  3080. var value = jsonObj[key];
  3081. if (isString(value)) {
  3082. // 存在国际化
  3083. if (isI18nStr(value, delimiters)) {
  3084. jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);
  3085. if (localeValues.length > 1) {
  3086. // 格式化国际化语言
  3087. var valueLocales = jsonObj[key + 'Locales'] = {};
  3088. localeValues.forEach(function (localValue) {
  3089. valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);
  3090. });
  3091. }
  3092. }
  3093. } else
  3094. {
  3095. compileJsonObj(value, localeValues, delimiters);
  3096. }
  3097. }
  3098. function compileJsonObj(jsonObj, localeValues, delimiters) {
  3099. walkJsonObj(jsonObj, function (jsonObj, key) {
  3100. compileValue(jsonObj, key, localeValues, delimiters);
  3101. });
  3102. return jsonObj;
  3103. }
  3104. function walkJsonObj(jsonObj, walk) {
  3105. if (isArray(jsonObj)) {
  3106. for (var i = 0; i < jsonObj.length; i++) {
  3107. if (walk(jsonObj, i)) {
  3108. return true;
  3109. }
  3110. }
  3111. } else
  3112. if (isObject(jsonObj)) {
  3113. for (var key in jsonObj) {
  3114. if (walk(jsonObj, key)) {
  3115. return true;
  3116. }
  3117. }
  3118. }
  3119. return false;
  3120. }
  3121. function resolveLocale(locales) {
  3122. return function (locale) {
  3123. if (!locale) {
  3124. return locale;
  3125. }
  3126. locale = normalizeLocale(locale) || locale;
  3127. return resolveLocaleChain(locale).find(function (locale) {return locales.indexOf(locale) > -1;});
  3128. };
  3129. }
  3130. function resolveLocaleChain(locale) {
  3131. var chain = [];
  3132. var tokens = locale.split('-');
  3133. while (tokens.length) {
  3134. chain.push(tokens.join('-'));
  3135. tokens.pop();
  3136. }
  3137. return chain;
  3138. }
  3139. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 2)))
  3140. /***/ }),
  3141. /***/ 336:
  3142. /*!**********************************************************!*\
  3143. !*** ./node_modules/@babel/runtime/regenerator/index.js ***!
  3144. \**********************************************************/
  3145. /*! no static exports found */
  3146. /***/ (function(module, exports, __webpack_require__) {
  3147. module.exports = __webpack_require__(/*! regenerator-runtime */ 337);
  3148. /***/ }),
  3149. /***/ 337:
  3150. /*!************************************************************!*\
  3151. !*** ./node_modules/regenerator-runtime/runtime-module.js ***!
  3152. \************************************************************/
  3153. /*! no static exports found */
  3154. /***/ (function(module, exports, __webpack_require__) {
  3155. /**
  3156. * Copyright (c) 2014-present, Facebook, Inc.
  3157. *
  3158. * This source code is licensed under the MIT license found in the
  3159. * LICENSE file in the root directory of this source tree.
  3160. */
  3161. // This method of obtaining a reference to the global object needs to be
  3162. // kept identical to the way it is obtained in runtime.js
  3163. var g = (function() {
  3164. return this || (typeof self === "object" && self);
  3165. })() || Function("return this")();
  3166. // Use `getOwnPropertyNames` because not all browsers support calling
  3167. // `hasOwnProperty` on the global `self` object in a worker. See #183.
  3168. var hadRuntime = g.regeneratorRuntime &&
  3169. Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0;
  3170. // Save the old regeneratorRuntime in case it needs to be restored later.
  3171. var oldRuntime = hadRuntime && g.regeneratorRuntime;
  3172. // Force reevalutation of runtime.js.
  3173. g.regeneratorRuntime = undefined;
  3174. module.exports = __webpack_require__(/*! ./runtime */ 338);
  3175. if (hadRuntime) {
  3176. // Restore the original runtime.
  3177. g.regeneratorRuntime = oldRuntime;
  3178. } else {
  3179. // Remove the global property added by runtime.js.
  3180. try {
  3181. delete g.regeneratorRuntime;
  3182. } catch(e) {
  3183. g.regeneratorRuntime = undefined;
  3184. }
  3185. }
  3186. /***/ }),
  3187. /***/ 338:
  3188. /*!*****************************************************!*\
  3189. !*** ./node_modules/regenerator-runtime/runtime.js ***!
  3190. \*****************************************************/
  3191. /*! no static exports found */
  3192. /***/ (function(module, exports) {
  3193. /**
  3194. * Copyright (c) 2014-present, Facebook, Inc.
  3195. *
  3196. * This source code is licensed under the MIT license found in the
  3197. * LICENSE file in the root directory of this source tree.
  3198. */
  3199. !(function(global) {
  3200. "use strict";
  3201. var Op = Object.prototype;
  3202. var hasOwn = Op.hasOwnProperty;
  3203. var undefined; // More compressible than void 0.
  3204. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  3205. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  3206. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  3207. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  3208. var inModule = typeof module === "object";
  3209. var runtime = global.regeneratorRuntime;
  3210. if (runtime) {
  3211. if (inModule) {
  3212. // If regeneratorRuntime is defined globally and we're in a module,
  3213. // make the exports object identical to regeneratorRuntime.
  3214. module.exports = runtime;
  3215. }
  3216. // Don't bother evaluating the rest of this file if the runtime was
  3217. // already defined globally.
  3218. return;
  3219. }
  3220. // Define the runtime globally (as expected by generated code) as either
  3221. // module.exports (if we're in a module) or a new, empty object.
  3222. runtime = global.regeneratorRuntime = inModule ? module.exports : {};
  3223. function wrap(innerFn, outerFn, self, tryLocsList) {
  3224. // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
  3225. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  3226. var generator = Object.create(protoGenerator.prototype);
  3227. var context = new Context(tryLocsList || []);
  3228. // The ._invoke method unifies the implementations of the .next,
  3229. // .throw, and .return methods.
  3230. generator._invoke = makeInvokeMethod(innerFn, self, context);
  3231. return generator;
  3232. }
  3233. runtime.wrap = wrap;
  3234. // Try/catch helper to minimize deoptimizations. Returns a completion
  3235. // record like context.tryEntries[i].completion. This interface could
  3236. // have been (and was previously) designed to take a closure to be
  3237. // invoked without arguments, but in all the cases we care about we
  3238. // already have an existing method we want to call, so there's no need
  3239. // to create a new function object. We can even get away with assuming
  3240. // the method takes exactly one argument, since that happens to be true
  3241. // in every case, so we don't have to touch the arguments object. The
  3242. // only additional allocation required is the completion record, which
  3243. // has a stable shape and so hopefully should be cheap to allocate.
  3244. function tryCatch(fn, obj, arg) {
  3245. try {
  3246. return { type: "normal", arg: fn.call(obj, arg) };
  3247. } catch (err) {
  3248. return { type: "throw", arg: err };
  3249. }
  3250. }
  3251. var GenStateSuspendedStart = "suspendedStart";
  3252. var GenStateSuspendedYield = "suspendedYield";
  3253. var GenStateExecuting = "executing";
  3254. var GenStateCompleted = "completed";
  3255. // Returning this object from the innerFn has the same effect as
  3256. // breaking out of the dispatch switch statement.
  3257. var ContinueSentinel = {};
  3258. // Dummy constructor functions that we use as the .constructor and
  3259. // .constructor.prototype properties for functions that return Generator
  3260. // objects. For full spec compliance, you may wish to configure your
  3261. // minifier not to mangle the names of these two functions.
  3262. function Generator() {}
  3263. function GeneratorFunction() {}
  3264. function GeneratorFunctionPrototype() {}
  3265. // This is a polyfill for %IteratorPrototype% for environments that
  3266. // don't natively support it.
  3267. var IteratorPrototype = {};
  3268. IteratorPrototype[iteratorSymbol] = function () {
  3269. return this;
  3270. };
  3271. var getProto = Object.getPrototypeOf;
  3272. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  3273. if (NativeIteratorPrototype &&
  3274. NativeIteratorPrototype !== Op &&
  3275. hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  3276. // This environment has a native %IteratorPrototype%; use it instead
  3277. // of the polyfill.
  3278. IteratorPrototype = NativeIteratorPrototype;
  3279. }
  3280. var Gp = GeneratorFunctionPrototype.prototype =
  3281. Generator.prototype = Object.create(IteratorPrototype);
  3282. GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  3283. GeneratorFunctionPrototype.constructor = GeneratorFunction;
  3284. GeneratorFunctionPrototype[toStringTagSymbol] =
  3285. GeneratorFunction.displayName = "GeneratorFunction";
  3286. // Helper for defining the .next, .throw, and .return methods of the
  3287. // Iterator interface in terms of a single ._invoke method.
  3288. function defineIteratorMethods(prototype) {
  3289. ["next", "throw", "return"].forEach(function(method) {
  3290. prototype[method] = function(arg) {
  3291. return this._invoke(method, arg);
  3292. };
  3293. });
  3294. }
  3295. runtime.isGeneratorFunction = function(genFun) {
  3296. var ctor = typeof genFun === "function" && genFun.constructor;
  3297. return ctor
  3298. ? ctor === GeneratorFunction ||
  3299. // For the native GeneratorFunction constructor, the best we can
  3300. // do is to check its .name property.
  3301. (ctor.displayName || ctor.name) === "GeneratorFunction"
  3302. : false;
  3303. };
  3304. runtime.mark = function(genFun) {
  3305. if (Object.setPrototypeOf) {
  3306. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  3307. } else {
  3308. genFun.__proto__ = GeneratorFunctionPrototype;
  3309. if (!(toStringTagSymbol in genFun)) {
  3310. genFun[toStringTagSymbol] = "GeneratorFunction";
  3311. }
  3312. }
  3313. genFun.prototype = Object.create(Gp);
  3314. return genFun;
  3315. };
  3316. // Within the body of any async function, `await x` is transformed to
  3317. // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  3318. // `hasOwn.call(value, "__await")` to determine if the yielded value is
  3319. // meant to be awaited.
  3320. runtime.awrap = function(arg) {
  3321. return { __await: arg };
  3322. };
  3323. function AsyncIterator(generator) {
  3324. function invoke(method, arg, resolve, reject) {
  3325. var record = tryCatch(generator[method], generator, arg);
  3326. if (record.type === "throw") {
  3327. reject(record.arg);
  3328. } else {
  3329. var result = record.arg;
  3330. var value = result.value;
  3331. if (value &&
  3332. typeof value === "object" &&
  3333. hasOwn.call(value, "__await")) {
  3334. return Promise.resolve(value.__await).then(function(value) {
  3335. invoke("next", value, resolve, reject);
  3336. }, function(err) {
  3337. invoke("throw", err, resolve, reject);
  3338. });
  3339. }
  3340. return Promise.resolve(value).then(function(unwrapped) {
  3341. // When a yielded Promise is resolved, its final value becomes
  3342. // the .value of the Promise<{value,done}> result for the
  3343. // current iteration.
  3344. result.value = unwrapped;
  3345. resolve(result);
  3346. }, function(error) {
  3347. // If a rejected Promise was yielded, throw the rejection back
  3348. // into the async generator function so it can be handled there.
  3349. return invoke("throw", error, resolve, reject);
  3350. });
  3351. }
  3352. }
  3353. var previousPromise;
  3354. function enqueue(method, arg) {
  3355. function callInvokeWithMethodAndArg() {
  3356. return new Promise(function(resolve, reject) {
  3357. invoke(method, arg, resolve, reject);
  3358. });
  3359. }
  3360. return previousPromise =
  3361. // If enqueue has been called before, then we want to wait until
  3362. // all previous Promises have been resolved before calling invoke,
  3363. // so that results are always delivered in the correct order. If
  3364. // enqueue has not been called before, then it is important to
  3365. // call invoke immediately, without waiting on a callback to fire,
  3366. // so that the async generator function has the opportunity to do
  3367. // any necessary setup in a predictable way. This predictability
  3368. // is why the Promise constructor synchronously invokes its
  3369. // executor callback, and why async functions synchronously
  3370. // execute code before the first await. Since we implement simple
  3371. // async functions in terms of async generators, it is especially
  3372. // important to get this right, even though it requires care.
  3373. previousPromise ? previousPromise.then(
  3374. callInvokeWithMethodAndArg,
  3375. // Avoid propagating failures to Promises returned by later
  3376. // invocations of the iterator.
  3377. callInvokeWithMethodAndArg
  3378. ) : callInvokeWithMethodAndArg();
  3379. }
  3380. // Define the unified helper method that is used to implement .next,
  3381. // .throw, and .return (see defineIteratorMethods).
  3382. this._invoke = enqueue;
  3383. }
  3384. defineIteratorMethods(AsyncIterator.prototype);
  3385. AsyncIterator.prototype[asyncIteratorSymbol] = function () {
  3386. return this;
  3387. };
  3388. runtime.AsyncIterator = AsyncIterator;
  3389. // Note that simple async functions are implemented on top of
  3390. // AsyncIterator objects; they just return a Promise for the value of
  3391. // the final result produced by the iterator.
  3392. runtime.async = function(innerFn, outerFn, self, tryLocsList) {
  3393. var iter = new AsyncIterator(
  3394. wrap(innerFn, outerFn, self, tryLocsList)
  3395. );
  3396. return runtime.isGeneratorFunction(outerFn)
  3397. ? iter // If outerFn is a generator, return the full iterator.
  3398. : iter.next().then(function(result) {
  3399. return result.done ? result.value : iter.next();
  3400. });
  3401. };
  3402. function makeInvokeMethod(innerFn, self, context) {
  3403. var state = GenStateSuspendedStart;
  3404. return function invoke(method, arg) {
  3405. if (state === GenStateExecuting) {
  3406. throw new Error("Generator is already running");
  3407. }
  3408. if (state === GenStateCompleted) {
  3409. if (method === "throw") {
  3410. throw arg;
  3411. }
  3412. // Be forgiving, per 25.3.3.3.3 of the spec:
  3413. // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
  3414. return doneResult();
  3415. }
  3416. context.method = method;
  3417. context.arg = arg;
  3418. while (true) {
  3419. var delegate = context.delegate;
  3420. if (delegate) {
  3421. var delegateResult = maybeInvokeDelegate(delegate, context);
  3422. if (delegateResult) {
  3423. if (delegateResult === ContinueSentinel) continue;
  3424. return delegateResult;
  3425. }
  3426. }
  3427. if (context.method === "next") {
  3428. // Setting context._sent for legacy support of Babel's
  3429. // function.sent implementation.
  3430. context.sent = context._sent = context.arg;
  3431. } else if (context.method === "throw") {
  3432. if (state === GenStateSuspendedStart) {
  3433. state = GenStateCompleted;
  3434. throw context.arg;
  3435. }
  3436. context.dispatchException(context.arg);
  3437. } else if (context.method === "return") {
  3438. context.abrupt("return", context.arg);
  3439. }
  3440. state = GenStateExecuting;
  3441. var record = tryCatch(innerFn, self, context);
  3442. if (record.type === "normal") {
  3443. // If an exception is thrown from innerFn, we leave state ===
  3444. // GenStateExecuting and loop back for another invocation.
  3445. state = context.done
  3446. ? GenStateCompleted
  3447. : GenStateSuspendedYield;
  3448. if (record.arg === ContinueSentinel) {
  3449. continue;
  3450. }
  3451. return {
  3452. value: record.arg,
  3453. done: context.done
  3454. };
  3455. } else if (record.type === "throw") {
  3456. state = GenStateCompleted;
  3457. // Dispatch the exception by looping back around to the
  3458. // context.dispatchException(context.arg) call above.
  3459. context.method = "throw";
  3460. context.arg = record.arg;
  3461. }
  3462. }
  3463. };
  3464. }
  3465. // Call delegate.iterator[context.method](context.arg) and handle the
  3466. // result, either by returning a { value, done } result from the
  3467. // delegate iterator, or by modifying context.method and context.arg,
  3468. // setting context.delegate to null, and returning the ContinueSentinel.
  3469. function maybeInvokeDelegate(delegate, context) {
  3470. var method = delegate.iterator[context.method];
  3471. if (method === undefined) {
  3472. // A .throw or .return when the delegate iterator has no .throw
  3473. // method always terminates the yield* loop.
  3474. context.delegate = null;
  3475. if (context.method === "throw") {
  3476. if (delegate.iterator.return) {
  3477. // If the delegate iterator has a return method, give it a
  3478. // chance to clean up.
  3479. context.method = "return";
  3480. context.arg = undefined;
  3481. maybeInvokeDelegate(delegate, context);
  3482. if (context.method === "throw") {
  3483. // If maybeInvokeDelegate(context) changed context.method from
  3484. // "return" to "throw", let that override the TypeError below.
  3485. return ContinueSentinel;
  3486. }
  3487. }
  3488. context.method = "throw";
  3489. context.arg = new TypeError(
  3490. "The iterator does not provide a 'throw' method");
  3491. }
  3492. return ContinueSentinel;
  3493. }
  3494. var record = tryCatch(method, delegate.iterator, context.arg);
  3495. if (record.type === "throw") {
  3496. context.method = "throw";
  3497. context.arg = record.arg;
  3498. context.delegate = null;
  3499. return ContinueSentinel;
  3500. }
  3501. var info = record.arg;
  3502. if (! info) {
  3503. context.method = "throw";
  3504. context.arg = new TypeError("iterator result is not an object");
  3505. context.delegate = null;
  3506. return ContinueSentinel;
  3507. }
  3508. if (info.done) {
  3509. // Assign the result of the finished delegate to the temporary
  3510. // variable specified by delegate.resultName (see delegateYield).
  3511. context[delegate.resultName] = info.value;
  3512. // Resume execution at the desired location (see delegateYield).
  3513. context.next = delegate.nextLoc;
  3514. // If context.method was "throw" but the delegate handled the
  3515. // exception, let the outer generator proceed normally. If
  3516. // context.method was "next", forget context.arg since it has been
  3517. // "consumed" by the delegate iterator. If context.method was
  3518. // "return", allow the original .return call to continue in the
  3519. // outer generator.
  3520. if (context.method !== "return") {
  3521. context.method = "next";
  3522. context.arg = undefined;
  3523. }
  3524. } else {
  3525. // Re-yield the result returned by the delegate method.
  3526. return info;
  3527. }
  3528. // The delegate iterator is finished, so forget it and continue with
  3529. // the outer generator.
  3530. context.delegate = null;
  3531. return ContinueSentinel;
  3532. }
  3533. // Define Generator.prototype.{next,throw,return} in terms of the
  3534. // unified ._invoke helper method.
  3535. defineIteratorMethods(Gp);
  3536. Gp[toStringTagSymbol] = "Generator";
  3537. // A Generator should always return itself as the iterator object when the
  3538. // @@iterator function is called on it. Some browsers' implementations of the
  3539. // iterator prototype chain incorrectly implement this, causing the Generator
  3540. // object to not be returned from this call. This ensures that doesn't happen.
  3541. // See https://github.com/facebook/regenerator/issues/274 for more details.
  3542. Gp[iteratorSymbol] = function() {
  3543. return this;
  3544. };
  3545. Gp.toString = function() {
  3546. return "[object Generator]";
  3547. };
  3548. function pushTryEntry(locs) {
  3549. var entry = { tryLoc: locs[0] };
  3550. if (1 in locs) {
  3551. entry.catchLoc = locs[1];
  3552. }
  3553. if (2 in locs) {
  3554. entry.finallyLoc = locs[2];
  3555. entry.afterLoc = locs[3];
  3556. }
  3557. this.tryEntries.push(entry);
  3558. }
  3559. function resetTryEntry(entry) {
  3560. var record = entry.completion || {};
  3561. record.type = "normal";
  3562. delete record.arg;
  3563. entry.completion = record;
  3564. }
  3565. function Context(tryLocsList) {
  3566. // The root entry object (effectively a try statement without a catch
  3567. // or a finally block) gives us a place to store values thrown from
  3568. // locations where there is no enclosing try statement.
  3569. this.tryEntries = [{ tryLoc: "root" }];
  3570. tryLocsList.forEach(pushTryEntry, this);
  3571. this.reset(true);
  3572. }
  3573. runtime.keys = function(object) {
  3574. var keys = [];
  3575. for (var key in object) {
  3576. keys.push(key);
  3577. }
  3578. keys.reverse();
  3579. // Rather than returning an object with a next method, we keep
  3580. // things simple and return the next function itself.
  3581. return function next() {
  3582. while (keys.length) {
  3583. var key = keys.pop();
  3584. if (key in object) {
  3585. next.value = key;
  3586. next.done = false;
  3587. return next;
  3588. }
  3589. }
  3590. // To avoid creating an additional object, we just hang the .value
  3591. // and .done properties off the next function object itself. This
  3592. // also ensures that the minifier will not anonymize the function.
  3593. next.done = true;
  3594. return next;
  3595. };
  3596. };
  3597. function values(iterable) {
  3598. if (iterable) {
  3599. var iteratorMethod = iterable[iteratorSymbol];
  3600. if (iteratorMethod) {
  3601. return iteratorMethod.call(iterable);
  3602. }
  3603. if (typeof iterable.next === "function") {
  3604. return iterable;
  3605. }
  3606. if (!isNaN(iterable.length)) {
  3607. var i = -1, next = function next() {
  3608. while (++i < iterable.length) {
  3609. if (hasOwn.call(iterable, i)) {
  3610. next.value = iterable[i];
  3611. next.done = false;
  3612. return next;
  3613. }
  3614. }
  3615. next.value = undefined;
  3616. next.done = true;
  3617. return next;
  3618. };
  3619. return next.next = next;
  3620. }
  3621. }
  3622. // Return an iterator with no values.
  3623. return { next: doneResult };
  3624. }
  3625. runtime.values = values;
  3626. function doneResult() {
  3627. return { value: undefined, done: true };
  3628. }
  3629. Context.prototype = {
  3630. constructor: Context,
  3631. reset: function(skipTempReset) {
  3632. this.prev = 0;
  3633. this.next = 0;
  3634. // Resetting context._sent for legacy support of Babel's
  3635. // function.sent implementation.
  3636. this.sent = this._sent = undefined;
  3637. this.done = false;
  3638. this.delegate = null;
  3639. this.method = "next";
  3640. this.arg = undefined;
  3641. this.tryEntries.forEach(resetTryEntry);
  3642. if (!skipTempReset) {
  3643. for (var name in this) {
  3644. // Not sure about the optimal order of these conditions:
  3645. if (name.charAt(0) === "t" &&
  3646. hasOwn.call(this, name) &&
  3647. !isNaN(+name.slice(1))) {
  3648. this[name] = undefined;
  3649. }
  3650. }
  3651. }
  3652. },
  3653. stop: function() {
  3654. this.done = true;
  3655. var rootEntry = this.tryEntries[0];
  3656. var rootRecord = rootEntry.completion;
  3657. if (rootRecord.type === "throw") {
  3658. throw rootRecord.arg;
  3659. }
  3660. return this.rval;
  3661. },
  3662. dispatchException: function(exception) {
  3663. if (this.done) {
  3664. throw exception;
  3665. }
  3666. var context = this;
  3667. function handle(loc, caught) {
  3668. record.type = "throw";
  3669. record.arg = exception;
  3670. context.next = loc;
  3671. if (caught) {
  3672. // If the dispatched exception was caught by a catch block,
  3673. // then let that catch block handle the exception normally.
  3674. context.method = "next";
  3675. context.arg = undefined;
  3676. }
  3677. return !! caught;
  3678. }
  3679. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  3680. var entry = this.tryEntries[i];
  3681. var record = entry.completion;
  3682. if (entry.tryLoc === "root") {
  3683. // Exception thrown outside of any try block that could handle
  3684. // it, so set the completion value of the entire function to
  3685. // throw the exception.
  3686. return handle("end");
  3687. }
  3688. if (entry.tryLoc <= this.prev) {
  3689. var hasCatch = hasOwn.call(entry, "catchLoc");
  3690. var hasFinally = hasOwn.call(entry, "finallyLoc");
  3691. if (hasCatch && hasFinally) {
  3692. if (this.prev < entry.catchLoc) {
  3693. return handle(entry.catchLoc, true);
  3694. } else if (this.prev < entry.finallyLoc) {
  3695. return handle(entry.finallyLoc);
  3696. }
  3697. } else if (hasCatch) {
  3698. if (this.prev < entry.catchLoc) {
  3699. return handle(entry.catchLoc, true);
  3700. }
  3701. } else if (hasFinally) {
  3702. if (this.prev < entry.finallyLoc) {
  3703. return handle(entry.finallyLoc);
  3704. }
  3705. } else {
  3706. throw new Error("try statement without catch or finally");
  3707. }
  3708. }
  3709. }
  3710. },
  3711. abrupt: function(type, arg) {
  3712. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  3713. var entry = this.tryEntries[i];
  3714. if (entry.tryLoc <= this.prev &&
  3715. hasOwn.call(entry, "finallyLoc") &&
  3716. this.prev < entry.finallyLoc) {
  3717. var finallyEntry = entry;
  3718. break;
  3719. }
  3720. }
  3721. if (finallyEntry &&
  3722. (type === "break" ||
  3723. type === "continue") &&
  3724. finallyEntry.tryLoc <= arg &&
  3725. arg <= finallyEntry.finallyLoc) {
  3726. // Ignore the finally entry if control is not jumping to a
  3727. // location outside the try/catch block.
  3728. finallyEntry = null;
  3729. }
  3730. var record = finallyEntry ? finallyEntry.completion : {};
  3731. record.type = type;
  3732. record.arg = arg;
  3733. if (finallyEntry) {
  3734. this.method = "next";
  3735. this.next = finallyEntry.finallyLoc;
  3736. return ContinueSentinel;
  3737. }
  3738. return this.complete(record);
  3739. },
  3740. complete: function(record, afterLoc) {
  3741. if (record.type === "throw") {
  3742. throw record.arg;
  3743. }
  3744. if (record.type === "break" ||
  3745. record.type === "continue") {
  3746. this.next = record.arg;
  3747. } else if (record.type === "return") {
  3748. this.rval = this.arg = record.arg;
  3749. this.method = "return";
  3750. this.next = "end";
  3751. } else if (record.type === "normal" && afterLoc) {
  3752. this.next = afterLoc;
  3753. }
  3754. return ContinueSentinel;
  3755. },
  3756. finish: function(finallyLoc) {
  3757. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  3758. var entry = this.tryEntries[i];
  3759. if (entry.finallyLoc === finallyLoc) {
  3760. this.complete(entry.completion, entry.afterLoc);
  3761. resetTryEntry(entry);
  3762. return ContinueSentinel;
  3763. }
  3764. }
  3765. },
  3766. "catch": function(tryLoc) {
  3767. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  3768. var entry = this.tryEntries[i];
  3769. if (entry.tryLoc === tryLoc) {
  3770. var record = entry.completion;
  3771. if (record.type === "throw") {
  3772. var thrown = record.arg;
  3773. resetTryEntry(entry);
  3774. }
  3775. return thrown;
  3776. }
  3777. }
  3778. // The context.catch method must only be called with a location
  3779. // argument that corresponds to a known catch block.
  3780. throw new Error("illegal catch attempt");
  3781. },
  3782. delegateYield: function(iterable, resultName, nextLoc) {
  3783. this.delegate = {
  3784. iterator: values(iterable),
  3785. resultName: resultName,
  3786. nextLoc: nextLoc
  3787. };
  3788. if (this.method === "next") {
  3789. // Deliberately forget the last sent value so that we don't
  3790. // accidentally pass it on to the delegate.
  3791. this.arg = undefined;
  3792. }
  3793. return ContinueSentinel;
  3794. }
  3795. };
  3796. })(
  3797. // In sloppy mode, unbound `this` refers to the global object, fallback to
  3798. // Function constructor if we're in global strict mode. That is sadly a form
  3799. // of indirect eval which violates Content Security Policy.
  3800. (function() {
  3801. return this || (typeof self === "object" && self);
  3802. })() || Function("return this")()
  3803. );
  3804. /***/ }),
  3805. /***/ 339:
  3806. /*!******************************************************************************************!*\
  3807. !*** D:/hongxing/storage-wechat/node_modules/@dcloudio/uni-ui/lib/uni-forms/validate.js ***!
  3808. \******************************************************************************************/
  3809. /*! no static exports found */
  3810. /***/ (function(module, exports, __webpack_require__) {
  3811. "use strict";
  3812. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _regenerator = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@babel/runtime/regenerator */ 336));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function _inherits(subClass, superClass) {if (typeof superClass !== "function" && superClass !== null) {throw new TypeError("Super expression must either be null or a function");}subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });if (superClass) _setPrototypeOf(subClass, superClass);}function _setPrototypeOf(o, p) {_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {o.__proto__ = p;return o;};return _setPrototypeOf(o, p);}function _createSuper(Derived) {var hasNativeReflectConstruct = _isNativeReflectConstruct();return function _createSuperInternal() {var Super = _getPrototypeOf(Derived),result;if (hasNativeReflectConstruct) {var NewTarget = _getPrototypeOf(this).constructor;result = Reflect.construct(Super, arguments, NewTarget);} else {result = Super.apply(this, arguments);}return _possibleConstructorReturn(this, result);};}function _possibleConstructorReturn(self, call) {if (call && (typeof call === "object" || typeof call === "function")) {return call;}return _assertThisInitialized(self);}function _assertThisInitialized(self) {if (self === void 0) {throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct() {if (typeof Reflect === "undefined" || !Reflect.construct) return false;if (Reflect.construct.sham) return false;if (typeof Proxy === "function") return true;try {Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));return true;} catch (e) {return false;}}function _getPrototypeOf(o) {_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {return o.__proto__ || Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {try {var info = gen[key](arg);var value = info.value;} catch (error) {reject(error);return;}if (info.done) {resolve(value);} else {Promise.resolve(value).then(_next, _throw);}}function _asyncToGenerator(fn) {return function () {var self = this,args = arguments;return new Promise(function (resolve, reject) {var gen = fn.apply(self, args);function _next(value) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);}function _throw(err) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);}_next(undefined);});};}function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}function _createClass(Constructor, protoProps, staticProps) {if (protoProps) _defineProperties(Constructor.prototype, protoProps);if (staticProps) _defineProperties(Constructor, staticProps);return Constructor;}var pattern = {
  3813. email: /^\S+?@\S+?\.\S+?$/,
  3814. idcard: /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
  3815. url: new RegExp(
  3816. "^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$",
  3817. 'i') };
  3818. var FORMAT_MAPPING = {
  3819. "int": 'integer',
  3820. "bool": 'boolean',
  3821. "double": 'number',
  3822. "long": 'number',
  3823. "password": 'string'
  3824. // "fileurls": 'array'
  3825. };
  3826. function formatMessage(args) {var resources = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
  3827. var defaultMessage = ['label'];
  3828. defaultMessage.forEach(function (item) {
  3829. if (args[item] === undefined) {
  3830. args[item] = '';
  3831. }
  3832. });
  3833. var str = resources;
  3834. for (var key in args) {
  3835. var reg = new RegExp('{' + key + '}');
  3836. str = str.replace(reg, args[key]);
  3837. }
  3838. return str;
  3839. }
  3840. function isEmptyValue(value, type) {
  3841. if (value === undefined || value === null) {
  3842. return true;
  3843. }
  3844. if (typeof value === 'string' && !value) {
  3845. return true;
  3846. }
  3847. if (Array.isArray(value) && !value.length) {
  3848. return true;
  3849. }
  3850. if (type === 'object' && !Object.keys(value).length) {
  3851. return true;
  3852. }
  3853. return false;
  3854. }
  3855. var types = {
  3856. integer: function integer(value) {
  3857. return types.number(value) && parseInt(value, 10) === value;
  3858. },
  3859. string: function string(value) {
  3860. return typeof value === 'string';
  3861. },
  3862. number: function number(value) {
  3863. if (isNaN(value)) {
  3864. return false;
  3865. }
  3866. return typeof value === 'number';
  3867. },
  3868. "boolean": function boolean(value) {
  3869. return typeof value === 'boolean';
  3870. },
  3871. "float": function float(value) {
  3872. return types.number(value) && !types.integer(value);
  3873. },
  3874. array: function array(value) {
  3875. return Array.isArray(value);
  3876. },
  3877. object: function object(value) {
  3878. return typeof value === 'object' && !types.array(value);
  3879. },
  3880. date: function date(value) {
  3881. return value instanceof Date;
  3882. },
  3883. timestamp: function timestamp(value) {
  3884. if (!this.integer(value) || Math.abs(value).toString().length > 16) {
  3885. return false;
  3886. }
  3887. return true;
  3888. },
  3889. file: function file(value) {
  3890. return typeof value.url === 'string';
  3891. },
  3892. email: function email(value) {
  3893. return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255;
  3894. },
  3895. url: function url(value) {
  3896. return typeof value === 'string' && !!value.match(pattern.url);
  3897. },
  3898. pattern: function pattern(reg, value) {
  3899. try {
  3900. return new RegExp(reg).test(value);
  3901. } catch (e) {
  3902. return false;
  3903. }
  3904. },
  3905. method: function method(value) {
  3906. return typeof value === 'function';
  3907. },
  3908. idcard: function idcard(value) {
  3909. return typeof value === 'string' && !!value.match(pattern.idcard);
  3910. },
  3911. 'url-https': function urlHttps(value) {
  3912. return this.url(value) && value.startsWith('https://');
  3913. },
  3914. 'url-scheme': function urlScheme(value) {
  3915. return value.startsWith('://');
  3916. },
  3917. 'url-web': function urlWeb(value) {
  3918. return false;
  3919. } };var
  3920. RuleValidator = /*#__PURE__*/function () {
  3921. function RuleValidator(message) {_classCallCheck(this, RuleValidator);
  3922. this._message = message;
  3923. }_createClass(RuleValidator, [{ key: "validateRule", value: function () {var _validateRule = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee(
  3924. fieldKey, fieldValue, value, data, allData) {var result, rules, hasRequired, message, i, rule, vt, now, resultExpr;return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:
  3925. result = null;
  3926. rules = fieldValue.rules;
  3927. hasRequired = rules.findIndex(function (item) {
  3928. return item.required;
  3929. });if (!(
  3930. hasRequired < 0)) {_context.next = 8;break;}if (!(
  3931. value === null || value === undefined)) {_context.next = 6;break;}return _context.abrupt("return",
  3932. result);case 6:if (!(
  3933. typeof value === 'string' && !value.length)) {_context.next = 8;break;}return _context.abrupt("return",
  3934. result);case 8:
  3935. message = this._message;if (!(
  3936. rules === undefined)) {_context.next = 11;break;}return _context.abrupt("return",
  3937. message['default']);case 11:
  3938. i = 0;case 12:if (!(i < rules.length)) {_context.next = 35;break;}
  3939. rule = rules[i];
  3940. vt = this._getValidateType(rule);
  3941. Object.assign(rule, {
  3942. label: fieldValue.label || "[\"".concat(fieldKey, "\"]") });if (!
  3943. RuleValidatorHelper[vt]) {_context.next = 20;break;}
  3944. result = RuleValidatorHelper[vt](rule, value, message);if (!(
  3945. result != null)) {_context.next = 20;break;}return _context.abrupt("break", 35);case 20:if (!
  3946. rule.validateExpr) {_context.next = 26;break;}
  3947. now = Date.now();
  3948. resultExpr = rule.validateExpr(value, allData, now);if (!(
  3949. resultExpr === false)) {_context.next = 26;break;}
  3950. result = this._getMessage(rule, rule.errorMessage || this._message['default']);return _context.abrupt("break", 35);case 26:if (!
  3951. rule.validateFunction) {_context.next = 32;break;}_context.next = 29;return (
  3952. this.validateFunction(rule, value, data, allData, vt));case 29:result = _context.sent;if (!(
  3953. result !== null)) {_context.next = 32;break;}return _context.abrupt("break", 35);case 32:i++;_context.next = 12;break;case 35:
  3954. if (result !== null) {
  3955. result = message.TAG + result;
  3956. }return _context.abrupt("return",
  3957. result);case 37:case "end":return _context.stop();}}}, _callee, this);}));function validateRule(_x, _x2, _x3, _x4, _x5) {return _validateRule.apply(this, arguments);}return validateRule;}() }, { key: "validateFunction", value: function () {var _validateFunction = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee2(
  3958. rule, value, data, allData, vt) {var result, callbackMessage, res;return _regenerator.default.wrap(function _callee2$(_context2) {while (1) {switch (_context2.prev = _context2.next) {case 0:
  3959. result = null;_context2.prev = 1;
  3960. callbackMessage = null;_context2.next = 5;return (
  3961. rule.validateFunction(rule, value, allData || data, function (message) {
  3962. callbackMessage = message;
  3963. }));case 5:res = _context2.sent;
  3964. if (callbackMessage || typeof res === 'string' && res || res === false) {
  3965. result = this._getMessage(rule, callbackMessage || res, vt);
  3966. }_context2.next = 12;break;case 9:_context2.prev = 9;_context2.t0 = _context2["catch"](1);
  3967. result = this._getMessage(rule, _context2.t0.message, vt);case 12:return _context2.abrupt("return",
  3968. result);case 13:case "end":return _context2.stop();}}}, _callee2, this, [[1, 9]]);}));function validateFunction(_x6, _x7, _x8, _x9, _x10) {return _validateFunction.apply(this, arguments);}return validateFunction;}() }, { key: "_getMessage", value: function _getMessage(
  3969. rule, message, vt) {
  3970. return formatMessage(rule, message || rule.errorMessage || this._message[vt] || message['default']);
  3971. } }, { key: "_getValidateType", value: function _getValidateType(
  3972. rule) {
  3973. var result = '';
  3974. if (rule.required) {
  3975. result = 'required';
  3976. } else if (rule.format) {
  3977. result = 'format';
  3978. } else if (rule.arrayType) {
  3979. result = 'arrayTypeFormat';
  3980. } else if (rule.range) {
  3981. result = 'range';
  3982. } else if (rule.maximum !== undefined || rule.minimum !== undefined) {
  3983. result = 'rangeNumber';
  3984. } else if (rule.maxLength !== undefined || rule.minLength !== undefined) {
  3985. result = 'rangeLength';
  3986. } else if (rule.pattern) {
  3987. result = 'pattern';
  3988. } else if (rule.validateFunction) {
  3989. result = 'validateFunction';
  3990. }
  3991. return result;
  3992. } }]);return RuleValidator;}();
  3993. var RuleValidatorHelper = {
  3994. required: function required(rule, value, message) {
  3995. if (rule.required && isEmptyValue(value, rule.format || typeof value)) {
  3996. return formatMessage(rule, rule.errorMessage || message.required);
  3997. }
  3998. return null;
  3999. },
  4000. range: function range(rule, value, message) {var
  4001. range =
  4002. rule.range,errorMessage = rule.errorMessage;
  4003. var list = new Array(range.length);
  4004. for (var i = 0; i < range.length; i++) {
  4005. var item = range[i];
  4006. if (types.object(item) && item.value !== undefined) {
  4007. list[i] = item.value;
  4008. } else {
  4009. list[i] = item;
  4010. }
  4011. }
  4012. var result = false;
  4013. if (Array.isArray(value)) {
  4014. result = new Set(value.concat(list)).size === list.length;
  4015. } else {
  4016. if (list.indexOf(value) > -1) {
  4017. result = true;
  4018. }
  4019. }
  4020. if (!result) {
  4021. return formatMessage(rule, errorMessage || message['enum']);
  4022. }
  4023. return null;
  4024. },
  4025. rangeNumber: function rangeNumber(rule, value, message) {
  4026. if (!types.number(value)) {
  4027. return formatMessage(rule, rule.errorMessage || message.pattern.mismatch);
  4028. }var
  4029. minimum =
  4030. rule.minimum,maximum = rule.maximum,exclusiveMinimum = rule.exclusiveMinimum,exclusiveMaximum = rule.exclusiveMaximum;
  4031. var min = exclusiveMinimum ? value <= minimum : value < minimum;
  4032. var max = exclusiveMaximum ? value >= maximum : value > maximum;
  4033. if (minimum !== undefined && min) {
  4034. return formatMessage(rule, rule.errorMessage || message['number'][exclusiveMinimum ?
  4035. 'exclusiveMinimum' : 'minimum']);
  4036. } else if (maximum !== undefined && max) {
  4037. return formatMessage(rule, rule.errorMessage || message['number'][exclusiveMaximum ?
  4038. 'exclusiveMaximum' : 'maximum']);
  4039. } else if (minimum !== undefined && maximum !== undefined && (min || max)) {
  4040. return formatMessage(rule, rule.errorMessage || message['number'].range);
  4041. }
  4042. return null;
  4043. },
  4044. rangeLength: function rangeLength(rule, value, message) {
  4045. if (!types.string(value) && !types.array(value)) {
  4046. return formatMessage(rule, rule.errorMessage || message.pattern.mismatch);
  4047. }
  4048. var min = rule.minLength;
  4049. var max = rule.maxLength;
  4050. var val = value.length;
  4051. if (min !== undefined && val < min) {
  4052. return formatMessage(rule, rule.errorMessage || message['length'].minLength);
  4053. } else if (max !== undefined && val > max) {
  4054. return formatMessage(rule, rule.errorMessage || message['length'].maxLength);
  4055. } else if (min !== undefined && max !== undefined && (val < min || val > max)) {
  4056. return formatMessage(rule, rule.errorMessage || message['length'].range);
  4057. }
  4058. return null;
  4059. },
  4060. pattern: function pattern(rule, value, message) {
  4061. if (!types['pattern'](rule.pattern, value)) {
  4062. return formatMessage(rule, rule.errorMessage || message.pattern.mismatch);
  4063. }
  4064. return null;
  4065. },
  4066. format: function format(rule, value, message) {
  4067. var customTypes = Object.keys(types);
  4068. var format = FORMAT_MAPPING[rule.format] ? FORMAT_MAPPING[rule.format] : rule.format || rule.arrayType;
  4069. if (customTypes.indexOf(format) > -1) {
  4070. if (!types[format](value)) {
  4071. return formatMessage(rule, rule.errorMessage || message.typeError);
  4072. }
  4073. }
  4074. return null;
  4075. },
  4076. arrayTypeFormat: function arrayTypeFormat(rule, value, message) {
  4077. if (!Array.isArray(value)) {
  4078. return formatMessage(rule, rule.errorMessage || message.typeError);
  4079. }
  4080. for (var i = 0; i < value.length; i++) {
  4081. var element = value[i];
  4082. var formatResult = this.format(rule, element, message);
  4083. if (formatResult !== null) {
  4084. return formatResult;
  4085. }
  4086. }
  4087. return null;
  4088. } };var
  4089. SchemaValidator = /*#__PURE__*/function (_RuleValidator) {_inherits(SchemaValidator, _RuleValidator);var _super = _createSuper(SchemaValidator);
  4090. function SchemaValidator(schema, options) {var _this;_classCallCheck(this, SchemaValidator);
  4091. _this = _super.call(this, SchemaValidator.message);
  4092. _this._schema = schema;
  4093. _this._options = options || null;return _this;
  4094. }_createClass(SchemaValidator, [{ key: "updateSchema", value: function updateSchema(
  4095. schema) {
  4096. this._schema = schema;
  4097. } }, { key: "validate", value: function () {var _validate = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee3(
  4098. data, allData) {var result;return _regenerator.default.wrap(function _callee3$(_context3) {while (1) {switch (_context3.prev = _context3.next) {case 0:
  4099. result = this._checkFieldInSchema(data);if (
  4100. result) {_context3.next = 5;break;}_context3.next = 4;return (
  4101. this.invokeValidate(data, false, allData));case 4:result = _context3.sent;case 5:return _context3.abrupt("return",
  4102. result.length ? result[0] : null);case 6:case "end":return _context3.stop();}}}, _callee3, this);}));function validate(_x11, _x12) {return _validate.apply(this, arguments);}return validate;}() }, { key: "validateAll", value: function () {var _validateAll = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee4(
  4103. data, allData) {var result;return _regenerator.default.wrap(function _callee4$(_context4) {while (1) {switch (_context4.prev = _context4.next) {case 0:
  4104. result = this._checkFieldInSchema(data);if (
  4105. result) {_context4.next = 5;break;}_context4.next = 4;return (
  4106. this.invokeValidate(data, true, allData));case 4:result = _context4.sent;case 5:return _context4.abrupt("return",
  4107. result);case 6:case "end":return _context4.stop();}}}, _callee4, this);}));function validateAll(_x13, _x14) {return _validateAll.apply(this, arguments);}return validateAll;}() }, { key: "validateUpdate", value: function () {var _validateUpdate = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee5(
  4108. data, allData) {var result;return _regenerator.default.wrap(function _callee5$(_context5) {while (1) {switch (_context5.prev = _context5.next) {case 0:
  4109. result = this._checkFieldInSchema(data);if (
  4110. result) {_context5.next = 5;break;}_context5.next = 4;return (
  4111. this.invokeValidateUpdate(data, false, allData));case 4:result = _context5.sent;case 5:return _context5.abrupt("return",
  4112. result.length ? result[0] : null);case 6:case "end":return _context5.stop();}}}, _callee5, this);}));function validateUpdate(_x15, _x16) {return _validateUpdate.apply(this, arguments);}return validateUpdate;}() }, { key: "invokeValidate", value: function () {var _invokeValidate = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee6(
  4113. data, all, allData) {var result, schema, key, value, errorMessage;return _regenerator.default.wrap(function _callee6$(_context6) {while (1) {switch (_context6.prev = _context6.next) {case 0:
  4114. result = [];
  4115. schema = this._schema;_context6.t0 = _regenerator.default.keys(
  4116. schema);case 3:if ((_context6.t1 = _context6.t0()).done) {_context6.next = 15;break;}key = _context6.t1.value;
  4117. value = schema[key];_context6.next = 8;return (
  4118. this.validateRule(key, value, data[key], data, allData));case 8:errorMessage = _context6.sent;if (!(
  4119. errorMessage != null)) {_context6.next = 13;break;}
  4120. result.push({
  4121. key: key,
  4122. errorMessage: errorMessage });if (
  4123. all) {_context6.next = 13;break;}return _context6.abrupt("break", 15);case 13:_context6.next = 3;break;case 15:return _context6.abrupt("return",
  4124. result);case 16:case "end":return _context6.stop();}}}, _callee6, this);}));function invokeValidate(_x17, _x18, _x19) {return _invokeValidate.apply(this, arguments);}return invokeValidate;}() }, { key: "invokeValidateUpdate", value: function () {var _invokeValidateUpdate = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee7(
  4125. data, all, allData) {var result, key, errorMessage;return _regenerator.default.wrap(function _callee7$(_context7) {while (1) {switch (_context7.prev = _context7.next) {case 0:
  4126. result = [];_context7.t0 = _regenerator.default.keys(
  4127. data);case 2:if ((_context7.t1 = _context7.t0()).done) {_context7.next = 13;break;}key = _context7.t1.value;_context7.next = 6;return (
  4128. this.validateRule(key, this._schema[key], data[key], data, allData));case 6:errorMessage = _context7.sent;if (!(
  4129. errorMessage != null)) {_context7.next = 11;break;}
  4130. result.push({
  4131. key: key,
  4132. errorMessage: errorMessage });if (
  4133. all) {_context7.next = 11;break;}return _context7.abrupt("break", 13);case 11:_context7.next = 2;break;case 13:return _context7.abrupt("return",
  4134. result);case 14:case "end":return _context7.stop();}}}, _callee7, this);}));function invokeValidateUpdate(_x20, _x21, _x22) {return _invokeValidateUpdate.apply(this, arguments);}return invokeValidateUpdate;}() }, { key: "_checkFieldInSchema", value: function _checkFieldInSchema(
  4135. data) {
  4136. var keys = Object.keys(data);
  4137. var keys2 = Object.keys(this._schema);
  4138. if (new Set(keys.concat(keys2)).size === keys2.length) {
  4139. return '';
  4140. }
  4141. var noExistFields = keys.filter(function (key) {
  4142. return keys2.indexOf(key) < 0;
  4143. });
  4144. var errorMessage = formatMessage({
  4145. field: JSON.stringify(noExistFields) },
  4146. SchemaValidator.message.TAG + SchemaValidator.message['defaultInvalid']);
  4147. return [{
  4148. key: 'invalid',
  4149. errorMessage: errorMessage }];
  4150. } }]);return SchemaValidator;}(RuleValidator);
  4151. function Message() {
  4152. return {
  4153. TAG: "",
  4154. default: '验证错误',
  4155. defaultInvalid: '提交的字段{field}在数据库中并不存在',
  4156. validateFunction: '验证无效',
  4157. required: '{label}必填',
  4158. 'enum': '{label}超出范围',
  4159. timestamp: '{label}格式无效',
  4160. whitespace: '{label}不能为空',
  4161. typeError: '{label}类型无效',
  4162. date: {
  4163. format: '{label}日期{value}格式无效',
  4164. parse: '{label}日期无法解析,{value}无效',
  4165. invalid: '{label}日期{value}无效' },
  4166. length: {
  4167. minLength: '{label}长度不能少于{minLength}',
  4168. maxLength: '{label}长度不能超过{maxLength}',
  4169. range: '{label}必须介于{minLength}和{maxLength}之间' },
  4170. number: {
  4171. minimum: '{label}不能小于{minimum}',
  4172. maximum: '{label}不能大于{maximum}',
  4173. exclusiveMinimum: '{label}不能小于等于{minimum}',
  4174. exclusiveMaximum: '{label}不能大于等于{maximum}',
  4175. range: '{label}必须介于{minimum}and{maximum}之间' },
  4176. pattern: {
  4177. mismatch: '{label}格式不匹配' } };
  4178. }
  4179. SchemaValidator.message = new Message();var _default =
  4180. SchemaValidator;exports.default = _default;
  4181. /***/ }),
  4182. /***/ 375:
  4183. /*!*************************************************************************************************!*\
  4184. !*** D:/hongxing/storage-wechat/node_modules/@dcloudio/uni-ui/lib/uni-search-bar/i18n/index.js ***!
  4185. \*************************************************************************************************/
  4186. /*! no static exports found */
  4187. /***/ (function(module, exports, __webpack_require__) {
  4188. "use strict";
  4189. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _en = _interopRequireDefault(__webpack_require__(/*! ./en.json */ 376));
  4190. var _zhHans = _interopRequireDefault(__webpack_require__(/*! ./zh-Hans.json */ 377));
  4191. var _zhHant = _interopRequireDefault(__webpack_require__(/*! ./zh-Hant.json */ 378));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}var _default =
  4192. {
  4193. en: _en.default,
  4194. 'zh-Hans': _zhHans.default,
  4195. 'zh-Hant': _zhHant.default };exports.default = _default;
  4196. /***/ }),
  4197. /***/ 376:
  4198. /*!************************************************************************************************!*\
  4199. !*** D:/hongxing/storage-wechat/node_modules/@dcloudio/uni-ui/lib/uni-search-bar/i18n/en.json ***!
  4200. \************************************************************************************************/
  4201. /*! exports provided: uni-search-bar.cancel, uni-search-bar.placeholder, default */
  4202. /***/ (function(module) {
  4203. module.exports = JSON.parse("{\"uni-search-bar.cancel\":\"cancel\",\"uni-search-bar.placeholder\":\"Search enter content\"}");
  4204. /***/ }),
  4205. /***/ 377:
  4206. /*!*****************************************************************************************************!*\
  4207. !*** D:/hongxing/storage-wechat/node_modules/@dcloudio/uni-ui/lib/uni-search-bar/i18n/zh-Hans.json ***!
  4208. \*****************************************************************************************************/
  4209. /*! exports provided: uni-search-bar.cancel, uni-search-bar.placeholder, default */
  4210. /***/ (function(module) {
  4211. module.exports = JSON.parse("{\"uni-search-bar.cancel\":\"cancel\",\"uni-search-bar.placeholder\":\"请输入搜索内容\"}");
  4212. /***/ }),
  4213. /***/ 378:
  4214. /*!*****************************************************************************************************!*\
  4215. !*** D:/hongxing/storage-wechat/node_modules/@dcloudio/uni-ui/lib/uni-search-bar/i18n/zh-Hant.json ***!
  4216. \*****************************************************************************************************/
  4217. /*! exports provided: uni-search-bar.cancel, uni-search-bar.placeholder, default */
  4218. /***/ (function(module) {
  4219. module.exports = JSON.parse("{\"uni-search-bar.cancel\":\"cancel\",\"uni-search-bar.placeholder\":\"請輸入搜索內容\"}");
  4220. /***/ }),
  4221. /***/ 386:
  4222. /*!***************************************************************************************!*\
  4223. !*** D:/hongxing/storage-wechat/node_modules/@dcloudio/uni-ui/lib/uni-icons/icons.js ***!
  4224. \***************************************************************************************/
  4225. /*! no static exports found */
  4226. /***/ (function(module, exports, __webpack_require__) {
  4227. "use strict";
  4228. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  4229. "id": "2852637",
  4230. "name": "uniui图标库",
  4231. "font_family": "uniicons",
  4232. "css_prefix_text": "uniui-",
  4233. "description": "",
  4234. "glyphs": [
  4235. {
  4236. "icon_id": "25027049",
  4237. "name": "yanse",
  4238. "font_class": "color",
  4239. "unicode": "e6cf",
  4240. "unicode_decimal": 59087 },
  4241. {
  4242. "icon_id": "25027048",
  4243. "name": "wallet",
  4244. "font_class": "wallet",
  4245. "unicode": "e6b1",
  4246. "unicode_decimal": 59057 },
  4247. {
  4248. "icon_id": "25015720",
  4249. "name": "settings-filled",
  4250. "font_class": "settings-filled",
  4251. "unicode": "e6ce",
  4252. "unicode_decimal": 59086 },
  4253. {
  4254. "icon_id": "25015434",
  4255. "name": "shimingrenzheng-filled",
  4256. "font_class": "auth-filled",
  4257. "unicode": "e6cc",
  4258. "unicode_decimal": 59084 },
  4259. {
  4260. "icon_id": "24934246",
  4261. "name": "shop-filled",
  4262. "font_class": "shop-filled",
  4263. "unicode": "e6cd",
  4264. "unicode_decimal": 59085 },
  4265. {
  4266. "icon_id": "24934159",
  4267. "name": "staff-filled-01",
  4268. "font_class": "staff-filled",
  4269. "unicode": "e6cb",
  4270. "unicode_decimal": 59083 },
  4271. {
  4272. "icon_id": "24932461",
  4273. "name": "VIP-filled",
  4274. "font_class": "vip-filled",
  4275. "unicode": "e6c6",
  4276. "unicode_decimal": 59078 },
  4277. {
  4278. "icon_id": "24932462",
  4279. "name": "plus_circle_fill",
  4280. "font_class": "plus-filled",
  4281. "unicode": "e6c7",
  4282. "unicode_decimal": 59079 },
  4283. {
  4284. "icon_id": "24932463",
  4285. "name": "folder_add-filled",
  4286. "font_class": "folder-add-filled",
  4287. "unicode": "e6c8",
  4288. "unicode_decimal": 59080 },
  4289. {
  4290. "icon_id": "24932464",
  4291. "name": "yanse-filled",
  4292. "font_class": "color-filled",
  4293. "unicode": "e6c9",
  4294. "unicode_decimal": 59081 },
  4295. {
  4296. "icon_id": "24932465",
  4297. "name": "tune-filled",
  4298. "font_class": "tune-filled",
  4299. "unicode": "e6ca",
  4300. "unicode_decimal": 59082 },
  4301. {
  4302. "icon_id": "24932455",
  4303. "name": "a-rilidaka-filled",
  4304. "font_class": "calendar-filled",
  4305. "unicode": "e6c0",
  4306. "unicode_decimal": 59072 },
  4307. {
  4308. "icon_id": "24932456",
  4309. "name": "notification-filled",
  4310. "font_class": "notification-filled",
  4311. "unicode": "e6c1",
  4312. "unicode_decimal": 59073 },
  4313. {
  4314. "icon_id": "24932457",
  4315. "name": "wallet-filled",
  4316. "font_class": "wallet-filled",
  4317. "unicode": "e6c2",
  4318. "unicode_decimal": 59074 },
  4319. {
  4320. "icon_id": "24932458",
  4321. "name": "paihangbang-filled",
  4322. "font_class": "medal-filled",
  4323. "unicode": "e6c3",
  4324. "unicode_decimal": 59075 },
  4325. {
  4326. "icon_id": "24932459",
  4327. "name": "gift-filled",
  4328. "font_class": "gift-filled",
  4329. "unicode": "e6c4",
  4330. "unicode_decimal": 59076 },
  4331. {
  4332. "icon_id": "24932460",
  4333. "name": "fire-filled",
  4334. "font_class": "fire-filled",
  4335. "unicode": "e6c5",
  4336. "unicode_decimal": 59077 },
  4337. {
  4338. "icon_id": "24928001",
  4339. "name": "refreshempty",
  4340. "font_class": "refreshempty",
  4341. "unicode": "e6bf",
  4342. "unicode_decimal": 59071 },
  4343. {
  4344. "icon_id": "24926853",
  4345. "name": "location-ellipse",
  4346. "font_class": "location-filled",
  4347. "unicode": "e6af",
  4348. "unicode_decimal": 59055 },
  4349. {
  4350. "icon_id": "24926735",
  4351. "name": "person-filled",
  4352. "font_class": "person-filled",
  4353. "unicode": "e69d",
  4354. "unicode_decimal": 59037 },
  4355. {
  4356. "icon_id": "24926703",
  4357. "name": "personadd-filled",
  4358. "font_class": "personadd-filled",
  4359. "unicode": "e698",
  4360. "unicode_decimal": 59032 },
  4361. {
  4362. "icon_id": "24923351",
  4363. "name": "back",
  4364. "font_class": "back",
  4365. "unicode": "e6b9",
  4366. "unicode_decimal": 59065 },
  4367. {
  4368. "icon_id": "24923352",
  4369. "name": "forward",
  4370. "font_class": "forward",
  4371. "unicode": "e6ba",
  4372. "unicode_decimal": 59066 },
  4373. {
  4374. "icon_id": "24923353",
  4375. "name": "arrowthinright",
  4376. "font_class": "arrow-right",
  4377. "unicode": "e6bb",
  4378. "unicode_decimal": 59067 },
  4379. {
  4380. "icon_id": "24923353",
  4381. "name": "arrowthinright",
  4382. "font_class": "arrowthinright",
  4383. "unicode": "e6bb",
  4384. "unicode_decimal": 59067 },
  4385. {
  4386. "icon_id": "24923354",
  4387. "name": "arrowthinleft",
  4388. "font_class": "arrow-left",
  4389. "unicode": "e6bc",
  4390. "unicode_decimal": 59068 },
  4391. {
  4392. "icon_id": "24923354",
  4393. "name": "arrowthinleft",
  4394. "font_class": "arrowthinleft",
  4395. "unicode": "e6bc",
  4396. "unicode_decimal": 59068 },
  4397. {
  4398. "icon_id": "24923355",
  4399. "name": "arrowthinup",
  4400. "font_class": "arrow-up",
  4401. "unicode": "e6bd",
  4402. "unicode_decimal": 59069 },
  4403. {
  4404. "icon_id": "24923355",
  4405. "name": "arrowthinup",
  4406. "font_class": "arrowthinup",
  4407. "unicode": "e6bd",
  4408. "unicode_decimal": 59069 },
  4409. {
  4410. "icon_id": "24923356",
  4411. "name": "arrowthindown",
  4412. "font_class": "arrow-down",
  4413. "unicode": "e6be",
  4414. "unicode_decimal": 59070 },
  4415. {
  4416. "icon_id": "24923356",
  4417. "name": "arrowthindown",
  4418. "font_class": "arrowthindown",
  4419. "unicode": "e6be",
  4420. "unicode_decimal": 59070 },
  4421. {
  4422. "icon_id": "24923349",
  4423. "name": "arrowdown",
  4424. "font_class": "bottom",
  4425. "unicode": "e6b8",
  4426. "unicode_decimal": 59064 },
  4427. {
  4428. "icon_id": "24923349",
  4429. "name": "arrowdown",
  4430. "font_class": "arrowdown",
  4431. "unicode": "e6b8",
  4432. "unicode_decimal": 59064 },
  4433. {
  4434. "icon_id": "24923346",
  4435. "name": "arrowright",
  4436. "font_class": "right",
  4437. "unicode": "e6b5",
  4438. "unicode_decimal": 59061 },
  4439. {
  4440. "icon_id": "24923346",
  4441. "name": "arrowright",
  4442. "font_class": "arrowright",
  4443. "unicode": "e6b5",
  4444. "unicode_decimal": 59061 },
  4445. {
  4446. "icon_id": "24923347",
  4447. "name": "arrowup",
  4448. "font_class": "top",
  4449. "unicode": "e6b6",
  4450. "unicode_decimal": 59062 },
  4451. {
  4452. "icon_id": "24923347",
  4453. "name": "arrowup",
  4454. "font_class": "arrowup",
  4455. "unicode": "e6b6",
  4456. "unicode_decimal": 59062 },
  4457. {
  4458. "icon_id": "24923348",
  4459. "name": "arrowleft",
  4460. "font_class": "left",
  4461. "unicode": "e6b7",
  4462. "unicode_decimal": 59063 },
  4463. {
  4464. "icon_id": "24923348",
  4465. "name": "arrowleft",
  4466. "font_class": "arrowleft",
  4467. "unicode": "e6b7",
  4468. "unicode_decimal": 59063 },
  4469. {
  4470. "icon_id": "24923334",
  4471. "name": "eye",
  4472. "font_class": "eye",
  4473. "unicode": "e651",
  4474. "unicode_decimal": 58961 },
  4475. {
  4476. "icon_id": "24923335",
  4477. "name": "eye-filled",
  4478. "font_class": "eye-filled",
  4479. "unicode": "e66a",
  4480. "unicode_decimal": 58986 },
  4481. {
  4482. "icon_id": "24923336",
  4483. "name": "eye-slash",
  4484. "font_class": "eye-slash",
  4485. "unicode": "e6b3",
  4486. "unicode_decimal": 59059 },
  4487. {
  4488. "icon_id": "24923337",
  4489. "name": "eye-slash-filled",
  4490. "font_class": "eye-slash-filled",
  4491. "unicode": "e6b4",
  4492. "unicode_decimal": 59060 },
  4493. {
  4494. "icon_id": "24923305",
  4495. "name": "info-filled",
  4496. "font_class": "info-filled",
  4497. "unicode": "e649",
  4498. "unicode_decimal": 58953 },
  4499. {
  4500. "icon_id": "24923299",
  4501. "name": "reload-01",
  4502. "font_class": "reload",
  4503. "unicode": "e6b2",
  4504. "unicode_decimal": 59058 },
  4505. {
  4506. "icon_id": "24923195",
  4507. "name": "mic_slash_fill",
  4508. "font_class": "micoff-filled",
  4509. "unicode": "e6b0",
  4510. "unicode_decimal": 59056 },
  4511. {
  4512. "icon_id": "24923165",
  4513. "name": "map-pin-ellipse",
  4514. "font_class": "map-pin-ellipse",
  4515. "unicode": "e6ac",
  4516. "unicode_decimal": 59052 },
  4517. {
  4518. "icon_id": "24923166",
  4519. "name": "map-pin",
  4520. "font_class": "map-pin",
  4521. "unicode": "e6ad",
  4522. "unicode_decimal": 59053 },
  4523. {
  4524. "icon_id": "24923167",
  4525. "name": "location",
  4526. "font_class": "location",
  4527. "unicode": "e6ae",
  4528. "unicode_decimal": 59054 },
  4529. {
  4530. "icon_id": "24923064",
  4531. "name": "starhalf",
  4532. "font_class": "starhalf",
  4533. "unicode": "e683",
  4534. "unicode_decimal": 59011 },
  4535. {
  4536. "icon_id": "24923065",
  4537. "name": "star",
  4538. "font_class": "star",
  4539. "unicode": "e688",
  4540. "unicode_decimal": 59016 },
  4541. {
  4542. "icon_id": "24923066",
  4543. "name": "star-filled",
  4544. "font_class": "star-filled",
  4545. "unicode": "e68f",
  4546. "unicode_decimal": 59023 },
  4547. {
  4548. "icon_id": "24899646",
  4549. "name": "a-rilidaka",
  4550. "font_class": "calendar",
  4551. "unicode": "e6a0",
  4552. "unicode_decimal": 59040 },
  4553. {
  4554. "icon_id": "24899647",
  4555. "name": "fire",
  4556. "font_class": "fire",
  4557. "unicode": "e6a1",
  4558. "unicode_decimal": 59041 },
  4559. {
  4560. "icon_id": "24899648",
  4561. "name": "paihangbang",
  4562. "font_class": "medal",
  4563. "unicode": "e6a2",
  4564. "unicode_decimal": 59042 },
  4565. {
  4566. "icon_id": "24899649",
  4567. "name": "font",
  4568. "font_class": "font",
  4569. "unicode": "e6a3",
  4570. "unicode_decimal": 59043 },
  4571. {
  4572. "icon_id": "24899650",
  4573. "name": "gift",
  4574. "font_class": "gift",
  4575. "unicode": "e6a4",
  4576. "unicode_decimal": 59044 },
  4577. {
  4578. "icon_id": "24899651",
  4579. "name": "link",
  4580. "font_class": "link",
  4581. "unicode": "e6a5",
  4582. "unicode_decimal": 59045 },
  4583. {
  4584. "icon_id": "24899652",
  4585. "name": "notification",
  4586. "font_class": "notification",
  4587. "unicode": "e6a6",
  4588. "unicode_decimal": 59046 },
  4589. {
  4590. "icon_id": "24899653",
  4591. "name": "staff",
  4592. "font_class": "staff",
  4593. "unicode": "e6a7",
  4594. "unicode_decimal": 59047 },
  4595. {
  4596. "icon_id": "24899654",
  4597. "name": "VIP",
  4598. "font_class": "vip",
  4599. "unicode": "e6a8",
  4600. "unicode_decimal": 59048 },
  4601. {
  4602. "icon_id": "24899655",
  4603. "name": "folder_add",
  4604. "font_class": "folder-add",
  4605. "unicode": "e6a9",
  4606. "unicode_decimal": 59049 },
  4607. {
  4608. "icon_id": "24899656",
  4609. "name": "tune",
  4610. "font_class": "tune",
  4611. "unicode": "e6aa",
  4612. "unicode_decimal": 59050 },
  4613. {
  4614. "icon_id": "24899657",
  4615. "name": "shimingrenzheng",
  4616. "font_class": "auth",
  4617. "unicode": "e6ab",
  4618. "unicode_decimal": 59051 },
  4619. {
  4620. "icon_id": "24899565",
  4621. "name": "person",
  4622. "font_class": "person",
  4623. "unicode": "e699",
  4624. "unicode_decimal": 59033 },
  4625. {
  4626. "icon_id": "24899566",
  4627. "name": "email-filled",
  4628. "font_class": "email-filled",
  4629. "unicode": "e69a",
  4630. "unicode_decimal": 59034 },
  4631. {
  4632. "icon_id": "24899567",
  4633. "name": "phone-filled",
  4634. "font_class": "phone-filled",
  4635. "unicode": "e69b",
  4636. "unicode_decimal": 59035 },
  4637. {
  4638. "icon_id": "24899568",
  4639. "name": "phone",
  4640. "font_class": "phone",
  4641. "unicode": "e69c",
  4642. "unicode_decimal": 59036 },
  4643. {
  4644. "icon_id": "24899570",
  4645. "name": "email",
  4646. "font_class": "email",
  4647. "unicode": "e69e",
  4648. "unicode_decimal": 59038 },
  4649. {
  4650. "icon_id": "24899571",
  4651. "name": "personadd",
  4652. "font_class": "personadd",
  4653. "unicode": "e69f",
  4654. "unicode_decimal": 59039 },
  4655. {
  4656. "icon_id": "24899558",
  4657. "name": "chatboxes-filled",
  4658. "font_class": "chatboxes-filled",
  4659. "unicode": "e692",
  4660. "unicode_decimal": 59026 },
  4661. {
  4662. "icon_id": "24899559",
  4663. "name": "contact",
  4664. "font_class": "contact",
  4665. "unicode": "e693",
  4666. "unicode_decimal": 59027 },
  4667. {
  4668. "icon_id": "24899560",
  4669. "name": "chatbubble-filled",
  4670. "font_class": "chatbubble-filled",
  4671. "unicode": "e694",
  4672. "unicode_decimal": 59028 },
  4673. {
  4674. "icon_id": "24899561",
  4675. "name": "contact-filled",
  4676. "font_class": "contact-filled",
  4677. "unicode": "e695",
  4678. "unicode_decimal": 59029 },
  4679. {
  4680. "icon_id": "24899562",
  4681. "name": "chatboxes",
  4682. "font_class": "chatboxes",
  4683. "unicode": "e696",
  4684. "unicode_decimal": 59030 },
  4685. {
  4686. "icon_id": "24899563",
  4687. "name": "chatbubble",
  4688. "font_class": "chatbubble",
  4689. "unicode": "e697",
  4690. "unicode_decimal": 59031 },
  4691. {
  4692. "icon_id": "24881290",
  4693. "name": "upload-filled",
  4694. "font_class": "upload-filled",
  4695. "unicode": "e68e",
  4696. "unicode_decimal": 59022 },
  4697. {
  4698. "icon_id": "24881292",
  4699. "name": "upload",
  4700. "font_class": "upload",
  4701. "unicode": "e690",
  4702. "unicode_decimal": 59024 },
  4703. {
  4704. "icon_id": "24881293",
  4705. "name": "weixin",
  4706. "font_class": "weixin",
  4707. "unicode": "e691",
  4708. "unicode_decimal": 59025 },
  4709. {
  4710. "icon_id": "24881274",
  4711. "name": "compose",
  4712. "font_class": "compose",
  4713. "unicode": "e67f",
  4714. "unicode_decimal": 59007 },
  4715. {
  4716. "icon_id": "24881275",
  4717. "name": "qq",
  4718. "font_class": "qq",
  4719. "unicode": "e680",
  4720. "unicode_decimal": 59008 },
  4721. {
  4722. "icon_id": "24881276",
  4723. "name": "download-filled",
  4724. "font_class": "download-filled",
  4725. "unicode": "e681",
  4726. "unicode_decimal": 59009 },
  4727. {
  4728. "icon_id": "24881277",
  4729. "name": "pengyouquan",
  4730. "font_class": "pyq",
  4731. "unicode": "e682",
  4732. "unicode_decimal": 59010 },
  4733. {
  4734. "icon_id": "24881279",
  4735. "name": "sound",
  4736. "font_class": "sound",
  4737. "unicode": "e684",
  4738. "unicode_decimal": 59012 },
  4739. {
  4740. "icon_id": "24881280",
  4741. "name": "trash-filled",
  4742. "font_class": "trash-filled",
  4743. "unicode": "e685",
  4744. "unicode_decimal": 59013 },
  4745. {
  4746. "icon_id": "24881281",
  4747. "name": "sound-filled",
  4748. "font_class": "sound-filled",
  4749. "unicode": "e686",
  4750. "unicode_decimal": 59014 },
  4751. {
  4752. "icon_id": "24881282",
  4753. "name": "trash",
  4754. "font_class": "trash",
  4755. "unicode": "e687",
  4756. "unicode_decimal": 59015 },
  4757. {
  4758. "icon_id": "24881284",
  4759. "name": "videocam-filled",
  4760. "font_class": "videocam-filled",
  4761. "unicode": "e689",
  4762. "unicode_decimal": 59017 },
  4763. {
  4764. "icon_id": "24881285",
  4765. "name": "spinner-cycle",
  4766. "font_class": "spinner-cycle",
  4767. "unicode": "e68a",
  4768. "unicode_decimal": 59018 },
  4769. {
  4770. "icon_id": "24881286",
  4771. "name": "weibo",
  4772. "font_class": "weibo",
  4773. "unicode": "e68b",
  4774. "unicode_decimal": 59019 },
  4775. {
  4776. "icon_id": "24881288",
  4777. "name": "videocam",
  4778. "font_class": "videocam",
  4779. "unicode": "e68c",
  4780. "unicode_decimal": 59020 },
  4781. {
  4782. "icon_id": "24881289",
  4783. "name": "download",
  4784. "font_class": "download",
  4785. "unicode": "e68d",
  4786. "unicode_decimal": 59021 },
  4787. {
  4788. "icon_id": "24879601",
  4789. "name": "help",
  4790. "font_class": "help",
  4791. "unicode": "e679",
  4792. "unicode_decimal": 59001 },
  4793. {
  4794. "icon_id": "24879602",
  4795. "name": "navigate-filled",
  4796. "font_class": "navigate-filled",
  4797. "unicode": "e67a",
  4798. "unicode_decimal": 59002 },
  4799. {
  4800. "icon_id": "24879603",
  4801. "name": "plusempty",
  4802. "font_class": "plusempty",
  4803. "unicode": "e67b",
  4804. "unicode_decimal": 59003 },
  4805. {
  4806. "icon_id": "24879604",
  4807. "name": "smallcircle",
  4808. "font_class": "smallcircle",
  4809. "unicode": "e67c",
  4810. "unicode_decimal": 59004 },
  4811. {
  4812. "icon_id": "24879605",
  4813. "name": "minus-filled",
  4814. "font_class": "minus-filled",
  4815. "unicode": "e67d",
  4816. "unicode_decimal": 59005 },
  4817. {
  4818. "icon_id": "24879606",
  4819. "name": "micoff",
  4820. "font_class": "micoff",
  4821. "unicode": "e67e",
  4822. "unicode_decimal": 59006 },
  4823. {
  4824. "icon_id": "24879588",
  4825. "name": "closeempty",
  4826. "font_class": "closeempty",
  4827. "unicode": "e66c",
  4828. "unicode_decimal": 58988 },
  4829. {
  4830. "icon_id": "24879589",
  4831. "name": "clear",
  4832. "font_class": "clear",
  4833. "unicode": "e66d",
  4834. "unicode_decimal": 58989 },
  4835. {
  4836. "icon_id": "24879590",
  4837. "name": "navigate",
  4838. "font_class": "navigate",
  4839. "unicode": "e66e",
  4840. "unicode_decimal": 58990 },
  4841. {
  4842. "icon_id": "24879591",
  4843. "name": "minus",
  4844. "font_class": "minus",
  4845. "unicode": "e66f",
  4846. "unicode_decimal": 58991 },
  4847. {
  4848. "icon_id": "24879592",
  4849. "name": "image",
  4850. "font_class": "image",
  4851. "unicode": "e670",
  4852. "unicode_decimal": 58992 },
  4853. {
  4854. "icon_id": "24879593",
  4855. "name": "mic",
  4856. "font_class": "mic",
  4857. "unicode": "e671",
  4858. "unicode_decimal": 58993 },
  4859. {
  4860. "icon_id": "24879594",
  4861. "name": "paperplane",
  4862. "font_class": "paperplane",
  4863. "unicode": "e672",
  4864. "unicode_decimal": 58994 },
  4865. {
  4866. "icon_id": "24879595",
  4867. "name": "close",
  4868. "font_class": "close",
  4869. "unicode": "e673",
  4870. "unicode_decimal": 58995 },
  4871. {
  4872. "icon_id": "24879596",
  4873. "name": "help-filled",
  4874. "font_class": "help-filled",
  4875. "unicode": "e674",
  4876. "unicode_decimal": 58996 },
  4877. {
  4878. "icon_id": "24879597",
  4879. "name": "plus-filled",
  4880. "font_class": "paperplane-filled",
  4881. "unicode": "e675",
  4882. "unicode_decimal": 58997 },
  4883. {
  4884. "icon_id": "24879598",
  4885. "name": "plus",
  4886. "font_class": "plus",
  4887. "unicode": "e676",
  4888. "unicode_decimal": 58998 },
  4889. {
  4890. "icon_id": "24879599",
  4891. "name": "mic-filled",
  4892. "font_class": "mic-filled",
  4893. "unicode": "e677",
  4894. "unicode_decimal": 58999 },
  4895. {
  4896. "icon_id": "24879600",
  4897. "name": "image-filled",
  4898. "font_class": "image-filled",
  4899. "unicode": "e678",
  4900. "unicode_decimal": 59000 },
  4901. {
  4902. "icon_id": "24855900",
  4903. "name": "locked-filled",
  4904. "font_class": "locked-filled",
  4905. "unicode": "e668",
  4906. "unicode_decimal": 58984 },
  4907. {
  4908. "icon_id": "24855901",
  4909. "name": "info",
  4910. "font_class": "info",
  4911. "unicode": "e669",
  4912. "unicode_decimal": 58985 },
  4913. {
  4914. "icon_id": "24855903",
  4915. "name": "locked",
  4916. "font_class": "locked",
  4917. "unicode": "e66b",
  4918. "unicode_decimal": 58987 },
  4919. {
  4920. "icon_id": "24855884",
  4921. "name": "camera-filled",
  4922. "font_class": "camera-filled",
  4923. "unicode": "e658",
  4924. "unicode_decimal": 58968 },
  4925. {
  4926. "icon_id": "24855885",
  4927. "name": "chat-filled",
  4928. "font_class": "chat-filled",
  4929. "unicode": "e659",
  4930. "unicode_decimal": 58969 },
  4931. {
  4932. "icon_id": "24855886",
  4933. "name": "camera",
  4934. "font_class": "camera",
  4935. "unicode": "e65a",
  4936. "unicode_decimal": 58970 },
  4937. {
  4938. "icon_id": "24855887",
  4939. "name": "circle",
  4940. "font_class": "circle",
  4941. "unicode": "e65b",
  4942. "unicode_decimal": 58971 },
  4943. {
  4944. "icon_id": "24855888",
  4945. "name": "checkmarkempty",
  4946. "font_class": "checkmarkempty",
  4947. "unicode": "e65c",
  4948. "unicode_decimal": 58972 },
  4949. {
  4950. "icon_id": "24855889",
  4951. "name": "chat",
  4952. "font_class": "chat",
  4953. "unicode": "e65d",
  4954. "unicode_decimal": 58973 },
  4955. {
  4956. "icon_id": "24855890",
  4957. "name": "circle-filled",
  4958. "font_class": "circle-filled",
  4959. "unicode": "e65e",
  4960. "unicode_decimal": 58974 },
  4961. {
  4962. "icon_id": "24855891",
  4963. "name": "flag",
  4964. "font_class": "flag",
  4965. "unicode": "e65f",
  4966. "unicode_decimal": 58975 },
  4967. {
  4968. "icon_id": "24855892",
  4969. "name": "flag-filled",
  4970. "font_class": "flag-filled",
  4971. "unicode": "e660",
  4972. "unicode_decimal": 58976 },
  4973. {
  4974. "icon_id": "24855893",
  4975. "name": "gear-filled",
  4976. "font_class": "gear-filled",
  4977. "unicode": "e661",
  4978. "unicode_decimal": 58977 },
  4979. {
  4980. "icon_id": "24855894",
  4981. "name": "home",
  4982. "font_class": "home",
  4983. "unicode": "e662",
  4984. "unicode_decimal": 58978 },
  4985. {
  4986. "icon_id": "24855895",
  4987. "name": "home-filled",
  4988. "font_class": "home-filled",
  4989. "unicode": "e663",
  4990. "unicode_decimal": 58979 },
  4991. {
  4992. "icon_id": "24855896",
  4993. "name": "gear",
  4994. "font_class": "gear",
  4995. "unicode": "e664",
  4996. "unicode_decimal": 58980 },
  4997. {
  4998. "icon_id": "24855897",
  4999. "name": "smallcircle-filled",
  5000. "font_class": "smallcircle-filled",
  5001. "unicode": "e665",
  5002. "unicode_decimal": 58981 },
  5003. {
  5004. "icon_id": "24855898",
  5005. "name": "map-filled",
  5006. "font_class": "map-filled",
  5007. "unicode": "e666",
  5008. "unicode_decimal": 58982 },
  5009. {
  5010. "icon_id": "24855899",
  5011. "name": "map",
  5012. "font_class": "map",
  5013. "unicode": "e667",
  5014. "unicode_decimal": 58983 },
  5015. {
  5016. "icon_id": "24855825",
  5017. "name": "refresh-filled",
  5018. "font_class": "refresh-filled",
  5019. "unicode": "e656",
  5020. "unicode_decimal": 58966 },
  5021. {
  5022. "icon_id": "24855826",
  5023. "name": "refresh",
  5024. "font_class": "refresh",
  5025. "unicode": "e657",
  5026. "unicode_decimal": 58967 },
  5027. {
  5028. "icon_id": "24855808",
  5029. "name": "cloud-upload",
  5030. "font_class": "cloud-upload",
  5031. "unicode": "e645",
  5032. "unicode_decimal": 58949 },
  5033. {
  5034. "icon_id": "24855809",
  5035. "name": "cloud-download-filled",
  5036. "font_class": "cloud-download-filled",
  5037. "unicode": "e646",
  5038. "unicode_decimal": 58950 },
  5039. {
  5040. "icon_id": "24855810",
  5041. "name": "cloud-download",
  5042. "font_class": "cloud-download",
  5043. "unicode": "e647",
  5044. "unicode_decimal": 58951 },
  5045. {
  5046. "icon_id": "24855811",
  5047. "name": "cloud-upload-filled",
  5048. "font_class": "cloud-upload-filled",
  5049. "unicode": "e648",
  5050. "unicode_decimal": 58952 },
  5051. {
  5052. "icon_id": "24855813",
  5053. "name": "redo",
  5054. "font_class": "redo",
  5055. "unicode": "e64a",
  5056. "unicode_decimal": 58954 },
  5057. {
  5058. "icon_id": "24855814",
  5059. "name": "images-filled",
  5060. "font_class": "images-filled",
  5061. "unicode": "e64b",
  5062. "unicode_decimal": 58955 },
  5063. {
  5064. "icon_id": "24855815",
  5065. "name": "undo-filled",
  5066. "font_class": "undo-filled",
  5067. "unicode": "e64c",
  5068. "unicode_decimal": 58956 },
  5069. {
  5070. "icon_id": "24855816",
  5071. "name": "more",
  5072. "font_class": "more",
  5073. "unicode": "e64d",
  5074. "unicode_decimal": 58957 },
  5075. {
  5076. "icon_id": "24855817",
  5077. "name": "more-filled",
  5078. "font_class": "more-filled",
  5079. "unicode": "e64e",
  5080. "unicode_decimal": 58958 },
  5081. {
  5082. "icon_id": "24855818",
  5083. "name": "undo",
  5084. "font_class": "undo",
  5085. "unicode": "e64f",
  5086. "unicode_decimal": 58959 },
  5087. {
  5088. "icon_id": "24855819",
  5089. "name": "images",
  5090. "font_class": "images",
  5091. "unicode": "e650",
  5092. "unicode_decimal": 58960 },
  5093. {
  5094. "icon_id": "24855821",
  5095. "name": "paperclip",
  5096. "font_class": "paperclip",
  5097. "unicode": "e652",
  5098. "unicode_decimal": 58962 },
  5099. {
  5100. "icon_id": "24855822",
  5101. "name": "settings",
  5102. "font_class": "settings",
  5103. "unicode": "e653",
  5104. "unicode_decimal": 58963 },
  5105. {
  5106. "icon_id": "24855823",
  5107. "name": "search",
  5108. "font_class": "search",
  5109. "unicode": "e654",
  5110. "unicode_decimal": 58964 },
  5111. {
  5112. "icon_id": "24855824",
  5113. "name": "redo-filled",
  5114. "font_class": "redo-filled",
  5115. "unicode": "e655",
  5116. "unicode_decimal": 58965 },
  5117. {
  5118. "icon_id": "24841702",
  5119. "name": "list",
  5120. "font_class": "list",
  5121. "unicode": "e644",
  5122. "unicode_decimal": 58948 },
  5123. {
  5124. "icon_id": "24841489",
  5125. "name": "mail-open-filled",
  5126. "font_class": "mail-open-filled",
  5127. "unicode": "e63a",
  5128. "unicode_decimal": 58938 },
  5129. {
  5130. "icon_id": "24841491",
  5131. "name": "hand-thumbsdown-filled",
  5132. "font_class": "hand-down-filled",
  5133. "unicode": "e63c",
  5134. "unicode_decimal": 58940 },
  5135. {
  5136. "icon_id": "24841492",
  5137. "name": "hand-thumbsdown",
  5138. "font_class": "hand-down",
  5139. "unicode": "e63d",
  5140. "unicode_decimal": 58941 },
  5141. {
  5142. "icon_id": "24841493",
  5143. "name": "hand-thumbsup-filled",
  5144. "font_class": "hand-up-filled",
  5145. "unicode": "e63e",
  5146. "unicode_decimal": 58942 },
  5147. {
  5148. "icon_id": "24841494",
  5149. "name": "hand-thumbsup",
  5150. "font_class": "hand-up",
  5151. "unicode": "e63f",
  5152. "unicode_decimal": 58943 },
  5153. {
  5154. "icon_id": "24841496",
  5155. "name": "heart-filled",
  5156. "font_class": "heart-filled",
  5157. "unicode": "e641",
  5158. "unicode_decimal": 58945 },
  5159. {
  5160. "icon_id": "24841498",
  5161. "name": "mail-open",
  5162. "font_class": "mail-open",
  5163. "unicode": "e643",
  5164. "unicode_decimal": 58947 },
  5165. {
  5166. "icon_id": "24841488",
  5167. "name": "heart",
  5168. "font_class": "heart",
  5169. "unicode": "e639",
  5170. "unicode_decimal": 58937 },
  5171. {
  5172. "icon_id": "24839963",
  5173. "name": "loop",
  5174. "font_class": "loop",
  5175. "unicode": "e633",
  5176. "unicode_decimal": 58931 },
  5177. {
  5178. "icon_id": "24839866",
  5179. "name": "pulldown",
  5180. "font_class": "pulldown",
  5181. "unicode": "e632",
  5182. "unicode_decimal": 58930 },
  5183. {
  5184. "icon_id": "24813798",
  5185. "name": "scan",
  5186. "font_class": "scan",
  5187. "unicode": "e62a",
  5188. "unicode_decimal": 58922 },
  5189. {
  5190. "icon_id": "24813786",
  5191. "name": "bars",
  5192. "font_class": "bars",
  5193. "unicode": "e627",
  5194. "unicode_decimal": 58919 },
  5195. {
  5196. "icon_id": "24813788",
  5197. "name": "cart-filled",
  5198. "font_class": "cart-filled",
  5199. "unicode": "e629",
  5200. "unicode_decimal": 58921 },
  5201. {
  5202. "icon_id": "24813790",
  5203. "name": "checkbox",
  5204. "font_class": "checkbox",
  5205. "unicode": "e62b",
  5206. "unicode_decimal": 58923 },
  5207. {
  5208. "icon_id": "24813791",
  5209. "name": "checkbox-filled",
  5210. "font_class": "checkbox-filled",
  5211. "unicode": "e62c",
  5212. "unicode_decimal": 58924 },
  5213. {
  5214. "icon_id": "24813794",
  5215. "name": "shop",
  5216. "font_class": "shop",
  5217. "unicode": "e62f",
  5218. "unicode_decimal": 58927 },
  5219. {
  5220. "icon_id": "24813795",
  5221. "name": "headphones",
  5222. "font_class": "headphones",
  5223. "unicode": "e630",
  5224. "unicode_decimal": 58928 },
  5225. {
  5226. "icon_id": "24813796",
  5227. "name": "cart",
  5228. "font_class": "cart",
  5229. "unicode": "e631",
  5230. "unicode_decimal": 58929 }] };exports.default = _default;
  5231. /***/ }),
  5232. /***/ 4:
  5233. /*!******************************************************************************************!*\
  5234. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  5235. \******************************************************************************************/
  5236. /*! exports provided: default */
  5237. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  5238. "use strict";
  5239. __webpack_require__.r(__webpack_exports__);
  5240. /* WEBPACK VAR INJECTION */(function(global) {/*!
  5241. * Vue.js v2.6.11
  5242. * (c) 2014-2022 Evan You
  5243. * Released under the MIT License.
  5244. */
  5245. /* */
  5246. var emptyObject = Object.freeze({});
  5247. // These helpers produce better VM code in JS engines due to their
  5248. // explicitness and function inlining.
  5249. function isUndef (v) {
  5250. return v === undefined || v === null
  5251. }
  5252. function isDef (v) {
  5253. return v !== undefined && v !== null
  5254. }
  5255. function isTrue (v) {
  5256. return v === true
  5257. }
  5258. function isFalse (v) {
  5259. return v === false
  5260. }
  5261. /**
  5262. * Check if value is primitive.
  5263. */
  5264. function isPrimitive (value) {
  5265. return (
  5266. typeof value === 'string' ||
  5267. typeof value === 'number' ||
  5268. // $flow-disable-line
  5269. typeof value === 'symbol' ||
  5270. typeof value === 'boolean'
  5271. )
  5272. }
  5273. /**
  5274. * Quick object check - this is primarily used to tell
  5275. * Objects from primitive values when we know the value
  5276. * is a JSON-compliant type.
  5277. */
  5278. function isObject (obj) {
  5279. return obj !== null && typeof obj === 'object'
  5280. }
  5281. /**
  5282. * Get the raw type string of a value, e.g., [object Object].
  5283. */
  5284. var _toString = Object.prototype.toString;
  5285. function toRawType (value) {
  5286. return _toString.call(value).slice(8, -1)
  5287. }
  5288. /**
  5289. * Strict object type check. Only returns true
  5290. * for plain JavaScript objects.
  5291. */
  5292. function isPlainObject (obj) {
  5293. return _toString.call(obj) === '[object Object]'
  5294. }
  5295. function isRegExp (v) {
  5296. return _toString.call(v) === '[object RegExp]'
  5297. }
  5298. /**
  5299. * Check if val is a valid array index.
  5300. */
  5301. function isValidArrayIndex (val) {
  5302. var n = parseFloat(String(val));
  5303. return n >= 0 && Math.floor(n) === n && isFinite(val)
  5304. }
  5305. function isPromise (val) {
  5306. return (
  5307. isDef(val) &&
  5308. typeof val.then === 'function' &&
  5309. typeof val.catch === 'function'
  5310. )
  5311. }
  5312. /**
  5313. * Convert a value to a string that is actually rendered.
  5314. */
  5315. function toString (val) {
  5316. return val == null
  5317. ? ''
  5318. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  5319. ? JSON.stringify(val, null, 2)
  5320. : String(val)
  5321. }
  5322. /**
  5323. * Convert an input value to a number for persistence.
  5324. * If the conversion fails, return original string.
  5325. */
  5326. function toNumber (val) {
  5327. var n = parseFloat(val);
  5328. return isNaN(n) ? val : n
  5329. }
  5330. /**
  5331. * Make a map and return a function for checking if a key
  5332. * is in that map.
  5333. */
  5334. function makeMap (
  5335. str,
  5336. expectsLowerCase
  5337. ) {
  5338. var map = Object.create(null);
  5339. var list = str.split(',');
  5340. for (var i = 0; i < list.length; i++) {
  5341. map[list[i]] = true;
  5342. }
  5343. return expectsLowerCase
  5344. ? function (val) { return map[val.toLowerCase()]; }
  5345. : function (val) { return map[val]; }
  5346. }
  5347. /**
  5348. * Check if a tag is a built-in tag.
  5349. */
  5350. var isBuiltInTag = makeMap('slot,component', true);
  5351. /**
  5352. * Check if an attribute is a reserved attribute.
  5353. */
  5354. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  5355. /**
  5356. * Remove an item from an array.
  5357. */
  5358. function remove (arr, item) {
  5359. if (arr.length) {
  5360. var index = arr.indexOf(item);
  5361. if (index > -1) {
  5362. return arr.splice(index, 1)
  5363. }
  5364. }
  5365. }
  5366. /**
  5367. * Check whether an object has the property.
  5368. */
  5369. var hasOwnProperty = Object.prototype.hasOwnProperty;
  5370. function hasOwn (obj, key) {
  5371. return hasOwnProperty.call(obj, key)
  5372. }
  5373. /**
  5374. * Create a cached version of a pure function.
  5375. */
  5376. function cached (fn) {
  5377. var cache = Object.create(null);
  5378. return (function cachedFn (str) {
  5379. var hit = cache[str];
  5380. return hit || (cache[str] = fn(str))
  5381. })
  5382. }
  5383. /**
  5384. * Camelize a hyphen-delimited string.
  5385. */
  5386. var camelizeRE = /-(\w)/g;
  5387. var camelize = cached(function (str) {
  5388. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  5389. });
  5390. /**
  5391. * Capitalize a string.
  5392. */
  5393. var capitalize = cached(function (str) {
  5394. return str.charAt(0).toUpperCase() + str.slice(1)
  5395. });
  5396. /**
  5397. * Hyphenate a camelCase string.
  5398. */
  5399. var hyphenateRE = /\B([A-Z])/g;
  5400. var hyphenate = cached(function (str) {
  5401. return str.replace(hyphenateRE, '-$1').toLowerCase()
  5402. });
  5403. /**
  5404. * Simple bind polyfill for environments that do not support it,
  5405. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  5406. * since native bind is now performant enough in most browsers.
  5407. * But removing it would mean breaking code that was able to run in
  5408. * PhantomJS 1.x, so this must be kept for backward compatibility.
  5409. */
  5410. /* istanbul ignore next */
  5411. function polyfillBind (fn, ctx) {
  5412. function boundFn (a) {
  5413. var l = arguments.length;
  5414. return l
  5415. ? l > 1
  5416. ? fn.apply(ctx, arguments)
  5417. : fn.call(ctx, a)
  5418. : fn.call(ctx)
  5419. }
  5420. boundFn._length = fn.length;
  5421. return boundFn
  5422. }
  5423. function nativeBind (fn, ctx) {
  5424. return fn.bind(ctx)
  5425. }
  5426. var bind = Function.prototype.bind
  5427. ? nativeBind
  5428. : polyfillBind;
  5429. /**
  5430. * Convert an Array-like object to a real Array.
  5431. */
  5432. function toArray (list, start) {
  5433. start = start || 0;
  5434. var i = list.length - start;
  5435. var ret = new Array(i);
  5436. while (i--) {
  5437. ret[i] = list[i + start];
  5438. }
  5439. return ret
  5440. }
  5441. /**
  5442. * Mix properties into target object.
  5443. */
  5444. function extend (to, _from) {
  5445. for (var key in _from) {
  5446. to[key] = _from[key];
  5447. }
  5448. return to
  5449. }
  5450. /**
  5451. * Merge an Array of Objects into a single Object.
  5452. */
  5453. function toObject (arr) {
  5454. var res = {};
  5455. for (var i = 0; i < arr.length; i++) {
  5456. if (arr[i]) {
  5457. extend(res, arr[i]);
  5458. }
  5459. }
  5460. return res
  5461. }
  5462. /* eslint-disable no-unused-vars */
  5463. /**
  5464. * Perform no operation.
  5465. * Stubbing args to make Flow happy without leaving useless transpiled code
  5466. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  5467. */
  5468. function noop (a, b, c) {}
  5469. /**
  5470. * Always return false.
  5471. */
  5472. var no = function (a, b, c) { return false; };
  5473. /* eslint-enable no-unused-vars */
  5474. /**
  5475. * Return the same value.
  5476. */
  5477. var identity = function (_) { return _; };
  5478. /**
  5479. * Check if two values are loosely equal - that is,
  5480. * if they are plain objects, do they have the same shape?
  5481. */
  5482. function looseEqual (a, b) {
  5483. if (a === b) { return true }
  5484. var isObjectA = isObject(a);
  5485. var isObjectB = isObject(b);
  5486. if (isObjectA && isObjectB) {
  5487. try {
  5488. var isArrayA = Array.isArray(a);
  5489. var isArrayB = Array.isArray(b);
  5490. if (isArrayA && isArrayB) {
  5491. return a.length === b.length && a.every(function (e, i) {
  5492. return looseEqual(e, b[i])
  5493. })
  5494. } else if (a instanceof Date && b instanceof Date) {
  5495. return a.getTime() === b.getTime()
  5496. } else if (!isArrayA && !isArrayB) {
  5497. var keysA = Object.keys(a);
  5498. var keysB = Object.keys(b);
  5499. return keysA.length === keysB.length && keysA.every(function (key) {
  5500. return looseEqual(a[key], b[key])
  5501. })
  5502. } else {
  5503. /* istanbul ignore next */
  5504. return false
  5505. }
  5506. } catch (e) {
  5507. /* istanbul ignore next */
  5508. return false
  5509. }
  5510. } else if (!isObjectA && !isObjectB) {
  5511. return String(a) === String(b)
  5512. } else {
  5513. return false
  5514. }
  5515. }
  5516. /**
  5517. * Return the first index at which a loosely equal value can be
  5518. * found in the array (if value is a plain object, the array must
  5519. * contain an object of the same shape), or -1 if it is not present.
  5520. */
  5521. function looseIndexOf (arr, val) {
  5522. for (var i = 0; i < arr.length; i++) {
  5523. if (looseEqual(arr[i], val)) { return i }
  5524. }
  5525. return -1
  5526. }
  5527. /**
  5528. * Ensure a function is called only once.
  5529. */
  5530. function once (fn) {
  5531. var called = false;
  5532. return function () {
  5533. if (!called) {
  5534. called = true;
  5535. fn.apply(this, arguments);
  5536. }
  5537. }
  5538. }
  5539. var ASSET_TYPES = [
  5540. 'component',
  5541. 'directive',
  5542. 'filter'
  5543. ];
  5544. var LIFECYCLE_HOOKS = [
  5545. 'beforeCreate',
  5546. 'created',
  5547. 'beforeMount',
  5548. 'mounted',
  5549. 'beforeUpdate',
  5550. 'updated',
  5551. 'beforeDestroy',
  5552. 'destroyed',
  5553. 'activated',
  5554. 'deactivated',
  5555. 'errorCaptured',
  5556. 'serverPrefetch'
  5557. ];
  5558. /* */
  5559. var config = ({
  5560. /**
  5561. * Option merge strategies (used in core/util/options)
  5562. */
  5563. // $flow-disable-line
  5564. optionMergeStrategies: Object.create(null),
  5565. /**
  5566. * Whether to suppress warnings.
  5567. */
  5568. silent: false,
  5569. /**
  5570. * Show production mode tip message on boot?
  5571. */
  5572. productionTip: "development" !== 'production',
  5573. /**
  5574. * Whether to enable devtools
  5575. */
  5576. devtools: "development" !== 'production',
  5577. /**
  5578. * Whether to record perf
  5579. */
  5580. performance: false,
  5581. /**
  5582. * Error handler for watcher errors
  5583. */
  5584. errorHandler: null,
  5585. /**
  5586. * Warn handler for watcher warns
  5587. */
  5588. warnHandler: null,
  5589. /**
  5590. * Ignore certain custom elements
  5591. */
  5592. ignoredElements: [],
  5593. /**
  5594. * Custom user key aliases for v-on
  5595. */
  5596. // $flow-disable-line
  5597. keyCodes: Object.create(null),
  5598. /**
  5599. * Check if a tag is reserved so that it cannot be registered as a
  5600. * component. This is platform-dependent and may be overwritten.
  5601. */
  5602. isReservedTag: no,
  5603. /**
  5604. * Check if an attribute is reserved so that it cannot be used as a component
  5605. * prop. This is platform-dependent and may be overwritten.
  5606. */
  5607. isReservedAttr: no,
  5608. /**
  5609. * Check if a tag is an unknown element.
  5610. * Platform-dependent.
  5611. */
  5612. isUnknownElement: no,
  5613. /**
  5614. * Get the namespace of an element
  5615. */
  5616. getTagNamespace: noop,
  5617. /**
  5618. * Parse the real tag name for the specific platform.
  5619. */
  5620. parsePlatformTagName: identity,
  5621. /**
  5622. * Check if an attribute must be bound using property, e.g. value
  5623. * Platform-dependent.
  5624. */
  5625. mustUseProp: no,
  5626. /**
  5627. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  5628. * This will significantly reduce performance if set to false.
  5629. */
  5630. async: true,
  5631. /**
  5632. * Exposed for legacy reasons
  5633. */
  5634. _lifecycleHooks: LIFECYCLE_HOOKS
  5635. });
  5636. /* */
  5637. /**
  5638. * unicode letters used for parsing html tags, component names and property paths.
  5639. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  5640. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  5641. */
  5642. 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/;
  5643. /**
  5644. * Check if a string starts with $ or _
  5645. */
  5646. function isReserved (str) {
  5647. var c = (str + '').charCodeAt(0);
  5648. return c === 0x24 || c === 0x5F
  5649. }
  5650. /**
  5651. * Define a property.
  5652. */
  5653. function def (obj, key, val, enumerable) {
  5654. Object.defineProperty(obj, key, {
  5655. value: val,
  5656. enumerable: !!enumerable,
  5657. writable: true,
  5658. configurable: true
  5659. });
  5660. }
  5661. /**
  5662. * Parse simple path.
  5663. */
  5664. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  5665. function parsePath (path) {
  5666. if (bailRE.test(path)) {
  5667. return
  5668. }
  5669. var segments = path.split('.');
  5670. return function (obj) {
  5671. for (var i = 0; i < segments.length; i++) {
  5672. if (!obj) { return }
  5673. obj = obj[segments[i]];
  5674. }
  5675. return obj
  5676. }
  5677. }
  5678. /* */
  5679. // can we use __proto__?
  5680. var hasProto = '__proto__' in {};
  5681. // Browser environment sniffing
  5682. var inBrowser = typeof window !== 'undefined';
  5683. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  5684. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  5685. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  5686. var isIE = UA && /msie|trident/.test(UA);
  5687. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  5688. var isEdge = UA && UA.indexOf('edge/') > 0;
  5689. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  5690. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  5691. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  5692. var isPhantomJS = UA && /phantomjs/.test(UA);
  5693. var isFF = UA && UA.match(/firefox\/(\d+)/);
  5694. // Firefox has a "watch" function on Object.prototype...
  5695. var nativeWatch = ({}).watch;
  5696. if (inBrowser) {
  5697. try {
  5698. var opts = {};
  5699. Object.defineProperty(opts, 'passive', ({
  5700. get: function get () {
  5701. }
  5702. })); // https://github.com/facebook/flow/issues/285
  5703. window.addEventListener('test-passive', null, opts);
  5704. } catch (e) {}
  5705. }
  5706. // this needs to be lazy-evaled because vue may be required before
  5707. // vue-server-renderer can set VUE_ENV
  5708. var _isServer;
  5709. var isServerRendering = function () {
  5710. if (_isServer === undefined) {
  5711. /* istanbul ignore if */
  5712. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  5713. // detect presence of vue-server-renderer and avoid
  5714. // Webpack shimming the process
  5715. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  5716. } else {
  5717. _isServer = false;
  5718. }
  5719. }
  5720. return _isServer
  5721. };
  5722. // detect devtools
  5723. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  5724. /* istanbul ignore next */
  5725. function isNative (Ctor) {
  5726. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  5727. }
  5728. var hasSymbol =
  5729. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  5730. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  5731. var _Set;
  5732. /* istanbul ignore if */ // $flow-disable-line
  5733. if (typeof Set !== 'undefined' && isNative(Set)) {
  5734. // use native Set when available.
  5735. _Set = Set;
  5736. } else {
  5737. // a non-standard Set polyfill that only works with primitive keys.
  5738. _Set = /*@__PURE__*/(function () {
  5739. function Set () {
  5740. this.set = Object.create(null);
  5741. }
  5742. Set.prototype.has = function has (key) {
  5743. return this.set[key] === true
  5744. };
  5745. Set.prototype.add = function add (key) {
  5746. this.set[key] = true;
  5747. };
  5748. Set.prototype.clear = function clear () {
  5749. this.set = Object.create(null);
  5750. };
  5751. return Set;
  5752. }());
  5753. }
  5754. /* */
  5755. var warn = noop;
  5756. var tip = noop;
  5757. var generateComponentTrace = (noop); // work around flow check
  5758. var formatComponentName = (noop);
  5759. if (true) {
  5760. var hasConsole = typeof console !== 'undefined';
  5761. var classifyRE = /(?:^|[-_])(\w)/g;
  5762. var classify = function (str) { return str
  5763. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  5764. .replace(/[-_]/g, ''); };
  5765. warn = function (msg, vm) {
  5766. var trace = vm ? generateComponentTrace(vm) : '';
  5767. if (config.warnHandler) {
  5768. config.warnHandler.call(null, msg, vm, trace);
  5769. } else if (hasConsole && (!config.silent)) {
  5770. console.error(("[Vue warn]: " + msg + trace));
  5771. }
  5772. };
  5773. tip = function (msg, vm) {
  5774. if (hasConsole && (!config.silent)) {
  5775. console.warn("[Vue tip]: " + msg + (
  5776. vm ? generateComponentTrace(vm) : ''
  5777. ));
  5778. }
  5779. };
  5780. formatComponentName = function (vm, includeFile) {
  5781. if (vm.$root === vm) {
  5782. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  5783. return ('') + vm.$options.__file
  5784. }
  5785. return '<Root>'
  5786. }
  5787. var options = typeof vm === 'function' && vm.cid != null
  5788. ? vm.options
  5789. : vm._isVue
  5790. ? vm.$options || vm.constructor.options
  5791. : vm;
  5792. var name = options.name || options._componentTag;
  5793. var file = options.__file;
  5794. if (!name && file) {
  5795. var match = file.match(/([^/\\]+)\.vue$/);
  5796. name = match && match[1];
  5797. }
  5798. return (
  5799. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  5800. (file && includeFile !== false ? (" at " + file) : '')
  5801. )
  5802. };
  5803. var repeat = function (str, n) {
  5804. var res = '';
  5805. while (n) {
  5806. if (n % 2 === 1) { res += str; }
  5807. if (n > 1) { str += str; }
  5808. n >>= 1;
  5809. }
  5810. return res
  5811. };
  5812. generateComponentTrace = function (vm) {
  5813. if (vm._isVue && vm.$parent) {
  5814. var tree = [];
  5815. var currentRecursiveSequence = 0;
  5816. while (vm && vm.$options.name !== 'PageBody') {
  5817. if (tree.length > 0) {
  5818. var last = tree[tree.length - 1];
  5819. if (last.constructor === vm.constructor) {
  5820. currentRecursiveSequence++;
  5821. vm = vm.$parent;
  5822. continue
  5823. } else if (currentRecursiveSequence > 0) {
  5824. tree[tree.length - 1] = [last, currentRecursiveSequence];
  5825. currentRecursiveSequence = 0;
  5826. }
  5827. }
  5828. !vm.$options.isReserved && tree.push(vm);
  5829. vm = vm.$parent;
  5830. }
  5831. return '\n\nfound in\n\n' + tree
  5832. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  5833. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  5834. : formatComponentName(vm))); })
  5835. .join('\n')
  5836. } else {
  5837. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  5838. }
  5839. };
  5840. }
  5841. /* */
  5842. var uid = 0;
  5843. /**
  5844. * A dep is an observable that can have multiple
  5845. * directives subscribing to it.
  5846. */
  5847. var Dep = function Dep () {
  5848. this.id = uid++;
  5849. this.subs = [];
  5850. };
  5851. Dep.prototype.addSub = function addSub (sub) {
  5852. this.subs.push(sub);
  5853. };
  5854. Dep.prototype.removeSub = function removeSub (sub) {
  5855. remove(this.subs, sub);
  5856. };
  5857. Dep.prototype.depend = function depend () {
  5858. if (Dep.SharedObject.target) {
  5859. Dep.SharedObject.target.addDep(this);
  5860. }
  5861. };
  5862. Dep.prototype.notify = function notify () {
  5863. // stabilize the subscriber list first
  5864. var subs = this.subs.slice();
  5865. if ( true && !config.async) {
  5866. // subs aren't sorted in scheduler if not running async
  5867. // we need to sort them now to make sure they fire in correct
  5868. // order
  5869. subs.sort(function (a, b) { return a.id - b.id; });
  5870. }
  5871. for (var i = 0, l = subs.length; i < l; i++) {
  5872. subs[i].update();
  5873. }
  5874. };
  5875. // The current target watcher being evaluated.
  5876. // This is globally unique because only one watcher
  5877. // can be evaluated at a time.
  5878. // fixed by xxxxxx (nvue shared vuex)
  5879. /* eslint-disable no-undef */
  5880. Dep.SharedObject = {};
  5881. Dep.SharedObject.target = null;
  5882. Dep.SharedObject.targetStack = [];
  5883. function pushTarget (target) {
  5884. Dep.SharedObject.targetStack.push(target);
  5885. Dep.SharedObject.target = target;
  5886. Dep.target = target;
  5887. }
  5888. function popTarget () {
  5889. Dep.SharedObject.targetStack.pop();
  5890. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  5891. Dep.target = Dep.SharedObject.target;
  5892. }
  5893. /* */
  5894. var VNode = function VNode (
  5895. tag,
  5896. data,
  5897. children,
  5898. text,
  5899. elm,
  5900. context,
  5901. componentOptions,
  5902. asyncFactory
  5903. ) {
  5904. this.tag = tag;
  5905. this.data = data;
  5906. this.children = children;
  5907. this.text = text;
  5908. this.elm = elm;
  5909. this.ns = undefined;
  5910. this.context = context;
  5911. this.fnContext = undefined;
  5912. this.fnOptions = undefined;
  5913. this.fnScopeId = undefined;
  5914. this.key = data && data.key;
  5915. this.componentOptions = componentOptions;
  5916. this.componentInstance = undefined;
  5917. this.parent = undefined;
  5918. this.raw = false;
  5919. this.isStatic = false;
  5920. this.isRootInsert = true;
  5921. this.isComment = false;
  5922. this.isCloned = false;
  5923. this.isOnce = false;
  5924. this.asyncFactory = asyncFactory;
  5925. this.asyncMeta = undefined;
  5926. this.isAsyncPlaceholder = false;
  5927. };
  5928. var prototypeAccessors = { child: { configurable: true } };
  5929. // DEPRECATED: alias for componentInstance for backwards compat.
  5930. /* istanbul ignore next */
  5931. prototypeAccessors.child.get = function () {
  5932. return this.componentInstance
  5933. };
  5934. Object.defineProperties( VNode.prototype, prototypeAccessors );
  5935. var createEmptyVNode = function (text) {
  5936. if ( text === void 0 ) text = '';
  5937. var node = new VNode();
  5938. node.text = text;
  5939. node.isComment = true;
  5940. return node
  5941. };
  5942. function createTextVNode (val) {
  5943. return new VNode(undefined, undefined, undefined, String(val))
  5944. }
  5945. // optimized shallow clone
  5946. // used for static nodes and slot nodes because they may be reused across
  5947. // multiple renders, cloning them avoids errors when DOM manipulations rely
  5948. // on their elm reference.
  5949. function cloneVNode (vnode) {
  5950. var cloned = new VNode(
  5951. vnode.tag,
  5952. vnode.data,
  5953. // #7975
  5954. // clone children array to avoid mutating original in case of cloning
  5955. // a child.
  5956. vnode.children && vnode.children.slice(),
  5957. vnode.text,
  5958. vnode.elm,
  5959. vnode.context,
  5960. vnode.componentOptions,
  5961. vnode.asyncFactory
  5962. );
  5963. cloned.ns = vnode.ns;
  5964. cloned.isStatic = vnode.isStatic;
  5965. cloned.key = vnode.key;
  5966. cloned.isComment = vnode.isComment;
  5967. cloned.fnContext = vnode.fnContext;
  5968. cloned.fnOptions = vnode.fnOptions;
  5969. cloned.fnScopeId = vnode.fnScopeId;
  5970. cloned.asyncMeta = vnode.asyncMeta;
  5971. cloned.isCloned = true;
  5972. return cloned
  5973. }
  5974. /*
  5975. * not type checking this file because flow doesn't play well with
  5976. * dynamically accessing methods on Array prototype
  5977. */
  5978. var arrayProto = Array.prototype;
  5979. var arrayMethods = Object.create(arrayProto);
  5980. var methodsToPatch = [
  5981. 'push',
  5982. 'pop',
  5983. 'shift',
  5984. 'unshift',
  5985. 'splice',
  5986. 'sort',
  5987. 'reverse'
  5988. ];
  5989. /**
  5990. * Intercept mutating methods and emit events
  5991. */
  5992. methodsToPatch.forEach(function (method) {
  5993. // cache original method
  5994. var original = arrayProto[method];
  5995. def(arrayMethods, method, function mutator () {
  5996. var args = [], len = arguments.length;
  5997. while ( len-- ) args[ len ] = arguments[ len ];
  5998. var result = original.apply(this, args);
  5999. var ob = this.__ob__;
  6000. var inserted;
  6001. switch (method) {
  6002. case 'push':
  6003. case 'unshift':
  6004. inserted = args;
  6005. break
  6006. case 'splice':
  6007. inserted = args.slice(2);
  6008. break
  6009. }
  6010. if (inserted) { ob.observeArray(inserted); }
  6011. // notify change
  6012. ob.dep.notify();
  6013. return result
  6014. });
  6015. });
  6016. /* */
  6017. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  6018. /**
  6019. * In some cases we may want to disable observation inside a component's
  6020. * update computation.
  6021. */
  6022. var shouldObserve = true;
  6023. function toggleObserving (value) {
  6024. shouldObserve = value;
  6025. }
  6026. /**
  6027. * Observer class that is attached to each observed
  6028. * object. Once attached, the observer converts the target
  6029. * object's property keys into getter/setters that
  6030. * collect dependencies and dispatch updates.
  6031. */
  6032. var Observer = function Observer (value) {
  6033. this.value = value;
  6034. this.dep = new Dep();
  6035. this.vmCount = 0;
  6036. def(value, '__ob__', this);
  6037. if (Array.isArray(value)) {
  6038. if (hasProto) {
  6039. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  6040. if(value.push !== value.__proto__.push){
  6041. copyAugment(value, arrayMethods, arrayKeys);
  6042. } else {
  6043. protoAugment(value, arrayMethods);
  6044. }
  6045. }
  6046. } else {
  6047. copyAugment(value, arrayMethods, arrayKeys);
  6048. }
  6049. this.observeArray(value);
  6050. } else {
  6051. this.walk(value);
  6052. }
  6053. };
  6054. /**
  6055. * Walk through all properties and convert them into
  6056. * getter/setters. This method should only be called when
  6057. * value type is Object.
  6058. */
  6059. Observer.prototype.walk = function walk (obj) {
  6060. var keys = Object.keys(obj);
  6061. for (var i = 0; i < keys.length; i++) {
  6062. defineReactive$$1(obj, keys[i]);
  6063. }
  6064. };
  6065. /**
  6066. * Observe a list of Array items.
  6067. */
  6068. Observer.prototype.observeArray = function observeArray (items) {
  6069. for (var i = 0, l = items.length; i < l; i++) {
  6070. observe(items[i]);
  6071. }
  6072. };
  6073. // helpers
  6074. /**
  6075. * Augment a target Object or Array by intercepting
  6076. * the prototype chain using __proto__
  6077. */
  6078. function protoAugment (target, src) {
  6079. /* eslint-disable no-proto */
  6080. target.__proto__ = src;
  6081. /* eslint-enable no-proto */
  6082. }
  6083. /**
  6084. * Augment a target Object or Array by defining
  6085. * hidden properties.
  6086. */
  6087. /* istanbul ignore next */
  6088. function copyAugment (target, src, keys) {
  6089. for (var i = 0, l = keys.length; i < l; i++) {
  6090. var key = keys[i];
  6091. def(target, key, src[key]);
  6092. }
  6093. }
  6094. /**
  6095. * Attempt to create an observer instance for a value,
  6096. * returns the new observer if successfully observed,
  6097. * or the existing observer if the value already has one.
  6098. */
  6099. function observe (value, asRootData) {
  6100. if (!isObject(value) || value instanceof VNode) {
  6101. return
  6102. }
  6103. var ob;
  6104. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  6105. ob = value.__ob__;
  6106. } else if (
  6107. shouldObserve &&
  6108. !isServerRendering() &&
  6109. (Array.isArray(value) || isPlainObject(value)) &&
  6110. Object.isExtensible(value) &&
  6111. !value._isVue
  6112. ) {
  6113. ob = new Observer(value);
  6114. }
  6115. if (asRootData && ob) {
  6116. ob.vmCount++;
  6117. }
  6118. return ob
  6119. }
  6120. /**
  6121. * Define a reactive property on an Object.
  6122. */
  6123. function defineReactive$$1 (
  6124. obj,
  6125. key,
  6126. val,
  6127. customSetter,
  6128. shallow
  6129. ) {
  6130. var dep = new Dep();
  6131. var property = Object.getOwnPropertyDescriptor(obj, key);
  6132. if (property && property.configurable === false) {
  6133. return
  6134. }
  6135. // cater for pre-defined getter/setters
  6136. var getter = property && property.get;
  6137. var setter = property && property.set;
  6138. if ((!getter || setter) && arguments.length === 2) {
  6139. val = obj[key];
  6140. }
  6141. var childOb = !shallow && observe(val);
  6142. Object.defineProperty(obj, key, {
  6143. enumerable: true,
  6144. configurable: true,
  6145. get: function reactiveGetter () {
  6146. var value = getter ? getter.call(obj) : val;
  6147. if (Dep.SharedObject.target) { // fixed by xxxxxx
  6148. dep.depend();
  6149. if (childOb) {
  6150. childOb.dep.depend();
  6151. if (Array.isArray(value)) {
  6152. dependArray(value);
  6153. }
  6154. }
  6155. }
  6156. return value
  6157. },
  6158. set: function reactiveSetter (newVal) {
  6159. var value = getter ? getter.call(obj) : val;
  6160. /* eslint-disable no-self-compare */
  6161. if (newVal === value || (newVal !== newVal && value !== value)) {
  6162. return
  6163. }
  6164. /* eslint-enable no-self-compare */
  6165. if ( true && customSetter) {
  6166. customSetter();
  6167. }
  6168. // #7981: for accessor properties without setter
  6169. if (getter && !setter) { return }
  6170. if (setter) {
  6171. setter.call(obj, newVal);
  6172. } else {
  6173. val = newVal;
  6174. }
  6175. childOb = !shallow && observe(newVal);
  6176. dep.notify();
  6177. }
  6178. });
  6179. }
  6180. /**
  6181. * Set a property on an object. Adds the new property and
  6182. * triggers change notification if the property doesn't
  6183. * already exist.
  6184. */
  6185. function set (target, key, val) {
  6186. if ( true &&
  6187. (isUndef(target) || isPrimitive(target))
  6188. ) {
  6189. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  6190. }
  6191. if (Array.isArray(target) && isValidArrayIndex(key)) {
  6192. target.length = Math.max(target.length, key);
  6193. target.splice(key, 1, val);
  6194. return val
  6195. }
  6196. if (key in target && !(key in Object.prototype)) {
  6197. target[key] = val;
  6198. return val
  6199. }
  6200. var ob = (target).__ob__;
  6201. if (target._isVue || (ob && ob.vmCount)) {
  6202. true && warn(
  6203. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  6204. 'at runtime - declare it upfront in the data option.'
  6205. );
  6206. return val
  6207. }
  6208. if (!ob) {
  6209. target[key] = val;
  6210. return val
  6211. }
  6212. defineReactive$$1(ob.value, key, val);
  6213. ob.dep.notify();
  6214. return val
  6215. }
  6216. /**
  6217. * Delete a property and trigger change if necessary.
  6218. */
  6219. function del (target, key) {
  6220. if ( true &&
  6221. (isUndef(target) || isPrimitive(target))
  6222. ) {
  6223. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  6224. }
  6225. if (Array.isArray(target) && isValidArrayIndex(key)) {
  6226. target.splice(key, 1);
  6227. return
  6228. }
  6229. var ob = (target).__ob__;
  6230. if (target._isVue || (ob && ob.vmCount)) {
  6231. true && warn(
  6232. 'Avoid deleting properties on a Vue instance or its root $data ' +
  6233. '- just set it to null.'
  6234. );
  6235. return
  6236. }
  6237. if (!hasOwn(target, key)) {
  6238. return
  6239. }
  6240. delete target[key];
  6241. if (!ob) {
  6242. return
  6243. }
  6244. ob.dep.notify();
  6245. }
  6246. /**
  6247. * Collect dependencies on array elements when the array is touched, since
  6248. * we cannot intercept array element access like property getters.
  6249. */
  6250. function dependArray (value) {
  6251. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  6252. e = value[i];
  6253. e && e.__ob__ && e.__ob__.dep.depend();
  6254. if (Array.isArray(e)) {
  6255. dependArray(e);
  6256. }
  6257. }
  6258. }
  6259. /* */
  6260. /**
  6261. * Option overwriting strategies are functions that handle
  6262. * how to merge a parent option value and a child option
  6263. * value into the final value.
  6264. */
  6265. var strats = config.optionMergeStrategies;
  6266. /**
  6267. * Options with restrictions
  6268. */
  6269. if (true) {
  6270. strats.el = strats.propsData = function (parent, child, vm, key) {
  6271. if (!vm) {
  6272. warn(
  6273. "option \"" + key + "\" can only be used during instance " +
  6274. 'creation with the `new` keyword.'
  6275. );
  6276. }
  6277. return defaultStrat(parent, child)
  6278. };
  6279. }
  6280. /**
  6281. * Helper that recursively merges two data objects together.
  6282. */
  6283. function mergeData (to, from) {
  6284. if (!from) { return to }
  6285. var key, toVal, fromVal;
  6286. var keys = hasSymbol
  6287. ? Reflect.ownKeys(from)
  6288. : Object.keys(from);
  6289. for (var i = 0; i < keys.length; i++) {
  6290. key = keys[i];
  6291. // in case the object is already observed...
  6292. if (key === '__ob__') { continue }
  6293. toVal = to[key];
  6294. fromVal = from[key];
  6295. if (!hasOwn(to, key)) {
  6296. set(to, key, fromVal);
  6297. } else if (
  6298. toVal !== fromVal &&
  6299. isPlainObject(toVal) &&
  6300. isPlainObject(fromVal)
  6301. ) {
  6302. mergeData(toVal, fromVal);
  6303. }
  6304. }
  6305. return to
  6306. }
  6307. /**
  6308. * Data
  6309. */
  6310. function mergeDataOrFn (
  6311. parentVal,
  6312. childVal,
  6313. vm
  6314. ) {
  6315. if (!vm) {
  6316. // in a Vue.extend merge, both should be functions
  6317. if (!childVal) {
  6318. return parentVal
  6319. }
  6320. if (!parentVal) {
  6321. return childVal
  6322. }
  6323. // when parentVal & childVal are both present,
  6324. // we need to return a function that returns the
  6325. // merged result of both functions... no need to
  6326. // check if parentVal is a function here because
  6327. // it has to be a function to pass previous merges.
  6328. return function mergedDataFn () {
  6329. return mergeData(
  6330. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  6331. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  6332. )
  6333. }
  6334. } else {
  6335. return function mergedInstanceDataFn () {
  6336. // instance merge
  6337. var instanceData = typeof childVal === 'function'
  6338. ? childVal.call(vm, vm)
  6339. : childVal;
  6340. var defaultData = typeof parentVal === 'function'
  6341. ? parentVal.call(vm, vm)
  6342. : parentVal;
  6343. if (instanceData) {
  6344. return mergeData(instanceData, defaultData)
  6345. } else {
  6346. return defaultData
  6347. }
  6348. }
  6349. }
  6350. }
  6351. strats.data = function (
  6352. parentVal,
  6353. childVal,
  6354. vm
  6355. ) {
  6356. if (!vm) {
  6357. if (childVal && typeof childVal !== 'function') {
  6358. true && warn(
  6359. 'The "data" option should be a function ' +
  6360. 'that returns a per-instance value in component ' +
  6361. 'definitions.',
  6362. vm
  6363. );
  6364. return parentVal
  6365. }
  6366. return mergeDataOrFn(parentVal, childVal)
  6367. }
  6368. return mergeDataOrFn(parentVal, childVal, vm)
  6369. };
  6370. /**
  6371. * Hooks and props are merged as arrays.
  6372. */
  6373. function mergeHook (
  6374. parentVal,
  6375. childVal
  6376. ) {
  6377. var res = childVal
  6378. ? parentVal
  6379. ? parentVal.concat(childVal)
  6380. : Array.isArray(childVal)
  6381. ? childVal
  6382. : [childVal]
  6383. : parentVal;
  6384. return res
  6385. ? dedupeHooks(res)
  6386. : res
  6387. }
  6388. function dedupeHooks (hooks) {
  6389. var res = [];
  6390. for (var i = 0; i < hooks.length; i++) {
  6391. if (res.indexOf(hooks[i]) === -1) {
  6392. res.push(hooks[i]);
  6393. }
  6394. }
  6395. return res
  6396. }
  6397. LIFECYCLE_HOOKS.forEach(function (hook) {
  6398. strats[hook] = mergeHook;
  6399. });
  6400. /**
  6401. * Assets
  6402. *
  6403. * When a vm is present (instance creation), we need to do
  6404. * a three-way merge between constructor options, instance
  6405. * options and parent options.
  6406. */
  6407. function mergeAssets (
  6408. parentVal,
  6409. childVal,
  6410. vm,
  6411. key
  6412. ) {
  6413. var res = Object.create(parentVal || null);
  6414. if (childVal) {
  6415. true && assertObjectType(key, childVal, vm);
  6416. return extend(res, childVal)
  6417. } else {
  6418. return res
  6419. }
  6420. }
  6421. ASSET_TYPES.forEach(function (type) {
  6422. strats[type + 's'] = mergeAssets;
  6423. });
  6424. /**
  6425. * Watchers.
  6426. *
  6427. * Watchers hashes should not overwrite one
  6428. * another, so we merge them as arrays.
  6429. */
  6430. strats.watch = function (
  6431. parentVal,
  6432. childVal,
  6433. vm,
  6434. key
  6435. ) {
  6436. // work around Firefox's Object.prototype.watch...
  6437. if (parentVal === nativeWatch) { parentVal = undefined; }
  6438. if (childVal === nativeWatch) { childVal = undefined; }
  6439. /* istanbul ignore if */
  6440. if (!childVal) { return Object.create(parentVal || null) }
  6441. if (true) {
  6442. assertObjectType(key, childVal, vm);
  6443. }
  6444. if (!parentVal) { return childVal }
  6445. var ret = {};
  6446. extend(ret, parentVal);
  6447. for (var key$1 in childVal) {
  6448. var parent = ret[key$1];
  6449. var child = childVal[key$1];
  6450. if (parent && !Array.isArray(parent)) {
  6451. parent = [parent];
  6452. }
  6453. ret[key$1] = parent
  6454. ? parent.concat(child)
  6455. : Array.isArray(child) ? child : [child];
  6456. }
  6457. return ret
  6458. };
  6459. /**
  6460. * Other object hashes.
  6461. */
  6462. strats.props =
  6463. strats.methods =
  6464. strats.inject =
  6465. strats.computed = function (
  6466. parentVal,
  6467. childVal,
  6468. vm,
  6469. key
  6470. ) {
  6471. if (childVal && "development" !== 'production') {
  6472. assertObjectType(key, childVal, vm);
  6473. }
  6474. if (!parentVal) { return childVal }
  6475. var ret = Object.create(null);
  6476. extend(ret, parentVal);
  6477. if (childVal) { extend(ret, childVal); }
  6478. return ret
  6479. };
  6480. strats.provide = mergeDataOrFn;
  6481. /**
  6482. * Default strategy.
  6483. */
  6484. var defaultStrat = function (parentVal, childVal) {
  6485. return childVal === undefined
  6486. ? parentVal
  6487. : childVal
  6488. };
  6489. /**
  6490. * Validate component names
  6491. */
  6492. function checkComponents (options) {
  6493. for (var key in options.components) {
  6494. validateComponentName(key);
  6495. }
  6496. }
  6497. function validateComponentName (name) {
  6498. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  6499. warn(
  6500. 'Invalid component name: "' + name + '". Component names ' +
  6501. 'should conform to valid custom element name in html5 specification.'
  6502. );
  6503. }
  6504. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  6505. warn(
  6506. 'Do not use built-in or reserved HTML elements as component ' +
  6507. 'id: ' + name
  6508. );
  6509. }
  6510. }
  6511. /**
  6512. * Ensure all props option syntax are normalized into the
  6513. * Object-based format.
  6514. */
  6515. function normalizeProps (options, vm) {
  6516. var props = options.props;
  6517. if (!props) { return }
  6518. var res = {};
  6519. var i, val, name;
  6520. if (Array.isArray(props)) {
  6521. i = props.length;
  6522. while (i--) {
  6523. val = props[i];
  6524. if (typeof val === 'string') {
  6525. name = camelize(val);
  6526. res[name] = { type: null };
  6527. } else if (true) {
  6528. warn('props must be strings when using array syntax.');
  6529. }
  6530. }
  6531. } else if (isPlainObject(props)) {
  6532. for (var key in props) {
  6533. val = props[key];
  6534. name = camelize(key);
  6535. res[name] = isPlainObject(val)
  6536. ? val
  6537. : { type: val };
  6538. }
  6539. } else if (true) {
  6540. warn(
  6541. "Invalid value for option \"props\": expected an Array or an Object, " +
  6542. "but got " + (toRawType(props)) + ".",
  6543. vm
  6544. );
  6545. }
  6546. options.props = res;
  6547. }
  6548. /**
  6549. * Normalize all injections into Object-based format
  6550. */
  6551. function normalizeInject (options, vm) {
  6552. var inject = options.inject;
  6553. if (!inject) { return }
  6554. var normalized = options.inject = {};
  6555. if (Array.isArray(inject)) {
  6556. for (var i = 0; i < inject.length; i++) {
  6557. normalized[inject[i]] = { from: inject[i] };
  6558. }
  6559. } else if (isPlainObject(inject)) {
  6560. for (var key in inject) {
  6561. var val = inject[key];
  6562. normalized[key] = isPlainObject(val)
  6563. ? extend({ from: key }, val)
  6564. : { from: val };
  6565. }
  6566. } else if (true) {
  6567. warn(
  6568. "Invalid value for option \"inject\": expected an Array or an Object, " +
  6569. "but got " + (toRawType(inject)) + ".",
  6570. vm
  6571. );
  6572. }
  6573. }
  6574. /**
  6575. * Normalize raw function directives into object format.
  6576. */
  6577. function normalizeDirectives (options) {
  6578. var dirs = options.directives;
  6579. if (dirs) {
  6580. for (var key in dirs) {
  6581. var def$$1 = dirs[key];
  6582. if (typeof def$$1 === 'function') {
  6583. dirs[key] = { bind: def$$1, update: def$$1 };
  6584. }
  6585. }
  6586. }
  6587. }
  6588. function assertObjectType (name, value, vm) {
  6589. if (!isPlainObject(value)) {
  6590. warn(
  6591. "Invalid value for option \"" + name + "\": expected an Object, " +
  6592. "but got " + (toRawType(value)) + ".",
  6593. vm
  6594. );
  6595. }
  6596. }
  6597. /**
  6598. * Merge two option objects into a new one.
  6599. * Core utility used in both instantiation and inheritance.
  6600. */
  6601. function mergeOptions (
  6602. parent,
  6603. child,
  6604. vm
  6605. ) {
  6606. if (true) {
  6607. checkComponents(child);
  6608. }
  6609. if (typeof child === 'function') {
  6610. child = child.options;
  6611. }
  6612. normalizeProps(child, vm);
  6613. normalizeInject(child, vm);
  6614. normalizeDirectives(child);
  6615. // Apply extends and mixins on the child options,
  6616. // but only if it is a raw options object that isn't
  6617. // the result of another mergeOptions call.
  6618. // Only merged options has the _base property.
  6619. if (!child._base) {
  6620. if (child.extends) {
  6621. parent = mergeOptions(parent, child.extends, vm);
  6622. }
  6623. if (child.mixins) {
  6624. for (var i = 0, l = child.mixins.length; i < l; i++) {
  6625. parent = mergeOptions(parent, child.mixins[i], vm);
  6626. }
  6627. }
  6628. }
  6629. var options = {};
  6630. var key;
  6631. for (key in parent) {
  6632. mergeField(key);
  6633. }
  6634. for (key in child) {
  6635. if (!hasOwn(parent, key)) {
  6636. mergeField(key);
  6637. }
  6638. }
  6639. function mergeField (key) {
  6640. var strat = strats[key] || defaultStrat;
  6641. options[key] = strat(parent[key], child[key], vm, key);
  6642. }
  6643. return options
  6644. }
  6645. /**
  6646. * Resolve an asset.
  6647. * This function is used because child instances need access
  6648. * to assets defined in its ancestor chain.
  6649. */
  6650. function resolveAsset (
  6651. options,
  6652. type,
  6653. id,
  6654. warnMissing
  6655. ) {
  6656. /* istanbul ignore if */
  6657. if (typeof id !== 'string') {
  6658. return
  6659. }
  6660. var assets = options[type];
  6661. // check local registration variations first
  6662. if (hasOwn(assets, id)) { return assets[id] }
  6663. var camelizedId = camelize(id);
  6664. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  6665. var PascalCaseId = capitalize(camelizedId);
  6666. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  6667. // fallback to prototype chain
  6668. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  6669. if ( true && warnMissing && !res) {
  6670. warn(
  6671. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  6672. options
  6673. );
  6674. }
  6675. return res
  6676. }
  6677. /* */
  6678. function validateProp (
  6679. key,
  6680. propOptions,
  6681. propsData,
  6682. vm
  6683. ) {
  6684. var prop = propOptions[key];
  6685. var absent = !hasOwn(propsData, key);
  6686. var value = propsData[key];
  6687. // boolean casting
  6688. var booleanIndex = getTypeIndex(Boolean, prop.type);
  6689. if (booleanIndex > -1) {
  6690. if (absent && !hasOwn(prop, 'default')) {
  6691. value = false;
  6692. } else if (value === '' || value === hyphenate(key)) {
  6693. // only cast empty string / same name to boolean if
  6694. // boolean has higher priority
  6695. var stringIndex = getTypeIndex(String, prop.type);
  6696. if (stringIndex < 0 || booleanIndex < stringIndex) {
  6697. value = true;
  6698. }
  6699. }
  6700. }
  6701. // check default value
  6702. if (value === undefined) {
  6703. value = getPropDefaultValue(vm, prop, key);
  6704. // since the default value is a fresh copy,
  6705. // make sure to observe it.
  6706. var prevShouldObserve = shouldObserve;
  6707. toggleObserving(true);
  6708. observe(value);
  6709. toggleObserving(prevShouldObserve);
  6710. }
  6711. if (
  6712. true
  6713. ) {
  6714. assertProp(prop, key, value, vm, absent);
  6715. }
  6716. return value
  6717. }
  6718. /**
  6719. * Get the default value of a prop.
  6720. */
  6721. function getPropDefaultValue (vm, prop, key) {
  6722. // no default, return undefined
  6723. if (!hasOwn(prop, 'default')) {
  6724. return undefined
  6725. }
  6726. var def = prop.default;
  6727. // warn against non-factory defaults for Object & Array
  6728. if ( true && isObject(def)) {
  6729. warn(
  6730. 'Invalid default value for prop "' + key + '": ' +
  6731. 'Props with type Object/Array must use a factory function ' +
  6732. 'to return the default value.',
  6733. vm
  6734. );
  6735. }
  6736. // the raw prop value was also undefined from previous render,
  6737. // return previous default value to avoid unnecessary watcher trigger
  6738. if (vm && vm.$options.propsData &&
  6739. vm.$options.propsData[key] === undefined &&
  6740. vm._props[key] !== undefined
  6741. ) {
  6742. return vm._props[key]
  6743. }
  6744. // call factory function for non-Function types
  6745. // a value is Function if its prototype is function even across different execution context
  6746. return typeof def === 'function' && getType(prop.type) !== 'Function'
  6747. ? def.call(vm)
  6748. : def
  6749. }
  6750. /**
  6751. * Assert whether a prop is valid.
  6752. */
  6753. function assertProp (
  6754. prop,
  6755. name,
  6756. value,
  6757. vm,
  6758. absent
  6759. ) {
  6760. if (prop.required && absent) {
  6761. warn(
  6762. 'Missing required prop: "' + name + '"',
  6763. vm
  6764. );
  6765. return
  6766. }
  6767. if (value == null && !prop.required) {
  6768. return
  6769. }
  6770. var type = prop.type;
  6771. var valid = !type || type === true;
  6772. var expectedTypes = [];
  6773. if (type) {
  6774. if (!Array.isArray(type)) {
  6775. type = [type];
  6776. }
  6777. for (var i = 0; i < type.length && !valid; i++) {
  6778. var assertedType = assertType(value, type[i]);
  6779. expectedTypes.push(assertedType.expectedType || '');
  6780. valid = assertedType.valid;
  6781. }
  6782. }
  6783. if (!valid) {
  6784. warn(
  6785. getInvalidTypeMessage(name, value, expectedTypes),
  6786. vm
  6787. );
  6788. return
  6789. }
  6790. var validator = prop.validator;
  6791. if (validator) {
  6792. if (!validator(value)) {
  6793. warn(
  6794. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  6795. vm
  6796. );
  6797. }
  6798. }
  6799. }
  6800. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  6801. function assertType (value, type) {
  6802. var valid;
  6803. var expectedType = getType(type);
  6804. if (simpleCheckRE.test(expectedType)) {
  6805. var t = typeof value;
  6806. valid = t === expectedType.toLowerCase();
  6807. // for primitive wrapper objects
  6808. if (!valid && t === 'object') {
  6809. valid = value instanceof type;
  6810. }
  6811. } else if (expectedType === 'Object') {
  6812. valid = isPlainObject(value);
  6813. } else if (expectedType === 'Array') {
  6814. valid = Array.isArray(value);
  6815. } else {
  6816. valid = value instanceof type;
  6817. }
  6818. return {
  6819. valid: valid,
  6820. expectedType: expectedType
  6821. }
  6822. }
  6823. /**
  6824. * Use function string name to check built-in types,
  6825. * because a simple equality check will fail when running
  6826. * across different vms / iframes.
  6827. */
  6828. function getType (fn) {
  6829. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  6830. return match ? match[1] : ''
  6831. }
  6832. function isSameType (a, b) {
  6833. return getType(a) === getType(b)
  6834. }
  6835. function getTypeIndex (type, expectedTypes) {
  6836. if (!Array.isArray(expectedTypes)) {
  6837. return isSameType(expectedTypes, type) ? 0 : -1
  6838. }
  6839. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  6840. if (isSameType(expectedTypes[i], type)) {
  6841. return i
  6842. }
  6843. }
  6844. return -1
  6845. }
  6846. function getInvalidTypeMessage (name, value, expectedTypes) {
  6847. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  6848. " Expected " + (expectedTypes.map(capitalize).join(', '));
  6849. var expectedType = expectedTypes[0];
  6850. var receivedType = toRawType(value);
  6851. var expectedValue = styleValue(value, expectedType);
  6852. var receivedValue = styleValue(value, receivedType);
  6853. // check if we need to specify expected value
  6854. if (expectedTypes.length === 1 &&
  6855. isExplicable(expectedType) &&
  6856. !isBoolean(expectedType, receivedType)) {
  6857. message += " with value " + expectedValue;
  6858. }
  6859. message += ", got " + receivedType + " ";
  6860. // check if we need to specify received value
  6861. if (isExplicable(receivedType)) {
  6862. message += "with value " + receivedValue + ".";
  6863. }
  6864. return message
  6865. }
  6866. function styleValue (value, type) {
  6867. if (type === 'String') {
  6868. return ("\"" + value + "\"")
  6869. } else if (type === 'Number') {
  6870. return ("" + (Number(value)))
  6871. } else {
  6872. return ("" + value)
  6873. }
  6874. }
  6875. function isExplicable (value) {
  6876. var explicitTypes = ['string', 'number', 'boolean'];
  6877. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  6878. }
  6879. function isBoolean () {
  6880. var args = [], len = arguments.length;
  6881. while ( len-- ) args[ len ] = arguments[ len ];
  6882. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  6883. }
  6884. /* */
  6885. function handleError (err, vm, info) {
  6886. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  6887. // See: https://github.com/vuejs/vuex/issues/1505
  6888. pushTarget();
  6889. try {
  6890. if (vm) {
  6891. var cur = vm;
  6892. while ((cur = cur.$parent)) {
  6893. var hooks = cur.$options.errorCaptured;
  6894. if (hooks) {
  6895. for (var i = 0; i < hooks.length; i++) {
  6896. try {
  6897. var capture = hooks[i].call(cur, err, vm, info) === false;
  6898. if (capture) { return }
  6899. } catch (e) {
  6900. globalHandleError(e, cur, 'errorCaptured hook');
  6901. }
  6902. }
  6903. }
  6904. }
  6905. }
  6906. globalHandleError(err, vm, info);
  6907. } finally {
  6908. popTarget();
  6909. }
  6910. }
  6911. function invokeWithErrorHandling (
  6912. handler,
  6913. context,
  6914. args,
  6915. vm,
  6916. info
  6917. ) {
  6918. var res;
  6919. try {
  6920. res = args ? handler.apply(context, args) : handler.call(context);
  6921. if (res && !res._isVue && isPromise(res) && !res._handled) {
  6922. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  6923. // issue #9511
  6924. // avoid catch triggering multiple times when nested calls
  6925. res._handled = true;
  6926. }
  6927. } catch (e) {
  6928. handleError(e, vm, info);
  6929. }
  6930. return res
  6931. }
  6932. function globalHandleError (err, vm, info) {
  6933. if (config.errorHandler) {
  6934. try {
  6935. return config.errorHandler.call(null, err, vm, info)
  6936. } catch (e) {
  6937. // if the user intentionally throws the original error in the handler,
  6938. // do not log it twice
  6939. if (e !== err) {
  6940. logError(e, null, 'config.errorHandler');
  6941. }
  6942. }
  6943. }
  6944. logError(err, vm, info);
  6945. }
  6946. function logError (err, vm, info) {
  6947. if (true) {
  6948. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  6949. }
  6950. /* istanbul ignore else */
  6951. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  6952. console.error(err);
  6953. } else {
  6954. throw err
  6955. }
  6956. }
  6957. /* */
  6958. var callbacks = [];
  6959. var pending = false;
  6960. function flushCallbacks () {
  6961. pending = false;
  6962. var copies = callbacks.slice(0);
  6963. callbacks.length = 0;
  6964. for (var i = 0; i < copies.length; i++) {
  6965. copies[i]();
  6966. }
  6967. }
  6968. // Here we have async deferring wrappers using microtasks.
  6969. // In 2.5 we used (macro) tasks (in combination with microtasks).
  6970. // However, it has subtle problems when state is changed right before repaint
  6971. // (e.g. #6813, out-in transitions).
  6972. // Also, using (macro) tasks in event handler would cause some weird behaviors
  6973. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  6974. // So we now use microtasks everywhere, again.
  6975. // A major drawback of this tradeoff is that there are some scenarios
  6976. // where microtasks have too high a priority and fire in between supposedly
  6977. // sequential events (e.g. #4521, #6690, which have workarounds)
  6978. // or even between bubbling of the same event (#6566).
  6979. var timerFunc;
  6980. // The nextTick behavior leverages the microtask queue, which can be accessed
  6981. // via either native Promise.then or MutationObserver.
  6982. // MutationObserver has wider support, however it is seriously bugged in
  6983. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  6984. // completely stops working after triggering a few times... so, if native
  6985. // Promise is available, we will use it:
  6986. /* istanbul ignore next, $flow-disable-line */
  6987. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  6988. var p = Promise.resolve();
  6989. timerFunc = function () {
  6990. p.then(flushCallbacks);
  6991. // In problematic UIWebViews, Promise.then doesn't completely break, but
  6992. // it can get stuck in a weird state where callbacks are pushed into the
  6993. // microtask queue but the queue isn't being flushed, until the browser
  6994. // needs to do some other work, e.g. handle a timer. Therefore we can
  6995. // "force" the microtask queue to be flushed by adding an empty timer.
  6996. if (isIOS) { setTimeout(noop); }
  6997. };
  6998. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  6999. isNative(MutationObserver) ||
  7000. // PhantomJS and iOS 7.x
  7001. MutationObserver.toString() === '[object MutationObserverConstructor]'
  7002. )) {
  7003. // Use MutationObserver where native Promise is not available,
  7004. // e.g. PhantomJS, iOS7, Android 4.4
  7005. // (#6466 MutationObserver is unreliable in IE11)
  7006. var counter = 1;
  7007. var observer = new MutationObserver(flushCallbacks);
  7008. var textNode = document.createTextNode(String(counter));
  7009. observer.observe(textNode, {
  7010. characterData: true
  7011. });
  7012. timerFunc = function () {
  7013. counter = (counter + 1) % 2;
  7014. textNode.data = String(counter);
  7015. };
  7016. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  7017. // Fallback to setImmediate.
  7018. // Technically it leverages the (macro) task queue,
  7019. // but it is still a better choice than setTimeout.
  7020. timerFunc = function () {
  7021. setImmediate(flushCallbacks);
  7022. };
  7023. } else {
  7024. // Fallback to setTimeout.
  7025. timerFunc = function () {
  7026. setTimeout(flushCallbacks, 0);
  7027. };
  7028. }
  7029. function nextTick (cb, ctx) {
  7030. var _resolve;
  7031. callbacks.push(function () {
  7032. if (cb) {
  7033. try {
  7034. cb.call(ctx);
  7035. } catch (e) {
  7036. handleError(e, ctx, 'nextTick');
  7037. }
  7038. } else if (_resolve) {
  7039. _resolve(ctx);
  7040. }
  7041. });
  7042. if (!pending) {
  7043. pending = true;
  7044. timerFunc();
  7045. }
  7046. // $flow-disable-line
  7047. if (!cb && typeof Promise !== 'undefined') {
  7048. return new Promise(function (resolve) {
  7049. _resolve = resolve;
  7050. })
  7051. }
  7052. }
  7053. /* */
  7054. /* not type checking this file because flow doesn't play well with Proxy */
  7055. var initProxy;
  7056. if (true) {
  7057. var allowedGlobals = makeMap(
  7058. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  7059. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  7060. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  7061. 'require' // for Webpack/Browserify
  7062. );
  7063. var warnNonPresent = function (target, key) {
  7064. warn(
  7065. "Property or method \"" + key + "\" is not defined on the instance but " +
  7066. 'referenced during render. Make sure that this property is reactive, ' +
  7067. 'either in the data option, or for class-based components, by ' +
  7068. 'initializing the property. ' +
  7069. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  7070. target
  7071. );
  7072. };
  7073. var warnReservedPrefix = function (target, key) {
  7074. warn(
  7075. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  7076. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  7077. 'prevent conflicts with Vue internals. ' +
  7078. 'See: https://vuejs.org/v2/api/#data',
  7079. target
  7080. );
  7081. };
  7082. var hasProxy =
  7083. typeof Proxy !== 'undefined' && isNative(Proxy);
  7084. if (hasProxy) {
  7085. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  7086. config.keyCodes = new Proxy(config.keyCodes, {
  7087. set: function set (target, key, value) {
  7088. if (isBuiltInModifier(key)) {
  7089. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  7090. return false
  7091. } else {
  7092. target[key] = value;
  7093. return true
  7094. }
  7095. }
  7096. });
  7097. }
  7098. var hasHandler = {
  7099. has: function has (target, key) {
  7100. var has = key in target;
  7101. var isAllowed = allowedGlobals(key) ||
  7102. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  7103. if (!has && !isAllowed) {
  7104. if (key in target.$data) { warnReservedPrefix(target, key); }
  7105. else { warnNonPresent(target, key); }
  7106. }
  7107. return has || !isAllowed
  7108. }
  7109. };
  7110. var getHandler = {
  7111. get: function get (target, key) {
  7112. if (typeof key === 'string' && !(key in target)) {
  7113. if (key in target.$data) { warnReservedPrefix(target, key); }
  7114. else { warnNonPresent(target, key); }
  7115. }
  7116. return target[key]
  7117. }
  7118. };
  7119. initProxy = function initProxy (vm) {
  7120. if (hasProxy) {
  7121. // determine which proxy handler to use
  7122. var options = vm.$options;
  7123. var handlers = options.render && options.render._withStripped
  7124. ? getHandler
  7125. : hasHandler;
  7126. vm._renderProxy = new Proxy(vm, handlers);
  7127. } else {
  7128. vm._renderProxy = vm;
  7129. }
  7130. };
  7131. }
  7132. /* */
  7133. var seenObjects = new _Set();
  7134. /**
  7135. * Recursively traverse an object to evoke all converted
  7136. * getters, so that every nested property inside the object
  7137. * is collected as a "deep" dependency.
  7138. */
  7139. function traverse (val) {
  7140. _traverse(val, seenObjects);
  7141. seenObjects.clear();
  7142. }
  7143. function _traverse (val, seen) {
  7144. var i, keys;
  7145. var isA = Array.isArray(val);
  7146. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  7147. return
  7148. }
  7149. if (val.__ob__) {
  7150. var depId = val.__ob__.dep.id;
  7151. if (seen.has(depId)) {
  7152. return
  7153. }
  7154. seen.add(depId);
  7155. }
  7156. if (isA) {
  7157. i = val.length;
  7158. while (i--) { _traverse(val[i], seen); }
  7159. } else {
  7160. keys = Object.keys(val);
  7161. i = keys.length;
  7162. while (i--) { _traverse(val[keys[i]], seen); }
  7163. }
  7164. }
  7165. var mark;
  7166. var measure;
  7167. if (true) {
  7168. var perf = inBrowser && window.performance;
  7169. /* istanbul ignore if */
  7170. if (
  7171. perf &&
  7172. perf.mark &&
  7173. perf.measure &&
  7174. perf.clearMarks &&
  7175. perf.clearMeasures
  7176. ) {
  7177. mark = function (tag) { return perf.mark(tag); };
  7178. measure = function (name, startTag, endTag) {
  7179. perf.measure(name, startTag, endTag);
  7180. perf.clearMarks(startTag);
  7181. perf.clearMarks(endTag);
  7182. // perf.clearMeasures(name)
  7183. };
  7184. }
  7185. }
  7186. /* */
  7187. var normalizeEvent = cached(function (name) {
  7188. var passive = name.charAt(0) === '&';
  7189. name = passive ? name.slice(1) : name;
  7190. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  7191. name = once$$1 ? name.slice(1) : name;
  7192. var capture = name.charAt(0) === '!';
  7193. name = capture ? name.slice(1) : name;
  7194. return {
  7195. name: name,
  7196. once: once$$1,
  7197. capture: capture,
  7198. passive: passive
  7199. }
  7200. });
  7201. function createFnInvoker (fns, vm) {
  7202. function invoker () {
  7203. var arguments$1 = arguments;
  7204. var fns = invoker.fns;
  7205. if (Array.isArray(fns)) {
  7206. var cloned = fns.slice();
  7207. for (var i = 0; i < cloned.length; i++) {
  7208. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  7209. }
  7210. } else {
  7211. // return handler return value for single handlers
  7212. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  7213. }
  7214. }
  7215. invoker.fns = fns;
  7216. return invoker
  7217. }
  7218. function updateListeners (
  7219. on,
  7220. oldOn,
  7221. add,
  7222. remove$$1,
  7223. createOnceHandler,
  7224. vm
  7225. ) {
  7226. var name, def$$1, cur, old, event;
  7227. for (name in on) {
  7228. def$$1 = cur = on[name];
  7229. old = oldOn[name];
  7230. event = normalizeEvent(name);
  7231. if (isUndef(cur)) {
  7232. true && warn(
  7233. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  7234. vm
  7235. );
  7236. } else if (isUndef(old)) {
  7237. if (isUndef(cur.fns)) {
  7238. cur = on[name] = createFnInvoker(cur, vm);
  7239. }
  7240. if (isTrue(event.once)) {
  7241. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  7242. }
  7243. add(event.name, cur, event.capture, event.passive, event.params);
  7244. } else if (cur !== old) {
  7245. old.fns = cur;
  7246. on[name] = old;
  7247. }
  7248. }
  7249. for (name in oldOn) {
  7250. if (isUndef(on[name])) {
  7251. event = normalizeEvent(name);
  7252. remove$$1(event.name, oldOn[name], event.capture);
  7253. }
  7254. }
  7255. }
  7256. /* */
  7257. /* */
  7258. // fixed by xxxxxx (mp properties)
  7259. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  7260. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  7261. if (isUndef(propOptions)) {
  7262. return res
  7263. }
  7264. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  7265. var attrs = data.attrs;
  7266. var props = data.props;
  7267. if (isDef(attrs) || isDef(props)) {
  7268. for (var key in propOptions) {
  7269. var altKey = hyphenate(key);
  7270. var result = checkProp(res, props, key, altKey, true) ||
  7271. checkProp(res, attrs, key, altKey, false);
  7272. // externalClass
  7273. if (
  7274. result &&
  7275. res[key] &&
  7276. externalClasses.indexOf(altKey) !== -1 &&
  7277. context[camelize(res[key])]
  7278. ) {
  7279. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  7280. res[key] = context[camelize(res[key])];
  7281. }
  7282. }
  7283. }
  7284. return res
  7285. }
  7286. function extractPropsFromVNodeData (
  7287. data,
  7288. Ctor,
  7289. tag,
  7290. context// fixed by xxxxxx
  7291. ) {
  7292. // we are only extracting raw values here.
  7293. // validation and default values are handled in the child
  7294. // component itself.
  7295. var propOptions = Ctor.options.props;
  7296. if (isUndef(propOptions)) {
  7297. // fixed by xxxxxx
  7298. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  7299. }
  7300. var res = {};
  7301. var attrs = data.attrs;
  7302. var props = data.props;
  7303. if (isDef(attrs) || isDef(props)) {
  7304. for (var key in propOptions) {
  7305. var altKey = hyphenate(key);
  7306. if (true) {
  7307. var keyInLowerCase = key.toLowerCase();
  7308. if (
  7309. key !== keyInLowerCase &&
  7310. attrs && hasOwn(attrs, keyInLowerCase)
  7311. ) {
  7312. tip(
  7313. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  7314. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  7315. " \"" + key + "\". " +
  7316. "Note that HTML attributes are case-insensitive and camelCased " +
  7317. "props need to use their kebab-case equivalents when using in-DOM " +
  7318. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  7319. );
  7320. }
  7321. }
  7322. checkProp(res, props, key, altKey, true) ||
  7323. checkProp(res, attrs, key, altKey, false);
  7324. }
  7325. }
  7326. // fixed by xxxxxx
  7327. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  7328. }
  7329. function checkProp (
  7330. res,
  7331. hash,
  7332. key,
  7333. altKey,
  7334. preserve
  7335. ) {
  7336. if (isDef(hash)) {
  7337. if (hasOwn(hash, key)) {
  7338. res[key] = hash[key];
  7339. if (!preserve) {
  7340. delete hash[key];
  7341. }
  7342. return true
  7343. } else if (hasOwn(hash, altKey)) {
  7344. res[key] = hash[altKey];
  7345. if (!preserve) {
  7346. delete hash[altKey];
  7347. }
  7348. return true
  7349. }
  7350. }
  7351. return false
  7352. }
  7353. /* */
  7354. // The template compiler attempts to minimize the need for normalization by
  7355. // statically analyzing the template at compile time.
  7356. //
  7357. // For plain HTML markup, normalization can be completely skipped because the
  7358. // generated render function is guaranteed to return Array<VNode>. There are
  7359. // two cases where extra normalization is needed:
  7360. // 1. When the children contains components - because a functional component
  7361. // may return an Array instead of a single root. In this case, just a simple
  7362. // normalization is needed - if any child is an Array, we flatten the whole
  7363. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  7364. // because functional components already normalize their own children.
  7365. function simpleNormalizeChildren (children) {
  7366. for (var i = 0; i < children.length; i++) {
  7367. if (Array.isArray(children[i])) {
  7368. return Array.prototype.concat.apply([], children)
  7369. }
  7370. }
  7371. return children
  7372. }
  7373. // 2. When the children contains constructs that always generated nested Arrays,
  7374. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  7375. // with hand-written render functions / JSX. In such cases a full normalization
  7376. // is needed to cater to all possible types of children values.
  7377. function normalizeChildren (children) {
  7378. return isPrimitive(children)
  7379. ? [createTextVNode(children)]
  7380. : Array.isArray(children)
  7381. ? normalizeArrayChildren(children)
  7382. : undefined
  7383. }
  7384. function isTextNode (node) {
  7385. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  7386. }
  7387. function normalizeArrayChildren (children, nestedIndex) {
  7388. var res = [];
  7389. var i, c, lastIndex, last;
  7390. for (i = 0; i < children.length; i++) {
  7391. c = children[i];
  7392. if (isUndef(c) || typeof c === 'boolean') { continue }
  7393. lastIndex = res.length - 1;
  7394. last = res[lastIndex];
  7395. // nested
  7396. if (Array.isArray(c)) {
  7397. if (c.length > 0) {
  7398. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  7399. // merge adjacent text nodes
  7400. if (isTextNode(c[0]) && isTextNode(last)) {
  7401. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  7402. c.shift();
  7403. }
  7404. res.push.apply(res, c);
  7405. }
  7406. } else if (isPrimitive(c)) {
  7407. if (isTextNode(last)) {
  7408. // merge adjacent text nodes
  7409. // this is necessary for SSR hydration because text nodes are
  7410. // essentially merged when rendered to HTML strings
  7411. res[lastIndex] = createTextVNode(last.text + c);
  7412. } else if (c !== '') {
  7413. // convert primitive to vnode
  7414. res.push(createTextVNode(c));
  7415. }
  7416. } else {
  7417. if (isTextNode(c) && isTextNode(last)) {
  7418. // merge adjacent text nodes
  7419. res[lastIndex] = createTextVNode(last.text + c.text);
  7420. } else {
  7421. // default key for nested array children (likely generated by v-for)
  7422. if (isTrue(children._isVList) &&
  7423. isDef(c.tag) &&
  7424. isUndef(c.key) &&
  7425. isDef(nestedIndex)) {
  7426. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  7427. }
  7428. res.push(c);
  7429. }
  7430. }
  7431. }
  7432. return res
  7433. }
  7434. /* */
  7435. function initProvide (vm) {
  7436. var provide = vm.$options.provide;
  7437. if (provide) {
  7438. vm._provided = typeof provide === 'function'
  7439. ? provide.call(vm)
  7440. : provide;
  7441. }
  7442. }
  7443. function initInjections (vm) {
  7444. var result = resolveInject(vm.$options.inject, vm);
  7445. if (result) {
  7446. toggleObserving(false);
  7447. Object.keys(result).forEach(function (key) {
  7448. /* istanbul ignore else */
  7449. if (true) {
  7450. defineReactive$$1(vm, key, result[key], function () {
  7451. warn(
  7452. "Avoid mutating an injected value directly since the changes will be " +
  7453. "overwritten whenever the provided component re-renders. " +
  7454. "injection being mutated: \"" + key + "\"",
  7455. vm
  7456. );
  7457. });
  7458. } else {}
  7459. });
  7460. toggleObserving(true);
  7461. }
  7462. }
  7463. function resolveInject (inject, vm) {
  7464. if (inject) {
  7465. // inject is :any because flow is not smart enough to figure out cached
  7466. var result = Object.create(null);
  7467. var keys = hasSymbol
  7468. ? Reflect.ownKeys(inject)
  7469. : Object.keys(inject);
  7470. for (var i = 0; i < keys.length; i++) {
  7471. var key = keys[i];
  7472. // #6574 in case the inject object is observed...
  7473. if (key === '__ob__') { continue }
  7474. var provideKey = inject[key].from;
  7475. var source = vm;
  7476. while (source) {
  7477. if (source._provided && hasOwn(source._provided, provideKey)) {
  7478. result[key] = source._provided[provideKey];
  7479. break
  7480. }
  7481. source = source.$parent;
  7482. }
  7483. if (!source) {
  7484. if ('default' in inject[key]) {
  7485. var provideDefault = inject[key].default;
  7486. result[key] = typeof provideDefault === 'function'
  7487. ? provideDefault.call(vm)
  7488. : provideDefault;
  7489. } else if (true) {
  7490. warn(("Injection \"" + key + "\" not found"), vm);
  7491. }
  7492. }
  7493. }
  7494. return result
  7495. }
  7496. }
  7497. /* */
  7498. /**
  7499. * Runtime helper for resolving raw children VNodes into a slot object.
  7500. */
  7501. function resolveSlots (
  7502. children,
  7503. context
  7504. ) {
  7505. if (!children || !children.length) {
  7506. return {}
  7507. }
  7508. var slots = {};
  7509. for (var i = 0, l = children.length; i < l; i++) {
  7510. var child = children[i];
  7511. var data = child.data;
  7512. // remove slot attribute if the node is resolved as a Vue slot node
  7513. if (data && data.attrs && data.attrs.slot) {
  7514. delete data.attrs.slot;
  7515. }
  7516. // named slots should only be respected if the vnode was rendered in the
  7517. // same context.
  7518. if ((child.context === context || child.fnContext === context) &&
  7519. data && data.slot != null
  7520. ) {
  7521. var name = data.slot;
  7522. var slot = (slots[name] || (slots[name] = []));
  7523. if (child.tag === 'template') {
  7524. slot.push.apply(slot, child.children || []);
  7525. } else {
  7526. slot.push(child);
  7527. }
  7528. } else {
  7529. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  7530. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  7531. (slots['page'] || (slots['page'] = [])).push(child);
  7532. }else{
  7533. (slots.default || (slots.default = [])).push(child);
  7534. }
  7535. }
  7536. }
  7537. // ignore slots that contains only whitespace
  7538. for (var name$1 in slots) {
  7539. if (slots[name$1].every(isWhitespace)) {
  7540. delete slots[name$1];
  7541. }
  7542. }
  7543. return slots
  7544. }
  7545. function isWhitespace (node) {
  7546. return (node.isComment && !node.asyncFactory) || node.text === ' '
  7547. }
  7548. /* */
  7549. function normalizeScopedSlots (
  7550. slots,
  7551. normalSlots,
  7552. prevSlots
  7553. ) {
  7554. var res;
  7555. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  7556. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  7557. var key = slots && slots.$key;
  7558. if (!slots) {
  7559. res = {};
  7560. } else if (slots._normalized) {
  7561. // fast path 1: child component re-render only, parent did not change
  7562. return slots._normalized
  7563. } else if (
  7564. isStable &&
  7565. prevSlots &&
  7566. prevSlots !== emptyObject &&
  7567. key === prevSlots.$key &&
  7568. !hasNormalSlots &&
  7569. !prevSlots.$hasNormal
  7570. ) {
  7571. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  7572. // only need to normalize once
  7573. return prevSlots
  7574. } else {
  7575. res = {};
  7576. for (var key$1 in slots) {
  7577. if (slots[key$1] && key$1[0] !== '$') {
  7578. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  7579. }
  7580. }
  7581. }
  7582. // expose normal slots on scopedSlots
  7583. for (var key$2 in normalSlots) {
  7584. if (!(key$2 in res)) {
  7585. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  7586. }
  7587. }
  7588. // avoriaz seems to mock a non-extensible $scopedSlots object
  7589. // and when that is passed down this would cause an error
  7590. if (slots && Object.isExtensible(slots)) {
  7591. (slots)._normalized = res;
  7592. }
  7593. def(res, '$stable', isStable);
  7594. def(res, '$key', key);
  7595. def(res, '$hasNormal', hasNormalSlots);
  7596. return res
  7597. }
  7598. function normalizeScopedSlot(normalSlots, key, fn) {
  7599. var normalized = function () {
  7600. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  7601. res = res && typeof res === 'object' && !Array.isArray(res)
  7602. ? [res] // single vnode
  7603. : normalizeChildren(res);
  7604. return res && (
  7605. res.length === 0 ||
  7606. (res.length === 1 && res[0].isComment) // #9658
  7607. ) ? undefined
  7608. : res
  7609. };
  7610. // this is a slot using the new v-slot syntax without scope. although it is
  7611. // compiled as a scoped slot, render fn users would expect it to be present
  7612. // on this.$slots because the usage is semantically a normal slot.
  7613. if (fn.proxy) {
  7614. Object.defineProperty(normalSlots, key, {
  7615. get: normalized,
  7616. enumerable: true,
  7617. configurable: true
  7618. });
  7619. }
  7620. return normalized
  7621. }
  7622. function proxyNormalSlot(slots, key) {
  7623. return function () { return slots[key]; }
  7624. }
  7625. /* */
  7626. /**
  7627. * Runtime helper for rendering v-for lists.
  7628. */
  7629. function renderList (
  7630. val,
  7631. render
  7632. ) {
  7633. var ret, i, l, keys, key;
  7634. if (Array.isArray(val) || typeof val === 'string') {
  7635. ret = new Array(val.length);
  7636. for (i = 0, l = val.length; i < l; i++) {
  7637. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  7638. }
  7639. } else if (typeof val === 'number') {
  7640. ret = new Array(val);
  7641. for (i = 0; i < val; i++) {
  7642. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  7643. }
  7644. } else if (isObject(val)) {
  7645. if (hasSymbol && val[Symbol.iterator]) {
  7646. ret = [];
  7647. var iterator = val[Symbol.iterator]();
  7648. var result = iterator.next();
  7649. while (!result.done) {
  7650. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  7651. result = iterator.next();
  7652. }
  7653. } else {
  7654. keys = Object.keys(val);
  7655. ret = new Array(keys.length);
  7656. for (i = 0, l = keys.length; i < l; i++) {
  7657. key = keys[i];
  7658. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  7659. }
  7660. }
  7661. }
  7662. if (!isDef(ret)) {
  7663. ret = [];
  7664. }
  7665. (ret)._isVList = true;
  7666. return ret
  7667. }
  7668. /* */
  7669. /**
  7670. * Runtime helper for rendering <slot>
  7671. */
  7672. function renderSlot (
  7673. name,
  7674. fallback,
  7675. props,
  7676. bindObject
  7677. ) {
  7678. var scopedSlotFn = this.$scopedSlots[name];
  7679. var nodes;
  7680. if (scopedSlotFn) { // scoped slot
  7681. props = props || {};
  7682. if (bindObject) {
  7683. if ( true && !isObject(bindObject)) {
  7684. warn(
  7685. 'slot v-bind without argument expects an Object',
  7686. this
  7687. );
  7688. }
  7689. props = extend(extend({}, bindObject), props);
  7690. }
  7691. // fixed by xxxxxx app-plus scopedSlot
  7692. nodes = scopedSlotFn(props, this, props._i) || fallback;
  7693. } else {
  7694. nodes = this.$slots[name] || fallback;
  7695. }
  7696. var target = props && props.slot;
  7697. if (target) {
  7698. return this.$createElement('template', { slot: target }, nodes)
  7699. } else {
  7700. return nodes
  7701. }
  7702. }
  7703. /* */
  7704. /**
  7705. * Runtime helper for resolving filters
  7706. */
  7707. function resolveFilter (id) {
  7708. return resolveAsset(this.$options, 'filters', id, true) || identity
  7709. }
  7710. /* */
  7711. function isKeyNotMatch (expect, actual) {
  7712. if (Array.isArray(expect)) {
  7713. return expect.indexOf(actual) === -1
  7714. } else {
  7715. return expect !== actual
  7716. }
  7717. }
  7718. /**
  7719. * Runtime helper for checking keyCodes from config.
  7720. * exposed as Vue.prototype._k
  7721. * passing in eventKeyName as last argument separately for backwards compat
  7722. */
  7723. function checkKeyCodes (
  7724. eventKeyCode,
  7725. key,
  7726. builtInKeyCode,
  7727. eventKeyName,
  7728. builtInKeyName
  7729. ) {
  7730. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  7731. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  7732. return isKeyNotMatch(builtInKeyName, eventKeyName)
  7733. } else if (mappedKeyCode) {
  7734. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  7735. } else if (eventKeyName) {
  7736. return hyphenate(eventKeyName) !== key
  7737. }
  7738. }
  7739. /* */
  7740. /**
  7741. * Runtime helper for merging v-bind="object" into a VNode's data.
  7742. */
  7743. function bindObjectProps (
  7744. data,
  7745. tag,
  7746. value,
  7747. asProp,
  7748. isSync
  7749. ) {
  7750. if (value) {
  7751. if (!isObject(value)) {
  7752. true && warn(
  7753. 'v-bind without argument expects an Object or Array value',
  7754. this
  7755. );
  7756. } else {
  7757. if (Array.isArray(value)) {
  7758. value = toObject(value);
  7759. }
  7760. var hash;
  7761. var loop = function ( key ) {
  7762. if (
  7763. key === 'class' ||
  7764. key === 'style' ||
  7765. isReservedAttribute(key)
  7766. ) {
  7767. hash = data;
  7768. } else {
  7769. var type = data.attrs && data.attrs.type;
  7770. hash = asProp || config.mustUseProp(tag, type, key)
  7771. ? data.domProps || (data.domProps = {})
  7772. : data.attrs || (data.attrs = {});
  7773. }
  7774. var camelizedKey = camelize(key);
  7775. var hyphenatedKey = hyphenate(key);
  7776. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  7777. hash[key] = value[key];
  7778. if (isSync) {
  7779. var on = data.on || (data.on = {});
  7780. on[("update:" + key)] = function ($event) {
  7781. value[key] = $event;
  7782. };
  7783. }
  7784. }
  7785. };
  7786. for (var key in value) loop( key );
  7787. }
  7788. }
  7789. return data
  7790. }
  7791. /* */
  7792. /**
  7793. * Runtime helper for rendering static trees.
  7794. */
  7795. function renderStatic (
  7796. index,
  7797. isInFor
  7798. ) {
  7799. var cached = this._staticTrees || (this._staticTrees = []);
  7800. var tree = cached[index];
  7801. // if has already-rendered static tree and not inside v-for,
  7802. // we can reuse the same tree.
  7803. if (tree && !isInFor) {
  7804. return tree
  7805. }
  7806. // otherwise, render a fresh tree.
  7807. tree = cached[index] = this.$options.staticRenderFns[index].call(
  7808. this._renderProxy,
  7809. null,
  7810. this // for render fns generated for functional component templates
  7811. );
  7812. markStatic(tree, ("__static__" + index), false);
  7813. return tree
  7814. }
  7815. /**
  7816. * Runtime helper for v-once.
  7817. * Effectively it means marking the node as static with a unique key.
  7818. */
  7819. function markOnce (
  7820. tree,
  7821. index,
  7822. key
  7823. ) {
  7824. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  7825. return tree
  7826. }
  7827. function markStatic (
  7828. tree,
  7829. key,
  7830. isOnce
  7831. ) {
  7832. if (Array.isArray(tree)) {
  7833. for (var i = 0; i < tree.length; i++) {
  7834. if (tree[i] && typeof tree[i] !== 'string') {
  7835. markStaticNode(tree[i], (key + "_" + i), isOnce);
  7836. }
  7837. }
  7838. } else {
  7839. markStaticNode(tree, key, isOnce);
  7840. }
  7841. }
  7842. function markStaticNode (node, key, isOnce) {
  7843. node.isStatic = true;
  7844. node.key = key;
  7845. node.isOnce = isOnce;
  7846. }
  7847. /* */
  7848. function bindObjectListeners (data, value) {
  7849. if (value) {
  7850. if (!isPlainObject(value)) {
  7851. true && warn(
  7852. 'v-on without argument expects an Object value',
  7853. this
  7854. );
  7855. } else {
  7856. var on = data.on = data.on ? extend({}, data.on) : {};
  7857. for (var key in value) {
  7858. var existing = on[key];
  7859. var ours = value[key];
  7860. on[key] = existing ? [].concat(existing, ours) : ours;
  7861. }
  7862. }
  7863. }
  7864. return data
  7865. }
  7866. /* */
  7867. function resolveScopedSlots (
  7868. fns, // see flow/vnode
  7869. res,
  7870. // the following are added in 2.6
  7871. hasDynamicKeys,
  7872. contentHashKey
  7873. ) {
  7874. res = res || { $stable: !hasDynamicKeys };
  7875. for (var i = 0; i < fns.length; i++) {
  7876. var slot = fns[i];
  7877. if (Array.isArray(slot)) {
  7878. resolveScopedSlots(slot, res, hasDynamicKeys);
  7879. } else if (slot) {
  7880. // marker for reverse proxying v-slot without scope on this.$slots
  7881. if (slot.proxy) {
  7882. slot.fn.proxy = true;
  7883. }
  7884. res[slot.key] = slot.fn;
  7885. }
  7886. }
  7887. if (contentHashKey) {
  7888. (res).$key = contentHashKey;
  7889. }
  7890. return res
  7891. }
  7892. /* */
  7893. function bindDynamicKeys (baseObj, values) {
  7894. for (var i = 0; i < values.length; i += 2) {
  7895. var key = values[i];
  7896. if (typeof key === 'string' && key) {
  7897. baseObj[values[i]] = values[i + 1];
  7898. } else if ( true && key !== '' && key !== null) {
  7899. // null is a special value for explicitly removing a binding
  7900. warn(
  7901. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  7902. this
  7903. );
  7904. }
  7905. }
  7906. return baseObj
  7907. }
  7908. // helper to dynamically append modifier runtime markers to event names.
  7909. // ensure only append when value is already string, otherwise it will be cast
  7910. // to string and cause the type check to miss.
  7911. function prependModifier (value, symbol) {
  7912. return typeof value === 'string' ? symbol + value : value
  7913. }
  7914. /* */
  7915. function installRenderHelpers (target) {
  7916. target._o = markOnce;
  7917. target._n = toNumber;
  7918. target._s = toString;
  7919. target._l = renderList;
  7920. target._t = renderSlot;
  7921. target._q = looseEqual;
  7922. target._i = looseIndexOf;
  7923. target._m = renderStatic;
  7924. target._f = resolveFilter;
  7925. target._k = checkKeyCodes;
  7926. target._b = bindObjectProps;
  7927. target._v = createTextVNode;
  7928. target._e = createEmptyVNode;
  7929. target._u = resolveScopedSlots;
  7930. target._g = bindObjectListeners;
  7931. target._d = bindDynamicKeys;
  7932. target._p = prependModifier;
  7933. }
  7934. /* */
  7935. function FunctionalRenderContext (
  7936. data,
  7937. props,
  7938. children,
  7939. parent,
  7940. Ctor
  7941. ) {
  7942. var this$1 = this;
  7943. var options = Ctor.options;
  7944. // ensure the createElement function in functional components
  7945. // gets a unique context - this is necessary for correct named slot check
  7946. var contextVm;
  7947. if (hasOwn(parent, '_uid')) {
  7948. contextVm = Object.create(parent);
  7949. // $flow-disable-line
  7950. contextVm._original = parent;
  7951. } else {
  7952. // the context vm passed in is a functional context as well.
  7953. // in this case we want to make sure we are able to get a hold to the
  7954. // real context instance.
  7955. contextVm = parent;
  7956. // $flow-disable-line
  7957. parent = parent._original;
  7958. }
  7959. var isCompiled = isTrue(options._compiled);
  7960. var needNormalization = !isCompiled;
  7961. this.data = data;
  7962. this.props = props;
  7963. this.children = children;
  7964. this.parent = parent;
  7965. this.listeners = data.on || emptyObject;
  7966. this.injections = resolveInject(options.inject, parent);
  7967. this.slots = function () {
  7968. if (!this$1.$slots) {
  7969. normalizeScopedSlots(
  7970. data.scopedSlots,
  7971. this$1.$slots = resolveSlots(children, parent)
  7972. );
  7973. }
  7974. return this$1.$slots
  7975. };
  7976. Object.defineProperty(this, 'scopedSlots', ({
  7977. enumerable: true,
  7978. get: function get () {
  7979. return normalizeScopedSlots(data.scopedSlots, this.slots())
  7980. }
  7981. }));
  7982. // support for compiled functional template
  7983. if (isCompiled) {
  7984. // exposing $options for renderStatic()
  7985. this.$options = options;
  7986. // pre-resolve slots for renderSlot()
  7987. this.$slots = this.slots();
  7988. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  7989. }
  7990. if (options._scopeId) {
  7991. this._c = function (a, b, c, d) {
  7992. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  7993. if (vnode && !Array.isArray(vnode)) {
  7994. vnode.fnScopeId = options._scopeId;
  7995. vnode.fnContext = parent;
  7996. }
  7997. return vnode
  7998. };
  7999. } else {
  8000. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  8001. }
  8002. }
  8003. installRenderHelpers(FunctionalRenderContext.prototype);
  8004. function createFunctionalComponent (
  8005. Ctor,
  8006. propsData,
  8007. data,
  8008. contextVm,
  8009. children
  8010. ) {
  8011. var options = Ctor.options;
  8012. var props = {};
  8013. var propOptions = options.props;
  8014. if (isDef(propOptions)) {
  8015. for (var key in propOptions) {
  8016. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  8017. }
  8018. } else {
  8019. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  8020. if (isDef(data.props)) { mergeProps(props, data.props); }
  8021. }
  8022. var renderContext = new FunctionalRenderContext(
  8023. data,
  8024. props,
  8025. children,
  8026. contextVm,
  8027. Ctor
  8028. );
  8029. var vnode = options.render.call(null, renderContext._c, renderContext);
  8030. if (vnode instanceof VNode) {
  8031. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  8032. } else if (Array.isArray(vnode)) {
  8033. var vnodes = normalizeChildren(vnode) || [];
  8034. var res = new Array(vnodes.length);
  8035. for (var i = 0; i < vnodes.length; i++) {
  8036. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  8037. }
  8038. return res
  8039. }
  8040. }
  8041. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  8042. // #7817 clone node before setting fnContext, otherwise if the node is reused
  8043. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  8044. // that should not be matched to match.
  8045. var clone = cloneVNode(vnode);
  8046. clone.fnContext = contextVm;
  8047. clone.fnOptions = options;
  8048. if (true) {
  8049. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  8050. }
  8051. if (data.slot) {
  8052. (clone.data || (clone.data = {})).slot = data.slot;
  8053. }
  8054. return clone
  8055. }
  8056. function mergeProps (to, from) {
  8057. for (var key in from) {
  8058. to[camelize(key)] = from[key];
  8059. }
  8060. }
  8061. /* */
  8062. /* */
  8063. /* */
  8064. /* */
  8065. // inline hooks to be invoked on component VNodes during patch
  8066. var componentVNodeHooks = {
  8067. init: function init (vnode, hydrating) {
  8068. if (
  8069. vnode.componentInstance &&
  8070. !vnode.componentInstance._isDestroyed &&
  8071. vnode.data.keepAlive
  8072. ) {
  8073. // kept-alive components, treat as a patch
  8074. var mountedNode = vnode; // work around flow
  8075. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  8076. } else {
  8077. var child = vnode.componentInstance = createComponentInstanceForVnode(
  8078. vnode,
  8079. activeInstance
  8080. );
  8081. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  8082. }
  8083. },
  8084. prepatch: function prepatch (oldVnode, vnode) {
  8085. var options = vnode.componentOptions;
  8086. var child = vnode.componentInstance = oldVnode.componentInstance;
  8087. updateChildComponent(
  8088. child,
  8089. options.propsData, // updated props
  8090. options.listeners, // updated listeners
  8091. vnode, // new parent vnode
  8092. options.children // new children
  8093. );
  8094. },
  8095. insert: function insert (vnode) {
  8096. var context = vnode.context;
  8097. var componentInstance = vnode.componentInstance;
  8098. if (!componentInstance._isMounted) {
  8099. callHook(componentInstance, 'onServiceCreated');
  8100. callHook(componentInstance, 'onServiceAttached');
  8101. componentInstance._isMounted = true;
  8102. callHook(componentInstance, 'mounted');
  8103. }
  8104. if (vnode.data.keepAlive) {
  8105. if (context._isMounted) {
  8106. // vue-router#1212
  8107. // During updates, a kept-alive component's child components may
  8108. // change, so directly walking the tree here may call activated hooks
  8109. // on incorrect children. Instead we push them into a queue which will
  8110. // be processed after the whole patch process ended.
  8111. queueActivatedComponent(componentInstance);
  8112. } else {
  8113. activateChildComponent(componentInstance, true /* direct */);
  8114. }
  8115. }
  8116. },
  8117. destroy: function destroy (vnode) {
  8118. var componentInstance = vnode.componentInstance;
  8119. if (!componentInstance._isDestroyed) {
  8120. if (!vnode.data.keepAlive) {
  8121. componentInstance.$destroy();
  8122. } else {
  8123. deactivateChildComponent(componentInstance, true /* direct */);
  8124. }
  8125. }
  8126. }
  8127. };
  8128. var hooksToMerge = Object.keys(componentVNodeHooks);
  8129. function createComponent (
  8130. Ctor,
  8131. data,
  8132. context,
  8133. children,
  8134. tag
  8135. ) {
  8136. if (isUndef(Ctor)) {
  8137. return
  8138. }
  8139. var baseCtor = context.$options._base;
  8140. // plain options object: turn it into a constructor
  8141. if (isObject(Ctor)) {
  8142. Ctor = baseCtor.extend(Ctor);
  8143. }
  8144. // if at this stage it's not a constructor or an async component factory,
  8145. // reject.
  8146. if (typeof Ctor !== 'function') {
  8147. if (true) {
  8148. warn(("Invalid Component definition: " + (String(Ctor))), context);
  8149. }
  8150. return
  8151. }
  8152. // async component
  8153. var asyncFactory;
  8154. if (isUndef(Ctor.cid)) {
  8155. asyncFactory = Ctor;
  8156. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  8157. if (Ctor === undefined) {
  8158. // return a placeholder node for async component, which is rendered
  8159. // as a comment node but preserves all the raw information for the node.
  8160. // the information will be used for async server-rendering and hydration.
  8161. return createAsyncPlaceholder(
  8162. asyncFactory,
  8163. data,
  8164. context,
  8165. children,
  8166. tag
  8167. )
  8168. }
  8169. }
  8170. data = data || {};
  8171. // resolve constructor options in case global mixins are applied after
  8172. // component constructor creation
  8173. resolveConstructorOptions(Ctor);
  8174. // transform component v-model data into props & events
  8175. if (isDef(data.model)) {
  8176. transformModel(Ctor.options, data);
  8177. }
  8178. // extract props
  8179. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  8180. // functional component
  8181. if (isTrue(Ctor.options.functional)) {
  8182. return createFunctionalComponent(Ctor, propsData, data, context, children)
  8183. }
  8184. // extract listeners, since these needs to be treated as
  8185. // child component listeners instead of DOM listeners
  8186. var listeners = data.on;
  8187. // replace with listeners with .native modifier
  8188. // so it gets processed during parent component patch.
  8189. data.on = data.nativeOn;
  8190. if (isTrue(Ctor.options.abstract)) {
  8191. // abstract components do not keep anything
  8192. // other than props & listeners & slot
  8193. // work around flow
  8194. var slot = data.slot;
  8195. data = {};
  8196. if (slot) {
  8197. data.slot = slot;
  8198. }
  8199. }
  8200. // install component management hooks onto the placeholder node
  8201. installComponentHooks(data);
  8202. // return a placeholder vnode
  8203. var name = Ctor.options.name || tag;
  8204. var vnode = new VNode(
  8205. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  8206. data, undefined, undefined, undefined, context,
  8207. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  8208. asyncFactory
  8209. );
  8210. return vnode
  8211. }
  8212. function createComponentInstanceForVnode (
  8213. vnode, // we know it's MountedComponentVNode but flow doesn't
  8214. parent // activeInstance in lifecycle state
  8215. ) {
  8216. var options = {
  8217. _isComponent: true,
  8218. _parentVnode: vnode,
  8219. parent: parent
  8220. };
  8221. // check inline-template render functions
  8222. var inlineTemplate = vnode.data.inlineTemplate;
  8223. if (isDef(inlineTemplate)) {
  8224. options.render = inlineTemplate.render;
  8225. options.staticRenderFns = inlineTemplate.staticRenderFns;
  8226. }
  8227. return new vnode.componentOptions.Ctor(options)
  8228. }
  8229. function installComponentHooks (data) {
  8230. var hooks = data.hook || (data.hook = {});
  8231. for (var i = 0; i < hooksToMerge.length; i++) {
  8232. var key = hooksToMerge[i];
  8233. var existing = hooks[key];
  8234. var toMerge = componentVNodeHooks[key];
  8235. if (existing !== toMerge && !(existing && existing._merged)) {
  8236. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  8237. }
  8238. }
  8239. }
  8240. function mergeHook$1 (f1, f2) {
  8241. var merged = function (a, b) {
  8242. // flow complains about extra args which is why we use any
  8243. f1(a, b);
  8244. f2(a, b);
  8245. };
  8246. merged._merged = true;
  8247. return merged
  8248. }
  8249. // transform component v-model info (value and callback) into
  8250. // prop and event handler respectively.
  8251. function transformModel (options, data) {
  8252. var prop = (options.model && options.model.prop) || 'value';
  8253. var event = (options.model && options.model.event) || 'input'
  8254. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  8255. var on = data.on || (data.on = {});
  8256. var existing = on[event];
  8257. var callback = data.model.callback;
  8258. if (isDef(existing)) {
  8259. if (
  8260. Array.isArray(existing)
  8261. ? existing.indexOf(callback) === -1
  8262. : existing !== callback
  8263. ) {
  8264. on[event] = [callback].concat(existing);
  8265. }
  8266. } else {
  8267. on[event] = callback;
  8268. }
  8269. }
  8270. /* */
  8271. var SIMPLE_NORMALIZE = 1;
  8272. var ALWAYS_NORMALIZE = 2;
  8273. // wrapper function for providing a more flexible interface
  8274. // without getting yelled at by flow
  8275. function createElement (
  8276. context,
  8277. tag,
  8278. data,
  8279. children,
  8280. normalizationType,
  8281. alwaysNormalize
  8282. ) {
  8283. if (Array.isArray(data) || isPrimitive(data)) {
  8284. normalizationType = children;
  8285. children = data;
  8286. data = undefined;
  8287. }
  8288. if (isTrue(alwaysNormalize)) {
  8289. normalizationType = ALWAYS_NORMALIZE;
  8290. }
  8291. return _createElement(context, tag, data, children, normalizationType)
  8292. }
  8293. function _createElement (
  8294. context,
  8295. tag,
  8296. data,
  8297. children,
  8298. normalizationType
  8299. ) {
  8300. if (isDef(data) && isDef((data).__ob__)) {
  8301. true && warn(
  8302. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  8303. 'Always create fresh vnode data objects in each render!',
  8304. context
  8305. );
  8306. return createEmptyVNode()
  8307. }
  8308. // object syntax in v-bind
  8309. if (isDef(data) && isDef(data.is)) {
  8310. tag = data.is;
  8311. }
  8312. if (!tag) {
  8313. // in case of component :is set to falsy value
  8314. return createEmptyVNode()
  8315. }
  8316. // warn against non-primitive key
  8317. if ( true &&
  8318. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  8319. ) {
  8320. {
  8321. warn(
  8322. 'Avoid using non-primitive value as key, ' +
  8323. 'use string/number value instead.',
  8324. context
  8325. );
  8326. }
  8327. }
  8328. // support single function children as default scoped slot
  8329. if (Array.isArray(children) &&
  8330. typeof children[0] === 'function'
  8331. ) {
  8332. data = data || {};
  8333. data.scopedSlots = { default: children[0] };
  8334. children.length = 0;
  8335. }
  8336. if (normalizationType === ALWAYS_NORMALIZE) {
  8337. children = normalizeChildren(children);
  8338. } else if (normalizationType === SIMPLE_NORMALIZE) {
  8339. children = simpleNormalizeChildren(children);
  8340. }
  8341. var vnode, ns;
  8342. if (typeof tag === 'string') {
  8343. var Ctor;
  8344. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  8345. if (config.isReservedTag(tag)) {
  8346. // platform built-in elements
  8347. if ( true && isDef(data) && isDef(data.nativeOn)) {
  8348. warn(
  8349. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  8350. context
  8351. );
  8352. }
  8353. vnode = new VNode(
  8354. config.parsePlatformTagName(tag), data, children,
  8355. undefined, undefined, context
  8356. );
  8357. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  8358. // component
  8359. vnode = createComponent(Ctor, data, context, children, tag);
  8360. } else {
  8361. // unknown or unlisted namespaced elements
  8362. // check at runtime because it may get assigned a namespace when its
  8363. // parent normalizes children
  8364. vnode = new VNode(
  8365. tag, data, children,
  8366. undefined, undefined, context
  8367. );
  8368. }
  8369. } else {
  8370. // direct component options / constructor
  8371. vnode = createComponent(tag, data, context, children);
  8372. }
  8373. if (Array.isArray(vnode)) {
  8374. return vnode
  8375. } else if (isDef(vnode)) {
  8376. if (isDef(ns)) { applyNS(vnode, ns); }
  8377. if (isDef(data)) { registerDeepBindings(data); }
  8378. return vnode
  8379. } else {
  8380. return createEmptyVNode()
  8381. }
  8382. }
  8383. function applyNS (vnode, ns, force) {
  8384. vnode.ns = ns;
  8385. if (vnode.tag === 'foreignObject') {
  8386. // use default namespace inside foreignObject
  8387. ns = undefined;
  8388. force = true;
  8389. }
  8390. if (isDef(vnode.children)) {
  8391. for (var i = 0, l = vnode.children.length; i < l; i++) {
  8392. var child = vnode.children[i];
  8393. if (isDef(child.tag) && (
  8394. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  8395. applyNS(child, ns, force);
  8396. }
  8397. }
  8398. }
  8399. }
  8400. // ref #5318
  8401. // necessary to ensure parent re-render when deep bindings like :style and
  8402. // :class are used on slot nodes
  8403. function registerDeepBindings (data) {
  8404. if (isObject(data.style)) {
  8405. traverse(data.style);
  8406. }
  8407. if (isObject(data.class)) {
  8408. traverse(data.class);
  8409. }
  8410. }
  8411. /* */
  8412. function initRender (vm) {
  8413. vm._vnode = null; // the root of the child tree
  8414. vm._staticTrees = null; // v-once cached trees
  8415. var options = vm.$options;
  8416. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  8417. var renderContext = parentVnode && parentVnode.context;
  8418. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  8419. vm.$scopedSlots = emptyObject;
  8420. // bind the createElement fn to this instance
  8421. // so that we get proper render context inside it.
  8422. // args order: tag, data, children, normalizationType, alwaysNormalize
  8423. // internal version is used by render functions compiled from templates
  8424. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  8425. // normalization is always applied for the public version, used in
  8426. // user-written render functions.
  8427. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  8428. // $attrs & $listeners are exposed for easier HOC creation.
  8429. // they need to be reactive so that HOCs using them are always updated
  8430. var parentData = parentVnode && parentVnode.data;
  8431. /* istanbul ignore else */
  8432. if (true) {
  8433. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  8434. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  8435. }, true);
  8436. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  8437. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  8438. }, true);
  8439. } else {}
  8440. }
  8441. var currentRenderingInstance = null;
  8442. function renderMixin (Vue) {
  8443. // install runtime convenience helpers
  8444. installRenderHelpers(Vue.prototype);
  8445. Vue.prototype.$nextTick = function (fn) {
  8446. return nextTick(fn, this)
  8447. };
  8448. Vue.prototype._render = function () {
  8449. var vm = this;
  8450. var ref = vm.$options;
  8451. var render = ref.render;
  8452. var _parentVnode = ref._parentVnode;
  8453. if (_parentVnode) {
  8454. vm.$scopedSlots = normalizeScopedSlots(
  8455. _parentVnode.data.scopedSlots,
  8456. vm.$slots,
  8457. vm.$scopedSlots
  8458. );
  8459. }
  8460. // set parent vnode. this allows render functions to have access
  8461. // to the data on the placeholder node.
  8462. vm.$vnode = _parentVnode;
  8463. // render self
  8464. var vnode;
  8465. try {
  8466. // There's no need to maintain a stack because all render fns are called
  8467. // separately from one another. Nested component's render fns are called
  8468. // when parent component is patched.
  8469. currentRenderingInstance = vm;
  8470. vnode = render.call(vm._renderProxy, vm.$createElement);
  8471. } catch (e) {
  8472. handleError(e, vm, "render");
  8473. // return error render result,
  8474. // or previous vnode to prevent render error causing blank component
  8475. /* istanbul ignore else */
  8476. if ( true && vm.$options.renderError) {
  8477. try {
  8478. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  8479. } catch (e) {
  8480. handleError(e, vm, "renderError");
  8481. vnode = vm._vnode;
  8482. }
  8483. } else {
  8484. vnode = vm._vnode;
  8485. }
  8486. } finally {
  8487. currentRenderingInstance = null;
  8488. }
  8489. // if the returned array contains only a single node, allow it
  8490. if (Array.isArray(vnode) && vnode.length === 1) {
  8491. vnode = vnode[0];
  8492. }
  8493. // return empty vnode in case the render function errored out
  8494. if (!(vnode instanceof VNode)) {
  8495. if ( true && Array.isArray(vnode)) {
  8496. warn(
  8497. 'Multiple root nodes returned from render function. Render function ' +
  8498. 'should return a single root node.',
  8499. vm
  8500. );
  8501. }
  8502. vnode = createEmptyVNode();
  8503. }
  8504. // set parent
  8505. vnode.parent = _parentVnode;
  8506. return vnode
  8507. };
  8508. }
  8509. /* */
  8510. function ensureCtor (comp, base) {
  8511. if (
  8512. comp.__esModule ||
  8513. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  8514. ) {
  8515. comp = comp.default;
  8516. }
  8517. return isObject(comp)
  8518. ? base.extend(comp)
  8519. : comp
  8520. }
  8521. function createAsyncPlaceholder (
  8522. factory,
  8523. data,
  8524. context,
  8525. children,
  8526. tag
  8527. ) {
  8528. var node = createEmptyVNode();
  8529. node.asyncFactory = factory;
  8530. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  8531. return node
  8532. }
  8533. function resolveAsyncComponent (
  8534. factory,
  8535. baseCtor
  8536. ) {
  8537. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  8538. return factory.errorComp
  8539. }
  8540. if (isDef(factory.resolved)) {
  8541. return factory.resolved
  8542. }
  8543. var owner = currentRenderingInstance;
  8544. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  8545. // already pending
  8546. factory.owners.push(owner);
  8547. }
  8548. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  8549. return factory.loadingComp
  8550. }
  8551. if (owner && !isDef(factory.owners)) {
  8552. var owners = factory.owners = [owner];
  8553. var sync = true;
  8554. var timerLoading = null;
  8555. var timerTimeout = null
  8556. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  8557. var forceRender = function (renderCompleted) {
  8558. for (var i = 0, l = owners.length; i < l; i++) {
  8559. (owners[i]).$forceUpdate();
  8560. }
  8561. if (renderCompleted) {
  8562. owners.length = 0;
  8563. if (timerLoading !== null) {
  8564. clearTimeout(timerLoading);
  8565. timerLoading = null;
  8566. }
  8567. if (timerTimeout !== null) {
  8568. clearTimeout(timerTimeout);
  8569. timerTimeout = null;
  8570. }
  8571. }
  8572. };
  8573. var resolve = once(function (res) {
  8574. // cache resolved
  8575. factory.resolved = ensureCtor(res, baseCtor);
  8576. // invoke callbacks only if this is not a synchronous resolve
  8577. // (async resolves are shimmed as synchronous during SSR)
  8578. if (!sync) {
  8579. forceRender(true);
  8580. } else {
  8581. owners.length = 0;
  8582. }
  8583. });
  8584. var reject = once(function (reason) {
  8585. true && warn(
  8586. "Failed to resolve async component: " + (String(factory)) +
  8587. (reason ? ("\nReason: " + reason) : '')
  8588. );
  8589. if (isDef(factory.errorComp)) {
  8590. factory.error = true;
  8591. forceRender(true);
  8592. }
  8593. });
  8594. var res = factory(resolve, reject);
  8595. if (isObject(res)) {
  8596. if (isPromise(res)) {
  8597. // () => Promise
  8598. if (isUndef(factory.resolved)) {
  8599. res.then(resolve, reject);
  8600. }
  8601. } else if (isPromise(res.component)) {
  8602. res.component.then(resolve, reject);
  8603. if (isDef(res.error)) {
  8604. factory.errorComp = ensureCtor(res.error, baseCtor);
  8605. }
  8606. if (isDef(res.loading)) {
  8607. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  8608. if (res.delay === 0) {
  8609. factory.loading = true;
  8610. } else {
  8611. timerLoading = setTimeout(function () {
  8612. timerLoading = null;
  8613. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  8614. factory.loading = true;
  8615. forceRender(false);
  8616. }
  8617. }, res.delay || 200);
  8618. }
  8619. }
  8620. if (isDef(res.timeout)) {
  8621. timerTimeout = setTimeout(function () {
  8622. timerTimeout = null;
  8623. if (isUndef(factory.resolved)) {
  8624. reject(
  8625. true
  8626. ? ("timeout (" + (res.timeout) + "ms)")
  8627. : undefined
  8628. );
  8629. }
  8630. }, res.timeout);
  8631. }
  8632. }
  8633. }
  8634. sync = false;
  8635. // return in case resolved synchronously
  8636. return factory.loading
  8637. ? factory.loadingComp
  8638. : factory.resolved
  8639. }
  8640. }
  8641. /* */
  8642. function isAsyncPlaceholder (node) {
  8643. return node.isComment && node.asyncFactory
  8644. }
  8645. /* */
  8646. function getFirstComponentChild (children) {
  8647. if (Array.isArray(children)) {
  8648. for (var i = 0; i < children.length; i++) {
  8649. var c = children[i];
  8650. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  8651. return c
  8652. }
  8653. }
  8654. }
  8655. }
  8656. /* */
  8657. /* */
  8658. function initEvents (vm) {
  8659. vm._events = Object.create(null);
  8660. vm._hasHookEvent = false;
  8661. // init parent attached events
  8662. var listeners = vm.$options._parentListeners;
  8663. if (listeners) {
  8664. updateComponentListeners(vm, listeners);
  8665. }
  8666. }
  8667. var target;
  8668. function add (event, fn) {
  8669. target.$on(event, fn);
  8670. }
  8671. function remove$1 (event, fn) {
  8672. target.$off(event, fn);
  8673. }
  8674. function createOnceHandler (event, fn) {
  8675. var _target = target;
  8676. return function onceHandler () {
  8677. var res = fn.apply(null, arguments);
  8678. if (res !== null) {
  8679. _target.$off(event, onceHandler);
  8680. }
  8681. }
  8682. }
  8683. function updateComponentListeners (
  8684. vm,
  8685. listeners,
  8686. oldListeners
  8687. ) {
  8688. target = vm;
  8689. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  8690. target = undefined;
  8691. }
  8692. function eventsMixin (Vue) {
  8693. var hookRE = /^hook:/;
  8694. Vue.prototype.$on = function (event, fn) {
  8695. var vm = this;
  8696. if (Array.isArray(event)) {
  8697. for (var i = 0, l = event.length; i < l; i++) {
  8698. vm.$on(event[i], fn);
  8699. }
  8700. } else {
  8701. (vm._events[event] || (vm._events[event] = [])).push(fn);
  8702. // optimize hook:event cost by using a boolean flag marked at registration
  8703. // instead of a hash lookup
  8704. if (hookRE.test(event)) {
  8705. vm._hasHookEvent = true;
  8706. }
  8707. }
  8708. return vm
  8709. };
  8710. Vue.prototype.$once = function (event, fn) {
  8711. var vm = this;
  8712. function on () {
  8713. vm.$off(event, on);
  8714. fn.apply(vm, arguments);
  8715. }
  8716. on.fn = fn;
  8717. vm.$on(event, on);
  8718. return vm
  8719. };
  8720. Vue.prototype.$off = function (event, fn) {
  8721. var vm = this;
  8722. // all
  8723. if (!arguments.length) {
  8724. vm._events = Object.create(null);
  8725. return vm
  8726. }
  8727. // array of events
  8728. if (Array.isArray(event)) {
  8729. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  8730. vm.$off(event[i$1], fn);
  8731. }
  8732. return vm
  8733. }
  8734. // specific event
  8735. var cbs = vm._events[event];
  8736. if (!cbs) {
  8737. return vm
  8738. }
  8739. if (!fn) {
  8740. vm._events[event] = null;
  8741. return vm
  8742. }
  8743. // specific handler
  8744. var cb;
  8745. var i = cbs.length;
  8746. while (i--) {
  8747. cb = cbs[i];
  8748. if (cb === fn || cb.fn === fn) {
  8749. cbs.splice(i, 1);
  8750. break
  8751. }
  8752. }
  8753. return vm
  8754. };
  8755. Vue.prototype.$emit = function (event) {
  8756. var vm = this;
  8757. if (true) {
  8758. var lowerCaseEvent = event.toLowerCase();
  8759. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  8760. tip(
  8761. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  8762. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  8763. "Note that HTML attributes are case-insensitive and you cannot use " +
  8764. "v-on to listen to camelCase events when using in-DOM templates. " +
  8765. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  8766. );
  8767. }
  8768. }
  8769. var cbs = vm._events[event];
  8770. if (cbs) {
  8771. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  8772. var args = toArray(arguments, 1);
  8773. var info = "event handler for \"" + event + "\"";
  8774. for (var i = 0, l = cbs.length; i < l; i++) {
  8775. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  8776. }
  8777. }
  8778. return vm
  8779. };
  8780. }
  8781. /* */
  8782. var activeInstance = null;
  8783. var isUpdatingChildComponent = false;
  8784. function setActiveInstance(vm) {
  8785. var prevActiveInstance = activeInstance;
  8786. activeInstance = vm;
  8787. return function () {
  8788. activeInstance = prevActiveInstance;
  8789. }
  8790. }
  8791. function initLifecycle (vm) {
  8792. var options = vm.$options;
  8793. // locate first non-abstract parent
  8794. var parent = options.parent;
  8795. if (parent && !options.abstract) {
  8796. while (parent.$options.abstract && parent.$parent) {
  8797. parent = parent.$parent;
  8798. }
  8799. parent.$children.push(vm);
  8800. }
  8801. vm.$parent = parent;
  8802. vm.$root = parent ? parent.$root : vm;
  8803. vm.$children = [];
  8804. vm.$refs = {};
  8805. vm._watcher = null;
  8806. vm._inactive = null;
  8807. vm._directInactive = false;
  8808. vm._isMounted = false;
  8809. vm._isDestroyed = false;
  8810. vm._isBeingDestroyed = false;
  8811. }
  8812. function lifecycleMixin (Vue) {
  8813. Vue.prototype._update = function (vnode, hydrating) {
  8814. var vm = this;
  8815. var prevEl = vm.$el;
  8816. var prevVnode = vm._vnode;
  8817. var restoreActiveInstance = setActiveInstance(vm);
  8818. vm._vnode = vnode;
  8819. // Vue.prototype.__patch__ is injected in entry points
  8820. // based on the rendering backend used.
  8821. if (!prevVnode) {
  8822. // initial render
  8823. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  8824. } else {
  8825. // updates
  8826. vm.$el = vm.__patch__(prevVnode, vnode);
  8827. }
  8828. restoreActiveInstance();
  8829. // update __vue__ reference
  8830. if (prevEl) {
  8831. prevEl.__vue__ = null;
  8832. }
  8833. if (vm.$el) {
  8834. vm.$el.__vue__ = vm;
  8835. }
  8836. // if parent is an HOC, update its $el as well
  8837. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  8838. vm.$parent.$el = vm.$el;
  8839. }
  8840. // updated hook is called by the scheduler to ensure that children are
  8841. // updated in a parent's updated hook.
  8842. };
  8843. Vue.prototype.$forceUpdate = function () {
  8844. var vm = this;
  8845. if (vm._watcher) {
  8846. vm._watcher.update();
  8847. }
  8848. };
  8849. Vue.prototype.$destroy = function () {
  8850. var vm = this;
  8851. if (vm._isBeingDestroyed) {
  8852. return
  8853. }
  8854. callHook(vm, 'beforeDestroy');
  8855. vm._isBeingDestroyed = true;
  8856. // remove self from parent
  8857. var parent = vm.$parent;
  8858. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  8859. remove(parent.$children, vm);
  8860. }
  8861. // teardown watchers
  8862. if (vm._watcher) {
  8863. vm._watcher.teardown();
  8864. }
  8865. var i = vm._watchers.length;
  8866. while (i--) {
  8867. vm._watchers[i].teardown();
  8868. }
  8869. // remove reference from data ob
  8870. // frozen object may not have observer.
  8871. if (vm._data.__ob__) {
  8872. vm._data.__ob__.vmCount--;
  8873. }
  8874. // call the last hook...
  8875. vm._isDestroyed = true;
  8876. // invoke destroy hooks on current rendered tree
  8877. vm.__patch__(vm._vnode, null);
  8878. // fire destroyed hook
  8879. callHook(vm, 'destroyed');
  8880. // turn off all instance listeners.
  8881. vm.$off();
  8882. // remove __vue__ reference
  8883. if (vm.$el) {
  8884. vm.$el.__vue__ = null;
  8885. }
  8886. // release circular reference (#6759)
  8887. if (vm.$vnode) {
  8888. vm.$vnode.parent = null;
  8889. }
  8890. };
  8891. }
  8892. function updateChildComponent (
  8893. vm,
  8894. propsData,
  8895. listeners,
  8896. parentVnode,
  8897. renderChildren
  8898. ) {
  8899. if (true) {
  8900. isUpdatingChildComponent = true;
  8901. }
  8902. // determine whether component has slot children
  8903. // we need to do this before overwriting $options._renderChildren.
  8904. // check if there are dynamic scopedSlots (hand-written or compiled but with
  8905. // dynamic slot names). Static scoped slots compiled from template has the
  8906. // "$stable" marker.
  8907. var newScopedSlots = parentVnode.data.scopedSlots;
  8908. var oldScopedSlots = vm.$scopedSlots;
  8909. var hasDynamicScopedSlot = !!(
  8910. (newScopedSlots && !newScopedSlots.$stable) ||
  8911. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  8912. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  8913. );
  8914. // Any static slot children from the parent may have changed during parent's
  8915. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  8916. // update is necessary to ensure correctness.
  8917. var needsForceUpdate = !!(
  8918. renderChildren || // has new static slots
  8919. vm.$options._renderChildren || // has old static slots
  8920. hasDynamicScopedSlot
  8921. );
  8922. vm.$options._parentVnode = parentVnode;
  8923. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  8924. if (vm._vnode) { // update child tree's parent
  8925. vm._vnode.parent = parentVnode;
  8926. }
  8927. vm.$options._renderChildren = renderChildren;
  8928. // update $attrs and $listeners hash
  8929. // these are also reactive so they may trigger child update if the child
  8930. // used them during render
  8931. vm.$attrs = parentVnode.data.attrs || emptyObject;
  8932. vm.$listeners = listeners || emptyObject;
  8933. // update props
  8934. if (propsData && vm.$options.props) {
  8935. toggleObserving(false);
  8936. var props = vm._props;
  8937. var propKeys = vm.$options._propKeys || [];
  8938. for (var i = 0; i < propKeys.length; i++) {
  8939. var key = propKeys[i];
  8940. var propOptions = vm.$options.props; // wtf flow?
  8941. props[key] = validateProp(key, propOptions, propsData, vm);
  8942. }
  8943. toggleObserving(true);
  8944. // keep a copy of raw propsData
  8945. vm.$options.propsData = propsData;
  8946. }
  8947. // fixed by xxxxxx update properties(mp runtime)
  8948. vm._$updateProperties && vm._$updateProperties(vm);
  8949. // update listeners
  8950. listeners = listeners || emptyObject;
  8951. var oldListeners = vm.$options._parentListeners;
  8952. vm.$options._parentListeners = listeners;
  8953. updateComponentListeners(vm, listeners, oldListeners);
  8954. // resolve slots + force update if has children
  8955. if (needsForceUpdate) {
  8956. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  8957. vm.$forceUpdate();
  8958. }
  8959. if (true) {
  8960. isUpdatingChildComponent = false;
  8961. }
  8962. }
  8963. function isInInactiveTree (vm) {
  8964. while (vm && (vm = vm.$parent)) {
  8965. if (vm._inactive) { return true }
  8966. }
  8967. return false
  8968. }
  8969. function activateChildComponent (vm, direct) {
  8970. if (direct) {
  8971. vm._directInactive = false;
  8972. if (isInInactiveTree(vm)) {
  8973. return
  8974. }
  8975. } else if (vm._directInactive) {
  8976. return
  8977. }
  8978. if (vm._inactive || vm._inactive === null) {
  8979. vm._inactive = false;
  8980. for (var i = 0; i < vm.$children.length; i++) {
  8981. activateChildComponent(vm.$children[i]);
  8982. }
  8983. callHook(vm, 'activated');
  8984. }
  8985. }
  8986. function deactivateChildComponent (vm, direct) {
  8987. if (direct) {
  8988. vm._directInactive = true;
  8989. if (isInInactiveTree(vm)) {
  8990. return
  8991. }
  8992. }
  8993. if (!vm._inactive) {
  8994. vm._inactive = true;
  8995. for (var i = 0; i < vm.$children.length; i++) {
  8996. deactivateChildComponent(vm.$children[i]);
  8997. }
  8998. callHook(vm, 'deactivated');
  8999. }
  9000. }
  9001. function callHook (vm, hook) {
  9002. // #7573 disable dep collection when invoking lifecycle hooks
  9003. pushTarget();
  9004. var handlers = vm.$options[hook];
  9005. var info = hook + " hook";
  9006. if (handlers) {
  9007. for (var i = 0, j = handlers.length; i < j; i++) {
  9008. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  9009. }
  9010. }
  9011. if (vm._hasHookEvent) {
  9012. vm.$emit('hook:' + hook);
  9013. }
  9014. popTarget();
  9015. }
  9016. /* */
  9017. var MAX_UPDATE_COUNT = 100;
  9018. var queue = [];
  9019. var activatedChildren = [];
  9020. var has = {};
  9021. var circular = {};
  9022. var waiting = false;
  9023. var flushing = false;
  9024. var index = 0;
  9025. /**
  9026. * Reset the scheduler's state.
  9027. */
  9028. function resetSchedulerState () {
  9029. index = queue.length = activatedChildren.length = 0;
  9030. has = {};
  9031. if (true) {
  9032. circular = {};
  9033. }
  9034. waiting = flushing = false;
  9035. }
  9036. // Async edge case #6566 requires saving the timestamp when event listeners are
  9037. // attached. However, calling performance.now() has a perf overhead especially
  9038. // if the page has thousands of event listeners. Instead, we take a timestamp
  9039. // every time the scheduler flushes and use that for all event listeners
  9040. // attached during that flush.
  9041. var currentFlushTimestamp = 0;
  9042. // Async edge case fix requires storing an event listener's attach timestamp.
  9043. var getNow = Date.now;
  9044. // Determine what event timestamp the browser is using. Annoyingly, the
  9045. // timestamp can either be hi-res (relative to page load) or low-res
  9046. // (relative to UNIX epoch), so in order to compare time we have to use the
  9047. // same timestamp type when saving the flush timestamp.
  9048. // All IE versions use low-res event timestamps, and have problematic clock
  9049. // implementations (#9632)
  9050. if (inBrowser && !isIE) {
  9051. var performance = window.performance;
  9052. if (
  9053. performance &&
  9054. typeof performance.now === 'function' &&
  9055. getNow() > document.createEvent('Event').timeStamp
  9056. ) {
  9057. // if the event timestamp, although evaluated AFTER the Date.now(), is
  9058. // smaller than it, it means the event is using a hi-res timestamp,
  9059. // and we need to use the hi-res version for event listener timestamps as
  9060. // well.
  9061. getNow = function () { return performance.now(); };
  9062. }
  9063. }
  9064. /**
  9065. * Flush both queues and run the watchers.
  9066. */
  9067. function flushSchedulerQueue () {
  9068. currentFlushTimestamp = getNow();
  9069. flushing = true;
  9070. var watcher, id;
  9071. // Sort queue before flush.
  9072. // This ensures that:
  9073. // 1. Components are updated from parent to child. (because parent is always
  9074. // created before the child)
  9075. // 2. A component's user watchers are run before its render watcher (because
  9076. // user watchers are created before the render watcher)
  9077. // 3. If a component is destroyed during a parent component's watcher run,
  9078. // its watchers can be skipped.
  9079. queue.sort(function (a, b) { return a.id - b.id; });
  9080. // do not cache length because more watchers might be pushed
  9081. // as we run existing watchers
  9082. for (index = 0; index < queue.length; index++) {
  9083. watcher = queue[index];
  9084. if (watcher.before) {
  9085. watcher.before();
  9086. }
  9087. id = watcher.id;
  9088. has[id] = null;
  9089. watcher.run();
  9090. // in dev build, check and stop circular updates.
  9091. if ( true && has[id] != null) {
  9092. circular[id] = (circular[id] || 0) + 1;
  9093. if (circular[id] > MAX_UPDATE_COUNT) {
  9094. warn(
  9095. 'You may have an infinite update loop ' + (
  9096. watcher.user
  9097. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  9098. : "in a component render function."
  9099. ),
  9100. watcher.vm
  9101. );
  9102. break
  9103. }
  9104. }
  9105. }
  9106. // keep copies of post queues before resetting state
  9107. var activatedQueue = activatedChildren.slice();
  9108. var updatedQueue = queue.slice();
  9109. resetSchedulerState();
  9110. // call component updated and activated hooks
  9111. callActivatedHooks(activatedQueue);
  9112. callUpdatedHooks(updatedQueue);
  9113. // devtool hook
  9114. /* istanbul ignore if */
  9115. if (devtools && config.devtools) {
  9116. devtools.emit('flush');
  9117. }
  9118. }
  9119. function callUpdatedHooks (queue) {
  9120. var i = queue.length;
  9121. while (i--) {
  9122. var watcher = queue[i];
  9123. var vm = watcher.vm;
  9124. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  9125. callHook(vm, 'updated');
  9126. }
  9127. }
  9128. }
  9129. /**
  9130. * Queue a kept-alive component that was activated during patch.
  9131. * The queue will be processed after the entire tree has been patched.
  9132. */
  9133. function queueActivatedComponent (vm) {
  9134. // setting _inactive to false here so that a render function can
  9135. // rely on checking whether it's in an inactive tree (e.g. router-view)
  9136. vm._inactive = false;
  9137. activatedChildren.push(vm);
  9138. }
  9139. function callActivatedHooks (queue) {
  9140. for (var i = 0; i < queue.length; i++) {
  9141. queue[i]._inactive = true;
  9142. activateChildComponent(queue[i], true /* true */);
  9143. }
  9144. }
  9145. /**
  9146. * Push a watcher into the watcher queue.
  9147. * Jobs with duplicate IDs will be skipped unless it's
  9148. * pushed when the queue is being flushed.
  9149. */
  9150. function queueWatcher (watcher) {
  9151. var id = watcher.id;
  9152. if (has[id] == null) {
  9153. has[id] = true;
  9154. if (!flushing) {
  9155. queue.push(watcher);
  9156. } else {
  9157. // if already flushing, splice the watcher based on its id
  9158. // if already past its id, it will be run next immediately.
  9159. var i = queue.length - 1;
  9160. while (i > index && queue[i].id > watcher.id) {
  9161. i--;
  9162. }
  9163. queue.splice(i + 1, 0, watcher);
  9164. }
  9165. // queue the flush
  9166. if (!waiting) {
  9167. waiting = true;
  9168. if ( true && !config.async) {
  9169. flushSchedulerQueue();
  9170. return
  9171. }
  9172. nextTick(flushSchedulerQueue);
  9173. }
  9174. }
  9175. }
  9176. /* */
  9177. var uid$2 = 0;
  9178. /**
  9179. * A watcher parses an expression, collects dependencies,
  9180. * and fires callback when the expression value changes.
  9181. * This is used for both the $watch() api and directives.
  9182. */
  9183. var Watcher = function Watcher (
  9184. vm,
  9185. expOrFn,
  9186. cb,
  9187. options,
  9188. isRenderWatcher
  9189. ) {
  9190. this.vm = vm;
  9191. if (isRenderWatcher) {
  9192. vm._watcher = this;
  9193. }
  9194. vm._watchers.push(this);
  9195. // options
  9196. if (options) {
  9197. this.deep = !!options.deep;
  9198. this.user = !!options.user;
  9199. this.lazy = !!options.lazy;
  9200. this.sync = !!options.sync;
  9201. this.before = options.before;
  9202. } else {
  9203. this.deep = this.user = this.lazy = this.sync = false;
  9204. }
  9205. this.cb = cb;
  9206. this.id = ++uid$2; // uid for batching
  9207. this.active = true;
  9208. this.dirty = this.lazy; // for lazy watchers
  9209. this.deps = [];
  9210. this.newDeps = [];
  9211. this.depIds = new _Set();
  9212. this.newDepIds = new _Set();
  9213. this.expression = true
  9214. ? expOrFn.toString()
  9215. : undefined;
  9216. // parse expression for getter
  9217. if (typeof expOrFn === 'function') {
  9218. this.getter = expOrFn;
  9219. } else {
  9220. this.getter = parsePath(expOrFn);
  9221. if (!this.getter) {
  9222. this.getter = noop;
  9223. true && warn(
  9224. "Failed watching path: \"" + expOrFn + "\" " +
  9225. 'Watcher only accepts simple dot-delimited paths. ' +
  9226. 'For full control, use a function instead.',
  9227. vm
  9228. );
  9229. }
  9230. }
  9231. this.value = this.lazy
  9232. ? undefined
  9233. : this.get();
  9234. };
  9235. /**
  9236. * Evaluate the getter, and re-collect dependencies.
  9237. */
  9238. Watcher.prototype.get = function get () {
  9239. pushTarget(this);
  9240. var value;
  9241. var vm = this.vm;
  9242. try {
  9243. value = this.getter.call(vm, vm);
  9244. } catch (e) {
  9245. if (this.user) {
  9246. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  9247. } else {
  9248. throw e
  9249. }
  9250. } finally {
  9251. // "touch" every property so they are all tracked as
  9252. // dependencies for deep watching
  9253. if (this.deep) {
  9254. traverse(value);
  9255. }
  9256. popTarget();
  9257. this.cleanupDeps();
  9258. }
  9259. return value
  9260. };
  9261. /**
  9262. * Add a dependency to this directive.
  9263. */
  9264. Watcher.prototype.addDep = function addDep (dep) {
  9265. var id = dep.id;
  9266. if (!this.newDepIds.has(id)) {
  9267. this.newDepIds.add(id);
  9268. this.newDeps.push(dep);
  9269. if (!this.depIds.has(id)) {
  9270. dep.addSub(this);
  9271. }
  9272. }
  9273. };
  9274. /**
  9275. * Clean up for dependency collection.
  9276. */
  9277. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  9278. var i = this.deps.length;
  9279. while (i--) {
  9280. var dep = this.deps[i];
  9281. if (!this.newDepIds.has(dep.id)) {
  9282. dep.removeSub(this);
  9283. }
  9284. }
  9285. var tmp = this.depIds;
  9286. this.depIds = this.newDepIds;
  9287. this.newDepIds = tmp;
  9288. this.newDepIds.clear();
  9289. tmp = this.deps;
  9290. this.deps = this.newDeps;
  9291. this.newDeps = tmp;
  9292. this.newDeps.length = 0;
  9293. };
  9294. /**
  9295. * Subscriber interface.
  9296. * Will be called when a dependency changes.
  9297. */
  9298. Watcher.prototype.update = function update () {
  9299. /* istanbul ignore else */
  9300. if (this.lazy) {
  9301. this.dirty = true;
  9302. } else if (this.sync) {
  9303. this.run();
  9304. } else {
  9305. queueWatcher(this);
  9306. }
  9307. };
  9308. /**
  9309. * Scheduler job interface.
  9310. * Will be called by the scheduler.
  9311. */
  9312. Watcher.prototype.run = function run () {
  9313. if (this.active) {
  9314. var value = this.get();
  9315. if (
  9316. value !== this.value ||
  9317. // Deep watchers and watchers on Object/Arrays should fire even
  9318. // when the value is the same, because the value may
  9319. // have mutated.
  9320. isObject(value) ||
  9321. this.deep
  9322. ) {
  9323. // set new value
  9324. var oldValue = this.value;
  9325. this.value = value;
  9326. if (this.user) {
  9327. try {
  9328. this.cb.call(this.vm, value, oldValue);
  9329. } catch (e) {
  9330. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  9331. }
  9332. } else {
  9333. this.cb.call(this.vm, value, oldValue);
  9334. }
  9335. }
  9336. }
  9337. };
  9338. /**
  9339. * Evaluate the value of the watcher.
  9340. * This only gets called for lazy watchers.
  9341. */
  9342. Watcher.prototype.evaluate = function evaluate () {
  9343. this.value = this.get();
  9344. this.dirty = false;
  9345. };
  9346. /**
  9347. * Depend on all deps collected by this watcher.
  9348. */
  9349. Watcher.prototype.depend = function depend () {
  9350. var i = this.deps.length;
  9351. while (i--) {
  9352. this.deps[i].depend();
  9353. }
  9354. };
  9355. /**
  9356. * Remove self from all dependencies' subscriber list.
  9357. */
  9358. Watcher.prototype.teardown = function teardown () {
  9359. if (this.active) {
  9360. // remove self from vm's watcher list
  9361. // this is a somewhat expensive operation so we skip it
  9362. // if the vm is being destroyed.
  9363. if (!this.vm._isBeingDestroyed) {
  9364. remove(this.vm._watchers, this);
  9365. }
  9366. var i = this.deps.length;
  9367. while (i--) {
  9368. this.deps[i].removeSub(this);
  9369. }
  9370. this.active = false;
  9371. }
  9372. };
  9373. /* */
  9374. var sharedPropertyDefinition = {
  9375. enumerable: true,
  9376. configurable: true,
  9377. get: noop,
  9378. set: noop
  9379. };
  9380. function proxy (target, sourceKey, key) {
  9381. sharedPropertyDefinition.get = function proxyGetter () {
  9382. return this[sourceKey][key]
  9383. };
  9384. sharedPropertyDefinition.set = function proxySetter (val) {
  9385. this[sourceKey][key] = val;
  9386. };
  9387. Object.defineProperty(target, key, sharedPropertyDefinition);
  9388. }
  9389. function initState (vm) {
  9390. vm._watchers = [];
  9391. var opts = vm.$options;
  9392. if (opts.props) { initProps(vm, opts.props); }
  9393. if (opts.methods) { initMethods(vm, opts.methods); }
  9394. if (opts.data) {
  9395. initData(vm);
  9396. } else {
  9397. observe(vm._data = {}, true /* asRootData */);
  9398. }
  9399. if (opts.computed) { initComputed(vm, opts.computed); }
  9400. if (opts.watch && opts.watch !== nativeWatch) {
  9401. initWatch(vm, opts.watch);
  9402. }
  9403. }
  9404. function initProps (vm, propsOptions) {
  9405. var propsData = vm.$options.propsData || {};
  9406. var props = vm._props = {};
  9407. // cache prop keys so that future props updates can iterate using Array
  9408. // instead of dynamic object key enumeration.
  9409. var keys = vm.$options._propKeys = [];
  9410. var isRoot = !vm.$parent;
  9411. // root instance props should be converted
  9412. if (!isRoot) {
  9413. toggleObserving(false);
  9414. }
  9415. var loop = function ( key ) {
  9416. keys.push(key);
  9417. var value = validateProp(key, propsOptions, propsData, vm);
  9418. /* istanbul ignore else */
  9419. if (true) {
  9420. var hyphenatedKey = hyphenate(key);
  9421. if (isReservedAttribute(hyphenatedKey) ||
  9422. config.isReservedAttr(hyphenatedKey)) {
  9423. warn(
  9424. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  9425. vm
  9426. );
  9427. }
  9428. defineReactive$$1(props, key, value, function () {
  9429. if (!isRoot && !isUpdatingChildComponent) {
  9430. {
  9431. if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou' || vm.mpHost === 'mp-xhs'){//百度、快手、小红书 observer 在 setData callback 之后触发,直接忽略该 warn
  9432. return
  9433. }
  9434. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  9435. if(
  9436. key === 'value' &&
  9437. Array.isArray(vm.$options.behaviors) &&
  9438. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  9439. ){
  9440. return
  9441. }
  9442. if(vm._getFormData){
  9443. return
  9444. }
  9445. var $parent = vm.$parent;
  9446. while($parent){
  9447. if($parent.__next_tick_pending){
  9448. return
  9449. }
  9450. $parent = $parent.$parent;
  9451. }
  9452. }
  9453. warn(
  9454. "Avoid mutating a prop directly since the value will be " +
  9455. "overwritten whenever the parent component re-renders. " +
  9456. "Instead, use a data or computed property based on the prop's " +
  9457. "value. Prop being mutated: \"" + key + "\"",
  9458. vm
  9459. );
  9460. }
  9461. });
  9462. } else {}
  9463. // static props are already proxied on the component's prototype
  9464. // during Vue.extend(). We only need to proxy props defined at
  9465. // instantiation here.
  9466. if (!(key in vm)) {
  9467. proxy(vm, "_props", key);
  9468. }
  9469. };
  9470. for (var key in propsOptions) loop( key );
  9471. toggleObserving(true);
  9472. }
  9473. function initData (vm) {
  9474. var data = vm.$options.data;
  9475. data = vm._data = typeof data === 'function'
  9476. ? getData(data, vm)
  9477. : data || {};
  9478. if (!isPlainObject(data)) {
  9479. data = {};
  9480. true && warn(
  9481. 'data functions should return an object:\n' +
  9482. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  9483. vm
  9484. );
  9485. }
  9486. // proxy data on instance
  9487. var keys = Object.keys(data);
  9488. var props = vm.$options.props;
  9489. var methods = vm.$options.methods;
  9490. var i = keys.length;
  9491. while (i--) {
  9492. var key = keys[i];
  9493. if (true) {
  9494. if (methods && hasOwn(methods, key)) {
  9495. warn(
  9496. ("Method \"" + key + "\" has already been defined as a data property."),
  9497. vm
  9498. );
  9499. }
  9500. }
  9501. if (props && hasOwn(props, key)) {
  9502. true && warn(
  9503. "The data property \"" + key + "\" is already declared as a prop. " +
  9504. "Use prop default value instead.",
  9505. vm
  9506. );
  9507. } else if (!isReserved(key)) {
  9508. proxy(vm, "_data", key);
  9509. }
  9510. }
  9511. // observe data
  9512. observe(data, true /* asRootData */);
  9513. }
  9514. function getData (data, vm) {
  9515. // #7573 disable dep collection when invoking data getters
  9516. pushTarget();
  9517. try {
  9518. return data.call(vm, vm)
  9519. } catch (e) {
  9520. handleError(e, vm, "data()");
  9521. return {}
  9522. } finally {
  9523. popTarget();
  9524. }
  9525. }
  9526. var computedWatcherOptions = { lazy: true };
  9527. function initComputed (vm, computed) {
  9528. // $flow-disable-line
  9529. var watchers = vm._computedWatchers = Object.create(null);
  9530. // computed properties are just getters during SSR
  9531. var isSSR = isServerRendering();
  9532. for (var key in computed) {
  9533. var userDef = computed[key];
  9534. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  9535. if ( true && getter == null) {
  9536. warn(
  9537. ("Getter is missing for computed property \"" + key + "\"."),
  9538. vm
  9539. );
  9540. }
  9541. if (!isSSR) {
  9542. // create internal watcher for the computed property.
  9543. watchers[key] = new Watcher(
  9544. vm,
  9545. getter || noop,
  9546. noop,
  9547. computedWatcherOptions
  9548. );
  9549. }
  9550. // component-defined computed properties are already defined on the
  9551. // component prototype. We only need to define computed properties defined
  9552. // at instantiation here.
  9553. if (!(key in vm)) {
  9554. defineComputed(vm, key, userDef);
  9555. } else if (true) {
  9556. if (key in vm.$data) {
  9557. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  9558. } else if (vm.$options.props && key in vm.$options.props) {
  9559. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  9560. }
  9561. }
  9562. }
  9563. }
  9564. function defineComputed (
  9565. target,
  9566. key,
  9567. userDef
  9568. ) {
  9569. var shouldCache = !isServerRendering();
  9570. if (typeof userDef === 'function') {
  9571. sharedPropertyDefinition.get = shouldCache
  9572. ? createComputedGetter(key)
  9573. : createGetterInvoker(userDef);
  9574. sharedPropertyDefinition.set = noop;
  9575. } else {
  9576. sharedPropertyDefinition.get = userDef.get
  9577. ? shouldCache && userDef.cache !== false
  9578. ? createComputedGetter(key)
  9579. : createGetterInvoker(userDef.get)
  9580. : noop;
  9581. sharedPropertyDefinition.set = userDef.set || noop;
  9582. }
  9583. if ( true &&
  9584. sharedPropertyDefinition.set === noop) {
  9585. sharedPropertyDefinition.set = function () {
  9586. warn(
  9587. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  9588. this
  9589. );
  9590. };
  9591. }
  9592. Object.defineProperty(target, key, sharedPropertyDefinition);
  9593. }
  9594. function createComputedGetter (key) {
  9595. return function computedGetter () {
  9596. var watcher = this._computedWatchers && this._computedWatchers[key];
  9597. if (watcher) {
  9598. if (watcher.dirty) {
  9599. watcher.evaluate();
  9600. }
  9601. if (Dep.SharedObject.target) {// fixed by xxxxxx
  9602. watcher.depend();
  9603. }
  9604. return watcher.value
  9605. }
  9606. }
  9607. }
  9608. function createGetterInvoker(fn) {
  9609. return function computedGetter () {
  9610. return fn.call(this, this)
  9611. }
  9612. }
  9613. function initMethods (vm, methods) {
  9614. var props = vm.$options.props;
  9615. for (var key in methods) {
  9616. if (true) {
  9617. if (typeof methods[key] !== 'function') {
  9618. warn(
  9619. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  9620. "Did you reference the function correctly?",
  9621. vm
  9622. );
  9623. }
  9624. if (props && hasOwn(props, key)) {
  9625. warn(
  9626. ("Method \"" + key + "\" has already been defined as a prop."),
  9627. vm
  9628. );
  9629. }
  9630. if ((key in vm) && isReserved(key)) {
  9631. warn(
  9632. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  9633. "Avoid defining component methods that start with _ or $."
  9634. );
  9635. }
  9636. }
  9637. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  9638. }
  9639. }
  9640. function initWatch (vm, watch) {
  9641. for (var key in watch) {
  9642. var handler = watch[key];
  9643. if (Array.isArray(handler)) {
  9644. for (var i = 0; i < handler.length; i++) {
  9645. createWatcher(vm, key, handler[i]);
  9646. }
  9647. } else {
  9648. createWatcher(vm, key, handler);
  9649. }
  9650. }
  9651. }
  9652. function createWatcher (
  9653. vm,
  9654. expOrFn,
  9655. handler,
  9656. options
  9657. ) {
  9658. if (isPlainObject(handler)) {
  9659. options = handler;
  9660. handler = handler.handler;
  9661. }
  9662. if (typeof handler === 'string') {
  9663. handler = vm[handler];
  9664. }
  9665. return vm.$watch(expOrFn, handler, options)
  9666. }
  9667. function stateMixin (Vue) {
  9668. // flow somehow has problems with directly declared definition object
  9669. // when using Object.defineProperty, so we have to procedurally build up
  9670. // the object here.
  9671. var dataDef = {};
  9672. dataDef.get = function () { return this._data };
  9673. var propsDef = {};
  9674. propsDef.get = function () { return this._props };
  9675. if (true) {
  9676. dataDef.set = function () {
  9677. warn(
  9678. 'Avoid replacing instance root $data. ' +
  9679. 'Use nested data properties instead.',
  9680. this
  9681. );
  9682. };
  9683. propsDef.set = function () {
  9684. warn("$props is readonly.", this);
  9685. };
  9686. }
  9687. Object.defineProperty(Vue.prototype, '$data', dataDef);
  9688. Object.defineProperty(Vue.prototype, '$props', propsDef);
  9689. Vue.prototype.$set = set;
  9690. Vue.prototype.$delete = del;
  9691. Vue.prototype.$watch = function (
  9692. expOrFn,
  9693. cb,
  9694. options
  9695. ) {
  9696. var vm = this;
  9697. if (isPlainObject(cb)) {
  9698. return createWatcher(vm, expOrFn, cb, options)
  9699. }
  9700. options = options || {};
  9701. options.user = true;
  9702. var watcher = new Watcher(vm, expOrFn, cb, options);
  9703. if (options.immediate) {
  9704. try {
  9705. cb.call(vm, watcher.value);
  9706. } catch (error) {
  9707. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  9708. }
  9709. }
  9710. return function unwatchFn () {
  9711. watcher.teardown();
  9712. }
  9713. };
  9714. }
  9715. /* */
  9716. var uid$3 = 0;
  9717. function initMixin (Vue) {
  9718. Vue.prototype._init = function (options) {
  9719. var vm = this;
  9720. // a uid
  9721. vm._uid = uid$3++;
  9722. var startTag, endTag;
  9723. /* istanbul ignore if */
  9724. if ( true && config.performance && mark) {
  9725. startTag = "vue-perf-start:" + (vm._uid);
  9726. endTag = "vue-perf-end:" + (vm._uid);
  9727. mark(startTag);
  9728. }
  9729. // a flag to avoid this being observed
  9730. vm._isVue = true;
  9731. // merge options
  9732. if (options && options._isComponent) {
  9733. // optimize internal component instantiation
  9734. // since dynamic options merging is pretty slow, and none of the
  9735. // internal component options needs special treatment.
  9736. initInternalComponent(vm, options);
  9737. } else {
  9738. vm.$options = mergeOptions(
  9739. resolveConstructorOptions(vm.constructor),
  9740. options || {},
  9741. vm
  9742. );
  9743. }
  9744. /* istanbul ignore else */
  9745. if (true) {
  9746. initProxy(vm);
  9747. } else {}
  9748. // expose real self
  9749. vm._self = vm;
  9750. initLifecycle(vm);
  9751. initEvents(vm);
  9752. initRender(vm);
  9753. callHook(vm, 'beforeCreate');
  9754. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  9755. initState(vm);
  9756. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  9757. !vm._$fallback && callHook(vm, 'created');
  9758. /* istanbul ignore if */
  9759. if ( true && config.performance && mark) {
  9760. vm._name = formatComponentName(vm, false);
  9761. mark(endTag);
  9762. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  9763. }
  9764. if (vm.$options.el) {
  9765. vm.$mount(vm.$options.el);
  9766. }
  9767. };
  9768. }
  9769. function initInternalComponent (vm, options) {
  9770. var opts = vm.$options = Object.create(vm.constructor.options);
  9771. // doing this because it's faster than dynamic enumeration.
  9772. var parentVnode = options._parentVnode;
  9773. opts.parent = options.parent;
  9774. opts._parentVnode = parentVnode;
  9775. var vnodeComponentOptions = parentVnode.componentOptions;
  9776. opts.propsData = vnodeComponentOptions.propsData;
  9777. opts._parentListeners = vnodeComponentOptions.listeners;
  9778. opts._renderChildren = vnodeComponentOptions.children;
  9779. opts._componentTag = vnodeComponentOptions.tag;
  9780. if (options.render) {
  9781. opts.render = options.render;
  9782. opts.staticRenderFns = options.staticRenderFns;
  9783. }
  9784. }
  9785. function resolveConstructorOptions (Ctor) {
  9786. var options = Ctor.options;
  9787. if (Ctor.super) {
  9788. var superOptions = resolveConstructorOptions(Ctor.super);
  9789. var cachedSuperOptions = Ctor.superOptions;
  9790. if (superOptions !== cachedSuperOptions) {
  9791. // super option changed,
  9792. // need to resolve new options.
  9793. Ctor.superOptions = superOptions;
  9794. // check if there are any late-modified/attached options (#4976)
  9795. var modifiedOptions = resolveModifiedOptions(Ctor);
  9796. // update base extend options
  9797. if (modifiedOptions) {
  9798. extend(Ctor.extendOptions, modifiedOptions);
  9799. }
  9800. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  9801. if (options.name) {
  9802. options.components[options.name] = Ctor;
  9803. }
  9804. }
  9805. }
  9806. return options
  9807. }
  9808. function resolveModifiedOptions (Ctor) {
  9809. var modified;
  9810. var latest = Ctor.options;
  9811. var sealed = Ctor.sealedOptions;
  9812. for (var key in latest) {
  9813. if (latest[key] !== sealed[key]) {
  9814. if (!modified) { modified = {}; }
  9815. modified[key] = latest[key];
  9816. }
  9817. }
  9818. return modified
  9819. }
  9820. function Vue (options) {
  9821. if ( true &&
  9822. !(this instanceof Vue)
  9823. ) {
  9824. warn('Vue is a constructor and should be called with the `new` keyword');
  9825. }
  9826. this._init(options);
  9827. }
  9828. initMixin(Vue);
  9829. stateMixin(Vue);
  9830. eventsMixin(Vue);
  9831. lifecycleMixin(Vue);
  9832. renderMixin(Vue);
  9833. /* */
  9834. function initUse (Vue) {
  9835. Vue.use = function (plugin) {
  9836. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  9837. if (installedPlugins.indexOf(plugin) > -1) {
  9838. return this
  9839. }
  9840. // additional parameters
  9841. var args = toArray(arguments, 1);
  9842. args.unshift(this);
  9843. if (typeof plugin.install === 'function') {
  9844. plugin.install.apply(plugin, args);
  9845. } else if (typeof plugin === 'function') {
  9846. plugin.apply(null, args);
  9847. }
  9848. installedPlugins.push(plugin);
  9849. return this
  9850. };
  9851. }
  9852. /* */
  9853. function initMixin$1 (Vue) {
  9854. Vue.mixin = function (mixin) {
  9855. this.options = mergeOptions(this.options, mixin);
  9856. return this
  9857. };
  9858. }
  9859. /* */
  9860. function initExtend (Vue) {
  9861. /**
  9862. * Each instance constructor, including Vue, has a unique
  9863. * cid. This enables us to create wrapped "child
  9864. * constructors" for prototypal inheritance and cache them.
  9865. */
  9866. Vue.cid = 0;
  9867. var cid = 1;
  9868. /**
  9869. * Class inheritance
  9870. */
  9871. Vue.extend = function (extendOptions) {
  9872. extendOptions = extendOptions || {};
  9873. var Super = this;
  9874. var SuperId = Super.cid;
  9875. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  9876. if (cachedCtors[SuperId]) {
  9877. return cachedCtors[SuperId]
  9878. }
  9879. var name = extendOptions.name || Super.options.name;
  9880. if ( true && name) {
  9881. validateComponentName(name);
  9882. }
  9883. var Sub = function VueComponent (options) {
  9884. this._init(options);
  9885. };
  9886. Sub.prototype = Object.create(Super.prototype);
  9887. Sub.prototype.constructor = Sub;
  9888. Sub.cid = cid++;
  9889. Sub.options = mergeOptions(
  9890. Super.options,
  9891. extendOptions
  9892. );
  9893. Sub['super'] = Super;
  9894. // For props and computed properties, we define the proxy getters on
  9895. // the Vue instances at extension time, on the extended prototype. This
  9896. // avoids Object.defineProperty calls for each instance created.
  9897. if (Sub.options.props) {
  9898. initProps$1(Sub);
  9899. }
  9900. if (Sub.options.computed) {
  9901. initComputed$1(Sub);
  9902. }
  9903. // allow further extension/mixin/plugin usage
  9904. Sub.extend = Super.extend;
  9905. Sub.mixin = Super.mixin;
  9906. Sub.use = Super.use;
  9907. // create asset registers, so extended classes
  9908. // can have their private assets too.
  9909. ASSET_TYPES.forEach(function (type) {
  9910. Sub[type] = Super[type];
  9911. });
  9912. // enable recursive self-lookup
  9913. if (name) {
  9914. Sub.options.components[name] = Sub;
  9915. }
  9916. // keep a reference to the super options at extension time.
  9917. // later at instantiation we can check if Super's options have
  9918. // been updated.
  9919. Sub.superOptions = Super.options;
  9920. Sub.extendOptions = extendOptions;
  9921. Sub.sealedOptions = extend({}, Sub.options);
  9922. // cache constructor
  9923. cachedCtors[SuperId] = Sub;
  9924. return Sub
  9925. };
  9926. }
  9927. function initProps$1 (Comp) {
  9928. var props = Comp.options.props;
  9929. for (var key in props) {
  9930. proxy(Comp.prototype, "_props", key);
  9931. }
  9932. }
  9933. function initComputed$1 (Comp) {
  9934. var computed = Comp.options.computed;
  9935. for (var key in computed) {
  9936. defineComputed(Comp.prototype, key, computed[key]);
  9937. }
  9938. }
  9939. /* */
  9940. function initAssetRegisters (Vue) {
  9941. /**
  9942. * Create asset registration methods.
  9943. */
  9944. ASSET_TYPES.forEach(function (type) {
  9945. Vue[type] = function (
  9946. id,
  9947. definition
  9948. ) {
  9949. if (!definition) {
  9950. return this.options[type + 's'][id]
  9951. } else {
  9952. /* istanbul ignore if */
  9953. if ( true && type === 'component') {
  9954. validateComponentName(id);
  9955. }
  9956. if (type === 'component' && isPlainObject(definition)) {
  9957. definition.name = definition.name || id;
  9958. definition = this.options._base.extend(definition);
  9959. }
  9960. if (type === 'directive' && typeof definition === 'function') {
  9961. definition = { bind: definition, update: definition };
  9962. }
  9963. this.options[type + 's'][id] = definition;
  9964. return definition
  9965. }
  9966. };
  9967. });
  9968. }
  9969. /* */
  9970. function getComponentName (opts) {
  9971. return opts && (opts.Ctor.options.name || opts.tag)
  9972. }
  9973. function matches (pattern, name) {
  9974. if (Array.isArray(pattern)) {
  9975. return pattern.indexOf(name) > -1
  9976. } else if (typeof pattern === 'string') {
  9977. return pattern.split(',').indexOf(name) > -1
  9978. } else if (isRegExp(pattern)) {
  9979. return pattern.test(name)
  9980. }
  9981. /* istanbul ignore next */
  9982. return false
  9983. }
  9984. function pruneCache (keepAliveInstance, filter) {
  9985. var cache = keepAliveInstance.cache;
  9986. var keys = keepAliveInstance.keys;
  9987. var _vnode = keepAliveInstance._vnode;
  9988. for (var key in cache) {
  9989. var cachedNode = cache[key];
  9990. if (cachedNode) {
  9991. var name = getComponentName(cachedNode.componentOptions);
  9992. if (name && !filter(name)) {
  9993. pruneCacheEntry(cache, key, keys, _vnode);
  9994. }
  9995. }
  9996. }
  9997. }
  9998. function pruneCacheEntry (
  9999. cache,
  10000. key,
  10001. keys,
  10002. current
  10003. ) {
  10004. var cached$$1 = cache[key];
  10005. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  10006. cached$$1.componentInstance.$destroy();
  10007. }
  10008. cache[key] = null;
  10009. remove(keys, key);
  10010. }
  10011. var patternTypes = [String, RegExp, Array];
  10012. var KeepAlive = {
  10013. name: 'keep-alive',
  10014. abstract: true,
  10015. props: {
  10016. include: patternTypes,
  10017. exclude: patternTypes,
  10018. max: [String, Number]
  10019. },
  10020. created: function created () {
  10021. this.cache = Object.create(null);
  10022. this.keys = [];
  10023. },
  10024. destroyed: function destroyed () {
  10025. for (var key in this.cache) {
  10026. pruneCacheEntry(this.cache, key, this.keys);
  10027. }
  10028. },
  10029. mounted: function mounted () {
  10030. var this$1 = this;
  10031. this.$watch('include', function (val) {
  10032. pruneCache(this$1, function (name) { return matches(val, name); });
  10033. });
  10034. this.$watch('exclude', function (val) {
  10035. pruneCache(this$1, function (name) { return !matches(val, name); });
  10036. });
  10037. },
  10038. render: function render () {
  10039. var slot = this.$slots.default;
  10040. var vnode = getFirstComponentChild(slot);
  10041. var componentOptions = vnode && vnode.componentOptions;
  10042. if (componentOptions) {
  10043. // check pattern
  10044. var name = getComponentName(componentOptions);
  10045. var ref = this;
  10046. var include = ref.include;
  10047. var exclude = ref.exclude;
  10048. if (
  10049. // not included
  10050. (include && (!name || !matches(include, name))) ||
  10051. // excluded
  10052. (exclude && name && matches(exclude, name))
  10053. ) {
  10054. return vnode
  10055. }
  10056. var ref$1 = this;
  10057. var cache = ref$1.cache;
  10058. var keys = ref$1.keys;
  10059. var key = vnode.key == null
  10060. // same constructor may get registered as different local components
  10061. // so cid alone is not enough (#3269)
  10062. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  10063. : vnode.key;
  10064. if (cache[key]) {
  10065. vnode.componentInstance = cache[key].componentInstance;
  10066. // make current key freshest
  10067. remove(keys, key);
  10068. keys.push(key);
  10069. } else {
  10070. cache[key] = vnode;
  10071. keys.push(key);
  10072. // prune oldest entry
  10073. if (this.max && keys.length > parseInt(this.max)) {
  10074. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  10075. }
  10076. }
  10077. vnode.data.keepAlive = true;
  10078. }
  10079. return vnode || (slot && slot[0])
  10080. }
  10081. };
  10082. var builtInComponents = {
  10083. KeepAlive: KeepAlive
  10084. };
  10085. /* */
  10086. function initGlobalAPI (Vue) {
  10087. // config
  10088. var configDef = {};
  10089. configDef.get = function () { return config; };
  10090. if (true) {
  10091. configDef.set = function () {
  10092. warn(
  10093. 'Do not replace the Vue.config object, set individual fields instead.'
  10094. );
  10095. };
  10096. }
  10097. Object.defineProperty(Vue, 'config', configDef);
  10098. // exposed util methods.
  10099. // NOTE: these are not considered part of the public API - avoid relying on
  10100. // them unless you are aware of the risk.
  10101. Vue.util = {
  10102. warn: warn,
  10103. extend: extend,
  10104. mergeOptions: mergeOptions,
  10105. defineReactive: defineReactive$$1
  10106. };
  10107. Vue.set = set;
  10108. Vue.delete = del;
  10109. Vue.nextTick = nextTick;
  10110. // 2.6 explicit observable API
  10111. Vue.observable = function (obj) {
  10112. observe(obj);
  10113. return obj
  10114. };
  10115. Vue.options = Object.create(null);
  10116. ASSET_TYPES.forEach(function (type) {
  10117. Vue.options[type + 's'] = Object.create(null);
  10118. });
  10119. // this is used to identify the "base" constructor to extend all plain-object
  10120. // components with in Weex's multi-instance scenarios.
  10121. Vue.options._base = Vue;
  10122. extend(Vue.options.components, builtInComponents);
  10123. initUse(Vue);
  10124. initMixin$1(Vue);
  10125. initExtend(Vue);
  10126. initAssetRegisters(Vue);
  10127. }
  10128. initGlobalAPI(Vue);
  10129. Object.defineProperty(Vue.prototype, '$isServer', {
  10130. get: isServerRendering
  10131. });
  10132. Object.defineProperty(Vue.prototype, '$ssrContext', {
  10133. get: function get () {
  10134. /* istanbul ignore next */
  10135. return this.$vnode && this.$vnode.ssrContext
  10136. }
  10137. });
  10138. // expose FunctionalRenderContext for ssr runtime helper installation
  10139. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  10140. value: FunctionalRenderContext
  10141. });
  10142. Vue.version = '2.6.11';
  10143. /**
  10144. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  10145. */
  10146. var ARRAYTYPE = '[object Array]';
  10147. var OBJECTTYPE = '[object Object]';
  10148. // const FUNCTIONTYPE = '[object Function]'
  10149. function diff(current, pre) {
  10150. var result = {};
  10151. syncKeys(current, pre);
  10152. _diff(current, pre, '', result);
  10153. return result
  10154. }
  10155. function syncKeys(current, pre) {
  10156. if (current === pre) { return }
  10157. var rootCurrentType = type(current);
  10158. var rootPreType = type(pre);
  10159. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  10160. if(Object.keys(current).length >= Object.keys(pre).length){
  10161. for (var key in pre) {
  10162. var currentValue = current[key];
  10163. if (currentValue === undefined) {
  10164. current[key] = null;
  10165. } else {
  10166. syncKeys(currentValue, pre[key]);
  10167. }
  10168. }
  10169. }
  10170. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  10171. if (current.length >= pre.length) {
  10172. pre.forEach(function (item, index) {
  10173. syncKeys(current[index], item);
  10174. });
  10175. }
  10176. }
  10177. }
  10178. function _diff(current, pre, path, result) {
  10179. if (current === pre) { return }
  10180. var rootCurrentType = type(current);
  10181. var rootPreType = type(pre);
  10182. if (rootCurrentType == OBJECTTYPE) {
  10183. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  10184. setResult(result, path, current);
  10185. } else {
  10186. var loop = function ( key ) {
  10187. var currentValue = current[key];
  10188. var preValue = pre[key];
  10189. var currentType = type(currentValue);
  10190. var preType = type(preValue);
  10191. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  10192. if (currentValue !== pre[key]) {
  10193. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  10194. }
  10195. } else if (currentType == ARRAYTYPE) {
  10196. if (preType != ARRAYTYPE) {
  10197. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  10198. } else {
  10199. if (currentValue.length < preValue.length) {
  10200. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  10201. } else {
  10202. currentValue.forEach(function (item, index) {
  10203. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  10204. });
  10205. }
  10206. }
  10207. } else if (currentType == OBJECTTYPE) {
  10208. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  10209. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  10210. } else {
  10211. for (var subKey in currentValue) {
  10212. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  10213. }
  10214. }
  10215. }
  10216. };
  10217. for (var key in current) loop( key );
  10218. }
  10219. } else if (rootCurrentType == ARRAYTYPE) {
  10220. if (rootPreType != ARRAYTYPE) {
  10221. setResult(result, path, current);
  10222. } else {
  10223. if (current.length < pre.length) {
  10224. setResult(result, path, current);
  10225. } else {
  10226. current.forEach(function (item, index) {
  10227. _diff(item, pre[index], path + '[' + index + ']', result);
  10228. });
  10229. }
  10230. }
  10231. } else {
  10232. setResult(result, path, current);
  10233. }
  10234. }
  10235. function setResult(result, k, v) {
  10236. // if (type(v) != FUNCTIONTYPE) {
  10237. result[k] = v;
  10238. // }
  10239. }
  10240. function type(obj) {
  10241. return Object.prototype.toString.call(obj)
  10242. }
  10243. /* */
  10244. function flushCallbacks$1(vm) {
  10245. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  10246. if (Object({"VUE_APP_NAME":"wechat","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  10247. var mpInstance = vm.$scope;
  10248. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  10249. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  10250. }
  10251. var copies = vm.__next_tick_callbacks.slice(0);
  10252. vm.__next_tick_callbacks.length = 0;
  10253. for (var i = 0; i < copies.length; i++) {
  10254. copies[i]();
  10255. }
  10256. }
  10257. }
  10258. function hasRenderWatcher(vm) {
  10259. return queue.find(function (watcher) { return vm._watcher === watcher; })
  10260. }
  10261. function nextTick$1(vm, cb) {
  10262. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  10263. //2.nextTick 之前存在 render watcher
  10264. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  10265. if(Object({"VUE_APP_NAME":"wechat","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  10266. var mpInstance = vm.$scope;
  10267. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  10268. ']:nextVueTick');
  10269. }
  10270. return nextTick(cb, vm)
  10271. }else{
  10272. if(Object({"VUE_APP_NAME":"wechat","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  10273. var mpInstance$1 = vm.$scope;
  10274. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  10275. ']:nextMPTick');
  10276. }
  10277. }
  10278. var _resolve;
  10279. if (!vm.__next_tick_callbacks) {
  10280. vm.__next_tick_callbacks = [];
  10281. }
  10282. vm.__next_tick_callbacks.push(function () {
  10283. if (cb) {
  10284. try {
  10285. cb.call(vm);
  10286. } catch (e) {
  10287. handleError(e, vm, 'nextTick');
  10288. }
  10289. } else if (_resolve) {
  10290. _resolve(vm);
  10291. }
  10292. });
  10293. // $flow-disable-line
  10294. if (!cb && typeof Promise !== 'undefined') {
  10295. return new Promise(function (resolve) {
  10296. _resolve = resolve;
  10297. })
  10298. }
  10299. }
  10300. /* */
  10301. function cloneWithData(vm) {
  10302. // 确保当前 vm 所有数据被同步
  10303. var ret = Object.create(null);
  10304. var dataKeys = [].concat(
  10305. Object.keys(vm._data || {}),
  10306. Object.keys(vm._computedWatchers || {}));
  10307. dataKeys.reduce(function(ret, key) {
  10308. ret[key] = vm[key];
  10309. return ret
  10310. }, ret);
  10311. // vue-composition-api
  10312. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  10313. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  10314. if (rawBindings) {
  10315. Object.keys(rawBindings).forEach(function (key) {
  10316. ret[key] = vm[key];
  10317. });
  10318. }
  10319. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  10320. Object.assign(ret, vm.$mp.data || {});
  10321. if (
  10322. Array.isArray(vm.$options.behaviors) &&
  10323. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  10324. ) { //form-field
  10325. ret['name'] = vm.name;
  10326. ret['value'] = vm.value;
  10327. }
  10328. return JSON.parse(JSON.stringify(ret))
  10329. }
  10330. var patch = function(oldVnode, vnode) {
  10331. var this$1 = this;
  10332. if (vnode === null) { //destroy
  10333. return
  10334. }
  10335. if (this.mpType === 'page' || this.mpType === 'component') {
  10336. var mpInstance = this.$scope;
  10337. var data = Object.create(null);
  10338. try {
  10339. data = cloneWithData(this);
  10340. } catch (err) {
  10341. console.error(err);
  10342. }
  10343. data.__webviewId__ = mpInstance.data.__webviewId__;
  10344. var mpData = Object.create(null);
  10345. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  10346. mpData[key] = mpInstance.data[key];
  10347. });
  10348. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  10349. if (Object.keys(diffData).length) {
  10350. if (Object({"VUE_APP_NAME":"wechat","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  10351. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  10352. ']差量更新',
  10353. JSON.stringify(diffData));
  10354. }
  10355. this.__next_tick_pending = true;
  10356. mpInstance.setData(diffData, function () {
  10357. this$1.__next_tick_pending = false;
  10358. flushCallbacks$1(this$1);
  10359. });
  10360. } else {
  10361. flushCallbacks$1(this);
  10362. }
  10363. }
  10364. };
  10365. /* */
  10366. function createEmptyRender() {
  10367. }
  10368. function mountComponent$1(
  10369. vm,
  10370. el,
  10371. hydrating
  10372. ) {
  10373. if (!vm.mpType) {//main.js 中的 new Vue
  10374. return vm
  10375. }
  10376. if (vm.mpType === 'app') {
  10377. vm.$options.render = createEmptyRender;
  10378. }
  10379. if (!vm.$options.render) {
  10380. vm.$options.render = createEmptyRender;
  10381. if (true) {
  10382. /* istanbul ignore if */
  10383. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  10384. vm.$options.el || el) {
  10385. warn(
  10386. 'You are using the runtime-only build of Vue where the template ' +
  10387. 'compiler is not available. Either pre-compile the templates into ' +
  10388. 'render functions, or use the compiler-included build.',
  10389. vm
  10390. );
  10391. } else {
  10392. warn(
  10393. 'Failed to mount component: template or render function not defined.',
  10394. vm
  10395. );
  10396. }
  10397. }
  10398. }
  10399. !vm._$fallback && callHook(vm, 'beforeMount');
  10400. var updateComponent = function () {
  10401. vm._update(vm._render(), hydrating);
  10402. };
  10403. // we set this to vm._watcher inside the watcher's constructor
  10404. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  10405. // component's mounted hook), which relies on vm._watcher being already defined
  10406. new Watcher(vm, updateComponent, noop, {
  10407. before: function before() {
  10408. if (vm._isMounted && !vm._isDestroyed) {
  10409. callHook(vm, 'beforeUpdate');
  10410. }
  10411. }
  10412. }, true /* isRenderWatcher */);
  10413. hydrating = false;
  10414. return vm
  10415. }
  10416. /* */
  10417. function renderClass (
  10418. staticClass,
  10419. dynamicClass
  10420. ) {
  10421. if (isDef(staticClass) || isDef(dynamicClass)) {
  10422. return concat(staticClass, stringifyClass(dynamicClass))
  10423. }
  10424. /* istanbul ignore next */
  10425. return ''
  10426. }
  10427. function concat (a, b) {
  10428. return a ? b ? (a + ' ' + b) : a : (b || '')
  10429. }
  10430. function stringifyClass (value) {
  10431. if (Array.isArray(value)) {
  10432. return stringifyArray(value)
  10433. }
  10434. if (isObject(value)) {
  10435. return stringifyObject(value)
  10436. }
  10437. if (typeof value === 'string') {
  10438. return value
  10439. }
  10440. /* istanbul ignore next */
  10441. return ''
  10442. }
  10443. function stringifyArray (value) {
  10444. var res = '';
  10445. var stringified;
  10446. for (var i = 0, l = value.length; i < l; i++) {
  10447. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  10448. if (res) { res += ' '; }
  10449. res += stringified;
  10450. }
  10451. }
  10452. return res
  10453. }
  10454. function stringifyObject (value) {
  10455. var res = '';
  10456. for (var key in value) {
  10457. if (value[key]) {
  10458. if (res) { res += ' '; }
  10459. res += key;
  10460. }
  10461. }
  10462. return res
  10463. }
  10464. /* */
  10465. var parseStyleText = cached(function (cssText) {
  10466. var res = {};
  10467. var listDelimiter = /;(?![^(]*\))/g;
  10468. var propertyDelimiter = /:(.+)/;
  10469. cssText.split(listDelimiter).forEach(function (item) {
  10470. if (item) {
  10471. var tmp = item.split(propertyDelimiter);
  10472. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  10473. }
  10474. });
  10475. return res
  10476. });
  10477. // normalize possible array / string values into Object
  10478. function normalizeStyleBinding (bindingStyle) {
  10479. if (Array.isArray(bindingStyle)) {
  10480. return toObject(bindingStyle)
  10481. }
  10482. if (typeof bindingStyle === 'string') {
  10483. return parseStyleText(bindingStyle)
  10484. }
  10485. return bindingStyle
  10486. }
  10487. /* */
  10488. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  10489. function getTarget(obj, path) {
  10490. var parts = path.split('.');
  10491. var key = parts[0];
  10492. if (key.indexOf('__$n') === 0) { //number index
  10493. key = parseInt(key.replace('__$n', ''));
  10494. }
  10495. if (parts.length === 1) {
  10496. return obj[key]
  10497. }
  10498. return getTarget(obj[key], parts.slice(1).join('.'))
  10499. }
  10500. function internalMixin(Vue) {
  10501. Vue.config.errorHandler = function(err, vm, info) {
  10502. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  10503. console.error(err);
  10504. /* eslint-disable no-undef */
  10505. var app = typeof getApp === 'function' && getApp();
  10506. if (app && app.onError) {
  10507. app.onError(err);
  10508. }
  10509. };
  10510. var oldEmit = Vue.prototype.$emit;
  10511. Vue.prototype.$emit = function(event) {
  10512. if (this.$scope && event) {
  10513. (this.$scope['_triggerEvent'] || this.$scope['triggerEvent']).call(this.$scope, event, {
  10514. __args__: toArray(arguments, 1)
  10515. });
  10516. }
  10517. return oldEmit.apply(this, arguments)
  10518. };
  10519. Vue.prototype.$nextTick = function(fn) {
  10520. return nextTick$1(this, fn)
  10521. };
  10522. MP_METHODS.forEach(function (method) {
  10523. Vue.prototype[method] = function(args) {
  10524. if (this.$scope && this.$scope[method]) {
  10525. return this.$scope[method](args)
  10526. }
  10527. // mp-alipay
  10528. if (typeof my === 'undefined') {
  10529. return
  10530. }
  10531. if (method === 'createSelectorQuery') {
  10532. /* eslint-disable no-undef */
  10533. return my.createSelectorQuery(args)
  10534. } else if (method === 'createIntersectionObserver') {
  10535. /* eslint-disable no-undef */
  10536. return my.createIntersectionObserver(args)
  10537. }
  10538. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  10539. };
  10540. });
  10541. Vue.prototype.__init_provide = initProvide;
  10542. Vue.prototype.__init_injections = initInjections;
  10543. Vue.prototype.__call_hook = function(hook, args) {
  10544. var vm = this;
  10545. // #7573 disable dep collection when invoking lifecycle hooks
  10546. pushTarget();
  10547. var handlers = vm.$options[hook];
  10548. var info = hook + " hook";
  10549. var ret;
  10550. if (handlers) {
  10551. for (var i = 0, j = handlers.length; i < j; i++) {
  10552. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  10553. }
  10554. }
  10555. if (vm._hasHookEvent) {
  10556. vm.$emit('hook:' + hook, args);
  10557. }
  10558. popTarget();
  10559. return ret
  10560. };
  10561. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  10562. if (Array.isArray(modifiers)) {
  10563. if (modifiers.indexOf('trim') !== -1) {
  10564. value = value.trim();
  10565. }
  10566. if (modifiers.indexOf('number') !== -1) {
  10567. value = this._n(value);
  10568. }
  10569. }
  10570. if (!target) {
  10571. target = this;
  10572. }
  10573. // 解决动态属性添加
  10574. Vue.set(target, key, value);
  10575. };
  10576. Vue.prototype.__set_sync = function(target, key, value) {
  10577. if (!target) {
  10578. target = this;
  10579. }
  10580. // 解决动态属性添加
  10581. Vue.set(target, key, value);
  10582. };
  10583. Vue.prototype.__get_orig = function(item) {
  10584. if (isPlainObject(item)) {
  10585. return item['$orig'] || item
  10586. }
  10587. return item
  10588. };
  10589. Vue.prototype.__get_value = function(dataPath, target) {
  10590. return getTarget(target || this, dataPath)
  10591. };
  10592. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  10593. return renderClass(staticClass, dynamicClass)
  10594. };
  10595. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  10596. if (!dynamicStyle && !staticStyle) {
  10597. return ''
  10598. }
  10599. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  10600. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  10601. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  10602. };
  10603. Vue.prototype.__map = function(val, iteratee) {
  10604. //TODO 暂不考虑 string
  10605. var ret, i, l, keys, key;
  10606. if (Array.isArray(val)) {
  10607. ret = new Array(val.length);
  10608. for (i = 0, l = val.length; i < l; i++) {
  10609. ret[i] = iteratee(val[i], i);
  10610. }
  10611. return ret
  10612. } else if (isObject(val)) {
  10613. keys = Object.keys(val);
  10614. ret = Object.create(null);
  10615. for (i = 0, l = keys.length; i < l; i++) {
  10616. key = keys[i];
  10617. ret[key] = iteratee(val[key], key, i);
  10618. }
  10619. return ret
  10620. } else if (typeof val === 'number') {
  10621. ret = new Array(val);
  10622. for (i = 0, l = val; i < l; i++) {
  10623. // 第一个参数暂时仍和小程序一致
  10624. ret[i] = iteratee(i, i);
  10625. }
  10626. return ret
  10627. }
  10628. return []
  10629. };
  10630. }
  10631. /* */
  10632. var LIFECYCLE_HOOKS$1 = [
  10633. //App
  10634. 'onLaunch',
  10635. 'onShow',
  10636. 'onHide',
  10637. 'onUniNViewMessage',
  10638. 'onPageNotFound',
  10639. 'onThemeChange',
  10640. 'onError',
  10641. 'onUnhandledRejection',
  10642. //Page
  10643. 'onInit',
  10644. 'onLoad',
  10645. // 'onShow',
  10646. 'onReady',
  10647. // 'onHide',
  10648. 'onUnload',
  10649. 'onPullDownRefresh',
  10650. 'onReachBottom',
  10651. 'onTabItemTap',
  10652. 'onAddToFavorites',
  10653. 'onShareTimeline',
  10654. 'onShareAppMessage',
  10655. 'onResize',
  10656. 'onPageScroll',
  10657. 'onNavigationBarButtonTap',
  10658. 'onBackPress',
  10659. 'onNavigationBarSearchInputChanged',
  10660. 'onNavigationBarSearchInputConfirmed',
  10661. 'onNavigationBarSearchInputClicked',
  10662. //Component
  10663. // 'onReady', // 兼容旧版本,应该移除该事件
  10664. 'onPageShow',
  10665. 'onPageHide',
  10666. 'onPageResize'
  10667. ];
  10668. function lifecycleMixin$1(Vue) {
  10669. //fixed vue-class-component
  10670. var oldExtend = Vue.extend;
  10671. Vue.extend = function(extendOptions) {
  10672. extendOptions = extendOptions || {};
  10673. var methods = extendOptions.methods;
  10674. if (methods) {
  10675. Object.keys(methods).forEach(function (methodName) {
  10676. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  10677. extendOptions[methodName] = methods[methodName];
  10678. delete methods[methodName];
  10679. }
  10680. });
  10681. }
  10682. return oldExtend.call(this, extendOptions)
  10683. };
  10684. var strategies = Vue.config.optionMergeStrategies;
  10685. var mergeHook = strategies.created;
  10686. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  10687. strategies[hook] = mergeHook;
  10688. });
  10689. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  10690. }
  10691. /* */
  10692. // install platform patch function
  10693. Vue.prototype.__patch__ = patch;
  10694. // public mount method
  10695. Vue.prototype.$mount = function(
  10696. el ,
  10697. hydrating
  10698. ) {
  10699. return mountComponent$1(this, el, hydrating)
  10700. };
  10701. lifecycleMixin$1(Vue);
  10702. internalMixin(Vue);
  10703. /* */
  10704. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  10705. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 2)))
  10706. /***/ }),
  10707. /***/ 401:
  10708. /*!***************************************************************************************!*\
  10709. !*** D:/hongxing/storage-wechat/node_modules/@dcloudio/uni-ui/lib/uni-popup/popup.js ***!
  10710. \***************************************************************************************/
  10711. /*! no static exports found */
  10712. /***/ (function(module, exports, __webpack_require__) {
  10713. "use strict";
  10714. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default =
  10715. {
  10716. data: function data() {
  10717. return {};
  10718. },
  10719. created: function created() {
  10720. this.popup = this.getParent();
  10721. },
  10722. methods: {
  10723. /**
  10724. * 获取父元素实例
  10725. */
  10726. getParent: function getParent() {var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'uniPopup';
  10727. var parent = this.$parent;
  10728. var parentName = parent.$options.name;
  10729. while (parentName !== name) {
  10730. parent = parent.$parent;
  10731. if (!parent) return false;
  10732. parentName = parent.$options.name;
  10733. }
  10734. return parent;
  10735. } } };exports.default = _default;
  10736. /***/ }),
  10737. /***/ 416:
  10738. /*!************************************************************************************!*\
  10739. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js ***!
  10740. \************************************************************************************/
  10741. /*! no static exports found */
  10742. /***/ (function(module, exports, __webpack_require__) {
  10743. "use strict";
  10744. /* WEBPACK VAR INJECTION */(function(global, uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _regenerator = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@babel/runtime/regenerator */ 336));var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 3);var _pages = _interopRequireDefault(__webpack_require__(/*! @/pages.json */ 417));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {try {var info = gen[key](arg);var value = info.value;} catch (error) {reject(error);return;}if (info.done) {resolve(value);} else {Promise.resolve(value).then(_next, _throw);}}function _asyncToGenerator(fn) {return function () {var self = this,args = arguments;return new Promise(function (resolve, reject) {var gen = fn.apply(self, args);function _next(value) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);}function _throw(err) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);}_next(undefined);});};}function _toConsumableArray(arr) {return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();}function _nonIterableSpread() {throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArray(iter) {if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);}function _arrayWithoutHoles(arr) {if (Array.isArray(arr)) return _arrayLikeToArray(arr);}function _createForOfIteratorHelper(o, allowArrayLike) {var it;if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {if (it) o = it;var i = 0;var F = function F() {};return { s: F, n: function n() {if (i >= o.length) return { done: true };return { done: false, value: o[i++] };}, e: function e(_e32) {throw _e32;}, f: F };}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion = true,didErr = false,err;return { s: function s() {it = o[Symbol.iterator]();}, n: function n() {var step = it.next();normalCompletion = step.done;return step;}, e: function e(_e33) {didErr = true;err = _e33;}, f: function f() {try {if (!normalCompletion && it.return != null) it.return();} finally {if (didErr) throw err;}} };}function _unsupportedIterableToArray(o, minLen) {if (!o) return;if (typeof o === "string") return _arrayLikeToArray(o, minLen);var n = Object.prototype.toString.call(o).slice(8, -1);if (n === "Object" && o.constructor) n = o.constructor.name;if (n === "Map" || n === "Set") return Array.from(o);if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);}function _arrayLikeToArray(arr, len) {if (len == null || len > arr.length) len = arr.length;for (var i = 0, arr2 = new Array(len); i < len; i++) {arr2[i] = arr[i];}return arr2;}function _defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}function _createClass(Constructor, protoProps, staticProps) {if (protoProps) _defineProperties(Constructor.prototype, protoProps);if (staticProps) _defineProperties(Constructor, staticProps);return Constructor;}function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}function _inherits(subClass, superClass) {if (typeof superClass !== "function" && superClass !== null) {throw new TypeError("Super expression must either be null or a function");}subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });if (superClass) _setPrototypeOf(subClass, superClass);}function _createSuper(Derived) {var hasNativeReflectConstruct = _isNativeReflectConstruct();return function _createSuperInternal() {var Super = _getPrototypeOf(Derived),result;if (hasNativeReflectConstruct) {var NewTarget = _getPrototypeOf(this).constructor;result = Reflect.construct(Super, arguments, NewTarget);} else {result = Super.apply(this, arguments);}return _possibleConstructorReturn(this, result);};}function _possibleConstructorReturn(self, call) {if (call && (typeof call === "object" || typeof call === "function")) {return call;}return _assertThisInitialized(self);}function _assertThisInitialized(self) {if (self === void 0) {throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _wrapNativeSuper(Class) {var _cache = typeof Map === "function" ? new Map() : undefined;_wrapNativeSuper = function _wrapNativeSuper(Class) {if (Class === null || !_isNativeFunction(Class)) return Class;if (typeof Class !== "function") {throw new TypeError("Super expression must either be null or a function");}if (typeof _cache !== "undefined") {if (_cache.has(Class)) return _cache.get(Class);_cache.set(Class, Wrapper);}function Wrapper() {return _construct(Class, arguments, _getPrototypeOf(this).constructor);}Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } });return _setPrototypeOf(Wrapper, Class);};return _wrapNativeSuper(Class);}function _construct(Parent, args, Class) {if (_isNativeReflectConstruct()) {_construct = Reflect.construct;} else {_construct = function _construct(Parent, args, Class) {var a = [null];a.push.apply(a, args);var Constructor = Function.bind.apply(Parent, a);var instance = new Constructor();if (Class) _setPrototypeOf(instance, Class.prototype);return instance;};}return _construct.apply(null, arguments);}function _isNativeReflectConstruct() {if (typeof Reflect === "undefined" || !Reflect.construct) return false;if (Reflect.construct.sham) return false;if (typeof Proxy === "function") return true;try {Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));return true;} catch (e) {return false;}}function _isNativeFunction(fn) {return Function.toString.call(fn).indexOf("[native code]") !== -1;}function _setPrototypeOf(o, p) {_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {o.__proto__ = p;return o;};return _setPrototypeOf(o, p);}function _getPrototypeOf(o) {_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {return o.__proto__ || Object.getPrototypeOf(o);};return _getPrototypeOf(o);}"undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self && self;function n(e) {return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;}function s(e, t, n) {return e(n = { path: t, exports: {}, require: function require(e, t) {return function () {throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");}(null == t && n.path);} }, n.exports), n.exports;}var o = s(function (e, t) {var n;e.exports = (n = n || function (e, t) {var n = Object.create || function () {function e() {}return function (t) {var n;return e.prototype = t, n = new e(), e.prototype = null, n;};}(),s = {},o = s.lib = {},r = o.Base = { extend: function extend(e) {var t = n(this);return e && t.mixIn(e), t.hasOwnProperty("init") && this.init !== t.init || (t.init = function () {t.$super.init.apply(this, arguments);}), t.init.prototype = t, t.$super = this, t;}, create: function create() {var e = this.extend();return e.init.apply(e, arguments), e;}, init: function init() {}, mixIn: function mixIn(e) {for (var t in e) {e.hasOwnProperty(t) && (this[t] = e[t]);}e.hasOwnProperty("toString") && (this.toString = e.toString);}, clone: function clone() {return this.init.prototype.extend(this);} },i = o.WordArray = r.extend({ init: function init(e, n) {e = this.words = e || [], this.sigBytes = n != t ? n : 4 * e.length;}, toString: function toString(e) {return (e || c).stringify(this);}, concat: function concat(e) {var t = this.words,n = e.words,s = this.sigBytes,o = e.sigBytes;if (this.clamp(), s % 4) for (var r = 0; r < o; r++) {var i = n[r >>> 2] >>> 24 - r % 4 * 8 & 255;t[s + r >>> 2] |= i << 24 - (s + r) % 4 * 8;} else for (r = 0; r < o; r += 4) {t[s + r >>> 2] = n[r >>> 2];}return this.sigBytes += o, this;}, clamp: function clamp() {var t = this.words,n = this.sigBytes;t[n >>> 2] &= 4294967295 << 32 - n % 4 * 8, t.length = e.ceil(n / 4);}, clone: function clone() {var e = r.clone.call(this);return e.words = this.words.slice(0), e;}, random: function random(t) {for (var n, s = [], o = function o(t) {t = t;var n = 987654321,s = 4294967295;return function () {var o = ((n = 36969 * (65535 & n) + (n >> 16) & s) << 16) + (t = 18e3 * (65535 & t) + (t >> 16) & s) & s;return o /= 4294967296, (o += .5) * (e.random() > .5 ? 1 : -1);};}, r = 0; r < t; r += 4) {var a = o(4294967296 * (n || e.random()));n = 987654071 * a(), s.push(4294967296 * a() | 0);}return new i.init(s, t);} }),a = s.enc = {},c = a.Hex = { stringify: function stringify(e) {for (var t = e.words, n = e.sigBytes, s = [], o = 0; o < n; o++) {var r = t[o >>> 2] >>> 24 - o % 4 * 8 & 255;s.push((r >>> 4).toString(16)), s.push((15 & r).toString(16));}return s.join("");}, parse: function parse(e) {for (var t = e.length, n = [], s = 0; s < t; s += 2) {n[s >>> 3] |= parseInt(e.substr(s, 2), 16) << 24 - s % 8 * 4;}return new i.init(n, t / 2);} },u = a.Latin1 = { stringify: function stringify(e) {for (var t = e.words, n = e.sigBytes, s = [], o = 0; o < n; o++) {var r = t[o >>> 2] >>> 24 - o % 4 * 8 & 255;s.push(String.fromCharCode(r));}return s.join("");}, parse: function parse(e) {for (var t = e.length, n = [], s = 0; s < t; s++) {n[s >>> 2] |= (255 & e.charCodeAt(s)) << 24 - s % 4 * 8;}return new i.init(n, t);} },l = a.Utf8 = { stringify: function stringify(e) {try {return decodeURIComponent(escape(u.stringify(e)));} catch (e) {throw new Error("Malformed UTF-8 data");}}, parse: function parse(e) {return u.parse(unescape(encodeURIComponent(e)));} },h = o.BufferedBlockAlgorithm = r.extend({ reset: function reset() {this._data = new i.init(), this._nDataBytes = 0;}, _append: function _append(e) {"string" == typeof e && (e = l.parse(e)), this._data.concat(e), this._nDataBytes += e.sigBytes;}, _process: function _process(t) {var n = this._data,s = n.words,o = n.sigBytes,r = this.blockSize,a = o / (4 * r),c = (a = t ? e.ceil(a) : e.max((0 | a) - this._minBufferSize, 0)) * r,u = e.min(4 * c, o);if (c) {for (var l = 0; l < c; l += r) {this._doProcessBlock(s, l);}var h = s.splice(0, c);n.sigBytes -= u;}return new i.init(h, u);}, clone: function clone() {var e = r.clone.call(this);return e._data = this._data.clone(), e;}, _minBufferSize: 0 });o.Hasher = h.extend({ cfg: r.extend(), init: function init(e) {this.cfg = this.cfg.extend(e), this.reset();}, reset: function reset() {h.reset.call(this), this._doReset();}, update: function update(e) {return this._append(e), this._process(), this;}, finalize: function finalize(e) {return e && this._append(e), this._doFinalize();}, blockSize: 16, _createHelper: function _createHelper(e) {return function (t, n) {return new e.init(n).finalize(t);};}, _createHmacHelper: function _createHmacHelper(e) {return function (t, n) {return new d.HMAC.init(e, n).finalize(t);};} });var d = s.algo = {};return s;}(Math), n);}),r = (s(function (e, t) {var n;e.exports = (n = o, function (e) {var t = n,s = t.lib,o = s.WordArray,r = s.Hasher,i = t.algo,a = [];!function () {for (var t = 0; t < 64; t++) {a[t] = 4294967296 * e.abs(e.sin(t + 1)) | 0;}}();var c = i.MD5 = r.extend({ _doReset: function _doReset() {this._hash = new o.init([1732584193, 4023233417, 2562383102, 271733878]);}, _doProcessBlock: function _doProcessBlock(e, t) {for (var n = 0; n < 16; n++) {var s = t + n,o = e[s];e[s] = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8);}var r = this._hash.words,i = e[t + 0],c = e[t + 1],f = e[t + 2],g = e[t + 3],p = e[t + 4],m = e[t + 5],y = e[t + 6],_ = e[t + 7],w = e[t + 8],k = e[t + 9],T = e[t + 10],S = e[t + 11],v = e[t + 12],A = e[t + 13],P = e[t + 14],I = e[t + 15],b = r[0],O = r[1],C = r[2],E = r[3];b = u(b, O, C, E, i, 7, a[0]), E = u(E, b, O, C, c, 12, a[1]), C = u(C, E, b, O, f, 17, a[2]), O = u(O, C, E, b, g, 22, a[3]), b = u(b, O, C, E, p, 7, a[4]), E = u(E, b, O, C, m, 12, a[5]), C = u(C, E, b, O, y, 17, a[6]), O = u(O, C, E, b, _, 22, a[7]), b = u(b, O, C, E, w, 7, a[8]), E = u(E, b, O, C, k, 12, a[9]), C = u(C, E, b, O, T, 17, a[10]), O = u(O, C, E, b, S, 22, a[11]), b = u(b, O, C, E, v, 7, a[12]), E = u(E, b, O, C, A, 12, a[13]), C = u(C, E, b, O, P, 17, a[14]), b = l(b, O = u(O, C, E, b, I, 22, a[15]), C, E, c, 5, a[16]), E = l(E, b, O, C, y, 9, a[17]), C = l(C, E, b, O, S, 14, a[18]), O = l(O, C, E, b, i, 20, a[19]), b = l(b, O, C, E, m, 5, a[20]), E = l(E, b, O, C, T, 9, a[21]), C = l(C, E, b, O, I, 14, a[22]), O = l(O, C, E, b, p, 20, a[23]), b = l(b, O, C, E, k, 5, a[24]), E = l(E, b, O, C, P, 9, a[25]), C = l(C, E, b, O, g, 14, a[26]), O = l(O, C, E, b, w, 20, a[27]), b = l(b, O, C, E, A, 5, a[28]), E = l(E, b, O, C, f, 9, a[29]), C = l(C, E, b, O, _, 14, a[30]), b = h(b, O = l(O, C, E, b, v, 20, a[31]), C, E, m, 4, a[32]), E = h(E, b, O, C, w, 11, a[33]), C = h(C, E, b, O, S, 16, a[34]), O = h(O, C, E, b, P, 23, a[35]), b = h(b, O, C, E, c, 4, a[36]), E = h(E, b, O, C, p, 11, a[37]), C = h(C, E, b, O, _, 16, a[38]), O = h(O, C, E, b, T, 23, a[39]), b = h(b, O, C, E, A, 4, a[40]), E = h(E, b, O, C, i, 11, a[41]), C = h(C, E, b, O, g, 16, a[42]), O = h(O, C, E, b, y, 23, a[43]), b = h(b, O, C, E, k, 4, a[44]), E = h(E, b, O, C, v, 11, a[45]), C = h(C, E, b, O, I, 16, a[46]), b = d(b, O = h(O, C, E, b, f, 23, a[47]), C, E, i, 6, a[48]), E = d(E, b, O, C, _, 10, a[49]), C = d(C, E, b, O, P, 15, a[50]), O = d(O, C, E, b, m, 21, a[51]), b = d(b, O, C, E, v, 6, a[52]), E = d(E, b, O, C, g, 10, a[53]), C = d(C, E, b, O, T, 15, a[54]), O = d(O, C, E, b, c, 21, a[55]), b = d(b, O, C, E, w, 6, a[56]), E = d(E, b, O, C, I, 10, a[57]), C = d(C, E, b, O, y, 15, a[58]), O = d(O, C, E, b, A, 21, a[59]), b = d(b, O, C, E, p, 6, a[60]), E = d(E, b, O, C, S, 10, a[61]), C = d(C, E, b, O, f, 15, a[62]), O = d(O, C, E, b, k, 21, a[63]), r[0] = r[0] + b | 0, r[1] = r[1] + O | 0, r[2] = r[2] + C | 0, r[3] = r[3] + E | 0;}, _doFinalize: function _doFinalize() {var t = this._data,n = t.words,s = 8 * this._nDataBytes,o = 8 * t.sigBytes;n[o >>> 5] |= 128 << 24 - o % 32;var r = e.floor(s / 4294967296),i = s;n[15 + (o + 64 >>> 9 << 4)] = 16711935 & (r << 8 | r >>> 24) | 4278255360 & (r << 24 | r >>> 8), n[14 + (o + 64 >>> 9 << 4)] = 16711935 & (i << 8 | i >>> 24) | 4278255360 & (i << 24 | i >>> 8), t.sigBytes = 4 * (n.length + 1), this._process();for (var a = this._hash, c = a.words, u = 0; u < 4; u++) {var l = c[u];c[u] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8);}return a;}, clone: function clone() {var e = r.clone.call(this);return e._hash = this._hash.clone(), e;} });function u(e, t, n, s, o, r, i) {var a = e + (t & n | ~t & s) + o + i;return (a << r | a >>> 32 - r) + t;}function l(e, t, n, s, o, r, i) {var a = e + (t & s | n & ~s) + o + i;return (a << r | a >>> 32 - r) + t;}function h(e, t, n, s, o, r, i) {var a = e + (t ^ n ^ s) + o + i;return (a << r | a >>> 32 - r) + t;}function d(e, t, n, s, o, r, i) {var a = e + (n ^ (t | ~s)) + o + i;return (a << r | a >>> 32 - r) + t;}t.MD5 = r._createHelper(c), t.HmacMD5 = r._createHmacHelper(c);}(Math), n.MD5);}), s(function (e, t) {var n, s, r;e.exports = (s = (n = o).lib.Base, r = n.enc.Utf8, void (n.algo.HMAC = s.extend({ init: function init(e, t) {e = this._hasher = new e.init(), "string" == typeof t && (t = r.parse(t));var n = e.blockSize,s = 4 * n;t.sigBytes > s && (t = e.finalize(t)), t.clamp();for (var o = this._oKey = t.clone(), i = this._iKey = t.clone(), a = o.words, c = i.words, u = 0; u < n; u++) {a[u] ^= 1549556828, c[u] ^= 909522486;}o.sigBytes = i.sigBytes = s, this.reset();}, reset: function reset() {var e = this._hasher;e.reset(), e.update(this._iKey);}, update: function update(e) {return this._hasher.update(e), this;}, finalize: function finalize(e) {var t = this._hasher,n = t.finalize(e);return t.reset(), t.finalize(this._oKey.clone().concat(n));} })));}), s(function (e, t) {e.exports = o.HmacMD5;}));var i = "FUNCTION",a = "OBJECT",c = "CLIENT_DB";function u(e) {return Object.prototype.toString.call(e).slice(8, -1).toLowerCase();}function l(e) {return "object" === u(e);}function h(e) {return e && "string" == typeof e ? JSON.parse(e) : e;}var d = "development" === "development",f = "mp-weixin";var g;switch (f) {case "h5":g = "web";break;case "app-plus":g = "app";break;default:g = f;}var p = h(undefined),m = h([]),y = true;var _ = "";try {{var _e2 = __webpack_require__(/*! uni-stat-config */ 418).default || __webpack_require__(/*! uni-stat-config */ 418);_ = _e2.appid;}} catch (e) {}var w = {};function k(e) {var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};var n, s;return n = w, s = e, Object.prototype.hasOwnProperty.call(n, s) || (w[e] = t), w[e];}"app" === g && (w = uni._globalUniCloudObj ? uni._globalUniCloudObj : uni._globalUniCloudObj = {});var T = ["invoke", "success", "fail", "complete"],S = k("_globalUniCloudInterceptor");function v(e, t) {S[e] || (S[e] = {}), l(t) && Object.keys(t).forEach(function (n) {T.indexOf(n) > -1 && function (e, t, n) {var s = S[e][t];s || (s = S[e][t] = []), -1 === s.indexOf(n) && "function" == typeof n && s.push(n);}(e, n, t[n]);});}function A(e, t) {S[e] || (S[e] = {}), l(t) ? Object.keys(t).forEach(function (n) {T.indexOf(n) > -1 && function (e, t, n) {var s = S[e][t];if (!s) return;var o = s.indexOf(n);o > -1 && s.splice(o, 1);}(e, n, t[n]);}) : delete S[e];}function P(e, t) {return e && 0 !== e.length ? e.reduce(function (e, n) {return e.then(function () {return n(t);});}, Promise.resolve()) : Promise.resolve();}function I(e, t) {return S[e] && S[e][t] || [];}var b = k("_globalUniCloudListener"),O = "response",C = "needLogin",E = "refreshToken",R = "clientdb",U = "cloudfunction",x = "cloudobject";function L(e) {return b[e] || (b[e] = []), b[e];}function D(e, t) {var n = L(e);n.includes(t) || n.push(t);}function q(e, t) {var n = L(e),s = n.indexOf(t);-1 !== s && n.splice(s, 1);}function N(e, t) {var n = L(e);for (var _e3 = 0; _e3 < n.length; _e3++) {(0, n[_e3])(t);}}function F(e, t) {return t ? function (n) {var _this = this;var s = !1;if ("callFunction" === t) {var _e4 = n && n.type || i;s = _e4 !== i;}var o = "callFunction" === t && !s;var r;r = this.isReady ? Promise.resolve() : this.initUniCloud, n = n || {};var a = r.then(function () {return s ? Promise.resolve() : P(I(t, "invoke"), n);}).then(function () {return e.call(_this, n);}).then(function (e) {return s ? Promise.resolve(e) : P(I(t, "success"), e).then(function () {return P(I(t, "complete"), e);}).then(function () {return o && N(O, { type: U, content: e }), Promise.resolve(e);});}, function (e) {return s ? Promise.reject(e) : P(I(t, "fail"), e).then(function () {return P(I(t, "complete"), e);}).then(function () {return N(O, { type: U, content: e }), Promise.reject(e);});});if (!(n.success || n.fail || n.complete)) return a;a.then(function (e) {n.success && n.success(e), n.complete && n.complete(e), o && N(O, { type: U, content: e });}, function (e) {n.fail && n.fail(e), n.complete && n.complete(e), o && N(O, { type: U, content: e });});} : function (t) {if (!((t = t || {}).success || t.fail || t.complete)) return e.call(this, t);e.call(this, t).then(function (e) {t.success && t.success(e), t.complete && t.complete(e);}, function (e) {t.fail && t.fail(e), t.complete && t.complete(e);});};}var M = /*#__PURE__*/function (_Error) {_inherits(M, _Error);var _super = _createSuper(M);function M(e) {var _this2;_classCallCheck(this, M);_this2 = _super.call(this, e.message), _this2.errMsg = e.message || "", _this2.errCode = _this2.code = e.code || "SYSTEM_ERROR", _this2.requestId = e.requestId;return _this2;}return M;}( /*#__PURE__*/_wrapNativeSuper(Error));function $() {var e, t;try {if (uni.getLaunchOptionsSync) {if (uni.getLaunchOptionsSync.toString().indexOf("not yet implemented") > -1) return;var _uni$getLaunchOptions = uni.getLaunchOptionsSync(),_n = _uni$getLaunchOptions.scene,_s = _uni$getLaunchOptions.channel;e = _s, t = _n;}} catch (e) {}return { channel: e, scene: t };}var j;function K() {var e = uni.getLocale && uni.getLocale() || "en";if (j) return _objectSpread(_objectSpread({}, j), {}, { locale: e, LOCALE: e });var t = uni.getSystemInfoSync(),n = t.deviceId,s = t.osName,o = t.uniPlatform,r = t.appId,i = ["pixelRatio", "brand", "model", "system", "language", "version", "platform", "host", "SDKVersion", "swanNativeVersion", "app", "AppPlatform", "fontSizeSetting"];for (var _e5 = 0; _e5 < i.length; _e5++) {delete t[i[_e5]];}return j = _objectSpread(_objectSpread({ PLATFORM: o, OS: s, APPID: r, DEVICEID: n }, $()), t), _objectSpread(_objectSpread({}, j), {}, { locale: e, LOCALE: e });}var B = { sign: function sign(e, t) {var n = "";return Object.keys(e).sort().forEach(function (t) {e[t] && (n = n + "&" + t + "=" + e[t]);}), n = n.slice(1), r(n, t).toString();}, wrappedRequest: function wrappedRequest(e, t) {return new Promise(function (n, s) {t(Object.assign(e, { complete: function complete(e) {e || (e = {}), d && "web" === g && e.errMsg && 0 === e.errMsg.indexOf("request:fail") && console.warn("发布H5,需要在uniCloud后台操作,绑定安全域名,否则会因为跨域问题而无法访问。教程参考:https://uniapp.dcloud.io/uniCloud/quickstart?id=useinh5");var t = e.data && e.data.header && e.data.header["x-serverless-request-id"] || e.header && e.header["request-id"];if (!e.statusCode || e.statusCode >= 400) return s(new M({ code: "SYS_ERR", message: e.errMsg || "request:fail", requestId: t }));var o = e.data;if (o.error) return s(new M({ code: o.error.code, message: o.error.message, requestId: t }));o.result = o.data, o.requestId = t, delete o.data, n(o);} }));});} };var H = { request: function request(e) {return uni.request(e);}, uploadFile: function uploadFile(e) {return uni.uploadFile(e);}, setStorageSync: function setStorageSync(e, t) {return uni.setStorageSync(e, t);}, getStorageSync: function getStorageSync(e) {return uni.getStorageSync(e);}, removeStorageSync: function removeStorageSync(e) {return uni.removeStorageSync(e);}, clearStorageSync: function clearStorageSync() {return uni.clearStorageSync();} },W = { "uniCloud.init.paramRequired": "{param} required", "uniCloud.uploadFile.fileError": "filePath should be instance of File" };var _e6 = (0, _uniI18n.initVueI18n)({ "zh-Hans": { "uniCloud.init.paramRequired": "缺少参数:{param}", "uniCloud.uploadFile.fileError": "filePath应为File对象" }, "zh-Hant": { "uniCloud.init.paramRequired": "缺少参数:{param}", "uniCloud.uploadFile.fileError": "filePath应为File对象" }, en: W, fr: { "uniCloud.init.paramRequired": "{param} required", "uniCloud.uploadFile.fileError": "filePath should be instance of File" }, es: { "uniCloud.init.paramRequired": "{param} required", "uniCloud.uploadFile.fileError": "filePath should be instance of File" }, ja: W }, "zh-Hans"),z = _e6.t;var V = /*#__PURE__*/function () {function V(e) {_classCallCheck(this, V);["spaceId", "clientSecret"].forEach(function (t) {if (!Object.prototype.hasOwnProperty.call(e, t)) throw new Error(z("uniCloud.init.paramRequired", { param: t }));}), this.config = Object.assign({}, { endpoint: "https://api.bspapp.com" }, e), this.config.provider = "aliyun", this.config.requestUrl = this.config.endpoint + "/client", this.config.envType = this.config.envType || "public", this.config.accessTokenKey = "access_token_" + this.config.spaceId, this.adapter = H, this._getAccessTokenPromise = null, this._getAccessTokenPromiseStatus = null;}_createClass(V, [{ key: "setAccessToken", value: function setAccessToken(e) {this.accessToken = e;} }, { key: "requestWrapped", value: function requestWrapped(e) {return B.wrappedRequest(e, this.adapter.request);} }, { key: "requestAuth", value: function requestAuth(e) {return this.requestWrapped(e);} }, { key: "request", value: function request(e, t) {var _this3 = this;return Promise.resolve().then(function () {return _this3.hasAccessToken ? t ? _this3.requestWrapped(e) : _this3.requestWrapped(e).catch(function (t) {return new Promise(function (e, n) {!t || "GATEWAY_INVALID_TOKEN" !== t.code && "InvalidParameter.InvalidToken" !== t.code ? n(t) : e();}).then(function () {return _this3.getAccessToken();}).then(function () {var t = _this3.rebuildRequest(e);return _this3.request(t, !0);});}) : _this3.getAccessToken().then(function () {var t = _this3.rebuildRequest(e);return _this3.request(t, !0);});});} }, { key: "rebuildRequest", value: function rebuildRequest(e) {var t = Object.assign({}, e);return t.data.token = this.accessToken, t.header["x-basement-token"] = this.accessToken, t.header["x-serverless-sign"] = B.sign(t.data, this.config.clientSecret), t;} }, { key: "setupRequest", value: function setupRequest(e, t) {var n = Object.assign({}, e, { spaceId: this.config.spaceId, timestamp: Date.now() }),s = { "Content-Type": "application/json" };return "auth" !== t && (n.token = this.accessToken, s["x-basement-token"] = this.accessToken), s["x-serverless-sign"] = B.sign(n, this.config.clientSecret), { url: this.config.requestUrl, method: "POST", data: n, dataType: "json", header: s };} }, { key: "getAccessToken", value: function getAccessToken() {var _this4 = this;if ("pending" === this._getAccessTokenPromiseStatus) return this._getAccessTokenPromise;this._getAccessTokenPromiseStatus = "pending";return this._getAccessTokenPromise = this.requestAuth(this.setupRequest({ method: "serverless.auth.user.anonymousAuthorize", params: "{}" }, "auth")).then(function (e) {return new Promise(function (t, n) {e.result && e.result.accessToken ? (_this4.setAccessToken(e.result.accessToken), _this4._getAccessTokenPromiseStatus = "fulfilled", t(_this4.accessToken)) : (_this4._getAccessTokenPromiseStatus = "rejected", n(new M({ code: "AUTH_FAILED", message: "获取accessToken失败" })));});}, function (e) {return _this4._getAccessTokenPromiseStatus = "rejected", Promise.reject(e);}), this._getAccessTokenPromise;} }, { key: "authorize", value: function authorize() {this.getAccessToken();} }, { key: "callFunction", value: function callFunction(e) {var t = { method: "serverless.function.runtime.invoke", params: JSON.stringify({ functionTarget: e.name, functionArgs: e.data || {} }) };return this.request(this.setupRequest(t));} }, { key: "getOSSUploadOptionsFromPath", value: function getOSSUploadOptionsFromPath(e) {var t = { method: "serverless.file.resource.generateProximalSign", params: JSON.stringify(e) };return this.request(this.setupRequest(t));} }, { key: "uploadFileToOSS", value: function uploadFileToOSS(_ref) {var _this5 = this;var e = _ref.url,t = _ref.formData,n = _ref.name,s = _ref.filePath,o = _ref.fileType,r = _ref.onUploadProgress;return new Promise(function (i, a) {var c = _this5.adapter.uploadFile({ url: e, formData: t, name: n, filePath: s, fileType: o, header: { "X-OSS-server-side-encrpytion": "AES256" }, success: function success(e) {e && e.statusCode < 400 ? i(e) : a(new M({ code: "UPLOAD_FAILED", message: "文件上传失败" }));}, fail: function fail(e) {a(new M({ code: e.code || "UPLOAD_FAILED", message: e.message || e.errMsg || "文件上传失败" }));} });"function" == typeof r && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {r({ loaded: e.totalBytesSent, total: e.totalBytesExpectedToSend });});});} }, { key: "reportOSSUpload", value: function reportOSSUpload(e) {var t = { method: "serverless.file.resource.report", params: JSON.stringify(e) };return this.request(this.setupRequest(t));} }, { key: "uploadFile", value: function uploadFile(_ref2) {var _this6 = this;var e = _ref2.filePath,t = _ref2.cloudPath,_ref2$fileType = _ref2.fileType,n = _ref2$fileType === void 0 ? "image" : _ref2$fileType,s = _ref2.onUploadProgress,o = _ref2.config;if ("string" !== u(t)) throw new M({ code: "INVALID_PARAM", message: "cloudPath必须为字符串类型" });if (!(t = t.trim())) throw new M({ code: "CLOUDPATH_REQUIRED", message: "cloudPath不可为空" });if (/:\/\//.test(t)) throw new M({ code: "INVALID_PARAM", message: "cloudPath不合法" });var r = o && o.envType || this.config.envType;var i, a;return this.getOSSUploadOptionsFromPath({ env: r, filename: t }).then(function (t) {var o = t.result;i = o.id, a = "https://" + o.cdnDomain + "/" + o.ossPath;var r = { url: "https://" + o.host, formData: { "Cache-Control": "max-age=2592000", "Content-Disposition": "attachment", OSSAccessKeyId: o.accessKeyId, Signature: o.signature, host: o.host, id: i, key: o.ossPath, policy: o.policy, success_action_status: 200 }, fileName: "file", name: "file", filePath: e, fileType: n };return _this6.uploadFileToOSS(Object.assign({}, r, { onUploadProgress: s }));}).then(function () {return _this6.reportOSSUpload({ id: i });}).then(function (t) {return new Promise(function (n, s) {t.success ? n({ success: !0, filePath: e, fileID: a }) : s(new M({ code: "UPLOAD_FAILED", message: "文件上传失败" }));});});} }, { key: "deleteFile", value: function deleteFile(_ref3) {var e = _ref3.fileList;var t = { method: "serverless.file.resource.delete", params: JSON.stringify({ id: e[0] }) };return this.request(this.setupRequest(t));} }, { key: "getTempFileURL", value: function getTempFileURL() {var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},e = _ref4.fileList;return new Promise(function (t, n) {Array.isArray(e) && 0 !== e.length || n(new M({ code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" })), t({ fileList: e.map(function (e) {return { fileID: e, tempFileURL: e };}) });});} }, { key: "hasAccessToken", get: function get() {return !!this.accessToken;} }]);return V;}();var J = { init: function init(e) {var t = new V(e),n = { signInAnonymously: function signInAnonymously() {return t.authorize();}, getLoginState: function getLoginState() {return Promise.resolve(!1);} };return t.auth = function () {return n;}, t.customAuth = t.auth, t;} };var Y = "undefined" != typeof location && "http:" === location.protocol ? "http:" : "https:";var X;!function (e) {e.local = "local", e.none = "none", e.session = "session";}(X || (X = {}));var G = function G() {};var Q = function Q() {var e;if (!Promise) {e = function e() {}, e.promise = {};var _t2 = function _t2() {throw new M({ message: 'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.' });};return Object.defineProperty(e.promise, "then", { get: _t2 }), Object.defineProperty(e.promise, "catch", { get: _t2 }), e;}var t = new Promise(function (t, n) {e = function e(_e7, s) {return _e7 ? n(_e7) : t(s);};});return e.promise = t, e;};function Z(e) {return void 0 === e;}function ee(e) {return "[object Null]" === Object.prototype.toString.call(e);}var te;function ne(e) {var t = (n = e, "[object Array]" === Object.prototype.toString.call(n) ? e : [e]);var n;var _iterator = _createForOfIteratorHelper(t),_step;try {for (_iterator.s(); !(_step = _iterator.n()).done;) {var _e8 = _step.value;var _t3 = _e8.isMatch,_n2 = _e8.genAdapter,_s2 = _e8.runtime;if (_t3()) return { adapter: _n2(), runtime: _s2 };}} catch (err) {_iterator.e(err);} finally {_iterator.f();}}!function (e) {e.WEB = "web", e.WX_MP = "wx_mp";}(te || (te = {}));var se = { adapter: null, runtime: void 0 },oe = ["anonymousUuidKey"];var re = /*#__PURE__*/function (_G) {_inherits(re, _G);var _super2 = _createSuper(re);function re() {var _this7;_classCallCheck(this, re);_this7 = _super2.call(this), se.adapter.root.tcbObject || (se.adapter.root.tcbObject = {});return _this7;}_createClass(re, [{ key: "setItem", value: function setItem(e, t) {se.adapter.root.tcbObject[e] = t;} }, { key: "getItem", value: function getItem(e) {return se.adapter.root.tcbObject[e];} }, { key: "removeItem", value: function removeItem(e) {delete se.adapter.root.tcbObject[e];} }, { key: "clear", value: function clear() {delete se.adapter.root.tcbObject;} }]);return re;}(G);function ie(e, t) {switch (e) {case "local":return t.localStorage || new re();case "none":return new re();default:return t.sessionStorage || new re();}}var ae = /*#__PURE__*/function () {function ae(e) {_classCallCheck(this, ae);if (!this._storage) {this._persistence = se.adapter.primaryStorage || e.persistence, this._storage = ie(this._persistence, se.adapter);var _t4 = "access_token_".concat(e.env),_n3 = "access_token_expire_".concat(e.env),_s3 = "refresh_token_".concat(e.env),_o = "anonymous_uuid_".concat(e.env),_r = "login_type_".concat(e.env),_i = "user_info_".concat(e.env);this.keys = { accessTokenKey: _t4, accessTokenExpireKey: _n3, refreshTokenKey: _s3, anonymousUuidKey: _o, loginTypeKey: _r, userInfoKey: _i };}}_createClass(ae, [{ key: "updatePersistence", value: function updatePersistence(e) {if (e === this._persistence) return;var t = "local" === this._persistence;this._persistence = e;var n = ie(e, se.adapter);for (var _e9 in this.keys) {var _s4 = this.keys[_e9];if (t && oe.includes(_e9)) continue;var _o2 = this._storage.getItem(_s4);Z(_o2) || ee(_o2) || (n.setItem(_s4, _o2), this._storage.removeItem(_s4));}this._storage = n;} }, { key: "setStore", value: function setStore(e, t, n) {if (!this._storage) return;var s = { version: n || "localCachev1", content: t },o = JSON.stringify(s);try {this._storage.setItem(e, o);} catch (e) {throw e;}} }, { key: "getStore", value: function getStore(e, t) {try {if (!this._storage) return;} catch (e) {return "";}t = t || "localCachev1";var n = this._storage.getItem(e);if (!n) return "";if (n.indexOf(t) >= 0) {return JSON.parse(n).content;}return "";} }, { key: "removeStore", value: function removeStore(e) {this._storage.removeItem(e);} }]);return ae;}();var ce = {},ue = {};function le(e) {return ce[e];}var he = function he(e, t) {_classCallCheck(this, he);this.data = t || null, this.name = e;};var de = /*#__PURE__*/function (_he) {_inherits(de, _he);var _super3 = _createSuper(de);function de(e, t) {var _this8;_classCallCheck(this, de);_this8 = _super3.call(this, "error", { error: e, data: t }), _this8.error = e;return _this8;}return de;}(he);var fe = new ( /*#__PURE__*/function () {function _class() {_classCallCheck(this, _class);this._listeners = {};}_createClass(_class, [{ key: "on", value: function on(e, t) {return function (e, t, n) {n[e] = n[e] || [], n[e].push(t);}(e, t, this._listeners), this;} }, { key: "off", value: function off(e, t) {return function (e, t, n) {if (n && n[e]) {var _s5 = n[e].indexOf(t);-1 !== _s5 && n[e].splice(_s5, 1);}}(e, t, this._listeners), this;} }, { key: "fire", value: function fire(e, t) {if (e instanceof de) return console.error(e.error), this;var n = "string" == typeof e ? new he(e, t || {}) : e;var s = n.name;if (this._listens(s)) {n.target = this;var _e10 = this._listeners[s] ? _toConsumableArray(this._listeners[s]) : [];var _iterator2 = _createForOfIteratorHelper(_e10),_step2;try {for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {var _t5 = _step2.value;_t5.call(this, n);}} catch (err) {_iterator2.e(err);} finally {_iterator2.f();}}return this;} }, { key: "_listens", value: function _listens(e) {return this._listeners[e] && this._listeners[e].length > 0;} }]);return _class;}())();function ge(e, t) {fe.on(e, t);}function pe(e) {var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};fe.fire(e, t);}function me(e, t) {fe.off(e, t);}var ye = "loginStateChanged",_e = "loginStateExpire",we = "loginTypeChanged",ke = "anonymousConverted",Te = "refreshAccessToken";var Se;!function (e) {e.ANONYMOUS = "ANONYMOUS", e.WECHAT = "WECHAT", e.WECHAT_PUBLIC = "WECHAT-PUBLIC", e.WECHAT_OPEN = "WECHAT-OPEN", e.CUSTOM = "CUSTOM", e.EMAIL = "EMAIL", e.USERNAME = "USERNAME", e.NULL = "NULL";}(Se || (Se = {}));var ve = ["auth.getJwt", "auth.logout", "auth.signInWithTicket", "auth.signInAnonymously", "auth.signIn", "auth.fetchAccessTokenWithRefreshToken", "auth.signUpWithEmailAndPassword", "auth.activateEndUserMail", "auth.sendPasswordResetEmail", "auth.resetPasswordWithToken", "auth.isUsernameRegistered"],Ae = { "X-SDK-Version": "1.3.5" };function Pe(e, t, n) {var s = e[t];e[t] = function (t) {var o = {},r = {};n.forEach(function (n) {var _n$call = n.call(e, t),s = _n$call.data,i = _n$call.headers;Object.assign(o, s), Object.assign(r, i);});var i = t.data;return i && function () {var e;if (e = i, "[object FormData]" !== Object.prototype.toString.call(e)) t.data = _objectSpread(_objectSpread({}, i), o);else for (var _e11 in o) {i.append(_e11, o[_e11]);}}(), t.headers = _objectSpread(_objectSpread({}, t.headers || {}), r), s.call(e, t);};}function Ie() {var e = Math.random().toString(16).slice(2);return { data: { seqId: e }, headers: _objectSpread(_objectSpread({}, Ae), {}, { "x-seqid": e }) };}var be = /*#__PURE__*/function () {function be() {var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};_classCallCheck(this, be);var t;this.config = e, this._reqClass = new se.adapter.reqClass({ timeout: this.config.timeout, timeoutMsg: "\u8BF7\u6C42\u5728".concat(this.config.timeout / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD"), restrictedMethods: ["post"] }), this._cache = le(this.config.env), this._localCache = (t = this.config.env, ue[t]), Pe(this._reqClass, "post", [Ie]), Pe(this._reqClass, "upload", [Ie]), Pe(this._reqClass, "download", [Ie]);}_createClass(be, [{ key: "post", value: function () {var _post = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee(e) {return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:_context.next = 2;return this._reqClass.post(e);case 2:return _context.abrupt("return", _context.sent);case 3:case "end":return _context.stop();}}}, _callee, this);}));function post(_x) {return _post.apply(this, arguments);}return post;}() }, { key: "upload", value: function () {var _upload = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee2(e) {return _regenerator.default.wrap(function _callee2$(_context2) {while (1) {switch (_context2.prev = _context2.next) {case 0:_context2.next = 2;return this._reqClass.upload(e);case 2:return _context2.abrupt("return", _context2.sent);case 3:case "end":return _context2.stop();}}}, _callee2, this);}));function upload(_x2) {return _upload.apply(this, arguments);}return upload;}() }, { key: "download", value: function () {var _download = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee3(e) {return _regenerator.default.wrap(function _callee3$(_context3) {while (1) {switch (_context3.prev = _context3.next) {case 0:_context3.next = 2;return this._reqClass.download(e);case 2:return _context3.abrupt("return", _context3.sent);case 3:case "end":return _context3.stop();}}}, _callee3, this);}));function download(_x3) {return _download.apply(this, arguments);}return download;}() }, { key: "refreshAccessToken", value: function () {var _refreshAccessToken2 = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee4() {var e, t;return _regenerator.default.wrap(function _callee4$(_context4) {while (1) {switch (_context4.prev = _context4.next) {case 0:this._refreshAccessTokenPromise || (this._refreshAccessTokenPromise = this._refreshAccessToken());_context4.prev = 1;_context4.next = 4;return this._refreshAccessTokenPromise;case 4:e = _context4.sent;_context4.next = 10;break;case 7:_context4.prev = 7;_context4.t0 = _context4["catch"](1);t = _context4.t0;case 10:if (!(this._refreshAccessTokenPromise = null, this._shouldRefreshAccessTokenHook = null, t)) {_context4.next = 12;break;}throw t;case 12:return _context4.abrupt("return", e);case 13:case "end":return _context4.stop();}}}, _callee4, this, [[1, 7]]);}));function refreshAccessToken() {return _refreshAccessToken2.apply(this, arguments);}return refreshAccessToken;}() }, { key: "_refreshAccessToken", value: function () {var _refreshAccessToken3 = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee5() {var _this$_cache$keys, e, t, n, s, o, r, i, a, _e12, _e13, _t6, _s6;return _regenerator.default.wrap(function _callee5$(_context5) {while (1) {switch (_context5.prev = _context5.next) {case 0:_this$_cache$keys = this._cache.keys, e = _this$_cache$keys.accessTokenKey, t = _this$_cache$keys.accessTokenExpireKey, n = _this$_cache$keys.refreshTokenKey, s = _this$_cache$keys.loginTypeKey, o = _this$_cache$keys.anonymousUuidKey;this._cache.removeStore(e), this._cache.removeStore(t);r = this._cache.getStore(n);if (r) {_context5.next = 5;break;}throw new M({ message: "未登录CloudBase" });case 5:i = { refresh_token: r };_context5.next = 8;return this.request("auth.fetchAccessTokenWithRefreshToken", i);case 8:a = _context5.sent;if (!a.data.code) {_context5.next = 21;break;}_e12 = a.data.code;if (!("SIGN_PARAM_INVALID" === _e12 || "REFRESH_TOKEN_EXPIRED" === _e12 || "INVALID_REFRESH_TOKEN" === _e12)) {_context5.next = 20;break;}if (!(this._cache.getStore(s) === Se.ANONYMOUS && "INVALID_REFRESH_TOKEN" === _e12)) {_context5.next = 19;break;}_e13 = this._cache.getStore(o);_t6 = this._cache.getStore(n);_context5.next = 17;return this.send("auth.signInAnonymously", { anonymous_uuid: _e13, refresh_token: _t6 });case 17:_s6 = _context5.sent;return _context5.abrupt("return", (this.setRefreshToken(_s6.refresh_token), this._refreshAccessToken()));case 19:pe(_e), this._cache.removeStore(n);case 20:throw new M({ code: a.data.code, message: "\u5237\u65B0access token\u5931\u8D25\uFF1A".concat(a.data.code) });case 21:if (!a.data.access_token) {_context5.next = 23;break;}return _context5.abrupt("return", (pe(Te), this._cache.setStore(e, a.data.access_token), this._cache.setStore(t, a.data.access_token_expire + Date.now()), { accessToken: a.data.access_token, accessTokenExpire: a.data.access_token_expire }));case 23:a.data.refresh_token && (this._cache.removeStore(n), this._cache.setStore(n, a.data.refresh_token), this._refreshAccessToken());case 24:case "end":return _context5.stop();}}}, _callee5, this);}));function _refreshAccessToken() {return _refreshAccessToken3.apply(this, arguments);}return _refreshAccessToken;}() }, { key: "getAccessToken", value: function () {var _getAccessToken = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee6() {var _this$_cache$keys2, e, t, n, s, o, r;return _regenerator.default.wrap(function _callee6$(_context6) {while (1) {switch (_context6.prev = _context6.next) {case 0:_this$_cache$keys2 = this._cache.keys, e = _this$_cache$keys2.accessTokenKey, t = _this$_cache$keys2.accessTokenExpireKey, n = _this$_cache$keys2.refreshTokenKey;if (this._cache.getStore(n)) {_context6.next = 3;break;}throw new M({ message: "refresh token不存在,登录状态异常" });case 3:s = this._cache.getStore(e), o = this._cache.getStore(t), r = !0;_context6.t0 = this._shouldRefreshAccessTokenHook;if (!_context6.t0) {_context6.next = 9;break;}_context6.next = 8;return this._shouldRefreshAccessTokenHook(s, o);case 8:_context6.t0 = !_context6.sent;case 9:_context6.t1 = _context6.t0;if (!_context6.t1) {_context6.next = 12;break;}r = !1;case 12:return _context6.abrupt("return", (!s || !o || o < Date.now()) && r ? this.refreshAccessToken() : { accessToken: s, accessTokenExpire: o });case 13:case "end":return _context6.stop();}}}, _callee6, this);}));function getAccessToken() {return _getAccessToken.apply(this, arguments);}return getAccessToken;}() }, { key: "request", value: function () {var _request = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee7(e, t, n) {var s, o, r, _e14, i, _e15, _e16, a, c, u, l, h, d, f, g, p;return _regenerator.default.wrap(function _callee7$(_context7) {while (1) {switch (_context7.prev = _context7.next) {case 0:s = "x-tcb-trace_".concat(this.config.env);o = "application/x-www-form-urlencoded";r = _objectSpread({ action: e, env: this.config.env, dataVersion: "2019-08-16" }, t);if (!(-1 === ve.indexOf(e))) {_context7.next = 10;break;}_e14 = this._cache.keys.refreshTokenKey;_context7.t0 = this._cache.getStore(_e14);if (!_context7.t0) {_context7.next = 10;break;}_context7.next = 9;return this.getAccessToken();case 9:r.access_token = _context7.sent.accessToken;case 10:if ("storage.uploadFile" === e) {i = new FormData();for (_e15 in i) {i.hasOwnProperty(_e15) && void 0 !== i[_e15] && i.append(_e15, r[_e15]);}o = "multipart/form-data";} else {o = "application/json", i = {};for (_e16 in r) {void 0 !== r[_e16] && (i[_e16] = r[_e16]);}}a = { headers: { "content-type": o } };n && n.onUploadProgress && (a.onUploadProgress = n.onUploadProgress);c = this._localCache.getStore(s);c && (a.headers["X-TCB-Trace"] = c);u = t.parse, l = t.inQuery, h = t.search;d = { env: this.config.env };u && (d.parse = !0), l && (d = _objectSpread(_objectSpread({}, l), d));f = function (e, t) {var n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};var s = /\?/.test(t);var o = "";for (var _e17 in n) {"" === o ? !s && (t += "?") : o += "&", o += "".concat(_e17, "=").concat(encodeURIComponent(n[_e17]));}return /^http(s)?\:\/\//.test(t += o) ? t : "".concat(e).concat(t);}(Y, "//tcb-api.tencentcloudapi.com/web", d);h && (f += h);_context7.next = 22;return this.post(_objectSpread({ url: f, data: i }, a));case 22:g = _context7.sent;p = g.header && g.header["x-tcb-trace"];if (!(p && this._localCache.setStore(s, p), 200 !== Number(g.status) && 200 !== Number(g.statusCode) || !g.data)) {_context7.next = 26;break;}throw new M({ code: "NETWORK_ERROR", message: "network request error" });case 26:return _context7.abrupt("return", g);case 27:case "end":return _context7.stop();}}}, _callee7, this);}));function request(_x4, _x5, _x6) {return _request.apply(this, arguments);}return request;}() }, { key: "send", value: function () {var _send = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee8(e) {var t,n,_n4,_args8 = arguments;return _regenerator.default.wrap(function _callee8$(_context8) {while (1) {switch (_context8.prev = _context8.next) {case 0:t = _args8.length > 1 && _args8[1] !== undefined ? _args8[1] : {};_context8.next = 3;return this.request(e, t, { onUploadProgress: t.onUploadProgress });case 3:n = _context8.sent;if (!("ACCESS_TOKEN_EXPIRED" === n.data.code && -1 === ve.indexOf(e))) {_context8.next = 13;break;}_context8.next = 7;return this.refreshAccessToken();case 7:_context8.next = 9;return this.request(e, t, { onUploadProgress: t.onUploadProgress });case 9:_n4 = _context8.sent;if (!_n4.data.code) {_context8.next = 12;break;}throw new M({ code: _n4.data.code, message: _n4.data.message });case 12:return _context8.abrupt("return", _n4.data);case 13:if (!n.data.code) {_context8.next = 15;break;}throw new M({ code: n.data.code, message: n.data.message });case 15:return _context8.abrupt("return", n.data);case 16:case "end":return _context8.stop();}}}, _callee8, this);}));function send(_x7) {return _send.apply(this, arguments);}return send;}() }, { key: "setRefreshToken", value: function setRefreshToken(e) {var _this$_cache$keys3 = this._cache.keys,t = _this$_cache$keys3.accessTokenKey,n = _this$_cache$keys3.accessTokenExpireKey,s = _this$_cache$keys3.refreshTokenKey;this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);} }]);return be;}();var Oe = {};function Ce(e) {return Oe[e];}var Ee = /*#__PURE__*/function () {function Ee(e) {_classCallCheck(this, Ee);this.config = e, this._cache = le(e.env), this._request = Ce(e.env);}_createClass(Ee, [{ key: "setRefreshToken", value: function setRefreshToken(e) {var _this$_cache$keys4 = this._cache.keys,t = _this$_cache$keys4.accessTokenKey,n = _this$_cache$keys4.accessTokenExpireKey,s = _this$_cache$keys4.refreshTokenKey;this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);} }, { key: "setAccessToken", value: function setAccessToken(e, t) {var _this$_cache$keys5 = this._cache.keys,n = _this$_cache$keys5.accessTokenKey,s = _this$_cache$keys5.accessTokenExpireKey;this._cache.setStore(n, e), this._cache.setStore(s, t);} }, { key: "refreshUserInfo", value: function () {var _refreshUserInfo = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee9() {var _yield$this$_request$, e;return _regenerator.default.wrap(function _callee9$(_context9) {while (1) {switch (_context9.prev = _context9.next) {case 0:_context9.next = 2;return this._request.send("auth.getUserInfo", {});case 2:_yield$this$_request$ = _context9.sent;e = _yield$this$_request$.data;return _context9.abrupt("return", (this.setLocalUserInfo(e), e));case 5:case "end":return _context9.stop();}}}, _callee9, this);}));function refreshUserInfo() {return _refreshUserInfo.apply(this, arguments);}return refreshUserInfo;}() }, { key: "setLocalUserInfo", value: function setLocalUserInfo(e) {var t = this._cache.keys.userInfoKey;this._cache.setStore(t, e);} }]);return Ee;}();var Re = /*#__PURE__*/function () {function Re(e) {_classCallCheck(this, Re);if (!e) throw new M({ code: "PARAM_ERROR", message: "envId is not defined" });this._envId = e, this._cache = le(this._envId), this._request = Ce(this._envId), this.setUserInfo();}_createClass(Re, [{ key: "linkWithTicket", value: function linkWithTicket(e) {if ("string" != typeof e) throw new M({ code: "PARAM_ERROR", message: "ticket must be string" });return this._request.send("auth.linkWithTicket", { ticket: e });} }, { key: "linkWithRedirect", value: function linkWithRedirect(e) {e.signInWithRedirect();} }, { key: "updatePassword", value: function updatePassword(e, t) {return this._request.send("auth.updatePassword", { oldPassword: t, newPassword: e });} }, { key: "updateEmail", value: function updateEmail(e) {return this._request.send("auth.updateEmail", { newEmail: e });} }, { key: "updateUsername", value: function updateUsername(e) {if ("string" != typeof e) throw new M({ code: "PARAM_ERROR", message: "username must be a string" });return this._request.send("auth.updateUsername", { username: e });} }, { key: "getLinkedUidList", value: function () {var _getLinkedUidList = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee10() {var _yield$this$_request$2, e, t, n;return _regenerator.default.wrap(function _callee10$(_context10) {while (1) {switch (_context10.prev = _context10.next) {case 0:_context10.next = 2;return this._request.send("auth.getLinkedUidList", {});case 2:_yield$this$_request$2 = _context10.sent;e = _yield$this$_request$2.data;t = !1;n = e.users;return _context10.abrupt("return", (n.forEach(function (e) {e.wxOpenId && e.wxPublicId && (t = !0);}), { users: n, hasPrimaryUid: t }));case 7:case "end":return _context10.stop();}}}, _callee10, this);}));function getLinkedUidList() {return _getLinkedUidList.apply(this, arguments);}return getLinkedUidList;}() }, { key: "setPrimaryUid", value: function setPrimaryUid(e) {return this._request.send("auth.setPrimaryUid", { uid: e });} }, { key: "unlink", value: function unlink(e) {return this._request.send("auth.unlink", { platform: e });} }, { key: "update", value: function () {var _update = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee11(e) {var t, n, s, o, r, i, _yield$this$_request$3, a;return _regenerator.default.wrap(function _callee11$(_context11) {while (1) {switch (_context11.prev = _context11.next) {case 0:t = e.nickName;n = e.gender;s = e.avatarUrl;o = e.province;r = e.country;i = e.city;_context11.next = 8;return this._request.send("auth.updateUserInfo", { nickName: t, gender: n, avatarUrl: s, province: o, country: r, city: i });case 8:_yield$this$_request$3 = _context11.sent;a = _yield$this$_request$3.data;this.setLocalUserInfo(a);case 11:case "end":return _context11.stop();}}}, _callee11, this);}));function update(_x8) {return _update.apply(this, arguments);}return update;}() }, { key: "refresh", value: function () {var _refresh = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee12() {var _yield$this$_request$4, e;return _regenerator.default.wrap(function _callee12$(_context12) {while (1) {switch (_context12.prev = _context12.next) {case 0:_context12.next = 2;return this._request.send("auth.getUserInfo", {});case 2:_yield$this$_request$4 = _context12.sent;e = _yield$this$_request$4.data;return _context12.abrupt("return", (this.setLocalUserInfo(e), e));case 5:case "end":return _context12.stop();}}}, _callee12, this);}));function refresh() {return _refresh.apply(this, arguments);}return refresh;}() }, { key: "setUserInfo", value: function setUserInfo() {var _this9 = this;var e = this._cache.keys.userInfoKey,t = this._cache.getStore(e);["uid", "loginType", "openid", "wxOpenId", "wxPublicId", "unionId", "qqMiniOpenId", "email", "hasPassword", "customUserId", "nickName", "gender", "avatarUrl"].forEach(function (e) {_this9[e] = t[e];}), this.location = { country: t.country, province: t.province, city: t.city };} }, { key: "setLocalUserInfo", value: function setLocalUserInfo(e) {var t = this._cache.keys.userInfoKey;this._cache.setStore(t, e), this.setUserInfo();} }]);return Re;}();var Ue = /*#__PURE__*/function () {function Ue(e) {_classCallCheck(this, Ue);if (!e) throw new M({ code: "PARAM_ERROR", message: "envId is not defined" });this._cache = le(e);var _this$_cache$keys6 = this._cache.keys,t = _this$_cache$keys6.refreshTokenKey,n = _this$_cache$keys6.accessTokenKey,s = _this$_cache$keys6.accessTokenExpireKey,o = this._cache.getStore(t),r = this._cache.getStore(n),i = this._cache.getStore(s);this.credential = { refreshToken: o, accessToken: r, accessTokenExpire: i }, this.user = new Re(e);}_createClass(Ue, [{ key: "isAnonymousAuth", get: function get() {return this.loginType === Se.ANONYMOUS;} }, { key: "isCustomAuth", get: function get() {return this.loginType === Se.CUSTOM;} }, { key: "isWeixinAuth", get: function get() {return this.loginType === Se.WECHAT || this.loginType === Se.WECHAT_OPEN || this.loginType === Se.WECHAT_PUBLIC;} }, { key: "loginType", get: function get() {return this._cache.getStore(this._cache.keys.loginTypeKey);} }]);return Ue;}();var xe = /*#__PURE__*/function (_Ee) {_inherits(xe, _Ee);var _super4 = _createSuper(xe);function xe() {_classCallCheck(this, xe);return _super4.apply(this, arguments);}_createClass(xe, [{ key: "signIn", value: function () {var _signIn = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee13() {var _this$_cache$keys7, e, t, n, s, o, _e18;return _regenerator.default.wrap(function _callee13$(_context13) {while (1) {switch (_context13.prev = _context13.next) {case 0:this._cache.updatePersistence("local");_this$_cache$keys7 = this._cache.keys;e = _this$_cache$keys7.anonymousUuidKey;t = _this$_cache$keys7.refreshTokenKey;n = this._cache.getStore(e) || void 0;s = this._cache.getStore(t) || void 0;_context13.next = 8;return this._request.send("auth.signInAnonymously", { anonymous_uuid: n, refresh_token: s });case 8:o = _context13.sent;if (!(o.uuid && o.refresh_token)) {_context13.next = 20;break;}this._setAnonymousUUID(o.uuid);this.setRefreshToken(o.refresh_token);_context13.next = 14;return this._request.refreshAccessToken();case 14:pe(ye);pe(we, { env: this.config.env, loginType: Se.ANONYMOUS, persistence: "local" });_e18 = new Ue(this.config.env);_context13.next = 19;return _e18.user.refresh();case 19:return _context13.abrupt("return", _e18);case 20:throw new M({ message: "匿名登录失败" });case 21:case "end":return _context13.stop();}}}, _callee13, this);}));function signIn() {return _signIn.apply(this, arguments);}return signIn;}() }, { key: "linkAndRetrieveDataWithTicket", value: function () {var _linkAndRetrieveDataWithTicket = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee14(e) {var _this$_cache$keys8, t, n, s, o, r;return _regenerator.default.wrap(function _callee14$(_context14) {while (1) {switch (_context14.prev = _context14.next) {case 0:_this$_cache$keys8 = this._cache.keys;t = _this$_cache$keys8.anonymousUuidKey;n = _this$_cache$keys8.refreshTokenKey;s = this._cache.getStore(t);o = this._cache.getStore(n);_context14.next = 7;return this._request.send("auth.linkAndRetrieveDataWithTicket", { anonymous_uuid: s, refresh_token: o, ticket: e });case 7:r = _context14.sent;if (!r.refresh_token) {_context14.next = 16;break;}this._clearAnonymousUUID();this.setRefreshToken(r.refresh_token);_context14.next = 13;return this._request.refreshAccessToken();case 13:pe(ke, { env: this.config.env });pe(we, { loginType: Se.CUSTOM, persistence: "local" });return _context14.abrupt("return", { credential: { refreshToken: r.refresh_token } });case 16:throw new M({ message: "匿名转化失败" });case 17:case "end":return _context14.stop();}}}, _callee14, this);}));function linkAndRetrieveDataWithTicket(_x9) {return _linkAndRetrieveDataWithTicket.apply(this, arguments);}return linkAndRetrieveDataWithTicket;}() }, { key: "_setAnonymousUUID", value: function _setAnonymousUUID(e) {var _this$_cache$keys9 = this._cache.keys,t = _this$_cache$keys9.anonymousUuidKey,n = _this$_cache$keys9.loginTypeKey;this._cache.removeStore(t), this._cache.setStore(t, e), this._cache.setStore(n, Se.ANONYMOUS);} }, { key: "_clearAnonymousUUID", value: function _clearAnonymousUUID() {this._cache.removeStore(this._cache.keys.anonymousUuidKey);} }]);return xe;}(Ee);var Le = /*#__PURE__*/function (_Ee2) {_inherits(Le, _Ee2);var _super5 = _createSuper(Le);function Le() {_classCallCheck(this, Le);return _super5.apply(this, arguments);}_createClass(Le, [{ key: "signIn", value: function () {var _signIn2 = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee15(e) {var t, n;return _regenerator.default.wrap(function _callee15$(_context15) {while (1) {switch (_context15.prev = _context15.next) {case 0:if (!("string" != typeof e)) {_context15.next = 2;break;}throw new M({ param: "PARAM_ERROR", message: "ticket must be a string" });case 2:t = this._cache.keys.refreshTokenKey;_context15.next = 5;return this._request.send("auth.signInWithTicket", { ticket: e, refresh_token: this._cache.getStore(t) || "" });case 5:n = _context15.sent;if (!n.refresh_token) {_context15.next = 15;break;}this.setRefreshToken(n.refresh_token);_context15.next = 10;return this._request.refreshAccessToken();case 10:pe(ye);pe(we, { env: this.config.env, loginType: Se.CUSTOM, persistence: this.config.persistence });_context15.next = 14;return this.refreshUserInfo();case 14:return _context15.abrupt("return", new Ue(this.config.env));case 15:throw new M({ message: "自定义登录失败" });case 16:case "end":return _context15.stop();}}}, _callee15, this);}));function signIn(_x10) {return _signIn2.apply(this, arguments);}return signIn;}() }]);return Le;}(Ee);var De = /*#__PURE__*/function (_Ee3) {_inherits(De, _Ee3);var _super6 = _createSuper(De);function De() {_classCallCheck(this, De);return _super6.apply(this, arguments);}_createClass(De, [{ key: "signIn", value: function () {var _signIn3 = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee16(e, t) {var n, s, o, r, i;return _regenerator.default.wrap(function _callee16$(_context16) {while (1) {switch (_context16.prev = _context16.next) {case 0:if (!("string" != typeof e)) {_context16.next = 2;break;}throw new M({ code: "PARAM_ERROR", message: "email must be a string" });case 2:n = this._cache.keys.refreshTokenKey;_context16.next = 5;return this._request.send("auth.signIn", { loginType: "EMAIL", email: e, password: t, refresh_token: this._cache.getStore(n) || "" });case 5:s = _context16.sent;o = s.refresh_token;r = s.access_token;i = s.access_token_expire;if (!o) {_context16.next = 22;break;}this.setRefreshToken(o);if (!(r && i)) {_context16.next = 15;break;}this.setAccessToken(r, i);_context16.next = 17;break;case 15:_context16.next = 17;return this._request.refreshAccessToken();case 17:_context16.next = 19;return this.refreshUserInfo();case 19:pe(ye);pe(we, { env: this.config.env, loginType: Se.EMAIL, persistence: this.config.persistence });return _context16.abrupt("return", new Ue(this.config.env));case 22:throw s.code ? new M({ code: s.code, message: "\u90AE\u7BB1\u767B\u5F55\u5931\u8D25: ".concat(s.message) }) : new M({ message: "邮箱登录失败" });case 23:case "end":return _context16.stop();}}}, _callee16, this);}));function signIn(_x11, _x12) {return _signIn3.apply(this, arguments);}return signIn;}() }, { key: "activate", value: function () {var _activate = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee17(e) {return _regenerator.default.wrap(function _callee17$(_context17) {while (1) {switch (_context17.prev = _context17.next) {case 0:return _context17.abrupt("return", this._request.send("auth.activateEndUserMail", { token: e }));case 1:case "end":return _context17.stop();}}}, _callee17, this);}));function activate(_x13) {return _activate.apply(this, arguments);}return activate;}() }, { key: "resetPasswordWithToken", value: function () {var _resetPasswordWithToken = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee18(e, t) {return _regenerator.default.wrap(function _callee18$(_context18) {while (1) {switch (_context18.prev = _context18.next) {case 0:return _context18.abrupt("return", this._request.send("auth.resetPasswordWithToken", { token: e, newPassword: t }));case 1:case "end":return _context18.stop();}}}, _callee18, this);}));function resetPasswordWithToken(_x14, _x15) {return _resetPasswordWithToken.apply(this, arguments);}return resetPasswordWithToken;}() }]);return De;}(Ee);var qe = /*#__PURE__*/function (_Ee4) {_inherits(qe, _Ee4);var _super7 = _createSuper(qe);function qe() {_classCallCheck(this, qe);return _super7.apply(this, arguments);}_createClass(qe, [{ key: "signIn", value: function () {var _signIn4 = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee19(e, t) {var n, s, o, r, i;return _regenerator.default.wrap(function _callee19$(_context19) {while (1) {switch (_context19.prev = _context19.next) {case 0:if (!("string" != typeof e)) {_context19.next = 2;break;}throw new M({ code: "PARAM_ERROR", message: "username must be a string" });case 2:"string" != typeof t && (t = "", console.warn("password is empty"));n = this._cache.keys.refreshTokenKey;_context19.next = 6;return this._request.send("auth.signIn", { loginType: Se.USERNAME, username: e, password: t, refresh_token: this._cache.getStore(n) || "" });case 6:s = _context19.sent;o = s.refresh_token;r = s.access_token_expire;i = s.access_token;if (!o) {_context19.next = 23;break;}this.setRefreshToken(o);if (!(i && r)) {_context19.next = 16;break;}this.setAccessToken(i, r);_context19.next = 18;break;case 16:_context19.next = 18;return this._request.refreshAccessToken();case 18:_context19.next = 20;return this.refreshUserInfo();case 20:pe(ye);pe(we, { env: this.config.env, loginType: Se.USERNAME, persistence: this.config.persistence });return _context19.abrupt("return", new Ue(this.config.env));case 23:throw s.code ? new M({ code: s.code, message: "\u7528\u6237\u540D\u5BC6\u7801\u767B\u5F55\u5931\u8D25: ".concat(s.message) }) : new M({ message: "用户名密码登录失败" });case 24:case "end":return _context19.stop();}}}, _callee19, this);}));function signIn(_x16, _x17) {return _signIn4.apply(this, arguments);}return signIn;}() }]);return qe;}(Ee);var Ne = /*#__PURE__*/function () {function Ne(e) {_classCallCheck(this, Ne);this.config = e, this._cache = le(e.env), this._request = Ce(e.env), this._onAnonymousConverted = this._onAnonymousConverted.bind(this), this._onLoginTypeChanged = this._onLoginTypeChanged.bind(this), ge(we, this._onLoginTypeChanged);}_createClass(Ne, [{ key: "anonymousAuthProvider", value: function anonymousAuthProvider() {return new xe(this.config);} }, { key: "customAuthProvider", value: function customAuthProvider() {return new Le(this.config);} }, { key: "emailAuthProvider", value: function emailAuthProvider() {return new De(this.config);} }, { key: "usernameAuthProvider", value: function usernameAuthProvider() {return new qe(this.config);} }, { key: "signInAnonymously", value: function () {var _signInAnonymously = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee20() {return _regenerator.default.wrap(function _callee20$(_context20) {while (1) {switch (_context20.prev = _context20.next) {case 0:return _context20.abrupt("return", new xe(this.config).signIn());case 1:case "end":return _context20.stop();}}}, _callee20, this);}));function signInAnonymously() {return _signInAnonymously.apply(this, arguments);}return signInAnonymously;}() }, { key: "signInWithEmailAndPassword", value: function () {var _signInWithEmailAndPassword = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee21(e, t) {return _regenerator.default.wrap(function _callee21$(_context21) {while (1) {switch (_context21.prev = _context21.next) {case 0:return _context21.abrupt("return", new De(this.config).signIn(e, t));case 1:case "end":return _context21.stop();}}}, _callee21, this);}));function signInWithEmailAndPassword(_x18, _x19) {return _signInWithEmailAndPassword.apply(this, arguments);}return signInWithEmailAndPassword;}() }, { key: "signInWithUsernameAndPassword", value: function signInWithUsernameAndPassword(e, t) {return new qe(this.config).signIn(e, t);} }, { key: "linkAndRetrieveDataWithTicket", value: function () {var _linkAndRetrieveDataWithTicket2 = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee22(e) {return _regenerator.default.wrap(function _callee22$(_context22) {while (1) {switch (_context22.prev = _context22.next) {case 0:this._anonymousAuthProvider || (this._anonymousAuthProvider = new xe(this.config)), ge(ke, this._onAnonymousConverted);_context22.next = 3;return this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e);case 3:return _context22.abrupt("return", _context22.sent);case 4:case "end":return _context22.stop();}}}, _callee22, this);}));function linkAndRetrieveDataWithTicket(_x20) {return _linkAndRetrieveDataWithTicket2.apply(this, arguments);}return linkAndRetrieveDataWithTicket;}() }, { key: "signOut", value: function () {var _signOut = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee23() {var _this$_cache$keys10, e, t, n, s, o;return _regenerator.default.wrap(function _callee23$(_context23) {while (1) {switch (_context23.prev = _context23.next) {case 0:if (!(this.loginType === Se.ANONYMOUS)) {_context23.next = 2;break;}throw new M({ message: "匿名用户不支持登出操作" });case 2:_this$_cache$keys10 = this._cache.keys, e = _this$_cache$keys10.refreshTokenKey, t = _this$_cache$keys10.accessTokenKey, n = _this$_cache$keys10.accessTokenExpireKey, s = this._cache.getStore(e);if (s) {_context23.next = 5;break;}return _context23.abrupt("return");case 5:_context23.next = 7;return this._request.send("auth.logout", { refresh_token: s });case 7:o = _context23.sent;return _context23.abrupt("return", (this._cache.removeStore(e), this._cache.removeStore(t), this._cache.removeStore(n), pe(ye), pe(we, { env: this.config.env, loginType: Se.NULL, persistence: this.config.persistence }), o));case 9:case "end":return _context23.stop();}}}, _callee23, this);}));function signOut() {return _signOut.apply(this, arguments);}return signOut;}() }, { key: "signUpWithEmailAndPassword", value: function () {var _signUpWithEmailAndPassword = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee24(e, t) {return _regenerator.default.wrap(function _callee24$(_context24) {while (1) {switch (_context24.prev = _context24.next) {case 0:return _context24.abrupt("return", this._request.send("auth.signUpWithEmailAndPassword", { email: e, password: t }));case 1:case "end":return _context24.stop();}}}, _callee24, this);}));function signUpWithEmailAndPassword(_x21, _x22) {return _signUpWithEmailAndPassword.apply(this, arguments);}return signUpWithEmailAndPassword;}() }, { key: "sendPasswordResetEmail", value: function () {var _sendPasswordResetEmail = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee25(e) {return _regenerator.default.wrap(function _callee25$(_context25) {while (1) {switch (_context25.prev = _context25.next) {case 0:return _context25.abrupt("return", this._request.send("auth.sendPasswordResetEmail", { email: e }));case 1:case "end":return _context25.stop();}}}, _callee25, this);}));function sendPasswordResetEmail(_x23) {return _sendPasswordResetEmail.apply(this, arguments);}return sendPasswordResetEmail;}() }, { key: "onLoginStateChanged", value: function onLoginStateChanged(e) {var _this10 = this;ge(ye, function () {var t = _this10.hasLoginState();e.call(_this10, t);});var t = this.hasLoginState();e.call(this, t);} }, { key: "onLoginStateExpired", value: function onLoginStateExpired(e) {ge(_e, e.bind(this));} }, { key: "onAccessTokenRefreshed", value: function onAccessTokenRefreshed(e) {ge(Te, e.bind(this));} }, { key: "onAnonymousConverted", value: function onAnonymousConverted(e) {ge(ke, e.bind(this));} }, { key: "onLoginTypeChanged", value: function onLoginTypeChanged(e) {var _this11 = this;ge(we, function () {var t = _this11.hasLoginState();e.call(_this11, t);});} }, { key: "getAccessToken", value: function () {var _getAccessToken2 = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee26() {return _regenerator.default.wrap(function _callee26$(_context26) {while (1) {switch (_context26.prev = _context26.next) {case 0:_context26.next = 2;return this._request.getAccessToken();case 2:_context26.t0 = _context26.sent.accessToken;_context26.t1 = this.config.env;return _context26.abrupt("return", { accessToken: _context26.t0, env: _context26.t1 });case 5:case "end":return _context26.stop();}}}, _callee26, this);}));function getAccessToken() {return _getAccessToken2.apply(this, arguments);}return getAccessToken;}() }, { key: "hasLoginState", value: function hasLoginState() {var e = this._cache.keys.refreshTokenKey;return this._cache.getStore(e) ? new Ue(this.config.env) : null;} }, { key: "isUsernameRegistered", value: function () {var _isUsernameRegistered = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee27(e) {var _yield$this$_request$5, t;return _regenerator.default.wrap(function _callee27$(_context27) {while (1) {switch (_context27.prev = _context27.next) {case 0:if (!("string" != typeof e)) {_context27.next = 2;break;}throw new M({ code: "PARAM_ERROR", message: "username must be a string" });case 2:_context27.next = 4;return this._request.send("auth.isUsernameRegistered", { username: e });case 4:_yield$this$_request$5 = _context27.sent;t = _yield$this$_request$5.data;return _context27.abrupt("return", t && t.isRegistered);case 7:case "end":return _context27.stop();}}}, _callee27, this);}));function isUsernameRegistered(_x24) {return _isUsernameRegistered.apply(this, arguments);}return isUsernameRegistered;}() }, { key: "getLoginState", value: function getLoginState() {return Promise.resolve(this.hasLoginState());} }, { key: "signInWithTicket", value: function () {var _signInWithTicket = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee28(e) {return _regenerator.default.wrap(function _callee28$(_context28) {while (1) {switch (_context28.prev = _context28.next) {case 0:return _context28.abrupt("return", new Le(this.config).signIn(e));case 1:case "end":return _context28.stop();}}}, _callee28, this);}));function signInWithTicket(_x25) {return _signInWithTicket.apply(this, arguments);}return signInWithTicket;}() }, { key: "shouldRefreshAccessToken", value: function shouldRefreshAccessToken(e) {this._request._shouldRefreshAccessTokenHook = e.bind(this);} }, { key: "getUserInfo", value: function getUserInfo() {return this._request.send("auth.getUserInfo", {}).then(function (e) {return e.code ? e : _objectSpread(_objectSpread({}, e.data), {}, { requestId: e.seqId });});} }, { key: "getAuthHeader", value: function getAuthHeader() {var _this$_cache$keys11 = this._cache.keys,e = _this$_cache$keys11.refreshTokenKey,t = _this$_cache$keys11.accessTokenKey,n = this._cache.getStore(e);return { "x-cloudbase-credentials": this._cache.getStore(t) + "/@@/" + n };} }, { key: "_onAnonymousConverted", value: function _onAnonymousConverted(e) {var t = e.data.env;t === this.config.env && this._cache.updatePersistence(this.config.persistence);} }, { key: "_onLoginTypeChanged", value: function _onLoginTypeChanged(e) {var _e$data = e.data,t = _e$data.loginType,n = _e$data.persistence,s = _e$data.env;s === this.config.env && (this._cache.updatePersistence(n), this._cache.setStore(this._cache.keys.loginTypeKey, t));} }, { key: "currentUser", get: function get() {var e = this.hasLoginState();return e && e.user || null;} }, { key: "loginType", get: function get() {return this._cache.getStore(this._cache.keys.loginTypeKey);} }]);return Ne;}();var Fe = function Fe(e, t) {t = t || Q();var n = Ce(this.config.env),s = e.cloudPath,o = e.filePath,r = e.onUploadProgress,_e$fileType = e.fileType,i = _e$fileType === void 0 ? "image" : _e$fileType;return n.send("storage.getUploadMetadata", { path: s }).then(function (e) {var _e$data2 = e.data,a = _e$data2.url,c = _e$data2.authorization,u = _e$data2.token,l = _e$data2.fileId,h = _e$data2.cosFileId,d = e.requestId,f = { key: s, signature: c, "x-cos-meta-fileid": h, success_action_status: "201", "x-cos-security-token": u };n.upload({ url: a, data: f, file: o, name: s, fileType: i, onUploadProgress: r }).then(function (e) {201 === e.statusCode ? t(null, { fileID: l, requestId: d }) : t(new M({ code: "STORAGE_REQUEST_FAIL", message: "STORAGE_REQUEST_FAIL: ".concat(e.data) }));}).catch(function (e) {t(e);});}).catch(function (e) {t(e);}), t.promise;},Me = function Me(e, t) {t = t || Q();var n = Ce(this.config.env),s = e.cloudPath;return n.send("storage.getUploadMetadata", { path: s }).then(function (e) {t(null, e);}).catch(function (e) {t(e);}), t.promise;},$e = function $e(_ref5, t) {var e = _ref5.fileList;if (t = t || Q(), !e || !Array.isArray(e)) return { code: "INVALID_PARAM", message: "fileList必须是非空的数组" };var _iterator3 = _createForOfIteratorHelper(e),_step3;try {for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {var _t7 = _step3.value;if (!_t7 || "string" != typeof _t7) return { code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" };}} catch (err) {_iterator3.e(err);} finally {_iterator3.f();}var n = { fileid_list: e };return Ce(this.config.env).send("storage.batchDeleteFile", n).then(function (e) {e.code ? t(null, e) : t(null, { fileList: e.data.delete_list, requestId: e.requestId });}).catch(function (e) {t(e);}), t.promise;},je = function je(_ref6, t) {var e = _ref6.fileList;t = t || Q(), e && Array.isArray(e) || t(null, { code: "INVALID_PARAM", message: "fileList必须是非空的数组" });var n = [];var _iterator4 = _createForOfIteratorHelper(e),_step4;try {for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {var _s7 = _step4.value;"object" == typeof _s7 ? (_s7.hasOwnProperty("fileID") && _s7.hasOwnProperty("maxAge") || t(null, { code: "INVALID_PARAM", message: "fileList的元素必须是包含fileID和maxAge的对象" }), n.push({ fileid: _s7.fileID, max_age: _s7.maxAge })) : "string" == typeof _s7 ? n.push({ fileid: _s7 }) : t(null, { code: "INVALID_PARAM", message: "fileList的元素必须是字符串" });}} catch (err) {_iterator4.e(err);} finally {_iterator4.f();}var s = { file_list: n };return Ce(this.config.env).send("storage.batchGetDownloadUrl", s).then(function (e) {e.code ? t(null, e) : t(null, { fileList: e.data.download_list, requestId: e.requestId });}).catch(function (e) {t(e);}), t.promise;},Ke = /*#__PURE__*/function () {var _ref8 = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee29(_ref7, t) {var e, n, s, o;return _regenerator.default.wrap(function _callee29$(_context29) {while (1) {switch (_context29.prev = _context29.next) {case 0:e = _ref7.fileID;_context29.next = 3;return je.call(this, { fileList: [{ fileID: e, maxAge: 600 }] });case 3:n = _context29.sent.fileList[0];if (!("SUCCESS" !== n.code)) {_context29.next = 6;break;}return _context29.abrupt("return", t ? t(n) : new Promise(function (e) {e(n);}));case 6:s = Ce(this.config.env);o = n.download_url;if (!(o = encodeURI(o), !t)) {_context29.next = 10;break;}return _context29.abrupt("return", s.download({ url: o }));case 10:_context29.t0 = t;_context29.next = 13;return s.download({ url: o });case 13:_context29.t1 = _context29.sent;(0, _context29.t0)(_context29.t1);case 15:case "end":return _context29.stop();}}}, _callee29, this);}));return function Ke(_x26, _x27) {return _ref8.apply(this, arguments);};}(),Be = function Be(_ref9, r) {var e = _ref9.name,t = _ref9.data,n = _ref9.query,s = _ref9.parse,o = _ref9.search;var i = r || Q();var a;try {a = t ? JSON.stringify(t) : "";} catch (e) {return Promise.reject(e);}if (!e) return Promise.reject(new M({ code: "PARAM_ERROR", message: "函数名不能为空" }));var c = { inQuery: n, parse: s, search: o, function_name: e, request_data: a };return Ce(this.config.env).send("functions.invokeFunction", c).then(function (e) {if (e.code) i(null, e);else {var _t8 = e.data.response_data;if (s) i(null, { result: _t8, requestId: e.requestId });else try {_t8 = JSON.parse(e.data.response_data), i(null, { result: _t8, requestId: e.requestId });} catch (e) {i(new M({ message: "response data must be json" }));}}return i.promise;}).catch(function (e) {i(e);}), i.promise;},He = { timeout: 15e3, persistence: "session" },We = {};var ze = /*#__PURE__*/function () {function ze(e) {_classCallCheck(this, ze);this.config = e || this.config, this.authObj = void 0;}_createClass(ze, [{ key: "init", value: function init(e) {switch (se.adapter || (this.requestClient = new se.adapter.reqClass({ timeout: e.timeout || 5e3, timeoutMsg: "\u8BF7\u6C42\u5728".concat((e.timeout || 5e3) / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD") })), this.config = _objectSpread(_objectSpread({}, He), e), !0) {case this.config.timeout > 6e5:console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"), this.config.timeout = 6e5;break;case this.config.timeout < 100:console.warn("timeout小于可配置下限[100ms],已重置为下限数值"), this.config.timeout = 100;}return new ze(this.config);} }, { key: "auth", value: function auth() {var _ref10 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},e = _ref10.persistence;if (this.authObj) return this.authObj;var t = e || se.adapter.primaryStorage || He.persistence;var n;return t !== this.config.persistence && (this.config.persistence = t), function (e) {var t = e.env;ce[t] = new ae(e), ue[t] = new ae(_objectSpread(_objectSpread({}, e), {}, { persistence: "local" }));}(this.config), n = this.config, Oe[n.env] = new be(n), this.authObj = new Ne(this.config), this.authObj;} }, { key: "on", value: function on(e, t) {return ge.apply(this, [e, t]);} }, { key: "off", value: function off(e, t) {return me.apply(this, [e, t]);} }, { key: "callFunction", value: function callFunction(e, t) {return Be.apply(this, [e, t]);} }, { key: "deleteFile", value: function deleteFile(e, t) {return $e.apply(this, [e, t]);} }, { key: "getTempFileURL", value: function getTempFileURL(e, t) {return je.apply(this, [e, t]);} }, { key: "downloadFile", value: function downloadFile(e, t) {return Ke.apply(this, [e, t]);} }, { key: "uploadFile", value: function uploadFile(e, t) {return Fe.apply(this, [e, t]);} }, { key: "getUploadMetadata", value: function getUploadMetadata(e, t) {return Me.apply(this, [e, t]);} }, { key: "registerExtension", value: function registerExtension(e) {We[e.name] = e;} }, { key: "invokeExtension", value: function () {var _invokeExtension = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee30(e, t) {var n;return _regenerator.default.wrap(function _callee30$(_context30) {while (1) {switch (_context30.prev = _context30.next) {case 0:n = We[e];if (n) {_context30.next = 3;break;}throw new M({ message: "\u6269\u5C55".concat(e, " \u5FC5\u987B\u5148\u6CE8\u518C") });case 3:_context30.next = 5;return n.invoke(t, this);case 5:return _context30.abrupt("return", _context30.sent);case 6:case "end":return _context30.stop();}}}, _callee30, this);}));function invokeExtension(_x28, _x29) {return _invokeExtension.apply(this, arguments);}return invokeExtension;}() }, { key: "useAdapters", value: function useAdapters(e) {var _ref11 = ne(e) || {},t = _ref11.adapter,n = _ref11.runtime;t && (se.adapter = t), n && (se.runtime = n);} }]);return ze;}();var Ve = new ze();function Je(e, t, n) {void 0 === n && (n = {});var s = /\?/.test(t),o = "";for (var r in n) {"" === o ? !s && (t += "?") : o += "&", o += r + "=" + encodeURIComponent(n[r]);}return /^http(s)?:\/\//.test(t += o) ? t : "" + e + t;}var Ye = /*#__PURE__*/function () {function Ye() {_classCallCheck(this, Ye);}_createClass(Ye, [{ key: "post", value: function post(e) {var t = e.url,n = e.data,s = e.headers;return new Promise(function (e, o) {H.request({ url: Je("https:", t), data: n, method: "POST", header: s, success: function success(t) {e(t);}, fail: function fail(e) {o(e);} });});} }, { key: "upload", value: function upload(e) {return new Promise(function (t, n) {var s = e.url,o = e.file,r = e.data,i = e.headers,a = e.fileType,c = H.uploadFile({ url: Je("https:", s), name: "file", formData: Object.assign({}, r), filePath: o, fileType: a, header: i, success: function success(e) {var n = { statusCode: e.statusCode, data: e.data || {} };200 === e.statusCode && r.success_action_status && (n.statusCode = parseInt(r.success_action_status, 10)), t(n);}, fail: function fail(e) {d && "mp-alipay" === g && console.warn("支付宝小程序开发工具上传腾讯云时无法准确判断是否上传成功,请使用真机测试"), n(new Error(e.errMsg || "uploadFile:fail"));} });"function" == typeof e.onUploadProgress && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (t) {e.onUploadProgress({ loaded: t.totalBytesSent, total: t.totalBytesExpectedToSend });});});} }]);return Ye;}();var Xe = { setItem: function setItem(e, t) {H.setStorageSync(e, t);}, getItem: function getItem(e) {return H.getStorageSync(e);}, removeItem: function removeItem(e) {H.removeStorageSync(e);}, clear: function clear() {H.clearStorageSync();} };var Ge = { genAdapter: function genAdapter() {return { root: {}, reqClass: Ye, localStorage: Xe, primaryStorage: "local" };}, isMatch: function isMatch() {return !0;}, runtime: "uni_app" };Ve.useAdapters(Ge);var Qe = Ve,Ze = Qe.init;Qe.init = function (e) {e.env = e.spaceId;var t = Ze.call(this, e);t.config.provider = "tencent", t.config.spaceId = e.spaceId;var n = t.auth;return t.auth = function (e) {var t = n.call(this, e);return ["linkAndRetrieveDataWithTicket", "signInAnonymously", "signOut", "getAccessToken", "getLoginState", "signInWithTicket", "getUserInfo"].forEach(function (e) {t[e] = F(t[e]).bind(t);}), t;}, t.customAuth = t.auth, t;};var et = Qe;function tt() {return { token: H.getStorageSync("uni_id_token") || H.getStorageSync("uniIdToken"), tokenExpired: H.getStorageSync("uni_id_token_expired") };}function nt() {var _ref12 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},e = _ref12.token,t = _ref12.tokenExpired;e && H.setStorageSync("uni_id_token", e), t && H.setStorageSync("uni_id_token_expired", t);}function st() {if (!d || "web" !== g) return;uni.getStorageSync("__LAST_DCLOUD_APPID") !== _ && (uni.setStorageSync("__LAST_DCLOUD_APPID", _), console.warn("检测到当前项目与上次运行到此端口的项目不一致,自动清理uni-id保存的token信息(仅开发调试时生效)"), H.removeStorageSync("uni_id_token"), H.removeStorageSync("uniIdToken"), H.removeStorageSync("uni_id_token_expired"));}var ot = /*#__PURE__*/function (_V) {_inherits(ot, _V);var _super8 = _createSuper(ot);function ot() {_classCallCheck(this, ot);return _super8.apply(this, arguments);}_createClass(ot, [{ key: "getAccessToken", value: function getAccessToken() {var _this12 = this;return new Promise(function (e, t) {var n = "Anonymous_Access_token";_this12.setAccessToken(n), e(n);});} }, { key: "setupRequest", value: function setupRequest(e, t) {var n = Object.assign({}, e, { spaceId: this.config.spaceId, timestamp: Date.now() }),s = { "Content-Type": "application/json" };"auth" !== t && (n.token = this.accessToken, s["x-basement-token"] = this.accessToken), s["x-serverless-sign"] = B.sign(n, this.config.clientSecret);var o = K();s["x-client-info"] = encodeURIComponent(JSON.stringify(o));var _tt = tt(),r = _tt.token;return s["x-client-token"] = r, { url: this.config.requestUrl, method: "POST", data: n, dataType: "json", header: JSON.parse(JSON.stringify(s)) };} }, { key: "uploadFileToOSS", value: function uploadFileToOSS(_ref13) {var _this13 = this;var e = _ref13.url,t = _ref13.formData,n = _ref13.name,s = _ref13.filePath,o = _ref13.fileType,r = _ref13.onUploadProgress;return new Promise(function (i, a) {var c = _this13.adapter.uploadFile({ url: e, formData: t, name: n, filePath: s, fileType: o, success: function success(e) {e && e.statusCode < 400 ? i(e) : a(new M({ code: "UPLOAD_FAILED", message: "文件上传失败" }));}, fail: function fail(e) {a(new M({ code: e.code || "UPLOAD_FAILED", message: e.message || e.errMsg || "文件上传失败" }));} });"function" == typeof r && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {r({ loaded: e.totalBytesSent, total: e.totalBytesExpectedToSend });});});} }, { key: "uploadFile", value: function uploadFile(_ref14) {var _this14 = this;var e = _ref14.filePath,t = _ref14.cloudPath,_ref14$fileType = _ref14.fileType,n = _ref14$fileType === void 0 ? "image" : _ref14$fileType,s = _ref14.onUploadProgress;if (!t) throw new M({ code: "CLOUDPATH_REQUIRED", message: "cloudPath不可为空" });var o;return this.getOSSUploadOptionsFromPath({ cloudPath: t }).then(function (t) {var _t$result = t.result,r = _t$result.url,i = _t$result.formData,a = _t$result.name;o = t.result.fileUrl;var c = { url: r, formData: i, name: a, filePath: e, fileType: n };return _this14.uploadFileToOSS(Object.assign({}, c, { onUploadProgress: s }));}).then(function () {return _this14.reportOSSUpload({ cloudPath: t });}).then(function (t) {return new Promise(function (n, s) {t.success ? n({ success: !0, filePath: e, fileID: o }) : s(new M({ code: "UPLOAD_FAILED", message: "文件上传失败" }));});});} }, { key: "deleteFile", value: function deleteFile(_ref15) {var e = _ref15.fileList;var t = { method: "serverless.file.resource.delete", params: JSON.stringify({ fileList: e }) };return this.request(this.setupRequest(t));} }, { key: "getTempFileURL", value: function getTempFileURL() {var _ref16 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},e = _ref16.fileList;var t = { method: "serverless.file.resource.getTempFileURL", params: JSON.stringify({ fileList: e }) };return this.request(this.setupRequest(t));} }]);return ot;}(V);var rt = { init: function init(e) {var t = new ot(e),n = { signInAnonymously: function signInAnonymously() {return t.authorize();}, getLoginState: function getLoginState() {return Promise.resolve(!1);} };return t.auth = function () {return n;}, t.customAuth = t.auth, t;} };function it(_ref17) {var e = _ref17.data;var t;t = K();var n = JSON.parse(JSON.stringify(e || {}));if (Object.assign(n, { clientInfo: t }), !n.uniIdToken) {var _tt2 = tt(),_e19 = _tt2.token;_e19 && (n.uniIdToken = _e19);}return n;}function at(_ref18) {var _this15 = this;var e = _ref18.name,t = _ref18.data;var n = this.localAddress,s = this.localPort,o = { aliyun: "aliyun", tencent: "tcb" }[this.config.provider],r = this.config.spaceId,i = "http://".concat(n, ":").concat(s, "/system/check-function"),a = "http://".concat(n, ":").concat(s, "/cloudfunctions/").concat(e);return new Promise(function (t, n) {H.request({ method: "POST", url: i, data: { name: e, platform: g, provider: o, spaceId: r }, timeout: 3e3, success: function success(e) {t(e);}, fail: function fail() {t({ data: { code: "NETWORK_ERROR", message: "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下,自动切换为已部署的云函数。" } });} });}).then(function () {var _ref19 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},e = _ref19.data;var _ref20 = e || {},t = _ref20.code,n = _ref20.message;return { code: 0 === t ? 0 : t || "SYS_ERR", message: n || "SYS_ERR" };}).then(function (_ref21) {var n = _ref21.code,s = _ref21.message;if (0 !== n) {switch (n) {case "MODULE_ENCRYPTED":console.error("\u6B64\u4E91\u51FD\u6570\uFF08".concat(e, "\uFF09\u4F9D\u8D56\u52A0\u5BC6\u516C\u5171\u6A21\u5757\u4E0D\u53EF\u672C\u5730\u8C03\u8BD5\uFF0C\u81EA\u52A8\u5207\u6362\u4E3A\u4E91\u7AEF\u5DF2\u90E8\u7F72\u7684\u4E91\u51FD\u6570"));break;case "FUNCTION_ENCRYPTED":console.error("\u6B64\u4E91\u51FD\u6570\uFF08".concat(e, "\uFF09\u5DF2\u52A0\u5BC6\u4E0D\u53EF\u672C\u5730\u8C03\u8BD5\uFF0C\u81EA\u52A8\u5207\u6362\u4E3A\u4E91\u7AEF\u5DF2\u90E8\u7F72\u7684\u4E91\u51FD\u6570"));break;case "ACTION_ENCRYPTED":console.error(s || "需要访问加密的uni-clientDB-action,自动切换为云端环境");break;case "NETWORK_ERROR":{var _e20 = "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下";throw console.error(_e20), new Error(_e20);}case "SWITCH_TO_CLOUD":break;default:{var _e21 = "\u68C0\u6D4B\u672C\u5730\u8C03\u8BD5\u670D\u52A1\u51FA\u73B0\u9519\u8BEF\uFF1A".concat(s, "\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u73AF\u5883\u6216\u91CD\u542F\u5BA2\u6237\u7AEF\u518D\u8BD5");throw console.error(_e21), new Error(_e21);}}return _this15._originCallFunction({ name: e, data: t });}return new Promise(function (e, n) {var s = it.call(_this15, { data: t });H.request({ method: "POST", url: a, data: { provider: o, platform: g, param: s }, success: function success() {var _ref22 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},t = _ref22.statusCode,s = _ref22.data;return !t || t >= 400 ? n(new M({ code: s.code || "SYS_ERR", message: s.message || "request:fail" })) : e({ result: s });}, fail: function fail(e) {n(new M({ code: e.code || e.errCode || "SYS_ERR", message: e.message || e.errMsg || "request:fail" }));} });});});}var ct = [{ rule: /fc_function_not_found|FUNCTION_NOT_FOUND/, content: ",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间", mode: "append" }];var ut = /[\\^$.*+?()[\]{}|]/g,lt = RegExp(ut.source);function ht(e, t, n) {return e.replace(new RegExp((s = t) && lt.test(s) ? s.replace(ut, "\\$&") : s, "g"), n);var s;}function dt(_ref23) {var e = _ref23.functionName,t = _ref23.result,n = _ref23.logPvd;if (this.config.debugLog && t && t.requestId) {var _s8 = JSON.stringify({ spaceId: this.config.spaceId, functionName: e, requestId: t.requestId });console.log("[".concat(n, "-request]").concat(_s8, "[/").concat(n, "-request]"));}}function ft(e) {var t = e.callFunction,n = function n(_n5) {var _this16 = this;var s = _n5.name;_n5.data = it.call(e, { data: _n5.data });var o = { aliyun: "aliyun", tencent: "tcb", tcb: "tcb" }[this.config.provider];return t.call(this, _n5).then(function (e) {return e.errCode = 0, dt.call(_this16, { functionName: s, result: e, logPvd: o }), Promise.resolve(e);}, function (e) {return dt.call(_this16, { functionName: s, result: e, logPvd: o }), e && e.message && (e.message = function () {var _ref24 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},_ref24$message = _ref24.message,e = _ref24$message === void 0 ? "" : _ref24$message,_ref24$extraInfo = _ref24.extraInfo,t = _ref24$extraInfo === void 0 ? {} : _ref24$extraInfo,_ref24$formatter = _ref24.formatter,n = _ref24$formatter === void 0 ? [] : _ref24$formatter;for (var _s9 = 0; _s9 < n.length; _s9++) {var _n$_s = n[_s9],_o3 = _n$_s.rule,_r2 = _n$_s.content,i = _n$_s.mode,_a = e.match(_o3);if (!_a) continue;var _c = _r2;for (var _e22 = 1; _e22 < _a.length; _e22++) {_c = ht(_c, "{$".concat(_e22, "}"), _a[_e22]);}for (var _e23 in t) {_c = ht(_c, "{".concat(_e23, "}"), t[_e23]);}return "replace" === i ? _c : e + _c;}return e;}({ message: "[".concat(_n5.name, "]: ").concat(e.message), formatter: ct, extraInfo: { functionName: s } })), Promise.reject(e);});};e.callFunction = function (t) {var s;return d && e.debugInfo && !e.debugInfo.forceRemote && m ? (e._originCallFunction || (e._originCallFunction = n), s = at.call(this, t)) : s = n.call(this, t), Object.defineProperty(s, "result", { get: function get() {return console.warn("当前返回结果为Promise类型,不可直接访问其result属性,详情请参考:https://uniapp.dcloud.net.cn/uniCloud/faq?id=promise"), {};} }), s;};}var gt = Symbol("CLIENT_DB_INTERNAL");function pt(e, t) {return e.then = "DoNotReturnProxyWithAFunctionNamedThen", e._internalType = gt, e.__ob__ = void 0, new Proxy(e, { get: function get(e, n, s) {if ("_uniClient" === n) return null;if (n in e || "string" != typeof n) {var _t9 = e[n];return "function" == typeof _t9 ? _t9.bind(e) : _t9;}return t.get(e, n, s);} });}function mt(e) {return { on: function on(t, n) {e[t] = e[t] || [], e[t].indexOf(n) > -1 || e[t].push(n);}, off: function off(t, n) {e[t] = e[t] || [];var s = e[t].indexOf(n);-1 !== s && e[t].splice(s, 1);} };}var yt = ["db.Geo", "db.command", "command.aggregate"];function _t(e, t) {return yt.indexOf("".concat(e, ".").concat(t)) > -1;}function wt(e) {switch (u(e)) {case "array":return e.map(function (e) {return wt(e);});case "object":return e._internalType === gt || Object.keys(e).forEach(function (t) {e[t] = wt(e[t]);}), e;case "regexp":return { $regexp: { source: e.source, flags: e.flags } };case "date":return { $date: e.toISOString() };default:return e;}}function kt(e) {return e && e.content && e.content.$method;}var Tt = /*#__PURE__*/function () {function Tt(e, t, n) {_classCallCheck(this, Tt);this.content = e, this.prevStage = t || null, this.udb = null, this._database = n;}_createClass(Tt, [{ key: "toJSON", value: function toJSON() {var e = this;var t = [e.content];for (; e.prevStage;) {e = e.prevStage, t.push(e.content);}return { $db: t.reverse().map(function (e) {return { $method: e.$method, $param: wt(e.$param) };}) };} }, { key: "getAction", value: function getAction() {var e = this.toJSON().$db.find(function (e) {return "action" === e.$method;});return e && e.$param && e.$param[0];} }, { key: "getCommand", value: function getCommand() {return { $db: this.toJSON().$db.filter(function (e) {return "action" !== e.$method;}) };} }, { key: "get", value: function get() {return this._send("get", Array.from(arguments));} }, { key: "add", value: function add() {return this._send("add", Array.from(arguments));} }, { key: "update", value: function update() {return this._send("update", Array.from(arguments));} }, { key: "end", value: function end() {return this._send("end", Array.from(arguments));} }, { key: "_send", value: function _send(e, t) {var n = this.getAction(),s = this.getCommand();if (s.$db.push({ $method: e, $param: wt(t) }), d) {var _e24 = s.$db.find(function (e) {return "collection" === e.$method;}),_t10 = _e24 && _e24.$param;_t10 && 1 === _t10.length && "string" == typeof _e24.$param[0] && _e24.$param[0].indexOf(",") > -1 && console.warn("检测到使用JQL语法联表查询时,未使用getTemp先过滤主表数据,在主表数据量大的情况下可能会查询缓慢。\n- 如何优化请参考此文档:https://uniapp.dcloud.net.cn/uniCloud/jql?id=lookup-with-temp \n- 如果主表数据量很小请忽略此信息,项目发行时不会出现此提示。");}return this._database._callCloudFunction({ action: n, command: s });} }, { key: "isAggregate", get: function get() {var e = this;for (; e;) {var t = kt(e),_n6 = kt(e.prevStage);if ("aggregate" === t && "collection" === _n6 || "pipeline" === t) return !0;e = e.prevStage;}return !1;} }, { key: "isCommand", get: function get() {var e = this;for (; e;) {if ("command" === kt(e)) return !0;e = e.prevStage;}return !1;} }, { key: "isAggregateCommand", get: function get() {var e = this;for (; e;) {var t = kt(e),_n7 = kt(e.prevStage);if ("aggregate" === t && "command" === _n7) return !0;e = e.prevStage;}return !1;} }, { key: "count", get: function get() {if (!this.isAggregate) return function () {return this._send("count", Array.from(arguments));};var e = this;return function () {return St({ $method: "count", $param: wt(Array.from(arguments)) }, e, this._database);};} }, { key: "remove", get: function get() {if (!this.isCommand) return function () {return this._send("remove", Array.from(arguments));};var e = this;return function () {return St({ $method: "remove", $param: wt(Array.from(arguments)) }, e, this._database);};} }, { key: "set", get: function get() {if (!this.isCommand) return function () {throw new Error("JQL禁止使用set方法");};var e = this;return function () {return St({ $method: "set", $param: wt(Array.from(arguments)) }, e, this._database);};} }]);return Tt;}();function St(e, t, n) {return pt(new Tt(e, t, n), { get: function get(e, t) {var s = "db";return e && e.content && (s = e.content.$method), _t(s, t) ? St({ $method: t }, e, n) : function () {return St({ $method: t, $param: wt(Array.from(arguments)) }, e, n);};} });}function vt(_ref25) {var e = _ref25.path,t = _ref25.method;return /*#__PURE__*/function () {function _class2() {_classCallCheck(this, _class2);this.param = Array.from(arguments);}_createClass(_class2, [{ key: "toJSON", value: function toJSON() {return { $newDb: [].concat(_toConsumableArray(e.map(function (e) {return { $method: e };})), [{ $method: t, $param: this.param }]) };} }]);return _class2;}();}var At = /*#__PURE__*/function (_ref26) {_inherits(At, _ref26);var _super9 = _createSuper(At);function At() {_classCallCheck(this, At);return _super9.apply(this, arguments);}_createClass(At, [{ key: "_callCloudFunction", value: function _callCloudFunction(_ref27) {var _this17 = this;var e = _ref27.action,t = _ref27.command,n = _ref27.multiCommand,s = _ref27.queryList;function o(e, t) {if (n && s) for (var _n8 = 0; _n8 < s.length; _n8++) {var _o4 = s[_n8];_o4.udb && "function" == typeof _o4.udb.setResult && (t ? _o4.udb.setResult(t) : _o4.udb.setResult(e.result.dataList[_n8]));}}var r = this;function i(e) {return r._callback("error", [e]), P(I("database", "fail"), e).then(function () {return P(I("database", "complete"), e);}).then(function () {return o(null, e), N(O, { type: R, content: e }), Promise.reject(e);});}var a = P(I("database", "invoke")),u = this._uniClient;return a.then(function () {return u.callFunction({ name: "DCloud-clientDB", type: c, data: { action: e, command: t, multiCommand: n } });}).then(function (e) {var _e$result = e.result,t = _e$result.code,n = _e$result.message,s = _e$result.token,r = _e$result.tokenExpired,_e$result$systemInfo = _e$result.systemInfo,a = _e$result$systemInfo === void 0 ? [] : _e$result$systemInfo;if (a) for (var _e25 = 0; _e25 < a.length; _e25++) {var _a$_e = a[_e25],_t11 = _a$_e.level,_n9 = _a$_e.message,_s10 = _a$_e.detail,_o5 = console["app" === g && "warn" === _t11 ? "error" : _t11] || console.log;var _r3 = "[System Info]" + _n9;_s10 && (_r3 = "".concat(_r3, "\n\u8BE6\u7EC6\u4FE1\u606F\uFF1A").concat(_s10)), _o5(_r3);}if (t) {return i(new M({ code: t, message: n, requestId: e.requestId }));}e.result.errCode = e.result.code, e.result.errMsg = e.result.message, s && r && (nt({ token: s, tokenExpired: r }), _this17._callbackAuth("refreshToken", [{ token: s, tokenExpired: r }]), _this17._callback("refreshToken", [{ token: s, tokenExpired: r }]), N(E, { token: s, tokenExpired: r }));var c = [{ prop: "affectedDocs", tips: "affectedDocs不再推荐使用,请使用inserted/deleted/updated/data.length替代" }, { prop: "code", tips: "code不再推荐使用,请使用errCode替代" }, { prop: "message", tips: "message不再推荐使用,请使用errMsg替代" }];var _loop = function _loop(_t12) {var _c$_t = c[_t12],n = _c$_t.prop,s = _c$_t.tips;if (n in e.result) {var _t13 = e.result[n];Object.defineProperty(e.result, n, { get: function get() {return console.warn(s), _t13;} });}};for (var _t12 = 0; _t12 < c.length; _t12++) {_loop(_t12);}return function (e) {return P(I("database", "success"), e).then(function () {return P(I("database", "complete"), e);}).then(function () {return o(e, null), N(O, { type: R, content: e }), Promise.resolve(e);});}(e);}, function (e) {/fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e.message) && console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB");return i(new M({ code: e.code || "SYSTEM_ERROR", message: e.message, requestId: e.requestId }));});} }]);return At;}( /*#__PURE__*/function () {function _class3() {var _ref28 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},_ref28$uniClient = _ref28.uniClient,e = _ref28$uniClient === void 0 ? {} : _ref28$uniClient;_classCallCheck(this, _class3);this._uniClient = e, this._authCallBacks = {}, this._dbCallBacks = {}, e.isDefault && (this._dbCallBacks = k("_globalUniCloudDatabaseCallback")), this.auth = mt(this._authCallBacks), Object.assign(this, mt(this._dbCallBacks)), this.env = pt({}, { get: function get(e, t) {return { $env: t };} }), this.Geo = pt({}, { get: function get(e, t) {return vt({ path: ["Geo"], method: t });} }), this.serverDate = vt({ path: [], method: "serverDate" }), this.RegExp = vt({ path: [], method: "RegExp" });}_createClass(_class3, [{ key: "getCloudEnv", value: function getCloudEnv(e) {if ("string" != typeof e || !e.trim()) throw new Error("getCloudEnv参数错误");return { $env: e.replace("$cloudEnv_", "") };} }, { key: "_callback", value: function _callback(e, t) {var n = this._dbCallBacks;n[e] && n[e].forEach(function (e) {e.apply(void 0, _toConsumableArray(t));});} }, { key: "_callbackAuth", value: function _callbackAuth(e, t) {var n = this._authCallBacks;n[e] && n[e].forEach(function (e) {e.apply(void 0, _toConsumableArray(t));});} }, { key: "multiSend", value: function multiSend() {var e = Array.from(arguments),t = e.map(function (e) {var t = e.getAction(),n = e.getCommand();if ("getTemp" !== n.$db[n.$db.length - 1].$method) throw new Error("multiSend只支持子命令内使用getTemp");return { action: t, command: n };});return this._callCloudFunction({ multiCommand: t, queryList: e });} }]);return _class3;}());function Pt(e) {e.database = function (t) {if (t && Object.keys(t).length > 0) return e.init(t).database();if (this._database) return this._database;var n = function (e) {var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};return pt(new e(t), { get: function get(e, t) {return _t("db", t) ? St({ $method: t }, null, e) : function () {return St({ $method: t, $param: wt(Array.from(arguments)) }, null, e);};} });}(At, { uniClient: e });return this._database = n, n;};}var It = "token无效,跳转登录页面",bt = "token过期,跳转登录页面",Ot = { TOKEN_INVALID_TOKEN_EXPIRED: bt, TOKEN_INVALID_INVALID_CLIENTID: It, TOKEN_INVALID: It, TOKEN_INVALID_WRONG_TOKEN: It, TOKEN_INVALID_ANONYMOUS_USER: It },Ct = { "uni-id-token-expired": bt, "uni-id-check-token-failed": It, "uni-id-token-not-exist": It, "uni-id-check-device-feature-failed": It };function Et(e, t) {var n = "";return n = e ? "".concat(e, "/").concat(t) : t, n.replace(/^\//, "");}function Rt() {var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";var n = [],s = [];return e.forEach(function (e) {!0 === e.needLogin ? n.push(Et(t, e.path)) : !1 === e.needLogin && s.push(Et(t, e.path));}), { needLoginPage: n, notNeedLoginPage: s };}function Ut() {var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};if (!e) return !1;if (!(t && t.list && t.list.length)) return !1;var n = t.list,s = e.split("?")[0].replace(/^\//, "");return n.some(function (e) {return e.pagePath === s;});}var xt = !!_pages.default.uniIdRouter;var _ref29 = function () {var _ref30 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _pages.default,_ref30$pages = _ref30.pages,e = _ref30$pages === void 0 ? [] : _ref30$pages,_ref30$subPackages = _ref30.subPackages,n = _ref30$subPackages === void 0 ? [] : _ref30$subPackages,_ref30$uniIdRouter = _ref30.uniIdRouter,s = _ref30$uniIdRouter === void 0 ? {} : _ref30$uniIdRouter,_ref30$tabBar = _ref30.tabBar,o = _ref30$tabBar === void 0 ? {} : _ref30$tabBar;var r = s.loginPage,_s$needLogin = s.needLogin,i = _s$needLogin === void 0 ? [] : _s$needLogin,_s$resToLogin = s.resToLogin,a = _s$resToLogin === void 0 ? !0 : _s$resToLogin,_Rt = Rt(e),c = _Rt.needLoginPage,u = _Rt.notNeedLoginPage,_ref31 = function () {var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];var t = [],n = [];return e.forEach(function (e) {var s = e.root,_e$pages = e.pages,o = _e$pages === void 0 ? [] : _e$pages,_Rt2 = Rt(o, s),r = _Rt2.needLoginPage,i = _Rt2.notNeedLoginPage;t.push.apply(t, _toConsumableArray(r)), n.push.apply(n, _toConsumableArray(i));}), { needLoginPage: t, notNeedLoginPage: n };}(n),l = _ref31.needLoginPage,h = _ref31.notNeedLoginPage;return { loginPage: r, routerNeedLogin: i, resToLogin: a, needLoginPage: [].concat(_toConsumableArray(c), _toConsumableArray(l)), notNeedLoginPage: [].concat(_toConsumableArray(u), _toConsumableArray(h)), loginPageInTabBar: Ut(r, o) };}(),Lt = _ref29.loginPage,Dt = _ref29.routerNeedLogin,qt = _ref29.resToLogin,Nt = _ref29.needLoginPage,Ft = _ref29.notNeedLoginPage,Mt = _ref29.loginPageInTabBar;function $t(e) {var t = function (e) {var t = getCurrentPages(),n = t[t.length - 1].route,s = e.charAt(0),o = e.split("?")[0];if ("/" === s) return o;var r = o.replace(/^\//, "").split("/"),i = n.split("/");i.pop();for (var _e26 = 0; _e26 < r.length; _e26++) {var _t14 = r[_e26];".." === _t14 ? i.pop() : "." !== _t14 && i.push(_t14);}return "" === i[0] && i.shift(), i.join("/");}(e).replace(/^\//, "");return !(Ft.indexOf(t) > -1) && (Nt.indexOf(t) > -1 || Dt.some(function (t) {return function (e, t) {return new RegExp(t).test(e);}(e, t);}));}function jt(e, t) {return "/" !== e.charAt(0) && (e = "/" + e), t ? e.indexOf("?") > -1 ? e + "&uniIdRedirectUrl=".concat(encodeURIComponent(t)) : e + "?uniIdRedirectUrl=".concat(encodeURIComponent(t)) : e;}function Kt() {var e = ["navigateTo", "redirectTo", "reLaunch", "switchTab"];var _loop2 = function _loop2(_t15) {var n = e[_t15];uni.addInterceptor(n, { invoke: function invoke(e) {var _tt3 = tt(),t = _tt3.token,s = _tt3.tokenExpired;var o;if (t) {if (s < Date.now()) {var _e27 = "uni-id-token-expired";o = { errCode: _e27, errMsg: Ct[_e27] };}} else {var _e28 = "uni-id-check-token-failed";o = { errCode: _e28, errMsg: Ct[_e28] };}if ($t(e.url) && o) {o.uniIdRedirectUrl = e.url;if (L(C).length > 0) return setTimeout(function () {N(C, o);}, 0), e.url = "", !1;if (!Lt) return e;var _t16 = jt(Lt, o.uniIdRedirectUrl);if (Mt) {if ("navigateTo" === n || "redirectTo" === n) return setTimeout(function () {uni.switchTab({ url: _t16 });}), !1;} else if ("switchTab" === n) return setTimeout(function () {uni.navigateTo({ url: _t16 });}), !1;e.url = _t16;}return e;} });};for (var _t15 = 0; _t15 < e.length; _t15++) {_loop2(_t15);}}function Bt() {this.onResponse(function (e) {var t = e.type,n = e.content;var s = !1;switch (t) {case "cloudobject":s = function (e) {var t = e.errCode;return t in Ct;}(n);break;case "clientdb":s = function (e) {var t = e.errCode;return t in Ot;}(n);}s && function () {var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};var t = L(C),n = getCurrentPages(),s = n[n.length - 1],o = s && s.$page && s.$page.fullPath;if (t.length > 0) return N(C, Object.assign({ uniIdRedirectUrl: o }, e));Lt && uni.navigateTo({ url: jt(Lt, o) });}(n);});}function Ht(e) {e.onNeedLogin = function (e) {D(C, e);}, e.offNeedLogin = function (e) {q(C, e);}, xt && (k("uni-cloud-status").needLoginInit || (k("uni-cloud-status").needLoginInit = !0, function t() {var n = getCurrentPages();n && n[0] ? Kt.call(e) : setTimeout(function () {t();}, 30);}(), qt && Bt.call(e)));}function Wt(e) {!function (e) {e.onResponse = function (e) {D(O, e);}, e.offResponse = function (e) {q(O, e);};}(e), Ht(e), function (e) {e.onRefreshToken = function (e) {D(E, e);}, e.offRefreshToken = function (e) {q(E, e);};}(e);}var zt;var Vt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Jt = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;function Yt() {var e = tt().token || "",t = e.split(".");if (!e || 3 !== t.length) return { uid: null, role: [], permission: [], tokenExpired: 0 };var n;try {n = JSON.parse((s = t[1], decodeURIComponent(zt(s).split("").map(function (e) {return "%" + ("00" + e.charCodeAt(0).toString(16)).slice(-2);}).join(""))));} catch (e) {throw new Error("获取当前用户信息出错,详细错误信息为:" + e.message);}var s;return n.tokenExpired = 1e3 * n.exp, delete n.exp, delete n.iat, n;}zt = "function" != typeof atob ? function (e) {if (e = String(e).replace(/[\t\n\f\r ]+/g, ""), !Jt.test(e)) throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");var t;e += "==".slice(2 - (3 & e.length));for (var n, s, o = "", r = 0; r < e.length;) {t = Vt.indexOf(e.charAt(r++)) << 18 | Vt.indexOf(e.charAt(r++)) << 12 | (n = Vt.indexOf(e.charAt(r++))) << 6 | (s = Vt.indexOf(e.charAt(r++))), o += 64 === n ? String.fromCharCode(t >> 16 & 255) : 64 === s ? String.fromCharCode(t >> 16 & 255, t >> 8 & 255) : String.fromCharCode(t >> 16 & 255, t >> 8 & 255, 255 & t);}return o;} : atob;var Xt = s(function (e, t) {Object.defineProperty(t, "__esModule", { value: !0 });var n = "chooseAndUploadFile:ok",s = "chooseAndUploadFile:fail";function o(e, t) {return e.tempFiles.forEach(function (e, n) {e.name || (e.name = e.path.substring(e.path.lastIndexOf("/") + 1)), t && (e.fileType = t), e.cloudPath = Date.now() + "_" + n + e.name.substring(e.name.lastIndexOf("."));}), e.tempFilePaths || (e.tempFilePaths = e.tempFiles.map(function (e) {return e.path;})), e;}function r(e, t, _ref32) {var s = _ref32.onChooseFile,o = _ref32.onUploadProgress;return t.then(function (e) {if (s) {var _t17 = s(e);if (void 0 !== _t17) return Promise.resolve(_t17).then(function (t) {return void 0 === t ? e : t;});}return e;}).then(function (t) {return !1 === t ? { errMsg: n, tempFilePaths: [], tempFiles: [] } : function (e, t) {var s = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 5;var o = arguments.length > 3 ? arguments[3] : undefined;(t = Object.assign({}, t)).errMsg = n;var r = t.tempFiles,i = r.length;var a = 0;return new Promise(function (n) {for (; a < s;) {c();}function c() {var s = a++;if (s >= i) return void (!r.find(function (e) {return !e.url && !e.errMsg;}) && n(t));var u = r[s];e.uploadFile({ filePath: u.path, cloudPath: u.cloudPath, fileType: u.fileType, onUploadProgress: function onUploadProgress(e) {e.index = s, e.tempFile = u, e.tempFilePath = u.path, o && o(e);} }).then(function (e) {u.url = e.fileID, s < i && c();}).catch(function (e) {u.errMsg = e.errMsg || e.message, s < i && c();});}});}(e, t, 5, o);});}t.initChooseAndUploadFile = function (e) {return function () {var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { type: "all" };return "image" === t.type ? r(e, function (e) {var t = e.count,n = e.sizeType,_e$sourceType = e.sourceType,r = _e$sourceType === void 0 ? ["album", "camera"] : _e$sourceType,i = e.extension;return new Promise(function (e, a) {uni.chooseImage({ count: t, sizeType: n, sourceType: r, extension: i, success: function success(t) {e(o(t, "image"));}, fail: function fail(e) {a({ errMsg: e.errMsg.replace("chooseImage:fail", s) });} });});}(t), t) : "video" === t.type ? r(e, function (e) {var t = e.camera,n = e.compressed,r = e.maxDuration,_e$sourceType2 = e.sourceType,i = _e$sourceType2 === void 0 ? ["album", "camera"] : _e$sourceType2,a = e.extension;return new Promise(function (e, c) {uni.chooseVideo({ camera: t, compressed: n, maxDuration: r, sourceType: i, extension: a, success: function success(t) {var n = t.tempFilePath,s = t.duration,r = t.size,i = t.height,a = t.width;e(o({ errMsg: "chooseVideo:ok", tempFilePaths: [n], tempFiles: [{ name: t.tempFile && t.tempFile.name || "", path: n, size: r, type: t.tempFile && t.tempFile.type || "", width: a, height: i, duration: s, fileType: "video", cloudPath: "" }] }, "video"));}, fail: function fail(e) {c({ errMsg: e.errMsg.replace("chooseVideo:fail", s) });} });});}(t), t) : r(e, function (e) {var t = e.count,n = e.extension;return new Promise(function (e, r) {var i = uni.chooseFile;if ("undefined" != typeof wx && "function" == typeof wx.chooseMessageFile && (i = wx.chooseMessageFile), "function" != typeof i) return r({ errMsg: s + " 请指定 type 类型,该平台仅支持选择 image 或 video。" });i({ type: "all", count: t, extension: n, success: function success(t) {e(o(t));}, fail: function fail(e) {r({ errMsg: e.errMsg.replace("chooseFile:fail", s) });} });});}(t), t);};};}),Gt = n(Xt);var Qt = "manual";function Zt(e) {return { props: { localdata: { type: Array, default: function _default() {return [];} }, options: { type: [Object, Array], default: function _default() {return {};} }, spaceInfo: { type: Object, default: function _default() {return {};} }, collection: { type: [String, Array], default: "" }, action: { type: String, default: "" }, field: { type: String, default: "" }, orderby: { type: String, default: "" }, where: { type: [String, Object], default: "" }, pageData: { type: String, default: "add" }, pageCurrent: { type: Number, default: 1 }, pageSize: { type: Number, default: 20 }, getcount: { type: [Boolean, String], default: !1 }, gettree: { type: [Boolean, String], default: !1 }, gettreepath: { type: [Boolean, String], default: !1 }, startwith: { type: String, default: "" }, limitlevel: { type: Number, default: 10 }, groupby: { type: String, default: "" }, groupField: { type: String, default: "" }, distinct: { type: [Boolean, String], default: !1 }, foreignKey: { type: String, default: "" }, loadtime: { type: String, default: "auto" }, manual: { type: Boolean, default: !1 } }, data: function data() {return { mixinDatacomLoading: !1, mixinDatacomHasMore: !1, mixinDatacomResData: [], mixinDatacomErrorMessage: "", mixinDatacomPage: {} };}, created: function created() {var _this18 = this;this.mixinDatacomPage = { current: this.pageCurrent, size: this.pageSize, count: 0 }, this.$watch(function () {var e = [];return ["pageCurrent", "pageSize", "localdata", "collection", "action", "field", "orderby", "where", "getont", "getcount", "gettree", "groupby", "groupField", "distinct"].forEach(function (t) {e.push(_this18[t]);}), e;}, function (e, t) {if (_this18.loadtime === Qt) return;var n = !1;var s = [];for (var _o6 = 2; _o6 < e.length; _o6++) {e[_o6] !== t[_o6] && (s.push(e[_o6]), n = !0);}e[0] !== t[0] && (_this18.mixinDatacomPage.current = _this18.pageCurrent), _this18.mixinDatacomPage.size = _this18.pageSize, _this18.onMixinDatacomPropsChange(n, s);});}, methods: { onMixinDatacomPropsChange: function onMixinDatacomPropsChange(e, t) {}, mixinDatacomEasyGet: function mixinDatacomEasyGet() {var _this19 = this;var _ref33 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},_ref33$getone = _ref33.getone,e = _ref33$getone === void 0 ? !1 : _ref33$getone,t = _ref33.success,n = _ref33.fail;this.mixinDatacomLoading || (this.mixinDatacomLoading = !0, this.mixinDatacomErrorMessage = "", this.mixinDatacomGet().then(function (n) {_this19.mixinDatacomLoading = !1;var _n$result = n.result,s = _n$result.data,o = _n$result.count;_this19.getcount && (_this19.mixinDatacomPage.count = o), _this19.mixinDatacomHasMore = s.length < _this19.pageSize;var r = e ? s.length ? s[0] : void 0 : s;_this19.mixinDatacomResData = r, t && t(r);}).catch(function (e) {_this19.mixinDatacomLoading = !1, _this19.mixinDatacomErrorMessage = e, n && n(e);}));}, mixinDatacomGet: function mixinDatacomGet() {var _n10;var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};var n = e.database(this.spaceInfo);var s = t.action || this.action;s && (n = n.action(s));var o = t.collection || this.collection;n = Array.isArray(o) ? (_n10 = n).collection.apply(_n10, _toConsumableArray(o)) : n.collection(o);var r = t.where || this.where;r && Object.keys(r).length && (n = n.where(r));var i = t.field || this.field;i && (n = n.field(i));var a = t.foreignKey || this.foreignKey;a && (n = n.foreignKey(a));var c = t.groupby || this.groupby;c && (n = n.groupBy(c));var u = t.groupField || this.groupField;u && (n = n.groupField(u));!0 === (void 0 !== t.distinct ? t.distinct : this.distinct) && (n = n.distinct());var l = t.orderby || this.orderby;l && (n = n.orderBy(l));var h = void 0 !== t.pageCurrent ? t.pageCurrent : this.mixinDatacomPage.current,d = void 0 !== t.pageSize ? t.pageSize : this.mixinDatacomPage.size,f = void 0 !== t.getcount ? t.getcount : this.getcount,g = void 0 !== t.gettree ? t.gettree : this.gettree,p = void 0 !== t.gettreepath ? t.gettreepath : this.gettreepath,m = { getCount: f },y = { limitLevel: void 0 !== t.limitlevel ? t.limitlevel : this.limitlevel, startWith: void 0 !== t.startwith ? t.startwith : this.startwith };return g && (m.getTree = y), p && (m.getTreePath = y), n = n.skip(d * (h - 1)).limit(d).get(m), n;} } };}function en(e) {return function (t) {var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};n = function (e) {var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};return e.customUI = t.customUI || e.customUI, Object.assign(e.loadingOptions, t.loadingOptions), Object.assign(e.errorOptions, t.errorOptions), e;}({ customUI: !1, loadingOptions: { title: "加载中...", mask: !0 }, errorOptions: { type: "modal", retry: !1 } }, n);var _n11 = n,s = _n11.customUI,o = _n11.loadingOptions,r = _n11.errorOptions,i = !s;return new Proxy({}, { get: function get(n, s) {return /*#__PURE__*/function () {var _n12 = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee32() {var u,_len,c,_key,_ref34,l,h,d,_yield,_e30,_e29,_args32 = arguments;return _regenerator.default.wrap(function _callee32$(_context32) {while (1) {switch (_context32.prev = _context32.next) {case 0:i && uni.showLoading({ title: o.title, mask: o.mask });for (_len = _args32.length, c = new Array(_len), _key = 0; _key < _len; _key++) {c[_key] = _args32[_key];}_context32.prev = 2;_context32.next = 5;return e.callFunction({ name: t, type: a, data: { method: s, params: c } });case 5:u = _context32.sent;_context32.next = 11;break;case 8:_context32.prev = 8;_context32.t0 = _context32["catch"](2);u = { result: _context32.t0 };case 11:_ref34 = u.result || {}, l = _ref34.errCode, h = _ref34.errMsg, d = _ref34.newToken;if (!(i && uni.hideLoading(), d && d.token && d.tokenExpired && (nt(d), N(E, _objectSpread({}, d))), l)) {_context32.next = 28;break;}if (!i) {_context32.next = 26;break;}if (!("toast" === r.type)) {_context32.next = 18;break;}uni.showToast({ title: h, icon: "none" });_context32.next = 26;break;case 18:if (!("modal" !== r.type)) {_context32.next = 20;break;}throw new Error("Invalid errorOptions.type: ".concat(r.type));case 20:_context32.next = 22;return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee31() {var _ref36,e,t,n,s,o,_args31 = arguments;return _regenerator.default.wrap(function _callee31$(_context31) {while (1) {switch (_context31.prev = _context31.next) {case 0:_ref36 = _args31.length > 0 && _args31[0] !== undefined ? _args31[0] : {}, e = _ref36.title, t = _ref36.content, n = _ref36.showCancel, s = _ref36.cancelText, o = _ref36.confirmText;return _context31.abrupt("return", new Promise(function (r, i) {uni.showModal({ title: e, content: t, showCancel: n, cancelText: s, confirmText: o, success: function success(e) {r(e);}, fail: function fail() {r({ confirm: !1, cancel: !0 });} });}));case 2:case "end":return _context31.stop();}}}, _callee31);}))({ title: "提示", content: h, showCancel: r.retry, cancelText: "取消", confirmText: r.retry ? "重试" : "确定" });case 22:_yield = _context32.sent;_e30 = _yield.confirm;if (!(r.retry && _e30)) {_context32.next = 26;break;}return _context32.abrupt("return", n.apply(void 0, c));case 26:_e29 = new M({ code: l, message: h, requestId: u.requestId });throw _e29.detail = u.result, N(O, { type: x, content: _e29 }), _e29;case 28:return _context32.abrupt("return", (N(O, { type: x, content: u.result }), u.result));case 29:case "end":return _context32.stop();}}}, _callee32, null, [[2, 8]]);}));function n() {return _n12.apply(this, arguments);}return n;}();} });};}function tn(_x30, _x31) {return _tn.apply(this, arguments);}function _tn() {_tn = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee34(e, t) {var n, _e34, s;return _regenerator.default.wrap(function _callee34$(_context34) {while (1) {switch (_context34.prev = _context34.next) {case 0:n = "http://".concat(e, ":").concat(t, "/system/ping");_context34.prev = 1;_context34.next = 4;return s = { url: n, timeout: 500 }, new Promise(function (e, t) {H.request(_objectSpread(_objectSpread({}, s), {}, { success: function success(t) {e(t);}, fail: function fail(e) {t(e);} }));});case 4:_e34 = _context34.sent;return _context34.abrupt("return", !(!_e34.data || 0 !== _e34.data.code));case 8:_context34.prev = 8;_context34.t0 = _context34["catch"](1);return _context34.abrupt("return", !1);case 11:case "end":return _context34.stop();}}}, _callee34, null, [[1, 8]]);}));return _tn.apply(this, arguments);}function nn(e) {if (e.initUniCloudStatus && "rejected" !== e.initUniCloudStatus) return;var t = Promise.resolve();var n;n = 1, t = new Promise(function (e, t) {setTimeout(function () {e();}, n);}), e.isReady = !1, e.isDefault = !1;var s = e.auth();e.initUniCloudStatus = "pending", e.initUniCloud = t.then(function () {return s.getLoginState();}).then(function (e) {return e ? Promise.resolve() : s.signInAnonymously();}).then(function () {if (!d) return Promise.resolve();if ("app" === g && "ios" === uni.getSystemInfoSync().osName) {var _uni$getSystemInfoSyn = uni.getSystemInfoSync(),_e31 = _uni$getSystemInfoSyn.osName,_t18 = _uni$getSystemInfoSyn.osVersion;"ios" === _e31 && function (e) {if (!e || "string" != typeof e) return 0;var t = e.match(/^(\d+)./);return t && t[1] ? parseInt(t[1]) : 0;}(_t18) >= 14 && console.warn("iOS 14及以上版本连接uniCloud本地调试服务需要允许客户端查找并连接到本地网络上的设备(仅开发模式生效,发行模式会连接uniCloud云端服务)");}if (d && e.debugInfo) {var _e$debugInfo = e.debugInfo,_t19 = _e$debugInfo.address,_n13 = _e$debugInfo.servePort;return function () {var _ref37 = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee33(e, t) {var n, _s11, _o7;return _regenerator.default.wrap(function _callee33$(_context33) {while (1) {switch (_context33.prev = _context33.next) {case 0:_s11 = 0;case 1:if (!(_s11 < e.length)) {_context33.next = 11;break;}_o7 = e[_s11];_context33.next = 5;return tn(_o7, t);case 5:if (!_context33.sent) {_context33.next = 8;break;}n = _o7;return _context33.abrupt("break", 11);case 8:_s11++;_context33.next = 1;break;case 11:return _context33.abrupt("return", { address: n, port: t });case 12:case "end":return _context33.stop();}}}, _callee33);}));return function (_x32, _x33) {return _ref37.apply(this, arguments);};}()(_t19, _n13);}}).then(function () {var _ref38 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},t = _ref38.address,n = _ref38.port;if (!d) return Promise.resolve();var s = console["app" === g ? "error" : "warn"];if (t) e.localAddress = t, e.localPort = n;else if (e.debugInfo) {var _t20 = "";"remote" === e.debugInfo.initialLaunchType ? (e.debugInfo.forceRemote = !0, _t20 = "当前客户端和HBuilderX不在同一局域网下(或其他网络原因无法连接HBuilderX),uniCloud本地调试服务不对当前客户端生效。\n- 如果不使用uniCloud本地调试服务,请直接忽略此信息。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。\n- 如果在HBuilderX开启的状态下切换过网络环境,请重启HBuilderX后再试\n- 检查系统防火墙是否拦截了HBuilderX自带的nodejs") : _t20 = "无法连接uniCloud本地调试服务,请检查当前客户端是否与主机在同一局域网下。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。\n- 如果在HBuilderX开启的状态下切换过网络环境,请重启HBuilderX后再试\n- 检查系统防火墙是否拦截了HBuilderX自带的nodejs", "web" === g && (_t20 += "\n- 部分浏览器开启节流模式之后访问本地地址受限,请检查是否启用了节流模式"), 0 === g.indexOf("mp-") && (_t20 += "\n- 小程序中如何使用uniCloud,请参考:https://uniapp.dcloud.net.cn/uniCloud/publish.html#useinmp"), s(_t20);}}).then(function () {st(), e.isReady = !0, e.initUniCloudStatus = "fulfilled";}).catch(function (t) {console.error(t), e.initUniCloudStatus = "rejected";});}var sn = new ( /*#__PURE__*/function () {function _class4() {_classCallCheck(this, _class4);}_createClass(_class4, [{ key: "init", value: function init(e) {var t = {};var n = d && ("web" === g && navigator.userAgent.indexOf("HBuilderX") > 0 || "app" === g);switch (e.provider) {case "tcb":case "tencent":t = et.init(Object.assign(e, { debugLog: n }));break;case "aliyun":t = J.init(Object.assign(e, { debugLog: n }));break;case "private":t = rt.init(Object.assign(e, { debugLog: n }));break;default:throw new Error("未提供正确的provider参数");}var s = p;d && s && !s.code && (t.debugInfo = s), nn(t), t.reInit = function () {nn(this);}, ft(t), function (e) {var t = e.uploadFile;e.uploadFile = function (e) {return t.call(this, e);};}(t), Pt(t), function (e) {e.getCurrentUserInfo = Yt, e.chooseAndUploadFile = Gt.initChooseAndUploadFile(e), Object.assign(e, { get mixinDatacom() {return Zt(e);} }), e.importObject = en(e);}(t);return ["callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "chooseAndUploadFile"].forEach(function (e) {if (!t[e]) return;var n = t[e];t[e] = function () {return t.reInit(), n.apply(t, Array.from(arguments));}, t[e] = F(t[e], e).bind(t);}), t.init = this.init, t;} }]);return _class4;}())();(function () {{var e = m;var _t21 = {};if (1 === e.length) _t21 = e[0], sn = sn.init(_t21), sn.isDefault = !0;else {var _t22 = ["auth", "callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "database", "getCurrentUSerInfo", "importObject"];var _n14;_n14 = e && e.length > 0 ? "应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间" : y ? "应用未关联服务空间,请在uniCloud目录右键关联服务空间" : "uni-app cli项目内使用uniCloud需要使用HBuilderX的运行菜单运行项目,且需要在uniCloud目录关联服务空间", _t22.forEach(function (e) {sn[e] = function () {return console.error(_n14), Promise.reject(new M({ code: "SYS_ERR", message: _n14 }));};});}Object.assign(sn, { get mixinDatacom() {return Zt(sn);} }), Wt(sn), sn.addInterceptor = v, sn.removeInterceptor = A, d && "web" === g && (window.uniCloud = sn);}})();var on = sn;exports.default = on;
  10745. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 2), __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  10746. /***/ }),
  10747. /***/ 417:
  10748. /*!**************************************************************************!*\
  10749. !*** D:/hongxing/storage-wechat/pages.json?{"type":"origin-pages-json"} ***!
  10750. \**************************************************************************/
  10751. /*! no static exports found */
  10752. /***/ (function(module, exports, __webpack_require__) {
  10753. "use strict";
  10754. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = { "easycom": { "autoscan": true, "custom": { "^uni-(.*)": "@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue" } }, "pages": [{ "path": "pages/user/login", "style": { "navigationBarTitleText": "登录" } }, { "path": "pages/index/index", "style": { "navigationBarTitleText": "uni-app" } }, { "path": "pages/home", "style": { "navigationBarTitleText": "首页" } }, { "path": "pages/addQrcode/addQrcode", "style": { "navigationBarTitleText": "添加二维码" } }, { "path": "pages/addQrcode/selectQrcode", "style": { "navigationBarTitleText": "添加二维码" } }, { "path": "pages/addQrcode/addBatch", "style": { "navigationBarTitleText": "添加二维码" } }, { "path": "pages/manageQrcode/manageQrcode", "style": { "navigationBarTitleText": "二维码管理" } }, { "path": "pages/goIn/goIn", "style": { "navigationBarTitleText": "扫码入库" } }, { "path": "pages/goIn/withdrawal", "style": { "navigationBarTitleText": "退仓" } }, { "path": "pages/goOut/goOut", "style": { "navigationBarTitleText": "出库" } }, { "path": "pages/inOut/inOut", "style": { "navigationBarTitleText": "调仓" } }, { "path": "pages/check/check", "style": { "navigationBarTitleText": "到货质检" } }, { "path": "pages/check/checkDtl", "style": { "navigationBarTitleText": "到货质检" } }, { "path": "pages/check/checkSubmit", "style": { "navigationBarTitleText": "到货质检" } }, { "path": "pages/weigh/weigh", "style": { "navigationBarTitleText": "称重质检" } }, { "path": "pages/weigh/checkDtl", "style": { "navigationBarTitleText": "称重质检" } }, { "path": "pages/weigh/checkSubmit", "style": { "navigationBarTitleText": "称重质检" } }, { "path": "pages/Inventory/Inventory", "style": { "navigationBarTitleText": "库存盘点" } }, { "path": "pages/Inventory/InventorySubmit", "style": { "navigationBarTitleText": "库存盘点" } }, { "path": "pages/Inventory/InventoryDtl", "style": { "navigationBarTitleText": "库存盘点" } }, { "path": "pages/select/select", "style": { "navigationBarTitleText": "库存查询" } }, { "path": "pages/overCloth/overCloth", "style": { "navigationBarTitleText": "过布" } }, { "path": "pages/shiftHandover/shiftHandover", "style": { "navigationBarTitleText": "现场交班" } }, { "path": "pages/succession/succession", "style": { "navigationBarTitleText": "现场接班" } }, { "path": "pages/total/total", "style": { "navigationBarTitleText": "统计" } }, { "path": "pages/total/summary", "style": { "navigationBarTitleText": "面料库存详情" } }, { "path": "pages/total/warehouseDtl", "style": { "navigationBarTitleText": "出库详情" } }, { "path": "pages/total/warehousingDtl", "style": { "navigationBarTitleText": "面料入库详情" } }, { "path": "pages/usedTotal/usedTotal", "style": { "navigationBarTitleText": "统计(rfid)" } }, { "path": "pages/usedTotal/warehouse-list", "style": { "navigationBarTitleText": "物料接收" } }, { "path": "pages/usedTotal/summary", "style": { "navigationBarTitleText": "面料库存详情(rfid)" } }, { "path": "pages/usedTotal/warehouseDtl", "style": { "navigationBarTitleText": "出库详情(rfid)" } }, { "path": "pages/usedTotal/warehousingDtl", "style": { "navigationBarTitleText": "面料入库详情(rfid)" } }, { "path": "pages/submit/submit", "style": { "navigationBarTitleText": "面料问题反馈" } }, { "path": "pages/usedTotal/return-warehouse", "style": { "navigationBarTitleText": "物料退仓" } }, { "path": "pages/usedTotal/fabric-correction", "style": { "navigationBarTitleText": "面料修正" } }, { "path": "pages/materialTransfer/materialTransfer", "style": { "navigationBarTitleText": "面料转仓" } }, { "path": "pages/materialTransfer/transferCompositeList", "style": { "navigationBarTitleText": "转仓复核" } }, { "path": "pages/materialTransfer/transferComposite", "style": { "navigationBarTitleText": "转仓复核详情" } }], "globalStyle": { "navigationBarTextStyle": "black", "navigationBarTitleText": "uni-app", "navigationBarBackgroundColor": "#F8F8F8", "backgroundColor": "#F8F8F8" } };exports.default = _default;
  10755. /***/ }),
  10756. /***/ 418:
  10757. /*!*************************************************************!*\
  10758. !*** D:/hongxing/storage-wechat/pages.json?{"type":"stat"} ***!
  10759. \*************************************************************/
  10760. /*! no static exports found */
  10761. /***/ (function(module, exports, __webpack_require__) {
  10762. "use strict";
  10763. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = { "appid": "__UNI__C76B472" };exports.default = _default;
  10764. /***/ }),
  10765. /***/ 484:
  10766. /*!******************************************************************************************************!*\
  10767. !*** D:/hongxing/storage-wechat/node_modules/@dcloudio/uni-ui/lib/uni-transition/createAnimation.js ***!
  10768. \******************************************************************************************************/
  10769. /*! no static exports found */
  10770. /***/ (function(module, exports, __webpack_require__) {
  10771. "use strict";
  10772. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.createAnimation = createAnimation;function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}function _createClass(Constructor, protoProps, staticProps) {if (protoProps) _defineProperties(Constructor.prototype, protoProps);if (staticProps) _defineProperties(Constructor, staticProps);return Constructor;} // const defaultOption = {
  10773. // duration: 300,
  10774. // timingFunction: 'linear',
  10775. // delay: 0,
  10776. // transformOrigin: '50% 50% 0'
  10777. // }
  10778. var
  10779. MPAnimation = /*#__PURE__*/function () {
  10780. function MPAnimation(options, _this) {_classCallCheck(this, MPAnimation);
  10781. this.options = options;
  10782. this.animation = uni.createAnimation(options);
  10783. this.currentStepAnimates = {};
  10784. this.next = 0;
  10785. this.$ = _this;
  10786. }_createClass(MPAnimation, [{ key: "_nvuePushAnimates", value: function _nvuePushAnimates(
  10787. type, args) {
  10788. var aniObj = this.currentStepAnimates[this.next];
  10789. var styles = {};
  10790. if (!aniObj) {
  10791. styles = {
  10792. styles: {},
  10793. config: {} };
  10794. } else {
  10795. styles = aniObj;
  10796. }
  10797. if (animateTypes1.includes(type)) {
  10798. if (!styles.styles.transform) {
  10799. styles.styles.transform = '';
  10800. }
  10801. var unit = '';
  10802. if (type === 'rotate') {
  10803. unit = 'deg';
  10804. }
  10805. styles.styles.transform += "".concat(type, "(").concat(args + unit, ") ");
  10806. } else {
  10807. styles.styles[type] = "".concat(args);
  10808. }
  10809. this.currentStepAnimates[this.next] = styles;
  10810. } }, { key: "_animateRun", value: function _animateRun()
  10811. {var styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  10812. var ref = this.$.$refs['ani'].ref;
  10813. if (!ref) return;
  10814. return new Promise(function (resolve, reject) {
  10815. nvueAnimation.transition(ref, _objectSpread({
  10816. styles: styles },
  10817. config),
  10818. function (res) {
  10819. resolve();
  10820. });
  10821. });
  10822. } }, { key: "_nvueNextAnimate", value: function _nvueNextAnimate(
  10823. animates) {var _this2 = this;var step = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;var fn = arguments.length > 2 ? arguments[2] : undefined;
  10824. var obj = animates[step];
  10825. if (obj) {var
  10826. styles =
  10827. obj.styles,config = obj.config;
  10828. this._animateRun(styles, config).then(function () {
  10829. step += 1;
  10830. _this2._nvueNextAnimate(animates, step, fn);
  10831. });
  10832. } else {
  10833. this.currentStepAnimates = {};
  10834. typeof fn === 'function' && fn();
  10835. this.isEnd = true;
  10836. }
  10837. } }, { key: "step", value: function step()
  10838. {var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  10839. this.animation.step(config);
  10840. return this;
  10841. } }, { key: "run", value: function run(
  10842. fn) {
  10843. this.$.animationData = this.animation.export();
  10844. this.$.timer = setTimeout(function () {
  10845. typeof fn === 'function' && fn();
  10846. }, this.$.durationTime);
  10847. } }]);return MPAnimation;}();
  10848. var animateTypes1 = ['matrix', 'matrix3d', 'rotate', 'rotate3d', 'rotateX', 'rotateY', 'rotateZ', 'scale', 'scale3d',
  10849. 'scaleX', 'scaleY', 'scaleZ', 'skew', 'skewX', 'skewY', 'translate', 'translate3d', 'translateX', 'translateY',
  10850. 'translateZ'];
  10851. var animateTypes2 = ['opacity', 'backgroundColor'];
  10852. var animateTypes3 = ['width', 'height', 'left', 'right', 'top', 'bottom'];
  10853. animateTypes1.concat(animateTypes2, animateTypes3).forEach(function (type) {
  10854. MPAnimation.prototype[type] = function () {var _this$animation;
  10855. (_this$animation = this.animation)[type].apply(_this$animation, arguments);
  10856. return this;
  10857. };
  10858. });
  10859. function createAnimation(option, _this) {
  10860. if (!_this) return;
  10861. clearTimeout(_this.timer);
  10862. return new MPAnimation(option, _this);
  10863. }
  10864. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  10865. /***/ }),
  10866. /***/ 490:
  10867. /*!************************************************************************************************!*\
  10868. !*** D:/hongxing/storage-wechat/node_modules/@dcloudio/uni-ui/lib/uni-load-more/i18n/index.js ***!
  10869. \************************************************************************************************/
  10870. /*! no static exports found */
  10871. /***/ (function(module, exports, __webpack_require__) {
  10872. "use strict";
  10873. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _en = _interopRequireDefault(__webpack_require__(/*! ./en.json */ 491));
  10874. var _zhHans = _interopRequireDefault(__webpack_require__(/*! ./zh-Hans.json */ 492));
  10875. var _zhHant = _interopRequireDefault(__webpack_require__(/*! ./zh-Hant.json */ 493));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}var _default =
  10876. {
  10877. en: _en.default,
  10878. 'zh-Hans': _zhHans.default,
  10879. 'zh-Hant': _zhHant.default };exports.default = _default;
  10880. /***/ }),
  10881. /***/ 491:
  10882. /*!***********************************************************************************************!*\
  10883. !*** D:/hongxing/storage-wechat/node_modules/@dcloudio/uni-ui/lib/uni-load-more/i18n/en.json ***!
  10884. \***********************************************************************************************/
  10885. /*! exports provided: uni-load-more.contentdown, uni-load-more.contentrefresh, uni-load-more.contentnomore, default */
  10886. /***/ (function(module) {
  10887. module.exports = JSON.parse("{\"uni-load-more.contentdown\":\"Pull up to show more\",\"uni-load-more.contentrefresh\":\"loading...\",\"uni-load-more.contentnomore\":\"No more data\"}");
  10888. /***/ }),
  10889. /***/ 492:
  10890. /*!****************************************************************************************************!*\
  10891. !*** D:/hongxing/storage-wechat/node_modules/@dcloudio/uni-ui/lib/uni-load-more/i18n/zh-Hans.json ***!
  10892. \****************************************************************************************************/
  10893. /*! exports provided: uni-load-more.contentdown, uni-load-more.contentrefresh, uni-load-more.contentnomore, default */
  10894. /***/ (function(module) {
  10895. module.exports = JSON.parse("{\"uni-load-more.contentdown\":\"上拉显示更多\",\"uni-load-more.contentrefresh\":\"正在加载...\",\"uni-load-more.contentnomore\":\"没有更多数据了\"}");
  10896. /***/ }),
  10897. /***/ 493:
  10898. /*!****************************************************************************************************!*\
  10899. !*** D:/hongxing/storage-wechat/node_modules/@dcloudio/uni-ui/lib/uni-load-more/i18n/zh-Hant.json ***!
  10900. \****************************************************************************************************/
  10901. /*! exports provided: uni-load-more.contentdown, uni-load-more.contentrefresh, uni-load-more.contentnomore, default */
  10902. /***/ (function(module) {
  10903. module.exports = JSON.parse("{\"uni-load-more.contentdown\":\"上拉顯示更多\",\"uni-load-more.contentrefresh\":\"正在加載...\",\"uni-load-more.contentnomore\":\"沒有更多數據了\"}");
  10904. /***/ }),
  10905. /***/ 5:
  10906. /*!*********************************************!*\
  10907. !*** D:/hongxing/storage-wechat/pages.json ***!
  10908. \*********************************************/
  10909. /*! no static exports found */
  10910. /***/ (function(module, exports) {
  10911. /***/ }),
  10912. /***/ 515:
  10913. /*!******************************************************************************************************!*\
  10914. !*** D:/hongxing/storage-wechat/node_modules/@dcloudio/uni-ui/lib/uni-datetime-picker/i18n/index.js ***!
  10915. \******************************************************************************************************/
  10916. /*! no static exports found */
  10917. /***/ (function(module, exports, __webpack_require__) {
  10918. "use strict";
  10919. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _en = _interopRequireDefault(__webpack_require__(/*! ./en.json */ 516));
  10920. var _zhHans = _interopRequireDefault(__webpack_require__(/*! ./zh-Hans.json */ 517));
  10921. var _zhHant = _interopRequireDefault(__webpack_require__(/*! ./zh-Hant.json */ 518));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}var _default =
  10922. {
  10923. en: _en.default,
  10924. 'zh-Hans': _zhHans.default,
  10925. 'zh-Hant': _zhHant.default };exports.default = _default;
  10926. /***/ }),
  10927. /***/ 516:
  10928. /*!*****************************************************************************************************!*\
  10929. !*** D:/hongxing/storage-wechat/node_modules/@dcloudio/uni-ui/lib/uni-datetime-picker/i18n/en.json ***!
  10930. \*****************************************************************************************************/
  10931. /*! exports provided: uni-datetime-picker.selectDate, uni-datetime-picker.selectTime, uni-datetime-picker.selectDateTime, uni-datetime-picker.startDate, uni-datetime-picker.endDate, uni-datetime-picker.startTime, uni-datetime-picker.endTime, uni-datetime-picker.ok, uni-datetime-picker.clear, uni-datetime-picker.cancel, uni-calender.MON, uni-calender.TUE, uni-calender.WED, uni-calender.THU, uni-calender.FRI, uni-calender.SAT, uni-calender.SUN, default */
  10932. /***/ (function(module) {
  10933. module.exports = JSON.parse("{\"uni-datetime-picker.selectDate\":\"select date\",\"uni-datetime-picker.selectTime\":\"select time\",\"uni-datetime-picker.selectDateTime\":\"select datetime\",\"uni-datetime-picker.startDate\":\"start date\",\"uni-datetime-picker.endDate\":\"end date\",\"uni-datetime-picker.startTime\":\"start time\",\"uni-datetime-picker.endTime\":\"end time\",\"uni-datetime-picker.ok\":\"ok\",\"uni-datetime-picker.clear\":\"clear\",\"uni-datetime-picker.cancel\":\"cancel\",\"uni-calender.MON\":\"MON\",\"uni-calender.TUE\":\"TUE\",\"uni-calender.WED\":\"WED\",\"uni-calender.THU\":\"THU\",\"uni-calender.FRI\":\"FRI\",\"uni-calender.SAT\":\"SAT\",\"uni-calender.SUN\":\"SUN\"}");
  10934. /***/ }),
  10935. /***/ 517:
  10936. /*!**********************************************************************************************************!*\
  10937. !*** D:/hongxing/storage-wechat/node_modules/@dcloudio/uni-ui/lib/uni-datetime-picker/i18n/zh-Hans.json ***!
  10938. \**********************************************************************************************************/
  10939. /*! exports provided: uni-datetime-picker.selectDate, uni-datetime-picker.selectTime, uni-datetime-picker.selectDateTime, uni-datetime-picker.startDate, uni-datetime-picker.endDate, uni-datetime-picker.startTime, uni-datetime-picker.endTime, uni-datetime-picker.ok, uni-datetime-picker.clear, uni-datetime-picker.cancel, uni-calender.SUN, uni-calender.MON, uni-calender.TUE, uni-calender.WED, uni-calender.THU, uni-calender.FRI, uni-calender.SAT, default */
  10940. /***/ (function(module) {
  10941. module.exports = JSON.parse("{\"uni-datetime-picker.selectDate\":\"选择日期\",\"uni-datetime-picker.selectTime\":\"选择时间\",\"uni-datetime-picker.selectDateTime\":\"选择日期时间\",\"uni-datetime-picker.startDate\":\"开始日期\",\"uni-datetime-picker.endDate\":\"结束日期\",\"uni-datetime-picker.startTime\":\"开始时间\",\"uni-datetime-picker.endTime\":\"结束时间\",\"uni-datetime-picker.ok\":\"确定\",\"uni-datetime-picker.clear\":\"清除\",\"uni-datetime-picker.cancel\":\"取消\",\"uni-calender.SUN\":\"日\",\"uni-calender.MON\":\"一\",\"uni-calender.TUE\":\"二\",\"uni-calender.WED\":\"三\",\"uni-calender.THU\":\"四\",\"uni-calender.FRI\":\"五\",\"uni-calender.SAT\":\"六\"}");
  10942. /***/ }),
  10943. /***/ 518:
  10944. /*!**********************************************************************************************************!*\
  10945. !*** D:/hongxing/storage-wechat/node_modules/@dcloudio/uni-ui/lib/uni-datetime-picker/i18n/zh-Hant.json ***!
  10946. \**********************************************************************************************************/
  10947. /*! exports provided: uni-datetime-picker.selectDate, uni-datetime-picker.selectTime, uni-datetime-picker.selectDateTime, uni-datetime-picker.startDate, uni-datetime-picker.endDate, uni-datetime-picker.startTime, uni-datetime-picker.endTime, uni-datetime-picker.ok, uni-datetime-picker.clear, uni-datetime-picker.cancel, uni-calender.SUN, uni-calender.MON, uni-calender.TUE, uni-calender.WED, uni-calender.THU, uni-calender.FRI, uni-calender.SAT, default */
  10948. /***/ (function(module) {
  10949. module.exports = JSON.parse("{\"uni-datetime-picker.selectDate\":\"選擇日期\",\"uni-datetime-picker.selectTime\":\"選擇時間\",\"uni-datetime-picker.selectDateTime\":\"選擇日期時間\",\"uni-datetime-picker.startDate\":\"開始日期\",\"uni-datetime-picker.endDate\":\"結束日期\",\"uni-datetime-picker.startTime\":\"開始时间\",\"uni-datetime-picker.endTime\":\"結束时间\",\"uni-datetime-picker.ok\":\"確定\",\"uni-datetime-picker.clear\":\"清除\",\"uni-datetime-picker.cancel\":\"取消\",\"uni-calender.SUN\":\"日\",\"uni-calender.MON\":\"一\",\"uni-calender.TUE\":\"二\",\"uni-calender.WED\":\"三\",\"uni-calender.THU\":\"四\",\"uni-calender.FRI\":\"五\",\"uni-calender.SAT\":\"六\"}");
  10950. /***/ }),
  10951. /***/ 526:
  10952. /*!************************************************************************************************!*\
  10953. !*** D:/hongxing/storage-wechat/node_modules/@dcloudio/uni-ui/lib/uni-datetime-picker/util.js ***!
  10954. \************************************************************************************************/
  10955. /*! no static exports found */
  10956. /***/ (function(module, exports, __webpack_require__) {
  10957. "use strict";
  10958. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}function _createClass(Constructor, protoProps, staticProps) {if (protoProps) _defineProperties(Constructor.prototype, protoProps);if (staticProps) _defineProperties(Constructor, staticProps);return Constructor;}var Calendar = /*#__PURE__*/function () {
  10959. function Calendar()
  10960. {var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},date = _ref.date,selected = _ref.selected,startDate = _ref.startDate,endDate = _ref.endDate,range = _ref.range;_classCallCheck(this, Calendar);
  10961. // 当前日期
  10962. this.date = this.getDate(new Date()); // 当前初入日期
  10963. // 打点信息
  10964. this.selected = selected || [];
  10965. // 范围开始
  10966. this.startDate = startDate;
  10967. // 范围结束
  10968. this.endDate = endDate;
  10969. this.range = range;
  10970. // 多选状态
  10971. this.cleanMultipleStatus();
  10972. // 每周日期
  10973. this.weeks = {};
  10974. // this._getWeek(this.date.fullDate)
  10975. // this.multipleStatus = multipleStatus
  10976. this.lastHover = false;
  10977. }
  10978. /**
  10979. * 设置日期
  10980. * @param {Object} date
  10981. */_createClass(Calendar, [{ key: "setDate", value: function setDate(
  10982. date) {
  10983. this.selectDate = this.getDate(date);
  10984. this._getWeek(this.selectDate.fullDate);
  10985. }
  10986. /**
  10987. * 清理多选状态
  10988. */ }, { key: "cleanMultipleStatus", value: function cleanMultipleStatus()
  10989. {
  10990. this.multipleStatus = {
  10991. before: '',
  10992. after: '',
  10993. data: [] };
  10994. }
  10995. /**
  10996. * 重置开始日期
  10997. */ }, { key: "resetSatrtDate", value: function resetSatrtDate(
  10998. startDate) {
  10999. // 范围开始
  11000. this.startDate = startDate;
  11001. }
  11002. /**
  11003. * 重置结束日期
  11004. */ }, { key: "resetEndDate", value: function resetEndDate(
  11005. endDate) {
  11006. // 范围结束
  11007. this.endDate = endDate;
  11008. }
  11009. /**
  11010. * 获取任意时间
  11011. */ }, { key: "getDate", value: function getDate(
  11012. date) {var AddDayCount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;var str = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'day';
  11013. if (!date) {
  11014. date = new Date();
  11015. }
  11016. if (typeof date !== 'object') {
  11017. date = date.replace(/-/g, '/');
  11018. }
  11019. var dd = new Date(date);
  11020. switch (str) {
  11021. case 'day':
  11022. dd.setDate(dd.getDate() + AddDayCount); // 获取AddDayCount天后的日期
  11023. break;
  11024. case 'month':
  11025. if (dd.getDate() === 31) {
  11026. dd.setDate(dd.getDate() + AddDayCount);
  11027. } else {
  11028. dd.setMonth(dd.getMonth() + AddDayCount); // 获取AddDayCount天后的日期
  11029. }
  11030. break;
  11031. case 'year':
  11032. dd.setFullYear(dd.getFullYear() + AddDayCount); // 获取AddDayCount天后的日期
  11033. break;}
  11034. var y = dd.getFullYear();
  11035. var m = dd.getMonth() + 1 < 10 ? '0' + (dd.getMonth() + 1) : dd.getMonth() + 1; // 获取当前月份的日期,不足10补0
  11036. var d = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate(); // 获取当前几号,不足10补0
  11037. return {
  11038. fullDate: y + '-' + m + '-' + d,
  11039. year: y,
  11040. month: m,
  11041. date: d,
  11042. day: dd.getDay() };
  11043. }
  11044. /**
  11045. * 获取上月剩余天数
  11046. */ }, { key: "_getLastMonthDays", value: function _getLastMonthDays(
  11047. firstDay, full) {
  11048. var dateArr = [];
  11049. for (var i = firstDay; i > 0; i--) {
  11050. var beforeDate = new Date(full.year, full.month - 1, -i + 1).getDate();
  11051. dateArr.push({
  11052. date: beforeDate,
  11053. month: full.month - 1,
  11054. disable: true });
  11055. }
  11056. return dateArr;
  11057. }
  11058. /**
  11059. * 获取本月天数
  11060. */ }, { key: "_currentMonthDys", value: function _currentMonthDys(
  11061. dateData, full) {var _this = this;
  11062. var dateArr = [];
  11063. var fullDate = this.date.fullDate;var _loop = function _loop(
  11064. i) {
  11065. var isinfo = false;
  11066. var nowDate = full.year + '-' + (full.month < 10 ?
  11067. full.month : full.month) + '-' + (i < 10 ?
  11068. '0' + i : i);
  11069. // 是否今天
  11070. var isDay = fullDate === nowDate;
  11071. // 获取打点信息
  11072. var info = _this.selected && _this.selected.find(function (item) {
  11073. if (_this.dateEqual(nowDate, item.date)) {
  11074. return item;
  11075. }
  11076. });
  11077. // 日期禁用
  11078. var disableBefore = true;
  11079. var disableAfter = true;
  11080. if (_this.startDate) {
  11081. // let dateCompBefore = this.dateCompare(this.startDate, fullDate)
  11082. // disableBefore = this.dateCompare(dateCompBefore ? this.startDate : fullDate, nowDate)
  11083. disableBefore = _this.dateCompare(_this.startDate, nowDate);
  11084. }
  11085. if (_this.endDate) {
  11086. // let dateCompAfter = this.dateCompare(fullDate, this.endDate)
  11087. // disableAfter = this.dateCompare(nowDate, dateCompAfter ? this.endDate : fullDate)
  11088. disableAfter = _this.dateCompare(nowDate, _this.endDate);
  11089. }
  11090. var multiples = _this.multipleStatus.data;
  11091. var checked = false;
  11092. var multiplesStatus = -1;
  11093. if (_this.range) {
  11094. if (multiples) {
  11095. multiplesStatus = multiples.findIndex(function (item) {
  11096. return _this.dateEqual(item, nowDate);
  11097. });
  11098. }
  11099. if (multiplesStatus !== -1) {
  11100. checked = true;
  11101. }
  11102. }
  11103. var data = {
  11104. fullDate: nowDate,
  11105. year: full.year,
  11106. date: i,
  11107. multiple: _this.range ? checked : false,
  11108. beforeMultiple: _this.isLogicBefore(nowDate, _this.multipleStatus.before, _this.multipleStatus.after),
  11109. afterMultiple: _this.isLogicAfter(nowDate, _this.multipleStatus.before, _this.multipleStatus.after),
  11110. month: full.month,
  11111. disable: !(disableBefore && disableAfter),
  11112. isDay: isDay,
  11113. userChecked: false };
  11114. if (info) {
  11115. data.extraInfo = info;
  11116. }
  11117. dateArr.push(data);};for (var i = 1; i <= dateData; i++) {_loop(i);
  11118. }
  11119. return dateArr;
  11120. }
  11121. /**
  11122. * 获取下月天数
  11123. */ }, { key: "_getNextMonthDays", value: function _getNextMonthDays(
  11124. surplus, full) {
  11125. var dateArr = [];
  11126. for (var i = 1; i < surplus + 1; i++) {
  11127. dateArr.push({
  11128. date: i,
  11129. month: Number(full.month) + 1,
  11130. disable: true });
  11131. }
  11132. return dateArr;
  11133. }
  11134. /**
  11135. * 获取当前日期详情
  11136. * @param {Object} date
  11137. */ }, { key: "getInfo", value: function getInfo(
  11138. date) {var _this2 = this;
  11139. if (!date) {
  11140. date = new Date();
  11141. }
  11142. var dateInfo = this.canlender.find(function (item) {return item.fullDate === _this2.getDate(date).fullDate;});
  11143. return dateInfo;
  11144. }
  11145. /**
  11146. * 比较时间大小
  11147. */ }, { key: "dateCompare", value: function dateCompare(
  11148. startDate, endDate) {
  11149. // 计算截止时间
  11150. startDate = new Date(startDate.replace('-', '/').replace('-', '/'));
  11151. // 计算详细项的截止时间
  11152. endDate = new Date(endDate.replace('-', '/').replace('-', '/'));
  11153. if (startDate <= endDate) {
  11154. return true;
  11155. } else {
  11156. return false;
  11157. }
  11158. }
  11159. /**
  11160. * 比较时间是否相等
  11161. */ }, { key: "dateEqual", value: function dateEqual(
  11162. before, after) {
  11163. // 计算截止时间
  11164. before = new Date(before.replace('-', '/').replace('-', '/'));
  11165. // 计算详细项的截止时间
  11166. after = new Date(after.replace('-', '/').replace('-', '/'));
  11167. if (before.getTime() - after.getTime() === 0) {
  11168. return true;
  11169. } else {
  11170. return false;
  11171. }
  11172. }
  11173. /**
  11174. * 比较真实起始日期
  11175. */ }, { key: "isLogicBefore", value: function isLogicBefore(
  11176. currentDay, before, after) {
  11177. var logicBefore = before;
  11178. if (before && after) {
  11179. logicBefore = this.dateCompare(before, after) ? before : after;
  11180. }
  11181. return this.dateEqual(logicBefore, currentDay);
  11182. } }, { key: "isLogicAfter", value: function isLogicAfter(
  11183. currentDay, before, after) {
  11184. var logicAfter = after;
  11185. if (before && after) {
  11186. logicAfter = this.dateCompare(before, after) ? after : before;
  11187. }
  11188. return this.dateEqual(logicAfter, currentDay);
  11189. }
  11190. /**
  11191. * 获取日期范围内所有日期
  11192. * @param {Object} begin
  11193. * @param {Object} end
  11194. */ }, { key: "geDateAll", value: function geDateAll(
  11195. begin, end) {
  11196. var arr = [];
  11197. var ab = begin.split('-');
  11198. var ae = end.split('-');
  11199. var db = new Date();
  11200. db.setFullYear(ab[0], ab[1] - 1, ab[2]);
  11201. var de = new Date();
  11202. de.setFullYear(ae[0], ae[1] - 1, ae[2]);
  11203. var unixDb = db.getTime() - 24 * 60 * 60 * 1000;
  11204. var unixDe = de.getTime() - 24 * 60 * 60 * 1000;
  11205. for (var k = unixDb; k <= unixDe;) {
  11206. k = k + 24 * 60 * 60 * 1000;
  11207. arr.push(this.getDate(new Date(parseInt(k))).fullDate);
  11208. }
  11209. return arr;
  11210. }
  11211. /**
  11212. * 获取多选状态
  11213. */ }, { key: "setMultiple", value: function setMultiple(
  11214. fullDate) {var _this$multipleStatus =
  11215. this.multipleStatus,before = _this$multipleStatus.before,after = _this$multipleStatus.after;
  11216. if (!this.range) return;
  11217. if (before && after) {
  11218. if (!this.lastHover) {
  11219. this.lastHover = true;
  11220. return;
  11221. }
  11222. this.multipleStatus.before = fullDate;
  11223. this.multipleStatus.after = '';
  11224. this.multipleStatus.data = [];
  11225. this.multipleStatus.fulldate = '';
  11226. this.lastHover = false;
  11227. } else {
  11228. if (!before) {
  11229. this.multipleStatus.before = fullDate;
  11230. this.lastHover = false;
  11231. } else {
  11232. this.multipleStatus.after = fullDate;
  11233. if (this.dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
  11234. this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.
  11235. after);
  11236. } else {
  11237. this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.
  11238. before);
  11239. }
  11240. this.lastHover = true;
  11241. }
  11242. }
  11243. this._getWeek(fullDate);
  11244. }
  11245. /**
  11246. * 鼠标 hover 更新多选状态
  11247. */ }, { key: "setHoverMultiple", value: function setHoverMultiple(
  11248. fullDate) {var _this$multipleStatus2 =
  11249. this.multipleStatus,before = _this$multipleStatus2.before,after = _this$multipleStatus2.after;
  11250. if (!this.range) return;
  11251. if (this.lastHover) return;
  11252. if (!before) {
  11253. this.multipleStatus.before = fullDate;
  11254. } else {
  11255. this.multipleStatus.after = fullDate;
  11256. if (this.dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
  11257. this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);
  11258. } else {
  11259. this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);
  11260. }
  11261. }
  11262. this._getWeek(fullDate);
  11263. }
  11264. /**
  11265. * 更新默认值多选状态
  11266. */ }, { key: "setDefaultMultiple", value: function setDefaultMultiple(
  11267. before, after) {
  11268. this.multipleStatus.before = before;
  11269. this.multipleStatus.after = after;
  11270. if (before && after) {
  11271. if (this.dateCompare(before, after)) {
  11272. this.multipleStatus.data = this.geDateAll(before, after);
  11273. this._getWeek(after);
  11274. } else {
  11275. this.multipleStatus.data = this.geDateAll(after, before);
  11276. this._getWeek(before);
  11277. }
  11278. }
  11279. }
  11280. /**
  11281. * 获取每周数据
  11282. * @param {Object} dateData
  11283. */ }, { key: "_getWeek", value: function _getWeek(
  11284. dateData) {var _this$getDate =
  11285. this.getDate(dateData),fullDate = _this$getDate.fullDate,year = _this$getDate.year,month = _this$getDate.month,date = _this$getDate.date,day = _this$getDate.day;
  11286. var firstDay = new Date(year, month - 1, 1).getDay();
  11287. var currentDay = new Date(year, month, 0).getDate();
  11288. var dates = {
  11289. lastMonthDays: this._getLastMonthDays(firstDay, this.getDate(dateData)), // 上个月末尾几天
  11290. currentMonthDys: this._currentMonthDys(currentDay, this.getDate(dateData)), // 本月天数
  11291. nextMonthDays: [], // 下个月开始几天
  11292. weeks: [] };
  11293. var canlender = [];
  11294. var surplus = 42 - (dates.lastMonthDays.length + dates.currentMonthDys.length);
  11295. dates.nextMonthDays = this._getNextMonthDays(surplus, this.getDate(dateData));
  11296. canlender = canlender.concat(dates.lastMonthDays, dates.currentMonthDys, dates.nextMonthDays);
  11297. var weeks = {};
  11298. // 拼接数组 上个月开始几天 + 本月天数+ 下个月开始几天
  11299. for (var i = 0; i < canlender.length; i++) {
  11300. if (i % 7 === 0) {
  11301. weeks[parseInt(i / 7)] = new Array(7);
  11302. }
  11303. weeks[parseInt(i / 7)][i % 7] = canlender[i];
  11304. }
  11305. this.canlender = canlender;
  11306. this.weeks = weeks;
  11307. }
  11308. //静态方法
  11309. // static init(date) {
  11310. // if (!this.instance) {
  11311. // this.instance = new Calendar(date);
  11312. // }
  11313. // return this.instance;
  11314. // }
  11315. }]);return Calendar;}();var _default =
  11316. Calendar;exports.default = _default;
  11317. /***/ }),
  11318. /***/ 72:
  11319. /*!***********************************************!*\
  11320. !*** D:/hongxing/storage-wechat/util/uitl.js ***!
  11321. \***********************************************/
  11322. /*! no static exports found */
  11323. /***/ (function(module, exports, __webpack_require__) {
  11324. "use strict";
  11325. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.getTime = exports.dateFormat = exports.commonsbinding = exports.getUserData = exports.setUserData = exports.routeEqual = exports.showTitle = exports.genID = exports.format = void 0;
  11326. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 4));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  11327. //时间戳转时间
  11328. var format = function format(timeStamp) {
  11329. var date = new Date();
  11330. date.setTime(timeStamp * 1);
  11331. var y = date.getFullYear();
  11332. var m = date.getMonth() + 1;
  11333. m = m < 10 ? '0' + m : m;
  11334. var d = date.getDate();
  11335. d = d < 10 ? '0' + d : d;
  11336. var h = date.getHours();
  11337. h = h < 10 ? '0' + h : h;
  11338. var minute = date.getMinutes();
  11339. var second = date.getSeconds();
  11340. minute = minute < 10 ? '0' + minute : minute;
  11341. second = second < 10 ? '0' + second : second;
  11342. return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;
  11343. };
  11344. //前端生成id
  11345. exports.format = format;var genID = function genID(lan, radix) {
  11346. var d = new Date().getTime();
  11347. var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
  11348. var r = (d + Math.random() * 16) % 16 | 0;
  11349. d = Math.floor(d / 16);
  11350. return (c == 'x' ? r : r & 0x3 | 0x8).toString(16);
  11351. });
  11352. return uuid;
  11353. };exports.genID = genID;
  11354. var showTitle = function showTitle(item, vm) {var _item$meta =
  11355. item.meta,title = _item$meta.title,__titleIsFunction__ = _item$meta.__titleIsFunction__;
  11356. if (!title) return;
  11357. if (useI18n) {
  11358. if (title.includes('{{') && title.includes('}}') && useI18n) title = title.replace(/({{[\s\S]+?}})/, function (m, str) {return str.replace(/{{([\s\S]*)}}/, function (m, _) {return vm.$t(_.trim());});});else
  11359. if (__titleIsFunction__) title = item.meta.title;else
  11360. title = vm.$t(item.name);
  11361. } else title = item.meta && item.meta.title || item.name;
  11362. return title;
  11363. };exports.showTitle = showTitle;
  11364. var routeEqual = function routeEqual(route1, route2) {
  11365. var params1 = route1.params || {};
  11366. var params2 = route2.params || {};
  11367. var query1 = route1.query || {};
  11368. var query2 = route2.query || {};
  11369. return route1.name === route2.name && objEqual(params1, params2) && objEqual(query1, query2);
  11370. };exports.routeEqual = routeEqual;
  11371. var setUserData = function setUserData(data) {
  11372. console.log(data);
  11373. uni.setStorage({
  11374. key: "userData",
  11375. data: data,
  11376. success: function success(res) {
  11377. _vue.default.prototype.$userData = res;
  11378. } });
  11379. };exports.setUserData = setUserData;
  11380. var getUserData = function getUserData() {
  11381. return new Promise(function (resolve, reject) {
  11382. uni.getStorage({
  11383. key: "userData",
  11384. success: function success(res) {
  11385. resolve(Object.assign({ code: 0 }, res.data));
  11386. },
  11387. fail: function fail(err) {
  11388. console.log(err);
  11389. resolve({ code: 999 });
  11390. } });
  11391. });
  11392. };exports.getUserData = getUserData;
  11393. var commonsbinding = function commonsbinding() {
  11394. console.log(_vue.default.prototype.$token);
  11395. };exports.commonsbinding = commonsbinding;
  11396. var dateFormat = function dateFormat(date) {var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "YYYY-MM-DD HH:mm:ss";
  11397. var now = new Date(date);
  11398. var config = {
  11399. YYYY: now.getFullYear(),
  11400. MM: (now.getMonth() + 1).toString().padStart(2, '0'),
  11401. DD: now.getDate().toString().padStart(2, '0'),
  11402. HH: now.getHours().toString().padStart(2, '0'),
  11403. mm: now.getMinutes().toString().padStart(2, '0'),
  11404. ss: now.getSeconds() };
  11405. for (var key in config) {
  11406. format = format.replace(key, config[key]);
  11407. }
  11408. return format;
  11409. };exports.dateFormat = dateFormat;
  11410. var getTime = function getTime() {
  11411. var date = new Date(),
  11412. year = date.getFullYear(),
  11413. month = date.getMonth() + 1,
  11414. day = date.getDate(),
  11415. hour = date.getHours() < 10 ? "0" + date.getHours() : date.getHours(),
  11416. minute = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes(),
  11417. second = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
  11418. month >= 1 && month <= 9 ? month = "0" + month : "";
  11419. day >= 0 && day <= 9 ? day = "0" + day : "";
  11420. var timer = year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second;
  11421. return timer;
  11422. };exports.getTime = getTime;
  11423. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  11424. /***/ })
  11425. }]);
  11426. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map