vue.js 613KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178
  1. /******/ (() => { // webpackBootstrap
  2. /******/ var __webpack_modules__ = ({
  3. /***/ "./node_modules/@inertiajs/inertia-vue/dist/index.js":
  4. /*!***********************************************************!*\
  5. !*** ./node_modules/@inertiajs/inertia-vue/dist/index.js ***!
  6. \***********************************************************/
  7. /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
  8. function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=e(__webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm.js")),r=e(__webpack_require__(/*! lodash.isequal */ "./node_modules/lodash.isequal/index.js")),n=e(__webpack_require__(/*! lodash.clonedeep */ "./node_modules/lodash.clonedeep/index.js")),i=__webpack_require__(/*! @inertiajs/inertia */ "./node_modules/@inertiajs/inertia/dist/index.js");function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function s(){var e=[].slice.call(arguments),s="string"==typeof e[0]?e[0]:null,a=("string"==typeof e[0]?e[1]:e[0])||{},u=s?i.Inertia.restore(s):null,c=n(a),l=null,p=null,f=function(e){return e},d=t.observable(o({},u?u.data:a,{isDirty:!1,errors:u?u.errors:{},hasErrors:!1,processing:!1,progress:null,wasSuccessful:!1,recentlySuccessful:!1,data:function(){var e=this;return Object.keys(a).reduce(function(t,r){return t[r]=e[r],t},{})},transform:function(e){return f=e,this},defaults:function(e,t){var r;return c=void 0===e?this.data():Object.assign({},n(c),t?((r={})[e]=t,r):e),this},reset:function(){var e=[].slice.call(arguments),t=n(c);return Object.assign(this,0===e.length?t:Object.keys(t).filter(function(t){return e.includes(t)}).reduce(function(e,r){return e[r]=t[r],e},{})),this},setError:function(e,t){var r;return Object.assign(this.errors,t?((r={})[e]=t,r):e),this.hasErrors=Object.keys(this.errors).length>0,this},clearErrors:function(){var e=this,t=[].slice.call(arguments);return this.errors=Object.keys(this.errors).reduce(function(r,n){var i;return o({},r,t.length>0&&!t.includes(n)?((i={})[n]=e.errors[n],i):{})},{}),this.hasErrors=Object.keys(this.errors).length>0,this},submit:function(e,t,r){var s=this,a=this;void 0===r&&(r={});var u=f(this.data()),d=o({},r,{onCancelToken:function(e){if(l=e,r.onCancelToken)return r.onCancelToken(e)},onBefore:function(e){if(a.wasSuccessful=!1,a.recentlySuccessful=!1,clearTimeout(p),r.onBefore)return r.onBefore(e)},onStart:function(e){if(a.processing=!0,r.onStart)return r.onStart(e)},onProgress:function(e){if(a.progress=e,r.onProgress)return r.onProgress(e)},onSuccess:function(e){try{var t=function(e){return c=n(s.data()),s.isDirty=!1,e};return s.processing=!1,s.progress=null,s.clearErrors(),s.wasSuccessful=!0,s.recentlySuccessful=!0,p=setTimeout(function(){return s.recentlySuccessful=!1},2e3),Promise.resolve(r.onSuccess?Promise.resolve(r.onSuccess(e)).then(t):t(null))}catch(e){return Promise.reject(e)}},onError:function(e){if(a.processing=!1,a.progress=null,a.clearErrors().setError(e),r.onError)return r.onError(e)},onCancel:function(){if(a.processing=!1,a.progress=null,r.onCancel)return r.onCancel()},onFinish:function(){if(a.processing=!1,a.progress=null,l=null,r.onFinish)return r.onFinish()}});"delete"===e?i.Inertia.delete(t,o({},d,{data:u})):i.Inertia[e](t,u,d)},get:function(e,t){this.submit("get",e,t)},post:function(e,t){this.submit("post",e,t)},put:function(e,t){this.submit("put",e,t)},patch:function(e,t){this.submit("patch",e,t)},delete:function(e,t){this.submit("delete",e,t)},cancel:function(){l&&l.cancel()},__rememberable:null===s,__remember:function(){return{data:this.data(),errors:this.errors}},__restore:function(e){Object.assign(this,e.data),this.setError(e.errors)}}));return new t({created:function(){this.$watch(function(){return d},function(e){d.isDirty=!r(d.data(),c),s&&i.Inertia.remember(e.__remember(),s)},{immediate:!0,deep:!0})}}),d}var a={created:function(){var e=this;if(this.$options.remember&&!this.$isServer){Array.isArray(this.$options.remember)&&(this.$options.remember={data:this.$options.remember}),"string"==typeof this.$options.remember&&(this.$options.remember={data:[this.$options.remember]}),"string"==typeof this.$options.remember.data&&(this.$options.remember={data:[this.$options.remember.data]});var t=this.$options.remember.key instanceof Function?this.$options.remember.key.call(this):this.$options.remember.key,r=i.Inertia.restore(t),n=this.$options.remember.data.filter(function(t){return!(null!==e[t]&&"object"==typeof e[t]&&!1===e[t].__rememberable)}),s=function(t){return null!==e[t]&&"object"==typeof e[t]&&"function"==typeof e[t].__remember&&"function"==typeof e[t].__restore};n.forEach(function(a){void 0!==e[a]&&void 0!==r&&void 0!==r[a]&&(s(a)?e[a].__restore(r[a]):e[a]=r[a]),e.$watch(a,function(){i.Inertia.remember(n.reduce(function(t,r){var n;return o({},t,((n={})[r]=s(r)?e[r].__remember():e[r],n))},{}),t)},{immediate:!0,deep:!0})})}}},u={},c=null,l={name:"Inertia",props:{initialPage:{type:Object,required:!0},initialComponent:{type:[Object,Function,String],required:!1},resolveComponent:{type:Function,required:!1},titleCallback:{type:Function,required:!1,default:function(e){return e}},onHeadUpdate:{type:Function,required:!1,default:function(){return function(){}}}},data:function(){return{component:this.initialComponent||null,page:this.initialPage,key:null}},created:function(){var e=this;u=this,c=i.createHeadManager(this.$isServer,this.titleCallback,this.onHeadUpdate),this.$isServer||i.Inertia.init({initialPage:this.initialPage,resolveComponent:this.resolveComponent,swapComponent:function(t){var r=t.component,n=t.page,i=t.preserveState;try{return e.component=r,e.page=n,e.key=i?e.key:Date.now(),Promise.resolve()}catch(e){return Promise.reject(e)}}})},render:function(e){var t=this;if(this.component){var r=e(this.component,{key:this.key,props:this.page.props,scopedSlots:this.$scopedSlots});return this.component.layout?"function"==typeof this.component.layout?this.component.layout(e,r):Array.isArray(this.component.layout)?this.component.layout.concat(r).reverse().reduce(function(r,n){return e(n,{props:t.page.props},[r])}):e(this.component.layout,{props:this.page.props},[r]):r}}},p={install:function(e){i.Inertia.form=s,e.mixin(a),e.mixin({beforeCreate:function(){Object.defineProperty(this,"$headManager",{get:function(){return c}}),Object.defineProperty(this,"$inertia",{get:function(){return i.Inertia}}),Object.defineProperty(this,"$page",{get:function(){return u.page}})}})}},f={props:{title:{type:String,required:!1}},data:function(){return{provider:this.$headManager.createProvider()}},beforeDestroy:function(){this.provider.disconnect()},methods:{isUnaryTag:function(e){return["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"].indexOf(e.tag)>-1},renderTagStart:function(e){this.ensureNodeHasAttrs(e);var t=Object.keys(e.data.attrs).reduce(function(t,r){var n=e.data.attrs[r];return"head-key"===r?t:""===n?t+" "+r:t+" "+r+'="'+n+'"'},"");return"<"+e.tag+t+">"},renderTagChildren:function(e){var t=this;return e.children.reduce(function(e,r){return e+t.renderTag(r)},"")},renderTag:function(e){if(!e.tag)return e.text;var t=this.renderTagStart(e);return e.children&&(t+=this.renderTagChildren(e)),this.isUnaryTag(e)||(t+="</"+e.tag+">"),t},ensureNodeHasAttrs:function(e){e.data=o({},e.data||{},{attrs:o({},(e.data||{}).attrs||{})})},ensureNodeHasInertiaAttribute:function(e){return this.ensureNodeHasAttrs(e),e.data.attrs.inertia=void 0!==e.data.attrs["head-key"]?e.data.attrs["head-key"]:"",e},renderNode:function(e){return this.ensureNodeHasInertiaAttribute(e),this.renderTag(e)},renderNodes:function(e){var t=this,r=e.map(function(e){return t.renderNode(e)}).filter(function(e){return e});return this.title&&!r.find(function(e){return e.startsWith("<title")})&&r.push("<title inertia>"+this.title+"</title>"),r}},render:function(){this.provider.update(this.renderNodes(this.$scopedSlots.default?this.$scopedSlots.default():[]))}},d={functional:!0,props:{as:{type:String,default:"a"},data:{type:Object,default:function(){return{}}},href:{type:String},method:{type:String,default:"get"},replace:{type:Boolean,default:!1},preserveScroll:{type:Boolean,default:!1},preserveState:{type:Boolean,default:null},only:{type:Array,default:function(){return[]}},headers:{type:Object,default:function(){return{}}},queryStringArrayFormat:{type:String,default:"brackets"}},render:function(e,t){var r=t.props,n=t.data,s=t.children;n.on=o({click:function(){return{}},cancelToken:function(){return{}},start:function(){return{}},progress:function(){return{}},finish:function(){return{}},cancel:function(){return{}},success:function(){return{}},error:function(){return{}}},n.on||{});var a=r.as.toLowerCase(),u=r.method.toLowerCase(),c=i.mergeDataIntoQueryString(u,r.href||"",r.data,r.queryStringArrayFormat),l=c[0],p=c[1];return"a"===a&&"get"!==u&&console.warn('Creating POST/PUT/PATCH/DELETE <a> links is discouraged as it causes "Open Link in New Tab/Window" accessibility issues.\n\nPlease specify a more appropriate element using the "as" attribute. For example:\n\n<Link href="'+l+'" method="'+u+'" as="button">...</Link>'),e(r.as,o({},n,{attrs:o({},n.attrs,"a"===a?{href:l}:{}),on:o({},n.on,{click:function(e){var t;n.on.click(e),i.shouldIntercept(e)&&(e.preventDefault(),i.Inertia.visit(l,{data:p,method:u,replace:r.replace,preserveScroll:r.preserveScroll,preserveState:null!=(t=r.preserveState)?t:"get"!==u,only:r.only,headers:r.headers,onCancelToken:n.on.cancelToken,onBefore:n.on.before,onStart:n.on.start,onProgress:n.on.progress,onFinish:n.on.finish,onCancel:n.on.cancel,onSuccess:n.on.success,onError:n.on.error}))}})}),s)}};exports.App=l,exports.Head=f,exports.InertiaApp=l,exports.InertiaHead=f,exports.InertiaLink=d,exports.Link=d,exports.app=l,exports.createInertiaApp=function(e){try{var t,r,n,i,o,s,a;r=void 0===(t=e.id)?"app":t,n=e.resolve,i=e.setup,o=e.title,s=e.page,a=e.render;var u="undefined"==typeof window,c=u?null:document.getElementById(r),f=s||JSON.parse(c.dataset.page),d=function(e){return Promise.resolve(n(e)).then(function(e){return e.default||e})},h=[];return Promise.resolve(d(f.component).then(function(e){return i({el:c,app:l,App:l,props:{attrs:{id:r,"data-page":JSON.stringify(f)},props:{initialPage:f,initialComponent:e,resolveComponent:d,titleCallback:o,onHeadUpdate:u?function(e){return h=e}:null}},plugin:p})})).then(function(e){if(u)return a(e).then(function(e){return{head:h,body:e}})})}catch(e){return Promise.reject(e)}},exports.link=d,exports.plugin=p;
  9. //# sourceMappingURL=index.js.map
  10. /***/ }),
  11. /***/ "./node_modules/@inertiajs/inertia/dist/index.js":
  12. /*!*******************************************************!*\
  13. !*** ./node_modules/@inertiajs/inertia/dist/index.js ***!
  14. \*******************************************************/
  15. /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
  16. function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=e(__webpack_require__(/*! axios */ "./node_modules/@inertiajs/inertia/node_modules/axios/index.js")),n=__webpack_require__(/*! qs */ "./node_modules/@inertiajs/inertia/node_modules/qs/lib/index.js"),i=e(__webpack_require__(/*! deepmerge */ "./node_modules/deepmerge/dist/cjs.js"));function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var o,s={modal:null,listener:null,show:function(e){var t=this;"object"==typeof e&&(e="All Inertia requests must receive a valid Inertia response, however a plain JSON response was received.<hr>"+JSON.stringify(e));var n=document.createElement("html");n.innerHTML=e,n.querySelectorAll("a").forEach(function(e){return e.setAttribute("target","_top")}),this.modal=document.createElement("div"),this.modal.style.position="fixed",this.modal.style.width="100vw",this.modal.style.height="100vh",this.modal.style.padding="50px",this.modal.style.boxSizing="border-box",this.modal.style.backgroundColor="rgba(0, 0, 0, .6)",this.modal.style.zIndex=2e5,this.modal.addEventListener("click",function(){return t.hide()});var i=document.createElement("iframe");if(i.style.backgroundColor="white",i.style.borderRadius="5px",i.style.width="100%",i.style.height="100%",this.modal.appendChild(i),document.body.prepend(this.modal),document.body.style.overflow="hidden",!i.contentWindow)throw new Error("iframe not yet ready.");i.contentWindow.document.open(),i.contentWindow.document.write(n.outerHTML),i.contentWindow.document.close(),this.listener=this.hideOnEscape.bind(this),document.addEventListener("keydown",this.listener)},hide:function(){this.modal.outerHTML="",this.modal=null,document.body.style.overflow="visible",document.removeEventListener("keydown",this.listener)},hideOnEscape:function(e){27===e.keyCode&&this.hide()}};function a(e,t){var n;return function(){var i=arguments,r=this;clearTimeout(n),n=setTimeout(function(){return e.apply(r,[].slice.call(i))},t)}}function c(e,t,n){for(var i in void 0===t&&(t=new FormData),void 0===n&&(n=null),e=e||{})Object.prototype.hasOwnProperty.call(e,i)&&d(t,l(n,i),e[i]);return t}function l(e,t){return e?e+"["+t+"]":t}function d(e,t,n){return Array.isArray(n)?Array.from(n.keys()).forEach(function(i){return d(e,l(t,i.toString()),n[i])}):n instanceof Date?e.append(t,n.toISOString()):n instanceof File?e.append(t,n,n.name):n instanceof Blob?e.append(t,n):"boolean"==typeof n?e.append(t,n?"1":"0"):"string"==typeof n?e.append(t,n):"number"==typeof n?e.append(t,""+n):null==n?e.append(t,""):void c(n,e,t)}function u(e){return new URL(e.toString(),window.location.toString())}function h(e,t,r,o){void 0===o&&(o="brackets");var s=/^https?:\/\//.test(t.toString()),a=s||t.toString().startsWith("/"),c=!a&&!t.toString().startsWith("#")&&!t.toString().startsWith("?"),l=t.toString().includes("?")||e===exports.Method.GET&&Object.keys(r).length,d=t.toString().includes("#"),u=new URL(t.toString(),"http://localhost");return e===exports.Method.GET&&Object.keys(r).length&&(u.search=n.stringify(i(n.parse(u.search,{ignoreQueryPrefix:!0}),r),{encodeValuesOnly:!0,arrayFormat:o}),r={}),[[s?u.protocol+"//"+u.host:"",a?u.pathname:"",c?u.pathname.substring(1):"",l?u.search:"",d?u.hash:""].join(""),r]}function p(e){return(e=new URL(e.href)).hash="",e}function f(e,t){return document.dispatchEvent(new CustomEvent("inertia:"+e,t))}(o=exports.Method||(exports.Method={})).GET="get",o.POST="post",o.PUT="put",o.PATCH="patch",o.DELETE="delete";var v=function(e){return f("finish",{detail:{visit:e}})},m=function(e){return f("navigate",{detail:{page:e}})},g="undefined"==typeof window,w=function(){function e(){this.visitId=null}var n=e.prototype;return n.init=function(e){var t=e.resolveComponent,n=e.swapComponent;this.page=e.initialPage,this.resolveComponent=t,this.swapComponent=n,this.isBackForwardVisit()?this.handleBackForwardVisit(this.page):this.isLocationVisit()?this.handleLocationVisit(this.page):this.handleInitialPageVisit(this.page),this.setupEventListeners()},n.handleInitialPageVisit=function(e){this.page.url+=window.location.hash,this.setPage(e,{preserveState:!0}).then(function(){return m(e)})},n.setupEventListeners=function(){window.addEventListener("popstate",this.handlePopstateEvent.bind(this)),document.addEventListener("scroll",a(this.handleScrollEvent.bind(this),100),!0)},n.scrollRegions=function(){return document.querySelectorAll("[scroll-region]")},n.handleScrollEvent=function(e){"function"==typeof e.target.hasAttribute&&e.target.hasAttribute("scroll-region")&&this.saveScrollPositions()},n.saveScrollPositions=function(){this.replaceState(r({},this.page,{scrollRegions:Array.from(this.scrollRegions()).map(function(e){return{top:e.scrollTop,left:e.scrollLeft}})}))},n.resetScrollPositions=function(){var e;document.documentElement.scrollTop=0,document.documentElement.scrollLeft=0,this.scrollRegions().forEach(function(e){e.scrollTop=0,e.scrollLeft=0}),this.saveScrollPositions(),window.location.hash&&(null==(e=document.getElementById(window.location.hash.slice(1)))||e.scrollIntoView())},n.restoreScrollPositions=function(){var e=this;this.page.scrollRegions&&this.scrollRegions().forEach(function(t,n){var i=e.page.scrollRegions[n];i&&(t.scrollTop=i.top,t.scrollLeft=i.left)})},n.isBackForwardVisit=function(){return window.history.state&&window.performance&&window.performance.getEntriesByType("navigation").length>0&&"back_forward"===window.performance.getEntriesByType("navigation")[0].type},n.handleBackForwardVisit=function(e){var t=this;window.history.state.version=e.version,this.setPage(window.history.state,{preserveScroll:!0,preserveState:!0}).then(function(){t.restoreScrollPositions(),m(e)})},n.locationVisit=function(e,t){try{window.sessionStorage.setItem("inertiaLocationVisit",JSON.stringify({preserveScroll:t})),window.location.href=e.href,p(window.location).href===p(e).href&&window.location.reload()}catch(e){return!1}},n.isLocationVisit=function(){try{return null!==window.sessionStorage.getItem("inertiaLocationVisit")}catch(e){return!1}},n.handleLocationVisit=function(e){var t,n,i,r,o=this,s=JSON.parse(window.sessionStorage.getItem("inertiaLocationVisit")||"");window.sessionStorage.removeItem("inertiaLocationVisit"),e.url+=window.location.hash,e.rememberedState=null!=(t=null==(n=window.history.state)?void 0:n.rememberedState)?t:{},e.scrollRegions=null!=(i=null==(r=window.history.state)?void 0:r.scrollRegions)?i:[],this.setPage(e,{preserveScroll:s.preserveScroll,preserveState:!0}).then(function(){s.preserveScroll&&o.restoreScrollPositions(),m(e)})},n.isLocationVisitResponse=function(e){return e&&409===e.status&&e.headers["x-inertia-location"]},n.isInertiaResponse=function(e){return null==e?void 0:e.headers["x-inertia"]},n.createVisitId=function(){return this.visitId={},this.visitId},n.cancelVisit=function(e,t){var n=t.cancelled,i=void 0!==n&&n,r=t.interrupted,o=void 0!==r&&r;!e||e.completed||e.cancelled||e.interrupted||(e.cancelToken.cancel(),e.onCancel(),e.completed=!1,e.cancelled=i,e.interrupted=o,v(e),e.onFinish(e))},n.finishVisit=function(e){e.cancelled||e.interrupted||(e.completed=!0,e.cancelled=!1,e.interrupted=!1,v(e),e.onFinish(e))},n.resolvePreserveOption=function(e,t){return"function"==typeof e?e(t):"errors"===e?Object.keys(t.props.errors||{}).length>0:e},n.visit=function(e,n){var i=this,o=void 0===n?{}:n,a=o.method,l=void 0===a?exports.Method.GET:a,d=o.data,v=void 0===d?{}:d,m=o.replace,g=void 0!==m&&m,w=o.preserveScroll,y=void 0!==w&&w,S=o.preserveState,b=void 0!==S&&S,E=o.only,P=void 0===E?[]:E,I=o.headers,x=void 0===I?{}:I,V=o.errorBag,T=void 0===V?"":V,L=o.forceFormData,O=void 0!==L&&L,k=o.onCancelToken,C=void 0===k?function(){}:k,M=o.onBefore,A=void 0===M?function(){}:M,F=o.onStart,R=void 0===F?function(){}:F,j=o.onProgress,D=void 0===j?function(){}:j,B=o.onFinish,q=void 0===B?function(){}:B,N=o.onCancel,H=void 0===N?function(){}:N,W=o.onSuccess,G=void 0===W?function(){}:W,U=o.onError,X=void 0===U?function(){}:U,J=o.queryStringArrayFormat,K=void 0===J?"brackets":J,_="string"==typeof e?u(e):e;if(!function e(t){return t instanceof File||t instanceof Blob||t instanceof FileList&&t.length>0||t instanceof FormData&&Array.from(t.values()).some(function(t){return e(t)})||"object"==typeof t&&null!==t&&Object.values(t).some(function(t){return e(t)})}(v)&&!O||v instanceof FormData||(v=c(v)),!(v instanceof FormData)){var z=h(l,_,v,K),Q=z[1];_=u(z[0]),v=Q}var Y={url:_,method:l,data:v,replace:g,preserveScroll:y,preserveState:b,only:P,headers:x,errorBag:T,forceFormData:O,queryStringArrayFormat:K,cancelled:!1,completed:!1,interrupted:!1};if(!1!==A(Y)&&function(e){return f("before",{cancelable:!0,detail:{visit:e}})}(Y)){this.activeVisit&&this.cancelVisit(this.activeVisit,{interrupted:!0}),this.saveScrollPositions();var Z=this.createVisitId();this.activeVisit=r({},Y,{onCancelToken:C,onBefore:A,onStart:R,onProgress:D,onFinish:q,onCancel:H,onSuccess:G,onError:X,queryStringArrayFormat:K,cancelToken:t.CancelToken.source()}),C({cancel:function(){i.activeVisit&&i.cancelVisit(i.activeVisit,{cancelled:!0})}}),function(e){f("start",{detail:{visit:e}})}(Y),R(Y),t({method:l,url:p(_).href,data:l===exports.Method.GET?{}:v,params:l===exports.Method.GET?v:{},cancelToken:this.activeVisit.cancelToken.token,headers:r({},x,{Accept:"text/html, application/xhtml+xml","X-Requested-With":"XMLHttpRequest","X-Inertia":!0},P.length?{"X-Inertia-Partial-Component":this.page.component,"X-Inertia-Partial-Data":P.join(",")}:{},T&&T.length?{"X-Inertia-Error-Bag":T}:{},this.page.version?{"X-Inertia-Version":this.page.version}:{}),onUploadProgress:function(e){v instanceof FormData&&(e.percentage=Math.round(e.loaded/e.total*100),function(e){f("progress",{detail:{progress:e}})}(e),D(e))}}).then(function(e){var t;if(!i.isInertiaResponse(e))return Promise.reject({response:e});var n=e.data;P.length&&n.component===i.page.component&&(n.props=r({},i.page.props,n.props)),y=i.resolvePreserveOption(y,n),(b=i.resolvePreserveOption(b,n))&&null!=(t=window.history.state)&&t.rememberedState&&n.component===i.page.component&&(n.rememberedState=window.history.state.rememberedState);var o=_,s=u(n.url);return o.hash&&!s.hash&&p(o).href===s.href&&(s.hash=o.hash,n.url=s.href),i.setPage(n,{visitId:Z,replace:g,preserveScroll:y,preserveState:b})}).then(function(){var e=i.page.props.errors||{};if(Object.keys(e).length>0){var t=T?e[T]?e[T]:{}:e;return function(e){f("error",{detail:{errors:e}})}(t),X(t)}return f("success",{detail:{page:i.page}}),G(i.page)}).catch(function(e){if(i.isInertiaResponse(e.response))return i.setPage(e.response.data,{visitId:Z});if(i.isLocationVisitResponse(e.response)){var t=u(e.response.headers["x-inertia-location"]),n=_;n.hash&&!t.hash&&p(n).href===t.href&&(t.hash=n.hash),i.locationVisit(t,!0===y)}else{if(!e.response)return Promise.reject(e);f("invalid",{cancelable:!0,detail:{response:e.response}})&&s.show(e.response.data)}}).then(function(){i.activeVisit&&i.finishVisit(i.activeVisit)}).catch(function(e){if(!t.isCancel(e)){var n=f("exception",{cancelable:!0,detail:{exception:e}});if(i.activeVisit&&i.finishVisit(i.activeVisit),n)return Promise.reject(e)}})}},n.setPage=function(e,t){var n=this,i=void 0===t?{}:t,r=i.visitId,o=void 0===r?this.createVisitId():r,s=i.replace,a=void 0!==s&&s,c=i.preserveScroll,l=void 0!==c&&c,d=i.preserveState,h=void 0!==d&&d;return Promise.resolve(this.resolveComponent(e.component)).then(function(t){o===n.visitId&&(e.scrollRegions=e.scrollRegions||[],e.rememberedState=e.rememberedState||{},(a=a||u(e.url).href===window.location.href)?n.replaceState(e):n.pushState(e),n.swapComponent({component:t,page:e,preserveState:h}).then(function(){l||n.resetScrollPositions(),a||m(e)}))})},n.pushState=function(e){this.page=e,window.history.pushState(e,"",e.url)},n.replaceState=function(e){this.page=e,window.history.replaceState(e,"",e.url)},n.handlePopstateEvent=function(e){var t=this;if(null!==e.state){var n=e.state,i=this.createVisitId();Promise.resolve(this.resolveComponent(n.component)).then(function(e){i===t.visitId&&(t.page=n,t.swapComponent({component:e,page:n,preserveState:!1}).then(function(){t.restoreScrollPositions(),m(n)}))})}else{var o=u(this.page.url);o.hash=window.location.hash,this.replaceState(r({},this.page,{url:o.href})),this.resetScrollPositions()}},n.get=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),this.visit(e,r({},n,{method:exports.Method.GET,data:t}))},n.reload=function(e){return void 0===e&&(e={}),this.visit(window.location.href,r({},e,{preserveScroll:!0,preserveState:!0}))},n.replace=function(e,t){var n;return void 0===t&&(t={}),console.warn("Inertia.replace() has been deprecated and will be removed in a future release. Please use Inertia."+(null!=(n=t.method)?n:"get")+"() instead."),this.visit(e,r({preserveState:!0},t,{replace:!0}))},n.post=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),this.visit(e,r({preserveState:!0},n,{method:exports.Method.POST,data:t}))},n.put=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),this.visit(e,r({preserveState:!0},n,{method:exports.Method.PUT,data:t}))},n.patch=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),this.visit(e,r({preserveState:!0},n,{method:exports.Method.PATCH,data:t}))},n.delete=function(e,t){return void 0===t&&(t={}),this.visit(e,r({preserveState:!0},t,{method:exports.Method.DELETE}))},n.remember=function(e,t){var n,i;void 0===t&&(t="default"),g||this.replaceState(r({},this.page,{rememberedState:r({},null==(n=this.page)?void 0:n.rememberedState,(i={},i[t]=e,i))}))},n.restore=function(e){var t,n;if(void 0===e&&(e="default"),!g)return null==(t=window.history.state)||null==(n=t.rememberedState)?void 0:n[e]},n.on=function(e,t){var n=function(e){var n=t(e);e.cancelable&&!e.defaultPrevented&&!1===n&&e.preventDefault()};return document.addEventListener("inertia:"+e,n),function(){return document.removeEventListener("inertia:"+e,n)}},e}(),y={buildDOMElement:function(e){var t=document.createElement("template");t.innerHTML=e;var n=t.content.firstChild;if(!e.startsWith("<script "))return n;var i=document.createElement("script");return i.innerHTML=n.innerHTML,n.getAttributeNames().forEach(function(e){i.setAttribute(e,n.getAttribute(e)||"")}),i},isInertiaManagedElement:function(e){return e.nodeType===Node.ELEMENT_NODE&&null!==e.getAttribute("inertia")},findMatchingElementIndex:function(e,t){var n=e.getAttribute("inertia");return null!==n?t.findIndex(function(e){return e.getAttribute("inertia")===n}):-1},update:a(function(e){var t=this,n=e.map(function(e){return t.buildDOMElement(e)});Array.from(document.head.childNodes).filter(function(e){return t.isInertiaManagedElement(e)}).forEach(function(e){var i=t.findMatchingElementIndex(e,n);if(-1!==i){var r,o=n.splice(i,1)[0];o&&!e.isEqualNode(o)&&(null==e||null==(r=e.parentNode)||r.replaceChild(o,e))}else{var s;null==e||null==(s=e.parentNode)||s.removeChild(e)}}),n.forEach(function(e){return document.head.appendChild(e)})},1)},S=new w;exports.Inertia=S,exports.createHeadManager=function(e,t,n){var i={},r=0;function o(){var e=Object.values(i).reduce(function(e,t){return e.concat(t)},[]).reduce(function(e,n){if(-1===n.indexOf("<"))return e;if(0===n.indexOf("<title ")){var i=n.match(/(<title [^>]+>)(.*?)(<\/title>)/);return e.title=i?""+i[1]+t(i[2])+i[3]:n,e}var r=n.match(/ inertia="[^"]+"/);return r?e[r[0]]=n:e[Object.keys(e).length]=n,e},{});return Object.values(e)}function s(){e?n(o()):y.update(o())}return{createProvider:function(){var e=function(){var e=r+=1;return i[e]=[],e.toString()}();return{update:function(t){return function(e,t){void 0===t&&(t=[]),null!==e&&Object.keys(i).indexOf(e)>-1&&(i[e]=t),s()}(e,t)},disconnect:function(){return function(e){null!==e&&-1!==Object.keys(i).indexOf(e)&&(delete i[e],s())}(e)}}}}},exports.hrefToUrl=u,exports.mergeDataIntoQueryString=h,exports.shouldIntercept=function(e){var t="a"===e.currentTarget.tagName.toLowerCase();return!(e.target&&null!=e&&e.target.isContentEditable||e.defaultPrevented||t&&e.which>1||t&&e.altKey||t&&e.ctrlKey||t&&e.metaKey||t&&e.shiftKey)},exports.urlWithoutHash=p;
  17. //# sourceMappingURL=index.js.map
  18. /***/ }),
  19. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/index.js":
  20. /*!*********************************************************************!*\
  21. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/index.js ***!
  22. \*********************************************************************/
  23. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  24. module.exports = __webpack_require__(/*! ./lib/axios */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/axios.js");
  25. /***/ }),
  26. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/adapters/xhr.js":
  27. /*!********************************************************************************!*\
  28. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/adapters/xhr.js ***!
  29. \********************************************************************************/
  30. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  31. "use strict";
  32. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/utils.js");
  33. var settle = __webpack_require__(/*! ./../core/settle */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/settle.js");
  34. var cookies = __webpack_require__(/*! ./../helpers/cookies */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/cookies.js");
  35. var buildURL = __webpack_require__(/*! ./../helpers/buildURL */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/buildURL.js");
  36. var buildFullPath = __webpack_require__(/*! ../core/buildFullPath */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/buildFullPath.js");
  37. var parseHeaders = __webpack_require__(/*! ./../helpers/parseHeaders */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/parseHeaders.js");
  38. var isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/isURLSameOrigin.js");
  39. var createError = __webpack_require__(/*! ../core/createError */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/createError.js");
  40. module.exports = function xhrAdapter(config) {
  41. return new Promise(function dispatchXhrRequest(resolve, reject) {
  42. var requestData = config.data;
  43. var requestHeaders = config.headers;
  44. var responseType = config.responseType;
  45. if (utils.isFormData(requestData)) {
  46. delete requestHeaders['Content-Type']; // Let the browser set it
  47. }
  48. var request = new XMLHttpRequest();
  49. // HTTP basic authentication
  50. if (config.auth) {
  51. var username = config.auth.username || '';
  52. var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
  53. requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
  54. }
  55. var fullPath = buildFullPath(config.baseURL, config.url);
  56. request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
  57. // Set the request timeout in MS
  58. request.timeout = config.timeout;
  59. function onloadend() {
  60. if (!request) {
  61. return;
  62. }
  63. // Prepare the response
  64. var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
  65. var responseData = !responseType || responseType === 'text' || responseType === 'json' ?
  66. request.responseText : request.response;
  67. var response = {
  68. data: responseData,
  69. status: request.status,
  70. statusText: request.statusText,
  71. headers: responseHeaders,
  72. config: config,
  73. request: request
  74. };
  75. settle(resolve, reject, response);
  76. // Clean up request
  77. request = null;
  78. }
  79. if ('onloadend' in request) {
  80. // Use onloadend if available
  81. request.onloadend = onloadend;
  82. } else {
  83. // Listen for ready state to emulate onloadend
  84. request.onreadystatechange = function handleLoad() {
  85. if (!request || request.readyState !== 4) {
  86. return;
  87. }
  88. // The request errored out and we didn't get a response, this will be
  89. // handled by onerror instead
  90. // With one exception: request that using file: protocol, most browsers
  91. // will return status as 0 even though it's a successful request
  92. if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
  93. return;
  94. }
  95. // readystate handler is calling before onerror or ontimeout handlers,
  96. // so we should call onloadend on the next 'tick'
  97. setTimeout(onloadend);
  98. };
  99. }
  100. // Handle browser request cancellation (as opposed to a manual cancellation)
  101. request.onabort = function handleAbort() {
  102. if (!request) {
  103. return;
  104. }
  105. reject(createError('Request aborted', config, 'ECONNABORTED', request));
  106. // Clean up request
  107. request = null;
  108. };
  109. // Handle low level network errors
  110. request.onerror = function handleError() {
  111. // Real errors are hidden from us by the browser
  112. // onerror should only fire if it's a network error
  113. reject(createError('Network Error', config, null, request));
  114. // Clean up request
  115. request = null;
  116. };
  117. // Handle timeout
  118. request.ontimeout = function handleTimeout() {
  119. var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
  120. if (config.timeoutErrorMessage) {
  121. timeoutErrorMessage = config.timeoutErrorMessage;
  122. }
  123. reject(createError(
  124. timeoutErrorMessage,
  125. config,
  126. config.transitional && config.transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',
  127. request));
  128. // Clean up request
  129. request = null;
  130. };
  131. // Add xsrf header
  132. // This is only done if running in a standard browser environment.
  133. // Specifically not if we're in a web worker, or react-native.
  134. if (utils.isStandardBrowserEnv()) {
  135. // Add xsrf header
  136. var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?
  137. cookies.read(config.xsrfCookieName) :
  138. undefined;
  139. if (xsrfValue) {
  140. requestHeaders[config.xsrfHeaderName] = xsrfValue;
  141. }
  142. }
  143. // Add headers to the request
  144. if ('setRequestHeader' in request) {
  145. utils.forEach(requestHeaders, function setRequestHeader(val, key) {
  146. if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
  147. // Remove Content-Type if data is undefined
  148. delete requestHeaders[key];
  149. } else {
  150. // Otherwise add header to the request
  151. request.setRequestHeader(key, val);
  152. }
  153. });
  154. }
  155. // Add withCredentials to request if needed
  156. if (!utils.isUndefined(config.withCredentials)) {
  157. request.withCredentials = !!config.withCredentials;
  158. }
  159. // Add responseType to request if needed
  160. if (responseType && responseType !== 'json') {
  161. request.responseType = config.responseType;
  162. }
  163. // Handle progress if needed
  164. if (typeof config.onDownloadProgress === 'function') {
  165. request.addEventListener('progress', config.onDownloadProgress);
  166. }
  167. // Not all browsers support upload events
  168. if (typeof config.onUploadProgress === 'function' && request.upload) {
  169. request.upload.addEventListener('progress', config.onUploadProgress);
  170. }
  171. if (config.cancelToken) {
  172. // Handle cancellation
  173. config.cancelToken.promise.then(function onCanceled(cancel) {
  174. if (!request) {
  175. return;
  176. }
  177. request.abort();
  178. reject(cancel);
  179. // Clean up request
  180. request = null;
  181. });
  182. }
  183. if (!requestData) {
  184. requestData = null;
  185. }
  186. // Send the request
  187. request.send(requestData);
  188. });
  189. };
  190. /***/ }),
  191. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/axios.js":
  192. /*!*************************************************************************!*\
  193. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/axios.js ***!
  194. \*************************************************************************/
  195. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  196. "use strict";
  197. var utils = __webpack_require__(/*! ./utils */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/utils.js");
  198. var bind = __webpack_require__(/*! ./helpers/bind */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/bind.js");
  199. var Axios = __webpack_require__(/*! ./core/Axios */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/Axios.js");
  200. var mergeConfig = __webpack_require__(/*! ./core/mergeConfig */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/mergeConfig.js");
  201. var defaults = __webpack_require__(/*! ./defaults */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/defaults.js");
  202. /**
  203. * Create an instance of Axios
  204. *
  205. * @param {Object} defaultConfig The default config for the instance
  206. * @return {Axios} A new instance of Axios
  207. */
  208. function createInstance(defaultConfig) {
  209. var context = new Axios(defaultConfig);
  210. var instance = bind(Axios.prototype.request, context);
  211. // Copy axios.prototype to instance
  212. utils.extend(instance, Axios.prototype, context);
  213. // Copy context to instance
  214. utils.extend(instance, context);
  215. return instance;
  216. }
  217. // Create the default instance to be exported
  218. var axios = createInstance(defaults);
  219. // Expose Axios class to allow class inheritance
  220. axios.Axios = Axios;
  221. // Factory for creating new instances
  222. axios.create = function create(instanceConfig) {
  223. return createInstance(mergeConfig(axios.defaults, instanceConfig));
  224. };
  225. // Expose Cancel & CancelToken
  226. axios.Cancel = __webpack_require__(/*! ./cancel/Cancel */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/cancel/Cancel.js");
  227. axios.CancelToken = __webpack_require__(/*! ./cancel/CancelToken */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/cancel/CancelToken.js");
  228. axios.isCancel = __webpack_require__(/*! ./cancel/isCancel */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/cancel/isCancel.js");
  229. // Expose all/spread
  230. axios.all = function all(promises) {
  231. return Promise.all(promises);
  232. };
  233. axios.spread = __webpack_require__(/*! ./helpers/spread */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/spread.js");
  234. // Expose isAxiosError
  235. axios.isAxiosError = __webpack_require__(/*! ./helpers/isAxiosError */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/isAxiosError.js");
  236. module.exports = axios;
  237. // Allow use of default import syntax in TypeScript
  238. module.exports["default"] = axios;
  239. /***/ }),
  240. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/cancel/Cancel.js":
  241. /*!*********************************************************************************!*\
  242. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/cancel/Cancel.js ***!
  243. \*********************************************************************************/
  244. /***/ ((module) => {
  245. "use strict";
  246. /**
  247. * A `Cancel` is an object that is thrown when an operation is canceled.
  248. *
  249. * @class
  250. * @param {string=} message The message.
  251. */
  252. function Cancel(message) {
  253. this.message = message;
  254. }
  255. Cancel.prototype.toString = function toString() {
  256. return 'Cancel' + (this.message ? ': ' + this.message : '');
  257. };
  258. Cancel.prototype.__CANCEL__ = true;
  259. module.exports = Cancel;
  260. /***/ }),
  261. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/cancel/CancelToken.js":
  262. /*!**************************************************************************************!*\
  263. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/cancel/CancelToken.js ***!
  264. \**************************************************************************************/
  265. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  266. "use strict";
  267. var Cancel = __webpack_require__(/*! ./Cancel */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/cancel/Cancel.js");
  268. /**
  269. * A `CancelToken` is an object that can be used to request cancellation of an operation.
  270. *
  271. * @class
  272. * @param {Function} executor The executor function.
  273. */
  274. function CancelToken(executor) {
  275. if (typeof executor !== 'function') {
  276. throw new TypeError('executor must be a function.');
  277. }
  278. var resolvePromise;
  279. this.promise = new Promise(function promiseExecutor(resolve) {
  280. resolvePromise = resolve;
  281. });
  282. var token = this;
  283. executor(function cancel(message) {
  284. if (token.reason) {
  285. // Cancellation has already been requested
  286. return;
  287. }
  288. token.reason = new Cancel(message);
  289. resolvePromise(token.reason);
  290. });
  291. }
  292. /**
  293. * Throws a `Cancel` if cancellation has been requested.
  294. */
  295. CancelToken.prototype.throwIfRequested = function throwIfRequested() {
  296. if (this.reason) {
  297. throw this.reason;
  298. }
  299. };
  300. /**
  301. * Returns an object that contains a new `CancelToken` and a function that, when called,
  302. * cancels the `CancelToken`.
  303. */
  304. CancelToken.source = function source() {
  305. var cancel;
  306. var token = new CancelToken(function executor(c) {
  307. cancel = c;
  308. });
  309. return {
  310. token: token,
  311. cancel: cancel
  312. };
  313. };
  314. module.exports = CancelToken;
  315. /***/ }),
  316. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/cancel/isCancel.js":
  317. /*!***********************************************************************************!*\
  318. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/cancel/isCancel.js ***!
  319. \***********************************************************************************/
  320. /***/ ((module) => {
  321. "use strict";
  322. module.exports = function isCancel(value) {
  323. return !!(value && value.__CANCEL__);
  324. };
  325. /***/ }),
  326. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/Axios.js":
  327. /*!******************************************************************************!*\
  328. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/Axios.js ***!
  329. \******************************************************************************/
  330. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  331. "use strict";
  332. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/utils.js");
  333. var buildURL = __webpack_require__(/*! ../helpers/buildURL */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/buildURL.js");
  334. var InterceptorManager = __webpack_require__(/*! ./InterceptorManager */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/InterceptorManager.js");
  335. var dispatchRequest = __webpack_require__(/*! ./dispatchRequest */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/dispatchRequest.js");
  336. var mergeConfig = __webpack_require__(/*! ./mergeConfig */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/mergeConfig.js");
  337. var validator = __webpack_require__(/*! ../helpers/validator */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/validator.js");
  338. var validators = validator.validators;
  339. /**
  340. * Create a new instance of Axios
  341. *
  342. * @param {Object} instanceConfig The default config for the instance
  343. */
  344. function Axios(instanceConfig) {
  345. this.defaults = instanceConfig;
  346. this.interceptors = {
  347. request: new InterceptorManager(),
  348. response: new InterceptorManager()
  349. };
  350. }
  351. /**
  352. * Dispatch a request
  353. *
  354. * @param {Object} config The config specific for this request (merged with this.defaults)
  355. */
  356. Axios.prototype.request = function request(config) {
  357. /*eslint no-param-reassign:0*/
  358. // Allow for axios('example/url'[, config]) a la fetch API
  359. if (typeof config === 'string') {
  360. config = arguments[1] || {};
  361. config.url = arguments[0];
  362. } else {
  363. config = config || {};
  364. }
  365. config = mergeConfig(this.defaults, config);
  366. // Set config.method
  367. if (config.method) {
  368. config.method = config.method.toLowerCase();
  369. } else if (this.defaults.method) {
  370. config.method = this.defaults.method.toLowerCase();
  371. } else {
  372. config.method = 'get';
  373. }
  374. var transitional = config.transitional;
  375. if (transitional !== undefined) {
  376. validator.assertOptions(transitional, {
  377. silentJSONParsing: validators.transitional(validators.boolean, '1.0.0'),
  378. forcedJSONParsing: validators.transitional(validators.boolean, '1.0.0'),
  379. clarifyTimeoutError: validators.transitional(validators.boolean, '1.0.0')
  380. }, false);
  381. }
  382. // filter out skipped interceptors
  383. var requestInterceptorChain = [];
  384. var synchronousRequestInterceptors = true;
  385. this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
  386. if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
  387. return;
  388. }
  389. synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
  390. requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
  391. });
  392. var responseInterceptorChain = [];
  393. this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
  394. responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
  395. });
  396. var promise;
  397. if (!synchronousRequestInterceptors) {
  398. var chain = [dispatchRequest, undefined];
  399. Array.prototype.unshift.apply(chain, requestInterceptorChain);
  400. chain = chain.concat(responseInterceptorChain);
  401. promise = Promise.resolve(config);
  402. while (chain.length) {
  403. promise = promise.then(chain.shift(), chain.shift());
  404. }
  405. return promise;
  406. }
  407. var newConfig = config;
  408. while (requestInterceptorChain.length) {
  409. var onFulfilled = requestInterceptorChain.shift();
  410. var onRejected = requestInterceptorChain.shift();
  411. try {
  412. newConfig = onFulfilled(newConfig);
  413. } catch (error) {
  414. onRejected(error);
  415. break;
  416. }
  417. }
  418. try {
  419. promise = dispatchRequest(newConfig);
  420. } catch (error) {
  421. return Promise.reject(error);
  422. }
  423. while (responseInterceptorChain.length) {
  424. promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());
  425. }
  426. return promise;
  427. };
  428. Axios.prototype.getUri = function getUri(config) {
  429. config = mergeConfig(this.defaults, config);
  430. return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
  431. };
  432. // Provide aliases for supported request methods
  433. utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
  434. /*eslint func-names:0*/
  435. Axios.prototype[method] = function(url, config) {
  436. return this.request(mergeConfig(config || {}, {
  437. method: method,
  438. url: url,
  439. data: (config || {}).data
  440. }));
  441. };
  442. });
  443. utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
  444. /*eslint func-names:0*/
  445. Axios.prototype[method] = function(url, data, config) {
  446. return this.request(mergeConfig(config || {}, {
  447. method: method,
  448. url: url,
  449. data: data
  450. }));
  451. };
  452. });
  453. module.exports = Axios;
  454. /***/ }),
  455. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/InterceptorManager.js":
  456. /*!*******************************************************************************************!*\
  457. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/InterceptorManager.js ***!
  458. \*******************************************************************************************/
  459. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  460. "use strict";
  461. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/utils.js");
  462. function InterceptorManager() {
  463. this.handlers = [];
  464. }
  465. /**
  466. * Add a new interceptor to the stack
  467. *
  468. * @param {Function} fulfilled The function to handle `then` for a `Promise`
  469. * @param {Function} rejected The function to handle `reject` for a `Promise`
  470. *
  471. * @return {Number} An ID used to remove interceptor later
  472. */
  473. InterceptorManager.prototype.use = function use(fulfilled, rejected, options) {
  474. this.handlers.push({
  475. fulfilled: fulfilled,
  476. rejected: rejected,
  477. synchronous: options ? options.synchronous : false,
  478. runWhen: options ? options.runWhen : null
  479. });
  480. return this.handlers.length - 1;
  481. };
  482. /**
  483. * Remove an interceptor from the stack
  484. *
  485. * @param {Number} id The ID that was returned by `use`
  486. */
  487. InterceptorManager.prototype.eject = function eject(id) {
  488. if (this.handlers[id]) {
  489. this.handlers[id] = null;
  490. }
  491. };
  492. /**
  493. * Iterate over all the registered interceptors
  494. *
  495. * This method is particularly useful for skipping over any
  496. * interceptors that may have become `null` calling `eject`.
  497. *
  498. * @param {Function} fn The function to call for each interceptor
  499. */
  500. InterceptorManager.prototype.forEach = function forEach(fn) {
  501. utils.forEach(this.handlers, function forEachHandler(h) {
  502. if (h !== null) {
  503. fn(h);
  504. }
  505. });
  506. };
  507. module.exports = InterceptorManager;
  508. /***/ }),
  509. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/buildFullPath.js":
  510. /*!**************************************************************************************!*\
  511. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/buildFullPath.js ***!
  512. \**************************************************************************************/
  513. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  514. "use strict";
  515. var isAbsoluteURL = __webpack_require__(/*! ../helpers/isAbsoluteURL */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/isAbsoluteURL.js");
  516. var combineURLs = __webpack_require__(/*! ../helpers/combineURLs */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/combineURLs.js");
  517. /**
  518. * Creates a new URL by combining the baseURL with the requestedURL,
  519. * only when the requestedURL is not already an absolute URL.
  520. * If the requestURL is absolute, this function returns the requestedURL untouched.
  521. *
  522. * @param {string} baseURL The base URL
  523. * @param {string} requestedURL Absolute or relative URL to combine
  524. * @returns {string} The combined full path
  525. */
  526. module.exports = function buildFullPath(baseURL, requestedURL) {
  527. if (baseURL && !isAbsoluteURL(requestedURL)) {
  528. return combineURLs(baseURL, requestedURL);
  529. }
  530. return requestedURL;
  531. };
  532. /***/ }),
  533. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/createError.js":
  534. /*!************************************************************************************!*\
  535. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/createError.js ***!
  536. \************************************************************************************/
  537. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  538. "use strict";
  539. var enhanceError = __webpack_require__(/*! ./enhanceError */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/enhanceError.js");
  540. /**
  541. * Create an Error with the specified message, config, error code, request and response.
  542. *
  543. * @param {string} message The error message.
  544. * @param {Object} config The config.
  545. * @param {string} [code] The error code (for example, 'ECONNABORTED').
  546. * @param {Object} [request] The request.
  547. * @param {Object} [response] The response.
  548. * @returns {Error} The created error.
  549. */
  550. module.exports = function createError(message, config, code, request, response) {
  551. var error = new Error(message);
  552. return enhanceError(error, config, code, request, response);
  553. };
  554. /***/ }),
  555. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/dispatchRequest.js":
  556. /*!****************************************************************************************!*\
  557. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/dispatchRequest.js ***!
  558. \****************************************************************************************/
  559. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  560. "use strict";
  561. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/utils.js");
  562. var transformData = __webpack_require__(/*! ./transformData */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/transformData.js");
  563. var isCancel = __webpack_require__(/*! ../cancel/isCancel */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/cancel/isCancel.js");
  564. var defaults = __webpack_require__(/*! ../defaults */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/defaults.js");
  565. /**
  566. * Throws a `Cancel` if cancellation has been requested.
  567. */
  568. function throwIfCancellationRequested(config) {
  569. if (config.cancelToken) {
  570. config.cancelToken.throwIfRequested();
  571. }
  572. }
  573. /**
  574. * Dispatch a request to the server using the configured adapter.
  575. *
  576. * @param {object} config The config that is to be used for the request
  577. * @returns {Promise} The Promise to be fulfilled
  578. */
  579. module.exports = function dispatchRequest(config) {
  580. throwIfCancellationRequested(config);
  581. // Ensure headers exist
  582. config.headers = config.headers || {};
  583. // Transform request data
  584. config.data = transformData.call(
  585. config,
  586. config.data,
  587. config.headers,
  588. config.transformRequest
  589. );
  590. // Flatten headers
  591. config.headers = utils.merge(
  592. config.headers.common || {},
  593. config.headers[config.method] || {},
  594. config.headers
  595. );
  596. utils.forEach(
  597. ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
  598. function cleanHeaderConfig(method) {
  599. delete config.headers[method];
  600. }
  601. );
  602. var adapter = config.adapter || defaults.adapter;
  603. return adapter(config).then(function onAdapterResolution(response) {
  604. throwIfCancellationRequested(config);
  605. // Transform response data
  606. response.data = transformData.call(
  607. config,
  608. response.data,
  609. response.headers,
  610. config.transformResponse
  611. );
  612. return response;
  613. }, function onAdapterRejection(reason) {
  614. if (!isCancel(reason)) {
  615. throwIfCancellationRequested(config);
  616. // Transform response data
  617. if (reason && reason.response) {
  618. reason.response.data = transformData.call(
  619. config,
  620. reason.response.data,
  621. reason.response.headers,
  622. config.transformResponse
  623. );
  624. }
  625. }
  626. return Promise.reject(reason);
  627. });
  628. };
  629. /***/ }),
  630. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/enhanceError.js":
  631. /*!*************************************************************************************!*\
  632. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/enhanceError.js ***!
  633. \*************************************************************************************/
  634. /***/ ((module) => {
  635. "use strict";
  636. /**
  637. * Update an Error with the specified config, error code, and response.
  638. *
  639. * @param {Error} error The error to update.
  640. * @param {Object} config The config.
  641. * @param {string} [code] The error code (for example, 'ECONNABORTED').
  642. * @param {Object} [request] The request.
  643. * @param {Object} [response] The response.
  644. * @returns {Error} The error.
  645. */
  646. module.exports = function enhanceError(error, config, code, request, response) {
  647. error.config = config;
  648. if (code) {
  649. error.code = code;
  650. }
  651. error.request = request;
  652. error.response = response;
  653. error.isAxiosError = true;
  654. error.toJSON = function toJSON() {
  655. return {
  656. // Standard
  657. message: this.message,
  658. name: this.name,
  659. // Microsoft
  660. description: this.description,
  661. number: this.number,
  662. // Mozilla
  663. fileName: this.fileName,
  664. lineNumber: this.lineNumber,
  665. columnNumber: this.columnNumber,
  666. stack: this.stack,
  667. // Axios
  668. config: this.config,
  669. code: this.code
  670. };
  671. };
  672. return error;
  673. };
  674. /***/ }),
  675. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/mergeConfig.js":
  676. /*!************************************************************************************!*\
  677. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/mergeConfig.js ***!
  678. \************************************************************************************/
  679. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  680. "use strict";
  681. var utils = __webpack_require__(/*! ../utils */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/utils.js");
  682. /**
  683. * Config-specific merge-function which creates a new config-object
  684. * by merging two configuration objects together.
  685. *
  686. * @param {Object} config1
  687. * @param {Object} config2
  688. * @returns {Object} New object resulting from merging config2 to config1
  689. */
  690. module.exports = function mergeConfig(config1, config2) {
  691. // eslint-disable-next-line no-param-reassign
  692. config2 = config2 || {};
  693. var config = {};
  694. var valueFromConfig2Keys = ['url', 'method', 'data'];
  695. var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];
  696. var defaultToConfig2Keys = [
  697. 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',
  698. 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
  699. 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',
  700. 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',
  701. 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'
  702. ];
  703. var directMergeKeys = ['validateStatus'];
  704. function getMergedValue(target, source) {
  705. if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
  706. return utils.merge(target, source);
  707. } else if (utils.isPlainObject(source)) {
  708. return utils.merge({}, source);
  709. } else if (utils.isArray(source)) {
  710. return source.slice();
  711. }
  712. return source;
  713. }
  714. function mergeDeepProperties(prop) {
  715. if (!utils.isUndefined(config2[prop])) {
  716. config[prop] = getMergedValue(config1[prop], config2[prop]);
  717. } else if (!utils.isUndefined(config1[prop])) {
  718. config[prop] = getMergedValue(undefined, config1[prop]);
  719. }
  720. }
  721. utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
  722. if (!utils.isUndefined(config2[prop])) {
  723. config[prop] = getMergedValue(undefined, config2[prop]);
  724. }
  725. });
  726. utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
  727. utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
  728. if (!utils.isUndefined(config2[prop])) {
  729. config[prop] = getMergedValue(undefined, config2[prop]);
  730. } else if (!utils.isUndefined(config1[prop])) {
  731. config[prop] = getMergedValue(undefined, config1[prop]);
  732. }
  733. });
  734. utils.forEach(directMergeKeys, function merge(prop) {
  735. if (prop in config2) {
  736. config[prop] = getMergedValue(config1[prop], config2[prop]);
  737. } else if (prop in config1) {
  738. config[prop] = getMergedValue(undefined, config1[prop]);
  739. }
  740. });
  741. var axiosKeys = valueFromConfig2Keys
  742. .concat(mergeDeepPropertiesKeys)
  743. .concat(defaultToConfig2Keys)
  744. .concat(directMergeKeys);
  745. var otherKeys = Object
  746. .keys(config1)
  747. .concat(Object.keys(config2))
  748. .filter(function filterAxiosKeys(key) {
  749. return axiosKeys.indexOf(key) === -1;
  750. });
  751. utils.forEach(otherKeys, mergeDeepProperties);
  752. return config;
  753. };
  754. /***/ }),
  755. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/settle.js":
  756. /*!*******************************************************************************!*\
  757. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/settle.js ***!
  758. \*******************************************************************************/
  759. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  760. "use strict";
  761. var createError = __webpack_require__(/*! ./createError */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/createError.js");
  762. /**
  763. * Resolve or reject a Promise based on response status.
  764. *
  765. * @param {Function} resolve A function that resolves the promise.
  766. * @param {Function} reject A function that rejects the promise.
  767. * @param {object} response The response.
  768. */
  769. module.exports = function settle(resolve, reject, response) {
  770. var validateStatus = response.config.validateStatus;
  771. if (!response.status || !validateStatus || validateStatus(response.status)) {
  772. resolve(response);
  773. } else {
  774. reject(createError(
  775. 'Request failed with status code ' + response.status,
  776. response.config,
  777. null,
  778. response.request,
  779. response
  780. ));
  781. }
  782. };
  783. /***/ }),
  784. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/transformData.js":
  785. /*!**************************************************************************************!*\
  786. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/transformData.js ***!
  787. \**************************************************************************************/
  788. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  789. "use strict";
  790. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/utils.js");
  791. var defaults = __webpack_require__(/*! ./../defaults */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/defaults.js");
  792. /**
  793. * Transform the data for a request or a response
  794. *
  795. * @param {Object|String} data The data to be transformed
  796. * @param {Array} headers The headers for the request or response
  797. * @param {Array|Function} fns A single function or Array of functions
  798. * @returns {*} The resulting transformed data
  799. */
  800. module.exports = function transformData(data, headers, fns) {
  801. var context = this || defaults;
  802. /*eslint no-param-reassign:0*/
  803. utils.forEach(fns, function transform(fn) {
  804. data = fn.call(context, data, headers);
  805. });
  806. return data;
  807. };
  808. /***/ }),
  809. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/defaults.js":
  810. /*!****************************************************************************!*\
  811. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/defaults.js ***!
  812. \****************************************************************************/
  813. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  814. "use strict";
  815. /* provided dependency */ var process = __webpack_require__(/*! process/browser.js */ "./node_modules/process/browser.js");
  816. var utils = __webpack_require__(/*! ./utils */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/utils.js");
  817. var normalizeHeaderName = __webpack_require__(/*! ./helpers/normalizeHeaderName */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/normalizeHeaderName.js");
  818. var enhanceError = __webpack_require__(/*! ./core/enhanceError */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/enhanceError.js");
  819. var DEFAULT_CONTENT_TYPE = {
  820. 'Content-Type': 'application/x-www-form-urlencoded'
  821. };
  822. function setContentTypeIfUnset(headers, value) {
  823. if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
  824. headers['Content-Type'] = value;
  825. }
  826. }
  827. function getDefaultAdapter() {
  828. var adapter;
  829. if (typeof XMLHttpRequest !== 'undefined') {
  830. // For browsers use XHR adapter
  831. adapter = __webpack_require__(/*! ./adapters/xhr */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/adapters/xhr.js");
  832. } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
  833. // For node use HTTP adapter
  834. adapter = __webpack_require__(/*! ./adapters/http */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/adapters/xhr.js");
  835. }
  836. return adapter;
  837. }
  838. function stringifySafely(rawValue, parser, encoder) {
  839. if (utils.isString(rawValue)) {
  840. try {
  841. (parser || JSON.parse)(rawValue);
  842. return utils.trim(rawValue);
  843. } catch (e) {
  844. if (e.name !== 'SyntaxError') {
  845. throw e;
  846. }
  847. }
  848. }
  849. return (encoder || JSON.stringify)(rawValue);
  850. }
  851. var defaults = {
  852. transitional: {
  853. silentJSONParsing: true,
  854. forcedJSONParsing: true,
  855. clarifyTimeoutError: false
  856. },
  857. adapter: getDefaultAdapter(),
  858. transformRequest: [function transformRequest(data, headers) {
  859. normalizeHeaderName(headers, 'Accept');
  860. normalizeHeaderName(headers, 'Content-Type');
  861. if (utils.isFormData(data) ||
  862. utils.isArrayBuffer(data) ||
  863. utils.isBuffer(data) ||
  864. utils.isStream(data) ||
  865. utils.isFile(data) ||
  866. utils.isBlob(data)
  867. ) {
  868. return data;
  869. }
  870. if (utils.isArrayBufferView(data)) {
  871. return data.buffer;
  872. }
  873. if (utils.isURLSearchParams(data)) {
  874. setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
  875. return data.toString();
  876. }
  877. if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {
  878. setContentTypeIfUnset(headers, 'application/json');
  879. return stringifySafely(data);
  880. }
  881. return data;
  882. }],
  883. transformResponse: [function transformResponse(data) {
  884. var transitional = this.transitional;
  885. var silentJSONParsing = transitional && transitional.silentJSONParsing;
  886. var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
  887. var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';
  888. if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {
  889. try {
  890. return JSON.parse(data);
  891. } catch (e) {
  892. if (strictJSONParsing) {
  893. if (e.name === 'SyntaxError') {
  894. throw enhanceError(e, this, 'E_JSON_PARSE');
  895. }
  896. throw e;
  897. }
  898. }
  899. }
  900. return data;
  901. }],
  902. /**
  903. * A timeout in milliseconds to abort a request. If set to 0 (default) a
  904. * timeout is not created.
  905. */
  906. timeout: 0,
  907. xsrfCookieName: 'XSRF-TOKEN',
  908. xsrfHeaderName: 'X-XSRF-TOKEN',
  909. maxContentLength: -1,
  910. maxBodyLength: -1,
  911. validateStatus: function validateStatus(status) {
  912. return status >= 200 && status < 300;
  913. }
  914. };
  915. defaults.headers = {
  916. common: {
  917. 'Accept': 'application/json, text/plain, */*'
  918. }
  919. };
  920. utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
  921. defaults.headers[method] = {};
  922. });
  923. utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
  924. defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
  925. });
  926. module.exports = defaults;
  927. /***/ }),
  928. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/bind.js":
  929. /*!********************************************************************************!*\
  930. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/bind.js ***!
  931. \********************************************************************************/
  932. /***/ ((module) => {
  933. "use strict";
  934. module.exports = function bind(fn, thisArg) {
  935. return function wrap() {
  936. var args = new Array(arguments.length);
  937. for (var i = 0; i < args.length; i++) {
  938. args[i] = arguments[i];
  939. }
  940. return fn.apply(thisArg, args);
  941. };
  942. };
  943. /***/ }),
  944. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/buildURL.js":
  945. /*!************************************************************************************!*\
  946. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/buildURL.js ***!
  947. \************************************************************************************/
  948. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  949. "use strict";
  950. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/utils.js");
  951. function encode(val) {
  952. return encodeURIComponent(val).
  953. replace(/%3A/gi, ':').
  954. replace(/%24/g, '$').
  955. replace(/%2C/gi, ',').
  956. replace(/%20/g, '+').
  957. replace(/%5B/gi, '[').
  958. replace(/%5D/gi, ']');
  959. }
  960. /**
  961. * Build a URL by appending params to the end
  962. *
  963. * @param {string} url The base of the url (e.g., http://www.google.com)
  964. * @param {object} [params] The params to be appended
  965. * @returns {string} The formatted url
  966. */
  967. module.exports = function buildURL(url, params, paramsSerializer) {
  968. /*eslint no-param-reassign:0*/
  969. if (!params) {
  970. return url;
  971. }
  972. var serializedParams;
  973. if (paramsSerializer) {
  974. serializedParams = paramsSerializer(params);
  975. } else if (utils.isURLSearchParams(params)) {
  976. serializedParams = params.toString();
  977. } else {
  978. var parts = [];
  979. utils.forEach(params, function serialize(val, key) {
  980. if (val === null || typeof val === 'undefined') {
  981. return;
  982. }
  983. if (utils.isArray(val)) {
  984. key = key + '[]';
  985. } else {
  986. val = [val];
  987. }
  988. utils.forEach(val, function parseValue(v) {
  989. if (utils.isDate(v)) {
  990. v = v.toISOString();
  991. } else if (utils.isObject(v)) {
  992. v = JSON.stringify(v);
  993. }
  994. parts.push(encode(key) + '=' + encode(v));
  995. });
  996. });
  997. serializedParams = parts.join('&');
  998. }
  999. if (serializedParams) {
  1000. var hashmarkIndex = url.indexOf('#');
  1001. if (hashmarkIndex !== -1) {
  1002. url = url.slice(0, hashmarkIndex);
  1003. }
  1004. url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
  1005. }
  1006. return url;
  1007. };
  1008. /***/ }),
  1009. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/combineURLs.js":
  1010. /*!***************************************************************************************!*\
  1011. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/combineURLs.js ***!
  1012. \***************************************************************************************/
  1013. /***/ ((module) => {
  1014. "use strict";
  1015. /**
  1016. * Creates a new URL by combining the specified URLs
  1017. *
  1018. * @param {string} baseURL The base URL
  1019. * @param {string} relativeURL The relative URL
  1020. * @returns {string} The combined URL
  1021. */
  1022. module.exports = function combineURLs(baseURL, relativeURL) {
  1023. return relativeURL
  1024. ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
  1025. : baseURL;
  1026. };
  1027. /***/ }),
  1028. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/cookies.js":
  1029. /*!***********************************************************************************!*\
  1030. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/cookies.js ***!
  1031. \***********************************************************************************/
  1032. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  1033. "use strict";
  1034. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/utils.js");
  1035. module.exports = (
  1036. utils.isStandardBrowserEnv() ?
  1037. // Standard browser envs support document.cookie
  1038. (function standardBrowserEnv() {
  1039. return {
  1040. write: function write(name, value, expires, path, domain, secure) {
  1041. var cookie = [];
  1042. cookie.push(name + '=' + encodeURIComponent(value));
  1043. if (utils.isNumber(expires)) {
  1044. cookie.push('expires=' + new Date(expires).toGMTString());
  1045. }
  1046. if (utils.isString(path)) {
  1047. cookie.push('path=' + path);
  1048. }
  1049. if (utils.isString(domain)) {
  1050. cookie.push('domain=' + domain);
  1051. }
  1052. if (secure === true) {
  1053. cookie.push('secure');
  1054. }
  1055. document.cookie = cookie.join('; ');
  1056. },
  1057. read: function read(name) {
  1058. var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
  1059. return (match ? decodeURIComponent(match[3]) : null);
  1060. },
  1061. remove: function remove(name) {
  1062. this.write(name, '', Date.now() - 86400000);
  1063. }
  1064. };
  1065. })() :
  1066. // Non standard browser env (web workers, react-native) lack needed support.
  1067. (function nonStandardBrowserEnv() {
  1068. return {
  1069. write: function write() {},
  1070. read: function read() { return null; },
  1071. remove: function remove() {}
  1072. };
  1073. })()
  1074. );
  1075. /***/ }),
  1076. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/isAbsoluteURL.js":
  1077. /*!*****************************************************************************************!*\
  1078. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/isAbsoluteURL.js ***!
  1079. \*****************************************************************************************/
  1080. /***/ ((module) => {
  1081. "use strict";
  1082. /**
  1083. * Determines whether the specified URL is absolute
  1084. *
  1085. * @param {string} url The URL to test
  1086. * @returns {boolean} True if the specified URL is absolute, otherwise false
  1087. */
  1088. module.exports = function isAbsoluteURL(url) {
  1089. // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
  1090. // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
  1091. // by any combination of letters, digits, plus, period, or hyphen.
  1092. return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
  1093. };
  1094. /***/ }),
  1095. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/isAxiosError.js":
  1096. /*!****************************************************************************************!*\
  1097. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/isAxiosError.js ***!
  1098. \****************************************************************************************/
  1099. /***/ ((module) => {
  1100. "use strict";
  1101. /**
  1102. * Determines whether the payload is an error thrown by Axios
  1103. *
  1104. * @param {*} payload The value to test
  1105. * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
  1106. */
  1107. module.exports = function isAxiosError(payload) {
  1108. return (typeof payload === 'object') && (payload.isAxiosError === true);
  1109. };
  1110. /***/ }),
  1111. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/isURLSameOrigin.js":
  1112. /*!*******************************************************************************************!*\
  1113. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/isURLSameOrigin.js ***!
  1114. \*******************************************************************************************/
  1115. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  1116. "use strict";
  1117. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/utils.js");
  1118. module.exports = (
  1119. utils.isStandardBrowserEnv() ?
  1120. // Standard browser envs have full support of the APIs needed to test
  1121. // whether the request URL is of the same origin as current location.
  1122. (function standardBrowserEnv() {
  1123. var msie = /(msie|trident)/i.test(navigator.userAgent);
  1124. var urlParsingNode = document.createElement('a');
  1125. var originURL;
  1126. /**
  1127. * Parse a URL to discover it's components
  1128. *
  1129. * @param {String} url The URL to be parsed
  1130. * @returns {Object}
  1131. */
  1132. function resolveURL(url) {
  1133. var href = url;
  1134. if (msie) {
  1135. // IE needs attribute set twice to normalize properties
  1136. urlParsingNode.setAttribute('href', href);
  1137. href = urlParsingNode.href;
  1138. }
  1139. urlParsingNode.setAttribute('href', href);
  1140. // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
  1141. return {
  1142. href: urlParsingNode.href,
  1143. protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
  1144. host: urlParsingNode.host,
  1145. search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
  1146. hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
  1147. hostname: urlParsingNode.hostname,
  1148. port: urlParsingNode.port,
  1149. pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
  1150. urlParsingNode.pathname :
  1151. '/' + urlParsingNode.pathname
  1152. };
  1153. }
  1154. originURL = resolveURL(window.location.href);
  1155. /**
  1156. * Determine if a URL shares the same origin as the current location
  1157. *
  1158. * @param {String} requestURL The URL to test
  1159. * @returns {boolean} True if URL shares the same origin, otherwise false
  1160. */
  1161. return function isURLSameOrigin(requestURL) {
  1162. var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
  1163. return (parsed.protocol === originURL.protocol &&
  1164. parsed.host === originURL.host);
  1165. };
  1166. })() :
  1167. // Non standard browser envs (web workers, react-native) lack needed support.
  1168. (function nonStandardBrowserEnv() {
  1169. return function isURLSameOrigin() {
  1170. return true;
  1171. };
  1172. })()
  1173. );
  1174. /***/ }),
  1175. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/normalizeHeaderName.js":
  1176. /*!***********************************************************************************************!*\
  1177. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/normalizeHeaderName.js ***!
  1178. \***********************************************************************************************/
  1179. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  1180. "use strict";
  1181. var utils = __webpack_require__(/*! ../utils */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/utils.js");
  1182. module.exports = function normalizeHeaderName(headers, normalizedName) {
  1183. utils.forEach(headers, function processHeader(value, name) {
  1184. if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
  1185. headers[normalizedName] = value;
  1186. delete headers[name];
  1187. }
  1188. });
  1189. };
  1190. /***/ }),
  1191. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/parseHeaders.js":
  1192. /*!****************************************************************************************!*\
  1193. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/parseHeaders.js ***!
  1194. \****************************************************************************************/
  1195. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  1196. "use strict";
  1197. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/utils.js");
  1198. // Headers whose duplicates are ignored by node
  1199. // c.f. https://nodejs.org/api/http.html#http_message_headers
  1200. var ignoreDuplicateOf = [
  1201. 'age', 'authorization', 'content-length', 'content-type', 'etag',
  1202. 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
  1203. 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
  1204. 'referer', 'retry-after', 'user-agent'
  1205. ];
  1206. /**
  1207. * Parse headers into an object
  1208. *
  1209. * ```
  1210. * Date: Wed, 27 Aug 2014 08:58:49 GMT
  1211. * Content-Type: application/json
  1212. * Connection: keep-alive
  1213. * Transfer-Encoding: chunked
  1214. * ```
  1215. *
  1216. * @param {String} headers Headers needing to be parsed
  1217. * @returns {Object} Headers parsed into an object
  1218. */
  1219. module.exports = function parseHeaders(headers) {
  1220. var parsed = {};
  1221. var key;
  1222. var val;
  1223. var i;
  1224. if (!headers) { return parsed; }
  1225. utils.forEach(headers.split('\n'), function parser(line) {
  1226. i = line.indexOf(':');
  1227. key = utils.trim(line.substr(0, i)).toLowerCase();
  1228. val = utils.trim(line.substr(i + 1));
  1229. if (key) {
  1230. if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
  1231. return;
  1232. }
  1233. if (key === 'set-cookie') {
  1234. parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
  1235. } else {
  1236. parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
  1237. }
  1238. }
  1239. });
  1240. return parsed;
  1241. };
  1242. /***/ }),
  1243. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/spread.js":
  1244. /*!**********************************************************************************!*\
  1245. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/spread.js ***!
  1246. \**********************************************************************************/
  1247. /***/ ((module) => {
  1248. "use strict";
  1249. /**
  1250. * Syntactic sugar for invoking a function and expanding an array for arguments.
  1251. *
  1252. * Common use case would be to use `Function.prototype.apply`.
  1253. *
  1254. * ```js
  1255. * function f(x, y, z) {}
  1256. * var args = [1, 2, 3];
  1257. * f.apply(null, args);
  1258. * ```
  1259. *
  1260. * With `spread` this example can be re-written.
  1261. *
  1262. * ```js
  1263. * spread(function(x, y, z) {})([1, 2, 3]);
  1264. * ```
  1265. *
  1266. * @param {Function} callback
  1267. * @returns {Function}
  1268. */
  1269. module.exports = function spread(callback) {
  1270. return function wrap(arr) {
  1271. return callback.apply(null, arr);
  1272. };
  1273. };
  1274. /***/ }),
  1275. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/validator.js":
  1276. /*!*************************************************************************************!*\
  1277. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/validator.js ***!
  1278. \*************************************************************************************/
  1279. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  1280. "use strict";
  1281. var pkg = __webpack_require__(/*! ./../../package.json */ "./node_modules/@inertiajs/inertia/node_modules/axios/package.json");
  1282. var validators = {};
  1283. // eslint-disable-next-line func-names
  1284. ['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {
  1285. validators[type] = function validator(thing) {
  1286. return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
  1287. };
  1288. });
  1289. var deprecatedWarnings = {};
  1290. var currentVerArr = pkg.version.split('.');
  1291. /**
  1292. * Compare package versions
  1293. * @param {string} version
  1294. * @param {string?} thanVersion
  1295. * @returns {boolean}
  1296. */
  1297. function isOlderVersion(version, thanVersion) {
  1298. var pkgVersionArr = thanVersion ? thanVersion.split('.') : currentVerArr;
  1299. var destVer = version.split('.');
  1300. for (var i = 0; i < 3; i++) {
  1301. if (pkgVersionArr[i] > destVer[i]) {
  1302. return true;
  1303. } else if (pkgVersionArr[i] < destVer[i]) {
  1304. return false;
  1305. }
  1306. }
  1307. return false;
  1308. }
  1309. /**
  1310. * Transitional option validator
  1311. * @param {function|boolean?} validator
  1312. * @param {string?} version
  1313. * @param {string} message
  1314. * @returns {function}
  1315. */
  1316. validators.transitional = function transitional(validator, version, message) {
  1317. var isDeprecated = version && isOlderVersion(version);
  1318. function formatMessage(opt, desc) {
  1319. return '[Axios v' + pkg.version + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
  1320. }
  1321. // eslint-disable-next-line func-names
  1322. return function(value, opt, opts) {
  1323. if (validator === false) {
  1324. throw new Error(formatMessage(opt, ' has been removed in ' + version));
  1325. }
  1326. if (isDeprecated && !deprecatedWarnings[opt]) {
  1327. deprecatedWarnings[opt] = true;
  1328. // eslint-disable-next-line no-console
  1329. console.warn(
  1330. formatMessage(
  1331. opt,
  1332. ' has been deprecated since v' + version + ' and will be removed in the near future'
  1333. )
  1334. );
  1335. }
  1336. return validator ? validator(value, opt, opts) : true;
  1337. };
  1338. };
  1339. /**
  1340. * Assert object's properties type
  1341. * @param {object} options
  1342. * @param {object} schema
  1343. * @param {boolean?} allowUnknown
  1344. */
  1345. function assertOptions(options, schema, allowUnknown) {
  1346. if (typeof options !== 'object') {
  1347. throw new TypeError('options must be an object');
  1348. }
  1349. var keys = Object.keys(options);
  1350. var i = keys.length;
  1351. while (i-- > 0) {
  1352. var opt = keys[i];
  1353. var validator = schema[opt];
  1354. if (validator) {
  1355. var value = options[opt];
  1356. var result = value === undefined || validator(value, opt, options);
  1357. if (result !== true) {
  1358. throw new TypeError('option ' + opt + ' must be ' + result);
  1359. }
  1360. continue;
  1361. }
  1362. if (allowUnknown !== true) {
  1363. throw Error('Unknown option ' + opt);
  1364. }
  1365. }
  1366. }
  1367. module.exports = {
  1368. isOlderVersion: isOlderVersion,
  1369. assertOptions: assertOptions,
  1370. validators: validators
  1371. };
  1372. /***/ }),
  1373. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/utils.js":
  1374. /*!*************************************************************************!*\
  1375. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/utils.js ***!
  1376. \*************************************************************************/
  1377. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  1378. "use strict";
  1379. var bind = __webpack_require__(/*! ./helpers/bind */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/bind.js");
  1380. // utils is a library of generic helper functions non-specific to axios
  1381. var toString = Object.prototype.toString;
  1382. /**
  1383. * Determine if a value is an Array
  1384. *
  1385. * @param {Object} val The value to test
  1386. * @returns {boolean} True if value is an Array, otherwise false
  1387. */
  1388. function isArray(val) {
  1389. return toString.call(val) === '[object Array]';
  1390. }
  1391. /**
  1392. * Determine if a value is undefined
  1393. *
  1394. * @param {Object} val The value to test
  1395. * @returns {boolean} True if the value is undefined, otherwise false
  1396. */
  1397. function isUndefined(val) {
  1398. return typeof val === 'undefined';
  1399. }
  1400. /**
  1401. * Determine if a value is a Buffer
  1402. *
  1403. * @param {Object} val The value to test
  1404. * @returns {boolean} True if value is a Buffer, otherwise false
  1405. */
  1406. function isBuffer(val) {
  1407. return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
  1408. && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
  1409. }
  1410. /**
  1411. * Determine if a value is an ArrayBuffer
  1412. *
  1413. * @param {Object} val The value to test
  1414. * @returns {boolean} True if value is an ArrayBuffer, otherwise false
  1415. */
  1416. function isArrayBuffer(val) {
  1417. return toString.call(val) === '[object ArrayBuffer]';
  1418. }
  1419. /**
  1420. * Determine if a value is a FormData
  1421. *
  1422. * @param {Object} val The value to test
  1423. * @returns {boolean} True if value is an FormData, otherwise false
  1424. */
  1425. function isFormData(val) {
  1426. return (typeof FormData !== 'undefined') && (val instanceof FormData);
  1427. }
  1428. /**
  1429. * Determine if a value is a view on an ArrayBuffer
  1430. *
  1431. * @param {Object} val The value to test
  1432. * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
  1433. */
  1434. function isArrayBufferView(val) {
  1435. var result;
  1436. if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
  1437. result = ArrayBuffer.isView(val);
  1438. } else {
  1439. result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
  1440. }
  1441. return result;
  1442. }
  1443. /**
  1444. * Determine if a value is a String
  1445. *
  1446. * @param {Object} val The value to test
  1447. * @returns {boolean} True if value is a String, otherwise false
  1448. */
  1449. function isString(val) {
  1450. return typeof val === 'string';
  1451. }
  1452. /**
  1453. * Determine if a value is a Number
  1454. *
  1455. * @param {Object} val The value to test
  1456. * @returns {boolean} True if value is a Number, otherwise false
  1457. */
  1458. function isNumber(val) {
  1459. return typeof val === 'number';
  1460. }
  1461. /**
  1462. * Determine if a value is an Object
  1463. *
  1464. * @param {Object} val The value to test
  1465. * @returns {boolean} True if value is an Object, otherwise false
  1466. */
  1467. function isObject(val) {
  1468. return val !== null && typeof val === 'object';
  1469. }
  1470. /**
  1471. * Determine if a value is a plain Object
  1472. *
  1473. * @param {Object} val The value to test
  1474. * @return {boolean} True if value is a plain Object, otherwise false
  1475. */
  1476. function isPlainObject(val) {
  1477. if (toString.call(val) !== '[object Object]') {
  1478. return false;
  1479. }
  1480. var prototype = Object.getPrototypeOf(val);
  1481. return prototype === null || prototype === Object.prototype;
  1482. }
  1483. /**
  1484. * Determine if a value is a Date
  1485. *
  1486. * @param {Object} val The value to test
  1487. * @returns {boolean} True if value is a Date, otherwise false
  1488. */
  1489. function isDate(val) {
  1490. return toString.call(val) === '[object Date]';
  1491. }
  1492. /**
  1493. * Determine if a value is a File
  1494. *
  1495. * @param {Object} val The value to test
  1496. * @returns {boolean} True if value is a File, otherwise false
  1497. */
  1498. function isFile(val) {
  1499. return toString.call(val) === '[object File]';
  1500. }
  1501. /**
  1502. * Determine if a value is a Blob
  1503. *
  1504. * @param {Object} val The value to test
  1505. * @returns {boolean} True if value is a Blob, otherwise false
  1506. */
  1507. function isBlob(val) {
  1508. return toString.call(val) === '[object Blob]';
  1509. }
  1510. /**
  1511. * Determine if a value is a Function
  1512. *
  1513. * @param {Object} val The value to test
  1514. * @returns {boolean} True if value is a Function, otherwise false
  1515. */
  1516. function isFunction(val) {
  1517. return toString.call(val) === '[object Function]';
  1518. }
  1519. /**
  1520. * Determine if a value is a Stream
  1521. *
  1522. * @param {Object} val The value to test
  1523. * @returns {boolean} True if value is a Stream, otherwise false
  1524. */
  1525. function isStream(val) {
  1526. return isObject(val) && isFunction(val.pipe);
  1527. }
  1528. /**
  1529. * Determine if a value is a URLSearchParams object
  1530. *
  1531. * @param {Object} val The value to test
  1532. * @returns {boolean} True if value is a URLSearchParams object, otherwise false
  1533. */
  1534. function isURLSearchParams(val) {
  1535. return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
  1536. }
  1537. /**
  1538. * Trim excess whitespace off the beginning and end of a string
  1539. *
  1540. * @param {String} str The String to trim
  1541. * @returns {String} The String freed of excess whitespace
  1542. */
  1543. function trim(str) {
  1544. return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, '');
  1545. }
  1546. /**
  1547. * Determine if we're running in a standard browser environment
  1548. *
  1549. * This allows axios to run in a web worker, and react-native.
  1550. * Both environments support XMLHttpRequest, but not fully standard globals.
  1551. *
  1552. * web workers:
  1553. * typeof window -> undefined
  1554. * typeof document -> undefined
  1555. *
  1556. * react-native:
  1557. * navigator.product -> 'ReactNative'
  1558. * nativescript
  1559. * navigator.product -> 'NativeScript' or 'NS'
  1560. */
  1561. function isStandardBrowserEnv() {
  1562. if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
  1563. navigator.product === 'NativeScript' ||
  1564. navigator.product === 'NS')) {
  1565. return false;
  1566. }
  1567. return (
  1568. typeof window !== 'undefined' &&
  1569. typeof document !== 'undefined'
  1570. );
  1571. }
  1572. /**
  1573. * Iterate over an Array or an Object invoking a function for each item.
  1574. *
  1575. * If `obj` is an Array callback will be called passing
  1576. * the value, index, and complete array for each item.
  1577. *
  1578. * If 'obj' is an Object callback will be called passing
  1579. * the value, key, and complete object for each property.
  1580. *
  1581. * @param {Object|Array} obj The object to iterate
  1582. * @param {Function} fn The callback to invoke for each item
  1583. */
  1584. function forEach(obj, fn) {
  1585. // Don't bother if no value provided
  1586. if (obj === null || typeof obj === 'undefined') {
  1587. return;
  1588. }
  1589. // Force an array if not already something iterable
  1590. if (typeof obj !== 'object') {
  1591. /*eslint no-param-reassign:0*/
  1592. obj = [obj];
  1593. }
  1594. if (isArray(obj)) {
  1595. // Iterate over array values
  1596. for (var i = 0, l = obj.length; i < l; i++) {
  1597. fn.call(null, obj[i], i, obj);
  1598. }
  1599. } else {
  1600. // Iterate over object keys
  1601. for (var key in obj) {
  1602. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  1603. fn.call(null, obj[key], key, obj);
  1604. }
  1605. }
  1606. }
  1607. }
  1608. /**
  1609. * Accepts varargs expecting each argument to be an object, then
  1610. * immutably merges the properties of each object and returns result.
  1611. *
  1612. * When multiple objects contain the same key the later object in
  1613. * the arguments list will take precedence.
  1614. *
  1615. * Example:
  1616. *
  1617. * ```js
  1618. * var result = merge({foo: 123}, {foo: 456});
  1619. * console.log(result.foo); // outputs 456
  1620. * ```
  1621. *
  1622. * @param {Object} obj1 Object to merge
  1623. * @returns {Object} Result of all merge properties
  1624. */
  1625. function merge(/* obj1, obj2, obj3, ... */) {
  1626. var result = {};
  1627. function assignValue(val, key) {
  1628. if (isPlainObject(result[key]) && isPlainObject(val)) {
  1629. result[key] = merge(result[key], val);
  1630. } else if (isPlainObject(val)) {
  1631. result[key] = merge({}, val);
  1632. } else if (isArray(val)) {
  1633. result[key] = val.slice();
  1634. } else {
  1635. result[key] = val;
  1636. }
  1637. }
  1638. for (var i = 0, l = arguments.length; i < l; i++) {
  1639. forEach(arguments[i], assignValue);
  1640. }
  1641. return result;
  1642. }
  1643. /**
  1644. * Extends object a by mutably adding to it the properties of object b.
  1645. *
  1646. * @param {Object} a The object to be extended
  1647. * @param {Object} b The object to copy properties from
  1648. * @param {Object} thisArg The object to bind function to
  1649. * @return {Object} The resulting value of object a
  1650. */
  1651. function extend(a, b, thisArg) {
  1652. forEach(b, function assignValue(val, key) {
  1653. if (thisArg && typeof val === 'function') {
  1654. a[key] = bind(val, thisArg);
  1655. } else {
  1656. a[key] = val;
  1657. }
  1658. });
  1659. return a;
  1660. }
  1661. /**
  1662. * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
  1663. *
  1664. * @param {string} content with BOM
  1665. * @return {string} content value without BOM
  1666. */
  1667. function stripBOM(content) {
  1668. if (content.charCodeAt(0) === 0xFEFF) {
  1669. content = content.slice(1);
  1670. }
  1671. return content;
  1672. }
  1673. module.exports = {
  1674. isArray: isArray,
  1675. isArrayBuffer: isArrayBuffer,
  1676. isBuffer: isBuffer,
  1677. isFormData: isFormData,
  1678. isArrayBufferView: isArrayBufferView,
  1679. isString: isString,
  1680. isNumber: isNumber,
  1681. isObject: isObject,
  1682. isPlainObject: isPlainObject,
  1683. isUndefined: isUndefined,
  1684. isDate: isDate,
  1685. isFile: isFile,
  1686. isBlob: isBlob,
  1687. isFunction: isFunction,
  1688. isStream: isStream,
  1689. isURLSearchParams: isURLSearchParams,
  1690. isStandardBrowserEnv: isStandardBrowserEnv,
  1691. forEach: forEach,
  1692. merge: merge,
  1693. extend: extend,
  1694. trim: trim,
  1695. stripBOM: stripBOM
  1696. };
  1697. /***/ }),
  1698. /***/ "./node_modules/@inertiajs/inertia/node_modules/qs/lib/formats.js":
  1699. /*!************************************************************************!*\
  1700. !*** ./node_modules/@inertiajs/inertia/node_modules/qs/lib/formats.js ***!
  1701. \************************************************************************/
  1702. /***/ ((module) => {
  1703. "use strict";
  1704. var replace = String.prototype.replace;
  1705. var percentTwenties = /%20/g;
  1706. var Format = {
  1707. RFC1738: 'RFC1738',
  1708. RFC3986: 'RFC3986'
  1709. };
  1710. module.exports = {
  1711. 'default': Format.RFC3986,
  1712. formatters: {
  1713. RFC1738: function (value) {
  1714. return replace.call(value, percentTwenties, '+');
  1715. },
  1716. RFC3986: function (value) {
  1717. return String(value);
  1718. }
  1719. },
  1720. RFC1738: Format.RFC1738,
  1721. RFC3986: Format.RFC3986
  1722. };
  1723. /***/ }),
  1724. /***/ "./node_modules/@inertiajs/inertia/node_modules/qs/lib/index.js":
  1725. /*!**********************************************************************!*\
  1726. !*** ./node_modules/@inertiajs/inertia/node_modules/qs/lib/index.js ***!
  1727. \**********************************************************************/
  1728. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  1729. "use strict";
  1730. var stringify = __webpack_require__(/*! ./stringify */ "./node_modules/@inertiajs/inertia/node_modules/qs/lib/stringify.js");
  1731. var parse = __webpack_require__(/*! ./parse */ "./node_modules/@inertiajs/inertia/node_modules/qs/lib/parse.js");
  1732. var formats = __webpack_require__(/*! ./formats */ "./node_modules/@inertiajs/inertia/node_modules/qs/lib/formats.js");
  1733. module.exports = {
  1734. formats: formats,
  1735. parse: parse,
  1736. stringify: stringify
  1737. };
  1738. /***/ }),
  1739. /***/ "./node_modules/@inertiajs/inertia/node_modules/qs/lib/parse.js":
  1740. /*!**********************************************************************!*\
  1741. !*** ./node_modules/@inertiajs/inertia/node_modules/qs/lib/parse.js ***!
  1742. \**********************************************************************/
  1743. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  1744. "use strict";
  1745. var utils = __webpack_require__(/*! ./utils */ "./node_modules/@inertiajs/inertia/node_modules/qs/lib/utils.js");
  1746. var has = Object.prototype.hasOwnProperty;
  1747. var isArray = Array.isArray;
  1748. var defaults = {
  1749. allowDots: false,
  1750. allowPrototypes: false,
  1751. allowSparse: false,
  1752. arrayLimit: 20,
  1753. charset: 'utf-8',
  1754. charsetSentinel: false,
  1755. comma: false,
  1756. decoder: utils.decode,
  1757. delimiter: '&',
  1758. depth: 5,
  1759. ignoreQueryPrefix: false,
  1760. interpretNumericEntities: false,
  1761. parameterLimit: 1000,
  1762. parseArrays: true,
  1763. plainObjects: false,
  1764. strictNullHandling: false
  1765. };
  1766. var interpretNumericEntities = function (str) {
  1767. return str.replace(/&#(\d+);/g, function ($0, numberStr) {
  1768. return String.fromCharCode(parseInt(numberStr, 10));
  1769. });
  1770. };
  1771. var parseArrayValue = function (val, options) {
  1772. if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
  1773. return val.split(',');
  1774. }
  1775. return val;
  1776. };
  1777. // This is what browsers will submit when the ✓ character occurs in an
  1778. // application/x-www-form-urlencoded body and the encoding of the page containing
  1779. // the form is iso-8859-1, or when the submitted form has an accept-charset
  1780. // attribute of iso-8859-1. Presumably also with other charsets that do not contain
  1781. // the ✓ character, such as us-ascii.
  1782. var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('&#10003;')
  1783. // These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
  1784. var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
  1785. var parseValues = function parseQueryStringValues(str, options) {
  1786. var obj = {};
  1787. var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
  1788. var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
  1789. var parts = cleanStr.split(options.delimiter, limit);
  1790. var skipIndex = -1; // Keep track of where the utf8 sentinel was found
  1791. var i;
  1792. var charset = options.charset;
  1793. if (options.charsetSentinel) {
  1794. for (i = 0; i < parts.length; ++i) {
  1795. if (parts[i].indexOf('utf8=') === 0) {
  1796. if (parts[i] === charsetSentinel) {
  1797. charset = 'utf-8';
  1798. } else if (parts[i] === isoSentinel) {
  1799. charset = 'iso-8859-1';
  1800. }
  1801. skipIndex = i;
  1802. i = parts.length; // The eslint settings do not allow break;
  1803. }
  1804. }
  1805. }
  1806. for (i = 0; i < parts.length; ++i) {
  1807. if (i === skipIndex) {
  1808. continue;
  1809. }
  1810. var part = parts[i];
  1811. var bracketEqualsPos = part.indexOf(']=');
  1812. var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
  1813. var key, val;
  1814. if (pos === -1) {
  1815. key = options.decoder(part, defaults.decoder, charset, 'key');
  1816. val = options.strictNullHandling ? null : '';
  1817. } else {
  1818. key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
  1819. val = utils.maybeMap(
  1820. parseArrayValue(part.slice(pos + 1), options),
  1821. function (encodedVal) {
  1822. return options.decoder(encodedVal, defaults.decoder, charset, 'value');
  1823. }
  1824. );
  1825. }
  1826. if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
  1827. val = interpretNumericEntities(val);
  1828. }
  1829. if (part.indexOf('[]=') > -1) {
  1830. val = isArray(val) ? [val] : val;
  1831. }
  1832. if (has.call(obj, key)) {
  1833. obj[key] = utils.combine(obj[key], val);
  1834. } else {
  1835. obj[key] = val;
  1836. }
  1837. }
  1838. return obj;
  1839. };
  1840. var parseObject = function (chain, val, options, valuesParsed) {
  1841. var leaf = valuesParsed ? val : parseArrayValue(val, options);
  1842. for (var i = chain.length - 1; i >= 0; --i) {
  1843. var obj;
  1844. var root = chain[i];
  1845. if (root === '[]' && options.parseArrays) {
  1846. obj = [].concat(leaf);
  1847. } else {
  1848. obj = options.plainObjects ? Object.create(null) : {};
  1849. var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
  1850. var index = parseInt(cleanRoot, 10);
  1851. if (!options.parseArrays && cleanRoot === '') {
  1852. obj = { 0: leaf };
  1853. } else if (
  1854. !isNaN(index)
  1855. && root !== cleanRoot
  1856. && String(index) === cleanRoot
  1857. && index >= 0
  1858. && (options.parseArrays && index <= options.arrayLimit)
  1859. ) {
  1860. obj = [];
  1861. obj[index] = leaf;
  1862. } else if (cleanRoot !== '__proto__') {
  1863. obj[cleanRoot] = leaf;
  1864. }
  1865. }
  1866. leaf = obj;
  1867. }
  1868. return leaf;
  1869. };
  1870. var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
  1871. if (!givenKey) {
  1872. return;
  1873. }
  1874. // Transform dot notation to bracket notation
  1875. var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
  1876. // The regex chunks
  1877. var brackets = /(\[[^[\]]*])/;
  1878. var child = /(\[[^[\]]*])/g;
  1879. // Get the parent
  1880. var segment = options.depth > 0 && brackets.exec(key);
  1881. var parent = segment ? key.slice(0, segment.index) : key;
  1882. // Stash the parent if it exists
  1883. var keys = [];
  1884. if (parent) {
  1885. // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
  1886. if (!options.plainObjects && has.call(Object.prototype, parent)) {
  1887. if (!options.allowPrototypes) {
  1888. return;
  1889. }
  1890. }
  1891. keys.push(parent);
  1892. }
  1893. // Loop through children appending to the array until we hit depth
  1894. var i = 0;
  1895. while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
  1896. i += 1;
  1897. if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
  1898. if (!options.allowPrototypes) {
  1899. return;
  1900. }
  1901. }
  1902. keys.push(segment[1]);
  1903. }
  1904. // If there's a remainder, just add whatever is left
  1905. if (segment) {
  1906. keys.push('[' + key.slice(segment.index) + ']');
  1907. }
  1908. return parseObject(keys, val, options, valuesParsed);
  1909. };
  1910. var normalizeParseOptions = function normalizeParseOptions(opts) {
  1911. if (!opts) {
  1912. return defaults;
  1913. }
  1914. if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {
  1915. throw new TypeError('Decoder has to be a function.');
  1916. }
  1917. if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
  1918. throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
  1919. }
  1920. var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
  1921. return {
  1922. allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
  1923. allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
  1924. allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,
  1925. arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
  1926. charset: charset,
  1927. charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
  1928. comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
  1929. decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
  1930. delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
  1931. // eslint-disable-next-line no-implicit-coercion, no-extra-parens
  1932. depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
  1933. ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
  1934. interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
  1935. parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
  1936. parseArrays: opts.parseArrays !== false,
  1937. plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
  1938. strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
  1939. };
  1940. };
  1941. module.exports = function (str, opts) {
  1942. var options = normalizeParseOptions(opts);
  1943. if (str === '' || str === null || typeof str === 'undefined') {
  1944. return options.plainObjects ? Object.create(null) : {};
  1945. }
  1946. var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
  1947. var obj = options.plainObjects ? Object.create(null) : {};
  1948. // Iterate over the keys and setup the new object
  1949. var keys = Object.keys(tempObj);
  1950. for (var i = 0; i < keys.length; ++i) {
  1951. var key = keys[i];
  1952. var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
  1953. obj = utils.merge(obj, newObj, options);
  1954. }
  1955. if (options.allowSparse === true) {
  1956. return obj;
  1957. }
  1958. return utils.compact(obj);
  1959. };
  1960. /***/ }),
  1961. /***/ "./node_modules/@inertiajs/inertia/node_modules/qs/lib/stringify.js":
  1962. /*!**************************************************************************!*\
  1963. !*** ./node_modules/@inertiajs/inertia/node_modules/qs/lib/stringify.js ***!
  1964. \**************************************************************************/
  1965. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  1966. "use strict";
  1967. var getSideChannel = __webpack_require__(/*! side-channel */ "./node_modules/side-channel/index.js");
  1968. var utils = __webpack_require__(/*! ./utils */ "./node_modules/@inertiajs/inertia/node_modules/qs/lib/utils.js");
  1969. var formats = __webpack_require__(/*! ./formats */ "./node_modules/@inertiajs/inertia/node_modules/qs/lib/formats.js");
  1970. var has = Object.prototype.hasOwnProperty;
  1971. var arrayPrefixGenerators = {
  1972. brackets: function brackets(prefix) {
  1973. return prefix + '[]';
  1974. },
  1975. comma: 'comma',
  1976. indices: function indices(prefix, key) {
  1977. return prefix + '[' + key + ']';
  1978. },
  1979. repeat: function repeat(prefix) {
  1980. return prefix;
  1981. }
  1982. };
  1983. var isArray = Array.isArray;
  1984. var split = String.prototype.split;
  1985. var push = Array.prototype.push;
  1986. var pushToArray = function (arr, valueOrArray) {
  1987. push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);
  1988. };
  1989. var toISO = Date.prototype.toISOString;
  1990. var defaultFormat = formats['default'];
  1991. var defaults = {
  1992. addQueryPrefix: false,
  1993. allowDots: false,
  1994. charset: 'utf-8',
  1995. charsetSentinel: false,
  1996. delimiter: '&',
  1997. encode: true,
  1998. encoder: utils.encode,
  1999. encodeValuesOnly: false,
  2000. format: defaultFormat,
  2001. formatter: formats.formatters[defaultFormat],
  2002. // deprecated
  2003. indices: false,
  2004. serializeDate: function serializeDate(date) {
  2005. return toISO.call(date);
  2006. },
  2007. skipNulls: false,
  2008. strictNullHandling: false
  2009. };
  2010. var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
  2011. return typeof v === 'string'
  2012. || typeof v === 'number'
  2013. || typeof v === 'boolean'
  2014. || typeof v === 'symbol'
  2015. || typeof v === 'bigint';
  2016. };
  2017. var sentinel = {};
  2018. var stringify = function stringify(
  2019. object,
  2020. prefix,
  2021. generateArrayPrefix,
  2022. strictNullHandling,
  2023. skipNulls,
  2024. encoder,
  2025. filter,
  2026. sort,
  2027. allowDots,
  2028. serializeDate,
  2029. format,
  2030. formatter,
  2031. encodeValuesOnly,
  2032. charset,
  2033. sideChannel
  2034. ) {
  2035. var obj = object;
  2036. var tmpSc = sideChannel;
  2037. var step = 0;
  2038. var findFlag = false;
  2039. while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {
  2040. // Where object last appeared in the ref tree
  2041. var pos = tmpSc.get(object);
  2042. step += 1;
  2043. if (typeof pos !== 'undefined') {
  2044. if (pos === step) {
  2045. throw new RangeError('Cyclic object value');
  2046. } else {
  2047. findFlag = true; // Break while
  2048. }
  2049. }
  2050. if (typeof tmpSc.get(sentinel) === 'undefined') {
  2051. step = 0;
  2052. }
  2053. }
  2054. if (typeof filter === 'function') {
  2055. obj = filter(prefix, obj);
  2056. } else if (obj instanceof Date) {
  2057. obj = serializeDate(obj);
  2058. } else if (generateArrayPrefix === 'comma' && isArray(obj)) {
  2059. obj = utils.maybeMap(obj, function (value) {
  2060. if (value instanceof Date) {
  2061. return serializeDate(value);
  2062. }
  2063. return value;
  2064. });
  2065. }
  2066. if (obj === null) {
  2067. if (strictNullHandling) {
  2068. return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix;
  2069. }
  2070. obj = '';
  2071. }
  2072. if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
  2073. if (encoder) {
  2074. var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format);
  2075. if (generateArrayPrefix === 'comma' && encodeValuesOnly) {
  2076. var valuesArray = split.call(String(obj), ',');
  2077. var valuesJoined = '';
  2078. for (var i = 0; i < valuesArray.length; ++i) {
  2079. valuesJoined += (i === 0 ? '' : ',') + formatter(encoder(valuesArray[i], defaults.encoder, charset, 'value', format));
  2080. }
  2081. return [formatter(keyValue) + '=' + valuesJoined];
  2082. }
  2083. return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];
  2084. }
  2085. return [formatter(prefix) + '=' + formatter(String(obj))];
  2086. }
  2087. var values = [];
  2088. if (typeof obj === 'undefined') {
  2089. return values;
  2090. }
  2091. var objKeys;
  2092. if (generateArrayPrefix === 'comma' && isArray(obj)) {
  2093. // we need to join elements in
  2094. objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
  2095. } else if (isArray(filter)) {
  2096. objKeys = filter;
  2097. } else {
  2098. var keys = Object.keys(obj);
  2099. objKeys = sort ? keys.sort(sort) : keys;
  2100. }
  2101. for (var j = 0; j < objKeys.length; ++j) {
  2102. var key = objKeys[j];
  2103. var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
  2104. if (skipNulls && value === null) {
  2105. continue;
  2106. }
  2107. var keyPrefix = isArray(obj)
  2108. ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(prefix, key) : prefix
  2109. : prefix + (allowDots ? '.' + key : '[' + key + ']');
  2110. sideChannel.set(object, step);
  2111. var valueSideChannel = getSideChannel();
  2112. valueSideChannel.set(sentinel, sideChannel);
  2113. pushToArray(values, stringify(
  2114. value,
  2115. keyPrefix,
  2116. generateArrayPrefix,
  2117. strictNullHandling,
  2118. skipNulls,
  2119. encoder,
  2120. filter,
  2121. sort,
  2122. allowDots,
  2123. serializeDate,
  2124. format,
  2125. formatter,
  2126. encodeValuesOnly,
  2127. charset,
  2128. valueSideChannel
  2129. ));
  2130. }
  2131. return values;
  2132. };
  2133. var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
  2134. if (!opts) {
  2135. return defaults;
  2136. }
  2137. if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {
  2138. throw new TypeError('Encoder has to be a function.');
  2139. }
  2140. var charset = opts.charset || defaults.charset;
  2141. if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
  2142. throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
  2143. }
  2144. var format = formats['default'];
  2145. if (typeof opts.format !== 'undefined') {
  2146. if (!has.call(formats.formatters, opts.format)) {
  2147. throw new TypeError('Unknown format option provided.');
  2148. }
  2149. format = opts.format;
  2150. }
  2151. var formatter = formats.formatters[format];
  2152. var filter = defaults.filter;
  2153. if (typeof opts.filter === 'function' || isArray(opts.filter)) {
  2154. filter = opts.filter;
  2155. }
  2156. return {
  2157. addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,
  2158. allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
  2159. charset: charset,
  2160. charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
  2161. delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,
  2162. encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,
  2163. encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,
  2164. encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
  2165. filter: filter,
  2166. format: format,
  2167. formatter: formatter,
  2168. serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,
  2169. skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,
  2170. sort: typeof opts.sort === 'function' ? opts.sort : null,
  2171. strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
  2172. };
  2173. };
  2174. module.exports = function (object, opts) {
  2175. var obj = object;
  2176. var options = normalizeStringifyOptions(opts);
  2177. var objKeys;
  2178. var filter;
  2179. if (typeof options.filter === 'function') {
  2180. filter = options.filter;
  2181. obj = filter('', obj);
  2182. } else if (isArray(options.filter)) {
  2183. filter = options.filter;
  2184. objKeys = filter;
  2185. }
  2186. var keys = [];
  2187. if (typeof obj !== 'object' || obj === null) {
  2188. return '';
  2189. }
  2190. var arrayFormat;
  2191. if (opts && opts.arrayFormat in arrayPrefixGenerators) {
  2192. arrayFormat = opts.arrayFormat;
  2193. } else if (opts && 'indices' in opts) {
  2194. arrayFormat = opts.indices ? 'indices' : 'repeat';
  2195. } else {
  2196. arrayFormat = 'indices';
  2197. }
  2198. var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
  2199. if (!objKeys) {
  2200. objKeys = Object.keys(obj);
  2201. }
  2202. if (options.sort) {
  2203. objKeys.sort(options.sort);
  2204. }
  2205. var sideChannel = getSideChannel();
  2206. for (var i = 0; i < objKeys.length; ++i) {
  2207. var key = objKeys[i];
  2208. if (options.skipNulls && obj[key] === null) {
  2209. continue;
  2210. }
  2211. pushToArray(keys, stringify(
  2212. obj[key],
  2213. key,
  2214. generateArrayPrefix,
  2215. options.strictNullHandling,
  2216. options.skipNulls,
  2217. options.encode ? options.encoder : null,
  2218. options.filter,
  2219. options.sort,
  2220. options.allowDots,
  2221. options.serializeDate,
  2222. options.format,
  2223. options.formatter,
  2224. options.encodeValuesOnly,
  2225. options.charset,
  2226. sideChannel
  2227. ));
  2228. }
  2229. var joined = keys.join(options.delimiter);
  2230. var prefix = options.addQueryPrefix === true ? '?' : '';
  2231. if (options.charsetSentinel) {
  2232. if (options.charset === 'iso-8859-1') {
  2233. // encodeURIComponent('&#10003;'), the "numeric entity" representation of a checkmark
  2234. prefix += 'utf8=%26%2310003%3B&';
  2235. } else {
  2236. // encodeURIComponent('✓')
  2237. prefix += 'utf8=%E2%9C%93&';
  2238. }
  2239. }
  2240. return joined.length > 0 ? prefix + joined : '';
  2241. };
  2242. /***/ }),
  2243. /***/ "./node_modules/@inertiajs/inertia/node_modules/qs/lib/utils.js":
  2244. /*!**********************************************************************!*\
  2245. !*** ./node_modules/@inertiajs/inertia/node_modules/qs/lib/utils.js ***!
  2246. \**********************************************************************/
  2247. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  2248. "use strict";
  2249. var formats = __webpack_require__(/*! ./formats */ "./node_modules/@inertiajs/inertia/node_modules/qs/lib/formats.js");
  2250. var has = Object.prototype.hasOwnProperty;
  2251. var isArray = Array.isArray;
  2252. var hexTable = (function () {
  2253. var array = [];
  2254. for (var i = 0; i < 256; ++i) {
  2255. array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
  2256. }
  2257. return array;
  2258. }());
  2259. var compactQueue = function compactQueue(queue) {
  2260. while (queue.length > 1) {
  2261. var item = queue.pop();
  2262. var obj = item.obj[item.prop];
  2263. if (isArray(obj)) {
  2264. var compacted = [];
  2265. for (var j = 0; j < obj.length; ++j) {
  2266. if (typeof obj[j] !== 'undefined') {
  2267. compacted.push(obj[j]);
  2268. }
  2269. }
  2270. item.obj[item.prop] = compacted;
  2271. }
  2272. }
  2273. };
  2274. var arrayToObject = function arrayToObject(source, options) {
  2275. var obj = options && options.plainObjects ? Object.create(null) : {};
  2276. for (var i = 0; i < source.length; ++i) {
  2277. if (typeof source[i] !== 'undefined') {
  2278. obj[i] = source[i];
  2279. }
  2280. }
  2281. return obj;
  2282. };
  2283. var merge = function merge(target, source, options) {
  2284. /* eslint no-param-reassign: 0 */
  2285. if (!source) {
  2286. return target;
  2287. }
  2288. if (typeof source !== 'object') {
  2289. if (isArray(target)) {
  2290. target.push(source);
  2291. } else if (target && typeof target === 'object') {
  2292. if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {
  2293. target[source] = true;
  2294. }
  2295. } else {
  2296. return [target, source];
  2297. }
  2298. return target;
  2299. }
  2300. if (!target || typeof target !== 'object') {
  2301. return [target].concat(source);
  2302. }
  2303. var mergeTarget = target;
  2304. if (isArray(target) && !isArray(source)) {
  2305. mergeTarget = arrayToObject(target, options);
  2306. }
  2307. if (isArray(target) && isArray(source)) {
  2308. source.forEach(function (item, i) {
  2309. if (has.call(target, i)) {
  2310. var targetItem = target[i];
  2311. if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
  2312. target[i] = merge(targetItem, item, options);
  2313. } else {
  2314. target.push(item);
  2315. }
  2316. } else {
  2317. target[i] = item;
  2318. }
  2319. });
  2320. return target;
  2321. }
  2322. return Object.keys(source).reduce(function (acc, key) {
  2323. var value = source[key];
  2324. if (has.call(acc, key)) {
  2325. acc[key] = merge(acc[key], value, options);
  2326. } else {
  2327. acc[key] = value;
  2328. }
  2329. return acc;
  2330. }, mergeTarget);
  2331. };
  2332. var assign = function assignSingleSource(target, source) {
  2333. return Object.keys(source).reduce(function (acc, key) {
  2334. acc[key] = source[key];
  2335. return acc;
  2336. }, target);
  2337. };
  2338. var decode = function (str, decoder, charset) {
  2339. var strWithoutPlus = str.replace(/\+/g, ' ');
  2340. if (charset === 'iso-8859-1') {
  2341. // unescape never throws, no try...catch needed:
  2342. return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
  2343. }
  2344. // utf-8
  2345. try {
  2346. return decodeURIComponent(strWithoutPlus);
  2347. } catch (e) {
  2348. return strWithoutPlus;
  2349. }
  2350. };
  2351. var encode = function encode(str, defaultEncoder, charset, kind, format) {
  2352. // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
  2353. // It has been adapted here for stricter adherence to RFC 3986
  2354. if (str.length === 0) {
  2355. return str;
  2356. }
  2357. var string = str;
  2358. if (typeof str === 'symbol') {
  2359. string = Symbol.prototype.toString.call(str);
  2360. } else if (typeof str !== 'string') {
  2361. string = String(str);
  2362. }
  2363. if (charset === 'iso-8859-1') {
  2364. return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
  2365. return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
  2366. });
  2367. }
  2368. var out = '';
  2369. for (var i = 0; i < string.length; ++i) {
  2370. var c = string.charCodeAt(i);
  2371. if (
  2372. c === 0x2D // -
  2373. || c === 0x2E // .
  2374. || c === 0x5F // _
  2375. || c === 0x7E // ~
  2376. || (c >= 0x30 && c <= 0x39) // 0-9
  2377. || (c >= 0x41 && c <= 0x5A) // a-z
  2378. || (c >= 0x61 && c <= 0x7A) // A-Z
  2379. || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
  2380. ) {
  2381. out += string.charAt(i);
  2382. continue;
  2383. }
  2384. if (c < 0x80) {
  2385. out = out + hexTable[c];
  2386. continue;
  2387. }
  2388. if (c < 0x800) {
  2389. out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
  2390. continue;
  2391. }
  2392. if (c < 0xD800 || c >= 0xE000) {
  2393. out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
  2394. continue;
  2395. }
  2396. i += 1;
  2397. c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
  2398. /* eslint operator-linebreak: [2, "before"] */
  2399. out += hexTable[0xF0 | (c >> 18)]
  2400. + hexTable[0x80 | ((c >> 12) & 0x3F)]
  2401. + hexTable[0x80 | ((c >> 6) & 0x3F)]
  2402. + hexTable[0x80 | (c & 0x3F)];
  2403. }
  2404. return out;
  2405. };
  2406. var compact = function compact(value) {
  2407. var queue = [{ obj: { o: value }, prop: 'o' }];
  2408. var refs = [];
  2409. for (var i = 0; i < queue.length; ++i) {
  2410. var item = queue[i];
  2411. var obj = item.obj[item.prop];
  2412. var keys = Object.keys(obj);
  2413. for (var j = 0; j < keys.length; ++j) {
  2414. var key = keys[j];
  2415. var val = obj[key];
  2416. if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
  2417. queue.push({ obj: obj, prop: key });
  2418. refs.push(val);
  2419. }
  2420. }
  2421. }
  2422. compactQueue(queue);
  2423. return value;
  2424. };
  2425. var isRegExp = function isRegExp(obj) {
  2426. return Object.prototype.toString.call(obj) === '[object RegExp]';
  2427. };
  2428. var isBuffer = function isBuffer(obj) {
  2429. if (!obj || typeof obj !== 'object') {
  2430. return false;
  2431. }
  2432. return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
  2433. };
  2434. var combine = function combine(a, b) {
  2435. return [].concat(a, b);
  2436. };
  2437. var maybeMap = function maybeMap(val, fn) {
  2438. if (isArray(val)) {
  2439. var mapped = [];
  2440. for (var i = 0; i < val.length; i += 1) {
  2441. mapped.push(fn(val[i]));
  2442. }
  2443. return mapped;
  2444. }
  2445. return fn(val);
  2446. };
  2447. module.exports = {
  2448. arrayToObject: arrayToObject,
  2449. assign: assign,
  2450. combine: combine,
  2451. compact: compact,
  2452. decode: decode,
  2453. encode: encode,
  2454. isBuffer: isBuffer,
  2455. isRegExp: isRegExp,
  2456. maybeMap: maybeMap,
  2457. merge: merge
  2458. };
  2459. /***/ }),
  2460. /***/ "./node_modules/@inertiajs/progress/dist/index.js":
  2461. /*!********************************************************!*\
  2462. !*** ./node_modules/@inertiajs/progress/dist/index.js ***!
  2463. \********************************************************/
  2464. /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
  2465. var n,e=(n=__webpack_require__(/*! nprogress */ "./node_modules/nprogress/nprogress.js"))&&"object"==typeof n&&"default"in n?n.default:n,t=null;function r(n){document.addEventListener("inertia:start",o.bind(null,n)),document.addEventListener("inertia:progress",i),document.addEventListener("inertia:finish",s)}function o(n){t=setTimeout(function(){return e.start()},n)}function i(n){e.isStarted()&&n.detail.progress.percentage&&e.set(Math.max(e.status,n.detail.progress.percentage/100*.9))}function s(n){clearTimeout(t),e.isStarted()&&(n.detail.visit.completed?e.done():n.detail.visit.interrupted?e.set(0):n.detail.visit.cancelled&&(e.done(),e.remove()))}exports.InertiaProgress={init:function(n){var t=void 0===n?{}:n,o=t.delay,i=t.color,s=void 0===i?"#29d":i,a=t.includeCSS,p=void 0===a||a,d=t.showSpinner,l=void 0!==d&&d;r(void 0===o?250:o),e.configure({showSpinner:l}),p&&function(n){var e=document.createElement("style");e.type="text/css",e.textContent="\n #nprogress {\n pointer-events: none;\n }\n\n #nprogress .bar {\n background: "+n+";\n\n position: fixed;\n z-index: 1031;\n top: 0;\n left: 0;\n\n width: 100%;\n height: 2px;\n }\n\n #nprogress .peg {\n display: block;\n position: absolute;\n right: 0px;\n width: 100px;\n height: 100%;\n box-shadow: 0 0 10px "+n+", 0 0 5px "+n+";\n opacity: 1.0;\n\n -webkit-transform: rotate(3deg) translate(0px, -4px);\n -ms-transform: rotate(3deg) translate(0px, -4px);\n transform: rotate(3deg) translate(0px, -4px);\n }\n\n #nprogress .spinner {\n display: block;\n position: fixed;\n z-index: 1031;\n top: 15px;\n right: 15px;\n }\n\n #nprogress .spinner-icon {\n width: 18px;\n height: 18px;\n box-sizing: border-box;\n\n border: solid 2px transparent;\n border-top-color: "+n+";\n border-left-color: "+n+";\n border-radius: 50%;\n\n -webkit-animation: nprogress-spinner 400ms linear infinite;\n animation: nprogress-spinner 400ms linear infinite;\n }\n\n .nprogress-custom-parent {\n overflow: hidden;\n position: relative;\n }\n\n .nprogress-custom-parent #nprogress .spinner,\n .nprogress-custom-parent #nprogress .bar {\n position: absolute;\n }\n\n @-webkit-keyframes nprogress-spinner {\n 0% { -webkit-transform: rotate(0deg); }\n 100% { -webkit-transform: rotate(360deg); }\n }\n @keyframes nprogress-spinner {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n ",document.head.appendChild(e)}(s)}};
  2466. //# sourceMappingURL=index.js.map
  2467. /***/ }),
  2468. /***/ "./resources/js/vue.js":
  2469. /*!*****************************!*\
  2470. !*** ./resources/js/vue.js ***!
  2471. \*****************************/
  2472. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  2473. "use strict";
  2474. __webpack_require__.r(__webpack_exports__);
  2475. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm.js");
  2476. /* harmony import */ var _inertiajs_inertia_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @inertiajs/inertia-vue */ "./node_modules/@inertiajs/inertia-vue/dist/index.js");
  2477. /* harmony import */ var _inertiajs_progress__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @inertiajs/progress */ "./node_modules/@inertiajs/progress/dist/index.js");
  2478. vue__WEBPACK_IMPORTED_MODULE_2__["default"].prototype.$route = route;
  2479. (0,_inertiajs_inertia_vue__WEBPACK_IMPORTED_MODULE_0__.createInertiaApp)({
  2480. resolve: function resolve(name) {
  2481. return __webpack_require__("./resources/js/pages lazy recursive ^\\.\\/.*$")("./".concat(name));
  2482. },
  2483. setup: function setup(_ref) {
  2484. var el = _ref.el,
  2485. App = _ref.App,
  2486. props = _ref.props,
  2487. plugin = _ref.plugin;
  2488. vue__WEBPACK_IMPORTED_MODULE_2__["default"].use(plugin);
  2489. new vue__WEBPACK_IMPORTED_MODULE_2__["default"]({
  2490. render: function render(h) {
  2491. return h(App, props);
  2492. }
  2493. }).$mount(el);
  2494. }
  2495. });
  2496. _inertiajs_progress__WEBPACK_IMPORTED_MODULE_1__.InertiaProgress.init({
  2497. color: '#eb4432'
  2498. });
  2499. /***/ }),
  2500. /***/ "./node_modules/call-bind/callBound.js":
  2501. /*!*********************************************!*\
  2502. !*** ./node_modules/call-bind/callBound.js ***!
  2503. \*********************************************/
  2504. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  2505. "use strict";
  2506. var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ "./node_modules/get-intrinsic/index.js");
  2507. var callBind = __webpack_require__(/*! ./ */ "./node_modules/call-bind/index.js");
  2508. var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
  2509. module.exports = function callBoundIntrinsic(name, allowMissing) {
  2510. var intrinsic = GetIntrinsic(name, !!allowMissing);
  2511. if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
  2512. return callBind(intrinsic);
  2513. }
  2514. return intrinsic;
  2515. };
  2516. /***/ }),
  2517. /***/ "./node_modules/call-bind/index.js":
  2518. /*!*****************************************!*\
  2519. !*** ./node_modules/call-bind/index.js ***!
  2520. \*****************************************/
  2521. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  2522. "use strict";
  2523. var bind = __webpack_require__(/*! function-bind */ "./node_modules/function-bind/index.js");
  2524. var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ "./node_modules/get-intrinsic/index.js");
  2525. var $apply = GetIntrinsic('%Function.prototype.apply%');
  2526. var $call = GetIntrinsic('%Function.prototype.call%');
  2527. var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
  2528. var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
  2529. var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
  2530. var $max = GetIntrinsic('%Math.max%');
  2531. if ($defineProperty) {
  2532. try {
  2533. $defineProperty({}, 'a', { value: 1 });
  2534. } catch (e) {
  2535. // IE 8 has a broken defineProperty
  2536. $defineProperty = null;
  2537. }
  2538. }
  2539. module.exports = function callBind(originalFunction) {
  2540. var func = $reflectApply(bind, $call, arguments);
  2541. if ($gOPD && $defineProperty) {
  2542. var desc = $gOPD(func, 'length');
  2543. if (desc.configurable) {
  2544. // original length, plus the receiver, minus any additional arguments (after the receiver)
  2545. $defineProperty(
  2546. func,
  2547. 'length',
  2548. { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
  2549. );
  2550. }
  2551. }
  2552. return func;
  2553. };
  2554. var applyBind = function applyBind() {
  2555. return $reflectApply(bind, $apply, arguments);
  2556. };
  2557. if ($defineProperty) {
  2558. $defineProperty(module.exports, 'apply', { value: applyBind });
  2559. } else {
  2560. module.exports.apply = applyBind;
  2561. }
  2562. /***/ }),
  2563. /***/ "./node_modules/deepmerge/dist/cjs.js":
  2564. /*!********************************************!*\
  2565. !*** ./node_modules/deepmerge/dist/cjs.js ***!
  2566. \********************************************/
  2567. /***/ ((module) => {
  2568. "use strict";
  2569. var isMergeableObject = function isMergeableObject(value) {
  2570. return isNonNullObject(value)
  2571. && !isSpecial(value)
  2572. };
  2573. function isNonNullObject(value) {
  2574. return !!value && typeof value === 'object'
  2575. }
  2576. function isSpecial(value) {
  2577. var stringValue = Object.prototype.toString.call(value);
  2578. return stringValue === '[object RegExp]'
  2579. || stringValue === '[object Date]'
  2580. || isReactElement(value)
  2581. }
  2582. // see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
  2583. var canUseSymbol = typeof Symbol === 'function' && Symbol.for;
  2584. var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;
  2585. function isReactElement(value) {
  2586. return value.$$typeof === REACT_ELEMENT_TYPE
  2587. }
  2588. function emptyTarget(val) {
  2589. return Array.isArray(val) ? [] : {}
  2590. }
  2591. function cloneUnlessOtherwiseSpecified(value, options) {
  2592. return (options.clone !== false && options.isMergeableObject(value))
  2593. ? deepmerge(emptyTarget(value), value, options)
  2594. : value
  2595. }
  2596. function defaultArrayMerge(target, source, options) {
  2597. return target.concat(source).map(function(element) {
  2598. return cloneUnlessOtherwiseSpecified(element, options)
  2599. })
  2600. }
  2601. function getMergeFunction(key, options) {
  2602. if (!options.customMerge) {
  2603. return deepmerge
  2604. }
  2605. var customMerge = options.customMerge(key);
  2606. return typeof customMerge === 'function' ? customMerge : deepmerge
  2607. }
  2608. function getEnumerableOwnPropertySymbols(target) {
  2609. return Object.getOwnPropertySymbols
  2610. ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
  2611. return target.propertyIsEnumerable(symbol)
  2612. })
  2613. : []
  2614. }
  2615. function getKeys(target) {
  2616. return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))
  2617. }
  2618. function propertyIsOnObject(object, property) {
  2619. try {
  2620. return property in object
  2621. } catch(_) {
  2622. return false
  2623. }
  2624. }
  2625. // Protects from prototype poisoning and unexpected merging up the prototype chain.
  2626. function propertyIsUnsafe(target, key) {
  2627. return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,
  2628. && !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,
  2629. && Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.
  2630. }
  2631. function mergeObject(target, source, options) {
  2632. var destination = {};
  2633. if (options.isMergeableObject(target)) {
  2634. getKeys(target).forEach(function(key) {
  2635. destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
  2636. });
  2637. }
  2638. getKeys(source).forEach(function(key) {
  2639. if (propertyIsUnsafe(target, key)) {
  2640. return
  2641. }
  2642. if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
  2643. destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
  2644. } else {
  2645. destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
  2646. }
  2647. });
  2648. return destination
  2649. }
  2650. function deepmerge(target, source, options) {
  2651. options = options || {};
  2652. options.arrayMerge = options.arrayMerge || defaultArrayMerge;
  2653. options.isMergeableObject = options.isMergeableObject || isMergeableObject;
  2654. // cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
  2655. // implementations can use it. The caller may not replace it.
  2656. options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
  2657. var sourceIsArray = Array.isArray(source);
  2658. var targetIsArray = Array.isArray(target);
  2659. var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
  2660. if (!sourceAndTargetTypesMatch) {
  2661. return cloneUnlessOtherwiseSpecified(source, options)
  2662. } else if (sourceIsArray) {
  2663. return options.arrayMerge(target, source, options)
  2664. } else {
  2665. return mergeObject(target, source, options)
  2666. }
  2667. }
  2668. deepmerge.all = function deepmergeAll(array, options) {
  2669. if (!Array.isArray(array)) {
  2670. throw new Error('first argument should be an array')
  2671. }
  2672. return array.reduce(function(prev, next) {
  2673. return deepmerge(prev, next, options)
  2674. }, {})
  2675. };
  2676. var deepmerge_1 = deepmerge;
  2677. module.exports = deepmerge_1;
  2678. /***/ }),
  2679. /***/ "./node_modules/function-bind/implementation.js":
  2680. /*!******************************************************!*\
  2681. !*** ./node_modules/function-bind/implementation.js ***!
  2682. \******************************************************/
  2683. /***/ ((module) => {
  2684. "use strict";
  2685. /* eslint no-invalid-this: 1 */
  2686. var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
  2687. var slice = Array.prototype.slice;
  2688. var toStr = Object.prototype.toString;
  2689. var funcType = '[object Function]';
  2690. module.exports = function bind(that) {
  2691. var target = this;
  2692. if (typeof target !== 'function' || toStr.call(target) !== funcType) {
  2693. throw new TypeError(ERROR_MESSAGE + target);
  2694. }
  2695. var args = slice.call(arguments, 1);
  2696. var bound;
  2697. var binder = function () {
  2698. if (this instanceof bound) {
  2699. var result = target.apply(
  2700. this,
  2701. args.concat(slice.call(arguments))
  2702. );
  2703. if (Object(result) === result) {
  2704. return result;
  2705. }
  2706. return this;
  2707. } else {
  2708. return target.apply(
  2709. that,
  2710. args.concat(slice.call(arguments))
  2711. );
  2712. }
  2713. };
  2714. var boundLength = Math.max(0, target.length - args.length);
  2715. var boundArgs = [];
  2716. for (var i = 0; i < boundLength; i++) {
  2717. boundArgs.push('$' + i);
  2718. }
  2719. bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
  2720. if (target.prototype) {
  2721. var Empty = function Empty() {};
  2722. Empty.prototype = target.prototype;
  2723. bound.prototype = new Empty();
  2724. Empty.prototype = null;
  2725. }
  2726. return bound;
  2727. };
  2728. /***/ }),
  2729. /***/ "./node_modules/function-bind/index.js":
  2730. /*!*********************************************!*\
  2731. !*** ./node_modules/function-bind/index.js ***!
  2732. \*********************************************/
  2733. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  2734. "use strict";
  2735. var implementation = __webpack_require__(/*! ./implementation */ "./node_modules/function-bind/implementation.js");
  2736. module.exports = Function.prototype.bind || implementation;
  2737. /***/ }),
  2738. /***/ "./node_modules/get-intrinsic/index.js":
  2739. /*!*********************************************!*\
  2740. !*** ./node_modules/get-intrinsic/index.js ***!
  2741. \*********************************************/
  2742. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  2743. "use strict";
  2744. var undefined;
  2745. var $SyntaxError = SyntaxError;
  2746. var $Function = Function;
  2747. var $TypeError = TypeError;
  2748. // eslint-disable-next-line consistent-return
  2749. var getEvalledConstructor = function (expressionSyntax) {
  2750. try {
  2751. return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
  2752. } catch (e) {}
  2753. };
  2754. var $gOPD = Object.getOwnPropertyDescriptor;
  2755. if ($gOPD) {
  2756. try {
  2757. $gOPD({}, '');
  2758. } catch (e) {
  2759. $gOPD = null; // this is IE 8, which has a broken gOPD
  2760. }
  2761. }
  2762. var throwTypeError = function () {
  2763. throw new $TypeError();
  2764. };
  2765. var ThrowTypeError = $gOPD
  2766. ? (function () {
  2767. try {
  2768. // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
  2769. arguments.callee; // IE 8 does not throw here
  2770. return throwTypeError;
  2771. } catch (calleeThrows) {
  2772. try {
  2773. // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
  2774. return $gOPD(arguments, 'callee').get;
  2775. } catch (gOPDthrows) {
  2776. return throwTypeError;
  2777. }
  2778. }
  2779. }())
  2780. : throwTypeError;
  2781. var hasSymbols = __webpack_require__(/*! has-symbols */ "./node_modules/has-symbols/index.js")();
  2782. var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
  2783. var needsEval = {};
  2784. var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);
  2785. var INTRINSICS = {
  2786. '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
  2787. '%Array%': Array,
  2788. '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
  2789. '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,
  2790. '%AsyncFromSyncIteratorPrototype%': undefined,
  2791. '%AsyncFunction%': needsEval,
  2792. '%AsyncGenerator%': needsEval,
  2793. '%AsyncGeneratorFunction%': needsEval,
  2794. '%AsyncIteratorPrototype%': needsEval,
  2795. '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
  2796. '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
  2797. '%Boolean%': Boolean,
  2798. '%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
  2799. '%Date%': Date,
  2800. '%decodeURI%': decodeURI,
  2801. '%decodeURIComponent%': decodeURIComponent,
  2802. '%encodeURI%': encodeURI,
  2803. '%encodeURIComponent%': encodeURIComponent,
  2804. '%Error%': Error,
  2805. '%eval%': eval, // eslint-disable-line no-eval
  2806. '%EvalError%': EvalError,
  2807. '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
  2808. '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
  2809. '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
  2810. '%Function%': $Function,
  2811. '%GeneratorFunction%': needsEval,
  2812. '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
  2813. '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
  2814. '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
  2815. '%isFinite%': isFinite,
  2816. '%isNaN%': isNaN,
  2817. '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,
  2818. '%JSON%': typeof JSON === 'object' ? JSON : undefined,
  2819. '%Map%': typeof Map === 'undefined' ? undefined : Map,
  2820. '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),
  2821. '%Math%': Math,
  2822. '%Number%': Number,
  2823. '%Object%': Object,
  2824. '%parseFloat%': parseFloat,
  2825. '%parseInt%': parseInt,
  2826. '%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
  2827. '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
  2828. '%RangeError%': RangeError,
  2829. '%ReferenceError%': ReferenceError,
  2830. '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
  2831. '%RegExp%': RegExp,
  2832. '%Set%': typeof Set === 'undefined' ? undefined : Set,
  2833. '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),
  2834. '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
  2835. '%String%': String,
  2836. '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,
  2837. '%Symbol%': hasSymbols ? Symbol : undefined,
  2838. '%SyntaxError%': $SyntaxError,
  2839. '%ThrowTypeError%': ThrowTypeError,
  2840. '%TypedArray%': TypedArray,
  2841. '%TypeError%': $TypeError,
  2842. '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
  2843. '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
  2844. '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
  2845. '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
  2846. '%URIError%': URIError,
  2847. '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
  2848. '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
  2849. '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
  2850. };
  2851. var doEval = function doEval(name) {
  2852. var value;
  2853. if (name === '%AsyncFunction%') {
  2854. value = getEvalledConstructor('async function () {}');
  2855. } else if (name === '%GeneratorFunction%') {
  2856. value = getEvalledConstructor('function* () {}');
  2857. } else if (name === '%AsyncGeneratorFunction%') {
  2858. value = getEvalledConstructor('async function* () {}');
  2859. } else if (name === '%AsyncGenerator%') {
  2860. var fn = doEval('%AsyncGeneratorFunction%');
  2861. if (fn) {
  2862. value = fn.prototype;
  2863. }
  2864. } else if (name === '%AsyncIteratorPrototype%') {
  2865. var gen = doEval('%AsyncGenerator%');
  2866. if (gen) {
  2867. value = getProto(gen.prototype);
  2868. }
  2869. }
  2870. INTRINSICS[name] = value;
  2871. return value;
  2872. };
  2873. var LEGACY_ALIASES = {
  2874. '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
  2875. '%ArrayPrototype%': ['Array', 'prototype'],
  2876. '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
  2877. '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
  2878. '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
  2879. '%ArrayProto_values%': ['Array', 'prototype', 'values'],
  2880. '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
  2881. '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
  2882. '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
  2883. '%BooleanPrototype%': ['Boolean', 'prototype'],
  2884. '%DataViewPrototype%': ['DataView', 'prototype'],
  2885. '%DatePrototype%': ['Date', 'prototype'],
  2886. '%ErrorPrototype%': ['Error', 'prototype'],
  2887. '%EvalErrorPrototype%': ['EvalError', 'prototype'],
  2888. '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
  2889. '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
  2890. '%FunctionPrototype%': ['Function', 'prototype'],
  2891. '%Generator%': ['GeneratorFunction', 'prototype'],
  2892. '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
  2893. '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
  2894. '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
  2895. '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
  2896. '%JSONParse%': ['JSON', 'parse'],
  2897. '%JSONStringify%': ['JSON', 'stringify'],
  2898. '%MapPrototype%': ['Map', 'prototype'],
  2899. '%NumberPrototype%': ['Number', 'prototype'],
  2900. '%ObjectPrototype%': ['Object', 'prototype'],
  2901. '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
  2902. '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
  2903. '%PromisePrototype%': ['Promise', 'prototype'],
  2904. '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
  2905. '%Promise_all%': ['Promise', 'all'],
  2906. '%Promise_reject%': ['Promise', 'reject'],
  2907. '%Promise_resolve%': ['Promise', 'resolve'],
  2908. '%RangeErrorPrototype%': ['RangeError', 'prototype'],
  2909. '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
  2910. '%RegExpPrototype%': ['RegExp', 'prototype'],
  2911. '%SetPrototype%': ['Set', 'prototype'],
  2912. '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
  2913. '%StringPrototype%': ['String', 'prototype'],
  2914. '%SymbolPrototype%': ['Symbol', 'prototype'],
  2915. '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
  2916. '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
  2917. '%TypeErrorPrototype%': ['TypeError', 'prototype'],
  2918. '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
  2919. '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
  2920. '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
  2921. '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
  2922. '%URIErrorPrototype%': ['URIError', 'prototype'],
  2923. '%WeakMapPrototype%': ['WeakMap', 'prototype'],
  2924. '%WeakSetPrototype%': ['WeakSet', 'prototype']
  2925. };
  2926. var bind = __webpack_require__(/*! function-bind */ "./node_modules/function-bind/index.js");
  2927. var hasOwn = __webpack_require__(/*! has */ "./node_modules/has/src/index.js");
  2928. var $concat = bind.call(Function.call, Array.prototype.concat);
  2929. var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
  2930. var $replace = bind.call(Function.call, String.prototype.replace);
  2931. var $strSlice = bind.call(Function.call, String.prototype.slice);
  2932. /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
  2933. var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
  2934. var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
  2935. var stringToPath = function stringToPath(string) {
  2936. var first = $strSlice(string, 0, 1);
  2937. var last = $strSlice(string, -1);
  2938. if (first === '%' && last !== '%') {
  2939. throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
  2940. } else if (last === '%' && first !== '%') {
  2941. throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
  2942. }
  2943. var result = [];
  2944. $replace(string, rePropName, function (match, number, quote, subString) {
  2945. result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
  2946. });
  2947. return result;
  2948. };
  2949. /* end adaptation */
  2950. var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
  2951. var intrinsicName = name;
  2952. var alias;
  2953. if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
  2954. alias = LEGACY_ALIASES[intrinsicName];
  2955. intrinsicName = '%' + alias[0] + '%';
  2956. }
  2957. if (hasOwn(INTRINSICS, intrinsicName)) {
  2958. var value = INTRINSICS[intrinsicName];
  2959. if (value === needsEval) {
  2960. value = doEval(intrinsicName);
  2961. }
  2962. if (typeof value === 'undefined' && !allowMissing) {
  2963. throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
  2964. }
  2965. return {
  2966. alias: alias,
  2967. name: intrinsicName,
  2968. value: value
  2969. };
  2970. }
  2971. throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
  2972. };
  2973. module.exports = function GetIntrinsic(name, allowMissing) {
  2974. if (typeof name !== 'string' || name.length === 0) {
  2975. throw new $TypeError('intrinsic name must be a non-empty string');
  2976. }
  2977. if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
  2978. throw new $TypeError('"allowMissing" argument must be a boolean');
  2979. }
  2980. var parts = stringToPath(name);
  2981. var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
  2982. var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
  2983. var intrinsicRealName = intrinsic.name;
  2984. var value = intrinsic.value;
  2985. var skipFurtherCaching = false;
  2986. var alias = intrinsic.alias;
  2987. if (alias) {
  2988. intrinsicBaseName = alias[0];
  2989. $spliceApply(parts, $concat([0, 1], alias));
  2990. }
  2991. for (var i = 1, isOwn = true; i < parts.length; i += 1) {
  2992. var part = parts[i];
  2993. var first = $strSlice(part, 0, 1);
  2994. var last = $strSlice(part, -1);
  2995. if (
  2996. (
  2997. (first === '"' || first === "'" || first === '`')
  2998. || (last === '"' || last === "'" || last === '`')
  2999. )
  3000. && first !== last
  3001. ) {
  3002. throw new $SyntaxError('property names with quotes must have matching quotes');
  3003. }
  3004. if (part === 'constructor' || !isOwn) {
  3005. skipFurtherCaching = true;
  3006. }
  3007. intrinsicBaseName += '.' + part;
  3008. intrinsicRealName = '%' + intrinsicBaseName + '%';
  3009. if (hasOwn(INTRINSICS, intrinsicRealName)) {
  3010. value = INTRINSICS[intrinsicRealName];
  3011. } else if (value != null) {
  3012. if (!(part in value)) {
  3013. if (!allowMissing) {
  3014. throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
  3015. }
  3016. return void undefined;
  3017. }
  3018. if ($gOPD && (i + 1) >= parts.length) {
  3019. var desc = $gOPD(value, part);
  3020. isOwn = !!desc;
  3021. // By convention, when a data property is converted to an accessor
  3022. // property to emulate a data property that does not suffer from
  3023. // the override mistake, that accessor's getter is marked with
  3024. // an `originalValue` property. Here, when we detect this, we
  3025. // uphold the illusion by pretending to see that original data
  3026. // property, i.e., returning the value rather than the getter
  3027. // itself.
  3028. if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
  3029. value = desc.get;
  3030. } else {
  3031. value = value[part];
  3032. }
  3033. } else {
  3034. isOwn = hasOwn(value, part);
  3035. value = value[part];
  3036. }
  3037. if (isOwn && !skipFurtherCaching) {
  3038. INTRINSICS[intrinsicRealName] = value;
  3039. }
  3040. }
  3041. }
  3042. return value;
  3043. };
  3044. /***/ }),
  3045. /***/ "./node_modules/has-symbols/index.js":
  3046. /*!*******************************************!*\
  3047. !*** ./node_modules/has-symbols/index.js ***!
  3048. \*******************************************/
  3049. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  3050. "use strict";
  3051. var origSymbol = typeof Symbol !== 'undefined' && Symbol;
  3052. var hasSymbolSham = __webpack_require__(/*! ./shams */ "./node_modules/has-symbols/shams.js");
  3053. module.exports = function hasNativeSymbols() {
  3054. if (typeof origSymbol !== 'function') { return false; }
  3055. if (typeof Symbol !== 'function') { return false; }
  3056. if (typeof origSymbol('foo') !== 'symbol') { return false; }
  3057. if (typeof Symbol('bar') !== 'symbol') { return false; }
  3058. return hasSymbolSham();
  3059. };
  3060. /***/ }),
  3061. /***/ "./node_modules/has-symbols/shams.js":
  3062. /*!*******************************************!*\
  3063. !*** ./node_modules/has-symbols/shams.js ***!
  3064. \*******************************************/
  3065. /***/ ((module) => {
  3066. "use strict";
  3067. /* eslint complexity: [2, 18], max-statements: [2, 33] */
  3068. module.exports = function hasSymbols() {
  3069. if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
  3070. if (typeof Symbol.iterator === 'symbol') { return true; }
  3071. var obj = {};
  3072. var sym = Symbol('test');
  3073. var symObj = Object(sym);
  3074. if (typeof sym === 'string') { return false; }
  3075. if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
  3076. if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
  3077. // temp disabled per https://github.com/ljharb/object.assign/issues/17
  3078. // if (sym instanceof Symbol) { return false; }
  3079. // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
  3080. // if (!(symObj instanceof Symbol)) { return false; }
  3081. // if (typeof Symbol.prototype.toString !== 'function') { return false; }
  3082. // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
  3083. var symVal = 42;
  3084. obj[sym] = symVal;
  3085. for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
  3086. if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
  3087. if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
  3088. var syms = Object.getOwnPropertySymbols(obj);
  3089. if (syms.length !== 1 || syms[0] !== sym) { return false; }
  3090. if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
  3091. if (typeof Object.getOwnPropertyDescriptor === 'function') {
  3092. var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
  3093. if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
  3094. }
  3095. return true;
  3096. };
  3097. /***/ }),
  3098. /***/ "./node_modules/has/src/index.js":
  3099. /*!***************************************!*\
  3100. !*** ./node_modules/has/src/index.js ***!
  3101. \***************************************/
  3102. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  3103. "use strict";
  3104. var bind = __webpack_require__(/*! function-bind */ "./node_modules/function-bind/index.js");
  3105. module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
  3106. /***/ }),
  3107. /***/ "./node_modules/lodash.clonedeep/index.js":
  3108. /*!************************************************!*\
  3109. !*** ./node_modules/lodash.clonedeep/index.js ***!
  3110. \************************************************/
  3111. /***/ ((module, exports, __webpack_require__) => {
  3112. /* module decorator */ module = __webpack_require__.nmd(module);
  3113. /**
  3114. * lodash (Custom Build) <https://lodash.com/>
  3115. * Build: `lodash modularize exports="npm" -o ./`
  3116. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  3117. * Released under MIT license <https://lodash.com/license>
  3118. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  3119. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  3120. */
  3121. /** Used as the size to enable large array optimizations. */
  3122. var LARGE_ARRAY_SIZE = 200;
  3123. /** Used to stand-in for `undefined` hash values. */
  3124. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  3125. /** Used as references for various `Number` constants. */
  3126. var MAX_SAFE_INTEGER = 9007199254740991;
  3127. /** `Object#toString` result references. */
  3128. var argsTag = '[object Arguments]',
  3129. arrayTag = '[object Array]',
  3130. boolTag = '[object Boolean]',
  3131. dateTag = '[object Date]',
  3132. errorTag = '[object Error]',
  3133. funcTag = '[object Function]',
  3134. genTag = '[object GeneratorFunction]',
  3135. mapTag = '[object Map]',
  3136. numberTag = '[object Number]',
  3137. objectTag = '[object Object]',
  3138. promiseTag = '[object Promise]',
  3139. regexpTag = '[object RegExp]',
  3140. setTag = '[object Set]',
  3141. stringTag = '[object String]',
  3142. symbolTag = '[object Symbol]',
  3143. weakMapTag = '[object WeakMap]';
  3144. var arrayBufferTag = '[object ArrayBuffer]',
  3145. dataViewTag = '[object DataView]',
  3146. float32Tag = '[object Float32Array]',
  3147. float64Tag = '[object Float64Array]',
  3148. int8Tag = '[object Int8Array]',
  3149. int16Tag = '[object Int16Array]',
  3150. int32Tag = '[object Int32Array]',
  3151. uint8Tag = '[object Uint8Array]',
  3152. uint8ClampedTag = '[object Uint8ClampedArray]',
  3153. uint16Tag = '[object Uint16Array]',
  3154. uint32Tag = '[object Uint32Array]';
  3155. /**
  3156. * Used to match `RegExp`
  3157. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  3158. */
  3159. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
  3160. /** Used to match `RegExp` flags from their coerced string values. */
  3161. var reFlags = /\w*$/;
  3162. /** Used to detect host constructors (Safari). */
  3163. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  3164. /** Used to detect unsigned integer values. */
  3165. var reIsUint = /^(?:0|[1-9]\d*)$/;
  3166. /** Used to identify `toStringTag` values supported by `_.clone`. */
  3167. var cloneableTags = {};
  3168. cloneableTags[argsTag] = cloneableTags[arrayTag] =
  3169. cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
  3170. cloneableTags[boolTag] = cloneableTags[dateTag] =
  3171. cloneableTags[float32Tag] = cloneableTags[float64Tag] =
  3172. cloneableTags[int8Tag] = cloneableTags[int16Tag] =
  3173. cloneableTags[int32Tag] = cloneableTags[mapTag] =
  3174. cloneableTags[numberTag] = cloneableTags[objectTag] =
  3175. cloneableTags[regexpTag] = cloneableTags[setTag] =
  3176. cloneableTags[stringTag] = cloneableTags[symbolTag] =
  3177. cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
  3178. cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
  3179. cloneableTags[errorTag] = cloneableTags[funcTag] =
  3180. cloneableTags[weakMapTag] = false;
  3181. /** Detect free variable `global` from Node.js. */
  3182. var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;
  3183. /** Detect free variable `self`. */
  3184. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  3185. /** Used as a reference to the global object. */
  3186. var root = freeGlobal || freeSelf || Function('return this')();
  3187. /** Detect free variable `exports`. */
  3188. var freeExports = true && exports && !exports.nodeType && exports;
  3189. /** Detect free variable `module`. */
  3190. var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module;
  3191. /** Detect the popular CommonJS extension `module.exports`. */
  3192. var moduleExports = freeModule && freeModule.exports === freeExports;
  3193. /**
  3194. * Adds the key-value `pair` to `map`.
  3195. *
  3196. * @private
  3197. * @param {Object} map The map to modify.
  3198. * @param {Array} pair The key-value pair to add.
  3199. * @returns {Object} Returns `map`.
  3200. */
  3201. function addMapEntry(map, pair) {
  3202. // Don't return `map.set` because it's not chainable in IE 11.
  3203. map.set(pair[0], pair[1]);
  3204. return map;
  3205. }
  3206. /**
  3207. * Adds `value` to `set`.
  3208. *
  3209. * @private
  3210. * @param {Object} set The set to modify.
  3211. * @param {*} value The value to add.
  3212. * @returns {Object} Returns `set`.
  3213. */
  3214. function addSetEntry(set, value) {
  3215. // Don't return `set.add` because it's not chainable in IE 11.
  3216. set.add(value);
  3217. return set;
  3218. }
  3219. /**
  3220. * A specialized version of `_.forEach` for arrays without support for
  3221. * iteratee shorthands.
  3222. *
  3223. * @private
  3224. * @param {Array} [array] The array to iterate over.
  3225. * @param {Function} iteratee The function invoked per iteration.
  3226. * @returns {Array} Returns `array`.
  3227. */
  3228. function arrayEach(array, iteratee) {
  3229. var index = -1,
  3230. length = array ? array.length : 0;
  3231. while (++index < length) {
  3232. if (iteratee(array[index], index, array) === false) {
  3233. break;
  3234. }
  3235. }
  3236. return array;
  3237. }
  3238. /**
  3239. * Appends the elements of `values` to `array`.
  3240. *
  3241. * @private
  3242. * @param {Array} array The array to modify.
  3243. * @param {Array} values The values to append.
  3244. * @returns {Array} Returns `array`.
  3245. */
  3246. function arrayPush(array, values) {
  3247. var index = -1,
  3248. length = values.length,
  3249. offset = array.length;
  3250. while (++index < length) {
  3251. array[offset + index] = values[index];
  3252. }
  3253. return array;
  3254. }
  3255. /**
  3256. * A specialized version of `_.reduce` for arrays without support for
  3257. * iteratee shorthands.
  3258. *
  3259. * @private
  3260. * @param {Array} [array] The array to iterate over.
  3261. * @param {Function} iteratee The function invoked per iteration.
  3262. * @param {*} [accumulator] The initial value.
  3263. * @param {boolean} [initAccum] Specify using the first element of `array` as
  3264. * the initial value.
  3265. * @returns {*} Returns the accumulated value.
  3266. */
  3267. function arrayReduce(array, iteratee, accumulator, initAccum) {
  3268. var index = -1,
  3269. length = array ? array.length : 0;
  3270. if (initAccum && length) {
  3271. accumulator = array[++index];
  3272. }
  3273. while (++index < length) {
  3274. accumulator = iteratee(accumulator, array[index], index, array);
  3275. }
  3276. return accumulator;
  3277. }
  3278. /**
  3279. * The base implementation of `_.times` without support for iteratee shorthands
  3280. * or max array length checks.
  3281. *
  3282. * @private
  3283. * @param {number} n The number of times to invoke `iteratee`.
  3284. * @param {Function} iteratee The function invoked per iteration.
  3285. * @returns {Array} Returns the array of results.
  3286. */
  3287. function baseTimes(n, iteratee) {
  3288. var index = -1,
  3289. result = Array(n);
  3290. while (++index < n) {
  3291. result[index] = iteratee(index);
  3292. }
  3293. return result;
  3294. }
  3295. /**
  3296. * Gets the value at `key` of `object`.
  3297. *
  3298. * @private
  3299. * @param {Object} [object] The object to query.
  3300. * @param {string} key The key of the property to get.
  3301. * @returns {*} Returns the property value.
  3302. */
  3303. function getValue(object, key) {
  3304. return object == null ? undefined : object[key];
  3305. }
  3306. /**
  3307. * Checks if `value` is a host object in IE < 9.
  3308. *
  3309. * @private
  3310. * @param {*} value The value to check.
  3311. * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
  3312. */
  3313. function isHostObject(value) {
  3314. // Many host objects are `Object` objects that can coerce to strings
  3315. // despite having improperly defined `toString` methods.
  3316. var result = false;
  3317. if (value != null && typeof value.toString != 'function') {
  3318. try {
  3319. result = !!(value + '');
  3320. } catch (e) {}
  3321. }
  3322. return result;
  3323. }
  3324. /**
  3325. * Converts `map` to its key-value pairs.
  3326. *
  3327. * @private
  3328. * @param {Object} map The map to convert.
  3329. * @returns {Array} Returns the key-value pairs.
  3330. */
  3331. function mapToArray(map) {
  3332. var index = -1,
  3333. result = Array(map.size);
  3334. map.forEach(function(value, key) {
  3335. result[++index] = [key, value];
  3336. });
  3337. return result;
  3338. }
  3339. /**
  3340. * Creates a unary function that invokes `func` with its argument transformed.
  3341. *
  3342. * @private
  3343. * @param {Function} func The function to wrap.
  3344. * @param {Function} transform The argument transform.
  3345. * @returns {Function} Returns the new function.
  3346. */
  3347. function overArg(func, transform) {
  3348. return function(arg) {
  3349. return func(transform(arg));
  3350. };
  3351. }
  3352. /**
  3353. * Converts `set` to an array of its values.
  3354. *
  3355. * @private
  3356. * @param {Object} set The set to convert.
  3357. * @returns {Array} Returns the values.
  3358. */
  3359. function setToArray(set) {
  3360. var index = -1,
  3361. result = Array(set.size);
  3362. set.forEach(function(value) {
  3363. result[++index] = value;
  3364. });
  3365. return result;
  3366. }
  3367. /** Used for built-in method references. */
  3368. var arrayProto = Array.prototype,
  3369. funcProto = Function.prototype,
  3370. objectProto = Object.prototype;
  3371. /** Used to detect overreaching core-js shims. */
  3372. var coreJsData = root['__core-js_shared__'];
  3373. /** Used to detect methods masquerading as native. */
  3374. var maskSrcKey = (function() {
  3375. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  3376. return uid ? ('Symbol(src)_1.' + uid) : '';
  3377. }());
  3378. /** Used to resolve the decompiled source of functions. */
  3379. var funcToString = funcProto.toString;
  3380. /** Used to check objects for own properties. */
  3381. var hasOwnProperty = objectProto.hasOwnProperty;
  3382. /**
  3383. * Used to resolve the
  3384. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  3385. * of values.
  3386. */
  3387. var objectToString = objectProto.toString;
  3388. /** Used to detect if a method is native. */
  3389. var reIsNative = RegExp('^' +
  3390. funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
  3391. .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  3392. );
  3393. /** Built-in value references. */
  3394. var Buffer = moduleExports ? root.Buffer : undefined,
  3395. Symbol = root.Symbol,
  3396. Uint8Array = root.Uint8Array,
  3397. getPrototype = overArg(Object.getPrototypeOf, Object),
  3398. objectCreate = Object.create,
  3399. propertyIsEnumerable = objectProto.propertyIsEnumerable,
  3400. splice = arrayProto.splice;
  3401. /* Built-in method references for those with the same name as other `lodash` methods. */
  3402. var nativeGetSymbols = Object.getOwnPropertySymbols,
  3403. nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
  3404. nativeKeys = overArg(Object.keys, Object);
  3405. /* Built-in method references that are verified to be native. */
  3406. var DataView = getNative(root, 'DataView'),
  3407. Map = getNative(root, 'Map'),
  3408. Promise = getNative(root, 'Promise'),
  3409. Set = getNative(root, 'Set'),
  3410. WeakMap = getNative(root, 'WeakMap'),
  3411. nativeCreate = getNative(Object, 'create');
  3412. /** Used to detect maps, sets, and weakmaps. */
  3413. var dataViewCtorString = toSource(DataView),
  3414. mapCtorString = toSource(Map),
  3415. promiseCtorString = toSource(Promise),
  3416. setCtorString = toSource(Set),
  3417. weakMapCtorString = toSource(WeakMap);
  3418. /** Used to convert symbols to primitives and strings. */
  3419. var symbolProto = Symbol ? Symbol.prototype : undefined,
  3420. symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
  3421. /**
  3422. * Creates a hash object.
  3423. *
  3424. * @private
  3425. * @constructor
  3426. * @param {Array} [entries] The key-value pairs to cache.
  3427. */
  3428. function Hash(entries) {
  3429. var index = -1,
  3430. length = entries ? entries.length : 0;
  3431. this.clear();
  3432. while (++index < length) {
  3433. var entry = entries[index];
  3434. this.set(entry[0], entry[1]);
  3435. }
  3436. }
  3437. /**
  3438. * Removes all key-value entries from the hash.
  3439. *
  3440. * @private
  3441. * @name clear
  3442. * @memberOf Hash
  3443. */
  3444. function hashClear() {
  3445. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  3446. }
  3447. /**
  3448. * Removes `key` and its value from the hash.
  3449. *
  3450. * @private
  3451. * @name delete
  3452. * @memberOf Hash
  3453. * @param {Object} hash The hash to modify.
  3454. * @param {string} key The key of the value to remove.
  3455. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  3456. */
  3457. function hashDelete(key) {
  3458. return this.has(key) && delete this.__data__[key];
  3459. }
  3460. /**
  3461. * Gets the hash value for `key`.
  3462. *
  3463. * @private
  3464. * @name get
  3465. * @memberOf Hash
  3466. * @param {string} key The key of the value to get.
  3467. * @returns {*} Returns the entry value.
  3468. */
  3469. function hashGet(key) {
  3470. var data = this.__data__;
  3471. if (nativeCreate) {
  3472. var result = data[key];
  3473. return result === HASH_UNDEFINED ? undefined : result;
  3474. }
  3475. return hasOwnProperty.call(data, key) ? data[key] : undefined;
  3476. }
  3477. /**
  3478. * Checks if a hash value for `key` exists.
  3479. *
  3480. * @private
  3481. * @name has
  3482. * @memberOf Hash
  3483. * @param {string} key The key of the entry to check.
  3484. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  3485. */
  3486. function hashHas(key) {
  3487. var data = this.__data__;
  3488. return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
  3489. }
  3490. /**
  3491. * Sets the hash `key` to `value`.
  3492. *
  3493. * @private
  3494. * @name set
  3495. * @memberOf Hash
  3496. * @param {string} key The key of the value to set.
  3497. * @param {*} value The value to set.
  3498. * @returns {Object} Returns the hash instance.
  3499. */
  3500. function hashSet(key, value) {
  3501. var data = this.__data__;
  3502. data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
  3503. return this;
  3504. }
  3505. // Add methods to `Hash`.
  3506. Hash.prototype.clear = hashClear;
  3507. Hash.prototype['delete'] = hashDelete;
  3508. Hash.prototype.get = hashGet;
  3509. Hash.prototype.has = hashHas;
  3510. Hash.prototype.set = hashSet;
  3511. /**
  3512. * Creates an list cache object.
  3513. *
  3514. * @private
  3515. * @constructor
  3516. * @param {Array} [entries] The key-value pairs to cache.
  3517. */
  3518. function ListCache(entries) {
  3519. var index = -1,
  3520. length = entries ? entries.length : 0;
  3521. this.clear();
  3522. while (++index < length) {
  3523. var entry = entries[index];
  3524. this.set(entry[0], entry[1]);
  3525. }
  3526. }
  3527. /**
  3528. * Removes all key-value entries from the list cache.
  3529. *
  3530. * @private
  3531. * @name clear
  3532. * @memberOf ListCache
  3533. */
  3534. function listCacheClear() {
  3535. this.__data__ = [];
  3536. }
  3537. /**
  3538. * Removes `key` and its value from the list cache.
  3539. *
  3540. * @private
  3541. * @name delete
  3542. * @memberOf ListCache
  3543. * @param {string} key The key of the value to remove.
  3544. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  3545. */
  3546. function listCacheDelete(key) {
  3547. var data = this.__data__,
  3548. index = assocIndexOf(data, key);
  3549. if (index < 0) {
  3550. return false;
  3551. }
  3552. var lastIndex = data.length - 1;
  3553. if (index == lastIndex) {
  3554. data.pop();
  3555. } else {
  3556. splice.call(data, index, 1);
  3557. }
  3558. return true;
  3559. }
  3560. /**
  3561. * Gets the list cache value for `key`.
  3562. *
  3563. * @private
  3564. * @name get
  3565. * @memberOf ListCache
  3566. * @param {string} key The key of the value to get.
  3567. * @returns {*} Returns the entry value.
  3568. */
  3569. function listCacheGet(key) {
  3570. var data = this.__data__,
  3571. index = assocIndexOf(data, key);
  3572. return index < 0 ? undefined : data[index][1];
  3573. }
  3574. /**
  3575. * Checks if a list cache value for `key` exists.
  3576. *
  3577. * @private
  3578. * @name has
  3579. * @memberOf ListCache
  3580. * @param {string} key The key of the entry to check.
  3581. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  3582. */
  3583. function listCacheHas(key) {
  3584. return assocIndexOf(this.__data__, key) > -1;
  3585. }
  3586. /**
  3587. * Sets the list cache `key` to `value`.
  3588. *
  3589. * @private
  3590. * @name set
  3591. * @memberOf ListCache
  3592. * @param {string} key The key of the value to set.
  3593. * @param {*} value The value to set.
  3594. * @returns {Object} Returns the list cache instance.
  3595. */
  3596. function listCacheSet(key, value) {
  3597. var data = this.__data__,
  3598. index = assocIndexOf(data, key);
  3599. if (index < 0) {
  3600. data.push([key, value]);
  3601. } else {
  3602. data[index][1] = value;
  3603. }
  3604. return this;
  3605. }
  3606. // Add methods to `ListCache`.
  3607. ListCache.prototype.clear = listCacheClear;
  3608. ListCache.prototype['delete'] = listCacheDelete;
  3609. ListCache.prototype.get = listCacheGet;
  3610. ListCache.prototype.has = listCacheHas;
  3611. ListCache.prototype.set = listCacheSet;
  3612. /**
  3613. * Creates a map cache object to store key-value pairs.
  3614. *
  3615. * @private
  3616. * @constructor
  3617. * @param {Array} [entries] The key-value pairs to cache.
  3618. */
  3619. function MapCache(entries) {
  3620. var index = -1,
  3621. length = entries ? entries.length : 0;
  3622. this.clear();
  3623. while (++index < length) {
  3624. var entry = entries[index];
  3625. this.set(entry[0], entry[1]);
  3626. }
  3627. }
  3628. /**
  3629. * Removes all key-value entries from the map.
  3630. *
  3631. * @private
  3632. * @name clear
  3633. * @memberOf MapCache
  3634. */
  3635. function mapCacheClear() {
  3636. this.__data__ = {
  3637. 'hash': new Hash,
  3638. 'map': new (Map || ListCache),
  3639. 'string': new Hash
  3640. };
  3641. }
  3642. /**
  3643. * Removes `key` and its value from the map.
  3644. *
  3645. * @private
  3646. * @name delete
  3647. * @memberOf MapCache
  3648. * @param {string} key The key of the value to remove.
  3649. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  3650. */
  3651. function mapCacheDelete(key) {
  3652. return getMapData(this, key)['delete'](key);
  3653. }
  3654. /**
  3655. * Gets the map value for `key`.
  3656. *
  3657. * @private
  3658. * @name get
  3659. * @memberOf MapCache
  3660. * @param {string} key The key of the value to get.
  3661. * @returns {*} Returns the entry value.
  3662. */
  3663. function mapCacheGet(key) {
  3664. return getMapData(this, key).get(key);
  3665. }
  3666. /**
  3667. * Checks if a map value for `key` exists.
  3668. *
  3669. * @private
  3670. * @name has
  3671. * @memberOf MapCache
  3672. * @param {string} key The key of the entry to check.
  3673. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  3674. */
  3675. function mapCacheHas(key) {
  3676. return getMapData(this, key).has(key);
  3677. }
  3678. /**
  3679. * Sets the map `key` to `value`.
  3680. *
  3681. * @private
  3682. * @name set
  3683. * @memberOf MapCache
  3684. * @param {string} key The key of the value to set.
  3685. * @param {*} value The value to set.
  3686. * @returns {Object} Returns the map cache instance.
  3687. */
  3688. function mapCacheSet(key, value) {
  3689. getMapData(this, key).set(key, value);
  3690. return this;
  3691. }
  3692. // Add methods to `MapCache`.
  3693. MapCache.prototype.clear = mapCacheClear;
  3694. MapCache.prototype['delete'] = mapCacheDelete;
  3695. MapCache.prototype.get = mapCacheGet;
  3696. MapCache.prototype.has = mapCacheHas;
  3697. MapCache.prototype.set = mapCacheSet;
  3698. /**
  3699. * Creates a stack cache object to store key-value pairs.
  3700. *
  3701. * @private
  3702. * @constructor
  3703. * @param {Array} [entries] The key-value pairs to cache.
  3704. */
  3705. function Stack(entries) {
  3706. this.__data__ = new ListCache(entries);
  3707. }
  3708. /**
  3709. * Removes all key-value entries from the stack.
  3710. *
  3711. * @private
  3712. * @name clear
  3713. * @memberOf Stack
  3714. */
  3715. function stackClear() {
  3716. this.__data__ = new ListCache;
  3717. }
  3718. /**
  3719. * Removes `key` and its value from the stack.
  3720. *
  3721. * @private
  3722. * @name delete
  3723. * @memberOf Stack
  3724. * @param {string} key The key of the value to remove.
  3725. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  3726. */
  3727. function stackDelete(key) {
  3728. return this.__data__['delete'](key);
  3729. }
  3730. /**
  3731. * Gets the stack value for `key`.
  3732. *
  3733. * @private
  3734. * @name get
  3735. * @memberOf Stack
  3736. * @param {string} key The key of the value to get.
  3737. * @returns {*} Returns the entry value.
  3738. */
  3739. function stackGet(key) {
  3740. return this.__data__.get(key);
  3741. }
  3742. /**
  3743. * Checks if a stack value for `key` exists.
  3744. *
  3745. * @private
  3746. * @name has
  3747. * @memberOf Stack
  3748. * @param {string} key The key of the entry to check.
  3749. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  3750. */
  3751. function stackHas(key) {
  3752. return this.__data__.has(key);
  3753. }
  3754. /**
  3755. * Sets the stack `key` to `value`.
  3756. *
  3757. * @private
  3758. * @name set
  3759. * @memberOf Stack
  3760. * @param {string} key The key of the value to set.
  3761. * @param {*} value The value to set.
  3762. * @returns {Object} Returns the stack cache instance.
  3763. */
  3764. function stackSet(key, value) {
  3765. var cache = this.__data__;
  3766. if (cache instanceof ListCache) {
  3767. var pairs = cache.__data__;
  3768. if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
  3769. pairs.push([key, value]);
  3770. return this;
  3771. }
  3772. cache = this.__data__ = new MapCache(pairs);
  3773. }
  3774. cache.set(key, value);
  3775. return this;
  3776. }
  3777. // Add methods to `Stack`.
  3778. Stack.prototype.clear = stackClear;
  3779. Stack.prototype['delete'] = stackDelete;
  3780. Stack.prototype.get = stackGet;
  3781. Stack.prototype.has = stackHas;
  3782. Stack.prototype.set = stackSet;
  3783. /**
  3784. * Creates an array of the enumerable property names of the array-like `value`.
  3785. *
  3786. * @private
  3787. * @param {*} value The value to query.
  3788. * @param {boolean} inherited Specify returning inherited property names.
  3789. * @returns {Array} Returns the array of property names.
  3790. */
  3791. function arrayLikeKeys(value, inherited) {
  3792. // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
  3793. // Safari 9 makes `arguments.length` enumerable in strict mode.
  3794. var result = (isArray(value) || isArguments(value))
  3795. ? baseTimes(value.length, String)
  3796. : [];
  3797. var length = result.length,
  3798. skipIndexes = !!length;
  3799. for (var key in value) {
  3800. if ((inherited || hasOwnProperty.call(value, key)) &&
  3801. !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
  3802. result.push(key);
  3803. }
  3804. }
  3805. return result;
  3806. }
  3807. /**
  3808. * Assigns `value` to `key` of `object` if the existing value is not equivalent
  3809. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  3810. * for equality comparisons.
  3811. *
  3812. * @private
  3813. * @param {Object} object The object to modify.
  3814. * @param {string} key The key of the property to assign.
  3815. * @param {*} value The value to assign.
  3816. */
  3817. function assignValue(object, key, value) {
  3818. var objValue = object[key];
  3819. if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
  3820. (value === undefined && !(key in object))) {
  3821. object[key] = value;
  3822. }
  3823. }
  3824. /**
  3825. * Gets the index at which the `key` is found in `array` of key-value pairs.
  3826. *
  3827. * @private
  3828. * @param {Array} array The array to inspect.
  3829. * @param {*} key The key to search for.
  3830. * @returns {number} Returns the index of the matched value, else `-1`.
  3831. */
  3832. function assocIndexOf(array, key) {
  3833. var length = array.length;
  3834. while (length--) {
  3835. if (eq(array[length][0], key)) {
  3836. return length;
  3837. }
  3838. }
  3839. return -1;
  3840. }
  3841. /**
  3842. * The base implementation of `_.assign` without support for multiple sources
  3843. * or `customizer` functions.
  3844. *
  3845. * @private
  3846. * @param {Object} object The destination object.
  3847. * @param {Object} source The source object.
  3848. * @returns {Object} Returns `object`.
  3849. */
  3850. function baseAssign(object, source) {
  3851. return object && copyObject(source, keys(source), object);
  3852. }
  3853. /**
  3854. * The base implementation of `_.clone` and `_.cloneDeep` which tracks
  3855. * traversed objects.
  3856. *
  3857. * @private
  3858. * @param {*} value The value to clone.
  3859. * @param {boolean} [isDeep] Specify a deep clone.
  3860. * @param {boolean} [isFull] Specify a clone including symbols.
  3861. * @param {Function} [customizer] The function to customize cloning.
  3862. * @param {string} [key] The key of `value`.
  3863. * @param {Object} [object] The parent object of `value`.
  3864. * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
  3865. * @returns {*} Returns the cloned value.
  3866. */
  3867. function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
  3868. var result;
  3869. if (customizer) {
  3870. result = object ? customizer(value, key, object, stack) : customizer(value);
  3871. }
  3872. if (result !== undefined) {
  3873. return result;
  3874. }
  3875. if (!isObject(value)) {
  3876. return value;
  3877. }
  3878. var isArr = isArray(value);
  3879. if (isArr) {
  3880. result = initCloneArray(value);
  3881. if (!isDeep) {
  3882. return copyArray(value, result);
  3883. }
  3884. } else {
  3885. var tag = getTag(value),
  3886. isFunc = tag == funcTag || tag == genTag;
  3887. if (isBuffer(value)) {
  3888. return cloneBuffer(value, isDeep);
  3889. }
  3890. if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
  3891. if (isHostObject(value)) {
  3892. return object ? value : {};
  3893. }
  3894. result = initCloneObject(isFunc ? {} : value);
  3895. if (!isDeep) {
  3896. return copySymbols(value, baseAssign(result, value));
  3897. }
  3898. } else {
  3899. if (!cloneableTags[tag]) {
  3900. return object ? value : {};
  3901. }
  3902. result = initCloneByTag(value, tag, baseClone, isDeep);
  3903. }
  3904. }
  3905. // Check for circular references and return its corresponding clone.
  3906. stack || (stack = new Stack);
  3907. var stacked = stack.get(value);
  3908. if (stacked) {
  3909. return stacked;
  3910. }
  3911. stack.set(value, result);
  3912. if (!isArr) {
  3913. var props = isFull ? getAllKeys(value) : keys(value);
  3914. }
  3915. arrayEach(props || value, function(subValue, key) {
  3916. if (props) {
  3917. key = subValue;
  3918. subValue = value[key];
  3919. }
  3920. // Recursively populate clone (susceptible to call stack limits).
  3921. assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));
  3922. });
  3923. return result;
  3924. }
  3925. /**
  3926. * The base implementation of `_.create` without support for assigning
  3927. * properties to the created object.
  3928. *
  3929. * @private
  3930. * @param {Object} prototype The object to inherit from.
  3931. * @returns {Object} Returns the new object.
  3932. */
  3933. function baseCreate(proto) {
  3934. return isObject(proto) ? objectCreate(proto) : {};
  3935. }
  3936. /**
  3937. * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
  3938. * `keysFunc` and `symbolsFunc` to get the enumerable property names and
  3939. * symbols of `object`.
  3940. *
  3941. * @private
  3942. * @param {Object} object The object to query.
  3943. * @param {Function} keysFunc The function to get the keys of `object`.
  3944. * @param {Function} symbolsFunc The function to get the symbols of `object`.
  3945. * @returns {Array} Returns the array of property names and symbols.
  3946. */
  3947. function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  3948. var result = keysFunc(object);
  3949. return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
  3950. }
  3951. /**
  3952. * The base implementation of `getTag`.
  3953. *
  3954. * @private
  3955. * @param {*} value The value to query.
  3956. * @returns {string} Returns the `toStringTag`.
  3957. */
  3958. function baseGetTag(value) {
  3959. return objectToString.call(value);
  3960. }
  3961. /**
  3962. * The base implementation of `_.isNative` without bad shim checks.
  3963. *
  3964. * @private
  3965. * @param {*} value The value to check.
  3966. * @returns {boolean} Returns `true` if `value` is a native function,
  3967. * else `false`.
  3968. */
  3969. function baseIsNative(value) {
  3970. if (!isObject(value) || isMasked(value)) {
  3971. return false;
  3972. }
  3973. var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
  3974. return pattern.test(toSource(value));
  3975. }
  3976. /**
  3977. * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
  3978. *
  3979. * @private
  3980. * @param {Object} object The object to query.
  3981. * @returns {Array} Returns the array of property names.
  3982. */
  3983. function baseKeys(object) {
  3984. if (!isPrototype(object)) {
  3985. return nativeKeys(object);
  3986. }
  3987. var result = [];
  3988. for (var key in Object(object)) {
  3989. if (hasOwnProperty.call(object, key) && key != 'constructor') {
  3990. result.push(key);
  3991. }
  3992. }
  3993. return result;
  3994. }
  3995. /**
  3996. * Creates a clone of `buffer`.
  3997. *
  3998. * @private
  3999. * @param {Buffer} buffer The buffer to clone.
  4000. * @param {boolean} [isDeep] Specify a deep clone.
  4001. * @returns {Buffer} Returns the cloned buffer.
  4002. */
  4003. function cloneBuffer(buffer, isDeep) {
  4004. if (isDeep) {
  4005. return buffer.slice();
  4006. }
  4007. var result = new buffer.constructor(buffer.length);
  4008. buffer.copy(result);
  4009. return result;
  4010. }
  4011. /**
  4012. * Creates a clone of `arrayBuffer`.
  4013. *
  4014. * @private
  4015. * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
  4016. * @returns {ArrayBuffer} Returns the cloned array buffer.
  4017. */
  4018. function cloneArrayBuffer(arrayBuffer) {
  4019. var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
  4020. new Uint8Array(result).set(new Uint8Array(arrayBuffer));
  4021. return result;
  4022. }
  4023. /**
  4024. * Creates a clone of `dataView`.
  4025. *
  4026. * @private
  4027. * @param {Object} dataView The data view to clone.
  4028. * @param {boolean} [isDeep] Specify a deep clone.
  4029. * @returns {Object} Returns the cloned data view.
  4030. */
  4031. function cloneDataView(dataView, isDeep) {
  4032. var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
  4033. return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
  4034. }
  4035. /**
  4036. * Creates a clone of `map`.
  4037. *
  4038. * @private
  4039. * @param {Object} map The map to clone.
  4040. * @param {Function} cloneFunc The function to clone values.
  4041. * @param {boolean} [isDeep] Specify a deep clone.
  4042. * @returns {Object} Returns the cloned map.
  4043. */
  4044. function cloneMap(map, isDeep, cloneFunc) {
  4045. var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);
  4046. return arrayReduce(array, addMapEntry, new map.constructor);
  4047. }
  4048. /**
  4049. * Creates a clone of `regexp`.
  4050. *
  4051. * @private
  4052. * @param {Object} regexp The regexp to clone.
  4053. * @returns {Object} Returns the cloned regexp.
  4054. */
  4055. function cloneRegExp(regexp) {
  4056. var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
  4057. result.lastIndex = regexp.lastIndex;
  4058. return result;
  4059. }
  4060. /**
  4061. * Creates a clone of `set`.
  4062. *
  4063. * @private
  4064. * @param {Object} set The set to clone.
  4065. * @param {Function} cloneFunc The function to clone values.
  4066. * @param {boolean} [isDeep] Specify a deep clone.
  4067. * @returns {Object} Returns the cloned set.
  4068. */
  4069. function cloneSet(set, isDeep, cloneFunc) {
  4070. var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);
  4071. return arrayReduce(array, addSetEntry, new set.constructor);
  4072. }
  4073. /**
  4074. * Creates a clone of the `symbol` object.
  4075. *
  4076. * @private
  4077. * @param {Object} symbol The symbol object to clone.
  4078. * @returns {Object} Returns the cloned symbol object.
  4079. */
  4080. function cloneSymbol(symbol) {
  4081. return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
  4082. }
  4083. /**
  4084. * Creates a clone of `typedArray`.
  4085. *
  4086. * @private
  4087. * @param {Object} typedArray The typed array to clone.
  4088. * @param {boolean} [isDeep] Specify a deep clone.
  4089. * @returns {Object} Returns the cloned typed array.
  4090. */
  4091. function cloneTypedArray(typedArray, isDeep) {
  4092. var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  4093. return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
  4094. }
  4095. /**
  4096. * Copies the values of `source` to `array`.
  4097. *
  4098. * @private
  4099. * @param {Array} source The array to copy values from.
  4100. * @param {Array} [array=[]] The array to copy values to.
  4101. * @returns {Array} Returns `array`.
  4102. */
  4103. function copyArray(source, array) {
  4104. var index = -1,
  4105. length = source.length;
  4106. array || (array = Array(length));
  4107. while (++index < length) {
  4108. array[index] = source[index];
  4109. }
  4110. return array;
  4111. }
  4112. /**
  4113. * Copies properties of `source` to `object`.
  4114. *
  4115. * @private
  4116. * @param {Object} source The object to copy properties from.
  4117. * @param {Array} props The property identifiers to copy.
  4118. * @param {Object} [object={}] The object to copy properties to.
  4119. * @param {Function} [customizer] The function to customize copied values.
  4120. * @returns {Object} Returns `object`.
  4121. */
  4122. function copyObject(source, props, object, customizer) {
  4123. object || (object = {});
  4124. var index = -1,
  4125. length = props.length;
  4126. while (++index < length) {
  4127. var key = props[index];
  4128. var newValue = customizer
  4129. ? customizer(object[key], source[key], key, object, source)
  4130. : undefined;
  4131. assignValue(object, key, newValue === undefined ? source[key] : newValue);
  4132. }
  4133. return object;
  4134. }
  4135. /**
  4136. * Copies own symbol properties of `source` to `object`.
  4137. *
  4138. * @private
  4139. * @param {Object} source The object to copy symbols from.
  4140. * @param {Object} [object={}] The object to copy symbols to.
  4141. * @returns {Object} Returns `object`.
  4142. */
  4143. function copySymbols(source, object) {
  4144. return copyObject(source, getSymbols(source), object);
  4145. }
  4146. /**
  4147. * Creates an array of own enumerable property names and symbols of `object`.
  4148. *
  4149. * @private
  4150. * @param {Object} object The object to query.
  4151. * @returns {Array} Returns the array of property names and symbols.
  4152. */
  4153. function getAllKeys(object) {
  4154. return baseGetAllKeys(object, keys, getSymbols);
  4155. }
  4156. /**
  4157. * Gets the data for `map`.
  4158. *
  4159. * @private
  4160. * @param {Object} map The map to query.
  4161. * @param {string} key The reference key.
  4162. * @returns {*} Returns the map data.
  4163. */
  4164. function getMapData(map, key) {
  4165. var data = map.__data__;
  4166. return isKeyable(key)
  4167. ? data[typeof key == 'string' ? 'string' : 'hash']
  4168. : data.map;
  4169. }
  4170. /**
  4171. * Gets the native function at `key` of `object`.
  4172. *
  4173. * @private
  4174. * @param {Object} object The object to query.
  4175. * @param {string} key The key of the method to get.
  4176. * @returns {*} Returns the function if it's native, else `undefined`.
  4177. */
  4178. function getNative(object, key) {
  4179. var value = getValue(object, key);
  4180. return baseIsNative(value) ? value : undefined;
  4181. }
  4182. /**
  4183. * Creates an array of the own enumerable symbol properties of `object`.
  4184. *
  4185. * @private
  4186. * @param {Object} object The object to query.
  4187. * @returns {Array} Returns the array of symbols.
  4188. */
  4189. var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
  4190. /**
  4191. * Gets the `toStringTag` of `value`.
  4192. *
  4193. * @private
  4194. * @param {*} value The value to query.
  4195. * @returns {string} Returns the `toStringTag`.
  4196. */
  4197. var getTag = baseGetTag;
  4198. // Fallback for data views, maps, sets, and weak maps in IE 11,
  4199. // for data views in Edge < 14, and promises in Node.js.
  4200. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
  4201. (Map && getTag(new Map) != mapTag) ||
  4202. (Promise && getTag(Promise.resolve()) != promiseTag) ||
  4203. (Set && getTag(new Set) != setTag) ||
  4204. (WeakMap && getTag(new WeakMap) != weakMapTag)) {
  4205. getTag = function(value) {
  4206. var result = objectToString.call(value),
  4207. Ctor = result == objectTag ? value.constructor : undefined,
  4208. ctorString = Ctor ? toSource(Ctor) : undefined;
  4209. if (ctorString) {
  4210. switch (ctorString) {
  4211. case dataViewCtorString: return dataViewTag;
  4212. case mapCtorString: return mapTag;
  4213. case promiseCtorString: return promiseTag;
  4214. case setCtorString: return setTag;
  4215. case weakMapCtorString: return weakMapTag;
  4216. }
  4217. }
  4218. return result;
  4219. };
  4220. }
  4221. /**
  4222. * Initializes an array clone.
  4223. *
  4224. * @private
  4225. * @param {Array} array The array to clone.
  4226. * @returns {Array} Returns the initialized clone.
  4227. */
  4228. function initCloneArray(array) {
  4229. var length = array.length,
  4230. result = array.constructor(length);
  4231. // Add properties assigned by `RegExp#exec`.
  4232. if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
  4233. result.index = array.index;
  4234. result.input = array.input;
  4235. }
  4236. return result;
  4237. }
  4238. /**
  4239. * Initializes an object clone.
  4240. *
  4241. * @private
  4242. * @param {Object} object The object to clone.
  4243. * @returns {Object} Returns the initialized clone.
  4244. */
  4245. function initCloneObject(object) {
  4246. return (typeof object.constructor == 'function' && !isPrototype(object))
  4247. ? baseCreate(getPrototype(object))
  4248. : {};
  4249. }
  4250. /**
  4251. * Initializes an object clone based on its `toStringTag`.
  4252. *
  4253. * **Note:** This function only supports cloning values with tags of
  4254. * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
  4255. *
  4256. * @private
  4257. * @param {Object} object The object to clone.
  4258. * @param {string} tag The `toStringTag` of the object to clone.
  4259. * @param {Function} cloneFunc The function to clone values.
  4260. * @param {boolean} [isDeep] Specify a deep clone.
  4261. * @returns {Object} Returns the initialized clone.
  4262. */
  4263. function initCloneByTag(object, tag, cloneFunc, isDeep) {
  4264. var Ctor = object.constructor;
  4265. switch (tag) {
  4266. case arrayBufferTag:
  4267. return cloneArrayBuffer(object);
  4268. case boolTag:
  4269. case dateTag:
  4270. return new Ctor(+object);
  4271. case dataViewTag:
  4272. return cloneDataView(object, isDeep);
  4273. case float32Tag: case float64Tag:
  4274. case int8Tag: case int16Tag: case int32Tag:
  4275. case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
  4276. return cloneTypedArray(object, isDeep);
  4277. case mapTag:
  4278. return cloneMap(object, isDeep, cloneFunc);
  4279. case numberTag:
  4280. case stringTag:
  4281. return new Ctor(object);
  4282. case regexpTag:
  4283. return cloneRegExp(object);
  4284. case setTag:
  4285. return cloneSet(object, isDeep, cloneFunc);
  4286. case symbolTag:
  4287. return cloneSymbol(object);
  4288. }
  4289. }
  4290. /**
  4291. * Checks if `value` is a valid array-like index.
  4292. *
  4293. * @private
  4294. * @param {*} value The value to check.
  4295. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  4296. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  4297. */
  4298. function isIndex(value, length) {
  4299. length = length == null ? MAX_SAFE_INTEGER : length;
  4300. return !!length &&
  4301. (typeof value == 'number' || reIsUint.test(value)) &&
  4302. (value > -1 && value % 1 == 0 && value < length);
  4303. }
  4304. /**
  4305. * Checks if `value` is suitable for use as unique object key.
  4306. *
  4307. * @private
  4308. * @param {*} value The value to check.
  4309. * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  4310. */
  4311. function isKeyable(value) {
  4312. var type = typeof value;
  4313. return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
  4314. ? (value !== '__proto__')
  4315. : (value === null);
  4316. }
  4317. /**
  4318. * Checks if `func` has its source masked.
  4319. *
  4320. * @private
  4321. * @param {Function} func The function to check.
  4322. * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  4323. */
  4324. function isMasked(func) {
  4325. return !!maskSrcKey && (maskSrcKey in func);
  4326. }
  4327. /**
  4328. * Checks if `value` is likely a prototype object.
  4329. *
  4330. * @private
  4331. * @param {*} value The value to check.
  4332. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
  4333. */
  4334. function isPrototype(value) {
  4335. var Ctor = value && value.constructor,
  4336. proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
  4337. return value === proto;
  4338. }
  4339. /**
  4340. * Converts `func` to its source code.
  4341. *
  4342. * @private
  4343. * @param {Function} func The function to process.
  4344. * @returns {string} Returns the source code.
  4345. */
  4346. function toSource(func) {
  4347. if (func != null) {
  4348. try {
  4349. return funcToString.call(func);
  4350. } catch (e) {}
  4351. try {
  4352. return (func + '');
  4353. } catch (e) {}
  4354. }
  4355. return '';
  4356. }
  4357. /**
  4358. * This method is like `_.clone` except that it recursively clones `value`.
  4359. *
  4360. * @static
  4361. * @memberOf _
  4362. * @since 1.0.0
  4363. * @category Lang
  4364. * @param {*} value The value to recursively clone.
  4365. * @returns {*} Returns the deep cloned value.
  4366. * @see _.clone
  4367. * @example
  4368. *
  4369. * var objects = [{ 'a': 1 }, { 'b': 2 }];
  4370. *
  4371. * var deep = _.cloneDeep(objects);
  4372. * console.log(deep[0] === objects[0]);
  4373. * // => false
  4374. */
  4375. function cloneDeep(value) {
  4376. return baseClone(value, true, true);
  4377. }
  4378. /**
  4379. * Performs a
  4380. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  4381. * comparison between two values to determine if they are equivalent.
  4382. *
  4383. * @static
  4384. * @memberOf _
  4385. * @since 4.0.0
  4386. * @category Lang
  4387. * @param {*} value The value to compare.
  4388. * @param {*} other The other value to compare.
  4389. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  4390. * @example
  4391. *
  4392. * var object = { 'a': 1 };
  4393. * var other = { 'a': 1 };
  4394. *
  4395. * _.eq(object, object);
  4396. * // => true
  4397. *
  4398. * _.eq(object, other);
  4399. * // => false
  4400. *
  4401. * _.eq('a', 'a');
  4402. * // => true
  4403. *
  4404. * _.eq('a', Object('a'));
  4405. * // => false
  4406. *
  4407. * _.eq(NaN, NaN);
  4408. * // => true
  4409. */
  4410. function eq(value, other) {
  4411. return value === other || (value !== value && other !== other);
  4412. }
  4413. /**
  4414. * Checks if `value` is likely an `arguments` object.
  4415. *
  4416. * @static
  4417. * @memberOf _
  4418. * @since 0.1.0
  4419. * @category Lang
  4420. * @param {*} value The value to check.
  4421. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  4422. * else `false`.
  4423. * @example
  4424. *
  4425. * _.isArguments(function() { return arguments; }());
  4426. * // => true
  4427. *
  4428. * _.isArguments([1, 2, 3]);
  4429. * // => false
  4430. */
  4431. function isArguments(value) {
  4432. // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
  4433. return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
  4434. (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
  4435. }
  4436. /**
  4437. * Checks if `value` is classified as an `Array` object.
  4438. *
  4439. * @static
  4440. * @memberOf _
  4441. * @since 0.1.0
  4442. * @category Lang
  4443. * @param {*} value The value to check.
  4444. * @returns {boolean} Returns `true` if `value` is an array, else `false`.
  4445. * @example
  4446. *
  4447. * _.isArray([1, 2, 3]);
  4448. * // => true
  4449. *
  4450. * _.isArray(document.body.children);
  4451. * // => false
  4452. *
  4453. * _.isArray('abc');
  4454. * // => false
  4455. *
  4456. * _.isArray(_.noop);
  4457. * // => false
  4458. */
  4459. var isArray = Array.isArray;
  4460. /**
  4461. * Checks if `value` is array-like. A value is considered array-like if it's
  4462. * not a function and has a `value.length` that's an integer greater than or
  4463. * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
  4464. *
  4465. * @static
  4466. * @memberOf _
  4467. * @since 4.0.0
  4468. * @category Lang
  4469. * @param {*} value The value to check.
  4470. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  4471. * @example
  4472. *
  4473. * _.isArrayLike([1, 2, 3]);
  4474. * // => true
  4475. *
  4476. * _.isArrayLike(document.body.children);
  4477. * // => true
  4478. *
  4479. * _.isArrayLike('abc');
  4480. * // => true
  4481. *
  4482. * _.isArrayLike(_.noop);
  4483. * // => false
  4484. */
  4485. function isArrayLike(value) {
  4486. return value != null && isLength(value.length) && !isFunction(value);
  4487. }
  4488. /**
  4489. * This method is like `_.isArrayLike` except that it also checks if `value`
  4490. * is an object.
  4491. *
  4492. * @static
  4493. * @memberOf _
  4494. * @since 4.0.0
  4495. * @category Lang
  4496. * @param {*} value The value to check.
  4497. * @returns {boolean} Returns `true` if `value` is an array-like object,
  4498. * else `false`.
  4499. * @example
  4500. *
  4501. * _.isArrayLikeObject([1, 2, 3]);
  4502. * // => true
  4503. *
  4504. * _.isArrayLikeObject(document.body.children);
  4505. * // => true
  4506. *
  4507. * _.isArrayLikeObject('abc');
  4508. * // => false
  4509. *
  4510. * _.isArrayLikeObject(_.noop);
  4511. * // => false
  4512. */
  4513. function isArrayLikeObject(value) {
  4514. return isObjectLike(value) && isArrayLike(value);
  4515. }
  4516. /**
  4517. * Checks if `value` is a buffer.
  4518. *
  4519. * @static
  4520. * @memberOf _
  4521. * @since 4.3.0
  4522. * @category Lang
  4523. * @param {*} value The value to check.
  4524. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
  4525. * @example
  4526. *
  4527. * _.isBuffer(new Buffer(2));
  4528. * // => true
  4529. *
  4530. * _.isBuffer(new Uint8Array(2));
  4531. * // => false
  4532. */
  4533. var isBuffer = nativeIsBuffer || stubFalse;
  4534. /**
  4535. * Checks if `value` is classified as a `Function` object.
  4536. *
  4537. * @static
  4538. * @memberOf _
  4539. * @since 0.1.0
  4540. * @category Lang
  4541. * @param {*} value The value to check.
  4542. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  4543. * @example
  4544. *
  4545. * _.isFunction(_);
  4546. * // => true
  4547. *
  4548. * _.isFunction(/abc/);
  4549. * // => false
  4550. */
  4551. function isFunction(value) {
  4552. // The use of `Object#toString` avoids issues with the `typeof` operator
  4553. // in Safari 8-9 which returns 'object' for typed array and other constructors.
  4554. var tag = isObject(value) ? objectToString.call(value) : '';
  4555. return tag == funcTag || tag == genTag;
  4556. }
  4557. /**
  4558. * Checks if `value` is a valid array-like length.
  4559. *
  4560. * **Note:** This method is loosely based on
  4561. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  4562. *
  4563. * @static
  4564. * @memberOf _
  4565. * @since 4.0.0
  4566. * @category Lang
  4567. * @param {*} value The value to check.
  4568. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  4569. * @example
  4570. *
  4571. * _.isLength(3);
  4572. * // => true
  4573. *
  4574. * _.isLength(Number.MIN_VALUE);
  4575. * // => false
  4576. *
  4577. * _.isLength(Infinity);
  4578. * // => false
  4579. *
  4580. * _.isLength('3');
  4581. * // => false
  4582. */
  4583. function isLength(value) {
  4584. return typeof value == 'number' &&
  4585. value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  4586. }
  4587. /**
  4588. * Checks if `value` is the
  4589. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  4590. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  4591. *
  4592. * @static
  4593. * @memberOf _
  4594. * @since 0.1.0
  4595. * @category Lang
  4596. * @param {*} value The value to check.
  4597. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  4598. * @example
  4599. *
  4600. * _.isObject({});
  4601. * // => true
  4602. *
  4603. * _.isObject([1, 2, 3]);
  4604. * // => true
  4605. *
  4606. * _.isObject(_.noop);
  4607. * // => true
  4608. *
  4609. * _.isObject(null);
  4610. * // => false
  4611. */
  4612. function isObject(value) {
  4613. var type = typeof value;
  4614. return !!value && (type == 'object' || type == 'function');
  4615. }
  4616. /**
  4617. * Checks if `value` is object-like. A value is object-like if it's not `null`
  4618. * and has a `typeof` result of "object".
  4619. *
  4620. * @static
  4621. * @memberOf _
  4622. * @since 4.0.0
  4623. * @category Lang
  4624. * @param {*} value The value to check.
  4625. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  4626. * @example
  4627. *
  4628. * _.isObjectLike({});
  4629. * // => true
  4630. *
  4631. * _.isObjectLike([1, 2, 3]);
  4632. * // => true
  4633. *
  4634. * _.isObjectLike(_.noop);
  4635. * // => false
  4636. *
  4637. * _.isObjectLike(null);
  4638. * // => false
  4639. */
  4640. function isObjectLike(value) {
  4641. return !!value && typeof value == 'object';
  4642. }
  4643. /**
  4644. * Creates an array of the own enumerable property names of `object`.
  4645. *
  4646. * **Note:** Non-object values are coerced to objects. See the
  4647. * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  4648. * for more details.
  4649. *
  4650. * @static
  4651. * @since 0.1.0
  4652. * @memberOf _
  4653. * @category Object
  4654. * @param {Object} object The object to query.
  4655. * @returns {Array} Returns the array of property names.
  4656. * @example
  4657. *
  4658. * function Foo() {
  4659. * this.a = 1;
  4660. * this.b = 2;
  4661. * }
  4662. *
  4663. * Foo.prototype.c = 3;
  4664. *
  4665. * _.keys(new Foo);
  4666. * // => ['a', 'b'] (iteration order is not guaranteed)
  4667. *
  4668. * _.keys('hi');
  4669. * // => ['0', '1']
  4670. */
  4671. function keys(object) {
  4672. return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
  4673. }
  4674. /**
  4675. * This method returns a new empty array.
  4676. *
  4677. * @static
  4678. * @memberOf _
  4679. * @since 4.13.0
  4680. * @category Util
  4681. * @returns {Array} Returns the new empty array.
  4682. * @example
  4683. *
  4684. * var arrays = _.times(2, _.stubArray);
  4685. *
  4686. * console.log(arrays);
  4687. * // => [[], []]
  4688. *
  4689. * console.log(arrays[0] === arrays[1]);
  4690. * // => false
  4691. */
  4692. function stubArray() {
  4693. return [];
  4694. }
  4695. /**
  4696. * This method returns `false`.
  4697. *
  4698. * @static
  4699. * @memberOf _
  4700. * @since 4.13.0
  4701. * @category Util
  4702. * @returns {boolean} Returns `false`.
  4703. * @example
  4704. *
  4705. * _.times(2, _.stubFalse);
  4706. * // => [false, false]
  4707. */
  4708. function stubFalse() {
  4709. return false;
  4710. }
  4711. module.exports = cloneDeep;
  4712. /***/ }),
  4713. /***/ "./node_modules/lodash.isequal/index.js":
  4714. /*!**********************************************!*\
  4715. !*** ./node_modules/lodash.isequal/index.js ***!
  4716. \**********************************************/
  4717. /***/ ((module, exports, __webpack_require__) => {
  4718. /* module decorator */ module = __webpack_require__.nmd(module);
  4719. /**
  4720. * Lodash (Custom Build) <https://lodash.com/>
  4721. * Build: `lodash modularize exports="npm" -o ./`
  4722. * Copyright JS Foundation and other contributors <https://js.foundation/>
  4723. * Released under MIT license <https://lodash.com/license>
  4724. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  4725. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  4726. */
  4727. /** Used as the size to enable large array optimizations. */
  4728. var LARGE_ARRAY_SIZE = 200;
  4729. /** Used to stand-in for `undefined` hash values. */
  4730. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  4731. /** Used to compose bitmasks for value comparisons. */
  4732. var COMPARE_PARTIAL_FLAG = 1,
  4733. COMPARE_UNORDERED_FLAG = 2;
  4734. /** Used as references for various `Number` constants. */
  4735. var MAX_SAFE_INTEGER = 9007199254740991;
  4736. /** `Object#toString` result references. */
  4737. var argsTag = '[object Arguments]',
  4738. arrayTag = '[object Array]',
  4739. asyncTag = '[object AsyncFunction]',
  4740. boolTag = '[object Boolean]',
  4741. dateTag = '[object Date]',
  4742. errorTag = '[object Error]',
  4743. funcTag = '[object Function]',
  4744. genTag = '[object GeneratorFunction]',
  4745. mapTag = '[object Map]',
  4746. numberTag = '[object Number]',
  4747. nullTag = '[object Null]',
  4748. objectTag = '[object Object]',
  4749. promiseTag = '[object Promise]',
  4750. proxyTag = '[object Proxy]',
  4751. regexpTag = '[object RegExp]',
  4752. setTag = '[object Set]',
  4753. stringTag = '[object String]',
  4754. symbolTag = '[object Symbol]',
  4755. undefinedTag = '[object Undefined]',
  4756. weakMapTag = '[object WeakMap]';
  4757. var arrayBufferTag = '[object ArrayBuffer]',
  4758. dataViewTag = '[object DataView]',
  4759. float32Tag = '[object Float32Array]',
  4760. float64Tag = '[object Float64Array]',
  4761. int8Tag = '[object Int8Array]',
  4762. int16Tag = '[object Int16Array]',
  4763. int32Tag = '[object Int32Array]',
  4764. uint8Tag = '[object Uint8Array]',
  4765. uint8ClampedTag = '[object Uint8ClampedArray]',
  4766. uint16Tag = '[object Uint16Array]',
  4767. uint32Tag = '[object Uint32Array]';
  4768. /**
  4769. * Used to match `RegExp`
  4770. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  4771. */
  4772. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
  4773. /** Used to detect host constructors (Safari). */
  4774. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  4775. /** Used to detect unsigned integer values. */
  4776. var reIsUint = /^(?:0|[1-9]\d*)$/;
  4777. /** Used to identify `toStringTag` values of typed arrays. */
  4778. var typedArrayTags = {};
  4779. typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
  4780. typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
  4781. typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
  4782. typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
  4783. typedArrayTags[uint32Tag] = true;
  4784. typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
  4785. typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
  4786. typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
  4787. typedArrayTags[errorTag] = typedArrayTags[funcTag] =
  4788. typedArrayTags[mapTag] = typedArrayTags[numberTag] =
  4789. typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
  4790. typedArrayTags[setTag] = typedArrayTags[stringTag] =
  4791. typedArrayTags[weakMapTag] = false;
  4792. /** Detect free variable `global` from Node.js. */
  4793. var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;
  4794. /** Detect free variable `self`. */
  4795. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  4796. /** Used as a reference to the global object. */
  4797. var root = freeGlobal || freeSelf || Function('return this')();
  4798. /** Detect free variable `exports`. */
  4799. var freeExports = true && exports && !exports.nodeType && exports;
  4800. /** Detect free variable `module`. */
  4801. var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module;
  4802. /** Detect the popular CommonJS extension `module.exports`. */
  4803. var moduleExports = freeModule && freeModule.exports === freeExports;
  4804. /** Detect free variable `process` from Node.js. */
  4805. var freeProcess = moduleExports && freeGlobal.process;
  4806. /** Used to access faster Node.js helpers. */
  4807. var nodeUtil = (function() {
  4808. try {
  4809. return freeProcess && freeProcess.binding && freeProcess.binding('util');
  4810. } catch (e) {}
  4811. }());
  4812. /* Node.js helper references. */
  4813. var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
  4814. /**
  4815. * A specialized version of `_.filter` for arrays without support for
  4816. * iteratee shorthands.
  4817. *
  4818. * @private
  4819. * @param {Array} [array] The array to iterate over.
  4820. * @param {Function} predicate The function invoked per iteration.
  4821. * @returns {Array} Returns the new filtered array.
  4822. */
  4823. function arrayFilter(array, predicate) {
  4824. var index = -1,
  4825. length = array == null ? 0 : array.length,
  4826. resIndex = 0,
  4827. result = [];
  4828. while (++index < length) {
  4829. var value = array[index];
  4830. if (predicate(value, index, array)) {
  4831. result[resIndex++] = value;
  4832. }
  4833. }
  4834. return result;
  4835. }
  4836. /**
  4837. * Appends the elements of `values` to `array`.
  4838. *
  4839. * @private
  4840. * @param {Array} array The array to modify.
  4841. * @param {Array} values The values to append.
  4842. * @returns {Array} Returns `array`.
  4843. */
  4844. function arrayPush(array, values) {
  4845. var index = -1,
  4846. length = values.length,
  4847. offset = array.length;
  4848. while (++index < length) {
  4849. array[offset + index] = values[index];
  4850. }
  4851. return array;
  4852. }
  4853. /**
  4854. * A specialized version of `_.some` for arrays without support for iteratee
  4855. * shorthands.
  4856. *
  4857. * @private
  4858. * @param {Array} [array] The array to iterate over.
  4859. * @param {Function} predicate The function invoked per iteration.
  4860. * @returns {boolean} Returns `true` if any element passes the predicate check,
  4861. * else `false`.
  4862. */
  4863. function arraySome(array, predicate) {
  4864. var index = -1,
  4865. length = array == null ? 0 : array.length;
  4866. while (++index < length) {
  4867. if (predicate(array[index], index, array)) {
  4868. return true;
  4869. }
  4870. }
  4871. return false;
  4872. }
  4873. /**
  4874. * The base implementation of `_.times` without support for iteratee shorthands
  4875. * or max array length checks.
  4876. *
  4877. * @private
  4878. * @param {number} n The number of times to invoke `iteratee`.
  4879. * @param {Function} iteratee The function invoked per iteration.
  4880. * @returns {Array} Returns the array of results.
  4881. */
  4882. function baseTimes(n, iteratee) {
  4883. var index = -1,
  4884. result = Array(n);
  4885. while (++index < n) {
  4886. result[index] = iteratee(index);
  4887. }
  4888. return result;
  4889. }
  4890. /**
  4891. * The base implementation of `_.unary` without support for storing metadata.
  4892. *
  4893. * @private
  4894. * @param {Function} func The function to cap arguments for.
  4895. * @returns {Function} Returns the new capped function.
  4896. */
  4897. function baseUnary(func) {
  4898. return function(value) {
  4899. return func(value);
  4900. };
  4901. }
  4902. /**
  4903. * Checks if a `cache` value for `key` exists.
  4904. *
  4905. * @private
  4906. * @param {Object} cache The cache to query.
  4907. * @param {string} key The key of the entry to check.
  4908. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  4909. */
  4910. function cacheHas(cache, key) {
  4911. return cache.has(key);
  4912. }
  4913. /**
  4914. * Gets the value at `key` of `object`.
  4915. *
  4916. * @private
  4917. * @param {Object} [object] The object to query.
  4918. * @param {string} key The key of the property to get.
  4919. * @returns {*} Returns the property value.
  4920. */
  4921. function getValue(object, key) {
  4922. return object == null ? undefined : object[key];
  4923. }
  4924. /**
  4925. * Converts `map` to its key-value pairs.
  4926. *
  4927. * @private
  4928. * @param {Object} map The map to convert.
  4929. * @returns {Array} Returns the key-value pairs.
  4930. */
  4931. function mapToArray(map) {
  4932. var index = -1,
  4933. result = Array(map.size);
  4934. map.forEach(function(value, key) {
  4935. result[++index] = [key, value];
  4936. });
  4937. return result;
  4938. }
  4939. /**
  4940. * Creates a unary function that invokes `func` with its argument transformed.
  4941. *
  4942. * @private
  4943. * @param {Function} func The function to wrap.
  4944. * @param {Function} transform The argument transform.
  4945. * @returns {Function} Returns the new function.
  4946. */
  4947. function overArg(func, transform) {
  4948. return function(arg) {
  4949. return func(transform(arg));
  4950. };
  4951. }
  4952. /**
  4953. * Converts `set` to an array of its values.
  4954. *
  4955. * @private
  4956. * @param {Object} set The set to convert.
  4957. * @returns {Array} Returns the values.
  4958. */
  4959. function setToArray(set) {
  4960. var index = -1,
  4961. result = Array(set.size);
  4962. set.forEach(function(value) {
  4963. result[++index] = value;
  4964. });
  4965. return result;
  4966. }
  4967. /** Used for built-in method references. */
  4968. var arrayProto = Array.prototype,
  4969. funcProto = Function.prototype,
  4970. objectProto = Object.prototype;
  4971. /** Used to detect overreaching core-js shims. */
  4972. var coreJsData = root['__core-js_shared__'];
  4973. /** Used to resolve the decompiled source of functions. */
  4974. var funcToString = funcProto.toString;
  4975. /** Used to check objects for own properties. */
  4976. var hasOwnProperty = objectProto.hasOwnProperty;
  4977. /** Used to detect methods masquerading as native. */
  4978. var maskSrcKey = (function() {
  4979. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  4980. return uid ? ('Symbol(src)_1.' + uid) : '';
  4981. }());
  4982. /**
  4983. * Used to resolve the
  4984. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  4985. * of values.
  4986. */
  4987. var nativeObjectToString = objectProto.toString;
  4988. /** Used to detect if a method is native. */
  4989. var reIsNative = RegExp('^' +
  4990. funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
  4991. .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  4992. );
  4993. /** Built-in value references. */
  4994. var Buffer = moduleExports ? root.Buffer : undefined,
  4995. Symbol = root.Symbol,
  4996. Uint8Array = root.Uint8Array,
  4997. propertyIsEnumerable = objectProto.propertyIsEnumerable,
  4998. splice = arrayProto.splice,
  4999. symToStringTag = Symbol ? Symbol.toStringTag : undefined;
  5000. /* Built-in method references for those with the same name as other `lodash` methods. */
  5001. var nativeGetSymbols = Object.getOwnPropertySymbols,
  5002. nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
  5003. nativeKeys = overArg(Object.keys, Object);
  5004. /* Built-in method references that are verified to be native. */
  5005. var DataView = getNative(root, 'DataView'),
  5006. Map = getNative(root, 'Map'),
  5007. Promise = getNative(root, 'Promise'),
  5008. Set = getNative(root, 'Set'),
  5009. WeakMap = getNative(root, 'WeakMap'),
  5010. nativeCreate = getNative(Object, 'create');
  5011. /** Used to detect maps, sets, and weakmaps. */
  5012. var dataViewCtorString = toSource(DataView),
  5013. mapCtorString = toSource(Map),
  5014. promiseCtorString = toSource(Promise),
  5015. setCtorString = toSource(Set),
  5016. weakMapCtorString = toSource(WeakMap);
  5017. /** Used to convert symbols to primitives and strings. */
  5018. var symbolProto = Symbol ? Symbol.prototype : undefined,
  5019. symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
  5020. /**
  5021. * Creates a hash object.
  5022. *
  5023. * @private
  5024. * @constructor
  5025. * @param {Array} [entries] The key-value pairs to cache.
  5026. */
  5027. function Hash(entries) {
  5028. var index = -1,
  5029. length = entries == null ? 0 : entries.length;
  5030. this.clear();
  5031. while (++index < length) {
  5032. var entry = entries[index];
  5033. this.set(entry[0], entry[1]);
  5034. }
  5035. }
  5036. /**
  5037. * Removes all key-value entries from the hash.
  5038. *
  5039. * @private
  5040. * @name clear
  5041. * @memberOf Hash
  5042. */
  5043. function hashClear() {
  5044. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  5045. this.size = 0;
  5046. }
  5047. /**
  5048. * Removes `key` and its value from the hash.
  5049. *
  5050. * @private
  5051. * @name delete
  5052. * @memberOf Hash
  5053. * @param {Object} hash The hash to modify.
  5054. * @param {string} key The key of the value to remove.
  5055. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  5056. */
  5057. function hashDelete(key) {
  5058. var result = this.has(key) && delete this.__data__[key];
  5059. this.size -= result ? 1 : 0;
  5060. return result;
  5061. }
  5062. /**
  5063. * Gets the hash value for `key`.
  5064. *
  5065. * @private
  5066. * @name get
  5067. * @memberOf Hash
  5068. * @param {string} key The key of the value to get.
  5069. * @returns {*} Returns the entry value.
  5070. */
  5071. function hashGet(key) {
  5072. var data = this.__data__;
  5073. if (nativeCreate) {
  5074. var result = data[key];
  5075. return result === HASH_UNDEFINED ? undefined : result;
  5076. }
  5077. return hasOwnProperty.call(data, key) ? data[key] : undefined;
  5078. }
  5079. /**
  5080. * Checks if a hash value for `key` exists.
  5081. *
  5082. * @private
  5083. * @name has
  5084. * @memberOf Hash
  5085. * @param {string} key The key of the entry to check.
  5086. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  5087. */
  5088. function hashHas(key) {
  5089. var data = this.__data__;
  5090. return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
  5091. }
  5092. /**
  5093. * Sets the hash `key` to `value`.
  5094. *
  5095. * @private
  5096. * @name set
  5097. * @memberOf Hash
  5098. * @param {string} key The key of the value to set.
  5099. * @param {*} value The value to set.
  5100. * @returns {Object} Returns the hash instance.
  5101. */
  5102. function hashSet(key, value) {
  5103. var data = this.__data__;
  5104. this.size += this.has(key) ? 0 : 1;
  5105. data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
  5106. return this;
  5107. }
  5108. // Add methods to `Hash`.
  5109. Hash.prototype.clear = hashClear;
  5110. Hash.prototype['delete'] = hashDelete;
  5111. Hash.prototype.get = hashGet;
  5112. Hash.prototype.has = hashHas;
  5113. Hash.prototype.set = hashSet;
  5114. /**
  5115. * Creates an list cache object.
  5116. *
  5117. * @private
  5118. * @constructor
  5119. * @param {Array} [entries] The key-value pairs to cache.
  5120. */
  5121. function ListCache(entries) {
  5122. var index = -1,
  5123. length = entries == null ? 0 : entries.length;
  5124. this.clear();
  5125. while (++index < length) {
  5126. var entry = entries[index];
  5127. this.set(entry[0], entry[1]);
  5128. }
  5129. }
  5130. /**
  5131. * Removes all key-value entries from the list cache.
  5132. *
  5133. * @private
  5134. * @name clear
  5135. * @memberOf ListCache
  5136. */
  5137. function listCacheClear() {
  5138. this.__data__ = [];
  5139. this.size = 0;
  5140. }
  5141. /**
  5142. * Removes `key` and its value from the list cache.
  5143. *
  5144. * @private
  5145. * @name delete
  5146. * @memberOf ListCache
  5147. * @param {string} key The key of the value to remove.
  5148. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  5149. */
  5150. function listCacheDelete(key) {
  5151. var data = this.__data__,
  5152. index = assocIndexOf(data, key);
  5153. if (index < 0) {
  5154. return false;
  5155. }
  5156. var lastIndex = data.length - 1;
  5157. if (index == lastIndex) {
  5158. data.pop();
  5159. } else {
  5160. splice.call(data, index, 1);
  5161. }
  5162. --this.size;
  5163. return true;
  5164. }
  5165. /**
  5166. * Gets the list cache value for `key`.
  5167. *
  5168. * @private
  5169. * @name get
  5170. * @memberOf ListCache
  5171. * @param {string} key The key of the value to get.
  5172. * @returns {*} Returns the entry value.
  5173. */
  5174. function listCacheGet(key) {
  5175. var data = this.__data__,
  5176. index = assocIndexOf(data, key);
  5177. return index < 0 ? undefined : data[index][1];
  5178. }
  5179. /**
  5180. * Checks if a list cache value for `key` exists.
  5181. *
  5182. * @private
  5183. * @name has
  5184. * @memberOf ListCache
  5185. * @param {string} key The key of the entry to check.
  5186. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  5187. */
  5188. function listCacheHas(key) {
  5189. return assocIndexOf(this.__data__, key) > -1;
  5190. }
  5191. /**
  5192. * Sets the list cache `key` to `value`.
  5193. *
  5194. * @private
  5195. * @name set
  5196. * @memberOf ListCache
  5197. * @param {string} key The key of the value to set.
  5198. * @param {*} value The value to set.
  5199. * @returns {Object} Returns the list cache instance.
  5200. */
  5201. function listCacheSet(key, value) {
  5202. var data = this.__data__,
  5203. index = assocIndexOf(data, key);
  5204. if (index < 0) {
  5205. ++this.size;
  5206. data.push([key, value]);
  5207. } else {
  5208. data[index][1] = value;
  5209. }
  5210. return this;
  5211. }
  5212. // Add methods to `ListCache`.
  5213. ListCache.prototype.clear = listCacheClear;
  5214. ListCache.prototype['delete'] = listCacheDelete;
  5215. ListCache.prototype.get = listCacheGet;
  5216. ListCache.prototype.has = listCacheHas;
  5217. ListCache.prototype.set = listCacheSet;
  5218. /**
  5219. * Creates a map cache object to store key-value pairs.
  5220. *
  5221. * @private
  5222. * @constructor
  5223. * @param {Array} [entries] The key-value pairs to cache.
  5224. */
  5225. function MapCache(entries) {
  5226. var index = -1,
  5227. length = entries == null ? 0 : entries.length;
  5228. this.clear();
  5229. while (++index < length) {
  5230. var entry = entries[index];
  5231. this.set(entry[0], entry[1]);
  5232. }
  5233. }
  5234. /**
  5235. * Removes all key-value entries from the map.
  5236. *
  5237. * @private
  5238. * @name clear
  5239. * @memberOf MapCache
  5240. */
  5241. function mapCacheClear() {
  5242. this.size = 0;
  5243. this.__data__ = {
  5244. 'hash': new Hash,
  5245. 'map': new (Map || ListCache),
  5246. 'string': new Hash
  5247. };
  5248. }
  5249. /**
  5250. * Removes `key` and its value from the map.
  5251. *
  5252. * @private
  5253. * @name delete
  5254. * @memberOf MapCache
  5255. * @param {string} key The key of the value to remove.
  5256. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  5257. */
  5258. function mapCacheDelete(key) {
  5259. var result = getMapData(this, key)['delete'](key);
  5260. this.size -= result ? 1 : 0;
  5261. return result;
  5262. }
  5263. /**
  5264. * Gets the map value for `key`.
  5265. *
  5266. * @private
  5267. * @name get
  5268. * @memberOf MapCache
  5269. * @param {string} key The key of the value to get.
  5270. * @returns {*} Returns the entry value.
  5271. */
  5272. function mapCacheGet(key) {
  5273. return getMapData(this, key).get(key);
  5274. }
  5275. /**
  5276. * Checks if a map value for `key` exists.
  5277. *
  5278. * @private
  5279. * @name has
  5280. * @memberOf MapCache
  5281. * @param {string} key The key of the entry to check.
  5282. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  5283. */
  5284. function mapCacheHas(key) {
  5285. return getMapData(this, key).has(key);
  5286. }
  5287. /**
  5288. * Sets the map `key` to `value`.
  5289. *
  5290. * @private
  5291. * @name set
  5292. * @memberOf MapCache
  5293. * @param {string} key The key of the value to set.
  5294. * @param {*} value The value to set.
  5295. * @returns {Object} Returns the map cache instance.
  5296. */
  5297. function mapCacheSet(key, value) {
  5298. var data = getMapData(this, key),
  5299. size = data.size;
  5300. data.set(key, value);
  5301. this.size += data.size == size ? 0 : 1;
  5302. return this;
  5303. }
  5304. // Add methods to `MapCache`.
  5305. MapCache.prototype.clear = mapCacheClear;
  5306. MapCache.prototype['delete'] = mapCacheDelete;
  5307. MapCache.prototype.get = mapCacheGet;
  5308. MapCache.prototype.has = mapCacheHas;
  5309. MapCache.prototype.set = mapCacheSet;
  5310. /**
  5311. *
  5312. * Creates an array cache object to store unique values.
  5313. *
  5314. * @private
  5315. * @constructor
  5316. * @param {Array} [values] The values to cache.
  5317. */
  5318. function SetCache(values) {
  5319. var index = -1,
  5320. length = values == null ? 0 : values.length;
  5321. this.__data__ = new MapCache;
  5322. while (++index < length) {
  5323. this.add(values[index]);
  5324. }
  5325. }
  5326. /**
  5327. * Adds `value` to the array cache.
  5328. *
  5329. * @private
  5330. * @name add
  5331. * @memberOf SetCache
  5332. * @alias push
  5333. * @param {*} value The value to cache.
  5334. * @returns {Object} Returns the cache instance.
  5335. */
  5336. function setCacheAdd(value) {
  5337. this.__data__.set(value, HASH_UNDEFINED);
  5338. return this;
  5339. }
  5340. /**
  5341. * Checks if `value` is in the array cache.
  5342. *
  5343. * @private
  5344. * @name has
  5345. * @memberOf SetCache
  5346. * @param {*} value The value to search for.
  5347. * @returns {number} Returns `true` if `value` is found, else `false`.
  5348. */
  5349. function setCacheHas(value) {
  5350. return this.__data__.has(value);
  5351. }
  5352. // Add methods to `SetCache`.
  5353. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
  5354. SetCache.prototype.has = setCacheHas;
  5355. /**
  5356. * Creates a stack cache object to store key-value pairs.
  5357. *
  5358. * @private
  5359. * @constructor
  5360. * @param {Array} [entries] The key-value pairs to cache.
  5361. */
  5362. function Stack(entries) {
  5363. var data = this.__data__ = new ListCache(entries);
  5364. this.size = data.size;
  5365. }
  5366. /**
  5367. * Removes all key-value entries from the stack.
  5368. *
  5369. * @private
  5370. * @name clear
  5371. * @memberOf Stack
  5372. */
  5373. function stackClear() {
  5374. this.__data__ = new ListCache;
  5375. this.size = 0;
  5376. }
  5377. /**
  5378. * Removes `key` and its value from the stack.
  5379. *
  5380. * @private
  5381. * @name delete
  5382. * @memberOf Stack
  5383. * @param {string} key The key of the value to remove.
  5384. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  5385. */
  5386. function stackDelete(key) {
  5387. var data = this.__data__,
  5388. result = data['delete'](key);
  5389. this.size = data.size;
  5390. return result;
  5391. }
  5392. /**
  5393. * Gets the stack value for `key`.
  5394. *
  5395. * @private
  5396. * @name get
  5397. * @memberOf Stack
  5398. * @param {string} key The key of the value to get.
  5399. * @returns {*} Returns the entry value.
  5400. */
  5401. function stackGet(key) {
  5402. return this.__data__.get(key);
  5403. }
  5404. /**
  5405. * Checks if a stack value for `key` exists.
  5406. *
  5407. * @private
  5408. * @name has
  5409. * @memberOf Stack
  5410. * @param {string} key The key of the entry to check.
  5411. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  5412. */
  5413. function stackHas(key) {
  5414. return this.__data__.has(key);
  5415. }
  5416. /**
  5417. * Sets the stack `key` to `value`.
  5418. *
  5419. * @private
  5420. * @name set
  5421. * @memberOf Stack
  5422. * @param {string} key The key of the value to set.
  5423. * @param {*} value The value to set.
  5424. * @returns {Object} Returns the stack cache instance.
  5425. */
  5426. function stackSet(key, value) {
  5427. var data = this.__data__;
  5428. if (data instanceof ListCache) {
  5429. var pairs = data.__data__;
  5430. if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
  5431. pairs.push([key, value]);
  5432. this.size = ++data.size;
  5433. return this;
  5434. }
  5435. data = this.__data__ = new MapCache(pairs);
  5436. }
  5437. data.set(key, value);
  5438. this.size = data.size;
  5439. return this;
  5440. }
  5441. // Add methods to `Stack`.
  5442. Stack.prototype.clear = stackClear;
  5443. Stack.prototype['delete'] = stackDelete;
  5444. Stack.prototype.get = stackGet;
  5445. Stack.prototype.has = stackHas;
  5446. Stack.prototype.set = stackSet;
  5447. /**
  5448. * Creates an array of the enumerable property names of the array-like `value`.
  5449. *
  5450. * @private
  5451. * @param {*} value The value to query.
  5452. * @param {boolean} inherited Specify returning inherited property names.
  5453. * @returns {Array} Returns the array of property names.
  5454. */
  5455. function arrayLikeKeys(value, inherited) {
  5456. var isArr = isArray(value),
  5457. isArg = !isArr && isArguments(value),
  5458. isBuff = !isArr && !isArg && isBuffer(value),
  5459. isType = !isArr && !isArg && !isBuff && isTypedArray(value),
  5460. skipIndexes = isArr || isArg || isBuff || isType,
  5461. result = skipIndexes ? baseTimes(value.length, String) : [],
  5462. length = result.length;
  5463. for (var key in value) {
  5464. if ((inherited || hasOwnProperty.call(value, key)) &&
  5465. !(skipIndexes && (
  5466. // Safari 9 has enumerable `arguments.length` in strict mode.
  5467. key == 'length' ||
  5468. // Node.js 0.10 has enumerable non-index properties on buffers.
  5469. (isBuff && (key == 'offset' || key == 'parent')) ||
  5470. // PhantomJS 2 has enumerable non-index properties on typed arrays.
  5471. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
  5472. // Skip index properties.
  5473. isIndex(key, length)
  5474. ))) {
  5475. result.push(key);
  5476. }
  5477. }
  5478. return result;
  5479. }
  5480. /**
  5481. * Gets the index at which the `key` is found in `array` of key-value pairs.
  5482. *
  5483. * @private
  5484. * @param {Array} array The array to inspect.
  5485. * @param {*} key The key to search for.
  5486. * @returns {number} Returns the index of the matched value, else `-1`.
  5487. */
  5488. function assocIndexOf(array, key) {
  5489. var length = array.length;
  5490. while (length--) {
  5491. if (eq(array[length][0], key)) {
  5492. return length;
  5493. }
  5494. }
  5495. return -1;
  5496. }
  5497. /**
  5498. * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
  5499. * `keysFunc` and `symbolsFunc` to get the enumerable property names and
  5500. * symbols of `object`.
  5501. *
  5502. * @private
  5503. * @param {Object} object The object to query.
  5504. * @param {Function} keysFunc The function to get the keys of `object`.
  5505. * @param {Function} symbolsFunc The function to get the symbols of `object`.
  5506. * @returns {Array} Returns the array of property names and symbols.
  5507. */
  5508. function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  5509. var result = keysFunc(object);
  5510. return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
  5511. }
  5512. /**
  5513. * The base implementation of `getTag` without fallbacks for buggy environments.
  5514. *
  5515. * @private
  5516. * @param {*} value The value to query.
  5517. * @returns {string} Returns the `toStringTag`.
  5518. */
  5519. function baseGetTag(value) {
  5520. if (value == null) {
  5521. return value === undefined ? undefinedTag : nullTag;
  5522. }
  5523. return (symToStringTag && symToStringTag in Object(value))
  5524. ? getRawTag(value)
  5525. : objectToString(value);
  5526. }
  5527. /**
  5528. * The base implementation of `_.isArguments`.
  5529. *
  5530. * @private
  5531. * @param {*} value The value to check.
  5532. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  5533. */
  5534. function baseIsArguments(value) {
  5535. return isObjectLike(value) && baseGetTag(value) == argsTag;
  5536. }
  5537. /**
  5538. * The base implementation of `_.isEqual` which supports partial comparisons
  5539. * and tracks traversed objects.
  5540. *
  5541. * @private
  5542. * @param {*} value The value to compare.
  5543. * @param {*} other The other value to compare.
  5544. * @param {boolean} bitmask The bitmask flags.
  5545. * 1 - Unordered comparison
  5546. * 2 - Partial comparison
  5547. * @param {Function} [customizer] The function to customize comparisons.
  5548. * @param {Object} [stack] Tracks traversed `value` and `other` objects.
  5549. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  5550. */
  5551. function baseIsEqual(value, other, bitmask, customizer, stack) {
  5552. if (value === other) {
  5553. return true;
  5554. }
  5555. if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
  5556. return value !== value && other !== other;
  5557. }
  5558. return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
  5559. }
  5560. /**
  5561. * A specialized version of `baseIsEqual` for arrays and objects which performs
  5562. * deep comparisons and tracks traversed objects enabling objects with circular
  5563. * references to be compared.
  5564. *
  5565. * @private
  5566. * @param {Object} object The object to compare.
  5567. * @param {Object} other The other object to compare.
  5568. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  5569. * @param {Function} customizer The function to customize comparisons.
  5570. * @param {Function} equalFunc The function to determine equivalents of values.
  5571. * @param {Object} [stack] Tracks traversed `object` and `other` objects.
  5572. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  5573. */
  5574. function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
  5575. var objIsArr = isArray(object),
  5576. othIsArr = isArray(other),
  5577. objTag = objIsArr ? arrayTag : getTag(object),
  5578. othTag = othIsArr ? arrayTag : getTag(other);
  5579. objTag = objTag == argsTag ? objectTag : objTag;
  5580. othTag = othTag == argsTag ? objectTag : othTag;
  5581. var objIsObj = objTag == objectTag,
  5582. othIsObj = othTag == objectTag,
  5583. isSameTag = objTag == othTag;
  5584. if (isSameTag && isBuffer(object)) {
  5585. if (!isBuffer(other)) {
  5586. return false;
  5587. }
  5588. objIsArr = true;
  5589. objIsObj = false;
  5590. }
  5591. if (isSameTag && !objIsObj) {
  5592. stack || (stack = new Stack);
  5593. return (objIsArr || isTypedArray(object))
  5594. ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
  5595. : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
  5596. }
  5597. if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
  5598. var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
  5599. othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
  5600. if (objIsWrapped || othIsWrapped) {
  5601. var objUnwrapped = objIsWrapped ? object.value() : object,
  5602. othUnwrapped = othIsWrapped ? other.value() : other;
  5603. stack || (stack = new Stack);
  5604. return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
  5605. }
  5606. }
  5607. if (!isSameTag) {
  5608. return false;
  5609. }
  5610. stack || (stack = new Stack);
  5611. return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
  5612. }
  5613. /**
  5614. * The base implementation of `_.isNative` without bad shim checks.
  5615. *
  5616. * @private
  5617. * @param {*} value The value to check.
  5618. * @returns {boolean} Returns `true` if `value` is a native function,
  5619. * else `false`.
  5620. */
  5621. function baseIsNative(value) {
  5622. if (!isObject(value) || isMasked(value)) {
  5623. return false;
  5624. }
  5625. var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
  5626. return pattern.test(toSource(value));
  5627. }
  5628. /**
  5629. * The base implementation of `_.isTypedArray` without Node.js optimizations.
  5630. *
  5631. * @private
  5632. * @param {*} value The value to check.
  5633. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  5634. */
  5635. function baseIsTypedArray(value) {
  5636. return isObjectLike(value) &&
  5637. isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
  5638. }
  5639. /**
  5640. * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
  5641. *
  5642. * @private
  5643. * @param {Object} object The object to query.
  5644. * @returns {Array} Returns the array of property names.
  5645. */
  5646. function baseKeys(object) {
  5647. if (!isPrototype(object)) {
  5648. return nativeKeys(object);
  5649. }
  5650. var result = [];
  5651. for (var key in Object(object)) {
  5652. if (hasOwnProperty.call(object, key) && key != 'constructor') {
  5653. result.push(key);
  5654. }
  5655. }
  5656. return result;
  5657. }
  5658. /**
  5659. * A specialized version of `baseIsEqualDeep` for arrays with support for
  5660. * partial deep comparisons.
  5661. *
  5662. * @private
  5663. * @param {Array} array The array to compare.
  5664. * @param {Array} other The other array to compare.
  5665. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  5666. * @param {Function} customizer The function to customize comparisons.
  5667. * @param {Function} equalFunc The function to determine equivalents of values.
  5668. * @param {Object} stack Tracks traversed `array` and `other` objects.
  5669. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
  5670. */
  5671. function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
  5672. var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
  5673. arrLength = array.length,
  5674. othLength = other.length;
  5675. if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
  5676. return false;
  5677. }
  5678. // Assume cyclic values are equal.
  5679. var stacked = stack.get(array);
  5680. if (stacked && stack.get(other)) {
  5681. return stacked == other;
  5682. }
  5683. var index = -1,
  5684. result = true,
  5685. seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
  5686. stack.set(array, other);
  5687. stack.set(other, array);
  5688. // Ignore non-index properties.
  5689. while (++index < arrLength) {
  5690. var arrValue = array[index],
  5691. othValue = other[index];
  5692. if (customizer) {
  5693. var compared = isPartial
  5694. ? customizer(othValue, arrValue, index, other, array, stack)
  5695. : customizer(arrValue, othValue, index, array, other, stack);
  5696. }
  5697. if (compared !== undefined) {
  5698. if (compared) {
  5699. continue;
  5700. }
  5701. result = false;
  5702. break;
  5703. }
  5704. // Recursively compare arrays (susceptible to call stack limits).
  5705. if (seen) {
  5706. if (!arraySome(other, function(othValue, othIndex) {
  5707. if (!cacheHas(seen, othIndex) &&
  5708. (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
  5709. return seen.push(othIndex);
  5710. }
  5711. })) {
  5712. result = false;
  5713. break;
  5714. }
  5715. } else if (!(
  5716. arrValue === othValue ||
  5717. equalFunc(arrValue, othValue, bitmask, customizer, stack)
  5718. )) {
  5719. result = false;
  5720. break;
  5721. }
  5722. }
  5723. stack['delete'](array);
  5724. stack['delete'](other);
  5725. return result;
  5726. }
  5727. /**
  5728. * A specialized version of `baseIsEqualDeep` for comparing objects of
  5729. * the same `toStringTag`.
  5730. *
  5731. * **Note:** This function only supports comparing values with tags of
  5732. * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
  5733. *
  5734. * @private
  5735. * @param {Object} object The object to compare.
  5736. * @param {Object} other The other object to compare.
  5737. * @param {string} tag The `toStringTag` of the objects to compare.
  5738. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  5739. * @param {Function} customizer The function to customize comparisons.
  5740. * @param {Function} equalFunc The function to determine equivalents of values.
  5741. * @param {Object} stack Tracks traversed `object` and `other` objects.
  5742. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  5743. */
  5744. function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
  5745. switch (tag) {
  5746. case dataViewTag:
  5747. if ((object.byteLength != other.byteLength) ||
  5748. (object.byteOffset != other.byteOffset)) {
  5749. return false;
  5750. }
  5751. object = object.buffer;
  5752. other = other.buffer;
  5753. case arrayBufferTag:
  5754. if ((object.byteLength != other.byteLength) ||
  5755. !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
  5756. return false;
  5757. }
  5758. return true;
  5759. case boolTag:
  5760. case dateTag:
  5761. case numberTag:
  5762. // Coerce booleans to `1` or `0` and dates to milliseconds.
  5763. // Invalid dates are coerced to `NaN`.
  5764. return eq(+object, +other);
  5765. case errorTag:
  5766. return object.name == other.name && object.message == other.message;
  5767. case regexpTag:
  5768. case stringTag:
  5769. // Coerce regexes to strings and treat strings, primitives and objects,
  5770. // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
  5771. // for more details.
  5772. return object == (other + '');
  5773. case mapTag:
  5774. var convert = mapToArray;
  5775. case setTag:
  5776. var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
  5777. convert || (convert = setToArray);
  5778. if (object.size != other.size && !isPartial) {
  5779. return false;
  5780. }
  5781. // Assume cyclic values are equal.
  5782. var stacked = stack.get(object);
  5783. if (stacked) {
  5784. return stacked == other;
  5785. }
  5786. bitmask |= COMPARE_UNORDERED_FLAG;
  5787. // Recursively compare objects (susceptible to call stack limits).
  5788. stack.set(object, other);
  5789. var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
  5790. stack['delete'](object);
  5791. return result;
  5792. case symbolTag:
  5793. if (symbolValueOf) {
  5794. return symbolValueOf.call(object) == symbolValueOf.call(other);
  5795. }
  5796. }
  5797. return false;
  5798. }
  5799. /**
  5800. * A specialized version of `baseIsEqualDeep` for objects with support for
  5801. * partial deep comparisons.
  5802. *
  5803. * @private
  5804. * @param {Object} object The object to compare.
  5805. * @param {Object} other The other object to compare.
  5806. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  5807. * @param {Function} customizer The function to customize comparisons.
  5808. * @param {Function} equalFunc The function to determine equivalents of values.
  5809. * @param {Object} stack Tracks traversed `object` and `other` objects.
  5810. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  5811. */
  5812. function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
  5813. var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
  5814. objProps = getAllKeys(object),
  5815. objLength = objProps.length,
  5816. othProps = getAllKeys(other),
  5817. othLength = othProps.length;
  5818. if (objLength != othLength && !isPartial) {
  5819. return false;
  5820. }
  5821. var index = objLength;
  5822. while (index--) {
  5823. var key = objProps[index];
  5824. if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
  5825. return false;
  5826. }
  5827. }
  5828. // Assume cyclic values are equal.
  5829. var stacked = stack.get(object);
  5830. if (stacked && stack.get(other)) {
  5831. return stacked == other;
  5832. }
  5833. var result = true;
  5834. stack.set(object, other);
  5835. stack.set(other, object);
  5836. var skipCtor = isPartial;
  5837. while (++index < objLength) {
  5838. key = objProps[index];
  5839. var objValue = object[key],
  5840. othValue = other[key];
  5841. if (customizer) {
  5842. var compared = isPartial
  5843. ? customizer(othValue, objValue, key, other, object, stack)
  5844. : customizer(objValue, othValue, key, object, other, stack);
  5845. }
  5846. // Recursively compare objects (susceptible to call stack limits).
  5847. if (!(compared === undefined
  5848. ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
  5849. : compared
  5850. )) {
  5851. result = false;
  5852. break;
  5853. }
  5854. skipCtor || (skipCtor = key == 'constructor');
  5855. }
  5856. if (result && !skipCtor) {
  5857. var objCtor = object.constructor,
  5858. othCtor = other.constructor;
  5859. // Non `Object` object instances with different constructors are not equal.
  5860. if (objCtor != othCtor &&
  5861. ('constructor' in object && 'constructor' in other) &&
  5862. !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
  5863. typeof othCtor == 'function' && othCtor instanceof othCtor)) {
  5864. result = false;
  5865. }
  5866. }
  5867. stack['delete'](object);
  5868. stack['delete'](other);
  5869. return result;
  5870. }
  5871. /**
  5872. * Creates an array of own enumerable property names and symbols of `object`.
  5873. *
  5874. * @private
  5875. * @param {Object} object The object to query.
  5876. * @returns {Array} Returns the array of property names and symbols.
  5877. */
  5878. function getAllKeys(object) {
  5879. return baseGetAllKeys(object, keys, getSymbols);
  5880. }
  5881. /**
  5882. * Gets the data for `map`.
  5883. *
  5884. * @private
  5885. * @param {Object} map The map to query.
  5886. * @param {string} key The reference key.
  5887. * @returns {*} Returns the map data.
  5888. */
  5889. function getMapData(map, key) {
  5890. var data = map.__data__;
  5891. return isKeyable(key)
  5892. ? data[typeof key == 'string' ? 'string' : 'hash']
  5893. : data.map;
  5894. }
  5895. /**
  5896. * Gets the native function at `key` of `object`.
  5897. *
  5898. * @private
  5899. * @param {Object} object The object to query.
  5900. * @param {string} key The key of the method to get.
  5901. * @returns {*} Returns the function if it's native, else `undefined`.
  5902. */
  5903. function getNative(object, key) {
  5904. var value = getValue(object, key);
  5905. return baseIsNative(value) ? value : undefined;
  5906. }
  5907. /**
  5908. * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
  5909. *
  5910. * @private
  5911. * @param {*} value The value to query.
  5912. * @returns {string} Returns the raw `toStringTag`.
  5913. */
  5914. function getRawTag(value) {
  5915. var isOwn = hasOwnProperty.call(value, symToStringTag),
  5916. tag = value[symToStringTag];
  5917. try {
  5918. value[symToStringTag] = undefined;
  5919. var unmasked = true;
  5920. } catch (e) {}
  5921. var result = nativeObjectToString.call(value);
  5922. if (unmasked) {
  5923. if (isOwn) {
  5924. value[symToStringTag] = tag;
  5925. } else {
  5926. delete value[symToStringTag];
  5927. }
  5928. }
  5929. return result;
  5930. }
  5931. /**
  5932. * Creates an array of the own enumerable symbols of `object`.
  5933. *
  5934. * @private
  5935. * @param {Object} object The object to query.
  5936. * @returns {Array} Returns the array of symbols.
  5937. */
  5938. var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
  5939. if (object == null) {
  5940. return [];
  5941. }
  5942. object = Object(object);
  5943. return arrayFilter(nativeGetSymbols(object), function(symbol) {
  5944. return propertyIsEnumerable.call(object, symbol);
  5945. });
  5946. };
  5947. /**
  5948. * Gets the `toStringTag` of `value`.
  5949. *
  5950. * @private
  5951. * @param {*} value The value to query.
  5952. * @returns {string} Returns the `toStringTag`.
  5953. */
  5954. var getTag = baseGetTag;
  5955. // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
  5956. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
  5957. (Map && getTag(new Map) != mapTag) ||
  5958. (Promise && getTag(Promise.resolve()) != promiseTag) ||
  5959. (Set && getTag(new Set) != setTag) ||
  5960. (WeakMap && getTag(new WeakMap) != weakMapTag)) {
  5961. getTag = function(value) {
  5962. var result = baseGetTag(value),
  5963. Ctor = result == objectTag ? value.constructor : undefined,
  5964. ctorString = Ctor ? toSource(Ctor) : '';
  5965. if (ctorString) {
  5966. switch (ctorString) {
  5967. case dataViewCtorString: return dataViewTag;
  5968. case mapCtorString: return mapTag;
  5969. case promiseCtorString: return promiseTag;
  5970. case setCtorString: return setTag;
  5971. case weakMapCtorString: return weakMapTag;
  5972. }
  5973. }
  5974. return result;
  5975. };
  5976. }
  5977. /**
  5978. * Checks if `value` is a valid array-like index.
  5979. *
  5980. * @private
  5981. * @param {*} value The value to check.
  5982. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  5983. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  5984. */
  5985. function isIndex(value, length) {
  5986. length = length == null ? MAX_SAFE_INTEGER : length;
  5987. return !!length &&
  5988. (typeof value == 'number' || reIsUint.test(value)) &&
  5989. (value > -1 && value % 1 == 0 && value < length);
  5990. }
  5991. /**
  5992. * Checks if `value` is suitable for use as unique object key.
  5993. *
  5994. * @private
  5995. * @param {*} value The value to check.
  5996. * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  5997. */
  5998. function isKeyable(value) {
  5999. var type = typeof value;
  6000. return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
  6001. ? (value !== '__proto__')
  6002. : (value === null);
  6003. }
  6004. /**
  6005. * Checks if `func` has its source masked.
  6006. *
  6007. * @private
  6008. * @param {Function} func The function to check.
  6009. * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  6010. */
  6011. function isMasked(func) {
  6012. return !!maskSrcKey && (maskSrcKey in func);
  6013. }
  6014. /**
  6015. * Checks if `value` is likely a prototype object.
  6016. *
  6017. * @private
  6018. * @param {*} value The value to check.
  6019. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
  6020. */
  6021. function isPrototype(value) {
  6022. var Ctor = value && value.constructor,
  6023. proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
  6024. return value === proto;
  6025. }
  6026. /**
  6027. * Converts `value` to a string using `Object.prototype.toString`.
  6028. *
  6029. * @private
  6030. * @param {*} value The value to convert.
  6031. * @returns {string} Returns the converted string.
  6032. */
  6033. function objectToString(value) {
  6034. return nativeObjectToString.call(value);
  6035. }
  6036. /**
  6037. * Converts `func` to its source code.
  6038. *
  6039. * @private
  6040. * @param {Function} func The function to convert.
  6041. * @returns {string} Returns the source code.
  6042. */
  6043. function toSource(func) {
  6044. if (func != null) {
  6045. try {
  6046. return funcToString.call(func);
  6047. } catch (e) {}
  6048. try {
  6049. return (func + '');
  6050. } catch (e) {}
  6051. }
  6052. return '';
  6053. }
  6054. /**
  6055. * Performs a
  6056. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  6057. * comparison between two values to determine if they are equivalent.
  6058. *
  6059. * @static
  6060. * @memberOf _
  6061. * @since 4.0.0
  6062. * @category Lang
  6063. * @param {*} value The value to compare.
  6064. * @param {*} other The other value to compare.
  6065. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  6066. * @example
  6067. *
  6068. * var object = { 'a': 1 };
  6069. * var other = { 'a': 1 };
  6070. *
  6071. * _.eq(object, object);
  6072. * // => true
  6073. *
  6074. * _.eq(object, other);
  6075. * // => false
  6076. *
  6077. * _.eq('a', 'a');
  6078. * // => true
  6079. *
  6080. * _.eq('a', Object('a'));
  6081. * // => false
  6082. *
  6083. * _.eq(NaN, NaN);
  6084. * // => true
  6085. */
  6086. function eq(value, other) {
  6087. return value === other || (value !== value && other !== other);
  6088. }
  6089. /**
  6090. * Checks if `value` is likely an `arguments` object.
  6091. *
  6092. * @static
  6093. * @memberOf _
  6094. * @since 0.1.0
  6095. * @category Lang
  6096. * @param {*} value The value to check.
  6097. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  6098. * else `false`.
  6099. * @example
  6100. *
  6101. * _.isArguments(function() { return arguments; }());
  6102. * // => true
  6103. *
  6104. * _.isArguments([1, 2, 3]);
  6105. * // => false
  6106. */
  6107. var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
  6108. return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
  6109. !propertyIsEnumerable.call(value, 'callee');
  6110. };
  6111. /**
  6112. * Checks if `value` is classified as an `Array` object.
  6113. *
  6114. * @static
  6115. * @memberOf _
  6116. * @since 0.1.0
  6117. * @category Lang
  6118. * @param {*} value The value to check.
  6119. * @returns {boolean} Returns `true` if `value` is an array, else `false`.
  6120. * @example
  6121. *
  6122. * _.isArray([1, 2, 3]);
  6123. * // => true
  6124. *
  6125. * _.isArray(document.body.children);
  6126. * // => false
  6127. *
  6128. * _.isArray('abc');
  6129. * // => false
  6130. *
  6131. * _.isArray(_.noop);
  6132. * // => false
  6133. */
  6134. var isArray = Array.isArray;
  6135. /**
  6136. * Checks if `value` is array-like. A value is considered array-like if it's
  6137. * not a function and has a `value.length` that's an integer greater than or
  6138. * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
  6139. *
  6140. * @static
  6141. * @memberOf _
  6142. * @since 4.0.0
  6143. * @category Lang
  6144. * @param {*} value The value to check.
  6145. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  6146. * @example
  6147. *
  6148. * _.isArrayLike([1, 2, 3]);
  6149. * // => true
  6150. *
  6151. * _.isArrayLike(document.body.children);
  6152. * // => true
  6153. *
  6154. * _.isArrayLike('abc');
  6155. * // => true
  6156. *
  6157. * _.isArrayLike(_.noop);
  6158. * // => false
  6159. */
  6160. function isArrayLike(value) {
  6161. return value != null && isLength(value.length) && !isFunction(value);
  6162. }
  6163. /**
  6164. * Checks if `value` is a buffer.
  6165. *
  6166. * @static
  6167. * @memberOf _
  6168. * @since 4.3.0
  6169. * @category Lang
  6170. * @param {*} value The value to check.
  6171. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
  6172. * @example
  6173. *
  6174. * _.isBuffer(new Buffer(2));
  6175. * // => true
  6176. *
  6177. * _.isBuffer(new Uint8Array(2));
  6178. * // => false
  6179. */
  6180. var isBuffer = nativeIsBuffer || stubFalse;
  6181. /**
  6182. * Performs a deep comparison between two values to determine if they are
  6183. * equivalent.
  6184. *
  6185. * **Note:** This method supports comparing arrays, array buffers, booleans,
  6186. * date objects, error objects, maps, numbers, `Object` objects, regexes,
  6187. * sets, strings, symbols, and typed arrays. `Object` objects are compared
  6188. * by their own, not inherited, enumerable properties. Functions and DOM
  6189. * nodes are compared by strict equality, i.e. `===`.
  6190. *
  6191. * @static
  6192. * @memberOf _
  6193. * @since 0.1.0
  6194. * @category Lang
  6195. * @param {*} value The value to compare.
  6196. * @param {*} other The other value to compare.
  6197. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  6198. * @example
  6199. *
  6200. * var object = { 'a': 1 };
  6201. * var other = { 'a': 1 };
  6202. *
  6203. * _.isEqual(object, other);
  6204. * // => true
  6205. *
  6206. * object === other;
  6207. * // => false
  6208. */
  6209. function isEqual(value, other) {
  6210. return baseIsEqual(value, other);
  6211. }
  6212. /**
  6213. * Checks if `value` is classified as a `Function` object.
  6214. *
  6215. * @static
  6216. * @memberOf _
  6217. * @since 0.1.0
  6218. * @category Lang
  6219. * @param {*} value The value to check.
  6220. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  6221. * @example
  6222. *
  6223. * _.isFunction(_);
  6224. * // => true
  6225. *
  6226. * _.isFunction(/abc/);
  6227. * // => false
  6228. */
  6229. function isFunction(value) {
  6230. if (!isObject(value)) {
  6231. return false;
  6232. }
  6233. // The use of `Object#toString` avoids issues with the `typeof` operator
  6234. // in Safari 9 which returns 'object' for typed arrays and other constructors.
  6235. var tag = baseGetTag(value);
  6236. return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
  6237. }
  6238. /**
  6239. * Checks if `value` is a valid array-like length.
  6240. *
  6241. * **Note:** This method is loosely based on
  6242. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  6243. *
  6244. * @static
  6245. * @memberOf _
  6246. * @since 4.0.0
  6247. * @category Lang
  6248. * @param {*} value The value to check.
  6249. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  6250. * @example
  6251. *
  6252. * _.isLength(3);
  6253. * // => true
  6254. *
  6255. * _.isLength(Number.MIN_VALUE);
  6256. * // => false
  6257. *
  6258. * _.isLength(Infinity);
  6259. * // => false
  6260. *
  6261. * _.isLength('3');
  6262. * // => false
  6263. */
  6264. function isLength(value) {
  6265. return typeof value == 'number' &&
  6266. value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  6267. }
  6268. /**
  6269. * Checks if `value` is the
  6270. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  6271. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  6272. *
  6273. * @static
  6274. * @memberOf _
  6275. * @since 0.1.0
  6276. * @category Lang
  6277. * @param {*} value The value to check.
  6278. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  6279. * @example
  6280. *
  6281. * _.isObject({});
  6282. * // => true
  6283. *
  6284. * _.isObject([1, 2, 3]);
  6285. * // => true
  6286. *
  6287. * _.isObject(_.noop);
  6288. * // => true
  6289. *
  6290. * _.isObject(null);
  6291. * // => false
  6292. */
  6293. function isObject(value) {
  6294. var type = typeof value;
  6295. return value != null && (type == 'object' || type == 'function');
  6296. }
  6297. /**
  6298. * Checks if `value` is object-like. A value is object-like if it's not `null`
  6299. * and has a `typeof` result of "object".
  6300. *
  6301. * @static
  6302. * @memberOf _
  6303. * @since 4.0.0
  6304. * @category Lang
  6305. * @param {*} value The value to check.
  6306. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  6307. * @example
  6308. *
  6309. * _.isObjectLike({});
  6310. * // => true
  6311. *
  6312. * _.isObjectLike([1, 2, 3]);
  6313. * // => true
  6314. *
  6315. * _.isObjectLike(_.noop);
  6316. * // => false
  6317. *
  6318. * _.isObjectLike(null);
  6319. * // => false
  6320. */
  6321. function isObjectLike(value) {
  6322. return value != null && typeof value == 'object';
  6323. }
  6324. /**
  6325. * Checks if `value` is classified as a typed array.
  6326. *
  6327. * @static
  6328. * @memberOf _
  6329. * @since 3.0.0
  6330. * @category Lang
  6331. * @param {*} value The value to check.
  6332. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  6333. * @example
  6334. *
  6335. * _.isTypedArray(new Uint8Array);
  6336. * // => true
  6337. *
  6338. * _.isTypedArray([]);
  6339. * // => false
  6340. */
  6341. var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
  6342. /**
  6343. * Creates an array of the own enumerable property names of `object`.
  6344. *
  6345. * **Note:** Non-object values are coerced to objects. See the
  6346. * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  6347. * for more details.
  6348. *
  6349. * @static
  6350. * @since 0.1.0
  6351. * @memberOf _
  6352. * @category Object
  6353. * @param {Object} object The object to query.
  6354. * @returns {Array} Returns the array of property names.
  6355. * @example
  6356. *
  6357. * function Foo() {
  6358. * this.a = 1;
  6359. * this.b = 2;
  6360. * }
  6361. *
  6362. * Foo.prototype.c = 3;
  6363. *
  6364. * _.keys(new Foo);
  6365. * // => ['a', 'b'] (iteration order is not guaranteed)
  6366. *
  6367. * _.keys('hi');
  6368. * // => ['0', '1']
  6369. */
  6370. function keys(object) {
  6371. return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
  6372. }
  6373. /**
  6374. * This method returns a new empty array.
  6375. *
  6376. * @static
  6377. * @memberOf _
  6378. * @since 4.13.0
  6379. * @category Util
  6380. * @returns {Array} Returns the new empty array.
  6381. * @example
  6382. *
  6383. * var arrays = _.times(2, _.stubArray);
  6384. *
  6385. * console.log(arrays);
  6386. * // => [[], []]
  6387. *
  6388. * console.log(arrays[0] === arrays[1]);
  6389. * // => false
  6390. */
  6391. function stubArray() {
  6392. return [];
  6393. }
  6394. /**
  6395. * This method returns `false`.
  6396. *
  6397. * @static
  6398. * @memberOf _
  6399. * @since 4.13.0
  6400. * @category Util
  6401. * @returns {boolean} Returns `false`.
  6402. * @example
  6403. *
  6404. * _.times(2, _.stubFalse);
  6405. * // => [false, false]
  6406. */
  6407. function stubFalse() {
  6408. return false;
  6409. }
  6410. module.exports = isEqual;
  6411. /***/ }),
  6412. /***/ "./resources/sass/app.scss":
  6413. /*!*********************************!*\
  6414. !*** ./resources/sass/app.scss ***!
  6415. \*********************************/
  6416. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  6417. "use strict";
  6418. __webpack_require__.r(__webpack_exports__);
  6419. // extracted by mini-css-extract-plugin
  6420. /***/ }),
  6421. /***/ "./node_modules/nprogress/nprogress.js":
  6422. /*!*********************************************!*\
  6423. !*** ./node_modules/nprogress/nprogress.js ***!
  6424. \*********************************************/
  6425. /***/ (function(module, exports, __webpack_require__) {
  6426. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
  6427. * @license MIT */
  6428. ;(function(root, factory) {
  6429. if (true) {
  6430. !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  6431. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  6432. (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
  6433. __WEBPACK_AMD_DEFINE_FACTORY__),
  6434. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  6435. } else {}
  6436. })(this, function() {
  6437. var NProgress = {};
  6438. NProgress.version = '0.2.0';
  6439. var Settings = NProgress.settings = {
  6440. minimum: 0.08,
  6441. easing: 'ease',
  6442. positionUsing: '',
  6443. speed: 200,
  6444. trickle: true,
  6445. trickleRate: 0.02,
  6446. trickleSpeed: 800,
  6447. showSpinner: true,
  6448. barSelector: '[role="bar"]',
  6449. spinnerSelector: '[role="spinner"]',
  6450. parent: 'body',
  6451. template: '<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'
  6452. };
  6453. /**
  6454. * Updates configuration.
  6455. *
  6456. * NProgress.configure({
  6457. * minimum: 0.1
  6458. * });
  6459. */
  6460. NProgress.configure = function(options) {
  6461. var key, value;
  6462. for (key in options) {
  6463. value = options[key];
  6464. if (value !== undefined && options.hasOwnProperty(key)) Settings[key] = value;
  6465. }
  6466. return this;
  6467. };
  6468. /**
  6469. * Last number.
  6470. */
  6471. NProgress.status = null;
  6472. /**
  6473. * Sets the progress bar status, where `n` is a number from `0.0` to `1.0`.
  6474. *
  6475. * NProgress.set(0.4);
  6476. * NProgress.set(1.0);
  6477. */
  6478. NProgress.set = function(n) {
  6479. var started = NProgress.isStarted();
  6480. n = clamp(n, Settings.minimum, 1);
  6481. NProgress.status = (n === 1 ? null : n);
  6482. var progress = NProgress.render(!started),
  6483. bar = progress.querySelector(Settings.barSelector),
  6484. speed = Settings.speed,
  6485. ease = Settings.easing;
  6486. progress.offsetWidth; /* Repaint */
  6487. queue(function(next) {
  6488. // Set positionUsing if it hasn't already been set
  6489. if (Settings.positionUsing === '') Settings.positionUsing = NProgress.getPositioningCSS();
  6490. // Add transition
  6491. css(bar, barPositionCSS(n, speed, ease));
  6492. if (n === 1) {
  6493. // Fade out
  6494. css(progress, {
  6495. transition: 'none',
  6496. opacity: 1
  6497. });
  6498. progress.offsetWidth; /* Repaint */
  6499. setTimeout(function() {
  6500. css(progress, {
  6501. transition: 'all ' + speed + 'ms linear',
  6502. opacity: 0
  6503. });
  6504. setTimeout(function() {
  6505. NProgress.remove();
  6506. next();
  6507. }, speed);
  6508. }, speed);
  6509. } else {
  6510. setTimeout(next, speed);
  6511. }
  6512. });
  6513. return this;
  6514. };
  6515. NProgress.isStarted = function() {
  6516. return typeof NProgress.status === 'number';
  6517. };
  6518. /**
  6519. * Shows the progress bar.
  6520. * This is the same as setting the status to 0%, except that it doesn't go backwards.
  6521. *
  6522. * NProgress.start();
  6523. *
  6524. */
  6525. NProgress.start = function() {
  6526. if (!NProgress.status) NProgress.set(0);
  6527. var work = function() {
  6528. setTimeout(function() {
  6529. if (!NProgress.status) return;
  6530. NProgress.trickle();
  6531. work();
  6532. }, Settings.trickleSpeed);
  6533. };
  6534. if (Settings.trickle) work();
  6535. return this;
  6536. };
  6537. /**
  6538. * Hides the progress bar.
  6539. * This is the *sort of* the same as setting the status to 100%, with the
  6540. * difference being `done()` makes some placebo effect of some realistic motion.
  6541. *
  6542. * NProgress.done();
  6543. *
  6544. * If `true` is passed, it will show the progress bar even if its hidden.
  6545. *
  6546. * NProgress.done(true);
  6547. */
  6548. NProgress.done = function(force) {
  6549. if (!force && !NProgress.status) return this;
  6550. return NProgress.inc(0.3 + 0.5 * Math.random()).set(1);
  6551. };
  6552. /**
  6553. * Increments by a random amount.
  6554. */
  6555. NProgress.inc = function(amount) {
  6556. var n = NProgress.status;
  6557. if (!n) {
  6558. return NProgress.start();
  6559. } else {
  6560. if (typeof amount !== 'number') {
  6561. amount = (1 - n) * clamp(Math.random() * n, 0.1, 0.95);
  6562. }
  6563. n = clamp(n + amount, 0, 0.994);
  6564. return NProgress.set(n);
  6565. }
  6566. };
  6567. NProgress.trickle = function() {
  6568. return NProgress.inc(Math.random() * Settings.trickleRate);
  6569. };
  6570. /**
  6571. * Waits for all supplied jQuery promises and
  6572. * increases the progress as the promises resolve.
  6573. *
  6574. * @param $promise jQUery Promise
  6575. */
  6576. (function() {
  6577. var initial = 0, current = 0;
  6578. NProgress.promise = function($promise) {
  6579. if (!$promise || $promise.state() === "resolved") {
  6580. return this;
  6581. }
  6582. if (current === 0) {
  6583. NProgress.start();
  6584. }
  6585. initial++;
  6586. current++;
  6587. $promise.always(function() {
  6588. current--;
  6589. if (current === 0) {
  6590. initial = 0;
  6591. NProgress.done();
  6592. } else {
  6593. NProgress.set((initial - current) / initial);
  6594. }
  6595. });
  6596. return this;
  6597. };
  6598. })();
  6599. /**
  6600. * (Internal) renders the progress bar markup based on the `template`
  6601. * setting.
  6602. */
  6603. NProgress.render = function(fromStart) {
  6604. if (NProgress.isRendered()) return document.getElementById('nprogress');
  6605. addClass(document.documentElement, 'nprogress-busy');
  6606. var progress = document.createElement('div');
  6607. progress.id = 'nprogress';
  6608. progress.innerHTML = Settings.template;
  6609. var bar = progress.querySelector(Settings.barSelector),
  6610. perc = fromStart ? '-100' : toBarPerc(NProgress.status || 0),
  6611. parent = document.querySelector(Settings.parent),
  6612. spinner;
  6613. css(bar, {
  6614. transition: 'all 0 linear',
  6615. transform: 'translate3d(' + perc + '%,0,0)'
  6616. });
  6617. if (!Settings.showSpinner) {
  6618. spinner = progress.querySelector(Settings.spinnerSelector);
  6619. spinner && removeElement(spinner);
  6620. }
  6621. if (parent != document.body) {
  6622. addClass(parent, 'nprogress-custom-parent');
  6623. }
  6624. parent.appendChild(progress);
  6625. return progress;
  6626. };
  6627. /**
  6628. * Removes the element. Opposite of render().
  6629. */
  6630. NProgress.remove = function() {
  6631. removeClass(document.documentElement, 'nprogress-busy');
  6632. removeClass(document.querySelector(Settings.parent), 'nprogress-custom-parent');
  6633. var progress = document.getElementById('nprogress');
  6634. progress && removeElement(progress);
  6635. };
  6636. /**
  6637. * Checks if the progress bar is rendered.
  6638. */
  6639. NProgress.isRendered = function() {
  6640. return !!document.getElementById('nprogress');
  6641. };
  6642. /**
  6643. * Determine which positioning CSS rule to use.
  6644. */
  6645. NProgress.getPositioningCSS = function() {
  6646. // Sniff on document.body.style
  6647. var bodyStyle = document.body.style;
  6648. // Sniff prefixes
  6649. var vendorPrefix = ('WebkitTransform' in bodyStyle) ? 'Webkit' :
  6650. ('MozTransform' in bodyStyle) ? 'Moz' :
  6651. ('msTransform' in bodyStyle) ? 'ms' :
  6652. ('OTransform' in bodyStyle) ? 'O' : '';
  6653. if (vendorPrefix + 'Perspective' in bodyStyle) {
  6654. // Modern browsers with 3D support, e.g. Webkit, IE10
  6655. return 'translate3d';
  6656. } else if (vendorPrefix + 'Transform' in bodyStyle) {
  6657. // Browsers without 3D support, e.g. IE9
  6658. return 'translate';
  6659. } else {
  6660. // Browsers without translate() support, e.g. IE7-8
  6661. return 'margin';
  6662. }
  6663. };
  6664. /**
  6665. * Helpers
  6666. */
  6667. function clamp(n, min, max) {
  6668. if (n < min) return min;
  6669. if (n > max) return max;
  6670. return n;
  6671. }
  6672. /**
  6673. * (Internal) converts a percentage (`0..1`) to a bar translateX
  6674. * percentage (`-100%..0%`).
  6675. */
  6676. function toBarPerc(n) {
  6677. return (-1 + n) * 100;
  6678. }
  6679. /**
  6680. * (Internal) returns the correct CSS for changing the bar's
  6681. * position given an n percentage, and speed and ease from Settings
  6682. */
  6683. function barPositionCSS(n, speed, ease) {
  6684. var barCSS;
  6685. if (Settings.positionUsing === 'translate3d') {
  6686. barCSS = { transform: 'translate3d('+toBarPerc(n)+'%,0,0)' };
  6687. } else if (Settings.positionUsing === 'translate') {
  6688. barCSS = { transform: 'translate('+toBarPerc(n)+'%,0)' };
  6689. } else {
  6690. barCSS = { 'margin-left': toBarPerc(n)+'%' };
  6691. }
  6692. barCSS.transition = 'all '+speed+'ms '+ease;
  6693. return barCSS;
  6694. }
  6695. /**
  6696. * (Internal) Queues a function to be executed.
  6697. */
  6698. var queue = (function() {
  6699. var pending = [];
  6700. function next() {
  6701. var fn = pending.shift();
  6702. if (fn) {
  6703. fn(next);
  6704. }
  6705. }
  6706. return function(fn) {
  6707. pending.push(fn);
  6708. if (pending.length == 1) next();
  6709. };
  6710. })();
  6711. /**
  6712. * (Internal) Applies css properties to an element, similar to the jQuery
  6713. * css method.
  6714. *
  6715. * While this helper does assist with vendor prefixed property names, it
  6716. * does not perform any manipulation of values prior to setting styles.
  6717. */
  6718. var css = (function() {
  6719. var cssPrefixes = [ 'Webkit', 'O', 'Moz', 'ms' ],
  6720. cssProps = {};
  6721. function camelCase(string) {
  6722. return string.replace(/^-ms-/, 'ms-').replace(/-([\da-z])/gi, function(match, letter) {
  6723. return letter.toUpperCase();
  6724. });
  6725. }
  6726. function getVendorProp(name) {
  6727. var style = document.body.style;
  6728. if (name in style) return name;
  6729. var i = cssPrefixes.length,
  6730. capName = name.charAt(0).toUpperCase() + name.slice(1),
  6731. vendorName;
  6732. while (i--) {
  6733. vendorName = cssPrefixes[i] + capName;
  6734. if (vendorName in style) return vendorName;
  6735. }
  6736. return name;
  6737. }
  6738. function getStyleProp(name) {
  6739. name = camelCase(name);
  6740. return cssProps[name] || (cssProps[name] = getVendorProp(name));
  6741. }
  6742. function applyCss(element, prop, value) {
  6743. prop = getStyleProp(prop);
  6744. element.style[prop] = value;
  6745. }
  6746. return function(element, properties) {
  6747. var args = arguments,
  6748. prop,
  6749. value;
  6750. if (args.length == 2) {
  6751. for (prop in properties) {
  6752. value = properties[prop];
  6753. if (value !== undefined && properties.hasOwnProperty(prop)) applyCss(element, prop, value);
  6754. }
  6755. } else {
  6756. applyCss(element, args[1], args[2]);
  6757. }
  6758. }
  6759. })();
  6760. /**
  6761. * (Internal) Determines if an element or space separated list of class names contains a class name.
  6762. */
  6763. function hasClass(element, name) {
  6764. var list = typeof element == 'string' ? element : classList(element);
  6765. return list.indexOf(' ' + name + ' ') >= 0;
  6766. }
  6767. /**
  6768. * (Internal) Adds a class to an element.
  6769. */
  6770. function addClass(element, name) {
  6771. var oldList = classList(element),
  6772. newList = oldList + name;
  6773. if (hasClass(oldList, name)) return;
  6774. // Trim the opening space.
  6775. element.className = newList.substring(1);
  6776. }
  6777. /**
  6778. * (Internal) Removes a class from an element.
  6779. */
  6780. function removeClass(element, name) {
  6781. var oldList = classList(element),
  6782. newList;
  6783. if (!hasClass(element, name)) return;
  6784. // Replace the class name.
  6785. newList = oldList.replace(' ' + name + ' ', ' ');
  6786. // Trim the opening and closing spaces.
  6787. element.className = newList.substring(1, newList.length - 1);
  6788. }
  6789. /**
  6790. * (Internal) Gets a space separated list of the class names on the element.
  6791. * The list is wrapped with a single space on each end to facilitate finding
  6792. * matches within the list.
  6793. */
  6794. function classList(element) {
  6795. return (' ' + (element.className || '') + ' ').replace(/\s+/gi, ' ');
  6796. }
  6797. /**
  6798. * (Internal) Removes an element from the DOM.
  6799. */
  6800. function removeElement(element) {
  6801. element && element.parentNode && element.parentNode.removeChild(element);
  6802. }
  6803. return NProgress;
  6804. });
  6805. /***/ }),
  6806. /***/ "./node_modules/object-inspect/index.js":
  6807. /*!**********************************************!*\
  6808. !*** ./node_modules/object-inspect/index.js ***!
  6809. \**********************************************/
  6810. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  6811. var hasMap = typeof Map === 'function' && Map.prototype;
  6812. var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
  6813. var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
  6814. var mapForEach = hasMap && Map.prototype.forEach;
  6815. var hasSet = typeof Set === 'function' && Set.prototype;
  6816. var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
  6817. var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
  6818. var setForEach = hasSet && Set.prototype.forEach;
  6819. var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
  6820. var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
  6821. var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
  6822. var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
  6823. var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
  6824. var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
  6825. var booleanValueOf = Boolean.prototype.valueOf;
  6826. var objectToString = Object.prototype.toString;
  6827. var functionToString = Function.prototype.toString;
  6828. var $match = String.prototype.match;
  6829. var $slice = String.prototype.slice;
  6830. var $replace = String.prototype.replace;
  6831. var $toUpperCase = String.prototype.toUpperCase;
  6832. var $toLowerCase = String.prototype.toLowerCase;
  6833. var $test = RegExp.prototype.test;
  6834. var $concat = Array.prototype.concat;
  6835. var $join = Array.prototype.join;
  6836. var $arrSlice = Array.prototype.slice;
  6837. var $floor = Math.floor;
  6838. var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
  6839. var gOPS = Object.getOwnPropertySymbols;
  6840. var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
  6841. var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
  6842. // ie, `has-tostringtag/shams
  6843. var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
  6844. ? Symbol.toStringTag
  6845. : null;
  6846. var isEnumerable = Object.prototype.propertyIsEnumerable;
  6847. var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
  6848. [].__proto__ === Array.prototype // eslint-disable-line no-proto
  6849. ? function (O) {
  6850. return O.__proto__; // eslint-disable-line no-proto
  6851. }
  6852. : null
  6853. );
  6854. function addNumericSeparator(num, str) {
  6855. if (
  6856. num === Infinity
  6857. || num === -Infinity
  6858. || num !== num
  6859. || (num && num > -1000 && num < 1000)
  6860. || $test.call(/e/, str)
  6861. ) {
  6862. return str;
  6863. }
  6864. var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
  6865. if (typeof num === 'number') {
  6866. var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
  6867. if (int !== num) {
  6868. var intStr = String(int);
  6869. var dec = $slice.call(str, intStr.length + 1);
  6870. return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
  6871. }
  6872. }
  6873. return $replace.call(str, sepRegex, '$&_');
  6874. }
  6875. var inspectCustom = (__webpack_require__(/*! ./util.inspect */ "?2128").custom);
  6876. var inspectSymbol = inspectCustom && isSymbol(inspectCustom) ? inspectCustom : null;
  6877. module.exports = function inspect_(obj, options, depth, seen) {
  6878. var opts = options || {};
  6879. if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {
  6880. throw new TypeError('option "quoteStyle" must be "single" or "double"');
  6881. }
  6882. if (
  6883. has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
  6884. ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
  6885. : opts.maxStringLength !== null
  6886. )
  6887. ) {
  6888. throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
  6889. }
  6890. var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;
  6891. if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
  6892. throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
  6893. }
  6894. if (
  6895. has(opts, 'indent')
  6896. && opts.indent !== null
  6897. && opts.indent !== '\t'
  6898. && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
  6899. ) {
  6900. throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
  6901. }
  6902. if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
  6903. throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
  6904. }
  6905. var numericSeparator = opts.numericSeparator;
  6906. if (typeof obj === 'undefined') {
  6907. return 'undefined';
  6908. }
  6909. if (obj === null) {
  6910. return 'null';
  6911. }
  6912. if (typeof obj === 'boolean') {
  6913. return obj ? 'true' : 'false';
  6914. }
  6915. if (typeof obj === 'string') {
  6916. return inspectString(obj, opts);
  6917. }
  6918. if (typeof obj === 'number') {
  6919. if (obj === 0) {
  6920. return Infinity / obj > 0 ? '0' : '-0';
  6921. }
  6922. var str = String(obj);
  6923. return numericSeparator ? addNumericSeparator(obj, str) : str;
  6924. }
  6925. if (typeof obj === 'bigint') {
  6926. var bigIntStr = String(obj) + 'n';
  6927. return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
  6928. }
  6929. var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
  6930. if (typeof depth === 'undefined') { depth = 0; }
  6931. if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
  6932. return isArray(obj) ? '[Array]' : '[Object]';
  6933. }
  6934. var indent = getIndent(opts, depth);
  6935. if (typeof seen === 'undefined') {
  6936. seen = [];
  6937. } else if (indexOf(seen, obj) >= 0) {
  6938. return '[Circular]';
  6939. }
  6940. function inspect(value, from, noIndent) {
  6941. if (from) {
  6942. seen = $arrSlice.call(seen);
  6943. seen.push(from);
  6944. }
  6945. if (noIndent) {
  6946. var newOpts = {
  6947. depth: opts.depth
  6948. };
  6949. if (has(opts, 'quoteStyle')) {
  6950. newOpts.quoteStyle = opts.quoteStyle;
  6951. }
  6952. return inspect_(value, newOpts, depth + 1, seen);
  6953. }
  6954. return inspect_(value, opts, depth + 1, seen);
  6955. }
  6956. if (typeof obj === 'function') {
  6957. var name = nameOf(obj);
  6958. var keys = arrObjKeys(obj, inspect);
  6959. return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
  6960. }
  6961. if (isSymbol(obj)) {
  6962. var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
  6963. return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
  6964. }
  6965. if (isElement(obj)) {
  6966. var s = '<' + $toLowerCase.call(String(obj.nodeName));
  6967. var attrs = obj.attributes || [];
  6968. for (var i = 0; i < attrs.length; i++) {
  6969. s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
  6970. }
  6971. s += '>';
  6972. if (obj.childNodes && obj.childNodes.length) { s += '...'; }
  6973. s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
  6974. return s;
  6975. }
  6976. if (isArray(obj)) {
  6977. if (obj.length === 0) { return '[]'; }
  6978. var xs = arrObjKeys(obj, inspect);
  6979. if (indent && !singleLineValues(xs)) {
  6980. return '[' + indentedJoin(xs, indent) + ']';
  6981. }
  6982. return '[ ' + $join.call(xs, ', ') + ' ]';
  6983. }
  6984. if (isError(obj)) {
  6985. var parts = arrObjKeys(obj, inspect);
  6986. if ('cause' in obj && !isEnumerable.call(obj, 'cause')) {
  6987. return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
  6988. }
  6989. if (parts.length === 0) { return '[' + String(obj) + ']'; }
  6990. return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
  6991. }
  6992. if (typeof obj === 'object' && customInspect) {
  6993. if (inspectSymbol && typeof obj[inspectSymbol] === 'function') {
  6994. return obj[inspectSymbol]();
  6995. } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
  6996. return obj.inspect();
  6997. }
  6998. }
  6999. if (isMap(obj)) {
  7000. var mapParts = [];
  7001. mapForEach.call(obj, function (value, key) {
  7002. mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
  7003. });
  7004. return collectionOf('Map', mapSize.call(obj), mapParts, indent);
  7005. }
  7006. if (isSet(obj)) {
  7007. var setParts = [];
  7008. setForEach.call(obj, function (value) {
  7009. setParts.push(inspect(value, obj));
  7010. });
  7011. return collectionOf('Set', setSize.call(obj), setParts, indent);
  7012. }
  7013. if (isWeakMap(obj)) {
  7014. return weakCollectionOf('WeakMap');
  7015. }
  7016. if (isWeakSet(obj)) {
  7017. return weakCollectionOf('WeakSet');
  7018. }
  7019. if (isWeakRef(obj)) {
  7020. return weakCollectionOf('WeakRef');
  7021. }
  7022. if (isNumber(obj)) {
  7023. return markBoxed(inspect(Number(obj)));
  7024. }
  7025. if (isBigInt(obj)) {
  7026. return markBoxed(inspect(bigIntValueOf.call(obj)));
  7027. }
  7028. if (isBoolean(obj)) {
  7029. return markBoxed(booleanValueOf.call(obj));
  7030. }
  7031. if (isString(obj)) {
  7032. return markBoxed(inspect(String(obj)));
  7033. }
  7034. if (!isDate(obj) && !isRegExp(obj)) {
  7035. var ys = arrObjKeys(obj, inspect);
  7036. var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
  7037. var protoTag = obj instanceof Object ? '' : 'null prototype';
  7038. var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
  7039. var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
  7040. var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
  7041. if (ys.length === 0) { return tag + '{}'; }
  7042. if (indent) {
  7043. return tag + '{' + indentedJoin(ys, indent) + '}';
  7044. }
  7045. return tag + '{ ' + $join.call(ys, ', ') + ' }';
  7046. }
  7047. return String(obj);
  7048. };
  7049. function wrapQuotes(s, defaultStyle, opts) {
  7050. var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
  7051. return quoteChar + s + quoteChar;
  7052. }
  7053. function quote(s) {
  7054. return $replace.call(String(s), /"/g, '&quot;');
  7055. }
  7056. function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  7057. function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  7058. function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  7059. function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  7060. function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  7061. function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  7062. function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  7063. // Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
  7064. function isSymbol(obj) {
  7065. if (hasShammedSymbols) {
  7066. return obj && typeof obj === 'object' && obj instanceof Symbol;
  7067. }
  7068. if (typeof obj === 'symbol') {
  7069. return true;
  7070. }
  7071. if (!obj || typeof obj !== 'object' || !symToString) {
  7072. return false;
  7073. }
  7074. try {
  7075. symToString.call(obj);
  7076. return true;
  7077. } catch (e) {}
  7078. return false;
  7079. }
  7080. function isBigInt(obj) {
  7081. if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
  7082. return false;
  7083. }
  7084. try {
  7085. bigIntValueOf.call(obj);
  7086. return true;
  7087. } catch (e) {}
  7088. return false;
  7089. }
  7090. var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
  7091. function has(obj, key) {
  7092. return hasOwn.call(obj, key);
  7093. }
  7094. function toStr(obj) {
  7095. return objectToString.call(obj);
  7096. }
  7097. function nameOf(f) {
  7098. if (f.name) { return f.name; }
  7099. var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
  7100. if (m) { return m[1]; }
  7101. return null;
  7102. }
  7103. function indexOf(xs, x) {
  7104. if (xs.indexOf) { return xs.indexOf(x); }
  7105. for (var i = 0, l = xs.length; i < l; i++) {
  7106. if (xs[i] === x) { return i; }
  7107. }
  7108. return -1;
  7109. }
  7110. function isMap(x) {
  7111. if (!mapSize || !x || typeof x !== 'object') {
  7112. return false;
  7113. }
  7114. try {
  7115. mapSize.call(x);
  7116. try {
  7117. setSize.call(x);
  7118. } catch (s) {
  7119. return true;
  7120. }
  7121. return x instanceof Map; // core-js workaround, pre-v2.5.0
  7122. } catch (e) {}
  7123. return false;
  7124. }
  7125. function isWeakMap(x) {
  7126. if (!weakMapHas || !x || typeof x !== 'object') {
  7127. return false;
  7128. }
  7129. try {
  7130. weakMapHas.call(x, weakMapHas);
  7131. try {
  7132. weakSetHas.call(x, weakSetHas);
  7133. } catch (s) {
  7134. return true;
  7135. }
  7136. return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
  7137. } catch (e) {}
  7138. return false;
  7139. }
  7140. function isWeakRef(x) {
  7141. if (!weakRefDeref || !x || typeof x !== 'object') {
  7142. return false;
  7143. }
  7144. try {
  7145. weakRefDeref.call(x);
  7146. return true;
  7147. } catch (e) {}
  7148. return false;
  7149. }
  7150. function isSet(x) {
  7151. if (!setSize || !x || typeof x !== 'object') {
  7152. return false;
  7153. }
  7154. try {
  7155. setSize.call(x);
  7156. try {
  7157. mapSize.call(x);
  7158. } catch (m) {
  7159. return true;
  7160. }
  7161. return x instanceof Set; // core-js workaround, pre-v2.5.0
  7162. } catch (e) {}
  7163. return false;
  7164. }
  7165. function isWeakSet(x) {
  7166. if (!weakSetHas || !x || typeof x !== 'object') {
  7167. return false;
  7168. }
  7169. try {
  7170. weakSetHas.call(x, weakSetHas);
  7171. try {
  7172. weakMapHas.call(x, weakMapHas);
  7173. } catch (s) {
  7174. return true;
  7175. }
  7176. return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
  7177. } catch (e) {}
  7178. return false;
  7179. }
  7180. function isElement(x) {
  7181. if (!x || typeof x !== 'object') { return false; }
  7182. if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
  7183. return true;
  7184. }
  7185. return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
  7186. }
  7187. function inspectString(str, opts) {
  7188. if (str.length > opts.maxStringLength) {
  7189. var remaining = str.length - opts.maxStringLength;
  7190. var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
  7191. return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
  7192. }
  7193. // eslint-disable-next-line no-control-regex
  7194. var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
  7195. return wrapQuotes(s, 'single', opts);
  7196. }
  7197. function lowbyte(c) {
  7198. var n = c.charCodeAt(0);
  7199. var x = {
  7200. 8: 'b',
  7201. 9: 't',
  7202. 10: 'n',
  7203. 12: 'f',
  7204. 13: 'r'
  7205. }[n];
  7206. if (x) { return '\\' + x; }
  7207. return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
  7208. }
  7209. function markBoxed(str) {
  7210. return 'Object(' + str + ')';
  7211. }
  7212. function weakCollectionOf(type) {
  7213. return type + ' { ? }';
  7214. }
  7215. function collectionOf(type, size, entries, indent) {
  7216. var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
  7217. return type + ' (' + size + ') {' + joinedEntries + '}';
  7218. }
  7219. function singleLineValues(xs) {
  7220. for (var i = 0; i < xs.length; i++) {
  7221. if (indexOf(xs[i], '\n') >= 0) {
  7222. return false;
  7223. }
  7224. }
  7225. return true;
  7226. }
  7227. function getIndent(opts, depth) {
  7228. var baseIndent;
  7229. if (opts.indent === '\t') {
  7230. baseIndent = '\t';
  7231. } else if (typeof opts.indent === 'number' && opts.indent > 0) {
  7232. baseIndent = $join.call(Array(opts.indent + 1), ' ');
  7233. } else {
  7234. return null;
  7235. }
  7236. return {
  7237. base: baseIndent,
  7238. prev: $join.call(Array(depth + 1), baseIndent)
  7239. };
  7240. }
  7241. function indentedJoin(xs, indent) {
  7242. if (xs.length === 0) { return ''; }
  7243. var lineJoiner = '\n' + indent.prev + indent.base;
  7244. return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
  7245. }
  7246. function arrObjKeys(obj, inspect) {
  7247. var isArr = isArray(obj);
  7248. var xs = [];
  7249. if (isArr) {
  7250. xs.length = obj.length;
  7251. for (var i = 0; i < obj.length; i++) {
  7252. xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';
  7253. }
  7254. }
  7255. var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
  7256. var symMap;
  7257. if (hasShammedSymbols) {
  7258. symMap = {};
  7259. for (var k = 0; k < syms.length; k++) {
  7260. symMap['$' + syms[k]] = syms[k];
  7261. }
  7262. }
  7263. for (var key in obj) { // eslint-disable-line no-restricted-syntax
  7264. if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
  7265. if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
  7266. if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
  7267. // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
  7268. continue; // eslint-disable-line no-restricted-syntax, no-continue
  7269. } else if ($test.call(/[^\w$]/, key)) {
  7270. xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
  7271. } else {
  7272. xs.push(key + ': ' + inspect(obj[key], obj));
  7273. }
  7274. }
  7275. if (typeof gOPS === 'function') {
  7276. for (var j = 0; j < syms.length; j++) {
  7277. if (isEnumerable.call(obj, syms[j])) {
  7278. xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
  7279. }
  7280. }
  7281. }
  7282. return xs;
  7283. }
  7284. /***/ }),
  7285. /***/ "./node_modules/process/browser.js":
  7286. /*!*****************************************!*\
  7287. !*** ./node_modules/process/browser.js ***!
  7288. \*****************************************/
  7289. /***/ ((module) => {
  7290. // shim for using process in browser
  7291. var process = module.exports = {};
  7292. // cached from whatever global is present so that test runners that stub it
  7293. // don't break things. But we need to wrap it in a try catch in case it is
  7294. // wrapped in strict mode code which doesn't define any globals. It's inside a
  7295. // function because try/catches deoptimize in certain engines.
  7296. var cachedSetTimeout;
  7297. var cachedClearTimeout;
  7298. function defaultSetTimout() {
  7299. throw new Error('setTimeout has not been defined');
  7300. }
  7301. function defaultClearTimeout () {
  7302. throw new Error('clearTimeout has not been defined');
  7303. }
  7304. (function () {
  7305. try {
  7306. if (typeof setTimeout === 'function') {
  7307. cachedSetTimeout = setTimeout;
  7308. } else {
  7309. cachedSetTimeout = defaultSetTimout;
  7310. }
  7311. } catch (e) {
  7312. cachedSetTimeout = defaultSetTimout;
  7313. }
  7314. try {
  7315. if (typeof clearTimeout === 'function') {
  7316. cachedClearTimeout = clearTimeout;
  7317. } else {
  7318. cachedClearTimeout = defaultClearTimeout;
  7319. }
  7320. } catch (e) {
  7321. cachedClearTimeout = defaultClearTimeout;
  7322. }
  7323. } ())
  7324. function runTimeout(fun) {
  7325. if (cachedSetTimeout === setTimeout) {
  7326. //normal enviroments in sane situations
  7327. return setTimeout(fun, 0);
  7328. }
  7329. // if setTimeout wasn't available but was latter defined
  7330. if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
  7331. cachedSetTimeout = setTimeout;
  7332. return setTimeout(fun, 0);
  7333. }
  7334. try {
  7335. // when when somebody has screwed with setTimeout but no I.E. maddness
  7336. return cachedSetTimeout(fun, 0);
  7337. } catch(e){
  7338. try {
  7339. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  7340. return cachedSetTimeout.call(null, fun, 0);
  7341. } catch(e){
  7342. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
  7343. return cachedSetTimeout.call(this, fun, 0);
  7344. }
  7345. }
  7346. }
  7347. function runClearTimeout(marker) {
  7348. if (cachedClearTimeout === clearTimeout) {
  7349. //normal enviroments in sane situations
  7350. return clearTimeout(marker);
  7351. }
  7352. // if clearTimeout wasn't available but was latter defined
  7353. if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
  7354. cachedClearTimeout = clearTimeout;
  7355. return clearTimeout(marker);
  7356. }
  7357. try {
  7358. // when when somebody has screwed with setTimeout but no I.E. maddness
  7359. return cachedClearTimeout(marker);
  7360. } catch (e){
  7361. try {
  7362. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  7363. return cachedClearTimeout.call(null, marker);
  7364. } catch (e){
  7365. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
  7366. // Some versions of I.E. have different rules for clearTimeout vs setTimeout
  7367. return cachedClearTimeout.call(this, marker);
  7368. }
  7369. }
  7370. }
  7371. var queue = [];
  7372. var draining = false;
  7373. var currentQueue;
  7374. var queueIndex = -1;
  7375. function cleanUpNextTick() {
  7376. if (!draining || !currentQueue) {
  7377. return;
  7378. }
  7379. draining = false;
  7380. if (currentQueue.length) {
  7381. queue = currentQueue.concat(queue);
  7382. } else {
  7383. queueIndex = -1;
  7384. }
  7385. if (queue.length) {
  7386. drainQueue();
  7387. }
  7388. }
  7389. function drainQueue() {
  7390. if (draining) {
  7391. return;
  7392. }
  7393. var timeout = runTimeout(cleanUpNextTick);
  7394. draining = true;
  7395. var len = queue.length;
  7396. while(len) {
  7397. currentQueue = queue;
  7398. queue = [];
  7399. while (++queueIndex < len) {
  7400. if (currentQueue) {
  7401. currentQueue[queueIndex].run();
  7402. }
  7403. }
  7404. queueIndex = -1;
  7405. len = queue.length;
  7406. }
  7407. currentQueue = null;
  7408. draining = false;
  7409. runClearTimeout(timeout);
  7410. }
  7411. process.nextTick = function (fun) {
  7412. var args = new Array(arguments.length - 1);
  7413. if (arguments.length > 1) {
  7414. for (var i = 1; i < arguments.length; i++) {
  7415. args[i - 1] = arguments[i];
  7416. }
  7417. }
  7418. queue.push(new Item(fun, args));
  7419. if (queue.length === 1 && !draining) {
  7420. runTimeout(drainQueue);
  7421. }
  7422. };
  7423. // v8 likes predictible objects
  7424. function Item(fun, array) {
  7425. this.fun = fun;
  7426. this.array = array;
  7427. }
  7428. Item.prototype.run = function () {
  7429. this.fun.apply(null, this.array);
  7430. };
  7431. process.title = 'browser';
  7432. process.browser = true;
  7433. process.env = {};
  7434. process.argv = [];
  7435. process.version = ''; // empty string to avoid regexp issues
  7436. process.versions = {};
  7437. function noop() {}
  7438. process.on = noop;
  7439. process.addListener = noop;
  7440. process.once = noop;
  7441. process.off = noop;
  7442. process.removeListener = noop;
  7443. process.removeAllListeners = noop;
  7444. process.emit = noop;
  7445. process.prependListener = noop;
  7446. process.prependOnceListener = noop;
  7447. process.listeners = function (name) { return [] }
  7448. process.binding = function (name) {
  7449. throw new Error('process.binding is not supported');
  7450. };
  7451. process.cwd = function () { return '/' };
  7452. process.chdir = function (dir) {
  7453. throw new Error('process.chdir is not supported');
  7454. };
  7455. process.umask = function() { return 0; };
  7456. /***/ }),
  7457. /***/ "./node_modules/side-channel/index.js":
  7458. /*!********************************************!*\
  7459. !*** ./node_modules/side-channel/index.js ***!
  7460. \********************************************/
  7461. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7462. "use strict";
  7463. var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ "./node_modules/get-intrinsic/index.js");
  7464. var callBound = __webpack_require__(/*! call-bind/callBound */ "./node_modules/call-bind/callBound.js");
  7465. var inspect = __webpack_require__(/*! object-inspect */ "./node_modules/object-inspect/index.js");
  7466. var $TypeError = GetIntrinsic('%TypeError%');
  7467. var $WeakMap = GetIntrinsic('%WeakMap%', true);
  7468. var $Map = GetIntrinsic('%Map%', true);
  7469. var $weakMapGet = callBound('WeakMap.prototype.get', true);
  7470. var $weakMapSet = callBound('WeakMap.prototype.set', true);
  7471. var $weakMapHas = callBound('WeakMap.prototype.has', true);
  7472. var $mapGet = callBound('Map.prototype.get', true);
  7473. var $mapSet = callBound('Map.prototype.set', true);
  7474. var $mapHas = callBound('Map.prototype.has', true);
  7475. /*
  7476. * This function traverses the list returning the node corresponding to the
  7477. * given key.
  7478. *
  7479. * That node is also moved to the head of the list, so that if it's accessed
  7480. * again we don't need to traverse the whole list. By doing so, all the recently
  7481. * used nodes can be accessed relatively quickly.
  7482. */
  7483. var listGetNode = function (list, key) { // eslint-disable-line consistent-return
  7484. for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
  7485. if (curr.key === key) {
  7486. prev.next = curr.next;
  7487. curr.next = list.next;
  7488. list.next = curr; // eslint-disable-line no-param-reassign
  7489. return curr;
  7490. }
  7491. }
  7492. };
  7493. var listGet = function (objects, key) {
  7494. var node = listGetNode(objects, key);
  7495. return node && node.value;
  7496. };
  7497. var listSet = function (objects, key, value) {
  7498. var node = listGetNode(objects, key);
  7499. if (node) {
  7500. node.value = value;
  7501. } else {
  7502. // Prepend the new node to the beginning of the list
  7503. objects.next = { // eslint-disable-line no-param-reassign
  7504. key: key,
  7505. next: objects.next,
  7506. value: value
  7507. };
  7508. }
  7509. };
  7510. var listHas = function (objects, key) {
  7511. return !!listGetNode(objects, key);
  7512. };
  7513. module.exports = function getSideChannel() {
  7514. var $wm;
  7515. var $m;
  7516. var $o;
  7517. var channel = {
  7518. assert: function (key) {
  7519. if (!channel.has(key)) {
  7520. throw new $TypeError('Side channel does not contain ' + inspect(key));
  7521. }
  7522. },
  7523. get: function (key) { // eslint-disable-line consistent-return
  7524. if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
  7525. if ($wm) {
  7526. return $weakMapGet($wm, key);
  7527. }
  7528. } else if ($Map) {
  7529. if ($m) {
  7530. return $mapGet($m, key);
  7531. }
  7532. } else {
  7533. if ($o) { // eslint-disable-line no-lonely-if
  7534. return listGet($o, key);
  7535. }
  7536. }
  7537. },
  7538. has: function (key) {
  7539. if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
  7540. if ($wm) {
  7541. return $weakMapHas($wm, key);
  7542. }
  7543. } else if ($Map) {
  7544. if ($m) {
  7545. return $mapHas($m, key);
  7546. }
  7547. } else {
  7548. if ($o) { // eslint-disable-line no-lonely-if
  7549. return listHas($o, key);
  7550. }
  7551. }
  7552. return false;
  7553. },
  7554. set: function (key, value) {
  7555. if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
  7556. if (!$wm) {
  7557. $wm = new $WeakMap();
  7558. }
  7559. $weakMapSet($wm, key, value);
  7560. } else if ($Map) {
  7561. if (!$m) {
  7562. $m = new $Map();
  7563. }
  7564. $mapSet($m, key, value);
  7565. } else {
  7566. if (!$o) {
  7567. /*
  7568. * Initialize the linked list as an empty node, so that we don't have
  7569. * to special-case handling of the first node: we can always refer to
  7570. * it as (previous node).next, instead of something like (list).head
  7571. */
  7572. $o = { key: {}, next: null };
  7573. }
  7574. listSet($o, key, value);
  7575. }
  7576. }
  7577. };
  7578. return channel;
  7579. };
  7580. /***/ }),
  7581. /***/ "./node_modules/vue/dist/vue.esm.js":
  7582. /*!******************************************!*\
  7583. !*** ./node_modules/vue/dist/vue.esm.js ***!
  7584. \******************************************/
  7585. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  7586. "use strict";
  7587. __webpack_require__.r(__webpack_exports__);
  7588. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7589. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  7590. /* harmony export */ });
  7591. /*!
  7592. * Vue.js v2.6.14
  7593. * (c) 2014-2021 Evan You
  7594. * Released under the MIT License.
  7595. */
  7596. /* */
  7597. var emptyObject = Object.freeze({});
  7598. // These helpers produce better VM code in JS engines due to their
  7599. // explicitness and function inlining.
  7600. function isUndef (v) {
  7601. return v === undefined || v === null
  7602. }
  7603. function isDef (v) {
  7604. return v !== undefined && v !== null
  7605. }
  7606. function isTrue (v) {
  7607. return v === true
  7608. }
  7609. function isFalse (v) {
  7610. return v === false
  7611. }
  7612. /**
  7613. * Check if value is primitive.
  7614. */
  7615. function isPrimitive (value) {
  7616. return (
  7617. typeof value === 'string' ||
  7618. typeof value === 'number' ||
  7619. // $flow-disable-line
  7620. typeof value === 'symbol' ||
  7621. typeof value === 'boolean'
  7622. )
  7623. }
  7624. /**
  7625. * Quick object check - this is primarily used to tell
  7626. * Objects from primitive values when we know the value
  7627. * is a JSON-compliant type.
  7628. */
  7629. function isObject (obj) {
  7630. return obj !== null && typeof obj === 'object'
  7631. }
  7632. /**
  7633. * Get the raw type string of a value, e.g., [object Object].
  7634. */
  7635. var _toString = Object.prototype.toString;
  7636. function toRawType (value) {
  7637. return _toString.call(value).slice(8, -1)
  7638. }
  7639. /**
  7640. * Strict object type check. Only returns true
  7641. * for plain JavaScript objects.
  7642. */
  7643. function isPlainObject (obj) {
  7644. return _toString.call(obj) === '[object Object]'
  7645. }
  7646. function isRegExp (v) {
  7647. return _toString.call(v) === '[object RegExp]'
  7648. }
  7649. /**
  7650. * Check if val is a valid array index.
  7651. */
  7652. function isValidArrayIndex (val) {
  7653. var n = parseFloat(String(val));
  7654. return n >= 0 && Math.floor(n) === n && isFinite(val)
  7655. }
  7656. function isPromise (val) {
  7657. return (
  7658. isDef(val) &&
  7659. typeof val.then === 'function' &&
  7660. typeof val.catch === 'function'
  7661. )
  7662. }
  7663. /**
  7664. * Convert a value to a string that is actually rendered.
  7665. */
  7666. function toString (val) {
  7667. return val == null
  7668. ? ''
  7669. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  7670. ? JSON.stringify(val, null, 2)
  7671. : String(val)
  7672. }
  7673. /**
  7674. * Convert an input value to a number for persistence.
  7675. * If the conversion fails, return original string.
  7676. */
  7677. function toNumber (val) {
  7678. var n = parseFloat(val);
  7679. return isNaN(n) ? val : n
  7680. }
  7681. /**
  7682. * Make a map and return a function for checking if a key
  7683. * is in that map.
  7684. */
  7685. function makeMap (
  7686. str,
  7687. expectsLowerCase
  7688. ) {
  7689. var map = Object.create(null);
  7690. var list = str.split(',');
  7691. for (var i = 0; i < list.length; i++) {
  7692. map[list[i]] = true;
  7693. }
  7694. return expectsLowerCase
  7695. ? function (val) { return map[val.toLowerCase()]; }
  7696. : function (val) { return map[val]; }
  7697. }
  7698. /**
  7699. * Check if a tag is a built-in tag.
  7700. */
  7701. var isBuiltInTag = makeMap('slot,component', true);
  7702. /**
  7703. * Check if an attribute is a reserved attribute.
  7704. */
  7705. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  7706. /**
  7707. * Remove an item from an array.
  7708. */
  7709. function remove (arr, item) {
  7710. if (arr.length) {
  7711. var index = arr.indexOf(item);
  7712. if (index > -1) {
  7713. return arr.splice(index, 1)
  7714. }
  7715. }
  7716. }
  7717. /**
  7718. * Check whether an object has the property.
  7719. */
  7720. var hasOwnProperty = Object.prototype.hasOwnProperty;
  7721. function hasOwn (obj, key) {
  7722. return hasOwnProperty.call(obj, key)
  7723. }
  7724. /**
  7725. * Create a cached version of a pure function.
  7726. */
  7727. function cached (fn) {
  7728. var cache = Object.create(null);
  7729. return (function cachedFn (str) {
  7730. var hit = cache[str];
  7731. return hit || (cache[str] = fn(str))
  7732. })
  7733. }
  7734. /**
  7735. * Camelize a hyphen-delimited string.
  7736. */
  7737. var camelizeRE = /-(\w)/g;
  7738. var camelize = cached(function (str) {
  7739. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  7740. });
  7741. /**
  7742. * Capitalize a string.
  7743. */
  7744. var capitalize = cached(function (str) {
  7745. return str.charAt(0).toUpperCase() + str.slice(1)
  7746. });
  7747. /**
  7748. * Hyphenate a camelCase string.
  7749. */
  7750. var hyphenateRE = /\B([A-Z])/g;
  7751. var hyphenate = cached(function (str) {
  7752. return str.replace(hyphenateRE, '-$1').toLowerCase()
  7753. });
  7754. /**
  7755. * Simple bind polyfill for environments that do not support it,
  7756. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  7757. * since native bind is now performant enough in most browsers.
  7758. * But removing it would mean breaking code that was able to run in
  7759. * PhantomJS 1.x, so this must be kept for backward compatibility.
  7760. */
  7761. /* istanbul ignore next */
  7762. function polyfillBind (fn, ctx) {
  7763. function boundFn (a) {
  7764. var l = arguments.length;
  7765. return l
  7766. ? l > 1
  7767. ? fn.apply(ctx, arguments)
  7768. : fn.call(ctx, a)
  7769. : fn.call(ctx)
  7770. }
  7771. boundFn._length = fn.length;
  7772. return boundFn
  7773. }
  7774. function nativeBind (fn, ctx) {
  7775. return fn.bind(ctx)
  7776. }
  7777. var bind = Function.prototype.bind
  7778. ? nativeBind
  7779. : polyfillBind;
  7780. /**
  7781. * Convert an Array-like object to a real Array.
  7782. */
  7783. function toArray (list, start) {
  7784. start = start || 0;
  7785. var i = list.length - start;
  7786. var ret = new Array(i);
  7787. while (i--) {
  7788. ret[i] = list[i + start];
  7789. }
  7790. return ret
  7791. }
  7792. /**
  7793. * Mix properties into target object.
  7794. */
  7795. function extend (to, _from) {
  7796. for (var key in _from) {
  7797. to[key] = _from[key];
  7798. }
  7799. return to
  7800. }
  7801. /**
  7802. * Merge an Array of Objects into a single Object.
  7803. */
  7804. function toObject (arr) {
  7805. var res = {};
  7806. for (var i = 0; i < arr.length; i++) {
  7807. if (arr[i]) {
  7808. extend(res, arr[i]);
  7809. }
  7810. }
  7811. return res
  7812. }
  7813. /* eslint-disable no-unused-vars */
  7814. /**
  7815. * Perform no operation.
  7816. * Stubbing args to make Flow happy without leaving useless transpiled code
  7817. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  7818. */
  7819. function noop (a, b, c) {}
  7820. /**
  7821. * Always return false.
  7822. */
  7823. var no = function (a, b, c) { return false; };
  7824. /* eslint-enable no-unused-vars */
  7825. /**
  7826. * Return the same value.
  7827. */
  7828. var identity = function (_) { return _; };
  7829. /**
  7830. * Generate a string containing static keys from compiler modules.
  7831. */
  7832. function genStaticKeys (modules) {
  7833. return modules.reduce(function (keys, m) {
  7834. return keys.concat(m.staticKeys || [])
  7835. }, []).join(',')
  7836. }
  7837. /**
  7838. * Check if two values are loosely equal - that is,
  7839. * if they are plain objects, do they have the same shape?
  7840. */
  7841. function looseEqual (a, b) {
  7842. if (a === b) { return true }
  7843. var isObjectA = isObject(a);
  7844. var isObjectB = isObject(b);
  7845. if (isObjectA && isObjectB) {
  7846. try {
  7847. var isArrayA = Array.isArray(a);
  7848. var isArrayB = Array.isArray(b);
  7849. if (isArrayA && isArrayB) {
  7850. return a.length === b.length && a.every(function (e, i) {
  7851. return looseEqual(e, b[i])
  7852. })
  7853. } else if (a instanceof Date && b instanceof Date) {
  7854. return a.getTime() === b.getTime()
  7855. } else if (!isArrayA && !isArrayB) {
  7856. var keysA = Object.keys(a);
  7857. var keysB = Object.keys(b);
  7858. return keysA.length === keysB.length && keysA.every(function (key) {
  7859. return looseEqual(a[key], b[key])
  7860. })
  7861. } else {
  7862. /* istanbul ignore next */
  7863. return false
  7864. }
  7865. } catch (e) {
  7866. /* istanbul ignore next */
  7867. return false
  7868. }
  7869. } else if (!isObjectA && !isObjectB) {
  7870. return String(a) === String(b)
  7871. } else {
  7872. return false
  7873. }
  7874. }
  7875. /**
  7876. * Return the first index at which a loosely equal value can be
  7877. * found in the array (if value is a plain object, the array must
  7878. * contain an object of the same shape), or -1 if it is not present.
  7879. */
  7880. function looseIndexOf (arr, val) {
  7881. for (var i = 0; i < arr.length; i++) {
  7882. if (looseEqual(arr[i], val)) { return i }
  7883. }
  7884. return -1
  7885. }
  7886. /**
  7887. * Ensure a function is called only once.
  7888. */
  7889. function once (fn) {
  7890. var called = false;
  7891. return function () {
  7892. if (!called) {
  7893. called = true;
  7894. fn.apply(this, arguments);
  7895. }
  7896. }
  7897. }
  7898. var SSR_ATTR = 'data-server-rendered';
  7899. var ASSET_TYPES = [
  7900. 'component',
  7901. 'directive',
  7902. 'filter'
  7903. ];
  7904. var LIFECYCLE_HOOKS = [
  7905. 'beforeCreate',
  7906. 'created',
  7907. 'beforeMount',
  7908. 'mounted',
  7909. 'beforeUpdate',
  7910. 'updated',
  7911. 'beforeDestroy',
  7912. 'destroyed',
  7913. 'activated',
  7914. 'deactivated',
  7915. 'errorCaptured',
  7916. 'serverPrefetch'
  7917. ];
  7918. /* */
  7919. var config = ({
  7920. /**
  7921. * Option merge strategies (used in core/util/options)
  7922. */
  7923. // $flow-disable-line
  7924. optionMergeStrategies: Object.create(null),
  7925. /**
  7926. * Whether to suppress warnings.
  7927. */
  7928. silent: false,
  7929. /**
  7930. * Show production mode tip message on boot?
  7931. */
  7932. productionTip: "development" !== 'production',
  7933. /**
  7934. * Whether to enable devtools
  7935. */
  7936. devtools: "development" !== 'production',
  7937. /**
  7938. * Whether to record perf
  7939. */
  7940. performance: false,
  7941. /**
  7942. * Error handler for watcher errors
  7943. */
  7944. errorHandler: null,
  7945. /**
  7946. * Warn handler for watcher warns
  7947. */
  7948. warnHandler: null,
  7949. /**
  7950. * Ignore certain custom elements
  7951. */
  7952. ignoredElements: [],
  7953. /**
  7954. * Custom user key aliases for v-on
  7955. */
  7956. // $flow-disable-line
  7957. keyCodes: Object.create(null),
  7958. /**
  7959. * Check if a tag is reserved so that it cannot be registered as a
  7960. * component. This is platform-dependent and may be overwritten.
  7961. */
  7962. isReservedTag: no,
  7963. /**
  7964. * Check if an attribute is reserved so that it cannot be used as a component
  7965. * prop. This is platform-dependent and may be overwritten.
  7966. */
  7967. isReservedAttr: no,
  7968. /**
  7969. * Check if a tag is an unknown element.
  7970. * Platform-dependent.
  7971. */
  7972. isUnknownElement: no,
  7973. /**
  7974. * Get the namespace of an element
  7975. */
  7976. getTagNamespace: noop,
  7977. /**
  7978. * Parse the real tag name for the specific platform.
  7979. */
  7980. parsePlatformTagName: identity,
  7981. /**
  7982. * Check if an attribute must be bound using property, e.g. value
  7983. * Platform-dependent.
  7984. */
  7985. mustUseProp: no,
  7986. /**
  7987. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  7988. * This will significantly reduce performance if set to false.
  7989. */
  7990. async: true,
  7991. /**
  7992. * Exposed for legacy reasons
  7993. */
  7994. _lifecycleHooks: LIFECYCLE_HOOKS
  7995. });
  7996. /* */
  7997. /**
  7998. * unicode letters used for parsing html tags, component names and property paths.
  7999. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  8000. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  8001. */
  8002. 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/;
  8003. /**
  8004. * Check if a string starts with $ or _
  8005. */
  8006. function isReserved (str) {
  8007. var c = (str + '').charCodeAt(0);
  8008. return c === 0x24 || c === 0x5F
  8009. }
  8010. /**
  8011. * Define a property.
  8012. */
  8013. function def (obj, key, val, enumerable) {
  8014. Object.defineProperty(obj, key, {
  8015. value: val,
  8016. enumerable: !!enumerable,
  8017. writable: true,
  8018. configurable: true
  8019. });
  8020. }
  8021. /**
  8022. * Parse simple path.
  8023. */
  8024. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  8025. function parsePath (path) {
  8026. if (bailRE.test(path)) {
  8027. return
  8028. }
  8029. var segments = path.split('.');
  8030. return function (obj) {
  8031. for (var i = 0; i < segments.length; i++) {
  8032. if (!obj) { return }
  8033. obj = obj[segments[i]];
  8034. }
  8035. return obj
  8036. }
  8037. }
  8038. /* */
  8039. // can we use __proto__?
  8040. var hasProto = '__proto__' in {};
  8041. // Browser environment sniffing
  8042. var inBrowser = typeof window !== 'undefined';
  8043. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  8044. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  8045. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  8046. var isIE = UA && /msie|trident/.test(UA);
  8047. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  8048. var isEdge = UA && UA.indexOf('edge/') > 0;
  8049. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  8050. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  8051. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  8052. var isPhantomJS = UA && /phantomjs/.test(UA);
  8053. var isFF = UA && UA.match(/firefox\/(\d+)/);
  8054. // Firefox has a "watch" function on Object.prototype...
  8055. var nativeWatch = ({}).watch;
  8056. var supportsPassive = false;
  8057. if (inBrowser) {
  8058. try {
  8059. var opts = {};
  8060. Object.defineProperty(opts, 'passive', ({
  8061. get: function get () {
  8062. /* istanbul ignore next */
  8063. supportsPassive = true;
  8064. }
  8065. })); // https://github.com/facebook/flow/issues/285
  8066. window.addEventListener('test-passive', null, opts);
  8067. } catch (e) {}
  8068. }
  8069. // this needs to be lazy-evaled because vue may be required before
  8070. // vue-server-renderer can set VUE_ENV
  8071. var _isServer;
  8072. var isServerRendering = function () {
  8073. if (_isServer === undefined) {
  8074. /* istanbul ignore if */
  8075. if (!inBrowser && !inWeex && typeof __webpack_require__.g !== 'undefined') {
  8076. // detect presence of vue-server-renderer and avoid
  8077. // Webpack shimming the process
  8078. _isServer = __webpack_require__.g['process'] && __webpack_require__.g['process'].env.VUE_ENV === 'server';
  8079. } else {
  8080. _isServer = false;
  8081. }
  8082. }
  8083. return _isServer
  8084. };
  8085. // detect devtools
  8086. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  8087. /* istanbul ignore next */
  8088. function isNative (Ctor) {
  8089. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  8090. }
  8091. var hasSymbol =
  8092. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  8093. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  8094. var _Set;
  8095. /* istanbul ignore if */ // $flow-disable-line
  8096. if (typeof Set !== 'undefined' && isNative(Set)) {
  8097. // use native Set when available.
  8098. _Set = Set;
  8099. } else {
  8100. // a non-standard Set polyfill that only works with primitive keys.
  8101. _Set = /*@__PURE__*/(function () {
  8102. function Set () {
  8103. this.set = Object.create(null);
  8104. }
  8105. Set.prototype.has = function has (key) {
  8106. return this.set[key] === true
  8107. };
  8108. Set.prototype.add = function add (key) {
  8109. this.set[key] = true;
  8110. };
  8111. Set.prototype.clear = function clear () {
  8112. this.set = Object.create(null);
  8113. };
  8114. return Set;
  8115. }());
  8116. }
  8117. /* */
  8118. var warn = noop;
  8119. var tip = noop;
  8120. var generateComponentTrace = (noop); // work around flow check
  8121. var formatComponentName = (noop);
  8122. if (true) {
  8123. var hasConsole = typeof console !== 'undefined';
  8124. var classifyRE = /(?:^|[-_])(\w)/g;
  8125. var classify = function (str) { return str
  8126. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  8127. .replace(/[-_]/g, ''); };
  8128. warn = function (msg, vm) {
  8129. var trace = vm ? generateComponentTrace(vm) : '';
  8130. if (config.warnHandler) {
  8131. config.warnHandler.call(null, msg, vm, trace);
  8132. } else if (hasConsole && (!config.silent)) {
  8133. console.error(("[Vue warn]: " + msg + trace));
  8134. }
  8135. };
  8136. tip = function (msg, vm) {
  8137. if (hasConsole && (!config.silent)) {
  8138. console.warn("[Vue tip]: " + msg + (
  8139. vm ? generateComponentTrace(vm) : ''
  8140. ));
  8141. }
  8142. };
  8143. formatComponentName = function (vm, includeFile) {
  8144. if (vm.$root === vm) {
  8145. return '<Root>'
  8146. }
  8147. var options = typeof vm === 'function' && vm.cid != null
  8148. ? vm.options
  8149. : vm._isVue
  8150. ? vm.$options || vm.constructor.options
  8151. : vm;
  8152. var name = options.name || options._componentTag;
  8153. var file = options.__file;
  8154. if (!name && file) {
  8155. var match = file.match(/([^/\\]+)\.vue$/);
  8156. name = match && match[1];
  8157. }
  8158. return (
  8159. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  8160. (file && includeFile !== false ? (" at " + file) : '')
  8161. )
  8162. };
  8163. var repeat = function (str, n) {
  8164. var res = '';
  8165. while (n) {
  8166. if (n % 2 === 1) { res += str; }
  8167. if (n > 1) { str += str; }
  8168. n >>= 1;
  8169. }
  8170. return res
  8171. };
  8172. generateComponentTrace = function (vm) {
  8173. if (vm._isVue && vm.$parent) {
  8174. var tree = [];
  8175. var currentRecursiveSequence = 0;
  8176. while (vm) {
  8177. if (tree.length > 0) {
  8178. var last = tree[tree.length - 1];
  8179. if (last.constructor === vm.constructor) {
  8180. currentRecursiveSequence++;
  8181. vm = vm.$parent;
  8182. continue
  8183. } else if (currentRecursiveSequence > 0) {
  8184. tree[tree.length - 1] = [last, currentRecursiveSequence];
  8185. currentRecursiveSequence = 0;
  8186. }
  8187. }
  8188. tree.push(vm);
  8189. vm = vm.$parent;
  8190. }
  8191. return '\n\nfound in\n\n' + tree
  8192. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  8193. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  8194. : formatComponentName(vm))); })
  8195. .join('\n')
  8196. } else {
  8197. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  8198. }
  8199. };
  8200. }
  8201. /* */
  8202. var uid = 0;
  8203. /**
  8204. * A dep is an observable that can have multiple
  8205. * directives subscribing to it.
  8206. */
  8207. var Dep = function Dep () {
  8208. this.id = uid++;
  8209. this.subs = [];
  8210. };
  8211. Dep.prototype.addSub = function addSub (sub) {
  8212. this.subs.push(sub);
  8213. };
  8214. Dep.prototype.removeSub = function removeSub (sub) {
  8215. remove(this.subs, sub);
  8216. };
  8217. Dep.prototype.depend = function depend () {
  8218. if (Dep.target) {
  8219. Dep.target.addDep(this);
  8220. }
  8221. };
  8222. Dep.prototype.notify = function notify () {
  8223. // stabilize the subscriber list first
  8224. var subs = this.subs.slice();
  8225. if ( true && !config.async) {
  8226. // subs aren't sorted in scheduler if not running async
  8227. // we need to sort them now to make sure they fire in correct
  8228. // order
  8229. subs.sort(function (a, b) { return a.id - b.id; });
  8230. }
  8231. for (var i = 0, l = subs.length; i < l; i++) {
  8232. subs[i].update();
  8233. }
  8234. };
  8235. // The current target watcher being evaluated.
  8236. // This is globally unique because only one watcher
  8237. // can be evaluated at a time.
  8238. Dep.target = null;
  8239. var targetStack = [];
  8240. function pushTarget (target) {
  8241. targetStack.push(target);
  8242. Dep.target = target;
  8243. }
  8244. function popTarget () {
  8245. targetStack.pop();
  8246. Dep.target = targetStack[targetStack.length - 1];
  8247. }
  8248. /* */
  8249. var VNode = function VNode (
  8250. tag,
  8251. data,
  8252. children,
  8253. text,
  8254. elm,
  8255. context,
  8256. componentOptions,
  8257. asyncFactory
  8258. ) {
  8259. this.tag = tag;
  8260. this.data = data;
  8261. this.children = children;
  8262. this.text = text;
  8263. this.elm = elm;
  8264. this.ns = undefined;
  8265. this.context = context;
  8266. this.fnContext = undefined;
  8267. this.fnOptions = undefined;
  8268. this.fnScopeId = undefined;
  8269. this.key = data && data.key;
  8270. this.componentOptions = componentOptions;
  8271. this.componentInstance = undefined;
  8272. this.parent = undefined;
  8273. this.raw = false;
  8274. this.isStatic = false;
  8275. this.isRootInsert = true;
  8276. this.isComment = false;
  8277. this.isCloned = false;
  8278. this.isOnce = false;
  8279. this.asyncFactory = asyncFactory;
  8280. this.asyncMeta = undefined;
  8281. this.isAsyncPlaceholder = false;
  8282. };
  8283. var prototypeAccessors = { child: { configurable: true } };
  8284. // DEPRECATED: alias for componentInstance for backwards compat.
  8285. /* istanbul ignore next */
  8286. prototypeAccessors.child.get = function () {
  8287. return this.componentInstance
  8288. };
  8289. Object.defineProperties( VNode.prototype, prototypeAccessors );
  8290. var createEmptyVNode = function (text) {
  8291. if ( text === void 0 ) text = '';
  8292. var node = new VNode();
  8293. node.text = text;
  8294. node.isComment = true;
  8295. return node
  8296. };
  8297. function createTextVNode (val) {
  8298. return new VNode(undefined, undefined, undefined, String(val))
  8299. }
  8300. // optimized shallow clone
  8301. // used for static nodes and slot nodes because they may be reused across
  8302. // multiple renders, cloning them avoids errors when DOM manipulations rely
  8303. // on their elm reference.
  8304. function cloneVNode (vnode) {
  8305. var cloned = new VNode(
  8306. vnode.tag,
  8307. vnode.data,
  8308. // #7975
  8309. // clone children array to avoid mutating original in case of cloning
  8310. // a child.
  8311. vnode.children && vnode.children.slice(),
  8312. vnode.text,
  8313. vnode.elm,
  8314. vnode.context,
  8315. vnode.componentOptions,
  8316. vnode.asyncFactory
  8317. );
  8318. cloned.ns = vnode.ns;
  8319. cloned.isStatic = vnode.isStatic;
  8320. cloned.key = vnode.key;
  8321. cloned.isComment = vnode.isComment;
  8322. cloned.fnContext = vnode.fnContext;
  8323. cloned.fnOptions = vnode.fnOptions;
  8324. cloned.fnScopeId = vnode.fnScopeId;
  8325. cloned.asyncMeta = vnode.asyncMeta;
  8326. cloned.isCloned = true;
  8327. return cloned
  8328. }
  8329. /*
  8330. * not type checking this file because flow doesn't play well with
  8331. * dynamically accessing methods on Array prototype
  8332. */
  8333. var arrayProto = Array.prototype;
  8334. var arrayMethods = Object.create(arrayProto);
  8335. var methodsToPatch = [
  8336. 'push',
  8337. 'pop',
  8338. 'shift',
  8339. 'unshift',
  8340. 'splice',
  8341. 'sort',
  8342. 'reverse'
  8343. ];
  8344. /**
  8345. * Intercept mutating methods and emit events
  8346. */
  8347. methodsToPatch.forEach(function (method) {
  8348. // cache original method
  8349. var original = arrayProto[method];
  8350. def(arrayMethods, method, function mutator () {
  8351. var args = [], len = arguments.length;
  8352. while ( len-- ) args[ len ] = arguments[ len ];
  8353. var result = original.apply(this, args);
  8354. var ob = this.__ob__;
  8355. var inserted;
  8356. switch (method) {
  8357. case 'push':
  8358. case 'unshift':
  8359. inserted = args;
  8360. break
  8361. case 'splice':
  8362. inserted = args.slice(2);
  8363. break
  8364. }
  8365. if (inserted) { ob.observeArray(inserted); }
  8366. // notify change
  8367. ob.dep.notify();
  8368. return result
  8369. });
  8370. });
  8371. /* */
  8372. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  8373. /**
  8374. * In some cases we may want to disable observation inside a component's
  8375. * update computation.
  8376. */
  8377. var shouldObserve = true;
  8378. function toggleObserving (value) {
  8379. shouldObserve = value;
  8380. }
  8381. /**
  8382. * Observer class that is attached to each observed
  8383. * object. Once attached, the observer converts the target
  8384. * object's property keys into getter/setters that
  8385. * collect dependencies and dispatch updates.
  8386. */
  8387. var Observer = function Observer (value) {
  8388. this.value = value;
  8389. this.dep = new Dep();
  8390. this.vmCount = 0;
  8391. def(value, '__ob__', this);
  8392. if (Array.isArray(value)) {
  8393. if (hasProto) {
  8394. protoAugment(value, arrayMethods);
  8395. } else {
  8396. copyAugment(value, arrayMethods, arrayKeys);
  8397. }
  8398. this.observeArray(value);
  8399. } else {
  8400. this.walk(value);
  8401. }
  8402. };
  8403. /**
  8404. * Walk through all properties and convert them into
  8405. * getter/setters. This method should only be called when
  8406. * value type is Object.
  8407. */
  8408. Observer.prototype.walk = function walk (obj) {
  8409. var keys = Object.keys(obj);
  8410. for (var i = 0; i < keys.length; i++) {
  8411. defineReactive$$1(obj, keys[i]);
  8412. }
  8413. };
  8414. /**
  8415. * Observe a list of Array items.
  8416. */
  8417. Observer.prototype.observeArray = function observeArray (items) {
  8418. for (var i = 0, l = items.length; i < l; i++) {
  8419. observe(items[i]);
  8420. }
  8421. };
  8422. // helpers
  8423. /**
  8424. * Augment a target Object or Array by intercepting
  8425. * the prototype chain using __proto__
  8426. */
  8427. function protoAugment (target, src) {
  8428. /* eslint-disable no-proto */
  8429. target.__proto__ = src;
  8430. /* eslint-enable no-proto */
  8431. }
  8432. /**
  8433. * Augment a target Object or Array by defining
  8434. * hidden properties.
  8435. */
  8436. /* istanbul ignore next */
  8437. function copyAugment (target, src, keys) {
  8438. for (var i = 0, l = keys.length; i < l; i++) {
  8439. var key = keys[i];
  8440. def(target, key, src[key]);
  8441. }
  8442. }
  8443. /**
  8444. * Attempt to create an observer instance for a value,
  8445. * returns the new observer if successfully observed,
  8446. * or the existing observer if the value already has one.
  8447. */
  8448. function observe (value, asRootData) {
  8449. if (!isObject(value) || value instanceof VNode) {
  8450. return
  8451. }
  8452. var ob;
  8453. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  8454. ob = value.__ob__;
  8455. } else if (
  8456. shouldObserve &&
  8457. !isServerRendering() &&
  8458. (Array.isArray(value) || isPlainObject(value)) &&
  8459. Object.isExtensible(value) &&
  8460. !value._isVue
  8461. ) {
  8462. ob = new Observer(value);
  8463. }
  8464. if (asRootData && ob) {
  8465. ob.vmCount++;
  8466. }
  8467. return ob
  8468. }
  8469. /**
  8470. * Define a reactive property on an Object.
  8471. */
  8472. function defineReactive$$1 (
  8473. obj,
  8474. key,
  8475. val,
  8476. customSetter,
  8477. shallow
  8478. ) {
  8479. var dep = new Dep();
  8480. var property = Object.getOwnPropertyDescriptor(obj, key);
  8481. if (property && property.configurable === false) {
  8482. return
  8483. }
  8484. // cater for pre-defined getter/setters
  8485. var getter = property && property.get;
  8486. var setter = property && property.set;
  8487. if ((!getter || setter) && arguments.length === 2) {
  8488. val = obj[key];
  8489. }
  8490. var childOb = !shallow && observe(val);
  8491. Object.defineProperty(obj, key, {
  8492. enumerable: true,
  8493. configurable: true,
  8494. get: function reactiveGetter () {
  8495. var value = getter ? getter.call(obj) : val;
  8496. if (Dep.target) {
  8497. dep.depend();
  8498. if (childOb) {
  8499. childOb.dep.depend();
  8500. if (Array.isArray(value)) {
  8501. dependArray(value);
  8502. }
  8503. }
  8504. }
  8505. return value
  8506. },
  8507. set: function reactiveSetter (newVal) {
  8508. var value = getter ? getter.call(obj) : val;
  8509. /* eslint-disable no-self-compare */
  8510. if (newVal === value || (newVal !== newVal && value !== value)) {
  8511. return
  8512. }
  8513. /* eslint-enable no-self-compare */
  8514. if ( true && customSetter) {
  8515. customSetter();
  8516. }
  8517. // #7981: for accessor properties without setter
  8518. if (getter && !setter) { return }
  8519. if (setter) {
  8520. setter.call(obj, newVal);
  8521. } else {
  8522. val = newVal;
  8523. }
  8524. childOb = !shallow && observe(newVal);
  8525. dep.notify();
  8526. }
  8527. });
  8528. }
  8529. /**
  8530. * Set a property on an object. Adds the new property and
  8531. * triggers change notification if the property doesn't
  8532. * already exist.
  8533. */
  8534. function set (target, key, val) {
  8535. if ( true &&
  8536. (isUndef(target) || isPrimitive(target))
  8537. ) {
  8538. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  8539. }
  8540. if (Array.isArray(target) && isValidArrayIndex(key)) {
  8541. target.length = Math.max(target.length, key);
  8542. target.splice(key, 1, val);
  8543. return val
  8544. }
  8545. if (key in target && !(key in Object.prototype)) {
  8546. target[key] = val;
  8547. return val
  8548. }
  8549. var ob = (target).__ob__;
  8550. if (target._isVue || (ob && ob.vmCount)) {
  8551. true && warn(
  8552. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  8553. 'at runtime - declare it upfront in the data option.'
  8554. );
  8555. return val
  8556. }
  8557. if (!ob) {
  8558. target[key] = val;
  8559. return val
  8560. }
  8561. defineReactive$$1(ob.value, key, val);
  8562. ob.dep.notify();
  8563. return val
  8564. }
  8565. /**
  8566. * Delete a property and trigger change if necessary.
  8567. */
  8568. function del (target, key) {
  8569. if ( true &&
  8570. (isUndef(target) || isPrimitive(target))
  8571. ) {
  8572. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  8573. }
  8574. if (Array.isArray(target) && isValidArrayIndex(key)) {
  8575. target.splice(key, 1);
  8576. return
  8577. }
  8578. var ob = (target).__ob__;
  8579. if (target._isVue || (ob && ob.vmCount)) {
  8580. true && warn(
  8581. 'Avoid deleting properties on a Vue instance or its root $data ' +
  8582. '- just set it to null.'
  8583. );
  8584. return
  8585. }
  8586. if (!hasOwn(target, key)) {
  8587. return
  8588. }
  8589. delete target[key];
  8590. if (!ob) {
  8591. return
  8592. }
  8593. ob.dep.notify();
  8594. }
  8595. /**
  8596. * Collect dependencies on array elements when the array is touched, since
  8597. * we cannot intercept array element access like property getters.
  8598. */
  8599. function dependArray (value) {
  8600. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  8601. e = value[i];
  8602. e && e.__ob__ && e.__ob__.dep.depend();
  8603. if (Array.isArray(e)) {
  8604. dependArray(e);
  8605. }
  8606. }
  8607. }
  8608. /* */
  8609. /**
  8610. * Option overwriting strategies are functions that handle
  8611. * how to merge a parent option value and a child option
  8612. * value into the final value.
  8613. */
  8614. var strats = config.optionMergeStrategies;
  8615. /**
  8616. * Options with restrictions
  8617. */
  8618. if (true) {
  8619. strats.el = strats.propsData = function (parent, child, vm, key) {
  8620. if (!vm) {
  8621. warn(
  8622. "option \"" + key + "\" can only be used during instance " +
  8623. 'creation with the `new` keyword.'
  8624. );
  8625. }
  8626. return defaultStrat(parent, child)
  8627. };
  8628. }
  8629. /**
  8630. * Helper that recursively merges two data objects together.
  8631. */
  8632. function mergeData (to, from) {
  8633. if (!from) { return to }
  8634. var key, toVal, fromVal;
  8635. var keys = hasSymbol
  8636. ? Reflect.ownKeys(from)
  8637. : Object.keys(from);
  8638. for (var i = 0; i < keys.length; i++) {
  8639. key = keys[i];
  8640. // in case the object is already observed...
  8641. if (key === '__ob__') { continue }
  8642. toVal = to[key];
  8643. fromVal = from[key];
  8644. if (!hasOwn(to, key)) {
  8645. set(to, key, fromVal);
  8646. } else if (
  8647. toVal !== fromVal &&
  8648. isPlainObject(toVal) &&
  8649. isPlainObject(fromVal)
  8650. ) {
  8651. mergeData(toVal, fromVal);
  8652. }
  8653. }
  8654. return to
  8655. }
  8656. /**
  8657. * Data
  8658. */
  8659. function mergeDataOrFn (
  8660. parentVal,
  8661. childVal,
  8662. vm
  8663. ) {
  8664. if (!vm) {
  8665. // in a Vue.extend merge, both should be functions
  8666. if (!childVal) {
  8667. return parentVal
  8668. }
  8669. if (!parentVal) {
  8670. return childVal
  8671. }
  8672. // when parentVal & childVal are both present,
  8673. // we need to return a function that returns the
  8674. // merged result of both functions... no need to
  8675. // check if parentVal is a function here because
  8676. // it has to be a function to pass previous merges.
  8677. return function mergedDataFn () {
  8678. return mergeData(
  8679. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  8680. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  8681. )
  8682. }
  8683. } else {
  8684. return function mergedInstanceDataFn () {
  8685. // instance merge
  8686. var instanceData = typeof childVal === 'function'
  8687. ? childVal.call(vm, vm)
  8688. : childVal;
  8689. var defaultData = typeof parentVal === 'function'
  8690. ? parentVal.call(vm, vm)
  8691. : parentVal;
  8692. if (instanceData) {
  8693. return mergeData(instanceData, defaultData)
  8694. } else {
  8695. return defaultData
  8696. }
  8697. }
  8698. }
  8699. }
  8700. strats.data = function (
  8701. parentVal,
  8702. childVal,
  8703. vm
  8704. ) {
  8705. if (!vm) {
  8706. if (childVal && typeof childVal !== 'function') {
  8707. true && warn(
  8708. 'The "data" option should be a function ' +
  8709. 'that returns a per-instance value in component ' +
  8710. 'definitions.',
  8711. vm
  8712. );
  8713. return parentVal
  8714. }
  8715. return mergeDataOrFn(parentVal, childVal)
  8716. }
  8717. return mergeDataOrFn(parentVal, childVal, vm)
  8718. };
  8719. /**
  8720. * Hooks and props are merged as arrays.
  8721. */
  8722. function mergeHook (
  8723. parentVal,
  8724. childVal
  8725. ) {
  8726. var res = childVal
  8727. ? parentVal
  8728. ? parentVal.concat(childVal)
  8729. : Array.isArray(childVal)
  8730. ? childVal
  8731. : [childVal]
  8732. : parentVal;
  8733. return res
  8734. ? dedupeHooks(res)
  8735. : res
  8736. }
  8737. function dedupeHooks (hooks) {
  8738. var res = [];
  8739. for (var i = 0; i < hooks.length; i++) {
  8740. if (res.indexOf(hooks[i]) === -1) {
  8741. res.push(hooks[i]);
  8742. }
  8743. }
  8744. return res
  8745. }
  8746. LIFECYCLE_HOOKS.forEach(function (hook) {
  8747. strats[hook] = mergeHook;
  8748. });
  8749. /**
  8750. * Assets
  8751. *
  8752. * When a vm is present (instance creation), we need to do
  8753. * a three-way merge between constructor options, instance
  8754. * options and parent options.
  8755. */
  8756. function mergeAssets (
  8757. parentVal,
  8758. childVal,
  8759. vm,
  8760. key
  8761. ) {
  8762. var res = Object.create(parentVal || null);
  8763. if (childVal) {
  8764. true && assertObjectType(key, childVal, vm);
  8765. return extend(res, childVal)
  8766. } else {
  8767. return res
  8768. }
  8769. }
  8770. ASSET_TYPES.forEach(function (type) {
  8771. strats[type + 's'] = mergeAssets;
  8772. });
  8773. /**
  8774. * Watchers.
  8775. *
  8776. * Watchers hashes should not overwrite one
  8777. * another, so we merge them as arrays.
  8778. */
  8779. strats.watch = function (
  8780. parentVal,
  8781. childVal,
  8782. vm,
  8783. key
  8784. ) {
  8785. // work around Firefox's Object.prototype.watch...
  8786. if (parentVal === nativeWatch) { parentVal = undefined; }
  8787. if (childVal === nativeWatch) { childVal = undefined; }
  8788. /* istanbul ignore if */
  8789. if (!childVal) { return Object.create(parentVal || null) }
  8790. if (true) {
  8791. assertObjectType(key, childVal, vm);
  8792. }
  8793. if (!parentVal) { return childVal }
  8794. var ret = {};
  8795. extend(ret, parentVal);
  8796. for (var key$1 in childVal) {
  8797. var parent = ret[key$1];
  8798. var child = childVal[key$1];
  8799. if (parent && !Array.isArray(parent)) {
  8800. parent = [parent];
  8801. }
  8802. ret[key$1] = parent
  8803. ? parent.concat(child)
  8804. : Array.isArray(child) ? child : [child];
  8805. }
  8806. return ret
  8807. };
  8808. /**
  8809. * Other object hashes.
  8810. */
  8811. strats.props =
  8812. strats.methods =
  8813. strats.inject =
  8814. strats.computed = function (
  8815. parentVal,
  8816. childVal,
  8817. vm,
  8818. key
  8819. ) {
  8820. if (childVal && "development" !== 'production') {
  8821. assertObjectType(key, childVal, vm);
  8822. }
  8823. if (!parentVal) { return childVal }
  8824. var ret = Object.create(null);
  8825. extend(ret, parentVal);
  8826. if (childVal) { extend(ret, childVal); }
  8827. return ret
  8828. };
  8829. strats.provide = mergeDataOrFn;
  8830. /**
  8831. * Default strategy.
  8832. */
  8833. var defaultStrat = function (parentVal, childVal) {
  8834. return childVal === undefined
  8835. ? parentVal
  8836. : childVal
  8837. };
  8838. /**
  8839. * Validate component names
  8840. */
  8841. function checkComponents (options) {
  8842. for (var key in options.components) {
  8843. validateComponentName(key);
  8844. }
  8845. }
  8846. function validateComponentName (name) {
  8847. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  8848. warn(
  8849. 'Invalid component name: "' + name + '". Component names ' +
  8850. 'should conform to valid custom element name in html5 specification.'
  8851. );
  8852. }
  8853. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  8854. warn(
  8855. 'Do not use built-in or reserved HTML elements as component ' +
  8856. 'id: ' + name
  8857. );
  8858. }
  8859. }
  8860. /**
  8861. * Ensure all props option syntax are normalized into the
  8862. * Object-based format.
  8863. */
  8864. function normalizeProps (options, vm) {
  8865. var props = options.props;
  8866. if (!props) { return }
  8867. var res = {};
  8868. var i, val, name;
  8869. if (Array.isArray(props)) {
  8870. i = props.length;
  8871. while (i--) {
  8872. val = props[i];
  8873. if (typeof val === 'string') {
  8874. name = camelize(val);
  8875. res[name] = { type: null };
  8876. } else if (true) {
  8877. warn('props must be strings when using array syntax.');
  8878. }
  8879. }
  8880. } else if (isPlainObject(props)) {
  8881. for (var key in props) {
  8882. val = props[key];
  8883. name = camelize(key);
  8884. res[name] = isPlainObject(val)
  8885. ? val
  8886. : { type: val };
  8887. }
  8888. } else if (true) {
  8889. warn(
  8890. "Invalid value for option \"props\": expected an Array or an Object, " +
  8891. "but got " + (toRawType(props)) + ".",
  8892. vm
  8893. );
  8894. }
  8895. options.props = res;
  8896. }
  8897. /**
  8898. * Normalize all injections into Object-based format
  8899. */
  8900. function normalizeInject (options, vm) {
  8901. var inject = options.inject;
  8902. if (!inject) { return }
  8903. var normalized = options.inject = {};
  8904. if (Array.isArray(inject)) {
  8905. for (var i = 0; i < inject.length; i++) {
  8906. normalized[inject[i]] = { from: inject[i] };
  8907. }
  8908. } else if (isPlainObject(inject)) {
  8909. for (var key in inject) {
  8910. var val = inject[key];
  8911. normalized[key] = isPlainObject(val)
  8912. ? extend({ from: key }, val)
  8913. : { from: val };
  8914. }
  8915. } else if (true) {
  8916. warn(
  8917. "Invalid value for option \"inject\": expected an Array or an Object, " +
  8918. "but got " + (toRawType(inject)) + ".",
  8919. vm
  8920. );
  8921. }
  8922. }
  8923. /**
  8924. * Normalize raw function directives into object format.
  8925. */
  8926. function normalizeDirectives (options) {
  8927. var dirs = options.directives;
  8928. if (dirs) {
  8929. for (var key in dirs) {
  8930. var def$$1 = dirs[key];
  8931. if (typeof def$$1 === 'function') {
  8932. dirs[key] = { bind: def$$1, update: def$$1 };
  8933. }
  8934. }
  8935. }
  8936. }
  8937. function assertObjectType (name, value, vm) {
  8938. if (!isPlainObject(value)) {
  8939. warn(
  8940. "Invalid value for option \"" + name + "\": expected an Object, " +
  8941. "but got " + (toRawType(value)) + ".",
  8942. vm
  8943. );
  8944. }
  8945. }
  8946. /**
  8947. * Merge two option objects into a new one.
  8948. * Core utility used in both instantiation and inheritance.
  8949. */
  8950. function mergeOptions (
  8951. parent,
  8952. child,
  8953. vm
  8954. ) {
  8955. if (true) {
  8956. checkComponents(child);
  8957. }
  8958. if (typeof child === 'function') {
  8959. child = child.options;
  8960. }
  8961. normalizeProps(child, vm);
  8962. normalizeInject(child, vm);
  8963. normalizeDirectives(child);
  8964. // Apply extends and mixins on the child options,
  8965. // but only if it is a raw options object that isn't
  8966. // the result of another mergeOptions call.
  8967. // Only merged options has the _base property.
  8968. if (!child._base) {
  8969. if (child.extends) {
  8970. parent = mergeOptions(parent, child.extends, vm);
  8971. }
  8972. if (child.mixins) {
  8973. for (var i = 0, l = child.mixins.length; i < l; i++) {
  8974. parent = mergeOptions(parent, child.mixins[i], vm);
  8975. }
  8976. }
  8977. }
  8978. var options = {};
  8979. var key;
  8980. for (key in parent) {
  8981. mergeField(key);
  8982. }
  8983. for (key in child) {
  8984. if (!hasOwn(parent, key)) {
  8985. mergeField(key);
  8986. }
  8987. }
  8988. function mergeField (key) {
  8989. var strat = strats[key] || defaultStrat;
  8990. options[key] = strat(parent[key], child[key], vm, key);
  8991. }
  8992. return options
  8993. }
  8994. /**
  8995. * Resolve an asset.
  8996. * This function is used because child instances need access
  8997. * to assets defined in its ancestor chain.
  8998. */
  8999. function resolveAsset (
  9000. options,
  9001. type,
  9002. id,
  9003. warnMissing
  9004. ) {
  9005. /* istanbul ignore if */
  9006. if (typeof id !== 'string') {
  9007. return
  9008. }
  9009. var assets = options[type];
  9010. // check local registration variations first
  9011. if (hasOwn(assets, id)) { return assets[id] }
  9012. var camelizedId = camelize(id);
  9013. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  9014. var PascalCaseId = capitalize(camelizedId);
  9015. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  9016. // fallback to prototype chain
  9017. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  9018. if ( true && warnMissing && !res) {
  9019. warn(
  9020. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  9021. options
  9022. );
  9023. }
  9024. return res
  9025. }
  9026. /* */
  9027. function validateProp (
  9028. key,
  9029. propOptions,
  9030. propsData,
  9031. vm
  9032. ) {
  9033. var prop = propOptions[key];
  9034. var absent = !hasOwn(propsData, key);
  9035. var value = propsData[key];
  9036. // boolean casting
  9037. var booleanIndex = getTypeIndex(Boolean, prop.type);
  9038. if (booleanIndex > -1) {
  9039. if (absent && !hasOwn(prop, 'default')) {
  9040. value = false;
  9041. } else if (value === '' || value === hyphenate(key)) {
  9042. // only cast empty string / same name to boolean if
  9043. // boolean has higher priority
  9044. var stringIndex = getTypeIndex(String, prop.type);
  9045. if (stringIndex < 0 || booleanIndex < stringIndex) {
  9046. value = true;
  9047. }
  9048. }
  9049. }
  9050. // check default value
  9051. if (value === undefined) {
  9052. value = getPropDefaultValue(vm, prop, key);
  9053. // since the default value is a fresh copy,
  9054. // make sure to observe it.
  9055. var prevShouldObserve = shouldObserve;
  9056. toggleObserving(true);
  9057. observe(value);
  9058. toggleObserving(prevShouldObserve);
  9059. }
  9060. if (
  9061. true
  9062. ) {
  9063. assertProp(prop, key, value, vm, absent);
  9064. }
  9065. return value
  9066. }
  9067. /**
  9068. * Get the default value of a prop.
  9069. */
  9070. function getPropDefaultValue (vm, prop, key) {
  9071. // no default, return undefined
  9072. if (!hasOwn(prop, 'default')) {
  9073. return undefined
  9074. }
  9075. var def = prop.default;
  9076. // warn against non-factory defaults for Object & Array
  9077. if ( true && isObject(def)) {
  9078. warn(
  9079. 'Invalid default value for prop "' + key + '": ' +
  9080. 'Props with type Object/Array must use a factory function ' +
  9081. 'to return the default value.',
  9082. vm
  9083. );
  9084. }
  9085. // the raw prop value was also undefined from previous render,
  9086. // return previous default value to avoid unnecessary watcher trigger
  9087. if (vm && vm.$options.propsData &&
  9088. vm.$options.propsData[key] === undefined &&
  9089. vm._props[key] !== undefined
  9090. ) {
  9091. return vm._props[key]
  9092. }
  9093. // call factory function for non-Function types
  9094. // a value is Function if its prototype is function even across different execution context
  9095. return typeof def === 'function' && getType(prop.type) !== 'Function'
  9096. ? def.call(vm)
  9097. : def
  9098. }
  9099. /**
  9100. * Assert whether a prop is valid.
  9101. */
  9102. function assertProp (
  9103. prop,
  9104. name,
  9105. value,
  9106. vm,
  9107. absent
  9108. ) {
  9109. if (prop.required && absent) {
  9110. warn(
  9111. 'Missing required prop: "' + name + '"',
  9112. vm
  9113. );
  9114. return
  9115. }
  9116. if (value == null && !prop.required) {
  9117. return
  9118. }
  9119. var type = prop.type;
  9120. var valid = !type || type === true;
  9121. var expectedTypes = [];
  9122. if (type) {
  9123. if (!Array.isArray(type)) {
  9124. type = [type];
  9125. }
  9126. for (var i = 0; i < type.length && !valid; i++) {
  9127. var assertedType = assertType(value, type[i], vm);
  9128. expectedTypes.push(assertedType.expectedType || '');
  9129. valid = assertedType.valid;
  9130. }
  9131. }
  9132. var haveExpectedTypes = expectedTypes.some(function (t) { return t; });
  9133. if (!valid && haveExpectedTypes) {
  9134. warn(
  9135. getInvalidTypeMessage(name, value, expectedTypes),
  9136. vm
  9137. );
  9138. return
  9139. }
  9140. var validator = prop.validator;
  9141. if (validator) {
  9142. if (!validator(value)) {
  9143. warn(
  9144. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  9145. vm
  9146. );
  9147. }
  9148. }
  9149. }
  9150. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol|BigInt)$/;
  9151. function assertType (value, type, vm) {
  9152. var valid;
  9153. var expectedType = getType(type);
  9154. if (simpleCheckRE.test(expectedType)) {
  9155. var t = typeof value;
  9156. valid = t === expectedType.toLowerCase();
  9157. // for primitive wrapper objects
  9158. if (!valid && t === 'object') {
  9159. valid = value instanceof type;
  9160. }
  9161. } else if (expectedType === 'Object') {
  9162. valid = isPlainObject(value);
  9163. } else if (expectedType === 'Array') {
  9164. valid = Array.isArray(value);
  9165. } else {
  9166. try {
  9167. valid = value instanceof type;
  9168. } catch (e) {
  9169. warn('Invalid prop type: "' + String(type) + '" is not a constructor', vm);
  9170. valid = false;
  9171. }
  9172. }
  9173. return {
  9174. valid: valid,
  9175. expectedType: expectedType
  9176. }
  9177. }
  9178. var functionTypeCheckRE = /^\s*function (\w+)/;
  9179. /**
  9180. * Use function string name to check built-in types,
  9181. * because a simple equality check will fail when running
  9182. * across different vms / iframes.
  9183. */
  9184. function getType (fn) {
  9185. var match = fn && fn.toString().match(functionTypeCheckRE);
  9186. return match ? match[1] : ''
  9187. }
  9188. function isSameType (a, b) {
  9189. return getType(a) === getType(b)
  9190. }
  9191. function getTypeIndex (type, expectedTypes) {
  9192. if (!Array.isArray(expectedTypes)) {
  9193. return isSameType(expectedTypes, type) ? 0 : -1
  9194. }
  9195. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  9196. if (isSameType(expectedTypes[i], type)) {
  9197. return i
  9198. }
  9199. }
  9200. return -1
  9201. }
  9202. function getInvalidTypeMessage (name, value, expectedTypes) {
  9203. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  9204. " Expected " + (expectedTypes.map(capitalize).join(', '));
  9205. var expectedType = expectedTypes[0];
  9206. var receivedType = toRawType(value);
  9207. // check if we need to specify expected value
  9208. if (
  9209. expectedTypes.length === 1 &&
  9210. isExplicable(expectedType) &&
  9211. isExplicable(typeof value) &&
  9212. !isBoolean(expectedType, receivedType)
  9213. ) {
  9214. message += " with value " + (styleValue(value, expectedType));
  9215. }
  9216. message += ", got " + receivedType + " ";
  9217. // check if we need to specify received value
  9218. if (isExplicable(receivedType)) {
  9219. message += "with value " + (styleValue(value, receivedType)) + ".";
  9220. }
  9221. return message
  9222. }
  9223. function styleValue (value, type) {
  9224. if (type === 'String') {
  9225. return ("\"" + value + "\"")
  9226. } else if (type === 'Number') {
  9227. return ("" + (Number(value)))
  9228. } else {
  9229. return ("" + value)
  9230. }
  9231. }
  9232. var EXPLICABLE_TYPES = ['string', 'number', 'boolean'];
  9233. function isExplicable (value) {
  9234. return EXPLICABLE_TYPES.some(function (elem) { return value.toLowerCase() === elem; })
  9235. }
  9236. function isBoolean () {
  9237. var args = [], len = arguments.length;
  9238. while ( len-- ) args[ len ] = arguments[ len ];
  9239. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  9240. }
  9241. /* */
  9242. function handleError (err, vm, info) {
  9243. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  9244. // See: https://github.com/vuejs/vuex/issues/1505
  9245. pushTarget();
  9246. try {
  9247. if (vm) {
  9248. var cur = vm;
  9249. while ((cur = cur.$parent)) {
  9250. var hooks = cur.$options.errorCaptured;
  9251. if (hooks) {
  9252. for (var i = 0; i < hooks.length; i++) {
  9253. try {
  9254. var capture = hooks[i].call(cur, err, vm, info) === false;
  9255. if (capture) { return }
  9256. } catch (e) {
  9257. globalHandleError(e, cur, 'errorCaptured hook');
  9258. }
  9259. }
  9260. }
  9261. }
  9262. }
  9263. globalHandleError(err, vm, info);
  9264. } finally {
  9265. popTarget();
  9266. }
  9267. }
  9268. function invokeWithErrorHandling (
  9269. handler,
  9270. context,
  9271. args,
  9272. vm,
  9273. info
  9274. ) {
  9275. var res;
  9276. try {
  9277. res = args ? handler.apply(context, args) : handler.call(context);
  9278. if (res && !res._isVue && isPromise(res) && !res._handled) {
  9279. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  9280. // issue #9511
  9281. // avoid catch triggering multiple times when nested calls
  9282. res._handled = true;
  9283. }
  9284. } catch (e) {
  9285. handleError(e, vm, info);
  9286. }
  9287. return res
  9288. }
  9289. function globalHandleError (err, vm, info) {
  9290. if (config.errorHandler) {
  9291. try {
  9292. return config.errorHandler.call(null, err, vm, info)
  9293. } catch (e) {
  9294. // if the user intentionally throws the original error in the handler,
  9295. // do not log it twice
  9296. if (e !== err) {
  9297. logError(e, null, 'config.errorHandler');
  9298. }
  9299. }
  9300. }
  9301. logError(err, vm, info);
  9302. }
  9303. function logError (err, vm, info) {
  9304. if (true) {
  9305. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  9306. }
  9307. /* istanbul ignore else */
  9308. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  9309. console.error(err);
  9310. } else {
  9311. throw err
  9312. }
  9313. }
  9314. /* */
  9315. var isUsingMicroTask = false;
  9316. var callbacks = [];
  9317. var pending = false;
  9318. function flushCallbacks () {
  9319. pending = false;
  9320. var copies = callbacks.slice(0);
  9321. callbacks.length = 0;
  9322. for (var i = 0; i < copies.length; i++) {
  9323. copies[i]();
  9324. }
  9325. }
  9326. // Here we have async deferring wrappers using microtasks.
  9327. // In 2.5 we used (macro) tasks (in combination with microtasks).
  9328. // However, it has subtle problems when state is changed right before repaint
  9329. // (e.g. #6813, out-in transitions).
  9330. // Also, using (macro) tasks in event handler would cause some weird behaviors
  9331. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  9332. // So we now use microtasks everywhere, again.
  9333. // A major drawback of this tradeoff is that there are some scenarios
  9334. // where microtasks have too high a priority and fire in between supposedly
  9335. // sequential events (e.g. #4521, #6690, which have workarounds)
  9336. // or even between bubbling of the same event (#6566).
  9337. var timerFunc;
  9338. // The nextTick behavior leverages the microtask queue, which can be accessed
  9339. // via either native Promise.then or MutationObserver.
  9340. // MutationObserver has wider support, however it is seriously bugged in
  9341. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  9342. // completely stops working after triggering a few times... so, if native
  9343. // Promise is available, we will use it:
  9344. /* istanbul ignore next, $flow-disable-line */
  9345. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  9346. var p = Promise.resolve();
  9347. timerFunc = function () {
  9348. p.then(flushCallbacks);
  9349. // In problematic UIWebViews, Promise.then doesn't completely break, but
  9350. // it can get stuck in a weird state where callbacks are pushed into the
  9351. // microtask queue but the queue isn't being flushed, until the browser
  9352. // needs to do some other work, e.g. handle a timer. Therefore we can
  9353. // "force" the microtask queue to be flushed by adding an empty timer.
  9354. if (isIOS) { setTimeout(noop); }
  9355. };
  9356. isUsingMicroTask = true;
  9357. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  9358. isNative(MutationObserver) ||
  9359. // PhantomJS and iOS 7.x
  9360. MutationObserver.toString() === '[object MutationObserverConstructor]'
  9361. )) {
  9362. // Use MutationObserver where native Promise is not available,
  9363. // e.g. PhantomJS, iOS7, Android 4.4
  9364. // (#6466 MutationObserver is unreliable in IE11)
  9365. var counter = 1;
  9366. var observer = new MutationObserver(flushCallbacks);
  9367. var textNode = document.createTextNode(String(counter));
  9368. observer.observe(textNode, {
  9369. characterData: true
  9370. });
  9371. timerFunc = function () {
  9372. counter = (counter + 1) % 2;
  9373. textNode.data = String(counter);
  9374. };
  9375. isUsingMicroTask = true;
  9376. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  9377. // Fallback to setImmediate.
  9378. // Technically it leverages the (macro) task queue,
  9379. // but it is still a better choice than setTimeout.
  9380. timerFunc = function () {
  9381. setImmediate(flushCallbacks);
  9382. };
  9383. } else {
  9384. // Fallback to setTimeout.
  9385. timerFunc = function () {
  9386. setTimeout(flushCallbacks, 0);
  9387. };
  9388. }
  9389. function nextTick (cb, ctx) {
  9390. var _resolve;
  9391. callbacks.push(function () {
  9392. if (cb) {
  9393. try {
  9394. cb.call(ctx);
  9395. } catch (e) {
  9396. handleError(e, ctx, 'nextTick');
  9397. }
  9398. } else if (_resolve) {
  9399. _resolve(ctx);
  9400. }
  9401. });
  9402. if (!pending) {
  9403. pending = true;
  9404. timerFunc();
  9405. }
  9406. // $flow-disable-line
  9407. if (!cb && typeof Promise !== 'undefined') {
  9408. return new Promise(function (resolve) {
  9409. _resolve = resolve;
  9410. })
  9411. }
  9412. }
  9413. /* */
  9414. var mark;
  9415. var measure;
  9416. if (true) {
  9417. var perf = inBrowser && window.performance;
  9418. /* istanbul ignore if */
  9419. if (
  9420. perf &&
  9421. perf.mark &&
  9422. perf.measure &&
  9423. perf.clearMarks &&
  9424. perf.clearMeasures
  9425. ) {
  9426. mark = function (tag) { return perf.mark(tag); };
  9427. measure = function (name, startTag, endTag) {
  9428. perf.measure(name, startTag, endTag);
  9429. perf.clearMarks(startTag);
  9430. perf.clearMarks(endTag);
  9431. // perf.clearMeasures(name)
  9432. };
  9433. }
  9434. }
  9435. /* not type checking this file because flow doesn't play well with Proxy */
  9436. var initProxy;
  9437. if (true) {
  9438. var allowedGlobals = makeMap(
  9439. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  9440. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  9441. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,' +
  9442. 'require' // for Webpack/Browserify
  9443. );
  9444. var warnNonPresent = function (target, key) {
  9445. warn(
  9446. "Property or method \"" + key + "\" is not defined on the instance but " +
  9447. 'referenced during render. Make sure that this property is reactive, ' +
  9448. 'either in the data option, or for class-based components, by ' +
  9449. 'initializing the property. ' +
  9450. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  9451. target
  9452. );
  9453. };
  9454. var warnReservedPrefix = function (target, key) {
  9455. warn(
  9456. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  9457. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  9458. 'prevent conflicts with Vue internals. ' +
  9459. 'See: https://vuejs.org/v2/api/#data',
  9460. target
  9461. );
  9462. };
  9463. var hasProxy =
  9464. typeof Proxy !== 'undefined' && isNative(Proxy);
  9465. if (hasProxy) {
  9466. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  9467. config.keyCodes = new Proxy(config.keyCodes, {
  9468. set: function set (target, key, value) {
  9469. if (isBuiltInModifier(key)) {
  9470. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  9471. return false
  9472. } else {
  9473. target[key] = value;
  9474. return true
  9475. }
  9476. }
  9477. });
  9478. }
  9479. var hasHandler = {
  9480. has: function has (target, key) {
  9481. var has = key in target;
  9482. var isAllowed = allowedGlobals(key) ||
  9483. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  9484. if (!has && !isAllowed) {
  9485. if (key in target.$data) { warnReservedPrefix(target, key); }
  9486. else { warnNonPresent(target, key); }
  9487. }
  9488. return has || !isAllowed
  9489. }
  9490. };
  9491. var getHandler = {
  9492. get: function get (target, key) {
  9493. if (typeof key === 'string' && !(key in target)) {
  9494. if (key in target.$data) { warnReservedPrefix(target, key); }
  9495. else { warnNonPresent(target, key); }
  9496. }
  9497. return target[key]
  9498. }
  9499. };
  9500. initProxy = function initProxy (vm) {
  9501. if (hasProxy) {
  9502. // determine which proxy handler to use
  9503. var options = vm.$options;
  9504. var handlers = options.render && options.render._withStripped
  9505. ? getHandler
  9506. : hasHandler;
  9507. vm._renderProxy = new Proxy(vm, handlers);
  9508. } else {
  9509. vm._renderProxy = vm;
  9510. }
  9511. };
  9512. }
  9513. /* */
  9514. var seenObjects = new _Set();
  9515. /**
  9516. * Recursively traverse an object to evoke all converted
  9517. * getters, so that every nested property inside the object
  9518. * is collected as a "deep" dependency.
  9519. */
  9520. function traverse (val) {
  9521. _traverse(val, seenObjects);
  9522. seenObjects.clear();
  9523. }
  9524. function _traverse (val, seen) {
  9525. var i, keys;
  9526. var isA = Array.isArray(val);
  9527. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  9528. return
  9529. }
  9530. if (val.__ob__) {
  9531. var depId = val.__ob__.dep.id;
  9532. if (seen.has(depId)) {
  9533. return
  9534. }
  9535. seen.add(depId);
  9536. }
  9537. if (isA) {
  9538. i = val.length;
  9539. while (i--) { _traverse(val[i], seen); }
  9540. } else {
  9541. keys = Object.keys(val);
  9542. i = keys.length;
  9543. while (i--) { _traverse(val[keys[i]], seen); }
  9544. }
  9545. }
  9546. /* */
  9547. var normalizeEvent = cached(function (name) {
  9548. var passive = name.charAt(0) === '&';
  9549. name = passive ? name.slice(1) : name;
  9550. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  9551. name = once$$1 ? name.slice(1) : name;
  9552. var capture = name.charAt(0) === '!';
  9553. name = capture ? name.slice(1) : name;
  9554. return {
  9555. name: name,
  9556. once: once$$1,
  9557. capture: capture,
  9558. passive: passive
  9559. }
  9560. });
  9561. function createFnInvoker (fns, vm) {
  9562. function invoker () {
  9563. var arguments$1 = arguments;
  9564. var fns = invoker.fns;
  9565. if (Array.isArray(fns)) {
  9566. var cloned = fns.slice();
  9567. for (var i = 0; i < cloned.length; i++) {
  9568. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  9569. }
  9570. } else {
  9571. // return handler return value for single handlers
  9572. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  9573. }
  9574. }
  9575. invoker.fns = fns;
  9576. return invoker
  9577. }
  9578. function updateListeners (
  9579. on,
  9580. oldOn,
  9581. add,
  9582. remove$$1,
  9583. createOnceHandler,
  9584. vm
  9585. ) {
  9586. var name, def$$1, cur, old, event;
  9587. for (name in on) {
  9588. def$$1 = cur = on[name];
  9589. old = oldOn[name];
  9590. event = normalizeEvent(name);
  9591. if (isUndef(cur)) {
  9592. true && warn(
  9593. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  9594. vm
  9595. );
  9596. } else if (isUndef(old)) {
  9597. if (isUndef(cur.fns)) {
  9598. cur = on[name] = createFnInvoker(cur, vm);
  9599. }
  9600. if (isTrue(event.once)) {
  9601. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  9602. }
  9603. add(event.name, cur, event.capture, event.passive, event.params);
  9604. } else if (cur !== old) {
  9605. old.fns = cur;
  9606. on[name] = old;
  9607. }
  9608. }
  9609. for (name in oldOn) {
  9610. if (isUndef(on[name])) {
  9611. event = normalizeEvent(name);
  9612. remove$$1(event.name, oldOn[name], event.capture);
  9613. }
  9614. }
  9615. }
  9616. /* */
  9617. function mergeVNodeHook (def, hookKey, hook) {
  9618. if (def instanceof VNode) {
  9619. def = def.data.hook || (def.data.hook = {});
  9620. }
  9621. var invoker;
  9622. var oldHook = def[hookKey];
  9623. function wrappedHook () {
  9624. hook.apply(this, arguments);
  9625. // important: remove merged hook to ensure it's called only once
  9626. // and prevent memory leak
  9627. remove(invoker.fns, wrappedHook);
  9628. }
  9629. if (isUndef(oldHook)) {
  9630. // no existing hook
  9631. invoker = createFnInvoker([wrappedHook]);
  9632. } else {
  9633. /* istanbul ignore if */
  9634. if (isDef(oldHook.fns) && isTrue(oldHook.merged)) {
  9635. // already a merged invoker
  9636. invoker = oldHook;
  9637. invoker.fns.push(wrappedHook);
  9638. } else {
  9639. // existing plain hook
  9640. invoker = createFnInvoker([oldHook, wrappedHook]);
  9641. }
  9642. }
  9643. invoker.merged = true;
  9644. def[hookKey] = invoker;
  9645. }
  9646. /* */
  9647. function extractPropsFromVNodeData (
  9648. data,
  9649. Ctor,
  9650. tag
  9651. ) {
  9652. // we are only extracting raw values here.
  9653. // validation and default values are handled in the child
  9654. // component itself.
  9655. var propOptions = Ctor.options.props;
  9656. if (isUndef(propOptions)) {
  9657. return
  9658. }
  9659. var res = {};
  9660. var attrs = data.attrs;
  9661. var props = data.props;
  9662. if (isDef(attrs) || isDef(props)) {
  9663. for (var key in propOptions) {
  9664. var altKey = hyphenate(key);
  9665. if (true) {
  9666. var keyInLowerCase = key.toLowerCase();
  9667. if (
  9668. key !== keyInLowerCase &&
  9669. attrs && hasOwn(attrs, keyInLowerCase)
  9670. ) {
  9671. tip(
  9672. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  9673. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  9674. " \"" + key + "\". " +
  9675. "Note that HTML attributes are case-insensitive and camelCased " +
  9676. "props need to use their kebab-case equivalents when using in-DOM " +
  9677. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  9678. );
  9679. }
  9680. }
  9681. checkProp(res, props, key, altKey, true) ||
  9682. checkProp(res, attrs, key, altKey, false);
  9683. }
  9684. }
  9685. return res
  9686. }
  9687. function checkProp (
  9688. res,
  9689. hash,
  9690. key,
  9691. altKey,
  9692. preserve
  9693. ) {
  9694. if (isDef(hash)) {
  9695. if (hasOwn(hash, key)) {
  9696. res[key] = hash[key];
  9697. if (!preserve) {
  9698. delete hash[key];
  9699. }
  9700. return true
  9701. } else if (hasOwn(hash, altKey)) {
  9702. res[key] = hash[altKey];
  9703. if (!preserve) {
  9704. delete hash[altKey];
  9705. }
  9706. return true
  9707. }
  9708. }
  9709. return false
  9710. }
  9711. /* */
  9712. // The template compiler attempts to minimize the need for normalization by
  9713. // statically analyzing the template at compile time.
  9714. //
  9715. // For plain HTML markup, normalization can be completely skipped because the
  9716. // generated render function is guaranteed to return Array<VNode>. There are
  9717. // two cases where extra normalization is needed:
  9718. // 1. When the children contains components - because a functional component
  9719. // may return an Array instead of a single root. In this case, just a simple
  9720. // normalization is needed - if any child is an Array, we flatten the whole
  9721. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  9722. // because functional components already normalize their own children.
  9723. function simpleNormalizeChildren (children) {
  9724. for (var i = 0; i < children.length; i++) {
  9725. if (Array.isArray(children[i])) {
  9726. return Array.prototype.concat.apply([], children)
  9727. }
  9728. }
  9729. return children
  9730. }
  9731. // 2. When the children contains constructs that always generated nested Arrays,
  9732. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  9733. // with hand-written render functions / JSX. In such cases a full normalization
  9734. // is needed to cater to all possible types of children values.
  9735. function normalizeChildren (children) {
  9736. return isPrimitive(children)
  9737. ? [createTextVNode(children)]
  9738. : Array.isArray(children)
  9739. ? normalizeArrayChildren(children)
  9740. : undefined
  9741. }
  9742. function isTextNode (node) {
  9743. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  9744. }
  9745. function normalizeArrayChildren (children, nestedIndex) {
  9746. var res = [];
  9747. var i, c, lastIndex, last;
  9748. for (i = 0; i < children.length; i++) {
  9749. c = children[i];
  9750. if (isUndef(c) || typeof c === 'boolean') { continue }
  9751. lastIndex = res.length - 1;
  9752. last = res[lastIndex];
  9753. // nested
  9754. if (Array.isArray(c)) {
  9755. if (c.length > 0) {
  9756. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  9757. // merge adjacent text nodes
  9758. if (isTextNode(c[0]) && isTextNode(last)) {
  9759. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  9760. c.shift();
  9761. }
  9762. res.push.apply(res, c);
  9763. }
  9764. } else if (isPrimitive(c)) {
  9765. if (isTextNode(last)) {
  9766. // merge adjacent text nodes
  9767. // this is necessary for SSR hydration because text nodes are
  9768. // essentially merged when rendered to HTML strings
  9769. res[lastIndex] = createTextVNode(last.text + c);
  9770. } else if (c !== '') {
  9771. // convert primitive to vnode
  9772. res.push(createTextVNode(c));
  9773. }
  9774. } else {
  9775. if (isTextNode(c) && isTextNode(last)) {
  9776. // merge adjacent text nodes
  9777. res[lastIndex] = createTextVNode(last.text + c.text);
  9778. } else {
  9779. // default key for nested array children (likely generated by v-for)
  9780. if (isTrue(children._isVList) &&
  9781. isDef(c.tag) &&
  9782. isUndef(c.key) &&
  9783. isDef(nestedIndex)) {
  9784. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  9785. }
  9786. res.push(c);
  9787. }
  9788. }
  9789. }
  9790. return res
  9791. }
  9792. /* */
  9793. function initProvide (vm) {
  9794. var provide = vm.$options.provide;
  9795. if (provide) {
  9796. vm._provided = typeof provide === 'function'
  9797. ? provide.call(vm)
  9798. : provide;
  9799. }
  9800. }
  9801. function initInjections (vm) {
  9802. var result = resolveInject(vm.$options.inject, vm);
  9803. if (result) {
  9804. toggleObserving(false);
  9805. Object.keys(result).forEach(function (key) {
  9806. /* istanbul ignore else */
  9807. if (true) {
  9808. defineReactive$$1(vm, key, result[key], function () {
  9809. warn(
  9810. "Avoid mutating an injected value directly since the changes will be " +
  9811. "overwritten whenever the provided component re-renders. " +
  9812. "injection being mutated: \"" + key + "\"",
  9813. vm
  9814. );
  9815. });
  9816. } else {}
  9817. });
  9818. toggleObserving(true);
  9819. }
  9820. }
  9821. function resolveInject (inject, vm) {
  9822. if (inject) {
  9823. // inject is :any because flow is not smart enough to figure out cached
  9824. var result = Object.create(null);
  9825. var keys = hasSymbol
  9826. ? Reflect.ownKeys(inject)
  9827. : Object.keys(inject);
  9828. for (var i = 0; i < keys.length; i++) {
  9829. var key = keys[i];
  9830. // #6574 in case the inject object is observed...
  9831. if (key === '__ob__') { continue }
  9832. var provideKey = inject[key].from;
  9833. var source = vm;
  9834. while (source) {
  9835. if (source._provided && hasOwn(source._provided, provideKey)) {
  9836. result[key] = source._provided[provideKey];
  9837. break
  9838. }
  9839. source = source.$parent;
  9840. }
  9841. if (!source) {
  9842. if ('default' in inject[key]) {
  9843. var provideDefault = inject[key].default;
  9844. result[key] = typeof provideDefault === 'function'
  9845. ? provideDefault.call(vm)
  9846. : provideDefault;
  9847. } else if (true) {
  9848. warn(("Injection \"" + key + "\" not found"), vm);
  9849. }
  9850. }
  9851. }
  9852. return result
  9853. }
  9854. }
  9855. /* */
  9856. /**
  9857. * Runtime helper for resolving raw children VNodes into a slot object.
  9858. */
  9859. function resolveSlots (
  9860. children,
  9861. context
  9862. ) {
  9863. if (!children || !children.length) {
  9864. return {}
  9865. }
  9866. var slots = {};
  9867. for (var i = 0, l = children.length; i < l; i++) {
  9868. var child = children[i];
  9869. var data = child.data;
  9870. // remove slot attribute if the node is resolved as a Vue slot node
  9871. if (data && data.attrs && data.attrs.slot) {
  9872. delete data.attrs.slot;
  9873. }
  9874. // named slots should only be respected if the vnode was rendered in the
  9875. // same context.
  9876. if ((child.context === context || child.fnContext === context) &&
  9877. data && data.slot != null
  9878. ) {
  9879. var name = data.slot;
  9880. var slot = (slots[name] || (slots[name] = []));
  9881. if (child.tag === 'template') {
  9882. slot.push.apply(slot, child.children || []);
  9883. } else {
  9884. slot.push(child);
  9885. }
  9886. } else {
  9887. (slots.default || (slots.default = [])).push(child);
  9888. }
  9889. }
  9890. // ignore slots that contains only whitespace
  9891. for (var name$1 in slots) {
  9892. if (slots[name$1].every(isWhitespace)) {
  9893. delete slots[name$1];
  9894. }
  9895. }
  9896. return slots
  9897. }
  9898. function isWhitespace (node) {
  9899. return (node.isComment && !node.asyncFactory) || node.text === ' '
  9900. }
  9901. /* */
  9902. function isAsyncPlaceholder (node) {
  9903. return node.isComment && node.asyncFactory
  9904. }
  9905. /* */
  9906. function normalizeScopedSlots (
  9907. slots,
  9908. normalSlots,
  9909. prevSlots
  9910. ) {
  9911. var res;
  9912. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  9913. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  9914. var key = slots && slots.$key;
  9915. if (!slots) {
  9916. res = {};
  9917. } else if (slots._normalized) {
  9918. // fast path 1: child component re-render only, parent did not change
  9919. return slots._normalized
  9920. } else if (
  9921. isStable &&
  9922. prevSlots &&
  9923. prevSlots !== emptyObject &&
  9924. key === prevSlots.$key &&
  9925. !hasNormalSlots &&
  9926. !prevSlots.$hasNormal
  9927. ) {
  9928. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  9929. // only need to normalize once
  9930. return prevSlots
  9931. } else {
  9932. res = {};
  9933. for (var key$1 in slots) {
  9934. if (slots[key$1] && key$1[0] !== '$') {
  9935. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  9936. }
  9937. }
  9938. }
  9939. // expose normal slots on scopedSlots
  9940. for (var key$2 in normalSlots) {
  9941. if (!(key$2 in res)) {
  9942. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  9943. }
  9944. }
  9945. // avoriaz seems to mock a non-extensible $scopedSlots object
  9946. // and when that is passed down this would cause an error
  9947. if (slots && Object.isExtensible(slots)) {
  9948. (slots)._normalized = res;
  9949. }
  9950. def(res, '$stable', isStable);
  9951. def(res, '$key', key);
  9952. def(res, '$hasNormal', hasNormalSlots);
  9953. return res
  9954. }
  9955. function normalizeScopedSlot(normalSlots, key, fn) {
  9956. var normalized = function () {
  9957. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  9958. res = res && typeof res === 'object' && !Array.isArray(res)
  9959. ? [res] // single vnode
  9960. : normalizeChildren(res);
  9961. var vnode = res && res[0];
  9962. return res && (
  9963. !vnode ||
  9964. (res.length === 1 && vnode.isComment && !isAsyncPlaceholder(vnode)) // #9658, #10391
  9965. ) ? undefined
  9966. : res
  9967. };
  9968. // this is a slot using the new v-slot syntax without scope. although it is
  9969. // compiled as a scoped slot, render fn users would expect it to be present
  9970. // on this.$slots because the usage is semantically a normal slot.
  9971. if (fn.proxy) {
  9972. Object.defineProperty(normalSlots, key, {
  9973. get: normalized,
  9974. enumerable: true,
  9975. configurable: true
  9976. });
  9977. }
  9978. return normalized
  9979. }
  9980. function proxyNormalSlot(slots, key) {
  9981. return function () { return slots[key]; }
  9982. }
  9983. /* */
  9984. /**
  9985. * Runtime helper for rendering v-for lists.
  9986. */
  9987. function renderList (
  9988. val,
  9989. render
  9990. ) {
  9991. var ret, i, l, keys, key;
  9992. if (Array.isArray(val) || typeof val === 'string') {
  9993. ret = new Array(val.length);
  9994. for (i = 0, l = val.length; i < l; i++) {
  9995. ret[i] = render(val[i], i);
  9996. }
  9997. } else if (typeof val === 'number') {
  9998. ret = new Array(val);
  9999. for (i = 0; i < val; i++) {
  10000. ret[i] = render(i + 1, i);
  10001. }
  10002. } else if (isObject(val)) {
  10003. if (hasSymbol && val[Symbol.iterator]) {
  10004. ret = [];
  10005. var iterator = val[Symbol.iterator]();
  10006. var result = iterator.next();
  10007. while (!result.done) {
  10008. ret.push(render(result.value, ret.length));
  10009. result = iterator.next();
  10010. }
  10011. } else {
  10012. keys = Object.keys(val);
  10013. ret = new Array(keys.length);
  10014. for (i = 0, l = keys.length; i < l; i++) {
  10015. key = keys[i];
  10016. ret[i] = render(val[key], key, i);
  10017. }
  10018. }
  10019. }
  10020. if (!isDef(ret)) {
  10021. ret = [];
  10022. }
  10023. (ret)._isVList = true;
  10024. return ret
  10025. }
  10026. /* */
  10027. /**
  10028. * Runtime helper for rendering <slot>
  10029. */
  10030. function renderSlot (
  10031. name,
  10032. fallbackRender,
  10033. props,
  10034. bindObject
  10035. ) {
  10036. var scopedSlotFn = this.$scopedSlots[name];
  10037. var nodes;
  10038. if (scopedSlotFn) {
  10039. // scoped slot
  10040. props = props || {};
  10041. if (bindObject) {
  10042. if ( true && !isObject(bindObject)) {
  10043. warn('slot v-bind without argument expects an Object', this);
  10044. }
  10045. props = extend(extend({}, bindObject), props);
  10046. }
  10047. nodes =
  10048. scopedSlotFn(props) ||
  10049. (typeof fallbackRender === 'function' ? fallbackRender() : fallbackRender);
  10050. } else {
  10051. nodes =
  10052. this.$slots[name] ||
  10053. (typeof fallbackRender === 'function' ? fallbackRender() : fallbackRender);
  10054. }
  10055. var target = props && props.slot;
  10056. if (target) {
  10057. return this.$createElement('template', { slot: target }, nodes)
  10058. } else {
  10059. return nodes
  10060. }
  10061. }
  10062. /* */
  10063. /**
  10064. * Runtime helper for resolving filters
  10065. */
  10066. function resolveFilter (id) {
  10067. return resolveAsset(this.$options, 'filters', id, true) || identity
  10068. }
  10069. /* */
  10070. function isKeyNotMatch (expect, actual) {
  10071. if (Array.isArray(expect)) {
  10072. return expect.indexOf(actual) === -1
  10073. } else {
  10074. return expect !== actual
  10075. }
  10076. }
  10077. /**
  10078. * Runtime helper for checking keyCodes from config.
  10079. * exposed as Vue.prototype._k
  10080. * passing in eventKeyName as last argument separately for backwards compat
  10081. */
  10082. function checkKeyCodes (
  10083. eventKeyCode,
  10084. key,
  10085. builtInKeyCode,
  10086. eventKeyName,
  10087. builtInKeyName
  10088. ) {
  10089. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  10090. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  10091. return isKeyNotMatch(builtInKeyName, eventKeyName)
  10092. } else if (mappedKeyCode) {
  10093. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  10094. } else if (eventKeyName) {
  10095. return hyphenate(eventKeyName) !== key
  10096. }
  10097. return eventKeyCode === undefined
  10098. }
  10099. /* */
  10100. /**
  10101. * Runtime helper for merging v-bind="object" into a VNode's data.
  10102. */
  10103. function bindObjectProps (
  10104. data,
  10105. tag,
  10106. value,
  10107. asProp,
  10108. isSync
  10109. ) {
  10110. if (value) {
  10111. if (!isObject(value)) {
  10112. true && warn(
  10113. 'v-bind without argument expects an Object or Array value',
  10114. this
  10115. );
  10116. } else {
  10117. if (Array.isArray(value)) {
  10118. value = toObject(value);
  10119. }
  10120. var hash;
  10121. var loop = function ( key ) {
  10122. if (
  10123. key === 'class' ||
  10124. key === 'style' ||
  10125. isReservedAttribute(key)
  10126. ) {
  10127. hash = data;
  10128. } else {
  10129. var type = data.attrs && data.attrs.type;
  10130. hash = asProp || config.mustUseProp(tag, type, key)
  10131. ? data.domProps || (data.domProps = {})
  10132. : data.attrs || (data.attrs = {});
  10133. }
  10134. var camelizedKey = camelize(key);
  10135. var hyphenatedKey = hyphenate(key);
  10136. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  10137. hash[key] = value[key];
  10138. if (isSync) {
  10139. var on = data.on || (data.on = {});
  10140. on[("update:" + key)] = function ($event) {
  10141. value[key] = $event;
  10142. };
  10143. }
  10144. }
  10145. };
  10146. for (var key in value) loop( key );
  10147. }
  10148. }
  10149. return data
  10150. }
  10151. /* */
  10152. /**
  10153. * Runtime helper for rendering static trees.
  10154. */
  10155. function renderStatic (
  10156. index,
  10157. isInFor
  10158. ) {
  10159. var cached = this._staticTrees || (this._staticTrees = []);
  10160. var tree = cached[index];
  10161. // if has already-rendered static tree and not inside v-for,
  10162. // we can reuse the same tree.
  10163. if (tree && !isInFor) {
  10164. return tree
  10165. }
  10166. // otherwise, render a fresh tree.
  10167. tree = cached[index] = this.$options.staticRenderFns[index].call(
  10168. this._renderProxy,
  10169. null,
  10170. this // for render fns generated for functional component templates
  10171. );
  10172. markStatic(tree, ("__static__" + index), false);
  10173. return tree
  10174. }
  10175. /**
  10176. * Runtime helper for v-once.
  10177. * Effectively it means marking the node as static with a unique key.
  10178. */
  10179. function markOnce (
  10180. tree,
  10181. index,
  10182. key
  10183. ) {
  10184. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  10185. return tree
  10186. }
  10187. function markStatic (
  10188. tree,
  10189. key,
  10190. isOnce
  10191. ) {
  10192. if (Array.isArray(tree)) {
  10193. for (var i = 0; i < tree.length; i++) {
  10194. if (tree[i] && typeof tree[i] !== 'string') {
  10195. markStaticNode(tree[i], (key + "_" + i), isOnce);
  10196. }
  10197. }
  10198. } else {
  10199. markStaticNode(tree, key, isOnce);
  10200. }
  10201. }
  10202. function markStaticNode (node, key, isOnce) {
  10203. node.isStatic = true;
  10204. node.key = key;
  10205. node.isOnce = isOnce;
  10206. }
  10207. /* */
  10208. function bindObjectListeners (data, value) {
  10209. if (value) {
  10210. if (!isPlainObject(value)) {
  10211. true && warn(
  10212. 'v-on without argument expects an Object value',
  10213. this
  10214. );
  10215. } else {
  10216. var on = data.on = data.on ? extend({}, data.on) : {};
  10217. for (var key in value) {
  10218. var existing = on[key];
  10219. var ours = value[key];
  10220. on[key] = existing ? [].concat(existing, ours) : ours;
  10221. }
  10222. }
  10223. }
  10224. return data
  10225. }
  10226. /* */
  10227. function resolveScopedSlots (
  10228. fns, // see flow/vnode
  10229. res,
  10230. // the following are added in 2.6
  10231. hasDynamicKeys,
  10232. contentHashKey
  10233. ) {
  10234. res = res || { $stable: !hasDynamicKeys };
  10235. for (var i = 0; i < fns.length; i++) {
  10236. var slot = fns[i];
  10237. if (Array.isArray(slot)) {
  10238. resolveScopedSlots(slot, res, hasDynamicKeys);
  10239. } else if (slot) {
  10240. // marker for reverse proxying v-slot without scope on this.$slots
  10241. if (slot.proxy) {
  10242. slot.fn.proxy = true;
  10243. }
  10244. res[slot.key] = slot.fn;
  10245. }
  10246. }
  10247. if (contentHashKey) {
  10248. (res).$key = contentHashKey;
  10249. }
  10250. return res
  10251. }
  10252. /* */
  10253. function bindDynamicKeys (baseObj, values) {
  10254. for (var i = 0; i < values.length; i += 2) {
  10255. var key = values[i];
  10256. if (typeof key === 'string' && key) {
  10257. baseObj[values[i]] = values[i + 1];
  10258. } else if ( true && key !== '' && key !== null) {
  10259. // null is a special value for explicitly removing a binding
  10260. warn(
  10261. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  10262. this
  10263. );
  10264. }
  10265. }
  10266. return baseObj
  10267. }
  10268. // helper to dynamically append modifier runtime markers to event names.
  10269. // ensure only append when value is already string, otherwise it will be cast
  10270. // to string and cause the type check to miss.
  10271. function prependModifier (value, symbol) {
  10272. return typeof value === 'string' ? symbol + value : value
  10273. }
  10274. /* */
  10275. function installRenderHelpers (target) {
  10276. target._o = markOnce;
  10277. target._n = toNumber;
  10278. target._s = toString;
  10279. target._l = renderList;
  10280. target._t = renderSlot;
  10281. target._q = looseEqual;
  10282. target._i = looseIndexOf;
  10283. target._m = renderStatic;
  10284. target._f = resolveFilter;
  10285. target._k = checkKeyCodes;
  10286. target._b = bindObjectProps;
  10287. target._v = createTextVNode;
  10288. target._e = createEmptyVNode;
  10289. target._u = resolveScopedSlots;
  10290. target._g = bindObjectListeners;
  10291. target._d = bindDynamicKeys;
  10292. target._p = prependModifier;
  10293. }
  10294. /* */
  10295. function FunctionalRenderContext (
  10296. data,
  10297. props,
  10298. children,
  10299. parent,
  10300. Ctor
  10301. ) {
  10302. var this$1 = this;
  10303. var options = Ctor.options;
  10304. // ensure the createElement function in functional components
  10305. // gets a unique context - this is necessary for correct named slot check
  10306. var contextVm;
  10307. if (hasOwn(parent, '_uid')) {
  10308. contextVm = Object.create(parent);
  10309. // $flow-disable-line
  10310. contextVm._original = parent;
  10311. } else {
  10312. // the context vm passed in is a functional context as well.
  10313. // in this case we want to make sure we are able to get a hold to the
  10314. // real context instance.
  10315. contextVm = parent;
  10316. // $flow-disable-line
  10317. parent = parent._original;
  10318. }
  10319. var isCompiled = isTrue(options._compiled);
  10320. var needNormalization = !isCompiled;
  10321. this.data = data;
  10322. this.props = props;
  10323. this.children = children;
  10324. this.parent = parent;
  10325. this.listeners = data.on || emptyObject;
  10326. this.injections = resolveInject(options.inject, parent);
  10327. this.slots = function () {
  10328. if (!this$1.$slots) {
  10329. normalizeScopedSlots(
  10330. data.scopedSlots,
  10331. this$1.$slots = resolveSlots(children, parent)
  10332. );
  10333. }
  10334. return this$1.$slots
  10335. };
  10336. Object.defineProperty(this, 'scopedSlots', ({
  10337. enumerable: true,
  10338. get: function get () {
  10339. return normalizeScopedSlots(data.scopedSlots, this.slots())
  10340. }
  10341. }));
  10342. // support for compiled functional template
  10343. if (isCompiled) {
  10344. // exposing $options for renderStatic()
  10345. this.$options = options;
  10346. // pre-resolve slots for renderSlot()
  10347. this.$slots = this.slots();
  10348. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  10349. }
  10350. if (options._scopeId) {
  10351. this._c = function (a, b, c, d) {
  10352. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  10353. if (vnode && !Array.isArray(vnode)) {
  10354. vnode.fnScopeId = options._scopeId;
  10355. vnode.fnContext = parent;
  10356. }
  10357. return vnode
  10358. };
  10359. } else {
  10360. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  10361. }
  10362. }
  10363. installRenderHelpers(FunctionalRenderContext.prototype);
  10364. function createFunctionalComponent (
  10365. Ctor,
  10366. propsData,
  10367. data,
  10368. contextVm,
  10369. children
  10370. ) {
  10371. var options = Ctor.options;
  10372. var props = {};
  10373. var propOptions = options.props;
  10374. if (isDef(propOptions)) {
  10375. for (var key in propOptions) {
  10376. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  10377. }
  10378. } else {
  10379. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  10380. if (isDef(data.props)) { mergeProps(props, data.props); }
  10381. }
  10382. var renderContext = new FunctionalRenderContext(
  10383. data,
  10384. props,
  10385. children,
  10386. contextVm,
  10387. Ctor
  10388. );
  10389. var vnode = options.render.call(null, renderContext._c, renderContext);
  10390. if (vnode instanceof VNode) {
  10391. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  10392. } else if (Array.isArray(vnode)) {
  10393. var vnodes = normalizeChildren(vnode) || [];
  10394. var res = new Array(vnodes.length);
  10395. for (var i = 0; i < vnodes.length; i++) {
  10396. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  10397. }
  10398. return res
  10399. }
  10400. }
  10401. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  10402. // #7817 clone node before setting fnContext, otherwise if the node is reused
  10403. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  10404. // that should not be matched to match.
  10405. var clone = cloneVNode(vnode);
  10406. clone.fnContext = contextVm;
  10407. clone.fnOptions = options;
  10408. if (true) {
  10409. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  10410. }
  10411. if (data.slot) {
  10412. (clone.data || (clone.data = {})).slot = data.slot;
  10413. }
  10414. return clone
  10415. }
  10416. function mergeProps (to, from) {
  10417. for (var key in from) {
  10418. to[camelize(key)] = from[key];
  10419. }
  10420. }
  10421. /* */
  10422. /* */
  10423. /* */
  10424. /* */
  10425. // inline hooks to be invoked on component VNodes during patch
  10426. var componentVNodeHooks = {
  10427. init: function init (vnode, hydrating) {
  10428. if (
  10429. vnode.componentInstance &&
  10430. !vnode.componentInstance._isDestroyed &&
  10431. vnode.data.keepAlive
  10432. ) {
  10433. // kept-alive components, treat as a patch
  10434. var mountedNode = vnode; // work around flow
  10435. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  10436. } else {
  10437. var child = vnode.componentInstance = createComponentInstanceForVnode(
  10438. vnode,
  10439. activeInstance
  10440. );
  10441. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  10442. }
  10443. },
  10444. prepatch: function prepatch (oldVnode, vnode) {
  10445. var options = vnode.componentOptions;
  10446. var child = vnode.componentInstance = oldVnode.componentInstance;
  10447. updateChildComponent(
  10448. child,
  10449. options.propsData, // updated props
  10450. options.listeners, // updated listeners
  10451. vnode, // new parent vnode
  10452. options.children // new children
  10453. );
  10454. },
  10455. insert: function insert (vnode) {
  10456. var context = vnode.context;
  10457. var componentInstance = vnode.componentInstance;
  10458. if (!componentInstance._isMounted) {
  10459. componentInstance._isMounted = true;
  10460. callHook(componentInstance, 'mounted');
  10461. }
  10462. if (vnode.data.keepAlive) {
  10463. if (context._isMounted) {
  10464. // vue-router#1212
  10465. // During updates, a kept-alive component's child components may
  10466. // change, so directly walking the tree here may call activated hooks
  10467. // on incorrect children. Instead we push them into a queue which will
  10468. // be processed after the whole patch process ended.
  10469. queueActivatedComponent(componentInstance);
  10470. } else {
  10471. activateChildComponent(componentInstance, true /* direct */);
  10472. }
  10473. }
  10474. },
  10475. destroy: function destroy (vnode) {
  10476. var componentInstance = vnode.componentInstance;
  10477. if (!componentInstance._isDestroyed) {
  10478. if (!vnode.data.keepAlive) {
  10479. componentInstance.$destroy();
  10480. } else {
  10481. deactivateChildComponent(componentInstance, true /* direct */);
  10482. }
  10483. }
  10484. }
  10485. };
  10486. var hooksToMerge = Object.keys(componentVNodeHooks);
  10487. function createComponent (
  10488. Ctor,
  10489. data,
  10490. context,
  10491. children,
  10492. tag
  10493. ) {
  10494. if (isUndef(Ctor)) {
  10495. return
  10496. }
  10497. var baseCtor = context.$options._base;
  10498. // plain options object: turn it into a constructor
  10499. if (isObject(Ctor)) {
  10500. Ctor = baseCtor.extend(Ctor);
  10501. }
  10502. // if at this stage it's not a constructor or an async component factory,
  10503. // reject.
  10504. if (typeof Ctor !== 'function') {
  10505. if (true) {
  10506. warn(("Invalid Component definition: " + (String(Ctor))), context);
  10507. }
  10508. return
  10509. }
  10510. // async component
  10511. var asyncFactory;
  10512. if (isUndef(Ctor.cid)) {
  10513. asyncFactory = Ctor;
  10514. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  10515. if (Ctor === undefined) {
  10516. // return a placeholder node for async component, which is rendered
  10517. // as a comment node but preserves all the raw information for the node.
  10518. // the information will be used for async server-rendering and hydration.
  10519. return createAsyncPlaceholder(
  10520. asyncFactory,
  10521. data,
  10522. context,
  10523. children,
  10524. tag
  10525. )
  10526. }
  10527. }
  10528. data = data || {};
  10529. // resolve constructor options in case global mixins are applied after
  10530. // component constructor creation
  10531. resolveConstructorOptions(Ctor);
  10532. // transform component v-model data into props & events
  10533. if (isDef(data.model)) {
  10534. transformModel(Ctor.options, data);
  10535. }
  10536. // extract props
  10537. var propsData = extractPropsFromVNodeData(data, Ctor, tag);
  10538. // functional component
  10539. if (isTrue(Ctor.options.functional)) {
  10540. return createFunctionalComponent(Ctor, propsData, data, context, children)
  10541. }
  10542. // extract listeners, since these needs to be treated as
  10543. // child component listeners instead of DOM listeners
  10544. var listeners = data.on;
  10545. // replace with listeners with .native modifier
  10546. // so it gets processed during parent component patch.
  10547. data.on = data.nativeOn;
  10548. if (isTrue(Ctor.options.abstract)) {
  10549. // abstract components do not keep anything
  10550. // other than props & listeners & slot
  10551. // work around flow
  10552. var slot = data.slot;
  10553. data = {};
  10554. if (slot) {
  10555. data.slot = slot;
  10556. }
  10557. }
  10558. // install component management hooks onto the placeholder node
  10559. installComponentHooks(data);
  10560. // return a placeholder vnode
  10561. var name = Ctor.options.name || tag;
  10562. var vnode = new VNode(
  10563. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  10564. data, undefined, undefined, undefined, context,
  10565. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  10566. asyncFactory
  10567. );
  10568. return vnode
  10569. }
  10570. function createComponentInstanceForVnode (
  10571. // we know it's MountedComponentVNode but flow doesn't
  10572. vnode,
  10573. // activeInstance in lifecycle state
  10574. parent
  10575. ) {
  10576. var options = {
  10577. _isComponent: true,
  10578. _parentVnode: vnode,
  10579. parent: parent
  10580. };
  10581. // check inline-template render functions
  10582. var inlineTemplate = vnode.data.inlineTemplate;
  10583. if (isDef(inlineTemplate)) {
  10584. options.render = inlineTemplate.render;
  10585. options.staticRenderFns = inlineTemplate.staticRenderFns;
  10586. }
  10587. return new vnode.componentOptions.Ctor(options)
  10588. }
  10589. function installComponentHooks (data) {
  10590. var hooks = data.hook || (data.hook = {});
  10591. for (var i = 0; i < hooksToMerge.length; i++) {
  10592. var key = hooksToMerge[i];
  10593. var existing = hooks[key];
  10594. var toMerge = componentVNodeHooks[key];
  10595. if (existing !== toMerge && !(existing && existing._merged)) {
  10596. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  10597. }
  10598. }
  10599. }
  10600. function mergeHook$1 (f1, f2) {
  10601. var merged = function (a, b) {
  10602. // flow complains about extra args which is why we use any
  10603. f1(a, b);
  10604. f2(a, b);
  10605. };
  10606. merged._merged = true;
  10607. return merged
  10608. }
  10609. // transform component v-model info (value and callback) into
  10610. // prop and event handler respectively.
  10611. function transformModel (options, data) {
  10612. var prop = (options.model && options.model.prop) || 'value';
  10613. var event = (options.model && options.model.event) || 'input'
  10614. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  10615. var on = data.on || (data.on = {});
  10616. var existing = on[event];
  10617. var callback = data.model.callback;
  10618. if (isDef(existing)) {
  10619. if (
  10620. Array.isArray(existing)
  10621. ? existing.indexOf(callback) === -1
  10622. : existing !== callback
  10623. ) {
  10624. on[event] = [callback].concat(existing);
  10625. }
  10626. } else {
  10627. on[event] = callback;
  10628. }
  10629. }
  10630. /* */
  10631. var SIMPLE_NORMALIZE = 1;
  10632. var ALWAYS_NORMALIZE = 2;
  10633. // wrapper function for providing a more flexible interface
  10634. // without getting yelled at by flow
  10635. function createElement (
  10636. context,
  10637. tag,
  10638. data,
  10639. children,
  10640. normalizationType,
  10641. alwaysNormalize
  10642. ) {
  10643. if (Array.isArray(data) || isPrimitive(data)) {
  10644. normalizationType = children;
  10645. children = data;
  10646. data = undefined;
  10647. }
  10648. if (isTrue(alwaysNormalize)) {
  10649. normalizationType = ALWAYS_NORMALIZE;
  10650. }
  10651. return _createElement(context, tag, data, children, normalizationType)
  10652. }
  10653. function _createElement (
  10654. context,
  10655. tag,
  10656. data,
  10657. children,
  10658. normalizationType
  10659. ) {
  10660. if (isDef(data) && isDef((data).__ob__)) {
  10661. true && warn(
  10662. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  10663. 'Always create fresh vnode data objects in each render!',
  10664. context
  10665. );
  10666. return createEmptyVNode()
  10667. }
  10668. // object syntax in v-bind
  10669. if (isDef(data) && isDef(data.is)) {
  10670. tag = data.is;
  10671. }
  10672. if (!tag) {
  10673. // in case of component :is set to falsy value
  10674. return createEmptyVNode()
  10675. }
  10676. // warn against non-primitive key
  10677. if ( true &&
  10678. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  10679. ) {
  10680. {
  10681. warn(
  10682. 'Avoid using non-primitive value as key, ' +
  10683. 'use string/number value instead.',
  10684. context
  10685. );
  10686. }
  10687. }
  10688. // support single function children as default scoped slot
  10689. if (Array.isArray(children) &&
  10690. typeof children[0] === 'function'
  10691. ) {
  10692. data = data || {};
  10693. data.scopedSlots = { default: children[0] };
  10694. children.length = 0;
  10695. }
  10696. if (normalizationType === ALWAYS_NORMALIZE) {
  10697. children = normalizeChildren(children);
  10698. } else if (normalizationType === SIMPLE_NORMALIZE) {
  10699. children = simpleNormalizeChildren(children);
  10700. }
  10701. var vnode, ns;
  10702. if (typeof tag === 'string') {
  10703. var Ctor;
  10704. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  10705. if (config.isReservedTag(tag)) {
  10706. // platform built-in elements
  10707. if ( true && isDef(data) && isDef(data.nativeOn) && data.tag !== 'component') {
  10708. warn(
  10709. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  10710. context
  10711. );
  10712. }
  10713. vnode = new VNode(
  10714. config.parsePlatformTagName(tag), data, children,
  10715. undefined, undefined, context
  10716. );
  10717. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  10718. // component
  10719. vnode = createComponent(Ctor, data, context, children, tag);
  10720. } else {
  10721. // unknown or unlisted namespaced elements
  10722. // check at runtime because it may get assigned a namespace when its
  10723. // parent normalizes children
  10724. vnode = new VNode(
  10725. tag, data, children,
  10726. undefined, undefined, context
  10727. );
  10728. }
  10729. } else {
  10730. // direct component options / constructor
  10731. vnode = createComponent(tag, data, context, children);
  10732. }
  10733. if (Array.isArray(vnode)) {
  10734. return vnode
  10735. } else if (isDef(vnode)) {
  10736. if (isDef(ns)) { applyNS(vnode, ns); }
  10737. if (isDef(data)) { registerDeepBindings(data); }
  10738. return vnode
  10739. } else {
  10740. return createEmptyVNode()
  10741. }
  10742. }
  10743. function applyNS (vnode, ns, force) {
  10744. vnode.ns = ns;
  10745. if (vnode.tag === 'foreignObject') {
  10746. // use default namespace inside foreignObject
  10747. ns = undefined;
  10748. force = true;
  10749. }
  10750. if (isDef(vnode.children)) {
  10751. for (var i = 0, l = vnode.children.length; i < l; i++) {
  10752. var child = vnode.children[i];
  10753. if (isDef(child.tag) && (
  10754. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  10755. applyNS(child, ns, force);
  10756. }
  10757. }
  10758. }
  10759. }
  10760. // ref #5318
  10761. // necessary to ensure parent re-render when deep bindings like :style and
  10762. // :class are used on slot nodes
  10763. function registerDeepBindings (data) {
  10764. if (isObject(data.style)) {
  10765. traverse(data.style);
  10766. }
  10767. if (isObject(data.class)) {
  10768. traverse(data.class);
  10769. }
  10770. }
  10771. /* */
  10772. function initRender (vm) {
  10773. vm._vnode = null; // the root of the child tree
  10774. vm._staticTrees = null; // v-once cached trees
  10775. var options = vm.$options;
  10776. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  10777. var renderContext = parentVnode && parentVnode.context;
  10778. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  10779. vm.$scopedSlots = emptyObject;
  10780. // bind the createElement fn to this instance
  10781. // so that we get proper render context inside it.
  10782. // args order: tag, data, children, normalizationType, alwaysNormalize
  10783. // internal version is used by render functions compiled from templates
  10784. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  10785. // normalization is always applied for the public version, used in
  10786. // user-written render functions.
  10787. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  10788. // $attrs & $listeners are exposed for easier HOC creation.
  10789. // they need to be reactive so that HOCs using them are always updated
  10790. var parentData = parentVnode && parentVnode.data;
  10791. /* istanbul ignore else */
  10792. if (true) {
  10793. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  10794. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  10795. }, true);
  10796. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  10797. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  10798. }, true);
  10799. } else {}
  10800. }
  10801. var currentRenderingInstance = null;
  10802. function renderMixin (Vue) {
  10803. // install runtime convenience helpers
  10804. installRenderHelpers(Vue.prototype);
  10805. Vue.prototype.$nextTick = function (fn) {
  10806. return nextTick(fn, this)
  10807. };
  10808. Vue.prototype._render = function () {
  10809. var vm = this;
  10810. var ref = vm.$options;
  10811. var render = ref.render;
  10812. var _parentVnode = ref._parentVnode;
  10813. if (_parentVnode) {
  10814. vm.$scopedSlots = normalizeScopedSlots(
  10815. _parentVnode.data.scopedSlots,
  10816. vm.$slots,
  10817. vm.$scopedSlots
  10818. );
  10819. }
  10820. // set parent vnode. this allows render functions to have access
  10821. // to the data on the placeholder node.
  10822. vm.$vnode = _parentVnode;
  10823. // render self
  10824. var vnode;
  10825. try {
  10826. // There's no need to maintain a stack because all render fns are called
  10827. // separately from one another. Nested component's render fns are called
  10828. // when parent component is patched.
  10829. currentRenderingInstance = vm;
  10830. vnode = render.call(vm._renderProxy, vm.$createElement);
  10831. } catch (e) {
  10832. handleError(e, vm, "render");
  10833. // return error render result,
  10834. // or previous vnode to prevent render error causing blank component
  10835. /* istanbul ignore else */
  10836. if ( true && vm.$options.renderError) {
  10837. try {
  10838. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  10839. } catch (e) {
  10840. handleError(e, vm, "renderError");
  10841. vnode = vm._vnode;
  10842. }
  10843. } else {
  10844. vnode = vm._vnode;
  10845. }
  10846. } finally {
  10847. currentRenderingInstance = null;
  10848. }
  10849. // if the returned array contains only a single node, allow it
  10850. if (Array.isArray(vnode) && vnode.length === 1) {
  10851. vnode = vnode[0];
  10852. }
  10853. // return empty vnode in case the render function errored out
  10854. if (!(vnode instanceof VNode)) {
  10855. if ( true && Array.isArray(vnode)) {
  10856. warn(
  10857. 'Multiple root nodes returned from render function. Render function ' +
  10858. 'should return a single root node.',
  10859. vm
  10860. );
  10861. }
  10862. vnode = createEmptyVNode();
  10863. }
  10864. // set parent
  10865. vnode.parent = _parentVnode;
  10866. return vnode
  10867. };
  10868. }
  10869. /* */
  10870. function ensureCtor (comp, base) {
  10871. if (
  10872. comp.__esModule ||
  10873. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  10874. ) {
  10875. comp = comp.default;
  10876. }
  10877. return isObject(comp)
  10878. ? base.extend(comp)
  10879. : comp
  10880. }
  10881. function createAsyncPlaceholder (
  10882. factory,
  10883. data,
  10884. context,
  10885. children,
  10886. tag
  10887. ) {
  10888. var node = createEmptyVNode();
  10889. node.asyncFactory = factory;
  10890. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  10891. return node
  10892. }
  10893. function resolveAsyncComponent (
  10894. factory,
  10895. baseCtor
  10896. ) {
  10897. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  10898. return factory.errorComp
  10899. }
  10900. if (isDef(factory.resolved)) {
  10901. return factory.resolved
  10902. }
  10903. var owner = currentRenderingInstance;
  10904. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  10905. // already pending
  10906. factory.owners.push(owner);
  10907. }
  10908. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  10909. return factory.loadingComp
  10910. }
  10911. if (owner && !isDef(factory.owners)) {
  10912. var owners = factory.owners = [owner];
  10913. var sync = true;
  10914. var timerLoading = null;
  10915. var timerTimeout = null
  10916. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  10917. var forceRender = function (renderCompleted) {
  10918. for (var i = 0, l = owners.length; i < l; i++) {
  10919. (owners[i]).$forceUpdate();
  10920. }
  10921. if (renderCompleted) {
  10922. owners.length = 0;
  10923. if (timerLoading !== null) {
  10924. clearTimeout(timerLoading);
  10925. timerLoading = null;
  10926. }
  10927. if (timerTimeout !== null) {
  10928. clearTimeout(timerTimeout);
  10929. timerTimeout = null;
  10930. }
  10931. }
  10932. };
  10933. var resolve = once(function (res) {
  10934. // cache resolved
  10935. factory.resolved = ensureCtor(res, baseCtor);
  10936. // invoke callbacks only if this is not a synchronous resolve
  10937. // (async resolves are shimmed as synchronous during SSR)
  10938. if (!sync) {
  10939. forceRender(true);
  10940. } else {
  10941. owners.length = 0;
  10942. }
  10943. });
  10944. var reject = once(function (reason) {
  10945. true && warn(
  10946. "Failed to resolve async component: " + (String(factory)) +
  10947. (reason ? ("\nReason: " + reason) : '')
  10948. );
  10949. if (isDef(factory.errorComp)) {
  10950. factory.error = true;
  10951. forceRender(true);
  10952. }
  10953. });
  10954. var res = factory(resolve, reject);
  10955. if (isObject(res)) {
  10956. if (isPromise(res)) {
  10957. // () => Promise
  10958. if (isUndef(factory.resolved)) {
  10959. res.then(resolve, reject);
  10960. }
  10961. } else if (isPromise(res.component)) {
  10962. res.component.then(resolve, reject);
  10963. if (isDef(res.error)) {
  10964. factory.errorComp = ensureCtor(res.error, baseCtor);
  10965. }
  10966. if (isDef(res.loading)) {
  10967. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  10968. if (res.delay === 0) {
  10969. factory.loading = true;
  10970. } else {
  10971. timerLoading = setTimeout(function () {
  10972. timerLoading = null;
  10973. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  10974. factory.loading = true;
  10975. forceRender(false);
  10976. }
  10977. }, res.delay || 200);
  10978. }
  10979. }
  10980. if (isDef(res.timeout)) {
  10981. timerTimeout = setTimeout(function () {
  10982. timerTimeout = null;
  10983. if (isUndef(factory.resolved)) {
  10984. reject(
  10985. true
  10986. ? ("timeout (" + (res.timeout) + "ms)")
  10987. : 0
  10988. );
  10989. }
  10990. }, res.timeout);
  10991. }
  10992. }
  10993. }
  10994. sync = false;
  10995. // return in case resolved synchronously
  10996. return factory.loading
  10997. ? factory.loadingComp
  10998. : factory.resolved
  10999. }
  11000. }
  11001. /* */
  11002. function getFirstComponentChild (children) {
  11003. if (Array.isArray(children)) {
  11004. for (var i = 0; i < children.length; i++) {
  11005. var c = children[i];
  11006. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  11007. return c
  11008. }
  11009. }
  11010. }
  11011. }
  11012. /* */
  11013. /* */
  11014. function initEvents (vm) {
  11015. vm._events = Object.create(null);
  11016. vm._hasHookEvent = false;
  11017. // init parent attached events
  11018. var listeners = vm.$options._parentListeners;
  11019. if (listeners) {
  11020. updateComponentListeners(vm, listeners);
  11021. }
  11022. }
  11023. var target;
  11024. function add (event, fn) {
  11025. target.$on(event, fn);
  11026. }
  11027. function remove$1 (event, fn) {
  11028. target.$off(event, fn);
  11029. }
  11030. function createOnceHandler (event, fn) {
  11031. var _target = target;
  11032. return function onceHandler () {
  11033. var res = fn.apply(null, arguments);
  11034. if (res !== null) {
  11035. _target.$off(event, onceHandler);
  11036. }
  11037. }
  11038. }
  11039. function updateComponentListeners (
  11040. vm,
  11041. listeners,
  11042. oldListeners
  11043. ) {
  11044. target = vm;
  11045. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  11046. target = undefined;
  11047. }
  11048. function eventsMixin (Vue) {
  11049. var hookRE = /^hook:/;
  11050. Vue.prototype.$on = function (event, fn) {
  11051. var vm = this;
  11052. if (Array.isArray(event)) {
  11053. for (var i = 0, l = event.length; i < l; i++) {
  11054. vm.$on(event[i], fn);
  11055. }
  11056. } else {
  11057. (vm._events[event] || (vm._events[event] = [])).push(fn);
  11058. // optimize hook:event cost by using a boolean flag marked at registration
  11059. // instead of a hash lookup
  11060. if (hookRE.test(event)) {
  11061. vm._hasHookEvent = true;
  11062. }
  11063. }
  11064. return vm
  11065. };
  11066. Vue.prototype.$once = function (event, fn) {
  11067. var vm = this;
  11068. function on () {
  11069. vm.$off(event, on);
  11070. fn.apply(vm, arguments);
  11071. }
  11072. on.fn = fn;
  11073. vm.$on(event, on);
  11074. return vm
  11075. };
  11076. Vue.prototype.$off = function (event, fn) {
  11077. var vm = this;
  11078. // all
  11079. if (!arguments.length) {
  11080. vm._events = Object.create(null);
  11081. return vm
  11082. }
  11083. // array of events
  11084. if (Array.isArray(event)) {
  11085. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  11086. vm.$off(event[i$1], fn);
  11087. }
  11088. return vm
  11089. }
  11090. // specific event
  11091. var cbs = vm._events[event];
  11092. if (!cbs) {
  11093. return vm
  11094. }
  11095. if (!fn) {
  11096. vm._events[event] = null;
  11097. return vm
  11098. }
  11099. // specific handler
  11100. var cb;
  11101. var i = cbs.length;
  11102. while (i--) {
  11103. cb = cbs[i];
  11104. if (cb === fn || cb.fn === fn) {
  11105. cbs.splice(i, 1);
  11106. break
  11107. }
  11108. }
  11109. return vm
  11110. };
  11111. Vue.prototype.$emit = function (event) {
  11112. var vm = this;
  11113. if (true) {
  11114. var lowerCaseEvent = event.toLowerCase();
  11115. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  11116. tip(
  11117. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  11118. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  11119. "Note that HTML attributes are case-insensitive and you cannot use " +
  11120. "v-on to listen to camelCase events when using in-DOM templates. " +
  11121. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  11122. );
  11123. }
  11124. }
  11125. var cbs = vm._events[event];
  11126. if (cbs) {
  11127. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  11128. var args = toArray(arguments, 1);
  11129. var info = "event handler for \"" + event + "\"";
  11130. for (var i = 0, l = cbs.length; i < l; i++) {
  11131. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  11132. }
  11133. }
  11134. return vm
  11135. };
  11136. }
  11137. /* */
  11138. var activeInstance = null;
  11139. var isUpdatingChildComponent = false;
  11140. function setActiveInstance(vm) {
  11141. var prevActiveInstance = activeInstance;
  11142. activeInstance = vm;
  11143. return function () {
  11144. activeInstance = prevActiveInstance;
  11145. }
  11146. }
  11147. function initLifecycle (vm) {
  11148. var options = vm.$options;
  11149. // locate first non-abstract parent
  11150. var parent = options.parent;
  11151. if (parent && !options.abstract) {
  11152. while (parent.$options.abstract && parent.$parent) {
  11153. parent = parent.$parent;
  11154. }
  11155. parent.$children.push(vm);
  11156. }
  11157. vm.$parent = parent;
  11158. vm.$root = parent ? parent.$root : vm;
  11159. vm.$children = [];
  11160. vm.$refs = {};
  11161. vm._watcher = null;
  11162. vm._inactive = null;
  11163. vm._directInactive = false;
  11164. vm._isMounted = false;
  11165. vm._isDestroyed = false;
  11166. vm._isBeingDestroyed = false;
  11167. }
  11168. function lifecycleMixin (Vue) {
  11169. Vue.prototype._update = function (vnode, hydrating) {
  11170. var vm = this;
  11171. var prevEl = vm.$el;
  11172. var prevVnode = vm._vnode;
  11173. var restoreActiveInstance = setActiveInstance(vm);
  11174. vm._vnode = vnode;
  11175. // Vue.prototype.__patch__ is injected in entry points
  11176. // based on the rendering backend used.
  11177. if (!prevVnode) {
  11178. // initial render
  11179. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  11180. } else {
  11181. // updates
  11182. vm.$el = vm.__patch__(prevVnode, vnode);
  11183. }
  11184. restoreActiveInstance();
  11185. // update __vue__ reference
  11186. if (prevEl) {
  11187. prevEl.__vue__ = null;
  11188. }
  11189. if (vm.$el) {
  11190. vm.$el.__vue__ = vm;
  11191. }
  11192. // if parent is an HOC, update its $el as well
  11193. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  11194. vm.$parent.$el = vm.$el;
  11195. }
  11196. // updated hook is called by the scheduler to ensure that children are
  11197. // updated in a parent's updated hook.
  11198. };
  11199. Vue.prototype.$forceUpdate = function () {
  11200. var vm = this;
  11201. if (vm._watcher) {
  11202. vm._watcher.update();
  11203. }
  11204. };
  11205. Vue.prototype.$destroy = function () {
  11206. var vm = this;
  11207. if (vm._isBeingDestroyed) {
  11208. return
  11209. }
  11210. callHook(vm, 'beforeDestroy');
  11211. vm._isBeingDestroyed = true;
  11212. // remove self from parent
  11213. var parent = vm.$parent;
  11214. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  11215. remove(parent.$children, vm);
  11216. }
  11217. // teardown watchers
  11218. if (vm._watcher) {
  11219. vm._watcher.teardown();
  11220. }
  11221. var i = vm._watchers.length;
  11222. while (i--) {
  11223. vm._watchers[i].teardown();
  11224. }
  11225. // remove reference from data ob
  11226. // frozen object may not have observer.
  11227. if (vm._data.__ob__) {
  11228. vm._data.__ob__.vmCount--;
  11229. }
  11230. // call the last hook...
  11231. vm._isDestroyed = true;
  11232. // invoke destroy hooks on current rendered tree
  11233. vm.__patch__(vm._vnode, null);
  11234. // fire destroyed hook
  11235. callHook(vm, 'destroyed');
  11236. // turn off all instance listeners.
  11237. vm.$off();
  11238. // remove __vue__ reference
  11239. if (vm.$el) {
  11240. vm.$el.__vue__ = null;
  11241. }
  11242. // release circular reference (#6759)
  11243. if (vm.$vnode) {
  11244. vm.$vnode.parent = null;
  11245. }
  11246. };
  11247. }
  11248. function mountComponent (
  11249. vm,
  11250. el,
  11251. hydrating
  11252. ) {
  11253. vm.$el = el;
  11254. if (!vm.$options.render) {
  11255. vm.$options.render = createEmptyVNode;
  11256. if (true) {
  11257. /* istanbul ignore if */
  11258. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  11259. vm.$options.el || el) {
  11260. warn(
  11261. 'You are using the runtime-only build of Vue where the template ' +
  11262. 'compiler is not available. Either pre-compile the templates into ' +
  11263. 'render functions, or use the compiler-included build.',
  11264. vm
  11265. );
  11266. } else {
  11267. warn(
  11268. 'Failed to mount component: template or render function not defined.',
  11269. vm
  11270. );
  11271. }
  11272. }
  11273. }
  11274. callHook(vm, 'beforeMount');
  11275. var updateComponent;
  11276. /* istanbul ignore if */
  11277. if ( true && config.performance && mark) {
  11278. updateComponent = function () {
  11279. var name = vm._name;
  11280. var id = vm._uid;
  11281. var startTag = "vue-perf-start:" + id;
  11282. var endTag = "vue-perf-end:" + id;
  11283. mark(startTag);
  11284. var vnode = vm._render();
  11285. mark(endTag);
  11286. measure(("vue " + name + " render"), startTag, endTag);
  11287. mark(startTag);
  11288. vm._update(vnode, hydrating);
  11289. mark(endTag);
  11290. measure(("vue " + name + " patch"), startTag, endTag);
  11291. };
  11292. } else {
  11293. updateComponent = function () {
  11294. vm._update(vm._render(), hydrating);
  11295. };
  11296. }
  11297. // we set this to vm._watcher inside the watcher's constructor
  11298. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  11299. // component's mounted hook), which relies on vm._watcher being already defined
  11300. new Watcher(vm, updateComponent, noop, {
  11301. before: function before () {
  11302. if (vm._isMounted && !vm._isDestroyed) {
  11303. callHook(vm, 'beforeUpdate');
  11304. }
  11305. }
  11306. }, true /* isRenderWatcher */);
  11307. hydrating = false;
  11308. // manually mounted instance, call mounted on self
  11309. // mounted is called for render-created child components in its inserted hook
  11310. if (vm.$vnode == null) {
  11311. vm._isMounted = true;
  11312. callHook(vm, 'mounted');
  11313. }
  11314. return vm
  11315. }
  11316. function updateChildComponent (
  11317. vm,
  11318. propsData,
  11319. listeners,
  11320. parentVnode,
  11321. renderChildren
  11322. ) {
  11323. if (true) {
  11324. isUpdatingChildComponent = true;
  11325. }
  11326. // determine whether component has slot children
  11327. // we need to do this before overwriting $options._renderChildren.
  11328. // check if there are dynamic scopedSlots (hand-written or compiled but with
  11329. // dynamic slot names). Static scoped slots compiled from template has the
  11330. // "$stable" marker.
  11331. var newScopedSlots = parentVnode.data.scopedSlots;
  11332. var oldScopedSlots = vm.$scopedSlots;
  11333. var hasDynamicScopedSlot = !!(
  11334. (newScopedSlots && !newScopedSlots.$stable) ||
  11335. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  11336. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key) ||
  11337. (!newScopedSlots && vm.$scopedSlots.$key)
  11338. );
  11339. // Any static slot children from the parent may have changed during parent's
  11340. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  11341. // update is necessary to ensure correctness.
  11342. var needsForceUpdate = !!(
  11343. renderChildren || // has new static slots
  11344. vm.$options._renderChildren || // has old static slots
  11345. hasDynamicScopedSlot
  11346. );
  11347. vm.$options._parentVnode = parentVnode;
  11348. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  11349. if (vm._vnode) { // update child tree's parent
  11350. vm._vnode.parent = parentVnode;
  11351. }
  11352. vm.$options._renderChildren = renderChildren;
  11353. // update $attrs and $listeners hash
  11354. // these are also reactive so they may trigger child update if the child
  11355. // used them during render
  11356. vm.$attrs = parentVnode.data.attrs || emptyObject;
  11357. vm.$listeners = listeners || emptyObject;
  11358. // update props
  11359. if (propsData && vm.$options.props) {
  11360. toggleObserving(false);
  11361. var props = vm._props;
  11362. var propKeys = vm.$options._propKeys || [];
  11363. for (var i = 0; i < propKeys.length; i++) {
  11364. var key = propKeys[i];
  11365. var propOptions = vm.$options.props; // wtf flow?
  11366. props[key] = validateProp(key, propOptions, propsData, vm);
  11367. }
  11368. toggleObserving(true);
  11369. // keep a copy of raw propsData
  11370. vm.$options.propsData = propsData;
  11371. }
  11372. // update listeners
  11373. listeners = listeners || emptyObject;
  11374. var oldListeners = vm.$options._parentListeners;
  11375. vm.$options._parentListeners = listeners;
  11376. updateComponentListeners(vm, listeners, oldListeners);
  11377. // resolve slots + force update if has children
  11378. if (needsForceUpdate) {
  11379. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  11380. vm.$forceUpdate();
  11381. }
  11382. if (true) {
  11383. isUpdatingChildComponent = false;
  11384. }
  11385. }
  11386. function isInInactiveTree (vm) {
  11387. while (vm && (vm = vm.$parent)) {
  11388. if (vm._inactive) { return true }
  11389. }
  11390. return false
  11391. }
  11392. function activateChildComponent (vm, direct) {
  11393. if (direct) {
  11394. vm._directInactive = false;
  11395. if (isInInactiveTree(vm)) {
  11396. return
  11397. }
  11398. } else if (vm._directInactive) {
  11399. return
  11400. }
  11401. if (vm._inactive || vm._inactive === null) {
  11402. vm._inactive = false;
  11403. for (var i = 0; i < vm.$children.length; i++) {
  11404. activateChildComponent(vm.$children[i]);
  11405. }
  11406. callHook(vm, 'activated');
  11407. }
  11408. }
  11409. function deactivateChildComponent (vm, direct) {
  11410. if (direct) {
  11411. vm._directInactive = true;
  11412. if (isInInactiveTree(vm)) {
  11413. return
  11414. }
  11415. }
  11416. if (!vm._inactive) {
  11417. vm._inactive = true;
  11418. for (var i = 0; i < vm.$children.length; i++) {
  11419. deactivateChildComponent(vm.$children[i]);
  11420. }
  11421. callHook(vm, 'deactivated');
  11422. }
  11423. }
  11424. function callHook (vm, hook) {
  11425. // #7573 disable dep collection when invoking lifecycle hooks
  11426. pushTarget();
  11427. var handlers = vm.$options[hook];
  11428. var info = hook + " hook";
  11429. if (handlers) {
  11430. for (var i = 0, j = handlers.length; i < j; i++) {
  11431. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  11432. }
  11433. }
  11434. if (vm._hasHookEvent) {
  11435. vm.$emit('hook:' + hook);
  11436. }
  11437. popTarget();
  11438. }
  11439. /* */
  11440. var MAX_UPDATE_COUNT = 100;
  11441. var queue = [];
  11442. var activatedChildren = [];
  11443. var has = {};
  11444. var circular = {};
  11445. var waiting = false;
  11446. var flushing = false;
  11447. var index = 0;
  11448. /**
  11449. * Reset the scheduler's state.
  11450. */
  11451. function resetSchedulerState () {
  11452. index = queue.length = activatedChildren.length = 0;
  11453. has = {};
  11454. if (true) {
  11455. circular = {};
  11456. }
  11457. waiting = flushing = false;
  11458. }
  11459. // Async edge case #6566 requires saving the timestamp when event listeners are
  11460. // attached. However, calling performance.now() has a perf overhead especially
  11461. // if the page has thousands of event listeners. Instead, we take a timestamp
  11462. // every time the scheduler flushes and use that for all event listeners
  11463. // attached during that flush.
  11464. var currentFlushTimestamp = 0;
  11465. // Async edge case fix requires storing an event listener's attach timestamp.
  11466. var getNow = Date.now;
  11467. // Determine what event timestamp the browser is using. Annoyingly, the
  11468. // timestamp can either be hi-res (relative to page load) or low-res
  11469. // (relative to UNIX epoch), so in order to compare time we have to use the
  11470. // same timestamp type when saving the flush timestamp.
  11471. // All IE versions use low-res event timestamps, and have problematic clock
  11472. // implementations (#9632)
  11473. if (inBrowser && !isIE) {
  11474. var performance = window.performance;
  11475. if (
  11476. performance &&
  11477. typeof performance.now === 'function' &&
  11478. getNow() > document.createEvent('Event').timeStamp
  11479. ) {
  11480. // if the event timestamp, although evaluated AFTER the Date.now(), is
  11481. // smaller than it, it means the event is using a hi-res timestamp,
  11482. // and we need to use the hi-res version for event listener timestamps as
  11483. // well.
  11484. getNow = function () { return performance.now(); };
  11485. }
  11486. }
  11487. /**
  11488. * Flush both queues and run the watchers.
  11489. */
  11490. function flushSchedulerQueue () {
  11491. currentFlushTimestamp = getNow();
  11492. flushing = true;
  11493. var watcher, id;
  11494. // Sort queue before flush.
  11495. // This ensures that:
  11496. // 1. Components are updated from parent to child. (because parent is always
  11497. // created before the child)
  11498. // 2. A component's user watchers are run before its render watcher (because
  11499. // user watchers are created before the render watcher)
  11500. // 3. If a component is destroyed during a parent component's watcher run,
  11501. // its watchers can be skipped.
  11502. queue.sort(function (a, b) { return a.id - b.id; });
  11503. // do not cache length because more watchers might be pushed
  11504. // as we run existing watchers
  11505. for (index = 0; index < queue.length; index++) {
  11506. watcher = queue[index];
  11507. if (watcher.before) {
  11508. watcher.before();
  11509. }
  11510. id = watcher.id;
  11511. has[id] = null;
  11512. watcher.run();
  11513. // in dev build, check and stop circular updates.
  11514. if ( true && has[id] != null) {
  11515. circular[id] = (circular[id] || 0) + 1;
  11516. if (circular[id] > MAX_UPDATE_COUNT) {
  11517. warn(
  11518. 'You may have an infinite update loop ' + (
  11519. watcher.user
  11520. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  11521. : "in a component render function."
  11522. ),
  11523. watcher.vm
  11524. );
  11525. break
  11526. }
  11527. }
  11528. }
  11529. // keep copies of post queues before resetting state
  11530. var activatedQueue = activatedChildren.slice();
  11531. var updatedQueue = queue.slice();
  11532. resetSchedulerState();
  11533. // call component updated and activated hooks
  11534. callActivatedHooks(activatedQueue);
  11535. callUpdatedHooks(updatedQueue);
  11536. // devtool hook
  11537. /* istanbul ignore if */
  11538. if (devtools && config.devtools) {
  11539. devtools.emit('flush');
  11540. }
  11541. }
  11542. function callUpdatedHooks (queue) {
  11543. var i = queue.length;
  11544. while (i--) {
  11545. var watcher = queue[i];
  11546. var vm = watcher.vm;
  11547. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  11548. callHook(vm, 'updated');
  11549. }
  11550. }
  11551. }
  11552. /**
  11553. * Queue a kept-alive component that was activated during patch.
  11554. * The queue will be processed after the entire tree has been patched.
  11555. */
  11556. function queueActivatedComponent (vm) {
  11557. // setting _inactive to false here so that a render function can
  11558. // rely on checking whether it's in an inactive tree (e.g. router-view)
  11559. vm._inactive = false;
  11560. activatedChildren.push(vm);
  11561. }
  11562. function callActivatedHooks (queue) {
  11563. for (var i = 0; i < queue.length; i++) {
  11564. queue[i]._inactive = true;
  11565. activateChildComponent(queue[i], true /* true */);
  11566. }
  11567. }
  11568. /**
  11569. * Push a watcher into the watcher queue.
  11570. * Jobs with duplicate IDs will be skipped unless it's
  11571. * pushed when the queue is being flushed.
  11572. */
  11573. function queueWatcher (watcher) {
  11574. var id = watcher.id;
  11575. if (has[id] == null) {
  11576. has[id] = true;
  11577. if (!flushing) {
  11578. queue.push(watcher);
  11579. } else {
  11580. // if already flushing, splice the watcher based on its id
  11581. // if already past its id, it will be run next immediately.
  11582. var i = queue.length - 1;
  11583. while (i > index && queue[i].id > watcher.id) {
  11584. i--;
  11585. }
  11586. queue.splice(i + 1, 0, watcher);
  11587. }
  11588. // queue the flush
  11589. if (!waiting) {
  11590. waiting = true;
  11591. if ( true && !config.async) {
  11592. flushSchedulerQueue();
  11593. return
  11594. }
  11595. nextTick(flushSchedulerQueue);
  11596. }
  11597. }
  11598. }
  11599. /* */
  11600. var uid$2 = 0;
  11601. /**
  11602. * A watcher parses an expression, collects dependencies,
  11603. * and fires callback when the expression value changes.
  11604. * This is used for both the $watch() api and directives.
  11605. */
  11606. var Watcher = function Watcher (
  11607. vm,
  11608. expOrFn,
  11609. cb,
  11610. options,
  11611. isRenderWatcher
  11612. ) {
  11613. this.vm = vm;
  11614. if (isRenderWatcher) {
  11615. vm._watcher = this;
  11616. }
  11617. vm._watchers.push(this);
  11618. // options
  11619. if (options) {
  11620. this.deep = !!options.deep;
  11621. this.user = !!options.user;
  11622. this.lazy = !!options.lazy;
  11623. this.sync = !!options.sync;
  11624. this.before = options.before;
  11625. } else {
  11626. this.deep = this.user = this.lazy = this.sync = false;
  11627. }
  11628. this.cb = cb;
  11629. this.id = ++uid$2; // uid for batching
  11630. this.active = true;
  11631. this.dirty = this.lazy; // for lazy watchers
  11632. this.deps = [];
  11633. this.newDeps = [];
  11634. this.depIds = new _Set();
  11635. this.newDepIds = new _Set();
  11636. this.expression = true
  11637. ? expOrFn.toString()
  11638. : 0;
  11639. // parse expression for getter
  11640. if (typeof expOrFn === 'function') {
  11641. this.getter = expOrFn;
  11642. } else {
  11643. this.getter = parsePath(expOrFn);
  11644. if (!this.getter) {
  11645. this.getter = noop;
  11646. true && warn(
  11647. "Failed watching path: \"" + expOrFn + "\" " +
  11648. 'Watcher only accepts simple dot-delimited paths. ' +
  11649. 'For full control, use a function instead.',
  11650. vm
  11651. );
  11652. }
  11653. }
  11654. this.value = this.lazy
  11655. ? undefined
  11656. : this.get();
  11657. };
  11658. /**
  11659. * Evaluate the getter, and re-collect dependencies.
  11660. */
  11661. Watcher.prototype.get = function get () {
  11662. pushTarget(this);
  11663. var value;
  11664. var vm = this.vm;
  11665. try {
  11666. value = this.getter.call(vm, vm);
  11667. } catch (e) {
  11668. if (this.user) {
  11669. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  11670. } else {
  11671. throw e
  11672. }
  11673. } finally {
  11674. // "touch" every property so they are all tracked as
  11675. // dependencies for deep watching
  11676. if (this.deep) {
  11677. traverse(value);
  11678. }
  11679. popTarget();
  11680. this.cleanupDeps();
  11681. }
  11682. return value
  11683. };
  11684. /**
  11685. * Add a dependency to this directive.
  11686. */
  11687. Watcher.prototype.addDep = function addDep (dep) {
  11688. var id = dep.id;
  11689. if (!this.newDepIds.has(id)) {
  11690. this.newDepIds.add(id);
  11691. this.newDeps.push(dep);
  11692. if (!this.depIds.has(id)) {
  11693. dep.addSub(this);
  11694. }
  11695. }
  11696. };
  11697. /**
  11698. * Clean up for dependency collection.
  11699. */
  11700. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  11701. var i = this.deps.length;
  11702. while (i--) {
  11703. var dep = this.deps[i];
  11704. if (!this.newDepIds.has(dep.id)) {
  11705. dep.removeSub(this);
  11706. }
  11707. }
  11708. var tmp = this.depIds;
  11709. this.depIds = this.newDepIds;
  11710. this.newDepIds = tmp;
  11711. this.newDepIds.clear();
  11712. tmp = this.deps;
  11713. this.deps = this.newDeps;
  11714. this.newDeps = tmp;
  11715. this.newDeps.length = 0;
  11716. };
  11717. /**
  11718. * Subscriber interface.
  11719. * Will be called when a dependency changes.
  11720. */
  11721. Watcher.prototype.update = function update () {
  11722. /* istanbul ignore else */
  11723. if (this.lazy) {
  11724. this.dirty = true;
  11725. } else if (this.sync) {
  11726. this.run();
  11727. } else {
  11728. queueWatcher(this);
  11729. }
  11730. };
  11731. /**
  11732. * Scheduler job interface.
  11733. * Will be called by the scheduler.
  11734. */
  11735. Watcher.prototype.run = function run () {
  11736. if (this.active) {
  11737. var value = this.get();
  11738. if (
  11739. value !== this.value ||
  11740. // Deep watchers and watchers on Object/Arrays should fire even
  11741. // when the value is the same, because the value may
  11742. // have mutated.
  11743. isObject(value) ||
  11744. this.deep
  11745. ) {
  11746. // set new value
  11747. var oldValue = this.value;
  11748. this.value = value;
  11749. if (this.user) {
  11750. var info = "callback for watcher \"" + (this.expression) + "\"";
  11751. invokeWithErrorHandling(this.cb, this.vm, [value, oldValue], this.vm, info);
  11752. } else {
  11753. this.cb.call(this.vm, value, oldValue);
  11754. }
  11755. }
  11756. }
  11757. };
  11758. /**
  11759. * Evaluate the value of the watcher.
  11760. * This only gets called for lazy watchers.
  11761. */
  11762. Watcher.prototype.evaluate = function evaluate () {
  11763. this.value = this.get();
  11764. this.dirty = false;
  11765. };
  11766. /**
  11767. * Depend on all deps collected by this watcher.
  11768. */
  11769. Watcher.prototype.depend = function depend () {
  11770. var i = this.deps.length;
  11771. while (i--) {
  11772. this.deps[i].depend();
  11773. }
  11774. };
  11775. /**
  11776. * Remove self from all dependencies' subscriber list.
  11777. */
  11778. Watcher.prototype.teardown = function teardown () {
  11779. if (this.active) {
  11780. // remove self from vm's watcher list
  11781. // this is a somewhat expensive operation so we skip it
  11782. // if the vm is being destroyed.
  11783. if (!this.vm._isBeingDestroyed) {
  11784. remove(this.vm._watchers, this);
  11785. }
  11786. var i = this.deps.length;
  11787. while (i--) {
  11788. this.deps[i].removeSub(this);
  11789. }
  11790. this.active = false;
  11791. }
  11792. };
  11793. /* */
  11794. var sharedPropertyDefinition = {
  11795. enumerable: true,
  11796. configurable: true,
  11797. get: noop,
  11798. set: noop
  11799. };
  11800. function proxy (target, sourceKey, key) {
  11801. sharedPropertyDefinition.get = function proxyGetter () {
  11802. return this[sourceKey][key]
  11803. };
  11804. sharedPropertyDefinition.set = function proxySetter (val) {
  11805. this[sourceKey][key] = val;
  11806. };
  11807. Object.defineProperty(target, key, sharedPropertyDefinition);
  11808. }
  11809. function initState (vm) {
  11810. vm._watchers = [];
  11811. var opts = vm.$options;
  11812. if (opts.props) { initProps(vm, opts.props); }
  11813. if (opts.methods) { initMethods(vm, opts.methods); }
  11814. if (opts.data) {
  11815. initData(vm);
  11816. } else {
  11817. observe(vm._data = {}, true /* asRootData */);
  11818. }
  11819. if (opts.computed) { initComputed(vm, opts.computed); }
  11820. if (opts.watch && opts.watch !== nativeWatch) {
  11821. initWatch(vm, opts.watch);
  11822. }
  11823. }
  11824. function initProps (vm, propsOptions) {
  11825. var propsData = vm.$options.propsData || {};
  11826. var props = vm._props = {};
  11827. // cache prop keys so that future props updates can iterate using Array
  11828. // instead of dynamic object key enumeration.
  11829. var keys = vm.$options._propKeys = [];
  11830. var isRoot = !vm.$parent;
  11831. // root instance props should be converted
  11832. if (!isRoot) {
  11833. toggleObserving(false);
  11834. }
  11835. var loop = function ( key ) {
  11836. keys.push(key);
  11837. var value = validateProp(key, propsOptions, propsData, vm);
  11838. /* istanbul ignore else */
  11839. if (true) {
  11840. var hyphenatedKey = hyphenate(key);
  11841. if (isReservedAttribute(hyphenatedKey) ||
  11842. config.isReservedAttr(hyphenatedKey)) {
  11843. warn(
  11844. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  11845. vm
  11846. );
  11847. }
  11848. defineReactive$$1(props, key, value, function () {
  11849. if (!isRoot && !isUpdatingChildComponent) {
  11850. warn(
  11851. "Avoid mutating a prop directly since the value will be " +
  11852. "overwritten whenever the parent component re-renders. " +
  11853. "Instead, use a data or computed property based on the prop's " +
  11854. "value. Prop being mutated: \"" + key + "\"",
  11855. vm
  11856. );
  11857. }
  11858. });
  11859. } else {}
  11860. // static props are already proxied on the component's prototype
  11861. // during Vue.extend(). We only need to proxy props defined at
  11862. // instantiation here.
  11863. if (!(key in vm)) {
  11864. proxy(vm, "_props", key);
  11865. }
  11866. };
  11867. for (var key in propsOptions) loop( key );
  11868. toggleObserving(true);
  11869. }
  11870. function initData (vm) {
  11871. var data = vm.$options.data;
  11872. data = vm._data = typeof data === 'function'
  11873. ? getData(data, vm)
  11874. : data || {};
  11875. if (!isPlainObject(data)) {
  11876. data = {};
  11877. true && warn(
  11878. 'data functions should return an object:\n' +
  11879. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  11880. vm
  11881. );
  11882. }
  11883. // proxy data on instance
  11884. var keys = Object.keys(data);
  11885. var props = vm.$options.props;
  11886. var methods = vm.$options.methods;
  11887. var i = keys.length;
  11888. while (i--) {
  11889. var key = keys[i];
  11890. if (true) {
  11891. if (methods && hasOwn(methods, key)) {
  11892. warn(
  11893. ("Method \"" + key + "\" has already been defined as a data property."),
  11894. vm
  11895. );
  11896. }
  11897. }
  11898. if (props && hasOwn(props, key)) {
  11899. true && warn(
  11900. "The data property \"" + key + "\" is already declared as a prop. " +
  11901. "Use prop default value instead.",
  11902. vm
  11903. );
  11904. } else if (!isReserved(key)) {
  11905. proxy(vm, "_data", key);
  11906. }
  11907. }
  11908. // observe data
  11909. observe(data, true /* asRootData */);
  11910. }
  11911. function getData (data, vm) {
  11912. // #7573 disable dep collection when invoking data getters
  11913. pushTarget();
  11914. try {
  11915. return data.call(vm, vm)
  11916. } catch (e) {
  11917. handleError(e, vm, "data()");
  11918. return {}
  11919. } finally {
  11920. popTarget();
  11921. }
  11922. }
  11923. var computedWatcherOptions = { lazy: true };
  11924. function initComputed (vm, computed) {
  11925. // $flow-disable-line
  11926. var watchers = vm._computedWatchers = Object.create(null);
  11927. // computed properties are just getters during SSR
  11928. var isSSR = isServerRendering();
  11929. for (var key in computed) {
  11930. var userDef = computed[key];
  11931. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  11932. if ( true && getter == null) {
  11933. warn(
  11934. ("Getter is missing for computed property \"" + key + "\"."),
  11935. vm
  11936. );
  11937. }
  11938. if (!isSSR) {
  11939. // create internal watcher for the computed property.
  11940. watchers[key] = new Watcher(
  11941. vm,
  11942. getter || noop,
  11943. noop,
  11944. computedWatcherOptions
  11945. );
  11946. }
  11947. // component-defined computed properties are already defined on the
  11948. // component prototype. We only need to define computed properties defined
  11949. // at instantiation here.
  11950. if (!(key in vm)) {
  11951. defineComputed(vm, key, userDef);
  11952. } else if (true) {
  11953. if (key in vm.$data) {
  11954. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  11955. } else if (vm.$options.props && key in vm.$options.props) {
  11956. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  11957. } else if (vm.$options.methods && key in vm.$options.methods) {
  11958. warn(("The computed property \"" + key + "\" is already defined as a method."), vm);
  11959. }
  11960. }
  11961. }
  11962. }
  11963. function defineComputed (
  11964. target,
  11965. key,
  11966. userDef
  11967. ) {
  11968. var shouldCache = !isServerRendering();
  11969. if (typeof userDef === 'function') {
  11970. sharedPropertyDefinition.get = shouldCache
  11971. ? createComputedGetter(key)
  11972. : createGetterInvoker(userDef);
  11973. sharedPropertyDefinition.set = noop;
  11974. } else {
  11975. sharedPropertyDefinition.get = userDef.get
  11976. ? shouldCache && userDef.cache !== false
  11977. ? createComputedGetter(key)
  11978. : createGetterInvoker(userDef.get)
  11979. : noop;
  11980. sharedPropertyDefinition.set = userDef.set || noop;
  11981. }
  11982. if ( true &&
  11983. sharedPropertyDefinition.set === noop) {
  11984. sharedPropertyDefinition.set = function () {
  11985. warn(
  11986. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  11987. this
  11988. );
  11989. };
  11990. }
  11991. Object.defineProperty(target, key, sharedPropertyDefinition);
  11992. }
  11993. function createComputedGetter (key) {
  11994. return function computedGetter () {
  11995. var watcher = this._computedWatchers && this._computedWatchers[key];
  11996. if (watcher) {
  11997. if (watcher.dirty) {
  11998. watcher.evaluate();
  11999. }
  12000. if (Dep.target) {
  12001. watcher.depend();
  12002. }
  12003. return watcher.value
  12004. }
  12005. }
  12006. }
  12007. function createGetterInvoker(fn) {
  12008. return function computedGetter () {
  12009. return fn.call(this, this)
  12010. }
  12011. }
  12012. function initMethods (vm, methods) {
  12013. var props = vm.$options.props;
  12014. for (var key in methods) {
  12015. if (true) {
  12016. if (typeof methods[key] !== 'function') {
  12017. warn(
  12018. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  12019. "Did you reference the function correctly?",
  12020. vm
  12021. );
  12022. }
  12023. if (props && hasOwn(props, key)) {
  12024. warn(
  12025. ("Method \"" + key + "\" has already been defined as a prop."),
  12026. vm
  12027. );
  12028. }
  12029. if ((key in vm) && isReserved(key)) {
  12030. warn(
  12031. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  12032. "Avoid defining component methods that start with _ or $."
  12033. );
  12034. }
  12035. }
  12036. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  12037. }
  12038. }
  12039. function initWatch (vm, watch) {
  12040. for (var key in watch) {
  12041. var handler = watch[key];
  12042. if (Array.isArray(handler)) {
  12043. for (var i = 0; i < handler.length; i++) {
  12044. createWatcher(vm, key, handler[i]);
  12045. }
  12046. } else {
  12047. createWatcher(vm, key, handler);
  12048. }
  12049. }
  12050. }
  12051. function createWatcher (
  12052. vm,
  12053. expOrFn,
  12054. handler,
  12055. options
  12056. ) {
  12057. if (isPlainObject(handler)) {
  12058. options = handler;
  12059. handler = handler.handler;
  12060. }
  12061. if (typeof handler === 'string') {
  12062. handler = vm[handler];
  12063. }
  12064. return vm.$watch(expOrFn, handler, options)
  12065. }
  12066. function stateMixin (Vue) {
  12067. // flow somehow has problems with directly declared definition object
  12068. // when using Object.defineProperty, so we have to procedurally build up
  12069. // the object here.
  12070. var dataDef = {};
  12071. dataDef.get = function () { return this._data };
  12072. var propsDef = {};
  12073. propsDef.get = function () { return this._props };
  12074. if (true) {
  12075. dataDef.set = function () {
  12076. warn(
  12077. 'Avoid replacing instance root $data. ' +
  12078. 'Use nested data properties instead.',
  12079. this
  12080. );
  12081. };
  12082. propsDef.set = function () {
  12083. warn("$props is readonly.", this);
  12084. };
  12085. }
  12086. Object.defineProperty(Vue.prototype, '$data', dataDef);
  12087. Object.defineProperty(Vue.prototype, '$props', propsDef);
  12088. Vue.prototype.$set = set;
  12089. Vue.prototype.$delete = del;
  12090. Vue.prototype.$watch = function (
  12091. expOrFn,
  12092. cb,
  12093. options
  12094. ) {
  12095. var vm = this;
  12096. if (isPlainObject(cb)) {
  12097. return createWatcher(vm, expOrFn, cb, options)
  12098. }
  12099. options = options || {};
  12100. options.user = true;
  12101. var watcher = new Watcher(vm, expOrFn, cb, options);
  12102. if (options.immediate) {
  12103. var info = "callback for immediate watcher \"" + (watcher.expression) + "\"";
  12104. pushTarget();
  12105. invokeWithErrorHandling(cb, vm, [watcher.value], vm, info);
  12106. popTarget();
  12107. }
  12108. return function unwatchFn () {
  12109. watcher.teardown();
  12110. }
  12111. };
  12112. }
  12113. /* */
  12114. var uid$3 = 0;
  12115. function initMixin (Vue) {
  12116. Vue.prototype._init = function (options) {
  12117. var vm = this;
  12118. // a uid
  12119. vm._uid = uid$3++;
  12120. var startTag, endTag;
  12121. /* istanbul ignore if */
  12122. if ( true && config.performance && mark) {
  12123. startTag = "vue-perf-start:" + (vm._uid);
  12124. endTag = "vue-perf-end:" + (vm._uid);
  12125. mark(startTag);
  12126. }
  12127. // a flag to avoid this being observed
  12128. vm._isVue = true;
  12129. // merge options
  12130. if (options && options._isComponent) {
  12131. // optimize internal component instantiation
  12132. // since dynamic options merging is pretty slow, and none of the
  12133. // internal component options needs special treatment.
  12134. initInternalComponent(vm, options);
  12135. } else {
  12136. vm.$options = mergeOptions(
  12137. resolveConstructorOptions(vm.constructor),
  12138. options || {},
  12139. vm
  12140. );
  12141. }
  12142. /* istanbul ignore else */
  12143. if (true) {
  12144. initProxy(vm);
  12145. } else {}
  12146. // expose real self
  12147. vm._self = vm;
  12148. initLifecycle(vm);
  12149. initEvents(vm);
  12150. initRender(vm);
  12151. callHook(vm, 'beforeCreate');
  12152. initInjections(vm); // resolve injections before data/props
  12153. initState(vm);
  12154. initProvide(vm); // resolve provide after data/props
  12155. callHook(vm, 'created');
  12156. /* istanbul ignore if */
  12157. if ( true && config.performance && mark) {
  12158. vm._name = formatComponentName(vm, false);
  12159. mark(endTag);
  12160. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  12161. }
  12162. if (vm.$options.el) {
  12163. vm.$mount(vm.$options.el);
  12164. }
  12165. };
  12166. }
  12167. function initInternalComponent (vm, options) {
  12168. var opts = vm.$options = Object.create(vm.constructor.options);
  12169. // doing this because it's faster than dynamic enumeration.
  12170. var parentVnode = options._parentVnode;
  12171. opts.parent = options.parent;
  12172. opts._parentVnode = parentVnode;
  12173. var vnodeComponentOptions = parentVnode.componentOptions;
  12174. opts.propsData = vnodeComponentOptions.propsData;
  12175. opts._parentListeners = vnodeComponentOptions.listeners;
  12176. opts._renderChildren = vnodeComponentOptions.children;
  12177. opts._componentTag = vnodeComponentOptions.tag;
  12178. if (options.render) {
  12179. opts.render = options.render;
  12180. opts.staticRenderFns = options.staticRenderFns;
  12181. }
  12182. }
  12183. function resolveConstructorOptions (Ctor) {
  12184. var options = Ctor.options;
  12185. if (Ctor.super) {
  12186. var superOptions = resolveConstructorOptions(Ctor.super);
  12187. var cachedSuperOptions = Ctor.superOptions;
  12188. if (superOptions !== cachedSuperOptions) {
  12189. // super option changed,
  12190. // need to resolve new options.
  12191. Ctor.superOptions = superOptions;
  12192. // check if there are any late-modified/attached options (#4976)
  12193. var modifiedOptions = resolveModifiedOptions(Ctor);
  12194. // update base extend options
  12195. if (modifiedOptions) {
  12196. extend(Ctor.extendOptions, modifiedOptions);
  12197. }
  12198. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  12199. if (options.name) {
  12200. options.components[options.name] = Ctor;
  12201. }
  12202. }
  12203. }
  12204. return options
  12205. }
  12206. function resolveModifiedOptions (Ctor) {
  12207. var modified;
  12208. var latest = Ctor.options;
  12209. var sealed = Ctor.sealedOptions;
  12210. for (var key in latest) {
  12211. if (latest[key] !== sealed[key]) {
  12212. if (!modified) { modified = {}; }
  12213. modified[key] = latest[key];
  12214. }
  12215. }
  12216. return modified
  12217. }
  12218. function Vue (options) {
  12219. if ( true &&
  12220. !(this instanceof Vue)
  12221. ) {
  12222. warn('Vue is a constructor and should be called with the `new` keyword');
  12223. }
  12224. this._init(options);
  12225. }
  12226. initMixin(Vue);
  12227. stateMixin(Vue);
  12228. eventsMixin(Vue);
  12229. lifecycleMixin(Vue);
  12230. renderMixin(Vue);
  12231. /* */
  12232. function initUse (Vue) {
  12233. Vue.use = function (plugin) {
  12234. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  12235. if (installedPlugins.indexOf(plugin) > -1) {
  12236. return this
  12237. }
  12238. // additional parameters
  12239. var args = toArray(arguments, 1);
  12240. args.unshift(this);
  12241. if (typeof plugin.install === 'function') {
  12242. plugin.install.apply(plugin, args);
  12243. } else if (typeof plugin === 'function') {
  12244. plugin.apply(null, args);
  12245. }
  12246. installedPlugins.push(plugin);
  12247. return this
  12248. };
  12249. }
  12250. /* */
  12251. function initMixin$1 (Vue) {
  12252. Vue.mixin = function (mixin) {
  12253. this.options = mergeOptions(this.options, mixin);
  12254. return this
  12255. };
  12256. }
  12257. /* */
  12258. function initExtend (Vue) {
  12259. /**
  12260. * Each instance constructor, including Vue, has a unique
  12261. * cid. This enables us to create wrapped "child
  12262. * constructors" for prototypal inheritance and cache them.
  12263. */
  12264. Vue.cid = 0;
  12265. var cid = 1;
  12266. /**
  12267. * Class inheritance
  12268. */
  12269. Vue.extend = function (extendOptions) {
  12270. extendOptions = extendOptions || {};
  12271. var Super = this;
  12272. var SuperId = Super.cid;
  12273. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  12274. if (cachedCtors[SuperId]) {
  12275. return cachedCtors[SuperId]
  12276. }
  12277. var name = extendOptions.name || Super.options.name;
  12278. if ( true && name) {
  12279. validateComponentName(name);
  12280. }
  12281. var Sub = function VueComponent (options) {
  12282. this._init(options);
  12283. };
  12284. Sub.prototype = Object.create(Super.prototype);
  12285. Sub.prototype.constructor = Sub;
  12286. Sub.cid = cid++;
  12287. Sub.options = mergeOptions(
  12288. Super.options,
  12289. extendOptions
  12290. );
  12291. Sub['super'] = Super;
  12292. // For props and computed properties, we define the proxy getters on
  12293. // the Vue instances at extension time, on the extended prototype. This
  12294. // avoids Object.defineProperty calls for each instance created.
  12295. if (Sub.options.props) {
  12296. initProps$1(Sub);
  12297. }
  12298. if (Sub.options.computed) {
  12299. initComputed$1(Sub);
  12300. }
  12301. // allow further extension/mixin/plugin usage
  12302. Sub.extend = Super.extend;
  12303. Sub.mixin = Super.mixin;
  12304. Sub.use = Super.use;
  12305. // create asset registers, so extended classes
  12306. // can have their private assets too.
  12307. ASSET_TYPES.forEach(function (type) {
  12308. Sub[type] = Super[type];
  12309. });
  12310. // enable recursive self-lookup
  12311. if (name) {
  12312. Sub.options.components[name] = Sub;
  12313. }
  12314. // keep a reference to the super options at extension time.
  12315. // later at instantiation we can check if Super's options have
  12316. // been updated.
  12317. Sub.superOptions = Super.options;
  12318. Sub.extendOptions = extendOptions;
  12319. Sub.sealedOptions = extend({}, Sub.options);
  12320. // cache constructor
  12321. cachedCtors[SuperId] = Sub;
  12322. return Sub
  12323. };
  12324. }
  12325. function initProps$1 (Comp) {
  12326. var props = Comp.options.props;
  12327. for (var key in props) {
  12328. proxy(Comp.prototype, "_props", key);
  12329. }
  12330. }
  12331. function initComputed$1 (Comp) {
  12332. var computed = Comp.options.computed;
  12333. for (var key in computed) {
  12334. defineComputed(Comp.prototype, key, computed[key]);
  12335. }
  12336. }
  12337. /* */
  12338. function initAssetRegisters (Vue) {
  12339. /**
  12340. * Create asset registration methods.
  12341. */
  12342. ASSET_TYPES.forEach(function (type) {
  12343. Vue[type] = function (
  12344. id,
  12345. definition
  12346. ) {
  12347. if (!definition) {
  12348. return this.options[type + 's'][id]
  12349. } else {
  12350. /* istanbul ignore if */
  12351. if ( true && type === 'component') {
  12352. validateComponentName(id);
  12353. }
  12354. if (type === 'component' && isPlainObject(definition)) {
  12355. definition.name = definition.name || id;
  12356. definition = this.options._base.extend(definition);
  12357. }
  12358. if (type === 'directive' && typeof definition === 'function') {
  12359. definition = { bind: definition, update: definition };
  12360. }
  12361. this.options[type + 's'][id] = definition;
  12362. return definition
  12363. }
  12364. };
  12365. });
  12366. }
  12367. /* */
  12368. function getComponentName (opts) {
  12369. return opts && (opts.Ctor.options.name || opts.tag)
  12370. }
  12371. function matches (pattern, name) {
  12372. if (Array.isArray(pattern)) {
  12373. return pattern.indexOf(name) > -1
  12374. } else if (typeof pattern === 'string') {
  12375. return pattern.split(',').indexOf(name) > -1
  12376. } else if (isRegExp(pattern)) {
  12377. return pattern.test(name)
  12378. }
  12379. /* istanbul ignore next */
  12380. return false
  12381. }
  12382. function pruneCache (keepAliveInstance, filter) {
  12383. var cache = keepAliveInstance.cache;
  12384. var keys = keepAliveInstance.keys;
  12385. var _vnode = keepAliveInstance._vnode;
  12386. for (var key in cache) {
  12387. var entry = cache[key];
  12388. if (entry) {
  12389. var name = entry.name;
  12390. if (name && !filter(name)) {
  12391. pruneCacheEntry(cache, key, keys, _vnode);
  12392. }
  12393. }
  12394. }
  12395. }
  12396. function pruneCacheEntry (
  12397. cache,
  12398. key,
  12399. keys,
  12400. current
  12401. ) {
  12402. var entry = cache[key];
  12403. if (entry && (!current || entry.tag !== current.tag)) {
  12404. entry.componentInstance.$destroy();
  12405. }
  12406. cache[key] = null;
  12407. remove(keys, key);
  12408. }
  12409. var patternTypes = [String, RegExp, Array];
  12410. var KeepAlive = {
  12411. name: 'keep-alive',
  12412. abstract: true,
  12413. props: {
  12414. include: patternTypes,
  12415. exclude: patternTypes,
  12416. max: [String, Number]
  12417. },
  12418. methods: {
  12419. cacheVNode: function cacheVNode() {
  12420. var ref = this;
  12421. var cache = ref.cache;
  12422. var keys = ref.keys;
  12423. var vnodeToCache = ref.vnodeToCache;
  12424. var keyToCache = ref.keyToCache;
  12425. if (vnodeToCache) {
  12426. var tag = vnodeToCache.tag;
  12427. var componentInstance = vnodeToCache.componentInstance;
  12428. var componentOptions = vnodeToCache.componentOptions;
  12429. cache[keyToCache] = {
  12430. name: getComponentName(componentOptions),
  12431. tag: tag,
  12432. componentInstance: componentInstance,
  12433. };
  12434. keys.push(keyToCache);
  12435. // prune oldest entry
  12436. if (this.max && keys.length > parseInt(this.max)) {
  12437. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  12438. }
  12439. this.vnodeToCache = null;
  12440. }
  12441. }
  12442. },
  12443. created: function created () {
  12444. this.cache = Object.create(null);
  12445. this.keys = [];
  12446. },
  12447. destroyed: function destroyed () {
  12448. for (var key in this.cache) {
  12449. pruneCacheEntry(this.cache, key, this.keys);
  12450. }
  12451. },
  12452. mounted: function mounted () {
  12453. var this$1 = this;
  12454. this.cacheVNode();
  12455. this.$watch('include', function (val) {
  12456. pruneCache(this$1, function (name) { return matches(val, name); });
  12457. });
  12458. this.$watch('exclude', function (val) {
  12459. pruneCache(this$1, function (name) { return !matches(val, name); });
  12460. });
  12461. },
  12462. updated: function updated () {
  12463. this.cacheVNode();
  12464. },
  12465. render: function render () {
  12466. var slot = this.$slots.default;
  12467. var vnode = getFirstComponentChild(slot);
  12468. var componentOptions = vnode && vnode.componentOptions;
  12469. if (componentOptions) {
  12470. // check pattern
  12471. var name = getComponentName(componentOptions);
  12472. var ref = this;
  12473. var include = ref.include;
  12474. var exclude = ref.exclude;
  12475. if (
  12476. // not included
  12477. (include && (!name || !matches(include, name))) ||
  12478. // excluded
  12479. (exclude && name && matches(exclude, name))
  12480. ) {
  12481. return vnode
  12482. }
  12483. var ref$1 = this;
  12484. var cache = ref$1.cache;
  12485. var keys = ref$1.keys;
  12486. var key = vnode.key == null
  12487. // same constructor may get registered as different local components
  12488. // so cid alone is not enough (#3269)
  12489. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  12490. : vnode.key;
  12491. if (cache[key]) {
  12492. vnode.componentInstance = cache[key].componentInstance;
  12493. // make current key freshest
  12494. remove(keys, key);
  12495. keys.push(key);
  12496. } else {
  12497. // delay setting the cache until update
  12498. this.vnodeToCache = vnode;
  12499. this.keyToCache = key;
  12500. }
  12501. vnode.data.keepAlive = true;
  12502. }
  12503. return vnode || (slot && slot[0])
  12504. }
  12505. };
  12506. var builtInComponents = {
  12507. KeepAlive: KeepAlive
  12508. };
  12509. /* */
  12510. function initGlobalAPI (Vue) {
  12511. // config
  12512. var configDef = {};
  12513. configDef.get = function () { return config; };
  12514. if (true) {
  12515. configDef.set = function () {
  12516. warn(
  12517. 'Do not replace the Vue.config object, set individual fields instead.'
  12518. );
  12519. };
  12520. }
  12521. Object.defineProperty(Vue, 'config', configDef);
  12522. // exposed util methods.
  12523. // NOTE: these are not considered part of the public API - avoid relying on
  12524. // them unless you are aware of the risk.
  12525. Vue.util = {
  12526. warn: warn,
  12527. extend: extend,
  12528. mergeOptions: mergeOptions,
  12529. defineReactive: defineReactive$$1
  12530. };
  12531. Vue.set = set;
  12532. Vue.delete = del;
  12533. Vue.nextTick = nextTick;
  12534. // 2.6 explicit observable API
  12535. Vue.observable = function (obj) {
  12536. observe(obj);
  12537. return obj
  12538. };
  12539. Vue.options = Object.create(null);
  12540. ASSET_TYPES.forEach(function (type) {
  12541. Vue.options[type + 's'] = Object.create(null);
  12542. });
  12543. // this is used to identify the "base" constructor to extend all plain-object
  12544. // components with in Weex's multi-instance scenarios.
  12545. Vue.options._base = Vue;
  12546. extend(Vue.options.components, builtInComponents);
  12547. initUse(Vue);
  12548. initMixin$1(Vue);
  12549. initExtend(Vue);
  12550. initAssetRegisters(Vue);
  12551. }
  12552. initGlobalAPI(Vue);
  12553. Object.defineProperty(Vue.prototype, '$isServer', {
  12554. get: isServerRendering
  12555. });
  12556. Object.defineProperty(Vue.prototype, '$ssrContext', {
  12557. get: function get () {
  12558. /* istanbul ignore next */
  12559. return this.$vnode && this.$vnode.ssrContext
  12560. }
  12561. });
  12562. // expose FunctionalRenderContext for ssr runtime helper installation
  12563. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  12564. value: FunctionalRenderContext
  12565. });
  12566. Vue.version = '2.6.14';
  12567. /* */
  12568. // these are reserved for web because they are directly compiled away
  12569. // during template compilation
  12570. var isReservedAttr = makeMap('style,class');
  12571. // attributes that should be using props for binding
  12572. var acceptValue = makeMap('input,textarea,option,select,progress');
  12573. var mustUseProp = function (tag, type, attr) {
  12574. return (
  12575. (attr === 'value' && acceptValue(tag)) && type !== 'button' ||
  12576. (attr === 'selected' && tag === 'option') ||
  12577. (attr === 'checked' && tag === 'input') ||
  12578. (attr === 'muted' && tag === 'video')
  12579. )
  12580. };
  12581. var isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');
  12582. var isValidContentEditableValue = makeMap('events,caret,typing,plaintext-only');
  12583. var convertEnumeratedValue = function (key, value) {
  12584. return isFalsyAttrValue(value) || value === 'false'
  12585. ? 'false'
  12586. // allow arbitrary string value for contenteditable
  12587. : key === 'contenteditable' && isValidContentEditableValue(value)
  12588. ? value
  12589. : 'true'
  12590. };
  12591. var isBooleanAttr = makeMap(
  12592. 'allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +
  12593. 'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +
  12594. 'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +
  12595. 'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +
  12596. 'required,reversed,scoped,seamless,selected,sortable,' +
  12597. 'truespeed,typemustmatch,visible'
  12598. );
  12599. var xlinkNS = 'http://www.w3.org/1999/xlink';
  12600. var isXlink = function (name) {
  12601. return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink'
  12602. };
  12603. var getXlinkProp = function (name) {
  12604. return isXlink(name) ? name.slice(6, name.length) : ''
  12605. };
  12606. var isFalsyAttrValue = function (val) {
  12607. return val == null || val === false
  12608. };
  12609. /* */
  12610. function genClassForVnode (vnode) {
  12611. var data = vnode.data;
  12612. var parentNode = vnode;
  12613. var childNode = vnode;
  12614. while (isDef(childNode.componentInstance)) {
  12615. childNode = childNode.componentInstance._vnode;
  12616. if (childNode && childNode.data) {
  12617. data = mergeClassData(childNode.data, data);
  12618. }
  12619. }
  12620. while (isDef(parentNode = parentNode.parent)) {
  12621. if (parentNode && parentNode.data) {
  12622. data = mergeClassData(data, parentNode.data);
  12623. }
  12624. }
  12625. return renderClass(data.staticClass, data.class)
  12626. }
  12627. function mergeClassData (child, parent) {
  12628. return {
  12629. staticClass: concat(child.staticClass, parent.staticClass),
  12630. class: isDef(child.class)
  12631. ? [child.class, parent.class]
  12632. : parent.class
  12633. }
  12634. }
  12635. function renderClass (
  12636. staticClass,
  12637. dynamicClass
  12638. ) {
  12639. if (isDef(staticClass) || isDef(dynamicClass)) {
  12640. return concat(staticClass, stringifyClass(dynamicClass))
  12641. }
  12642. /* istanbul ignore next */
  12643. return ''
  12644. }
  12645. function concat (a, b) {
  12646. return a ? b ? (a + ' ' + b) : a : (b || '')
  12647. }
  12648. function stringifyClass (value) {
  12649. if (Array.isArray(value)) {
  12650. return stringifyArray(value)
  12651. }
  12652. if (isObject(value)) {
  12653. return stringifyObject(value)
  12654. }
  12655. if (typeof value === 'string') {
  12656. return value
  12657. }
  12658. /* istanbul ignore next */
  12659. return ''
  12660. }
  12661. function stringifyArray (value) {
  12662. var res = '';
  12663. var stringified;
  12664. for (var i = 0, l = value.length; i < l; i++) {
  12665. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  12666. if (res) { res += ' '; }
  12667. res += stringified;
  12668. }
  12669. }
  12670. return res
  12671. }
  12672. function stringifyObject (value) {
  12673. var res = '';
  12674. for (var key in value) {
  12675. if (value[key]) {
  12676. if (res) { res += ' '; }
  12677. res += key;
  12678. }
  12679. }
  12680. return res
  12681. }
  12682. /* */
  12683. var namespaceMap = {
  12684. svg: 'http://www.w3.org/2000/svg',
  12685. math: 'http://www.w3.org/1998/Math/MathML'
  12686. };
  12687. var isHTMLTag = makeMap(
  12688. 'html,body,base,head,link,meta,style,title,' +
  12689. 'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +
  12690. 'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' +
  12691. 'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +
  12692. 's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +
  12693. 'embed,object,param,source,canvas,script,noscript,del,ins,' +
  12694. 'caption,col,colgroup,table,thead,tbody,td,th,tr,' +
  12695. 'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +
  12696. 'output,progress,select,textarea,' +
  12697. 'details,dialog,menu,menuitem,summary,' +
  12698. 'content,element,shadow,template,blockquote,iframe,tfoot'
  12699. );
  12700. // this map is intentionally selective, only covering SVG elements that may
  12701. // contain child elements.
  12702. var isSVG = makeMap(
  12703. 'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +
  12704. 'foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +
  12705. 'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view',
  12706. true
  12707. );
  12708. var isPreTag = function (tag) { return tag === 'pre'; };
  12709. var isReservedTag = function (tag) {
  12710. return isHTMLTag(tag) || isSVG(tag)
  12711. };
  12712. function getTagNamespace (tag) {
  12713. if (isSVG(tag)) {
  12714. return 'svg'
  12715. }
  12716. // basic support for MathML
  12717. // note it doesn't support other MathML elements being component roots
  12718. if (tag === 'math') {
  12719. return 'math'
  12720. }
  12721. }
  12722. var unknownElementCache = Object.create(null);
  12723. function isUnknownElement (tag) {
  12724. /* istanbul ignore if */
  12725. if (!inBrowser) {
  12726. return true
  12727. }
  12728. if (isReservedTag(tag)) {
  12729. return false
  12730. }
  12731. tag = tag.toLowerCase();
  12732. /* istanbul ignore if */
  12733. if (unknownElementCache[tag] != null) {
  12734. return unknownElementCache[tag]
  12735. }
  12736. var el = document.createElement(tag);
  12737. if (tag.indexOf('-') > -1) {
  12738. // http://stackoverflow.com/a/28210364/1070244
  12739. return (unknownElementCache[tag] = (
  12740. el.constructor === window.HTMLUnknownElement ||
  12741. el.constructor === window.HTMLElement
  12742. ))
  12743. } else {
  12744. return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()))
  12745. }
  12746. }
  12747. var isTextInputType = makeMap('text,number,password,search,email,tel,url');
  12748. /* */
  12749. /**
  12750. * Query an element selector if it's not an element already.
  12751. */
  12752. function query (el) {
  12753. if (typeof el === 'string') {
  12754. var selected = document.querySelector(el);
  12755. if (!selected) {
  12756. true && warn(
  12757. 'Cannot find element: ' + el
  12758. );
  12759. return document.createElement('div')
  12760. }
  12761. return selected
  12762. } else {
  12763. return el
  12764. }
  12765. }
  12766. /* */
  12767. function createElement$1 (tagName, vnode) {
  12768. var elm = document.createElement(tagName);
  12769. if (tagName !== 'select') {
  12770. return elm
  12771. }
  12772. // false or null will remove the attribute but undefined will not
  12773. if (vnode.data && vnode.data.attrs && vnode.data.attrs.multiple !== undefined) {
  12774. elm.setAttribute('multiple', 'multiple');
  12775. }
  12776. return elm
  12777. }
  12778. function createElementNS (namespace, tagName) {
  12779. return document.createElementNS(namespaceMap[namespace], tagName)
  12780. }
  12781. function createTextNode (text) {
  12782. return document.createTextNode(text)
  12783. }
  12784. function createComment (text) {
  12785. return document.createComment(text)
  12786. }
  12787. function insertBefore (parentNode, newNode, referenceNode) {
  12788. parentNode.insertBefore(newNode, referenceNode);
  12789. }
  12790. function removeChild (node, child) {
  12791. node.removeChild(child);
  12792. }
  12793. function appendChild (node, child) {
  12794. node.appendChild(child);
  12795. }
  12796. function parentNode (node) {
  12797. return node.parentNode
  12798. }
  12799. function nextSibling (node) {
  12800. return node.nextSibling
  12801. }
  12802. function tagName (node) {
  12803. return node.tagName
  12804. }
  12805. function setTextContent (node, text) {
  12806. node.textContent = text;
  12807. }
  12808. function setStyleScope (node, scopeId) {
  12809. node.setAttribute(scopeId, '');
  12810. }
  12811. var nodeOps = /*#__PURE__*/Object.freeze({
  12812. createElement: createElement$1,
  12813. createElementNS: createElementNS,
  12814. createTextNode: createTextNode,
  12815. createComment: createComment,
  12816. insertBefore: insertBefore,
  12817. removeChild: removeChild,
  12818. appendChild: appendChild,
  12819. parentNode: parentNode,
  12820. nextSibling: nextSibling,
  12821. tagName: tagName,
  12822. setTextContent: setTextContent,
  12823. setStyleScope: setStyleScope
  12824. });
  12825. /* */
  12826. var ref = {
  12827. create: function create (_, vnode) {
  12828. registerRef(vnode);
  12829. },
  12830. update: function update (oldVnode, vnode) {
  12831. if (oldVnode.data.ref !== vnode.data.ref) {
  12832. registerRef(oldVnode, true);
  12833. registerRef(vnode);
  12834. }
  12835. },
  12836. destroy: function destroy (vnode) {
  12837. registerRef(vnode, true);
  12838. }
  12839. };
  12840. function registerRef (vnode, isRemoval) {
  12841. var key = vnode.data.ref;
  12842. if (!isDef(key)) { return }
  12843. var vm = vnode.context;
  12844. var ref = vnode.componentInstance || vnode.elm;
  12845. var refs = vm.$refs;
  12846. if (isRemoval) {
  12847. if (Array.isArray(refs[key])) {
  12848. remove(refs[key], ref);
  12849. } else if (refs[key] === ref) {
  12850. refs[key] = undefined;
  12851. }
  12852. } else {
  12853. if (vnode.data.refInFor) {
  12854. if (!Array.isArray(refs[key])) {
  12855. refs[key] = [ref];
  12856. } else if (refs[key].indexOf(ref) < 0) {
  12857. // $flow-disable-line
  12858. refs[key].push(ref);
  12859. }
  12860. } else {
  12861. refs[key] = ref;
  12862. }
  12863. }
  12864. }
  12865. /**
  12866. * Virtual DOM patching algorithm based on Snabbdom by
  12867. * Simon Friis Vindum (@paldepind)
  12868. * Licensed under the MIT License
  12869. * https://github.com/paldepind/snabbdom/blob/master/LICENSE
  12870. *
  12871. * modified by Evan You (@yyx990803)
  12872. *
  12873. * Not type-checking this because this file is perf-critical and the cost
  12874. * of making flow understand it is not worth it.
  12875. */
  12876. var emptyNode = new VNode('', {}, []);
  12877. var hooks = ['create', 'activate', 'update', 'remove', 'destroy'];
  12878. function sameVnode (a, b) {
  12879. return (
  12880. a.key === b.key &&
  12881. a.asyncFactory === b.asyncFactory && (
  12882. (
  12883. a.tag === b.tag &&
  12884. a.isComment === b.isComment &&
  12885. isDef(a.data) === isDef(b.data) &&
  12886. sameInputType(a, b)
  12887. ) || (
  12888. isTrue(a.isAsyncPlaceholder) &&
  12889. isUndef(b.asyncFactory.error)
  12890. )
  12891. )
  12892. )
  12893. }
  12894. function sameInputType (a, b) {
  12895. if (a.tag !== 'input') { return true }
  12896. var i;
  12897. var typeA = isDef(i = a.data) && isDef(i = i.attrs) && i.type;
  12898. var typeB = isDef(i = b.data) && isDef(i = i.attrs) && i.type;
  12899. return typeA === typeB || isTextInputType(typeA) && isTextInputType(typeB)
  12900. }
  12901. function createKeyToOldIdx (children, beginIdx, endIdx) {
  12902. var i, key;
  12903. var map = {};
  12904. for (i = beginIdx; i <= endIdx; ++i) {
  12905. key = children[i].key;
  12906. if (isDef(key)) { map[key] = i; }
  12907. }
  12908. return map
  12909. }
  12910. function createPatchFunction (backend) {
  12911. var i, j;
  12912. var cbs = {};
  12913. var modules = backend.modules;
  12914. var nodeOps = backend.nodeOps;
  12915. for (i = 0; i < hooks.length; ++i) {
  12916. cbs[hooks[i]] = [];
  12917. for (j = 0; j < modules.length; ++j) {
  12918. if (isDef(modules[j][hooks[i]])) {
  12919. cbs[hooks[i]].push(modules[j][hooks[i]]);
  12920. }
  12921. }
  12922. }
  12923. function emptyNodeAt (elm) {
  12924. return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm)
  12925. }
  12926. function createRmCb (childElm, listeners) {
  12927. function remove$$1 () {
  12928. if (--remove$$1.listeners === 0) {
  12929. removeNode(childElm);
  12930. }
  12931. }
  12932. remove$$1.listeners = listeners;
  12933. return remove$$1
  12934. }
  12935. function removeNode (el) {
  12936. var parent = nodeOps.parentNode(el);
  12937. // element may have already been removed due to v-html / v-text
  12938. if (isDef(parent)) {
  12939. nodeOps.removeChild(parent, el);
  12940. }
  12941. }
  12942. function isUnknownElement$$1 (vnode, inVPre) {
  12943. return (
  12944. !inVPre &&
  12945. !vnode.ns &&
  12946. !(
  12947. config.ignoredElements.length &&
  12948. config.ignoredElements.some(function (ignore) {
  12949. return isRegExp(ignore)
  12950. ? ignore.test(vnode.tag)
  12951. : ignore === vnode.tag
  12952. })
  12953. ) &&
  12954. config.isUnknownElement(vnode.tag)
  12955. )
  12956. }
  12957. var creatingElmInVPre = 0;
  12958. function createElm (
  12959. vnode,
  12960. insertedVnodeQueue,
  12961. parentElm,
  12962. refElm,
  12963. nested,
  12964. ownerArray,
  12965. index
  12966. ) {
  12967. if (isDef(vnode.elm) && isDef(ownerArray)) {
  12968. // This vnode was used in a previous render!
  12969. // now it's used as a new node, overwriting its elm would cause
  12970. // potential patch errors down the road when it's used as an insertion
  12971. // reference node. Instead, we clone the node on-demand before creating
  12972. // associated DOM element for it.
  12973. vnode = ownerArray[index] = cloneVNode(vnode);
  12974. }
  12975. vnode.isRootInsert = !nested; // for transition enter check
  12976. if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {
  12977. return
  12978. }
  12979. var data = vnode.data;
  12980. var children = vnode.children;
  12981. var tag = vnode.tag;
  12982. if (isDef(tag)) {
  12983. if (true) {
  12984. if (data && data.pre) {
  12985. creatingElmInVPre++;
  12986. }
  12987. if (isUnknownElement$$1(vnode, creatingElmInVPre)) {
  12988. warn(
  12989. 'Unknown custom element: <' + tag + '> - did you ' +
  12990. 'register the component correctly? For recursive components, ' +
  12991. 'make sure to provide the "name" option.',
  12992. vnode.context
  12993. );
  12994. }
  12995. }
  12996. vnode.elm = vnode.ns
  12997. ? nodeOps.createElementNS(vnode.ns, tag)
  12998. : nodeOps.createElement(tag, vnode);
  12999. setScope(vnode);
  13000. /* istanbul ignore if */
  13001. {
  13002. createChildren(vnode, children, insertedVnodeQueue);
  13003. if (isDef(data)) {
  13004. invokeCreateHooks(vnode, insertedVnodeQueue);
  13005. }
  13006. insert(parentElm, vnode.elm, refElm);
  13007. }
  13008. if ( true && data && data.pre) {
  13009. creatingElmInVPre--;
  13010. }
  13011. } else if (isTrue(vnode.isComment)) {
  13012. vnode.elm = nodeOps.createComment(vnode.text);
  13013. insert(parentElm, vnode.elm, refElm);
  13014. } else {
  13015. vnode.elm = nodeOps.createTextNode(vnode.text);
  13016. insert(parentElm, vnode.elm, refElm);
  13017. }
  13018. }
  13019. function createComponent (vnode, insertedVnodeQueue, parentElm, refElm) {
  13020. var i = vnode.data;
  13021. if (isDef(i)) {
  13022. var isReactivated = isDef(vnode.componentInstance) && i.keepAlive;
  13023. if (isDef(i = i.hook) && isDef(i = i.init)) {
  13024. i(vnode, false /* hydrating */);
  13025. }
  13026. // after calling the init hook, if the vnode is a child component
  13027. // it should've created a child instance and mounted it. the child
  13028. // component also has set the placeholder vnode's elm.
  13029. // in that case we can just return the element and be done.
  13030. if (isDef(vnode.componentInstance)) {
  13031. initComponent(vnode, insertedVnodeQueue);
  13032. insert(parentElm, vnode.elm, refElm);
  13033. if (isTrue(isReactivated)) {
  13034. reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);
  13035. }
  13036. return true
  13037. }
  13038. }
  13039. }
  13040. function initComponent (vnode, insertedVnodeQueue) {
  13041. if (isDef(vnode.data.pendingInsert)) {
  13042. insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert);
  13043. vnode.data.pendingInsert = null;
  13044. }
  13045. vnode.elm = vnode.componentInstance.$el;
  13046. if (isPatchable(vnode)) {
  13047. invokeCreateHooks(vnode, insertedVnodeQueue);
  13048. setScope(vnode);
  13049. } else {
  13050. // empty component root.
  13051. // skip all element-related modules except for ref (#3455)
  13052. registerRef(vnode);
  13053. // make sure to invoke the insert hook
  13054. insertedVnodeQueue.push(vnode);
  13055. }
  13056. }
  13057. function reactivateComponent (vnode, insertedVnodeQueue, parentElm, refElm) {
  13058. var i;
  13059. // hack for #4339: a reactivated component with inner transition
  13060. // does not trigger because the inner node's created hooks are not called
  13061. // again. It's not ideal to involve module-specific logic in here but
  13062. // there doesn't seem to be a better way to do it.
  13063. var innerNode = vnode;
  13064. while (innerNode.componentInstance) {
  13065. innerNode = innerNode.componentInstance._vnode;
  13066. if (isDef(i = innerNode.data) && isDef(i = i.transition)) {
  13067. for (i = 0; i < cbs.activate.length; ++i) {
  13068. cbs.activate[i](emptyNode, innerNode);
  13069. }
  13070. insertedVnodeQueue.push(innerNode);
  13071. break
  13072. }
  13073. }
  13074. // unlike a newly created component,
  13075. // a reactivated keep-alive component doesn't insert itself
  13076. insert(parentElm, vnode.elm, refElm);
  13077. }
  13078. function insert (parent, elm, ref$$1) {
  13079. if (isDef(parent)) {
  13080. if (isDef(ref$$1)) {
  13081. if (nodeOps.parentNode(ref$$1) === parent) {
  13082. nodeOps.insertBefore(parent, elm, ref$$1);
  13083. }
  13084. } else {
  13085. nodeOps.appendChild(parent, elm);
  13086. }
  13087. }
  13088. }
  13089. function createChildren (vnode, children, insertedVnodeQueue) {
  13090. if (Array.isArray(children)) {
  13091. if (true) {
  13092. checkDuplicateKeys(children);
  13093. }
  13094. for (var i = 0; i < children.length; ++i) {
  13095. createElm(children[i], insertedVnodeQueue, vnode.elm, null, true, children, i);
  13096. }
  13097. } else if (isPrimitive(vnode.text)) {
  13098. nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(String(vnode.text)));
  13099. }
  13100. }
  13101. function isPatchable (vnode) {
  13102. while (vnode.componentInstance) {
  13103. vnode = vnode.componentInstance._vnode;
  13104. }
  13105. return isDef(vnode.tag)
  13106. }
  13107. function invokeCreateHooks (vnode, insertedVnodeQueue) {
  13108. for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {
  13109. cbs.create[i$1](emptyNode, vnode);
  13110. }
  13111. i = vnode.data.hook; // Reuse variable
  13112. if (isDef(i)) {
  13113. if (isDef(i.create)) { i.create(emptyNode, vnode); }
  13114. if (isDef(i.insert)) { insertedVnodeQueue.push(vnode); }
  13115. }
  13116. }
  13117. // set scope id attribute for scoped CSS.
  13118. // this is implemented as a special case to avoid the overhead
  13119. // of going through the normal attribute patching process.
  13120. function setScope (vnode) {
  13121. var i;
  13122. if (isDef(i = vnode.fnScopeId)) {
  13123. nodeOps.setStyleScope(vnode.elm, i);
  13124. } else {
  13125. var ancestor = vnode;
  13126. while (ancestor) {
  13127. if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {
  13128. nodeOps.setStyleScope(vnode.elm, i);
  13129. }
  13130. ancestor = ancestor.parent;
  13131. }
  13132. }
  13133. // for slot content they should also get the scopeId from the host instance.
  13134. if (isDef(i = activeInstance) &&
  13135. i !== vnode.context &&
  13136. i !== vnode.fnContext &&
  13137. isDef(i = i.$options._scopeId)
  13138. ) {
  13139. nodeOps.setStyleScope(vnode.elm, i);
  13140. }
  13141. }
  13142. function addVnodes (parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {
  13143. for (; startIdx <= endIdx; ++startIdx) {
  13144. createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm, false, vnodes, startIdx);
  13145. }
  13146. }
  13147. function invokeDestroyHook (vnode) {
  13148. var i, j;
  13149. var data = vnode.data;
  13150. if (isDef(data)) {
  13151. if (isDef(i = data.hook) && isDef(i = i.destroy)) { i(vnode); }
  13152. for (i = 0; i < cbs.destroy.length; ++i) { cbs.destroy[i](vnode); }
  13153. }
  13154. if (isDef(i = vnode.children)) {
  13155. for (j = 0; j < vnode.children.length; ++j) {
  13156. invokeDestroyHook(vnode.children[j]);
  13157. }
  13158. }
  13159. }
  13160. function removeVnodes (vnodes, startIdx, endIdx) {
  13161. for (; startIdx <= endIdx; ++startIdx) {
  13162. var ch = vnodes[startIdx];
  13163. if (isDef(ch)) {
  13164. if (isDef(ch.tag)) {
  13165. removeAndInvokeRemoveHook(ch);
  13166. invokeDestroyHook(ch);
  13167. } else { // Text node
  13168. removeNode(ch.elm);
  13169. }
  13170. }
  13171. }
  13172. }
  13173. function removeAndInvokeRemoveHook (vnode, rm) {
  13174. if (isDef(rm) || isDef(vnode.data)) {
  13175. var i;
  13176. var listeners = cbs.remove.length + 1;
  13177. if (isDef(rm)) {
  13178. // we have a recursively passed down rm callback
  13179. // increase the listeners count
  13180. rm.listeners += listeners;
  13181. } else {
  13182. // directly removing
  13183. rm = createRmCb(vnode.elm, listeners);
  13184. }
  13185. // recursively invoke hooks on child component root node
  13186. if (isDef(i = vnode.componentInstance) && isDef(i = i._vnode) && isDef(i.data)) {
  13187. removeAndInvokeRemoveHook(i, rm);
  13188. }
  13189. for (i = 0; i < cbs.remove.length; ++i) {
  13190. cbs.remove[i](vnode, rm);
  13191. }
  13192. if (isDef(i = vnode.data.hook) && isDef(i = i.remove)) {
  13193. i(vnode, rm);
  13194. } else {
  13195. rm();
  13196. }
  13197. } else {
  13198. removeNode(vnode.elm);
  13199. }
  13200. }
  13201. function updateChildren (parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {
  13202. var oldStartIdx = 0;
  13203. var newStartIdx = 0;
  13204. var oldEndIdx = oldCh.length - 1;
  13205. var oldStartVnode = oldCh[0];
  13206. var oldEndVnode = oldCh[oldEndIdx];
  13207. var newEndIdx = newCh.length - 1;
  13208. var newStartVnode = newCh[0];
  13209. var newEndVnode = newCh[newEndIdx];
  13210. var oldKeyToIdx, idxInOld, vnodeToMove, refElm;
  13211. // removeOnly is a special flag used only by <transition-group>
  13212. // to ensure removed elements stay in correct relative positions
  13213. // during leaving transitions
  13214. var canMove = !removeOnly;
  13215. if (true) {
  13216. checkDuplicateKeys(newCh);
  13217. }
  13218. while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
  13219. if (isUndef(oldStartVnode)) {
  13220. oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left
  13221. } else if (isUndef(oldEndVnode)) {
  13222. oldEndVnode = oldCh[--oldEndIdx];
  13223. } else if (sameVnode(oldStartVnode, newStartVnode)) {
  13224. patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);
  13225. oldStartVnode = oldCh[++oldStartIdx];
  13226. newStartVnode = newCh[++newStartIdx];
  13227. } else if (sameVnode(oldEndVnode, newEndVnode)) {
  13228. patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);
  13229. oldEndVnode = oldCh[--oldEndIdx];
  13230. newEndVnode = newCh[--newEndIdx];
  13231. } else if (sameVnode(oldStartVnode, newEndVnode)) { // Vnode moved right
  13232. patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);
  13233. canMove && nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));
  13234. oldStartVnode = oldCh[++oldStartIdx];
  13235. newEndVnode = newCh[--newEndIdx];
  13236. } else if (sameVnode(oldEndVnode, newStartVnode)) { // Vnode moved left
  13237. patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);
  13238. canMove && nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);
  13239. oldEndVnode = oldCh[--oldEndIdx];
  13240. newStartVnode = newCh[++newStartIdx];
  13241. } else {
  13242. if (isUndef(oldKeyToIdx)) { oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx); }
  13243. idxInOld = isDef(newStartVnode.key)
  13244. ? oldKeyToIdx[newStartVnode.key]
  13245. : findIdxInOld(newStartVnode, oldCh, oldStartIdx, oldEndIdx);
  13246. if (isUndef(idxInOld)) { // New element
  13247. createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);
  13248. } else {
  13249. vnodeToMove = oldCh[idxInOld];
  13250. if (sameVnode(vnodeToMove, newStartVnode)) {
  13251. patchVnode(vnodeToMove, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);
  13252. oldCh[idxInOld] = undefined;
  13253. canMove && nodeOps.insertBefore(parentElm, vnodeToMove.elm, oldStartVnode.elm);
  13254. } else {
  13255. // same key but different element. treat as new element
  13256. createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);
  13257. }
  13258. }
  13259. newStartVnode = newCh[++newStartIdx];
  13260. }
  13261. }
  13262. if (oldStartIdx > oldEndIdx) {
  13263. refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;
  13264. addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);
  13265. } else if (newStartIdx > newEndIdx) {
  13266. removeVnodes(oldCh, oldStartIdx, oldEndIdx);
  13267. }
  13268. }
  13269. function checkDuplicateKeys (children) {
  13270. var seenKeys = {};
  13271. for (var i = 0; i < children.length; i++) {
  13272. var vnode = children[i];
  13273. var key = vnode.key;
  13274. if (isDef(key)) {
  13275. if (seenKeys[key]) {
  13276. warn(
  13277. ("Duplicate keys detected: '" + key + "'. This may cause an update error."),
  13278. vnode.context
  13279. );
  13280. } else {
  13281. seenKeys[key] = true;
  13282. }
  13283. }
  13284. }
  13285. }
  13286. function findIdxInOld (node, oldCh, start, end) {
  13287. for (var i = start; i < end; i++) {
  13288. var c = oldCh[i];
  13289. if (isDef(c) && sameVnode(node, c)) { return i }
  13290. }
  13291. }
  13292. function patchVnode (
  13293. oldVnode,
  13294. vnode,
  13295. insertedVnodeQueue,
  13296. ownerArray,
  13297. index,
  13298. removeOnly
  13299. ) {
  13300. if (oldVnode === vnode) {
  13301. return
  13302. }
  13303. if (isDef(vnode.elm) && isDef(ownerArray)) {
  13304. // clone reused vnode
  13305. vnode = ownerArray[index] = cloneVNode(vnode);
  13306. }
  13307. var elm = vnode.elm = oldVnode.elm;
  13308. if (isTrue(oldVnode.isAsyncPlaceholder)) {
  13309. if (isDef(vnode.asyncFactory.resolved)) {
  13310. hydrate(oldVnode.elm, vnode, insertedVnodeQueue);
  13311. } else {
  13312. vnode.isAsyncPlaceholder = true;
  13313. }
  13314. return
  13315. }
  13316. // reuse element for static trees.
  13317. // note we only do this if the vnode is cloned -
  13318. // if the new node is not cloned it means the render functions have been
  13319. // reset by the hot-reload-api and we need to do a proper re-render.
  13320. if (isTrue(vnode.isStatic) &&
  13321. isTrue(oldVnode.isStatic) &&
  13322. vnode.key === oldVnode.key &&
  13323. (isTrue(vnode.isCloned) || isTrue(vnode.isOnce))
  13324. ) {
  13325. vnode.componentInstance = oldVnode.componentInstance;
  13326. return
  13327. }
  13328. var i;
  13329. var data = vnode.data;
  13330. if (isDef(data) && isDef(i = data.hook) && isDef(i = i.prepatch)) {
  13331. i(oldVnode, vnode);
  13332. }
  13333. var oldCh = oldVnode.children;
  13334. var ch = vnode.children;
  13335. if (isDef(data) && isPatchable(vnode)) {
  13336. for (i = 0; i < cbs.update.length; ++i) { cbs.update[i](oldVnode, vnode); }
  13337. if (isDef(i = data.hook) && isDef(i = i.update)) { i(oldVnode, vnode); }
  13338. }
  13339. if (isUndef(vnode.text)) {
  13340. if (isDef(oldCh) && isDef(ch)) {
  13341. if (oldCh !== ch) { updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly); }
  13342. } else if (isDef(ch)) {
  13343. if (true) {
  13344. checkDuplicateKeys(ch);
  13345. }
  13346. if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); }
  13347. addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);
  13348. } else if (isDef(oldCh)) {
  13349. removeVnodes(oldCh, 0, oldCh.length - 1);
  13350. } else if (isDef(oldVnode.text)) {
  13351. nodeOps.setTextContent(elm, '');
  13352. }
  13353. } else if (oldVnode.text !== vnode.text) {
  13354. nodeOps.setTextContent(elm, vnode.text);
  13355. }
  13356. if (isDef(data)) {
  13357. if (isDef(i = data.hook) && isDef(i = i.postpatch)) { i(oldVnode, vnode); }
  13358. }
  13359. }
  13360. function invokeInsertHook (vnode, queue, initial) {
  13361. // delay insert hooks for component root nodes, invoke them after the
  13362. // element is really inserted
  13363. if (isTrue(initial) && isDef(vnode.parent)) {
  13364. vnode.parent.data.pendingInsert = queue;
  13365. } else {
  13366. for (var i = 0; i < queue.length; ++i) {
  13367. queue[i].data.hook.insert(queue[i]);
  13368. }
  13369. }
  13370. }
  13371. var hydrationBailed = false;
  13372. // list of modules that can skip create hook during hydration because they
  13373. // are already rendered on the client or has no need for initialization
  13374. // Note: style is excluded because it relies on initial clone for future
  13375. // deep updates (#7063).
  13376. var isRenderedModule = makeMap('attrs,class,staticClass,staticStyle,key');
  13377. // Note: this is a browser-only function so we can assume elms are DOM nodes.
  13378. function hydrate (elm, vnode, insertedVnodeQueue, inVPre) {
  13379. var i;
  13380. var tag = vnode.tag;
  13381. var data = vnode.data;
  13382. var children = vnode.children;
  13383. inVPre = inVPre || (data && data.pre);
  13384. vnode.elm = elm;
  13385. if (isTrue(vnode.isComment) && isDef(vnode.asyncFactory)) {
  13386. vnode.isAsyncPlaceholder = true;
  13387. return true
  13388. }
  13389. // assert node match
  13390. if (true) {
  13391. if (!assertNodeMatch(elm, vnode, inVPre)) {
  13392. return false
  13393. }
  13394. }
  13395. if (isDef(data)) {
  13396. if (isDef(i = data.hook) && isDef(i = i.init)) { i(vnode, true /* hydrating */); }
  13397. if (isDef(i = vnode.componentInstance)) {
  13398. // child component. it should have hydrated its own tree.
  13399. initComponent(vnode, insertedVnodeQueue);
  13400. return true
  13401. }
  13402. }
  13403. if (isDef(tag)) {
  13404. if (isDef(children)) {
  13405. // empty element, allow client to pick up and populate children
  13406. if (!elm.hasChildNodes()) {
  13407. createChildren(vnode, children, insertedVnodeQueue);
  13408. } else {
  13409. // v-html and domProps: innerHTML
  13410. if (isDef(i = data) && isDef(i = i.domProps) && isDef(i = i.innerHTML)) {
  13411. if (i !== elm.innerHTML) {
  13412. /* istanbul ignore if */
  13413. if ( true &&
  13414. typeof console !== 'undefined' &&
  13415. !hydrationBailed
  13416. ) {
  13417. hydrationBailed = true;
  13418. console.warn('Parent: ', elm);
  13419. console.warn('server innerHTML: ', i);
  13420. console.warn('client innerHTML: ', elm.innerHTML);
  13421. }
  13422. return false
  13423. }
  13424. } else {
  13425. // iterate and compare children lists
  13426. var childrenMatch = true;
  13427. var childNode = elm.firstChild;
  13428. for (var i$1 = 0; i$1 < children.length; i$1++) {
  13429. if (!childNode || !hydrate(childNode, children[i$1], insertedVnodeQueue, inVPre)) {
  13430. childrenMatch = false;
  13431. break
  13432. }
  13433. childNode = childNode.nextSibling;
  13434. }
  13435. // if childNode is not null, it means the actual childNodes list is
  13436. // longer than the virtual children list.
  13437. if (!childrenMatch || childNode) {
  13438. /* istanbul ignore if */
  13439. if ( true &&
  13440. typeof console !== 'undefined' &&
  13441. !hydrationBailed
  13442. ) {
  13443. hydrationBailed = true;
  13444. console.warn('Parent: ', elm);
  13445. console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);
  13446. }
  13447. return false
  13448. }
  13449. }
  13450. }
  13451. }
  13452. if (isDef(data)) {
  13453. var fullInvoke = false;
  13454. for (var key in data) {
  13455. if (!isRenderedModule(key)) {
  13456. fullInvoke = true;
  13457. invokeCreateHooks(vnode, insertedVnodeQueue);
  13458. break
  13459. }
  13460. }
  13461. if (!fullInvoke && data['class']) {
  13462. // ensure collecting deps for deep class bindings for future updates
  13463. traverse(data['class']);
  13464. }
  13465. }
  13466. } else if (elm.data !== vnode.text) {
  13467. elm.data = vnode.text;
  13468. }
  13469. return true
  13470. }
  13471. function assertNodeMatch (node, vnode, inVPre) {
  13472. if (isDef(vnode.tag)) {
  13473. return vnode.tag.indexOf('vue-component') === 0 || (
  13474. !isUnknownElement$$1(vnode, inVPre) &&
  13475. vnode.tag.toLowerCase() === (node.tagName && node.tagName.toLowerCase())
  13476. )
  13477. } else {
  13478. return node.nodeType === (vnode.isComment ? 8 : 3)
  13479. }
  13480. }
  13481. return function patch (oldVnode, vnode, hydrating, removeOnly) {
  13482. if (isUndef(vnode)) {
  13483. if (isDef(oldVnode)) { invokeDestroyHook(oldVnode); }
  13484. return
  13485. }
  13486. var isInitialPatch = false;
  13487. var insertedVnodeQueue = [];
  13488. if (isUndef(oldVnode)) {
  13489. // empty mount (likely as component), create new root element
  13490. isInitialPatch = true;
  13491. createElm(vnode, insertedVnodeQueue);
  13492. } else {
  13493. var isRealElement = isDef(oldVnode.nodeType);
  13494. if (!isRealElement && sameVnode(oldVnode, vnode)) {
  13495. // patch existing root node
  13496. patchVnode(oldVnode, vnode, insertedVnodeQueue, null, null, removeOnly);
  13497. } else {
  13498. if (isRealElement) {
  13499. // mounting to a real element
  13500. // check if this is server-rendered content and if we can perform
  13501. // a successful hydration.
  13502. if (oldVnode.nodeType === 1 && oldVnode.hasAttribute(SSR_ATTR)) {
  13503. oldVnode.removeAttribute(SSR_ATTR);
  13504. hydrating = true;
  13505. }
  13506. if (isTrue(hydrating)) {
  13507. if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {
  13508. invokeInsertHook(vnode, insertedVnodeQueue, true);
  13509. return oldVnode
  13510. } else if (true) {
  13511. warn(
  13512. 'The client-side rendered virtual DOM tree is not matching ' +
  13513. 'server-rendered content. This is likely caused by incorrect ' +
  13514. 'HTML markup, for example nesting block-level elements inside ' +
  13515. '<p>, or missing <tbody>. Bailing hydration and performing ' +
  13516. 'full client-side render.'
  13517. );
  13518. }
  13519. }
  13520. // either not server-rendered, or hydration failed.
  13521. // create an empty node and replace it
  13522. oldVnode = emptyNodeAt(oldVnode);
  13523. }
  13524. // replacing existing element
  13525. var oldElm = oldVnode.elm;
  13526. var parentElm = nodeOps.parentNode(oldElm);
  13527. // create new node
  13528. createElm(
  13529. vnode,
  13530. insertedVnodeQueue,
  13531. // extremely rare edge case: do not insert if old element is in a
  13532. // leaving transition. Only happens when combining transition +
  13533. // keep-alive + HOCs. (#4590)
  13534. oldElm._leaveCb ? null : parentElm,
  13535. nodeOps.nextSibling(oldElm)
  13536. );
  13537. // update parent placeholder node element, recursively
  13538. if (isDef(vnode.parent)) {
  13539. var ancestor = vnode.parent;
  13540. var patchable = isPatchable(vnode);
  13541. while (ancestor) {
  13542. for (var i = 0; i < cbs.destroy.length; ++i) {
  13543. cbs.destroy[i](ancestor);
  13544. }
  13545. ancestor.elm = vnode.elm;
  13546. if (patchable) {
  13547. for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {
  13548. cbs.create[i$1](emptyNode, ancestor);
  13549. }
  13550. // #6513
  13551. // invoke insert hooks that may have been merged by create hooks.
  13552. // e.g. for directives that uses the "inserted" hook.
  13553. var insert = ancestor.data.hook.insert;
  13554. if (insert.merged) {
  13555. // start at index 1 to avoid re-invoking component mounted hook
  13556. for (var i$2 = 1; i$2 < insert.fns.length; i$2++) {
  13557. insert.fns[i$2]();
  13558. }
  13559. }
  13560. } else {
  13561. registerRef(ancestor);
  13562. }
  13563. ancestor = ancestor.parent;
  13564. }
  13565. }
  13566. // destroy old node
  13567. if (isDef(parentElm)) {
  13568. removeVnodes([oldVnode], 0, 0);
  13569. } else if (isDef(oldVnode.tag)) {
  13570. invokeDestroyHook(oldVnode);
  13571. }
  13572. }
  13573. }
  13574. invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);
  13575. return vnode.elm
  13576. }
  13577. }
  13578. /* */
  13579. var directives = {
  13580. create: updateDirectives,
  13581. update: updateDirectives,
  13582. destroy: function unbindDirectives (vnode) {
  13583. updateDirectives(vnode, emptyNode);
  13584. }
  13585. };
  13586. function updateDirectives (oldVnode, vnode) {
  13587. if (oldVnode.data.directives || vnode.data.directives) {
  13588. _update(oldVnode, vnode);
  13589. }
  13590. }
  13591. function _update (oldVnode, vnode) {
  13592. var isCreate = oldVnode === emptyNode;
  13593. var isDestroy = vnode === emptyNode;
  13594. var oldDirs = normalizeDirectives$1(oldVnode.data.directives, oldVnode.context);
  13595. var newDirs = normalizeDirectives$1(vnode.data.directives, vnode.context);
  13596. var dirsWithInsert = [];
  13597. var dirsWithPostpatch = [];
  13598. var key, oldDir, dir;
  13599. for (key in newDirs) {
  13600. oldDir = oldDirs[key];
  13601. dir = newDirs[key];
  13602. if (!oldDir) {
  13603. // new directive, bind
  13604. callHook$1(dir, 'bind', vnode, oldVnode);
  13605. if (dir.def && dir.def.inserted) {
  13606. dirsWithInsert.push(dir);
  13607. }
  13608. } else {
  13609. // existing directive, update
  13610. dir.oldValue = oldDir.value;
  13611. dir.oldArg = oldDir.arg;
  13612. callHook$1(dir, 'update', vnode, oldVnode);
  13613. if (dir.def && dir.def.componentUpdated) {
  13614. dirsWithPostpatch.push(dir);
  13615. }
  13616. }
  13617. }
  13618. if (dirsWithInsert.length) {
  13619. var callInsert = function () {
  13620. for (var i = 0; i < dirsWithInsert.length; i++) {
  13621. callHook$1(dirsWithInsert[i], 'inserted', vnode, oldVnode);
  13622. }
  13623. };
  13624. if (isCreate) {
  13625. mergeVNodeHook(vnode, 'insert', callInsert);
  13626. } else {
  13627. callInsert();
  13628. }
  13629. }
  13630. if (dirsWithPostpatch.length) {
  13631. mergeVNodeHook(vnode, 'postpatch', function () {
  13632. for (var i = 0; i < dirsWithPostpatch.length; i++) {
  13633. callHook$1(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);
  13634. }
  13635. });
  13636. }
  13637. if (!isCreate) {
  13638. for (key in oldDirs) {
  13639. if (!newDirs[key]) {
  13640. // no longer present, unbind
  13641. callHook$1(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy);
  13642. }
  13643. }
  13644. }
  13645. }
  13646. var emptyModifiers = Object.create(null);
  13647. function normalizeDirectives$1 (
  13648. dirs,
  13649. vm
  13650. ) {
  13651. var res = Object.create(null);
  13652. if (!dirs) {
  13653. // $flow-disable-line
  13654. return res
  13655. }
  13656. var i, dir;
  13657. for (i = 0; i < dirs.length; i++) {
  13658. dir = dirs[i];
  13659. if (!dir.modifiers) {
  13660. // $flow-disable-line
  13661. dir.modifiers = emptyModifiers;
  13662. }
  13663. res[getRawDirName(dir)] = dir;
  13664. dir.def = resolveAsset(vm.$options, 'directives', dir.name, true);
  13665. }
  13666. // $flow-disable-line
  13667. return res
  13668. }
  13669. function getRawDirName (dir) {
  13670. return dir.rawName || ((dir.name) + "." + (Object.keys(dir.modifiers || {}).join('.')))
  13671. }
  13672. function callHook$1 (dir, hook, vnode, oldVnode, isDestroy) {
  13673. var fn = dir.def && dir.def[hook];
  13674. if (fn) {
  13675. try {
  13676. fn(vnode.elm, dir, vnode, oldVnode, isDestroy);
  13677. } catch (e) {
  13678. handleError(e, vnode.context, ("directive " + (dir.name) + " " + hook + " hook"));
  13679. }
  13680. }
  13681. }
  13682. var baseModules = [
  13683. ref,
  13684. directives
  13685. ];
  13686. /* */
  13687. function updateAttrs (oldVnode, vnode) {
  13688. var opts = vnode.componentOptions;
  13689. if (isDef(opts) && opts.Ctor.options.inheritAttrs === false) {
  13690. return
  13691. }
  13692. if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) {
  13693. return
  13694. }
  13695. var key, cur, old;
  13696. var elm = vnode.elm;
  13697. var oldAttrs = oldVnode.data.attrs || {};
  13698. var attrs = vnode.data.attrs || {};
  13699. // clone observed objects, as the user probably wants to mutate it
  13700. if (isDef(attrs.__ob__)) {
  13701. attrs = vnode.data.attrs = extend({}, attrs);
  13702. }
  13703. for (key in attrs) {
  13704. cur = attrs[key];
  13705. old = oldAttrs[key];
  13706. if (old !== cur) {
  13707. setAttr(elm, key, cur, vnode.data.pre);
  13708. }
  13709. }
  13710. // #4391: in IE9, setting type can reset value for input[type=radio]
  13711. // #6666: IE/Edge forces progress value down to 1 before setting a max
  13712. /* istanbul ignore if */
  13713. if ((isIE || isEdge) && attrs.value !== oldAttrs.value) {
  13714. setAttr(elm, 'value', attrs.value);
  13715. }
  13716. for (key in oldAttrs) {
  13717. if (isUndef(attrs[key])) {
  13718. if (isXlink(key)) {
  13719. elm.removeAttributeNS(xlinkNS, getXlinkProp(key));
  13720. } else if (!isEnumeratedAttr(key)) {
  13721. elm.removeAttribute(key);
  13722. }
  13723. }
  13724. }
  13725. }
  13726. function setAttr (el, key, value, isInPre) {
  13727. if (isInPre || el.tagName.indexOf('-') > -1) {
  13728. baseSetAttr(el, key, value);
  13729. } else if (isBooleanAttr(key)) {
  13730. // set attribute for blank value
  13731. // e.g. <option disabled>Select one</option>
  13732. if (isFalsyAttrValue(value)) {
  13733. el.removeAttribute(key);
  13734. } else {
  13735. // technically allowfullscreen is a boolean attribute for <iframe>,
  13736. // but Flash expects a value of "true" when used on <embed> tag
  13737. value = key === 'allowfullscreen' && el.tagName === 'EMBED'
  13738. ? 'true'
  13739. : key;
  13740. el.setAttribute(key, value);
  13741. }
  13742. } else if (isEnumeratedAttr(key)) {
  13743. el.setAttribute(key, convertEnumeratedValue(key, value));
  13744. } else if (isXlink(key)) {
  13745. if (isFalsyAttrValue(value)) {
  13746. el.removeAttributeNS(xlinkNS, getXlinkProp(key));
  13747. } else {
  13748. el.setAttributeNS(xlinkNS, key, value);
  13749. }
  13750. } else {
  13751. baseSetAttr(el, key, value);
  13752. }
  13753. }
  13754. function baseSetAttr (el, key, value) {
  13755. if (isFalsyAttrValue(value)) {
  13756. el.removeAttribute(key);
  13757. } else {
  13758. // #7138: IE10 & 11 fires input event when setting placeholder on
  13759. // <textarea>... block the first input event and remove the blocker
  13760. // immediately.
  13761. /* istanbul ignore if */
  13762. if (
  13763. isIE && !isIE9 &&
  13764. el.tagName === 'TEXTAREA' &&
  13765. key === 'placeholder' && value !== '' && !el.__ieph
  13766. ) {
  13767. var blocker = function (e) {
  13768. e.stopImmediatePropagation();
  13769. el.removeEventListener('input', blocker);
  13770. };
  13771. el.addEventListener('input', blocker);
  13772. // $flow-disable-line
  13773. el.__ieph = true; /* IE placeholder patched */
  13774. }
  13775. el.setAttribute(key, value);
  13776. }
  13777. }
  13778. var attrs = {
  13779. create: updateAttrs,
  13780. update: updateAttrs
  13781. };
  13782. /* */
  13783. function updateClass (oldVnode, vnode) {
  13784. var el = vnode.elm;
  13785. var data = vnode.data;
  13786. var oldData = oldVnode.data;
  13787. if (
  13788. isUndef(data.staticClass) &&
  13789. isUndef(data.class) && (
  13790. isUndef(oldData) || (
  13791. isUndef(oldData.staticClass) &&
  13792. isUndef(oldData.class)
  13793. )
  13794. )
  13795. ) {
  13796. return
  13797. }
  13798. var cls = genClassForVnode(vnode);
  13799. // handle transition classes
  13800. var transitionClass = el._transitionClasses;
  13801. if (isDef(transitionClass)) {
  13802. cls = concat(cls, stringifyClass(transitionClass));
  13803. }
  13804. // set the class
  13805. if (cls !== el._prevClass) {
  13806. el.setAttribute('class', cls);
  13807. el._prevClass = cls;
  13808. }
  13809. }
  13810. var klass = {
  13811. create: updateClass,
  13812. update: updateClass
  13813. };
  13814. /* */
  13815. var validDivisionCharRE = /[\w).+\-_$\]]/;
  13816. function parseFilters (exp) {
  13817. var inSingle = false;
  13818. var inDouble = false;
  13819. var inTemplateString = false;
  13820. var inRegex = false;
  13821. var curly = 0;
  13822. var square = 0;
  13823. var paren = 0;
  13824. var lastFilterIndex = 0;
  13825. var c, prev, i, expression, filters;
  13826. for (i = 0; i < exp.length; i++) {
  13827. prev = c;
  13828. c = exp.charCodeAt(i);
  13829. if (inSingle) {
  13830. if (c === 0x27 && prev !== 0x5C) { inSingle = false; }
  13831. } else if (inDouble) {
  13832. if (c === 0x22 && prev !== 0x5C) { inDouble = false; }
  13833. } else if (inTemplateString) {
  13834. if (c === 0x60 && prev !== 0x5C) { inTemplateString = false; }
  13835. } else if (inRegex) {
  13836. if (c === 0x2f && prev !== 0x5C) { inRegex = false; }
  13837. } else if (
  13838. c === 0x7C && // pipe
  13839. exp.charCodeAt(i + 1) !== 0x7C &&
  13840. exp.charCodeAt(i - 1) !== 0x7C &&
  13841. !curly && !square && !paren
  13842. ) {
  13843. if (expression === undefined) {
  13844. // first filter, end of expression
  13845. lastFilterIndex = i + 1;
  13846. expression = exp.slice(0, i).trim();
  13847. } else {
  13848. pushFilter();
  13849. }
  13850. } else {
  13851. switch (c) {
  13852. case 0x22: inDouble = true; break // "
  13853. case 0x27: inSingle = true; break // '
  13854. case 0x60: inTemplateString = true; break // `
  13855. case 0x28: paren++; break // (
  13856. case 0x29: paren--; break // )
  13857. case 0x5B: square++; break // [
  13858. case 0x5D: square--; break // ]
  13859. case 0x7B: curly++; break // {
  13860. case 0x7D: curly--; break // }
  13861. }
  13862. if (c === 0x2f) { // /
  13863. var j = i - 1;
  13864. var p = (void 0);
  13865. // find first non-whitespace prev char
  13866. for (; j >= 0; j--) {
  13867. p = exp.charAt(j);
  13868. if (p !== ' ') { break }
  13869. }
  13870. if (!p || !validDivisionCharRE.test(p)) {
  13871. inRegex = true;
  13872. }
  13873. }
  13874. }
  13875. }
  13876. if (expression === undefined) {
  13877. expression = exp.slice(0, i).trim();
  13878. } else if (lastFilterIndex !== 0) {
  13879. pushFilter();
  13880. }
  13881. function pushFilter () {
  13882. (filters || (filters = [])).push(exp.slice(lastFilterIndex, i).trim());
  13883. lastFilterIndex = i + 1;
  13884. }
  13885. if (filters) {
  13886. for (i = 0; i < filters.length; i++) {
  13887. expression = wrapFilter(expression, filters[i]);
  13888. }
  13889. }
  13890. return expression
  13891. }
  13892. function wrapFilter (exp, filter) {
  13893. var i = filter.indexOf('(');
  13894. if (i < 0) {
  13895. // _f: resolveFilter
  13896. return ("_f(\"" + filter + "\")(" + exp + ")")
  13897. } else {
  13898. var name = filter.slice(0, i);
  13899. var args = filter.slice(i + 1);
  13900. return ("_f(\"" + name + "\")(" + exp + (args !== ')' ? ',' + args : args))
  13901. }
  13902. }
  13903. /* */
  13904. /* eslint-disable no-unused-vars */
  13905. function baseWarn (msg, range) {
  13906. console.error(("[Vue compiler]: " + msg));
  13907. }
  13908. /* eslint-enable no-unused-vars */
  13909. function pluckModuleFunction (
  13910. modules,
  13911. key
  13912. ) {
  13913. return modules
  13914. ? modules.map(function (m) { return m[key]; }).filter(function (_) { return _; })
  13915. : []
  13916. }
  13917. function addProp (el, name, value, range, dynamic) {
  13918. (el.props || (el.props = [])).push(rangeSetItem({ name: name, value: value, dynamic: dynamic }, range));
  13919. el.plain = false;
  13920. }
  13921. function addAttr (el, name, value, range, dynamic) {
  13922. var attrs = dynamic
  13923. ? (el.dynamicAttrs || (el.dynamicAttrs = []))
  13924. : (el.attrs || (el.attrs = []));
  13925. attrs.push(rangeSetItem({ name: name, value: value, dynamic: dynamic }, range));
  13926. el.plain = false;
  13927. }
  13928. // add a raw attr (use this in preTransforms)
  13929. function addRawAttr (el, name, value, range) {
  13930. el.attrsMap[name] = value;
  13931. el.attrsList.push(rangeSetItem({ name: name, value: value }, range));
  13932. }
  13933. function addDirective (
  13934. el,
  13935. name,
  13936. rawName,
  13937. value,
  13938. arg,
  13939. isDynamicArg,
  13940. modifiers,
  13941. range
  13942. ) {
  13943. (el.directives || (el.directives = [])).push(rangeSetItem({
  13944. name: name,
  13945. rawName: rawName,
  13946. value: value,
  13947. arg: arg,
  13948. isDynamicArg: isDynamicArg,
  13949. modifiers: modifiers
  13950. }, range));
  13951. el.plain = false;
  13952. }
  13953. function prependModifierMarker (symbol, name, dynamic) {
  13954. return dynamic
  13955. ? ("_p(" + name + ",\"" + symbol + "\")")
  13956. : symbol + name // mark the event as captured
  13957. }
  13958. function addHandler (
  13959. el,
  13960. name,
  13961. value,
  13962. modifiers,
  13963. important,
  13964. warn,
  13965. range,
  13966. dynamic
  13967. ) {
  13968. modifiers = modifiers || emptyObject;
  13969. // warn prevent and passive modifier
  13970. /* istanbul ignore if */
  13971. if (
  13972. true && warn &&
  13973. modifiers.prevent && modifiers.passive
  13974. ) {
  13975. warn(
  13976. 'passive and prevent can\'t be used together. ' +
  13977. 'Passive handler can\'t prevent default event.',
  13978. range
  13979. );
  13980. }
  13981. // normalize click.right and click.middle since they don't actually fire
  13982. // this is technically browser-specific, but at least for now browsers are
  13983. // the only target envs that have right/middle clicks.
  13984. if (modifiers.right) {
  13985. if (dynamic) {
  13986. name = "(" + name + ")==='click'?'contextmenu':(" + name + ")";
  13987. } else if (name === 'click') {
  13988. name = 'contextmenu';
  13989. delete modifiers.right;
  13990. }
  13991. } else if (modifiers.middle) {
  13992. if (dynamic) {
  13993. name = "(" + name + ")==='click'?'mouseup':(" + name + ")";
  13994. } else if (name === 'click') {
  13995. name = 'mouseup';
  13996. }
  13997. }
  13998. // check capture modifier
  13999. if (modifiers.capture) {
  14000. delete modifiers.capture;
  14001. name = prependModifierMarker('!', name, dynamic);
  14002. }
  14003. if (modifiers.once) {
  14004. delete modifiers.once;
  14005. name = prependModifierMarker('~', name, dynamic);
  14006. }
  14007. /* istanbul ignore if */
  14008. if (modifiers.passive) {
  14009. delete modifiers.passive;
  14010. name = prependModifierMarker('&', name, dynamic);
  14011. }
  14012. var events;
  14013. if (modifiers.native) {
  14014. delete modifiers.native;
  14015. events = el.nativeEvents || (el.nativeEvents = {});
  14016. } else {
  14017. events = el.events || (el.events = {});
  14018. }
  14019. var newHandler = rangeSetItem({ value: value.trim(), dynamic: dynamic }, range);
  14020. if (modifiers !== emptyObject) {
  14021. newHandler.modifiers = modifiers;
  14022. }
  14023. var handlers = events[name];
  14024. /* istanbul ignore if */
  14025. if (Array.isArray(handlers)) {
  14026. important ? handlers.unshift(newHandler) : handlers.push(newHandler);
  14027. } else if (handlers) {
  14028. events[name] = important ? [newHandler, handlers] : [handlers, newHandler];
  14029. } else {
  14030. events[name] = newHandler;
  14031. }
  14032. el.plain = false;
  14033. }
  14034. function getRawBindingAttr (
  14035. el,
  14036. name
  14037. ) {
  14038. return el.rawAttrsMap[':' + name] ||
  14039. el.rawAttrsMap['v-bind:' + name] ||
  14040. el.rawAttrsMap[name]
  14041. }
  14042. function getBindingAttr (
  14043. el,
  14044. name,
  14045. getStatic
  14046. ) {
  14047. var dynamicValue =
  14048. getAndRemoveAttr(el, ':' + name) ||
  14049. getAndRemoveAttr(el, 'v-bind:' + name);
  14050. if (dynamicValue != null) {
  14051. return parseFilters(dynamicValue)
  14052. } else if (getStatic !== false) {
  14053. var staticValue = getAndRemoveAttr(el, name);
  14054. if (staticValue != null) {
  14055. return JSON.stringify(staticValue)
  14056. }
  14057. }
  14058. }
  14059. // note: this only removes the attr from the Array (attrsList) so that it
  14060. // doesn't get processed by processAttrs.
  14061. // By default it does NOT remove it from the map (attrsMap) because the map is
  14062. // needed during codegen.
  14063. function getAndRemoveAttr (
  14064. el,
  14065. name,
  14066. removeFromMap
  14067. ) {
  14068. var val;
  14069. if ((val = el.attrsMap[name]) != null) {
  14070. var list = el.attrsList;
  14071. for (var i = 0, l = list.length; i < l; i++) {
  14072. if (list[i].name === name) {
  14073. list.splice(i, 1);
  14074. break
  14075. }
  14076. }
  14077. }
  14078. if (removeFromMap) {
  14079. delete el.attrsMap[name];
  14080. }
  14081. return val
  14082. }
  14083. function getAndRemoveAttrByRegex (
  14084. el,
  14085. name
  14086. ) {
  14087. var list = el.attrsList;
  14088. for (var i = 0, l = list.length; i < l; i++) {
  14089. var attr = list[i];
  14090. if (name.test(attr.name)) {
  14091. list.splice(i, 1);
  14092. return attr
  14093. }
  14094. }
  14095. }
  14096. function rangeSetItem (
  14097. item,
  14098. range
  14099. ) {
  14100. if (range) {
  14101. if (range.start != null) {
  14102. item.start = range.start;
  14103. }
  14104. if (range.end != null) {
  14105. item.end = range.end;
  14106. }
  14107. }
  14108. return item
  14109. }
  14110. /* */
  14111. /**
  14112. * Cross-platform code generation for component v-model
  14113. */
  14114. function genComponentModel (
  14115. el,
  14116. value,
  14117. modifiers
  14118. ) {
  14119. var ref = modifiers || {};
  14120. var number = ref.number;
  14121. var trim = ref.trim;
  14122. var baseValueExpression = '$$v';
  14123. var valueExpression = baseValueExpression;
  14124. if (trim) {
  14125. valueExpression =
  14126. "(typeof " + baseValueExpression + " === 'string'" +
  14127. "? " + baseValueExpression + ".trim()" +
  14128. ": " + baseValueExpression + ")";
  14129. }
  14130. if (number) {
  14131. valueExpression = "_n(" + valueExpression + ")";
  14132. }
  14133. var assignment = genAssignmentCode(value, valueExpression);
  14134. el.model = {
  14135. value: ("(" + value + ")"),
  14136. expression: JSON.stringify(value),
  14137. callback: ("function (" + baseValueExpression + ") {" + assignment + "}")
  14138. };
  14139. }
  14140. /**
  14141. * Cross-platform codegen helper for generating v-model value assignment code.
  14142. */
  14143. function genAssignmentCode (
  14144. value,
  14145. assignment
  14146. ) {
  14147. var res = parseModel(value);
  14148. if (res.key === null) {
  14149. return (value + "=" + assignment)
  14150. } else {
  14151. return ("$set(" + (res.exp) + ", " + (res.key) + ", " + assignment + ")")
  14152. }
  14153. }
  14154. /**
  14155. * Parse a v-model expression into a base path and a final key segment.
  14156. * Handles both dot-path and possible square brackets.
  14157. *
  14158. * Possible cases:
  14159. *
  14160. * - test
  14161. * - test[key]
  14162. * - test[test1[key]]
  14163. * - test["a"][key]
  14164. * - xxx.test[a[a].test1[key]]
  14165. * - test.xxx.a["asa"][test1[key]]
  14166. *
  14167. */
  14168. var len, str, chr, index$1, expressionPos, expressionEndPos;
  14169. function parseModel (val) {
  14170. // Fix https://github.com/vuejs/vue/pull/7730
  14171. // allow v-model="obj.val " (trailing whitespace)
  14172. val = val.trim();
  14173. len = val.length;
  14174. if (val.indexOf('[') < 0 || val.lastIndexOf(']') < len - 1) {
  14175. index$1 = val.lastIndexOf('.');
  14176. if (index$1 > -1) {
  14177. return {
  14178. exp: val.slice(0, index$1),
  14179. key: '"' + val.slice(index$1 + 1) + '"'
  14180. }
  14181. } else {
  14182. return {
  14183. exp: val,
  14184. key: null
  14185. }
  14186. }
  14187. }
  14188. str = val;
  14189. index$1 = expressionPos = expressionEndPos = 0;
  14190. while (!eof()) {
  14191. chr = next();
  14192. /* istanbul ignore if */
  14193. if (isStringStart(chr)) {
  14194. parseString(chr);
  14195. } else if (chr === 0x5B) {
  14196. parseBracket(chr);
  14197. }
  14198. }
  14199. return {
  14200. exp: val.slice(0, expressionPos),
  14201. key: val.slice(expressionPos + 1, expressionEndPos)
  14202. }
  14203. }
  14204. function next () {
  14205. return str.charCodeAt(++index$1)
  14206. }
  14207. function eof () {
  14208. return index$1 >= len
  14209. }
  14210. function isStringStart (chr) {
  14211. return chr === 0x22 || chr === 0x27
  14212. }
  14213. function parseBracket (chr) {
  14214. var inBracket = 1;
  14215. expressionPos = index$1;
  14216. while (!eof()) {
  14217. chr = next();
  14218. if (isStringStart(chr)) {
  14219. parseString(chr);
  14220. continue
  14221. }
  14222. if (chr === 0x5B) { inBracket++; }
  14223. if (chr === 0x5D) { inBracket--; }
  14224. if (inBracket === 0) {
  14225. expressionEndPos = index$1;
  14226. break
  14227. }
  14228. }
  14229. }
  14230. function parseString (chr) {
  14231. var stringQuote = chr;
  14232. while (!eof()) {
  14233. chr = next();
  14234. if (chr === stringQuote) {
  14235. break
  14236. }
  14237. }
  14238. }
  14239. /* */
  14240. var warn$1;
  14241. // in some cases, the event used has to be determined at runtime
  14242. // so we used some reserved tokens during compile.
  14243. var RANGE_TOKEN = '__r';
  14244. var CHECKBOX_RADIO_TOKEN = '__c';
  14245. function model (
  14246. el,
  14247. dir,
  14248. _warn
  14249. ) {
  14250. warn$1 = _warn;
  14251. var value = dir.value;
  14252. var modifiers = dir.modifiers;
  14253. var tag = el.tag;
  14254. var type = el.attrsMap.type;
  14255. if (true) {
  14256. // inputs with type="file" are read only and setting the input's
  14257. // value will throw an error.
  14258. if (tag === 'input' && type === 'file') {
  14259. warn$1(
  14260. "<" + (el.tag) + " v-model=\"" + value + "\" type=\"file\">:\n" +
  14261. "File inputs are read only. Use a v-on:change listener instead.",
  14262. el.rawAttrsMap['v-model']
  14263. );
  14264. }
  14265. }
  14266. if (el.component) {
  14267. genComponentModel(el, value, modifiers);
  14268. // component v-model doesn't need extra runtime
  14269. return false
  14270. } else if (tag === 'select') {
  14271. genSelect(el, value, modifiers);
  14272. } else if (tag === 'input' && type === 'checkbox') {
  14273. genCheckboxModel(el, value, modifiers);
  14274. } else if (tag === 'input' && type === 'radio') {
  14275. genRadioModel(el, value, modifiers);
  14276. } else if (tag === 'input' || tag === 'textarea') {
  14277. genDefaultModel(el, value, modifiers);
  14278. } else if (!config.isReservedTag(tag)) {
  14279. genComponentModel(el, value, modifiers);
  14280. // component v-model doesn't need extra runtime
  14281. return false
  14282. } else if (true) {
  14283. warn$1(
  14284. "<" + (el.tag) + " v-model=\"" + value + "\">: " +
  14285. "v-model is not supported on this element type. " +
  14286. 'If you are working with contenteditable, it\'s recommended to ' +
  14287. 'wrap a library dedicated for that purpose inside a custom component.',
  14288. el.rawAttrsMap['v-model']
  14289. );
  14290. }
  14291. // ensure runtime directive metadata
  14292. return true
  14293. }
  14294. function genCheckboxModel (
  14295. el,
  14296. value,
  14297. modifiers
  14298. ) {
  14299. var number = modifiers && modifiers.number;
  14300. var valueBinding = getBindingAttr(el, 'value') || 'null';
  14301. var trueValueBinding = getBindingAttr(el, 'true-value') || 'true';
  14302. var falseValueBinding = getBindingAttr(el, 'false-value') || 'false';
  14303. addProp(el, 'checked',
  14304. "Array.isArray(" + value + ")" +
  14305. "?_i(" + value + "," + valueBinding + ")>-1" + (
  14306. trueValueBinding === 'true'
  14307. ? (":(" + value + ")")
  14308. : (":_q(" + value + "," + trueValueBinding + ")")
  14309. )
  14310. );
  14311. addHandler(el, 'change',
  14312. "var $$a=" + value + "," +
  14313. '$$el=$event.target,' +
  14314. "$$c=$$el.checked?(" + trueValueBinding + "):(" + falseValueBinding + ");" +
  14315. 'if(Array.isArray($$a)){' +
  14316. "var $$v=" + (number ? '_n(' + valueBinding + ')' : valueBinding) + "," +
  14317. '$$i=_i($$a,$$v);' +
  14318. "if($$el.checked){$$i<0&&(" + (genAssignmentCode(value, '$$a.concat([$$v])')) + ")}" +
  14319. "else{$$i>-1&&(" + (genAssignmentCode(value, '$$a.slice(0,$$i).concat($$a.slice($$i+1))')) + ")}" +
  14320. "}else{" + (genAssignmentCode(value, '$$c')) + "}",
  14321. null, true
  14322. );
  14323. }
  14324. function genRadioModel (
  14325. el,
  14326. value,
  14327. modifiers
  14328. ) {
  14329. var number = modifiers && modifiers.number;
  14330. var valueBinding = getBindingAttr(el, 'value') || 'null';
  14331. valueBinding = number ? ("_n(" + valueBinding + ")") : valueBinding;
  14332. addProp(el, 'checked', ("_q(" + value + "," + valueBinding + ")"));
  14333. addHandler(el, 'change', genAssignmentCode(value, valueBinding), null, true);
  14334. }
  14335. function genSelect (
  14336. el,
  14337. value,
  14338. modifiers
  14339. ) {
  14340. var number = modifiers && modifiers.number;
  14341. var selectedVal = "Array.prototype.filter" +
  14342. ".call($event.target.options,function(o){return o.selected})" +
  14343. ".map(function(o){var val = \"_value\" in o ? o._value : o.value;" +
  14344. "return " + (number ? '_n(val)' : 'val') + "})";
  14345. var assignment = '$event.target.multiple ? $$selectedVal : $$selectedVal[0]';
  14346. var code = "var $$selectedVal = " + selectedVal + ";";
  14347. code = code + " " + (genAssignmentCode(value, assignment));
  14348. addHandler(el, 'change', code, null, true);
  14349. }
  14350. function genDefaultModel (
  14351. el,
  14352. value,
  14353. modifiers
  14354. ) {
  14355. var type = el.attrsMap.type;
  14356. // warn if v-bind:value conflicts with v-model
  14357. // except for inputs with v-bind:type
  14358. if (true) {
  14359. var value$1 = el.attrsMap['v-bind:value'] || el.attrsMap[':value'];
  14360. var typeBinding = el.attrsMap['v-bind:type'] || el.attrsMap[':type'];
  14361. if (value$1 && !typeBinding) {
  14362. var binding = el.attrsMap['v-bind:value'] ? 'v-bind:value' : ':value';
  14363. warn$1(
  14364. binding + "=\"" + value$1 + "\" conflicts with v-model on the same element " +
  14365. 'because the latter already expands to a value binding internally',
  14366. el.rawAttrsMap[binding]
  14367. );
  14368. }
  14369. }
  14370. var ref = modifiers || {};
  14371. var lazy = ref.lazy;
  14372. var number = ref.number;
  14373. var trim = ref.trim;
  14374. var needCompositionGuard = !lazy && type !== 'range';
  14375. var event = lazy
  14376. ? 'change'
  14377. : type === 'range'
  14378. ? RANGE_TOKEN
  14379. : 'input';
  14380. var valueExpression = '$event.target.value';
  14381. if (trim) {
  14382. valueExpression = "$event.target.value.trim()";
  14383. }
  14384. if (number) {
  14385. valueExpression = "_n(" + valueExpression + ")";
  14386. }
  14387. var code = genAssignmentCode(value, valueExpression);
  14388. if (needCompositionGuard) {
  14389. code = "if($event.target.composing)return;" + code;
  14390. }
  14391. addProp(el, 'value', ("(" + value + ")"));
  14392. addHandler(el, event, code, null, true);
  14393. if (trim || number) {
  14394. addHandler(el, 'blur', '$forceUpdate()');
  14395. }
  14396. }
  14397. /* */
  14398. // normalize v-model event tokens that can only be determined at runtime.
  14399. // it's important to place the event as the first in the array because
  14400. // the whole point is ensuring the v-model callback gets called before
  14401. // user-attached handlers.
  14402. function normalizeEvents (on) {
  14403. /* istanbul ignore if */
  14404. if (isDef(on[RANGE_TOKEN])) {
  14405. // IE input[type=range] only supports `change` event
  14406. var event = isIE ? 'change' : 'input';
  14407. on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);
  14408. delete on[RANGE_TOKEN];
  14409. }
  14410. // This was originally intended to fix #4521 but no longer necessary
  14411. // after 2.5. Keeping it for backwards compat with generated code from < 2.4
  14412. /* istanbul ignore if */
  14413. if (isDef(on[CHECKBOX_RADIO_TOKEN])) {
  14414. on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);
  14415. delete on[CHECKBOX_RADIO_TOKEN];
  14416. }
  14417. }
  14418. var target$1;
  14419. function createOnceHandler$1 (event, handler, capture) {
  14420. var _target = target$1; // save current target element in closure
  14421. return function onceHandler () {
  14422. var res = handler.apply(null, arguments);
  14423. if (res !== null) {
  14424. remove$2(event, onceHandler, capture, _target);
  14425. }
  14426. }
  14427. }
  14428. // #9446: Firefox <= 53 (in particular, ESR 52) has incorrect Event.timeStamp
  14429. // implementation and does not fire microtasks in between event propagation, so
  14430. // safe to exclude.
  14431. var useMicrotaskFix = isUsingMicroTask && !(isFF && Number(isFF[1]) <= 53);
  14432. function add$1 (
  14433. name,
  14434. handler,
  14435. capture,
  14436. passive
  14437. ) {
  14438. // async edge case #6566: inner click event triggers patch, event handler
  14439. // attached to outer element during patch, and triggered again. This
  14440. // happens because browsers fire microtask ticks between event propagation.
  14441. // the solution is simple: we save the timestamp when a handler is attached,
  14442. // and the handler would only fire if the event passed to it was fired
  14443. // AFTER it was attached.
  14444. if (useMicrotaskFix) {
  14445. var attachedTimestamp = currentFlushTimestamp;
  14446. var original = handler;
  14447. handler = original._wrapper = function (e) {
  14448. if (
  14449. // no bubbling, should always fire.
  14450. // this is just a safety net in case event.timeStamp is unreliable in
  14451. // certain weird environments...
  14452. e.target === e.currentTarget ||
  14453. // event is fired after handler attachment
  14454. e.timeStamp >= attachedTimestamp ||
  14455. // bail for environments that have buggy event.timeStamp implementations
  14456. // #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState
  14457. // #9681 QtWebEngine event.timeStamp is negative value
  14458. e.timeStamp <= 0 ||
  14459. // #9448 bail if event is fired in another document in a multi-page
  14460. // electron/nw.js app, since event.timeStamp will be using a different
  14461. // starting reference
  14462. e.target.ownerDocument !== document
  14463. ) {
  14464. return original.apply(this, arguments)
  14465. }
  14466. };
  14467. }
  14468. target$1.addEventListener(
  14469. name,
  14470. handler,
  14471. supportsPassive
  14472. ? { capture: capture, passive: passive }
  14473. : capture
  14474. );
  14475. }
  14476. function remove$2 (
  14477. name,
  14478. handler,
  14479. capture,
  14480. _target
  14481. ) {
  14482. (_target || target$1).removeEventListener(
  14483. name,
  14484. handler._wrapper || handler,
  14485. capture
  14486. );
  14487. }
  14488. function updateDOMListeners (oldVnode, vnode) {
  14489. if (isUndef(oldVnode.data.on) && isUndef(vnode.data.on)) {
  14490. return
  14491. }
  14492. var on = vnode.data.on || {};
  14493. var oldOn = oldVnode.data.on || {};
  14494. target$1 = vnode.elm;
  14495. normalizeEvents(on);
  14496. updateListeners(on, oldOn, add$1, remove$2, createOnceHandler$1, vnode.context);
  14497. target$1 = undefined;
  14498. }
  14499. var events = {
  14500. create: updateDOMListeners,
  14501. update: updateDOMListeners
  14502. };
  14503. /* */
  14504. var svgContainer;
  14505. function updateDOMProps (oldVnode, vnode) {
  14506. if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) {
  14507. return
  14508. }
  14509. var key, cur;
  14510. var elm = vnode.elm;
  14511. var oldProps = oldVnode.data.domProps || {};
  14512. var props = vnode.data.domProps || {};
  14513. // clone observed objects, as the user probably wants to mutate it
  14514. if (isDef(props.__ob__)) {
  14515. props = vnode.data.domProps = extend({}, props);
  14516. }
  14517. for (key in oldProps) {
  14518. if (!(key in props)) {
  14519. elm[key] = '';
  14520. }
  14521. }
  14522. for (key in props) {
  14523. cur = props[key];
  14524. // ignore children if the node has textContent or innerHTML,
  14525. // as these will throw away existing DOM nodes and cause removal errors
  14526. // on subsequent patches (#3360)
  14527. if (key === 'textContent' || key === 'innerHTML') {
  14528. if (vnode.children) { vnode.children.length = 0; }
  14529. if (cur === oldProps[key]) { continue }
  14530. // #6601 work around Chrome version <= 55 bug where single textNode
  14531. // replaced by innerHTML/textContent retains its parentNode property
  14532. if (elm.childNodes.length === 1) {
  14533. elm.removeChild(elm.childNodes[0]);
  14534. }
  14535. }
  14536. if (key === 'value' && elm.tagName !== 'PROGRESS') {
  14537. // store value as _value as well since
  14538. // non-string values will be stringified
  14539. elm._value = cur;
  14540. // avoid resetting cursor position when value is the same
  14541. var strCur = isUndef(cur) ? '' : String(cur);
  14542. if (shouldUpdateValue(elm, strCur)) {
  14543. elm.value = strCur;
  14544. }
  14545. } else if (key === 'innerHTML' && isSVG(elm.tagName) && isUndef(elm.innerHTML)) {
  14546. // IE doesn't support innerHTML for SVG elements
  14547. svgContainer = svgContainer || document.createElement('div');
  14548. svgContainer.innerHTML = "<svg>" + cur + "</svg>";
  14549. var svg = svgContainer.firstChild;
  14550. while (elm.firstChild) {
  14551. elm.removeChild(elm.firstChild);
  14552. }
  14553. while (svg.firstChild) {
  14554. elm.appendChild(svg.firstChild);
  14555. }
  14556. } else if (
  14557. // skip the update if old and new VDOM state is the same.
  14558. // `value` is handled separately because the DOM value may be temporarily
  14559. // out of sync with VDOM state due to focus, composition and modifiers.
  14560. // This #4521 by skipping the unnecessary `checked` update.
  14561. cur !== oldProps[key]
  14562. ) {
  14563. // some property updates can throw
  14564. // e.g. `value` on <progress> w/ non-finite value
  14565. try {
  14566. elm[key] = cur;
  14567. } catch (e) {}
  14568. }
  14569. }
  14570. }
  14571. // check platforms/web/util/attrs.js acceptValue
  14572. function shouldUpdateValue (elm, checkVal) {
  14573. return (!elm.composing && (
  14574. elm.tagName === 'OPTION' ||
  14575. isNotInFocusAndDirty(elm, checkVal) ||
  14576. isDirtyWithModifiers(elm, checkVal)
  14577. ))
  14578. }
  14579. function isNotInFocusAndDirty (elm, checkVal) {
  14580. // return true when textbox (.number and .trim) loses focus and its value is
  14581. // not equal to the updated value
  14582. var notInFocus = true;
  14583. // #6157
  14584. // work around IE bug when accessing document.activeElement in an iframe
  14585. try { notInFocus = document.activeElement !== elm; } catch (e) {}
  14586. return notInFocus && elm.value !== checkVal
  14587. }
  14588. function isDirtyWithModifiers (elm, newVal) {
  14589. var value = elm.value;
  14590. var modifiers = elm._vModifiers; // injected by v-model runtime
  14591. if (isDef(modifiers)) {
  14592. if (modifiers.number) {
  14593. return toNumber(value) !== toNumber(newVal)
  14594. }
  14595. if (modifiers.trim) {
  14596. return value.trim() !== newVal.trim()
  14597. }
  14598. }
  14599. return value !== newVal
  14600. }
  14601. var domProps = {
  14602. create: updateDOMProps,
  14603. update: updateDOMProps
  14604. };
  14605. /* */
  14606. var parseStyleText = cached(function (cssText) {
  14607. var res = {};
  14608. var listDelimiter = /;(?![^(]*\))/g;
  14609. var propertyDelimiter = /:(.+)/;
  14610. cssText.split(listDelimiter).forEach(function (item) {
  14611. if (item) {
  14612. var tmp = item.split(propertyDelimiter);
  14613. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  14614. }
  14615. });
  14616. return res
  14617. });
  14618. // merge static and dynamic style data on the same vnode
  14619. function normalizeStyleData (data) {
  14620. var style = normalizeStyleBinding(data.style);
  14621. // static style is pre-processed into an object during compilation
  14622. // and is always a fresh object, so it's safe to merge into it
  14623. return data.staticStyle
  14624. ? extend(data.staticStyle, style)
  14625. : style
  14626. }
  14627. // normalize possible array / string values into Object
  14628. function normalizeStyleBinding (bindingStyle) {
  14629. if (Array.isArray(bindingStyle)) {
  14630. return toObject(bindingStyle)
  14631. }
  14632. if (typeof bindingStyle === 'string') {
  14633. return parseStyleText(bindingStyle)
  14634. }
  14635. return bindingStyle
  14636. }
  14637. /**
  14638. * parent component style should be after child's
  14639. * so that parent component's style could override it
  14640. */
  14641. function getStyle (vnode, checkChild) {
  14642. var res = {};
  14643. var styleData;
  14644. if (checkChild) {
  14645. var childNode = vnode;
  14646. while (childNode.componentInstance) {
  14647. childNode = childNode.componentInstance._vnode;
  14648. if (
  14649. childNode && childNode.data &&
  14650. (styleData = normalizeStyleData(childNode.data))
  14651. ) {
  14652. extend(res, styleData);
  14653. }
  14654. }
  14655. }
  14656. if ((styleData = normalizeStyleData(vnode.data))) {
  14657. extend(res, styleData);
  14658. }
  14659. var parentNode = vnode;
  14660. while ((parentNode = parentNode.parent)) {
  14661. if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {
  14662. extend(res, styleData);
  14663. }
  14664. }
  14665. return res
  14666. }
  14667. /* */
  14668. var cssVarRE = /^--/;
  14669. var importantRE = /\s*!important$/;
  14670. var setProp = function (el, name, val) {
  14671. /* istanbul ignore if */
  14672. if (cssVarRE.test(name)) {
  14673. el.style.setProperty(name, val);
  14674. } else if (importantRE.test(val)) {
  14675. el.style.setProperty(hyphenate(name), val.replace(importantRE, ''), 'important');
  14676. } else {
  14677. var normalizedName = normalize(name);
  14678. if (Array.isArray(val)) {
  14679. // Support values array created by autoprefixer, e.g.
  14680. // {display: ["-webkit-box", "-ms-flexbox", "flex"]}
  14681. // Set them one by one, and the browser will only set those it can recognize
  14682. for (var i = 0, len = val.length; i < len; i++) {
  14683. el.style[normalizedName] = val[i];
  14684. }
  14685. } else {
  14686. el.style[normalizedName] = val;
  14687. }
  14688. }
  14689. };
  14690. var vendorNames = ['Webkit', 'Moz', 'ms'];
  14691. var emptyStyle;
  14692. var normalize = cached(function (prop) {
  14693. emptyStyle = emptyStyle || document.createElement('div').style;
  14694. prop = camelize(prop);
  14695. if (prop !== 'filter' && (prop in emptyStyle)) {
  14696. return prop
  14697. }
  14698. var capName = prop.charAt(0).toUpperCase() + prop.slice(1);
  14699. for (var i = 0; i < vendorNames.length; i++) {
  14700. var name = vendorNames[i] + capName;
  14701. if (name in emptyStyle) {
  14702. return name
  14703. }
  14704. }
  14705. });
  14706. function updateStyle (oldVnode, vnode) {
  14707. var data = vnode.data;
  14708. var oldData = oldVnode.data;
  14709. if (isUndef(data.staticStyle) && isUndef(data.style) &&
  14710. isUndef(oldData.staticStyle) && isUndef(oldData.style)
  14711. ) {
  14712. return
  14713. }
  14714. var cur, name;
  14715. var el = vnode.elm;
  14716. var oldStaticStyle = oldData.staticStyle;
  14717. var oldStyleBinding = oldData.normalizedStyle || oldData.style || {};
  14718. // if static style exists, stylebinding already merged into it when doing normalizeStyleData
  14719. var oldStyle = oldStaticStyle || oldStyleBinding;
  14720. var style = normalizeStyleBinding(vnode.data.style) || {};
  14721. // store normalized style under a different key for next diff
  14722. // make sure to clone it if it's reactive, since the user likely wants
  14723. // to mutate it.
  14724. vnode.data.normalizedStyle = isDef(style.__ob__)
  14725. ? extend({}, style)
  14726. : style;
  14727. var newStyle = getStyle(vnode, true);
  14728. for (name in oldStyle) {
  14729. if (isUndef(newStyle[name])) {
  14730. setProp(el, name, '');
  14731. }
  14732. }
  14733. for (name in newStyle) {
  14734. cur = newStyle[name];
  14735. if (cur !== oldStyle[name]) {
  14736. // ie9 setting to null has no effect, must use empty string
  14737. setProp(el, name, cur == null ? '' : cur);
  14738. }
  14739. }
  14740. }
  14741. var style = {
  14742. create: updateStyle,
  14743. update: updateStyle
  14744. };
  14745. /* */
  14746. var whitespaceRE = /\s+/;
  14747. /**
  14748. * Add class with compatibility for SVG since classList is not supported on
  14749. * SVG elements in IE
  14750. */
  14751. function addClass (el, cls) {
  14752. /* istanbul ignore if */
  14753. if (!cls || !(cls = cls.trim())) {
  14754. return
  14755. }
  14756. /* istanbul ignore else */
  14757. if (el.classList) {
  14758. if (cls.indexOf(' ') > -1) {
  14759. cls.split(whitespaceRE).forEach(function (c) { return el.classList.add(c); });
  14760. } else {
  14761. el.classList.add(cls);
  14762. }
  14763. } else {
  14764. var cur = " " + (el.getAttribute('class') || '') + " ";
  14765. if (cur.indexOf(' ' + cls + ' ') < 0) {
  14766. el.setAttribute('class', (cur + cls).trim());
  14767. }
  14768. }
  14769. }
  14770. /**
  14771. * Remove class with compatibility for SVG since classList is not supported on
  14772. * SVG elements in IE
  14773. */
  14774. function removeClass (el, cls) {
  14775. /* istanbul ignore if */
  14776. if (!cls || !(cls = cls.trim())) {
  14777. return
  14778. }
  14779. /* istanbul ignore else */
  14780. if (el.classList) {
  14781. if (cls.indexOf(' ') > -1) {
  14782. cls.split(whitespaceRE).forEach(function (c) { return el.classList.remove(c); });
  14783. } else {
  14784. el.classList.remove(cls);
  14785. }
  14786. if (!el.classList.length) {
  14787. el.removeAttribute('class');
  14788. }
  14789. } else {
  14790. var cur = " " + (el.getAttribute('class') || '') + " ";
  14791. var tar = ' ' + cls + ' ';
  14792. while (cur.indexOf(tar) >= 0) {
  14793. cur = cur.replace(tar, ' ');
  14794. }
  14795. cur = cur.trim();
  14796. if (cur) {
  14797. el.setAttribute('class', cur);
  14798. } else {
  14799. el.removeAttribute('class');
  14800. }
  14801. }
  14802. }
  14803. /* */
  14804. function resolveTransition (def$$1) {
  14805. if (!def$$1) {
  14806. return
  14807. }
  14808. /* istanbul ignore else */
  14809. if (typeof def$$1 === 'object') {
  14810. var res = {};
  14811. if (def$$1.css !== false) {
  14812. extend(res, autoCssTransition(def$$1.name || 'v'));
  14813. }
  14814. extend(res, def$$1);
  14815. return res
  14816. } else if (typeof def$$1 === 'string') {
  14817. return autoCssTransition(def$$1)
  14818. }
  14819. }
  14820. var autoCssTransition = cached(function (name) {
  14821. return {
  14822. enterClass: (name + "-enter"),
  14823. enterToClass: (name + "-enter-to"),
  14824. enterActiveClass: (name + "-enter-active"),
  14825. leaveClass: (name + "-leave"),
  14826. leaveToClass: (name + "-leave-to"),
  14827. leaveActiveClass: (name + "-leave-active")
  14828. }
  14829. });
  14830. var hasTransition = inBrowser && !isIE9;
  14831. var TRANSITION = 'transition';
  14832. var ANIMATION = 'animation';
  14833. // Transition property/event sniffing
  14834. var transitionProp = 'transition';
  14835. var transitionEndEvent = 'transitionend';
  14836. var animationProp = 'animation';
  14837. var animationEndEvent = 'animationend';
  14838. if (hasTransition) {
  14839. /* istanbul ignore if */
  14840. if (window.ontransitionend === undefined &&
  14841. window.onwebkittransitionend !== undefined
  14842. ) {
  14843. transitionProp = 'WebkitTransition';
  14844. transitionEndEvent = 'webkitTransitionEnd';
  14845. }
  14846. if (window.onanimationend === undefined &&
  14847. window.onwebkitanimationend !== undefined
  14848. ) {
  14849. animationProp = 'WebkitAnimation';
  14850. animationEndEvent = 'webkitAnimationEnd';
  14851. }
  14852. }
  14853. // binding to window is necessary to make hot reload work in IE in strict mode
  14854. var raf = inBrowser
  14855. ? window.requestAnimationFrame
  14856. ? window.requestAnimationFrame.bind(window)
  14857. : setTimeout
  14858. : /* istanbul ignore next */ function (fn) { return fn(); };
  14859. function nextFrame (fn) {
  14860. raf(function () {
  14861. raf(fn);
  14862. });
  14863. }
  14864. function addTransitionClass (el, cls) {
  14865. var transitionClasses = el._transitionClasses || (el._transitionClasses = []);
  14866. if (transitionClasses.indexOf(cls) < 0) {
  14867. transitionClasses.push(cls);
  14868. addClass(el, cls);
  14869. }
  14870. }
  14871. function removeTransitionClass (el, cls) {
  14872. if (el._transitionClasses) {
  14873. remove(el._transitionClasses, cls);
  14874. }
  14875. removeClass(el, cls);
  14876. }
  14877. function whenTransitionEnds (
  14878. el,
  14879. expectedType,
  14880. cb
  14881. ) {
  14882. var ref = getTransitionInfo(el, expectedType);
  14883. var type = ref.type;
  14884. var timeout = ref.timeout;
  14885. var propCount = ref.propCount;
  14886. if (!type) { return cb() }
  14887. var event = type === TRANSITION ? transitionEndEvent : animationEndEvent;
  14888. var ended = 0;
  14889. var end = function () {
  14890. el.removeEventListener(event, onEnd);
  14891. cb();
  14892. };
  14893. var onEnd = function (e) {
  14894. if (e.target === el) {
  14895. if (++ended >= propCount) {
  14896. end();
  14897. }
  14898. }
  14899. };
  14900. setTimeout(function () {
  14901. if (ended < propCount) {
  14902. end();
  14903. }
  14904. }, timeout + 1);
  14905. el.addEventListener(event, onEnd);
  14906. }
  14907. var transformRE = /\b(transform|all)(,|$)/;
  14908. function getTransitionInfo (el, expectedType) {
  14909. var styles = window.getComputedStyle(el);
  14910. // JSDOM may return undefined for transition properties
  14911. var transitionDelays = (styles[transitionProp + 'Delay'] || '').split(', ');
  14912. var transitionDurations = (styles[transitionProp + 'Duration'] || '').split(', ');
  14913. var transitionTimeout = getTimeout(transitionDelays, transitionDurations);
  14914. var animationDelays = (styles[animationProp + 'Delay'] || '').split(', ');
  14915. var animationDurations = (styles[animationProp + 'Duration'] || '').split(', ');
  14916. var animationTimeout = getTimeout(animationDelays, animationDurations);
  14917. var type;
  14918. var timeout = 0;
  14919. var propCount = 0;
  14920. /* istanbul ignore if */
  14921. if (expectedType === TRANSITION) {
  14922. if (transitionTimeout > 0) {
  14923. type = TRANSITION;
  14924. timeout = transitionTimeout;
  14925. propCount = transitionDurations.length;
  14926. }
  14927. } else if (expectedType === ANIMATION) {
  14928. if (animationTimeout > 0) {
  14929. type = ANIMATION;
  14930. timeout = animationTimeout;
  14931. propCount = animationDurations.length;
  14932. }
  14933. } else {
  14934. timeout = Math.max(transitionTimeout, animationTimeout);
  14935. type = timeout > 0
  14936. ? transitionTimeout > animationTimeout
  14937. ? TRANSITION
  14938. : ANIMATION
  14939. : null;
  14940. propCount = type
  14941. ? type === TRANSITION
  14942. ? transitionDurations.length
  14943. : animationDurations.length
  14944. : 0;
  14945. }
  14946. var hasTransform =
  14947. type === TRANSITION &&
  14948. transformRE.test(styles[transitionProp + 'Property']);
  14949. return {
  14950. type: type,
  14951. timeout: timeout,
  14952. propCount: propCount,
  14953. hasTransform: hasTransform
  14954. }
  14955. }
  14956. function getTimeout (delays, durations) {
  14957. /* istanbul ignore next */
  14958. while (delays.length < durations.length) {
  14959. delays = delays.concat(delays);
  14960. }
  14961. return Math.max.apply(null, durations.map(function (d, i) {
  14962. return toMs(d) + toMs(delays[i])
  14963. }))
  14964. }
  14965. // Old versions of Chromium (below 61.0.3163.100) formats floating pointer numbers
  14966. // in a locale-dependent way, using a comma instead of a dot.
  14967. // If comma is not replaced with a dot, the input will be rounded down (i.e. acting
  14968. // as a floor function) causing unexpected behaviors
  14969. function toMs (s) {
  14970. return Number(s.slice(0, -1).replace(',', '.')) * 1000
  14971. }
  14972. /* */
  14973. function enter (vnode, toggleDisplay) {
  14974. var el = vnode.elm;
  14975. // call leave callback now
  14976. if (isDef(el._leaveCb)) {
  14977. el._leaveCb.cancelled = true;
  14978. el._leaveCb();
  14979. }
  14980. var data = resolveTransition(vnode.data.transition);
  14981. if (isUndef(data)) {
  14982. return
  14983. }
  14984. /* istanbul ignore if */
  14985. if (isDef(el._enterCb) || el.nodeType !== 1) {
  14986. return
  14987. }
  14988. var css = data.css;
  14989. var type = data.type;
  14990. var enterClass = data.enterClass;
  14991. var enterToClass = data.enterToClass;
  14992. var enterActiveClass = data.enterActiveClass;
  14993. var appearClass = data.appearClass;
  14994. var appearToClass = data.appearToClass;
  14995. var appearActiveClass = data.appearActiveClass;
  14996. var beforeEnter = data.beforeEnter;
  14997. var enter = data.enter;
  14998. var afterEnter = data.afterEnter;
  14999. var enterCancelled = data.enterCancelled;
  15000. var beforeAppear = data.beforeAppear;
  15001. var appear = data.appear;
  15002. var afterAppear = data.afterAppear;
  15003. var appearCancelled = data.appearCancelled;
  15004. var duration = data.duration;
  15005. // activeInstance will always be the <transition> component managing this
  15006. // transition. One edge case to check is when the <transition> is placed
  15007. // as the root node of a child component. In that case we need to check
  15008. // <transition>'s parent for appear check.
  15009. var context = activeInstance;
  15010. var transitionNode = activeInstance.$vnode;
  15011. while (transitionNode && transitionNode.parent) {
  15012. context = transitionNode.context;
  15013. transitionNode = transitionNode.parent;
  15014. }
  15015. var isAppear = !context._isMounted || !vnode.isRootInsert;
  15016. if (isAppear && !appear && appear !== '') {
  15017. return
  15018. }
  15019. var startClass = isAppear && appearClass
  15020. ? appearClass
  15021. : enterClass;
  15022. var activeClass = isAppear && appearActiveClass
  15023. ? appearActiveClass
  15024. : enterActiveClass;
  15025. var toClass = isAppear && appearToClass
  15026. ? appearToClass
  15027. : enterToClass;
  15028. var beforeEnterHook = isAppear
  15029. ? (beforeAppear || beforeEnter)
  15030. : beforeEnter;
  15031. var enterHook = isAppear
  15032. ? (typeof appear === 'function' ? appear : enter)
  15033. : enter;
  15034. var afterEnterHook = isAppear
  15035. ? (afterAppear || afterEnter)
  15036. : afterEnter;
  15037. var enterCancelledHook = isAppear
  15038. ? (appearCancelled || enterCancelled)
  15039. : enterCancelled;
  15040. var explicitEnterDuration = toNumber(
  15041. isObject(duration)
  15042. ? duration.enter
  15043. : duration
  15044. );
  15045. if ( true && explicitEnterDuration != null) {
  15046. checkDuration(explicitEnterDuration, 'enter', vnode);
  15047. }
  15048. var expectsCSS = css !== false && !isIE9;
  15049. var userWantsControl = getHookArgumentsLength(enterHook);
  15050. var cb = el._enterCb = once(function () {
  15051. if (expectsCSS) {
  15052. removeTransitionClass(el, toClass);
  15053. removeTransitionClass(el, activeClass);
  15054. }
  15055. if (cb.cancelled) {
  15056. if (expectsCSS) {
  15057. removeTransitionClass(el, startClass);
  15058. }
  15059. enterCancelledHook && enterCancelledHook(el);
  15060. } else {
  15061. afterEnterHook && afterEnterHook(el);
  15062. }
  15063. el._enterCb = null;
  15064. });
  15065. if (!vnode.data.show) {
  15066. // remove pending leave element on enter by injecting an insert hook
  15067. mergeVNodeHook(vnode, 'insert', function () {
  15068. var parent = el.parentNode;
  15069. var pendingNode = parent && parent._pending && parent._pending[vnode.key];
  15070. if (pendingNode &&
  15071. pendingNode.tag === vnode.tag &&
  15072. pendingNode.elm._leaveCb
  15073. ) {
  15074. pendingNode.elm._leaveCb();
  15075. }
  15076. enterHook && enterHook(el, cb);
  15077. });
  15078. }
  15079. // start enter transition
  15080. beforeEnterHook && beforeEnterHook(el);
  15081. if (expectsCSS) {
  15082. addTransitionClass(el, startClass);
  15083. addTransitionClass(el, activeClass);
  15084. nextFrame(function () {
  15085. removeTransitionClass(el, startClass);
  15086. if (!cb.cancelled) {
  15087. addTransitionClass(el, toClass);
  15088. if (!userWantsControl) {
  15089. if (isValidDuration(explicitEnterDuration)) {
  15090. setTimeout(cb, explicitEnterDuration);
  15091. } else {
  15092. whenTransitionEnds(el, type, cb);
  15093. }
  15094. }
  15095. }
  15096. });
  15097. }
  15098. if (vnode.data.show) {
  15099. toggleDisplay && toggleDisplay();
  15100. enterHook && enterHook(el, cb);
  15101. }
  15102. if (!expectsCSS && !userWantsControl) {
  15103. cb();
  15104. }
  15105. }
  15106. function leave (vnode, rm) {
  15107. var el = vnode.elm;
  15108. // call enter callback now
  15109. if (isDef(el._enterCb)) {
  15110. el._enterCb.cancelled = true;
  15111. el._enterCb();
  15112. }
  15113. var data = resolveTransition(vnode.data.transition);
  15114. if (isUndef(data) || el.nodeType !== 1) {
  15115. return rm()
  15116. }
  15117. /* istanbul ignore if */
  15118. if (isDef(el._leaveCb)) {
  15119. return
  15120. }
  15121. var css = data.css;
  15122. var type = data.type;
  15123. var leaveClass = data.leaveClass;
  15124. var leaveToClass = data.leaveToClass;
  15125. var leaveActiveClass = data.leaveActiveClass;
  15126. var beforeLeave = data.beforeLeave;
  15127. var leave = data.leave;
  15128. var afterLeave = data.afterLeave;
  15129. var leaveCancelled = data.leaveCancelled;
  15130. var delayLeave = data.delayLeave;
  15131. var duration = data.duration;
  15132. var expectsCSS = css !== false && !isIE9;
  15133. var userWantsControl = getHookArgumentsLength(leave);
  15134. var explicitLeaveDuration = toNumber(
  15135. isObject(duration)
  15136. ? duration.leave
  15137. : duration
  15138. );
  15139. if ( true && isDef(explicitLeaveDuration)) {
  15140. checkDuration(explicitLeaveDuration, 'leave', vnode);
  15141. }
  15142. var cb = el._leaveCb = once(function () {
  15143. if (el.parentNode && el.parentNode._pending) {
  15144. el.parentNode._pending[vnode.key] = null;
  15145. }
  15146. if (expectsCSS) {
  15147. removeTransitionClass(el, leaveToClass);
  15148. removeTransitionClass(el, leaveActiveClass);
  15149. }
  15150. if (cb.cancelled) {
  15151. if (expectsCSS) {
  15152. removeTransitionClass(el, leaveClass);
  15153. }
  15154. leaveCancelled && leaveCancelled(el);
  15155. } else {
  15156. rm();
  15157. afterLeave && afterLeave(el);
  15158. }
  15159. el._leaveCb = null;
  15160. });
  15161. if (delayLeave) {
  15162. delayLeave(performLeave);
  15163. } else {
  15164. performLeave();
  15165. }
  15166. function performLeave () {
  15167. // the delayed leave may have already been cancelled
  15168. if (cb.cancelled) {
  15169. return
  15170. }
  15171. // record leaving element
  15172. if (!vnode.data.show && el.parentNode) {
  15173. (el.parentNode._pending || (el.parentNode._pending = {}))[(vnode.key)] = vnode;
  15174. }
  15175. beforeLeave && beforeLeave(el);
  15176. if (expectsCSS) {
  15177. addTransitionClass(el, leaveClass);
  15178. addTransitionClass(el, leaveActiveClass);
  15179. nextFrame(function () {
  15180. removeTransitionClass(el, leaveClass);
  15181. if (!cb.cancelled) {
  15182. addTransitionClass(el, leaveToClass);
  15183. if (!userWantsControl) {
  15184. if (isValidDuration(explicitLeaveDuration)) {
  15185. setTimeout(cb, explicitLeaveDuration);
  15186. } else {
  15187. whenTransitionEnds(el, type, cb);
  15188. }
  15189. }
  15190. }
  15191. });
  15192. }
  15193. leave && leave(el, cb);
  15194. if (!expectsCSS && !userWantsControl) {
  15195. cb();
  15196. }
  15197. }
  15198. }
  15199. // only used in dev mode
  15200. function checkDuration (val, name, vnode) {
  15201. if (typeof val !== 'number') {
  15202. warn(
  15203. "<transition> explicit " + name + " duration is not a valid number - " +
  15204. "got " + (JSON.stringify(val)) + ".",
  15205. vnode.context
  15206. );
  15207. } else if (isNaN(val)) {
  15208. warn(
  15209. "<transition> explicit " + name + " duration is NaN - " +
  15210. 'the duration expression might be incorrect.',
  15211. vnode.context
  15212. );
  15213. }
  15214. }
  15215. function isValidDuration (val) {
  15216. return typeof val === 'number' && !isNaN(val)
  15217. }
  15218. /**
  15219. * Normalize a transition hook's argument length. The hook may be:
  15220. * - a merged hook (invoker) with the original in .fns
  15221. * - a wrapped component method (check ._length)
  15222. * - a plain function (.length)
  15223. */
  15224. function getHookArgumentsLength (fn) {
  15225. if (isUndef(fn)) {
  15226. return false
  15227. }
  15228. var invokerFns = fn.fns;
  15229. if (isDef(invokerFns)) {
  15230. // invoker
  15231. return getHookArgumentsLength(
  15232. Array.isArray(invokerFns)
  15233. ? invokerFns[0]
  15234. : invokerFns
  15235. )
  15236. } else {
  15237. return (fn._length || fn.length) > 1
  15238. }
  15239. }
  15240. function _enter (_, vnode) {
  15241. if (vnode.data.show !== true) {
  15242. enter(vnode);
  15243. }
  15244. }
  15245. var transition = inBrowser ? {
  15246. create: _enter,
  15247. activate: _enter,
  15248. remove: function remove$$1 (vnode, rm) {
  15249. /* istanbul ignore else */
  15250. if (vnode.data.show !== true) {
  15251. leave(vnode, rm);
  15252. } else {
  15253. rm();
  15254. }
  15255. }
  15256. } : {};
  15257. var platformModules = [
  15258. attrs,
  15259. klass,
  15260. events,
  15261. domProps,
  15262. style,
  15263. transition
  15264. ];
  15265. /* */
  15266. // the directive module should be applied last, after all
  15267. // built-in modules have been applied.
  15268. var modules = platformModules.concat(baseModules);
  15269. var patch = createPatchFunction({ nodeOps: nodeOps, modules: modules });
  15270. /**
  15271. * Not type checking this file because flow doesn't like attaching
  15272. * properties to Elements.
  15273. */
  15274. /* istanbul ignore if */
  15275. if (isIE9) {
  15276. // http://www.matts411.com/post/internet-explorer-9-oninput/
  15277. document.addEventListener('selectionchange', function () {
  15278. var el = document.activeElement;
  15279. if (el && el.vmodel) {
  15280. trigger(el, 'input');
  15281. }
  15282. });
  15283. }
  15284. var directive = {
  15285. inserted: function inserted (el, binding, vnode, oldVnode) {
  15286. if (vnode.tag === 'select') {
  15287. // #6903
  15288. if (oldVnode.elm && !oldVnode.elm._vOptions) {
  15289. mergeVNodeHook(vnode, 'postpatch', function () {
  15290. directive.componentUpdated(el, binding, vnode);
  15291. });
  15292. } else {
  15293. setSelected(el, binding, vnode.context);
  15294. }
  15295. el._vOptions = [].map.call(el.options, getValue);
  15296. } else if (vnode.tag === 'textarea' || isTextInputType(el.type)) {
  15297. el._vModifiers = binding.modifiers;
  15298. if (!binding.modifiers.lazy) {
  15299. el.addEventListener('compositionstart', onCompositionStart);
  15300. el.addEventListener('compositionend', onCompositionEnd);
  15301. // Safari < 10.2 & UIWebView doesn't fire compositionend when
  15302. // switching focus before confirming composition choice
  15303. // this also fixes the issue where some browsers e.g. iOS Chrome
  15304. // fires "change" instead of "input" on autocomplete.
  15305. el.addEventListener('change', onCompositionEnd);
  15306. /* istanbul ignore if */
  15307. if (isIE9) {
  15308. el.vmodel = true;
  15309. }
  15310. }
  15311. }
  15312. },
  15313. componentUpdated: function componentUpdated (el, binding, vnode) {
  15314. if (vnode.tag === 'select') {
  15315. setSelected(el, binding, vnode.context);
  15316. // in case the options rendered by v-for have changed,
  15317. // it's possible that the value is out-of-sync with the rendered options.
  15318. // detect such cases and filter out values that no longer has a matching
  15319. // option in the DOM.
  15320. var prevOptions = el._vOptions;
  15321. var curOptions = el._vOptions = [].map.call(el.options, getValue);
  15322. if (curOptions.some(function (o, i) { return !looseEqual(o, prevOptions[i]); })) {
  15323. // trigger change event if
  15324. // no matching option found for at least one value
  15325. var needReset = el.multiple
  15326. ? binding.value.some(function (v) { return hasNoMatchingOption(v, curOptions); })
  15327. : binding.value !== binding.oldValue && hasNoMatchingOption(binding.value, curOptions);
  15328. if (needReset) {
  15329. trigger(el, 'change');
  15330. }
  15331. }
  15332. }
  15333. }
  15334. };
  15335. function setSelected (el, binding, vm) {
  15336. actuallySetSelected(el, binding, vm);
  15337. /* istanbul ignore if */
  15338. if (isIE || isEdge) {
  15339. setTimeout(function () {
  15340. actuallySetSelected(el, binding, vm);
  15341. }, 0);
  15342. }
  15343. }
  15344. function actuallySetSelected (el, binding, vm) {
  15345. var value = binding.value;
  15346. var isMultiple = el.multiple;
  15347. if (isMultiple && !Array.isArray(value)) {
  15348. true && warn(
  15349. "<select multiple v-model=\"" + (binding.expression) + "\"> " +
  15350. "expects an Array value for its binding, but got " + (Object.prototype.toString.call(value).slice(8, -1)),
  15351. vm
  15352. );
  15353. return
  15354. }
  15355. var selected, option;
  15356. for (var i = 0, l = el.options.length; i < l; i++) {
  15357. option = el.options[i];
  15358. if (isMultiple) {
  15359. selected = looseIndexOf(value, getValue(option)) > -1;
  15360. if (option.selected !== selected) {
  15361. option.selected = selected;
  15362. }
  15363. } else {
  15364. if (looseEqual(getValue(option), value)) {
  15365. if (el.selectedIndex !== i) {
  15366. el.selectedIndex = i;
  15367. }
  15368. return
  15369. }
  15370. }
  15371. }
  15372. if (!isMultiple) {
  15373. el.selectedIndex = -1;
  15374. }
  15375. }
  15376. function hasNoMatchingOption (value, options) {
  15377. return options.every(function (o) { return !looseEqual(o, value); })
  15378. }
  15379. function getValue (option) {
  15380. return '_value' in option
  15381. ? option._value
  15382. : option.value
  15383. }
  15384. function onCompositionStart (e) {
  15385. e.target.composing = true;
  15386. }
  15387. function onCompositionEnd (e) {
  15388. // prevent triggering an input event for no reason
  15389. if (!e.target.composing) { return }
  15390. e.target.composing = false;
  15391. trigger(e.target, 'input');
  15392. }
  15393. function trigger (el, type) {
  15394. var e = document.createEvent('HTMLEvents');
  15395. e.initEvent(type, true, true);
  15396. el.dispatchEvent(e);
  15397. }
  15398. /* */
  15399. // recursively search for possible transition defined inside the component root
  15400. function locateNode (vnode) {
  15401. return vnode.componentInstance && (!vnode.data || !vnode.data.transition)
  15402. ? locateNode(vnode.componentInstance._vnode)
  15403. : vnode
  15404. }
  15405. var show = {
  15406. bind: function bind (el, ref, vnode) {
  15407. var value = ref.value;
  15408. vnode = locateNode(vnode);
  15409. var transition$$1 = vnode.data && vnode.data.transition;
  15410. var originalDisplay = el.__vOriginalDisplay =
  15411. el.style.display === 'none' ? '' : el.style.display;
  15412. if (value && transition$$1) {
  15413. vnode.data.show = true;
  15414. enter(vnode, function () {
  15415. el.style.display = originalDisplay;
  15416. });
  15417. } else {
  15418. el.style.display = value ? originalDisplay : 'none';
  15419. }
  15420. },
  15421. update: function update (el, ref, vnode) {
  15422. var value = ref.value;
  15423. var oldValue = ref.oldValue;
  15424. /* istanbul ignore if */
  15425. if (!value === !oldValue) { return }
  15426. vnode = locateNode(vnode);
  15427. var transition$$1 = vnode.data && vnode.data.transition;
  15428. if (transition$$1) {
  15429. vnode.data.show = true;
  15430. if (value) {
  15431. enter(vnode, function () {
  15432. el.style.display = el.__vOriginalDisplay;
  15433. });
  15434. } else {
  15435. leave(vnode, function () {
  15436. el.style.display = 'none';
  15437. });
  15438. }
  15439. } else {
  15440. el.style.display = value ? el.__vOriginalDisplay : 'none';
  15441. }
  15442. },
  15443. unbind: function unbind (
  15444. el,
  15445. binding,
  15446. vnode,
  15447. oldVnode,
  15448. isDestroy
  15449. ) {
  15450. if (!isDestroy) {
  15451. el.style.display = el.__vOriginalDisplay;
  15452. }
  15453. }
  15454. };
  15455. var platformDirectives = {
  15456. model: directive,
  15457. show: show
  15458. };
  15459. /* */
  15460. var transitionProps = {
  15461. name: String,
  15462. appear: Boolean,
  15463. css: Boolean,
  15464. mode: String,
  15465. type: String,
  15466. enterClass: String,
  15467. leaveClass: String,
  15468. enterToClass: String,
  15469. leaveToClass: String,
  15470. enterActiveClass: String,
  15471. leaveActiveClass: String,
  15472. appearClass: String,
  15473. appearActiveClass: String,
  15474. appearToClass: String,
  15475. duration: [Number, String, Object]
  15476. };
  15477. // in case the child is also an abstract component, e.g. <keep-alive>
  15478. // we want to recursively retrieve the real component to be rendered
  15479. function getRealChild (vnode) {
  15480. var compOptions = vnode && vnode.componentOptions;
  15481. if (compOptions && compOptions.Ctor.options.abstract) {
  15482. return getRealChild(getFirstComponentChild(compOptions.children))
  15483. } else {
  15484. return vnode
  15485. }
  15486. }
  15487. function extractTransitionData (comp) {
  15488. var data = {};
  15489. var options = comp.$options;
  15490. // props
  15491. for (var key in options.propsData) {
  15492. data[key] = comp[key];
  15493. }
  15494. // events.
  15495. // extract listeners and pass them directly to the transition methods
  15496. var listeners = options._parentListeners;
  15497. for (var key$1 in listeners) {
  15498. data[camelize(key$1)] = listeners[key$1];
  15499. }
  15500. return data
  15501. }
  15502. function placeholder (h, rawChild) {
  15503. if (/\d-keep-alive$/.test(rawChild.tag)) {
  15504. return h('keep-alive', {
  15505. props: rawChild.componentOptions.propsData
  15506. })
  15507. }
  15508. }
  15509. function hasParentTransition (vnode) {
  15510. while ((vnode = vnode.parent)) {
  15511. if (vnode.data.transition) {
  15512. return true
  15513. }
  15514. }
  15515. }
  15516. function isSameChild (child, oldChild) {
  15517. return oldChild.key === child.key && oldChild.tag === child.tag
  15518. }
  15519. var isNotTextNode = function (c) { return c.tag || isAsyncPlaceholder(c); };
  15520. var isVShowDirective = function (d) { return d.name === 'show'; };
  15521. var Transition = {
  15522. name: 'transition',
  15523. props: transitionProps,
  15524. abstract: true,
  15525. render: function render (h) {
  15526. var this$1 = this;
  15527. var children = this.$slots.default;
  15528. if (!children) {
  15529. return
  15530. }
  15531. // filter out text nodes (possible whitespaces)
  15532. children = children.filter(isNotTextNode);
  15533. /* istanbul ignore if */
  15534. if (!children.length) {
  15535. return
  15536. }
  15537. // warn multiple elements
  15538. if ( true && children.length > 1) {
  15539. warn(
  15540. '<transition> can only be used on a single element. Use ' +
  15541. '<transition-group> for lists.',
  15542. this.$parent
  15543. );
  15544. }
  15545. var mode = this.mode;
  15546. // warn invalid mode
  15547. if ( true &&
  15548. mode && mode !== 'in-out' && mode !== 'out-in'
  15549. ) {
  15550. warn(
  15551. 'invalid <transition> mode: ' + mode,
  15552. this.$parent
  15553. );
  15554. }
  15555. var rawChild = children[0];
  15556. // if this is a component root node and the component's
  15557. // parent container node also has transition, skip.
  15558. if (hasParentTransition(this.$vnode)) {
  15559. return rawChild
  15560. }
  15561. // apply transition data to child
  15562. // use getRealChild() to ignore abstract components e.g. keep-alive
  15563. var child = getRealChild(rawChild);
  15564. /* istanbul ignore if */
  15565. if (!child) {
  15566. return rawChild
  15567. }
  15568. if (this._leaving) {
  15569. return placeholder(h, rawChild)
  15570. }
  15571. // ensure a key that is unique to the vnode type and to this transition
  15572. // component instance. This key will be used to remove pending leaving nodes
  15573. // during entering.
  15574. var id = "__transition-" + (this._uid) + "-";
  15575. child.key = child.key == null
  15576. ? child.isComment
  15577. ? id + 'comment'
  15578. : id + child.tag
  15579. : isPrimitive(child.key)
  15580. ? (String(child.key).indexOf(id) === 0 ? child.key : id + child.key)
  15581. : child.key;
  15582. var data = (child.data || (child.data = {})).transition = extractTransitionData(this);
  15583. var oldRawChild = this._vnode;
  15584. var oldChild = getRealChild(oldRawChild);
  15585. // mark v-show
  15586. // so that the transition module can hand over the control to the directive
  15587. if (child.data.directives && child.data.directives.some(isVShowDirective)) {
  15588. child.data.show = true;
  15589. }
  15590. if (
  15591. oldChild &&
  15592. oldChild.data &&
  15593. !isSameChild(child, oldChild) &&
  15594. !isAsyncPlaceholder(oldChild) &&
  15595. // #6687 component root is a comment node
  15596. !(oldChild.componentInstance && oldChild.componentInstance._vnode.isComment)
  15597. ) {
  15598. // replace old child transition data with fresh one
  15599. // important for dynamic transitions!
  15600. var oldData = oldChild.data.transition = extend({}, data);
  15601. // handle transition mode
  15602. if (mode === 'out-in') {
  15603. // return placeholder node and queue update when leave finishes
  15604. this._leaving = true;
  15605. mergeVNodeHook(oldData, 'afterLeave', function () {
  15606. this$1._leaving = false;
  15607. this$1.$forceUpdate();
  15608. });
  15609. return placeholder(h, rawChild)
  15610. } else if (mode === 'in-out') {
  15611. if (isAsyncPlaceholder(child)) {
  15612. return oldRawChild
  15613. }
  15614. var delayedLeave;
  15615. var performLeave = function () { delayedLeave(); };
  15616. mergeVNodeHook(data, 'afterEnter', performLeave);
  15617. mergeVNodeHook(data, 'enterCancelled', performLeave);
  15618. mergeVNodeHook(oldData, 'delayLeave', function (leave) { delayedLeave = leave; });
  15619. }
  15620. }
  15621. return rawChild
  15622. }
  15623. };
  15624. /* */
  15625. var props = extend({
  15626. tag: String,
  15627. moveClass: String
  15628. }, transitionProps);
  15629. delete props.mode;
  15630. var TransitionGroup = {
  15631. props: props,
  15632. beforeMount: function beforeMount () {
  15633. var this$1 = this;
  15634. var update = this._update;
  15635. this._update = function (vnode, hydrating) {
  15636. var restoreActiveInstance = setActiveInstance(this$1);
  15637. // force removing pass
  15638. this$1.__patch__(
  15639. this$1._vnode,
  15640. this$1.kept,
  15641. false, // hydrating
  15642. true // removeOnly (!important, avoids unnecessary moves)
  15643. );
  15644. this$1._vnode = this$1.kept;
  15645. restoreActiveInstance();
  15646. update.call(this$1, vnode, hydrating);
  15647. };
  15648. },
  15649. render: function render (h) {
  15650. var tag = this.tag || this.$vnode.data.tag || 'span';
  15651. var map = Object.create(null);
  15652. var prevChildren = this.prevChildren = this.children;
  15653. var rawChildren = this.$slots.default || [];
  15654. var children = this.children = [];
  15655. var transitionData = extractTransitionData(this);
  15656. for (var i = 0; i < rawChildren.length; i++) {
  15657. var c = rawChildren[i];
  15658. if (c.tag) {
  15659. if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {
  15660. children.push(c);
  15661. map[c.key] = c
  15662. ;(c.data || (c.data = {})).transition = transitionData;
  15663. } else if (true) {
  15664. var opts = c.componentOptions;
  15665. var name = opts ? (opts.Ctor.options.name || opts.tag || '') : c.tag;
  15666. warn(("<transition-group> children must be keyed: <" + name + ">"));
  15667. }
  15668. }
  15669. }
  15670. if (prevChildren) {
  15671. var kept = [];
  15672. var removed = [];
  15673. for (var i$1 = 0; i$1 < prevChildren.length; i$1++) {
  15674. var c$1 = prevChildren[i$1];
  15675. c$1.data.transition = transitionData;
  15676. c$1.data.pos = c$1.elm.getBoundingClientRect();
  15677. if (map[c$1.key]) {
  15678. kept.push(c$1);
  15679. } else {
  15680. removed.push(c$1);
  15681. }
  15682. }
  15683. this.kept = h(tag, null, kept);
  15684. this.removed = removed;
  15685. }
  15686. return h(tag, null, children)
  15687. },
  15688. updated: function updated () {
  15689. var children = this.prevChildren;
  15690. var moveClass = this.moveClass || ((this.name || 'v') + '-move');
  15691. if (!children.length || !this.hasMove(children[0].elm, moveClass)) {
  15692. return
  15693. }
  15694. // we divide the work into three loops to avoid mixing DOM reads and writes
  15695. // in each iteration - which helps prevent layout thrashing.
  15696. children.forEach(callPendingCbs);
  15697. children.forEach(recordPosition);
  15698. children.forEach(applyTranslation);
  15699. // force reflow to put everything in position
  15700. // assign to this to avoid being removed in tree-shaking
  15701. // $flow-disable-line
  15702. this._reflow = document.body.offsetHeight;
  15703. children.forEach(function (c) {
  15704. if (c.data.moved) {
  15705. var el = c.elm;
  15706. var s = el.style;
  15707. addTransitionClass(el, moveClass);
  15708. s.transform = s.WebkitTransform = s.transitionDuration = '';
  15709. el.addEventListener(transitionEndEvent, el._moveCb = function cb (e) {
  15710. if (e && e.target !== el) {
  15711. return
  15712. }
  15713. if (!e || /transform$/.test(e.propertyName)) {
  15714. el.removeEventListener(transitionEndEvent, cb);
  15715. el._moveCb = null;
  15716. removeTransitionClass(el, moveClass);
  15717. }
  15718. });
  15719. }
  15720. });
  15721. },
  15722. methods: {
  15723. hasMove: function hasMove (el, moveClass) {
  15724. /* istanbul ignore if */
  15725. if (!hasTransition) {
  15726. return false
  15727. }
  15728. /* istanbul ignore if */
  15729. if (this._hasMove) {
  15730. return this._hasMove
  15731. }
  15732. // Detect whether an element with the move class applied has
  15733. // CSS transitions. Since the element may be inside an entering
  15734. // transition at this very moment, we make a clone of it and remove
  15735. // all other transition classes applied to ensure only the move class
  15736. // is applied.
  15737. var clone = el.cloneNode();
  15738. if (el._transitionClasses) {
  15739. el._transitionClasses.forEach(function (cls) { removeClass(clone, cls); });
  15740. }
  15741. addClass(clone, moveClass);
  15742. clone.style.display = 'none';
  15743. this.$el.appendChild(clone);
  15744. var info = getTransitionInfo(clone);
  15745. this.$el.removeChild(clone);
  15746. return (this._hasMove = info.hasTransform)
  15747. }
  15748. }
  15749. };
  15750. function callPendingCbs (c) {
  15751. /* istanbul ignore if */
  15752. if (c.elm._moveCb) {
  15753. c.elm._moveCb();
  15754. }
  15755. /* istanbul ignore if */
  15756. if (c.elm._enterCb) {
  15757. c.elm._enterCb();
  15758. }
  15759. }
  15760. function recordPosition (c) {
  15761. c.data.newPos = c.elm.getBoundingClientRect();
  15762. }
  15763. function applyTranslation (c) {
  15764. var oldPos = c.data.pos;
  15765. var newPos = c.data.newPos;
  15766. var dx = oldPos.left - newPos.left;
  15767. var dy = oldPos.top - newPos.top;
  15768. if (dx || dy) {
  15769. c.data.moved = true;
  15770. var s = c.elm.style;
  15771. s.transform = s.WebkitTransform = "translate(" + dx + "px," + dy + "px)";
  15772. s.transitionDuration = '0s';
  15773. }
  15774. }
  15775. var platformComponents = {
  15776. Transition: Transition,
  15777. TransitionGroup: TransitionGroup
  15778. };
  15779. /* */
  15780. // install platform specific utils
  15781. Vue.config.mustUseProp = mustUseProp;
  15782. Vue.config.isReservedTag = isReservedTag;
  15783. Vue.config.isReservedAttr = isReservedAttr;
  15784. Vue.config.getTagNamespace = getTagNamespace;
  15785. Vue.config.isUnknownElement = isUnknownElement;
  15786. // install platform runtime directives & components
  15787. extend(Vue.options.directives, platformDirectives);
  15788. extend(Vue.options.components, platformComponents);
  15789. // install platform patch function
  15790. Vue.prototype.__patch__ = inBrowser ? patch : noop;
  15791. // public mount method
  15792. Vue.prototype.$mount = function (
  15793. el,
  15794. hydrating
  15795. ) {
  15796. el = el && inBrowser ? query(el) : undefined;
  15797. return mountComponent(this, el, hydrating)
  15798. };
  15799. // devtools global hook
  15800. /* istanbul ignore next */
  15801. if (inBrowser) {
  15802. setTimeout(function () {
  15803. if (config.devtools) {
  15804. if (devtools) {
  15805. devtools.emit('init', Vue);
  15806. } else if (
  15807. true
  15808. ) {
  15809. console[console.info ? 'info' : 'log'](
  15810. 'Download the Vue Devtools extension for a better development experience:\n' +
  15811. 'https://github.com/vuejs/vue-devtools'
  15812. );
  15813. }
  15814. }
  15815. if ( true &&
  15816. config.productionTip !== false &&
  15817. typeof console !== 'undefined'
  15818. ) {
  15819. console[console.info ? 'info' : 'log'](
  15820. "You are running Vue in development mode.\n" +
  15821. "Make sure to turn on production mode when deploying for production.\n" +
  15822. "See more tips at https://vuejs.org/guide/deployment.html"
  15823. );
  15824. }
  15825. }, 0);
  15826. }
  15827. /* */
  15828. var defaultTagRE = /\{\{((?:.|\r?\n)+?)\}\}/g;
  15829. var regexEscapeRE = /[-.*+?^${}()|[\]\/\\]/g;
  15830. var buildRegex = cached(function (delimiters) {
  15831. var open = delimiters[0].replace(regexEscapeRE, '\\$&');
  15832. var close = delimiters[1].replace(regexEscapeRE, '\\$&');
  15833. return new RegExp(open + '((?:.|\\n)+?)' + close, 'g')
  15834. });
  15835. function parseText (
  15836. text,
  15837. delimiters
  15838. ) {
  15839. var tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE;
  15840. if (!tagRE.test(text)) {
  15841. return
  15842. }
  15843. var tokens = [];
  15844. var rawTokens = [];
  15845. var lastIndex = tagRE.lastIndex = 0;
  15846. var match, index, tokenValue;
  15847. while ((match = tagRE.exec(text))) {
  15848. index = match.index;
  15849. // push text token
  15850. if (index > lastIndex) {
  15851. rawTokens.push(tokenValue = text.slice(lastIndex, index));
  15852. tokens.push(JSON.stringify(tokenValue));
  15853. }
  15854. // tag token
  15855. var exp = parseFilters(match[1].trim());
  15856. tokens.push(("_s(" + exp + ")"));
  15857. rawTokens.push({ '@binding': exp });
  15858. lastIndex = index + match[0].length;
  15859. }
  15860. if (lastIndex < text.length) {
  15861. rawTokens.push(tokenValue = text.slice(lastIndex));
  15862. tokens.push(JSON.stringify(tokenValue));
  15863. }
  15864. return {
  15865. expression: tokens.join('+'),
  15866. tokens: rawTokens
  15867. }
  15868. }
  15869. /* */
  15870. function transformNode (el, options) {
  15871. var warn = options.warn || baseWarn;
  15872. var staticClass = getAndRemoveAttr(el, 'class');
  15873. if ( true && staticClass) {
  15874. var res = parseText(staticClass, options.delimiters);
  15875. if (res) {
  15876. warn(
  15877. "class=\"" + staticClass + "\": " +
  15878. 'Interpolation inside attributes has been removed. ' +
  15879. 'Use v-bind or the colon shorthand instead. For example, ' +
  15880. 'instead of <div class="{{ val }}">, use <div :class="val">.',
  15881. el.rawAttrsMap['class']
  15882. );
  15883. }
  15884. }
  15885. if (staticClass) {
  15886. el.staticClass = JSON.stringify(staticClass);
  15887. }
  15888. var classBinding = getBindingAttr(el, 'class', false /* getStatic */);
  15889. if (classBinding) {
  15890. el.classBinding = classBinding;
  15891. }
  15892. }
  15893. function genData (el) {
  15894. var data = '';
  15895. if (el.staticClass) {
  15896. data += "staticClass:" + (el.staticClass) + ",";
  15897. }
  15898. if (el.classBinding) {
  15899. data += "class:" + (el.classBinding) + ",";
  15900. }
  15901. return data
  15902. }
  15903. var klass$1 = {
  15904. staticKeys: ['staticClass'],
  15905. transformNode: transformNode,
  15906. genData: genData
  15907. };
  15908. /* */
  15909. function transformNode$1 (el, options) {
  15910. var warn = options.warn || baseWarn;
  15911. var staticStyle = getAndRemoveAttr(el, 'style');
  15912. if (staticStyle) {
  15913. /* istanbul ignore if */
  15914. if (true) {
  15915. var res = parseText(staticStyle, options.delimiters);
  15916. if (res) {
  15917. warn(
  15918. "style=\"" + staticStyle + "\": " +
  15919. 'Interpolation inside attributes has been removed. ' +
  15920. 'Use v-bind or the colon shorthand instead. For example, ' +
  15921. 'instead of <div style="{{ val }}">, use <div :style="val">.',
  15922. el.rawAttrsMap['style']
  15923. );
  15924. }
  15925. }
  15926. el.staticStyle = JSON.stringify(parseStyleText(staticStyle));
  15927. }
  15928. var styleBinding = getBindingAttr(el, 'style', false /* getStatic */);
  15929. if (styleBinding) {
  15930. el.styleBinding = styleBinding;
  15931. }
  15932. }
  15933. function genData$1 (el) {
  15934. var data = '';
  15935. if (el.staticStyle) {
  15936. data += "staticStyle:" + (el.staticStyle) + ",";
  15937. }
  15938. if (el.styleBinding) {
  15939. data += "style:(" + (el.styleBinding) + "),";
  15940. }
  15941. return data
  15942. }
  15943. var style$1 = {
  15944. staticKeys: ['staticStyle'],
  15945. transformNode: transformNode$1,
  15946. genData: genData$1
  15947. };
  15948. /* */
  15949. var decoder;
  15950. var he = {
  15951. decode: function decode (html) {
  15952. decoder = decoder || document.createElement('div');
  15953. decoder.innerHTML = html;
  15954. return decoder.textContent
  15955. }
  15956. };
  15957. /* */
  15958. var isUnaryTag = makeMap(
  15959. 'area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +
  15960. 'link,meta,param,source,track,wbr'
  15961. );
  15962. // Elements that you can, intentionally, leave open
  15963. // (and which close themselves)
  15964. var canBeLeftOpenTag = makeMap(
  15965. 'colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source'
  15966. );
  15967. // HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3
  15968. // Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content
  15969. var isNonPhrasingTag = makeMap(
  15970. 'address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' +
  15971. 'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' +
  15972. 'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' +
  15973. 'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' +
  15974. 'title,tr,track'
  15975. );
  15976. /**
  15977. * Not type-checking this file because it's mostly vendor code.
  15978. */
  15979. // Regular Expressions for parsing tags and attributes
  15980. var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
  15981. var dynamicArgAttribute = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+?\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
  15982. var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z" + (unicodeRegExp.source) + "]*";
  15983. var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")";
  15984. var startTagOpen = new RegExp(("^<" + qnameCapture));
  15985. var startTagClose = /^\s*(\/?)>/;
  15986. var endTag = new RegExp(("^<\\/" + qnameCapture + "[^>]*>"));
  15987. var doctype = /^<!DOCTYPE [^>]+>/i;
  15988. // #7298: escape - to avoid being passed as HTML comment when inlined in page
  15989. var comment = /^<!\--/;
  15990. var conditionalComment = /^<!\[/;
  15991. // Special Elements (can contain anything)
  15992. var isPlainTextElement = makeMap('script,style,textarea', true);
  15993. var reCache = {};
  15994. var decodingMap = {
  15995. '&lt;': '<',
  15996. '&gt;': '>',
  15997. '&quot;': '"',
  15998. '&amp;': '&',
  15999. '&#10;': '\n',
  16000. '&#9;': '\t',
  16001. '&#39;': "'"
  16002. };
  16003. var encodedAttr = /&(?:lt|gt|quot|amp|#39);/g;
  16004. var encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#39|#10|#9);/g;
  16005. // #5992
  16006. var isIgnoreNewlineTag = makeMap('pre,textarea', true);
  16007. var shouldIgnoreFirstNewline = function (tag, html) { return tag && isIgnoreNewlineTag(tag) && html[0] === '\n'; };
  16008. function decodeAttr (value, shouldDecodeNewlines) {
  16009. var re = shouldDecodeNewlines ? encodedAttrWithNewLines : encodedAttr;
  16010. return value.replace(re, function (match) { return decodingMap[match]; })
  16011. }
  16012. function parseHTML (html, options) {
  16013. var stack = [];
  16014. var expectHTML = options.expectHTML;
  16015. var isUnaryTag$$1 = options.isUnaryTag || no;
  16016. var canBeLeftOpenTag$$1 = options.canBeLeftOpenTag || no;
  16017. var index = 0;
  16018. var last, lastTag;
  16019. while (html) {
  16020. last = html;
  16021. // Make sure we're not in a plaintext content element like script/style
  16022. if (!lastTag || !isPlainTextElement(lastTag)) {
  16023. var textEnd = html.indexOf('<');
  16024. if (textEnd === 0) {
  16025. // Comment:
  16026. if (comment.test(html)) {
  16027. var commentEnd = html.indexOf('-->');
  16028. if (commentEnd >= 0) {
  16029. if (options.shouldKeepComment) {
  16030. options.comment(html.substring(4, commentEnd), index, index + commentEnd + 3);
  16031. }
  16032. advance(commentEnd + 3);
  16033. continue
  16034. }
  16035. }
  16036. // http://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment
  16037. if (conditionalComment.test(html)) {
  16038. var conditionalEnd = html.indexOf(']>');
  16039. if (conditionalEnd >= 0) {
  16040. advance(conditionalEnd + 2);
  16041. continue
  16042. }
  16043. }
  16044. // Doctype:
  16045. var doctypeMatch = html.match(doctype);
  16046. if (doctypeMatch) {
  16047. advance(doctypeMatch[0].length);
  16048. continue
  16049. }
  16050. // End tag:
  16051. var endTagMatch = html.match(endTag);
  16052. if (endTagMatch) {
  16053. var curIndex = index;
  16054. advance(endTagMatch[0].length);
  16055. parseEndTag(endTagMatch[1], curIndex, index);
  16056. continue
  16057. }
  16058. // Start tag:
  16059. var startTagMatch = parseStartTag();
  16060. if (startTagMatch) {
  16061. handleStartTag(startTagMatch);
  16062. if (shouldIgnoreFirstNewline(startTagMatch.tagName, html)) {
  16063. advance(1);
  16064. }
  16065. continue
  16066. }
  16067. }
  16068. var text = (void 0), rest = (void 0), next = (void 0);
  16069. if (textEnd >= 0) {
  16070. rest = html.slice(textEnd);
  16071. while (
  16072. !endTag.test(rest) &&
  16073. !startTagOpen.test(rest) &&
  16074. !comment.test(rest) &&
  16075. !conditionalComment.test(rest)
  16076. ) {
  16077. // < in plain text, be forgiving and treat it as text
  16078. next = rest.indexOf('<', 1);
  16079. if (next < 0) { break }
  16080. textEnd += next;
  16081. rest = html.slice(textEnd);
  16082. }
  16083. text = html.substring(0, textEnd);
  16084. }
  16085. if (textEnd < 0) {
  16086. text = html;
  16087. }
  16088. if (text) {
  16089. advance(text.length);
  16090. }
  16091. if (options.chars && text) {
  16092. options.chars(text, index - text.length, index);
  16093. }
  16094. } else {
  16095. var endTagLength = 0;
  16096. var stackedTag = lastTag.toLowerCase();
  16097. var reStackedTag = reCache[stackedTag] || (reCache[stackedTag] = new RegExp('([\\s\\S]*?)(</' + stackedTag + '[^>]*>)', 'i'));
  16098. var rest$1 = html.replace(reStackedTag, function (all, text, endTag) {
  16099. endTagLength = endTag.length;
  16100. if (!isPlainTextElement(stackedTag) && stackedTag !== 'noscript') {
  16101. text = text
  16102. .replace(/<!\--([\s\S]*?)-->/g, '$1') // #7298
  16103. .replace(/<!\[CDATA\[([\s\S]*?)]]>/g, '$1');
  16104. }
  16105. if (shouldIgnoreFirstNewline(stackedTag, text)) {
  16106. text = text.slice(1);
  16107. }
  16108. if (options.chars) {
  16109. options.chars(text);
  16110. }
  16111. return ''
  16112. });
  16113. index += html.length - rest$1.length;
  16114. html = rest$1;
  16115. parseEndTag(stackedTag, index - endTagLength, index);
  16116. }
  16117. if (html === last) {
  16118. options.chars && options.chars(html);
  16119. if ( true && !stack.length && options.warn) {
  16120. options.warn(("Mal-formatted tag at end of template: \"" + html + "\""), { start: index + html.length });
  16121. }
  16122. break
  16123. }
  16124. }
  16125. // Clean up any remaining tags
  16126. parseEndTag();
  16127. function advance (n) {
  16128. index += n;
  16129. html = html.substring(n);
  16130. }
  16131. function parseStartTag () {
  16132. var start = html.match(startTagOpen);
  16133. if (start) {
  16134. var match = {
  16135. tagName: start[1],
  16136. attrs: [],
  16137. start: index
  16138. };
  16139. advance(start[0].length);
  16140. var end, attr;
  16141. while (!(end = html.match(startTagClose)) && (attr = html.match(dynamicArgAttribute) || html.match(attribute))) {
  16142. attr.start = index;
  16143. advance(attr[0].length);
  16144. attr.end = index;
  16145. match.attrs.push(attr);
  16146. }
  16147. if (end) {
  16148. match.unarySlash = end[1];
  16149. advance(end[0].length);
  16150. match.end = index;
  16151. return match
  16152. }
  16153. }
  16154. }
  16155. function handleStartTag (match) {
  16156. var tagName = match.tagName;
  16157. var unarySlash = match.unarySlash;
  16158. if (expectHTML) {
  16159. if (lastTag === 'p' && isNonPhrasingTag(tagName)) {
  16160. parseEndTag(lastTag);
  16161. }
  16162. if (canBeLeftOpenTag$$1(tagName) && lastTag === tagName) {
  16163. parseEndTag(tagName);
  16164. }
  16165. }
  16166. var unary = isUnaryTag$$1(tagName) || !!unarySlash;
  16167. var l = match.attrs.length;
  16168. var attrs = new Array(l);
  16169. for (var i = 0; i < l; i++) {
  16170. var args = match.attrs[i];
  16171. var value = args[3] || args[4] || args[5] || '';
  16172. var shouldDecodeNewlines = tagName === 'a' && args[1] === 'href'
  16173. ? options.shouldDecodeNewlinesForHref
  16174. : options.shouldDecodeNewlines;
  16175. attrs[i] = {
  16176. name: args[1],
  16177. value: decodeAttr(value, shouldDecodeNewlines)
  16178. };
  16179. if ( true && options.outputSourceRange) {
  16180. attrs[i].start = args.start + args[0].match(/^\s*/).length;
  16181. attrs[i].end = args.end;
  16182. }
  16183. }
  16184. if (!unary) {
  16185. stack.push({ tag: tagName, lowerCasedTag: tagName.toLowerCase(), attrs: attrs, start: match.start, end: match.end });
  16186. lastTag = tagName;
  16187. }
  16188. if (options.start) {
  16189. options.start(tagName, attrs, unary, match.start, match.end);
  16190. }
  16191. }
  16192. function parseEndTag (tagName, start, end) {
  16193. var pos, lowerCasedTagName;
  16194. if (start == null) { start = index; }
  16195. if (end == null) { end = index; }
  16196. // Find the closest opened tag of the same type
  16197. if (tagName) {
  16198. lowerCasedTagName = tagName.toLowerCase();
  16199. for (pos = stack.length - 1; pos >= 0; pos--) {
  16200. if (stack[pos].lowerCasedTag === lowerCasedTagName) {
  16201. break
  16202. }
  16203. }
  16204. } else {
  16205. // If no tag name is provided, clean shop
  16206. pos = 0;
  16207. }
  16208. if (pos >= 0) {
  16209. // Close all the open elements, up the stack
  16210. for (var i = stack.length - 1; i >= pos; i--) {
  16211. if ( true &&
  16212. (i > pos || !tagName) &&
  16213. options.warn
  16214. ) {
  16215. options.warn(
  16216. ("tag <" + (stack[i].tag) + "> has no matching end tag."),
  16217. { start: stack[i].start, end: stack[i].end }
  16218. );
  16219. }
  16220. if (options.end) {
  16221. options.end(stack[i].tag, start, end);
  16222. }
  16223. }
  16224. // Remove the open elements from the stack
  16225. stack.length = pos;
  16226. lastTag = pos && stack[pos - 1].tag;
  16227. } else if (lowerCasedTagName === 'br') {
  16228. if (options.start) {
  16229. options.start(tagName, [], true, start, end);
  16230. }
  16231. } else if (lowerCasedTagName === 'p') {
  16232. if (options.start) {
  16233. options.start(tagName, [], false, start, end);
  16234. }
  16235. if (options.end) {
  16236. options.end(tagName, start, end);
  16237. }
  16238. }
  16239. }
  16240. }
  16241. /* */
  16242. var onRE = /^@|^v-on:/;
  16243. var dirRE = /^v-|^@|^:|^#/;
  16244. var forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
  16245. var forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/;
  16246. var stripParensRE = /^\(|\)$/g;
  16247. var dynamicArgRE = /^\[.*\]$/;
  16248. var argRE = /:(.*)$/;
  16249. var bindRE = /^:|^\.|^v-bind:/;
  16250. var modifierRE = /\.[^.\]]+(?=[^\]]*$)/g;
  16251. var slotRE = /^v-slot(:|$)|^#/;
  16252. var lineBreakRE = /[\r\n]/;
  16253. var whitespaceRE$1 = /[ \f\t\r\n]+/g;
  16254. var invalidAttributeRE = /[\s"'<>\/=]/;
  16255. var decodeHTMLCached = cached(he.decode);
  16256. var emptySlotScopeToken = "_empty_";
  16257. // configurable state
  16258. var warn$2;
  16259. var delimiters;
  16260. var transforms;
  16261. var preTransforms;
  16262. var postTransforms;
  16263. var platformIsPreTag;
  16264. var platformMustUseProp;
  16265. var platformGetTagNamespace;
  16266. var maybeComponent;
  16267. function createASTElement (
  16268. tag,
  16269. attrs,
  16270. parent
  16271. ) {
  16272. return {
  16273. type: 1,
  16274. tag: tag,
  16275. attrsList: attrs,
  16276. attrsMap: makeAttrsMap(attrs),
  16277. rawAttrsMap: {},
  16278. parent: parent,
  16279. children: []
  16280. }
  16281. }
  16282. /**
  16283. * Convert HTML string to AST.
  16284. */
  16285. function parse (
  16286. template,
  16287. options
  16288. ) {
  16289. warn$2 = options.warn || baseWarn;
  16290. platformIsPreTag = options.isPreTag || no;
  16291. platformMustUseProp = options.mustUseProp || no;
  16292. platformGetTagNamespace = options.getTagNamespace || no;
  16293. var isReservedTag = options.isReservedTag || no;
  16294. maybeComponent = function (el) { return !!(
  16295. el.component ||
  16296. el.attrsMap[':is'] ||
  16297. el.attrsMap['v-bind:is'] ||
  16298. !(el.attrsMap.is ? isReservedTag(el.attrsMap.is) : isReservedTag(el.tag))
  16299. ); };
  16300. transforms = pluckModuleFunction(options.modules, 'transformNode');
  16301. preTransforms = pluckModuleFunction(options.modules, 'preTransformNode');
  16302. postTransforms = pluckModuleFunction(options.modules, 'postTransformNode');
  16303. delimiters = options.delimiters;
  16304. var stack = [];
  16305. var preserveWhitespace = options.preserveWhitespace !== false;
  16306. var whitespaceOption = options.whitespace;
  16307. var root;
  16308. var currentParent;
  16309. var inVPre = false;
  16310. var inPre = false;
  16311. var warned = false;
  16312. function warnOnce (msg, range) {
  16313. if (!warned) {
  16314. warned = true;
  16315. warn$2(msg, range);
  16316. }
  16317. }
  16318. function closeElement (element) {
  16319. trimEndingWhitespace(element);
  16320. if (!inVPre && !element.processed) {
  16321. element = processElement(element, options);
  16322. }
  16323. // tree management
  16324. if (!stack.length && element !== root) {
  16325. // allow root elements with v-if, v-else-if and v-else
  16326. if (root.if && (element.elseif || element.else)) {
  16327. if (true) {
  16328. checkRootConstraints(element);
  16329. }
  16330. addIfCondition(root, {
  16331. exp: element.elseif,
  16332. block: element
  16333. });
  16334. } else if (true) {
  16335. warnOnce(
  16336. "Component template should contain exactly one root element. " +
  16337. "If you are using v-if on multiple elements, " +
  16338. "use v-else-if to chain them instead.",
  16339. { start: element.start }
  16340. );
  16341. }
  16342. }
  16343. if (currentParent && !element.forbidden) {
  16344. if (element.elseif || element.else) {
  16345. processIfConditions(element, currentParent);
  16346. } else {
  16347. if (element.slotScope) {
  16348. // scoped slot
  16349. // keep it in the children list so that v-else(-if) conditions can
  16350. // find it as the prev node.
  16351. var name = element.slotTarget || '"default"'
  16352. ;(currentParent.scopedSlots || (currentParent.scopedSlots = {}))[name] = element;
  16353. }
  16354. currentParent.children.push(element);
  16355. element.parent = currentParent;
  16356. }
  16357. }
  16358. // final children cleanup
  16359. // filter out scoped slots
  16360. element.children = element.children.filter(function (c) { return !(c).slotScope; });
  16361. // remove trailing whitespace node again
  16362. trimEndingWhitespace(element);
  16363. // check pre state
  16364. if (element.pre) {
  16365. inVPre = false;
  16366. }
  16367. if (platformIsPreTag(element.tag)) {
  16368. inPre = false;
  16369. }
  16370. // apply post-transforms
  16371. for (var i = 0; i < postTransforms.length; i++) {
  16372. postTransforms[i](element, options);
  16373. }
  16374. }
  16375. function trimEndingWhitespace (el) {
  16376. // remove trailing whitespace node
  16377. if (!inPre) {
  16378. var lastNode;
  16379. while (
  16380. (lastNode = el.children[el.children.length - 1]) &&
  16381. lastNode.type === 3 &&
  16382. lastNode.text === ' '
  16383. ) {
  16384. el.children.pop();
  16385. }
  16386. }
  16387. }
  16388. function checkRootConstraints (el) {
  16389. if (el.tag === 'slot' || el.tag === 'template') {
  16390. warnOnce(
  16391. "Cannot use <" + (el.tag) + "> as component root element because it may " +
  16392. 'contain multiple nodes.',
  16393. { start: el.start }
  16394. );
  16395. }
  16396. if (el.attrsMap.hasOwnProperty('v-for')) {
  16397. warnOnce(
  16398. 'Cannot use v-for on stateful component root element because ' +
  16399. 'it renders multiple elements.',
  16400. el.rawAttrsMap['v-for']
  16401. );
  16402. }
  16403. }
  16404. parseHTML(template, {
  16405. warn: warn$2,
  16406. expectHTML: options.expectHTML,
  16407. isUnaryTag: options.isUnaryTag,
  16408. canBeLeftOpenTag: options.canBeLeftOpenTag,
  16409. shouldDecodeNewlines: options.shouldDecodeNewlines,
  16410. shouldDecodeNewlinesForHref: options.shouldDecodeNewlinesForHref,
  16411. shouldKeepComment: options.comments,
  16412. outputSourceRange: options.outputSourceRange,
  16413. start: function start (tag, attrs, unary, start$1, end) {
  16414. // check namespace.
  16415. // inherit parent ns if there is one
  16416. var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag);
  16417. // handle IE svg bug
  16418. /* istanbul ignore if */
  16419. if (isIE && ns === 'svg') {
  16420. attrs = guardIESVGBug(attrs);
  16421. }
  16422. var element = createASTElement(tag, attrs, currentParent);
  16423. if (ns) {
  16424. element.ns = ns;
  16425. }
  16426. if (true) {
  16427. if (options.outputSourceRange) {
  16428. element.start = start$1;
  16429. element.end = end;
  16430. element.rawAttrsMap = element.attrsList.reduce(function (cumulated, attr) {
  16431. cumulated[attr.name] = attr;
  16432. return cumulated
  16433. }, {});
  16434. }
  16435. attrs.forEach(function (attr) {
  16436. if (invalidAttributeRE.test(attr.name)) {
  16437. warn$2(
  16438. "Invalid dynamic argument expression: attribute names cannot contain " +
  16439. "spaces, quotes, <, >, / or =.",
  16440. {
  16441. start: attr.start + attr.name.indexOf("["),
  16442. end: attr.start + attr.name.length
  16443. }
  16444. );
  16445. }
  16446. });
  16447. }
  16448. if (isForbiddenTag(element) && !isServerRendering()) {
  16449. element.forbidden = true;
  16450. true && warn$2(
  16451. 'Templates should only be responsible for mapping the state to the ' +
  16452. 'UI. Avoid placing tags with side-effects in your templates, such as ' +
  16453. "<" + tag + ">" + ', as they will not be parsed.',
  16454. { start: element.start }
  16455. );
  16456. }
  16457. // apply pre-transforms
  16458. for (var i = 0; i < preTransforms.length; i++) {
  16459. element = preTransforms[i](element, options) || element;
  16460. }
  16461. if (!inVPre) {
  16462. processPre(element);
  16463. if (element.pre) {
  16464. inVPre = true;
  16465. }
  16466. }
  16467. if (platformIsPreTag(element.tag)) {
  16468. inPre = true;
  16469. }
  16470. if (inVPre) {
  16471. processRawAttrs(element);
  16472. } else if (!element.processed) {
  16473. // structural directives
  16474. processFor(element);
  16475. processIf(element);
  16476. processOnce(element);
  16477. }
  16478. if (!root) {
  16479. root = element;
  16480. if (true) {
  16481. checkRootConstraints(root);
  16482. }
  16483. }
  16484. if (!unary) {
  16485. currentParent = element;
  16486. stack.push(element);
  16487. } else {
  16488. closeElement(element);
  16489. }
  16490. },
  16491. end: function end (tag, start, end$1) {
  16492. var element = stack[stack.length - 1];
  16493. // pop stack
  16494. stack.length -= 1;
  16495. currentParent = stack[stack.length - 1];
  16496. if ( true && options.outputSourceRange) {
  16497. element.end = end$1;
  16498. }
  16499. closeElement(element);
  16500. },
  16501. chars: function chars (text, start, end) {
  16502. if (!currentParent) {
  16503. if (true) {
  16504. if (text === template) {
  16505. warnOnce(
  16506. 'Component template requires a root element, rather than just text.',
  16507. { start: start }
  16508. );
  16509. } else if ((text = text.trim())) {
  16510. warnOnce(
  16511. ("text \"" + text + "\" outside root element will be ignored."),
  16512. { start: start }
  16513. );
  16514. }
  16515. }
  16516. return
  16517. }
  16518. // IE textarea placeholder bug
  16519. /* istanbul ignore if */
  16520. if (isIE &&
  16521. currentParent.tag === 'textarea' &&
  16522. currentParent.attrsMap.placeholder === text
  16523. ) {
  16524. return
  16525. }
  16526. var children = currentParent.children;
  16527. if (inPre || text.trim()) {
  16528. text = isTextTag(currentParent) ? text : decodeHTMLCached(text);
  16529. } else if (!children.length) {
  16530. // remove the whitespace-only node right after an opening tag
  16531. text = '';
  16532. } else if (whitespaceOption) {
  16533. if (whitespaceOption === 'condense') {
  16534. // in condense mode, remove the whitespace node if it contains
  16535. // line break, otherwise condense to a single space
  16536. text = lineBreakRE.test(text) ? '' : ' ';
  16537. } else {
  16538. text = ' ';
  16539. }
  16540. } else {
  16541. text = preserveWhitespace ? ' ' : '';
  16542. }
  16543. if (text) {
  16544. if (!inPre && whitespaceOption === 'condense') {
  16545. // condense consecutive whitespaces into single space
  16546. text = text.replace(whitespaceRE$1, ' ');
  16547. }
  16548. var res;
  16549. var child;
  16550. if (!inVPre && text !== ' ' && (res = parseText(text, delimiters))) {
  16551. child = {
  16552. type: 2,
  16553. expression: res.expression,
  16554. tokens: res.tokens,
  16555. text: text
  16556. };
  16557. } else if (text !== ' ' || !children.length || children[children.length - 1].text !== ' ') {
  16558. child = {
  16559. type: 3,
  16560. text: text
  16561. };
  16562. }
  16563. if (child) {
  16564. if ( true && options.outputSourceRange) {
  16565. child.start = start;
  16566. child.end = end;
  16567. }
  16568. children.push(child);
  16569. }
  16570. }
  16571. },
  16572. comment: function comment (text, start, end) {
  16573. // adding anything as a sibling to the root node is forbidden
  16574. // comments should still be allowed, but ignored
  16575. if (currentParent) {
  16576. var child = {
  16577. type: 3,
  16578. text: text,
  16579. isComment: true
  16580. };
  16581. if ( true && options.outputSourceRange) {
  16582. child.start = start;
  16583. child.end = end;
  16584. }
  16585. currentParent.children.push(child);
  16586. }
  16587. }
  16588. });
  16589. return root
  16590. }
  16591. function processPre (el) {
  16592. if (getAndRemoveAttr(el, 'v-pre') != null) {
  16593. el.pre = true;
  16594. }
  16595. }
  16596. function processRawAttrs (el) {
  16597. var list = el.attrsList;
  16598. var len = list.length;
  16599. if (len) {
  16600. var attrs = el.attrs = new Array(len);
  16601. for (var i = 0; i < len; i++) {
  16602. attrs[i] = {
  16603. name: list[i].name,
  16604. value: JSON.stringify(list[i].value)
  16605. };
  16606. if (list[i].start != null) {
  16607. attrs[i].start = list[i].start;
  16608. attrs[i].end = list[i].end;
  16609. }
  16610. }
  16611. } else if (!el.pre) {
  16612. // non root node in pre blocks with no attributes
  16613. el.plain = true;
  16614. }
  16615. }
  16616. function processElement (
  16617. element,
  16618. options
  16619. ) {
  16620. processKey(element);
  16621. // determine whether this is a plain element after
  16622. // removing structural attributes
  16623. element.plain = (
  16624. !element.key &&
  16625. !element.scopedSlots &&
  16626. !element.attrsList.length
  16627. );
  16628. processRef(element);
  16629. processSlotContent(element);
  16630. processSlotOutlet(element);
  16631. processComponent(element);
  16632. for (var i = 0; i < transforms.length; i++) {
  16633. element = transforms[i](element, options) || element;
  16634. }
  16635. processAttrs(element);
  16636. return element
  16637. }
  16638. function processKey (el) {
  16639. var exp = getBindingAttr(el, 'key');
  16640. if (exp) {
  16641. if (true) {
  16642. if (el.tag === 'template') {
  16643. warn$2(
  16644. "<template> cannot be keyed. Place the key on real elements instead.",
  16645. getRawBindingAttr(el, 'key')
  16646. );
  16647. }
  16648. if (el.for) {
  16649. var iterator = el.iterator2 || el.iterator1;
  16650. var parent = el.parent;
  16651. if (iterator && iterator === exp && parent && parent.tag === 'transition-group') {
  16652. warn$2(
  16653. "Do not use v-for index as key on <transition-group> children, " +
  16654. "this is the same as not using keys.",
  16655. getRawBindingAttr(el, 'key'),
  16656. true /* tip */
  16657. );
  16658. }
  16659. }
  16660. }
  16661. el.key = exp;
  16662. }
  16663. }
  16664. function processRef (el) {
  16665. var ref = getBindingAttr(el, 'ref');
  16666. if (ref) {
  16667. el.ref = ref;
  16668. el.refInFor = checkInFor(el);
  16669. }
  16670. }
  16671. function processFor (el) {
  16672. var exp;
  16673. if ((exp = getAndRemoveAttr(el, 'v-for'))) {
  16674. var res = parseFor(exp);
  16675. if (res) {
  16676. extend(el, res);
  16677. } else if (true) {
  16678. warn$2(
  16679. ("Invalid v-for expression: " + exp),
  16680. el.rawAttrsMap['v-for']
  16681. );
  16682. }
  16683. }
  16684. }
  16685. function parseFor (exp) {
  16686. var inMatch = exp.match(forAliasRE);
  16687. if (!inMatch) { return }
  16688. var res = {};
  16689. res.for = inMatch[2].trim();
  16690. var alias = inMatch[1].trim().replace(stripParensRE, '');
  16691. var iteratorMatch = alias.match(forIteratorRE);
  16692. if (iteratorMatch) {
  16693. res.alias = alias.replace(forIteratorRE, '').trim();
  16694. res.iterator1 = iteratorMatch[1].trim();
  16695. if (iteratorMatch[2]) {
  16696. res.iterator2 = iteratorMatch[2].trim();
  16697. }
  16698. } else {
  16699. res.alias = alias;
  16700. }
  16701. return res
  16702. }
  16703. function processIf (el) {
  16704. var exp = getAndRemoveAttr(el, 'v-if');
  16705. if (exp) {
  16706. el.if = exp;
  16707. addIfCondition(el, {
  16708. exp: exp,
  16709. block: el
  16710. });
  16711. } else {
  16712. if (getAndRemoveAttr(el, 'v-else') != null) {
  16713. el.else = true;
  16714. }
  16715. var elseif = getAndRemoveAttr(el, 'v-else-if');
  16716. if (elseif) {
  16717. el.elseif = elseif;
  16718. }
  16719. }
  16720. }
  16721. function processIfConditions (el, parent) {
  16722. var prev = findPrevElement(parent.children);
  16723. if (prev && prev.if) {
  16724. addIfCondition(prev, {
  16725. exp: el.elseif,
  16726. block: el
  16727. });
  16728. } else if (true) {
  16729. warn$2(
  16730. "v-" + (el.elseif ? ('else-if="' + el.elseif + '"') : 'else') + " " +
  16731. "used on element <" + (el.tag) + "> without corresponding v-if.",
  16732. el.rawAttrsMap[el.elseif ? 'v-else-if' : 'v-else']
  16733. );
  16734. }
  16735. }
  16736. function findPrevElement (children) {
  16737. var i = children.length;
  16738. while (i--) {
  16739. if (children[i].type === 1) {
  16740. return children[i]
  16741. } else {
  16742. if ( true && children[i].text !== ' ') {
  16743. warn$2(
  16744. "text \"" + (children[i].text.trim()) + "\" between v-if and v-else(-if) " +
  16745. "will be ignored.",
  16746. children[i]
  16747. );
  16748. }
  16749. children.pop();
  16750. }
  16751. }
  16752. }
  16753. function addIfCondition (el, condition) {
  16754. if (!el.ifConditions) {
  16755. el.ifConditions = [];
  16756. }
  16757. el.ifConditions.push(condition);
  16758. }
  16759. function processOnce (el) {
  16760. var once$$1 = getAndRemoveAttr(el, 'v-once');
  16761. if (once$$1 != null) {
  16762. el.once = true;
  16763. }
  16764. }
  16765. // handle content being passed to a component as slot,
  16766. // e.g. <template slot="xxx">, <div slot-scope="xxx">
  16767. function processSlotContent (el) {
  16768. var slotScope;
  16769. if (el.tag === 'template') {
  16770. slotScope = getAndRemoveAttr(el, 'scope');
  16771. /* istanbul ignore if */
  16772. if ( true && slotScope) {
  16773. warn$2(
  16774. "the \"scope\" attribute for scoped slots have been deprecated and " +
  16775. "replaced by \"slot-scope\" since 2.5. The new \"slot-scope\" attribute " +
  16776. "can also be used on plain elements in addition to <template> to " +
  16777. "denote scoped slots.",
  16778. el.rawAttrsMap['scope'],
  16779. true
  16780. );
  16781. }
  16782. el.slotScope = slotScope || getAndRemoveAttr(el, 'slot-scope');
  16783. } else if ((slotScope = getAndRemoveAttr(el, 'slot-scope'))) {
  16784. /* istanbul ignore if */
  16785. if ( true && el.attrsMap['v-for']) {
  16786. warn$2(
  16787. "Ambiguous combined usage of slot-scope and v-for on <" + (el.tag) + "> " +
  16788. "(v-for takes higher priority). Use a wrapper <template> for the " +
  16789. "scoped slot to make it clearer.",
  16790. el.rawAttrsMap['slot-scope'],
  16791. true
  16792. );
  16793. }
  16794. el.slotScope = slotScope;
  16795. }
  16796. // slot="xxx"
  16797. var slotTarget = getBindingAttr(el, 'slot');
  16798. if (slotTarget) {
  16799. el.slotTarget = slotTarget === '""' ? '"default"' : slotTarget;
  16800. el.slotTargetDynamic = !!(el.attrsMap[':slot'] || el.attrsMap['v-bind:slot']);
  16801. // preserve slot as an attribute for native shadow DOM compat
  16802. // only for non-scoped slots.
  16803. if (el.tag !== 'template' && !el.slotScope) {
  16804. addAttr(el, 'slot', slotTarget, getRawBindingAttr(el, 'slot'));
  16805. }
  16806. }
  16807. // 2.6 v-slot syntax
  16808. {
  16809. if (el.tag === 'template') {
  16810. // v-slot on <template>
  16811. var slotBinding = getAndRemoveAttrByRegex(el, slotRE);
  16812. if (slotBinding) {
  16813. if (true) {
  16814. if (el.slotTarget || el.slotScope) {
  16815. warn$2(
  16816. "Unexpected mixed usage of different slot syntaxes.",
  16817. el
  16818. );
  16819. }
  16820. if (el.parent && !maybeComponent(el.parent)) {
  16821. warn$2(
  16822. "<template v-slot> can only appear at the root level inside " +
  16823. "the receiving component",
  16824. el
  16825. );
  16826. }
  16827. }
  16828. var ref = getSlotName(slotBinding);
  16829. var name = ref.name;
  16830. var dynamic = ref.dynamic;
  16831. el.slotTarget = name;
  16832. el.slotTargetDynamic = dynamic;
  16833. el.slotScope = slotBinding.value || emptySlotScopeToken; // force it into a scoped slot for perf
  16834. }
  16835. } else {
  16836. // v-slot on component, denotes default slot
  16837. var slotBinding$1 = getAndRemoveAttrByRegex(el, slotRE);
  16838. if (slotBinding$1) {
  16839. if (true) {
  16840. if (!maybeComponent(el)) {
  16841. warn$2(
  16842. "v-slot can only be used on components or <template>.",
  16843. slotBinding$1
  16844. );
  16845. }
  16846. if (el.slotScope || el.slotTarget) {
  16847. warn$2(
  16848. "Unexpected mixed usage of different slot syntaxes.",
  16849. el
  16850. );
  16851. }
  16852. if (el.scopedSlots) {
  16853. warn$2(
  16854. "To avoid scope ambiguity, the default slot should also use " +
  16855. "<template> syntax when there are other named slots.",
  16856. slotBinding$1
  16857. );
  16858. }
  16859. }
  16860. // add the component's children to its default slot
  16861. var slots = el.scopedSlots || (el.scopedSlots = {});
  16862. var ref$1 = getSlotName(slotBinding$1);
  16863. var name$1 = ref$1.name;
  16864. var dynamic$1 = ref$1.dynamic;
  16865. var slotContainer = slots[name$1] = createASTElement('template', [], el);
  16866. slotContainer.slotTarget = name$1;
  16867. slotContainer.slotTargetDynamic = dynamic$1;
  16868. slotContainer.children = el.children.filter(function (c) {
  16869. if (!c.slotScope) {
  16870. c.parent = slotContainer;
  16871. return true
  16872. }
  16873. });
  16874. slotContainer.slotScope = slotBinding$1.value || emptySlotScopeToken;
  16875. // remove children as they are returned from scopedSlots now
  16876. el.children = [];
  16877. // mark el non-plain so data gets generated
  16878. el.plain = false;
  16879. }
  16880. }
  16881. }
  16882. }
  16883. function getSlotName (binding) {
  16884. var name = binding.name.replace(slotRE, '');
  16885. if (!name) {
  16886. if (binding.name[0] !== '#') {
  16887. name = 'default';
  16888. } else if (true) {
  16889. warn$2(
  16890. "v-slot shorthand syntax requires a slot name.",
  16891. binding
  16892. );
  16893. }
  16894. }
  16895. return dynamicArgRE.test(name)
  16896. // dynamic [name]
  16897. ? { name: name.slice(1, -1), dynamic: true }
  16898. // static name
  16899. : { name: ("\"" + name + "\""), dynamic: false }
  16900. }
  16901. // handle <slot/> outlets
  16902. function processSlotOutlet (el) {
  16903. if (el.tag === 'slot') {
  16904. el.slotName = getBindingAttr(el, 'name');
  16905. if ( true && el.key) {
  16906. warn$2(
  16907. "`key` does not work on <slot> because slots are abstract outlets " +
  16908. "and can possibly expand into multiple elements. " +
  16909. "Use the key on a wrapping element instead.",
  16910. getRawBindingAttr(el, 'key')
  16911. );
  16912. }
  16913. }
  16914. }
  16915. function processComponent (el) {
  16916. var binding;
  16917. if ((binding = getBindingAttr(el, 'is'))) {
  16918. el.component = binding;
  16919. }
  16920. if (getAndRemoveAttr(el, 'inline-template') != null) {
  16921. el.inlineTemplate = true;
  16922. }
  16923. }
  16924. function processAttrs (el) {
  16925. var list = el.attrsList;
  16926. var i, l, name, rawName, value, modifiers, syncGen, isDynamic;
  16927. for (i = 0, l = list.length; i < l; i++) {
  16928. name = rawName = list[i].name;
  16929. value = list[i].value;
  16930. if (dirRE.test(name)) {
  16931. // mark element as dynamic
  16932. el.hasBindings = true;
  16933. // modifiers
  16934. modifiers = parseModifiers(name.replace(dirRE, ''));
  16935. // support .foo shorthand syntax for the .prop modifier
  16936. if (modifiers) {
  16937. name = name.replace(modifierRE, '');
  16938. }
  16939. if (bindRE.test(name)) { // v-bind
  16940. name = name.replace(bindRE, '');
  16941. value = parseFilters(value);
  16942. isDynamic = dynamicArgRE.test(name);
  16943. if (isDynamic) {
  16944. name = name.slice(1, -1);
  16945. }
  16946. if (
  16947. true &&
  16948. value.trim().length === 0
  16949. ) {
  16950. warn$2(
  16951. ("The value for a v-bind expression cannot be empty. Found in \"v-bind:" + name + "\"")
  16952. );
  16953. }
  16954. if (modifiers) {
  16955. if (modifiers.prop && !isDynamic) {
  16956. name = camelize(name);
  16957. if (name === 'innerHtml') { name = 'innerHTML'; }
  16958. }
  16959. if (modifiers.camel && !isDynamic) {
  16960. name = camelize(name);
  16961. }
  16962. if (modifiers.sync) {
  16963. syncGen = genAssignmentCode(value, "$event");
  16964. if (!isDynamic) {
  16965. addHandler(
  16966. el,
  16967. ("update:" + (camelize(name))),
  16968. syncGen,
  16969. null,
  16970. false,
  16971. warn$2,
  16972. list[i]
  16973. );
  16974. if (hyphenate(name) !== camelize(name)) {
  16975. addHandler(
  16976. el,
  16977. ("update:" + (hyphenate(name))),
  16978. syncGen,
  16979. null,
  16980. false,
  16981. warn$2,
  16982. list[i]
  16983. );
  16984. }
  16985. } else {
  16986. // handler w/ dynamic event name
  16987. addHandler(
  16988. el,
  16989. ("\"update:\"+(" + name + ")"),
  16990. syncGen,
  16991. null,
  16992. false,
  16993. warn$2,
  16994. list[i],
  16995. true // dynamic
  16996. );
  16997. }
  16998. }
  16999. }
  17000. if ((modifiers && modifiers.prop) || (
  17001. !el.component && platformMustUseProp(el.tag, el.attrsMap.type, name)
  17002. )) {
  17003. addProp(el, name, value, list[i], isDynamic);
  17004. } else {
  17005. addAttr(el, name, value, list[i], isDynamic);
  17006. }
  17007. } else if (onRE.test(name)) { // v-on
  17008. name = name.replace(onRE, '');
  17009. isDynamic = dynamicArgRE.test(name);
  17010. if (isDynamic) {
  17011. name = name.slice(1, -1);
  17012. }
  17013. addHandler(el, name, value, modifiers, false, warn$2, list[i], isDynamic);
  17014. } else { // normal directives
  17015. name = name.replace(dirRE, '');
  17016. // parse arg
  17017. var argMatch = name.match(argRE);
  17018. var arg = argMatch && argMatch[1];
  17019. isDynamic = false;
  17020. if (arg) {
  17021. name = name.slice(0, -(arg.length + 1));
  17022. if (dynamicArgRE.test(arg)) {
  17023. arg = arg.slice(1, -1);
  17024. isDynamic = true;
  17025. }
  17026. }
  17027. addDirective(el, name, rawName, value, arg, isDynamic, modifiers, list[i]);
  17028. if ( true && name === 'model') {
  17029. checkForAliasModel(el, value);
  17030. }
  17031. }
  17032. } else {
  17033. // literal attribute
  17034. if (true) {
  17035. var res = parseText(value, delimiters);
  17036. if (res) {
  17037. warn$2(
  17038. name + "=\"" + value + "\": " +
  17039. 'Interpolation inside attributes has been removed. ' +
  17040. 'Use v-bind or the colon shorthand instead. For example, ' +
  17041. 'instead of <div id="{{ val }}">, use <div :id="val">.',
  17042. list[i]
  17043. );
  17044. }
  17045. }
  17046. addAttr(el, name, JSON.stringify(value), list[i]);
  17047. // #6887 firefox doesn't update muted state if set via attribute
  17048. // even immediately after element creation
  17049. if (!el.component &&
  17050. name === 'muted' &&
  17051. platformMustUseProp(el.tag, el.attrsMap.type, name)) {
  17052. addProp(el, name, 'true', list[i]);
  17053. }
  17054. }
  17055. }
  17056. }
  17057. function checkInFor (el) {
  17058. var parent = el;
  17059. while (parent) {
  17060. if (parent.for !== undefined) {
  17061. return true
  17062. }
  17063. parent = parent.parent;
  17064. }
  17065. return false
  17066. }
  17067. function parseModifiers (name) {
  17068. var match = name.match(modifierRE);
  17069. if (match) {
  17070. var ret = {};
  17071. match.forEach(function (m) { ret[m.slice(1)] = true; });
  17072. return ret
  17073. }
  17074. }
  17075. function makeAttrsMap (attrs) {
  17076. var map = {};
  17077. for (var i = 0, l = attrs.length; i < l; i++) {
  17078. if (
  17079. true &&
  17080. map[attrs[i].name] && !isIE && !isEdge
  17081. ) {
  17082. warn$2('duplicate attribute: ' + attrs[i].name, attrs[i]);
  17083. }
  17084. map[attrs[i].name] = attrs[i].value;
  17085. }
  17086. return map
  17087. }
  17088. // for script (e.g. type="x/template") or style, do not decode content
  17089. function isTextTag (el) {
  17090. return el.tag === 'script' || el.tag === 'style'
  17091. }
  17092. function isForbiddenTag (el) {
  17093. return (
  17094. el.tag === 'style' ||
  17095. (el.tag === 'script' && (
  17096. !el.attrsMap.type ||
  17097. el.attrsMap.type === 'text/javascript'
  17098. ))
  17099. )
  17100. }
  17101. var ieNSBug = /^xmlns:NS\d+/;
  17102. var ieNSPrefix = /^NS\d+:/;
  17103. /* istanbul ignore next */
  17104. function guardIESVGBug (attrs) {
  17105. var res = [];
  17106. for (var i = 0; i < attrs.length; i++) {
  17107. var attr = attrs[i];
  17108. if (!ieNSBug.test(attr.name)) {
  17109. attr.name = attr.name.replace(ieNSPrefix, '');
  17110. res.push(attr);
  17111. }
  17112. }
  17113. return res
  17114. }
  17115. function checkForAliasModel (el, value) {
  17116. var _el = el;
  17117. while (_el) {
  17118. if (_el.for && _el.alias === value) {
  17119. warn$2(
  17120. "<" + (el.tag) + " v-model=\"" + value + "\">: " +
  17121. "You are binding v-model directly to a v-for iteration alias. " +
  17122. "This will not be able to modify the v-for source array because " +
  17123. "writing to the alias is like modifying a function local variable. " +
  17124. "Consider using an array of objects and use v-model on an object property instead.",
  17125. el.rawAttrsMap['v-model']
  17126. );
  17127. }
  17128. _el = _el.parent;
  17129. }
  17130. }
  17131. /* */
  17132. function preTransformNode (el, options) {
  17133. if (el.tag === 'input') {
  17134. var map = el.attrsMap;
  17135. if (!map['v-model']) {
  17136. return
  17137. }
  17138. var typeBinding;
  17139. if (map[':type'] || map['v-bind:type']) {
  17140. typeBinding = getBindingAttr(el, 'type');
  17141. }
  17142. if (!map.type && !typeBinding && map['v-bind']) {
  17143. typeBinding = "(" + (map['v-bind']) + ").type";
  17144. }
  17145. if (typeBinding) {
  17146. var ifCondition = getAndRemoveAttr(el, 'v-if', true);
  17147. var ifConditionExtra = ifCondition ? ("&&(" + ifCondition + ")") : "";
  17148. var hasElse = getAndRemoveAttr(el, 'v-else', true) != null;
  17149. var elseIfCondition = getAndRemoveAttr(el, 'v-else-if', true);
  17150. // 1. checkbox
  17151. var branch0 = cloneASTElement(el);
  17152. // process for on the main node
  17153. processFor(branch0);
  17154. addRawAttr(branch0, 'type', 'checkbox');
  17155. processElement(branch0, options);
  17156. branch0.processed = true; // prevent it from double-processed
  17157. branch0.if = "(" + typeBinding + ")==='checkbox'" + ifConditionExtra;
  17158. addIfCondition(branch0, {
  17159. exp: branch0.if,
  17160. block: branch0
  17161. });
  17162. // 2. add radio else-if condition
  17163. var branch1 = cloneASTElement(el);
  17164. getAndRemoveAttr(branch1, 'v-for', true);
  17165. addRawAttr(branch1, 'type', 'radio');
  17166. processElement(branch1, options);
  17167. addIfCondition(branch0, {
  17168. exp: "(" + typeBinding + ")==='radio'" + ifConditionExtra,
  17169. block: branch1
  17170. });
  17171. // 3. other
  17172. var branch2 = cloneASTElement(el);
  17173. getAndRemoveAttr(branch2, 'v-for', true);
  17174. addRawAttr(branch2, ':type', typeBinding);
  17175. processElement(branch2, options);
  17176. addIfCondition(branch0, {
  17177. exp: ifCondition,
  17178. block: branch2
  17179. });
  17180. if (hasElse) {
  17181. branch0.else = true;
  17182. } else if (elseIfCondition) {
  17183. branch0.elseif = elseIfCondition;
  17184. }
  17185. return branch0
  17186. }
  17187. }
  17188. }
  17189. function cloneASTElement (el) {
  17190. return createASTElement(el.tag, el.attrsList.slice(), el.parent)
  17191. }
  17192. var model$1 = {
  17193. preTransformNode: preTransformNode
  17194. };
  17195. var modules$1 = [
  17196. klass$1,
  17197. style$1,
  17198. model$1
  17199. ];
  17200. /* */
  17201. function text (el, dir) {
  17202. if (dir.value) {
  17203. addProp(el, 'textContent', ("_s(" + (dir.value) + ")"), dir);
  17204. }
  17205. }
  17206. /* */
  17207. function html (el, dir) {
  17208. if (dir.value) {
  17209. addProp(el, 'innerHTML', ("_s(" + (dir.value) + ")"), dir);
  17210. }
  17211. }
  17212. var directives$1 = {
  17213. model: model,
  17214. text: text,
  17215. html: html
  17216. };
  17217. /* */
  17218. var baseOptions = {
  17219. expectHTML: true,
  17220. modules: modules$1,
  17221. directives: directives$1,
  17222. isPreTag: isPreTag,
  17223. isUnaryTag: isUnaryTag,
  17224. mustUseProp: mustUseProp,
  17225. canBeLeftOpenTag: canBeLeftOpenTag,
  17226. isReservedTag: isReservedTag,
  17227. getTagNamespace: getTagNamespace,
  17228. staticKeys: genStaticKeys(modules$1)
  17229. };
  17230. /* */
  17231. var isStaticKey;
  17232. var isPlatformReservedTag;
  17233. var genStaticKeysCached = cached(genStaticKeys$1);
  17234. /**
  17235. * Goal of the optimizer: walk the generated template AST tree
  17236. * and detect sub-trees that are purely static, i.e. parts of
  17237. * the DOM that never needs to change.
  17238. *
  17239. * Once we detect these sub-trees, we can:
  17240. *
  17241. * 1. Hoist them into constants, so that we no longer need to
  17242. * create fresh nodes for them on each re-render;
  17243. * 2. Completely skip them in the patching process.
  17244. */
  17245. function optimize (root, options) {
  17246. if (!root) { return }
  17247. isStaticKey = genStaticKeysCached(options.staticKeys || '');
  17248. isPlatformReservedTag = options.isReservedTag || no;
  17249. // first pass: mark all non-static nodes.
  17250. markStatic$1(root);
  17251. // second pass: mark static roots.
  17252. markStaticRoots(root, false);
  17253. }
  17254. function genStaticKeys$1 (keys) {
  17255. return makeMap(
  17256. 'type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap' +
  17257. (keys ? ',' + keys : '')
  17258. )
  17259. }
  17260. function markStatic$1 (node) {
  17261. node.static = isStatic(node);
  17262. if (node.type === 1) {
  17263. // do not make component slot content static. this avoids
  17264. // 1. components not able to mutate slot nodes
  17265. // 2. static slot content fails for hot-reloading
  17266. if (
  17267. !isPlatformReservedTag(node.tag) &&
  17268. node.tag !== 'slot' &&
  17269. node.attrsMap['inline-template'] == null
  17270. ) {
  17271. return
  17272. }
  17273. for (var i = 0, l = node.children.length; i < l; i++) {
  17274. var child = node.children[i];
  17275. markStatic$1(child);
  17276. if (!child.static) {
  17277. node.static = false;
  17278. }
  17279. }
  17280. if (node.ifConditions) {
  17281. for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) {
  17282. var block = node.ifConditions[i$1].block;
  17283. markStatic$1(block);
  17284. if (!block.static) {
  17285. node.static = false;
  17286. }
  17287. }
  17288. }
  17289. }
  17290. }
  17291. function markStaticRoots (node, isInFor) {
  17292. if (node.type === 1) {
  17293. if (node.static || node.once) {
  17294. node.staticInFor = isInFor;
  17295. }
  17296. // For a node to qualify as a static root, it should have children that
  17297. // are not just static text. Otherwise the cost of hoisting out will
  17298. // outweigh the benefits and it's better off to just always render it fresh.
  17299. if (node.static && node.children.length && !(
  17300. node.children.length === 1 &&
  17301. node.children[0].type === 3
  17302. )) {
  17303. node.staticRoot = true;
  17304. return
  17305. } else {
  17306. node.staticRoot = false;
  17307. }
  17308. if (node.children) {
  17309. for (var i = 0, l = node.children.length; i < l; i++) {
  17310. markStaticRoots(node.children[i], isInFor || !!node.for);
  17311. }
  17312. }
  17313. if (node.ifConditions) {
  17314. for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) {
  17315. markStaticRoots(node.ifConditions[i$1].block, isInFor);
  17316. }
  17317. }
  17318. }
  17319. }
  17320. function isStatic (node) {
  17321. if (node.type === 2) { // expression
  17322. return false
  17323. }
  17324. if (node.type === 3) { // text
  17325. return true
  17326. }
  17327. return !!(node.pre || (
  17328. !node.hasBindings && // no dynamic bindings
  17329. !node.if && !node.for && // not v-if or v-for or v-else
  17330. !isBuiltInTag(node.tag) && // not a built-in
  17331. isPlatformReservedTag(node.tag) && // not a component
  17332. !isDirectChildOfTemplateFor(node) &&
  17333. Object.keys(node).every(isStaticKey)
  17334. ))
  17335. }
  17336. function isDirectChildOfTemplateFor (node) {
  17337. while (node.parent) {
  17338. node = node.parent;
  17339. if (node.tag !== 'template') {
  17340. return false
  17341. }
  17342. if (node.for) {
  17343. return true
  17344. }
  17345. }
  17346. return false
  17347. }
  17348. /* */
  17349. var fnExpRE = /^([\w$_]+|\([^)]*?\))\s*=>|^function(?:\s+[\w$]+)?\s*\(/;
  17350. var fnInvokeRE = /\([^)]*?\);*$/;
  17351. var simplePathRE = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/;
  17352. // KeyboardEvent.keyCode aliases
  17353. var keyCodes = {
  17354. esc: 27,
  17355. tab: 9,
  17356. enter: 13,
  17357. space: 32,
  17358. up: 38,
  17359. left: 37,
  17360. right: 39,
  17361. down: 40,
  17362. 'delete': [8, 46]
  17363. };
  17364. // KeyboardEvent.key aliases
  17365. var keyNames = {
  17366. // #7880: IE11 and Edge use `Esc` for Escape key name.
  17367. esc: ['Esc', 'Escape'],
  17368. tab: 'Tab',
  17369. enter: 'Enter',
  17370. // #9112: IE11 uses `Spacebar` for Space key name.
  17371. space: [' ', 'Spacebar'],
  17372. // #7806: IE11 uses key names without `Arrow` prefix for arrow keys.
  17373. up: ['Up', 'ArrowUp'],
  17374. left: ['Left', 'ArrowLeft'],
  17375. right: ['Right', 'ArrowRight'],
  17376. down: ['Down', 'ArrowDown'],
  17377. // #9112: IE11 uses `Del` for Delete key name.
  17378. 'delete': ['Backspace', 'Delete', 'Del']
  17379. };
  17380. // #4868: modifiers that prevent the execution of the listener
  17381. // need to explicitly return null so that we can determine whether to remove
  17382. // the listener for .once
  17383. var genGuard = function (condition) { return ("if(" + condition + ")return null;"); };
  17384. var modifierCode = {
  17385. stop: '$event.stopPropagation();',
  17386. prevent: '$event.preventDefault();',
  17387. self: genGuard("$event.target !== $event.currentTarget"),
  17388. ctrl: genGuard("!$event.ctrlKey"),
  17389. shift: genGuard("!$event.shiftKey"),
  17390. alt: genGuard("!$event.altKey"),
  17391. meta: genGuard("!$event.metaKey"),
  17392. left: genGuard("'button' in $event && $event.button !== 0"),
  17393. middle: genGuard("'button' in $event && $event.button !== 1"),
  17394. right: genGuard("'button' in $event && $event.button !== 2")
  17395. };
  17396. function genHandlers (
  17397. events,
  17398. isNative
  17399. ) {
  17400. var prefix = isNative ? 'nativeOn:' : 'on:';
  17401. var staticHandlers = "";
  17402. var dynamicHandlers = "";
  17403. for (var name in events) {
  17404. var handlerCode = genHandler(events[name]);
  17405. if (events[name] && events[name].dynamic) {
  17406. dynamicHandlers += name + "," + handlerCode + ",";
  17407. } else {
  17408. staticHandlers += "\"" + name + "\":" + handlerCode + ",";
  17409. }
  17410. }
  17411. staticHandlers = "{" + (staticHandlers.slice(0, -1)) + "}";
  17412. if (dynamicHandlers) {
  17413. return prefix + "_d(" + staticHandlers + ",[" + (dynamicHandlers.slice(0, -1)) + "])"
  17414. } else {
  17415. return prefix + staticHandlers
  17416. }
  17417. }
  17418. function genHandler (handler) {
  17419. if (!handler) {
  17420. return 'function(){}'
  17421. }
  17422. if (Array.isArray(handler)) {
  17423. return ("[" + (handler.map(function (handler) { return genHandler(handler); }).join(',')) + "]")
  17424. }
  17425. var isMethodPath = simplePathRE.test(handler.value);
  17426. var isFunctionExpression = fnExpRE.test(handler.value);
  17427. var isFunctionInvocation = simplePathRE.test(handler.value.replace(fnInvokeRE, ''));
  17428. if (!handler.modifiers) {
  17429. if (isMethodPath || isFunctionExpression) {
  17430. return handler.value
  17431. }
  17432. return ("function($event){" + (isFunctionInvocation ? ("return " + (handler.value)) : handler.value) + "}") // inline statement
  17433. } else {
  17434. var code = '';
  17435. var genModifierCode = '';
  17436. var keys = [];
  17437. for (var key in handler.modifiers) {
  17438. if (modifierCode[key]) {
  17439. genModifierCode += modifierCode[key];
  17440. // left/right
  17441. if (keyCodes[key]) {
  17442. keys.push(key);
  17443. }
  17444. } else if (key === 'exact') {
  17445. var modifiers = (handler.modifiers);
  17446. genModifierCode += genGuard(
  17447. ['ctrl', 'shift', 'alt', 'meta']
  17448. .filter(function (keyModifier) { return !modifiers[keyModifier]; })
  17449. .map(function (keyModifier) { return ("$event." + keyModifier + "Key"); })
  17450. .join('||')
  17451. );
  17452. } else {
  17453. keys.push(key);
  17454. }
  17455. }
  17456. if (keys.length) {
  17457. code += genKeyFilter(keys);
  17458. }
  17459. // Make sure modifiers like prevent and stop get executed after key filtering
  17460. if (genModifierCode) {
  17461. code += genModifierCode;
  17462. }
  17463. var handlerCode = isMethodPath
  17464. ? ("return " + (handler.value) + ".apply(null, arguments)")
  17465. : isFunctionExpression
  17466. ? ("return (" + (handler.value) + ").apply(null, arguments)")
  17467. : isFunctionInvocation
  17468. ? ("return " + (handler.value))
  17469. : handler.value;
  17470. return ("function($event){" + code + handlerCode + "}")
  17471. }
  17472. }
  17473. function genKeyFilter (keys) {
  17474. return (
  17475. // make sure the key filters only apply to KeyboardEvents
  17476. // #9441: can't use 'keyCode' in $event because Chrome autofill fires fake
  17477. // key events that do not have keyCode property...
  17478. "if(!$event.type.indexOf('key')&&" +
  17479. (keys.map(genFilterCode).join('&&')) + ")return null;"
  17480. )
  17481. }
  17482. function genFilterCode (key) {
  17483. var keyVal = parseInt(key, 10);
  17484. if (keyVal) {
  17485. return ("$event.keyCode!==" + keyVal)
  17486. }
  17487. var keyCode = keyCodes[key];
  17488. var keyName = keyNames[key];
  17489. return (
  17490. "_k($event.keyCode," +
  17491. (JSON.stringify(key)) + "," +
  17492. (JSON.stringify(keyCode)) + "," +
  17493. "$event.key," +
  17494. "" + (JSON.stringify(keyName)) +
  17495. ")"
  17496. )
  17497. }
  17498. /* */
  17499. function on (el, dir) {
  17500. if ( true && dir.modifiers) {
  17501. warn("v-on without argument does not support modifiers.");
  17502. }
  17503. el.wrapListeners = function (code) { return ("_g(" + code + "," + (dir.value) + ")"); };
  17504. }
  17505. /* */
  17506. function bind$1 (el, dir) {
  17507. el.wrapData = function (code) {
  17508. return ("_b(" + code + ",'" + (el.tag) + "'," + (dir.value) + "," + (dir.modifiers && dir.modifiers.prop ? 'true' : 'false') + (dir.modifiers && dir.modifiers.sync ? ',true' : '') + ")")
  17509. };
  17510. }
  17511. /* */
  17512. var baseDirectives = {
  17513. on: on,
  17514. bind: bind$1,
  17515. cloak: noop
  17516. };
  17517. /* */
  17518. var CodegenState = function CodegenState (options) {
  17519. this.options = options;
  17520. this.warn = options.warn || baseWarn;
  17521. this.transforms = pluckModuleFunction(options.modules, 'transformCode');
  17522. this.dataGenFns = pluckModuleFunction(options.modules, 'genData');
  17523. this.directives = extend(extend({}, baseDirectives), options.directives);
  17524. var isReservedTag = options.isReservedTag || no;
  17525. this.maybeComponent = function (el) { return !!el.component || !isReservedTag(el.tag); };
  17526. this.onceId = 0;
  17527. this.staticRenderFns = [];
  17528. this.pre = false;
  17529. };
  17530. function generate (
  17531. ast,
  17532. options
  17533. ) {
  17534. var state = new CodegenState(options);
  17535. // fix #11483, Root level <script> tags should not be rendered.
  17536. var code = ast ? (ast.tag === 'script' ? 'null' : genElement(ast, state)) : '_c("div")';
  17537. return {
  17538. render: ("with(this){return " + code + "}"),
  17539. staticRenderFns: state.staticRenderFns
  17540. }
  17541. }
  17542. function genElement (el, state) {
  17543. if (el.parent) {
  17544. el.pre = el.pre || el.parent.pre;
  17545. }
  17546. if (el.staticRoot && !el.staticProcessed) {
  17547. return genStatic(el, state)
  17548. } else if (el.once && !el.onceProcessed) {
  17549. return genOnce(el, state)
  17550. } else if (el.for && !el.forProcessed) {
  17551. return genFor(el, state)
  17552. } else if (el.if && !el.ifProcessed) {
  17553. return genIf(el, state)
  17554. } else if (el.tag === 'template' && !el.slotTarget && !state.pre) {
  17555. return genChildren(el, state) || 'void 0'
  17556. } else if (el.tag === 'slot') {
  17557. return genSlot(el, state)
  17558. } else {
  17559. // component or element
  17560. var code;
  17561. if (el.component) {
  17562. code = genComponent(el.component, el, state);
  17563. } else {
  17564. var data;
  17565. if (!el.plain || (el.pre && state.maybeComponent(el))) {
  17566. data = genData$2(el, state);
  17567. }
  17568. var children = el.inlineTemplate ? null : genChildren(el, state, true);
  17569. code = "_c('" + (el.tag) + "'" + (data ? ("," + data) : '') + (children ? ("," + children) : '') + ")";
  17570. }
  17571. // module transforms
  17572. for (var i = 0; i < state.transforms.length; i++) {
  17573. code = state.transforms[i](el, code);
  17574. }
  17575. return code
  17576. }
  17577. }
  17578. // hoist static sub-trees out
  17579. function genStatic (el, state) {
  17580. el.staticProcessed = true;
  17581. // Some elements (templates) need to behave differently inside of a v-pre
  17582. // node. All pre nodes are static roots, so we can use this as a location to
  17583. // wrap a state change and reset it upon exiting the pre node.
  17584. var originalPreState = state.pre;
  17585. if (el.pre) {
  17586. state.pre = el.pre;
  17587. }
  17588. state.staticRenderFns.push(("with(this){return " + (genElement(el, state)) + "}"));
  17589. state.pre = originalPreState;
  17590. return ("_m(" + (state.staticRenderFns.length - 1) + (el.staticInFor ? ',true' : '') + ")")
  17591. }
  17592. // v-once
  17593. function genOnce (el, state) {
  17594. el.onceProcessed = true;
  17595. if (el.if && !el.ifProcessed) {
  17596. return genIf(el, state)
  17597. } else if (el.staticInFor) {
  17598. var key = '';
  17599. var parent = el.parent;
  17600. while (parent) {
  17601. if (parent.for) {
  17602. key = parent.key;
  17603. break
  17604. }
  17605. parent = parent.parent;
  17606. }
  17607. if (!key) {
  17608. true && state.warn(
  17609. "v-once can only be used inside v-for that is keyed. ",
  17610. el.rawAttrsMap['v-once']
  17611. );
  17612. return genElement(el, state)
  17613. }
  17614. return ("_o(" + (genElement(el, state)) + "," + (state.onceId++) + "," + key + ")")
  17615. } else {
  17616. return genStatic(el, state)
  17617. }
  17618. }
  17619. function genIf (
  17620. el,
  17621. state,
  17622. altGen,
  17623. altEmpty
  17624. ) {
  17625. el.ifProcessed = true; // avoid recursion
  17626. return genIfConditions(el.ifConditions.slice(), state, altGen, altEmpty)
  17627. }
  17628. function genIfConditions (
  17629. conditions,
  17630. state,
  17631. altGen,
  17632. altEmpty
  17633. ) {
  17634. if (!conditions.length) {
  17635. return altEmpty || '_e()'
  17636. }
  17637. var condition = conditions.shift();
  17638. if (condition.exp) {
  17639. return ("(" + (condition.exp) + ")?" + (genTernaryExp(condition.block)) + ":" + (genIfConditions(conditions, state, altGen, altEmpty)))
  17640. } else {
  17641. return ("" + (genTernaryExp(condition.block)))
  17642. }
  17643. // v-if with v-once should generate code like (a)?_m(0):_m(1)
  17644. function genTernaryExp (el) {
  17645. return altGen
  17646. ? altGen(el, state)
  17647. : el.once
  17648. ? genOnce(el, state)
  17649. : genElement(el, state)
  17650. }
  17651. }
  17652. function genFor (
  17653. el,
  17654. state,
  17655. altGen,
  17656. altHelper
  17657. ) {
  17658. var exp = el.for;
  17659. var alias = el.alias;
  17660. var iterator1 = el.iterator1 ? ("," + (el.iterator1)) : '';
  17661. var iterator2 = el.iterator2 ? ("," + (el.iterator2)) : '';
  17662. if ( true &&
  17663. state.maybeComponent(el) &&
  17664. el.tag !== 'slot' &&
  17665. el.tag !== 'template' &&
  17666. !el.key
  17667. ) {
  17668. state.warn(
  17669. "<" + (el.tag) + " v-for=\"" + alias + " in " + exp + "\">: component lists rendered with " +
  17670. "v-for should have explicit keys. " +
  17671. "See https://vuejs.org/guide/list.html#key for more info.",
  17672. el.rawAttrsMap['v-for'],
  17673. true /* tip */
  17674. );
  17675. }
  17676. el.forProcessed = true; // avoid recursion
  17677. return (altHelper || '_l') + "((" + exp + ")," +
  17678. "function(" + alias + iterator1 + iterator2 + "){" +
  17679. "return " + ((altGen || genElement)(el, state)) +
  17680. '})'
  17681. }
  17682. function genData$2 (el, state) {
  17683. var data = '{';
  17684. // directives first.
  17685. // directives may mutate the el's other properties before they are generated.
  17686. var dirs = genDirectives(el, state);
  17687. if (dirs) { data += dirs + ','; }
  17688. // key
  17689. if (el.key) {
  17690. data += "key:" + (el.key) + ",";
  17691. }
  17692. // ref
  17693. if (el.ref) {
  17694. data += "ref:" + (el.ref) + ",";
  17695. }
  17696. if (el.refInFor) {
  17697. data += "refInFor:true,";
  17698. }
  17699. // pre
  17700. if (el.pre) {
  17701. data += "pre:true,";
  17702. }
  17703. // record original tag name for components using "is" attribute
  17704. if (el.component) {
  17705. data += "tag:\"" + (el.tag) + "\",";
  17706. }
  17707. // module data generation functions
  17708. for (var i = 0; i < state.dataGenFns.length; i++) {
  17709. data += state.dataGenFns[i](el);
  17710. }
  17711. // attributes
  17712. if (el.attrs) {
  17713. data += "attrs:" + (genProps(el.attrs)) + ",";
  17714. }
  17715. // DOM props
  17716. if (el.props) {
  17717. data += "domProps:" + (genProps(el.props)) + ",";
  17718. }
  17719. // event handlers
  17720. if (el.events) {
  17721. data += (genHandlers(el.events, false)) + ",";
  17722. }
  17723. if (el.nativeEvents) {
  17724. data += (genHandlers(el.nativeEvents, true)) + ",";
  17725. }
  17726. // slot target
  17727. // only for non-scoped slots
  17728. if (el.slotTarget && !el.slotScope) {
  17729. data += "slot:" + (el.slotTarget) + ",";
  17730. }
  17731. // scoped slots
  17732. if (el.scopedSlots) {
  17733. data += (genScopedSlots(el, el.scopedSlots, state)) + ",";
  17734. }
  17735. // component v-model
  17736. if (el.model) {
  17737. data += "model:{value:" + (el.model.value) + ",callback:" + (el.model.callback) + ",expression:" + (el.model.expression) + "},";
  17738. }
  17739. // inline-template
  17740. if (el.inlineTemplate) {
  17741. var inlineTemplate = genInlineTemplate(el, state);
  17742. if (inlineTemplate) {
  17743. data += inlineTemplate + ",";
  17744. }
  17745. }
  17746. data = data.replace(/,$/, '') + '}';
  17747. // v-bind dynamic argument wrap
  17748. // v-bind with dynamic arguments must be applied using the same v-bind object
  17749. // merge helper so that class/style/mustUseProp attrs are handled correctly.
  17750. if (el.dynamicAttrs) {
  17751. data = "_b(" + data + ",\"" + (el.tag) + "\"," + (genProps(el.dynamicAttrs)) + ")";
  17752. }
  17753. // v-bind data wrap
  17754. if (el.wrapData) {
  17755. data = el.wrapData(data);
  17756. }
  17757. // v-on data wrap
  17758. if (el.wrapListeners) {
  17759. data = el.wrapListeners(data);
  17760. }
  17761. return data
  17762. }
  17763. function genDirectives (el, state) {
  17764. var dirs = el.directives;
  17765. if (!dirs) { return }
  17766. var res = 'directives:[';
  17767. var hasRuntime = false;
  17768. var i, l, dir, needRuntime;
  17769. for (i = 0, l = dirs.length; i < l; i++) {
  17770. dir = dirs[i];
  17771. needRuntime = true;
  17772. var gen = state.directives[dir.name];
  17773. if (gen) {
  17774. // compile-time directive that manipulates AST.
  17775. // returns true if it also needs a runtime counterpart.
  17776. needRuntime = !!gen(el, dir, state.warn);
  17777. }
  17778. if (needRuntime) {
  17779. hasRuntime = true;
  17780. res += "{name:\"" + (dir.name) + "\",rawName:\"" + (dir.rawName) + "\"" + (dir.value ? (",value:(" + (dir.value) + "),expression:" + (JSON.stringify(dir.value))) : '') + (dir.arg ? (",arg:" + (dir.isDynamicArg ? dir.arg : ("\"" + (dir.arg) + "\""))) : '') + (dir.modifiers ? (",modifiers:" + (JSON.stringify(dir.modifiers))) : '') + "},";
  17781. }
  17782. }
  17783. if (hasRuntime) {
  17784. return res.slice(0, -1) + ']'
  17785. }
  17786. }
  17787. function genInlineTemplate (el, state) {
  17788. var ast = el.children[0];
  17789. if ( true && (
  17790. el.children.length !== 1 || ast.type !== 1
  17791. )) {
  17792. state.warn(
  17793. 'Inline-template components must have exactly one child element.',
  17794. { start: el.start }
  17795. );
  17796. }
  17797. if (ast && ast.type === 1) {
  17798. var inlineRenderFns = generate(ast, state.options);
  17799. return ("inlineTemplate:{render:function(){" + (inlineRenderFns.render) + "},staticRenderFns:[" + (inlineRenderFns.staticRenderFns.map(function (code) { return ("function(){" + code + "}"); }).join(',')) + "]}")
  17800. }
  17801. }
  17802. function genScopedSlots (
  17803. el,
  17804. slots,
  17805. state
  17806. ) {
  17807. // by default scoped slots are considered "stable", this allows child
  17808. // components with only scoped slots to skip forced updates from parent.
  17809. // but in some cases we have to bail-out of this optimization
  17810. // for example if the slot contains dynamic names, has v-if or v-for on them...
  17811. var needsForceUpdate = el.for || Object.keys(slots).some(function (key) {
  17812. var slot = slots[key];
  17813. return (
  17814. slot.slotTargetDynamic ||
  17815. slot.if ||
  17816. slot.for ||
  17817. containsSlotChild(slot) // is passing down slot from parent which may be dynamic
  17818. )
  17819. });
  17820. // #9534: if a component with scoped slots is inside a conditional branch,
  17821. // it's possible for the same component to be reused but with different
  17822. // compiled slot content. To avoid that, we generate a unique key based on
  17823. // the generated code of all the slot contents.
  17824. var needsKey = !!el.if;
  17825. // OR when it is inside another scoped slot or v-for (the reactivity may be
  17826. // disconnected due to the intermediate scope variable)
  17827. // #9438, #9506
  17828. // TODO: this can be further optimized by properly analyzing in-scope bindings
  17829. // and skip force updating ones that do not actually use scope variables.
  17830. if (!needsForceUpdate) {
  17831. var parent = el.parent;
  17832. while (parent) {
  17833. if (
  17834. (parent.slotScope && parent.slotScope !== emptySlotScopeToken) ||
  17835. parent.for
  17836. ) {
  17837. needsForceUpdate = true;
  17838. break
  17839. }
  17840. if (parent.if) {
  17841. needsKey = true;
  17842. }
  17843. parent = parent.parent;
  17844. }
  17845. }
  17846. var generatedSlots = Object.keys(slots)
  17847. .map(function (key) { return genScopedSlot(slots[key], state); })
  17848. .join(',');
  17849. return ("scopedSlots:_u([" + generatedSlots + "]" + (needsForceUpdate ? ",null,true" : "") + (!needsForceUpdate && needsKey ? (",null,false," + (hash(generatedSlots))) : "") + ")")
  17850. }
  17851. function hash(str) {
  17852. var hash = 5381;
  17853. var i = str.length;
  17854. while(i) {
  17855. hash = (hash * 33) ^ str.charCodeAt(--i);
  17856. }
  17857. return hash >>> 0
  17858. }
  17859. function containsSlotChild (el) {
  17860. if (el.type === 1) {
  17861. if (el.tag === 'slot') {
  17862. return true
  17863. }
  17864. return el.children.some(containsSlotChild)
  17865. }
  17866. return false
  17867. }
  17868. function genScopedSlot (
  17869. el,
  17870. state
  17871. ) {
  17872. var isLegacySyntax = el.attrsMap['slot-scope'];
  17873. if (el.if && !el.ifProcessed && !isLegacySyntax) {
  17874. return genIf(el, state, genScopedSlot, "null")
  17875. }
  17876. if (el.for && !el.forProcessed) {
  17877. return genFor(el, state, genScopedSlot)
  17878. }
  17879. var slotScope = el.slotScope === emptySlotScopeToken
  17880. ? ""
  17881. : String(el.slotScope);
  17882. var fn = "function(" + slotScope + "){" +
  17883. "return " + (el.tag === 'template'
  17884. ? el.if && isLegacySyntax
  17885. ? ("(" + (el.if) + ")?" + (genChildren(el, state) || 'undefined') + ":undefined")
  17886. : genChildren(el, state) || 'undefined'
  17887. : genElement(el, state)) + "}";
  17888. // reverse proxy v-slot without scope on this.$slots
  17889. var reverseProxy = slotScope ? "" : ",proxy:true";
  17890. return ("{key:" + (el.slotTarget || "\"default\"") + ",fn:" + fn + reverseProxy + "}")
  17891. }
  17892. function genChildren (
  17893. el,
  17894. state,
  17895. checkSkip,
  17896. altGenElement,
  17897. altGenNode
  17898. ) {
  17899. var children = el.children;
  17900. if (children.length) {
  17901. var el$1 = children[0];
  17902. // optimize single v-for
  17903. if (children.length === 1 &&
  17904. el$1.for &&
  17905. el$1.tag !== 'template' &&
  17906. el$1.tag !== 'slot'
  17907. ) {
  17908. var normalizationType = checkSkip
  17909. ? state.maybeComponent(el$1) ? ",1" : ",0"
  17910. : "";
  17911. return ("" + ((altGenElement || genElement)(el$1, state)) + normalizationType)
  17912. }
  17913. var normalizationType$1 = checkSkip
  17914. ? getNormalizationType(children, state.maybeComponent)
  17915. : 0;
  17916. var gen = altGenNode || genNode;
  17917. return ("[" + (children.map(function (c) { return gen(c, state); }).join(',')) + "]" + (normalizationType$1 ? ("," + normalizationType$1) : ''))
  17918. }
  17919. }
  17920. // determine the normalization needed for the children array.
  17921. // 0: no normalization needed
  17922. // 1: simple normalization needed (possible 1-level deep nested array)
  17923. // 2: full normalization needed
  17924. function getNormalizationType (
  17925. children,
  17926. maybeComponent
  17927. ) {
  17928. var res = 0;
  17929. for (var i = 0; i < children.length; i++) {
  17930. var el = children[i];
  17931. if (el.type !== 1) {
  17932. continue
  17933. }
  17934. if (needsNormalization(el) ||
  17935. (el.ifConditions && el.ifConditions.some(function (c) { return needsNormalization(c.block); }))) {
  17936. res = 2;
  17937. break
  17938. }
  17939. if (maybeComponent(el) ||
  17940. (el.ifConditions && el.ifConditions.some(function (c) { return maybeComponent(c.block); }))) {
  17941. res = 1;
  17942. }
  17943. }
  17944. return res
  17945. }
  17946. function needsNormalization (el) {
  17947. return el.for !== undefined || el.tag === 'template' || el.tag === 'slot'
  17948. }
  17949. function genNode (node, state) {
  17950. if (node.type === 1) {
  17951. return genElement(node, state)
  17952. } else if (node.type === 3 && node.isComment) {
  17953. return genComment(node)
  17954. } else {
  17955. return genText(node)
  17956. }
  17957. }
  17958. function genText (text) {
  17959. return ("_v(" + (text.type === 2
  17960. ? text.expression // no need for () because already wrapped in _s()
  17961. : transformSpecialNewlines(JSON.stringify(text.text))) + ")")
  17962. }
  17963. function genComment (comment) {
  17964. return ("_e(" + (JSON.stringify(comment.text)) + ")")
  17965. }
  17966. function genSlot (el, state) {
  17967. var slotName = el.slotName || '"default"';
  17968. var children = genChildren(el, state);
  17969. var res = "_t(" + slotName + (children ? (",function(){return " + children + "}") : '');
  17970. var attrs = el.attrs || el.dynamicAttrs
  17971. ? genProps((el.attrs || []).concat(el.dynamicAttrs || []).map(function (attr) { return ({
  17972. // slot props are camelized
  17973. name: camelize(attr.name),
  17974. value: attr.value,
  17975. dynamic: attr.dynamic
  17976. }); }))
  17977. : null;
  17978. var bind$$1 = el.attrsMap['v-bind'];
  17979. if ((attrs || bind$$1) && !children) {
  17980. res += ",null";
  17981. }
  17982. if (attrs) {
  17983. res += "," + attrs;
  17984. }
  17985. if (bind$$1) {
  17986. res += (attrs ? '' : ',null') + "," + bind$$1;
  17987. }
  17988. return res + ')'
  17989. }
  17990. // componentName is el.component, take it as argument to shun flow's pessimistic refinement
  17991. function genComponent (
  17992. componentName,
  17993. el,
  17994. state
  17995. ) {
  17996. var children = el.inlineTemplate ? null : genChildren(el, state, true);
  17997. return ("_c(" + componentName + "," + (genData$2(el, state)) + (children ? ("," + children) : '') + ")")
  17998. }
  17999. function genProps (props) {
  18000. var staticProps = "";
  18001. var dynamicProps = "";
  18002. for (var i = 0; i < props.length; i++) {
  18003. var prop = props[i];
  18004. var value = transformSpecialNewlines(prop.value);
  18005. if (prop.dynamic) {
  18006. dynamicProps += (prop.name) + "," + value + ",";
  18007. } else {
  18008. staticProps += "\"" + (prop.name) + "\":" + value + ",";
  18009. }
  18010. }
  18011. staticProps = "{" + (staticProps.slice(0, -1)) + "}";
  18012. if (dynamicProps) {
  18013. return ("_d(" + staticProps + ",[" + (dynamicProps.slice(0, -1)) + "])")
  18014. } else {
  18015. return staticProps
  18016. }
  18017. }
  18018. // #3895, #4268
  18019. function transformSpecialNewlines (text) {
  18020. return text
  18021. .replace(/\u2028/g, '\\u2028')
  18022. .replace(/\u2029/g, '\\u2029')
  18023. }
  18024. /* */
  18025. // these keywords should not appear inside expressions, but operators like
  18026. // typeof, instanceof and in are allowed
  18027. var prohibitedKeywordRE = new RegExp('\\b' + (
  18028. 'do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' +
  18029. 'super,throw,while,yield,delete,export,import,return,switch,default,' +
  18030. 'extends,finally,continue,debugger,function,arguments'
  18031. ).split(',').join('\\b|\\b') + '\\b');
  18032. // these unary operators should not be used as property/method names
  18033. var unaryOperatorsRE = new RegExp('\\b' + (
  18034. 'delete,typeof,void'
  18035. ).split(',').join('\\s*\\([^\\)]*\\)|\\b') + '\\s*\\([^\\)]*\\)');
  18036. // strip strings in expressions
  18037. var stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g;
  18038. // detect problematic expressions in a template
  18039. function detectErrors (ast, warn) {
  18040. if (ast) {
  18041. checkNode(ast, warn);
  18042. }
  18043. }
  18044. function checkNode (node, warn) {
  18045. if (node.type === 1) {
  18046. for (var name in node.attrsMap) {
  18047. if (dirRE.test(name)) {
  18048. var value = node.attrsMap[name];
  18049. if (value) {
  18050. var range = node.rawAttrsMap[name];
  18051. if (name === 'v-for') {
  18052. checkFor(node, ("v-for=\"" + value + "\""), warn, range);
  18053. } else if (name === 'v-slot' || name[0] === '#') {
  18054. checkFunctionParameterExpression(value, (name + "=\"" + value + "\""), warn, range);
  18055. } else if (onRE.test(name)) {
  18056. checkEvent(value, (name + "=\"" + value + "\""), warn, range);
  18057. } else {
  18058. checkExpression(value, (name + "=\"" + value + "\""), warn, range);
  18059. }
  18060. }
  18061. }
  18062. }
  18063. if (node.children) {
  18064. for (var i = 0; i < node.children.length; i++) {
  18065. checkNode(node.children[i], warn);
  18066. }
  18067. }
  18068. } else if (node.type === 2) {
  18069. checkExpression(node.expression, node.text, warn, node);
  18070. }
  18071. }
  18072. function checkEvent (exp, text, warn, range) {
  18073. var stripped = exp.replace(stripStringRE, '');
  18074. var keywordMatch = stripped.match(unaryOperatorsRE);
  18075. if (keywordMatch && stripped.charAt(keywordMatch.index - 1) !== '$') {
  18076. warn(
  18077. "avoid using JavaScript unary operator as property name: " +
  18078. "\"" + (keywordMatch[0]) + "\" in expression " + (text.trim()),
  18079. range
  18080. );
  18081. }
  18082. checkExpression(exp, text, warn, range);
  18083. }
  18084. function checkFor (node, text, warn, range) {
  18085. checkExpression(node.for || '', text, warn, range);
  18086. checkIdentifier(node.alias, 'v-for alias', text, warn, range);
  18087. checkIdentifier(node.iterator1, 'v-for iterator', text, warn, range);
  18088. checkIdentifier(node.iterator2, 'v-for iterator', text, warn, range);
  18089. }
  18090. function checkIdentifier (
  18091. ident,
  18092. type,
  18093. text,
  18094. warn,
  18095. range
  18096. ) {
  18097. if (typeof ident === 'string') {
  18098. try {
  18099. new Function(("var " + ident + "=_"));
  18100. } catch (e) {
  18101. warn(("invalid " + type + " \"" + ident + "\" in expression: " + (text.trim())), range);
  18102. }
  18103. }
  18104. }
  18105. function checkExpression (exp, text, warn, range) {
  18106. try {
  18107. new Function(("return " + exp));
  18108. } catch (e) {
  18109. var keywordMatch = exp.replace(stripStringRE, '').match(prohibitedKeywordRE);
  18110. if (keywordMatch) {
  18111. warn(
  18112. "avoid using JavaScript keyword as property name: " +
  18113. "\"" + (keywordMatch[0]) + "\"\n Raw expression: " + (text.trim()),
  18114. range
  18115. );
  18116. } else {
  18117. warn(
  18118. "invalid expression: " + (e.message) + " in\n\n" +
  18119. " " + exp + "\n\n" +
  18120. " Raw expression: " + (text.trim()) + "\n",
  18121. range
  18122. );
  18123. }
  18124. }
  18125. }
  18126. function checkFunctionParameterExpression (exp, text, warn, range) {
  18127. try {
  18128. new Function(exp, '');
  18129. } catch (e) {
  18130. warn(
  18131. "invalid function parameter expression: " + (e.message) + " in\n\n" +
  18132. " " + exp + "\n\n" +
  18133. " Raw expression: " + (text.trim()) + "\n",
  18134. range
  18135. );
  18136. }
  18137. }
  18138. /* */
  18139. var range = 2;
  18140. function generateCodeFrame (
  18141. source,
  18142. start,
  18143. end
  18144. ) {
  18145. if ( start === void 0 ) start = 0;
  18146. if ( end === void 0 ) end = source.length;
  18147. var lines = source.split(/\r?\n/);
  18148. var count = 0;
  18149. var res = [];
  18150. for (var i = 0; i < lines.length; i++) {
  18151. count += lines[i].length + 1;
  18152. if (count >= start) {
  18153. for (var j = i - range; j <= i + range || end > count; j++) {
  18154. if (j < 0 || j >= lines.length) { continue }
  18155. res.push(("" + (j + 1) + (repeat$1(" ", 3 - String(j + 1).length)) + "| " + (lines[j])));
  18156. var lineLength = lines[j].length;
  18157. if (j === i) {
  18158. // push underline
  18159. var pad = start - (count - lineLength) + 1;
  18160. var length = end > count ? lineLength - pad : end - start;
  18161. res.push(" | " + repeat$1(" ", pad) + repeat$1("^", length));
  18162. } else if (j > i) {
  18163. if (end > count) {
  18164. var length$1 = Math.min(end - count, lineLength);
  18165. res.push(" | " + repeat$1("^", length$1));
  18166. }
  18167. count += lineLength + 1;
  18168. }
  18169. }
  18170. break
  18171. }
  18172. }
  18173. return res.join('\n')
  18174. }
  18175. function repeat$1 (str, n) {
  18176. var result = '';
  18177. if (n > 0) {
  18178. while (true) { // eslint-disable-line
  18179. if (n & 1) { result += str; }
  18180. n >>>= 1;
  18181. if (n <= 0) { break }
  18182. str += str;
  18183. }
  18184. }
  18185. return result
  18186. }
  18187. /* */
  18188. function createFunction (code, errors) {
  18189. try {
  18190. return new Function(code)
  18191. } catch (err) {
  18192. errors.push({ err: err, code: code });
  18193. return noop
  18194. }
  18195. }
  18196. function createCompileToFunctionFn (compile) {
  18197. var cache = Object.create(null);
  18198. return function compileToFunctions (
  18199. template,
  18200. options,
  18201. vm
  18202. ) {
  18203. options = extend({}, options);
  18204. var warn$$1 = options.warn || warn;
  18205. delete options.warn;
  18206. /* istanbul ignore if */
  18207. if (true) {
  18208. // detect possible CSP restriction
  18209. try {
  18210. new Function('return 1');
  18211. } catch (e) {
  18212. if (e.toString().match(/unsafe-eval|CSP/)) {
  18213. warn$$1(
  18214. 'It seems you are using the standalone build of Vue.js in an ' +
  18215. 'environment with Content Security Policy that prohibits unsafe-eval. ' +
  18216. 'The template compiler cannot work in this environment. Consider ' +
  18217. 'relaxing the policy to allow unsafe-eval or pre-compiling your ' +
  18218. 'templates into render functions.'
  18219. );
  18220. }
  18221. }
  18222. }
  18223. // check cache
  18224. var key = options.delimiters
  18225. ? String(options.delimiters) + template
  18226. : template;
  18227. if (cache[key]) {
  18228. return cache[key]
  18229. }
  18230. // compile
  18231. var compiled = compile(template, options);
  18232. // check compilation errors/tips
  18233. if (true) {
  18234. if (compiled.errors && compiled.errors.length) {
  18235. if (options.outputSourceRange) {
  18236. compiled.errors.forEach(function (e) {
  18237. warn$$1(
  18238. "Error compiling template:\n\n" + (e.msg) + "\n\n" +
  18239. generateCodeFrame(template, e.start, e.end),
  18240. vm
  18241. );
  18242. });
  18243. } else {
  18244. warn$$1(
  18245. "Error compiling template:\n\n" + template + "\n\n" +
  18246. compiled.errors.map(function (e) { return ("- " + e); }).join('\n') + '\n',
  18247. vm
  18248. );
  18249. }
  18250. }
  18251. if (compiled.tips && compiled.tips.length) {
  18252. if (options.outputSourceRange) {
  18253. compiled.tips.forEach(function (e) { return tip(e.msg, vm); });
  18254. } else {
  18255. compiled.tips.forEach(function (msg) { return tip(msg, vm); });
  18256. }
  18257. }
  18258. }
  18259. // turn code into functions
  18260. var res = {};
  18261. var fnGenErrors = [];
  18262. res.render = createFunction(compiled.render, fnGenErrors);
  18263. res.staticRenderFns = compiled.staticRenderFns.map(function (code) {
  18264. return createFunction(code, fnGenErrors)
  18265. });
  18266. // check function generation errors.
  18267. // this should only happen if there is a bug in the compiler itself.
  18268. // mostly for codegen development use
  18269. /* istanbul ignore if */
  18270. if (true) {
  18271. if ((!compiled.errors || !compiled.errors.length) && fnGenErrors.length) {
  18272. warn$$1(
  18273. "Failed to generate render function:\n\n" +
  18274. fnGenErrors.map(function (ref) {
  18275. var err = ref.err;
  18276. var code = ref.code;
  18277. return ((err.toString()) + " in\n\n" + code + "\n");
  18278. }).join('\n'),
  18279. vm
  18280. );
  18281. }
  18282. }
  18283. return (cache[key] = res)
  18284. }
  18285. }
  18286. /* */
  18287. function createCompilerCreator (baseCompile) {
  18288. return function createCompiler (baseOptions) {
  18289. function compile (
  18290. template,
  18291. options
  18292. ) {
  18293. var finalOptions = Object.create(baseOptions);
  18294. var errors = [];
  18295. var tips = [];
  18296. var warn = function (msg, range, tip) {
  18297. (tip ? tips : errors).push(msg);
  18298. };
  18299. if (options) {
  18300. if ( true && options.outputSourceRange) {
  18301. // $flow-disable-line
  18302. var leadingSpaceLength = template.match(/^\s*/)[0].length;
  18303. warn = function (msg, range, tip) {
  18304. var data = { msg: msg };
  18305. if (range) {
  18306. if (range.start != null) {
  18307. data.start = range.start + leadingSpaceLength;
  18308. }
  18309. if (range.end != null) {
  18310. data.end = range.end + leadingSpaceLength;
  18311. }
  18312. }
  18313. (tip ? tips : errors).push(data);
  18314. };
  18315. }
  18316. // merge custom modules
  18317. if (options.modules) {
  18318. finalOptions.modules =
  18319. (baseOptions.modules || []).concat(options.modules);
  18320. }
  18321. // merge custom directives
  18322. if (options.directives) {
  18323. finalOptions.directives = extend(
  18324. Object.create(baseOptions.directives || null),
  18325. options.directives
  18326. );
  18327. }
  18328. // copy other options
  18329. for (var key in options) {
  18330. if (key !== 'modules' && key !== 'directives') {
  18331. finalOptions[key] = options[key];
  18332. }
  18333. }
  18334. }
  18335. finalOptions.warn = warn;
  18336. var compiled = baseCompile(template.trim(), finalOptions);
  18337. if (true) {
  18338. detectErrors(compiled.ast, warn);
  18339. }
  18340. compiled.errors = errors;
  18341. compiled.tips = tips;
  18342. return compiled
  18343. }
  18344. return {
  18345. compile: compile,
  18346. compileToFunctions: createCompileToFunctionFn(compile)
  18347. }
  18348. }
  18349. }
  18350. /* */
  18351. // `createCompilerCreator` allows creating compilers that use alternative
  18352. // parser/optimizer/codegen, e.g the SSR optimizing compiler.
  18353. // Here we just export a default compiler using the default parts.
  18354. var createCompiler = createCompilerCreator(function baseCompile (
  18355. template,
  18356. options
  18357. ) {
  18358. var ast = parse(template.trim(), options);
  18359. if (options.optimize !== false) {
  18360. optimize(ast, options);
  18361. }
  18362. var code = generate(ast, options);
  18363. return {
  18364. ast: ast,
  18365. render: code.render,
  18366. staticRenderFns: code.staticRenderFns
  18367. }
  18368. });
  18369. /* */
  18370. var ref$1 = createCompiler(baseOptions);
  18371. var compile = ref$1.compile;
  18372. var compileToFunctions = ref$1.compileToFunctions;
  18373. /* */
  18374. // check whether current browser encodes a char inside attribute values
  18375. var div;
  18376. function getShouldDecode (href) {
  18377. div = div || document.createElement('div');
  18378. div.innerHTML = href ? "<a href=\"\n\"/>" : "<div a=\"\n\"/>";
  18379. return div.innerHTML.indexOf('&#10;') > 0
  18380. }
  18381. // #3663: IE encodes newlines inside attribute values while other browsers don't
  18382. var shouldDecodeNewlines = inBrowser ? getShouldDecode(false) : false;
  18383. // #6828: chrome encodes content in a[href]
  18384. var shouldDecodeNewlinesForHref = inBrowser ? getShouldDecode(true) : false;
  18385. /* */
  18386. var idToTemplate = cached(function (id) {
  18387. var el = query(id);
  18388. return el && el.innerHTML
  18389. });
  18390. var mount = Vue.prototype.$mount;
  18391. Vue.prototype.$mount = function (
  18392. el,
  18393. hydrating
  18394. ) {
  18395. el = el && query(el);
  18396. /* istanbul ignore if */
  18397. if (el === document.body || el === document.documentElement) {
  18398. true && warn(
  18399. "Do not mount Vue to <html> or <body> - mount to normal elements instead."
  18400. );
  18401. return this
  18402. }
  18403. var options = this.$options;
  18404. // resolve template/el and convert to render function
  18405. if (!options.render) {
  18406. var template = options.template;
  18407. if (template) {
  18408. if (typeof template === 'string') {
  18409. if (template.charAt(0) === '#') {
  18410. template = idToTemplate(template);
  18411. /* istanbul ignore if */
  18412. if ( true && !template) {
  18413. warn(
  18414. ("Template element not found or is empty: " + (options.template)),
  18415. this
  18416. );
  18417. }
  18418. }
  18419. } else if (template.nodeType) {
  18420. template = template.innerHTML;
  18421. } else {
  18422. if (true) {
  18423. warn('invalid template option:' + template, this);
  18424. }
  18425. return this
  18426. }
  18427. } else if (el) {
  18428. template = getOuterHTML(el);
  18429. }
  18430. if (template) {
  18431. /* istanbul ignore if */
  18432. if ( true && config.performance && mark) {
  18433. mark('compile');
  18434. }
  18435. var ref = compileToFunctions(template, {
  18436. outputSourceRange: "development" !== 'production',
  18437. shouldDecodeNewlines: shouldDecodeNewlines,
  18438. shouldDecodeNewlinesForHref: shouldDecodeNewlinesForHref,
  18439. delimiters: options.delimiters,
  18440. comments: options.comments
  18441. }, this);
  18442. var render = ref.render;
  18443. var staticRenderFns = ref.staticRenderFns;
  18444. options.render = render;
  18445. options.staticRenderFns = staticRenderFns;
  18446. /* istanbul ignore if */
  18447. if ( true && config.performance && mark) {
  18448. mark('compile end');
  18449. measure(("vue " + (this._name) + " compile"), 'compile', 'compile end');
  18450. }
  18451. }
  18452. }
  18453. return mount.call(this, el, hydrating)
  18454. };
  18455. /**
  18456. * Get outerHTML of elements, taking care
  18457. * of SVG elements in IE as well.
  18458. */
  18459. function getOuterHTML (el) {
  18460. if (el.outerHTML) {
  18461. return el.outerHTML
  18462. } else {
  18463. var container = document.createElement('div');
  18464. container.appendChild(el.cloneNode(true));
  18465. return container.innerHTML
  18466. }
  18467. }
  18468. Vue.compile = compileToFunctions;
  18469. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Vue);
  18470. /***/ }),
  18471. /***/ "./resources/js/pages lazy recursive ^\\.\\/.*$":
  18472. /*!************************************************************!*\
  18473. !*** ./resources/js/pages/ lazy ^\.\/.*$ namespace object ***!
  18474. \************************************************************/
  18475. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  18476. var map = {
  18477. "./about": [
  18478. "./resources/js/pages/about.vue",
  18479. "resources_js_pages_about_vue"
  18480. ],
  18481. "./about.vue": [
  18482. "./resources/js/pages/about.vue",
  18483. "resources_js_pages_about_vue"
  18484. ],
  18485. "./home": [
  18486. "./resources/js/pages/home.vue",
  18487. "resources_js_pages_home_vue"
  18488. ],
  18489. "./home.vue": [
  18490. "./resources/js/pages/home.vue",
  18491. "resources_js_pages_home_vue"
  18492. ]
  18493. };
  18494. function webpackAsyncContext(req) {
  18495. if(!__webpack_require__.o(map, req)) {
  18496. return Promise.resolve().then(() => {
  18497. var e = new Error("Cannot find module '" + req + "'");
  18498. e.code = 'MODULE_NOT_FOUND';
  18499. throw e;
  18500. });
  18501. }
  18502. var ids = map[req], id = ids[0];
  18503. return __webpack_require__.e(ids[1]).then(() => {
  18504. return __webpack_require__(id);
  18505. });
  18506. }
  18507. webpackAsyncContext.keys = () => (Object.keys(map));
  18508. webpackAsyncContext.id = "./resources/js/pages lazy recursive ^\\.\\/.*$";
  18509. module.exports = webpackAsyncContext;
  18510. /***/ }),
  18511. /***/ "?2128":
  18512. /*!********************************!*\
  18513. !*** ./util.inspect (ignored) ***!
  18514. \********************************/
  18515. /***/ (() => {
  18516. /* (ignored) */
  18517. /***/ }),
  18518. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/package.json":
  18519. /*!*************************************************************************!*\
  18520. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/package.json ***!
  18521. \*************************************************************************/
  18522. /***/ ((module) => {
  18523. "use strict";
  18524. module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}');
  18525. /***/ })
  18526. /******/ });
  18527. /************************************************************************/
  18528. /******/ // The module cache
  18529. /******/ var __webpack_module_cache__ = {};
  18530. /******/
  18531. /******/ // The require function
  18532. /******/ function __webpack_require__(moduleId) {
  18533. /******/ // Check if module is in cache
  18534. /******/ var cachedModule = __webpack_module_cache__[moduleId];
  18535. /******/ if (cachedModule !== undefined) {
  18536. /******/ return cachedModule.exports;
  18537. /******/ }
  18538. /******/ // Create a new module (and put it into the cache)
  18539. /******/ var module = __webpack_module_cache__[moduleId] = {
  18540. /******/ id: moduleId,
  18541. /******/ loaded: false,
  18542. /******/ exports: {}
  18543. /******/ };
  18544. /******/
  18545. /******/ // Execute the module function
  18546. /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  18547. /******/
  18548. /******/ // Flag the module as loaded
  18549. /******/ module.loaded = true;
  18550. /******/
  18551. /******/ // Return the exports of the module
  18552. /******/ return module.exports;
  18553. /******/ }
  18554. /******/
  18555. /******/ // expose the modules object (__webpack_modules__)
  18556. /******/ __webpack_require__.m = __webpack_modules__;
  18557. /******/
  18558. /************************************************************************/
  18559. /******/ /* webpack/runtime/chunk loaded */
  18560. /******/ (() => {
  18561. /******/ var deferred = [];
  18562. /******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
  18563. /******/ if(chunkIds) {
  18564. /******/ priority = priority || 0;
  18565. /******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
  18566. /******/ deferred[i] = [chunkIds, fn, priority];
  18567. /******/ return;
  18568. /******/ }
  18569. /******/ var notFulfilled = Infinity;
  18570. /******/ for (var i = 0; i < deferred.length; i++) {
  18571. /******/ var [chunkIds, fn, priority] = deferred[i];
  18572. /******/ var fulfilled = true;
  18573. /******/ for (var j = 0; j < chunkIds.length; j++) {
  18574. /******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
  18575. /******/ chunkIds.splice(j--, 1);
  18576. /******/ } else {
  18577. /******/ fulfilled = false;
  18578. /******/ if(priority < notFulfilled) notFulfilled = priority;
  18579. /******/ }
  18580. /******/ }
  18581. /******/ if(fulfilled) {
  18582. /******/ deferred.splice(i--, 1)
  18583. /******/ var r = fn();
  18584. /******/ if (r !== undefined) result = r;
  18585. /******/ }
  18586. /******/ }
  18587. /******/ return result;
  18588. /******/ };
  18589. /******/ })();
  18590. /******/
  18591. /******/ /* webpack/runtime/compat get default export */
  18592. /******/ (() => {
  18593. /******/ // getDefaultExport function for compatibility with non-harmony modules
  18594. /******/ __webpack_require__.n = (module) => {
  18595. /******/ var getter = module && module.__esModule ?
  18596. /******/ () => (module['default']) :
  18597. /******/ () => (module);
  18598. /******/ __webpack_require__.d(getter, { a: getter });
  18599. /******/ return getter;
  18600. /******/ };
  18601. /******/ })();
  18602. /******/
  18603. /******/ /* webpack/runtime/define property getters */
  18604. /******/ (() => {
  18605. /******/ // define getter functions for harmony exports
  18606. /******/ __webpack_require__.d = (exports, definition) => {
  18607. /******/ for(var key in definition) {
  18608. /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
  18609. /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
  18610. /******/ }
  18611. /******/ }
  18612. /******/ };
  18613. /******/ })();
  18614. /******/
  18615. /******/ /* webpack/runtime/ensure chunk */
  18616. /******/ (() => {
  18617. /******/ __webpack_require__.f = {};
  18618. /******/ // This file contains only the entry chunk.
  18619. /******/ // The chunk loading function for additional chunks
  18620. /******/ __webpack_require__.e = (chunkId) => {
  18621. /******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {
  18622. /******/ __webpack_require__.f[key](chunkId, promises);
  18623. /******/ return promises;
  18624. /******/ }, []));
  18625. /******/ };
  18626. /******/ })();
  18627. /******/
  18628. /******/ /* webpack/runtime/get javascript chunk filename */
  18629. /******/ (() => {
  18630. /******/ // This function allow to reference async chunks
  18631. /******/ __webpack_require__.u = (chunkId) => {
  18632. /******/ // return url for filenames based on template
  18633. /******/ return "js/" + chunkId + ".js?id=" + {"resources_js_pages_about_vue":"ae1328dd608f50a7","resources_js_pages_home_vue":"284d1033ba00e356"}[chunkId] + "";
  18634. /******/ };
  18635. /******/ })();
  18636. /******/
  18637. /******/ /* webpack/runtime/get mini-css chunk filename */
  18638. /******/ (() => {
  18639. /******/ // This function allow to reference all chunks
  18640. /******/ __webpack_require__.miniCssF = (chunkId) => {
  18641. /******/ // return url for filenames based on template
  18642. /******/ return "" + chunkId + ".css";
  18643. /******/ };
  18644. /******/ })();
  18645. /******/
  18646. /******/ /* webpack/runtime/global */
  18647. /******/ (() => {
  18648. /******/ __webpack_require__.g = (function() {
  18649. /******/ if (typeof globalThis === 'object') return globalThis;
  18650. /******/ try {
  18651. /******/ return this || new Function('return this')();
  18652. /******/ } catch (e) {
  18653. /******/ if (typeof window === 'object') return window;
  18654. /******/ }
  18655. /******/ })();
  18656. /******/ })();
  18657. /******/
  18658. /******/ /* webpack/runtime/hasOwnProperty shorthand */
  18659. /******/ (() => {
  18660. /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
  18661. /******/ })();
  18662. /******/
  18663. /******/ /* webpack/runtime/load script */
  18664. /******/ (() => {
  18665. /******/ var inProgress = {};
  18666. /******/ // data-webpack is not used as build has no uniqueName
  18667. /******/ // loadScript function to load a script via script tag
  18668. /******/ __webpack_require__.l = (url, done, key, chunkId) => {
  18669. /******/ if(inProgress[url]) { inProgress[url].push(done); return; }
  18670. /******/ var script, needAttach;
  18671. /******/ if(key !== undefined) {
  18672. /******/ var scripts = document.getElementsByTagName("script");
  18673. /******/ for(var i = 0; i < scripts.length; i++) {
  18674. /******/ var s = scripts[i];
  18675. /******/ if(s.getAttribute("src") == url) { script = s; break; }
  18676. /******/ }
  18677. /******/ }
  18678. /******/ if(!script) {
  18679. /******/ needAttach = true;
  18680. /******/ script = document.createElement('script');
  18681. /******/
  18682. /******/ script.charset = 'utf-8';
  18683. /******/ script.timeout = 120;
  18684. /******/ if (__webpack_require__.nc) {
  18685. /******/ script.setAttribute("nonce", __webpack_require__.nc);
  18686. /******/ }
  18687. /******/
  18688. /******/ script.src = url;
  18689. /******/ }
  18690. /******/ inProgress[url] = [done];
  18691. /******/ var onScriptComplete = (prev, event) => {
  18692. /******/ // avoid mem leaks in IE.
  18693. /******/ script.onerror = script.onload = null;
  18694. /******/ clearTimeout(timeout);
  18695. /******/ var doneFns = inProgress[url];
  18696. /******/ delete inProgress[url];
  18697. /******/ script.parentNode && script.parentNode.removeChild(script);
  18698. /******/ doneFns && doneFns.forEach((fn) => (fn(event)));
  18699. /******/ if(prev) return prev(event);
  18700. /******/ }
  18701. /******/ ;
  18702. /******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);
  18703. /******/ script.onerror = onScriptComplete.bind(null, script.onerror);
  18704. /******/ script.onload = onScriptComplete.bind(null, script.onload);
  18705. /******/ needAttach && document.head.appendChild(script);
  18706. /******/ };
  18707. /******/ })();
  18708. /******/
  18709. /******/ /* webpack/runtime/make namespace object */
  18710. /******/ (() => {
  18711. /******/ // define __esModule on exports
  18712. /******/ __webpack_require__.r = (exports) => {
  18713. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  18714. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  18715. /******/ }
  18716. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  18717. /******/ };
  18718. /******/ })();
  18719. /******/
  18720. /******/ /* webpack/runtime/node module decorator */
  18721. /******/ (() => {
  18722. /******/ __webpack_require__.nmd = (module) => {
  18723. /******/ module.paths = [];
  18724. /******/ if (!module.children) module.children = [];
  18725. /******/ return module;
  18726. /******/ };
  18727. /******/ })();
  18728. /******/
  18729. /******/ /* webpack/runtime/publicPath */
  18730. /******/ (() => {
  18731. /******/ __webpack_require__.p = "/";
  18732. /******/ })();
  18733. /******/
  18734. /******/ /* webpack/runtime/jsonp chunk loading */
  18735. /******/ (() => {
  18736. /******/ // no baseURI
  18737. /******/
  18738. /******/ // object to store loaded and loading chunks
  18739. /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
  18740. /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
  18741. /******/ var installedChunks = {
  18742. /******/ "/js/vue": 0,
  18743. /******/ "css/app": 0
  18744. /******/ };
  18745. /******/
  18746. /******/ __webpack_require__.f.j = (chunkId, promises) => {
  18747. /******/ // JSONP chunk loading for javascript
  18748. /******/ var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;
  18749. /******/ if(installedChunkData !== 0) { // 0 means "already installed".
  18750. /******/
  18751. /******/ // a Promise means "currently loading".
  18752. /******/ if(installedChunkData) {
  18753. /******/ promises.push(installedChunkData[2]);
  18754. /******/ } else {
  18755. /******/ if("css/app" != chunkId) {
  18756. /******/ // setup Promise in chunk cache
  18757. /******/ var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));
  18758. /******/ promises.push(installedChunkData[2] = promise);
  18759. /******/
  18760. /******/ // start chunk loading
  18761. /******/ var url = __webpack_require__.p + __webpack_require__.u(chunkId);
  18762. /******/ // create error before stack unwound to get useful stacktrace later
  18763. /******/ var error = new Error();
  18764. /******/ var loadingEnded = (event) => {
  18765. /******/ if(__webpack_require__.o(installedChunks, chunkId)) {
  18766. /******/ installedChunkData = installedChunks[chunkId];
  18767. /******/ if(installedChunkData !== 0) installedChunks[chunkId] = undefined;
  18768. /******/ if(installedChunkData) {
  18769. /******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type);
  18770. /******/ var realSrc = event && event.target && event.target.src;
  18771. /******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')';
  18772. /******/ error.name = 'ChunkLoadError';
  18773. /******/ error.type = errorType;
  18774. /******/ error.request = realSrc;
  18775. /******/ installedChunkData[1](error);
  18776. /******/ }
  18777. /******/ }
  18778. /******/ };
  18779. /******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId);
  18780. /******/ } else installedChunks[chunkId] = 0;
  18781. /******/ }
  18782. /******/ }
  18783. /******/ };
  18784. /******/
  18785. /******/ // no prefetching
  18786. /******/
  18787. /******/ // no preloaded
  18788. /******/
  18789. /******/ // no HMR
  18790. /******/
  18791. /******/ // no HMR manifest
  18792. /******/
  18793. /******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
  18794. /******/
  18795. /******/ // install a JSONP callback for chunk loading
  18796. /******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
  18797. /******/ var [chunkIds, moreModules, runtime] = data;
  18798. /******/ // add "moreModules" to the modules object,
  18799. /******/ // then flag all "chunkIds" as loaded and fire callback
  18800. /******/ var moduleId, chunkId, i = 0;
  18801. /******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
  18802. /******/ for(moduleId in moreModules) {
  18803. /******/ if(__webpack_require__.o(moreModules, moduleId)) {
  18804. /******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
  18805. /******/ }
  18806. /******/ }
  18807. /******/ if(runtime) var result = runtime(__webpack_require__);
  18808. /******/ }
  18809. /******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
  18810. /******/ for(;i < chunkIds.length; i++) {
  18811. /******/ chunkId = chunkIds[i];
  18812. /******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
  18813. /******/ installedChunks[chunkId][0]();
  18814. /******/ }
  18815. /******/ installedChunks[chunkId] = 0;
  18816. /******/ }
  18817. /******/ return __webpack_require__.O(result);
  18818. /******/ }
  18819. /******/
  18820. /******/ var chunkLoadingGlobal = self["webpackChunk"] = self["webpackChunk"] || [];
  18821. /******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
  18822. /******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
  18823. /******/ })();
  18824. /******/
  18825. /************************************************************************/
  18826. /******/
  18827. /******/ // startup
  18828. /******/ // Load entry module and return exports
  18829. /******/ // This entry module depends on other loaded chunks and execution need to be delayed
  18830. /******/ __webpack_require__.O(undefined, ["css/app"], () => (__webpack_require__("./resources/js/vue.js")))
  18831. /******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["css/app"], () => (__webpack_require__("./resources/sass/app.scss")))
  18832. /******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
  18833. /******/
  18834. /******/ })()
  18835. ;