index-5e4623ce.js 518 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835
  1. (function polyfill() {
  2. const relList = document.createElement("link").relList;
  3. if (relList && relList.supports && relList.supports("modulepreload")) {
  4. return;
  5. }
  6. for (const link of document.querySelectorAll('link[rel="modulepreload"]')) {
  7. processPreload(link);
  8. }
  9. new MutationObserver((mutations) => {
  10. for (const mutation of mutations) {
  11. if (mutation.type !== "childList") {
  12. continue;
  13. }
  14. for (const node of mutation.addedNodes) {
  15. if (node.tagName === "LINK" && node.rel === "modulepreload")
  16. processPreload(node);
  17. }
  18. }
  19. }).observe(document, { childList: true, subtree: true });
  20. function getFetchOpts(link) {
  21. const fetchOpts = {};
  22. if (link.integrity)
  23. fetchOpts.integrity = link.integrity;
  24. if (link.referrerPolicy)
  25. fetchOpts.referrerPolicy = link.referrerPolicy;
  26. if (link.crossOrigin === "use-credentials")
  27. fetchOpts.credentials = "include";
  28. else if (link.crossOrigin === "anonymous")
  29. fetchOpts.credentials = "omit";
  30. else
  31. fetchOpts.credentials = "same-origin";
  32. return fetchOpts;
  33. }
  34. function processPreload(link) {
  35. if (link.ep)
  36. return;
  37. link.ep = true;
  38. const fetchOpts = getFetchOpts(link);
  39. fetch(link.href, fetchOpts);
  40. }
  41. })();
  42. /**
  43. * @vue/shared v3.5.4
  44. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  45. * @license MIT
  46. **/
  47. /*! #__NO_SIDE_EFFECTS__ */
  48. // @__NO_SIDE_EFFECTS__
  49. function makeMap(str) {
  50. const map = /* @__PURE__ */ Object.create(null);
  51. for (const key of str.split(","))
  52. map[key] = 1;
  53. return (val) => val in map;
  54. }
  55. const EMPTY_OBJ = {};
  56. const EMPTY_ARR = [];
  57. const NOOP = () => {
  58. };
  59. const NO = () => false;
  60. const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter
  61. (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
  62. const isModelListener = (key) => key.startsWith("onUpdate:");
  63. const extend = Object.assign;
  64. const remove = (arr, el) => {
  65. const i = arr.indexOf(el);
  66. if (i > -1) {
  67. arr.splice(i, 1);
  68. }
  69. };
  70. const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
  71. const hasOwn = (val, key) => hasOwnProperty$1.call(val, key);
  72. const isArray$1 = Array.isArray;
  73. const isMap = (val) => toTypeString(val) === "[object Map]";
  74. const isSet = (val) => toTypeString(val) === "[object Set]";
  75. const isRegExp = (val) => toTypeString(val) === "[object RegExp]";
  76. const isFunction = (val) => typeof val === "function";
  77. const isString = (val) => typeof val === "string";
  78. const isSymbol = (val) => typeof val === "symbol";
  79. const isObject = (val) => val !== null && typeof val === "object";
  80. const isPromise = (val) => {
  81. return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);
  82. };
  83. const objectToString = Object.prototype.toString;
  84. const toTypeString = (value) => objectToString.call(value);
  85. const toRawType = (value) => {
  86. return toTypeString(value).slice(8, -1);
  87. };
  88. const isPlainObject$1 = (val) => toTypeString(val) === "[object Object]";
  89. const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
  90. const isReservedProp = /* @__PURE__ */ makeMap(
  91. // the leading comma is intentional so empty string "" is also included
  92. ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
  93. );
  94. const cacheStringFunction = (fn) => {
  95. const cache = /* @__PURE__ */ Object.create(null);
  96. return (str) => {
  97. const hit = cache[str];
  98. return hit || (cache[str] = fn(str));
  99. };
  100. };
  101. const camelizeRE = /-(\w)/g;
  102. const camelize = cacheStringFunction(
  103. (str) => {
  104. return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
  105. }
  106. );
  107. const hyphenateRE = /\B([A-Z])/g;
  108. const hyphenate = cacheStringFunction(
  109. (str) => str.replace(hyphenateRE, "-$1").toLowerCase()
  110. );
  111. const capitalize = cacheStringFunction((str) => {
  112. return str.charAt(0).toUpperCase() + str.slice(1);
  113. });
  114. const toHandlerKey = cacheStringFunction(
  115. (str) => {
  116. const s = str ? `on${capitalize(str)}` : ``;
  117. return s;
  118. }
  119. );
  120. const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
  121. const invokeArrayFns = (fns, ...arg) => {
  122. for (let i = 0; i < fns.length; i++) {
  123. fns[i](...arg);
  124. }
  125. };
  126. const def = (obj, key, value, writable = false) => {
  127. Object.defineProperty(obj, key, {
  128. configurable: true,
  129. enumerable: false,
  130. writable,
  131. value
  132. });
  133. };
  134. const looseToNumber = (val) => {
  135. const n = parseFloat(val);
  136. return isNaN(n) ? val : n;
  137. };
  138. const toNumber = (val) => {
  139. const n = isString(val) ? Number(val) : NaN;
  140. return isNaN(n) ? val : n;
  141. };
  142. let _globalThis;
  143. const getGlobalThis = () => {
  144. return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
  145. };
  146. function normalizeStyle(value) {
  147. if (isArray$1(value)) {
  148. const res = {};
  149. for (let i = 0; i < value.length; i++) {
  150. const item = value[i];
  151. const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);
  152. if (normalized) {
  153. for (const key in normalized) {
  154. res[key] = normalized[key];
  155. }
  156. }
  157. }
  158. return res;
  159. } else if (isString(value) || isObject(value)) {
  160. return value;
  161. }
  162. }
  163. const listDelimiterRE = /;(?![^(]*\))/g;
  164. const propertyDelimiterRE = /:([^]+)/;
  165. const styleCommentRE = /\/\*[^]*?\*\//g;
  166. function parseStringStyle(cssText) {
  167. const ret = {};
  168. cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
  169. if (item) {
  170. const tmp = item.split(propertyDelimiterRE);
  171. tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
  172. }
  173. });
  174. return ret;
  175. }
  176. function normalizeClass(value) {
  177. let res = "";
  178. if (isString(value)) {
  179. res = value;
  180. } else if (isArray$1(value)) {
  181. for (let i = 0; i < value.length; i++) {
  182. const normalized = normalizeClass(value[i]);
  183. if (normalized) {
  184. res += normalized + " ";
  185. }
  186. }
  187. } else if (isObject(value)) {
  188. for (const name in value) {
  189. if (value[name]) {
  190. res += name + " ";
  191. }
  192. }
  193. }
  194. return res.trim();
  195. }
  196. const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
  197. const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
  198. function includeBooleanAttr(value) {
  199. return !!value || value === "";
  200. }
  201. const isRef$1 = (val) => {
  202. return !!(val && val["__v_isRef"] === true);
  203. };
  204. const toDisplayString = (val) => {
  205. return isString(val) ? val : val == null ? "" : isArray$1(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef$1(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val);
  206. };
  207. const replacer = (_key, val) => {
  208. if (isRef$1(val)) {
  209. return replacer(_key, val.value);
  210. } else if (isMap(val)) {
  211. return {
  212. [`Map(${val.size})`]: [...val.entries()].reduce(
  213. (entries, [key, val2], i) => {
  214. entries[stringifySymbol(key, i) + " =>"] = val2;
  215. return entries;
  216. },
  217. {}
  218. )
  219. };
  220. } else if (isSet(val)) {
  221. return {
  222. [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v))
  223. };
  224. } else if (isSymbol(val)) {
  225. return stringifySymbol(val);
  226. } else if (isObject(val) && !isArray$1(val) && !isPlainObject$1(val)) {
  227. return String(val);
  228. }
  229. return val;
  230. };
  231. const stringifySymbol = (v, i = "") => {
  232. var _a;
  233. return (
  234. // Symbol.description in es2019+ so we need to cast here to pass
  235. // the lib: es2016 check
  236. isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v
  237. );
  238. };
  239. /**
  240. * @vue/reactivity v3.5.4
  241. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  242. * @license MIT
  243. **/
  244. let activeEffectScope;
  245. class EffectScope {
  246. constructor(detached = false) {
  247. this.detached = detached;
  248. this._active = true;
  249. this.effects = [];
  250. this.cleanups = [];
  251. this._isPaused = false;
  252. this.parent = activeEffectScope;
  253. if (!detached && activeEffectScope) {
  254. this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(
  255. this
  256. ) - 1;
  257. }
  258. }
  259. get active() {
  260. return this._active;
  261. }
  262. pause() {
  263. if (this._active) {
  264. this._isPaused = true;
  265. let i, l;
  266. if (this.scopes) {
  267. for (i = 0, l = this.scopes.length; i < l; i++) {
  268. this.scopes[i].pause();
  269. }
  270. }
  271. for (i = 0, l = this.effects.length; i < l; i++) {
  272. this.effects[i].pause();
  273. }
  274. }
  275. }
  276. /**
  277. * Resumes the effect scope, including all child scopes and effects.
  278. */
  279. resume() {
  280. if (this._active) {
  281. if (this._isPaused) {
  282. this._isPaused = false;
  283. let i, l;
  284. if (this.scopes) {
  285. for (i = 0, l = this.scopes.length; i < l; i++) {
  286. this.scopes[i].resume();
  287. }
  288. }
  289. for (i = 0, l = this.effects.length; i < l; i++) {
  290. this.effects[i].resume();
  291. }
  292. }
  293. }
  294. }
  295. run(fn) {
  296. if (this._active) {
  297. const currentEffectScope = activeEffectScope;
  298. try {
  299. activeEffectScope = this;
  300. return fn();
  301. } finally {
  302. activeEffectScope = currentEffectScope;
  303. }
  304. }
  305. }
  306. /**
  307. * This should only be called on non-detached scopes
  308. * @internal
  309. */
  310. on() {
  311. activeEffectScope = this;
  312. }
  313. /**
  314. * This should only be called on non-detached scopes
  315. * @internal
  316. */
  317. off() {
  318. activeEffectScope = this.parent;
  319. }
  320. stop(fromParent) {
  321. if (this._active) {
  322. let i, l;
  323. for (i = 0, l = this.effects.length; i < l; i++) {
  324. this.effects[i].stop();
  325. }
  326. for (i = 0, l = this.cleanups.length; i < l; i++) {
  327. this.cleanups[i]();
  328. }
  329. if (this.scopes) {
  330. for (i = 0, l = this.scopes.length; i < l; i++) {
  331. this.scopes[i].stop(true);
  332. }
  333. }
  334. if (!this.detached && this.parent && !fromParent) {
  335. const last = this.parent.scopes.pop();
  336. if (last && last !== this) {
  337. this.parent.scopes[this.index] = last;
  338. last.index = this.index;
  339. }
  340. }
  341. this.parent = void 0;
  342. this._active = false;
  343. }
  344. }
  345. }
  346. function effectScope(detached) {
  347. return new EffectScope(detached);
  348. }
  349. function getCurrentScope() {
  350. return activeEffectScope;
  351. }
  352. function onScopeDispose(fn, failSilently = false) {
  353. if (activeEffectScope) {
  354. activeEffectScope.cleanups.push(fn);
  355. }
  356. }
  357. let activeSub;
  358. const pausedQueueEffects = /* @__PURE__ */ new WeakSet();
  359. class ReactiveEffect {
  360. constructor(fn) {
  361. this.fn = fn;
  362. this.deps = void 0;
  363. this.depsTail = void 0;
  364. this.flags = 1 | 4;
  365. this.nextEffect = void 0;
  366. this.cleanup = void 0;
  367. this.scheduler = void 0;
  368. if (activeEffectScope && activeEffectScope.active) {
  369. activeEffectScope.effects.push(this);
  370. }
  371. }
  372. pause() {
  373. this.flags |= 64;
  374. }
  375. resume() {
  376. if (this.flags & 64) {
  377. this.flags &= ~64;
  378. if (pausedQueueEffects.has(this)) {
  379. pausedQueueEffects.delete(this);
  380. this.trigger();
  381. }
  382. }
  383. }
  384. /**
  385. * @internal
  386. */
  387. notify() {
  388. if (this.flags & 2 && !(this.flags & 32)) {
  389. return;
  390. }
  391. if (!(this.flags & 8)) {
  392. this.flags |= 8;
  393. this.nextEffect = batchedEffect;
  394. batchedEffect = this;
  395. }
  396. }
  397. run() {
  398. if (!(this.flags & 1)) {
  399. return this.fn();
  400. }
  401. this.flags |= 2;
  402. cleanupEffect(this);
  403. prepareDeps(this);
  404. const prevEffect = activeSub;
  405. const prevShouldTrack = shouldTrack;
  406. activeSub = this;
  407. shouldTrack = true;
  408. try {
  409. return this.fn();
  410. } finally {
  411. cleanupDeps(this);
  412. activeSub = prevEffect;
  413. shouldTrack = prevShouldTrack;
  414. this.flags &= ~2;
  415. }
  416. }
  417. stop() {
  418. if (this.flags & 1) {
  419. for (let link = this.deps; link; link = link.nextDep) {
  420. removeSub(link);
  421. }
  422. this.deps = this.depsTail = void 0;
  423. cleanupEffect(this);
  424. this.onStop && this.onStop();
  425. this.flags &= ~1;
  426. }
  427. }
  428. trigger() {
  429. if (this.flags & 64) {
  430. pausedQueueEffects.add(this);
  431. } else if (this.scheduler) {
  432. this.scheduler();
  433. } else {
  434. this.runIfDirty();
  435. }
  436. }
  437. /**
  438. * @internal
  439. */
  440. runIfDirty() {
  441. if (isDirty(this)) {
  442. this.run();
  443. }
  444. }
  445. get dirty() {
  446. return isDirty(this);
  447. }
  448. }
  449. let batchDepth = 0;
  450. let batchedEffect;
  451. function startBatch() {
  452. batchDepth++;
  453. }
  454. function endBatch() {
  455. if (--batchDepth > 0) {
  456. return;
  457. }
  458. let error;
  459. while (batchedEffect) {
  460. let e = batchedEffect;
  461. batchedEffect = void 0;
  462. while (e) {
  463. const next = e.nextEffect;
  464. e.nextEffect = void 0;
  465. e.flags &= ~8;
  466. if (e.flags & 1) {
  467. try {
  468. e.trigger();
  469. } catch (err) {
  470. if (!error)
  471. error = err;
  472. }
  473. }
  474. e = next;
  475. }
  476. }
  477. if (error)
  478. throw error;
  479. }
  480. function prepareDeps(sub) {
  481. for (let link = sub.deps; link; link = link.nextDep) {
  482. link.version = -1;
  483. link.prevActiveLink = link.dep.activeLink;
  484. link.dep.activeLink = link;
  485. }
  486. }
  487. function cleanupDeps(sub) {
  488. let head;
  489. let tail = sub.depsTail;
  490. for (let link = tail; link; link = link.prevDep) {
  491. if (link.version === -1) {
  492. if (link === tail)
  493. tail = link.prevDep;
  494. removeSub(link);
  495. removeDep(link);
  496. } else {
  497. head = link;
  498. }
  499. link.dep.activeLink = link.prevActiveLink;
  500. link.prevActiveLink = void 0;
  501. }
  502. sub.deps = head;
  503. sub.depsTail = tail;
  504. }
  505. function isDirty(sub) {
  506. for (let link = sub.deps; link; link = link.nextDep) {
  507. if (link.dep.version !== link.version || link.dep.computed && refreshComputed(link.dep.computed) || link.dep.version !== link.version) {
  508. return true;
  509. }
  510. }
  511. if (sub._dirty) {
  512. return true;
  513. }
  514. return false;
  515. }
  516. function refreshComputed(computed2) {
  517. if (computed2.flags & 4 && !(computed2.flags & 16)) {
  518. return;
  519. }
  520. computed2.flags &= ~16;
  521. if (computed2.globalVersion === globalVersion) {
  522. return;
  523. }
  524. computed2.globalVersion = globalVersion;
  525. const dep = computed2.dep;
  526. computed2.flags |= 2;
  527. if (dep.version > 0 && !computed2.isSSR && !isDirty(computed2)) {
  528. computed2.flags &= ~2;
  529. return;
  530. }
  531. const prevSub = activeSub;
  532. const prevShouldTrack = shouldTrack;
  533. activeSub = computed2;
  534. shouldTrack = true;
  535. try {
  536. prepareDeps(computed2);
  537. const value = computed2.fn(computed2._value);
  538. if (dep.version === 0 || hasChanged(value, computed2._value)) {
  539. computed2._value = value;
  540. dep.version++;
  541. }
  542. } catch (err) {
  543. dep.version++;
  544. throw err;
  545. } finally {
  546. activeSub = prevSub;
  547. shouldTrack = prevShouldTrack;
  548. cleanupDeps(computed2);
  549. computed2.flags &= ~2;
  550. }
  551. }
  552. function removeSub(link) {
  553. const { dep, prevSub, nextSub } = link;
  554. if (prevSub) {
  555. prevSub.nextSub = nextSub;
  556. link.prevSub = void 0;
  557. }
  558. if (nextSub) {
  559. nextSub.prevSub = prevSub;
  560. link.nextSub = void 0;
  561. }
  562. if (dep.subs === link) {
  563. dep.subs = prevSub;
  564. }
  565. if (!dep.subs && dep.computed) {
  566. dep.computed.flags &= ~4;
  567. for (let l = dep.computed.deps; l; l = l.nextDep) {
  568. removeSub(l);
  569. }
  570. }
  571. }
  572. function removeDep(link) {
  573. const { prevDep, nextDep } = link;
  574. if (prevDep) {
  575. prevDep.nextDep = nextDep;
  576. link.prevDep = void 0;
  577. }
  578. if (nextDep) {
  579. nextDep.prevDep = prevDep;
  580. link.nextDep = void 0;
  581. }
  582. }
  583. let shouldTrack = true;
  584. const trackStack = [];
  585. function pauseTracking() {
  586. trackStack.push(shouldTrack);
  587. shouldTrack = false;
  588. }
  589. function resetTracking() {
  590. const last = trackStack.pop();
  591. shouldTrack = last === void 0 ? true : last;
  592. }
  593. function cleanupEffect(e) {
  594. const { cleanup } = e;
  595. e.cleanup = void 0;
  596. if (cleanup) {
  597. const prevSub = activeSub;
  598. activeSub = void 0;
  599. try {
  600. cleanup();
  601. } finally {
  602. activeSub = prevSub;
  603. }
  604. }
  605. }
  606. let globalVersion = 0;
  607. class Dep {
  608. constructor(computed2) {
  609. this.computed = computed2;
  610. this.version = 0;
  611. this.activeLink = void 0;
  612. this.subs = void 0;
  613. }
  614. track(debugInfo) {
  615. if (!activeSub || !shouldTrack || activeSub === this.computed) {
  616. return;
  617. }
  618. let link = this.activeLink;
  619. if (link === void 0 || link.sub !== activeSub) {
  620. link = this.activeLink = {
  621. dep: this,
  622. sub: activeSub,
  623. version: this.version,
  624. nextDep: void 0,
  625. prevDep: void 0,
  626. nextSub: void 0,
  627. prevSub: void 0,
  628. prevActiveLink: void 0
  629. };
  630. if (!activeSub.deps) {
  631. activeSub.deps = activeSub.depsTail = link;
  632. } else {
  633. link.prevDep = activeSub.depsTail;
  634. activeSub.depsTail.nextDep = link;
  635. activeSub.depsTail = link;
  636. }
  637. if (activeSub.flags & 4) {
  638. addSub(link);
  639. }
  640. } else if (link.version === -1) {
  641. link.version = this.version;
  642. if (link.nextDep) {
  643. const next = link.nextDep;
  644. next.prevDep = link.prevDep;
  645. if (link.prevDep) {
  646. link.prevDep.nextDep = next;
  647. }
  648. link.prevDep = activeSub.depsTail;
  649. link.nextDep = void 0;
  650. activeSub.depsTail.nextDep = link;
  651. activeSub.depsTail = link;
  652. if (activeSub.deps === link) {
  653. activeSub.deps = next;
  654. }
  655. }
  656. }
  657. return link;
  658. }
  659. trigger(debugInfo) {
  660. this.version++;
  661. globalVersion++;
  662. this.notify(debugInfo);
  663. }
  664. notify(debugInfo) {
  665. startBatch();
  666. try {
  667. if (false)
  668. ;
  669. for (let link = this.subs; link; link = link.prevSub) {
  670. link.sub.notify();
  671. }
  672. } finally {
  673. endBatch();
  674. }
  675. }
  676. }
  677. function addSub(link) {
  678. const computed2 = link.dep.computed;
  679. if (computed2 && !link.dep.subs) {
  680. computed2.flags |= 4 | 16;
  681. for (let l = computed2.deps; l; l = l.nextDep) {
  682. addSub(l);
  683. }
  684. }
  685. const currentTail = link.dep.subs;
  686. if (currentTail !== link) {
  687. link.prevSub = currentTail;
  688. if (currentTail)
  689. currentTail.nextSub = link;
  690. }
  691. link.dep.subs = link;
  692. }
  693. const targetMap = /* @__PURE__ */ new WeakMap();
  694. const ITERATE_KEY = Symbol(
  695. ""
  696. );
  697. const MAP_KEY_ITERATE_KEY = Symbol(
  698. ""
  699. );
  700. const ARRAY_ITERATE_KEY = Symbol(
  701. ""
  702. );
  703. function track(target, type, key) {
  704. if (shouldTrack && activeSub) {
  705. let depsMap = targetMap.get(target);
  706. if (!depsMap) {
  707. targetMap.set(target, depsMap = /* @__PURE__ */ new Map());
  708. }
  709. let dep = depsMap.get(key);
  710. if (!dep) {
  711. depsMap.set(key, dep = new Dep());
  712. }
  713. {
  714. dep.track();
  715. }
  716. }
  717. }
  718. function trigger(target, type, key, newValue, oldValue, oldTarget) {
  719. const depsMap = targetMap.get(target);
  720. if (!depsMap) {
  721. globalVersion++;
  722. return;
  723. }
  724. const run = (dep) => {
  725. if (dep) {
  726. {
  727. dep.trigger();
  728. }
  729. }
  730. };
  731. startBatch();
  732. if (type === "clear") {
  733. depsMap.forEach(run);
  734. } else {
  735. const targetIsArray = isArray$1(target);
  736. const isArrayIndex = targetIsArray && isIntegerKey(key);
  737. if (targetIsArray && key === "length") {
  738. const newLength = Number(newValue);
  739. depsMap.forEach((dep, key2) => {
  740. if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) {
  741. run(dep);
  742. }
  743. });
  744. } else {
  745. if (key !== void 0) {
  746. run(depsMap.get(key));
  747. }
  748. if (isArrayIndex) {
  749. run(depsMap.get(ARRAY_ITERATE_KEY));
  750. }
  751. switch (type) {
  752. case "add":
  753. if (!targetIsArray) {
  754. run(depsMap.get(ITERATE_KEY));
  755. if (isMap(target)) {
  756. run(depsMap.get(MAP_KEY_ITERATE_KEY));
  757. }
  758. } else if (isArrayIndex) {
  759. run(depsMap.get("length"));
  760. }
  761. break;
  762. case "delete":
  763. if (!targetIsArray) {
  764. run(depsMap.get(ITERATE_KEY));
  765. if (isMap(target)) {
  766. run(depsMap.get(MAP_KEY_ITERATE_KEY));
  767. }
  768. }
  769. break;
  770. case "set":
  771. if (isMap(target)) {
  772. run(depsMap.get(ITERATE_KEY));
  773. }
  774. break;
  775. }
  776. }
  777. }
  778. endBatch();
  779. }
  780. function getDepFromReactive(object, key) {
  781. var _a;
  782. return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key);
  783. }
  784. function reactiveReadArray(array) {
  785. const raw = toRaw(array);
  786. if (raw === array)
  787. return raw;
  788. track(raw, "iterate", ARRAY_ITERATE_KEY);
  789. return isShallow(array) ? raw : raw.map(toReactive);
  790. }
  791. function shallowReadArray(arr) {
  792. track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
  793. return arr;
  794. }
  795. const arrayInstrumentations = {
  796. __proto__: null,
  797. [Symbol.iterator]() {
  798. return iterator(this, Symbol.iterator, toReactive);
  799. },
  800. concat(...args) {
  801. return reactiveReadArray(this).concat(
  802. ...args.map((x) => isArray$1(x) ? reactiveReadArray(x) : x)
  803. );
  804. },
  805. entries() {
  806. return iterator(this, "entries", (value) => {
  807. value[1] = toReactive(value[1]);
  808. return value;
  809. });
  810. },
  811. every(fn, thisArg) {
  812. return apply(this, "every", fn, thisArg, void 0, arguments);
  813. },
  814. filter(fn, thisArg) {
  815. return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments);
  816. },
  817. find(fn, thisArg) {
  818. return apply(this, "find", fn, thisArg, toReactive, arguments);
  819. },
  820. findIndex(fn, thisArg) {
  821. return apply(this, "findIndex", fn, thisArg, void 0, arguments);
  822. },
  823. findLast(fn, thisArg) {
  824. return apply(this, "findLast", fn, thisArg, toReactive, arguments);
  825. },
  826. findLastIndex(fn, thisArg) {
  827. return apply(this, "findLastIndex", fn, thisArg, void 0, arguments);
  828. },
  829. // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
  830. forEach(fn, thisArg) {
  831. return apply(this, "forEach", fn, thisArg, void 0, arguments);
  832. },
  833. includes(...args) {
  834. return searchProxy(this, "includes", args);
  835. },
  836. indexOf(...args) {
  837. return searchProxy(this, "indexOf", args);
  838. },
  839. join(separator) {
  840. return reactiveReadArray(this).join(separator);
  841. },
  842. // keys() iterator only reads `length`, no optimisation required
  843. lastIndexOf(...args) {
  844. return searchProxy(this, "lastIndexOf", args);
  845. },
  846. map(fn, thisArg) {
  847. return apply(this, "map", fn, thisArg, void 0, arguments);
  848. },
  849. pop() {
  850. return noTracking(this, "pop");
  851. },
  852. push(...args) {
  853. return noTracking(this, "push", args);
  854. },
  855. reduce(fn, ...args) {
  856. return reduce(this, "reduce", fn, args);
  857. },
  858. reduceRight(fn, ...args) {
  859. return reduce(this, "reduceRight", fn, args);
  860. },
  861. shift() {
  862. return noTracking(this, "shift");
  863. },
  864. // slice could use ARRAY_ITERATE but also seems to beg for range tracking
  865. some(fn, thisArg) {
  866. return apply(this, "some", fn, thisArg, void 0, arguments);
  867. },
  868. splice(...args) {
  869. return noTracking(this, "splice", args);
  870. },
  871. toReversed() {
  872. return reactiveReadArray(this).toReversed();
  873. },
  874. toSorted(comparer) {
  875. return reactiveReadArray(this).toSorted(comparer);
  876. },
  877. toSpliced(...args) {
  878. return reactiveReadArray(this).toSpliced(...args);
  879. },
  880. unshift(...args) {
  881. return noTracking(this, "unshift", args);
  882. },
  883. values() {
  884. return iterator(this, "values", toReactive);
  885. }
  886. };
  887. function iterator(self2, method, wrapValue) {
  888. const arr = shallowReadArray(self2);
  889. const iter = arr[method]();
  890. if (arr !== self2 && !isShallow(self2)) {
  891. iter._next = iter.next;
  892. iter.next = () => {
  893. const result = iter._next();
  894. if (result.value) {
  895. result.value = wrapValue(result.value);
  896. }
  897. return result;
  898. };
  899. }
  900. return iter;
  901. }
  902. const arrayProto = Array.prototype;
  903. function apply(self2, method, fn, thisArg, wrappedRetFn, args) {
  904. const arr = shallowReadArray(self2);
  905. const needsWrap = arr !== self2 && !isShallow(self2);
  906. const methodFn = arr[method];
  907. if (methodFn !== arrayProto[method]) {
  908. const result2 = methodFn.apply(self2, args);
  909. return needsWrap ? toReactive(result2) : result2;
  910. }
  911. let wrappedFn = fn;
  912. if (arr !== self2) {
  913. if (needsWrap) {
  914. wrappedFn = function(item, index2) {
  915. return fn.call(this, toReactive(item), index2, self2);
  916. };
  917. } else if (fn.length > 2) {
  918. wrappedFn = function(item, index2) {
  919. return fn.call(this, item, index2, self2);
  920. };
  921. }
  922. }
  923. const result = methodFn.call(arr, wrappedFn, thisArg);
  924. return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;
  925. }
  926. function reduce(self2, method, fn, args) {
  927. const arr = shallowReadArray(self2);
  928. let wrappedFn = fn;
  929. if (arr !== self2) {
  930. if (!isShallow(self2)) {
  931. wrappedFn = function(acc, item, index2) {
  932. return fn.call(this, acc, toReactive(item), index2, self2);
  933. };
  934. } else if (fn.length > 3) {
  935. wrappedFn = function(acc, item, index2) {
  936. return fn.call(this, acc, item, index2, self2);
  937. };
  938. }
  939. }
  940. return arr[method](wrappedFn, ...args);
  941. }
  942. function searchProxy(self2, method, args) {
  943. const arr = toRaw(self2);
  944. track(arr, "iterate", ARRAY_ITERATE_KEY);
  945. const res = arr[method](...args);
  946. if ((res === -1 || res === false) && isProxy(args[0])) {
  947. args[0] = toRaw(args[0]);
  948. return arr[method](...args);
  949. }
  950. return res;
  951. }
  952. function noTracking(self2, method, args = []) {
  953. pauseTracking();
  954. startBatch();
  955. const res = toRaw(self2)[method].apply(self2, args);
  956. endBatch();
  957. resetTracking();
  958. return res;
  959. }
  960. const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
  961. const builtInSymbols = new Set(
  962. /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
  963. );
  964. function hasOwnProperty(key) {
  965. if (!isSymbol(key))
  966. key = String(key);
  967. const obj = toRaw(this);
  968. track(obj, "has", key);
  969. return obj.hasOwnProperty(key);
  970. }
  971. class BaseReactiveHandler {
  972. constructor(_isReadonly = false, _isShallow = false) {
  973. this._isReadonly = _isReadonly;
  974. this._isShallow = _isShallow;
  975. }
  976. get(target, key, receiver) {
  977. const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
  978. if (key === "__v_isReactive") {
  979. return !isReadonly2;
  980. } else if (key === "__v_isReadonly") {
  981. return isReadonly2;
  982. } else if (key === "__v_isShallow") {
  983. return isShallow2;
  984. } else if (key === "__v_raw") {
  985. if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
  986. // this means the receiver is a user proxy of the reactive proxy
  987. Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
  988. return target;
  989. }
  990. return;
  991. }
  992. const targetIsArray = isArray$1(target);
  993. if (!isReadonly2) {
  994. let fn;
  995. if (targetIsArray && (fn = arrayInstrumentations[key])) {
  996. return fn;
  997. }
  998. if (key === "hasOwnProperty") {
  999. return hasOwnProperty;
  1000. }
  1001. }
  1002. const res = Reflect.get(
  1003. target,
  1004. key,
  1005. // if this is a proxy wrapping a ref, return methods using the raw ref
  1006. // as receiver so that we don't have to call `toRaw` on the ref in all
  1007. // its class methods
  1008. isRef(target) ? target : receiver
  1009. );
  1010. if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
  1011. return res;
  1012. }
  1013. if (!isReadonly2) {
  1014. track(target, "get", key);
  1015. }
  1016. if (isShallow2) {
  1017. return res;
  1018. }
  1019. if (isRef(res)) {
  1020. return targetIsArray && isIntegerKey(key) ? res : res.value;
  1021. }
  1022. if (isObject(res)) {
  1023. return isReadonly2 ? readonly(res) : reactive(res);
  1024. }
  1025. return res;
  1026. }
  1027. }
  1028. class MutableReactiveHandler extends BaseReactiveHandler {
  1029. constructor(isShallow2 = false) {
  1030. super(false, isShallow2);
  1031. }
  1032. set(target, key, value, receiver) {
  1033. let oldValue = target[key];
  1034. if (!this._isShallow) {
  1035. const isOldValueReadonly = isReadonly(oldValue);
  1036. if (!isShallow(value) && !isReadonly(value)) {
  1037. oldValue = toRaw(oldValue);
  1038. value = toRaw(value);
  1039. }
  1040. if (!isArray$1(target) && isRef(oldValue) && !isRef(value)) {
  1041. if (isOldValueReadonly) {
  1042. return false;
  1043. } else {
  1044. oldValue.value = value;
  1045. return true;
  1046. }
  1047. }
  1048. }
  1049. const hadKey = isArray$1(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);
  1050. const result = Reflect.set(
  1051. target,
  1052. key,
  1053. value,
  1054. isRef(target) ? target : receiver
  1055. );
  1056. if (target === toRaw(receiver)) {
  1057. if (!hadKey) {
  1058. trigger(target, "add", key, value);
  1059. } else if (hasChanged(value, oldValue)) {
  1060. trigger(target, "set", key, value);
  1061. }
  1062. }
  1063. return result;
  1064. }
  1065. deleteProperty(target, key) {
  1066. const hadKey = hasOwn(target, key);
  1067. target[key];
  1068. const result = Reflect.deleteProperty(target, key);
  1069. if (result && hadKey) {
  1070. trigger(target, "delete", key, void 0);
  1071. }
  1072. return result;
  1073. }
  1074. has(target, key) {
  1075. const result = Reflect.has(target, key);
  1076. if (!isSymbol(key) || !builtInSymbols.has(key)) {
  1077. track(target, "has", key);
  1078. }
  1079. return result;
  1080. }
  1081. ownKeys(target) {
  1082. track(
  1083. target,
  1084. "iterate",
  1085. isArray$1(target) ? "length" : ITERATE_KEY
  1086. );
  1087. return Reflect.ownKeys(target);
  1088. }
  1089. }
  1090. class ReadonlyReactiveHandler extends BaseReactiveHandler {
  1091. constructor(isShallow2 = false) {
  1092. super(true, isShallow2);
  1093. }
  1094. set(target, key) {
  1095. return true;
  1096. }
  1097. deleteProperty(target, key) {
  1098. return true;
  1099. }
  1100. }
  1101. const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();
  1102. const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();
  1103. const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true);
  1104. const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);
  1105. const toShallow = (value) => value;
  1106. const getProto = (v) => Reflect.getPrototypeOf(v);
  1107. function get(target, key, isReadonly2 = false, isShallow2 = false) {
  1108. target = target["__v_raw"];
  1109. const rawTarget = toRaw(target);
  1110. const rawKey = toRaw(key);
  1111. if (!isReadonly2) {
  1112. if (hasChanged(key, rawKey)) {
  1113. track(rawTarget, "get", key);
  1114. }
  1115. track(rawTarget, "get", rawKey);
  1116. }
  1117. const { has: has2 } = getProto(rawTarget);
  1118. const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
  1119. if (has2.call(rawTarget, key)) {
  1120. return wrap(target.get(key));
  1121. } else if (has2.call(rawTarget, rawKey)) {
  1122. return wrap(target.get(rawKey));
  1123. } else if (target !== rawTarget) {
  1124. target.get(key);
  1125. }
  1126. }
  1127. function has(key, isReadonly2 = false) {
  1128. const target = this["__v_raw"];
  1129. const rawTarget = toRaw(target);
  1130. const rawKey = toRaw(key);
  1131. if (!isReadonly2) {
  1132. if (hasChanged(key, rawKey)) {
  1133. track(rawTarget, "has", key);
  1134. }
  1135. track(rawTarget, "has", rawKey);
  1136. }
  1137. return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
  1138. }
  1139. function size(target, isReadonly2 = false) {
  1140. target = target["__v_raw"];
  1141. !isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY);
  1142. return Reflect.get(target, "size", target);
  1143. }
  1144. function add(value, _isShallow = false) {
  1145. if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
  1146. value = toRaw(value);
  1147. }
  1148. const target = toRaw(this);
  1149. const proto = getProto(target);
  1150. const hadKey = proto.has.call(target, value);
  1151. if (!hadKey) {
  1152. target.add(value);
  1153. trigger(target, "add", value, value);
  1154. }
  1155. return this;
  1156. }
  1157. function set(key, value, _isShallow = false) {
  1158. if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
  1159. value = toRaw(value);
  1160. }
  1161. const target = toRaw(this);
  1162. const { has: has2, get: get2 } = getProto(target);
  1163. let hadKey = has2.call(target, key);
  1164. if (!hadKey) {
  1165. key = toRaw(key);
  1166. hadKey = has2.call(target, key);
  1167. }
  1168. const oldValue = get2.call(target, key);
  1169. target.set(key, value);
  1170. if (!hadKey) {
  1171. trigger(target, "add", key, value);
  1172. } else if (hasChanged(value, oldValue)) {
  1173. trigger(target, "set", key, value);
  1174. }
  1175. return this;
  1176. }
  1177. function deleteEntry(key) {
  1178. const target = toRaw(this);
  1179. const { has: has2, get: get2 } = getProto(target);
  1180. let hadKey = has2.call(target, key);
  1181. if (!hadKey) {
  1182. key = toRaw(key);
  1183. hadKey = has2.call(target, key);
  1184. }
  1185. get2 ? get2.call(target, key) : void 0;
  1186. const result = target.delete(key);
  1187. if (hadKey) {
  1188. trigger(target, "delete", key, void 0);
  1189. }
  1190. return result;
  1191. }
  1192. function clear() {
  1193. const target = toRaw(this);
  1194. const hadItems = target.size !== 0;
  1195. const result = target.clear();
  1196. if (hadItems) {
  1197. trigger(target, "clear", void 0, void 0);
  1198. }
  1199. return result;
  1200. }
  1201. function createForEach(isReadonly2, isShallow2) {
  1202. return function forEach(callback, thisArg) {
  1203. const observed = this;
  1204. const target = observed["__v_raw"];
  1205. const rawTarget = toRaw(target);
  1206. const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
  1207. !isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY);
  1208. return target.forEach((value, key) => {
  1209. return callback.call(thisArg, wrap(value), wrap(key), observed);
  1210. });
  1211. };
  1212. }
  1213. function createIterableMethod(method, isReadonly2, isShallow2) {
  1214. return function(...args) {
  1215. const target = this["__v_raw"];
  1216. const rawTarget = toRaw(target);
  1217. const targetIsMap = isMap(rawTarget);
  1218. const isPair = method === "entries" || method === Symbol.iterator && targetIsMap;
  1219. const isKeyOnly = method === "keys" && targetIsMap;
  1220. const innerIterator = target[method](...args);
  1221. const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
  1222. !isReadonly2 && track(
  1223. rawTarget,
  1224. "iterate",
  1225. isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY
  1226. );
  1227. return {
  1228. // iterator protocol
  1229. next() {
  1230. const { value, done } = innerIterator.next();
  1231. return done ? { value, done } : {
  1232. value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
  1233. done
  1234. };
  1235. },
  1236. // iterable protocol
  1237. [Symbol.iterator]() {
  1238. return this;
  1239. }
  1240. };
  1241. };
  1242. }
  1243. function createReadonlyMethod(type) {
  1244. return function(...args) {
  1245. return type === "delete" ? false : type === "clear" ? void 0 : this;
  1246. };
  1247. }
  1248. function createInstrumentations() {
  1249. const mutableInstrumentations2 = {
  1250. get(key) {
  1251. return get(this, key);
  1252. },
  1253. get size() {
  1254. return size(this);
  1255. },
  1256. has,
  1257. add,
  1258. set,
  1259. delete: deleteEntry,
  1260. clear,
  1261. forEach: createForEach(false, false)
  1262. };
  1263. const shallowInstrumentations2 = {
  1264. get(key) {
  1265. return get(this, key, false, true);
  1266. },
  1267. get size() {
  1268. return size(this);
  1269. },
  1270. has,
  1271. add(value) {
  1272. return add.call(this, value, true);
  1273. },
  1274. set(key, value) {
  1275. return set.call(this, key, value, true);
  1276. },
  1277. delete: deleteEntry,
  1278. clear,
  1279. forEach: createForEach(false, true)
  1280. };
  1281. const readonlyInstrumentations2 = {
  1282. get(key) {
  1283. return get(this, key, true);
  1284. },
  1285. get size() {
  1286. return size(this, true);
  1287. },
  1288. has(key) {
  1289. return has.call(this, key, true);
  1290. },
  1291. add: createReadonlyMethod("add"),
  1292. set: createReadonlyMethod("set"),
  1293. delete: createReadonlyMethod("delete"),
  1294. clear: createReadonlyMethod("clear"),
  1295. forEach: createForEach(true, false)
  1296. };
  1297. const shallowReadonlyInstrumentations2 = {
  1298. get(key) {
  1299. return get(this, key, true, true);
  1300. },
  1301. get size() {
  1302. return size(this, true);
  1303. },
  1304. has(key) {
  1305. return has.call(this, key, true);
  1306. },
  1307. add: createReadonlyMethod("add"),
  1308. set: createReadonlyMethod("set"),
  1309. delete: createReadonlyMethod("delete"),
  1310. clear: createReadonlyMethod("clear"),
  1311. forEach: createForEach(true, true)
  1312. };
  1313. const iteratorMethods = [
  1314. "keys",
  1315. "values",
  1316. "entries",
  1317. Symbol.iterator
  1318. ];
  1319. iteratorMethods.forEach((method) => {
  1320. mutableInstrumentations2[method] = createIterableMethod(method, false, false);
  1321. readonlyInstrumentations2[method] = createIterableMethod(method, true, false);
  1322. shallowInstrumentations2[method] = createIterableMethod(method, false, true);
  1323. shallowReadonlyInstrumentations2[method] = createIterableMethod(
  1324. method,
  1325. true,
  1326. true
  1327. );
  1328. });
  1329. return [
  1330. mutableInstrumentations2,
  1331. readonlyInstrumentations2,
  1332. shallowInstrumentations2,
  1333. shallowReadonlyInstrumentations2
  1334. ];
  1335. }
  1336. const [
  1337. mutableInstrumentations,
  1338. readonlyInstrumentations,
  1339. shallowInstrumentations,
  1340. shallowReadonlyInstrumentations
  1341. ] = /* @__PURE__ */ createInstrumentations();
  1342. function createInstrumentationGetter(isReadonly2, shallow) {
  1343. const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations;
  1344. return (target, key, receiver) => {
  1345. if (key === "__v_isReactive") {
  1346. return !isReadonly2;
  1347. } else if (key === "__v_isReadonly") {
  1348. return isReadonly2;
  1349. } else if (key === "__v_raw") {
  1350. return target;
  1351. }
  1352. return Reflect.get(
  1353. hasOwn(instrumentations, key) && key in target ? instrumentations : target,
  1354. key,
  1355. receiver
  1356. );
  1357. };
  1358. }
  1359. const mutableCollectionHandlers = {
  1360. get: /* @__PURE__ */ createInstrumentationGetter(false, false)
  1361. };
  1362. const shallowCollectionHandlers = {
  1363. get: /* @__PURE__ */ createInstrumentationGetter(false, true)
  1364. };
  1365. const readonlyCollectionHandlers = {
  1366. get: /* @__PURE__ */ createInstrumentationGetter(true, false)
  1367. };
  1368. const shallowReadonlyCollectionHandlers = {
  1369. get: /* @__PURE__ */ createInstrumentationGetter(true, true)
  1370. };
  1371. const reactiveMap = /* @__PURE__ */ new WeakMap();
  1372. const shallowReactiveMap = /* @__PURE__ */ new WeakMap();
  1373. const readonlyMap = /* @__PURE__ */ new WeakMap();
  1374. const shallowReadonlyMap = /* @__PURE__ */ new WeakMap();
  1375. function targetTypeMap(rawType) {
  1376. switch (rawType) {
  1377. case "Object":
  1378. case "Array":
  1379. return 1;
  1380. case "Map":
  1381. case "Set":
  1382. case "WeakMap":
  1383. case "WeakSet":
  1384. return 2;
  1385. default:
  1386. return 0;
  1387. }
  1388. }
  1389. function getTargetType(value) {
  1390. return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
  1391. }
  1392. function reactive(target) {
  1393. if (isReadonly(target)) {
  1394. return target;
  1395. }
  1396. return createReactiveObject(
  1397. target,
  1398. false,
  1399. mutableHandlers,
  1400. mutableCollectionHandlers,
  1401. reactiveMap
  1402. );
  1403. }
  1404. function shallowReactive(target) {
  1405. return createReactiveObject(
  1406. target,
  1407. false,
  1408. shallowReactiveHandlers,
  1409. shallowCollectionHandlers,
  1410. shallowReactiveMap
  1411. );
  1412. }
  1413. function readonly(target) {
  1414. return createReactiveObject(
  1415. target,
  1416. true,
  1417. readonlyHandlers,
  1418. readonlyCollectionHandlers,
  1419. readonlyMap
  1420. );
  1421. }
  1422. function shallowReadonly(target) {
  1423. return createReactiveObject(
  1424. target,
  1425. true,
  1426. shallowReadonlyHandlers,
  1427. shallowReadonlyCollectionHandlers,
  1428. shallowReadonlyMap
  1429. );
  1430. }
  1431. function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
  1432. if (!isObject(target)) {
  1433. return target;
  1434. }
  1435. if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
  1436. return target;
  1437. }
  1438. const existingProxy = proxyMap.get(target);
  1439. if (existingProxy) {
  1440. return existingProxy;
  1441. }
  1442. const targetType = getTargetType(target);
  1443. if (targetType === 0) {
  1444. return target;
  1445. }
  1446. const proxy = new Proxy(
  1447. target,
  1448. targetType === 2 ? collectionHandlers : baseHandlers
  1449. );
  1450. proxyMap.set(target, proxy);
  1451. return proxy;
  1452. }
  1453. function isReactive(value) {
  1454. if (isReadonly(value)) {
  1455. return isReactive(value["__v_raw"]);
  1456. }
  1457. return !!(value && value["__v_isReactive"]);
  1458. }
  1459. function isReadonly(value) {
  1460. return !!(value && value["__v_isReadonly"]);
  1461. }
  1462. function isShallow(value) {
  1463. return !!(value && value["__v_isShallow"]);
  1464. }
  1465. function isProxy(value) {
  1466. return value ? !!value["__v_raw"] : false;
  1467. }
  1468. function toRaw(observed) {
  1469. const raw = observed && observed["__v_raw"];
  1470. return raw ? toRaw(raw) : observed;
  1471. }
  1472. function markRaw(value) {
  1473. if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) {
  1474. def(value, "__v_skip", true);
  1475. }
  1476. return value;
  1477. }
  1478. const toReactive = (value) => isObject(value) ? reactive(value) : value;
  1479. const toReadonly = (value) => isObject(value) ? readonly(value) : value;
  1480. function isRef(r) {
  1481. return r ? r["__v_isRef"] === true : false;
  1482. }
  1483. function ref(value) {
  1484. return createRef(value, false);
  1485. }
  1486. function shallowRef(value) {
  1487. return createRef(value, true);
  1488. }
  1489. function createRef(rawValue, shallow) {
  1490. if (isRef(rawValue)) {
  1491. return rawValue;
  1492. }
  1493. return new RefImpl(rawValue, shallow);
  1494. }
  1495. class RefImpl {
  1496. constructor(value, isShallow2) {
  1497. this.dep = new Dep();
  1498. this["__v_isRef"] = true;
  1499. this["__v_isShallow"] = false;
  1500. this._rawValue = isShallow2 ? value : toRaw(value);
  1501. this._value = isShallow2 ? value : toReactive(value);
  1502. this["__v_isShallow"] = isShallow2;
  1503. }
  1504. get value() {
  1505. {
  1506. this.dep.track();
  1507. }
  1508. return this._value;
  1509. }
  1510. set value(newValue) {
  1511. const oldValue = this._rawValue;
  1512. const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue);
  1513. newValue = useDirectValue ? newValue : toRaw(newValue);
  1514. if (hasChanged(newValue, oldValue)) {
  1515. this._rawValue = newValue;
  1516. this._value = useDirectValue ? newValue : toReactive(newValue);
  1517. {
  1518. this.dep.trigger();
  1519. }
  1520. }
  1521. }
  1522. }
  1523. function unref(ref2) {
  1524. return isRef(ref2) ? ref2.value : ref2;
  1525. }
  1526. const shallowUnwrapHandlers = {
  1527. get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)),
  1528. set: (target, key, value, receiver) => {
  1529. const oldValue = target[key];
  1530. if (isRef(oldValue) && !isRef(value)) {
  1531. oldValue.value = value;
  1532. return true;
  1533. } else {
  1534. return Reflect.set(target, key, value, receiver);
  1535. }
  1536. }
  1537. };
  1538. function proxyRefs(objectWithRefs) {
  1539. return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);
  1540. }
  1541. function toRefs(object) {
  1542. const ret = isArray$1(object) ? new Array(object.length) : {};
  1543. for (const key in object) {
  1544. ret[key] = propertyToRef(object, key);
  1545. }
  1546. return ret;
  1547. }
  1548. class ObjectRefImpl {
  1549. constructor(_object, _key, _defaultValue) {
  1550. this._object = _object;
  1551. this._key = _key;
  1552. this._defaultValue = _defaultValue;
  1553. this["__v_isRef"] = true;
  1554. this._value = void 0;
  1555. }
  1556. get value() {
  1557. const val = this._object[this._key];
  1558. return this._value = val === void 0 ? this._defaultValue : val;
  1559. }
  1560. set value(newVal) {
  1561. this._object[this._key] = newVal;
  1562. }
  1563. get dep() {
  1564. return getDepFromReactive(toRaw(this._object), this._key);
  1565. }
  1566. }
  1567. function propertyToRef(source, key, defaultValue) {
  1568. const val = source[key];
  1569. return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);
  1570. }
  1571. class ComputedRefImpl {
  1572. constructor(fn, setter, isSSR) {
  1573. this.fn = fn;
  1574. this.setter = setter;
  1575. this._value = void 0;
  1576. this.dep = new Dep(this);
  1577. this.__v_isRef = true;
  1578. this.deps = void 0;
  1579. this.depsTail = void 0;
  1580. this.flags = 16;
  1581. this.globalVersion = globalVersion - 1;
  1582. this.effect = this;
  1583. this["__v_isReadonly"] = !setter;
  1584. this.isSSR = isSSR;
  1585. }
  1586. /**
  1587. * @internal
  1588. */
  1589. notify() {
  1590. this.flags |= 16;
  1591. if (activeSub !== this) {
  1592. this.dep.notify();
  1593. }
  1594. }
  1595. get value() {
  1596. const link = this.dep.track();
  1597. refreshComputed(this);
  1598. if (link) {
  1599. link.version = this.dep.version;
  1600. }
  1601. return this._value;
  1602. }
  1603. set value(newValue) {
  1604. if (this.setter) {
  1605. this.setter(newValue);
  1606. }
  1607. }
  1608. }
  1609. function computed$1(getterOrOptions, debugOptions, isSSR = false) {
  1610. let getter;
  1611. let setter;
  1612. if (isFunction(getterOrOptions)) {
  1613. getter = getterOrOptions;
  1614. } else {
  1615. getter = getterOrOptions.get;
  1616. setter = getterOrOptions.set;
  1617. }
  1618. const cRef = new ComputedRefImpl(getter, setter, isSSR);
  1619. return cRef;
  1620. }
  1621. const INITIAL_WATCHER_VALUE = {};
  1622. const cleanupMap = /* @__PURE__ */ new WeakMap();
  1623. let activeWatcher = void 0;
  1624. function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) {
  1625. if (owner) {
  1626. let cleanups = cleanupMap.get(owner);
  1627. if (!cleanups)
  1628. cleanupMap.set(owner, cleanups = []);
  1629. cleanups.push(cleanupFn);
  1630. }
  1631. }
  1632. function watch$1(source, cb, options = EMPTY_OBJ) {
  1633. const { immediate, deep, once, scheduler, augmentJob, call } = options;
  1634. const reactiveGetter = (source2) => {
  1635. if (deep)
  1636. return source2;
  1637. if (isShallow(source2) || deep === false || deep === 0)
  1638. return traverse(source2, 1);
  1639. return traverse(source2);
  1640. };
  1641. let effect;
  1642. let getter;
  1643. let cleanup;
  1644. let boundCleanup;
  1645. let forceTrigger = false;
  1646. let isMultiSource = false;
  1647. if (isRef(source)) {
  1648. getter = () => source.value;
  1649. forceTrigger = isShallow(source);
  1650. } else if (isReactive(source)) {
  1651. getter = () => reactiveGetter(source);
  1652. forceTrigger = true;
  1653. } else if (isArray$1(source)) {
  1654. isMultiSource = true;
  1655. forceTrigger = source.some((s) => isReactive(s) || isShallow(s));
  1656. getter = () => source.map((s) => {
  1657. if (isRef(s)) {
  1658. return s.value;
  1659. } else if (isReactive(s)) {
  1660. return reactiveGetter(s);
  1661. } else if (isFunction(s)) {
  1662. return call ? call(s, 2) : s();
  1663. } else
  1664. ;
  1665. });
  1666. } else if (isFunction(source)) {
  1667. if (cb) {
  1668. getter = call ? () => call(source, 2) : source;
  1669. } else {
  1670. getter = () => {
  1671. if (cleanup) {
  1672. pauseTracking();
  1673. try {
  1674. cleanup();
  1675. } finally {
  1676. resetTracking();
  1677. }
  1678. }
  1679. const currentEffect = activeWatcher;
  1680. activeWatcher = effect;
  1681. try {
  1682. return call ? call(source, 3, [boundCleanup]) : source(boundCleanup);
  1683. } finally {
  1684. activeWatcher = currentEffect;
  1685. }
  1686. };
  1687. }
  1688. } else {
  1689. getter = NOOP;
  1690. }
  1691. if (cb && deep) {
  1692. const baseGetter = getter;
  1693. const depth = deep === true ? Infinity : deep;
  1694. getter = () => traverse(baseGetter(), depth);
  1695. }
  1696. const scope = getCurrentScope();
  1697. const watchHandle = () => {
  1698. effect.stop();
  1699. if (scope) {
  1700. remove(scope.effects, effect);
  1701. }
  1702. };
  1703. if (once) {
  1704. if (cb) {
  1705. const _cb = cb;
  1706. cb = (...args) => {
  1707. _cb(...args);
  1708. watchHandle();
  1709. };
  1710. } else {
  1711. const _getter = getter;
  1712. getter = () => {
  1713. _getter();
  1714. watchHandle();
  1715. };
  1716. }
  1717. }
  1718. let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
  1719. const job = (immediateFirstRun) => {
  1720. if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) {
  1721. return;
  1722. }
  1723. if (cb) {
  1724. const newValue = effect.run();
  1725. if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
  1726. if (cleanup) {
  1727. cleanup();
  1728. }
  1729. const currentWatcher = activeWatcher;
  1730. activeWatcher = effect;
  1731. try {
  1732. const args = [
  1733. newValue,
  1734. // pass undefined as the old value when it's changed for the first time
  1735. oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
  1736. boundCleanup
  1737. ];
  1738. call ? call(cb, 3, args) : (
  1739. // @ts-expect-error
  1740. cb(...args)
  1741. );
  1742. oldValue = newValue;
  1743. } finally {
  1744. activeWatcher = currentWatcher;
  1745. }
  1746. }
  1747. } else {
  1748. effect.run();
  1749. }
  1750. };
  1751. if (augmentJob) {
  1752. augmentJob(job);
  1753. }
  1754. effect = new ReactiveEffect(getter);
  1755. effect.scheduler = scheduler ? () => scheduler(job, false) : job;
  1756. boundCleanup = (fn) => onWatcherCleanup(fn, false, effect);
  1757. cleanup = effect.onStop = () => {
  1758. const cleanups = cleanupMap.get(effect);
  1759. if (cleanups) {
  1760. if (call) {
  1761. call(cleanups, 4);
  1762. } else {
  1763. for (const cleanup2 of cleanups)
  1764. cleanup2();
  1765. }
  1766. cleanupMap.delete(effect);
  1767. }
  1768. };
  1769. if (cb) {
  1770. if (immediate) {
  1771. job(true);
  1772. } else {
  1773. oldValue = effect.run();
  1774. }
  1775. } else if (scheduler) {
  1776. scheduler(job.bind(null, true), true);
  1777. } else {
  1778. effect.run();
  1779. }
  1780. watchHandle.pause = effect.pause.bind(effect);
  1781. watchHandle.resume = effect.resume.bind(effect);
  1782. watchHandle.stop = watchHandle;
  1783. return watchHandle;
  1784. }
  1785. function traverse(value, depth = Infinity, seen2) {
  1786. if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
  1787. return value;
  1788. }
  1789. seen2 = seen2 || /* @__PURE__ */ new Set();
  1790. if (seen2.has(value)) {
  1791. return value;
  1792. }
  1793. seen2.add(value);
  1794. depth--;
  1795. if (isRef(value)) {
  1796. traverse(value.value, depth, seen2);
  1797. } else if (isArray$1(value)) {
  1798. for (let i = 0; i < value.length; i++) {
  1799. traverse(value[i], depth, seen2);
  1800. }
  1801. } else if (isSet(value) || isMap(value)) {
  1802. value.forEach((v) => {
  1803. traverse(v, depth, seen2);
  1804. });
  1805. } else if (isPlainObject$1(value)) {
  1806. for (const key in value) {
  1807. traverse(value[key], depth, seen2);
  1808. }
  1809. for (const key of Object.getOwnPropertySymbols(value)) {
  1810. if (Object.prototype.propertyIsEnumerable.call(value, key)) {
  1811. traverse(value[key], depth, seen2);
  1812. }
  1813. }
  1814. }
  1815. return value;
  1816. }
  1817. /**
  1818. * @vue/runtime-core v3.5.4
  1819. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  1820. * @license MIT
  1821. **/
  1822. const stack = [];
  1823. let isWarning = false;
  1824. function warn$1(msg, ...args) {
  1825. if (isWarning)
  1826. return;
  1827. isWarning = true;
  1828. pauseTracking();
  1829. const instance = stack.length ? stack[stack.length - 1].component : null;
  1830. const appWarnHandler = instance && instance.appContext.config.warnHandler;
  1831. const trace = getComponentTrace();
  1832. if (appWarnHandler) {
  1833. callWithErrorHandling(
  1834. appWarnHandler,
  1835. instance,
  1836. 11,
  1837. [
  1838. // eslint-disable-next-line no-restricted-syntax
  1839. msg + args.map((a) => {
  1840. var _a, _b;
  1841. return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);
  1842. }).join(""),
  1843. instance && instance.proxy,
  1844. trace.map(
  1845. ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`
  1846. ).join("\n"),
  1847. trace
  1848. ]
  1849. );
  1850. } else {
  1851. const warnArgs = [`[Vue warn]: ${msg}`, ...args];
  1852. if (trace.length && // avoid spamming console during tests
  1853. true) {
  1854. warnArgs.push(`
  1855. `, ...formatTrace(trace));
  1856. }
  1857. console.warn(...warnArgs);
  1858. }
  1859. resetTracking();
  1860. isWarning = false;
  1861. }
  1862. function getComponentTrace() {
  1863. let currentVNode = stack[stack.length - 1];
  1864. if (!currentVNode) {
  1865. return [];
  1866. }
  1867. const normalizedStack = [];
  1868. while (currentVNode) {
  1869. const last = normalizedStack[0];
  1870. if (last && last.vnode === currentVNode) {
  1871. last.recurseCount++;
  1872. } else {
  1873. normalizedStack.push({
  1874. vnode: currentVNode,
  1875. recurseCount: 0
  1876. });
  1877. }
  1878. const parentInstance = currentVNode.component && currentVNode.component.parent;
  1879. currentVNode = parentInstance && parentInstance.vnode;
  1880. }
  1881. return normalizedStack;
  1882. }
  1883. function formatTrace(trace) {
  1884. const logs = [];
  1885. trace.forEach((entry, i) => {
  1886. logs.push(...i === 0 ? [] : [`
  1887. `], ...formatTraceEntry(entry));
  1888. });
  1889. return logs;
  1890. }
  1891. function formatTraceEntry({ vnode, recurseCount }) {
  1892. const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;
  1893. const isRoot = vnode.component ? vnode.component.parent == null : false;
  1894. const open = ` at <${formatComponentName(
  1895. vnode.component,
  1896. vnode.type,
  1897. isRoot
  1898. )}`;
  1899. const close = `>` + postfix;
  1900. return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close];
  1901. }
  1902. function formatProps(props) {
  1903. const res = [];
  1904. const keys = Object.keys(props);
  1905. keys.slice(0, 3).forEach((key) => {
  1906. res.push(...formatProp(key, props[key]));
  1907. });
  1908. if (keys.length > 3) {
  1909. res.push(` ...`);
  1910. }
  1911. return res;
  1912. }
  1913. function formatProp(key, value, raw) {
  1914. if (isString(value)) {
  1915. value = JSON.stringify(value);
  1916. return raw ? value : [`${key}=${value}`];
  1917. } else if (typeof value === "number" || typeof value === "boolean" || value == null) {
  1918. return raw ? value : [`${key}=${value}`];
  1919. } else if (isRef(value)) {
  1920. value = formatProp(key, toRaw(value.value), true);
  1921. return raw ? value : [`${key}=Ref<`, value, `>`];
  1922. } else if (isFunction(value)) {
  1923. return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];
  1924. } else {
  1925. value = toRaw(value);
  1926. return raw ? value : [`${key}=`, value];
  1927. }
  1928. }
  1929. function callWithErrorHandling(fn, instance, type, args) {
  1930. try {
  1931. return args ? fn(...args) : fn();
  1932. } catch (err) {
  1933. handleError(err, instance, type);
  1934. }
  1935. }
  1936. function callWithAsyncErrorHandling(fn, instance, type, args) {
  1937. if (isFunction(fn)) {
  1938. const res = callWithErrorHandling(fn, instance, type, args);
  1939. if (res && isPromise(res)) {
  1940. res.catch((err) => {
  1941. handleError(err, instance, type);
  1942. });
  1943. }
  1944. return res;
  1945. }
  1946. if (isArray$1(fn)) {
  1947. const values = [];
  1948. for (let i = 0; i < fn.length; i++) {
  1949. values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
  1950. }
  1951. return values;
  1952. }
  1953. }
  1954. function handleError(err, instance, type, throwInDev = true) {
  1955. const contextVNode = instance ? instance.vnode : null;
  1956. const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ;
  1957. if (instance) {
  1958. let cur = instance.parent;
  1959. const exposedInstance = instance.proxy;
  1960. const errorInfo = `https://vuejs.org/error-reference/#runtime-${type}`;
  1961. while (cur) {
  1962. const errorCapturedHooks = cur.ec;
  1963. if (errorCapturedHooks) {
  1964. for (let i = 0; i < errorCapturedHooks.length; i++) {
  1965. if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {
  1966. return;
  1967. }
  1968. }
  1969. }
  1970. cur = cur.parent;
  1971. }
  1972. if (errorHandler) {
  1973. pauseTracking();
  1974. callWithErrorHandling(errorHandler, null, 10, [
  1975. err,
  1976. exposedInstance,
  1977. errorInfo
  1978. ]);
  1979. resetTracking();
  1980. return;
  1981. }
  1982. }
  1983. logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction);
  1984. }
  1985. function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) {
  1986. if (throwInProd) {
  1987. throw err;
  1988. } else {
  1989. console.error(err);
  1990. }
  1991. }
  1992. let isFlushing = false;
  1993. let isFlushPending = false;
  1994. const queue = [];
  1995. let flushIndex = 0;
  1996. const pendingPostFlushCbs = [];
  1997. let activePostFlushCbs = null;
  1998. let postFlushIndex = 0;
  1999. const resolvedPromise = /* @__PURE__ */ Promise.resolve();
  2000. let currentFlushPromise = null;
  2001. function nextTick(fn) {
  2002. const p2 = currentFlushPromise || resolvedPromise;
  2003. return fn ? p2.then(this ? fn.bind(this) : fn) : p2;
  2004. }
  2005. function findInsertionIndex$1(id) {
  2006. let start = isFlushing ? flushIndex + 1 : 0;
  2007. let end = queue.length;
  2008. while (start < end) {
  2009. const middle = start + end >>> 1;
  2010. const middleJob = queue[middle];
  2011. const middleJobId = getId(middleJob);
  2012. if (middleJobId < id || middleJobId === id && middleJob.flags & 2) {
  2013. start = middle + 1;
  2014. } else {
  2015. end = middle;
  2016. }
  2017. }
  2018. return start;
  2019. }
  2020. function queueJob(job) {
  2021. if (!(job.flags & 1)) {
  2022. const jobId = getId(job);
  2023. const lastJob = queue[queue.length - 1];
  2024. if (!lastJob || // fast path when the job id is larger than the tail
  2025. !(job.flags & 2) && jobId >= getId(lastJob)) {
  2026. queue.push(job);
  2027. } else {
  2028. queue.splice(findInsertionIndex$1(jobId), 0, job);
  2029. }
  2030. job.flags |= 1;
  2031. queueFlush();
  2032. }
  2033. }
  2034. function queueFlush() {
  2035. if (!isFlushing && !isFlushPending) {
  2036. isFlushPending = true;
  2037. currentFlushPromise = resolvedPromise.then(flushJobs);
  2038. }
  2039. }
  2040. function queuePostFlushCb(cb) {
  2041. if (!isArray$1(cb)) {
  2042. if (activePostFlushCbs && cb.id === -1) {
  2043. activePostFlushCbs.splice(postFlushIndex + 1, 0, cb);
  2044. } else if (!(cb.flags & 1)) {
  2045. pendingPostFlushCbs.push(cb);
  2046. cb.flags |= 1;
  2047. }
  2048. } else {
  2049. pendingPostFlushCbs.push(...cb);
  2050. }
  2051. queueFlush();
  2052. }
  2053. function flushPreFlushCbs(instance, seen2, i = isFlushing ? flushIndex + 1 : 0) {
  2054. for (; i < queue.length; i++) {
  2055. const cb = queue[i];
  2056. if (cb && cb.flags & 2) {
  2057. if (instance && cb.id !== instance.uid) {
  2058. continue;
  2059. }
  2060. queue.splice(i, 1);
  2061. i--;
  2062. if (cb.flags & 4) {
  2063. cb.flags &= ~1;
  2064. }
  2065. cb();
  2066. cb.flags &= ~1;
  2067. }
  2068. }
  2069. }
  2070. function flushPostFlushCbs(seen2) {
  2071. if (pendingPostFlushCbs.length) {
  2072. const deduped = [...new Set(pendingPostFlushCbs)].sort(
  2073. (a, b) => getId(a) - getId(b)
  2074. );
  2075. pendingPostFlushCbs.length = 0;
  2076. if (activePostFlushCbs) {
  2077. activePostFlushCbs.push(...deduped);
  2078. return;
  2079. }
  2080. activePostFlushCbs = deduped;
  2081. for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
  2082. const cb = activePostFlushCbs[postFlushIndex];
  2083. if (cb.flags & 4) {
  2084. cb.flags &= ~1;
  2085. }
  2086. if (!(cb.flags & 8))
  2087. cb();
  2088. cb.flags &= ~1;
  2089. }
  2090. activePostFlushCbs = null;
  2091. postFlushIndex = 0;
  2092. }
  2093. }
  2094. const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
  2095. function flushJobs(seen2) {
  2096. isFlushPending = false;
  2097. isFlushing = true;
  2098. const check = NOOP;
  2099. try {
  2100. for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
  2101. const job = queue[flushIndex];
  2102. if (job && !(job.flags & 8)) {
  2103. if (false)
  2104. ;
  2105. if (job.flags & 4) {
  2106. job.flags &= ~1;
  2107. }
  2108. callWithErrorHandling(
  2109. job,
  2110. job.i,
  2111. job.i ? 15 : 14
  2112. );
  2113. job.flags &= ~1;
  2114. }
  2115. }
  2116. } finally {
  2117. for (; flushIndex < queue.length; flushIndex++) {
  2118. const job = queue[flushIndex];
  2119. if (job) {
  2120. job.flags &= ~1;
  2121. }
  2122. }
  2123. flushIndex = 0;
  2124. queue.length = 0;
  2125. flushPostFlushCbs();
  2126. isFlushing = false;
  2127. currentFlushPromise = null;
  2128. if (queue.length || pendingPostFlushCbs.length) {
  2129. flushJobs();
  2130. }
  2131. }
  2132. }
  2133. let currentRenderingInstance = null;
  2134. let currentScopeId = null;
  2135. function setCurrentRenderingInstance(instance) {
  2136. const prev = currentRenderingInstance;
  2137. currentRenderingInstance = instance;
  2138. currentScopeId = instance && instance.type.__scopeId || null;
  2139. return prev;
  2140. }
  2141. function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {
  2142. if (!ctx)
  2143. return fn;
  2144. if (fn._n) {
  2145. return fn;
  2146. }
  2147. const renderFnWithContext = (...args) => {
  2148. if (renderFnWithContext._d) {
  2149. setBlockTracking(-1);
  2150. }
  2151. const prevInstance = setCurrentRenderingInstance(ctx);
  2152. let res;
  2153. try {
  2154. res = fn(...args);
  2155. } finally {
  2156. setCurrentRenderingInstance(prevInstance);
  2157. if (renderFnWithContext._d) {
  2158. setBlockTracking(1);
  2159. }
  2160. }
  2161. return res;
  2162. };
  2163. renderFnWithContext._n = true;
  2164. renderFnWithContext._c = true;
  2165. renderFnWithContext._d = true;
  2166. return renderFnWithContext;
  2167. }
  2168. function withDirectives(vnode, directives) {
  2169. if (currentRenderingInstance === null) {
  2170. return vnode;
  2171. }
  2172. const instance = getComponentPublicInstance(currentRenderingInstance);
  2173. const bindings = vnode.dirs || (vnode.dirs = []);
  2174. for (let i = 0; i < directives.length; i++) {
  2175. let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
  2176. if (dir) {
  2177. if (isFunction(dir)) {
  2178. dir = {
  2179. mounted: dir,
  2180. updated: dir
  2181. };
  2182. }
  2183. if (dir.deep) {
  2184. traverse(value);
  2185. }
  2186. bindings.push({
  2187. dir,
  2188. instance,
  2189. value,
  2190. oldValue: void 0,
  2191. arg,
  2192. modifiers
  2193. });
  2194. }
  2195. }
  2196. return vnode;
  2197. }
  2198. function invokeDirectiveHook(vnode, prevVNode, instance, name) {
  2199. const bindings = vnode.dirs;
  2200. const oldBindings = prevVNode && prevVNode.dirs;
  2201. for (let i = 0; i < bindings.length; i++) {
  2202. const binding = bindings[i];
  2203. if (oldBindings) {
  2204. binding.oldValue = oldBindings[i].value;
  2205. }
  2206. let hook = binding.dir[name];
  2207. if (hook) {
  2208. pauseTracking();
  2209. callWithAsyncErrorHandling(hook, instance, 8, [
  2210. vnode.el,
  2211. binding,
  2212. vnode,
  2213. prevVNode
  2214. ]);
  2215. resetTracking();
  2216. }
  2217. }
  2218. }
  2219. const TeleportEndKey = Symbol("_vte");
  2220. const isTeleport = (type) => type.__isTeleport;
  2221. const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
  2222. const isTeleportDeferred = (props) => props && (props.defer || props.defer === "");
  2223. const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement;
  2224. const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement;
  2225. const resolveTarget = (props, select) => {
  2226. const targetSelector = props && props.to;
  2227. if (isString(targetSelector)) {
  2228. if (!select) {
  2229. return null;
  2230. } else {
  2231. const target = select(targetSelector);
  2232. return target;
  2233. }
  2234. } else {
  2235. return targetSelector;
  2236. }
  2237. };
  2238. const TeleportImpl = {
  2239. name: "Teleport",
  2240. __isTeleport: true,
  2241. process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) {
  2242. const {
  2243. mc: mountChildren,
  2244. pc: patchChildren,
  2245. pbc: patchBlockChildren,
  2246. o: { insert, querySelector, createText, createComment }
  2247. } = internals;
  2248. const disabled = isTeleportDisabled(n2.props);
  2249. let { shapeFlag, children, dynamicChildren } = n2;
  2250. if (n1 == null) {
  2251. const placeholder = n2.el = createText("");
  2252. const mainAnchor = n2.anchor = createText("");
  2253. insert(placeholder, container, anchor);
  2254. insert(mainAnchor, container, anchor);
  2255. const mount = (container2, anchor2) => {
  2256. if (shapeFlag & 16) {
  2257. mountChildren(
  2258. children,
  2259. container2,
  2260. anchor2,
  2261. parentComponent,
  2262. parentSuspense,
  2263. namespace,
  2264. slotScopeIds,
  2265. optimized
  2266. );
  2267. }
  2268. };
  2269. const mountToTarget = () => {
  2270. const target = n2.target = resolveTarget(n2.props, querySelector);
  2271. const targetAnchor = prepareAnchor(target, n2, createText, insert);
  2272. if (target) {
  2273. if (namespace !== "svg" && isTargetSVG(target)) {
  2274. namespace = "svg";
  2275. } else if (namespace !== "mathml" && isTargetMathML(target)) {
  2276. namespace = "mathml";
  2277. }
  2278. if (!disabled) {
  2279. mount(target, targetAnchor);
  2280. updateCssVars(n2);
  2281. }
  2282. }
  2283. };
  2284. if (disabled) {
  2285. mount(container, mainAnchor);
  2286. updateCssVars(n2);
  2287. }
  2288. if (isTeleportDeferred(n2.props)) {
  2289. queuePostRenderEffect(mountToTarget, parentSuspense);
  2290. } else {
  2291. mountToTarget();
  2292. }
  2293. } else {
  2294. n2.el = n1.el;
  2295. n2.targetStart = n1.targetStart;
  2296. const mainAnchor = n2.anchor = n1.anchor;
  2297. const target = n2.target = n1.target;
  2298. const targetAnchor = n2.targetAnchor = n1.targetAnchor;
  2299. const wasDisabled = isTeleportDisabled(n1.props);
  2300. const currentContainer = wasDisabled ? container : target;
  2301. const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
  2302. if (namespace === "svg" || isTargetSVG(target)) {
  2303. namespace = "svg";
  2304. } else if (namespace === "mathml" || isTargetMathML(target)) {
  2305. namespace = "mathml";
  2306. }
  2307. if (dynamicChildren) {
  2308. patchBlockChildren(
  2309. n1.dynamicChildren,
  2310. dynamicChildren,
  2311. currentContainer,
  2312. parentComponent,
  2313. parentSuspense,
  2314. namespace,
  2315. slotScopeIds
  2316. );
  2317. traverseStaticChildren(n1, n2, true);
  2318. } else if (!optimized) {
  2319. patchChildren(
  2320. n1,
  2321. n2,
  2322. currentContainer,
  2323. currentAnchor,
  2324. parentComponent,
  2325. parentSuspense,
  2326. namespace,
  2327. slotScopeIds,
  2328. false
  2329. );
  2330. }
  2331. if (disabled) {
  2332. if (!wasDisabled) {
  2333. moveTeleport(
  2334. n2,
  2335. container,
  2336. mainAnchor,
  2337. internals,
  2338. 1
  2339. );
  2340. } else {
  2341. if (n2.props && n1.props && n2.props.to !== n1.props.to) {
  2342. n2.props.to = n1.props.to;
  2343. }
  2344. }
  2345. } else {
  2346. if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
  2347. const nextTarget = n2.target = resolveTarget(
  2348. n2.props,
  2349. querySelector
  2350. );
  2351. if (nextTarget) {
  2352. moveTeleport(
  2353. n2,
  2354. nextTarget,
  2355. null,
  2356. internals,
  2357. 0
  2358. );
  2359. }
  2360. } else if (wasDisabled) {
  2361. moveTeleport(
  2362. n2,
  2363. target,
  2364. targetAnchor,
  2365. internals,
  2366. 1
  2367. );
  2368. }
  2369. }
  2370. updateCssVars(n2);
  2371. }
  2372. },
  2373. remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
  2374. const {
  2375. shapeFlag,
  2376. children,
  2377. anchor,
  2378. targetStart,
  2379. targetAnchor,
  2380. target,
  2381. props
  2382. } = vnode;
  2383. if (target) {
  2384. hostRemove(targetStart);
  2385. hostRemove(targetAnchor);
  2386. }
  2387. doRemove && hostRemove(anchor);
  2388. if (shapeFlag & 16) {
  2389. const shouldRemove = doRemove || !isTeleportDisabled(props);
  2390. for (let i = 0; i < children.length; i++) {
  2391. const child = children[i];
  2392. unmount(
  2393. child,
  2394. parentComponent,
  2395. parentSuspense,
  2396. shouldRemove,
  2397. !!child.dynamicChildren
  2398. );
  2399. }
  2400. }
  2401. },
  2402. move: moveTeleport,
  2403. hydrate: hydrateTeleport
  2404. };
  2405. function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
  2406. if (moveType === 0) {
  2407. insert(vnode.targetAnchor, container, parentAnchor);
  2408. }
  2409. const { el, anchor, shapeFlag, children, props } = vnode;
  2410. const isReorder = moveType === 2;
  2411. if (isReorder) {
  2412. insert(el, container, parentAnchor);
  2413. }
  2414. if (!isReorder || isTeleportDisabled(props)) {
  2415. if (shapeFlag & 16) {
  2416. for (let i = 0; i < children.length; i++) {
  2417. move(
  2418. children[i],
  2419. container,
  2420. parentAnchor,
  2421. 2
  2422. );
  2423. }
  2424. }
  2425. }
  2426. if (isReorder) {
  2427. insert(anchor, container, parentAnchor);
  2428. }
  2429. }
  2430. function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
  2431. o: { nextSibling, parentNode, querySelector, insert, createText }
  2432. }, hydrateChildren) {
  2433. const target = vnode.target = resolveTarget(
  2434. vnode.props,
  2435. querySelector
  2436. );
  2437. if (target) {
  2438. const targetNode = target._lpa || target.firstChild;
  2439. if (vnode.shapeFlag & 16) {
  2440. if (isTeleportDisabled(vnode.props)) {
  2441. vnode.anchor = hydrateChildren(
  2442. nextSibling(node),
  2443. vnode,
  2444. parentNode(node),
  2445. parentComponent,
  2446. parentSuspense,
  2447. slotScopeIds,
  2448. optimized
  2449. );
  2450. vnode.targetStart = targetNode;
  2451. vnode.targetAnchor = targetNode && nextSibling(targetNode);
  2452. } else {
  2453. vnode.anchor = nextSibling(node);
  2454. let targetAnchor = targetNode;
  2455. while (targetAnchor) {
  2456. if (targetAnchor && targetAnchor.nodeType === 8) {
  2457. if (targetAnchor.data === "teleport start anchor") {
  2458. vnode.targetStart = targetAnchor;
  2459. } else if (targetAnchor.data === "teleport anchor") {
  2460. vnode.targetAnchor = targetAnchor;
  2461. target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
  2462. break;
  2463. }
  2464. }
  2465. targetAnchor = nextSibling(targetAnchor);
  2466. }
  2467. if (!vnode.targetAnchor) {
  2468. prepareAnchor(target, vnode, createText, insert);
  2469. }
  2470. hydrateChildren(
  2471. targetNode && nextSibling(targetNode),
  2472. vnode,
  2473. target,
  2474. parentComponent,
  2475. parentSuspense,
  2476. slotScopeIds,
  2477. optimized
  2478. );
  2479. }
  2480. }
  2481. updateCssVars(vnode);
  2482. }
  2483. return vnode.anchor && nextSibling(vnode.anchor);
  2484. }
  2485. const Teleport = TeleportImpl;
  2486. function updateCssVars(vnode) {
  2487. const ctx = vnode.ctx;
  2488. if (ctx && ctx.ut) {
  2489. let node = vnode.targetStart;
  2490. while (node && node !== vnode.targetAnchor) {
  2491. if (node.nodeType === 1)
  2492. node.setAttribute("data-v-owner", ctx.uid);
  2493. node = node.nextSibling;
  2494. }
  2495. ctx.ut();
  2496. }
  2497. }
  2498. function prepareAnchor(target, vnode, createText, insert) {
  2499. const targetStart = vnode.targetStart = createText("");
  2500. const targetAnchor = vnode.targetAnchor = createText("");
  2501. targetStart[TeleportEndKey] = targetAnchor;
  2502. if (target) {
  2503. insert(targetStart, target);
  2504. insert(targetAnchor, target);
  2505. }
  2506. return targetAnchor;
  2507. }
  2508. const leaveCbKey = Symbol("_leaveCb");
  2509. const enterCbKey = Symbol("_enterCb");
  2510. function useTransitionState() {
  2511. const state = {
  2512. isMounted: false,
  2513. isLeaving: false,
  2514. isUnmounting: false,
  2515. leavingVNodes: /* @__PURE__ */ new Map()
  2516. };
  2517. onMounted(() => {
  2518. state.isMounted = true;
  2519. });
  2520. onBeforeUnmount(() => {
  2521. state.isUnmounting = true;
  2522. });
  2523. return state;
  2524. }
  2525. const TransitionHookValidator = [Function, Array];
  2526. const BaseTransitionPropsValidators = {
  2527. mode: String,
  2528. appear: Boolean,
  2529. persisted: Boolean,
  2530. // enter
  2531. onBeforeEnter: TransitionHookValidator,
  2532. onEnter: TransitionHookValidator,
  2533. onAfterEnter: TransitionHookValidator,
  2534. onEnterCancelled: TransitionHookValidator,
  2535. // leave
  2536. onBeforeLeave: TransitionHookValidator,
  2537. onLeave: TransitionHookValidator,
  2538. onAfterLeave: TransitionHookValidator,
  2539. onLeaveCancelled: TransitionHookValidator,
  2540. // appear
  2541. onBeforeAppear: TransitionHookValidator,
  2542. onAppear: TransitionHookValidator,
  2543. onAfterAppear: TransitionHookValidator,
  2544. onAppearCancelled: TransitionHookValidator
  2545. };
  2546. const recursiveGetSubtree = (instance) => {
  2547. const subTree = instance.subTree;
  2548. return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
  2549. };
  2550. const BaseTransitionImpl = {
  2551. name: `BaseTransition`,
  2552. props: BaseTransitionPropsValidators,
  2553. setup(props, { slots }) {
  2554. const instance = getCurrentInstance();
  2555. const state = useTransitionState();
  2556. return () => {
  2557. const children = slots.default && getTransitionRawChildren(slots.default(), true);
  2558. if (!children || !children.length) {
  2559. return;
  2560. }
  2561. const child = findNonCommentChild(children);
  2562. const rawProps = toRaw(props);
  2563. const { mode } = rawProps;
  2564. if (state.isLeaving) {
  2565. return emptyPlaceholder(child);
  2566. }
  2567. const innerChild = getInnerChild$1(child);
  2568. if (!innerChild) {
  2569. return emptyPlaceholder(child);
  2570. }
  2571. let enterHooks = resolveTransitionHooks(
  2572. innerChild,
  2573. rawProps,
  2574. state,
  2575. instance,
  2576. // #11061, ensure enterHooks is fresh after clone
  2577. (hooks) => enterHooks = hooks
  2578. );
  2579. if (innerChild.type !== Comment) {
  2580. setTransitionHooks(innerChild, enterHooks);
  2581. }
  2582. const oldChild = instance.subTree;
  2583. const oldInnerChild = oldChild && getInnerChild$1(oldChild);
  2584. if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
  2585. const leavingHooks = resolveTransitionHooks(
  2586. oldInnerChild,
  2587. rawProps,
  2588. state,
  2589. instance
  2590. );
  2591. setTransitionHooks(oldInnerChild, leavingHooks);
  2592. if (mode === "out-in" && innerChild.type !== Comment) {
  2593. state.isLeaving = true;
  2594. leavingHooks.afterLeave = () => {
  2595. state.isLeaving = false;
  2596. if (!(instance.job.flags & 8)) {
  2597. instance.update();
  2598. }
  2599. delete leavingHooks.afterLeave;
  2600. };
  2601. return emptyPlaceholder(child);
  2602. } else if (mode === "in-out" && innerChild.type !== Comment) {
  2603. leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {
  2604. const leavingVNodesCache = getLeavingNodesForType(
  2605. state,
  2606. oldInnerChild
  2607. );
  2608. leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
  2609. el[leaveCbKey] = () => {
  2610. earlyRemove();
  2611. el[leaveCbKey] = void 0;
  2612. delete enterHooks.delayedLeave;
  2613. };
  2614. enterHooks.delayedLeave = delayedLeave;
  2615. };
  2616. }
  2617. }
  2618. return child;
  2619. };
  2620. }
  2621. };
  2622. function findNonCommentChild(children) {
  2623. let child = children[0];
  2624. if (children.length > 1) {
  2625. for (const c of children) {
  2626. if (c.type !== Comment) {
  2627. child = c;
  2628. break;
  2629. }
  2630. }
  2631. }
  2632. return child;
  2633. }
  2634. const BaseTransition = BaseTransitionImpl;
  2635. function getLeavingNodesForType(state, vnode) {
  2636. const { leavingVNodes } = state;
  2637. let leavingVNodesCache = leavingVNodes.get(vnode.type);
  2638. if (!leavingVNodesCache) {
  2639. leavingVNodesCache = /* @__PURE__ */ Object.create(null);
  2640. leavingVNodes.set(vnode.type, leavingVNodesCache);
  2641. }
  2642. return leavingVNodesCache;
  2643. }
  2644. function resolveTransitionHooks(vnode, props, state, instance, postClone) {
  2645. const {
  2646. appear,
  2647. mode,
  2648. persisted = false,
  2649. onBeforeEnter,
  2650. onEnter,
  2651. onAfterEnter,
  2652. onEnterCancelled,
  2653. onBeforeLeave,
  2654. onLeave,
  2655. onAfterLeave,
  2656. onLeaveCancelled,
  2657. onBeforeAppear,
  2658. onAppear,
  2659. onAfterAppear,
  2660. onAppearCancelled
  2661. } = props;
  2662. const key = String(vnode.key);
  2663. const leavingVNodesCache = getLeavingNodesForType(state, vnode);
  2664. const callHook2 = (hook, args) => {
  2665. hook && callWithAsyncErrorHandling(
  2666. hook,
  2667. instance,
  2668. 9,
  2669. args
  2670. );
  2671. };
  2672. const callAsyncHook = (hook, args) => {
  2673. const done = args[1];
  2674. callHook2(hook, args);
  2675. if (isArray$1(hook)) {
  2676. if (hook.every((hook2) => hook2.length <= 1))
  2677. done();
  2678. } else if (hook.length <= 1) {
  2679. done();
  2680. }
  2681. };
  2682. const hooks = {
  2683. mode,
  2684. persisted,
  2685. beforeEnter(el) {
  2686. let hook = onBeforeEnter;
  2687. if (!state.isMounted) {
  2688. if (appear) {
  2689. hook = onBeforeAppear || onBeforeEnter;
  2690. } else {
  2691. return;
  2692. }
  2693. }
  2694. if (el[leaveCbKey]) {
  2695. el[leaveCbKey](
  2696. true
  2697. /* cancelled */
  2698. );
  2699. }
  2700. const leavingVNode = leavingVNodesCache[key];
  2701. if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
  2702. leavingVNode.el[leaveCbKey]();
  2703. }
  2704. callHook2(hook, [el]);
  2705. },
  2706. enter(el) {
  2707. let hook = onEnter;
  2708. let afterHook = onAfterEnter;
  2709. let cancelHook = onEnterCancelled;
  2710. if (!state.isMounted) {
  2711. if (appear) {
  2712. hook = onAppear || onEnter;
  2713. afterHook = onAfterAppear || onAfterEnter;
  2714. cancelHook = onAppearCancelled || onEnterCancelled;
  2715. } else {
  2716. return;
  2717. }
  2718. }
  2719. let called = false;
  2720. const done = el[enterCbKey] = (cancelled) => {
  2721. if (called)
  2722. return;
  2723. called = true;
  2724. if (cancelled) {
  2725. callHook2(cancelHook, [el]);
  2726. } else {
  2727. callHook2(afterHook, [el]);
  2728. }
  2729. if (hooks.delayedLeave) {
  2730. hooks.delayedLeave();
  2731. }
  2732. el[enterCbKey] = void 0;
  2733. };
  2734. if (hook) {
  2735. callAsyncHook(hook, [el, done]);
  2736. } else {
  2737. done();
  2738. }
  2739. },
  2740. leave(el, remove2) {
  2741. const key2 = String(vnode.key);
  2742. if (el[enterCbKey]) {
  2743. el[enterCbKey](
  2744. true
  2745. /* cancelled */
  2746. );
  2747. }
  2748. if (state.isUnmounting) {
  2749. return remove2();
  2750. }
  2751. callHook2(onBeforeLeave, [el]);
  2752. let called = false;
  2753. const done = el[leaveCbKey] = (cancelled) => {
  2754. if (called)
  2755. return;
  2756. called = true;
  2757. remove2();
  2758. if (cancelled) {
  2759. callHook2(onLeaveCancelled, [el]);
  2760. } else {
  2761. callHook2(onAfterLeave, [el]);
  2762. }
  2763. el[leaveCbKey] = void 0;
  2764. if (leavingVNodesCache[key2] === vnode) {
  2765. delete leavingVNodesCache[key2];
  2766. }
  2767. };
  2768. leavingVNodesCache[key2] = vnode;
  2769. if (onLeave) {
  2770. callAsyncHook(onLeave, [el, done]);
  2771. } else {
  2772. done();
  2773. }
  2774. },
  2775. clone(vnode2) {
  2776. const hooks2 = resolveTransitionHooks(
  2777. vnode2,
  2778. props,
  2779. state,
  2780. instance,
  2781. postClone
  2782. );
  2783. if (postClone)
  2784. postClone(hooks2);
  2785. return hooks2;
  2786. }
  2787. };
  2788. return hooks;
  2789. }
  2790. function emptyPlaceholder(vnode) {
  2791. if (isKeepAlive(vnode)) {
  2792. vnode = cloneVNode(vnode);
  2793. vnode.children = null;
  2794. return vnode;
  2795. }
  2796. }
  2797. function getInnerChild$1(vnode) {
  2798. if (!isKeepAlive(vnode)) {
  2799. if (isTeleport(vnode.type) && vnode.children) {
  2800. return findNonCommentChild(vnode.children);
  2801. }
  2802. return vnode;
  2803. }
  2804. const { shapeFlag, children } = vnode;
  2805. if (children) {
  2806. if (shapeFlag & 16) {
  2807. return children[0];
  2808. }
  2809. if (shapeFlag & 32 && isFunction(children.default)) {
  2810. return children.default();
  2811. }
  2812. }
  2813. }
  2814. function setTransitionHooks(vnode, hooks) {
  2815. if (vnode.shapeFlag & 6 && vnode.component) {
  2816. vnode.transition = hooks;
  2817. setTransitionHooks(vnode.component.subTree, hooks);
  2818. } else if (vnode.shapeFlag & 128) {
  2819. vnode.ssContent.transition = hooks.clone(vnode.ssContent);
  2820. vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
  2821. } else {
  2822. vnode.transition = hooks;
  2823. }
  2824. }
  2825. function getTransitionRawChildren(children, keepComment = false, parentKey) {
  2826. let ret = [];
  2827. let keyedFragmentCount = 0;
  2828. for (let i = 0; i < children.length; i++) {
  2829. let child = children[i];
  2830. const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i);
  2831. if (child.type === Fragment) {
  2832. if (child.patchFlag & 128)
  2833. keyedFragmentCount++;
  2834. ret = ret.concat(
  2835. getTransitionRawChildren(child.children, keepComment, key)
  2836. );
  2837. } else if (keepComment || child.type !== Comment) {
  2838. ret.push(key != null ? cloneVNode(child, { key }) : child);
  2839. }
  2840. }
  2841. if (keyedFragmentCount > 1) {
  2842. for (let i = 0; i < ret.length; i++) {
  2843. ret[i].patchFlag = -2;
  2844. }
  2845. }
  2846. return ret;
  2847. }
  2848. /*! #__NO_SIDE_EFFECTS__ */
  2849. // @__NO_SIDE_EFFECTS__
  2850. function defineComponent(options, extraOptions) {
  2851. return isFunction(options) ? (
  2852. // #8236: extend call and options.name access are considered side-effects
  2853. // by Rollup, so we have to wrap it in a pure-annotated IIFE.
  2854. /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()
  2855. ) : options;
  2856. }
  2857. function markAsyncBoundary(instance) {
  2858. instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0];
  2859. }
  2860. function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
  2861. if (isArray$1(rawRef)) {
  2862. rawRef.forEach(
  2863. (r, i) => setRef(
  2864. r,
  2865. oldRawRef && (isArray$1(oldRawRef) ? oldRawRef[i] : oldRawRef),
  2866. parentSuspense,
  2867. vnode,
  2868. isUnmount
  2869. )
  2870. );
  2871. return;
  2872. }
  2873. if (isAsyncWrapper(vnode) && !isUnmount) {
  2874. return;
  2875. }
  2876. const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;
  2877. const value = isUnmount ? null : refValue;
  2878. const { i: owner, r: ref2 } = rawRef;
  2879. const oldRef = oldRawRef && oldRawRef.r;
  2880. const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
  2881. const setupState = owner.setupState;
  2882. const rawSetupState = toRaw(setupState);
  2883. const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => {
  2884. return hasOwn(rawSetupState, key);
  2885. };
  2886. if (oldRef != null && oldRef !== ref2) {
  2887. if (isString(oldRef)) {
  2888. refs[oldRef] = null;
  2889. if (canSetSetupRef(oldRef)) {
  2890. setupState[oldRef] = null;
  2891. }
  2892. } else if (isRef(oldRef)) {
  2893. oldRef.value = null;
  2894. }
  2895. }
  2896. if (isFunction(ref2)) {
  2897. callWithErrorHandling(ref2, owner, 12, [value, refs]);
  2898. } else {
  2899. const _isString = isString(ref2);
  2900. const _isRef = isRef(ref2);
  2901. if (_isString || _isRef) {
  2902. const doSet = () => {
  2903. if (rawRef.f) {
  2904. const existing = _isString ? canSetSetupRef(ref2) ? setupState[ref2] : refs[ref2] : ref2.value;
  2905. if (isUnmount) {
  2906. isArray$1(existing) && remove(existing, refValue);
  2907. } else {
  2908. if (!isArray$1(existing)) {
  2909. if (_isString) {
  2910. refs[ref2] = [refValue];
  2911. if (canSetSetupRef(ref2)) {
  2912. setupState[ref2] = refs[ref2];
  2913. }
  2914. } else {
  2915. ref2.value = [refValue];
  2916. if (rawRef.k)
  2917. refs[rawRef.k] = ref2.value;
  2918. }
  2919. } else if (!existing.includes(refValue)) {
  2920. existing.push(refValue);
  2921. }
  2922. }
  2923. } else if (_isString) {
  2924. refs[ref2] = value;
  2925. if (canSetSetupRef(ref2)) {
  2926. setupState[ref2] = value;
  2927. }
  2928. } else if (_isRef) {
  2929. ref2.value = value;
  2930. if (rawRef.k)
  2931. refs[rawRef.k] = value;
  2932. } else
  2933. ;
  2934. };
  2935. if (value) {
  2936. doSet.id = -1;
  2937. queuePostRenderEffect(doSet, parentSuspense);
  2938. } else {
  2939. doSet();
  2940. }
  2941. }
  2942. }
  2943. }
  2944. const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
  2945. const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
  2946. const KeepAliveImpl = {
  2947. name: `KeepAlive`,
  2948. // Marker for special handling inside the renderer. We are not using a ===
  2949. // check directly on KeepAlive in the renderer, because importing it directly
  2950. // would prevent it from being tree-shaken.
  2951. __isKeepAlive: true,
  2952. props: {
  2953. include: [String, RegExp, Array],
  2954. exclude: [String, RegExp, Array],
  2955. max: [String, Number]
  2956. },
  2957. setup(props, { slots }) {
  2958. const instance = getCurrentInstance();
  2959. const sharedContext = instance.ctx;
  2960. if (!sharedContext.renderer) {
  2961. return () => {
  2962. const children = slots.default && slots.default();
  2963. return children && children.length === 1 ? children[0] : children;
  2964. };
  2965. }
  2966. const cache = /* @__PURE__ */ new Map();
  2967. const keys = /* @__PURE__ */ new Set();
  2968. let current = null;
  2969. const parentSuspense = instance.suspense;
  2970. const {
  2971. renderer: {
  2972. p: patch,
  2973. m: move,
  2974. um: _unmount,
  2975. o: { createElement }
  2976. }
  2977. } = sharedContext;
  2978. const storageContainer = createElement("div");
  2979. sharedContext.activate = (vnode, container, anchor, namespace, optimized) => {
  2980. const instance2 = vnode.component;
  2981. move(vnode, container, anchor, 0, parentSuspense);
  2982. patch(
  2983. instance2.vnode,
  2984. vnode,
  2985. container,
  2986. anchor,
  2987. instance2,
  2988. parentSuspense,
  2989. namespace,
  2990. vnode.slotScopeIds,
  2991. optimized
  2992. );
  2993. queuePostRenderEffect(() => {
  2994. instance2.isDeactivated = false;
  2995. if (instance2.a) {
  2996. invokeArrayFns(instance2.a);
  2997. }
  2998. const vnodeHook = vnode.props && vnode.props.onVnodeMounted;
  2999. if (vnodeHook) {
  3000. invokeVNodeHook(vnodeHook, instance2.parent, vnode);
  3001. }
  3002. }, parentSuspense);
  3003. };
  3004. sharedContext.deactivate = (vnode) => {
  3005. const instance2 = vnode.component;
  3006. invalidateMount(instance2.m);
  3007. invalidateMount(instance2.a);
  3008. move(vnode, storageContainer, null, 1, parentSuspense);
  3009. queuePostRenderEffect(() => {
  3010. if (instance2.da) {
  3011. invokeArrayFns(instance2.da);
  3012. }
  3013. const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;
  3014. if (vnodeHook) {
  3015. invokeVNodeHook(vnodeHook, instance2.parent, vnode);
  3016. }
  3017. instance2.isDeactivated = true;
  3018. }, parentSuspense);
  3019. };
  3020. function unmount(vnode) {
  3021. resetShapeFlag(vnode);
  3022. _unmount(vnode, instance, parentSuspense, true);
  3023. }
  3024. function pruneCache(filter) {
  3025. cache.forEach((vnode, key) => {
  3026. const name = getComponentName(vnode.type);
  3027. if (name && !filter(name)) {
  3028. pruneCacheEntry(key);
  3029. }
  3030. });
  3031. }
  3032. function pruneCacheEntry(key) {
  3033. const cached = cache.get(key);
  3034. if (cached && (!current || !isSameVNodeType(cached, current))) {
  3035. unmount(cached);
  3036. } else if (current) {
  3037. resetShapeFlag(current);
  3038. }
  3039. cache.delete(key);
  3040. keys.delete(key);
  3041. }
  3042. watch(
  3043. () => [props.include, props.exclude],
  3044. ([include, exclude]) => {
  3045. include && pruneCache((name) => matches(include, name));
  3046. exclude && pruneCache((name) => !matches(exclude, name));
  3047. },
  3048. // prune post-render after `current` has been updated
  3049. { flush: "post", deep: true }
  3050. );
  3051. let pendingCacheKey = null;
  3052. const cacheSubtree = () => {
  3053. if (pendingCacheKey != null) {
  3054. if (isSuspense(instance.subTree.type)) {
  3055. queuePostRenderEffect(() => {
  3056. cache.set(pendingCacheKey, getInnerChild(instance.subTree));
  3057. }, instance.subTree.suspense);
  3058. } else {
  3059. cache.set(pendingCacheKey, getInnerChild(instance.subTree));
  3060. }
  3061. }
  3062. };
  3063. onMounted(cacheSubtree);
  3064. onUpdated(cacheSubtree);
  3065. onBeforeUnmount(() => {
  3066. cache.forEach((cached) => {
  3067. const { subTree, suspense } = instance;
  3068. const vnode = getInnerChild(subTree);
  3069. if (cached.type === vnode.type && cached.key === vnode.key) {
  3070. resetShapeFlag(vnode);
  3071. const da = vnode.component.da;
  3072. da && queuePostRenderEffect(da, suspense);
  3073. return;
  3074. }
  3075. unmount(cached);
  3076. });
  3077. });
  3078. return () => {
  3079. pendingCacheKey = null;
  3080. if (!slots.default) {
  3081. return current = null;
  3082. }
  3083. const children = slots.default();
  3084. const rawVNode = children[0];
  3085. if (children.length > 1) {
  3086. current = null;
  3087. return children;
  3088. } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) {
  3089. current = null;
  3090. return rawVNode;
  3091. }
  3092. let vnode = getInnerChild(rawVNode);
  3093. if (vnode.type === Comment) {
  3094. current = null;
  3095. return vnode;
  3096. }
  3097. const comp = vnode.type;
  3098. const name = getComponentName(
  3099. isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp
  3100. );
  3101. const { include, exclude, max } = props;
  3102. if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
  3103. vnode.shapeFlag &= ~256;
  3104. current = vnode;
  3105. return rawVNode;
  3106. }
  3107. const key = vnode.key == null ? comp : vnode.key;
  3108. const cachedVNode = cache.get(key);
  3109. if (vnode.el) {
  3110. vnode = cloneVNode(vnode);
  3111. if (rawVNode.shapeFlag & 128) {
  3112. rawVNode.ssContent = vnode;
  3113. }
  3114. }
  3115. pendingCacheKey = key;
  3116. if (cachedVNode) {
  3117. vnode.el = cachedVNode.el;
  3118. vnode.component = cachedVNode.component;
  3119. if (vnode.transition) {
  3120. setTransitionHooks(vnode, vnode.transition);
  3121. }
  3122. vnode.shapeFlag |= 512;
  3123. keys.delete(key);
  3124. keys.add(key);
  3125. } else {
  3126. keys.add(key);
  3127. if (max && keys.size > parseInt(max, 10)) {
  3128. pruneCacheEntry(keys.values().next().value);
  3129. }
  3130. }
  3131. vnode.shapeFlag |= 256;
  3132. current = vnode;
  3133. return isSuspense(rawVNode.type) ? rawVNode : vnode;
  3134. };
  3135. }
  3136. };
  3137. const KeepAlive = KeepAliveImpl;
  3138. function matches(pattern, name) {
  3139. if (isArray$1(pattern)) {
  3140. return pattern.some((p2) => matches(p2, name));
  3141. } else if (isString(pattern)) {
  3142. return pattern.split(",").includes(name);
  3143. } else if (isRegExp(pattern)) {
  3144. pattern.lastIndex = 0;
  3145. return pattern.test(name);
  3146. }
  3147. return false;
  3148. }
  3149. function onActivated(hook, target) {
  3150. registerKeepAliveHook(hook, "a", target);
  3151. }
  3152. function onDeactivated(hook, target) {
  3153. registerKeepAliveHook(hook, "da", target);
  3154. }
  3155. function registerKeepAliveHook(hook, type, target = currentInstance) {
  3156. const wrappedHook = hook.__wdc || (hook.__wdc = () => {
  3157. let current = target;
  3158. while (current) {
  3159. if (current.isDeactivated) {
  3160. return;
  3161. }
  3162. current = current.parent;
  3163. }
  3164. return hook();
  3165. });
  3166. injectHook(type, wrappedHook, target);
  3167. if (target) {
  3168. let current = target.parent;
  3169. while (current && current.parent) {
  3170. if (isKeepAlive(current.parent.vnode)) {
  3171. injectToKeepAliveRoot(wrappedHook, type, target, current);
  3172. }
  3173. current = current.parent;
  3174. }
  3175. }
  3176. }
  3177. function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
  3178. const injected = injectHook(
  3179. type,
  3180. hook,
  3181. keepAliveRoot,
  3182. true
  3183. /* prepend */
  3184. );
  3185. onUnmounted(() => {
  3186. remove(keepAliveRoot[type], injected);
  3187. }, target);
  3188. }
  3189. function resetShapeFlag(vnode) {
  3190. vnode.shapeFlag &= ~256;
  3191. vnode.shapeFlag &= ~512;
  3192. }
  3193. function getInnerChild(vnode) {
  3194. return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
  3195. }
  3196. function injectHook(type, hook, target = currentInstance, prepend = false) {
  3197. if (target) {
  3198. const hooks = target[type] || (target[type] = []);
  3199. const wrappedHook = hook.__weh || (hook.__weh = (...args) => {
  3200. pauseTracking();
  3201. const reset = setCurrentInstance(target);
  3202. const res = callWithAsyncErrorHandling(hook, target, type, args);
  3203. reset();
  3204. resetTracking();
  3205. return res;
  3206. });
  3207. if (prepend) {
  3208. hooks.unshift(wrappedHook);
  3209. } else {
  3210. hooks.push(wrappedHook);
  3211. }
  3212. return wrappedHook;
  3213. }
  3214. }
  3215. const createHook = (lifecycle) => (hook, target = currentInstance) => {
  3216. if (!isInSSRComponentSetup || lifecycle === "sp") {
  3217. injectHook(lifecycle, (...args) => hook(...args), target);
  3218. }
  3219. };
  3220. const onBeforeMount = createHook("bm");
  3221. const onMounted = createHook("m");
  3222. const onBeforeUpdate = createHook(
  3223. "bu"
  3224. );
  3225. const onUpdated = createHook("u");
  3226. const onBeforeUnmount = createHook(
  3227. "bum"
  3228. );
  3229. const onUnmounted = createHook("um");
  3230. const onServerPrefetch = createHook(
  3231. "sp"
  3232. );
  3233. const onRenderTriggered = createHook("rtg");
  3234. const onRenderTracked = createHook("rtc");
  3235. function onErrorCaptured(hook, target = currentInstance) {
  3236. injectHook("ec", hook, target);
  3237. }
  3238. const COMPONENTS = "components";
  3239. const DIRECTIVES = "directives";
  3240. function resolveComponent(name, maybeSelfReference) {
  3241. return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
  3242. }
  3243. const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
  3244. function resolveDynamicComponent(component) {
  3245. if (isString(component)) {
  3246. return resolveAsset(COMPONENTS, component, false) || component;
  3247. } else {
  3248. return component || NULL_DYNAMIC_COMPONENT;
  3249. }
  3250. }
  3251. function resolveDirective(name) {
  3252. return resolveAsset(DIRECTIVES, name);
  3253. }
  3254. function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
  3255. const instance = currentRenderingInstance || currentInstance;
  3256. if (instance) {
  3257. const Component = instance.type;
  3258. if (type === COMPONENTS) {
  3259. const selfName = getComponentName(
  3260. Component,
  3261. false
  3262. );
  3263. if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
  3264. return Component;
  3265. }
  3266. }
  3267. const res = (
  3268. // local registration
  3269. // check instance[type] first which is resolved for options API
  3270. resolve(instance[type] || Component[type], name) || // global registration
  3271. resolve(instance.appContext[type], name)
  3272. );
  3273. if (!res && maybeSelfReference) {
  3274. return Component;
  3275. }
  3276. return res;
  3277. }
  3278. }
  3279. function resolve(registry, name) {
  3280. return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
  3281. }
  3282. function renderList(source, renderItem, cache, index2) {
  3283. let ret;
  3284. const cached = cache && cache[index2];
  3285. const sourceIsArray = isArray$1(source);
  3286. if (sourceIsArray || isString(source)) {
  3287. const sourceIsReactiveArray = sourceIsArray && isReactive(source);
  3288. let needsWrap = false;
  3289. if (sourceIsReactiveArray) {
  3290. needsWrap = !isShallow(source);
  3291. source = shallowReadArray(source);
  3292. }
  3293. ret = new Array(source.length);
  3294. for (let i = 0, l = source.length; i < l; i++) {
  3295. ret[i] = renderItem(
  3296. needsWrap ? toReactive(source[i]) : source[i],
  3297. i,
  3298. void 0,
  3299. cached && cached[i]
  3300. );
  3301. }
  3302. } else if (typeof source === "number") {
  3303. ret = new Array(source);
  3304. for (let i = 0; i < source; i++) {
  3305. ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
  3306. }
  3307. } else if (isObject(source)) {
  3308. if (source[Symbol.iterator]) {
  3309. ret = Array.from(
  3310. source,
  3311. (item, i) => renderItem(item, i, void 0, cached && cached[i])
  3312. );
  3313. } else {
  3314. const keys = Object.keys(source);
  3315. ret = new Array(keys.length);
  3316. for (let i = 0, l = keys.length; i < l; i++) {
  3317. const key = keys[i];
  3318. ret[i] = renderItem(source[key], key, i, cached && cached[i]);
  3319. }
  3320. }
  3321. } else {
  3322. ret = [];
  3323. }
  3324. if (cache) {
  3325. cache[index2] = ret;
  3326. }
  3327. return ret;
  3328. }
  3329. function createSlots(slots, dynamicSlots) {
  3330. for (let i = 0; i < dynamicSlots.length; i++) {
  3331. const slot = dynamicSlots[i];
  3332. if (isArray$1(slot)) {
  3333. for (let j = 0; j < slot.length; j++) {
  3334. slots[slot[j].name] = slot[j].fn;
  3335. }
  3336. } else if (slot) {
  3337. slots[slot.name] = slot.key ? (...args) => {
  3338. const res = slot.fn(...args);
  3339. if (res)
  3340. res.key = slot.key;
  3341. return res;
  3342. } : slot.fn;
  3343. }
  3344. }
  3345. return slots;
  3346. }
  3347. function renderSlot(slots, name, props = {}, fallback, noSlotted) {
  3348. if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
  3349. if (name !== "default")
  3350. props.name = name;
  3351. return openBlock(), createBlock(
  3352. Fragment,
  3353. null,
  3354. [createVNode("slot", props, fallback && fallback())],
  3355. 64
  3356. );
  3357. }
  3358. let slot = slots[name];
  3359. if (slot && slot._c) {
  3360. slot._d = false;
  3361. }
  3362. openBlock();
  3363. const validSlotContent = slot && ensureValidVNode(slot(props));
  3364. const rendered = createBlock(
  3365. Fragment,
  3366. {
  3367. key: (props.key || // slot content array of a dynamic conditional slot may have a branch
  3368. // key attached in the `createSlots` helper, respect that
  3369. validSlotContent && validSlotContent.key || `_${name}`) + // #7256 force differentiate fallback content from actual content
  3370. (!validSlotContent && fallback ? "_fb" : "")
  3371. },
  3372. validSlotContent || (fallback ? fallback() : []),
  3373. validSlotContent && slots._ === 1 ? 64 : -2
  3374. );
  3375. if (!noSlotted && rendered.scopeId) {
  3376. rendered.slotScopeIds = [rendered.scopeId + "-s"];
  3377. }
  3378. if (slot && slot._c) {
  3379. slot._d = true;
  3380. }
  3381. return rendered;
  3382. }
  3383. function ensureValidVNode(vnodes) {
  3384. return vnodes.some((child) => {
  3385. if (!isVNode(child))
  3386. return true;
  3387. if (child.type === Comment)
  3388. return false;
  3389. if (child.type === Fragment && !ensureValidVNode(child.children))
  3390. return false;
  3391. return true;
  3392. }) ? vnodes : null;
  3393. }
  3394. const getPublicInstance = (i) => {
  3395. if (!i)
  3396. return null;
  3397. if (isStatefulComponent(i))
  3398. return getComponentPublicInstance(i);
  3399. return getPublicInstance(i.parent);
  3400. };
  3401. const publicPropertiesMap = (
  3402. // Move PURE marker to new line to workaround compiler discarding it
  3403. // due to type annotation
  3404. /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {
  3405. $: (i) => i,
  3406. $el: (i) => i.vnode.el,
  3407. $data: (i) => i.data,
  3408. $props: (i) => i.props,
  3409. $attrs: (i) => i.attrs,
  3410. $slots: (i) => i.slots,
  3411. $refs: (i) => i.refs,
  3412. $parent: (i) => getPublicInstance(i.parent),
  3413. $root: (i) => getPublicInstance(i.root),
  3414. $host: (i) => i.ce,
  3415. $emit: (i) => i.emit,
  3416. $options: (i) => resolveMergedOptions(i),
  3417. $forceUpdate: (i) => i.f || (i.f = () => {
  3418. queueJob(i.update);
  3419. }),
  3420. $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),
  3421. $watch: (i) => instanceWatch.bind(i)
  3422. })
  3423. );
  3424. const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
  3425. const PublicInstanceProxyHandlers = {
  3426. get({ _: instance }, key) {
  3427. if (key === "__v_skip") {
  3428. return true;
  3429. }
  3430. const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
  3431. let normalizedProps;
  3432. if (key[0] !== "$") {
  3433. const n = accessCache[key];
  3434. if (n !== void 0) {
  3435. switch (n) {
  3436. case 1:
  3437. return setupState[key];
  3438. case 2:
  3439. return data[key];
  3440. case 4:
  3441. return ctx[key];
  3442. case 3:
  3443. return props[key];
  3444. }
  3445. } else if (hasSetupBinding(setupState, key)) {
  3446. accessCache[key] = 1;
  3447. return setupState[key];
  3448. } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
  3449. accessCache[key] = 2;
  3450. return data[key];
  3451. } else if (
  3452. // only cache other properties when instance has declared (thus stable)
  3453. // props
  3454. (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)
  3455. ) {
  3456. accessCache[key] = 3;
  3457. return props[key];
  3458. } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
  3459. accessCache[key] = 4;
  3460. return ctx[key];
  3461. } else if (shouldCacheAccess) {
  3462. accessCache[key] = 0;
  3463. }
  3464. }
  3465. const publicGetter = publicPropertiesMap[key];
  3466. let cssModule, globalProperties;
  3467. if (publicGetter) {
  3468. if (key === "$attrs") {
  3469. track(instance.attrs, "get", "");
  3470. }
  3471. return publicGetter(instance);
  3472. } else if (
  3473. // css module (injected by vue-loader)
  3474. (cssModule = type.__cssModules) && (cssModule = cssModule[key])
  3475. ) {
  3476. return cssModule;
  3477. } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
  3478. accessCache[key] = 4;
  3479. return ctx[key];
  3480. } else if (
  3481. // global properties
  3482. globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)
  3483. ) {
  3484. {
  3485. return globalProperties[key];
  3486. }
  3487. } else
  3488. ;
  3489. },
  3490. set({ _: instance }, key, value) {
  3491. const { data, setupState, ctx } = instance;
  3492. if (hasSetupBinding(setupState, key)) {
  3493. setupState[key] = value;
  3494. return true;
  3495. } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
  3496. data[key] = value;
  3497. return true;
  3498. } else if (hasOwn(instance.props, key)) {
  3499. return false;
  3500. }
  3501. if (key[0] === "$" && key.slice(1) in instance) {
  3502. return false;
  3503. } else {
  3504. {
  3505. ctx[key] = value;
  3506. }
  3507. }
  3508. return true;
  3509. },
  3510. has({
  3511. _: { data, setupState, accessCache, ctx, appContext, propsOptions }
  3512. }, key) {
  3513. let normalizedProps;
  3514. return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key);
  3515. },
  3516. defineProperty(target, key, descriptor) {
  3517. if (descriptor.get != null) {
  3518. target._.accessCache[key] = 0;
  3519. } else if (hasOwn(descriptor, "value")) {
  3520. this.set(target, key, descriptor.value, null);
  3521. }
  3522. return Reflect.defineProperty(target, key, descriptor);
  3523. }
  3524. };
  3525. function normalizePropsOrEmits(props) {
  3526. return isArray$1(props) ? props.reduce(
  3527. (normalized, p2) => (normalized[p2] = null, normalized),
  3528. {}
  3529. ) : props;
  3530. }
  3531. let shouldCacheAccess = true;
  3532. function applyOptions(instance) {
  3533. const options = resolveMergedOptions(instance);
  3534. const publicThis = instance.proxy;
  3535. const ctx = instance.ctx;
  3536. shouldCacheAccess = false;
  3537. if (options.beforeCreate) {
  3538. callHook$1(options.beforeCreate, instance, "bc");
  3539. }
  3540. const {
  3541. // state
  3542. data: dataOptions,
  3543. computed: computedOptions,
  3544. methods,
  3545. watch: watchOptions,
  3546. provide: provideOptions,
  3547. inject: injectOptions,
  3548. // lifecycle
  3549. created,
  3550. beforeMount,
  3551. mounted,
  3552. beforeUpdate,
  3553. updated,
  3554. activated,
  3555. deactivated,
  3556. beforeDestroy,
  3557. beforeUnmount,
  3558. destroyed,
  3559. unmounted,
  3560. render,
  3561. renderTracked,
  3562. renderTriggered,
  3563. errorCaptured,
  3564. serverPrefetch,
  3565. // public API
  3566. expose,
  3567. inheritAttrs,
  3568. // assets
  3569. components,
  3570. directives,
  3571. filters
  3572. } = options;
  3573. const checkDuplicateProperties = null;
  3574. if (injectOptions) {
  3575. resolveInjections(injectOptions, ctx, checkDuplicateProperties);
  3576. }
  3577. if (methods) {
  3578. for (const key in methods) {
  3579. const methodHandler = methods[key];
  3580. if (isFunction(methodHandler)) {
  3581. {
  3582. ctx[key] = methodHandler.bind(publicThis);
  3583. }
  3584. }
  3585. }
  3586. }
  3587. if (dataOptions) {
  3588. const data = dataOptions.call(publicThis, publicThis);
  3589. if (!isObject(data))
  3590. ;
  3591. else {
  3592. instance.data = reactive(data);
  3593. }
  3594. }
  3595. shouldCacheAccess = true;
  3596. if (computedOptions) {
  3597. for (const key in computedOptions) {
  3598. const opt = computedOptions[key];
  3599. const get2 = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
  3600. const set2 = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : NOOP;
  3601. const c = computed({
  3602. get: get2,
  3603. set: set2
  3604. });
  3605. Object.defineProperty(ctx, key, {
  3606. enumerable: true,
  3607. configurable: true,
  3608. get: () => c.value,
  3609. set: (v) => c.value = v
  3610. });
  3611. }
  3612. }
  3613. if (watchOptions) {
  3614. for (const key in watchOptions) {
  3615. createWatcher(watchOptions[key], ctx, publicThis, key);
  3616. }
  3617. }
  3618. if (provideOptions) {
  3619. const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions;
  3620. Reflect.ownKeys(provides).forEach((key) => {
  3621. provide(key, provides[key]);
  3622. });
  3623. }
  3624. if (created) {
  3625. callHook$1(created, instance, "c");
  3626. }
  3627. function registerLifecycleHook(register, hook) {
  3628. if (isArray$1(hook)) {
  3629. hook.forEach((_hook) => register(_hook.bind(publicThis)));
  3630. } else if (hook) {
  3631. register(hook.bind(publicThis));
  3632. }
  3633. }
  3634. registerLifecycleHook(onBeforeMount, beforeMount);
  3635. registerLifecycleHook(onMounted, mounted);
  3636. registerLifecycleHook(onBeforeUpdate, beforeUpdate);
  3637. registerLifecycleHook(onUpdated, updated);
  3638. registerLifecycleHook(onActivated, activated);
  3639. registerLifecycleHook(onDeactivated, deactivated);
  3640. registerLifecycleHook(onErrorCaptured, errorCaptured);
  3641. registerLifecycleHook(onRenderTracked, renderTracked);
  3642. registerLifecycleHook(onRenderTriggered, renderTriggered);
  3643. registerLifecycleHook(onBeforeUnmount, beforeUnmount);
  3644. registerLifecycleHook(onUnmounted, unmounted);
  3645. registerLifecycleHook(onServerPrefetch, serverPrefetch);
  3646. if (isArray$1(expose)) {
  3647. if (expose.length) {
  3648. const exposed = instance.exposed || (instance.exposed = {});
  3649. expose.forEach((key) => {
  3650. Object.defineProperty(exposed, key, {
  3651. get: () => publicThis[key],
  3652. set: (val) => publicThis[key] = val
  3653. });
  3654. });
  3655. } else if (!instance.exposed) {
  3656. instance.exposed = {};
  3657. }
  3658. }
  3659. if (render && instance.render === NOOP) {
  3660. instance.render = render;
  3661. }
  3662. if (inheritAttrs != null) {
  3663. instance.inheritAttrs = inheritAttrs;
  3664. }
  3665. if (components)
  3666. instance.components = components;
  3667. if (directives)
  3668. instance.directives = directives;
  3669. if (serverPrefetch) {
  3670. markAsyncBoundary(instance);
  3671. }
  3672. }
  3673. function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) {
  3674. if (isArray$1(injectOptions)) {
  3675. injectOptions = normalizeInject(injectOptions);
  3676. }
  3677. for (const key in injectOptions) {
  3678. const opt = injectOptions[key];
  3679. let injected;
  3680. if (isObject(opt)) {
  3681. if ("default" in opt) {
  3682. injected = inject(
  3683. opt.from || key,
  3684. opt.default,
  3685. true
  3686. );
  3687. } else {
  3688. injected = inject(opt.from || key);
  3689. }
  3690. } else {
  3691. injected = inject(opt);
  3692. }
  3693. if (isRef(injected)) {
  3694. Object.defineProperty(ctx, key, {
  3695. enumerable: true,
  3696. configurable: true,
  3697. get: () => injected.value,
  3698. set: (v) => injected.value = v
  3699. });
  3700. } else {
  3701. ctx[key] = injected;
  3702. }
  3703. }
  3704. }
  3705. function callHook$1(hook, instance, type) {
  3706. callWithAsyncErrorHandling(
  3707. isArray$1(hook) ? hook.map((h2) => h2.bind(instance.proxy)) : hook.bind(instance.proxy),
  3708. instance,
  3709. type
  3710. );
  3711. }
  3712. function createWatcher(raw, ctx, publicThis, key) {
  3713. let getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key];
  3714. if (isString(raw)) {
  3715. const handler = ctx[raw];
  3716. if (isFunction(handler)) {
  3717. {
  3718. watch(getter, handler);
  3719. }
  3720. }
  3721. } else if (isFunction(raw)) {
  3722. {
  3723. watch(getter, raw.bind(publicThis));
  3724. }
  3725. } else if (isObject(raw)) {
  3726. if (isArray$1(raw)) {
  3727. raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
  3728. } else {
  3729. const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
  3730. if (isFunction(handler)) {
  3731. watch(getter, handler, raw);
  3732. }
  3733. }
  3734. } else
  3735. ;
  3736. }
  3737. function resolveMergedOptions(instance) {
  3738. const base2 = instance.type;
  3739. const { mixins, extends: extendsOptions } = base2;
  3740. const {
  3741. mixins: globalMixins,
  3742. optionsCache: cache,
  3743. config: { optionMergeStrategies }
  3744. } = instance.appContext;
  3745. const cached = cache.get(base2);
  3746. let resolved;
  3747. if (cached) {
  3748. resolved = cached;
  3749. } else if (!globalMixins.length && !mixins && !extendsOptions) {
  3750. {
  3751. resolved = base2;
  3752. }
  3753. } else {
  3754. resolved = {};
  3755. if (globalMixins.length) {
  3756. globalMixins.forEach(
  3757. (m) => mergeOptions$1(resolved, m, optionMergeStrategies, true)
  3758. );
  3759. }
  3760. mergeOptions$1(resolved, base2, optionMergeStrategies);
  3761. }
  3762. if (isObject(base2)) {
  3763. cache.set(base2, resolved);
  3764. }
  3765. return resolved;
  3766. }
  3767. function mergeOptions$1(to, from, strats, asMixin = false) {
  3768. const { mixins, extends: extendsOptions } = from;
  3769. if (extendsOptions) {
  3770. mergeOptions$1(to, extendsOptions, strats, true);
  3771. }
  3772. if (mixins) {
  3773. mixins.forEach(
  3774. (m) => mergeOptions$1(to, m, strats, true)
  3775. );
  3776. }
  3777. for (const key in from) {
  3778. if (asMixin && key === "expose")
  3779. ;
  3780. else {
  3781. const strat = internalOptionMergeStrats[key] || strats && strats[key];
  3782. to[key] = strat ? strat(to[key], from[key]) : from[key];
  3783. }
  3784. }
  3785. return to;
  3786. }
  3787. const internalOptionMergeStrats = {
  3788. data: mergeDataFn,
  3789. props: mergeEmitsOrPropsOptions,
  3790. emits: mergeEmitsOrPropsOptions,
  3791. // objects
  3792. methods: mergeObjectOptions,
  3793. computed: mergeObjectOptions,
  3794. // lifecycle
  3795. beforeCreate: mergeAsArray,
  3796. created: mergeAsArray,
  3797. beforeMount: mergeAsArray,
  3798. mounted: mergeAsArray,
  3799. beforeUpdate: mergeAsArray,
  3800. updated: mergeAsArray,
  3801. beforeDestroy: mergeAsArray,
  3802. beforeUnmount: mergeAsArray,
  3803. destroyed: mergeAsArray,
  3804. unmounted: mergeAsArray,
  3805. activated: mergeAsArray,
  3806. deactivated: mergeAsArray,
  3807. errorCaptured: mergeAsArray,
  3808. serverPrefetch: mergeAsArray,
  3809. // assets
  3810. components: mergeObjectOptions,
  3811. directives: mergeObjectOptions,
  3812. // watch
  3813. watch: mergeWatchOptions,
  3814. // provide / inject
  3815. provide: mergeDataFn,
  3816. inject: mergeInject
  3817. };
  3818. function mergeDataFn(to, from) {
  3819. if (!from) {
  3820. return to;
  3821. }
  3822. if (!to) {
  3823. return from;
  3824. }
  3825. return function mergedDataFn() {
  3826. return extend(
  3827. isFunction(to) ? to.call(this, this) : to,
  3828. isFunction(from) ? from.call(this, this) : from
  3829. );
  3830. };
  3831. }
  3832. function mergeInject(to, from) {
  3833. return mergeObjectOptions(normalizeInject(to), normalizeInject(from));
  3834. }
  3835. function normalizeInject(raw) {
  3836. if (isArray$1(raw)) {
  3837. const res = {};
  3838. for (let i = 0; i < raw.length; i++) {
  3839. res[raw[i]] = raw[i];
  3840. }
  3841. return res;
  3842. }
  3843. return raw;
  3844. }
  3845. function mergeAsArray(to, from) {
  3846. return to ? [...new Set([].concat(to, from))] : from;
  3847. }
  3848. function mergeObjectOptions(to, from) {
  3849. return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from;
  3850. }
  3851. function mergeEmitsOrPropsOptions(to, from) {
  3852. if (to) {
  3853. if (isArray$1(to) && isArray$1(from)) {
  3854. return [.../* @__PURE__ */ new Set([...to, ...from])];
  3855. }
  3856. return extend(
  3857. /* @__PURE__ */ Object.create(null),
  3858. normalizePropsOrEmits(to),
  3859. normalizePropsOrEmits(from != null ? from : {})
  3860. );
  3861. } else {
  3862. return from;
  3863. }
  3864. }
  3865. function mergeWatchOptions(to, from) {
  3866. if (!to)
  3867. return from;
  3868. if (!from)
  3869. return to;
  3870. const merged = extend(/* @__PURE__ */ Object.create(null), to);
  3871. for (const key in from) {
  3872. merged[key] = mergeAsArray(to[key], from[key]);
  3873. }
  3874. return merged;
  3875. }
  3876. function createAppContext() {
  3877. return {
  3878. app: null,
  3879. config: {
  3880. isNativeTag: NO,
  3881. performance: false,
  3882. globalProperties: {},
  3883. optionMergeStrategies: {},
  3884. errorHandler: void 0,
  3885. warnHandler: void 0,
  3886. compilerOptions: {}
  3887. },
  3888. mixins: [],
  3889. components: {},
  3890. directives: {},
  3891. provides: /* @__PURE__ */ Object.create(null),
  3892. optionsCache: /* @__PURE__ */ new WeakMap(),
  3893. propsCache: /* @__PURE__ */ new WeakMap(),
  3894. emitsCache: /* @__PURE__ */ new WeakMap()
  3895. };
  3896. }
  3897. let uid$1 = 0;
  3898. function createAppAPI(render, hydrate) {
  3899. return function createApp2(rootComponent, rootProps = null) {
  3900. if (!isFunction(rootComponent)) {
  3901. rootComponent = extend({}, rootComponent);
  3902. }
  3903. if (rootProps != null && !isObject(rootProps)) {
  3904. rootProps = null;
  3905. }
  3906. const context = createAppContext();
  3907. const installedPlugins = /* @__PURE__ */ new WeakSet();
  3908. const pluginCleanupFns = [];
  3909. let isMounted = false;
  3910. const app2 = context.app = {
  3911. _uid: uid$1++,
  3912. _component: rootComponent,
  3913. _props: rootProps,
  3914. _container: null,
  3915. _context: context,
  3916. _instance: null,
  3917. version,
  3918. get config() {
  3919. return context.config;
  3920. },
  3921. set config(v) {
  3922. },
  3923. use(plugin, ...options) {
  3924. if (installedPlugins.has(plugin))
  3925. ;
  3926. else if (plugin && isFunction(plugin.install)) {
  3927. installedPlugins.add(plugin);
  3928. plugin.install(app2, ...options);
  3929. } else if (isFunction(plugin)) {
  3930. installedPlugins.add(plugin);
  3931. plugin(app2, ...options);
  3932. } else
  3933. ;
  3934. return app2;
  3935. },
  3936. mixin(mixin) {
  3937. {
  3938. if (!context.mixins.includes(mixin)) {
  3939. context.mixins.push(mixin);
  3940. }
  3941. }
  3942. return app2;
  3943. },
  3944. component(name, component) {
  3945. if (!component) {
  3946. return context.components[name];
  3947. }
  3948. context.components[name] = component;
  3949. return app2;
  3950. },
  3951. directive(name, directive) {
  3952. if (!directive) {
  3953. return context.directives[name];
  3954. }
  3955. context.directives[name] = directive;
  3956. return app2;
  3957. },
  3958. mount(rootContainer, isHydrate, namespace) {
  3959. if (!isMounted) {
  3960. const vnode = app2._ceVNode || createVNode(rootComponent, rootProps);
  3961. vnode.appContext = context;
  3962. if (namespace === true) {
  3963. namespace = "svg";
  3964. } else if (namespace === false) {
  3965. namespace = void 0;
  3966. }
  3967. if (isHydrate && hydrate) {
  3968. hydrate(vnode, rootContainer);
  3969. } else {
  3970. render(vnode, rootContainer, namespace);
  3971. }
  3972. isMounted = true;
  3973. app2._container = rootContainer;
  3974. rootContainer.__vue_app__ = app2;
  3975. return getComponentPublicInstance(vnode.component);
  3976. }
  3977. },
  3978. onUnmount(cleanupFn) {
  3979. pluginCleanupFns.push(cleanupFn);
  3980. },
  3981. unmount() {
  3982. if (isMounted) {
  3983. callWithAsyncErrorHandling(
  3984. pluginCleanupFns,
  3985. app2._instance,
  3986. 16
  3987. );
  3988. render(null, app2._container);
  3989. delete app2._container.__vue_app__;
  3990. }
  3991. },
  3992. provide(key, value) {
  3993. context.provides[key] = value;
  3994. return app2;
  3995. },
  3996. runWithContext(fn) {
  3997. const lastApp = currentApp;
  3998. currentApp = app2;
  3999. try {
  4000. return fn();
  4001. } finally {
  4002. currentApp = lastApp;
  4003. }
  4004. }
  4005. };
  4006. return app2;
  4007. };
  4008. }
  4009. let currentApp = null;
  4010. function provide(key, value) {
  4011. if (!currentInstance)
  4012. ;
  4013. else {
  4014. let provides = currentInstance.provides;
  4015. const parentProvides = currentInstance.parent && currentInstance.parent.provides;
  4016. if (parentProvides === provides) {
  4017. provides = currentInstance.provides = Object.create(parentProvides);
  4018. }
  4019. provides[key] = value;
  4020. }
  4021. }
  4022. function inject(key, defaultValue, treatDefaultAsFactory = false) {
  4023. const instance = currentInstance || currentRenderingInstance;
  4024. if (instance || currentApp) {
  4025. const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
  4026. if (provides && key in provides) {
  4027. return provides[key];
  4028. } else if (arguments.length > 1) {
  4029. return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
  4030. } else
  4031. ;
  4032. }
  4033. }
  4034. function hasInjectionContext() {
  4035. return !!(currentInstance || currentRenderingInstance || currentApp);
  4036. }
  4037. const internalObjectProto = {};
  4038. const createInternalObject = () => Object.create(internalObjectProto);
  4039. const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
  4040. function initProps(instance, rawProps, isStateful, isSSR = false) {
  4041. const props = {};
  4042. const attrs = createInternalObject();
  4043. instance.propsDefaults = /* @__PURE__ */ Object.create(null);
  4044. setFullProps(instance, rawProps, props, attrs);
  4045. for (const key in instance.propsOptions[0]) {
  4046. if (!(key in props)) {
  4047. props[key] = void 0;
  4048. }
  4049. }
  4050. if (isStateful) {
  4051. instance.props = isSSR ? props : shallowReactive(props);
  4052. } else {
  4053. if (!instance.type.props) {
  4054. instance.props = attrs;
  4055. } else {
  4056. instance.props = props;
  4057. }
  4058. }
  4059. instance.attrs = attrs;
  4060. }
  4061. function updateProps(instance, rawProps, rawPrevProps, optimized) {
  4062. const {
  4063. props,
  4064. attrs,
  4065. vnode: { patchFlag }
  4066. } = instance;
  4067. const rawCurrentProps = toRaw(props);
  4068. const [options] = instance.propsOptions;
  4069. let hasAttrsChanged = false;
  4070. if (
  4071. // always force full diff in dev
  4072. // - #1942 if hmr is enabled with sfc component
  4073. // - vite#872 non-sfc component used by sfc component
  4074. (optimized || patchFlag > 0) && !(patchFlag & 16)
  4075. ) {
  4076. if (patchFlag & 8) {
  4077. const propsToUpdate = instance.vnode.dynamicProps;
  4078. for (let i = 0; i < propsToUpdate.length; i++) {
  4079. let key = propsToUpdate[i];
  4080. if (isEmitListener(instance.emitsOptions, key)) {
  4081. continue;
  4082. }
  4083. const value = rawProps[key];
  4084. if (options) {
  4085. if (hasOwn(attrs, key)) {
  4086. if (value !== attrs[key]) {
  4087. attrs[key] = value;
  4088. hasAttrsChanged = true;
  4089. }
  4090. } else {
  4091. const camelizedKey = camelize(key);
  4092. props[camelizedKey] = resolvePropValue(
  4093. options,
  4094. rawCurrentProps,
  4095. camelizedKey,
  4096. value,
  4097. instance,
  4098. false
  4099. );
  4100. }
  4101. } else {
  4102. if (value !== attrs[key]) {
  4103. attrs[key] = value;
  4104. hasAttrsChanged = true;
  4105. }
  4106. }
  4107. }
  4108. }
  4109. } else {
  4110. if (setFullProps(instance, rawProps, props, attrs)) {
  4111. hasAttrsChanged = true;
  4112. }
  4113. let kebabKey;
  4114. for (const key in rawCurrentProps) {
  4115. if (!rawProps || // for camelCase
  4116. !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case
  4117. // and converted to camelCase (#955)
  4118. ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) {
  4119. if (options) {
  4120. if (rawPrevProps && // for camelCase
  4121. (rawPrevProps[key] !== void 0 || // for kebab-case
  4122. rawPrevProps[kebabKey] !== void 0)) {
  4123. props[key] = resolvePropValue(
  4124. options,
  4125. rawCurrentProps,
  4126. key,
  4127. void 0,
  4128. instance,
  4129. true
  4130. );
  4131. }
  4132. } else {
  4133. delete props[key];
  4134. }
  4135. }
  4136. }
  4137. if (attrs !== rawCurrentProps) {
  4138. for (const key in attrs) {
  4139. if (!rawProps || !hasOwn(rawProps, key) && true) {
  4140. delete attrs[key];
  4141. hasAttrsChanged = true;
  4142. }
  4143. }
  4144. }
  4145. }
  4146. if (hasAttrsChanged) {
  4147. trigger(instance.attrs, "set", "");
  4148. }
  4149. }
  4150. function setFullProps(instance, rawProps, props, attrs) {
  4151. const [options, needCastKeys] = instance.propsOptions;
  4152. let hasAttrsChanged = false;
  4153. let rawCastValues;
  4154. if (rawProps) {
  4155. for (let key in rawProps) {
  4156. if (isReservedProp(key)) {
  4157. continue;
  4158. }
  4159. const value = rawProps[key];
  4160. let camelKey;
  4161. if (options && hasOwn(options, camelKey = camelize(key))) {
  4162. if (!needCastKeys || !needCastKeys.includes(camelKey)) {
  4163. props[camelKey] = value;
  4164. } else {
  4165. (rawCastValues || (rawCastValues = {}))[camelKey] = value;
  4166. }
  4167. } else if (!isEmitListener(instance.emitsOptions, key)) {
  4168. if (!(key in attrs) || value !== attrs[key]) {
  4169. attrs[key] = value;
  4170. hasAttrsChanged = true;
  4171. }
  4172. }
  4173. }
  4174. }
  4175. if (needCastKeys) {
  4176. const rawCurrentProps = toRaw(props);
  4177. const castValues = rawCastValues || EMPTY_OBJ;
  4178. for (let i = 0; i < needCastKeys.length; i++) {
  4179. const key = needCastKeys[i];
  4180. props[key] = resolvePropValue(
  4181. options,
  4182. rawCurrentProps,
  4183. key,
  4184. castValues[key],
  4185. instance,
  4186. !hasOwn(castValues, key)
  4187. );
  4188. }
  4189. }
  4190. return hasAttrsChanged;
  4191. }
  4192. function resolvePropValue(options, props, key, value, instance, isAbsent) {
  4193. const opt = options[key];
  4194. if (opt != null) {
  4195. const hasDefault = hasOwn(opt, "default");
  4196. if (hasDefault && value === void 0) {
  4197. const defaultValue = opt.default;
  4198. if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) {
  4199. const { propsDefaults } = instance;
  4200. if (key in propsDefaults) {
  4201. value = propsDefaults[key];
  4202. } else {
  4203. const reset = setCurrentInstance(instance);
  4204. value = propsDefaults[key] = defaultValue.call(
  4205. null,
  4206. props
  4207. );
  4208. reset();
  4209. }
  4210. } else {
  4211. value = defaultValue;
  4212. }
  4213. if (instance.ce) {
  4214. instance.ce._setProp(key, value);
  4215. }
  4216. }
  4217. if (opt[
  4218. 0
  4219. /* shouldCast */
  4220. ]) {
  4221. if (isAbsent && !hasDefault) {
  4222. value = false;
  4223. } else if (opt[
  4224. 1
  4225. /* shouldCastTrue */
  4226. ] && (value === "" || value === hyphenate(key))) {
  4227. value = true;
  4228. }
  4229. }
  4230. }
  4231. return value;
  4232. }
  4233. const mixinPropsCache = /* @__PURE__ */ new WeakMap();
  4234. function normalizePropsOptions(comp, appContext, asMixin = false) {
  4235. const cache = asMixin ? mixinPropsCache : appContext.propsCache;
  4236. const cached = cache.get(comp);
  4237. if (cached) {
  4238. return cached;
  4239. }
  4240. const raw = comp.props;
  4241. const normalized = {};
  4242. const needCastKeys = [];
  4243. let hasExtends = false;
  4244. if (!isFunction(comp)) {
  4245. const extendProps = (raw2) => {
  4246. hasExtends = true;
  4247. const [props, keys] = normalizePropsOptions(raw2, appContext, true);
  4248. extend(normalized, props);
  4249. if (keys)
  4250. needCastKeys.push(...keys);
  4251. };
  4252. if (!asMixin && appContext.mixins.length) {
  4253. appContext.mixins.forEach(extendProps);
  4254. }
  4255. if (comp.extends) {
  4256. extendProps(comp.extends);
  4257. }
  4258. if (comp.mixins) {
  4259. comp.mixins.forEach(extendProps);
  4260. }
  4261. }
  4262. if (!raw && !hasExtends) {
  4263. if (isObject(comp)) {
  4264. cache.set(comp, EMPTY_ARR);
  4265. }
  4266. return EMPTY_ARR;
  4267. }
  4268. if (isArray$1(raw)) {
  4269. for (let i = 0; i < raw.length; i++) {
  4270. const normalizedKey = camelize(raw[i]);
  4271. if (validatePropName(normalizedKey)) {
  4272. normalized[normalizedKey] = EMPTY_OBJ;
  4273. }
  4274. }
  4275. } else if (raw) {
  4276. for (const key in raw) {
  4277. const normalizedKey = camelize(key);
  4278. if (validatePropName(normalizedKey)) {
  4279. const opt = raw[key];
  4280. const prop = normalized[normalizedKey] = isArray$1(opt) || isFunction(opt) ? { type: opt } : extend({}, opt);
  4281. const propType = prop.type;
  4282. let shouldCast = false;
  4283. let shouldCastTrue = true;
  4284. if (isArray$1(propType)) {
  4285. for (let index2 = 0; index2 < propType.length; ++index2) {
  4286. const type = propType[index2];
  4287. const typeName = isFunction(type) && type.name;
  4288. if (typeName === "Boolean") {
  4289. shouldCast = true;
  4290. break;
  4291. } else if (typeName === "String") {
  4292. shouldCastTrue = false;
  4293. }
  4294. }
  4295. } else {
  4296. shouldCast = isFunction(propType) && propType.name === "Boolean";
  4297. }
  4298. prop[
  4299. 0
  4300. /* shouldCast */
  4301. ] = shouldCast;
  4302. prop[
  4303. 1
  4304. /* shouldCastTrue */
  4305. ] = shouldCastTrue;
  4306. if (shouldCast || hasOwn(prop, "default")) {
  4307. needCastKeys.push(normalizedKey);
  4308. }
  4309. }
  4310. }
  4311. }
  4312. const res = [normalized, needCastKeys];
  4313. if (isObject(comp)) {
  4314. cache.set(comp, res);
  4315. }
  4316. return res;
  4317. }
  4318. function validatePropName(key) {
  4319. if (key[0] !== "$" && !isReservedProp(key)) {
  4320. return true;
  4321. }
  4322. return false;
  4323. }
  4324. const isInternalKey = (key) => key[0] === "_" || key === "$stable";
  4325. const normalizeSlotValue = (value) => isArray$1(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
  4326. const normalizeSlot$1 = (key, rawSlot, ctx) => {
  4327. if (rawSlot._n) {
  4328. return rawSlot;
  4329. }
  4330. const normalized = withCtx((...args) => {
  4331. if (false)
  4332. ;
  4333. return normalizeSlotValue(rawSlot(...args));
  4334. }, ctx);
  4335. normalized._c = false;
  4336. return normalized;
  4337. };
  4338. const normalizeObjectSlots = (rawSlots, slots, instance) => {
  4339. const ctx = rawSlots._ctx;
  4340. for (const key in rawSlots) {
  4341. if (isInternalKey(key))
  4342. continue;
  4343. const value = rawSlots[key];
  4344. if (isFunction(value)) {
  4345. slots[key] = normalizeSlot$1(key, value, ctx);
  4346. } else if (value != null) {
  4347. const normalized = normalizeSlotValue(value);
  4348. slots[key] = () => normalized;
  4349. }
  4350. }
  4351. };
  4352. const normalizeVNodeSlots = (instance, children) => {
  4353. const normalized = normalizeSlotValue(children);
  4354. instance.slots.default = () => normalized;
  4355. };
  4356. const assignSlots = (slots, children, optimized) => {
  4357. for (const key in children) {
  4358. if (optimized || key !== "_") {
  4359. slots[key] = children[key];
  4360. }
  4361. }
  4362. };
  4363. const initSlots = (instance, children, optimized) => {
  4364. const slots = instance.slots = createInternalObject();
  4365. if (instance.vnode.shapeFlag & 32) {
  4366. const type = children._;
  4367. if (type) {
  4368. assignSlots(slots, children, optimized);
  4369. if (optimized) {
  4370. def(slots, "_", type, true);
  4371. }
  4372. } else {
  4373. normalizeObjectSlots(children, slots);
  4374. }
  4375. } else if (children) {
  4376. normalizeVNodeSlots(instance, children);
  4377. }
  4378. };
  4379. const updateSlots = (instance, children, optimized) => {
  4380. const { vnode, slots } = instance;
  4381. let needDeletionCheck = true;
  4382. let deletionComparisonTarget = EMPTY_OBJ;
  4383. if (vnode.shapeFlag & 32) {
  4384. const type = children._;
  4385. if (type) {
  4386. if (optimized && type === 1) {
  4387. needDeletionCheck = false;
  4388. } else {
  4389. assignSlots(slots, children, optimized);
  4390. }
  4391. } else {
  4392. needDeletionCheck = !children.$stable;
  4393. normalizeObjectSlots(children, slots);
  4394. }
  4395. deletionComparisonTarget = children;
  4396. } else if (children) {
  4397. normalizeVNodeSlots(instance, children);
  4398. deletionComparisonTarget = { default: 1 };
  4399. }
  4400. if (needDeletionCheck) {
  4401. for (const key in slots) {
  4402. if (!isInternalKey(key) && deletionComparisonTarget[key] == null) {
  4403. delete slots[key];
  4404. }
  4405. }
  4406. }
  4407. };
  4408. const queuePostRenderEffect = queueEffectWithSuspense;
  4409. function createRenderer(options) {
  4410. return baseCreateRenderer(options);
  4411. }
  4412. function baseCreateRenderer(options, createHydrationFns) {
  4413. const target = getGlobalThis();
  4414. target.__VUE__ = true;
  4415. const {
  4416. insert: hostInsert,
  4417. remove: hostRemove,
  4418. patchProp: hostPatchProp,
  4419. createElement: hostCreateElement,
  4420. createText: hostCreateText,
  4421. createComment: hostCreateComment,
  4422. setText: hostSetText,
  4423. setElementText: hostSetElementText,
  4424. parentNode: hostParentNode,
  4425. nextSibling: hostNextSibling,
  4426. setScopeId: hostSetScopeId = NOOP,
  4427. insertStaticContent: hostInsertStaticContent
  4428. } = options;
  4429. const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = !!n2.dynamicChildren) => {
  4430. if (n1 === n2) {
  4431. return;
  4432. }
  4433. if (n1 && !isSameVNodeType(n1, n2)) {
  4434. anchor = getNextHostNode(n1);
  4435. unmount(n1, parentComponent, parentSuspense, true);
  4436. n1 = null;
  4437. }
  4438. if (n2.patchFlag === -2) {
  4439. optimized = false;
  4440. n2.dynamicChildren = null;
  4441. }
  4442. const { type, ref: ref2, shapeFlag } = n2;
  4443. switch (type) {
  4444. case Text:
  4445. processText(n1, n2, container, anchor);
  4446. break;
  4447. case Comment:
  4448. processCommentNode(n1, n2, container, anchor);
  4449. break;
  4450. case Static:
  4451. if (n1 == null) {
  4452. mountStaticNode(n2, container, anchor, namespace);
  4453. }
  4454. break;
  4455. case Fragment:
  4456. processFragment(
  4457. n1,
  4458. n2,
  4459. container,
  4460. anchor,
  4461. parentComponent,
  4462. parentSuspense,
  4463. namespace,
  4464. slotScopeIds,
  4465. optimized
  4466. );
  4467. break;
  4468. default:
  4469. if (shapeFlag & 1) {
  4470. processElement(
  4471. n1,
  4472. n2,
  4473. container,
  4474. anchor,
  4475. parentComponent,
  4476. parentSuspense,
  4477. namespace,
  4478. slotScopeIds,
  4479. optimized
  4480. );
  4481. } else if (shapeFlag & 6) {
  4482. processComponent(
  4483. n1,
  4484. n2,
  4485. container,
  4486. anchor,
  4487. parentComponent,
  4488. parentSuspense,
  4489. namespace,
  4490. slotScopeIds,
  4491. optimized
  4492. );
  4493. } else if (shapeFlag & 64) {
  4494. type.process(
  4495. n1,
  4496. n2,
  4497. container,
  4498. anchor,
  4499. parentComponent,
  4500. parentSuspense,
  4501. namespace,
  4502. slotScopeIds,
  4503. optimized,
  4504. internals
  4505. );
  4506. } else if (shapeFlag & 128) {
  4507. type.process(
  4508. n1,
  4509. n2,
  4510. container,
  4511. anchor,
  4512. parentComponent,
  4513. parentSuspense,
  4514. namespace,
  4515. slotScopeIds,
  4516. optimized,
  4517. internals
  4518. );
  4519. } else
  4520. ;
  4521. }
  4522. if (ref2 != null && parentComponent) {
  4523. setRef(ref2, n1 && n1.ref, parentSuspense, n2 || n1, !n2);
  4524. }
  4525. };
  4526. const processText = (n1, n2, container, anchor) => {
  4527. if (n1 == null) {
  4528. hostInsert(
  4529. n2.el = hostCreateText(n2.children),
  4530. container,
  4531. anchor
  4532. );
  4533. } else {
  4534. const el = n2.el = n1.el;
  4535. if (n2.children !== n1.children) {
  4536. hostSetText(el, n2.children);
  4537. }
  4538. }
  4539. };
  4540. const processCommentNode = (n1, n2, container, anchor) => {
  4541. if (n1 == null) {
  4542. hostInsert(
  4543. n2.el = hostCreateComment(n2.children || ""),
  4544. container,
  4545. anchor
  4546. );
  4547. } else {
  4548. n2.el = n1.el;
  4549. }
  4550. };
  4551. const mountStaticNode = (n2, container, anchor, namespace) => {
  4552. [n2.el, n2.anchor] = hostInsertStaticContent(
  4553. n2.children,
  4554. container,
  4555. anchor,
  4556. namespace,
  4557. n2.el,
  4558. n2.anchor
  4559. );
  4560. };
  4561. const moveStaticNode = ({ el, anchor }, container, nextSibling) => {
  4562. let next;
  4563. while (el && el !== anchor) {
  4564. next = hostNextSibling(el);
  4565. hostInsert(el, container, nextSibling);
  4566. el = next;
  4567. }
  4568. hostInsert(anchor, container, nextSibling);
  4569. };
  4570. const removeStaticNode = ({ el, anchor }) => {
  4571. let next;
  4572. while (el && el !== anchor) {
  4573. next = hostNextSibling(el);
  4574. hostRemove(el);
  4575. el = next;
  4576. }
  4577. hostRemove(anchor);
  4578. };
  4579. const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  4580. if (n2.type === "svg") {
  4581. namespace = "svg";
  4582. } else if (n2.type === "math") {
  4583. namespace = "mathml";
  4584. }
  4585. if (n1 == null) {
  4586. mountElement(
  4587. n2,
  4588. container,
  4589. anchor,
  4590. parentComponent,
  4591. parentSuspense,
  4592. namespace,
  4593. slotScopeIds,
  4594. optimized
  4595. );
  4596. } else {
  4597. patchElement(
  4598. n1,
  4599. n2,
  4600. parentComponent,
  4601. parentSuspense,
  4602. namespace,
  4603. slotScopeIds,
  4604. optimized
  4605. );
  4606. }
  4607. };
  4608. const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  4609. let el;
  4610. let vnodeHook;
  4611. const { props, shapeFlag, transition, dirs } = vnode;
  4612. el = vnode.el = hostCreateElement(
  4613. vnode.type,
  4614. namespace,
  4615. props && props.is,
  4616. props
  4617. );
  4618. if (shapeFlag & 8) {
  4619. hostSetElementText(el, vnode.children);
  4620. } else if (shapeFlag & 16) {
  4621. mountChildren(
  4622. vnode.children,
  4623. el,
  4624. null,
  4625. parentComponent,
  4626. parentSuspense,
  4627. resolveChildrenNamespace(vnode, namespace),
  4628. slotScopeIds,
  4629. optimized
  4630. );
  4631. }
  4632. if (dirs) {
  4633. invokeDirectiveHook(vnode, null, parentComponent, "created");
  4634. }
  4635. setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);
  4636. if (props) {
  4637. for (const key in props) {
  4638. if (key !== "value" && !isReservedProp(key)) {
  4639. hostPatchProp(el, key, null, props[key], namespace, parentComponent);
  4640. }
  4641. }
  4642. if ("value" in props) {
  4643. hostPatchProp(el, "value", null, props.value, namespace);
  4644. }
  4645. if (vnodeHook = props.onVnodeBeforeMount) {
  4646. invokeVNodeHook(vnodeHook, parentComponent, vnode);
  4647. }
  4648. }
  4649. if (dirs) {
  4650. invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
  4651. }
  4652. const needCallTransitionHooks = needTransition(parentSuspense, transition);
  4653. if (needCallTransitionHooks) {
  4654. transition.beforeEnter(el);
  4655. }
  4656. hostInsert(el, container, anchor);
  4657. if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
  4658. queuePostRenderEffect(() => {
  4659. vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
  4660. needCallTransitionHooks && transition.enter(el);
  4661. dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
  4662. }, parentSuspense);
  4663. }
  4664. };
  4665. const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => {
  4666. if (scopeId) {
  4667. hostSetScopeId(el, scopeId);
  4668. }
  4669. if (slotScopeIds) {
  4670. for (let i = 0; i < slotScopeIds.length; i++) {
  4671. hostSetScopeId(el, slotScopeIds[i]);
  4672. }
  4673. }
  4674. if (parentComponent) {
  4675. let subTree = parentComponent.subTree;
  4676. if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) {
  4677. const parentVNode = parentComponent.vnode;
  4678. setScopeId(
  4679. el,
  4680. parentVNode,
  4681. parentVNode.scopeId,
  4682. parentVNode.slotScopeIds,
  4683. parentComponent.parent
  4684. );
  4685. }
  4686. }
  4687. };
  4688. const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
  4689. for (let i = start; i < children.length; i++) {
  4690. const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);
  4691. patch(
  4692. null,
  4693. child,
  4694. container,
  4695. anchor,
  4696. parentComponent,
  4697. parentSuspense,
  4698. namespace,
  4699. slotScopeIds,
  4700. optimized
  4701. );
  4702. }
  4703. };
  4704. const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  4705. const el = n2.el = n1.el;
  4706. let { patchFlag, dynamicChildren, dirs } = n2;
  4707. patchFlag |= n1.patchFlag & 16;
  4708. const oldProps = n1.props || EMPTY_OBJ;
  4709. const newProps = n2.props || EMPTY_OBJ;
  4710. let vnodeHook;
  4711. parentComponent && toggleRecurse(parentComponent, false);
  4712. if (vnodeHook = newProps.onVnodeBeforeUpdate) {
  4713. invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
  4714. }
  4715. if (dirs) {
  4716. invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
  4717. }
  4718. parentComponent && toggleRecurse(parentComponent, true);
  4719. if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) {
  4720. hostSetElementText(el, "");
  4721. }
  4722. if (dynamicChildren) {
  4723. patchBlockChildren(
  4724. n1.dynamicChildren,
  4725. dynamicChildren,
  4726. el,
  4727. parentComponent,
  4728. parentSuspense,
  4729. resolveChildrenNamespace(n2, namespace),
  4730. slotScopeIds
  4731. );
  4732. } else if (!optimized) {
  4733. patchChildren(
  4734. n1,
  4735. n2,
  4736. el,
  4737. null,
  4738. parentComponent,
  4739. parentSuspense,
  4740. resolveChildrenNamespace(n2, namespace),
  4741. slotScopeIds,
  4742. false
  4743. );
  4744. }
  4745. if (patchFlag > 0) {
  4746. if (patchFlag & 16) {
  4747. patchProps(el, oldProps, newProps, parentComponent, namespace);
  4748. } else {
  4749. if (patchFlag & 2) {
  4750. if (oldProps.class !== newProps.class) {
  4751. hostPatchProp(el, "class", null, newProps.class, namespace);
  4752. }
  4753. }
  4754. if (patchFlag & 4) {
  4755. hostPatchProp(el, "style", oldProps.style, newProps.style, namespace);
  4756. }
  4757. if (patchFlag & 8) {
  4758. const propsToUpdate = n2.dynamicProps;
  4759. for (let i = 0; i < propsToUpdate.length; i++) {
  4760. const key = propsToUpdate[i];
  4761. const prev = oldProps[key];
  4762. const next = newProps[key];
  4763. if (next !== prev || key === "value") {
  4764. hostPatchProp(el, key, prev, next, namespace, parentComponent);
  4765. }
  4766. }
  4767. }
  4768. }
  4769. if (patchFlag & 1) {
  4770. if (n1.children !== n2.children) {
  4771. hostSetElementText(el, n2.children);
  4772. }
  4773. }
  4774. } else if (!optimized && dynamicChildren == null) {
  4775. patchProps(el, oldProps, newProps, parentComponent, namespace);
  4776. }
  4777. if ((vnodeHook = newProps.onVnodeUpdated) || dirs) {
  4778. queuePostRenderEffect(() => {
  4779. vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
  4780. dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
  4781. }, parentSuspense);
  4782. }
  4783. };
  4784. const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => {
  4785. for (let i = 0; i < newChildren.length; i++) {
  4786. const oldVNode = oldChildren[i];
  4787. const newVNode = newChildren[i];
  4788. const container = (
  4789. // oldVNode may be an errored async setup() component inside Suspense
  4790. // which will not have a mounted element
  4791. oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent
  4792. // of the Fragment itself so it can move its children.
  4793. (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
  4794. // which also requires the correct parent container
  4795. !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
  4796. oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : (
  4797. // In other cases, the parent container is not actually used so we
  4798. // just pass the block element here to avoid a DOM parentNode call.
  4799. fallbackContainer
  4800. )
  4801. );
  4802. patch(
  4803. oldVNode,
  4804. newVNode,
  4805. container,
  4806. null,
  4807. parentComponent,
  4808. parentSuspense,
  4809. namespace,
  4810. slotScopeIds,
  4811. true
  4812. );
  4813. }
  4814. };
  4815. const patchProps = (el, oldProps, newProps, parentComponent, namespace) => {
  4816. if (oldProps !== newProps) {
  4817. if (oldProps !== EMPTY_OBJ) {
  4818. for (const key in oldProps) {
  4819. if (!isReservedProp(key) && !(key in newProps)) {
  4820. hostPatchProp(
  4821. el,
  4822. key,
  4823. oldProps[key],
  4824. null,
  4825. namespace,
  4826. parentComponent
  4827. );
  4828. }
  4829. }
  4830. }
  4831. for (const key in newProps) {
  4832. if (isReservedProp(key))
  4833. continue;
  4834. const next = newProps[key];
  4835. const prev = oldProps[key];
  4836. if (next !== prev && key !== "value") {
  4837. hostPatchProp(el, key, prev, next, namespace, parentComponent);
  4838. }
  4839. }
  4840. if ("value" in newProps) {
  4841. hostPatchProp(el, "value", oldProps.value, newProps.value, namespace);
  4842. }
  4843. }
  4844. };
  4845. const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  4846. const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText("");
  4847. const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText("");
  4848. let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2;
  4849. if (fragmentSlotScopeIds) {
  4850. slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
  4851. }
  4852. if (n1 == null) {
  4853. hostInsert(fragmentStartAnchor, container, anchor);
  4854. hostInsert(fragmentEndAnchor, container, anchor);
  4855. mountChildren(
  4856. // #10007
  4857. // such fragment like `<></>` will be compiled into
  4858. // a fragment which doesn't have a children.
  4859. // In this case fallback to an empty array
  4860. n2.children || [],
  4861. container,
  4862. fragmentEndAnchor,
  4863. parentComponent,
  4864. parentSuspense,
  4865. namespace,
  4866. slotScopeIds,
  4867. optimized
  4868. );
  4869. } else {
  4870. if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result
  4871. // of renderSlot() with no valid children
  4872. n1.dynamicChildren) {
  4873. patchBlockChildren(
  4874. n1.dynamicChildren,
  4875. dynamicChildren,
  4876. container,
  4877. parentComponent,
  4878. parentSuspense,
  4879. namespace,
  4880. slotScopeIds
  4881. );
  4882. if (
  4883. // #2080 if the stable fragment has a key, it's a <template v-for> that may
  4884. // get moved around. Make sure all root level vnodes inherit el.
  4885. // #2134 or if it's a component root, it may also get moved around
  4886. // as the component is being moved.
  4887. n2.key != null || parentComponent && n2 === parentComponent.subTree
  4888. ) {
  4889. traverseStaticChildren(
  4890. n1,
  4891. n2,
  4892. true
  4893. /* shallow */
  4894. );
  4895. }
  4896. } else {
  4897. patchChildren(
  4898. n1,
  4899. n2,
  4900. container,
  4901. fragmentEndAnchor,
  4902. parentComponent,
  4903. parentSuspense,
  4904. namespace,
  4905. slotScopeIds,
  4906. optimized
  4907. );
  4908. }
  4909. }
  4910. };
  4911. const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  4912. n2.slotScopeIds = slotScopeIds;
  4913. if (n1 == null) {
  4914. if (n2.shapeFlag & 512) {
  4915. parentComponent.ctx.activate(
  4916. n2,
  4917. container,
  4918. anchor,
  4919. namespace,
  4920. optimized
  4921. );
  4922. } else {
  4923. mountComponent(
  4924. n2,
  4925. container,
  4926. anchor,
  4927. parentComponent,
  4928. parentSuspense,
  4929. namespace,
  4930. optimized
  4931. );
  4932. }
  4933. } else {
  4934. updateComponent(n1, n2, optimized);
  4935. }
  4936. };
  4937. const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {
  4938. const instance = initialVNode.component = createComponentInstance(
  4939. initialVNode,
  4940. parentComponent,
  4941. parentSuspense
  4942. );
  4943. if (isKeepAlive(initialVNode)) {
  4944. instance.ctx.renderer = internals;
  4945. }
  4946. {
  4947. setupComponent(instance, false, optimized);
  4948. }
  4949. if (instance.asyncDep) {
  4950. parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
  4951. if (!initialVNode.el) {
  4952. const placeholder = instance.subTree = createVNode(Comment);
  4953. processCommentNode(null, placeholder, container, anchor);
  4954. }
  4955. } else {
  4956. setupRenderEffect(
  4957. instance,
  4958. initialVNode,
  4959. container,
  4960. anchor,
  4961. parentSuspense,
  4962. namespace,
  4963. optimized
  4964. );
  4965. }
  4966. };
  4967. const updateComponent = (n1, n2, optimized) => {
  4968. const instance = n2.component = n1.component;
  4969. if (shouldUpdateComponent(n1, n2, optimized)) {
  4970. if (instance.asyncDep && !instance.asyncResolved) {
  4971. updateComponentPreRender(instance, n2, optimized);
  4972. return;
  4973. } else {
  4974. instance.next = n2;
  4975. instance.update();
  4976. }
  4977. } else {
  4978. n2.el = n1.el;
  4979. instance.vnode = n2;
  4980. }
  4981. };
  4982. const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => {
  4983. const componentUpdateFn = () => {
  4984. if (!instance.isMounted) {
  4985. let vnodeHook;
  4986. const { el, props } = initialVNode;
  4987. const { bm, m, parent, root, type } = instance;
  4988. const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
  4989. toggleRecurse(instance, false);
  4990. if (bm) {
  4991. invokeArrayFns(bm);
  4992. }
  4993. if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) {
  4994. invokeVNodeHook(vnodeHook, parent, initialVNode);
  4995. }
  4996. toggleRecurse(instance, true);
  4997. if (el && hydrateNode) {
  4998. const hydrateSubTree = () => {
  4999. instance.subTree = renderComponentRoot(instance);
  5000. hydrateNode(
  5001. el,
  5002. instance.subTree,
  5003. instance,
  5004. parentSuspense,
  5005. null
  5006. );
  5007. };
  5008. if (isAsyncWrapperVNode && type.__asyncHydrate) {
  5009. type.__asyncHydrate(
  5010. el,
  5011. instance,
  5012. hydrateSubTree
  5013. );
  5014. } else {
  5015. hydrateSubTree();
  5016. }
  5017. } else {
  5018. if (root.ce) {
  5019. root.ce._injectChildStyle(type);
  5020. }
  5021. const subTree = instance.subTree = renderComponentRoot(instance);
  5022. patch(
  5023. null,
  5024. subTree,
  5025. container,
  5026. anchor,
  5027. instance,
  5028. parentSuspense,
  5029. namespace
  5030. );
  5031. initialVNode.el = subTree.el;
  5032. }
  5033. if (m) {
  5034. queuePostRenderEffect(m, parentSuspense);
  5035. }
  5036. if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) {
  5037. const scopedInitialVNode = initialVNode;
  5038. queuePostRenderEffect(
  5039. () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode),
  5040. parentSuspense
  5041. );
  5042. }
  5043. if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) {
  5044. instance.a && queuePostRenderEffect(instance.a, parentSuspense);
  5045. }
  5046. instance.isMounted = true;
  5047. initialVNode = container = anchor = null;
  5048. } else {
  5049. let { next, bu, u, parent, vnode } = instance;
  5050. {
  5051. const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance);
  5052. if (nonHydratedAsyncRoot) {
  5053. if (next) {
  5054. next.el = vnode.el;
  5055. updateComponentPreRender(instance, next, optimized);
  5056. }
  5057. nonHydratedAsyncRoot.asyncDep.then(() => {
  5058. if (!instance.isUnmounted) {
  5059. componentUpdateFn();
  5060. }
  5061. });
  5062. return;
  5063. }
  5064. }
  5065. let originNext = next;
  5066. let vnodeHook;
  5067. toggleRecurse(instance, false);
  5068. if (next) {
  5069. next.el = vnode.el;
  5070. updateComponentPreRender(instance, next, optimized);
  5071. } else {
  5072. next = vnode;
  5073. }
  5074. if (bu) {
  5075. invokeArrayFns(bu);
  5076. }
  5077. if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) {
  5078. invokeVNodeHook(vnodeHook, parent, next, vnode);
  5079. }
  5080. toggleRecurse(instance, true);
  5081. const nextTree = renderComponentRoot(instance);
  5082. const prevTree = instance.subTree;
  5083. instance.subTree = nextTree;
  5084. patch(
  5085. prevTree,
  5086. nextTree,
  5087. // parent may have changed if it's in a teleport
  5088. hostParentNode(prevTree.el),
  5089. // anchor may have changed if it's in a fragment
  5090. getNextHostNode(prevTree),
  5091. instance,
  5092. parentSuspense,
  5093. namespace
  5094. );
  5095. next.el = nextTree.el;
  5096. if (originNext === null) {
  5097. updateHOCHostEl(instance, nextTree.el);
  5098. }
  5099. if (u) {
  5100. queuePostRenderEffect(u, parentSuspense);
  5101. }
  5102. if (vnodeHook = next.props && next.props.onVnodeUpdated) {
  5103. queuePostRenderEffect(
  5104. () => invokeVNodeHook(vnodeHook, parent, next, vnode),
  5105. parentSuspense
  5106. );
  5107. }
  5108. }
  5109. };
  5110. instance.scope.on();
  5111. const effect = instance.effect = new ReactiveEffect(componentUpdateFn);
  5112. instance.scope.off();
  5113. const update = instance.update = effect.run.bind(effect);
  5114. const job = instance.job = effect.runIfDirty.bind(effect);
  5115. job.i = instance;
  5116. job.id = instance.uid;
  5117. effect.scheduler = () => queueJob(job);
  5118. toggleRecurse(instance, true);
  5119. update();
  5120. };
  5121. const updateComponentPreRender = (instance, nextVNode, optimized) => {
  5122. nextVNode.component = instance;
  5123. const prevProps = instance.vnode.props;
  5124. instance.vnode = nextVNode;
  5125. instance.next = null;
  5126. updateProps(instance, nextVNode.props, prevProps, optimized);
  5127. updateSlots(instance, nextVNode.children, optimized);
  5128. pauseTracking();
  5129. flushPreFlushCbs(instance);
  5130. resetTracking();
  5131. };
  5132. const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => {
  5133. const c1 = n1 && n1.children;
  5134. const prevShapeFlag = n1 ? n1.shapeFlag : 0;
  5135. const c2 = n2.children;
  5136. const { patchFlag, shapeFlag } = n2;
  5137. if (patchFlag > 0) {
  5138. if (patchFlag & 128) {
  5139. patchKeyedChildren(
  5140. c1,
  5141. c2,
  5142. container,
  5143. anchor,
  5144. parentComponent,
  5145. parentSuspense,
  5146. namespace,
  5147. slotScopeIds,
  5148. optimized
  5149. );
  5150. return;
  5151. } else if (patchFlag & 256) {
  5152. patchUnkeyedChildren(
  5153. c1,
  5154. c2,
  5155. container,
  5156. anchor,
  5157. parentComponent,
  5158. parentSuspense,
  5159. namespace,
  5160. slotScopeIds,
  5161. optimized
  5162. );
  5163. return;
  5164. }
  5165. }
  5166. if (shapeFlag & 8) {
  5167. if (prevShapeFlag & 16) {
  5168. unmountChildren(c1, parentComponent, parentSuspense);
  5169. }
  5170. if (c2 !== c1) {
  5171. hostSetElementText(container, c2);
  5172. }
  5173. } else {
  5174. if (prevShapeFlag & 16) {
  5175. if (shapeFlag & 16) {
  5176. patchKeyedChildren(
  5177. c1,
  5178. c2,
  5179. container,
  5180. anchor,
  5181. parentComponent,
  5182. parentSuspense,
  5183. namespace,
  5184. slotScopeIds,
  5185. optimized
  5186. );
  5187. } else {
  5188. unmountChildren(c1, parentComponent, parentSuspense, true);
  5189. }
  5190. } else {
  5191. if (prevShapeFlag & 8) {
  5192. hostSetElementText(container, "");
  5193. }
  5194. if (shapeFlag & 16) {
  5195. mountChildren(
  5196. c2,
  5197. container,
  5198. anchor,
  5199. parentComponent,
  5200. parentSuspense,
  5201. namespace,
  5202. slotScopeIds,
  5203. optimized
  5204. );
  5205. }
  5206. }
  5207. }
  5208. };
  5209. const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  5210. c1 = c1 || EMPTY_ARR;
  5211. c2 = c2 || EMPTY_ARR;
  5212. const oldLength = c1.length;
  5213. const newLength = c2.length;
  5214. const commonLength = Math.min(oldLength, newLength);
  5215. let i;
  5216. for (i = 0; i < commonLength; i++) {
  5217. const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
  5218. patch(
  5219. c1[i],
  5220. nextChild,
  5221. container,
  5222. null,
  5223. parentComponent,
  5224. parentSuspense,
  5225. namespace,
  5226. slotScopeIds,
  5227. optimized
  5228. );
  5229. }
  5230. if (oldLength > newLength) {
  5231. unmountChildren(
  5232. c1,
  5233. parentComponent,
  5234. parentSuspense,
  5235. true,
  5236. false,
  5237. commonLength
  5238. );
  5239. } else {
  5240. mountChildren(
  5241. c2,
  5242. container,
  5243. anchor,
  5244. parentComponent,
  5245. parentSuspense,
  5246. namespace,
  5247. slotScopeIds,
  5248. optimized,
  5249. commonLength
  5250. );
  5251. }
  5252. };
  5253. const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  5254. let i = 0;
  5255. const l2 = c2.length;
  5256. let e1 = c1.length - 1;
  5257. let e2 = l2 - 1;
  5258. while (i <= e1 && i <= e2) {
  5259. const n1 = c1[i];
  5260. const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
  5261. if (isSameVNodeType(n1, n2)) {
  5262. patch(
  5263. n1,
  5264. n2,
  5265. container,
  5266. null,
  5267. parentComponent,
  5268. parentSuspense,
  5269. namespace,
  5270. slotScopeIds,
  5271. optimized
  5272. );
  5273. } else {
  5274. break;
  5275. }
  5276. i++;
  5277. }
  5278. while (i <= e1 && i <= e2) {
  5279. const n1 = c1[e1];
  5280. const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]);
  5281. if (isSameVNodeType(n1, n2)) {
  5282. patch(
  5283. n1,
  5284. n2,
  5285. container,
  5286. null,
  5287. parentComponent,
  5288. parentSuspense,
  5289. namespace,
  5290. slotScopeIds,
  5291. optimized
  5292. );
  5293. } else {
  5294. break;
  5295. }
  5296. e1--;
  5297. e2--;
  5298. }
  5299. if (i > e1) {
  5300. if (i <= e2) {
  5301. const nextPos = e2 + 1;
  5302. const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor;
  5303. while (i <= e2) {
  5304. patch(
  5305. null,
  5306. c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]),
  5307. container,
  5308. anchor,
  5309. parentComponent,
  5310. parentSuspense,
  5311. namespace,
  5312. slotScopeIds,
  5313. optimized
  5314. );
  5315. i++;
  5316. }
  5317. }
  5318. } else if (i > e2) {
  5319. while (i <= e1) {
  5320. unmount(c1[i], parentComponent, parentSuspense, true);
  5321. i++;
  5322. }
  5323. } else {
  5324. const s1 = i;
  5325. const s2 = i;
  5326. const keyToNewIndexMap = /* @__PURE__ */ new Map();
  5327. for (i = s2; i <= e2; i++) {
  5328. const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
  5329. if (nextChild.key != null) {
  5330. keyToNewIndexMap.set(nextChild.key, i);
  5331. }
  5332. }
  5333. let j;
  5334. let patched = 0;
  5335. const toBePatched = e2 - s2 + 1;
  5336. let moved = false;
  5337. let maxNewIndexSoFar = 0;
  5338. const newIndexToOldIndexMap = new Array(toBePatched);
  5339. for (i = 0; i < toBePatched; i++)
  5340. newIndexToOldIndexMap[i] = 0;
  5341. for (i = s1; i <= e1; i++) {
  5342. const prevChild = c1[i];
  5343. if (patched >= toBePatched) {
  5344. unmount(prevChild, parentComponent, parentSuspense, true);
  5345. continue;
  5346. }
  5347. let newIndex;
  5348. if (prevChild.key != null) {
  5349. newIndex = keyToNewIndexMap.get(prevChild.key);
  5350. } else {
  5351. for (j = s2; j <= e2; j++) {
  5352. if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) {
  5353. newIndex = j;
  5354. break;
  5355. }
  5356. }
  5357. }
  5358. if (newIndex === void 0) {
  5359. unmount(prevChild, parentComponent, parentSuspense, true);
  5360. } else {
  5361. newIndexToOldIndexMap[newIndex - s2] = i + 1;
  5362. if (newIndex >= maxNewIndexSoFar) {
  5363. maxNewIndexSoFar = newIndex;
  5364. } else {
  5365. moved = true;
  5366. }
  5367. patch(
  5368. prevChild,
  5369. c2[newIndex],
  5370. container,
  5371. null,
  5372. parentComponent,
  5373. parentSuspense,
  5374. namespace,
  5375. slotScopeIds,
  5376. optimized
  5377. );
  5378. patched++;
  5379. }
  5380. }
  5381. const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR;
  5382. j = increasingNewIndexSequence.length - 1;
  5383. for (i = toBePatched - 1; i >= 0; i--) {
  5384. const nextIndex = s2 + i;
  5385. const nextChild = c2[nextIndex];
  5386. const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor;
  5387. if (newIndexToOldIndexMap[i] === 0) {
  5388. patch(
  5389. null,
  5390. nextChild,
  5391. container,
  5392. anchor,
  5393. parentComponent,
  5394. parentSuspense,
  5395. namespace,
  5396. slotScopeIds,
  5397. optimized
  5398. );
  5399. } else if (moved) {
  5400. if (j < 0 || i !== increasingNewIndexSequence[j]) {
  5401. move(nextChild, container, anchor, 2);
  5402. } else {
  5403. j--;
  5404. }
  5405. }
  5406. }
  5407. }
  5408. };
  5409. const move = (vnode, container, anchor, moveType, parentSuspense = null) => {
  5410. const { el, type, transition, children, shapeFlag } = vnode;
  5411. if (shapeFlag & 6) {
  5412. move(vnode.component.subTree, container, anchor, moveType);
  5413. return;
  5414. }
  5415. if (shapeFlag & 128) {
  5416. vnode.suspense.move(container, anchor, moveType);
  5417. return;
  5418. }
  5419. if (shapeFlag & 64) {
  5420. type.move(vnode, container, anchor, internals);
  5421. return;
  5422. }
  5423. if (type === Fragment) {
  5424. hostInsert(el, container, anchor);
  5425. for (let i = 0; i < children.length; i++) {
  5426. move(children[i], container, anchor, moveType);
  5427. }
  5428. hostInsert(vnode.anchor, container, anchor);
  5429. return;
  5430. }
  5431. if (type === Static) {
  5432. moveStaticNode(vnode, container, anchor);
  5433. return;
  5434. }
  5435. const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition;
  5436. if (needTransition2) {
  5437. if (moveType === 0) {
  5438. transition.beforeEnter(el);
  5439. hostInsert(el, container, anchor);
  5440. queuePostRenderEffect(() => transition.enter(el), parentSuspense);
  5441. } else {
  5442. const { leave, delayLeave, afterLeave } = transition;
  5443. const remove22 = () => hostInsert(el, container, anchor);
  5444. const performLeave = () => {
  5445. leave(el, () => {
  5446. remove22();
  5447. afterLeave && afterLeave();
  5448. });
  5449. };
  5450. if (delayLeave) {
  5451. delayLeave(el, remove22, performLeave);
  5452. } else {
  5453. performLeave();
  5454. }
  5455. }
  5456. } else {
  5457. hostInsert(el, container, anchor);
  5458. }
  5459. };
  5460. const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
  5461. const {
  5462. type,
  5463. props,
  5464. ref: ref2,
  5465. children,
  5466. dynamicChildren,
  5467. shapeFlag,
  5468. patchFlag,
  5469. dirs,
  5470. cacheIndex
  5471. } = vnode;
  5472. if (patchFlag === -2) {
  5473. optimized = false;
  5474. }
  5475. if (ref2 != null) {
  5476. setRef(ref2, null, parentSuspense, vnode, true);
  5477. }
  5478. if (cacheIndex != null) {
  5479. parentComponent.renderCache[cacheIndex] = void 0;
  5480. }
  5481. if (shapeFlag & 256) {
  5482. parentComponent.ctx.deactivate(vnode);
  5483. return;
  5484. }
  5485. const shouldInvokeDirs = shapeFlag & 1 && dirs;
  5486. const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
  5487. let vnodeHook;
  5488. if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) {
  5489. invokeVNodeHook(vnodeHook, parentComponent, vnode);
  5490. }
  5491. if (shapeFlag & 6) {
  5492. unmountComponent(vnode.component, parentSuspense, doRemove);
  5493. } else {
  5494. if (shapeFlag & 128) {
  5495. vnode.suspense.unmount(parentSuspense, doRemove);
  5496. return;
  5497. }
  5498. if (shouldInvokeDirs) {
  5499. invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
  5500. }
  5501. if (shapeFlag & 64) {
  5502. vnode.type.remove(
  5503. vnode,
  5504. parentComponent,
  5505. parentSuspense,
  5506. internals,
  5507. doRemove
  5508. );
  5509. } else if (dynamicChildren && // #5154
  5510. // when v-once is used inside a block, setBlockTracking(-1) marks the
  5511. // parent block with hasOnce: true
  5512. // so that it doesn't take the fast path during unmount - otherwise
  5513. // components nested in v-once are never unmounted.
  5514. !dynamicChildren.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments
  5515. (type !== Fragment || patchFlag > 0 && patchFlag & 64)) {
  5516. unmountChildren(
  5517. dynamicChildren,
  5518. parentComponent,
  5519. parentSuspense,
  5520. false,
  5521. true
  5522. );
  5523. } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) {
  5524. unmountChildren(children, parentComponent, parentSuspense);
  5525. }
  5526. if (doRemove) {
  5527. remove2(vnode);
  5528. }
  5529. }
  5530. if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) {
  5531. queuePostRenderEffect(() => {
  5532. vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
  5533. shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
  5534. }, parentSuspense);
  5535. }
  5536. };
  5537. const remove2 = (vnode) => {
  5538. const { type, el, anchor, transition } = vnode;
  5539. if (type === Fragment) {
  5540. {
  5541. removeFragment(el, anchor);
  5542. }
  5543. return;
  5544. }
  5545. if (type === Static) {
  5546. removeStaticNode(vnode);
  5547. return;
  5548. }
  5549. const performRemove = () => {
  5550. hostRemove(el);
  5551. if (transition && !transition.persisted && transition.afterLeave) {
  5552. transition.afterLeave();
  5553. }
  5554. };
  5555. if (vnode.shapeFlag & 1 && transition && !transition.persisted) {
  5556. const { leave, delayLeave } = transition;
  5557. const performLeave = () => leave(el, performRemove);
  5558. if (delayLeave) {
  5559. delayLeave(vnode.el, performRemove, performLeave);
  5560. } else {
  5561. performLeave();
  5562. }
  5563. } else {
  5564. performRemove();
  5565. }
  5566. };
  5567. const removeFragment = (cur, end) => {
  5568. let next;
  5569. while (cur !== end) {
  5570. next = hostNextSibling(cur);
  5571. hostRemove(cur);
  5572. cur = next;
  5573. }
  5574. hostRemove(end);
  5575. };
  5576. const unmountComponent = (instance, parentSuspense, doRemove) => {
  5577. const { bum, scope, job, subTree, um, m, a } = instance;
  5578. invalidateMount(m);
  5579. invalidateMount(a);
  5580. if (bum) {
  5581. invokeArrayFns(bum);
  5582. }
  5583. scope.stop();
  5584. if (job) {
  5585. job.flags |= 8;
  5586. unmount(subTree, instance, parentSuspense, doRemove);
  5587. }
  5588. if (um) {
  5589. queuePostRenderEffect(um, parentSuspense);
  5590. }
  5591. queuePostRenderEffect(() => {
  5592. instance.isUnmounted = true;
  5593. }, parentSuspense);
  5594. if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) {
  5595. parentSuspense.deps--;
  5596. if (parentSuspense.deps === 0) {
  5597. parentSuspense.resolve();
  5598. }
  5599. }
  5600. };
  5601. const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {
  5602. for (let i = start; i < children.length; i++) {
  5603. unmount(children[i], parentComponent, parentSuspense, doRemove, optimized);
  5604. }
  5605. };
  5606. const getNextHostNode = (vnode) => {
  5607. if (vnode.shapeFlag & 6) {
  5608. return getNextHostNode(vnode.component.subTree);
  5609. }
  5610. if (vnode.shapeFlag & 128) {
  5611. return vnode.suspense.next();
  5612. }
  5613. const el = hostNextSibling(vnode.anchor || vnode.el);
  5614. const teleportEnd = el && el[TeleportEndKey];
  5615. return teleportEnd ? hostNextSibling(teleportEnd) : el;
  5616. };
  5617. let isFlushing2 = false;
  5618. const render = (vnode, container, namespace) => {
  5619. if (vnode == null) {
  5620. if (container._vnode) {
  5621. unmount(container._vnode, null, null, true);
  5622. }
  5623. } else {
  5624. patch(
  5625. container._vnode || null,
  5626. vnode,
  5627. container,
  5628. null,
  5629. null,
  5630. null,
  5631. namespace
  5632. );
  5633. }
  5634. container._vnode = vnode;
  5635. if (!isFlushing2) {
  5636. isFlushing2 = true;
  5637. flushPreFlushCbs();
  5638. flushPostFlushCbs();
  5639. isFlushing2 = false;
  5640. }
  5641. };
  5642. const internals = {
  5643. p: patch,
  5644. um: unmount,
  5645. m: move,
  5646. r: remove2,
  5647. mt: mountComponent,
  5648. mc: mountChildren,
  5649. pc: patchChildren,
  5650. pbc: patchBlockChildren,
  5651. n: getNextHostNode,
  5652. o: options
  5653. };
  5654. let hydrate;
  5655. let hydrateNode;
  5656. if (createHydrationFns) {
  5657. [hydrate, hydrateNode] = createHydrationFns(
  5658. internals
  5659. );
  5660. }
  5661. return {
  5662. render,
  5663. hydrate,
  5664. createApp: createAppAPI(render, hydrate)
  5665. };
  5666. }
  5667. function resolveChildrenNamespace({ type, props }, currentNamespace) {
  5668. return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
  5669. }
  5670. function toggleRecurse({ effect, job }, allowed) {
  5671. if (allowed) {
  5672. effect.flags |= 32;
  5673. job.flags |= 4;
  5674. } else {
  5675. effect.flags &= ~32;
  5676. job.flags &= ~4;
  5677. }
  5678. }
  5679. function needTransition(parentSuspense, transition) {
  5680. return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;
  5681. }
  5682. function traverseStaticChildren(n1, n2, shallow = false) {
  5683. const ch1 = n1.children;
  5684. const ch2 = n2.children;
  5685. if (isArray$1(ch1) && isArray$1(ch2)) {
  5686. for (let i = 0; i < ch1.length; i++) {
  5687. const c1 = ch1[i];
  5688. let c2 = ch2[i];
  5689. if (c2.shapeFlag & 1 && !c2.dynamicChildren) {
  5690. if (c2.patchFlag <= 0 || c2.patchFlag === 32) {
  5691. c2 = ch2[i] = cloneIfMounted(ch2[i]);
  5692. c2.el = c1.el;
  5693. }
  5694. if (!shallow && c2.patchFlag !== -2)
  5695. traverseStaticChildren(c1, c2);
  5696. }
  5697. if (c2.type === Text) {
  5698. c2.el = c1.el;
  5699. }
  5700. }
  5701. }
  5702. }
  5703. function getSequence(arr) {
  5704. const p2 = arr.slice();
  5705. const result = [0];
  5706. let i, j, u, v, c;
  5707. const len = arr.length;
  5708. for (i = 0; i < len; i++) {
  5709. const arrI = arr[i];
  5710. if (arrI !== 0) {
  5711. j = result[result.length - 1];
  5712. if (arr[j] < arrI) {
  5713. p2[i] = j;
  5714. result.push(i);
  5715. continue;
  5716. }
  5717. u = 0;
  5718. v = result.length - 1;
  5719. while (u < v) {
  5720. c = u + v >> 1;
  5721. if (arr[result[c]] < arrI) {
  5722. u = c + 1;
  5723. } else {
  5724. v = c;
  5725. }
  5726. }
  5727. if (arrI < arr[result[u]]) {
  5728. if (u > 0) {
  5729. p2[i] = result[u - 1];
  5730. }
  5731. result[u] = i;
  5732. }
  5733. }
  5734. }
  5735. u = result.length;
  5736. v = result[u - 1];
  5737. while (u-- > 0) {
  5738. result[u] = v;
  5739. v = p2[v];
  5740. }
  5741. return result;
  5742. }
  5743. function locateNonHydratedAsyncRoot(instance) {
  5744. const subComponent = instance.subTree.component;
  5745. if (subComponent) {
  5746. if (subComponent.asyncDep && !subComponent.asyncResolved) {
  5747. return subComponent;
  5748. } else {
  5749. return locateNonHydratedAsyncRoot(subComponent);
  5750. }
  5751. }
  5752. }
  5753. function invalidateMount(hooks) {
  5754. if (hooks) {
  5755. for (let i = 0; i < hooks.length; i++)
  5756. hooks[i].flags |= 8;
  5757. }
  5758. }
  5759. const ssrContextKey = Symbol.for("v-scx");
  5760. const useSSRContext = () => {
  5761. {
  5762. const ctx = inject(ssrContextKey);
  5763. return ctx;
  5764. }
  5765. };
  5766. function watchEffect(effect, options) {
  5767. return doWatch(effect, null, options);
  5768. }
  5769. function watch(source, cb, options) {
  5770. return doWatch(source, cb, options);
  5771. }
  5772. function doWatch(source, cb, options = EMPTY_OBJ) {
  5773. const { immediate, deep, flush, once } = options;
  5774. const baseWatchOptions = extend({}, options);
  5775. let ssrCleanup;
  5776. if (isInSSRComponentSetup) {
  5777. if (flush === "sync") {
  5778. const ctx = useSSRContext();
  5779. ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
  5780. } else if (!cb || immediate) {
  5781. baseWatchOptions.once = true;
  5782. } else {
  5783. return {
  5784. stop: NOOP,
  5785. resume: NOOP,
  5786. pause: NOOP
  5787. };
  5788. }
  5789. }
  5790. const instance = currentInstance;
  5791. baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
  5792. let isPre = false;
  5793. if (flush === "post") {
  5794. baseWatchOptions.scheduler = (job) => {
  5795. queuePostRenderEffect(job, instance && instance.suspense);
  5796. };
  5797. } else if (flush !== "sync") {
  5798. isPre = true;
  5799. baseWatchOptions.scheduler = (job, isFirstRun) => {
  5800. if (isFirstRun) {
  5801. job();
  5802. } else {
  5803. queueJob(job);
  5804. }
  5805. };
  5806. }
  5807. baseWatchOptions.augmentJob = (job) => {
  5808. if (cb) {
  5809. job.flags |= 4;
  5810. }
  5811. if (isPre) {
  5812. job.flags |= 2;
  5813. if (instance) {
  5814. job.id = instance.uid;
  5815. job.i = instance;
  5816. }
  5817. }
  5818. };
  5819. const watchHandle = watch$1(source, cb, baseWatchOptions);
  5820. if (ssrCleanup)
  5821. ssrCleanup.push(watchHandle);
  5822. return watchHandle;
  5823. }
  5824. function instanceWatch(source, value, options) {
  5825. const publicThis = this.proxy;
  5826. const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
  5827. let cb;
  5828. if (isFunction(value)) {
  5829. cb = value;
  5830. } else {
  5831. cb = value.handler;
  5832. options = value;
  5833. }
  5834. const reset = setCurrentInstance(this);
  5835. const res = doWatch(getter, cb.bind(publicThis), options);
  5836. reset();
  5837. return res;
  5838. }
  5839. function createPathGetter(ctx, path) {
  5840. const segments = path.split(".");
  5841. return () => {
  5842. let cur = ctx;
  5843. for (let i = 0; i < segments.length && cur; i++) {
  5844. cur = cur[segments[i]];
  5845. }
  5846. return cur;
  5847. };
  5848. }
  5849. const getModelModifiers = (props, modelName) => {
  5850. return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize(modelName)}Modifiers`] || props[`${hyphenate(modelName)}Modifiers`];
  5851. };
  5852. function emit(instance, event, ...rawArgs) {
  5853. if (instance.isUnmounted)
  5854. return;
  5855. const props = instance.vnode.props || EMPTY_OBJ;
  5856. let args = rawArgs;
  5857. const isModelListener2 = event.startsWith("update:");
  5858. const modifiers = isModelListener2 && getModelModifiers(props, event.slice(7));
  5859. if (modifiers) {
  5860. if (modifiers.trim) {
  5861. args = rawArgs.map((a) => isString(a) ? a.trim() : a);
  5862. }
  5863. if (modifiers.number) {
  5864. args = rawArgs.map(looseToNumber);
  5865. }
  5866. }
  5867. let handlerName;
  5868. let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249)
  5869. props[handlerName = toHandlerKey(camelize(event))];
  5870. if (!handler && isModelListener2) {
  5871. handler = props[handlerName = toHandlerKey(hyphenate(event))];
  5872. }
  5873. if (handler) {
  5874. callWithAsyncErrorHandling(
  5875. handler,
  5876. instance,
  5877. 6,
  5878. args
  5879. );
  5880. }
  5881. const onceHandler = props[handlerName + `Once`];
  5882. if (onceHandler) {
  5883. if (!instance.emitted) {
  5884. instance.emitted = {};
  5885. } else if (instance.emitted[handlerName]) {
  5886. return;
  5887. }
  5888. instance.emitted[handlerName] = true;
  5889. callWithAsyncErrorHandling(
  5890. onceHandler,
  5891. instance,
  5892. 6,
  5893. args
  5894. );
  5895. }
  5896. }
  5897. function normalizeEmitsOptions(comp, appContext, asMixin = false) {
  5898. const cache = appContext.emitsCache;
  5899. const cached = cache.get(comp);
  5900. if (cached !== void 0) {
  5901. return cached;
  5902. }
  5903. const raw = comp.emits;
  5904. let normalized = {};
  5905. let hasExtends = false;
  5906. if (!isFunction(comp)) {
  5907. const extendEmits = (raw2) => {
  5908. const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);
  5909. if (normalizedFromExtend) {
  5910. hasExtends = true;
  5911. extend(normalized, normalizedFromExtend);
  5912. }
  5913. };
  5914. if (!asMixin && appContext.mixins.length) {
  5915. appContext.mixins.forEach(extendEmits);
  5916. }
  5917. if (comp.extends) {
  5918. extendEmits(comp.extends);
  5919. }
  5920. if (comp.mixins) {
  5921. comp.mixins.forEach(extendEmits);
  5922. }
  5923. }
  5924. if (!raw && !hasExtends) {
  5925. if (isObject(comp)) {
  5926. cache.set(comp, null);
  5927. }
  5928. return null;
  5929. }
  5930. if (isArray$1(raw)) {
  5931. raw.forEach((key) => normalized[key] = null);
  5932. } else {
  5933. extend(normalized, raw);
  5934. }
  5935. if (isObject(comp)) {
  5936. cache.set(comp, normalized);
  5937. }
  5938. return normalized;
  5939. }
  5940. function isEmitListener(options, key) {
  5941. if (!options || !isOn(key)) {
  5942. return false;
  5943. }
  5944. key = key.slice(2).replace(/Once$/, "");
  5945. return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
  5946. }
  5947. function markAttrsAccessed() {
  5948. }
  5949. function renderComponentRoot(instance) {
  5950. const {
  5951. type: Component,
  5952. vnode,
  5953. proxy,
  5954. withProxy,
  5955. propsOptions: [propsOptions],
  5956. slots,
  5957. attrs,
  5958. emit: emit2,
  5959. render,
  5960. renderCache,
  5961. props,
  5962. data,
  5963. setupState,
  5964. ctx,
  5965. inheritAttrs
  5966. } = instance;
  5967. const prev = setCurrentRenderingInstance(instance);
  5968. let result;
  5969. let fallthroughAttrs;
  5970. try {
  5971. if (vnode.shapeFlag & 4) {
  5972. const proxyToUse = withProxy || proxy;
  5973. const thisProxy = false ? new Proxy(proxyToUse, {
  5974. get(target, key, receiver) {
  5975. warn$1(
  5976. `Property '${String(
  5977. key
  5978. )}' was accessed via 'this'. Avoid using 'this' in templates.`
  5979. );
  5980. return Reflect.get(target, key, receiver);
  5981. }
  5982. }) : proxyToUse;
  5983. result = normalizeVNode(
  5984. render.call(
  5985. thisProxy,
  5986. proxyToUse,
  5987. renderCache,
  5988. false ? shallowReadonly(props) : props,
  5989. setupState,
  5990. data,
  5991. ctx
  5992. )
  5993. );
  5994. fallthroughAttrs = attrs;
  5995. } else {
  5996. const render2 = Component;
  5997. if (false)
  5998. ;
  5999. result = normalizeVNode(
  6000. render2.length > 1 ? render2(
  6001. false ? shallowReadonly(props) : props,
  6002. false ? {
  6003. get attrs() {
  6004. markAttrsAccessed();
  6005. return shallowReadonly(attrs);
  6006. },
  6007. slots,
  6008. emit: emit2
  6009. } : { attrs, slots, emit: emit2 }
  6010. ) : render2(
  6011. false ? shallowReadonly(props) : props,
  6012. null
  6013. )
  6014. );
  6015. fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
  6016. }
  6017. } catch (err) {
  6018. blockStack.length = 0;
  6019. handleError(err, instance, 1);
  6020. result = createVNode(Comment);
  6021. }
  6022. let root = result;
  6023. if (fallthroughAttrs && inheritAttrs !== false) {
  6024. const keys = Object.keys(fallthroughAttrs);
  6025. const { shapeFlag } = root;
  6026. if (keys.length) {
  6027. if (shapeFlag & (1 | 6)) {
  6028. if (propsOptions && keys.some(isModelListener)) {
  6029. fallthroughAttrs = filterModelListeners(
  6030. fallthroughAttrs,
  6031. propsOptions
  6032. );
  6033. }
  6034. root = cloneVNode(root, fallthroughAttrs, false, true);
  6035. }
  6036. }
  6037. }
  6038. if (vnode.dirs) {
  6039. root = cloneVNode(root, null, false, true);
  6040. root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
  6041. }
  6042. if (vnode.transition) {
  6043. setTransitionHooks(root, vnode.transition);
  6044. }
  6045. {
  6046. result = root;
  6047. }
  6048. setCurrentRenderingInstance(prev);
  6049. return result;
  6050. }
  6051. const getFunctionalFallthrough = (attrs) => {
  6052. let res;
  6053. for (const key in attrs) {
  6054. if (key === "class" || key === "style" || isOn(key)) {
  6055. (res || (res = {}))[key] = attrs[key];
  6056. }
  6057. }
  6058. return res;
  6059. };
  6060. const filterModelListeners = (attrs, props) => {
  6061. const res = {};
  6062. for (const key in attrs) {
  6063. if (!isModelListener(key) || !(key.slice(9) in props)) {
  6064. res[key] = attrs[key];
  6065. }
  6066. }
  6067. return res;
  6068. };
  6069. function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
  6070. const { props: prevProps, children: prevChildren, component } = prevVNode;
  6071. const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;
  6072. const emits = component.emitsOptions;
  6073. if (nextVNode.dirs || nextVNode.transition) {
  6074. return true;
  6075. }
  6076. if (optimized && patchFlag >= 0) {
  6077. if (patchFlag & 1024) {
  6078. return true;
  6079. }
  6080. if (patchFlag & 16) {
  6081. if (!prevProps) {
  6082. return !!nextProps;
  6083. }
  6084. return hasPropsChanged(prevProps, nextProps, emits);
  6085. } else if (patchFlag & 8) {
  6086. const dynamicProps = nextVNode.dynamicProps;
  6087. for (let i = 0; i < dynamicProps.length; i++) {
  6088. const key = dynamicProps[i];
  6089. if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) {
  6090. return true;
  6091. }
  6092. }
  6093. }
  6094. } else {
  6095. if (prevChildren || nextChildren) {
  6096. if (!nextChildren || !nextChildren.$stable) {
  6097. return true;
  6098. }
  6099. }
  6100. if (prevProps === nextProps) {
  6101. return false;
  6102. }
  6103. if (!prevProps) {
  6104. return !!nextProps;
  6105. }
  6106. if (!nextProps) {
  6107. return true;
  6108. }
  6109. return hasPropsChanged(prevProps, nextProps, emits);
  6110. }
  6111. return false;
  6112. }
  6113. function hasPropsChanged(prevProps, nextProps, emitsOptions) {
  6114. const nextKeys = Object.keys(nextProps);
  6115. if (nextKeys.length !== Object.keys(prevProps).length) {
  6116. return true;
  6117. }
  6118. for (let i = 0; i < nextKeys.length; i++) {
  6119. const key = nextKeys[i];
  6120. if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) {
  6121. return true;
  6122. }
  6123. }
  6124. return false;
  6125. }
  6126. function updateHOCHostEl({ vnode, parent }, el) {
  6127. while (parent) {
  6128. const root = parent.subTree;
  6129. if (root.suspense && root.suspense.activeBranch === vnode) {
  6130. root.el = vnode.el;
  6131. }
  6132. if (root === vnode) {
  6133. (vnode = parent.vnode).el = el;
  6134. parent = parent.parent;
  6135. } else {
  6136. break;
  6137. }
  6138. }
  6139. }
  6140. const isSuspense = (type) => type.__isSuspense;
  6141. function queueEffectWithSuspense(fn, suspense) {
  6142. if (suspense && suspense.pendingBranch) {
  6143. if (isArray$1(fn)) {
  6144. suspense.effects.push(...fn);
  6145. } else {
  6146. suspense.effects.push(fn);
  6147. }
  6148. } else {
  6149. queuePostFlushCb(fn);
  6150. }
  6151. }
  6152. const Fragment = Symbol.for("v-fgt");
  6153. const Text = Symbol.for("v-txt");
  6154. const Comment = Symbol.for("v-cmt");
  6155. const Static = Symbol.for("v-stc");
  6156. const blockStack = [];
  6157. let currentBlock = null;
  6158. function openBlock(disableTracking = false) {
  6159. blockStack.push(currentBlock = disableTracking ? null : []);
  6160. }
  6161. function closeBlock() {
  6162. blockStack.pop();
  6163. currentBlock = blockStack[blockStack.length - 1] || null;
  6164. }
  6165. let isBlockTreeEnabled = 1;
  6166. function setBlockTracking(value) {
  6167. isBlockTreeEnabled += value;
  6168. if (value < 0 && currentBlock) {
  6169. currentBlock.hasOnce = true;
  6170. }
  6171. }
  6172. function setupBlock(vnode) {
  6173. vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null;
  6174. closeBlock();
  6175. if (isBlockTreeEnabled > 0 && currentBlock) {
  6176. currentBlock.push(vnode);
  6177. }
  6178. return vnode;
  6179. }
  6180. function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) {
  6181. return setupBlock(
  6182. createBaseVNode(
  6183. type,
  6184. props,
  6185. children,
  6186. patchFlag,
  6187. dynamicProps,
  6188. shapeFlag,
  6189. true
  6190. )
  6191. );
  6192. }
  6193. function createBlock(type, props, children, patchFlag, dynamicProps) {
  6194. return setupBlock(
  6195. createVNode(
  6196. type,
  6197. props,
  6198. children,
  6199. patchFlag,
  6200. dynamicProps,
  6201. true
  6202. )
  6203. );
  6204. }
  6205. function isVNode(value) {
  6206. return value ? value.__v_isVNode === true : false;
  6207. }
  6208. function isSameVNodeType(n1, n2) {
  6209. return n1.type === n2.type && n1.key === n2.key;
  6210. }
  6211. const normalizeKey = ({ key }) => key != null ? key : null;
  6212. const normalizeRef = ({
  6213. ref: ref2,
  6214. ref_key,
  6215. ref_for
  6216. }) => {
  6217. if (typeof ref2 === "number") {
  6218. ref2 = "" + ref2;
  6219. }
  6220. return ref2 != null ? isString(ref2) || isRef(ref2) || isFunction(ref2) ? { i: currentRenderingInstance, r: ref2, k: ref_key, f: !!ref_for } : ref2 : null;
  6221. };
  6222. function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) {
  6223. const vnode = {
  6224. __v_isVNode: true,
  6225. __v_skip: true,
  6226. type,
  6227. props,
  6228. key: props && normalizeKey(props),
  6229. ref: props && normalizeRef(props),
  6230. scopeId: currentScopeId,
  6231. slotScopeIds: null,
  6232. children,
  6233. component: null,
  6234. suspense: null,
  6235. ssContent: null,
  6236. ssFallback: null,
  6237. dirs: null,
  6238. transition: null,
  6239. el: null,
  6240. anchor: null,
  6241. target: null,
  6242. targetStart: null,
  6243. targetAnchor: null,
  6244. staticCount: 0,
  6245. shapeFlag,
  6246. patchFlag,
  6247. dynamicProps,
  6248. dynamicChildren: null,
  6249. appContext: null,
  6250. ctx: currentRenderingInstance
  6251. };
  6252. if (needFullChildrenNormalization) {
  6253. normalizeChildren(vnode, children);
  6254. if (shapeFlag & 128) {
  6255. type.normalize(vnode);
  6256. }
  6257. } else if (children) {
  6258. vnode.shapeFlag |= isString(children) ? 8 : 16;
  6259. }
  6260. if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself
  6261. !isBlockNode && // has current parent block
  6262. currentBlock && // presence of a patch flag indicates this node needs patching on updates.
  6263. // component nodes also should always be patched, because even if the
  6264. // component doesn't need to update, it needs to persist the instance on to
  6265. // the next vnode so that it can be properly unmounted later.
  6266. (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the
  6267. // vnode should not be considered dynamic due to handler caching.
  6268. vnode.patchFlag !== 32) {
  6269. currentBlock.push(vnode);
  6270. }
  6271. return vnode;
  6272. }
  6273. const createVNode = _createVNode;
  6274. function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
  6275. if (!type || type === NULL_DYNAMIC_COMPONENT) {
  6276. type = Comment;
  6277. }
  6278. if (isVNode(type)) {
  6279. const cloned = cloneVNode(
  6280. type,
  6281. props,
  6282. true
  6283. /* mergeRef: true */
  6284. );
  6285. if (children) {
  6286. normalizeChildren(cloned, children);
  6287. }
  6288. if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {
  6289. if (cloned.shapeFlag & 6) {
  6290. currentBlock[currentBlock.indexOf(type)] = cloned;
  6291. } else {
  6292. currentBlock.push(cloned);
  6293. }
  6294. }
  6295. cloned.patchFlag = -2;
  6296. return cloned;
  6297. }
  6298. if (isClassComponent(type)) {
  6299. type = type.__vccOpts;
  6300. }
  6301. if (props) {
  6302. props = guardReactiveProps(props);
  6303. let { class: klass, style: style2 } = props;
  6304. if (klass && !isString(klass)) {
  6305. props.class = normalizeClass(klass);
  6306. }
  6307. if (isObject(style2)) {
  6308. if (isProxy(style2) && !isArray$1(style2)) {
  6309. style2 = extend({}, style2);
  6310. }
  6311. props.style = normalizeStyle(style2);
  6312. }
  6313. }
  6314. const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0;
  6315. return createBaseVNode(
  6316. type,
  6317. props,
  6318. children,
  6319. patchFlag,
  6320. dynamicProps,
  6321. shapeFlag,
  6322. isBlockNode,
  6323. true
  6324. );
  6325. }
  6326. function guardReactiveProps(props) {
  6327. if (!props)
  6328. return null;
  6329. return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
  6330. }
  6331. function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
  6332. const { props, ref: ref2, patchFlag, children, transition } = vnode;
  6333. const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;
  6334. const cloned = {
  6335. __v_isVNode: true,
  6336. __v_skip: true,
  6337. type: vnode.type,
  6338. props: mergedProps,
  6339. key: mergedProps && normalizeKey(mergedProps),
  6340. ref: extraProps && extraProps.ref ? (
  6341. // #2078 in the case of <component :is="vnode" ref="extra"/>
  6342. // if the vnode itself already has a ref, cloneVNode will need to merge
  6343. // the refs so the single vnode can be set on multiple refs
  6344. mergeRef && ref2 ? isArray$1(ref2) ? ref2.concat(normalizeRef(extraProps)) : [ref2, normalizeRef(extraProps)] : normalizeRef(extraProps)
  6345. ) : ref2,
  6346. scopeId: vnode.scopeId,
  6347. slotScopeIds: vnode.slotScopeIds,
  6348. children,
  6349. target: vnode.target,
  6350. targetStart: vnode.targetStart,
  6351. targetAnchor: vnode.targetAnchor,
  6352. staticCount: vnode.staticCount,
  6353. shapeFlag: vnode.shapeFlag,
  6354. // if the vnode is cloned with extra props, we can no longer assume its
  6355. // existing patch flag to be reliable and need to add the FULL_PROPS flag.
  6356. // note: preserve flag for fragments since they use the flag for children
  6357. // fast paths only.
  6358. patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag,
  6359. dynamicProps: vnode.dynamicProps,
  6360. dynamicChildren: vnode.dynamicChildren,
  6361. appContext: vnode.appContext,
  6362. dirs: vnode.dirs,
  6363. transition,
  6364. // These should technically only be non-null on mounted VNodes. However,
  6365. // they *should* be copied for kept-alive vnodes. So we just always copy
  6366. // them since them being non-null during a mount doesn't affect the logic as
  6367. // they will simply be overwritten.
  6368. component: vnode.component,
  6369. suspense: vnode.suspense,
  6370. ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
  6371. ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
  6372. el: vnode.el,
  6373. anchor: vnode.anchor,
  6374. ctx: vnode.ctx,
  6375. ce: vnode.ce
  6376. };
  6377. if (transition && cloneTransition) {
  6378. setTransitionHooks(
  6379. cloned,
  6380. transition.clone(cloned)
  6381. );
  6382. }
  6383. return cloned;
  6384. }
  6385. function createTextVNode(text = " ", flag = 0) {
  6386. return createVNode(Text, null, text, flag);
  6387. }
  6388. function createStaticVNode(content, numberOfNodes) {
  6389. const vnode = createVNode(Static, null, content);
  6390. vnode.staticCount = numberOfNodes;
  6391. return vnode;
  6392. }
  6393. function createCommentVNode(text = "", asBlock = false) {
  6394. return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text);
  6395. }
  6396. function normalizeVNode(child) {
  6397. if (child == null || typeof child === "boolean") {
  6398. return createVNode(Comment);
  6399. } else if (isArray$1(child)) {
  6400. return createVNode(
  6401. Fragment,
  6402. null,
  6403. // #3666, avoid reference pollution when reusing vnode
  6404. child.slice()
  6405. );
  6406. } else if (typeof child === "object") {
  6407. return cloneIfMounted(child);
  6408. } else {
  6409. return createVNode(Text, null, String(child));
  6410. }
  6411. }
  6412. function cloneIfMounted(child) {
  6413. return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child);
  6414. }
  6415. function normalizeChildren(vnode, children) {
  6416. let type = 0;
  6417. const { shapeFlag } = vnode;
  6418. if (children == null) {
  6419. children = null;
  6420. } else if (isArray$1(children)) {
  6421. type = 16;
  6422. } else if (typeof children === "object") {
  6423. if (shapeFlag & (1 | 64)) {
  6424. const slot = children.default;
  6425. if (slot) {
  6426. slot._c && (slot._d = false);
  6427. normalizeChildren(vnode, slot());
  6428. slot._c && (slot._d = true);
  6429. }
  6430. return;
  6431. } else {
  6432. type = 32;
  6433. const slotFlag = children._;
  6434. if (!slotFlag && !isInternalObject(children)) {
  6435. children._ctx = currentRenderingInstance;
  6436. } else if (slotFlag === 3 && currentRenderingInstance) {
  6437. if (currentRenderingInstance.slots._ === 1) {
  6438. children._ = 1;
  6439. } else {
  6440. children._ = 2;
  6441. vnode.patchFlag |= 1024;
  6442. }
  6443. }
  6444. }
  6445. } else if (isFunction(children)) {
  6446. children = { default: children, _ctx: currentRenderingInstance };
  6447. type = 32;
  6448. } else {
  6449. children = String(children);
  6450. if (shapeFlag & 64) {
  6451. type = 16;
  6452. children = [createTextVNode(children)];
  6453. } else {
  6454. type = 8;
  6455. }
  6456. }
  6457. vnode.children = children;
  6458. vnode.shapeFlag |= type;
  6459. }
  6460. function mergeProps(...args) {
  6461. const ret = {};
  6462. for (let i = 0; i < args.length; i++) {
  6463. const toMerge = args[i];
  6464. for (const key in toMerge) {
  6465. if (key === "class") {
  6466. if (ret.class !== toMerge.class) {
  6467. ret.class = normalizeClass([ret.class, toMerge.class]);
  6468. }
  6469. } else if (key === "style") {
  6470. ret.style = normalizeStyle([ret.style, toMerge.style]);
  6471. } else if (isOn(key)) {
  6472. const existing = ret[key];
  6473. const incoming = toMerge[key];
  6474. if (incoming && existing !== incoming && !(isArray$1(existing) && existing.includes(incoming))) {
  6475. ret[key] = existing ? [].concat(existing, incoming) : incoming;
  6476. }
  6477. } else if (key !== "") {
  6478. ret[key] = toMerge[key];
  6479. }
  6480. }
  6481. }
  6482. return ret;
  6483. }
  6484. function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
  6485. callWithAsyncErrorHandling(hook, instance, 7, [
  6486. vnode,
  6487. prevVNode
  6488. ]);
  6489. }
  6490. const emptyAppContext = createAppContext();
  6491. let uid = 0;
  6492. function createComponentInstance(vnode, parent, suspense) {
  6493. const type = vnode.type;
  6494. const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
  6495. const instance = {
  6496. uid: uid++,
  6497. vnode,
  6498. type,
  6499. parent,
  6500. appContext,
  6501. root: null,
  6502. // to be immediately set
  6503. next: null,
  6504. subTree: null,
  6505. // will be set synchronously right after creation
  6506. effect: null,
  6507. update: null,
  6508. // will be set synchronously right after creation
  6509. job: null,
  6510. scope: new EffectScope(
  6511. true
  6512. /* detached */
  6513. ),
  6514. render: null,
  6515. proxy: null,
  6516. exposed: null,
  6517. exposeProxy: null,
  6518. withProxy: null,
  6519. provides: parent ? parent.provides : Object.create(appContext.provides),
  6520. ids: parent ? parent.ids : ["", 0, 0],
  6521. accessCache: null,
  6522. renderCache: [],
  6523. // local resolved assets
  6524. components: null,
  6525. directives: null,
  6526. // resolved props and emits options
  6527. propsOptions: normalizePropsOptions(type, appContext),
  6528. emitsOptions: normalizeEmitsOptions(type, appContext),
  6529. // emit
  6530. emit: null,
  6531. // to be set immediately
  6532. emitted: null,
  6533. // props default value
  6534. propsDefaults: EMPTY_OBJ,
  6535. // inheritAttrs
  6536. inheritAttrs: type.inheritAttrs,
  6537. // state
  6538. ctx: EMPTY_OBJ,
  6539. data: EMPTY_OBJ,
  6540. props: EMPTY_OBJ,
  6541. attrs: EMPTY_OBJ,
  6542. slots: EMPTY_OBJ,
  6543. refs: EMPTY_OBJ,
  6544. setupState: EMPTY_OBJ,
  6545. setupContext: null,
  6546. // suspense related
  6547. suspense,
  6548. suspenseId: suspense ? suspense.pendingId : 0,
  6549. asyncDep: null,
  6550. asyncResolved: false,
  6551. // lifecycle hooks
  6552. // not using enums here because it results in computed properties
  6553. isMounted: false,
  6554. isUnmounted: false,
  6555. isDeactivated: false,
  6556. bc: null,
  6557. c: null,
  6558. bm: null,
  6559. m: null,
  6560. bu: null,
  6561. u: null,
  6562. um: null,
  6563. bum: null,
  6564. da: null,
  6565. a: null,
  6566. rtg: null,
  6567. rtc: null,
  6568. ec: null,
  6569. sp: null
  6570. };
  6571. {
  6572. instance.ctx = { _: instance };
  6573. }
  6574. instance.root = parent ? parent.root : instance;
  6575. instance.emit = emit.bind(null, instance);
  6576. if (vnode.ce) {
  6577. vnode.ce(instance);
  6578. }
  6579. return instance;
  6580. }
  6581. let currentInstance = null;
  6582. const getCurrentInstance = () => currentInstance || currentRenderingInstance;
  6583. let internalSetCurrentInstance;
  6584. let setInSSRSetupState;
  6585. {
  6586. const g = getGlobalThis();
  6587. const registerGlobalSetter = (key, setter) => {
  6588. let setters;
  6589. if (!(setters = g[key]))
  6590. setters = g[key] = [];
  6591. setters.push(setter);
  6592. return (v) => {
  6593. if (setters.length > 1)
  6594. setters.forEach((set2) => set2(v));
  6595. else
  6596. setters[0](v);
  6597. };
  6598. };
  6599. internalSetCurrentInstance = registerGlobalSetter(
  6600. `__VUE_INSTANCE_SETTERS__`,
  6601. (v) => currentInstance = v
  6602. );
  6603. setInSSRSetupState = registerGlobalSetter(
  6604. `__VUE_SSR_SETTERS__`,
  6605. (v) => isInSSRComponentSetup = v
  6606. );
  6607. }
  6608. const setCurrentInstance = (instance) => {
  6609. const prev = currentInstance;
  6610. internalSetCurrentInstance(instance);
  6611. instance.scope.on();
  6612. return () => {
  6613. instance.scope.off();
  6614. internalSetCurrentInstance(prev);
  6615. };
  6616. };
  6617. const unsetCurrentInstance = () => {
  6618. currentInstance && currentInstance.scope.off();
  6619. internalSetCurrentInstance(null);
  6620. };
  6621. function isStatefulComponent(instance) {
  6622. return instance.vnode.shapeFlag & 4;
  6623. }
  6624. let isInSSRComponentSetup = false;
  6625. function setupComponent(instance, isSSR = false, optimized = false) {
  6626. isSSR && setInSSRSetupState(isSSR);
  6627. const { props, children } = instance.vnode;
  6628. const isStateful = isStatefulComponent(instance);
  6629. initProps(instance, props, isStateful, isSSR);
  6630. initSlots(instance, children, optimized);
  6631. const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
  6632. isSSR && setInSSRSetupState(false);
  6633. return setupResult;
  6634. }
  6635. function setupStatefulComponent(instance, isSSR) {
  6636. const Component = instance.type;
  6637. instance.accessCache = /* @__PURE__ */ Object.create(null);
  6638. instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
  6639. const { setup } = Component;
  6640. if (setup) {
  6641. const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
  6642. const reset = setCurrentInstance(instance);
  6643. pauseTracking();
  6644. const setupResult = callWithErrorHandling(
  6645. setup,
  6646. instance,
  6647. 0,
  6648. [
  6649. instance.props,
  6650. setupContext
  6651. ]
  6652. );
  6653. resetTracking();
  6654. reset();
  6655. if (isPromise(setupResult)) {
  6656. if (!isAsyncWrapper(instance))
  6657. markAsyncBoundary(instance);
  6658. setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
  6659. if (isSSR) {
  6660. return setupResult.then((resolvedResult) => {
  6661. handleSetupResult(instance, resolvedResult, isSSR);
  6662. }).catch((e) => {
  6663. handleError(e, instance, 0);
  6664. });
  6665. } else {
  6666. instance.asyncDep = setupResult;
  6667. }
  6668. } else {
  6669. handleSetupResult(instance, setupResult, isSSR);
  6670. }
  6671. } else {
  6672. finishComponentSetup(instance, isSSR);
  6673. }
  6674. }
  6675. function handleSetupResult(instance, setupResult, isSSR) {
  6676. if (isFunction(setupResult)) {
  6677. if (instance.type.__ssrInlineRender) {
  6678. instance.ssrRender = setupResult;
  6679. } else {
  6680. instance.render = setupResult;
  6681. }
  6682. } else if (isObject(setupResult)) {
  6683. instance.setupState = proxyRefs(setupResult);
  6684. } else
  6685. ;
  6686. finishComponentSetup(instance, isSSR);
  6687. }
  6688. let compile;
  6689. function finishComponentSetup(instance, isSSR, skipOptions) {
  6690. const Component = instance.type;
  6691. if (!instance.render) {
  6692. if (!isSSR && compile && !Component.render) {
  6693. const template = Component.template || resolveMergedOptions(instance).template;
  6694. if (template) {
  6695. const { isCustomElement, compilerOptions } = instance.appContext.config;
  6696. const { delimiters, compilerOptions: componentCompilerOptions } = Component;
  6697. const finalCompilerOptions = extend(
  6698. extend(
  6699. {
  6700. isCustomElement,
  6701. delimiters
  6702. },
  6703. compilerOptions
  6704. ),
  6705. componentCompilerOptions
  6706. );
  6707. Component.render = compile(template, finalCompilerOptions);
  6708. }
  6709. }
  6710. instance.render = Component.render || NOOP;
  6711. }
  6712. {
  6713. const reset = setCurrentInstance(instance);
  6714. pauseTracking();
  6715. try {
  6716. applyOptions(instance);
  6717. } finally {
  6718. resetTracking();
  6719. reset();
  6720. }
  6721. }
  6722. }
  6723. const attrsProxyHandlers = {
  6724. get(target, key) {
  6725. track(target, "get", "");
  6726. return target[key];
  6727. }
  6728. };
  6729. function createSetupContext(instance) {
  6730. const expose = (exposed) => {
  6731. instance.exposed = exposed || {};
  6732. };
  6733. {
  6734. return {
  6735. attrs: new Proxy(instance.attrs, attrsProxyHandlers),
  6736. slots: instance.slots,
  6737. emit: instance.emit,
  6738. expose
  6739. };
  6740. }
  6741. }
  6742. function getComponentPublicInstance(instance) {
  6743. if (instance.exposed) {
  6744. return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {
  6745. get(target, key) {
  6746. if (key in target) {
  6747. return target[key];
  6748. } else if (key in publicPropertiesMap) {
  6749. return publicPropertiesMap[key](instance);
  6750. }
  6751. },
  6752. has(target, key) {
  6753. return key in target || key in publicPropertiesMap;
  6754. }
  6755. }));
  6756. } else {
  6757. return instance.proxy;
  6758. }
  6759. }
  6760. const classifyRE = /(?:^|[-_])(\w)/g;
  6761. const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, "");
  6762. function getComponentName(Component, includeInferred = true) {
  6763. return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;
  6764. }
  6765. function formatComponentName(instance, Component, isRoot = false) {
  6766. let name = getComponentName(Component);
  6767. if (!name && Component.__file) {
  6768. const match = Component.__file.match(/([^/\\]+)\.\w+$/);
  6769. if (match) {
  6770. name = match[1];
  6771. }
  6772. }
  6773. if (!name && instance && instance.parent) {
  6774. const inferFromRegistry = (registry) => {
  6775. for (const key in registry) {
  6776. if (registry[key] === Component) {
  6777. return key;
  6778. }
  6779. }
  6780. };
  6781. name = inferFromRegistry(
  6782. instance.components || instance.parent.type.components
  6783. ) || inferFromRegistry(instance.appContext.components);
  6784. }
  6785. return name ? classify(name) : isRoot ? `App` : `Anonymous`;
  6786. }
  6787. function isClassComponent(value) {
  6788. return isFunction(value) && "__vccOpts" in value;
  6789. }
  6790. const computed = (getterOrOptions, debugOptions) => {
  6791. const c = computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
  6792. return c;
  6793. };
  6794. function h(type, propsOrChildren, children) {
  6795. const l = arguments.length;
  6796. if (l === 2) {
  6797. if (isObject(propsOrChildren) && !isArray$1(propsOrChildren)) {
  6798. if (isVNode(propsOrChildren)) {
  6799. return createVNode(type, null, [propsOrChildren]);
  6800. }
  6801. return createVNode(type, propsOrChildren);
  6802. } else {
  6803. return createVNode(type, null, propsOrChildren);
  6804. }
  6805. } else {
  6806. if (l > 3) {
  6807. children = Array.prototype.slice.call(arguments, 2);
  6808. } else if (l === 3 && isVNode(children)) {
  6809. children = [children];
  6810. }
  6811. return createVNode(type, propsOrChildren, children);
  6812. }
  6813. }
  6814. const version = "3.5.4";
  6815. /**
  6816. * @vue/runtime-dom v3.5.4
  6817. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  6818. * @license MIT
  6819. **/
  6820. let policy = void 0;
  6821. const tt = typeof window !== "undefined" && window.trustedTypes;
  6822. if (tt) {
  6823. try {
  6824. policy = /* @__PURE__ */ tt.createPolicy("vue", {
  6825. createHTML: (val) => val
  6826. });
  6827. } catch (e) {
  6828. }
  6829. }
  6830. const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val;
  6831. const svgNS = "http://www.w3.org/2000/svg";
  6832. const mathmlNS = "http://www.w3.org/1998/Math/MathML";
  6833. const doc = typeof document !== "undefined" ? document : null;
  6834. const templateContainer = doc && /* @__PURE__ */ doc.createElement("template");
  6835. const nodeOps = {
  6836. insert: (child, parent, anchor) => {
  6837. parent.insertBefore(child, anchor || null);
  6838. },
  6839. remove: (child) => {
  6840. const parent = child.parentNode;
  6841. if (parent) {
  6842. parent.removeChild(child);
  6843. }
  6844. },
  6845. createElement: (tag, namespace, is, props) => {
  6846. const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag);
  6847. if (tag === "select" && props && props.multiple != null) {
  6848. el.setAttribute("multiple", props.multiple);
  6849. }
  6850. return el;
  6851. },
  6852. createText: (text) => doc.createTextNode(text),
  6853. createComment: (text) => doc.createComment(text),
  6854. setText: (node, text) => {
  6855. node.nodeValue = text;
  6856. },
  6857. setElementText: (el, text) => {
  6858. el.textContent = text;
  6859. },
  6860. parentNode: (node) => node.parentNode,
  6861. nextSibling: (node) => node.nextSibling,
  6862. querySelector: (selector) => doc.querySelector(selector),
  6863. setScopeId(el, id) {
  6864. el.setAttribute(id, "");
  6865. },
  6866. // __UNSAFE__
  6867. // Reason: innerHTML.
  6868. // Static content here can only come from compiled templates.
  6869. // As long as the user only uses trusted templates, this is safe.
  6870. insertStaticContent(content, parent, anchor, namespace, start, end) {
  6871. const before = anchor ? anchor.previousSibling : parent.lastChild;
  6872. if (start && (start === end || start.nextSibling)) {
  6873. while (true) {
  6874. parent.insertBefore(start.cloneNode(true), anchor);
  6875. if (start === end || !(start = start.nextSibling))
  6876. break;
  6877. }
  6878. } else {
  6879. templateContainer.innerHTML = unsafeToTrustedHTML(
  6880. namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content
  6881. );
  6882. const template = templateContainer.content;
  6883. if (namespace === "svg" || namespace === "mathml") {
  6884. const wrapper = template.firstChild;
  6885. while (wrapper.firstChild) {
  6886. template.appendChild(wrapper.firstChild);
  6887. }
  6888. template.removeChild(wrapper);
  6889. }
  6890. parent.insertBefore(template, anchor);
  6891. }
  6892. return [
  6893. // first
  6894. before ? before.nextSibling : parent.firstChild,
  6895. // last
  6896. anchor ? anchor.previousSibling : parent.lastChild
  6897. ];
  6898. }
  6899. };
  6900. const TRANSITION = "transition";
  6901. const ANIMATION = "animation";
  6902. const vtcKey = Symbol("_vtc");
  6903. const DOMTransitionPropsValidators = {
  6904. name: String,
  6905. type: String,
  6906. css: {
  6907. type: Boolean,
  6908. default: true
  6909. },
  6910. duration: [String, Number, Object],
  6911. enterFromClass: String,
  6912. enterActiveClass: String,
  6913. enterToClass: String,
  6914. appearFromClass: String,
  6915. appearActiveClass: String,
  6916. appearToClass: String,
  6917. leaveFromClass: String,
  6918. leaveActiveClass: String,
  6919. leaveToClass: String
  6920. };
  6921. const TransitionPropsValidators = /* @__PURE__ */ extend(
  6922. {},
  6923. BaseTransitionPropsValidators,
  6924. DOMTransitionPropsValidators
  6925. );
  6926. const decorate$1 = (t) => {
  6927. t.displayName = "Transition";
  6928. t.props = TransitionPropsValidators;
  6929. return t;
  6930. };
  6931. const Transition = /* @__PURE__ */ decorate$1(
  6932. (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots)
  6933. );
  6934. const callHook = (hook, args = []) => {
  6935. if (isArray$1(hook)) {
  6936. hook.forEach((h2) => h2(...args));
  6937. } else if (hook) {
  6938. hook(...args);
  6939. }
  6940. };
  6941. const hasExplicitCallback = (hook) => {
  6942. return hook ? isArray$1(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;
  6943. };
  6944. function resolveTransitionProps(rawProps) {
  6945. const baseProps = {};
  6946. for (const key in rawProps) {
  6947. if (!(key in DOMTransitionPropsValidators)) {
  6948. baseProps[key] = rawProps[key];
  6949. }
  6950. }
  6951. if (rawProps.css === false) {
  6952. return baseProps;
  6953. }
  6954. const {
  6955. name = "v",
  6956. type,
  6957. duration,
  6958. enterFromClass = `${name}-enter-from`,
  6959. enterActiveClass = `${name}-enter-active`,
  6960. enterToClass = `${name}-enter-to`,
  6961. appearFromClass = enterFromClass,
  6962. appearActiveClass = enterActiveClass,
  6963. appearToClass = enterToClass,
  6964. leaveFromClass = `${name}-leave-from`,
  6965. leaveActiveClass = `${name}-leave-active`,
  6966. leaveToClass = `${name}-leave-to`
  6967. } = rawProps;
  6968. const durations = normalizeDuration(duration);
  6969. const enterDuration = durations && durations[0];
  6970. const leaveDuration = durations && durations[1];
  6971. const {
  6972. onBeforeEnter,
  6973. onEnter,
  6974. onEnterCancelled,
  6975. onLeave,
  6976. onLeaveCancelled,
  6977. onBeforeAppear = onBeforeEnter,
  6978. onAppear = onEnter,
  6979. onAppearCancelled = onEnterCancelled
  6980. } = baseProps;
  6981. const finishEnter = (el, isAppear, done) => {
  6982. removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
  6983. removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
  6984. done && done();
  6985. };
  6986. const finishLeave = (el, done) => {
  6987. el._isLeaving = false;
  6988. removeTransitionClass(el, leaveFromClass);
  6989. removeTransitionClass(el, leaveToClass);
  6990. removeTransitionClass(el, leaveActiveClass);
  6991. done && done();
  6992. };
  6993. const makeEnterHook = (isAppear) => {
  6994. return (el, done) => {
  6995. const hook = isAppear ? onAppear : onEnter;
  6996. const resolve2 = () => finishEnter(el, isAppear, done);
  6997. callHook(hook, [el, resolve2]);
  6998. nextFrame(() => {
  6999. removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
  7000. addTransitionClass(el, isAppear ? appearToClass : enterToClass);
  7001. if (!hasExplicitCallback(hook)) {
  7002. whenTransitionEnds(el, type, enterDuration, resolve2);
  7003. }
  7004. });
  7005. };
  7006. };
  7007. return extend(baseProps, {
  7008. onBeforeEnter(el) {
  7009. callHook(onBeforeEnter, [el]);
  7010. addTransitionClass(el, enterFromClass);
  7011. addTransitionClass(el, enterActiveClass);
  7012. },
  7013. onBeforeAppear(el) {
  7014. callHook(onBeforeAppear, [el]);
  7015. addTransitionClass(el, appearFromClass);
  7016. addTransitionClass(el, appearActiveClass);
  7017. },
  7018. onEnter: makeEnterHook(false),
  7019. onAppear: makeEnterHook(true),
  7020. onLeave(el, done) {
  7021. el._isLeaving = true;
  7022. const resolve2 = () => finishLeave(el, done);
  7023. addTransitionClass(el, leaveFromClass);
  7024. addTransitionClass(el, leaveActiveClass);
  7025. forceReflow();
  7026. nextFrame(() => {
  7027. if (!el._isLeaving) {
  7028. return;
  7029. }
  7030. removeTransitionClass(el, leaveFromClass);
  7031. addTransitionClass(el, leaveToClass);
  7032. if (!hasExplicitCallback(onLeave)) {
  7033. whenTransitionEnds(el, type, leaveDuration, resolve2);
  7034. }
  7035. });
  7036. callHook(onLeave, [el, resolve2]);
  7037. },
  7038. onEnterCancelled(el) {
  7039. finishEnter(el, false);
  7040. callHook(onEnterCancelled, [el]);
  7041. },
  7042. onAppearCancelled(el) {
  7043. finishEnter(el, true);
  7044. callHook(onAppearCancelled, [el]);
  7045. },
  7046. onLeaveCancelled(el) {
  7047. finishLeave(el);
  7048. callHook(onLeaveCancelled, [el]);
  7049. }
  7050. });
  7051. }
  7052. function normalizeDuration(duration) {
  7053. if (duration == null) {
  7054. return null;
  7055. } else if (isObject(duration)) {
  7056. return [NumberOf(duration.enter), NumberOf(duration.leave)];
  7057. } else {
  7058. const n = NumberOf(duration);
  7059. return [n, n];
  7060. }
  7061. }
  7062. function NumberOf(val) {
  7063. const res = toNumber(val);
  7064. return res;
  7065. }
  7066. function addTransitionClass(el, cls) {
  7067. cls.split(/\s+/).forEach((c) => c && el.classList.add(c));
  7068. (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls);
  7069. }
  7070. function removeTransitionClass(el, cls) {
  7071. cls.split(/\s+/).forEach((c) => c && el.classList.remove(c));
  7072. const _vtc = el[vtcKey];
  7073. if (_vtc) {
  7074. _vtc.delete(cls);
  7075. if (!_vtc.size) {
  7076. el[vtcKey] = void 0;
  7077. }
  7078. }
  7079. }
  7080. function nextFrame(cb) {
  7081. requestAnimationFrame(() => {
  7082. requestAnimationFrame(cb);
  7083. });
  7084. }
  7085. let endId = 0;
  7086. function whenTransitionEnds(el, expectedType, explicitTimeout, resolve2) {
  7087. const id = el._endId = ++endId;
  7088. const resolveIfNotStale = () => {
  7089. if (id === el._endId) {
  7090. resolve2();
  7091. }
  7092. };
  7093. if (explicitTimeout) {
  7094. return setTimeout(resolveIfNotStale, explicitTimeout);
  7095. }
  7096. const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
  7097. if (!type) {
  7098. return resolve2();
  7099. }
  7100. const endEvent = type + "end";
  7101. let ended = 0;
  7102. const end = () => {
  7103. el.removeEventListener(endEvent, onEnd);
  7104. resolveIfNotStale();
  7105. };
  7106. const onEnd = (e) => {
  7107. if (e.target === el && ++ended >= propCount) {
  7108. end();
  7109. }
  7110. };
  7111. setTimeout(() => {
  7112. if (ended < propCount) {
  7113. end();
  7114. }
  7115. }, timeout + 1);
  7116. el.addEventListener(endEvent, onEnd);
  7117. }
  7118. function getTransitionInfo(el, expectedType) {
  7119. const styles = window.getComputedStyle(el);
  7120. const getStyleProperties = (key) => (styles[key] || "").split(", ");
  7121. const transitionDelays = getStyleProperties(`${TRANSITION}Delay`);
  7122. const transitionDurations = getStyleProperties(`${TRANSITION}Duration`);
  7123. const transitionTimeout = getTimeout(transitionDelays, transitionDurations);
  7124. const animationDelays = getStyleProperties(`${ANIMATION}Delay`);
  7125. const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
  7126. const animationTimeout = getTimeout(animationDelays, animationDurations);
  7127. let type = null;
  7128. let timeout = 0;
  7129. let propCount = 0;
  7130. if (expectedType === TRANSITION) {
  7131. if (transitionTimeout > 0) {
  7132. type = TRANSITION;
  7133. timeout = transitionTimeout;
  7134. propCount = transitionDurations.length;
  7135. }
  7136. } else if (expectedType === ANIMATION) {
  7137. if (animationTimeout > 0) {
  7138. type = ANIMATION;
  7139. timeout = animationTimeout;
  7140. propCount = animationDurations.length;
  7141. }
  7142. } else {
  7143. timeout = Math.max(transitionTimeout, animationTimeout);
  7144. type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null;
  7145. propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0;
  7146. }
  7147. const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test(
  7148. getStyleProperties(`${TRANSITION}Property`).toString()
  7149. );
  7150. return {
  7151. type,
  7152. timeout,
  7153. propCount,
  7154. hasTransform
  7155. };
  7156. }
  7157. function getTimeout(delays, durations) {
  7158. while (delays.length < durations.length) {
  7159. delays = delays.concat(delays);
  7160. }
  7161. return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));
  7162. }
  7163. function toMs(s) {
  7164. if (s === "auto")
  7165. return 0;
  7166. return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
  7167. }
  7168. function forceReflow() {
  7169. return document.body.offsetHeight;
  7170. }
  7171. function patchClass(el, value, isSVG) {
  7172. const transitionClasses = el[vtcKey];
  7173. if (transitionClasses) {
  7174. value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" ");
  7175. }
  7176. if (value == null) {
  7177. el.removeAttribute("class");
  7178. } else if (isSVG) {
  7179. el.setAttribute("class", value);
  7180. } else {
  7181. el.className = value;
  7182. }
  7183. }
  7184. const vShowOriginalDisplay = Symbol("_vod");
  7185. const vShowHidden = Symbol("_vsh");
  7186. const vShow = {
  7187. beforeMount(el, { value }, { transition }) {
  7188. el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display;
  7189. if (transition && value) {
  7190. transition.beforeEnter(el);
  7191. } else {
  7192. setDisplay(el, value);
  7193. }
  7194. },
  7195. mounted(el, { value }, { transition }) {
  7196. if (transition && value) {
  7197. transition.enter(el);
  7198. }
  7199. },
  7200. updated(el, { value, oldValue }, { transition }) {
  7201. if (!value === !oldValue)
  7202. return;
  7203. if (transition) {
  7204. if (value) {
  7205. transition.beforeEnter(el);
  7206. setDisplay(el, true);
  7207. transition.enter(el);
  7208. } else {
  7209. transition.leave(el, () => {
  7210. setDisplay(el, false);
  7211. });
  7212. }
  7213. } else {
  7214. setDisplay(el, value);
  7215. }
  7216. },
  7217. beforeUnmount(el, { value }) {
  7218. setDisplay(el, value);
  7219. }
  7220. };
  7221. function setDisplay(el, value) {
  7222. el.style.display = value ? el[vShowOriginalDisplay] : "none";
  7223. el[vShowHidden] = !value;
  7224. }
  7225. const CSS_VAR_TEXT = Symbol("");
  7226. const displayRE = /(^|;)\s*display\s*:/;
  7227. function patchStyle(el, prev, next) {
  7228. const style2 = el.style;
  7229. const isCssString = isString(next);
  7230. let hasControlledDisplay = false;
  7231. if (next && !isCssString) {
  7232. if (prev) {
  7233. if (!isString(prev)) {
  7234. for (const key in prev) {
  7235. if (next[key] == null) {
  7236. setStyle(style2, key, "");
  7237. }
  7238. }
  7239. } else {
  7240. for (const prevStyle of prev.split(";")) {
  7241. const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
  7242. if (next[key] == null) {
  7243. setStyle(style2, key, "");
  7244. }
  7245. }
  7246. }
  7247. }
  7248. for (const key in next) {
  7249. if (key === "display") {
  7250. hasControlledDisplay = true;
  7251. }
  7252. setStyle(style2, key, next[key]);
  7253. }
  7254. } else {
  7255. if (isCssString) {
  7256. if (prev !== next) {
  7257. const cssVarText = style2[CSS_VAR_TEXT];
  7258. if (cssVarText) {
  7259. next += ";" + cssVarText;
  7260. }
  7261. style2.cssText = next;
  7262. hasControlledDisplay = displayRE.test(next);
  7263. }
  7264. } else if (prev) {
  7265. el.removeAttribute("style");
  7266. }
  7267. }
  7268. if (vShowOriginalDisplay in el) {
  7269. el[vShowOriginalDisplay] = hasControlledDisplay ? style2.display : "";
  7270. if (el[vShowHidden]) {
  7271. style2.display = "none";
  7272. }
  7273. }
  7274. }
  7275. const importantRE = /\s*!important$/;
  7276. function setStyle(style2, name, val) {
  7277. if (isArray$1(val)) {
  7278. val.forEach((v) => setStyle(style2, name, v));
  7279. } else {
  7280. if (val == null)
  7281. val = "";
  7282. if (name.startsWith("--")) {
  7283. style2.setProperty(name, val);
  7284. } else {
  7285. const prefixed = autoPrefix(style2, name);
  7286. if (importantRE.test(val)) {
  7287. style2.setProperty(
  7288. hyphenate(prefixed),
  7289. val.replace(importantRE, ""),
  7290. "important"
  7291. );
  7292. } else {
  7293. style2[prefixed] = val;
  7294. }
  7295. }
  7296. }
  7297. }
  7298. const prefixes = ["Webkit", "Moz", "ms"];
  7299. const prefixCache = {};
  7300. function autoPrefix(style2, rawName) {
  7301. const cached = prefixCache[rawName];
  7302. if (cached) {
  7303. return cached;
  7304. }
  7305. let name = camelize(rawName);
  7306. if (name !== "filter" && name in style2) {
  7307. return prefixCache[rawName] = name;
  7308. }
  7309. name = capitalize(name);
  7310. for (let i = 0; i < prefixes.length; i++) {
  7311. const prefixed = prefixes[i] + name;
  7312. if (prefixed in style2) {
  7313. return prefixCache[rawName] = prefixed;
  7314. }
  7315. }
  7316. return rawName;
  7317. }
  7318. const xlinkNS = "http://www.w3.org/1999/xlink";
  7319. function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key)) {
  7320. if (isSVG && key.startsWith("xlink:")) {
  7321. if (value == null) {
  7322. el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
  7323. } else {
  7324. el.setAttributeNS(xlinkNS, key, value);
  7325. }
  7326. } else {
  7327. if (value == null || isBoolean && !includeBooleanAttr(value)) {
  7328. el.removeAttribute(key);
  7329. } else {
  7330. el.setAttribute(
  7331. key,
  7332. isBoolean ? "" : isSymbol(value) ? String(value) : value
  7333. );
  7334. }
  7335. }
  7336. }
  7337. function patchDOMProp(el, key, value, parentComponent) {
  7338. if (key === "innerHTML" || key === "textContent") {
  7339. if (value != null) {
  7340. el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value;
  7341. }
  7342. return;
  7343. }
  7344. const tag = el.tagName;
  7345. if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
  7346. !tag.includes("-")) {
  7347. const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value;
  7348. const newValue = value == null ? (
  7349. // #11647: value should be set as empty string for null and undefined,
  7350. // but <input type="checkbox"> should be set as 'on'.
  7351. el.type === "checkbox" ? "on" : ""
  7352. ) : String(value);
  7353. if (oldValue !== newValue || !("_value" in el)) {
  7354. el.value = newValue;
  7355. }
  7356. if (value == null) {
  7357. el.removeAttribute(key);
  7358. }
  7359. el._value = value;
  7360. return;
  7361. }
  7362. let needRemove = false;
  7363. if (value === "" || value == null) {
  7364. const type = typeof el[key];
  7365. if (type === "boolean") {
  7366. value = includeBooleanAttr(value);
  7367. } else if (value == null && type === "string") {
  7368. value = "";
  7369. needRemove = true;
  7370. } else if (type === "number") {
  7371. value = 0;
  7372. needRemove = true;
  7373. }
  7374. }
  7375. try {
  7376. el[key] = value;
  7377. } catch (e) {
  7378. }
  7379. needRemove && el.removeAttribute(key);
  7380. }
  7381. function addEventListener(el, event, handler, options) {
  7382. el.addEventListener(event, handler, options);
  7383. }
  7384. function removeEventListener(el, event, handler, options) {
  7385. el.removeEventListener(event, handler, options);
  7386. }
  7387. const veiKey = Symbol("_vei");
  7388. function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
  7389. const invokers = el[veiKey] || (el[veiKey] = {});
  7390. const existingInvoker = invokers[rawName];
  7391. if (nextValue && existingInvoker) {
  7392. existingInvoker.value = nextValue;
  7393. } else {
  7394. const [name, options] = parseName(rawName);
  7395. if (nextValue) {
  7396. const invoker = invokers[rawName] = createInvoker(
  7397. nextValue,
  7398. instance
  7399. );
  7400. addEventListener(el, name, invoker, options);
  7401. } else if (existingInvoker) {
  7402. removeEventListener(el, name, existingInvoker, options);
  7403. invokers[rawName] = void 0;
  7404. }
  7405. }
  7406. }
  7407. const optionsModifierRE = /(?:Once|Passive|Capture)$/;
  7408. function parseName(name) {
  7409. let options;
  7410. if (optionsModifierRE.test(name)) {
  7411. options = {};
  7412. let m;
  7413. while (m = name.match(optionsModifierRE)) {
  7414. name = name.slice(0, name.length - m[0].length);
  7415. options[m[0].toLowerCase()] = true;
  7416. }
  7417. }
  7418. const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2));
  7419. return [event, options];
  7420. }
  7421. let cachedNow = 0;
  7422. const p = /* @__PURE__ */ Promise.resolve();
  7423. const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());
  7424. function createInvoker(initialValue, instance) {
  7425. const invoker = (e) => {
  7426. if (!e._vts) {
  7427. e._vts = Date.now();
  7428. } else if (e._vts <= invoker.attached) {
  7429. return;
  7430. }
  7431. callWithAsyncErrorHandling(
  7432. patchStopImmediatePropagation(e, invoker.value),
  7433. instance,
  7434. 5,
  7435. [e]
  7436. );
  7437. };
  7438. invoker.value = initialValue;
  7439. invoker.attached = getNow();
  7440. return invoker;
  7441. }
  7442. function patchStopImmediatePropagation(e, value) {
  7443. if (isArray$1(value)) {
  7444. const originalStop = e.stopImmediatePropagation;
  7445. e.stopImmediatePropagation = () => {
  7446. originalStop.call(e);
  7447. e._stopped = true;
  7448. };
  7449. return value.map(
  7450. (fn) => (e2) => !e2._stopped && fn && fn(e2)
  7451. );
  7452. } else {
  7453. return value;
  7454. }
  7455. }
  7456. const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter
  7457. key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;
  7458. const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => {
  7459. const isSVG = namespace === "svg";
  7460. if (key === "class") {
  7461. patchClass(el, nextValue, isSVG);
  7462. } else if (key === "style") {
  7463. patchStyle(el, prevValue, nextValue);
  7464. } else if (isOn(key)) {
  7465. if (!isModelListener(key)) {
  7466. patchEvent(el, key, prevValue, nextValue, parentComponent);
  7467. }
  7468. } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) {
  7469. patchDOMProp(el, key, nextValue);
  7470. if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) {
  7471. patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value");
  7472. }
  7473. } else {
  7474. if (key === "true-value") {
  7475. el._trueValue = nextValue;
  7476. } else if (key === "false-value") {
  7477. el._falseValue = nextValue;
  7478. }
  7479. patchAttr(el, key, nextValue, isSVG);
  7480. }
  7481. };
  7482. function shouldSetAsProp(el, key, value, isSVG) {
  7483. if (isSVG) {
  7484. if (key === "innerHTML" || key === "textContent") {
  7485. return true;
  7486. }
  7487. if (key in el && isNativeOn(key) && isFunction(value)) {
  7488. return true;
  7489. }
  7490. return false;
  7491. }
  7492. if (key === "spellcheck" || key === "draggable" || key === "translate") {
  7493. return false;
  7494. }
  7495. if (key === "form") {
  7496. return false;
  7497. }
  7498. if (key === "list" && el.tagName === "INPUT") {
  7499. return false;
  7500. }
  7501. if (key === "type" && el.tagName === "TEXTAREA") {
  7502. return false;
  7503. }
  7504. if (key === "width" || key === "height") {
  7505. const tag = el.tagName;
  7506. if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") {
  7507. return false;
  7508. }
  7509. }
  7510. if (isNativeOn(key) && isString(value)) {
  7511. return false;
  7512. }
  7513. if (key in el) {
  7514. return true;
  7515. }
  7516. if (el._isVueCE && (/[A-Z]/.test(key) || !isString(value))) {
  7517. return true;
  7518. }
  7519. return false;
  7520. }
  7521. const systemModifiers = ["ctrl", "shift", "alt", "meta"];
  7522. const modifierGuards = {
  7523. stop: (e) => e.stopPropagation(),
  7524. prevent: (e) => e.preventDefault(),
  7525. self: (e) => e.target !== e.currentTarget,
  7526. ctrl: (e) => !e.ctrlKey,
  7527. shift: (e) => !e.shiftKey,
  7528. alt: (e) => !e.altKey,
  7529. meta: (e) => !e.metaKey,
  7530. left: (e) => "button" in e && e.button !== 0,
  7531. middle: (e) => "button" in e && e.button !== 1,
  7532. right: (e) => "button" in e && e.button !== 2,
  7533. exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
  7534. };
  7535. const withModifiers = (fn, modifiers) => {
  7536. const cache = fn._withMods || (fn._withMods = {});
  7537. const cacheKey = modifiers.join(".");
  7538. return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => {
  7539. for (let i = 0; i < modifiers.length; i++) {
  7540. const guard = modifierGuards[modifiers[i]];
  7541. if (guard && guard(event, modifiers))
  7542. return;
  7543. }
  7544. return fn(event, ...args);
  7545. });
  7546. };
  7547. const keyNames = {
  7548. esc: "escape",
  7549. space: " ",
  7550. up: "arrow-up",
  7551. left: "arrow-left",
  7552. right: "arrow-right",
  7553. down: "arrow-down",
  7554. delete: "backspace"
  7555. };
  7556. const withKeys = (fn, modifiers) => {
  7557. const cache = fn._withKeys || (fn._withKeys = {});
  7558. const cacheKey = modifiers.join(".");
  7559. return cache[cacheKey] || (cache[cacheKey] = (event) => {
  7560. if (!("key" in event)) {
  7561. return;
  7562. }
  7563. const eventKey = hyphenate(event.key);
  7564. if (modifiers.some(
  7565. (k) => k === eventKey || keyNames[k] === eventKey
  7566. )) {
  7567. return fn(event);
  7568. }
  7569. });
  7570. };
  7571. const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
  7572. let renderer;
  7573. function ensureRenderer() {
  7574. return renderer || (renderer = createRenderer(rendererOptions));
  7575. }
  7576. const createApp = (...args) => {
  7577. const app2 = ensureRenderer().createApp(...args);
  7578. const { mount } = app2;
  7579. app2.mount = (containerOrSelector) => {
  7580. const container = normalizeContainer(containerOrSelector);
  7581. if (!container)
  7582. return;
  7583. const component = app2._component;
  7584. if (!isFunction(component) && !component.render && !component.template) {
  7585. component.template = container.innerHTML;
  7586. }
  7587. if (container.nodeType === 1) {
  7588. container.textContent = "";
  7589. }
  7590. const proxy = mount(container, false, resolveRootNamespace(container));
  7591. if (container instanceof Element) {
  7592. container.removeAttribute("v-cloak");
  7593. container.setAttribute("data-v-app", "");
  7594. }
  7595. return proxy;
  7596. };
  7597. return app2;
  7598. };
  7599. function resolveRootNamespace(container) {
  7600. if (container instanceof SVGElement) {
  7601. return "svg";
  7602. }
  7603. if (typeof MathMLElement === "function" && container instanceof MathMLElement) {
  7604. return "mathml";
  7605. }
  7606. }
  7607. function normalizeContainer(container) {
  7608. if (isString(container)) {
  7609. const res = document.querySelector(container);
  7610. return res;
  7611. }
  7612. return container;
  7613. }
  7614. const style = "";
  7615. const _export_sfc = (sfc, props) => {
  7616. const target = sfc.__vccOpts || sfc;
  7617. for (const [key, val] of props) {
  7618. target[key] = val;
  7619. }
  7620. return target;
  7621. };
  7622. const _sfc_main = {};
  7623. function _sfc_render(_ctx, _cache) {
  7624. const _component_router_view = resolveComponent("router-view");
  7625. return openBlock(), createBlock(_component_router_view, null, {
  7626. default: withCtx(({ Component, route }) => [
  7627. route.meta.keepAlive ? (openBlock(), createBlock(KeepAlive, { key: 0 }, [
  7628. (openBlock(), createBlock(resolveDynamicComponent(Component)))
  7629. ], 1024)) : (openBlock(), createBlock(resolveDynamicComponent(Component), { key: 1 }))
  7630. ]),
  7631. _: 1
  7632. });
  7633. }
  7634. const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
  7635. const iconfont = "";
  7636. const scriptRel = "modulepreload";
  7637. const assetsURL = function(dep) {
  7638. return "/" + dep;
  7639. };
  7640. const seen = {};
  7641. const __vitePreload = function preload(baseModule, deps, importerUrl) {
  7642. if (!deps || deps.length === 0) {
  7643. return baseModule();
  7644. }
  7645. const links = document.getElementsByTagName("link");
  7646. return Promise.all(deps.map((dep) => {
  7647. dep = assetsURL(dep);
  7648. if (dep in seen)
  7649. return;
  7650. seen[dep] = true;
  7651. const isCss = dep.endsWith(".css");
  7652. const cssSelector = isCss ? '[rel="stylesheet"]' : "";
  7653. const isBaseRelative = !!importerUrl;
  7654. if (isBaseRelative) {
  7655. for (let i = links.length - 1; i >= 0; i--) {
  7656. const link2 = links[i];
  7657. if (link2.href === dep && (!isCss || link2.rel === "stylesheet")) {
  7658. return;
  7659. }
  7660. }
  7661. } else if (document.querySelector(`link[href="${dep}"]${cssSelector}`)) {
  7662. return;
  7663. }
  7664. const link = document.createElement("link");
  7665. link.rel = isCss ? "stylesheet" : scriptRel;
  7666. if (!isCss) {
  7667. link.as = "script";
  7668. link.crossOrigin = "";
  7669. }
  7670. link.href = dep;
  7671. document.head.appendChild(link);
  7672. if (isCss) {
  7673. return new Promise((res, rej) => {
  7674. link.addEventListener("load", res);
  7675. link.addEventListener("error", () => rej(new Error(`Unable to preload CSS for ${dep}`)));
  7676. });
  7677. }
  7678. })).then(() => baseModule()).catch((err) => {
  7679. const e = new Event("vite:preloadError", { cancelable: true });
  7680. e.payload = err;
  7681. window.dispatchEvent(e);
  7682. if (!e.defaultPrevented) {
  7683. throw err;
  7684. }
  7685. });
  7686. };
  7687. /*!
  7688. * vue-router v4.4.4
  7689. * (c) 2024 Eduardo San Martin Morote
  7690. * @license MIT
  7691. */
  7692. const isBrowser = typeof document !== "undefined";
  7693. function isRouteComponent(component) {
  7694. return typeof component === "object" || "displayName" in component || "props" in component || "__vccOpts" in component;
  7695. }
  7696. function isESModule(obj) {
  7697. return obj.__esModule || obj[Symbol.toStringTag] === "Module" || // support CF with dynamic imports that do not
  7698. // add the Module string tag
  7699. obj.default && isRouteComponent(obj.default);
  7700. }
  7701. const assign$1 = Object.assign;
  7702. function applyToParams(fn, params) {
  7703. const newParams = {};
  7704. for (const key in params) {
  7705. const value = params[key];
  7706. newParams[key] = isArray(value) ? value.map(fn) : fn(value);
  7707. }
  7708. return newParams;
  7709. }
  7710. const noop$1 = () => {
  7711. };
  7712. const isArray = Array.isArray;
  7713. const HASH_RE = /#/g;
  7714. const AMPERSAND_RE = /&/g;
  7715. const SLASH_RE = /\//g;
  7716. const EQUAL_RE = /=/g;
  7717. const IM_RE = /\?/g;
  7718. const PLUS_RE = /\+/g;
  7719. const ENC_BRACKET_OPEN_RE = /%5B/g;
  7720. const ENC_BRACKET_CLOSE_RE = /%5D/g;
  7721. const ENC_CARET_RE = /%5E/g;
  7722. const ENC_BACKTICK_RE = /%60/g;
  7723. const ENC_CURLY_OPEN_RE = /%7B/g;
  7724. const ENC_PIPE_RE = /%7C/g;
  7725. const ENC_CURLY_CLOSE_RE = /%7D/g;
  7726. const ENC_SPACE_RE = /%20/g;
  7727. function commonEncode(text) {
  7728. return encodeURI("" + text).replace(ENC_PIPE_RE, "|").replace(ENC_BRACKET_OPEN_RE, "[").replace(ENC_BRACKET_CLOSE_RE, "]");
  7729. }
  7730. function encodeHash(text) {
  7731. return commonEncode(text).replace(ENC_CURLY_OPEN_RE, "{").replace(ENC_CURLY_CLOSE_RE, "}").replace(ENC_CARET_RE, "^");
  7732. }
  7733. function encodeQueryValue(text) {
  7734. return commonEncode(text).replace(PLUS_RE, "%2B").replace(ENC_SPACE_RE, "+").replace(HASH_RE, "%23").replace(AMPERSAND_RE, "%26").replace(ENC_BACKTICK_RE, "`").replace(ENC_CURLY_OPEN_RE, "{").replace(ENC_CURLY_CLOSE_RE, "}").replace(ENC_CARET_RE, "^");
  7735. }
  7736. function encodeQueryKey(text) {
  7737. return encodeQueryValue(text).replace(EQUAL_RE, "%3D");
  7738. }
  7739. function encodePath(text) {
  7740. return commonEncode(text).replace(HASH_RE, "%23").replace(IM_RE, "%3F");
  7741. }
  7742. function encodeParam(text) {
  7743. return text == null ? "" : encodePath(text).replace(SLASH_RE, "%2F");
  7744. }
  7745. function decode(text) {
  7746. try {
  7747. return decodeURIComponent("" + text);
  7748. } catch (err) {
  7749. }
  7750. return "" + text;
  7751. }
  7752. const TRAILING_SLASH_RE = /\/$/;
  7753. const removeTrailingSlash = (path) => path.replace(TRAILING_SLASH_RE, "");
  7754. function parseURL(parseQuery2, location2, currentLocation = "/") {
  7755. let path, query = {}, searchString = "", hash = "";
  7756. const hashPos = location2.indexOf("#");
  7757. let searchPos = location2.indexOf("?");
  7758. if (hashPos < searchPos && hashPos >= 0) {
  7759. searchPos = -1;
  7760. }
  7761. if (searchPos > -1) {
  7762. path = location2.slice(0, searchPos);
  7763. searchString = location2.slice(searchPos + 1, hashPos > -1 ? hashPos : location2.length);
  7764. query = parseQuery2(searchString);
  7765. }
  7766. if (hashPos > -1) {
  7767. path = path || location2.slice(0, hashPos);
  7768. hash = location2.slice(hashPos, location2.length);
  7769. }
  7770. path = resolveRelativePath(path != null ? path : location2, currentLocation);
  7771. return {
  7772. fullPath: path + (searchString && "?") + searchString + hash,
  7773. path,
  7774. query,
  7775. hash: decode(hash)
  7776. };
  7777. }
  7778. function stringifyURL(stringifyQuery2, location2) {
  7779. const query = location2.query ? stringifyQuery2(location2.query) : "";
  7780. return location2.path + (query && "?") + query + (location2.hash || "");
  7781. }
  7782. function stripBase(pathname, base2) {
  7783. if (!base2 || !pathname.toLowerCase().startsWith(base2.toLowerCase()))
  7784. return pathname;
  7785. return pathname.slice(base2.length) || "/";
  7786. }
  7787. function isSameRouteLocation(stringifyQuery2, a, b) {
  7788. const aLastIndex = a.matched.length - 1;
  7789. const bLastIndex = b.matched.length - 1;
  7790. return aLastIndex > -1 && aLastIndex === bLastIndex && isSameRouteRecord(a.matched[aLastIndex], b.matched[bLastIndex]) && isSameRouteLocationParams(a.params, b.params) && stringifyQuery2(a.query) === stringifyQuery2(b.query) && a.hash === b.hash;
  7791. }
  7792. function isSameRouteRecord(a, b) {
  7793. return (a.aliasOf || a) === (b.aliasOf || b);
  7794. }
  7795. function isSameRouteLocationParams(a, b) {
  7796. if (Object.keys(a).length !== Object.keys(b).length)
  7797. return false;
  7798. for (const key in a) {
  7799. if (!isSameRouteLocationParamsValue(a[key], b[key]))
  7800. return false;
  7801. }
  7802. return true;
  7803. }
  7804. function isSameRouteLocationParamsValue(a, b) {
  7805. return isArray(a) ? isEquivalentArray(a, b) : isArray(b) ? isEquivalentArray(b, a) : a === b;
  7806. }
  7807. function isEquivalentArray(a, b) {
  7808. return isArray(b) ? a.length === b.length && a.every((value, i) => value === b[i]) : a.length === 1 && a[0] === b;
  7809. }
  7810. function resolveRelativePath(to, from) {
  7811. if (to.startsWith("/"))
  7812. return to;
  7813. if (!to)
  7814. return from;
  7815. const fromSegments = from.split("/");
  7816. const toSegments = to.split("/");
  7817. const lastToSegment = toSegments[toSegments.length - 1];
  7818. if (lastToSegment === ".." || lastToSegment === ".") {
  7819. toSegments.push("");
  7820. }
  7821. let position = fromSegments.length - 1;
  7822. let toPosition;
  7823. let segment;
  7824. for (toPosition = 0; toPosition < toSegments.length; toPosition++) {
  7825. segment = toSegments[toPosition];
  7826. if (segment === ".")
  7827. continue;
  7828. if (segment === "..") {
  7829. if (position > 1)
  7830. position--;
  7831. } else
  7832. break;
  7833. }
  7834. return fromSegments.slice(0, position).join("/") + "/" + toSegments.slice(toPosition).join("/");
  7835. }
  7836. const START_LOCATION_NORMALIZED = {
  7837. path: "/",
  7838. // TODO: could we use a symbol in the future?
  7839. name: void 0,
  7840. params: {},
  7841. query: {},
  7842. hash: "",
  7843. fullPath: "/",
  7844. matched: [],
  7845. meta: {},
  7846. redirectedFrom: void 0
  7847. };
  7848. var NavigationType;
  7849. (function(NavigationType2) {
  7850. NavigationType2["pop"] = "pop";
  7851. NavigationType2["push"] = "push";
  7852. })(NavigationType || (NavigationType = {}));
  7853. var NavigationDirection;
  7854. (function(NavigationDirection2) {
  7855. NavigationDirection2["back"] = "back";
  7856. NavigationDirection2["forward"] = "forward";
  7857. NavigationDirection2["unknown"] = "";
  7858. })(NavigationDirection || (NavigationDirection = {}));
  7859. function normalizeBase(base2) {
  7860. if (!base2) {
  7861. if (isBrowser) {
  7862. const baseEl = document.querySelector("base");
  7863. base2 = baseEl && baseEl.getAttribute("href") || "/";
  7864. base2 = base2.replace(/^\w+:\/\/[^\/]+/, "");
  7865. } else {
  7866. base2 = "/";
  7867. }
  7868. }
  7869. if (base2[0] !== "/" && base2[0] !== "#")
  7870. base2 = "/" + base2;
  7871. return removeTrailingSlash(base2);
  7872. }
  7873. const BEFORE_HASH_RE = /^[^#]+#/;
  7874. function createHref(base2, location2) {
  7875. return base2.replace(BEFORE_HASH_RE, "#") + location2;
  7876. }
  7877. function getElementPosition(el, offset) {
  7878. const docRect = document.documentElement.getBoundingClientRect();
  7879. const elRect = el.getBoundingClientRect();
  7880. return {
  7881. behavior: offset.behavior,
  7882. left: elRect.left - docRect.left - (offset.left || 0),
  7883. top: elRect.top - docRect.top - (offset.top || 0)
  7884. };
  7885. }
  7886. const computeScrollPosition = () => ({
  7887. left: window.scrollX,
  7888. top: window.scrollY
  7889. });
  7890. function scrollToPosition(position) {
  7891. let scrollToOptions;
  7892. if ("el" in position) {
  7893. const positionEl = position.el;
  7894. const isIdSelector = typeof positionEl === "string" && positionEl.startsWith("#");
  7895. const el = typeof positionEl === "string" ? isIdSelector ? document.getElementById(positionEl.slice(1)) : document.querySelector(positionEl) : positionEl;
  7896. if (!el) {
  7897. return;
  7898. }
  7899. scrollToOptions = getElementPosition(el, position);
  7900. } else {
  7901. scrollToOptions = position;
  7902. }
  7903. if ("scrollBehavior" in document.documentElement.style)
  7904. window.scrollTo(scrollToOptions);
  7905. else {
  7906. window.scrollTo(scrollToOptions.left != null ? scrollToOptions.left : window.scrollX, scrollToOptions.top != null ? scrollToOptions.top : window.scrollY);
  7907. }
  7908. }
  7909. function getScrollKey(path, delta) {
  7910. const position = history.state ? history.state.position - delta : -1;
  7911. return position + path;
  7912. }
  7913. const scrollPositions = /* @__PURE__ */ new Map();
  7914. function saveScrollPosition(key, scrollPosition) {
  7915. scrollPositions.set(key, scrollPosition);
  7916. }
  7917. function getSavedScrollPosition(key) {
  7918. const scroll = scrollPositions.get(key);
  7919. scrollPositions.delete(key);
  7920. return scroll;
  7921. }
  7922. let createBaseLocation = () => location.protocol + "//" + location.host;
  7923. function createCurrentLocation(base2, location2) {
  7924. const { pathname, search, hash } = location2;
  7925. const hashPos = base2.indexOf("#");
  7926. if (hashPos > -1) {
  7927. let slicePos = hash.includes(base2.slice(hashPos)) ? base2.slice(hashPos).length : 1;
  7928. let pathFromHash = hash.slice(slicePos);
  7929. if (pathFromHash[0] !== "/")
  7930. pathFromHash = "/" + pathFromHash;
  7931. return stripBase(pathFromHash, "");
  7932. }
  7933. const path = stripBase(pathname, base2);
  7934. return path + search + hash;
  7935. }
  7936. function useHistoryListeners(base2, historyState, currentLocation, replace) {
  7937. let listeners = [];
  7938. let teardowns = [];
  7939. let pauseState = null;
  7940. const popStateHandler = ({ state }) => {
  7941. const to = createCurrentLocation(base2, location);
  7942. const from = currentLocation.value;
  7943. const fromState = historyState.value;
  7944. let delta = 0;
  7945. if (state) {
  7946. currentLocation.value = to;
  7947. historyState.value = state;
  7948. if (pauseState && pauseState === from) {
  7949. pauseState = null;
  7950. return;
  7951. }
  7952. delta = fromState ? state.position - fromState.position : 0;
  7953. } else {
  7954. replace(to);
  7955. }
  7956. listeners.forEach((listener) => {
  7957. listener(currentLocation.value, from, {
  7958. delta,
  7959. type: NavigationType.pop,
  7960. direction: delta ? delta > 0 ? NavigationDirection.forward : NavigationDirection.back : NavigationDirection.unknown
  7961. });
  7962. });
  7963. };
  7964. function pauseListeners() {
  7965. pauseState = currentLocation.value;
  7966. }
  7967. function listen(callback) {
  7968. listeners.push(callback);
  7969. const teardown = () => {
  7970. const index2 = listeners.indexOf(callback);
  7971. if (index2 > -1)
  7972. listeners.splice(index2, 1);
  7973. };
  7974. teardowns.push(teardown);
  7975. return teardown;
  7976. }
  7977. function beforeUnloadListener() {
  7978. const { history: history2 } = window;
  7979. if (!history2.state)
  7980. return;
  7981. history2.replaceState(assign$1({}, history2.state, { scroll: computeScrollPosition() }), "");
  7982. }
  7983. function destroy() {
  7984. for (const teardown of teardowns)
  7985. teardown();
  7986. teardowns = [];
  7987. window.removeEventListener("popstate", popStateHandler);
  7988. window.removeEventListener("beforeunload", beforeUnloadListener);
  7989. }
  7990. window.addEventListener("popstate", popStateHandler);
  7991. window.addEventListener("beforeunload", beforeUnloadListener, {
  7992. passive: true
  7993. });
  7994. return {
  7995. pauseListeners,
  7996. listen,
  7997. destroy
  7998. };
  7999. }
  8000. function buildState(back, current, forward, replaced = false, computeScroll = false) {
  8001. return {
  8002. back,
  8003. current,
  8004. forward,
  8005. replaced,
  8006. position: window.history.length,
  8007. scroll: computeScroll ? computeScrollPosition() : null
  8008. };
  8009. }
  8010. function useHistoryStateNavigation(base2) {
  8011. const { history: history2, location: location2 } = window;
  8012. const currentLocation = {
  8013. value: createCurrentLocation(base2, location2)
  8014. };
  8015. const historyState = { value: history2.state };
  8016. if (!historyState.value) {
  8017. changeLocation(currentLocation.value, {
  8018. back: null,
  8019. current: currentLocation.value,
  8020. forward: null,
  8021. // the length is off by one, we need to decrease it
  8022. position: history2.length - 1,
  8023. replaced: true,
  8024. // don't add a scroll as the user may have an anchor, and we want
  8025. // scrollBehavior to be triggered without a saved position
  8026. scroll: null
  8027. }, true);
  8028. }
  8029. function changeLocation(to, state, replace2) {
  8030. const hashIndex = base2.indexOf("#");
  8031. const url = hashIndex > -1 ? (location2.host && document.querySelector("base") ? base2 : base2.slice(hashIndex)) + to : createBaseLocation() + base2 + to;
  8032. try {
  8033. history2[replace2 ? "replaceState" : "pushState"](state, "", url);
  8034. historyState.value = state;
  8035. } catch (err) {
  8036. {
  8037. console.error(err);
  8038. }
  8039. location2[replace2 ? "replace" : "assign"](url);
  8040. }
  8041. }
  8042. function replace(to, data) {
  8043. const state = assign$1({}, history2.state, buildState(
  8044. historyState.value.back,
  8045. // keep back and forward entries but override current position
  8046. to,
  8047. historyState.value.forward,
  8048. true
  8049. ), data, { position: historyState.value.position });
  8050. changeLocation(to, state, true);
  8051. currentLocation.value = to;
  8052. }
  8053. function push(to, data) {
  8054. const currentState = assign$1(
  8055. {},
  8056. // use current history state to gracefully handle a wrong call to
  8057. // history.replaceState
  8058. // https://github.com/vuejs/router/issues/366
  8059. historyState.value,
  8060. history2.state,
  8061. {
  8062. forward: to,
  8063. scroll: computeScrollPosition()
  8064. }
  8065. );
  8066. changeLocation(currentState.current, currentState, true);
  8067. const state = assign$1({}, buildState(currentLocation.value, to, null), { position: currentState.position + 1 }, data);
  8068. changeLocation(to, state, false);
  8069. currentLocation.value = to;
  8070. }
  8071. return {
  8072. location: currentLocation,
  8073. state: historyState,
  8074. push,
  8075. replace
  8076. };
  8077. }
  8078. function createWebHistory(base2) {
  8079. base2 = normalizeBase(base2);
  8080. const historyNavigation = useHistoryStateNavigation(base2);
  8081. const historyListeners = useHistoryListeners(base2, historyNavigation.state, historyNavigation.location, historyNavigation.replace);
  8082. function go(delta, triggerListeners = true) {
  8083. if (!triggerListeners)
  8084. historyListeners.pauseListeners();
  8085. history.go(delta);
  8086. }
  8087. const routerHistory = assign$1({
  8088. // it's overridden right after
  8089. location: "",
  8090. base: base2,
  8091. go,
  8092. createHref: createHref.bind(null, base2)
  8093. }, historyNavigation, historyListeners);
  8094. Object.defineProperty(routerHistory, "location", {
  8095. enumerable: true,
  8096. get: () => historyNavigation.location.value
  8097. });
  8098. Object.defineProperty(routerHistory, "state", {
  8099. enumerable: true,
  8100. get: () => historyNavigation.state.value
  8101. });
  8102. return routerHistory;
  8103. }
  8104. function createWebHashHistory(base2) {
  8105. base2 = location.host ? base2 || location.pathname + location.search : "";
  8106. if (!base2.includes("#"))
  8107. base2 += "#";
  8108. return createWebHistory(base2);
  8109. }
  8110. function isRouteLocation(route) {
  8111. return typeof route === "string" || route && typeof route === "object";
  8112. }
  8113. function isRouteName(name) {
  8114. return typeof name === "string" || typeof name === "symbol";
  8115. }
  8116. const NavigationFailureSymbol = Symbol("");
  8117. var NavigationFailureType;
  8118. (function(NavigationFailureType2) {
  8119. NavigationFailureType2[NavigationFailureType2["aborted"] = 4] = "aborted";
  8120. NavigationFailureType2[NavigationFailureType2["cancelled"] = 8] = "cancelled";
  8121. NavigationFailureType2[NavigationFailureType2["duplicated"] = 16] = "duplicated";
  8122. })(NavigationFailureType || (NavigationFailureType = {}));
  8123. function createRouterError(type, params) {
  8124. {
  8125. return assign$1(new Error(), {
  8126. type,
  8127. [NavigationFailureSymbol]: true
  8128. }, params);
  8129. }
  8130. }
  8131. function isNavigationFailure(error, type) {
  8132. return error instanceof Error && NavigationFailureSymbol in error && (type == null || !!(error.type & type));
  8133. }
  8134. const BASE_PARAM_PATTERN = "[^/]+?";
  8135. const BASE_PATH_PARSER_OPTIONS = {
  8136. sensitive: false,
  8137. strict: false,
  8138. start: true,
  8139. end: true
  8140. };
  8141. const REGEX_CHARS_RE = /[.+*?^${}()[\]/\\]/g;
  8142. function tokensToParser(segments, extraOptions) {
  8143. const options = assign$1({}, BASE_PATH_PARSER_OPTIONS, extraOptions);
  8144. const score = [];
  8145. let pattern = options.start ? "^" : "";
  8146. const keys = [];
  8147. for (const segment of segments) {
  8148. const segmentScores = segment.length ? [] : [
  8149. 90
  8150. /* PathScore.Root */
  8151. ];
  8152. if (options.strict && !segment.length)
  8153. pattern += "/";
  8154. for (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) {
  8155. const token = segment[tokenIndex];
  8156. let subSegmentScore = 40 + (options.sensitive ? 0.25 : 0);
  8157. if (token.type === 0) {
  8158. if (!tokenIndex)
  8159. pattern += "/";
  8160. pattern += token.value.replace(REGEX_CHARS_RE, "\\$&");
  8161. subSegmentScore += 40;
  8162. } else if (token.type === 1) {
  8163. const { value, repeatable, optional, regexp } = token;
  8164. keys.push({
  8165. name: value,
  8166. repeatable,
  8167. optional
  8168. });
  8169. const re2 = regexp ? regexp : BASE_PARAM_PATTERN;
  8170. if (re2 !== BASE_PARAM_PATTERN) {
  8171. subSegmentScore += 10;
  8172. try {
  8173. new RegExp(`(${re2})`);
  8174. } catch (err) {
  8175. throw new Error(`Invalid custom RegExp for param "${value}" (${re2}): ` + err.message);
  8176. }
  8177. }
  8178. let subPattern = repeatable ? `((?:${re2})(?:/(?:${re2}))*)` : `(${re2})`;
  8179. if (!tokenIndex)
  8180. subPattern = // avoid an optional / if there are more segments e.g. /:p?-static
  8181. // or /:p?-:p2
  8182. optional && segment.length < 2 ? `(?:/${subPattern})` : "/" + subPattern;
  8183. if (optional)
  8184. subPattern += "?";
  8185. pattern += subPattern;
  8186. subSegmentScore += 20;
  8187. if (optional)
  8188. subSegmentScore += -8;
  8189. if (repeatable)
  8190. subSegmentScore += -20;
  8191. if (re2 === ".*")
  8192. subSegmentScore += -50;
  8193. }
  8194. segmentScores.push(subSegmentScore);
  8195. }
  8196. score.push(segmentScores);
  8197. }
  8198. if (options.strict && options.end) {
  8199. const i = score.length - 1;
  8200. score[i][score[i].length - 1] += 0.7000000000000001;
  8201. }
  8202. if (!options.strict)
  8203. pattern += "/?";
  8204. if (options.end)
  8205. pattern += "$";
  8206. else if (options.strict)
  8207. pattern += "(?:/|$)";
  8208. const re = new RegExp(pattern, options.sensitive ? "" : "i");
  8209. function parse(path) {
  8210. const match = path.match(re);
  8211. const params = {};
  8212. if (!match)
  8213. return null;
  8214. for (let i = 1; i < match.length; i++) {
  8215. const value = match[i] || "";
  8216. const key = keys[i - 1];
  8217. params[key.name] = value && key.repeatable ? value.split("/") : value;
  8218. }
  8219. return params;
  8220. }
  8221. function stringify(params) {
  8222. let path = "";
  8223. let avoidDuplicatedSlash = false;
  8224. for (const segment of segments) {
  8225. if (!avoidDuplicatedSlash || !path.endsWith("/"))
  8226. path += "/";
  8227. avoidDuplicatedSlash = false;
  8228. for (const token of segment) {
  8229. if (token.type === 0) {
  8230. path += token.value;
  8231. } else if (token.type === 1) {
  8232. const { value, repeatable, optional } = token;
  8233. const param = value in params ? params[value] : "";
  8234. if (isArray(param) && !repeatable) {
  8235. throw new Error(`Provided param "${value}" is an array but it is not repeatable (* or + modifiers)`);
  8236. }
  8237. const text = isArray(param) ? param.join("/") : param;
  8238. if (!text) {
  8239. if (optional) {
  8240. if (segment.length < 2) {
  8241. if (path.endsWith("/"))
  8242. path = path.slice(0, -1);
  8243. else
  8244. avoidDuplicatedSlash = true;
  8245. }
  8246. } else
  8247. throw new Error(`Missing required param "${value}"`);
  8248. }
  8249. path += text;
  8250. }
  8251. }
  8252. }
  8253. return path || "/";
  8254. }
  8255. return {
  8256. re,
  8257. score,
  8258. keys,
  8259. parse,
  8260. stringify
  8261. };
  8262. }
  8263. function compareScoreArray(a, b) {
  8264. let i = 0;
  8265. while (i < a.length && i < b.length) {
  8266. const diff = b[i] - a[i];
  8267. if (diff)
  8268. return diff;
  8269. i++;
  8270. }
  8271. if (a.length < b.length) {
  8272. return a.length === 1 && a[0] === 40 + 40 ? -1 : 1;
  8273. } else if (a.length > b.length) {
  8274. return b.length === 1 && b[0] === 40 + 40 ? 1 : -1;
  8275. }
  8276. return 0;
  8277. }
  8278. function comparePathParserScore(a, b) {
  8279. let i = 0;
  8280. const aScore = a.score;
  8281. const bScore = b.score;
  8282. while (i < aScore.length && i < bScore.length) {
  8283. const comp = compareScoreArray(aScore[i], bScore[i]);
  8284. if (comp)
  8285. return comp;
  8286. i++;
  8287. }
  8288. if (Math.abs(bScore.length - aScore.length) === 1) {
  8289. if (isLastScoreNegative(aScore))
  8290. return 1;
  8291. if (isLastScoreNegative(bScore))
  8292. return -1;
  8293. }
  8294. return bScore.length - aScore.length;
  8295. }
  8296. function isLastScoreNegative(score) {
  8297. const last = score[score.length - 1];
  8298. return score.length > 0 && last[last.length - 1] < 0;
  8299. }
  8300. const ROOT_TOKEN = {
  8301. type: 0,
  8302. value: ""
  8303. };
  8304. const VALID_PARAM_RE = /[a-zA-Z0-9_]/;
  8305. function tokenizePath(path) {
  8306. if (!path)
  8307. return [[]];
  8308. if (path === "/")
  8309. return [[ROOT_TOKEN]];
  8310. if (!path.startsWith("/")) {
  8311. throw new Error(`Invalid path "${path}"`);
  8312. }
  8313. function crash(message) {
  8314. throw new Error(`ERR (${state})/"${buffer}": ${message}`);
  8315. }
  8316. let state = 0;
  8317. let previousState = state;
  8318. const tokens = [];
  8319. let segment;
  8320. function finalizeSegment() {
  8321. if (segment)
  8322. tokens.push(segment);
  8323. segment = [];
  8324. }
  8325. let i = 0;
  8326. let char;
  8327. let buffer = "";
  8328. let customRe = "";
  8329. function consumeBuffer() {
  8330. if (!buffer)
  8331. return;
  8332. if (state === 0) {
  8333. segment.push({
  8334. type: 0,
  8335. value: buffer
  8336. });
  8337. } else if (state === 1 || state === 2 || state === 3) {
  8338. if (segment.length > 1 && (char === "*" || char === "+"))
  8339. crash(`A repeatable param (${buffer}) must be alone in its segment. eg: '/:ids+.`);
  8340. segment.push({
  8341. type: 1,
  8342. value: buffer,
  8343. regexp: customRe,
  8344. repeatable: char === "*" || char === "+",
  8345. optional: char === "*" || char === "?"
  8346. });
  8347. } else {
  8348. crash("Invalid state to consume buffer");
  8349. }
  8350. buffer = "";
  8351. }
  8352. function addCharToBuffer() {
  8353. buffer += char;
  8354. }
  8355. while (i < path.length) {
  8356. char = path[i++];
  8357. if (char === "\\" && state !== 2) {
  8358. previousState = state;
  8359. state = 4;
  8360. continue;
  8361. }
  8362. switch (state) {
  8363. case 0:
  8364. if (char === "/") {
  8365. if (buffer) {
  8366. consumeBuffer();
  8367. }
  8368. finalizeSegment();
  8369. } else if (char === ":") {
  8370. consumeBuffer();
  8371. state = 1;
  8372. } else {
  8373. addCharToBuffer();
  8374. }
  8375. break;
  8376. case 4:
  8377. addCharToBuffer();
  8378. state = previousState;
  8379. break;
  8380. case 1:
  8381. if (char === "(") {
  8382. state = 2;
  8383. } else if (VALID_PARAM_RE.test(char)) {
  8384. addCharToBuffer();
  8385. } else {
  8386. consumeBuffer();
  8387. state = 0;
  8388. if (char !== "*" && char !== "?" && char !== "+")
  8389. i--;
  8390. }
  8391. break;
  8392. case 2:
  8393. if (char === ")") {
  8394. if (customRe[customRe.length - 1] == "\\")
  8395. customRe = customRe.slice(0, -1) + char;
  8396. else
  8397. state = 3;
  8398. } else {
  8399. customRe += char;
  8400. }
  8401. break;
  8402. case 3:
  8403. consumeBuffer();
  8404. state = 0;
  8405. if (char !== "*" && char !== "?" && char !== "+")
  8406. i--;
  8407. customRe = "";
  8408. break;
  8409. default:
  8410. crash("Unknown state");
  8411. break;
  8412. }
  8413. }
  8414. if (state === 2)
  8415. crash(`Unfinished custom RegExp for param "${buffer}"`);
  8416. consumeBuffer();
  8417. finalizeSegment();
  8418. return tokens;
  8419. }
  8420. function createRouteRecordMatcher(record, parent, options) {
  8421. const parser = tokensToParser(tokenizePath(record.path), options);
  8422. const matcher = assign$1(parser, {
  8423. record,
  8424. parent,
  8425. // these needs to be populated by the parent
  8426. children: [],
  8427. alias: []
  8428. });
  8429. if (parent) {
  8430. if (!matcher.record.aliasOf === !parent.record.aliasOf)
  8431. parent.children.push(matcher);
  8432. }
  8433. return matcher;
  8434. }
  8435. function createRouterMatcher(routes2, globalOptions) {
  8436. const matchers = [];
  8437. const matcherMap = /* @__PURE__ */ new Map();
  8438. globalOptions = mergeOptions({ strict: false, end: true, sensitive: false }, globalOptions);
  8439. function getRecordMatcher(name) {
  8440. return matcherMap.get(name);
  8441. }
  8442. function addRoute(record, parent, originalRecord) {
  8443. const isRootAdd = !originalRecord;
  8444. const mainNormalizedRecord = normalizeRouteRecord(record);
  8445. mainNormalizedRecord.aliasOf = originalRecord && originalRecord.record;
  8446. const options = mergeOptions(globalOptions, record);
  8447. const normalizedRecords = [
  8448. mainNormalizedRecord
  8449. ];
  8450. if ("alias" in record) {
  8451. const aliases = typeof record.alias === "string" ? [record.alias] : record.alias;
  8452. for (const alias of aliases) {
  8453. normalizedRecords.push(assign$1({}, mainNormalizedRecord, {
  8454. // this allows us to hold a copy of the `components` option
  8455. // so that async components cache is hold on the original record
  8456. components: originalRecord ? originalRecord.record.components : mainNormalizedRecord.components,
  8457. path: alias,
  8458. // we might be the child of an alias
  8459. aliasOf: originalRecord ? originalRecord.record : mainNormalizedRecord
  8460. // the aliases are always of the same kind as the original since they
  8461. // are defined on the same record
  8462. }));
  8463. }
  8464. }
  8465. let matcher;
  8466. let originalMatcher;
  8467. for (const normalizedRecord of normalizedRecords) {
  8468. const { path } = normalizedRecord;
  8469. if (parent && path[0] !== "/") {
  8470. const parentPath = parent.record.path;
  8471. const connectingSlash = parentPath[parentPath.length - 1] === "/" ? "" : "/";
  8472. normalizedRecord.path = parent.record.path + (path && connectingSlash + path);
  8473. }
  8474. matcher = createRouteRecordMatcher(normalizedRecord, parent, options);
  8475. if (originalRecord) {
  8476. originalRecord.alias.push(matcher);
  8477. } else {
  8478. originalMatcher = originalMatcher || matcher;
  8479. if (originalMatcher !== matcher)
  8480. originalMatcher.alias.push(matcher);
  8481. if (isRootAdd && record.name && !isAliasRecord(matcher))
  8482. removeRoute(record.name);
  8483. }
  8484. if (isMatchable(matcher)) {
  8485. insertMatcher(matcher);
  8486. }
  8487. if (mainNormalizedRecord.children) {
  8488. const children = mainNormalizedRecord.children;
  8489. for (let i = 0; i < children.length; i++) {
  8490. addRoute(children[i], matcher, originalRecord && originalRecord.children[i]);
  8491. }
  8492. }
  8493. originalRecord = originalRecord || matcher;
  8494. }
  8495. return originalMatcher ? () => {
  8496. removeRoute(originalMatcher);
  8497. } : noop$1;
  8498. }
  8499. function removeRoute(matcherRef) {
  8500. if (isRouteName(matcherRef)) {
  8501. const matcher = matcherMap.get(matcherRef);
  8502. if (matcher) {
  8503. matcherMap.delete(matcherRef);
  8504. matchers.splice(matchers.indexOf(matcher), 1);
  8505. matcher.children.forEach(removeRoute);
  8506. matcher.alias.forEach(removeRoute);
  8507. }
  8508. } else {
  8509. const index2 = matchers.indexOf(matcherRef);
  8510. if (index2 > -1) {
  8511. matchers.splice(index2, 1);
  8512. if (matcherRef.record.name)
  8513. matcherMap.delete(matcherRef.record.name);
  8514. matcherRef.children.forEach(removeRoute);
  8515. matcherRef.alias.forEach(removeRoute);
  8516. }
  8517. }
  8518. }
  8519. function getRoutes() {
  8520. return matchers;
  8521. }
  8522. function insertMatcher(matcher) {
  8523. const index2 = findInsertionIndex(matcher, matchers);
  8524. matchers.splice(index2, 0, matcher);
  8525. if (matcher.record.name && !isAliasRecord(matcher))
  8526. matcherMap.set(matcher.record.name, matcher);
  8527. }
  8528. function resolve2(location2, currentLocation) {
  8529. let matcher;
  8530. let params = {};
  8531. let path;
  8532. let name;
  8533. if ("name" in location2 && location2.name) {
  8534. matcher = matcherMap.get(location2.name);
  8535. if (!matcher)
  8536. throw createRouterError(1, {
  8537. location: location2
  8538. });
  8539. name = matcher.record.name;
  8540. params = assign$1(
  8541. // paramsFromLocation is a new object
  8542. paramsFromLocation(
  8543. currentLocation.params,
  8544. // only keep params that exist in the resolved location
  8545. // only keep optional params coming from a parent record
  8546. matcher.keys.filter((k) => !k.optional).concat(matcher.parent ? matcher.parent.keys.filter((k) => k.optional) : []).map((k) => k.name)
  8547. ),
  8548. // discard any existing params in the current location that do not exist here
  8549. // #1497 this ensures better active/exact matching
  8550. location2.params && paramsFromLocation(location2.params, matcher.keys.map((k) => k.name))
  8551. );
  8552. path = matcher.stringify(params);
  8553. } else if (location2.path != null) {
  8554. path = location2.path;
  8555. matcher = matchers.find((m) => m.re.test(path));
  8556. if (matcher) {
  8557. params = matcher.parse(path);
  8558. name = matcher.record.name;
  8559. }
  8560. } else {
  8561. matcher = currentLocation.name ? matcherMap.get(currentLocation.name) : matchers.find((m) => m.re.test(currentLocation.path));
  8562. if (!matcher)
  8563. throw createRouterError(1, {
  8564. location: location2,
  8565. currentLocation
  8566. });
  8567. name = matcher.record.name;
  8568. params = assign$1({}, currentLocation.params, location2.params);
  8569. path = matcher.stringify(params);
  8570. }
  8571. const matched = [];
  8572. let parentMatcher = matcher;
  8573. while (parentMatcher) {
  8574. matched.unshift(parentMatcher.record);
  8575. parentMatcher = parentMatcher.parent;
  8576. }
  8577. return {
  8578. name,
  8579. path,
  8580. params,
  8581. matched,
  8582. meta: mergeMetaFields(matched)
  8583. };
  8584. }
  8585. routes2.forEach((route) => addRoute(route));
  8586. function clearRoutes() {
  8587. matchers.length = 0;
  8588. matcherMap.clear();
  8589. }
  8590. return {
  8591. addRoute,
  8592. resolve: resolve2,
  8593. removeRoute,
  8594. clearRoutes,
  8595. getRoutes,
  8596. getRecordMatcher
  8597. };
  8598. }
  8599. function paramsFromLocation(params, keys) {
  8600. const newParams = {};
  8601. for (const key of keys) {
  8602. if (key in params)
  8603. newParams[key] = params[key];
  8604. }
  8605. return newParams;
  8606. }
  8607. function normalizeRouteRecord(record) {
  8608. return {
  8609. path: record.path,
  8610. redirect: record.redirect,
  8611. name: record.name,
  8612. meta: record.meta || {},
  8613. aliasOf: void 0,
  8614. beforeEnter: record.beforeEnter,
  8615. props: normalizeRecordProps(record),
  8616. children: record.children || [],
  8617. instances: {},
  8618. leaveGuards: /* @__PURE__ */ new Set(),
  8619. updateGuards: /* @__PURE__ */ new Set(),
  8620. enterCallbacks: {},
  8621. mods: {},
  8622. components: "components" in record ? record.components || null : record.component && { default: record.component }
  8623. };
  8624. }
  8625. function normalizeRecordProps(record) {
  8626. const propsObject = {};
  8627. const props = record.props || false;
  8628. if ("component" in record) {
  8629. propsObject.default = props;
  8630. } else {
  8631. for (const name in record.components)
  8632. propsObject[name] = typeof props === "object" ? props[name] : props;
  8633. }
  8634. return propsObject;
  8635. }
  8636. function isAliasRecord(record) {
  8637. while (record) {
  8638. if (record.record.aliasOf)
  8639. return true;
  8640. record = record.parent;
  8641. }
  8642. return false;
  8643. }
  8644. function mergeMetaFields(matched) {
  8645. return matched.reduce((meta, record) => assign$1(meta, record.meta), {});
  8646. }
  8647. function mergeOptions(defaults, partialOptions) {
  8648. const options = {};
  8649. for (const key in defaults) {
  8650. options[key] = key in partialOptions ? partialOptions[key] : defaults[key];
  8651. }
  8652. return options;
  8653. }
  8654. function findInsertionIndex(matcher, matchers) {
  8655. let lower = 0;
  8656. let upper = matchers.length;
  8657. while (lower !== upper) {
  8658. const mid = lower + upper >> 1;
  8659. const sortOrder = comparePathParserScore(matcher, matchers[mid]);
  8660. if (sortOrder < 0) {
  8661. upper = mid;
  8662. } else {
  8663. lower = mid + 1;
  8664. }
  8665. }
  8666. const insertionAncestor = getInsertionAncestor(matcher);
  8667. if (insertionAncestor) {
  8668. upper = matchers.lastIndexOf(insertionAncestor, upper - 1);
  8669. }
  8670. return upper;
  8671. }
  8672. function getInsertionAncestor(matcher) {
  8673. let ancestor = matcher;
  8674. while (ancestor = ancestor.parent) {
  8675. if (isMatchable(ancestor) && comparePathParserScore(matcher, ancestor) === 0) {
  8676. return ancestor;
  8677. }
  8678. }
  8679. return;
  8680. }
  8681. function isMatchable({ record }) {
  8682. return !!(record.name || record.components && Object.keys(record.components).length || record.redirect);
  8683. }
  8684. function parseQuery(search) {
  8685. const query = {};
  8686. if (search === "" || search === "?")
  8687. return query;
  8688. const hasLeadingIM = search[0] === "?";
  8689. const searchParams = (hasLeadingIM ? search.slice(1) : search).split("&");
  8690. for (let i = 0; i < searchParams.length; ++i) {
  8691. const searchParam = searchParams[i].replace(PLUS_RE, " ");
  8692. const eqPos = searchParam.indexOf("=");
  8693. const key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos));
  8694. const value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1));
  8695. if (key in query) {
  8696. let currentValue = query[key];
  8697. if (!isArray(currentValue)) {
  8698. currentValue = query[key] = [currentValue];
  8699. }
  8700. currentValue.push(value);
  8701. } else {
  8702. query[key] = value;
  8703. }
  8704. }
  8705. return query;
  8706. }
  8707. function stringifyQuery(query) {
  8708. let search = "";
  8709. for (let key in query) {
  8710. const value = query[key];
  8711. key = encodeQueryKey(key);
  8712. if (value == null) {
  8713. if (value !== void 0) {
  8714. search += (search.length ? "&" : "") + key;
  8715. }
  8716. continue;
  8717. }
  8718. const values = isArray(value) ? value.map((v) => v && encodeQueryValue(v)) : [value && encodeQueryValue(value)];
  8719. values.forEach((value2) => {
  8720. if (value2 !== void 0) {
  8721. search += (search.length ? "&" : "") + key;
  8722. if (value2 != null)
  8723. search += "=" + value2;
  8724. }
  8725. });
  8726. }
  8727. return search;
  8728. }
  8729. function normalizeQuery(query) {
  8730. const normalizedQuery = {};
  8731. for (const key in query) {
  8732. const value = query[key];
  8733. if (value !== void 0) {
  8734. normalizedQuery[key] = isArray(value) ? value.map((v) => v == null ? null : "" + v) : value == null ? value : "" + value;
  8735. }
  8736. }
  8737. return normalizedQuery;
  8738. }
  8739. const matchedRouteKey = Symbol("");
  8740. const viewDepthKey = Symbol("");
  8741. const routerKey = Symbol("");
  8742. const routeLocationKey = Symbol("");
  8743. const routerViewLocationKey = Symbol("");
  8744. function useCallbacks() {
  8745. let handlers = [];
  8746. function add2(handler) {
  8747. handlers.push(handler);
  8748. return () => {
  8749. const i = handlers.indexOf(handler);
  8750. if (i > -1)
  8751. handlers.splice(i, 1);
  8752. };
  8753. }
  8754. function reset() {
  8755. handlers = [];
  8756. }
  8757. return {
  8758. add: add2,
  8759. list: () => handlers.slice(),
  8760. reset
  8761. };
  8762. }
  8763. function registerGuard(record, name, guard) {
  8764. const removeFromList = () => {
  8765. record[name].delete(guard);
  8766. };
  8767. onUnmounted(removeFromList);
  8768. onDeactivated(removeFromList);
  8769. onActivated(() => {
  8770. record[name].add(guard);
  8771. });
  8772. record[name].add(guard);
  8773. }
  8774. function onBeforeRouteLeave(leaveGuard) {
  8775. const activeRecord = inject(
  8776. matchedRouteKey,
  8777. // to avoid warning
  8778. {}
  8779. ).value;
  8780. if (!activeRecord) {
  8781. return;
  8782. }
  8783. registerGuard(activeRecord, "leaveGuards", leaveGuard);
  8784. }
  8785. function guardToPromiseFn(guard, to, from, record, name, runWithContext = (fn) => fn()) {
  8786. const enterCallbackArray = record && // name is defined if record is because of the function overload
  8787. (record.enterCallbacks[name] = record.enterCallbacks[name] || []);
  8788. return () => new Promise((resolve2, reject) => {
  8789. const next = (valid) => {
  8790. if (valid === false) {
  8791. reject(createRouterError(4, {
  8792. from,
  8793. to
  8794. }));
  8795. } else if (valid instanceof Error) {
  8796. reject(valid);
  8797. } else if (isRouteLocation(valid)) {
  8798. reject(createRouterError(2, {
  8799. from: to,
  8800. to: valid
  8801. }));
  8802. } else {
  8803. if (enterCallbackArray && // since enterCallbackArray is truthy, both record and name also are
  8804. record.enterCallbacks[name] === enterCallbackArray && typeof valid === "function") {
  8805. enterCallbackArray.push(valid);
  8806. }
  8807. resolve2();
  8808. }
  8809. };
  8810. const guardReturn = runWithContext(() => guard.call(record && record.instances[name], to, from, next));
  8811. let guardCall = Promise.resolve(guardReturn);
  8812. if (guard.length < 3)
  8813. guardCall = guardCall.then(next);
  8814. guardCall.catch((err) => reject(err));
  8815. });
  8816. }
  8817. function extractComponentsGuards(matched, guardType, to, from, runWithContext = (fn) => fn()) {
  8818. const guards = [];
  8819. for (const record of matched) {
  8820. for (const name in record.components) {
  8821. let rawComponent = record.components[name];
  8822. if (guardType !== "beforeRouteEnter" && !record.instances[name])
  8823. continue;
  8824. if (isRouteComponent(rawComponent)) {
  8825. const options = rawComponent.__vccOpts || rawComponent;
  8826. const guard = options[guardType];
  8827. guard && guards.push(guardToPromiseFn(guard, to, from, record, name, runWithContext));
  8828. } else {
  8829. let componentPromise = rawComponent();
  8830. guards.push(() => componentPromise.then((resolved) => {
  8831. if (!resolved)
  8832. throw new Error(`Couldn't resolve component "${name}" at "${record.path}"`);
  8833. const resolvedComponent = isESModule(resolved) ? resolved.default : resolved;
  8834. record.mods[name] = resolved;
  8835. record.components[name] = resolvedComponent;
  8836. const options = resolvedComponent.__vccOpts || resolvedComponent;
  8837. const guard = options[guardType];
  8838. return guard && guardToPromiseFn(guard, to, from, record, name, runWithContext)();
  8839. }));
  8840. }
  8841. }
  8842. }
  8843. return guards;
  8844. }
  8845. function useLink(props) {
  8846. const router2 = inject(routerKey);
  8847. const currentRoute = inject(routeLocationKey);
  8848. const route = computed(() => {
  8849. const to = unref(props.to);
  8850. return router2.resolve(to);
  8851. });
  8852. const activeRecordIndex = computed(() => {
  8853. const { matched } = route.value;
  8854. const { length } = matched;
  8855. const routeMatched = matched[length - 1];
  8856. const currentMatched = currentRoute.matched;
  8857. if (!routeMatched || !currentMatched.length)
  8858. return -1;
  8859. const index2 = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched));
  8860. if (index2 > -1)
  8861. return index2;
  8862. const parentRecordPath = getOriginalPath(matched[length - 2]);
  8863. return (
  8864. // we are dealing with nested routes
  8865. length > 1 && // if the parent and matched route have the same path, this link is
  8866. // referring to the empty child. Or we currently are on a different
  8867. // child of the same parent
  8868. getOriginalPath(routeMatched) === parentRecordPath && // avoid comparing the child with its parent
  8869. currentMatched[currentMatched.length - 1].path !== parentRecordPath ? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2])) : index2
  8870. );
  8871. });
  8872. const isActive = computed(() => activeRecordIndex.value > -1 && includesParams(currentRoute.params, route.value.params));
  8873. const isExactActive = computed(() => activeRecordIndex.value > -1 && activeRecordIndex.value === currentRoute.matched.length - 1 && isSameRouteLocationParams(currentRoute.params, route.value.params));
  8874. function navigate(e = {}) {
  8875. if (guardEvent(e)) {
  8876. return router2[unref(props.replace) ? "replace" : "push"](
  8877. unref(props.to)
  8878. // avoid uncaught errors are they are logged anyway
  8879. ).catch(noop$1);
  8880. }
  8881. return Promise.resolve();
  8882. }
  8883. return {
  8884. route,
  8885. href: computed(() => route.value.href),
  8886. isActive,
  8887. isExactActive,
  8888. navigate
  8889. };
  8890. }
  8891. const RouterLinkImpl = /* @__PURE__ */ defineComponent({
  8892. name: "RouterLink",
  8893. compatConfig: { MODE: 3 },
  8894. props: {
  8895. to: {
  8896. type: [String, Object],
  8897. required: true
  8898. },
  8899. replace: Boolean,
  8900. activeClass: String,
  8901. // inactiveClass: String,
  8902. exactActiveClass: String,
  8903. custom: Boolean,
  8904. ariaCurrentValue: {
  8905. type: String,
  8906. default: "page"
  8907. }
  8908. },
  8909. useLink,
  8910. setup(props, { slots }) {
  8911. const link = reactive(useLink(props));
  8912. const { options } = inject(routerKey);
  8913. const elClass = computed(() => ({
  8914. [getLinkClass(props.activeClass, options.linkActiveClass, "router-link-active")]: link.isActive,
  8915. // [getLinkClass(
  8916. // props.inactiveClass,
  8917. // options.linkInactiveClass,
  8918. // 'router-link-inactive'
  8919. // )]: !link.isExactActive,
  8920. [getLinkClass(props.exactActiveClass, options.linkExactActiveClass, "router-link-exact-active")]: link.isExactActive
  8921. }));
  8922. return () => {
  8923. const children = slots.default && slots.default(link);
  8924. return props.custom ? children : h("a", {
  8925. "aria-current": link.isExactActive ? props.ariaCurrentValue : null,
  8926. href: link.href,
  8927. // this would override user added attrs but Vue will still add
  8928. // the listener, so we end up triggering both
  8929. onClick: link.navigate,
  8930. class: elClass.value
  8931. }, children);
  8932. };
  8933. }
  8934. });
  8935. const RouterLink = RouterLinkImpl;
  8936. function guardEvent(e) {
  8937. if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey)
  8938. return;
  8939. if (e.defaultPrevented)
  8940. return;
  8941. if (e.button !== void 0 && e.button !== 0)
  8942. return;
  8943. if (e.currentTarget && e.currentTarget.getAttribute) {
  8944. const target = e.currentTarget.getAttribute("target");
  8945. if (/\b_blank\b/i.test(target))
  8946. return;
  8947. }
  8948. if (e.preventDefault)
  8949. e.preventDefault();
  8950. return true;
  8951. }
  8952. function includesParams(outer, inner) {
  8953. for (const key in inner) {
  8954. const innerValue = inner[key];
  8955. const outerValue = outer[key];
  8956. if (typeof innerValue === "string") {
  8957. if (innerValue !== outerValue)
  8958. return false;
  8959. } else {
  8960. if (!isArray(outerValue) || outerValue.length !== innerValue.length || innerValue.some((value, i) => value !== outerValue[i]))
  8961. return false;
  8962. }
  8963. }
  8964. return true;
  8965. }
  8966. function getOriginalPath(record) {
  8967. return record ? record.aliasOf ? record.aliasOf.path : record.path : "";
  8968. }
  8969. const getLinkClass = (propClass, globalClass, defaultClass) => propClass != null ? propClass : globalClass != null ? globalClass : defaultClass;
  8970. const RouterViewImpl = /* @__PURE__ */ defineComponent({
  8971. name: "RouterView",
  8972. // #674 we manually inherit them
  8973. inheritAttrs: false,
  8974. props: {
  8975. name: {
  8976. type: String,
  8977. default: "default"
  8978. },
  8979. route: Object
  8980. },
  8981. // Better compat for @vue/compat users
  8982. // https://github.com/vuejs/router/issues/1315
  8983. compatConfig: { MODE: 3 },
  8984. setup(props, { attrs, slots }) {
  8985. const injectedRoute = inject(routerViewLocationKey);
  8986. const routeToDisplay = computed(() => props.route || injectedRoute.value);
  8987. const injectedDepth = inject(viewDepthKey, 0);
  8988. const depth = computed(() => {
  8989. let initialDepth = unref(injectedDepth);
  8990. const { matched } = routeToDisplay.value;
  8991. let matchedRoute;
  8992. while ((matchedRoute = matched[initialDepth]) && !matchedRoute.components) {
  8993. initialDepth++;
  8994. }
  8995. return initialDepth;
  8996. });
  8997. const matchedRouteRef = computed(() => routeToDisplay.value.matched[depth.value]);
  8998. provide(viewDepthKey, computed(() => depth.value + 1));
  8999. provide(matchedRouteKey, matchedRouteRef);
  9000. provide(routerViewLocationKey, routeToDisplay);
  9001. const viewRef = ref();
  9002. watch(() => [viewRef.value, matchedRouteRef.value, props.name], ([instance, to, name], [oldInstance, from, oldName]) => {
  9003. if (to) {
  9004. to.instances[name] = instance;
  9005. if (from && from !== to && instance && instance === oldInstance) {
  9006. if (!to.leaveGuards.size) {
  9007. to.leaveGuards = from.leaveGuards;
  9008. }
  9009. if (!to.updateGuards.size) {
  9010. to.updateGuards = from.updateGuards;
  9011. }
  9012. }
  9013. }
  9014. if (instance && to && // if there is no instance but to and from are the same this might be
  9015. // the first visit
  9016. (!from || !isSameRouteRecord(to, from) || !oldInstance)) {
  9017. (to.enterCallbacks[name] || []).forEach((callback) => callback(instance));
  9018. }
  9019. }, { flush: "post" });
  9020. return () => {
  9021. const route = routeToDisplay.value;
  9022. const currentName = props.name;
  9023. const matchedRoute = matchedRouteRef.value;
  9024. const ViewComponent = matchedRoute && matchedRoute.components[currentName];
  9025. if (!ViewComponent) {
  9026. return normalizeSlot(slots.default, { Component: ViewComponent, route });
  9027. }
  9028. const routePropsOption = matchedRoute.props[currentName];
  9029. const routeProps = routePropsOption ? routePropsOption === true ? route.params : typeof routePropsOption === "function" ? routePropsOption(route) : routePropsOption : null;
  9030. const onVnodeUnmounted = (vnode) => {
  9031. if (vnode.component.isUnmounted) {
  9032. matchedRoute.instances[currentName] = null;
  9033. }
  9034. };
  9035. const component = h(ViewComponent, assign$1({}, routeProps, attrs, {
  9036. onVnodeUnmounted,
  9037. ref: viewRef
  9038. }));
  9039. return (
  9040. // pass the vnode to the slot as a prop.
  9041. // h and <component :is="..."> both accept vnodes
  9042. normalizeSlot(slots.default, { Component: component, route }) || component
  9043. );
  9044. };
  9045. }
  9046. });
  9047. function normalizeSlot(slot, data) {
  9048. if (!slot)
  9049. return null;
  9050. const slotContent = slot(data);
  9051. return slotContent.length === 1 ? slotContent[0] : slotContent;
  9052. }
  9053. const RouterView = RouterViewImpl;
  9054. function createRouter(options) {
  9055. const matcher = createRouterMatcher(options.routes, options);
  9056. const parseQuery$1 = options.parseQuery || parseQuery;
  9057. const stringifyQuery$1 = options.stringifyQuery || stringifyQuery;
  9058. const routerHistory = options.history;
  9059. const beforeGuards = useCallbacks();
  9060. const beforeResolveGuards = useCallbacks();
  9061. const afterGuards = useCallbacks();
  9062. const currentRoute = shallowRef(START_LOCATION_NORMALIZED);
  9063. let pendingLocation = START_LOCATION_NORMALIZED;
  9064. if (isBrowser && options.scrollBehavior && "scrollRestoration" in history) {
  9065. history.scrollRestoration = "manual";
  9066. }
  9067. const normalizeParams = applyToParams.bind(null, (paramValue) => "" + paramValue);
  9068. const encodeParams = applyToParams.bind(null, encodeParam);
  9069. const decodeParams = (
  9070. // @ts-expect-error: intentionally avoid the type check
  9071. applyToParams.bind(null, decode)
  9072. );
  9073. function addRoute(parentOrRoute, route) {
  9074. let parent;
  9075. let record;
  9076. if (isRouteName(parentOrRoute)) {
  9077. parent = matcher.getRecordMatcher(parentOrRoute);
  9078. record = route;
  9079. } else {
  9080. record = parentOrRoute;
  9081. }
  9082. return matcher.addRoute(record, parent);
  9083. }
  9084. function removeRoute(name) {
  9085. const recordMatcher = matcher.getRecordMatcher(name);
  9086. if (recordMatcher) {
  9087. matcher.removeRoute(recordMatcher);
  9088. }
  9089. }
  9090. function getRoutes() {
  9091. return matcher.getRoutes().map((routeMatcher) => routeMatcher.record);
  9092. }
  9093. function hasRoute(name) {
  9094. return !!matcher.getRecordMatcher(name);
  9095. }
  9096. function resolve2(rawLocation, currentLocation) {
  9097. currentLocation = assign$1({}, currentLocation || currentRoute.value);
  9098. if (typeof rawLocation === "string") {
  9099. const locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);
  9100. const matchedRoute2 = matcher.resolve({ path: locationNormalized.path }, currentLocation);
  9101. const href2 = routerHistory.createHref(locationNormalized.fullPath);
  9102. return assign$1(locationNormalized, matchedRoute2, {
  9103. params: decodeParams(matchedRoute2.params),
  9104. hash: decode(locationNormalized.hash),
  9105. redirectedFrom: void 0,
  9106. href: href2
  9107. });
  9108. }
  9109. let matcherLocation;
  9110. if (rawLocation.path != null) {
  9111. matcherLocation = assign$1({}, rawLocation, {
  9112. path: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path
  9113. });
  9114. } else {
  9115. const targetParams = assign$1({}, rawLocation.params);
  9116. for (const key in targetParams) {
  9117. if (targetParams[key] == null) {
  9118. delete targetParams[key];
  9119. }
  9120. }
  9121. matcherLocation = assign$1({}, rawLocation, {
  9122. params: encodeParams(targetParams)
  9123. });
  9124. currentLocation.params = encodeParams(currentLocation.params);
  9125. }
  9126. const matchedRoute = matcher.resolve(matcherLocation, currentLocation);
  9127. const hash = rawLocation.hash || "";
  9128. matchedRoute.params = normalizeParams(decodeParams(matchedRoute.params));
  9129. const fullPath = stringifyURL(stringifyQuery$1, assign$1({}, rawLocation, {
  9130. hash: encodeHash(hash),
  9131. path: matchedRoute.path
  9132. }));
  9133. const href = routerHistory.createHref(fullPath);
  9134. return assign$1({
  9135. fullPath,
  9136. // keep the hash encoded so fullPath is effectively path + encodedQuery +
  9137. // hash
  9138. hash,
  9139. query: (
  9140. // if the user is using a custom query lib like qs, we might have
  9141. // nested objects, so we keep the query as is, meaning it can contain
  9142. // numbers at `$route.query`, but at the point, the user will have to
  9143. // use their own type anyway.
  9144. // https://github.com/vuejs/router/issues/328#issuecomment-649481567
  9145. stringifyQuery$1 === stringifyQuery ? normalizeQuery(rawLocation.query) : rawLocation.query || {}
  9146. )
  9147. }, matchedRoute, {
  9148. redirectedFrom: void 0,
  9149. href
  9150. });
  9151. }
  9152. function locationAsObject(to) {
  9153. return typeof to === "string" ? parseURL(parseQuery$1, to, currentRoute.value.path) : assign$1({}, to);
  9154. }
  9155. function checkCanceledNavigation(to, from) {
  9156. if (pendingLocation !== to) {
  9157. return createRouterError(8, {
  9158. from,
  9159. to
  9160. });
  9161. }
  9162. }
  9163. function push(to) {
  9164. return pushWithRedirect(to);
  9165. }
  9166. function replace(to) {
  9167. return push(assign$1(locationAsObject(to), { replace: true }));
  9168. }
  9169. function handleRedirectRecord(to) {
  9170. const lastMatched = to.matched[to.matched.length - 1];
  9171. if (lastMatched && lastMatched.redirect) {
  9172. const { redirect } = lastMatched;
  9173. let newTargetLocation = typeof redirect === "function" ? redirect(to) : redirect;
  9174. if (typeof newTargetLocation === "string") {
  9175. newTargetLocation = newTargetLocation.includes("?") || newTargetLocation.includes("#") ? newTargetLocation = locationAsObject(newTargetLocation) : (
  9176. // force empty params
  9177. { path: newTargetLocation }
  9178. );
  9179. newTargetLocation.params = {};
  9180. }
  9181. return assign$1({
  9182. query: to.query,
  9183. hash: to.hash,
  9184. // avoid transferring params if the redirect has a path
  9185. params: newTargetLocation.path != null ? {} : to.params
  9186. }, newTargetLocation);
  9187. }
  9188. }
  9189. function pushWithRedirect(to, redirectedFrom) {
  9190. const targetLocation = pendingLocation = resolve2(to);
  9191. const from = currentRoute.value;
  9192. const data = to.state;
  9193. const force = to.force;
  9194. const replace2 = to.replace === true;
  9195. const shouldRedirect = handleRedirectRecord(targetLocation);
  9196. if (shouldRedirect)
  9197. return pushWithRedirect(
  9198. assign$1(locationAsObject(shouldRedirect), {
  9199. state: typeof shouldRedirect === "object" ? assign$1({}, data, shouldRedirect.state) : data,
  9200. force,
  9201. replace: replace2
  9202. }),
  9203. // keep original redirectedFrom if it exists
  9204. redirectedFrom || targetLocation
  9205. );
  9206. const toLocation = targetLocation;
  9207. toLocation.redirectedFrom = redirectedFrom;
  9208. let failure;
  9209. if (!force && isSameRouteLocation(stringifyQuery$1, from, targetLocation)) {
  9210. failure = createRouterError(16, { to: toLocation, from });
  9211. handleScroll(
  9212. from,
  9213. from,
  9214. // this is a push, the only way for it to be triggered from a
  9215. // history.listen is with a redirect, which makes it become a push
  9216. true,
  9217. // This cannot be the first navigation because the initial location
  9218. // cannot be manually navigated to
  9219. false
  9220. );
  9221. }
  9222. return (failure ? Promise.resolve(failure) : navigate(toLocation, from)).catch((error) => isNavigationFailure(error) ? (
  9223. // navigation redirects still mark the router as ready
  9224. isNavigationFailure(
  9225. error,
  9226. 2
  9227. /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
  9228. ) ? error : markAsReady(error)
  9229. ) : (
  9230. // reject any unknown error
  9231. triggerError(error, toLocation, from)
  9232. )).then((failure2) => {
  9233. if (failure2) {
  9234. if (isNavigationFailure(
  9235. failure2,
  9236. 2
  9237. /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
  9238. )) {
  9239. return pushWithRedirect(
  9240. // keep options
  9241. assign$1({
  9242. // preserve an existing replacement but allow the redirect to override it
  9243. replace: replace2
  9244. }, locationAsObject(failure2.to), {
  9245. state: typeof failure2.to === "object" ? assign$1({}, data, failure2.to.state) : data,
  9246. force
  9247. }),
  9248. // preserve the original redirectedFrom if any
  9249. redirectedFrom || toLocation
  9250. );
  9251. }
  9252. } else {
  9253. failure2 = finalizeNavigation(toLocation, from, true, replace2, data);
  9254. }
  9255. triggerAfterEach(toLocation, from, failure2);
  9256. return failure2;
  9257. });
  9258. }
  9259. function checkCanceledNavigationAndReject(to, from) {
  9260. const error = checkCanceledNavigation(to, from);
  9261. return error ? Promise.reject(error) : Promise.resolve();
  9262. }
  9263. function runWithContext(fn) {
  9264. const app2 = installedApps.values().next().value;
  9265. return app2 && typeof app2.runWithContext === "function" ? app2.runWithContext(fn) : fn();
  9266. }
  9267. function navigate(to, from) {
  9268. let guards;
  9269. const [leavingRecords, updatingRecords, enteringRecords] = extractChangingRecords(to, from);
  9270. guards = extractComponentsGuards(leavingRecords.reverse(), "beforeRouteLeave", to, from);
  9271. for (const record of leavingRecords) {
  9272. record.leaveGuards.forEach((guard) => {
  9273. guards.push(guardToPromiseFn(guard, to, from));
  9274. });
  9275. }
  9276. const canceledNavigationCheck = checkCanceledNavigationAndReject.bind(null, to, from);
  9277. guards.push(canceledNavigationCheck);
  9278. return runGuardQueue(guards).then(() => {
  9279. guards = [];
  9280. for (const guard of beforeGuards.list()) {
  9281. guards.push(guardToPromiseFn(guard, to, from));
  9282. }
  9283. guards.push(canceledNavigationCheck);
  9284. return runGuardQueue(guards);
  9285. }).then(() => {
  9286. guards = extractComponentsGuards(updatingRecords, "beforeRouteUpdate", to, from);
  9287. for (const record of updatingRecords) {
  9288. record.updateGuards.forEach((guard) => {
  9289. guards.push(guardToPromiseFn(guard, to, from));
  9290. });
  9291. }
  9292. guards.push(canceledNavigationCheck);
  9293. return runGuardQueue(guards);
  9294. }).then(() => {
  9295. guards = [];
  9296. for (const record of enteringRecords) {
  9297. if (record.beforeEnter) {
  9298. if (isArray(record.beforeEnter)) {
  9299. for (const beforeEnter of record.beforeEnter)
  9300. guards.push(guardToPromiseFn(beforeEnter, to, from));
  9301. } else {
  9302. guards.push(guardToPromiseFn(record.beforeEnter, to, from));
  9303. }
  9304. }
  9305. }
  9306. guards.push(canceledNavigationCheck);
  9307. return runGuardQueue(guards);
  9308. }).then(() => {
  9309. to.matched.forEach((record) => record.enterCallbacks = {});
  9310. guards = extractComponentsGuards(enteringRecords, "beforeRouteEnter", to, from, runWithContext);
  9311. guards.push(canceledNavigationCheck);
  9312. return runGuardQueue(guards);
  9313. }).then(() => {
  9314. guards = [];
  9315. for (const guard of beforeResolveGuards.list()) {
  9316. guards.push(guardToPromiseFn(guard, to, from));
  9317. }
  9318. guards.push(canceledNavigationCheck);
  9319. return runGuardQueue(guards);
  9320. }).catch((err) => isNavigationFailure(
  9321. err,
  9322. 8
  9323. /* ErrorTypes.NAVIGATION_CANCELLED */
  9324. ) ? err : Promise.reject(err));
  9325. }
  9326. function triggerAfterEach(to, from, failure) {
  9327. afterGuards.list().forEach((guard) => runWithContext(() => guard(to, from, failure)));
  9328. }
  9329. function finalizeNavigation(toLocation, from, isPush, replace2, data) {
  9330. const error = checkCanceledNavigation(toLocation, from);
  9331. if (error)
  9332. return error;
  9333. const isFirstNavigation = from === START_LOCATION_NORMALIZED;
  9334. const state = !isBrowser ? {} : history.state;
  9335. if (isPush) {
  9336. if (replace2 || isFirstNavigation)
  9337. routerHistory.replace(toLocation.fullPath, assign$1({
  9338. scroll: isFirstNavigation && state && state.scroll
  9339. }, data));
  9340. else
  9341. routerHistory.push(toLocation.fullPath, data);
  9342. }
  9343. currentRoute.value = toLocation;
  9344. handleScroll(toLocation, from, isPush, isFirstNavigation);
  9345. markAsReady();
  9346. }
  9347. let removeHistoryListener;
  9348. function setupListeners() {
  9349. if (removeHistoryListener)
  9350. return;
  9351. removeHistoryListener = routerHistory.listen((to, _from, info) => {
  9352. if (!router2.listening)
  9353. return;
  9354. const toLocation = resolve2(to);
  9355. const shouldRedirect = handleRedirectRecord(toLocation);
  9356. if (shouldRedirect) {
  9357. pushWithRedirect(assign$1(shouldRedirect, { replace: true }), toLocation).catch(noop$1);
  9358. return;
  9359. }
  9360. pendingLocation = toLocation;
  9361. const from = currentRoute.value;
  9362. if (isBrowser) {
  9363. saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition());
  9364. }
  9365. navigate(toLocation, from).catch((error) => {
  9366. if (isNavigationFailure(
  9367. error,
  9368. 4 | 8
  9369. /* ErrorTypes.NAVIGATION_CANCELLED */
  9370. )) {
  9371. return error;
  9372. }
  9373. if (isNavigationFailure(
  9374. error,
  9375. 2
  9376. /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
  9377. )) {
  9378. pushWithRedirect(
  9379. error.to,
  9380. toLocation
  9381. // avoid an uncaught rejection, let push call triggerError
  9382. ).then((failure) => {
  9383. if (isNavigationFailure(
  9384. failure,
  9385. 4 | 16
  9386. /* ErrorTypes.NAVIGATION_DUPLICATED */
  9387. ) && !info.delta && info.type === NavigationType.pop) {
  9388. routerHistory.go(-1, false);
  9389. }
  9390. }).catch(noop$1);
  9391. return Promise.reject();
  9392. }
  9393. if (info.delta) {
  9394. routerHistory.go(-info.delta, false);
  9395. }
  9396. return triggerError(error, toLocation, from);
  9397. }).then((failure) => {
  9398. failure = failure || finalizeNavigation(
  9399. // after navigation, all matched components are resolved
  9400. toLocation,
  9401. from,
  9402. false
  9403. );
  9404. if (failure) {
  9405. if (info.delta && // a new navigation has been triggered, so we do not want to revert, that will change the current history
  9406. // entry while a different route is displayed
  9407. !isNavigationFailure(
  9408. failure,
  9409. 8
  9410. /* ErrorTypes.NAVIGATION_CANCELLED */
  9411. )) {
  9412. routerHistory.go(-info.delta, false);
  9413. } else if (info.type === NavigationType.pop && isNavigationFailure(
  9414. failure,
  9415. 4 | 16
  9416. /* ErrorTypes.NAVIGATION_DUPLICATED */
  9417. )) {
  9418. routerHistory.go(-1, false);
  9419. }
  9420. }
  9421. triggerAfterEach(toLocation, from, failure);
  9422. }).catch(noop$1);
  9423. });
  9424. }
  9425. let readyHandlers = useCallbacks();
  9426. let errorListeners = useCallbacks();
  9427. let ready;
  9428. function triggerError(error, to, from) {
  9429. markAsReady(error);
  9430. const list = errorListeners.list();
  9431. if (list.length) {
  9432. list.forEach((handler) => handler(error, to, from));
  9433. } else {
  9434. console.error(error);
  9435. }
  9436. return Promise.reject(error);
  9437. }
  9438. function isReady() {
  9439. if (ready && currentRoute.value !== START_LOCATION_NORMALIZED)
  9440. return Promise.resolve();
  9441. return new Promise((resolve3, reject) => {
  9442. readyHandlers.add([resolve3, reject]);
  9443. });
  9444. }
  9445. function markAsReady(err) {
  9446. if (!ready) {
  9447. ready = !err;
  9448. setupListeners();
  9449. readyHandlers.list().forEach(([resolve3, reject]) => err ? reject(err) : resolve3());
  9450. readyHandlers.reset();
  9451. }
  9452. return err;
  9453. }
  9454. function handleScroll(to, from, isPush, isFirstNavigation) {
  9455. const { scrollBehavior } = options;
  9456. if (!isBrowser || !scrollBehavior)
  9457. return Promise.resolve();
  9458. const scrollPosition = !isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0)) || (isFirstNavigation || !isPush) && history.state && history.state.scroll || null;
  9459. return nextTick().then(() => scrollBehavior(to, from, scrollPosition)).then((position) => position && scrollToPosition(position)).catch((err) => triggerError(err, to, from));
  9460. }
  9461. const go = (delta) => routerHistory.go(delta);
  9462. let started;
  9463. const installedApps = /* @__PURE__ */ new Set();
  9464. const router2 = {
  9465. currentRoute,
  9466. listening: true,
  9467. addRoute,
  9468. removeRoute,
  9469. clearRoutes: matcher.clearRoutes,
  9470. hasRoute,
  9471. getRoutes,
  9472. resolve: resolve2,
  9473. options,
  9474. push,
  9475. replace,
  9476. go,
  9477. back: () => go(-1),
  9478. forward: () => go(1),
  9479. beforeEach: beforeGuards.add,
  9480. beforeResolve: beforeResolveGuards.add,
  9481. afterEach: afterGuards.add,
  9482. onError: errorListeners.add,
  9483. isReady,
  9484. install(app2) {
  9485. const router3 = this;
  9486. app2.component("RouterLink", RouterLink);
  9487. app2.component("RouterView", RouterView);
  9488. app2.config.globalProperties.$router = router3;
  9489. Object.defineProperty(app2.config.globalProperties, "$route", {
  9490. enumerable: true,
  9491. get: () => unref(currentRoute)
  9492. });
  9493. if (isBrowser && // used for the initial navigation client side to avoid pushing
  9494. // multiple times when the router is used in multiple apps
  9495. !started && currentRoute.value === START_LOCATION_NORMALIZED) {
  9496. started = true;
  9497. push(routerHistory.location).catch((err) => {
  9498. });
  9499. }
  9500. const reactiveRoute = {};
  9501. for (const key in START_LOCATION_NORMALIZED) {
  9502. Object.defineProperty(reactiveRoute, key, {
  9503. get: () => currentRoute.value[key],
  9504. enumerable: true
  9505. });
  9506. }
  9507. app2.provide(routerKey, router3);
  9508. app2.provide(routeLocationKey, shallowReactive(reactiveRoute));
  9509. app2.provide(routerViewLocationKey, currentRoute);
  9510. const unmountApp = app2.unmount;
  9511. installedApps.add(app2);
  9512. app2.unmount = function() {
  9513. installedApps.delete(app2);
  9514. if (installedApps.size < 1) {
  9515. pendingLocation = START_LOCATION_NORMALIZED;
  9516. removeHistoryListener && removeHistoryListener();
  9517. removeHistoryListener = null;
  9518. currentRoute.value = START_LOCATION_NORMALIZED;
  9519. started = false;
  9520. ready = false;
  9521. }
  9522. unmountApp();
  9523. };
  9524. }
  9525. };
  9526. function runGuardQueue(guards) {
  9527. return guards.reduce((promise, guard) => promise.then(() => runWithContext(guard)), Promise.resolve());
  9528. }
  9529. return router2;
  9530. }
  9531. function extractChangingRecords(to, from) {
  9532. const leavingRecords = [];
  9533. const updatingRecords = [];
  9534. const enteringRecords = [];
  9535. const len = Math.max(from.matched.length, to.matched.length);
  9536. for (let i = 0; i < len; i++) {
  9537. const recordFrom = from.matched[i];
  9538. if (recordFrom) {
  9539. if (to.matched.find((record) => isSameRouteRecord(record, recordFrom)))
  9540. updatingRecords.push(recordFrom);
  9541. else
  9542. leavingRecords.push(recordFrom);
  9543. }
  9544. const recordTo = to.matched[i];
  9545. if (recordTo) {
  9546. if (!from.matched.find((record) => isSameRouteRecord(record, recordTo))) {
  9547. enteringRecords.push(recordTo);
  9548. }
  9549. }
  9550. }
  9551. return [leavingRecords, updatingRecords, enteringRecords];
  9552. }
  9553. function useRouter() {
  9554. return inject(routerKey);
  9555. }
  9556. var isVue2 = false;
  9557. /*!
  9558. * pinia v2.2.2
  9559. * (c) 2024 Eduardo San Martin Morote
  9560. * @license MIT
  9561. */
  9562. let activePinia;
  9563. const setActivePinia = (pinia2) => activePinia = pinia2;
  9564. const piniaSymbol = (
  9565. /* istanbul ignore next */
  9566. Symbol()
  9567. );
  9568. function isPlainObject(o) {
  9569. return o && typeof o === "object" && Object.prototype.toString.call(o) === "[object Object]" && typeof o.toJSON !== "function";
  9570. }
  9571. var MutationType;
  9572. (function(MutationType2) {
  9573. MutationType2["direct"] = "direct";
  9574. MutationType2["patchObject"] = "patch object";
  9575. MutationType2["patchFunction"] = "patch function";
  9576. })(MutationType || (MutationType = {}));
  9577. function createPinia() {
  9578. const scope = effectScope(true);
  9579. const state = scope.run(() => ref({}));
  9580. let _p = [];
  9581. let toBeInstalled = [];
  9582. const pinia2 = markRaw({
  9583. install(app2) {
  9584. setActivePinia(pinia2);
  9585. {
  9586. pinia2._a = app2;
  9587. app2.provide(piniaSymbol, pinia2);
  9588. app2.config.globalProperties.$pinia = pinia2;
  9589. toBeInstalled.forEach((plugin) => _p.push(plugin));
  9590. toBeInstalled = [];
  9591. }
  9592. },
  9593. use(plugin) {
  9594. if (!this._a && !isVue2) {
  9595. toBeInstalled.push(plugin);
  9596. } else {
  9597. _p.push(plugin);
  9598. }
  9599. return this;
  9600. },
  9601. _p,
  9602. // it's actually undefined here
  9603. // @ts-expect-error
  9604. _a: null,
  9605. _e: scope,
  9606. _s: /* @__PURE__ */ new Map(),
  9607. state
  9608. });
  9609. return pinia2;
  9610. }
  9611. const noop = () => {
  9612. };
  9613. function addSubscription(subscriptions, callback, detached, onCleanup = noop) {
  9614. subscriptions.push(callback);
  9615. const removeSubscription = () => {
  9616. const idx = subscriptions.indexOf(callback);
  9617. if (idx > -1) {
  9618. subscriptions.splice(idx, 1);
  9619. onCleanup();
  9620. }
  9621. };
  9622. if (!detached && getCurrentScope()) {
  9623. onScopeDispose(removeSubscription);
  9624. }
  9625. return removeSubscription;
  9626. }
  9627. function triggerSubscriptions(subscriptions, ...args) {
  9628. subscriptions.slice().forEach((callback) => {
  9629. callback(...args);
  9630. });
  9631. }
  9632. const fallbackRunWithContext = (fn) => fn();
  9633. const ACTION_MARKER = Symbol();
  9634. const ACTION_NAME = Symbol();
  9635. function mergeReactiveObjects(target, patchToApply) {
  9636. if (target instanceof Map && patchToApply instanceof Map) {
  9637. patchToApply.forEach((value, key) => target.set(key, value));
  9638. } else if (target instanceof Set && patchToApply instanceof Set) {
  9639. patchToApply.forEach(target.add, target);
  9640. }
  9641. for (const key in patchToApply) {
  9642. if (!patchToApply.hasOwnProperty(key))
  9643. continue;
  9644. const subPatch = patchToApply[key];
  9645. const targetValue = target[key];
  9646. if (isPlainObject(targetValue) && isPlainObject(subPatch) && target.hasOwnProperty(key) && !isRef(subPatch) && !isReactive(subPatch)) {
  9647. target[key] = mergeReactiveObjects(targetValue, subPatch);
  9648. } else {
  9649. target[key] = subPatch;
  9650. }
  9651. }
  9652. return target;
  9653. }
  9654. const skipHydrateSymbol = (
  9655. /* istanbul ignore next */
  9656. Symbol()
  9657. );
  9658. function shouldHydrate(obj) {
  9659. return !isPlainObject(obj) || !obj.hasOwnProperty(skipHydrateSymbol);
  9660. }
  9661. const { assign } = Object;
  9662. function isComputed(o) {
  9663. return !!(isRef(o) && o.effect);
  9664. }
  9665. function createOptionsStore(id, options, pinia2, hot) {
  9666. const { state, actions, getters } = options;
  9667. const initialState = pinia2.state.value[id];
  9668. let store;
  9669. function setup() {
  9670. if (!initialState && true) {
  9671. {
  9672. pinia2.state.value[id] = state ? state() : {};
  9673. }
  9674. }
  9675. const localState = toRefs(pinia2.state.value[id]);
  9676. return assign(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {
  9677. computedGetters[name] = markRaw(computed(() => {
  9678. setActivePinia(pinia2);
  9679. const store2 = pinia2._s.get(id);
  9680. return getters[name].call(store2, store2);
  9681. }));
  9682. return computedGetters;
  9683. }, {}));
  9684. }
  9685. store = createSetupStore(id, setup, options, pinia2, hot, true);
  9686. return store;
  9687. }
  9688. function createSetupStore($id, setup, options = {}, pinia2, hot, isOptionsStore) {
  9689. let scope;
  9690. const optionsForPlugin = assign({ actions: {} }, options);
  9691. const $subscribeOptions = { deep: true };
  9692. let isListening;
  9693. let isSyncListening;
  9694. let subscriptions = [];
  9695. let actionSubscriptions = [];
  9696. let debuggerEvents;
  9697. const initialState = pinia2.state.value[$id];
  9698. if (!isOptionsStore && !initialState && true) {
  9699. {
  9700. pinia2.state.value[$id] = {};
  9701. }
  9702. }
  9703. ref({});
  9704. let activeListener;
  9705. function $patch(partialStateOrMutator) {
  9706. let subscriptionMutation;
  9707. isListening = isSyncListening = false;
  9708. if (typeof partialStateOrMutator === "function") {
  9709. partialStateOrMutator(pinia2.state.value[$id]);
  9710. subscriptionMutation = {
  9711. type: MutationType.patchFunction,
  9712. storeId: $id,
  9713. events: debuggerEvents
  9714. };
  9715. } else {
  9716. mergeReactiveObjects(pinia2.state.value[$id], partialStateOrMutator);
  9717. subscriptionMutation = {
  9718. type: MutationType.patchObject,
  9719. payload: partialStateOrMutator,
  9720. storeId: $id,
  9721. events: debuggerEvents
  9722. };
  9723. }
  9724. const myListenerId = activeListener = Symbol();
  9725. nextTick().then(() => {
  9726. if (activeListener === myListenerId) {
  9727. isListening = true;
  9728. }
  9729. });
  9730. isSyncListening = true;
  9731. triggerSubscriptions(subscriptions, subscriptionMutation, pinia2.state.value[$id]);
  9732. }
  9733. const $reset = isOptionsStore ? function $reset2() {
  9734. const { state } = options;
  9735. const newState = state ? state() : {};
  9736. this.$patch(($state) => {
  9737. assign($state, newState);
  9738. });
  9739. } : (
  9740. /* istanbul ignore next */
  9741. noop
  9742. );
  9743. function $dispose() {
  9744. scope.stop();
  9745. subscriptions = [];
  9746. actionSubscriptions = [];
  9747. pinia2._s.delete($id);
  9748. }
  9749. const action = (fn, name = "") => {
  9750. if (ACTION_MARKER in fn) {
  9751. fn[ACTION_NAME] = name;
  9752. return fn;
  9753. }
  9754. const wrappedAction = function() {
  9755. setActivePinia(pinia2);
  9756. const args = Array.from(arguments);
  9757. const afterCallbackList = [];
  9758. const onErrorCallbackList = [];
  9759. function after(callback) {
  9760. afterCallbackList.push(callback);
  9761. }
  9762. function onError(callback) {
  9763. onErrorCallbackList.push(callback);
  9764. }
  9765. triggerSubscriptions(actionSubscriptions, {
  9766. args,
  9767. name: wrappedAction[ACTION_NAME],
  9768. store,
  9769. after,
  9770. onError
  9771. });
  9772. let ret;
  9773. try {
  9774. ret = fn.apply(this && this.$id === $id ? this : store, args);
  9775. } catch (error) {
  9776. triggerSubscriptions(onErrorCallbackList, error);
  9777. throw error;
  9778. }
  9779. if (ret instanceof Promise) {
  9780. return ret.then((value) => {
  9781. triggerSubscriptions(afterCallbackList, value);
  9782. return value;
  9783. }).catch((error) => {
  9784. triggerSubscriptions(onErrorCallbackList, error);
  9785. return Promise.reject(error);
  9786. });
  9787. }
  9788. triggerSubscriptions(afterCallbackList, ret);
  9789. return ret;
  9790. };
  9791. wrappedAction[ACTION_MARKER] = true;
  9792. wrappedAction[ACTION_NAME] = name;
  9793. return wrappedAction;
  9794. };
  9795. const partialStore = {
  9796. _p: pinia2,
  9797. // _s: scope,
  9798. $id,
  9799. $onAction: addSubscription.bind(null, actionSubscriptions),
  9800. $patch,
  9801. $reset,
  9802. $subscribe(callback, options2 = {}) {
  9803. const removeSubscription = addSubscription(subscriptions, callback, options2.detached, () => stopWatcher());
  9804. const stopWatcher = scope.run(() => watch(() => pinia2.state.value[$id], (state) => {
  9805. if (options2.flush === "sync" ? isSyncListening : isListening) {
  9806. callback({
  9807. storeId: $id,
  9808. type: MutationType.direct,
  9809. events: debuggerEvents
  9810. }, state);
  9811. }
  9812. }, assign({}, $subscribeOptions, options2)));
  9813. return removeSubscription;
  9814. },
  9815. $dispose
  9816. };
  9817. const store = reactive(partialStore);
  9818. pinia2._s.set($id, store);
  9819. const runWithContext = pinia2._a && pinia2._a.runWithContext || fallbackRunWithContext;
  9820. const setupStore = runWithContext(() => pinia2._e.run(() => (scope = effectScope()).run(() => setup({ action }))));
  9821. for (const key in setupStore) {
  9822. const prop = setupStore[key];
  9823. if (isRef(prop) && !isComputed(prop) || isReactive(prop)) {
  9824. if (!isOptionsStore) {
  9825. if (initialState && shouldHydrate(prop)) {
  9826. if (isRef(prop)) {
  9827. prop.value = initialState[key];
  9828. } else {
  9829. mergeReactiveObjects(prop, initialState[key]);
  9830. }
  9831. }
  9832. {
  9833. pinia2.state.value[$id][key] = prop;
  9834. }
  9835. }
  9836. } else if (typeof prop === "function") {
  9837. const actionValue = action(prop, key);
  9838. {
  9839. setupStore[key] = actionValue;
  9840. }
  9841. optionsForPlugin.actions[key] = prop;
  9842. } else
  9843. ;
  9844. }
  9845. {
  9846. assign(store, setupStore);
  9847. assign(toRaw(store), setupStore);
  9848. }
  9849. Object.defineProperty(store, "$state", {
  9850. get: () => pinia2.state.value[$id],
  9851. set: (state) => {
  9852. $patch(($state) => {
  9853. assign($state, state);
  9854. });
  9855. }
  9856. });
  9857. pinia2._p.forEach((extender) => {
  9858. {
  9859. assign(store, scope.run(() => extender({
  9860. store,
  9861. app: pinia2._a,
  9862. pinia: pinia2,
  9863. options: optionsForPlugin
  9864. })));
  9865. }
  9866. });
  9867. if (initialState && isOptionsStore && options.hydrate) {
  9868. options.hydrate(store.$state, initialState);
  9869. }
  9870. isListening = true;
  9871. isSyncListening = true;
  9872. return store;
  9873. }
  9874. // @__NO_SIDE_EFFECTS__
  9875. function defineStore(idOrOptions, setup, setupOptions) {
  9876. let id;
  9877. let options;
  9878. const isSetupStore = typeof setup === "function";
  9879. if (typeof idOrOptions === "string") {
  9880. id = idOrOptions;
  9881. options = isSetupStore ? setupOptions : setup;
  9882. } else {
  9883. options = idOrOptions;
  9884. id = idOrOptions.id;
  9885. }
  9886. function useStore(pinia2, hot) {
  9887. const hasContext = hasInjectionContext();
  9888. pinia2 = // in test mode, ignore the argument provided as we can always retrieve a
  9889. // pinia instance with getActivePinia()
  9890. pinia2 || (hasContext ? inject(piniaSymbol, null) : null);
  9891. if (pinia2)
  9892. setActivePinia(pinia2);
  9893. pinia2 = activePinia;
  9894. if (!pinia2._s.has(id)) {
  9895. if (isSetupStore) {
  9896. createSetupStore(id, setup, options, pinia2);
  9897. } else {
  9898. createOptionsStore(id, options, pinia2);
  9899. }
  9900. }
  9901. const store = pinia2._s.get(id);
  9902. return store;
  9903. }
  9904. useStore.$id = id;
  9905. return useStore;
  9906. }
  9907. const useStoreOfUserInfo = /* @__PURE__ */ defineStore("userInfo", {
  9908. state: () => {
  9909. return {
  9910. id: "",
  9911. mobile: "",
  9912. username: "",
  9913. password: "",
  9914. token: "",
  9915. roles: [],
  9916. isLogin: false,
  9917. isRememberMe: false
  9918. };
  9919. },
  9920. persist: {
  9921. enabled: true,
  9922. encryptionKey: "userInfo",
  9923. storage: localStorage
  9924. }
  9925. });
  9926. const routes = [
  9927. {
  9928. path: "/wap",
  9929. redirect: "/wap/home"
  9930. },
  9931. {
  9932. path: "/wap/home1",
  9933. component: () => __vitePreload(() => import("./Index-1a616312.js"), true ? ["wap/assets/Index-1a616312.js","wap/assets/index-487cde8c.js","wap/assets/use-placeholder-16d7c5d7.js","wap/assets/on-popup-reopen-c5ca1603.js","wap/assets/use-route-726f0d0b.js","wap/assets/Index-5f1ab155.css"] : void 0),
  9934. meta: {
  9935. keepAlive: true
  9936. },
  9937. children: [
  9938. // {
  9939. // path: '/home',
  9940. // component: ()=> import('@/pages/home/Index.vue'),
  9941. // meta: {
  9942. // keepAlive: true,
  9943. // }
  9944. // },
  9945. {
  9946. path: "/wap/home",
  9947. component: () => __vitePreload(() => import("./Index-cf160516.js"), true ? ["wap/assets/Index-cf160516.js","wap/assets/index-9e456003.js","wap/assets/index-487cde8c.js","wap/assets/index-e4fe1374.css","wap/assets/index-e8b8fc91.js","wap/assets/index-eef3af38.js","wap/assets/use-scope-id-0b5b8615.js","wap/assets/on-popup-reopen-c5ca1603.js","wap/assets/index-217c49a0.js","wap/assets/index-8387a057.css","wap/assets/index-73d5a905.js","wap/assets/index-d43e462e.css","wap/assets/index-8540448e.js","wap/assets/use-route-726f0d0b.js","wap/assets/index-f0784bc6.css","wap/assets/index-d3364b49.js","wap/assets/index-4345ad0b.css","wap/assets/index-b1054607.js","wap/assets/index-6125a673.css","wap/assets/index-41ec7e28.js","wap/assets/index-fbff4b7c.css","wap/assets/index-18735c56.js","wap/assets/axios-8cd254ce.js","wap/assets/function-call-dc072a29.js","wap/assets/mount-component-2b0f7b23.js","wap/assets/Index-919d086a.js","wap/assets/vue-qrcode-reader-d831402f.js","wap/assets/Index-9a8bf70a.css"] : void 0),
  9948. meta: {
  9949. keepAlive: true
  9950. }
  9951. },
  9952. {
  9953. path: "/wap/device",
  9954. component: () => __vitePreload(() => import("./Index-cf160516.js"), true ? ["wap/assets/Index-cf160516.js","wap/assets/index-9e456003.js","wap/assets/index-487cde8c.js","wap/assets/index-e4fe1374.css","wap/assets/index-e8b8fc91.js","wap/assets/index-eef3af38.js","wap/assets/use-scope-id-0b5b8615.js","wap/assets/on-popup-reopen-c5ca1603.js","wap/assets/index-217c49a0.js","wap/assets/index-8387a057.css","wap/assets/index-73d5a905.js","wap/assets/index-d43e462e.css","wap/assets/index-8540448e.js","wap/assets/use-route-726f0d0b.js","wap/assets/index-f0784bc6.css","wap/assets/index-d3364b49.js","wap/assets/index-4345ad0b.css","wap/assets/index-b1054607.js","wap/assets/index-6125a673.css","wap/assets/index-41ec7e28.js","wap/assets/index-fbff4b7c.css","wap/assets/index-18735c56.js","wap/assets/axios-8cd254ce.js","wap/assets/function-call-dc072a29.js","wap/assets/mount-component-2b0f7b23.js","wap/assets/Index-919d086a.js","wap/assets/vue-qrcode-reader-d831402f.js","wap/assets/Index-9a8bf70a.css"] : void 0),
  9955. meta: {
  9956. keepAlive: true
  9957. }
  9958. },
  9959. {
  9960. path: "/wap/mine",
  9961. component: () => __vitePreload(() => import("./Index-3728f235.js"), true ? ["wap/assets/Index-3728f235.js","wap/assets/index-8540448e.js","wap/assets/use-route-726f0d0b.js","wap/assets/index-487cde8c.js","wap/assets/index-f0784bc6.css","wap/assets/index-b1054607.js","wap/assets/index-217c49a0.js","wap/assets/index-6125a673.css","wap/assets/index-f1ec0231.js","wap/assets/index-09ccac2b.css","wap/assets/Index-1932fd7a.css"] : void 0),
  9962. meta: {
  9963. keepAlive: true
  9964. }
  9965. }
  9966. ]
  9967. },
  9968. {
  9969. path: "/wap/sales/add",
  9970. component: () => __vitePreload(() => import("./Index-ee20539c.js"), true ? ["wap/assets/Index-ee20539c.js","wap/assets/Index-847fa614.js","wap/assets/index-487cde8c.js","wap/assets/on-popup-reopen-c5ca1603.js","wap/assets/Index-81d286e0.css","wap/assets/index-b1054607.js","wap/assets/use-route-726f0d0b.js","wap/assets/index-217c49a0.js","wap/assets/index-6125a673.css","wap/assets/index-73d5a905.js","wap/assets/index-eef3af38.js","wap/assets/use-scope-id-0b5b8615.js","wap/assets/index-d43e462e.css","wap/assets/index-3a8cf159.js","wap/assets/index-5f12e0f5.css","wap/assets/index-8540448e.js","wap/assets/index-f0784bc6.css","wap/assets/request-76e4192b.js","wap/assets/axios-8cd254ce.js","wap/assets/index-fefbbdb7.js","wap/assets/mount-component-2b0f7b23.js","wap/assets/use-placeholder-16d7c5d7.js","wap/assets/index-86652afb.css","wap/assets/function-call-dc072a29.js","wap/assets/Index-4d8a0bb8.css"] : void 0)
  9971. },
  9972. {
  9973. path: "/wap/sales/list",
  9974. component: () => __vitePreload(() => import("./Index-c0deaf04.js"), true ? ["wap/assets/Index-c0deaf04.js","wap/assets/index-9e456003.js","wap/assets/index-487cde8c.js","wap/assets/index-e4fe1374.css","wap/assets/index-e8b8fc91.js","wap/assets/index-eef3af38.js","wap/assets/use-scope-id-0b5b8615.js","wap/assets/on-popup-reopen-c5ca1603.js","wap/assets/index-217c49a0.js","wap/assets/index-8387a057.css","wap/assets/index-73d5a905.js","wap/assets/index-d43e462e.css","wap/assets/index-8540448e.js","wap/assets/use-route-726f0d0b.js","wap/assets/index-f0784bc6.css","wap/assets/util-88d32f50.js","wap/assets/index-0f48f786.js","wap/assets/index-c73aaf1f.css","wap/assets/index-41ec7e28.js","wap/assets/index-fbff4b7c.css","wap/assets/use-placeholder-16d7c5d7.js","wap/assets/util-fdf6bc77.css","wap/assets/index-b1054607.js","wap/assets/index-6125a673.css","wap/assets/index-3a8cf159.js","wap/assets/index-5f12e0f5.css","wap/assets/request-76e4192b.js","wap/assets/axios-8cd254ce.js","wap/assets/function-call-dc072a29.js","wap/assets/mount-component-2b0f7b23.js","wap/assets/Index-4537c057.css"] : void 0)
  9975. },
  9976. {
  9977. path: "/wap/recycle/add",
  9978. component: () => __vitePreload(() => import("./Index-8f0ad845.js"), true ? ["wap/assets/Index-8f0ad845.js","wap/assets/Index-847fa614.js","wap/assets/index-487cde8c.js","wap/assets/on-popup-reopen-c5ca1603.js","wap/assets/Index-81d286e0.css","wap/assets/index-b1054607.js","wap/assets/use-route-726f0d0b.js","wap/assets/index-217c49a0.js","wap/assets/index-6125a673.css","wap/assets/index-73d5a905.js","wap/assets/index-eef3af38.js","wap/assets/use-scope-id-0b5b8615.js","wap/assets/index-d43e462e.css","wap/assets/index-3a8cf159.js","wap/assets/index-5f12e0f5.css","wap/assets/index-8540448e.js","wap/assets/index-f0784bc6.css","wap/assets/request-76e4192b.js","wap/assets/axios-8cd254ce.js","wap/assets/index-fefbbdb7.js","wap/assets/mount-component-2b0f7b23.js","wap/assets/use-placeholder-16d7c5d7.js","wap/assets/index-86652afb.css","wap/assets/function-call-dc072a29.js","wap/assets/Index-67761f1f.css"] : void 0)
  9979. },
  9980. {
  9981. path: "/wap/recycle/list",
  9982. component: () => __vitePreload(() => import("./Index-97473d99.js"), true ? ["wap/assets/Index-97473d99.js","wap/assets/index-9e456003.js","wap/assets/index-487cde8c.js","wap/assets/index-e4fe1374.css","wap/assets/index-e8b8fc91.js","wap/assets/index-eef3af38.js","wap/assets/use-scope-id-0b5b8615.js","wap/assets/on-popup-reopen-c5ca1603.js","wap/assets/index-217c49a0.js","wap/assets/index-8387a057.css","wap/assets/index-73d5a905.js","wap/assets/index-d43e462e.css","wap/assets/index-8540448e.js","wap/assets/use-route-726f0d0b.js","wap/assets/index-f0784bc6.css","wap/assets/util-88d32f50.js","wap/assets/index-0f48f786.js","wap/assets/index-c73aaf1f.css","wap/assets/index-41ec7e28.js","wap/assets/index-fbff4b7c.css","wap/assets/use-placeholder-16d7c5d7.js","wap/assets/util-fdf6bc77.css","wap/assets/index-b1054607.js","wap/assets/index-6125a673.css","wap/assets/index-3a8cf159.js","wap/assets/index-5f12e0f5.css","wap/assets/request-76e4192b.js","wap/assets/axios-8cd254ce.js","wap/assets/function-call-dc072a29.js","wap/assets/mount-component-2b0f7b23.js","wap/assets/Index-dd7c9b8f.css"] : void 0)
  9983. },
  9984. {
  9985. path: "/wap/login",
  9986. component: () => __vitePreload(() => import("./Index-b1985b54.js"), true ? ["wap/assets/Index-b1985b54.js","wap/assets/index-b1054607.js","wap/assets/use-route-726f0d0b.js","wap/assets/index-487cde8c.js","wap/assets/index-217c49a0.js","wap/assets/index-6125a673.css","wap/assets/index-3a8cf159.js","wap/assets/use-scope-id-0b5b8615.js","wap/assets/index-5f12e0f5.css","wap/assets/index-f1ec0231.js","wap/assets/index-09ccac2b.css","wap/assets/index-8540448e.js","wap/assets/index-f0784bc6.css","wap/assets/index-41ec7e28.js","wap/assets/index-fbff4b7c.css","wap/assets/index-d3364b49.js","wap/assets/index-4345ad0b.css","wap/assets/index-18735c56.js","wap/assets/axios-8cd254ce.js","wap/assets/function-call-dc072a29.js","wap/assets/mount-component-2b0f7b23.js","wap/assets/index-eef3af38.js","wap/assets/on-popup-reopen-c5ca1603.js","wap/assets/index-0229ad12.js","wap/assets/Index-46b7e7ca.css"] : void 0)
  9987. },
  9988. {
  9989. path: "/wap/register",
  9990. component: () => __vitePreload(() => import("./Index-46f00f0a.js"), true ? ["wap/assets/Index-46f00f0a.js","wap/assets/index-3a8cf159.js","wap/assets/use-scope-id-0b5b8615.js","wap/assets/index-487cde8c.js","wap/assets/index-5f12e0f5.css","wap/assets/index-b1054607.js","wap/assets/use-route-726f0d0b.js","wap/assets/index-217c49a0.js","wap/assets/index-6125a673.css","wap/assets/index-8540448e.js","wap/assets/index-f0784bc6.css","wap/assets/index-41ec7e28.js","wap/assets/index-fbff4b7c.css","wap/assets/index-18735c56.js","wap/assets/axios-8cd254ce.js","wap/assets/function-call-dc072a29.js","wap/assets/mount-component-2b0f7b23.js","wap/assets/index-eef3af38.js","wap/assets/on-popup-reopen-c5ca1603.js","wap/assets/index-0229ad12.js","wap/assets/Index-357e19ad.css"] : void 0)
  9991. },
  9992. {
  9993. path: "/wap/findpassword",
  9994. component: () => __vitePreload(() => import("./Index-760bbdce.js"), true ? ["wap/assets/Index-760bbdce.js","wap/assets/index-3a8cf159.js","wap/assets/use-scope-id-0b5b8615.js","wap/assets/index-487cde8c.js","wap/assets/index-5f12e0f5.css","wap/assets/index-b1054607.js","wap/assets/use-route-726f0d0b.js","wap/assets/index-217c49a0.js","wap/assets/index-6125a673.css","wap/assets/index-8540448e.js","wap/assets/index-f0784bc6.css","wap/assets/index-41ec7e28.js","wap/assets/index-fbff4b7c.css","wap/assets/request-76e4192b.js","wap/assets/axios-8cd254ce.js","wap/assets/index-0229ad12.js","wap/assets/Index-441fdb15.css"] : void 0)
  9995. },
  9996. {
  9997. path: "/wap/changepassword",
  9998. component: () => __vitePreload(() => import("./Changepassword-b9f16465.js"), true ? ["wap/assets/Changepassword-b9f16465.js","wap/assets/index-3a8cf159.js","wap/assets/use-scope-id-0b5b8615.js","wap/assets/index-487cde8c.js","wap/assets/index-5f12e0f5.css","wap/assets/index-b1054607.js","wap/assets/use-route-726f0d0b.js","wap/assets/index-217c49a0.js","wap/assets/index-6125a673.css","wap/assets/index-8540448e.js","wap/assets/index-f0784bc6.css","wap/assets/index-41ec7e28.js","wap/assets/index-fbff4b7c.css","wap/assets/request-76e4192b.js","wap/assets/axios-8cd254ce.js","wap/assets/index-0229ad12.js","wap/assets/Changepassword-22899196.css"] : void 0)
  9999. },
  10000. {
  10001. path: "/wap/search",
  10002. component: () => __vitePreload(() => import("./Index-89cb68e2.js"), true ? ["wap/assets/Index-89cb68e2.js","wap/assets/index-9e456003.js","wap/assets/index-487cde8c.js","wap/assets/index-e4fe1374.css","wap/assets/index-e8b8fc91.js","wap/assets/index-eef3af38.js","wap/assets/use-scope-id-0b5b8615.js","wap/assets/on-popup-reopen-c5ca1603.js","wap/assets/index-217c49a0.js","wap/assets/index-8387a057.css","wap/assets/index-73d5a905.js","wap/assets/index-d43e462e.css","wap/assets/index-8540448e.js","wap/assets/use-route-726f0d0b.js","wap/assets/index-f0784bc6.css","wap/assets/index-f1ec0231.js","wap/assets/index-09ccac2b.css","wap/assets/index-41ec7e28.js","wap/assets/index-fbff4b7c.css","wap/assets/index-18735c56.js","wap/assets/axios-8cd254ce.js","wap/assets/function-call-dc072a29.js","wap/assets/mount-component-2b0f7b23.js","wap/assets/CusNavigation-87012716.js","wap/assets/CusNavigation-cecd89a4.css"] : void 0),
  10003. meta: {
  10004. keepAlive: true
  10005. }
  10006. },
  10007. {
  10008. path: "/wap/article",
  10009. component: () => __vitePreload(() => import("./Index-e0b19cb0.js"), true ? ["wap/assets/Index-e0b19cb0.js","wap/assets/index-9e456003.js","wap/assets/index-487cde8c.js","wap/assets/index-e4fe1374.css","wap/assets/index-e8b8fc91.js","wap/assets/index-eef3af38.js","wap/assets/use-scope-id-0b5b8615.js","wap/assets/on-popup-reopen-c5ca1603.js","wap/assets/index-217c49a0.js","wap/assets/index-8387a057.css","wap/assets/index-73d5a905.js","wap/assets/index-d43e462e.css","wap/assets/index-8540448e.js","wap/assets/use-route-726f0d0b.js","wap/assets/index-f0784bc6.css","wap/assets/index-f1ec0231.js","wap/assets/index-09ccac2b.css","wap/assets/index-b1054607.js","wap/assets/index-6125a673.css","wap/assets/index-41ec7e28.js","wap/assets/index-fbff4b7c.css","wap/assets/index-18735c56.js","wap/assets/axios-8cd254ce.js","wap/assets/function-call-dc072a29.js","wap/assets/mount-component-2b0f7b23.js","wap/assets/CusNavigation-87012716.js","wap/assets/CusNavigation-cecd89a4.css"] : void 0),
  10010. meta: {
  10011. keepAlive: true
  10012. }
  10013. },
  10014. {
  10015. path: "/wap/article/detail/:articleId",
  10016. component: () => __vitePreload(() => import("./Detail-46443295.js"), true ? ["wap/assets/Detail-46443295.js","wap/assets/CusNavigation-87012716.js","wap/assets/index-eef3af38.js","wap/assets/index-487cde8c.js","wap/assets/use-scope-id-0b5b8615.js","wap/assets/on-popup-reopen-c5ca1603.js","wap/assets/CusNavigation-cecd89a4.css"] : void 0),
  10017. meta: {
  10018. keepAlive: true
  10019. }
  10020. },
  10021. {
  10022. path: "/wap/device/detail/:deviceId",
  10023. component: () => __vitePreload(() => import("./Index-430409d8.js"), true ? ["wap/assets/Index-430409d8.js","wap/assets/index-9e456003.js","wap/assets/index-487cde8c.js","wap/assets/index-e4fe1374.css","wap/assets/index-e8b8fc91.js","wap/assets/index-eef3af38.js","wap/assets/use-scope-id-0b5b8615.js","wap/assets/on-popup-reopen-c5ca1603.js","wap/assets/index-217c49a0.js","wap/assets/index-8387a057.css","wap/assets/index-73d5a905.js","wap/assets/index-d43e462e.css","wap/assets/index-8540448e.js","wap/assets/use-route-726f0d0b.js","wap/assets/index-f0784bc6.css","wap/assets/index-b1054607.js","wap/assets/index-6125a673.css","wap/assets/index-41ec7e28.js","wap/assets/index-fbff4b7c.css","wap/assets/index-18735c56.js","wap/assets/axios-8cd254ce.js","wap/assets/function-call-dc072a29.js","wap/assets/mount-component-2b0f7b23.js","wap/assets/CusNavigation-87012716.js","wap/assets/CusNavigation-cecd89a4.css","wap/assets/index-dd255780.js","wap/assets/index-d3364b49.js","wap/assets/index-4345ad0b.css","wap/assets/Index-919d086a.js","wap/assets/vue-qrcode-reader-d831402f.js","wap/assets/Index-9a8bf70a.css"] : void 0),
  10024. meta: {
  10025. keepAlive: true
  10026. }
  10027. },
  10028. {
  10029. path: "/wap/device/ascend/:deviceId",
  10030. component: () => __vitePreload(() => import("./Index-b0165bbb.js"), true ? ["wap/assets/Index-b0165bbb.js","wap/assets/index-b1054607.js","wap/assets/use-route-726f0d0b.js","wap/assets/index-487cde8c.js","wap/assets/index-217c49a0.js","wap/assets/index-6125a673.css","wap/assets/index-f1ec0231.js","wap/assets/index-09ccac2b.css","wap/assets/Index-726604dc.css"] : void 0),
  10031. meta: {
  10032. title: "驼人物联网平台终端设备追溯",
  10033. keepAlive: true
  10034. }
  10035. },
  10036. {
  10037. path: "/wap/device/location/:deviceId",
  10038. component: () => __vitePreload(() => import("./Location-fa750809.js"), true ? ["wap/assets/Location-fa750809.js","wap/assets/index-18735c56.js","wap/assets/axios-8cd254ce.js","wap/assets/function-call-dc072a29.js","wap/assets/mount-component-2b0f7b23.js","wap/assets/index-487cde8c.js","wap/assets/use-scope-id-0b5b8615.js","wap/assets/index-eef3af38.js","wap/assets/on-popup-reopen-c5ca1603.js","wap/assets/index-217c49a0.js","wap/assets/CusNavigation-87012716.js","wap/assets/CusNavigation-cecd89a4.css"] : void 0),
  10039. meta: {
  10040. keepAlive: true
  10041. }
  10042. },
  10043. {
  10044. path: "/wap/device/log/:deviceId",
  10045. component: () => __vitePreload(() => import("./Log-fb070c89.js"), true ? ["wap/assets/Log-fb070c89.js","wap/assets/index-9e456003.js","wap/assets/index-487cde8c.js","wap/assets/index-e4fe1374.css","wap/assets/index-e8b8fc91.js","wap/assets/index-eef3af38.js","wap/assets/use-scope-id-0b5b8615.js","wap/assets/on-popup-reopen-c5ca1603.js","wap/assets/index-217c49a0.js","wap/assets/index-8387a057.css","wap/assets/index-73d5a905.js","wap/assets/index-d43e462e.css","wap/assets/index-8540448e.js","wap/assets/use-route-726f0d0b.js","wap/assets/index-f0784bc6.css","wap/assets/CusNavigation-87012716.js","wap/assets/CusNavigation-cecd89a4.css","wap/assets/index-18735c56.js","wap/assets/axios-8cd254ce.js","wap/assets/function-call-dc072a29.js","wap/assets/mount-component-2b0f7b23.js","wap/assets/index-dd255780.js","wap/assets/Log-c9a23984.css"] : void 0),
  10046. meta: {
  10047. keepAlive: true
  10048. }
  10049. },
  10050. {
  10051. path: "/wap/demo",
  10052. component: () => __vitePreload(() => import("./Index3-9e732855.js"), true ? ["wap/assets/Index3-9e732855.js","wap/assets/index-b1054607.js","wap/assets/use-route-726f0d0b.js","wap/assets/index-487cde8c.js","wap/assets/index-217c49a0.js","wap/assets/index-6125a673.css","wap/assets/vue-qrcode-reader-d831402f.js","wap/assets/mount-component-2b0f7b23.js","wap/assets/use-scope-id-0b5b8615.js","wap/assets/index-eef3af38.js","wap/assets/on-popup-reopen-c5ca1603.js","wap/assets/Index3-c6180da9.css"] : void 0)
  10053. },
  10054. {
  10055. path: "/wap/mine/wifi",
  10056. component: () => __vitePreload(() => import("./Index-fde06628.js"), true ? ["wap/assets/Index-fde06628.js","wap/assets/index-0f48f786.js","wap/assets/index-487cde8c.js","wap/assets/use-scope-id-0b5b8615.js","wap/assets/index-217c49a0.js","wap/assets/index-eef3af38.js","wap/assets/on-popup-reopen-c5ca1603.js","wap/assets/index-c73aaf1f.css","wap/assets/index-9e456003.js","wap/assets/index-e4fe1374.css","wap/assets/index-b1054607.js","wap/assets/use-route-726f0d0b.js","wap/assets/index-6125a673.css","wap/assets/index-3a8cf159.js","wap/assets/index-5f12e0f5.css","wap/assets/index-8540448e.js","wap/assets/index-f0784bc6.css","wap/assets/index-41ec7e28.js","wap/assets/index-fbff4b7c.css","wap/assets/CusNavigation-87012716.js","wap/assets/CusNavigation-cecd89a4.css","wap/assets/index-18735c56.js","wap/assets/axios-8cd254ce.js","wap/assets/function-call-dc072a29.js","wap/assets/mount-component-2b0f7b23.js","wap/assets/index-fefbbdb7.js","wap/assets/use-placeholder-16d7c5d7.js","wap/assets/index-86652afb.css","wap/assets/index-0229ad12.js","wap/assets/Index-16170745.css"] : void 0)
  10057. }
  10058. ];
  10059. const router = createRouter({
  10060. // history: createWebHistory(),
  10061. history: createWebHashHistory(),
  10062. routes
  10063. });
  10064. const title = "驼人物联网平台";
  10065. const loginPath = "/wap/login";
  10066. const ascendPath = "/wap/device/ascend";
  10067. const accessList = [loginPath, "/wap/register", "/wap/findpassword", "/wap/demo", "article"];
  10068. router.beforeEach((to, from) => {
  10069. const userInfo = useStoreOfUserInfo();
  10070. console.log("导航守卫", to, from);
  10071. if (to.meta && to.meta.title) {
  10072. document.title = to.meta.title;
  10073. } else {
  10074. document.title = title;
  10075. }
  10076. if (userInfo.isLogin) {
  10077. return;
  10078. }
  10079. if (accessList.includes(to.path)) {
  10080. return;
  10081. }
  10082. if (to.path.includes(ascendPath)) {
  10083. return;
  10084. }
  10085. if (to.path.includes("/wap/article/detail")) {
  10086. return;
  10087. }
  10088. return {
  10089. path: loginPath
  10090. };
  10091. });
  10092. function refreshCurrentRoute() {
  10093. const userInfo = useStoreOfUserInfo();
  10094. const current = router.currentRoute.value;
  10095. if (!accessList.includes(current.path) && !userInfo.isLogin) {
  10096. router.replace(loginPath);
  10097. }
  10098. }
  10099. var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
  10100. function getDefaultExportFromCjs(x) {
  10101. return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
  10102. }
  10103. function getAugmentedNamespace(n) {
  10104. if (n.__esModule)
  10105. return n;
  10106. var f = n.default;
  10107. if (typeof f == "function") {
  10108. var a = function a2() {
  10109. if (this instanceof a2) {
  10110. return Reflect.construct(f, arguments, this.constructor);
  10111. }
  10112. return f.apply(this, arguments);
  10113. };
  10114. a.prototype = f.prototype;
  10115. } else
  10116. a = {};
  10117. Object.defineProperty(a, "__esModule", { value: true });
  10118. Object.keys(n).forEach(function(k) {
  10119. var d = Object.getOwnPropertyDescriptor(n, k);
  10120. Object.defineProperty(a, k, d.get ? d : {
  10121. enumerable: true,
  10122. get: function() {
  10123. return n[k];
  10124. }
  10125. });
  10126. });
  10127. return a;
  10128. }
  10129. var cryptoJs = { exports: {} };
  10130. function commonjsRequire(path) {
  10131. throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
  10132. }
  10133. var core = { exports: {} };
  10134. const __viteBrowserExternal = {};
  10135. const __viteBrowserExternal$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  10136. __proto__: null,
  10137. default: __viteBrowserExternal
  10138. }, Symbol.toStringTag, { value: "Module" }));
  10139. const require$$0 = /* @__PURE__ */ getAugmentedNamespace(__viteBrowserExternal$1);
  10140. var hasRequiredCore;
  10141. function requireCore() {
  10142. if (hasRequiredCore)
  10143. return core.exports;
  10144. hasRequiredCore = 1;
  10145. (function(module, exports) {
  10146. (function(root, factory) {
  10147. {
  10148. module.exports = factory();
  10149. }
  10150. })(commonjsGlobal, function() {
  10151. var CryptoJS = CryptoJS || function(Math2, undefined$1) {
  10152. var crypto;
  10153. if (typeof window !== "undefined" && window.crypto) {
  10154. crypto = window.crypto;
  10155. }
  10156. if (typeof self !== "undefined" && self.crypto) {
  10157. crypto = self.crypto;
  10158. }
  10159. if (typeof globalThis !== "undefined" && globalThis.crypto) {
  10160. crypto = globalThis.crypto;
  10161. }
  10162. if (!crypto && typeof window !== "undefined" && window.msCrypto) {
  10163. crypto = window.msCrypto;
  10164. }
  10165. if (!crypto && typeof commonjsGlobal !== "undefined" && commonjsGlobal.crypto) {
  10166. crypto = commonjsGlobal.crypto;
  10167. }
  10168. if (!crypto && typeof commonjsRequire === "function") {
  10169. try {
  10170. crypto = require$$0;
  10171. } catch (err) {
  10172. }
  10173. }
  10174. var cryptoSecureRandomInt = function() {
  10175. if (crypto) {
  10176. if (typeof crypto.getRandomValues === "function") {
  10177. try {
  10178. return crypto.getRandomValues(new Uint32Array(1))[0];
  10179. } catch (err) {
  10180. }
  10181. }
  10182. if (typeof crypto.randomBytes === "function") {
  10183. try {
  10184. return crypto.randomBytes(4).readInt32LE();
  10185. } catch (err) {
  10186. }
  10187. }
  10188. }
  10189. throw new Error("Native crypto module could not be used to get secure random number.");
  10190. };
  10191. var create = Object.create || function() {
  10192. function F() {
  10193. }
  10194. return function(obj) {
  10195. var subtype;
  10196. F.prototype = obj;
  10197. subtype = new F();
  10198. F.prototype = null;
  10199. return subtype;
  10200. };
  10201. }();
  10202. var C = {};
  10203. var C_lib = C.lib = {};
  10204. var Base = C_lib.Base = function() {
  10205. return {
  10206. /**
  10207. * Creates a new object that inherits from this object.
  10208. *
  10209. * @param {Object} overrides Properties to copy into the new object.
  10210. *
  10211. * @return {Object} The new object.
  10212. *
  10213. * @static
  10214. *
  10215. * @example
  10216. *
  10217. * var MyType = CryptoJS.lib.Base.extend({
  10218. * field: 'value',
  10219. *
  10220. * method: function () {
  10221. * }
  10222. * });
  10223. */
  10224. extend: function(overrides) {
  10225. var subtype = create(this);
  10226. if (overrides) {
  10227. subtype.mixIn(overrides);
  10228. }
  10229. if (!subtype.hasOwnProperty("init") || this.init === subtype.init) {
  10230. subtype.init = function() {
  10231. subtype.$super.init.apply(this, arguments);
  10232. };
  10233. }
  10234. subtype.init.prototype = subtype;
  10235. subtype.$super = this;
  10236. return subtype;
  10237. },
  10238. /**
  10239. * Extends this object and runs the init method.
  10240. * Arguments to create() will be passed to init().
  10241. *
  10242. * @return {Object} The new object.
  10243. *
  10244. * @static
  10245. *
  10246. * @example
  10247. *
  10248. * var instance = MyType.create();
  10249. */
  10250. create: function() {
  10251. var instance = this.extend();
  10252. instance.init.apply(instance, arguments);
  10253. return instance;
  10254. },
  10255. /**
  10256. * Initializes a newly created object.
  10257. * Override this method to add some logic when your objects are created.
  10258. *
  10259. * @example
  10260. *
  10261. * var MyType = CryptoJS.lib.Base.extend({
  10262. * init: function () {
  10263. * // ...
  10264. * }
  10265. * });
  10266. */
  10267. init: function() {
  10268. },
  10269. /**
  10270. * Copies properties into this object.
  10271. *
  10272. * @param {Object} properties The properties to mix in.
  10273. *
  10274. * @example
  10275. *
  10276. * MyType.mixIn({
  10277. * field: 'value'
  10278. * });
  10279. */
  10280. mixIn: function(properties) {
  10281. for (var propertyName in properties) {
  10282. if (properties.hasOwnProperty(propertyName)) {
  10283. this[propertyName] = properties[propertyName];
  10284. }
  10285. }
  10286. if (properties.hasOwnProperty("toString")) {
  10287. this.toString = properties.toString;
  10288. }
  10289. },
  10290. /**
  10291. * Creates a copy of this object.
  10292. *
  10293. * @return {Object} The clone.
  10294. *
  10295. * @example
  10296. *
  10297. * var clone = instance.clone();
  10298. */
  10299. clone: function() {
  10300. return this.init.prototype.extend(this);
  10301. }
  10302. };
  10303. }();
  10304. var WordArray = C_lib.WordArray = Base.extend({
  10305. /**
  10306. * Initializes a newly created word array.
  10307. *
  10308. * @param {Array} words (Optional) An array of 32-bit words.
  10309. * @param {number} sigBytes (Optional) The number of significant bytes in the words.
  10310. *
  10311. * @example
  10312. *
  10313. * var wordArray = CryptoJS.lib.WordArray.create();
  10314. * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);
  10315. * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);
  10316. */
  10317. init: function(words, sigBytes) {
  10318. words = this.words = words || [];
  10319. if (sigBytes != undefined$1) {
  10320. this.sigBytes = sigBytes;
  10321. } else {
  10322. this.sigBytes = words.length * 4;
  10323. }
  10324. },
  10325. /**
  10326. * Converts this word array to a string.
  10327. *
  10328. * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex
  10329. *
  10330. * @return {string} The stringified word array.
  10331. *
  10332. * @example
  10333. *
  10334. * var string = wordArray + '';
  10335. * var string = wordArray.toString();
  10336. * var string = wordArray.toString(CryptoJS.enc.Utf8);
  10337. */
  10338. toString: function(encoder) {
  10339. return (encoder || Hex).stringify(this);
  10340. },
  10341. /**
  10342. * Concatenates a word array to this word array.
  10343. *
  10344. * @param {WordArray} wordArray The word array to append.
  10345. *
  10346. * @return {WordArray} This word array.
  10347. *
  10348. * @example
  10349. *
  10350. * wordArray1.concat(wordArray2);
  10351. */
  10352. concat: function(wordArray) {
  10353. var thisWords = this.words;
  10354. var thatWords = wordArray.words;
  10355. var thisSigBytes = this.sigBytes;
  10356. var thatSigBytes = wordArray.sigBytes;
  10357. this.clamp();
  10358. if (thisSigBytes % 4) {
  10359. for (var i = 0; i < thatSigBytes; i++) {
  10360. var thatByte = thatWords[i >>> 2] >>> 24 - i % 4 * 8 & 255;
  10361. thisWords[thisSigBytes + i >>> 2] |= thatByte << 24 - (thisSigBytes + i) % 4 * 8;
  10362. }
  10363. } else {
  10364. for (var j = 0; j < thatSigBytes; j += 4) {
  10365. thisWords[thisSigBytes + j >>> 2] = thatWords[j >>> 2];
  10366. }
  10367. }
  10368. this.sigBytes += thatSigBytes;
  10369. return this;
  10370. },
  10371. /**
  10372. * Removes insignificant bits.
  10373. *
  10374. * @example
  10375. *
  10376. * wordArray.clamp();
  10377. */
  10378. clamp: function() {
  10379. var words = this.words;
  10380. var sigBytes = this.sigBytes;
  10381. words[sigBytes >>> 2] &= 4294967295 << 32 - sigBytes % 4 * 8;
  10382. words.length = Math2.ceil(sigBytes / 4);
  10383. },
  10384. /**
  10385. * Creates a copy of this word array.
  10386. *
  10387. * @return {WordArray} The clone.
  10388. *
  10389. * @example
  10390. *
  10391. * var clone = wordArray.clone();
  10392. */
  10393. clone: function() {
  10394. var clone = Base.clone.call(this);
  10395. clone.words = this.words.slice(0);
  10396. return clone;
  10397. },
  10398. /**
  10399. * Creates a word array filled with random bytes.
  10400. *
  10401. * @param {number} nBytes The number of random bytes to generate.
  10402. *
  10403. * @return {WordArray} The random word array.
  10404. *
  10405. * @static
  10406. *
  10407. * @example
  10408. *
  10409. * var wordArray = CryptoJS.lib.WordArray.random(16);
  10410. */
  10411. random: function(nBytes) {
  10412. var words = [];
  10413. for (var i = 0; i < nBytes; i += 4) {
  10414. words.push(cryptoSecureRandomInt());
  10415. }
  10416. return new WordArray.init(words, nBytes);
  10417. }
  10418. });
  10419. var C_enc = C.enc = {};
  10420. var Hex = C_enc.Hex = {
  10421. /**
  10422. * Converts a word array to a hex string.
  10423. *
  10424. * @param {WordArray} wordArray The word array.
  10425. *
  10426. * @return {string} The hex string.
  10427. *
  10428. * @static
  10429. *
  10430. * @example
  10431. *
  10432. * var hexString = CryptoJS.enc.Hex.stringify(wordArray);
  10433. */
  10434. stringify: function(wordArray) {
  10435. var words = wordArray.words;
  10436. var sigBytes = wordArray.sigBytes;
  10437. var hexChars = [];
  10438. for (var i = 0; i < sigBytes; i++) {
  10439. var bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 255;
  10440. hexChars.push((bite >>> 4).toString(16));
  10441. hexChars.push((bite & 15).toString(16));
  10442. }
  10443. return hexChars.join("");
  10444. },
  10445. /**
  10446. * Converts a hex string to a word array.
  10447. *
  10448. * @param {string} hexStr The hex string.
  10449. *
  10450. * @return {WordArray} The word array.
  10451. *
  10452. * @static
  10453. *
  10454. * @example
  10455. *
  10456. * var wordArray = CryptoJS.enc.Hex.parse(hexString);
  10457. */
  10458. parse: function(hexStr) {
  10459. var hexStrLength = hexStr.length;
  10460. var words = [];
  10461. for (var i = 0; i < hexStrLength; i += 2) {
  10462. words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << 24 - i % 8 * 4;
  10463. }
  10464. return new WordArray.init(words, hexStrLength / 2);
  10465. }
  10466. };
  10467. var Latin1 = C_enc.Latin1 = {
  10468. /**
  10469. * Converts a word array to a Latin1 string.
  10470. *
  10471. * @param {WordArray} wordArray The word array.
  10472. *
  10473. * @return {string} The Latin1 string.
  10474. *
  10475. * @static
  10476. *
  10477. * @example
  10478. *
  10479. * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);
  10480. */
  10481. stringify: function(wordArray) {
  10482. var words = wordArray.words;
  10483. var sigBytes = wordArray.sigBytes;
  10484. var latin1Chars = [];
  10485. for (var i = 0; i < sigBytes; i++) {
  10486. var bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 255;
  10487. latin1Chars.push(String.fromCharCode(bite));
  10488. }
  10489. return latin1Chars.join("");
  10490. },
  10491. /**
  10492. * Converts a Latin1 string to a word array.
  10493. *
  10494. * @param {string} latin1Str The Latin1 string.
  10495. *
  10496. * @return {WordArray} The word array.
  10497. *
  10498. * @static
  10499. *
  10500. * @example
  10501. *
  10502. * var wordArray = CryptoJS.enc.Latin1.parse(latin1String);
  10503. */
  10504. parse: function(latin1Str) {
  10505. var latin1StrLength = latin1Str.length;
  10506. var words = [];
  10507. for (var i = 0; i < latin1StrLength; i++) {
  10508. words[i >>> 2] |= (latin1Str.charCodeAt(i) & 255) << 24 - i % 4 * 8;
  10509. }
  10510. return new WordArray.init(words, latin1StrLength);
  10511. }
  10512. };
  10513. var Utf8 = C_enc.Utf8 = {
  10514. /**
  10515. * Converts a word array to a UTF-8 string.
  10516. *
  10517. * @param {WordArray} wordArray The word array.
  10518. *
  10519. * @return {string} The UTF-8 string.
  10520. *
  10521. * @static
  10522. *
  10523. * @example
  10524. *
  10525. * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);
  10526. */
  10527. stringify: function(wordArray) {
  10528. try {
  10529. return decodeURIComponent(escape(Latin1.stringify(wordArray)));
  10530. } catch (e) {
  10531. throw new Error("Malformed UTF-8 data");
  10532. }
  10533. },
  10534. /**
  10535. * Converts a UTF-8 string to a word array.
  10536. *
  10537. * @param {string} utf8Str The UTF-8 string.
  10538. *
  10539. * @return {WordArray} The word array.
  10540. *
  10541. * @static
  10542. *
  10543. * @example
  10544. *
  10545. * var wordArray = CryptoJS.enc.Utf8.parse(utf8String);
  10546. */
  10547. parse: function(utf8Str) {
  10548. return Latin1.parse(unescape(encodeURIComponent(utf8Str)));
  10549. }
  10550. };
  10551. var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({
  10552. /**
  10553. * Resets this block algorithm's data buffer to its initial state.
  10554. *
  10555. * @example
  10556. *
  10557. * bufferedBlockAlgorithm.reset();
  10558. */
  10559. reset: function() {
  10560. this._data = new WordArray.init();
  10561. this._nDataBytes = 0;
  10562. },
  10563. /**
  10564. * Adds new data to this block algorithm's buffer.
  10565. *
  10566. * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.
  10567. *
  10568. * @example
  10569. *
  10570. * bufferedBlockAlgorithm._append('data');
  10571. * bufferedBlockAlgorithm._append(wordArray);
  10572. */
  10573. _append: function(data) {
  10574. if (typeof data == "string") {
  10575. data = Utf8.parse(data);
  10576. }
  10577. this._data.concat(data);
  10578. this._nDataBytes += data.sigBytes;
  10579. },
  10580. /**
  10581. * Processes available data blocks.
  10582. *
  10583. * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.
  10584. *
  10585. * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.
  10586. *
  10587. * @return {WordArray} The processed data.
  10588. *
  10589. * @example
  10590. *
  10591. * var processedData = bufferedBlockAlgorithm._process();
  10592. * var processedData = bufferedBlockAlgorithm._process(!!'flush');
  10593. */
  10594. _process: function(doFlush) {
  10595. var processedWords;
  10596. var data = this._data;
  10597. var dataWords = data.words;
  10598. var dataSigBytes = data.sigBytes;
  10599. var blockSize = this.blockSize;
  10600. var blockSizeBytes = blockSize * 4;
  10601. var nBlocksReady = dataSigBytes / blockSizeBytes;
  10602. if (doFlush) {
  10603. nBlocksReady = Math2.ceil(nBlocksReady);
  10604. } else {
  10605. nBlocksReady = Math2.max((nBlocksReady | 0) - this._minBufferSize, 0);
  10606. }
  10607. var nWordsReady = nBlocksReady * blockSize;
  10608. var nBytesReady = Math2.min(nWordsReady * 4, dataSigBytes);
  10609. if (nWordsReady) {
  10610. for (var offset = 0; offset < nWordsReady; offset += blockSize) {
  10611. this._doProcessBlock(dataWords, offset);
  10612. }
  10613. processedWords = dataWords.splice(0, nWordsReady);
  10614. data.sigBytes -= nBytesReady;
  10615. }
  10616. return new WordArray.init(processedWords, nBytesReady);
  10617. },
  10618. /**
  10619. * Creates a copy of this object.
  10620. *
  10621. * @return {Object} The clone.
  10622. *
  10623. * @example
  10624. *
  10625. * var clone = bufferedBlockAlgorithm.clone();
  10626. */
  10627. clone: function() {
  10628. var clone = Base.clone.call(this);
  10629. clone._data = this._data.clone();
  10630. return clone;
  10631. },
  10632. _minBufferSize: 0
  10633. });
  10634. C_lib.Hasher = BufferedBlockAlgorithm.extend({
  10635. /**
  10636. * Configuration options.
  10637. */
  10638. cfg: Base.extend(),
  10639. /**
  10640. * Initializes a newly created hasher.
  10641. *
  10642. * @param {Object} cfg (Optional) The configuration options to use for this hash computation.
  10643. *
  10644. * @example
  10645. *
  10646. * var hasher = CryptoJS.algo.SHA256.create();
  10647. */
  10648. init: function(cfg) {
  10649. this.cfg = this.cfg.extend(cfg);
  10650. this.reset();
  10651. },
  10652. /**
  10653. * Resets this hasher to its initial state.
  10654. *
  10655. * @example
  10656. *
  10657. * hasher.reset();
  10658. */
  10659. reset: function() {
  10660. BufferedBlockAlgorithm.reset.call(this);
  10661. this._doReset();
  10662. },
  10663. /**
  10664. * Updates this hasher with a message.
  10665. *
  10666. * @param {WordArray|string} messageUpdate The message to append.
  10667. *
  10668. * @return {Hasher} This hasher.
  10669. *
  10670. * @example
  10671. *
  10672. * hasher.update('message');
  10673. * hasher.update(wordArray);
  10674. */
  10675. update: function(messageUpdate) {
  10676. this._append(messageUpdate);
  10677. this._process();
  10678. return this;
  10679. },
  10680. /**
  10681. * Finalizes the hash computation.
  10682. * Note that the finalize operation is effectively a destructive, read-once operation.
  10683. *
  10684. * @param {WordArray|string} messageUpdate (Optional) A final message update.
  10685. *
  10686. * @return {WordArray} The hash.
  10687. *
  10688. * @example
  10689. *
  10690. * var hash = hasher.finalize();
  10691. * var hash = hasher.finalize('message');
  10692. * var hash = hasher.finalize(wordArray);
  10693. */
  10694. finalize: function(messageUpdate) {
  10695. if (messageUpdate) {
  10696. this._append(messageUpdate);
  10697. }
  10698. var hash = this._doFinalize();
  10699. return hash;
  10700. },
  10701. blockSize: 512 / 32,
  10702. /**
  10703. * Creates a shortcut function to a hasher's object interface.
  10704. *
  10705. * @param {Hasher} hasher The hasher to create a helper for.
  10706. *
  10707. * @return {Function} The shortcut function.
  10708. *
  10709. * @static
  10710. *
  10711. * @example
  10712. *
  10713. * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);
  10714. */
  10715. _createHelper: function(hasher) {
  10716. return function(message, cfg) {
  10717. return new hasher.init(cfg).finalize(message);
  10718. };
  10719. },
  10720. /**
  10721. * Creates a shortcut function to the HMAC's object interface.
  10722. *
  10723. * @param {Hasher} hasher The hasher to use in this HMAC helper.
  10724. *
  10725. * @return {Function} The shortcut function.
  10726. *
  10727. * @static
  10728. *
  10729. * @example
  10730. *
  10731. * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);
  10732. */
  10733. _createHmacHelper: function(hasher) {
  10734. return function(message, key) {
  10735. return new C_algo.HMAC.init(hasher, key).finalize(message);
  10736. };
  10737. }
  10738. });
  10739. var C_algo = C.algo = {};
  10740. return C;
  10741. }(Math);
  10742. return CryptoJS;
  10743. });
  10744. })(core);
  10745. return core.exports;
  10746. }
  10747. var x64Core = { exports: {} };
  10748. var hasRequiredX64Core;
  10749. function requireX64Core() {
  10750. if (hasRequiredX64Core)
  10751. return x64Core.exports;
  10752. hasRequiredX64Core = 1;
  10753. (function(module, exports) {
  10754. (function(root, factory) {
  10755. {
  10756. module.exports = factory(requireCore());
  10757. }
  10758. })(commonjsGlobal, function(CryptoJS) {
  10759. (function(undefined$1) {
  10760. var C = CryptoJS;
  10761. var C_lib = C.lib;
  10762. var Base = C_lib.Base;
  10763. var X32WordArray = C_lib.WordArray;
  10764. var C_x64 = C.x64 = {};
  10765. C_x64.Word = Base.extend({
  10766. /**
  10767. * Initializes a newly created 64-bit word.
  10768. *
  10769. * @param {number} high The high 32 bits.
  10770. * @param {number} low The low 32 bits.
  10771. *
  10772. * @example
  10773. *
  10774. * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607);
  10775. */
  10776. init: function(high, low) {
  10777. this.high = high;
  10778. this.low = low;
  10779. }
  10780. /**
  10781. * Bitwise NOTs this word.
  10782. *
  10783. * @return {X64Word} A new x64-Word object after negating.
  10784. *
  10785. * @example
  10786. *
  10787. * var negated = x64Word.not();
  10788. */
  10789. // not: function () {
  10790. // var high = ~this.high;
  10791. // var low = ~this.low;
  10792. // return X64Word.create(high, low);
  10793. // },
  10794. /**
  10795. * Bitwise ANDs this word with the passed word.
  10796. *
  10797. * @param {X64Word} word The x64-Word to AND with this word.
  10798. *
  10799. * @return {X64Word} A new x64-Word object after ANDing.
  10800. *
  10801. * @example
  10802. *
  10803. * var anded = x64Word.and(anotherX64Word);
  10804. */
  10805. // and: function (word) {
  10806. // var high = this.high & word.high;
  10807. // var low = this.low & word.low;
  10808. // return X64Word.create(high, low);
  10809. // },
  10810. /**
  10811. * Bitwise ORs this word with the passed word.
  10812. *
  10813. * @param {X64Word} word The x64-Word to OR with this word.
  10814. *
  10815. * @return {X64Word} A new x64-Word object after ORing.
  10816. *
  10817. * @example
  10818. *
  10819. * var ored = x64Word.or(anotherX64Word);
  10820. */
  10821. // or: function (word) {
  10822. // var high = this.high | word.high;
  10823. // var low = this.low | word.low;
  10824. // return X64Word.create(high, low);
  10825. // },
  10826. /**
  10827. * Bitwise XORs this word with the passed word.
  10828. *
  10829. * @param {X64Word} word The x64-Word to XOR with this word.
  10830. *
  10831. * @return {X64Word} A new x64-Word object after XORing.
  10832. *
  10833. * @example
  10834. *
  10835. * var xored = x64Word.xor(anotherX64Word);
  10836. */
  10837. // xor: function (word) {
  10838. // var high = this.high ^ word.high;
  10839. // var low = this.low ^ word.low;
  10840. // return X64Word.create(high, low);
  10841. // },
  10842. /**
  10843. * Shifts this word n bits to the left.
  10844. *
  10845. * @param {number} n The number of bits to shift.
  10846. *
  10847. * @return {X64Word} A new x64-Word object after shifting.
  10848. *
  10849. * @example
  10850. *
  10851. * var shifted = x64Word.shiftL(25);
  10852. */
  10853. // shiftL: function (n) {
  10854. // if (n < 32) {
  10855. // var high = (this.high << n) | (this.low >>> (32 - n));
  10856. // var low = this.low << n;
  10857. // } else {
  10858. // var high = this.low << (n - 32);
  10859. // var low = 0;
  10860. // }
  10861. // return X64Word.create(high, low);
  10862. // },
  10863. /**
  10864. * Shifts this word n bits to the right.
  10865. *
  10866. * @param {number} n The number of bits to shift.
  10867. *
  10868. * @return {X64Word} A new x64-Word object after shifting.
  10869. *
  10870. * @example
  10871. *
  10872. * var shifted = x64Word.shiftR(7);
  10873. */
  10874. // shiftR: function (n) {
  10875. // if (n < 32) {
  10876. // var low = (this.low >>> n) | (this.high << (32 - n));
  10877. // var high = this.high >>> n;
  10878. // } else {
  10879. // var low = this.high >>> (n - 32);
  10880. // var high = 0;
  10881. // }
  10882. // return X64Word.create(high, low);
  10883. // },
  10884. /**
  10885. * Rotates this word n bits to the left.
  10886. *
  10887. * @param {number} n The number of bits to rotate.
  10888. *
  10889. * @return {X64Word} A new x64-Word object after rotating.
  10890. *
  10891. * @example
  10892. *
  10893. * var rotated = x64Word.rotL(25);
  10894. */
  10895. // rotL: function (n) {
  10896. // return this.shiftL(n).or(this.shiftR(64 - n));
  10897. // },
  10898. /**
  10899. * Rotates this word n bits to the right.
  10900. *
  10901. * @param {number} n The number of bits to rotate.
  10902. *
  10903. * @return {X64Word} A new x64-Word object after rotating.
  10904. *
  10905. * @example
  10906. *
  10907. * var rotated = x64Word.rotR(7);
  10908. */
  10909. // rotR: function (n) {
  10910. // return this.shiftR(n).or(this.shiftL(64 - n));
  10911. // },
  10912. /**
  10913. * Adds this word with the passed word.
  10914. *
  10915. * @param {X64Word} word The x64-Word to add with this word.
  10916. *
  10917. * @return {X64Word} A new x64-Word object after adding.
  10918. *
  10919. * @example
  10920. *
  10921. * var added = x64Word.add(anotherX64Word);
  10922. */
  10923. // add: function (word) {
  10924. // var low = (this.low + word.low) | 0;
  10925. // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0;
  10926. // var high = (this.high + word.high + carry) | 0;
  10927. // return X64Word.create(high, low);
  10928. // }
  10929. });
  10930. C_x64.WordArray = Base.extend({
  10931. /**
  10932. * Initializes a newly created word array.
  10933. *
  10934. * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects.
  10935. * @param {number} sigBytes (Optional) The number of significant bytes in the words.
  10936. *
  10937. * @example
  10938. *
  10939. * var wordArray = CryptoJS.x64.WordArray.create();
  10940. *
  10941. * var wordArray = CryptoJS.x64.WordArray.create([
  10942. * CryptoJS.x64.Word.create(0x00010203, 0x04050607),
  10943. * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)
  10944. * ]);
  10945. *
  10946. * var wordArray = CryptoJS.x64.WordArray.create([
  10947. * CryptoJS.x64.Word.create(0x00010203, 0x04050607),
  10948. * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)
  10949. * ], 10);
  10950. */
  10951. init: function(words, sigBytes) {
  10952. words = this.words = words || [];
  10953. if (sigBytes != undefined$1) {
  10954. this.sigBytes = sigBytes;
  10955. } else {
  10956. this.sigBytes = words.length * 8;
  10957. }
  10958. },
  10959. /**
  10960. * Converts this 64-bit word array to a 32-bit word array.
  10961. *
  10962. * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array.
  10963. *
  10964. * @example
  10965. *
  10966. * var x32WordArray = x64WordArray.toX32();
  10967. */
  10968. toX32: function() {
  10969. var x64Words = this.words;
  10970. var x64WordsLength = x64Words.length;
  10971. var x32Words = [];
  10972. for (var i = 0; i < x64WordsLength; i++) {
  10973. var x64Word = x64Words[i];
  10974. x32Words.push(x64Word.high);
  10975. x32Words.push(x64Word.low);
  10976. }
  10977. return X32WordArray.create(x32Words, this.sigBytes);
  10978. },
  10979. /**
  10980. * Creates a copy of this word array.
  10981. *
  10982. * @return {X64WordArray} The clone.
  10983. *
  10984. * @example
  10985. *
  10986. * var clone = x64WordArray.clone();
  10987. */
  10988. clone: function() {
  10989. var clone = Base.clone.call(this);
  10990. var words = clone.words = this.words.slice(0);
  10991. var wordsLength = words.length;
  10992. for (var i = 0; i < wordsLength; i++) {
  10993. words[i] = words[i].clone();
  10994. }
  10995. return clone;
  10996. }
  10997. });
  10998. })();
  10999. return CryptoJS;
  11000. });
  11001. })(x64Core);
  11002. return x64Core.exports;
  11003. }
  11004. var libTypedarrays = { exports: {} };
  11005. var hasRequiredLibTypedarrays;
  11006. function requireLibTypedarrays() {
  11007. if (hasRequiredLibTypedarrays)
  11008. return libTypedarrays.exports;
  11009. hasRequiredLibTypedarrays = 1;
  11010. (function(module, exports) {
  11011. (function(root, factory) {
  11012. {
  11013. module.exports = factory(requireCore());
  11014. }
  11015. })(commonjsGlobal, function(CryptoJS) {
  11016. (function() {
  11017. if (typeof ArrayBuffer != "function") {
  11018. return;
  11019. }
  11020. var C = CryptoJS;
  11021. var C_lib = C.lib;
  11022. var WordArray = C_lib.WordArray;
  11023. var superInit = WordArray.init;
  11024. var subInit = WordArray.init = function(typedArray) {
  11025. if (typedArray instanceof ArrayBuffer) {
  11026. typedArray = new Uint8Array(typedArray);
  11027. }
  11028. if (typedArray instanceof Int8Array || typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray || typedArray instanceof Int16Array || typedArray instanceof Uint16Array || typedArray instanceof Int32Array || typedArray instanceof Uint32Array || typedArray instanceof Float32Array || typedArray instanceof Float64Array) {
  11029. typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength);
  11030. }
  11031. if (typedArray instanceof Uint8Array) {
  11032. var typedArrayByteLength = typedArray.byteLength;
  11033. var words = [];
  11034. for (var i = 0; i < typedArrayByteLength; i++) {
  11035. words[i >>> 2] |= typedArray[i] << 24 - i % 4 * 8;
  11036. }
  11037. superInit.call(this, words, typedArrayByteLength);
  11038. } else {
  11039. superInit.apply(this, arguments);
  11040. }
  11041. };
  11042. subInit.prototype = WordArray;
  11043. })();
  11044. return CryptoJS.lib.WordArray;
  11045. });
  11046. })(libTypedarrays);
  11047. return libTypedarrays.exports;
  11048. }
  11049. var encUtf16 = { exports: {} };
  11050. var hasRequiredEncUtf16;
  11051. function requireEncUtf16() {
  11052. if (hasRequiredEncUtf16)
  11053. return encUtf16.exports;
  11054. hasRequiredEncUtf16 = 1;
  11055. (function(module, exports) {
  11056. (function(root, factory) {
  11057. {
  11058. module.exports = factory(requireCore());
  11059. }
  11060. })(commonjsGlobal, function(CryptoJS) {
  11061. (function() {
  11062. var C = CryptoJS;
  11063. var C_lib = C.lib;
  11064. var WordArray = C_lib.WordArray;
  11065. var C_enc = C.enc;
  11066. C_enc.Utf16 = C_enc.Utf16BE = {
  11067. /**
  11068. * Converts a word array to a UTF-16 BE string.
  11069. *
  11070. * @param {WordArray} wordArray The word array.
  11071. *
  11072. * @return {string} The UTF-16 BE string.
  11073. *
  11074. * @static
  11075. *
  11076. * @example
  11077. *
  11078. * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray);
  11079. */
  11080. stringify: function(wordArray) {
  11081. var words = wordArray.words;
  11082. var sigBytes = wordArray.sigBytes;
  11083. var utf16Chars = [];
  11084. for (var i = 0; i < sigBytes; i += 2) {
  11085. var codePoint = words[i >>> 2] >>> 16 - i % 4 * 8 & 65535;
  11086. utf16Chars.push(String.fromCharCode(codePoint));
  11087. }
  11088. return utf16Chars.join("");
  11089. },
  11090. /**
  11091. * Converts a UTF-16 BE string to a word array.
  11092. *
  11093. * @param {string} utf16Str The UTF-16 BE string.
  11094. *
  11095. * @return {WordArray} The word array.
  11096. *
  11097. * @static
  11098. *
  11099. * @example
  11100. *
  11101. * var wordArray = CryptoJS.enc.Utf16.parse(utf16String);
  11102. */
  11103. parse: function(utf16Str) {
  11104. var utf16StrLength = utf16Str.length;
  11105. var words = [];
  11106. for (var i = 0; i < utf16StrLength; i++) {
  11107. words[i >>> 1] |= utf16Str.charCodeAt(i) << 16 - i % 2 * 16;
  11108. }
  11109. return WordArray.create(words, utf16StrLength * 2);
  11110. }
  11111. };
  11112. C_enc.Utf16LE = {
  11113. /**
  11114. * Converts a word array to a UTF-16 LE string.
  11115. *
  11116. * @param {WordArray} wordArray The word array.
  11117. *
  11118. * @return {string} The UTF-16 LE string.
  11119. *
  11120. * @static
  11121. *
  11122. * @example
  11123. *
  11124. * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray);
  11125. */
  11126. stringify: function(wordArray) {
  11127. var words = wordArray.words;
  11128. var sigBytes = wordArray.sigBytes;
  11129. var utf16Chars = [];
  11130. for (var i = 0; i < sigBytes; i += 2) {
  11131. var codePoint = swapEndian(words[i >>> 2] >>> 16 - i % 4 * 8 & 65535);
  11132. utf16Chars.push(String.fromCharCode(codePoint));
  11133. }
  11134. return utf16Chars.join("");
  11135. },
  11136. /**
  11137. * Converts a UTF-16 LE string to a word array.
  11138. *
  11139. * @param {string} utf16Str The UTF-16 LE string.
  11140. *
  11141. * @return {WordArray} The word array.
  11142. *
  11143. * @static
  11144. *
  11145. * @example
  11146. *
  11147. * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str);
  11148. */
  11149. parse: function(utf16Str) {
  11150. var utf16StrLength = utf16Str.length;
  11151. var words = [];
  11152. for (var i = 0; i < utf16StrLength; i++) {
  11153. words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << 16 - i % 2 * 16);
  11154. }
  11155. return WordArray.create(words, utf16StrLength * 2);
  11156. }
  11157. };
  11158. function swapEndian(word) {
  11159. return word << 8 & 4278255360 | word >>> 8 & 16711935;
  11160. }
  11161. })();
  11162. return CryptoJS.enc.Utf16;
  11163. });
  11164. })(encUtf16);
  11165. return encUtf16.exports;
  11166. }
  11167. var encBase64 = { exports: {} };
  11168. var hasRequiredEncBase64;
  11169. function requireEncBase64() {
  11170. if (hasRequiredEncBase64)
  11171. return encBase64.exports;
  11172. hasRequiredEncBase64 = 1;
  11173. (function(module, exports) {
  11174. (function(root, factory) {
  11175. {
  11176. module.exports = factory(requireCore());
  11177. }
  11178. })(commonjsGlobal, function(CryptoJS) {
  11179. (function() {
  11180. var C = CryptoJS;
  11181. var C_lib = C.lib;
  11182. var WordArray = C_lib.WordArray;
  11183. var C_enc = C.enc;
  11184. C_enc.Base64 = {
  11185. /**
  11186. * Converts a word array to a Base64 string.
  11187. *
  11188. * @param {WordArray} wordArray The word array.
  11189. *
  11190. * @return {string} The Base64 string.
  11191. *
  11192. * @static
  11193. *
  11194. * @example
  11195. *
  11196. * var base64String = CryptoJS.enc.Base64.stringify(wordArray);
  11197. */
  11198. stringify: function(wordArray) {
  11199. var words = wordArray.words;
  11200. var sigBytes = wordArray.sigBytes;
  11201. var map = this._map;
  11202. wordArray.clamp();
  11203. var base64Chars = [];
  11204. for (var i = 0; i < sigBytes; i += 3) {
  11205. var byte1 = words[i >>> 2] >>> 24 - i % 4 * 8 & 255;
  11206. var byte2 = words[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 255;
  11207. var byte3 = words[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 255;
  11208. var triplet = byte1 << 16 | byte2 << 8 | byte3;
  11209. for (var j = 0; j < 4 && i + j * 0.75 < sigBytes; j++) {
  11210. base64Chars.push(map.charAt(triplet >>> 6 * (3 - j) & 63));
  11211. }
  11212. }
  11213. var paddingChar = map.charAt(64);
  11214. if (paddingChar) {
  11215. while (base64Chars.length % 4) {
  11216. base64Chars.push(paddingChar);
  11217. }
  11218. }
  11219. return base64Chars.join("");
  11220. },
  11221. /**
  11222. * Converts a Base64 string to a word array.
  11223. *
  11224. * @param {string} base64Str The Base64 string.
  11225. *
  11226. * @return {WordArray} The word array.
  11227. *
  11228. * @static
  11229. *
  11230. * @example
  11231. *
  11232. * var wordArray = CryptoJS.enc.Base64.parse(base64String);
  11233. */
  11234. parse: function(base64Str) {
  11235. var base64StrLength = base64Str.length;
  11236. var map = this._map;
  11237. var reverseMap = this._reverseMap;
  11238. if (!reverseMap) {
  11239. reverseMap = this._reverseMap = [];
  11240. for (var j = 0; j < map.length; j++) {
  11241. reverseMap[map.charCodeAt(j)] = j;
  11242. }
  11243. }
  11244. var paddingChar = map.charAt(64);
  11245. if (paddingChar) {
  11246. var paddingIndex = base64Str.indexOf(paddingChar);
  11247. if (paddingIndex !== -1) {
  11248. base64StrLength = paddingIndex;
  11249. }
  11250. }
  11251. return parseLoop(base64Str, base64StrLength, reverseMap);
  11252. },
  11253. _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
  11254. };
  11255. function parseLoop(base64Str, base64StrLength, reverseMap) {
  11256. var words = [];
  11257. var nBytes = 0;
  11258. for (var i = 0; i < base64StrLength; i++) {
  11259. if (i % 4) {
  11260. var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << i % 4 * 2;
  11261. var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> 6 - i % 4 * 2;
  11262. var bitsCombined = bits1 | bits2;
  11263. words[nBytes >>> 2] |= bitsCombined << 24 - nBytes % 4 * 8;
  11264. nBytes++;
  11265. }
  11266. }
  11267. return WordArray.create(words, nBytes);
  11268. }
  11269. })();
  11270. return CryptoJS.enc.Base64;
  11271. });
  11272. })(encBase64);
  11273. return encBase64.exports;
  11274. }
  11275. var encBase64url = { exports: {} };
  11276. var hasRequiredEncBase64url;
  11277. function requireEncBase64url() {
  11278. if (hasRequiredEncBase64url)
  11279. return encBase64url.exports;
  11280. hasRequiredEncBase64url = 1;
  11281. (function(module, exports) {
  11282. (function(root, factory) {
  11283. {
  11284. module.exports = factory(requireCore());
  11285. }
  11286. })(commonjsGlobal, function(CryptoJS) {
  11287. (function() {
  11288. var C = CryptoJS;
  11289. var C_lib = C.lib;
  11290. var WordArray = C_lib.WordArray;
  11291. var C_enc = C.enc;
  11292. C_enc.Base64url = {
  11293. /**
  11294. * Converts a word array to a Base64url string.
  11295. *
  11296. * @param {WordArray} wordArray The word array.
  11297. *
  11298. * @param {boolean} urlSafe Whether to use url safe
  11299. *
  11300. * @return {string} The Base64url string.
  11301. *
  11302. * @static
  11303. *
  11304. * @example
  11305. *
  11306. * var base64String = CryptoJS.enc.Base64url.stringify(wordArray);
  11307. */
  11308. stringify: function(wordArray, urlSafe) {
  11309. if (urlSafe === void 0) {
  11310. urlSafe = true;
  11311. }
  11312. var words = wordArray.words;
  11313. var sigBytes = wordArray.sigBytes;
  11314. var map = urlSafe ? this._safe_map : this._map;
  11315. wordArray.clamp();
  11316. var base64Chars = [];
  11317. for (var i = 0; i < sigBytes; i += 3) {
  11318. var byte1 = words[i >>> 2] >>> 24 - i % 4 * 8 & 255;
  11319. var byte2 = words[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 255;
  11320. var byte3 = words[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 255;
  11321. var triplet = byte1 << 16 | byte2 << 8 | byte3;
  11322. for (var j = 0; j < 4 && i + j * 0.75 < sigBytes; j++) {
  11323. base64Chars.push(map.charAt(triplet >>> 6 * (3 - j) & 63));
  11324. }
  11325. }
  11326. var paddingChar = map.charAt(64);
  11327. if (paddingChar) {
  11328. while (base64Chars.length % 4) {
  11329. base64Chars.push(paddingChar);
  11330. }
  11331. }
  11332. return base64Chars.join("");
  11333. },
  11334. /**
  11335. * Converts a Base64url string to a word array.
  11336. *
  11337. * @param {string} base64Str The Base64url string.
  11338. *
  11339. * @param {boolean} urlSafe Whether to use url safe
  11340. *
  11341. * @return {WordArray} The word array.
  11342. *
  11343. * @static
  11344. *
  11345. * @example
  11346. *
  11347. * var wordArray = CryptoJS.enc.Base64url.parse(base64String);
  11348. */
  11349. parse: function(base64Str, urlSafe) {
  11350. if (urlSafe === void 0) {
  11351. urlSafe = true;
  11352. }
  11353. var base64StrLength = base64Str.length;
  11354. var map = urlSafe ? this._safe_map : this._map;
  11355. var reverseMap = this._reverseMap;
  11356. if (!reverseMap) {
  11357. reverseMap = this._reverseMap = [];
  11358. for (var j = 0; j < map.length; j++) {
  11359. reverseMap[map.charCodeAt(j)] = j;
  11360. }
  11361. }
  11362. var paddingChar = map.charAt(64);
  11363. if (paddingChar) {
  11364. var paddingIndex = base64Str.indexOf(paddingChar);
  11365. if (paddingIndex !== -1) {
  11366. base64StrLength = paddingIndex;
  11367. }
  11368. }
  11369. return parseLoop(base64Str, base64StrLength, reverseMap);
  11370. },
  11371. _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
  11372. _safe_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"
  11373. };
  11374. function parseLoop(base64Str, base64StrLength, reverseMap) {
  11375. var words = [];
  11376. var nBytes = 0;
  11377. for (var i = 0; i < base64StrLength; i++) {
  11378. if (i % 4) {
  11379. var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << i % 4 * 2;
  11380. var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> 6 - i % 4 * 2;
  11381. var bitsCombined = bits1 | bits2;
  11382. words[nBytes >>> 2] |= bitsCombined << 24 - nBytes % 4 * 8;
  11383. nBytes++;
  11384. }
  11385. }
  11386. return WordArray.create(words, nBytes);
  11387. }
  11388. })();
  11389. return CryptoJS.enc.Base64url;
  11390. });
  11391. })(encBase64url);
  11392. return encBase64url.exports;
  11393. }
  11394. var md5 = { exports: {} };
  11395. var hasRequiredMd5;
  11396. function requireMd5() {
  11397. if (hasRequiredMd5)
  11398. return md5.exports;
  11399. hasRequiredMd5 = 1;
  11400. (function(module, exports) {
  11401. (function(root, factory) {
  11402. {
  11403. module.exports = factory(requireCore());
  11404. }
  11405. })(commonjsGlobal, function(CryptoJS) {
  11406. (function(Math2) {
  11407. var C = CryptoJS;
  11408. var C_lib = C.lib;
  11409. var WordArray = C_lib.WordArray;
  11410. var Hasher = C_lib.Hasher;
  11411. var C_algo = C.algo;
  11412. var T = [];
  11413. (function() {
  11414. for (var i = 0; i < 64; i++) {
  11415. T[i] = Math2.abs(Math2.sin(i + 1)) * 4294967296 | 0;
  11416. }
  11417. })();
  11418. var MD5 = C_algo.MD5 = Hasher.extend({
  11419. _doReset: function() {
  11420. this._hash = new WordArray.init([
  11421. 1732584193,
  11422. 4023233417,
  11423. 2562383102,
  11424. 271733878
  11425. ]);
  11426. },
  11427. _doProcessBlock: function(M, offset) {
  11428. for (var i = 0; i < 16; i++) {
  11429. var offset_i = offset + i;
  11430. var M_offset_i = M[offset_i];
  11431. M[offset_i] = (M_offset_i << 8 | M_offset_i >>> 24) & 16711935 | (M_offset_i << 24 | M_offset_i >>> 8) & 4278255360;
  11432. }
  11433. var H = this._hash.words;
  11434. var M_offset_0 = M[offset + 0];
  11435. var M_offset_1 = M[offset + 1];
  11436. var M_offset_2 = M[offset + 2];
  11437. var M_offset_3 = M[offset + 3];
  11438. var M_offset_4 = M[offset + 4];
  11439. var M_offset_5 = M[offset + 5];
  11440. var M_offset_6 = M[offset + 6];
  11441. var M_offset_7 = M[offset + 7];
  11442. var M_offset_8 = M[offset + 8];
  11443. var M_offset_9 = M[offset + 9];
  11444. var M_offset_10 = M[offset + 10];
  11445. var M_offset_11 = M[offset + 11];
  11446. var M_offset_12 = M[offset + 12];
  11447. var M_offset_13 = M[offset + 13];
  11448. var M_offset_14 = M[offset + 14];
  11449. var M_offset_15 = M[offset + 15];
  11450. var a = H[0];
  11451. var b = H[1];
  11452. var c = H[2];
  11453. var d = H[3];
  11454. a = FF(a, b, c, d, M_offset_0, 7, T[0]);
  11455. d = FF(d, a, b, c, M_offset_1, 12, T[1]);
  11456. c = FF(c, d, a, b, M_offset_2, 17, T[2]);
  11457. b = FF(b, c, d, a, M_offset_3, 22, T[3]);
  11458. a = FF(a, b, c, d, M_offset_4, 7, T[4]);
  11459. d = FF(d, a, b, c, M_offset_5, 12, T[5]);
  11460. c = FF(c, d, a, b, M_offset_6, 17, T[6]);
  11461. b = FF(b, c, d, a, M_offset_7, 22, T[7]);
  11462. a = FF(a, b, c, d, M_offset_8, 7, T[8]);
  11463. d = FF(d, a, b, c, M_offset_9, 12, T[9]);
  11464. c = FF(c, d, a, b, M_offset_10, 17, T[10]);
  11465. b = FF(b, c, d, a, M_offset_11, 22, T[11]);
  11466. a = FF(a, b, c, d, M_offset_12, 7, T[12]);
  11467. d = FF(d, a, b, c, M_offset_13, 12, T[13]);
  11468. c = FF(c, d, a, b, M_offset_14, 17, T[14]);
  11469. b = FF(b, c, d, a, M_offset_15, 22, T[15]);
  11470. a = GG(a, b, c, d, M_offset_1, 5, T[16]);
  11471. d = GG(d, a, b, c, M_offset_6, 9, T[17]);
  11472. c = GG(c, d, a, b, M_offset_11, 14, T[18]);
  11473. b = GG(b, c, d, a, M_offset_0, 20, T[19]);
  11474. a = GG(a, b, c, d, M_offset_5, 5, T[20]);
  11475. d = GG(d, a, b, c, M_offset_10, 9, T[21]);
  11476. c = GG(c, d, a, b, M_offset_15, 14, T[22]);
  11477. b = GG(b, c, d, a, M_offset_4, 20, T[23]);
  11478. a = GG(a, b, c, d, M_offset_9, 5, T[24]);
  11479. d = GG(d, a, b, c, M_offset_14, 9, T[25]);
  11480. c = GG(c, d, a, b, M_offset_3, 14, T[26]);
  11481. b = GG(b, c, d, a, M_offset_8, 20, T[27]);
  11482. a = GG(a, b, c, d, M_offset_13, 5, T[28]);
  11483. d = GG(d, a, b, c, M_offset_2, 9, T[29]);
  11484. c = GG(c, d, a, b, M_offset_7, 14, T[30]);
  11485. b = GG(b, c, d, a, M_offset_12, 20, T[31]);
  11486. a = HH(a, b, c, d, M_offset_5, 4, T[32]);
  11487. d = HH(d, a, b, c, M_offset_8, 11, T[33]);
  11488. c = HH(c, d, a, b, M_offset_11, 16, T[34]);
  11489. b = HH(b, c, d, a, M_offset_14, 23, T[35]);
  11490. a = HH(a, b, c, d, M_offset_1, 4, T[36]);
  11491. d = HH(d, a, b, c, M_offset_4, 11, T[37]);
  11492. c = HH(c, d, a, b, M_offset_7, 16, T[38]);
  11493. b = HH(b, c, d, a, M_offset_10, 23, T[39]);
  11494. a = HH(a, b, c, d, M_offset_13, 4, T[40]);
  11495. d = HH(d, a, b, c, M_offset_0, 11, T[41]);
  11496. c = HH(c, d, a, b, M_offset_3, 16, T[42]);
  11497. b = HH(b, c, d, a, M_offset_6, 23, T[43]);
  11498. a = HH(a, b, c, d, M_offset_9, 4, T[44]);
  11499. d = HH(d, a, b, c, M_offset_12, 11, T[45]);
  11500. c = HH(c, d, a, b, M_offset_15, 16, T[46]);
  11501. b = HH(b, c, d, a, M_offset_2, 23, T[47]);
  11502. a = II(a, b, c, d, M_offset_0, 6, T[48]);
  11503. d = II(d, a, b, c, M_offset_7, 10, T[49]);
  11504. c = II(c, d, a, b, M_offset_14, 15, T[50]);
  11505. b = II(b, c, d, a, M_offset_5, 21, T[51]);
  11506. a = II(a, b, c, d, M_offset_12, 6, T[52]);
  11507. d = II(d, a, b, c, M_offset_3, 10, T[53]);
  11508. c = II(c, d, a, b, M_offset_10, 15, T[54]);
  11509. b = II(b, c, d, a, M_offset_1, 21, T[55]);
  11510. a = II(a, b, c, d, M_offset_8, 6, T[56]);
  11511. d = II(d, a, b, c, M_offset_15, 10, T[57]);
  11512. c = II(c, d, a, b, M_offset_6, 15, T[58]);
  11513. b = II(b, c, d, a, M_offset_13, 21, T[59]);
  11514. a = II(a, b, c, d, M_offset_4, 6, T[60]);
  11515. d = II(d, a, b, c, M_offset_11, 10, T[61]);
  11516. c = II(c, d, a, b, M_offset_2, 15, T[62]);
  11517. b = II(b, c, d, a, M_offset_9, 21, T[63]);
  11518. H[0] = H[0] + a | 0;
  11519. H[1] = H[1] + b | 0;
  11520. H[2] = H[2] + c | 0;
  11521. H[3] = H[3] + d | 0;
  11522. },
  11523. _doFinalize: function() {
  11524. var data = this._data;
  11525. var dataWords = data.words;
  11526. var nBitsTotal = this._nDataBytes * 8;
  11527. var nBitsLeft = data.sigBytes * 8;
  11528. dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32;
  11529. var nBitsTotalH = Math2.floor(nBitsTotal / 4294967296);
  11530. var nBitsTotalL = nBitsTotal;
  11531. dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = (nBitsTotalH << 8 | nBitsTotalH >>> 24) & 16711935 | (nBitsTotalH << 24 | nBitsTotalH >>> 8) & 4278255360;
  11532. dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = (nBitsTotalL << 8 | nBitsTotalL >>> 24) & 16711935 | (nBitsTotalL << 24 | nBitsTotalL >>> 8) & 4278255360;
  11533. data.sigBytes = (dataWords.length + 1) * 4;
  11534. this._process();
  11535. var hash = this._hash;
  11536. var H = hash.words;
  11537. for (var i = 0; i < 4; i++) {
  11538. var H_i = H[i];
  11539. H[i] = (H_i << 8 | H_i >>> 24) & 16711935 | (H_i << 24 | H_i >>> 8) & 4278255360;
  11540. }
  11541. return hash;
  11542. },
  11543. clone: function() {
  11544. var clone = Hasher.clone.call(this);
  11545. clone._hash = this._hash.clone();
  11546. return clone;
  11547. }
  11548. });
  11549. function FF(a, b, c, d, x, s, t) {
  11550. var n = a + (b & c | ~b & d) + x + t;
  11551. return (n << s | n >>> 32 - s) + b;
  11552. }
  11553. function GG(a, b, c, d, x, s, t) {
  11554. var n = a + (b & d | c & ~d) + x + t;
  11555. return (n << s | n >>> 32 - s) + b;
  11556. }
  11557. function HH(a, b, c, d, x, s, t) {
  11558. var n = a + (b ^ c ^ d) + x + t;
  11559. return (n << s | n >>> 32 - s) + b;
  11560. }
  11561. function II(a, b, c, d, x, s, t) {
  11562. var n = a + (c ^ (b | ~d)) + x + t;
  11563. return (n << s | n >>> 32 - s) + b;
  11564. }
  11565. C.MD5 = Hasher._createHelper(MD5);
  11566. C.HmacMD5 = Hasher._createHmacHelper(MD5);
  11567. })(Math);
  11568. return CryptoJS.MD5;
  11569. });
  11570. })(md5);
  11571. return md5.exports;
  11572. }
  11573. var sha1 = { exports: {} };
  11574. var hasRequiredSha1;
  11575. function requireSha1() {
  11576. if (hasRequiredSha1)
  11577. return sha1.exports;
  11578. hasRequiredSha1 = 1;
  11579. (function(module, exports) {
  11580. (function(root, factory) {
  11581. {
  11582. module.exports = factory(requireCore());
  11583. }
  11584. })(commonjsGlobal, function(CryptoJS) {
  11585. (function() {
  11586. var C = CryptoJS;
  11587. var C_lib = C.lib;
  11588. var WordArray = C_lib.WordArray;
  11589. var Hasher = C_lib.Hasher;
  11590. var C_algo = C.algo;
  11591. var W = [];
  11592. var SHA1 = C_algo.SHA1 = Hasher.extend({
  11593. _doReset: function() {
  11594. this._hash = new WordArray.init([
  11595. 1732584193,
  11596. 4023233417,
  11597. 2562383102,
  11598. 271733878,
  11599. 3285377520
  11600. ]);
  11601. },
  11602. _doProcessBlock: function(M, offset) {
  11603. var H = this._hash.words;
  11604. var a = H[0];
  11605. var b = H[1];
  11606. var c = H[2];
  11607. var d = H[3];
  11608. var e = H[4];
  11609. for (var i = 0; i < 80; i++) {
  11610. if (i < 16) {
  11611. W[i] = M[offset + i] | 0;
  11612. } else {
  11613. var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];
  11614. W[i] = n << 1 | n >>> 31;
  11615. }
  11616. var t = (a << 5 | a >>> 27) + e + W[i];
  11617. if (i < 20) {
  11618. t += (b & c | ~b & d) + 1518500249;
  11619. } else if (i < 40) {
  11620. t += (b ^ c ^ d) + 1859775393;
  11621. } else if (i < 60) {
  11622. t += (b & c | b & d | c & d) - 1894007588;
  11623. } else {
  11624. t += (b ^ c ^ d) - 899497514;
  11625. }
  11626. e = d;
  11627. d = c;
  11628. c = b << 30 | b >>> 2;
  11629. b = a;
  11630. a = t;
  11631. }
  11632. H[0] = H[0] + a | 0;
  11633. H[1] = H[1] + b | 0;
  11634. H[2] = H[2] + c | 0;
  11635. H[3] = H[3] + d | 0;
  11636. H[4] = H[4] + e | 0;
  11637. },
  11638. _doFinalize: function() {
  11639. var data = this._data;
  11640. var dataWords = data.words;
  11641. var nBitsTotal = this._nDataBytes * 8;
  11642. var nBitsLeft = data.sigBytes * 8;
  11643. dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32;
  11644. dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = Math.floor(nBitsTotal / 4294967296);
  11645. dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = nBitsTotal;
  11646. data.sigBytes = dataWords.length * 4;
  11647. this._process();
  11648. return this._hash;
  11649. },
  11650. clone: function() {
  11651. var clone = Hasher.clone.call(this);
  11652. clone._hash = this._hash.clone();
  11653. return clone;
  11654. }
  11655. });
  11656. C.SHA1 = Hasher._createHelper(SHA1);
  11657. C.HmacSHA1 = Hasher._createHmacHelper(SHA1);
  11658. })();
  11659. return CryptoJS.SHA1;
  11660. });
  11661. })(sha1);
  11662. return sha1.exports;
  11663. }
  11664. var sha256 = { exports: {} };
  11665. var hasRequiredSha256;
  11666. function requireSha256() {
  11667. if (hasRequiredSha256)
  11668. return sha256.exports;
  11669. hasRequiredSha256 = 1;
  11670. (function(module, exports) {
  11671. (function(root, factory) {
  11672. {
  11673. module.exports = factory(requireCore());
  11674. }
  11675. })(commonjsGlobal, function(CryptoJS) {
  11676. (function(Math2) {
  11677. var C = CryptoJS;
  11678. var C_lib = C.lib;
  11679. var WordArray = C_lib.WordArray;
  11680. var Hasher = C_lib.Hasher;
  11681. var C_algo = C.algo;
  11682. var H = [];
  11683. var K = [];
  11684. (function() {
  11685. function isPrime(n2) {
  11686. var sqrtN = Math2.sqrt(n2);
  11687. for (var factor = 2; factor <= sqrtN; factor++) {
  11688. if (!(n2 % factor)) {
  11689. return false;
  11690. }
  11691. }
  11692. return true;
  11693. }
  11694. function getFractionalBits(n2) {
  11695. return (n2 - (n2 | 0)) * 4294967296 | 0;
  11696. }
  11697. var n = 2;
  11698. var nPrime = 0;
  11699. while (nPrime < 64) {
  11700. if (isPrime(n)) {
  11701. if (nPrime < 8) {
  11702. H[nPrime] = getFractionalBits(Math2.pow(n, 1 / 2));
  11703. }
  11704. K[nPrime] = getFractionalBits(Math2.pow(n, 1 / 3));
  11705. nPrime++;
  11706. }
  11707. n++;
  11708. }
  11709. })();
  11710. var W = [];
  11711. var SHA256 = C_algo.SHA256 = Hasher.extend({
  11712. _doReset: function() {
  11713. this._hash = new WordArray.init(H.slice(0));
  11714. },
  11715. _doProcessBlock: function(M, offset) {
  11716. var H2 = this._hash.words;
  11717. var a = H2[0];
  11718. var b = H2[1];
  11719. var c = H2[2];
  11720. var d = H2[3];
  11721. var e = H2[4];
  11722. var f = H2[5];
  11723. var g = H2[6];
  11724. var h2 = H2[7];
  11725. for (var i = 0; i < 64; i++) {
  11726. if (i < 16) {
  11727. W[i] = M[offset + i] | 0;
  11728. } else {
  11729. var gamma0x = W[i - 15];
  11730. var gamma0 = (gamma0x << 25 | gamma0x >>> 7) ^ (gamma0x << 14 | gamma0x >>> 18) ^ gamma0x >>> 3;
  11731. var gamma1x = W[i - 2];
  11732. var gamma1 = (gamma1x << 15 | gamma1x >>> 17) ^ (gamma1x << 13 | gamma1x >>> 19) ^ gamma1x >>> 10;
  11733. W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16];
  11734. }
  11735. var ch = e & f ^ ~e & g;
  11736. var maj = a & b ^ a & c ^ b & c;
  11737. var sigma0 = (a << 30 | a >>> 2) ^ (a << 19 | a >>> 13) ^ (a << 10 | a >>> 22);
  11738. var sigma1 = (e << 26 | e >>> 6) ^ (e << 21 | e >>> 11) ^ (e << 7 | e >>> 25);
  11739. var t1 = h2 + sigma1 + ch + K[i] + W[i];
  11740. var t2 = sigma0 + maj;
  11741. h2 = g;
  11742. g = f;
  11743. f = e;
  11744. e = d + t1 | 0;
  11745. d = c;
  11746. c = b;
  11747. b = a;
  11748. a = t1 + t2 | 0;
  11749. }
  11750. H2[0] = H2[0] + a | 0;
  11751. H2[1] = H2[1] + b | 0;
  11752. H2[2] = H2[2] + c | 0;
  11753. H2[3] = H2[3] + d | 0;
  11754. H2[4] = H2[4] + e | 0;
  11755. H2[5] = H2[5] + f | 0;
  11756. H2[6] = H2[6] + g | 0;
  11757. H2[7] = H2[7] + h2 | 0;
  11758. },
  11759. _doFinalize: function() {
  11760. var data = this._data;
  11761. var dataWords = data.words;
  11762. var nBitsTotal = this._nDataBytes * 8;
  11763. var nBitsLeft = data.sigBytes * 8;
  11764. dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32;
  11765. dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = Math2.floor(nBitsTotal / 4294967296);
  11766. dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = nBitsTotal;
  11767. data.sigBytes = dataWords.length * 4;
  11768. this._process();
  11769. return this._hash;
  11770. },
  11771. clone: function() {
  11772. var clone = Hasher.clone.call(this);
  11773. clone._hash = this._hash.clone();
  11774. return clone;
  11775. }
  11776. });
  11777. C.SHA256 = Hasher._createHelper(SHA256);
  11778. C.HmacSHA256 = Hasher._createHmacHelper(SHA256);
  11779. })(Math);
  11780. return CryptoJS.SHA256;
  11781. });
  11782. })(sha256);
  11783. return sha256.exports;
  11784. }
  11785. var sha224 = { exports: {} };
  11786. var hasRequiredSha224;
  11787. function requireSha224() {
  11788. if (hasRequiredSha224)
  11789. return sha224.exports;
  11790. hasRequiredSha224 = 1;
  11791. (function(module, exports) {
  11792. (function(root, factory, undef) {
  11793. {
  11794. module.exports = factory(requireCore(), requireSha256());
  11795. }
  11796. })(commonjsGlobal, function(CryptoJS) {
  11797. (function() {
  11798. var C = CryptoJS;
  11799. var C_lib = C.lib;
  11800. var WordArray = C_lib.WordArray;
  11801. var C_algo = C.algo;
  11802. var SHA256 = C_algo.SHA256;
  11803. var SHA224 = C_algo.SHA224 = SHA256.extend({
  11804. _doReset: function() {
  11805. this._hash = new WordArray.init([
  11806. 3238371032,
  11807. 914150663,
  11808. 812702999,
  11809. 4144912697,
  11810. 4290775857,
  11811. 1750603025,
  11812. 1694076839,
  11813. 3204075428
  11814. ]);
  11815. },
  11816. _doFinalize: function() {
  11817. var hash = SHA256._doFinalize.call(this);
  11818. hash.sigBytes -= 4;
  11819. return hash;
  11820. }
  11821. });
  11822. C.SHA224 = SHA256._createHelper(SHA224);
  11823. C.HmacSHA224 = SHA256._createHmacHelper(SHA224);
  11824. })();
  11825. return CryptoJS.SHA224;
  11826. });
  11827. })(sha224);
  11828. return sha224.exports;
  11829. }
  11830. var sha512 = { exports: {} };
  11831. var hasRequiredSha512;
  11832. function requireSha512() {
  11833. if (hasRequiredSha512)
  11834. return sha512.exports;
  11835. hasRequiredSha512 = 1;
  11836. (function(module, exports) {
  11837. (function(root, factory, undef) {
  11838. {
  11839. module.exports = factory(requireCore(), requireX64Core());
  11840. }
  11841. })(commonjsGlobal, function(CryptoJS) {
  11842. (function() {
  11843. var C = CryptoJS;
  11844. var C_lib = C.lib;
  11845. var Hasher = C_lib.Hasher;
  11846. var C_x64 = C.x64;
  11847. var X64Word = C_x64.Word;
  11848. var X64WordArray = C_x64.WordArray;
  11849. var C_algo = C.algo;
  11850. function X64Word_create() {
  11851. return X64Word.create.apply(X64Word, arguments);
  11852. }
  11853. var K = [
  11854. X64Word_create(1116352408, 3609767458),
  11855. X64Word_create(1899447441, 602891725),
  11856. X64Word_create(3049323471, 3964484399),
  11857. X64Word_create(3921009573, 2173295548),
  11858. X64Word_create(961987163, 4081628472),
  11859. X64Word_create(1508970993, 3053834265),
  11860. X64Word_create(2453635748, 2937671579),
  11861. X64Word_create(2870763221, 3664609560),
  11862. X64Word_create(3624381080, 2734883394),
  11863. X64Word_create(310598401, 1164996542),
  11864. X64Word_create(607225278, 1323610764),
  11865. X64Word_create(1426881987, 3590304994),
  11866. X64Word_create(1925078388, 4068182383),
  11867. X64Word_create(2162078206, 991336113),
  11868. X64Word_create(2614888103, 633803317),
  11869. X64Word_create(3248222580, 3479774868),
  11870. X64Word_create(3835390401, 2666613458),
  11871. X64Word_create(4022224774, 944711139),
  11872. X64Word_create(264347078, 2341262773),
  11873. X64Word_create(604807628, 2007800933),
  11874. X64Word_create(770255983, 1495990901),
  11875. X64Word_create(1249150122, 1856431235),
  11876. X64Word_create(1555081692, 3175218132),
  11877. X64Word_create(1996064986, 2198950837),
  11878. X64Word_create(2554220882, 3999719339),
  11879. X64Word_create(2821834349, 766784016),
  11880. X64Word_create(2952996808, 2566594879),
  11881. X64Word_create(3210313671, 3203337956),
  11882. X64Word_create(3336571891, 1034457026),
  11883. X64Word_create(3584528711, 2466948901),
  11884. X64Word_create(113926993, 3758326383),
  11885. X64Word_create(338241895, 168717936),
  11886. X64Word_create(666307205, 1188179964),
  11887. X64Word_create(773529912, 1546045734),
  11888. X64Word_create(1294757372, 1522805485),
  11889. X64Word_create(1396182291, 2643833823),
  11890. X64Word_create(1695183700, 2343527390),
  11891. X64Word_create(1986661051, 1014477480),
  11892. X64Word_create(2177026350, 1206759142),
  11893. X64Word_create(2456956037, 344077627),
  11894. X64Word_create(2730485921, 1290863460),
  11895. X64Word_create(2820302411, 3158454273),
  11896. X64Word_create(3259730800, 3505952657),
  11897. X64Word_create(3345764771, 106217008),
  11898. X64Word_create(3516065817, 3606008344),
  11899. X64Word_create(3600352804, 1432725776),
  11900. X64Word_create(4094571909, 1467031594),
  11901. X64Word_create(275423344, 851169720),
  11902. X64Word_create(430227734, 3100823752),
  11903. X64Word_create(506948616, 1363258195),
  11904. X64Word_create(659060556, 3750685593),
  11905. X64Word_create(883997877, 3785050280),
  11906. X64Word_create(958139571, 3318307427),
  11907. X64Word_create(1322822218, 3812723403),
  11908. X64Word_create(1537002063, 2003034995),
  11909. X64Word_create(1747873779, 3602036899),
  11910. X64Word_create(1955562222, 1575990012),
  11911. X64Word_create(2024104815, 1125592928),
  11912. X64Word_create(2227730452, 2716904306),
  11913. X64Word_create(2361852424, 442776044),
  11914. X64Word_create(2428436474, 593698344),
  11915. X64Word_create(2756734187, 3733110249),
  11916. X64Word_create(3204031479, 2999351573),
  11917. X64Word_create(3329325298, 3815920427),
  11918. X64Word_create(3391569614, 3928383900),
  11919. X64Word_create(3515267271, 566280711),
  11920. X64Word_create(3940187606, 3454069534),
  11921. X64Word_create(4118630271, 4000239992),
  11922. X64Word_create(116418474, 1914138554),
  11923. X64Word_create(174292421, 2731055270),
  11924. X64Word_create(289380356, 3203993006),
  11925. X64Word_create(460393269, 320620315),
  11926. X64Word_create(685471733, 587496836),
  11927. X64Word_create(852142971, 1086792851),
  11928. X64Word_create(1017036298, 365543100),
  11929. X64Word_create(1126000580, 2618297676),
  11930. X64Word_create(1288033470, 3409855158),
  11931. X64Word_create(1501505948, 4234509866),
  11932. X64Word_create(1607167915, 987167468),
  11933. X64Word_create(1816402316, 1246189591)
  11934. ];
  11935. var W = [];
  11936. (function() {
  11937. for (var i = 0; i < 80; i++) {
  11938. W[i] = X64Word_create();
  11939. }
  11940. })();
  11941. var SHA512 = C_algo.SHA512 = Hasher.extend({
  11942. _doReset: function() {
  11943. this._hash = new X64WordArray.init([
  11944. new X64Word.init(1779033703, 4089235720),
  11945. new X64Word.init(3144134277, 2227873595),
  11946. new X64Word.init(1013904242, 4271175723),
  11947. new X64Word.init(2773480762, 1595750129),
  11948. new X64Word.init(1359893119, 2917565137),
  11949. new X64Word.init(2600822924, 725511199),
  11950. new X64Word.init(528734635, 4215389547),
  11951. new X64Word.init(1541459225, 327033209)
  11952. ]);
  11953. },
  11954. _doProcessBlock: function(M, offset) {
  11955. var H = this._hash.words;
  11956. var H0 = H[0];
  11957. var H1 = H[1];
  11958. var H2 = H[2];
  11959. var H3 = H[3];
  11960. var H4 = H[4];
  11961. var H5 = H[5];
  11962. var H6 = H[6];
  11963. var H7 = H[7];
  11964. var H0h = H0.high;
  11965. var H0l = H0.low;
  11966. var H1h = H1.high;
  11967. var H1l = H1.low;
  11968. var H2h = H2.high;
  11969. var H2l = H2.low;
  11970. var H3h = H3.high;
  11971. var H3l = H3.low;
  11972. var H4h = H4.high;
  11973. var H4l = H4.low;
  11974. var H5h = H5.high;
  11975. var H5l = H5.low;
  11976. var H6h = H6.high;
  11977. var H6l = H6.low;
  11978. var H7h = H7.high;
  11979. var H7l = H7.low;
  11980. var ah = H0h;
  11981. var al = H0l;
  11982. var bh = H1h;
  11983. var bl = H1l;
  11984. var ch = H2h;
  11985. var cl = H2l;
  11986. var dh = H3h;
  11987. var dl = H3l;
  11988. var eh = H4h;
  11989. var el = H4l;
  11990. var fh = H5h;
  11991. var fl = H5l;
  11992. var gh = H6h;
  11993. var gl = H6l;
  11994. var hh = H7h;
  11995. var hl = H7l;
  11996. for (var i = 0; i < 80; i++) {
  11997. var Wil;
  11998. var Wih;
  11999. var Wi = W[i];
  12000. if (i < 16) {
  12001. Wih = Wi.high = M[offset + i * 2] | 0;
  12002. Wil = Wi.low = M[offset + i * 2 + 1] | 0;
  12003. } else {
  12004. var gamma0x = W[i - 15];
  12005. var gamma0xh = gamma0x.high;
  12006. var gamma0xl = gamma0x.low;
  12007. var gamma0h = (gamma0xh >>> 1 | gamma0xl << 31) ^ (gamma0xh >>> 8 | gamma0xl << 24) ^ gamma0xh >>> 7;
  12008. var gamma0l = (gamma0xl >>> 1 | gamma0xh << 31) ^ (gamma0xl >>> 8 | gamma0xh << 24) ^ (gamma0xl >>> 7 | gamma0xh << 25);
  12009. var gamma1x = W[i - 2];
  12010. var gamma1xh = gamma1x.high;
  12011. var gamma1xl = gamma1x.low;
  12012. var gamma1h = (gamma1xh >>> 19 | gamma1xl << 13) ^ (gamma1xh << 3 | gamma1xl >>> 29) ^ gamma1xh >>> 6;
  12013. var gamma1l = (gamma1xl >>> 19 | gamma1xh << 13) ^ (gamma1xl << 3 | gamma1xh >>> 29) ^ (gamma1xl >>> 6 | gamma1xh << 26);
  12014. var Wi7 = W[i - 7];
  12015. var Wi7h = Wi7.high;
  12016. var Wi7l = Wi7.low;
  12017. var Wi16 = W[i - 16];
  12018. var Wi16h = Wi16.high;
  12019. var Wi16l = Wi16.low;
  12020. Wil = gamma0l + Wi7l;
  12021. Wih = gamma0h + Wi7h + (Wil >>> 0 < gamma0l >>> 0 ? 1 : 0);
  12022. Wil = Wil + gamma1l;
  12023. Wih = Wih + gamma1h + (Wil >>> 0 < gamma1l >>> 0 ? 1 : 0);
  12024. Wil = Wil + Wi16l;
  12025. Wih = Wih + Wi16h + (Wil >>> 0 < Wi16l >>> 0 ? 1 : 0);
  12026. Wi.high = Wih;
  12027. Wi.low = Wil;
  12028. }
  12029. var chh = eh & fh ^ ~eh & gh;
  12030. var chl = el & fl ^ ~el & gl;
  12031. var majh = ah & bh ^ ah & ch ^ bh & ch;
  12032. var majl = al & bl ^ al & cl ^ bl & cl;
  12033. var sigma0h = (ah >>> 28 | al << 4) ^ (ah << 30 | al >>> 2) ^ (ah << 25 | al >>> 7);
  12034. var sigma0l = (al >>> 28 | ah << 4) ^ (al << 30 | ah >>> 2) ^ (al << 25 | ah >>> 7);
  12035. var sigma1h = (eh >>> 14 | el << 18) ^ (eh >>> 18 | el << 14) ^ (eh << 23 | el >>> 9);
  12036. var sigma1l = (el >>> 14 | eh << 18) ^ (el >>> 18 | eh << 14) ^ (el << 23 | eh >>> 9);
  12037. var Ki = K[i];
  12038. var Kih = Ki.high;
  12039. var Kil = Ki.low;
  12040. var t1l = hl + sigma1l;
  12041. var t1h = hh + sigma1h + (t1l >>> 0 < hl >>> 0 ? 1 : 0);
  12042. var t1l = t1l + chl;
  12043. var t1h = t1h + chh + (t1l >>> 0 < chl >>> 0 ? 1 : 0);
  12044. var t1l = t1l + Kil;
  12045. var t1h = t1h + Kih + (t1l >>> 0 < Kil >>> 0 ? 1 : 0);
  12046. var t1l = t1l + Wil;
  12047. var t1h = t1h + Wih + (t1l >>> 0 < Wil >>> 0 ? 1 : 0);
  12048. var t2l = sigma0l + majl;
  12049. var t2h = sigma0h + majh + (t2l >>> 0 < sigma0l >>> 0 ? 1 : 0);
  12050. hh = gh;
  12051. hl = gl;
  12052. gh = fh;
  12053. gl = fl;
  12054. fh = eh;
  12055. fl = el;
  12056. el = dl + t1l | 0;
  12057. eh = dh + t1h + (el >>> 0 < dl >>> 0 ? 1 : 0) | 0;
  12058. dh = ch;
  12059. dl = cl;
  12060. ch = bh;
  12061. cl = bl;
  12062. bh = ah;
  12063. bl = al;
  12064. al = t1l + t2l | 0;
  12065. ah = t1h + t2h + (al >>> 0 < t1l >>> 0 ? 1 : 0) | 0;
  12066. }
  12067. H0l = H0.low = H0l + al;
  12068. H0.high = H0h + ah + (H0l >>> 0 < al >>> 0 ? 1 : 0);
  12069. H1l = H1.low = H1l + bl;
  12070. H1.high = H1h + bh + (H1l >>> 0 < bl >>> 0 ? 1 : 0);
  12071. H2l = H2.low = H2l + cl;
  12072. H2.high = H2h + ch + (H2l >>> 0 < cl >>> 0 ? 1 : 0);
  12073. H3l = H3.low = H3l + dl;
  12074. H3.high = H3h + dh + (H3l >>> 0 < dl >>> 0 ? 1 : 0);
  12075. H4l = H4.low = H4l + el;
  12076. H4.high = H4h + eh + (H4l >>> 0 < el >>> 0 ? 1 : 0);
  12077. H5l = H5.low = H5l + fl;
  12078. H5.high = H5h + fh + (H5l >>> 0 < fl >>> 0 ? 1 : 0);
  12079. H6l = H6.low = H6l + gl;
  12080. H6.high = H6h + gh + (H6l >>> 0 < gl >>> 0 ? 1 : 0);
  12081. H7l = H7.low = H7l + hl;
  12082. H7.high = H7h + hh + (H7l >>> 0 < hl >>> 0 ? 1 : 0);
  12083. },
  12084. _doFinalize: function() {
  12085. var data = this._data;
  12086. var dataWords = data.words;
  12087. var nBitsTotal = this._nDataBytes * 8;
  12088. var nBitsLeft = data.sigBytes * 8;
  12089. dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32;
  12090. dataWords[(nBitsLeft + 128 >>> 10 << 5) + 30] = Math.floor(nBitsTotal / 4294967296);
  12091. dataWords[(nBitsLeft + 128 >>> 10 << 5) + 31] = nBitsTotal;
  12092. data.sigBytes = dataWords.length * 4;
  12093. this._process();
  12094. var hash = this._hash.toX32();
  12095. return hash;
  12096. },
  12097. clone: function() {
  12098. var clone = Hasher.clone.call(this);
  12099. clone._hash = this._hash.clone();
  12100. return clone;
  12101. },
  12102. blockSize: 1024 / 32
  12103. });
  12104. C.SHA512 = Hasher._createHelper(SHA512);
  12105. C.HmacSHA512 = Hasher._createHmacHelper(SHA512);
  12106. })();
  12107. return CryptoJS.SHA512;
  12108. });
  12109. })(sha512);
  12110. return sha512.exports;
  12111. }
  12112. var sha384 = { exports: {} };
  12113. var hasRequiredSha384;
  12114. function requireSha384() {
  12115. if (hasRequiredSha384)
  12116. return sha384.exports;
  12117. hasRequiredSha384 = 1;
  12118. (function(module, exports) {
  12119. (function(root, factory, undef) {
  12120. {
  12121. module.exports = factory(requireCore(), requireX64Core(), requireSha512());
  12122. }
  12123. })(commonjsGlobal, function(CryptoJS) {
  12124. (function() {
  12125. var C = CryptoJS;
  12126. var C_x64 = C.x64;
  12127. var X64Word = C_x64.Word;
  12128. var X64WordArray = C_x64.WordArray;
  12129. var C_algo = C.algo;
  12130. var SHA512 = C_algo.SHA512;
  12131. var SHA384 = C_algo.SHA384 = SHA512.extend({
  12132. _doReset: function() {
  12133. this._hash = new X64WordArray.init([
  12134. new X64Word.init(3418070365, 3238371032),
  12135. new X64Word.init(1654270250, 914150663),
  12136. new X64Word.init(2438529370, 812702999),
  12137. new X64Word.init(355462360, 4144912697),
  12138. new X64Word.init(1731405415, 4290775857),
  12139. new X64Word.init(2394180231, 1750603025),
  12140. new X64Word.init(3675008525, 1694076839),
  12141. new X64Word.init(1203062813, 3204075428)
  12142. ]);
  12143. },
  12144. _doFinalize: function() {
  12145. var hash = SHA512._doFinalize.call(this);
  12146. hash.sigBytes -= 16;
  12147. return hash;
  12148. }
  12149. });
  12150. C.SHA384 = SHA512._createHelper(SHA384);
  12151. C.HmacSHA384 = SHA512._createHmacHelper(SHA384);
  12152. })();
  12153. return CryptoJS.SHA384;
  12154. });
  12155. })(sha384);
  12156. return sha384.exports;
  12157. }
  12158. var sha3 = { exports: {} };
  12159. var hasRequiredSha3;
  12160. function requireSha3() {
  12161. if (hasRequiredSha3)
  12162. return sha3.exports;
  12163. hasRequiredSha3 = 1;
  12164. (function(module, exports) {
  12165. (function(root, factory, undef) {
  12166. {
  12167. module.exports = factory(requireCore(), requireX64Core());
  12168. }
  12169. })(commonjsGlobal, function(CryptoJS) {
  12170. (function(Math2) {
  12171. var C = CryptoJS;
  12172. var C_lib = C.lib;
  12173. var WordArray = C_lib.WordArray;
  12174. var Hasher = C_lib.Hasher;
  12175. var C_x64 = C.x64;
  12176. var X64Word = C_x64.Word;
  12177. var C_algo = C.algo;
  12178. var RHO_OFFSETS = [];
  12179. var PI_INDEXES = [];
  12180. var ROUND_CONSTANTS = [];
  12181. (function() {
  12182. var x = 1, y = 0;
  12183. for (var t = 0; t < 24; t++) {
  12184. RHO_OFFSETS[x + 5 * y] = (t + 1) * (t + 2) / 2 % 64;
  12185. var newX = y % 5;
  12186. var newY = (2 * x + 3 * y) % 5;
  12187. x = newX;
  12188. y = newY;
  12189. }
  12190. for (var x = 0; x < 5; x++) {
  12191. for (var y = 0; y < 5; y++) {
  12192. PI_INDEXES[x + 5 * y] = y + (2 * x + 3 * y) % 5 * 5;
  12193. }
  12194. }
  12195. var LFSR = 1;
  12196. for (var i = 0; i < 24; i++) {
  12197. var roundConstantMsw = 0;
  12198. var roundConstantLsw = 0;
  12199. for (var j = 0; j < 7; j++) {
  12200. if (LFSR & 1) {
  12201. var bitPosition = (1 << j) - 1;
  12202. if (bitPosition < 32) {
  12203. roundConstantLsw ^= 1 << bitPosition;
  12204. } else {
  12205. roundConstantMsw ^= 1 << bitPosition - 32;
  12206. }
  12207. }
  12208. if (LFSR & 128) {
  12209. LFSR = LFSR << 1 ^ 113;
  12210. } else {
  12211. LFSR <<= 1;
  12212. }
  12213. }
  12214. ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw);
  12215. }
  12216. })();
  12217. var T = [];
  12218. (function() {
  12219. for (var i = 0; i < 25; i++) {
  12220. T[i] = X64Word.create();
  12221. }
  12222. })();
  12223. var SHA3 = C_algo.SHA3 = Hasher.extend({
  12224. /**
  12225. * Configuration options.
  12226. *
  12227. * @property {number} outputLength
  12228. * The desired number of bits in the output hash.
  12229. * Only values permitted are: 224, 256, 384, 512.
  12230. * Default: 512
  12231. */
  12232. cfg: Hasher.cfg.extend({
  12233. outputLength: 512
  12234. }),
  12235. _doReset: function() {
  12236. var state = this._state = [];
  12237. for (var i = 0; i < 25; i++) {
  12238. state[i] = new X64Word.init();
  12239. }
  12240. this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;
  12241. },
  12242. _doProcessBlock: function(M, offset) {
  12243. var state = this._state;
  12244. var nBlockSizeLanes = this.blockSize / 2;
  12245. for (var i = 0; i < nBlockSizeLanes; i++) {
  12246. var M2i = M[offset + 2 * i];
  12247. var M2i1 = M[offset + 2 * i + 1];
  12248. M2i = (M2i << 8 | M2i >>> 24) & 16711935 | (M2i << 24 | M2i >>> 8) & 4278255360;
  12249. M2i1 = (M2i1 << 8 | M2i1 >>> 24) & 16711935 | (M2i1 << 24 | M2i1 >>> 8) & 4278255360;
  12250. var lane = state[i];
  12251. lane.high ^= M2i1;
  12252. lane.low ^= M2i;
  12253. }
  12254. for (var round = 0; round < 24; round++) {
  12255. for (var x = 0; x < 5; x++) {
  12256. var tMsw = 0, tLsw = 0;
  12257. for (var y = 0; y < 5; y++) {
  12258. var lane = state[x + 5 * y];
  12259. tMsw ^= lane.high;
  12260. tLsw ^= lane.low;
  12261. }
  12262. var Tx = T[x];
  12263. Tx.high = tMsw;
  12264. Tx.low = tLsw;
  12265. }
  12266. for (var x = 0; x < 5; x++) {
  12267. var Tx4 = T[(x + 4) % 5];
  12268. var Tx1 = T[(x + 1) % 5];
  12269. var Tx1Msw = Tx1.high;
  12270. var Tx1Lsw = Tx1.low;
  12271. var tMsw = Tx4.high ^ (Tx1Msw << 1 | Tx1Lsw >>> 31);
  12272. var tLsw = Tx4.low ^ (Tx1Lsw << 1 | Tx1Msw >>> 31);
  12273. for (var y = 0; y < 5; y++) {
  12274. var lane = state[x + 5 * y];
  12275. lane.high ^= tMsw;
  12276. lane.low ^= tLsw;
  12277. }
  12278. }
  12279. for (var laneIndex = 1; laneIndex < 25; laneIndex++) {
  12280. var tMsw;
  12281. var tLsw;
  12282. var lane = state[laneIndex];
  12283. var laneMsw = lane.high;
  12284. var laneLsw = lane.low;
  12285. var rhoOffset = RHO_OFFSETS[laneIndex];
  12286. if (rhoOffset < 32) {
  12287. tMsw = laneMsw << rhoOffset | laneLsw >>> 32 - rhoOffset;
  12288. tLsw = laneLsw << rhoOffset | laneMsw >>> 32 - rhoOffset;
  12289. } else {
  12290. tMsw = laneLsw << rhoOffset - 32 | laneMsw >>> 64 - rhoOffset;
  12291. tLsw = laneMsw << rhoOffset - 32 | laneLsw >>> 64 - rhoOffset;
  12292. }
  12293. var TPiLane = T[PI_INDEXES[laneIndex]];
  12294. TPiLane.high = tMsw;
  12295. TPiLane.low = tLsw;
  12296. }
  12297. var T0 = T[0];
  12298. var state0 = state[0];
  12299. T0.high = state0.high;
  12300. T0.low = state0.low;
  12301. for (var x = 0; x < 5; x++) {
  12302. for (var y = 0; y < 5; y++) {
  12303. var laneIndex = x + 5 * y;
  12304. var lane = state[laneIndex];
  12305. var TLane = T[laneIndex];
  12306. var Tx1Lane = T[(x + 1) % 5 + 5 * y];
  12307. var Tx2Lane = T[(x + 2) % 5 + 5 * y];
  12308. lane.high = TLane.high ^ ~Tx1Lane.high & Tx2Lane.high;
  12309. lane.low = TLane.low ^ ~Tx1Lane.low & Tx2Lane.low;
  12310. }
  12311. }
  12312. var lane = state[0];
  12313. var roundConstant = ROUND_CONSTANTS[round];
  12314. lane.high ^= roundConstant.high;
  12315. lane.low ^= roundConstant.low;
  12316. }
  12317. },
  12318. _doFinalize: function() {
  12319. var data = this._data;
  12320. var dataWords = data.words;
  12321. this._nDataBytes * 8;
  12322. var nBitsLeft = data.sigBytes * 8;
  12323. var blockSizeBits = this.blockSize * 32;
  12324. dataWords[nBitsLeft >>> 5] |= 1 << 24 - nBitsLeft % 32;
  12325. dataWords[(Math2.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits >>> 5) - 1] |= 128;
  12326. data.sigBytes = dataWords.length * 4;
  12327. this._process();
  12328. var state = this._state;
  12329. var outputLengthBytes = this.cfg.outputLength / 8;
  12330. var outputLengthLanes = outputLengthBytes / 8;
  12331. var hashWords = [];
  12332. for (var i = 0; i < outputLengthLanes; i++) {
  12333. var lane = state[i];
  12334. var laneMsw = lane.high;
  12335. var laneLsw = lane.low;
  12336. laneMsw = (laneMsw << 8 | laneMsw >>> 24) & 16711935 | (laneMsw << 24 | laneMsw >>> 8) & 4278255360;
  12337. laneLsw = (laneLsw << 8 | laneLsw >>> 24) & 16711935 | (laneLsw << 24 | laneLsw >>> 8) & 4278255360;
  12338. hashWords.push(laneLsw);
  12339. hashWords.push(laneMsw);
  12340. }
  12341. return new WordArray.init(hashWords, outputLengthBytes);
  12342. },
  12343. clone: function() {
  12344. var clone = Hasher.clone.call(this);
  12345. var state = clone._state = this._state.slice(0);
  12346. for (var i = 0; i < 25; i++) {
  12347. state[i] = state[i].clone();
  12348. }
  12349. return clone;
  12350. }
  12351. });
  12352. C.SHA3 = Hasher._createHelper(SHA3);
  12353. C.HmacSHA3 = Hasher._createHmacHelper(SHA3);
  12354. })(Math);
  12355. return CryptoJS.SHA3;
  12356. });
  12357. })(sha3);
  12358. return sha3.exports;
  12359. }
  12360. var ripemd160 = { exports: {} };
  12361. var hasRequiredRipemd160;
  12362. function requireRipemd160() {
  12363. if (hasRequiredRipemd160)
  12364. return ripemd160.exports;
  12365. hasRequiredRipemd160 = 1;
  12366. (function(module, exports) {
  12367. (function(root, factory) {
  12368. {
  12369. module.exports = factory(requireCore());
  12370. }
  12371. })(commonjsGlobal, function(CryptoJS) {
  12372. /** @preserve
  12373. (c) 2012 by Cédric Mesnil. All rights reserved.
  12374. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
  12375. - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  12376. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  12377. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  12378. */
  12379. (function(Math2) {
  12380. var C = CryptoJS;
  12381. var C_lib = C.lib;
  12382. var WordArray = C_lib.WordArray;
  12383. var Hasher = C_lib.Hasher;
  12384. var C_algo = C.algo;
  12385. var _zl = WordArray.create([
  12386. 0,
  12387. 1,
  12388. 2,
  12389. 3,
  12390. 4,
  12391. 5,
  12392. 6,
  12393. 7,
  12394. 8,
  12395. 9,
  12396. 10,
  12397. 11,
  12398. 12,
  12399. 13,
  12400. 14,
  12401. 15,
  12402. 7,
  12403. 4,
  12404. 13,
  12405. 1,
  12406. 10,
  12407. 6,
  12408. 15,
  12409. 3,
  12410. 12,
  12411. 0,
  12412. 9,
  12413. 5,
  12414. 2,
  12415. 14,
  12416. 11,
  12417. 8,
  12418. 3,
  12419. 10,
  12420. 14,
  12421. 4,
  12422. 9,
  12423. 15,
  12424. 8,
  12425. 1,
  12426. 2,
  12427. 7,
  12428. 0,
  12429. 6,
  12430. 13,
  12431. 11,
  12432. 5,
  12433. 12,
  12434. 1,
  12435. 9,
  12436. 11,
  12437. 10,
  12438. 0,
  12439. 8,
  12440. 12,
  12441. 4,
  12442. 13,
  12443. 3,
  12444. 7,
  12445. 15,
  12446. 14,
  12447. 5,
  12448. 6,
  12449. 2,
  12450. 4,
  12451. 0,
  12452. 5,
  12453. 9,
  12454. 7,
  12455. 12,
  12456. 2,
  12457. 10,
  12458. 14,
  12459. 1,
  12460. 3,
  12461. 8,
  12462. 11,
  12463. 6,
  12464. 15,
  12465. 13
  12466. ]);
  12467. var _zr = WordArray.create([
  12468. 5,
  12469. 14,
  12470. 7,
  12471. 0,
  12472. 9,
  12473. 2,
  12474. 11,
  12475. 4,
  12476. 13,
  12477. 6,
  12478. 15,
  12479. 8,
  12480. 1,
  12481. 10,
  12482. 3,
  12483. 12,
  12484. 6,
  12485. 11,
  12486. 3,
  12487. 7,
  12488. 0,
  12489. 13,
  12490. 5,
  12491. 10,
  12492. 14,
  12493. 15,
  12494. 8,
  12495. 12,
  12496. 4,
  12497. 9,
  12498. 1,
  12499. 2,
  12500. 15,
  12501. 5,
  12502. 1,
  12503. 3,
  12504. 7,
  12505. 14,
  12506. 6,
  12507. 9,
  12508. 11,
  12509. 8,
  12510. 12,
  12511. 2,
  12512. 10,
  12513. 0,
  12514. 4,
  12515. 13,
  12516. 8,
  12517. 6,
  12518. 4,
  12519. 1,
  12520. 3,
  12521. 11,
  12522. 15,
  12523. 0,
  12524. 5,
  12525. 12,
  12526. 2,
  12527. 13,
  12528. 9,
  12529. 7,
  12530. 10,
  12531. 14,
  12532. 12,
  12533. 15,
  12534. 10,
  12535. 4,
  12536. 1,
  12537. 5,
  12538. 8,
  12539. 7,
  12540. 6,
  12541. 2,
  12542. 13,
  12543. 14,
  12544. 0,
  12545. 3,
  12546. 9,
  12547. 11
  12548. ]);
  12549. var _sl = WordArray.create([
  12550. 11,
  12551. 14,
  12552. 15,
  12553. 12,
  12554. 5,
  12555. 8,
  12556. 7,
  12557. 9,
  12558. 11,
  12559. 13,
  12560. 14,
  12561. 15,
  12562. 6,
  12563. 7,
  12564. 9,
  12565. 8,
  12566. 7,
  12567. 6,
  12568. 8,
  12569. 13,
  12570. 11,
  12571. 9,
  12572. 7,
  12573. 15,
  12574. 7,
  12575. 12,
  12576. 15,
  12577. 9,
  12578. 11,
  12579. 7,
  12580. 13,
  12581. 12,
  12582. 11,
  12583. 13,
  12584. 6,
  12585. 7,
  12586. 14,
  12587. 9,
  12588. 13,
  12589. 15,
  12590. 14,
  12591. 8,
  12592. 13,
  12593. 6,
  12594. 5,
  12595. 12,
  12596. 7,
  12597. 5,
  12598. 11,
  12599. 12,
  12600. 14,
  12601. 15,
  12602. 14,
  12603. 15,
  12604. 9,
  12605. 8,
  12606. 9,
  12607. 14,
  12608. 5,
  12609. 6,
  12610. 8,
  12611. 6,
  12612. 5,
  12613. 12,
  12614. 9,
  12615. 15,
  12616. 5,
  12617. 11,
  12618. 6,
  12619. 8,
  12620. 13,
  12621. 12,
  12622. 5,
  12623. 12,
  12624. 13,
  12625. 14,
  12626. 11,
  12627. 8,
  12628. 5,
  12629. 6
  12630. ]);
  12631. var _sr = WordArray.create([
  12632. 8,
  12633. 9,
  12634. 9,
  12635. 11,
  12636. 13,
  12637. 15,
  12638. 15,
  12639. 5,
  12640. 7,
  12641. 7,
  12642. 8,
  12643. 11,
  12644. 14,
  12645. 14,
  12646. 12,
  12647. 6,
  12648. 9,
  12649. 13,
  12650. 15,
  12651. 7,
  12652. 12,
  12653. 8,
  12654. 9,
  12655. 11,
  12656. 7,
  12657. 7,
  12658. 12,
  12659. 7,
  12660. 6,
  12661. 15,
  12662. 13,
  12663. 11,
  12664. 9,
  12665. 7,
  12666. 15,
  12667. 11,
  12668. 8,
  12669. 6,
  12670. 6,
  12671. 14,
  12672. 12,
  12673. 13,
  12674. 5,
  12675. 14,
  12676. 13,
  12677. 13,
  12678. 7,
  12679. 5,
  12680. 15,
  12681. 5,
  12682. 8,
  12683. 11,
  12684. 14,
  12685. 14,
  12686. 6,
  12687. 14,
  12688. 6,
  12689. 9,
  12690. 12,
  12691. 9,
  12692. 12,
  12693. 5,
  12694. 15,
  12695. 8,
  12696. 8,
  12697. 5,
  12698. 12,
  12699. 9,
  12700. 12,
  12701. 5,
  12702. 14,
  12703. 6,
  12704. 8,
  12705. 13,
  12706. 6,
  12707. 5,
  12708. 15,
  12709. 13,
  12710. 11,
  12711. 11
  12712. ]);
  12713. var _hl = WordArray.create([0, 1518500249, 1859775393, 2400959708, 2840853838]);
  12714. var _hr = WordArray.create([1352829926, 1548603684, 1836072691, 2053994217, 0]);
  12715. var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({
  12716. _doReset: function() {
  12717. this._hash = WordArray.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);
  12718. },
  12719. _doProcessBlock: function(M, offset) {
  12720. for (var i = 0; i < 16; i++) {
  12721. var offset_i = offset + i;
  12722. var M_offset_i = M[offset_i];
  12723. M[offset_i] = (M_offset_i << 8 | M_offset_i >>> 24) & 16711935 | (M_offset_i << 24 | M_offset_i >>> 8) & 4278255360;
  12724. }
  12725. var H = this._hash.words;
  12726. var hl = _hl.words;
  12727. var hr = _hr.words;
  12728. var zl = _zl.words;
  12729. var zr = _zr.words;
  12730. var sl = _sl.words;
  12731. var sr = _sr.words;
  12732. var al, bl, cl, dl, el;
  12733. var ar, br, cr, dr, er;
  12734. ar = al = H[0];
  12735. br = bl = H[1];
  12736. cr = cl = H[2];
  12737. dr = dl = H[3];
  12738. er = el = H[4];
  12739. var t;
  12740. for (var i = 0; i < 80; i += 1) {
  12741. t = al + M[offset + zl[i]] | 0;
  12742. if (i < 16) {
  12743. t += f1(bl, cl, dl) + hl[0];
  12744. } else if (i < 32) {
  12745. t += f2(bl, cl, dl) + hl[1];
  12746. } else if (i < 48) {
  12747. t += f3(bl, cl, dl) + hl[2];
  12748. } else if (i < 64) {
  12749. t += f4(bl, cl, dl) + hl[3];
  12750. } else {
  12751. t += f5(bl, cl, dl) + hl[4];
  12752. }
  12753. t = t | 0;
  12754. t = rotl(t, sl[i]);
  12755. t = t + el | 0;
  12756. al = el;
  12757. el = dl;
  12758. dl = rotl(cl, 10);
  12759. cl = bl;
  12760. bl = t;
  12761. t = ar + M[offset + zr[i]] | 0;
  12762. if (i < 16) {
  12763. t += f5(br, cr, dr) + hr[0];
  12764. } else if (i < 32) {
  12765. t += f4(br, cr, dr) + hr[1];
  12766. } else if (i < 48) {
  12767. t += f3(br, cr, dr) + hr[2];
  12768. } else if (i < 64) {
  12769. t += f2(br, cr, dr) + hr[3];
  12770. } else {
  12771. t += f1(br, cr, dr) + hr[4];
  12772. }
  12773. t = t | 0;
  12774. t = rotl(t, sr[i]);
  12775. t = t + er | 0;
  12776. ar = er;
  12777. er = dr;
  12778. dr = rotl(cr, 10);
  12779. cr = br;
  12780. br = t;
  12781. }
  12782. t = H[1] + cl + dr | 0;
  12783. H[1] = H[2] + dl + er | 0;
  12784. H[2] = H[3] + el + ar | 0;
  12785. H[3] = H[4] + al + br | 0;
  12786. H[4] = H[0] + bl + cr | 0;
  12787. H[0] = t;
  12788. },
  12789. _doFinalize: function() {
  12790. var data = this._data;
  12791. var dataWords = data.words;
  12792. var nBitsTotal = this._nDataBytes * 8;
  12793. var nBitsLeft = data.sigBytes * 8;
  12794. dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32;
  12795. dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = (nBitsTotal << 8 | nBitsTotal >>> 24) & 16711935 | (nBitsTotal << 24 | nBitsTotal >>> 8) & 4278255360;
  12796. data.sigBytes = (dataWords.length + 1) * 4;
  12797. this._process();
  12798. var hash = this._hash;
  12799. var H = hash.words;
  12800. for (var i = 0; i < 5; i++) {
  12801. var H_i = H[i];
  12802. H[i] = (H_i << 8 | H_i >>> 24) & 16711935 | (H_i << 24 | H_i >>> 8) & 4278255360;
  12803. }
  12804. return hash;
  12805. },
  12806. clone: function() {
  12807. var clone = Hasher.clone.call(this);
  12808. clone._hash = this._hash.clone();
  12809. return clone;
  12810. }
  12811. });
  12812. function f1(x, y, z) {
  12813. return x ^ y ^ z;
  12814. }
  12815. function f2(x, y, z) {
  12816. return x & y | ~x & z;
  12817. }
  12818. function f3(x, y, z) {
  12819. return (x | ~y) ^ z;
  12820. }
  12821. function f4(x, y, z) {
  12822. return x & z | y & ~z;
  12823. }
  12824. function f5(x, y, z) {
  12825. return x ^ (y | ~z);
  12826. }
  12827. function rotl(x, n) {
  12828. return x << n | x >>> 32 - n;
  12829. }
  12830. C.RIPEMD160 = Hasher._createHelper(RIPEMD160);
  12831. C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160);
  12832. })();
  12833. return CryptoJS.RIPEMD160;
  12834. });
  12835. })(ripemd160);
  12836. return ripemd160.exports;
  12837. }
  12838. var hmac = { exports: {} };
  12839. var hasRequiredHmac;
  12840. function requireHmac() {
  12841. if (hasRequiredHmac)
  12842. return hmac.exports;
  12843. hasRequiredHmac = 1;
  12844. (function(module, exports) {
  12845. (function(root, factory) {
  12846. {
  12847. module.exports = factory(requireCore());
  12848. }
  12849. })(commonjsGlobal, function(CryptoJS) {
  12850. (function() {
  12851. var C = CryptoJS;
  12852. var C_lib = C.lib;
  12853. var Base = C_lib.Base;
  12854. var C_enc = C.enc;
  12855. var Utf8 = C_enc.Utf8;
  12856. var C_algo = C.algo;
  12857. C_algo.HMAC = Base.extend({
  12858. /**
  12859. * Initializes a newly created HMAC.
  12860. *
  12861. * @param {Hasher} hasher The hash algorithm to use.
  12862. * @param {WordArray|string} key The secret key.
  12863. *
  12864. * @example
  12865. *
  12866. * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);
  12867. */
  12868. init: function(hasher, key) {
  12869. hasher = this._hasher = new hasher.init();
  12870. if (typeof key == "string") {
  12871. key = Utf8.parse(key);
  12872. }
  12873. var hasherBlockSize = hasher.blockSize;
  12874. var hasherBlockSizeBytes = hasherBlockSize * 4;
  12875. if (key.sigBytes > hasherBlockSizeBytes) {
  12876. key = hasher.finalize(key);
  12877. }
  12878. key.clamp();
  12879. var oKey = this._oKey = key.clone();
  12880. var iKey = this._iKey = key.clone();
  12881. var oKeyWords = oKey.words;
  12882. var iKeyWords = iKey.words;
  12883. for (var i = 0; i < hasherBlockSize; i++) {
  12884. oKeyWords[i] ^= 1549556828;
  12885. iKeyWords[i] ^= 909522486;
  12886. }
  12887. oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes;
  12888. this.reset();
  12889. },
  12890. /**
  12891. * Resets this HMAC to its initial state.
  12892. *
  12893. * @example
  12894. *
  12895. * hmacHasher.reset();
  12896. */
  12897. reset: function() {
  12898. var hasher = this._hasher;
  12899. hasher.reset();
  12900. hasher.update(this._iKey);
  12901. },
  12902. /**
  12903. * Updates this HMAC with a message.
  12904. *
  12905. * @param {WordArray|string} messageUpdate The message to append.
  12906. *
  12907. * @return {HMAC} This HMAC instance.
  12908. *
  12909. * @example
  12910. *
  12911. * hmacHasher.update('message');
  12912. * hmacHasher.update(wordArray);
  12913. */
  12914. update: function(messageUpdate) {
  12915. this._hasher.update(messageUpdate);
  12916. return this;
  12917. },
  12918. /**
  12919. * Finalizes the HMAC computation.
  12920. * Note that the finalize operation is effectively a destructive, read-once operation.
  12921. *
  12922. * @param {WordArray|string} messageUpdate (Optional) A final message update.
  12923. *
  12924. * @return {WordArray} The HMAC.
  12925. *
  12926. * @example
  12927. *
  12928. * var hmac = hmacHasher.finalize();
  12929. * var hmac = hmacHasher.finalize('message');
  12930. * var hmac = hmacHasher.finalize(wordArray);
  12931. */
  12932. finalize: function(messageUpdate) {
  12933. var hasher = this._hasher;
  12934. var innerHash = hasher.finalize(messageUpdate);
  12935. hasher.reset();
  12936. var hmac2 = hasher.finalize(this._oKey.clone().concat(innerHash));
  12937. return hmac2;
  12938. }
  12939. });
  12940. })();
  12941. });
  12942. })(hmac);
  12943. return hmac.exports;
  12944. }
  12945. var pbkdf2 = { exports: {} };
  12946. var hasRequiredPbkdf2;
  12947. function requirePbkdf2() {
  12948. if (hasRequiredPbkdf2)
  12949. return pbkdf2.exports;
  12950. hasRequiredPbkdf2 = 1;
  12951. (function(module, exports) {
  12952. (function(root, factory, undef) {
  12953. {
  12954. module.exports = factory(requireCore(), requireSha256(), requireHmac());
  12955. }
  12956. })(commonjsGlobal, function(CryptoJS) {
  12957. (function() {
  12958. var C = CryptoJS;
  12959. var C_lib = C.lib;
  12960. var Base = C_lib.Base;
  12961. var WordArray = C_lib.WordArray;
  12962. var C_algo = C.algo;
  12963. var SHA256 = C_algo.SHA256;
  12964. var HMAC = C_algo.HMAC;
  12965. var PBKDF2 = C_algo.PBKDF2 = Base.extend({
  12966. /**
  12967. * Configuration options.
  12968. *
  12969. * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)
  12970. * @property {Hasher} hasher The hasher to use. Default: SHA256
  12971. * @property {number} iterations The number of iterations to perform. Default: 250000
  12972. */
  12973. cfg: Base.extend({
  12974. keySize: 128 / 32,
  12975. hasher: SHA256,
  12976. iterations: 25e4
  12977. }),
  12978. /**
  12979. * Initializes a newly created key derivation function.
  12980. *
  12981. * @param {Object} cfg (Optional) The configuration options to use for the derivation.
  12982. *
  12983. * @example
  12984. *
  12985. * var kdf = CryptoJS.algo.PBKDF2.create();
  12986. * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 });
  12987. * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 });
  12988. */
  12989. init: function(cfg) {
  12990. this.cfg = this.cfg.extend(cfg);
  12991. },
  12992. /**
  12993. * Computes the Password-Based Key Derivation Function 2.
  12994. *
  12995. * @param {WordArray|string} password The password.
  12996. * @param {WordArray|string} salt A salt.
  12997. *
  12998. * @return {WordArray} The derived key.
  12999. *
  13000. * @example
  13001. *
  13002. * var key = kdf.compute(password, salt);
  13003. */
  13004. compute: function(password, salt) {
  13005. var cfg = this.cfg;
  13006. var hmac2 = HMAC.create(cfg.hasher, password);
  13007. var derivedKey = WordArray.create();
  13008. var blockIndex = WordArray.create([1]);
  13009. var derivedKeyWords = derivedKey.words;
  13010. var blockIndexWords = blockIndex.words;
  13011. var keySize = cfg.keySize;
  13012. var iterations = cfg.iterations;
  13013. while (derivedKeyWords.length < keySize) {
  13014. var block = hmac2.update(salt).finalize(blockIndex);
  13015. hmac2.reset();
  13016. var blockWords = block.words;
  13017. var blockWordsLength = blockWords.length;
  13018. var intermediate = block;
  13019. for (var i = 1; i < iterations; i++) {
  13020. intermediate = hmac2.finalize(intermediate);
  13021. hmac2.reset();
  13022. var intermediateWords = intermediate.words;
  13023. for (var j = 0; j < blockWordsLength; j++) {
  13024. blockWords[j] ^= intermediateWords[j];
  13025. }
  13026. }
  13027. derivedKey.concat(block);
  13028. blockIndexWords[0]++;
  13029. }
  13030. derivedKey.sigBytes = keySize * 4;
  13031. return derivedKey;
  13032. }
  13033. });
  13034. C.PBKDF2 = function(password, salt, cfg) {
  13035. return PBKDF2.create(cfg).compute(password, salt);
  13036. };
  13037. })();
  13038. return CryptoJS.PBKDF2;
  13039. });
  13040. })(pbkdf2);
  13041. return pbkdf2.exports;
  13042. }
  13043. var evpkdf = { exports: {} };
  13044. var hasRequiredEvpkdf;
  13045. function requireEvpkdf() {
  13046. if (hasRequiredEvpkdf)
  13047. return evpkdf.exports;
  13048. hasRequiredEvpkdf = 1;
  13049. (function(module, exports) {
  13050. (function(root, factory, undef) {
  13051. {
  13052. module.exports = factory(requireCore(), requireSha1(), requireHmac());
  13053. }
  13054. })(commonjsGlobal, function(CryptoJS) {
  13055. (function() {
  13056. var C = CryptoJS;
  13057. var C_lib = C.lib;
  13058. var Base = C_lib.Base;
  13059. var WordArray = C_lib.WordArray;
  13060. var C_algo = C.algo;
  13061. var MD5 = C_algo.MD5;
  13062. var EvpKDF = C_algo.EvpKDF = Base.extend({
  13063. /**
  13064. * Configuration options.
  13065. *
  13066. * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)
  13067. * @property {Hasher} hasher The hash algorithm to use. Default: MD5
  13068. * @property {number} iterations The number of iterations to perform. Default: 1
  13069. */
  13070. cfg: Base.extend({
  13071. keySize: 128 / 32,
  13072. hasher: MD5,
  13073. iterations: 1
  13074. }),
  13075. /**
  13076. * Initializes a newly created key derivation function.
  13077. *
  13078. * @param {Object} cfg (Optional) The configuration options to use for the derivation.
  13079. *
  13080. * @example
  13081. *
  13082. * var kdf = CryptoJS.algo.EvpKDF.create();
  13083. * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 });
  13084. * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 });
  13085. */
  13086. init: function(cfg) {
  13087. this.cfg = this.cfg.extend(cfg);
  13088. },
  13089. /**
  13090. * Derives a key from a password.
  13091. *
  13092. * @param {WordArray|string} password The password.
  13093. * @param {WordArray|string} salt A salt.
  13094. *
  13095. * @return {WordArray} The derived key.
  13096. *
  13097. * @example
  13098. *
  13099. * var key = kdf.compute(password, salt);
  13100. */
  13101. compute: function(password, salt) {
  13102. var block;
  13103. var cfg = this.cfg;
  13104. var hasher = cfg.hasher.create();
  13105. var derivedKey = WordArray.create();
  13106. var derivedKeyWords = derivedKey.words;
  13107. var keySize = cfg.keySize;
  13108. var iterations = cfg.iterations;
  13109. while (derivedKeyWords.length < keySize) {
  13110. if (block) {
  13111. hasher.update(block);
  13112. }
  13113. block = hasher.update(password).finalize(salt);
  13114. hasher.reset();
  13115. for (var i = 1; i < iterations; i++) {
  13116. block = hasher.finalize(block);
  13117. hasher.reset();
  13118. }
  13119. derivedKey.concat(block);
  13120. }
  13121. derivedKey.sigBytes = keySize * 4;
  13122. return derivedKey;
  13123. }
  13124. });
  13125. C.EvpKDF = function(password, salt, cfg) {
  13126. return EvpKDF.create(cfg).compute(password, salt);
  13127. };
  13128. })();
  13129. return CryptoJS.EvpKDF;
  13130. });
  13131. })(evpkdf);
  13132. return evpkdf.exports;
  13133. }
  13134. var cipherCore = { exports: {} };
  13135. var hasRequiredCipherCore;
  13136. function requireCipherCore() {
  13137. if (hasRequiredCipherCore)
  13138. return cipherCore.exports;
  13139. hasRequiredCipherCore = 1;
  13140. (function(module, exports) {
  13141. (function(root, factory, undef) {
  13142. {
  13143. module.exports = factory(requireCore(), requireEvpkdf());
  13144. }
  13145. })(commonjsGlobal, function(CryptoJS) {
  13146. CryptoJS.lib.Cipher || function(undefined$1) {
  13147. var C = CryptoJS;
  13148. var C_lib = C.lib;
  13149. var Base = C_lib.Base;
  13150. var WordArray = C_lib.WordArray;
  13151. var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm;
  13152. var C_enc = C.enc;
  13153. C_enc.Utf8;
  13154. var Base64 = C_enc.Base64;
  13155. var C_algo = C.algo;
  13156. var EvpKDF = C_algo.EvpKDF;
  13157. var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({
  13158. /**
  13159. * Configuration options.
  13160. *
  13161. * @property {WordArray} iv The IV to use for this operation.
  13162. */
  13163. cfg: Base.extend(),
  13164. /**
  13165. * Creates this cipher in encryption mode.
  13166. *
  13167. * @param {WordArray} key The key.
  13168. * @param {Object} cfg (Optional) The configuration options to use for this operation.
  13169. *
  13170. * @return {Cipher} A cipher instance.
  13171. *
  13172. * @static
  13173. *
  13174. * @example
  13175. *
  13176. * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray });
  13177. */
  13178. createEncryptor: function(key, cfg) {
  13179. return this.create(this._ENC_XFORM_MODE, key, cfg);
  13180. },
  13181. /**
  13182. * Creates this cipher in decryption mode.
  13183. *
  13184. * @param {WordArray} key The key.
  13185. * @param {Object} cfg (Optional) The configuration options to use for this operation.
  13186. *
  13187. * @return {Cipher} A cipher instance.
  13188. *
  13189. * @static
  13190. *
  13191. * @example
  13192. *
  13193. * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray });
  13194. */
  13195. createDecryptor: function(key, cfg) {
  13196. return this.create(this._DEC_XFORM_MODE, key, cfg);
  13197. },
  13198. /**
  13199. * Initializes a newly created cipher.
  13200. *
  13201. * @param {number} xformMode Either the encryption or decryption transormation mode constant.
  13202. * @param {WordArray} key The key.
  13203. * @param {Object} cfg (Optional) The configuration options to use for this operation.
  13204. *
  13205. * @example
  13206. *
  13207. * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray });
  13208. */
  13209. init: function(xformMode, key, cfg) {
  13210. this.cfg = this.cfg.extend(cfg);
  13211. this._xformMode = xformMode;
  13212. this._key = key;
  13213. this.reset();
  13214. },
  13215. /**
  13216. * Resets this cipher to its initial state.
  13217. *
  13218. * @example
  13219. *
  13220. * cipher.reset();
  13221. */
  13222. reset: function() {
  13223. BufferedBlockAlgorithm.reset.call(this);
  13224. this._doReset();
  13225. },
  13226. /**
  13227. * Adds data to be encrypted or decrypted.
  13228. *
  13229. * @param {WordArray|string} dataUpdate The data to encrypt or decrypt.
  13230. *
  13231. * @return {WordArray} The data after processing.
  13232. *
  13233. * @example
  13234. *
  13235. * var encrypted = cipher.process('data');
  13236. * var encrypted = cipher.process(wordArray);
  13237. */
  13238. process: function(dataUpdate) {
  13239. this._append(dataUpdate);
  13240. return this._process();
  13241. },
  13242. /**
  13243. * Finalizes the encryption or decryption process.
  13244. * Note that the finalize operation is effectively a destructive, read-once operation.
  13245. *
  13246. * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt.
  13247. *
  13248. * @return {WordArray} The data after final processing.
  13249. *
  13250. * @example
  13251. *
  13252. * var encrypted = cipher.finalize();
  13253. * var encrypted = cipher.finalize('data');
  13254. * var encrypted = cipher.finalize(wordArray);
  13255. */
  13256. finalize: function(dataUpdate) {
  13257. if (dataUpdate) {
  13258. this._append(dataUpdate);
  13259. }
  13260. var finalProcessedData = this._doFinalize();
  13261. return finalProcessedData;
  13262. },
  13263. keySize: 128 / 32,
  13264. ivSize: 128 / 32,
  13265. _ENC_XFORM_MODE: 1,
  13266. _DEC_XFORM_MODE: 2,
  13267. /**
  13268. * Creates shortcut functions to a cipher's object interface.
  13269. *
  13270. * @param {Cipher} cipher The cipher to create a helper for.
  13271. *
  13272. * @return {Object} An object with encrypt and decrypt shortcut functions.
  13273. *
  13274. * @static
  13275. *
  13276. * @example
  13277. *
  13278. * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES);
  13279. */
  13280. _createHelper: function() {
  13281. function selectCipherStrategy(key) {
  13282. if (typeof key == "string") {
  13283. return PasswordBasedCipher;
  13284. } else {
  13285. return SerializableCipher;
  13286. }
  13287. }
  13288. return function(cipher) {
  13289. return {
  13290. encrypt: function(message, key, cfg) {
  13291. return selectCipherStrategy(key).encrypt(cipher, message, key, cfg);
  13292. },
  13293. decrypt: function(ciphertext, key, cfg) {
  13294. return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg);
  13295. }
  13296. };
  13297. };
  13298. }()
  13299. });
  13300. C_lib.StreamCipher = Cipher.extend({
  13301. _doFinalize: function() {
  13302. var finalProcessedBlocks = this._process(true);
  13303. return finalProcessedBlocks;
  13304. },
  13305. blockSize: 1
  13306. });
  13307. var C_mode = C.mode = {};
  13308. var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({
  13309. /**
  13310. * Creates this mode for encryption.
  13311. *
  13312. * @param {Cipher} cipher A block cipher instance.
  13313. * @param {Array} iv The IV words.
  13314. *
  13315. * @static
  13316. *
  13317. * @example
  13318. *
  13319. * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words);
  13320. */
  13321. createEncryptor: function(cipher, iv) {
  13322. return this.Encryptor.create(cipher, iv);
  13323. },
  13324. /**
  13325. * Creates this mode for decryption.
  13326. *
  13327. * @param {Cipher} cipher A block cipher instance.
  13328. * @param {Array} iv The IV words.
  13329. *
  13330. * @static
  13331. *
  13332. * @example
  13333. *
  13334. * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words);
  13335. */
  13336. createDecryptor: function(cipher, iv) {
  13337. return this.Decryptor.create(cipher, iv);
  13338. },
  13339. /**
  13340. * Initializes a newly created mode.
  13341. *
  13342. * @param {Cipher} cipher A block cipher instance.
  13343. * @param {Array} iv The IV words.
  13344. *
  13345. * @example
  13346. *
  13347. * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words);
  13348. */
  13349. init: function(cipher, iv) {
  13350. this._cipher = cipher;
  13351. this._iv = iv;
  13352. }
  13353. });
  13354. var CBC = C_mode.CBC = function() {
  13355. var CBC2 = BlockCipherMode.extend();
  13356. CBC2.Encryptor = CBC2.extend({
  13357. /**
  13358. * Processes the data block at offset.
  13359. *
  13360. * @param {Array} words The data words to operate on.
  13361. * @param {number} offset The offset where the block starts.
  13362. *
  13363. * @example
  13364. *
  13365. * mode.processBlock(data.words, offset);
  13366. */
  13367. processBlock: function(words, offset) {
  13368. var cipher = this._cipher;
  13369. var blockSize = cipher.blockSize;
  13370. xorBlock.call(this, words, offset, blockSize);
  13371. cipher.encryptBlock(words, offset);
  13372. this._prevBlock = words.slice(offset, offset + blockSize);
  13373. }
  13374. });
  13375. CBC2.Decryptor = CBC2.extend({
  13376. /**
  13377. * Processes the data block at offset.
  13378. *
  13379. * @param {Array} words The data words to operate on.
  13380. * @param {number} offset The offset where the block starts.
  13381. *
  13382. * @example
  13383. *
  13384. * mode.processBlock(data.words, offset);
  13385. */
  13386. processBlock: function(words, offset) {
  13387. var cipher = this._cipher;
  13388. var blockSize = cipher.blockSize;
  13389. var thisBlock = words.slice(offset, offset + blockSize);
  13390. cipher.decryptBlock(words, offset);
  13391. xorBlock.call(this, words, offset, blockSize);
  13392. this._prevBlock = thisBlock;
  13393. }
  13394. });
  13395. function xorBlock(words, offset, blockSize) {
  13396. var block;
  13397. var iv = this._iv;
  13398. if (iv) {
  13399. block = iv;
  13400. this._iv = undefined$1;
  13401. } else {
  13402. block = this._prevBlock;
  13403. }
  13404. for (var i = 0; i < blockSize; i++) {
  13405. words[offset + i] ^= block[i];
  13406. }
  13407. }
  13408. return CBC2;
  13409. }();
  13410. var C_pad = C.pad = {};
  13411. var Pkcs7 = C_pad.Pkcs7 = {
  13412. /**
  13413. * Pads data using the algorithm defined in PKCS #5/7.
  13414. *
  13415. * @param {WordArray} data The data to pad.
  13416. * @param {number} blockSize The multiple that the data should be padded to.
  13417. *
  13418. * @static
  13419. *
  13420. * @example
  13421. *
  13422. * CryptoJS.pad.Pkcs7.pad(wordArray, 4);
  13423. */
  13424. pad: function(data, blockSize) {
  13425. var blockSizeBytes = blockSize * 4;
  13426. var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;
  13427. var paddingWord = nPaddingBytes << 24 | nPaddingBytes << 16 | nPaddingBytes << 8 | nPaddingBytes;
  13428. var paddingWords = [];
  13429. for (var i = 0; i < nPaddingBytes; i += 4) {
  13430. paddingWords.push(paddingWord);
  13431. }
  13432. var padding = WordArray.create(paddingWords, nPaddingBytes);
  13433. data.concat(padding);
  13434. },
  13435. /**
  13436. * Unpads data that had been padded using the algorithm defined in PKCS #5/7.
  13437. *
  13438. * @param {WordArray} data The data to unpad.
  13439. *
  13440. * @static
  13441. *
  13442. * @example
  13443. *
  13444. * CryptoJS.pad.Pkcs7.unpad(wordArray);
  13445. */
  13446. unpad: function(data) {
  13447. var nPaddingBytes = data.words[data.sigBytes - 1 >>> 2] & 255;
  13448. data.sigBytes -= nPaddingBytes;
  13449. }
  13450. };
  13451. C_lib.BlockCipher = Cipher.extend({
  13452. /**
  13453. * Configuration options.
  13454. *
  13455. * @property {Mode} mode The block mode to use. Default: CBC
  13456. * @property {Padding} padding The padding strategy to use. Default: Pkcs7
  13457. */
  13458. cfg: Cipher.cfg.extend({
  13459. mode: CBC,
  13460. padding: Pkcs7
  13461. }),
  13462. reset: function() {
  13463. var modeCreator;
  13464. Cipher.reset.call(this);
  13465. var cfg = this.cfg;
  13466. var iv = cfg.iv;
  13467. var mode = cfg.mode;
  13468. if (this._xformMode == this._ENC_XFORM_MODE) {
  13469. modeCreator = mode.createEncryptor;
  13470. } else {
  13471. modeCreator = mode.createDecryptor;
  13472. this._minBufferSize = 1;
  13473. }
  13474. if (this._mode && this._mode.__creator == modeCreator) {
  13475. this._mode.init(this, iv && iv.words);
  13476. } else {
  13477. this._mode = modeCreator.call(mode, this, iv && iv.words);
  13478. this._mode.__creator = modeCreator;
  13479. }
  13480. },
  13481. _doProcessBlock: function(words, offset) {
  13482. this._mode.processBlock(words, offset);
  13483. },
  13484. _doFinalize: function() {
  13485. var finalProcessedBlocks;
  13486. var padding = this.cfg.padding;
  13487. if (this._xformMode == this._ENC_XFORM_MODE) {
  13488. padding.pad(this._data, this.blockSize);
  13489. finalProcessedBlocks = this._process(true);
  13490. } else {
  13491. finalProcessedBlocks = this._process(true);
  13492. padding.unpad(finalProcessedBlocks);
  13493. }
  13494. return finalProcessedBlocks;
  13495. },
  13496. blockSize: 128 / 32
  13497. });
  13498. var CipherParams = C_lib.CipherParams = Base.extend({
  13499. /**
  13500. * Initializes a newly created cipher params object.
  13501. *
  13502. * @param {Object} cipherParams An object with any of the possible cipher parameters.
  13503. *
  13504. * @example
  13505. *
  13506. * var cipherParams = CryptoJS.lib.CipherParams.create({
  13507. * ciphertext: ciphertextWordArray,
  13508. * key: keyWordArray,
  13509. * iv: ivWordArray,
  13510. * salt: saltWordArray,
  13511. * algorithm: CryptoJS.algo.AES,
  13512. * mode: CryptoJS.mode.CBC,
  13513. * padding: CryptoJS.pad.PKCS7,
  13514. * blockSize: 4,
  13515. * formatter: CryptoJS.format.OpenSSL
  13516. * });
  13517. */
  13518. init: function(cipherParams) {
  13519. this.mixIn(cipherParams);
  13520. },
  13521. /**
  13522. * Converts this cipher params object to a string.
  13523. *
  13524. * @param {Format} formatter (Optional) The formatting strategy to use.
  13525. *
  13526. * @return {string} The stringified cipher params.
  13527. *
  13528. * @throws Error If neither the formatter nor the default formatter is set.
  13529. *
  13530. * @example
  13531. *
  13532. * var string = cipherParams + '';
  13533. * var string = cipherParams.toString();
  13534. * var string = cipherParams.toString(CryptoJS.format.OpenSSL);
  13535. */
  13536. toString: function(formatter) {
  13537. return (formatter || this.formatter).stringify(this);
  13538. }
  13539. });
  13540. var C_format = C.format = {};
  13541. var OpenSSLFormatter = C_format.OpenSSL = {
  13542. /**
  13543. * Converts a cipher params object to an OpenSSL-compatible string.
  13544. *
  13545. * @param {CipherParams} cipherParams The cipher params object.
  13546. *
  13547. * @return {string} The OpenSSL-compatible string.
  13548. *
  13549. * @static
  13550. *
  13551. * @example
  13552. *
  13553. * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams);
  13554. */
  13555. stringify: function(cipherParams) {
  13556. var wordArray;
  13557. var ciphertext = cipherParams.ciphertext;
  13558. var salt = cipherParams.salt;
  13559. if (salt) {
  13560. wordArray = WordArray.create([1398893684, 1701076831]).concat(salt).concat(ciphertext);
  13561. } else {
  13562. wordArray = ciphertext;
  13563. }
  13564. return wordArray.toString(Base64);
  13565. },
  13566. /**
  13567. * Converts an OpenSSL-compatible string to a cipher params object.
  13568. *
  13569. * @param {string} openSSLStr The OpenSSL-compatible string.
  13570. *
  13571. * @return {CipherParams} The cipher params object.
  13572. *
  13573. * @static
  13574. *
  13575. * @example
  13576. *
  13577. * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString);
  13578. */
  13579. parse: function(openSSLStr) {
  13580. var salt;
  13581. var ciphertext = Base64.parse(openSSLStr);
  13582. var ciphertextWords = ciphertext.words;
  13583. if (ciphertextWords[0] == 1398893684 && ciphertextWords[1] == 1701076831) {
  13584. salt = WordArray.create(ciphertextWords.slice(2, 4));
  13585. ciphertextWords.splice(0, 4);
  13586. ciphertext.sigBytes -= 16;
  13587. }
  13588. return CipherParams.create({ ciphertext, salt });
  13589. }
  13590. };
  13591. var SerializableCipher = C_lib.SerializableCipher = Base.extend({
  13592. /**
  13593. * Configuration options.
  13594. *
  13595. * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL
  13596. */
  13597. cfg: Base.extend({
  13598. format: OpenSSLFormatter
  13599. }),
  13600. /**
  13601. * Encrypts a message.
  13602. *
  13603. * @param {Cipher} cipher The cipher algorithm to use.
  13604. * @param {WordArray|string} message The message to encrypt.
  13605. * @param {WordArray} key The key.
  13606. * @param {Object} cfg (Optional) The configuration options to use for this operation.
  13607. *
  13608. * @return {CipherParams} A cipher params object.
  13609. *
  13610. * @static
  13611. *
  13612. * @example
  13613. *
  13614. * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key);
  13615. * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv });
  13616. * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL });
  13617. */
  13618. encrypt: function(cipher, message, key, cfg) {
  13619. cfg = this.cfg.extend(cfg);
  13620. var encryptor = cipher.createEncryptor(key, cfg);
  13621. var ciphertext = encryptor.finalize(message);
  13622. var cipherCfg = encryptor.cfg;
  13623. return CipherParams.create({
  13624. ciphertext,
  13625. key,
  13626. iv: cipherCfg.iv,
  13627. algorithm: cipher,
  13628. mode: cipherCfg.mode,
  13629. padding: cipherCfg.padding,
  13630. blockSize: cipher.blockSize,
  13631. formatter: cfg.format
  13632. });
  13633. },
  13634. /**
  13635. * Decrypts serialized ciphertext.
  13636. *
  13637. * @param {Cipher} cipher The cipher algorithm to use.
  13638. * @param {CipherParams|string} ciphertext The ciphertext to decrypt.
  13639. * @param {WordArray} key The key.
  13640. * @param {Object} cfg (Optional) The configuration options to use for this operation.
  13641. *
  13642. * @return {WordArray} The plaintext.
  13643. *
  13644. * @static
  13645. *
  13646. * @example
  13647. *
  13648. * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL });
  13649. * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL });
  13650. */
  13651. decrypt: function(cipher, ciphertext, key, cfg) {
  13652. cfg = this.cfg.extend(cfg);
  13653. ciphertext = this._parse(ciphertext, cfg.format);
  13654. var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext);
  13655. return plaintext;
  13656. },
  13657. /**
  13658. * Converts serialized ciphertext to CipherParams,
  13659. * else assumed CipherParams already and returns ciphertext unchanged.
  13660. *
  13661. * @param {CipherParams|string} ciphertext The ciphertext.
  13662. * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext.
  13663. *
  13664. * @return {CipherParams} The unserialized ciphertext.
  13665. *
  13666. * @static
  13667. *
  13668. * @example
  13669. *
  13670. * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format);
  13671. */
  13672. _parse: function(ciphertext, format) {
  13673. if (typeof ciphertext == "string") {
  13674. return format.parse(ciphertext, this);
  13675. } else {
  13676. return ciphertext;
  13677. }
  13678. }
  13679. });
  13680. var C_kdf = C.kdf = {};
  13681. var OpenSSLKdf = C_kdf.OpenSSL = {
  13682. /**
  13683. * Derives a key and IV from a password.
  13684. *
  13685. * @param {string} password The password to derive from.
  13686. * @param {number} keySize The size in words of the key to generate.
  13687. * @param {number} ivSize The size in words of the IV to generate.
  13688. * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly.
  13689. *
  13690. * @return {CipherParams} A cipher params object with the key, IV, and salt.
  13691. *
  13692. * @static
  13693. *
  13694. * @example
  13695. *
  13696. * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);
  13697. * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');
  13698. */
  13699. execute: function(password, keySize, ivSize, salt, hasher) {
  13700. if (!salt) {
  13701. salt = WordArray.random(64 / 8);
  13702. }
  13703. if (!hasher) {
  13704. var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt);
  13705. } else {
  13706. var key = EvpKDF.create({ keySize: keySize + ivSize, hasher }).compute(password, salt);
  13707. }
  13708. var iv = WordArray.create(key.words.slice(keySize), ivSize * 4);
  13709. key.sigBytes = keySize * 4;
  13710. return CipherParams.create({ key, iv, salt });
  13711. }
  13712. };
  13713. var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({
  13714. /**
  13715. * Configuration options.
  13716. *
  13717. * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL
  13718. */
  13719. cfg: SerializableCipher.cfg.extend({
  13720. kdf: OpenSSLKdf
  13721. }),
  13722. /**
  13723. * Encrypts a message using a password.
  13724. *
  13725. * @param {Cipher} cipher The cipher algorithm to use.
  13726. * @param {WordArray|string} message The message to encrypt.
  13727. * @param {string} password The password.
  13728. * @param {Object} cfg (Optional) The configuration options to use for this operation.
  13729. *
  13730. * @return {CipherParams} A cipher params object.
  13731. *
  13732. * @static
  13733. *
  13734. * @example
  13735. *
  13736. * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');
  13737. * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });
  13738. */
  13739. encrypt: function(cipher, message, password, cfg) {
  13740. cfg = this.cfg.extend(cfg);
  13741. var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, cfg.salt, cfg.hasher);
  13742. cfg.iv = derivedParams.iv;
  13743. var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg);
  13744. ciphertext.mixIn(derivedParams);
  13745. return ciphertext;
  13746. },
  13747. /**
  13748. * Decrypts serialized ciphertext using a password.
  13749. *
  13750. * @param {Cipher} cipher The cipher algorithm to use.
  13751. * @param {CipherParams|string} ciphertext The ciphertext to decrypt.
  13752. * @param {string} password The password.
  13753. * @param {Object} cfg (Optional) The configuration options to use for this operation.
  13754. *
  13755. * @return {WordArray} The plaintext.
  13756. *
  13757. * @static
  13758. *
  13759. * @example
  13760. *
  13761. * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL });
  13762. * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL });
  13763. */
  13764. decrypt: function(cipher, ciphertext, password, cfg) {
  13765. cfg = this.cfg.extend(cfg);
  13766. ciphertext = this._parse(ciphertext, cfg.format);
  13767. var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt, cfg.hasher);
  13768. cfg.iv = derivedParams.iv;
  13769. var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg);
  13770. return plaintext;
  13771. }
  13772. });
  13773. }();
  13774. });
  13775. })(cipherCore);
  13776. return cipherCore.exports;
  13777. }
  13778. var modeCfb = { exports: {} };
  13779. var hasRequiredModeCfb;
  13780. function requireModeCfb() {
  13781. if (hasRequiredModeCfb)
  13782. return modeCfb.exports;
  13783. hasRequiredModeCfb = 1;
  13784. (function(module, exports) {
  13785. (function(root, factory, undef) {
  13786. {
  13787. module.exports = factory(requireCore(), requireCipherCore());
  13788. }
  13789. })(commonjsGlobal, function(CryptoJS) {
  13790. CryptoJS.mode.CFB = function() {
  13791. var CFB = CryptoJS.lib.BlockCipherMode.extend();
  13792. CFB.Encryptor = CFB.extend({
  13793. processBlock: function(words, offset) {
  13794. var cipher = this._cipher;
  13795. var blockSize = cipher.blockSize;
  13796. generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);
  13797. this._prevBlock = words.slice(offset, offset + blockSize);
  13798. }
  13799. });
  13800. CFB.Decryptor = CFB.extend({
  13801. processBlock: function(words, offset) {
  13802. var cipher = this._cipher;
  13803. var blockSize = cipher.blockSize;
  13804. var thisBlock = words.slice(offset, offset + blockSize);
  13805. generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);
  13806. this._prevBlock = thisBlock;
  13807. }
  13808. });
  13809. function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) {
  13810. var keystream;
  13811. var iv = this._iv;
  13812. if (iv) {
  13813. keystream = iv.slice(0);
  13814. this._iv = void 0;
  13815. } else {
  13816. keystream = this._prevBlock;
  13817. }
  13818. cipher.encryptBlock(keystream, 0);
  13819. for (var i = 0; i < blockSize; i++) {
  13820. words[offset + i] ^= keystream[i];
  13821. }
  13822. }
  13823. return CFB;
  13824. }();
  13825. return CryptoJS.mode.CFB;
  13826. });
  13827. })(modeCfb);
  13828. return modeCfb.exports;
  13829. }
  13830. var modeCtr = { exports: {} };
  13831. var hasRequiredModeCtr;
  13832. function requireModeCtr() {
  13833. if (hasRequiredModeCtr)
  13834. return modeCtr.exports;
  13835. hasRequiredModeCtr = 1;
  13836. (function(module, exports) {
  13837. (function(root, factory, undef) {
  13838. {
  13839. module.exports = factory(requireCore(), requireCipherCore());
  13840. }
  13841. })(commonjsGlobal, function(CryptoJS) {
  13842. CryptoJS.mode.CTR = function() {
  13843. var CTR = CryptoJS.lib.BlockCipherMode.extend();
  13844. var Encryptor = CTR.Encryptor = CTR.extend({
  13845. processBlock: function(words, offset) {
  13846. var cipher = this._cipher;
  13847. var blockSize = cipher.blockSize;
  13848. var iv = this._iv;
  13849. var counter = this._counter;
  13850. if (iv) {
  13851. counter = this._counter = iv.slice(0);
  13852. this._iv = void 0;
  13853. }
  13854. var keystream = counter.slice(0);
  13855. cipher.encryptBlock(keystream, 0);
  13856. counter[blockSize - 1] = counter[blockSize - 1] + 1 | 0;
  13857. for (var i = 0; i < blockSize; i++) {
  13858. words[offset + i] ^= keystream[i];
  13859. }
  13860. }
  13861. });
  13862. CTR.Decryptor = Encryptor;
  13863. return CTR;
  13864. }();
  13865. return CryptoJS.mode.CTR;
  13866. });
  13867. })(modeCtr);
  13868. return modeCtr.exports;
  13869. }
  13870. var modeCtrGladman = { exports: {} };
  13871. var hasRequiredModeCtrGladman;
  13872. function requireModeCtrGladman() {
  13873. if (hasRequiredModeCtrGladman)
  13874. return modeCtrGladman.exports;
  13875. hasRequiredModeCtrGladman = 1;
  13876. (function(module, exports) {
  13877. (function(root, factory, undef) {
  13878. {
  13879. module.exports = factory(requireCore(), requireCipherCore());
  13880. }
  13881. })(commonjsGlobal, function(CryptoJS) {
  13882. /** @preserve
  13883. * Counter block mode compatible with Dr Brian Gladman fileenc.c
  13884. * derived from CryptoJS.mode.CTR
  13885. * Jan Hruby jhruby.web@gmail.com
  13886. */
  13887. CryptoJS.mode.CTRGladman = function() {
  13888. var CTRGladman = CryptoJS.lib.BlockCipherMode.extend();
  13889. function incWord(word) {
  13890. if ((word >> 24 & 255) === 255) {
  13891. var b1 = word >> 16 & 255;
  13892. var b2 = word >> 8 & 255;
  13893. var b3 = word & 255;
  13894. if (b1 === 255) {
  13895. b1 = 0;
  13896. if (b2 === 255) {
  13897. b2 = 0;
  13898. if (b3 === 255) {
  13899. b3 = 0;
  13900. } else {
  13901. ++b3;
  13902. }
  13903. } else {
  13904. ++b2;
  13905. }
  13906. } else {
  13907. ++b1;
  13908. }
  13909. word = 0;
  13910. word += b1 << 16;
  13911. word += b2 << 8;
  13912. word += b3;
  13913. } else {
  13914. word += 1 << 24;
  13915. }
  13916. return word;
  13917. }
  13918. function incCounter(counter) {
  13919. if ((counter[0] = incWord(counter[0])) === 0) {
  13920. counter[1] = incWord(counter[1]);
  13921. }
  13922. return counter;
  13923. }
  13924. var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({
  13925. processBlock: function(words, offset) {
  13926. var cipher = this._cipher;
  13927. var blockSize = cipher.blockSize;
  13928. var iv = this._iv;
  13929. var counter = this._counter;
  13930. if (iv) {
  13931. counter = this._counter = iv.slice(0);
  13932. this._iv = void 0;
  13933. }
  13934. incCounter(counter);
  13935. var keystream = counter.slice(0);
  13936. cipher.encryptBlock(keystream, 0);
  13937. for (var i = 0; i < blockSize; i++) {
  13938. words[offset + i] ^= keystream[i];
  13939. }
  13940. }
  13941. });
  13942. CTRGladman.Decryptor = Encryptor;
  13943. return CTRGladman;
  13944. }();
  13945. return CryptoJS.mode.CTRGladman;
  13946. });
  13947. })(modeCtrGladman);
  13948. return modeCtrGladman.exports;
  13949. }
  13950. var modeOfb = { exports: {} };
  13951. var hasRequiredModeOfb;
  13952. function requireModeOfb() {
  13953. if (hasRequiredModeOfb)
  13954. return modeOfb.exports;
  13955. hasRequiredModeOfb = 1;
  13956. (function(module, exports) {
  13957. (function(root, factory, undef) {
  13958. {
  13959. module.exports = factory(requireCore(), requireCipherCore());
  13960. }
  13961. })(commonjsGlobal, function(CryptoJS) {
  13962. CryptoJS.mode.OFB = function() {
  13963. var OFB = CryptoJS.lib.BlockCipherMode.extend();
  13964. var Encryptor = OFB.Encryptor = OFB.extend({
  13965. processBlock: function(words, offset) {
  13966. var cipher = this._cipher;
  13967. var blockSize = cipher.blockSize;
  13968. var iv = this._iv;
  13969. var keystream = this._keystream;
  13970. if (iv) {
  13971. keystream = this._keystream = iv.slice(0);
  13972. this._iv = void 0;
  13973. }
  13974. cipher.encryptBlock(keystream, 0);
  13975. for (var i = 0; i < blockSize; i++) {
  13976. words[offset + i] ^= keystream[i];
  13977. }
  13978. }
  13979. });
  13980. OFB.Decryptor = Encryptor;
  13981. return OFB;
  13982. }();
  13983. return CryptoJS.mode.OFB;
  13984. });
  13985. })(modeOfb);
  13986. return modeOfb.exports;
  13987. }
  13988. var modeEcb = { exports: {} };
  13989. var hasRequiredModeEcb;
  13990. function requireModeEcb() {
  13991. if (hasRequiredModeEcb)
  13992. return modeEcb.exports;
  13993. hasRequiredModeEcb = 1;
  13994. (function(module, exports) {
  13995. (function(root, factory, undef) {
  13996. {
  13997. module.exports = factory(requireCore(), requireCipherCore());
  13998. }
  13999. })(commonjsGlobal, function(CryptoJS) {
  14000. CryptoJS.mode.ECB = function() {
  14001. var ECB = CryptoJS.lib.BlockCipherMode.extend();
  14002. ECB.Encryptor = ECB.extend({
  14003. processBlock: function(words, offset) {
  14004. this._cipher.encryptBlock(words, offset);
  14005. }
  14006. });
  14007. ECB.Decryptor = ECB.extend({
  14008. processBlock: function(words, offset) {
  14009. this._cipher.decryptBlock(words, offset);
  14010. }
  14011. });
  14012. return ECB;
  14013. }();
  14014. return CryptoJS.mode.ECB;
  14015. });
  14016. })(modeEcb);
  14017. return modeEcb.exports;
  14018. }
  14019. var padAnsix923 = { exports: {} };
  14020. var hasRequiredPadAnsix923;
  14021. function requirePadAnsix923() {
  14022. if (hasRequiredPadAnsix923)
  14023. return padAnsix923.exports;
  14024. hasRequiredPadAnsix923 = 1;
  14025. (function(module, exports) {
  14026. (function(root, factory, undef) {
  14027. {
  14028. module.exports = factory(requireCore(), requireCipherCore());
  14029. }
  14030. })(commonjsGlobal, function(CryptoJS) {
  14031. CryptoJS.pad.AnsiX923 = {
  14032. pad: function(data, blockSize) {
  14033. var dataSigBytes = data.sigBytes;
  14034. var blockSizeBytes = blockSize * 4;
  14035. var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes;
  14036. var lastBytePos = dataSigBytes + nPaddingBytes - 1;
  14037. data.clamp();
  14038. data.words[lastBytePos >>> 2] |= nPaddingBytes << 24 - lastBytePos % 4 * 8;
  14039. data.sigBytes += nPaddingBytes;
  14040. },
  14041. unpad: function(data) {
  14042. var nPaddingBytes = data.words[data.sigBytes - 1 >>> 2] & 255;
  14043. data.sigBytes -= nPaddingBytes;
  14044. }
  14045. };
  14046. return CryptoJS.pad.Ansix923;
  14047. });
  14048. })(padAnsix923);
  14049. return padAnsix923.exports;
  14050. }
  14051. var padIso10126 = { exports: {} };
  14052. var hasRequiredPadIso10126;
  14053. function requirePadIso10126() {
  14054. if (hasRequiredPadIso10126)
  14055. return padIso10126.exports;
  14056. hasRequiredPadIso10126 = 1;
  14057. (function(module, exports) {
  14058. (function(root, factory, undef) {
  14059. {
  14060. module.exports = factory(requireCore(), requireCipherCore());
  14061. }
  14062. })(commonjsGlobal, function(CryptoJS) {
  14063. CryptoJS.pad.Iso10126 = {
  14064. pad: function(data, blockSize) {
  14065. var blockSizeBytes = blockSize * 4;
  14066. var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;
  14067. data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)).concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1));
  14068. },
  14069. unpad: function(data) {
  14070. var nPaddingBytes = data.words[data.sigBytes - 1 >>> 2] & 255;
  14071. data.sigBytes -= nPaddingBytes;
  14072. }
  14073. };
  14074. return CryptoJS.pad.Iso10126;
  14075. });
  14076. })(padIso10126);
  14077. return padIso10126.exports;
  14078. }
  14079. var padIso97971 = { exports: {} };
  14080. var hasRequiredPadIso97971;
  14081. function requirePadIso97971() {
  14082. if (hasRequiredPadIso97971)
  14083. return padIso97971.exports;
  14084. hasRequiredPadIso97971 = 1;
  14085. (function(module, exports) {
  14086. (function(root, factory, undef) {
  14087. {
  14088. module.exports = factory(requireCore(), requireCipherCore());
  14089. }
  14090. })(commonjsGlobal, function(CryptoJS) {
  14091. CryptoJS.pad.Iso97971 = {
  14092. pad: function(data, blockSize) {
  14093. data.concat(CryptoJS.lib.WordArray.create([2147483648], 1));
  14094. CryptoJS.pad.ZeroPadding.pad(data, blockSize);
  14095. },
  14096. unpad: function(data) {
  14097. CryptoJS.pad.ZeroPadding.unpad(data);
  14098. data.sigBytes--;
  14099. }
  14100. };
  14101. return CryptoJS.pad.Iso97971;
  14102. });
  14103. })(padIso97971);
  14104. return padIso97971.exports;
  14105. }
  14106. var padZeropadding = { exports: {} };
  14107. var hasRequiredPadZeropadding;
  14108. function requirePadZeropadding() {
  14109. if (hasRequiredPadZeropadding)
  14110. return padZeropadding.exports;
  14111. hasRequiredPadZeropadding = 1;
  14112. (function(module, exports) {
  14113. (function(root, factory, undef) {
  14114. {
  14115. module.exports = factory(requireCore(), requireCipherCore());
  14116. }
  14117. })(commonjsGlobal, function(CryptoJS) {
  14118. CryptoJS.pad.ZeroPadding = {
  14119. pad: function(data, blockSize) {
  14120. var blockSizeBytes = blockSize * 4;
  14121. data.clamp();
  14122. data.sigBytes += blockSizeBytes - (data.sigBytes % blockSizeBytes || blockSizeBytes);
  14123. },
  14124. unpad: function(data) {
  14125. var dataWords = data.words;
  14126. var i = data.sigBytes - 1;
  14127. for (var i = data.sigBytes - 1; i >= 0; i--) {
  14128. if (dataWords[i >>> 2] >>> 24 - i % 4 * 8 & 255) {
  14129. data.sigBytes = i + 1;
  14130. break;
  14131. }
  14132. }
  14133. }
  14134. };
  14135. return CryptoJS.pad.ZeroPadding;
  14136. });
  14137. })(padZeropadding);
  14138. return padZeropadding.exports;
  14139. }
  14140. var padNopadding = { exports: {} };
  14141. var hasRequiredPadNopadding;
  14142. function requirePadNopadding() {
  14143. if (hasRequiredPadNopadding)
  14144. return padNopadding.exports;
  14145. hasRequiredPadNopadding = 1;
  14146. (function(module, exports) {
  14147. (function(root, factory, undef) {
  14148. {
  14149. module.exports = factory(requireCore(), requireCipherCore());
  14150. }
  14151. })(commonjsGlobal, function(CryptoJS) {
  14152. CryptoJS.pad.NoPadding = {
  14153. pad: function() {
  14154. },
  14155. unpad: function() {
  14156. }
  14157. };
  14158. return CryptoJS.pad.NoPadding;
  14159. });
  14160. })(padNopadding);
  14161. return padNopadding.exports;
  14162. }
  14163. var formatHex = { exports: {} };
  14164. var hasRequiredFormatHex;
  14165. function requireFormatHex() {
  14166. if (hasRequiredFormatHex)
  14167. return formatHex.exports;
  14168. hasRequiredFormatHex = 1;
  14169. (function(module, exports) {
  14170. (function(root, factory, undef) {
  14171. {
  14172. module.exports = factory(requireCore(), requireCipherCore());
  14173. }
  14174. })(commonjsGlobal, function(CryptoJS) {
  14175. (function(undefined$1) {
  14176. var C = CryptoJS;
  14177. var C_lib = C.lib;
  14178. var CipherParams = C_lib.CipherParams;
  14179. var C_enc = C.enc;
  14180. var Hex = C_enc.Hex;
  14181. var C_format = C.format;
  14182. C_format.Hex = {
  14183. /**
  14184. * Converts the ciphertext of a cipher params object to a hexadecimally encoded string.
  14185. *
  14186. * @param {CipherParams} cipherParams The cipher params object.
  14187. *
  14188. * @return {string} The hexadecimally encoded string.
  14189. *
  14190. * @static
  14191. *
  14192. * @example
  14193. *
  14194. * var hexString = CryptoJS.format.Hex.stringify(cipherParams);
  14195. */
  14196. stringify: function(cipherParams) {
  14197. return cipherParams.ciphertext.toString(Hex);
  14198. },
  14199. /**
  14200. * Converts a hexadecimally encoded ciphertext string to a cipher params object.
  14201. *
  14202. * @param {string} input The hexadecimally encoded string.
  14203. *
  14204. * @return {CipherParams} The cipher params object.
  14205. *
  14206. * @static
  14207. *
  14208. * @example
  14209. *
  14210. * var cipherParams = CryptoJS.format.Hex.parse(hexString);
  14211. */
  14212. parse: function(input) {
  14213. var ciphertext = Hex.parse(input);
  14214. return CipherParams.create({ ciphertext });
  14215. }
  14216. };
  14217. })();
  14218. return CryptoJS.format.Hex;
  14219. });
  14220. })(formatHex);
  14221. return formatHex.exports;
  14222. }
  14223. var aes = { exports: {} };
  14224. var hasRequiredAes;
  14225. function requireAes() {
  14226. if (hasRequiredAes)
  14227. return aes.exports;
  14228. hasRequiredAes = 1;
  14229. (function(module, exports) {
  14230. (function(root, factory, undef) {
  14231. {
  14232. module.exports = factory(requireCore(), requireEncBase64(), requireMd5(), requireEvpkdf(), requireCipherCore());
  14233. }
  14234. })(commonjsGlobal, function(CryptoJS) {
  14235. (function() {
  14236. var C = CryptoJS;
  14237. var C_lib = C.lib;
  14238. var BlockCipher = C_lib.BlockCipher;
  14239. var C_algo = C.algo;
  14240. var SBOX = [];
  14241. var INV_SBOX = [];
  14242. var SUB_MIX_0 = [];
  14243. var SUB_MIX_1 = [];
  14244. var SUB_MIX_2 = [];
  14245. var SUB_MIX_3 = [];
  14246. var INV_SUB_MIX_0 = [];
  14247. var INV_SUB_MIX_1 = [];
  14248. var INV_SUB_MIX_2 = [];
  14249. var INV_SUB_MIX_3 = [];
  14250. (function() {
  14251. var d = [];
  14252. for (var i = 0; i < 256; i++) {
  14253. if (i < 128) {
  14254. d[i] = i << 1;
  14255. } else {
  14256. d[i] = i << 1 ^ 283;
  14257. }
  14258. }
  14259. var x = 0;
  14260. var xi = 0;
  14261. for (var i = 0; i < 256; i++) {
  14262. var sx = xi ^ xi << 1 ^ xi << 2 ^ xi << 3 ^ xi << 4;
  14263. sx = sx >>> 8 ^ sx & 255 ^ 99;
  14264. SBOX[x] = sx;
  14265. INV_SBOX[sx] = x;
  14266. var x2 = d[x];
  14267. var x4 = d[x2];
  14268. var x8 = d[x4];
  14269. var t = d[sx] * 257 ^ sx * 16843008;
  14270. SUB_MIX_0[x] = t << 24 | t >>> 8;
  14271. SUB_MIX_1[x] = t << 16 | t >>> 16;
  14272. SUB_MIX_2[x] = t << 8 | t >>> 24;
  14273. SUB_MIX_3[x] = t;
  14274. var t = x8 * 16843009 ^ x4 * 65537 ^ x2 * 257 ^ x * 16843008;
  14275. INV_SUB_MIX_0[sx] = t << 24 | t >>> 8;
  14276. INV_SUB_MIX_1[sx] = t << 16 | t >>> 16;
  14277. INV_SUB_MIX_2[sx] = t << 8 | t >>> 24;
  14278. INV_SUB_MIX_3[sx] = t;
  14279. if (!x) {
  14280. x = xi = 1;
  14281. } else {
  14282. x = x2 ^ d[d[d[x8 ^ x2]]];
  14283. xi ^= d[d[xi]];
  14284. }
  14285. }
  14286. })();
  14287. var RCON = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54];
  14288. var AES = C_algo.AES = BlockCipher.extend({
  14289. _doReset: function() {
  14290. var t;
  14291. if (this._nRounds && this._keyPriorReset === this._key) {
  14292. return;
  14293. }
  14294. var key = this._keyPriorReset = this._key;
  14295. var keyWords = key.words;
  14296. var keySize = key.sigBytes / 4;
  14297. var nRounds = this._nRounds = keySize + 6;
  14298. var ksRows = (nRounds + 1) * 4;
  14299. var keySchedule = this._keySchedule = [];
  14300. for (var ksRow = 0; ksRow < ksRows; ksRow++) {
  14301. if (ksRow < keySize) {
  14302. keySchedule[ksRow] = keyWords[ksRow];
  14303. } else {
  14304. t = keySchedule[ksRow - 1];
  14305. if (!(ksRow % keySize)) {
  14306. t = t << 8 | t >>> 24;
  14307. t = SBOX[t >>> 24] << 24 | SBOX[t >>> 16 & 255] << 16 | SBOX[t >>> 8 & 255] << 8 | SBOX[t & 255];
  14308. t ^= RCON[ksRow / keySize | 0] << 24;
  14309. } else if (keySize > 6 && ksRow % keySize == 4) {
  14310. t = SBOX[t >>> 24] << 24 | SBOX[t >>> 16 & 255] << 16 | SBOX[t >>> 8 & 255] << 8 | SBOX[t & 255];
  14311. }
  14312. keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t;
  14313. }
  14314. }
  14315. var invKeySchedule = this._invKeySchedule = [];
  14316. for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) {
  14317. var ksRow = ksRows - invKsRow;
  14318. if (invKsRow % 4) {
  14319. var t = keySchedule[ksRow];
  14320. } else {
  14321. var t = keySchedule[ksRow - 4];
  14322. }
  14323. if (invKsRow < 4 || ksRow <= 4) {
  14324. invKeySchedule[invKsRow] = t;
  14325. } else {
  14326. invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[t >>> 16 & 255]] ^ INV_SUB_MIX_2[SBOX[t >>> 8 & 255]] ^ INV_SUB_MIX_3[SBOX[t & 255]];
  14327. }
  14328. }
  14329. },
  14330. encryptBlock: function(M, offset) {
  14331. this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX);
  14332. },
  14333. decryptBlock: function(M, offset) {
  14334. var t = M[offset + 1];
  14335. M[offset + 1] = M[offset + 3];
  14336. M[offset + 3] = t;
  14337. this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX);
  14338. var t = M[offset + 1];
  14339. M[offset + 1] = M[offset + 3];
  14340. M[offset + 3] = t;
  14341. },
  14342. _doCryptBlock: function(M, offset, keySchedule, SUB_MIX_02, SUB_MIX_12, SUB_MIX_22, SUB_MIX_32, SBOX2) {
  14343. var nRounds = this._nRounds;
  14344. var s0 = M[offset] ^ keySchedule[0];
  14345. var s1 = M[offset + 1] ^ keySchedule[1];
  14346. var s2 = M[offset + 2] ^ keySchedule[2];
  14347. var s3 = M[offset + 3] ^ keySchedule[3];
  14348. var ksRow = 4;
  14349. for (var round = 1; round < nRounds; round++) {
  14350. var t0 = SUB_MIX_02[s0 >>> 24] ^ SUB_MIX_12[s1 >>> 16 & 255] ^ SUB_MIX_22[s2 >>> 8 & 255] ^ SUB_MIX_32[s3 & 255] ^ keySchedule[ksRow++];
  14351. var t1 = SUB_MIX_02[s1 >>> 24] ^ SUB_MIX_12[s2 >>> 16 & 255] ^ SUB_MIX_22[s3 >>> 8 & 255] ^ SUB_MIX_32[s0 & 255] ^ keySchedule[ksRow++];
  14352. var t2 = SUB_MIX_02[s2 >>> 24] ^ SUB_MIX_12[s3 >>> 16 & 255] ^ SUB_MIX_22[s0 >>> 8 & 255] ^ SUB_MIX_32[s1 & 255] ^ keySchedule[ksRow++];
  14353. var t3 = SUB_MIX_02[s3 >>> 24] ^ SUB_MIX_12[s0 >>> 16 & 255] ^ SUB_MIX_22[s1 >>> 8 & 255] ^ SUB_MIX_32[s2 & 255] ^ keySchedule[ksRow++];
  14354. s0 = t0;
  14355. s1 = t1;
  14356. s2 = t2;
  14357. s3 = t3;
  14358. }
  14359. var t0 = (SBOX2[s0 >>> 24] << 24 | SBOX2[s1 >>> 16 & 255] << 16 | SBOX2[s2 >>> 8 & 255] << 8 | SBOX2[s3 & 255]) ^ keySchedule[ksRow++];
  14360. var t1 = (SBOX2[s1 >>> 24] << 24 | SBOX2[s2 >>> 16 & 255] << 16 | SBOX2[s3 >>> 8 & 255] << 8 | SBOX2[s0 & 255]) ^ keySchedule[ksRow++];
  14361. var t2 = (SBOX2[s2 >>> 24] << 24 | SBOX2[s3 >>> 16 & 255] << 16 | SBOX2[s0 >>> 8 & 255] << 8 | SBOX2[s1 & 255]) ^ keySchedule[ksRow++];
  14362. var t3 = (SBOX2[s3 >>> 24] << 24 | SBOX2[s0 >>> 16 & 255] << 16 | SBOX2[s1 >>> 8 & 255] << 8 | SBOX2[s2 & 255]) ^ keySchedule[ksRow++];
  14363. M[offset] = t0;
  14364. M[offset + 1] = t1;
  14365. M[offset + 2] = t2;
  14366. M[offset + 3] = t3;
  14367. },
  14368. keySize: 256 / 32
  14369. });
  14370. C.AES = BlockCipher._createHelper(AES);
  14371. })();
  14372. return CryptoJS.AES;
  14373. });
  14374. })(aes);
  14375. return aes.exports;
  14376. }
  14377. var tripledes = { exports: {} };
  14378. var hasRequiredTripledes;
  14379. function requireTripledes() {
  14380. if (hasRequiredTripledes)
  14381. return tripledes.exports;
  14382. hasRequiredTripledes = 1;
  14383. (function(module, exports) {
  14384. (function(root, factory, undef) {
  14385. {
  14386. module.exports = factory(requireCore(), requireEncBase64(), requireMd5(), requireEvpkdf(), requireCipherCore());
  14387. }
  14388. })(commonjsGlobal, function(CryptoJS) {
  14389. (function() {
  14390. var C = CryptoJS;
  14391. var C_lib = C.lib;
  14392. var WordArray = C_lib.WordArray;
  14393. var BlockCipher = C_lib.BlockCipher;
  14394. var C_algo = C.algo;
  14395. var PC1 = [
  14396. 57,
  14397. 49,
  14398. 41,
  14399. 33,
  14400. 25,
  14401. 17,
  14402. 9,
  14403. 1,
  14404. 58,
  14405. 50,
  14406. 42,
  14407. 34,
  14408. 26,
  14409. 18,
  14410. 10,
  14411. 2,
  14412. 59,
  14413. 51,
  14414. 43,
  14415. 35,
  14416. 27,
  14417. 19,
  14418. 11,
  14419. 3,
  14420. 60,
  14421. 52,
  14422. 44,
  14423. 36,
  14424. 63,
  14425. 55,
  14426. 47,
  14427. 39,
  14428. 31,
  14429. 23,
  14430. 15,
  14431. 7,
  14432. 62,
  14433. 54,
  14434. 46,
  14435. 38,
  14436. 30,
  14437. 22,
  14438. 14,
  14439. 6,
  14440. 61,
  14441. 53,
  14442. 45,
  14443. 37,
  14444. 29,
  14445. 21,
  14446. 13,
  14447. 5,
  14448. 28,
  14449. 20,
  14450. 12,
  14451. 4
  14452. ];
  14453. var PC2 = [
  14454. 14,
  14455. 17,
  14456. 11,
  14457. 24,
  14458. 1,
  14459. 5,
  14460. 3,
  14461. 28,
  14462. 15,
  14463. 6,
  14464. 21,
  14465. 10,
  14466. 23,
  14467. 19,
  14468. 12,
  14469. 4,
  14470. 26,
  14471. 8,
  14472. 16,
  14473. 7,
  14474. 27,
  14475. 20,
  14476. 13,
  14477. 2,
  14478. 41,
  14479. 52,
  14480. 31,
  14481. 37,
  14482. 47,
  14483. 55,
  14484. 30,
  14485. 40,
  14486. 51,
  14487. 45,
  14488. 33,
  14489. 48,
  14490. 44,
  14491. 49,
  14492. 39,
  14493. 56,
  14494. 34,
  14495. 53,
  14496. 46,
  14497. 42,
  14498. 50,
  14499. 36,
  14500. 29,
  14501. 32
  14502. ];
  14503. var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28];
  14504. var SBOX_P = [
  14505. {
  14506. 0: 8421888,
  14507. 268435456: 32768,
  14508. 536870912: 8421378,
  14509. 805306368: 2,
  14510. 1073741824: 512,
  14511. 1342177280: 8421890,
  14512. 1610612736: 8389122,
  14513. 1879048192: 8388608,
  14514. 2147483648: 514,
  14515. 2415919104: 8389120,
  14516. 2684354560: 33280,
  14517. 2952790016: 8421376,
  14518. 3221225472: 32770,
  14519. 3489660928: 8388610,
  14520. 3758096384: 0,
  14521. 4026531840: 33282,
  14522. 134217728: 0,
  14523. 402653184: 8421890,
  14524. 671088640: 33282,
  14525. 939524096: 32768,
  14526. 1207959552: 8421888,
  14527. 1476395008: 512,
  14528. 1744830464: 8421378,
  14529. 2013265920: 2,
  14530. 2281701376: 8389120,
  14531. 2550136832: 33280,
  14532. 2818572288: 8421376,
  14533. 3087007744: 8389122,
  14534. 3355443200: 8388610,
  14535. 3623878656: 32770,
  14536. 3892314112: 514,
  14537. 4160749568: 8388608,
  14538. 1: 32768,
  14539. 268435457: 2,
  14540. 536870913: 8421888,
  14541. 805306369: 8388608,
  14542. 1073741825: 8421378,
  14543. 1342177281: 33280,
  14544. 1610612737: 512,
  14545. 1879048193: 8389122,
  14546. 2147483649: 8421890,
  14547. 2415919105: 8421376,
  14548. 2684354561: 8388610,
  14549. 2952790017: 33282,
  14550. 3221225473: 514,
  14551. 3489660929: 8389120,
  14552. 3758096385: 32770,
  14553. 4026531841: 0,
  14554. 134217729: 8421890,
  14555. 402653185: 8421376,
  14556. 671088641: 8388608,
  14557. 939524097: 512,
  14558. 1207959553: 32768,
  14559. 1476395009: 8388610,
  14560. 1744830465: 2,
  14561. 2013265921: 33282,
  14562. 2281701377: 32770,
  14563. 2550136833: 8389122,
  14564. 2818572289: 514,
  14565. 3087007745: 8421888,
  14566. 3355443201: 8389120,
  14567. 3623878657: 0,
  14568. 3892314113: 33280,
  14569. 4160749569: 8421378
  14570. },
  14571. {
  14572. 0: 1074282512,
  14573. 16777216: 16384,
  14574. 33554432: 524288,
  14575. 50331648: 1074266128,
  14576. 67108864: 1073741840,
  14577. 83886080: 1074282496,
  14578. 100663296: 1073758208,
  14579. 117440512: 16,
  14580. 134217728: 540672,
  14581. 150994944: 1073758224,
  14582. 167772160: 1073741824,
  14583. 184549376: 540688,
  14584. 201326592: 524304,
  14585. 218103808: 0,
  14586. 234881024: 16400,
  14587. 251658240: 1074266112,
  14588. 8388608: 1073758208,
  14589. 25165824: 540688,
  14590. 41943040: 16,
  14591. 58720256: 1073758224,
  14592. 75497472: 1074282512,
  14593. 92274688: 1073741824,
  14594. 109051904: 524288,
  14595. 125829120: 1074266128,
  14596. 142606336: 524304,
  14597. 159383552: 0,
  14598. 176160768: 16384,
  14599. 192937984: 1074266112,
  14600. 209715200: 1073741840,
  14601. 226492416: 540672,
  14602. 243269632: 1074282496,
  14603. 260046848: 16400,
  14604. 268435456: 0,
  14605. 285212672: 1074266128,
  14606. 301989888: 1073758224,
  14607. 318767104: 1074282496,
  14608. 335544320: 1074266112,
  14609. 352321536: 16,
  14610. 369098752: 540688,
  14611. 385875968: 16384,
  14612. 402653184: 16400,
  14613. 419430400: 524288,
  14614. 436207616: 524304,
  14615. 452984832: 1073741840,
  14616. 469762048: 540672,
  14617. 486539264: 1073758208,
  14618. 503316480: 1073741824,
  14619. 520093696: 1074282512,
  14620. 276824064: 540688,
  14621. 293601280: 524288,
  14622. 310378496: 1074266112,
  14623. 327155712: 16384,
  14624. 343932928: 1073758208,
  14625. 360710144: 1074282512,
  14626. 377487360: 16,
  14627. 394264576: 1073741824,
  14628. 411041792: 1074282496,
  14629. 427819008: 1073741840,
  14630. 444596224: 1073758224,
  14631. 461373440: 524304,
  14632. 478150656: 0,
  14633. 494927872: 16400,
  14634. 511705088: 1074266128,
  14635. 528482304: 540672
  14636. },
  14637. {
  14638. 0: 260,
  14639. 1048576: 0,
  14640. 2097152: 67109120,
  14641. 3145728: 65796,
  14642. 4194304: 65540,
  14643. 5242880: 67108868,
  14644. 6291456: 67174660,
  14645. 7340032: 67174400,
  14646. 8388608: 67108864,
  14647. 9437184: 67174656,
  14648. 10485760: 65792,
  14649. 11534336: 67174404,
  14650. 12582912: 67109124,
  14651. 13631488: 65536,
  14652. 14680064: 4,
  14653. 15728640: 256,
  14654. 524288: 67174656,
  14655. 1572864: 67174404,
  14656. 2621440: 0,
  14657. 3670016: 67109120,
  14658. 4718592: 67108868,
  14659. 5767168: 65536,
  14660. 6815744: 65540,
  14661. 7864320: 260,
  14662. 8912896: 4,
  14663. 9961472: 256,
  14664. 11010048: 67174400,
  14665. 12058624: 65796,
  14666. 13107200: 65792,
  14667. 14155776: 67109124,
  14668. 15204352: 67174660,
  14669. 16252928: 67108864,
  14670. 16777216: 67174656,
  14671. 17825792: 65540,
  14672. 18874368: 65536,
  14673. 19922944: 67109120,
  14674. 20971520: 256,
  14675. 22020096: 67174660,
  14676. 23068672: 67108868,
  14677. 24117248: 0,
  14678. 25165824: 67109124,
  14679. 26214400: 67108864,
  14680. 27262976: 4,
  14681. 28311552: 65792,
  14682. 29360128: 67174400,
  14683. 30408704: 260,
  14684. 31457280: 65796,
  14685. 32505856: 67174404,
  14686. 17301504: 67108864,
  14687. 18350080: 260,
  14688. 19398656: 67174656,
  14689. 20447232: 0,
  14690. 21495808: 65540,
  14691. 22544384: 67109120,
  14692. 23592960: 256,
  14693. 24641536: 67174404,
  14694. 25690112: 65536,
  14695. 26738688: 67174660,
  14696. 27787264: 65796,
  14697. 28835840: 67108868,
  14698. 29884416: 67109124,
  14699. 30932992: 67174400,
  14700. 31981568: 4,
  14701. 33030144: 65792
  14702. },
  14703. {
  14704. 0: 2151682048,
  14705. 65536: 2147487808,
  14706. 131072: 4198464,
  14707. 196608: 2151677952,
  14708. 262144: 0,
  14709. 327680: 4198400,
  14710. 393216: 2147483712,
  14711. 458752: 4194368,
  14712. 524288: 2147483648,
  14713. 589824: 4194304,
  14714. 655360: 64,
  14715. 720896: 2147487744,
  14716. 786432: 2151678016,
  14717. 851968: 4160,
  14718. 917504: 4096,
  14719. 983040: 2151682112,
  14720. 32768: 2147487808,
  14721. 98304: 64,
  14722. 163840: 2151678016,
  14723. 229376: 2147487744,
  14724. 294912: 4198400,
  14725. 360448: 2151682112,
  14726. 425984: 0,
  14727. 491520: 2151677952,
  14728. 557056: 4096,
  14729. 622592: 2151682048,
  14730. 688128: 4194304,
  14731. 753664: 4160,
  14732. 819200: 2147483648,
  14733. 884736: 4194368,
  14734. 950272: 4198464,
  14735. 1015808: 2147483712,
  14736. 1048576: 4194368,
  14737. 1114112: 4198400,
  14738. 1179648: 2147483712,
  14739. 1245184: 0,
  14740. 1310720: 4160,
  14741. 1376256: 2151678016,
  14742. 1441792: 2151682048,
  14743. 1507328: 2147487808,
  14744. 1572864: 2151682112,
  14745. 1638400: 2147483648,
  14746. 1703936: 2151677952,
  14747. 1769472: 4198464,
  14748. 1835008: 2147487744,
  14749. 1900544: 4194304,
  14750. 1966080: 64,
  14751. 2031616: 4096,
  14752. 1081344: 2151677952,
  14753. 1146880: 2151682112,
  14754. 1212416: 0,
  14755. 1277952: 4198400,
  14756. 1343488: 4194368,
  14757. 1409024: 2147483648,
  14758. 1474560: 2147487808,
  14759. 1540096: 64,
  14760. 1605632: 2147483712,
  14761. 1671168: 4096,
  14762. 1736704: 2147487744,
  14763. 1802240: 2151678016,
  14764. 1867776: 4160,
  14765. 1933312: 2151682048,
  14766. 1998848: 4194304,
  14767. 2064384: 4198464
  14768. },
  14769. {
  14770. 0: 128,
  14771. 4096: 17039360,
  14772. 8192: 262144,
  14773. 12288: 536870912,
  14774. 16384: 537133184,
  14775. 20480: 16777344,
  14776. 24576: 553648256,
  14777. 28672: 262272,
  14778. 32768: 16777216,
  14779. 36864: 537133056,
  14780. 40960: 536871040,
  14781. 45056: 553910400,
  14782. 49152: 553910272,
  14783. 53248: 0,
  14784. 57344: 17039488,
  14785. 61440: 553648128,
  14786. 2048: 17039488,
  14787. 6144: 553648256,
  14788. 10240: 128,
  14789. 14336: 17039360,
  14790. 18432: 262144,
  14791. 22528: 537133184,
  14792. 26624: 553910272,
  14793. 30720: 536870912,
  14794. 34816: 537133056,
  14795. 38912: 0,
  14796. 43008: 553910400,
  14797. 47104: 16777344,
  14798. 51200: 536871040,
  14799. 55296: 553648128,
  14800. 59392: 16777216,
  14801. 63488: 262272,
  14802. 65536: 262144,
  14803. 69632: 128,
  14804. 73728: 536870912,
  14805. 77824: 553648256,
  14806. 81920: 16777344,
  14807. 86016: 553910272,
  14808. 90112: 537133184,
  14809. 94208: 16777216,
  14810. 98304: 553910400,
  14811. 102400: 553648128,
  14812. 106496: 17039360,
  14813. 110592: 537133056,
  14814. 114688: 262272,
  14815. 118784: 536871040,
  14816. 122880: 0,
  14817. 126976: 17039488,
  14818. 67584: 553648256,
  14819. 71680: 16777216,
  14820. 75776: 17039360,
  14821. 79872: 537133184,
  14822. 83968: 536870912,
  14823. 88064: 17039488,
  14824. 92160: 128,
  14825. 96256: 553910272,
  14826. 100352: 262272,
  14827. 104448: 553910400,
  14828. 108544: 0,
  14829. 112640: 553648128,
  14830. 116736: 16777344,
  14831. 120832: 262144,
  14832. 124928: 537133056,
  14833. 129024: 536871040
  14834. },
  14835. {
  14836. 0: 268435464,
  14837. 256: 8192,
  14838. 512: 270532608,
  14839. 768: 270540808,
  14840. 1024: 268443648,
  14841. 1280: 2097152,
  14842. 1536: 2097160,
  14843. 1792: 268435456,
  14844. 2048: 0,
  14845. 2304: 268443656,
  14846. 2560: 2105344,
  14847. 2816: 8,
  14848. 3072: 270532616,
  14849. 3328: 2105352,
  14850. 3584: 8200,
  14851. 3840: 270540800,
  14852. 128: 270532608,
  14853. 384: 270540808,
  14854. 640: 8,
  14855. 896: 2097152,
  14856. 1152: 2105352,
  14857. 1408: 268435464,
  14858. 1664: 268443648,
  14859. 1920: 8200,
  14860. 2176: 2097160,
  14861. 2432: 8192,
  14862. 2688: 268443656,
  14863. 2944: 270532616,
  14864. 3200: 0,
  14865. 3456: 270540800,
  14866. 3712: 2105344,
  14867. 3968: 268435456,
  14868. 4096: 268443648,
  14869. 4352: 270532616,
  14870. 4608: 270540808,
  14871. 4864: 8200,
  14872. 5120: 2097152,
  14873. 5376: 268435456,
  14874. 5632: 268435464,
  14875. 5888: 2105344,
  14876. 6144: 2105352,
  14877. 6400: 0,
  14878. 6656: 8,
  14879. 6912: 270532608,
  14880. 7168: 8192,
  14881. 7424: 268443656,
  14882. 7680: 270540800,
  14883. 7936: 2097160,
  14884. 4224: 8,
  14885. 4480: 2105344,
  14886. 4736: 2097152,
  14887. 4992: 268435464,
  14888. 5248: 268443648,
  14889. 5504: 8200,
  14890. 5760: 270540808,
  14891. 6016: 270532608,
  14892. 6272: 270540800,
  14893. 6528: 270532616,
  14894. 6784: 8192,
  14895. 7040: 2105352,
  14896. 7296: 2097160,
  14897. 7552: 0,
  14898. 7808: 268435456,
  14899. 8064: 268443656
  14900. },
  14901. {
  14902. 0: 1048576,
  14903. 16: 33555457,
  14904. 32: 1024,
  14905. 48: 1049601,
  14906. 64: 34604033,
  14907. 80: 0,
  14908. 96: 1,
  14909. 112: 34603009,
  14910. 128: 33555456,
  14911. 144: 1048577,
  14912. 160: 33554433,
  14913. 176: 34604032,
  14914. 192: 34603008,
  14915. 208: 1025,
  14916. 224: 1049600,
  14917. 240: 33554432,
  14918. 8: 34603009,
  14919. 24: 0,
  14920. 40: 33555457,
  14921. 56: 34604032,
  14922. 72: 1048576,
  14923. 88: 33554433,
  14924. 104: 33554432,
  14925. 120: 1025,
  14926. 136: 1049601,
  14927. 152: 33555456,
  14928. 168: 34603008,
  14929. 184: 1048577,
  14930. 200: 1024,
  14931. 216: 34604033,
  14932. 232: 1,
  14933. 248: 1049600,
  14934. 256: 33554432,
  14935. 272: 1048576,
  14936. 288: 33555457,
  14937. 304: 34603009,
  14938. 320: 1048577,
  14939. 336: 33555456,
  14940. 352: 34604032,
  14941. 368: 1049601,
  14942. 384: 1025,
  14943. 400: 34604033,
  14944. 416: 1049600,
  14945. 432: 1,
  14946. 448: 0,
  14947. 464: 34603008,
  14948. 480: 33554433,
  14949. 496: 1024,
  14950. 264: 1049600,
  14951. 280: 33555457,
  14952. 296: 34603009,
  14953. 312: 1,
  14954. 328: 33554432,
  14955. 344: 1048576,
  14956. 360: 1025,
  14957. 376: 34604032,
  14958. 392: 33554433,
  14959. 408: 34603008,
  14960. 424: 0,
  14961. 440: 34604033,
  14962. 456: 1049601,
  14963. 472: 1024,
  14964. 488: 33555456,
  14965. 504: 1048577
  14966. },
  14967. {
  14968. 0: 134219808,
  14969. 1: 131072,
  14970. 2: 134217728,
  14971. 3: 32,
  14972. 4: 131104,
  14973. 5: 134350880,
  14974. 6: 134350848,
  14975. 7: 2048,
  14976. 8: 134348800,
  14977. 9: 134219776,
  14978. 10: 133120,
  14979. 11: 134348832,
  14980. 12: 2080,
  14981. 13: 0,
  14982. 14: 134217760,
  14983. 15: 133152,
  14984. 2147483648: 2048,
  14985. 2147483649: 134350880,
  14986. 2147483650: 134219808,
  14987. 2147483651: 134217728,
  14988. 2147483652: 134348800,
  14989. 2147483653: 133120,
  14990. 2147483654: 133152,
  14991. 2147483655: 32,
  14992. 2147483656: 134217760,
  14993. 2147483657: 2080,
  14994. 2147483658: 131104,
  14995. 2147483659: 134350848,
  14996. 2147483660: 0,
  14997. 2147483661: 134348832,
  14998. 2147483662: 134219776,
  14999. 2147483663: 131072,
  15000. 16: 133152,
  15001. 17: 134350848,
  15002. 18: 32,
  15003. 19: 2048,
  15004. 20: 134219776,
  15005. 21: 134217760,
  15006. 22: 134348832,
  15007. 23: 131072,
  15008. 24: 0,
  15009. 25: 131104,
  15010. 26: 134348800,
  15011. 27: 134219808,
  15012. 28: 134350880,
  15013. 29: 133120,
  15014. 30: 2080,
  15015. 31: 134217728,
  15016. 2147483664: 131072,
  15017. 2147483665: 2048,
  15018. 2147483666: 134348832,
  15019. 2147483667: 133152,
  15020. 2147483668: 32,
  15021. 2147483669: 134348800,
  15022. 2147483670: 134217728,
  15023. 2147483671: 134219808,
  15024. 2147483672: 134350880,
  15025. 2147483673: 134217760,
  15026. 2147483674: 134219776,
  15027. 2147483675: 0,
  15028. 2147483676: 133120,
  15029. 2147483677: 2080,
  15030. 2147483678: 131104,
  15031. 2147483679: 134350848
  15032. }
  15033. ];
  15034. var SBOX_MASK = [
  15035. 4160749569,
  15036. 528482304,
  15037. 33030144,
  15038. 2064384,
  15039. 129024,
  15040. 8064,
  15041. 504,
  15042. 2147483679
  15043. ];
  15044. var DES = C_algo.DES = BlockCipher.extend({
  15045. _doReset: function() {
  15046. var key = this._key;
  15047. var keyWords = key.words;
  15048. var keyBits = [];
  15049. for (var i = 0; i < 56; i++) {
  15050. var keyBitPos = PC1[i] - 1;
  15051. keyBits[i] = keyWords[keyBitPos >>> 5] >>> 31 - keyBitPos % 32 & 1;
  15052. }
  15053. var subKeys = this._subKeys = [];
  15054. for (var nSubKey = 0; nSubKey < 16; nSubKey++) {
  15055. var subKey = subKeys[nSubKey] = [];
  15056. var bitShift = BIT_SHIFTS[nSubKey];
  15057. for (var i = 0; i < 24; i++) {
  15058. subKey[i / 6 | 0] |= keyBits[(PC2[i] - 1 + bitShift) % 28] << 31 - i % 6;
  15059. subKey[4 + (i / 6 | 0)] |= keyBits[28 + (PC2[i + 24] - 1 + bitShift) % 28] << 31 - i % 6;
  15060. }
  15061. subKey[0] = subKey[0] << 1 | subKey[0] >>> 31;
  15062. for (var i = 1; i < 7; i++) {
  15063. subKey[i] = subKey[i] >>> (i - 1) * 4 + 3;
  15064. }
  15065. subKey[7] = subKey[7] << 5 | subKey[7] >>> 27;
  15066. }
  15067. var invSubKeys = this._invSubKeys = [];
  15068. for (var i = 0; i < 16; i++) {
  15069. invSubKeys[i] = subKeys[15 - i];
  15070. }
  15071. },
  15072. encryptBlock: function(M, offset) {
  15073. this._doCryptBlock(M, offset, this._subKeys);
  15074. },
  15075. decryptBlock: function(M, offset) {
  15076. this._doCryptBlock(M, offset, this._invSubKeys);
  15077. },
  15078. _doCryptBlock: function(M, offset, subKeys) {
  15079. this._lBlock = M[offset];
  15080. this._rBlock = M[offset + 1];
  15081. exchangeLR.call(this, 4, 252645135);
  15082. exchangeLR.call(this, 16, 65535);
  15083. exchangeRL.call(this, 2, 858993459);
  15084. exchangeRL.call(this, 8, 16711935);
  15085. exchangeLR.call(this, 1, 1431655765);
  15086. for (var round = 0; round < 16; round++) {
  15087. var subKey = subKeys[round];
  15088. var lBlock = this._lBlock;
  15089. var rBlock = this._rBlock;
  15090. var f = 0;
  15091. for (var i = 0; i < 8; i++) {
  15092. f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0];
  15093. }
  15094. this._lBlock = rBlock;
  15095. this._rBlock = lBlock ^ f;
  15096. }
  15097. var t = this._lBlock;
  15098. this._lBlock = this._rBlock;
  15099. this._rBlock = t;
  15100. exchangeLR.call(this, 1, 1431655765);
  15101. exchangeRL.call(this, 8, 16711935);
  15102. exchangeRL.call(this, 2, 858993459);
  15103. exchangeLR.call(this, 16, 65535);
  15104. exchangeLR.call(this, 4, 252645135);
  15105. M[offset] = this._lBlock;
  15106. M[offset + 1] = this._rBlock;
  15107. },
  15108. keySize: 64 / 32,
  15109. ivSize: 64 / 32,
  15110. blockSize: 64 / 32
  15111. });
  15112. function exchangeLR(offset, mask) {
  15113. var t = (this._lBlock >>> offset ^ this._rBlock) & mask;
  15114. this._rBlock ^= t;
  15115. this._lBlock ^= t << offset;
  15116. }
  15117. function exchangeRL(offset, mask) {
  15118. var t = (this._rBlock >>> offset ^ this._lBlock) & mask;
  15119. this._lBlock ^= t;
  15120. this._rBlock ^= t << offset;
  15121. }
  15122. C.DES = BlockCipher._createHelper(DES);
  15123. var TripleDES = C_algo.TripleDES = BlockCipher.extend({
  15124. _doReset: function() {
  15125. var key = this._key;
  15126. var keyWords = key.words;
  15127. if (keyWords.length !== 2 && keyWords.length !== 4 && keyWords.length < 6) {
  15128. throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");
  15129. }
  15130. var key1 = keyWords.slice(0, 2);
  15131. var key2 = keyWords.length < 4 ? keyWords.slice(0, 2) : keyWords.slice(2, 4);
  15132. var key3 = keyWords.length < 6 ? keyWords.slice(0, 2) : keyWords.slice(4, 6);
  15133. this._des1 = DES.createEncryptor(WordArray.create(key1));
  15134. this._des2 = DES.createEncryptor(WordArray.create(key2));
  15135. this._des3 = DES.createEncryptor(WordArray.create(key3));
  15136. },
  15137. encryptBlock: function(M, offset) {
  15138. this._des1.encryptBlock(M, offset);
  15139. this._des2.decryptBlock(M, offset);
  15140. this._des3.encryptBlock(M, offset);
  15141. },
  15142. decryptBlock: function(M, offset) {
  15143. this._des3.decryptBlock(M, offset);
  15144. this._des2.encryptBlock(M, offset);
  15145. this._des1.decryptBlock(M, offset);
  15146. },
  15147. keySize: 192 / 32,
  15148. ivSize: 64 / 32,
  15149. blockSize: 64 / 32
  15150. });
  15151. C.TripleDES = BlockCipher._createHelper(TripleDES);
  15152. })();
  15153. return CryptoJS.TripleDES;
  15154. });
  15155. })(tripledes);
  15156. return tripledes.exports;
  15157. }
  15158. var rc4 = { exports: {} };
  15159. var hasRequiredRc4;
  15160. function requireRc4() {
  15161. if (hasRequiredRc4)
  15162. return rc4.exports;
  15163. hasRequiredRc4 = 1;
  15164. (function(module, exports) {
  15165. (function(root, factory, undef) {
  15166. {
  15167. module.exports = factory(requireCore(), requireEncBase64(), requireMd5(), requireEvpkdf(), requireCipherCore());
  15168. }
  15169. })(commonjsGlobal, function(CryptoJS) {
  15170. (function() {
  15171. var C = CryptoJS;
  15172. var C_lib = C.lib;
  15173. var StreamCipher = C_lib.StreamCipher;
  15174. var C_algo = C.algo;
  15175. var RC4 = C_algo.RC4 = StreamCipher.extend({
  15176. _doReset: function() {
  15177. var key = this._key;
  15178. var keyWords = key.words;
  15179. var keySigBytes = key.sigBytes;
  15180. var S = this._S = [];
  15181. for (var i = 0; i < 256; i++) {
  15182. S[i] = i;
  15183. }
  15184. for (var i = 0, j = 0; i < 256; i++) {
  15185. var keyByteIndex = i % keySigBytes;
  15186. var keyByte = keyWords[keyByteIndex >>> 2] >>> 24 - keyByteIndex % 4 * 8 & 255;
  15187. j = (j + S[i] + keyByte) % 256;
  15188. var t = S[i];
  15189. S[i] = S[j];
  15190. S[j] = t;
  15191. }
  15192. this._i = this._j = 0;
  15193. },
  15194. _doProcessBlock: function(M, offset) {
  15195. M[offset] ^= generateKeystreamWord.call(this);
  15196. },
  15197. keySize: 256 / 32,
  15198. ivSize: 0
  15199. });
  15200. function generateKeystreamWord() {
  15201. var S = this._S;
  15202. var i = this._i;
  15203. var j = this._j;
  15204. var keystreamWord = 0;
  15205. for (var n = 0; n < 4; n++) {
  15206. i = (i + 1) % 256;
  15207. j = (j + S[i]) % 256;
  15208. var t = S[i];
  15209. S[i] = S[j];
  15210. S[j] = t;
  15211. keystreamWord |= S[(S[i] + S[j]) % 256] << 24 - n * 8;
  15212. }
  15213. this._i = i;
  15214. this._j = j;
  15215. return keystreamWord;
  15216. }
  15217. C.RC4 = StreamCipher._createHelper(RC4);
  15218. var RC4Drop = C_algo.RC4Drop = RC4.extend({
  15219. /**
  15220. * Configuration options.
  15221. *
  15222. * @property {number} drop The number of keystream words to drop. Default 192
  15223. */
  15224. cfg: RC4.cfg.extend({
  15225. drop: 192
  15226. }),
  15227. _doReset: function() {
  15228. RC4._doReset.call(this);
  15229. for (var i = this.cfg.drop; i > 0; i--) {
  15230. generateKeystreamWord.call(this);
  15231. }
  15232. }
  15233. });
  15234. C.RC4Drop = StreamCipher._createHelper(RC4Drop);
  15235. })();
  15236. return CryptoJS.RC4;
  15237. });
  15238. })(rc4);
  15239. return rc4.exports;
  15240. }
  15241. var rabbit = { exports: {} };
  15242. var hasRequiredRabbit;
  15243. function requireRabbit() {
  15244. if (hasRequiredRabbit)
  15245. return rabbit.exports;
  15246. hasRequiredRabbit = 1;
  15247. (function(module, exports) {
  15248. (function(root, factory, undef) {
  15249. {
  15250. module.exports = factory(requireCore(), requireEncBase64(), requireMd5(), requireEvpkdf(), requireCipherCore());
  15251. }
  15252. })(commonjsGlobal, function(CryptoJS) {
  15253. (function() {
  15254. var C = CryptoJS;
  15255. var C_lib = C.lib;
  15256. var StreamCipher = C_lib.StreamCipher;
  15257. var C_algo = C.algo;
  15258. var S = [];
  15259. var C_ = [];
  15260. var G = [];
  15261. var Rabbit = C_algo.Rabbit = StreamCipher.extend({
  15262. _doReset: function() {
  15263. var K = this._key.words;
  15264. var iv = this.cfg.iv;
  15265. for (var i = 0; i < 4; i++) {
  15266. K[i] = (K[i] << 8 | K[i] >>> 24) & 16711935 | (K[i] << 24 | K[i] >>> 8) & 4278255360;
  15267. }
  15268. var X = this._X = [
  15269. K[0],
  15270. K[3] << 16 | K[2] >>> 16,
  15271. K[1],
  15272. K[0] << 16 | K[3] >>> 16,
  15273. K[2],
  15274. K[1] << 16 | K[0] >>> 16,
  15275. K[3],
  15276. K[2] << 16 | K[1] >>> 16
  15277. ];
  15278. var C2 = this._C = [
  15279. K[2] << 16 | K[2] >>> 16,
  15280. K[0] & 4294901760 | K[1] & 65535,
  15281. K[3] << 16 | K[3] >>> 16,
  15282. K[1] & 4294901760 | K[2] & 65535,
  15283. K[0] << 16 | K[0] >>> 16,
  15284. K[2] & 4294901760 | K[3] & 65535,
  15285. K[1] << 16 | K[1] >>> 16,
  15286. K[3] & 4294901760 | K[0] & 65535
  15287. ];
  15288. this._b = 0;
  15289. for (var i = 0; i < 4; i++) {
  15290. nextState.call(this);
  15291. }
  15292. for (var i = 0; i < 8; i++) {
  15293. C2[i] ^= X[i + 4 & 7];
  15294. }
  15295. if (iv) {
  15296. var IV = iv.words;
  15297. var IV_0 = IV[0];
  15298. var IV_1 = IV[1];
  15299. var i0 = (IV_0 << 8 | IV_0 >>> 24) & 16711935 | (IV_0 << 24 | IV_0 >>> 8) & 4278255360;
  15300. var i2 = (IV_1 << 8 | IV_1 >>> 24) & 16711935 | (IV_1 << 24 | IV_1 >>> 8) & 4278255360;
  15301. var i1 = i0 >>> 16 | i2 & 4294901760;
  15302. var i3 = i2 << 16 | i0 & 65535;
  15303. C2[0] ^= i0;
  15304. C2[1] ^= i1;
  15305. C2[2] ^= i2;
  15306. C2[3] ^= i3;
  15307. C2[4] ^= i0;
  15308. C2[5] ^= i1;
  15309. C2[6] ^= i2;
  15310. C2[7] ^= i3;
  15311. for (var i = 0; i < 4; i++) {
  15312. nextState.call(this);
  15313. }
  15314. }
  15315. },
  15316. _doProcessBlock: function(M, offset) {
  15317. var X = this._X;
  15318. nextState.call(this);
  15319. S[0] = X[0] ^ X[5] >>> 16 ^ X[3] << 16;
  15320. S[1] = X[2] ^ X[7] >>> 16 ^ X[5] << 16;
  15321. S[2] = X[4] ^ X[1] >>> 16 ^ X[7] << 16;
  15322. S[3] = X[6] ^ X[3] >>> 16 ^ X[1] << 16;
  15323. for (var i = 0; i < 4; i++) {
  15324. S[i] = (S[i] << 8 | S[i] >>> 24) & 16711935 | (S[i] << 24 | S[i] >>> 8) & 4278255360;
  15325. M[offset + i] ^= S[i];
  15326. }
  15327. },
  15328. blockSize: 128 / 32,
  15329. ivSize: 64 / 32
  15330. });
  15331. function nextState() {
  15332. var X = this._X;
  15333. var C2 = this._C;
  15334. for (var i = 0; i < 8; i++) {
  15335. C_[i] = C2[i];
  15336. }
  15337. C2[0] = C2[0] + 1295307597 + this._b | 0;
  15338. C2[1] = C2[1] + 3545052371 + (C2[0] >>> 0 < C_[0] >>> 0 ? 1 : 0) | 0;
  15339. C2[2] = C2[2] + 886263092 + (C2[1] >>> 0 < C_[1] >>> 0 ? 1 : 0) | 0;
  15340. C2[3] = C2[3] + 1295307597 + (C2[2] >>> 0 < C_[2] >>> 0 ? 1 : 0) | 0;
  15341. C2[4] = C2[4] + 3545052371 + (C2[3] >>> 0 < C_[3] >>> 0 ? 1 : 0) | 0;
  15342. C2[5] = C2[5] + 886263092 + (C2[4] >>> 0 < C_[4] >>> 0 ? 1 : 0) | 0;
  15343. C2[6] = C2[6] + 1295307597 + (C2[5] >>> 0 < C_[5] >>> 0 ? 1 : 0) | 0;
  15344. C2[7] = C2[7] + 3545052371 + (C2[6] >>> 0 < C_[6] >>> 0 ? 1 : 0) | 0;
  15345. this._b = C2[7] >>> 0 < C_[7] >>> 0 ? 1 : 0;
  15346. for (var i = 0; i < 8; i++) {
  15347. var gx = X[i] + C2[i];
  15348. var ga = gx & 65535;
  15349. var gb = gx >>> 16;
  15350. var gh = ((ga * ga >>> 17) + ga * gb >>> 15) + gb * gb;
  15351. var gl = ((gx & 4294901760) * gx | 0) + ((gx & 65535) * gx | 0);
  15352. G[i] = gh ^ gl;
  15353. }
  15354. X[0] = G[0] + (G[7] << 16 | G[7] >>> 16) + (G[6] << 16 | G[6] >>> 16) | 0;
  15355. X[1] = G[1] + (G[0] << 8 | G[0] >>> 24) + G[7] | 0;
  15356. X[2] = G[2] + (G[1] << 16 | G[1] >>> 16) + (G[0] << 16 | G[0] >>> 16) | 0;
  15357. X[3] = G[3] + (G[2] << 8 | G[2] >>> 24) + G[1] | 0;
  15358. X[4] = G[4] + (G[3] << 16 | G[3] >>> 16) + (G[2] << 16 | G[2] >>> 16) | 0;
  15359. X[5] = G[5] + (G[4] << 8 | G[4] >>> 24) + G[3] | 0;
  15360. X[6] = G[6] + (G[5] << 16 | G[5] >>> 16) + (G[4] << 16 | G[4] >>> 16) | 0;
  15361. X[7] = G[7] + (G[6] << 8 | G[6] >>> 24) + G[5] | 0;
  15362. }
  15363. C.Rabbit = StreamCipher._createHelper(Rabbit);
  15364. })();
  15365. return CryptoJS.Rabbit;
  15366. });
  15367. })(rabbit);
  15368. return rabbit.exports;
  15369. }
  15370. var rabbitLegacy = { exports: {} };
  15371. var hasRequiredRabbitLegacy;
  15372. function requireRabbitLegacy() {
  15373. if (hasRequiredRabbitLegacy)
  15374. return rabbitLegacy.exports;
  15375. hasRequiredRabbitLegacy = 1;
  15376. (function(module, exports) {
  15377. (function(root, factory, undef) {
  15378. {
  15379. module.exports = factory(requireCore(), requireEncBase64(), requireMd5(), requireEvpkdf(), requireCipherCore());
  15380. }
  15381. })(commonjsGlobal, function(CryptoJS) {
  15382. (function() {
  15383. var C = CryptoJS;
  15384. var C_lib = C.lib;
  15385. var StreamCipher = C_lib.StreamCipher;
  15386. var C_algo = C.algo;
  15387. var S = [];
  15388. var C_ = [];
  15389. var G = [];
  15390. var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({
  15391. _doReset: function() {
  15392. var K = this._key.words;
  15393. var iv = this.cfg.iv;
  15394. var X = this._X = [
  15395. K[0],
  15396. K[3] << 16 | K[2] >>> 16,
  15397. K[1],
  15398. K[0] << 16 | K[3] >>> 16,
  15399. K[2],
  15400. K[1] << 16 | K[0] >>> 16,
  15401. K[3],
  15402. K[2] << 16 | K[1] >>> 16
  15403. ];
  15404. var C2 = this._C = [
  15405. K[2] << 16 | K[2] >>> 16,
  15406. K[0] & 4294901760 | K[1] & 65535,
  15407. K[3] << 16 | K[3] >>> 16,
  15408. K[1] & 4294901760 | K[2] & 65535,
  15409. K[0] << 16 | K[0] >>> 16,
  15410. K[2] & 4294901760 | K[3] & 65535,
  15411. K[1] << 16 | K[1] >>> 16,
  15412. K[3] & 4294901760 | K[0] & 65535
  15413. ];
  15414. this._b = 0;
  15415. for (var i = 0; i < 4; i++) {
  15416. nextState.call(this);
  15417. }
  15418. for (var i = 0; i < 8; i++) {
  15419. C2[i] ^= X[i + 4 & 7];
  15420. }
  15421. if (iv) {
  15422. var IV = iv.words;
  15423. var IV_0 = IV[0];
  15424. var IV_1 = IV[1];
  15425. var i0 = (IV_0 << 8 | IV_0 >>> 24) & 16711935 | (IV_0 << 24 | IV_0 >>> 8) & 4278255360;
  15426. var i2 = (IV_1 << 8 | IV_1 >>> 24) & 16711935 | (IV_1 << 24 | IV_1 >>> 8) & 4278255360;
  15427. var i1 = i0 >>> 16 | i2 & 4294901760;
  15428. var i3 = i2 << 16 | i0 & 65535;
  15429. C2[0] ^= i0;
  15430. C2[1] ^= i1;
  15431. C2[2] ^= i2;
  15432. C2[3] ^= i3;
  15433. C2[4] ^= i0;
  15434. C2[5] ^= i1;
  15435. C2[6] ^= i2;
  15436. C2[7] ^= i3;
  15437. for (var i = 0; i < 4; i++) {
  15438. nextState.call(this);
  15439. }
  15440. }
  15441. },
  15442. _doProcessBlock: function(M, offset) {
  15443. var X = this._X;
  15444. nextState.call(this);
  15445. S[0] = X[0] ^ X[5] >>> 16 ^ X[3] << 16;
  15446. S[1] = X[2] ^ X[7] >>> 16 ^ X[5] << 16;
  15447. S[2] = X[4] ^ X[1] >>> 16 ^ X[7] << 16;
  15448. S[3] = X[6] ^ X[3] >>> 16 ^ X[1] << 16;
  15449. for (var i = 0; i < 4; i++) {
  15450. S[i] = (S[i] << 8 | S[i] >>> 24) & 16711935 | (S[i] << 24 | S[i] >>> 8) & 4278255360;
  15451. M[offset + i] ^= S[i];
  15452. }
  15453. },
  15454. blockSize: 128 / 32,
  15455. ivSize: 64 / 32
  15456. });
  15457. function nextState() {
  15458. var X = this._X;
  15459. var C2 = this._C;
  15460. for (var i = 0; i < 8; i++) {
  15461. C_[i] = C2[i];
  15462. }
  15463. C2[0] = C2[0] + 1295307597 + this._b | 0;
  15464. C2[1] = C2[1] + 3545052371 + (C2[0] >>> 0 < C_[0] >>> 0 ? 1 : 0) | 0;
  15465. C2[2] = C2[2] + 886263092 + (C2[1] >>> 0 < C_[1] >>> 0 ? 1 : 0) | 0;
  15466. C2[3] = C2[3] + 1295307597 + (C2[2] >>> 0 < C_[2] >>> 0 ? 1 : 0) | 0;
  15467. C2[4] = C2[4] + 3545052371 + (C2[3] >>> 0 < C_[3] >>> 0 ? 1 : 0) | 0;
  15468. C2[5] = C2[5] + 886263092 + (C2[4] >>> 0 < C_[4] >>> 0 ? 1 : 0) | 0;
  15469. C2[6] = C2[6] + 1295307597 + (C2[5] >>> 0 < C_[5] >>> 0 ? 1 : 0) | 0;
  15470. C2[7] = C2[7] + 3545052371 + (C2[6] >>> 0 < C_[6] >>> 0 ? 1 : 0) | 0;
  15471. this._b = C2[7] >>> 0 < C_[7] >>> 0 ? 1 : 0;
  15472. for (var i = 0; i < 8; i++) {
  15473. var gx = X[i] + C2[i];
  15474. var ga = gx & 65535;
  15475. var gb = gx >>> 16;
  15476. var gh = ((ga * ga >>> 17) + ga * gb >>> 15) + gb * gb;
  15477. var gl = ((gx & 4294901760) * gx | 0) + ((gx & 65535) * gx | 0);
  15478. G[i] = gh ^ gl;
  15479. }
  15480. X[0] = G[0] + (G[7] << 16 | G[7] >>> 16) + (G[6] << 16 | G[6] >>> 16) | 0;
  15481. X[1] = G[1] + (G[0] << 8 | G[0] >>> 24) + G[7] | 0;
  15482. X[2] = G[2] + (G[1] << 16 | G[1] >>> 16) + (G[0] << 16 | G[0] >>> 16) | 0;
  15483. X[3] = G[3] + (G[2] << 8 | G[2] >>> 24) + G[1] | 0;
  15484. X[4] = G[4] + (G[3] << 16 | G[3] >>> 16) + (G[2] << 16 | G[2] >>> 16) | 0;
  15485. X[5] = G[5] + (G[4] << 8 | G[4] >>> 24) + G[3] | 0;
  15486. X[6] = G[6] + (G[5] << 16 | G[5] >>> 16) + (G[4] << 16 | G[4] >>> 16) | 0;
  15487. X[7] = G[7] + (G[6] << 8 | G[6] >>> 24) + G[5] | 0;
  15488. }
  15489. C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy);
  15490. })();
  15491. return CryptoJS.RabbitLegacy;
  15492. });
  15493. })(rabbitLegacy);
  15494. return rabbitLegacy.exports;
  15495. }
  15496. var blowfish = { exports: {} };
  15497. var hasRequiredBlowfish;
  15498. function requireBlowfish() {
  15499. if (hasRequiredBlowfish)
  15500. return blowfish.exports;
  15501. hasRequiredBlowfish = 1;
  15502. (function(module, exports) {
  15503. (function(root, factory, undef) {
  15504. {
  15505. module.exports = factory(requireCore(), requireEncBase64(), requireMd5(), requireEvpkdf(), requireCipherCore());
  15506. }
  15507. })(commonjsGlobal, function(CryptoJS) {
  15508. (function() {
  15509. var C = CryptoJS;
  15510. var C_lib = C.lib;
  15511. var BlockCipher = C_lib.BlockCipher;
  15512. var C_algo = C.algo;
  15513. const N = 16;
  15514. const ORIG_P = [
  15515. 608135816,
  15516. 2242054355,
  15517. 320440878,
  15518. 57701188,
  15519. 2752067618,
  15520. 698298832,
  15521. 137296536,
  15522. 3964562569,
  15523. 1160258022,
  15524. 953160567,
  15525. 3193202383,
  15526. 887688300,
  15527. 3232508343,
  15528. 3380367581,
  15529. 1065670069,
  15530. 3041331479,
  15531. 2450970073,
  15532. 2306472731
  15533. ];
  15534. const ORIG_S = [
  15535. [
  15536. 3509652390,
  15537. 2564797868,
  15538. 805139163,
  15539. 3491422135,
  15540. 3101798381,
  15541. 1780907670,
  15542. 3128725573,
  15543. 4046225305,
  15544. 614570311,
  15545. 3012652279,
  15546. 134345442,
  15547. 2240740374,
  15548. 1667834072,
  15549. 1901547113,
  15550. 2757295779,
  15551. 4103290238,
  15552. 227898511,
  15553. 1921955416,
  15554. 1904987480,
  15555. 2182433518,
  15556. 2069144605,
  15557. 3260701109,
  15558. 2620446009,
  15559. 720527379,
  15560. 3318853667,
  15561. 677414384,
  15562. 3393288472,
  15563. 3101374703,
  15564. 2390351024,
  15565. 1614419982,
  15566. 1822297739,
  15567. 2954791486,
  15568. 3608508353,
  15569. 3174124327,
  15570. 2024746970,
  15571. 1432378464,
  15572. 3864339955,
  15573. 2857741204,
  15574. 1464375394,
  15575. 1676153920,
  15576. 1439316330,
  15577. 715854006,
  15578. 3033291828,
  15579. 289532110,
  15580. 2706671279,
  15581. 2087905683,
  15582. 3018724369,
  15583. 1668267050,
  15584. 732546397,
  15585. 1947742710,
  15586. 3462151702,
  15587. 2609353502,
  15588. 2950085171,
  15589. 1814351708,
  15590. 2050118529,
  15591. 680887927,
  15592. 999245976,
  15593. 1800124847,
  15594. 3300911131,
  15595. 1713906067,
  15596. 1641548236,
  15597. 4213287313,
  15598. 1216130144,
  15599. 1575780402,
  15600. 4018429277,
  15601. 3917837745,
  15602. 3693486850,
  15603. 3949271944,
  15604. 596196993,
  15605. 3549867205,
  15606. 258830323,
  15607. 2213823033,
  15608. 772490370,
  15609. 2760122372,
  15610. 1774776394,
  15611. 2652871518,
  15612. 566650946,
  15613. 4142492826,
  15614. 1728879713,
  15615. 2882767088,
  15616. 1783734482,
  15617. 3629395816,
  15618. 2517608232,
  15619. 2874225571,
  15620. 1861159788,
  15621. 326777828,
  15622. 3124490320,
  15623. 2130389656,
  15624. 2716951837,
  15625. 967770486,
  15626. 1724537150,
  15627. 2185432712,
  15628. 2364442137,
  15629. 1164943284,
  15630. 2105845187,
  15631. 998989502,
  15632. 3765401048,
  15633. 2244026483,
  15634. 1075463327,
  15635. 1455516326,
  15636. 1322494562,
  15637. 910128902,
  15638. 469688178,
  15639. 1117454909,
  15640. 936433444,
  15641. 3490320968,
  15642. 3675253459,
  15643. 1240580251,
  15644. 122909385,
  15645. 2157517691,
  15646. 634681816,
  15647. 4142456567,
  15648. 3825094682,
  15649. 3061402683,
  15650. 2540495037,
  15651. 79693498,
  15652. 3249098678,
  15653. 1084186820,
  15654. 1583128258,
  15655. 426386531,
  15656. 1761308591,
  15657. 1047286709,
  15658. 322548459,
  15659. 995290223,
  15660. 1845252383,
  15661. 2603652396,
  15662. 3431023940,
  15663. 2942221577,
  15664. 3202600964,
  15665. 3727903485,
  15666. 1712269319,
  15667. 422464435,
  15668. 3234572375,
  15669. 1170764815,
  15670. 3523960633,
  15671. 3117677531,
  15672. 1434042557,
  15673. 442511882,
  15674. 3600875718,
  15675. 1076654713,
  15676. 1738483198,
  15677. 4213154764,
  15678. 2393238008,
  15679. 3677496056,
  15680. 1014306527,
  15681. 4251020053,
  15682. 793779912,
  15683. 2902807211,
  15684. 842905082,
  15685. 4246964064,
  15686. 1395751752,
  15687. 1040244610,
  15688. 2656851899,
  15689. 3396308128,
  15690. 445077038,
  15691. 3742853595,
  15692. 3577915638,
  15693. 679411651,
  15694. 2892444358,
  15695. 2354009459,
  15696. 1767581616,
  15697. 3150600392,
  15698. 3791627101,
  15699. 3102740896,
  15700. 284835224,
  15701. 4246832056,
  15702. 1258075500,
  15703. 768725851,
  15704. 2589189241,
  15705. 3069724005,
  15706. 3532540348,
  15707. 1274779536,
  15708. 3789419226,
  15709. 2764799539,
  15710. 1660621633,
  15711. 3471099624,
  15712. 4011903706,
  15713. 913787905,
  15714. 3497959166,
  15715. 737222580,
  15716. 2514213453,
  15717. 2928710040,
  15718. 3937242737,
  15719. 1804850592,
  15720. 3499020752,
  15721. 2949064160,
  15722. 2386320175,
  15723. 2390070455,
  15724. 2415321851,
  15725. 4061277028,
  15726. 2290661394,
  15727. 2416832540,
  15728. 1336762016,
  15729. 1754252060,
  15730. 3520065937,
  15731. 3014181293,
  15732. 791618072,
  15733. 3188594551,
  15734. 3933548030,
  15735. 2332172193,
  15736. 3852520463,
  15737. 3043980520,
  15738. 413987798,
  15739. 3465142937,
  15740. 3030929376,
  15741. 4245938359,
  15742. 2093235073,
  15743. 3534596313,
  15744. 375366246,
  15745. 2157278981,
  15746. 2479649556,
  15747. 555357303,
  15748. 3870105701,
  15749. 2008414854,
  15750. 3344188149,
  15751. 4221384143,
  15752. 3956125452,
  15753. 2067696032,
  15754. 3594591187,
  15755. 2921233993,
  15756. 2428461,
  15757. 544322398,
  15758. 577241275,
  15759. 1471733935,
  15760. 610547355,
  15761. 4027169054,
  15762. 1432588573,
  15763. 1507829418,
  15764. 2025931657,
  15765. 3646575487,
  15766. 545086370,
  15767. 48609733,
  15768. 2200306550,
  15769. 1653985193,
  15770. 298326376,
  15771. 1316178497,
  15772. 3007786442,
  15773. 2064951626,
  15774. 458293330,
  15775. 2589141269,
  15776. 3591329599,
  15777. 3164325604,
  15778. 727753846,
  15779. 2179363840,
  15780. 146436021,
  15781. 1461446943,
  15782. 4069977195,
  15783. 705550613,
  15784. 3059967265,
  15785. 3887724982,
  15786. 4281599278,
  15787. 3313849956,
  15788. 1404054877,
  15789. 2845806497,
  15790. 146425753,
  15791. 1854211946
  15792. ],
  15793. [
  15794. 1266315497,
  15795. 3048417604,
  15796. 3681880366,
  15797. 3289982499,
  15798. 290971e4,
  15799. 1235738493,
  15800. 2632868024,
  15801. 2414719590,
  15802. 3970600049,
  15803. 1771706367,
  15804. 1449415276,
  15805. 3266420449,
  15806. 422970021,
  15807. 1963543593,
  15808. 2690192192,
  15809. 3826793022,
  15810. 1062508698,
  15811. 1531092325,
  15812. 1804592342,
  15813. 2583117782,
  15814. 2714934279,
  15815. 4024971509,
  15816. 1294809318,
  15817. 4028980673,
  15818. 1289560198,
  15819. 2221992742,
  15820. 1669523910,
  15821. 35572830,
  15822. 157838143,
  15823. 1052438473,
  15824. 1016535060,
  15825. 1802137761,
  15826. 1753167236,
  15827. 1386275462,
  15828. 3080475397,
  15829. 2857371447,
  15830. 1040679964,
  15831. 2145300060,
  15832. 2390574316,
  15833. 1461121720,
  15834. 2956646967,
  15835. 4031777805,
  15836. 4028374788,
  15837. 33600511,
  15838. 2920084762,
  15839. 1018524850,
  15840. 629373528,
  15841. 3691585981,
  15842. 3515945977,
  15843. 2091462646,
  15844. 2486323059,
  15845. 586499841,
  15846. 988145025,
  15847. 935516892,
  15848. 3367335476,
  15849. 2599673255,
  15850. 2839830854,
  15851. 265290510,
  15852. 3972581182,
  15853. 2759138881,
  15854. 3795373465,
  15855. 1005194799,
  15856. 847297441,
  15857. 406762289,
  15858. 1314163512,
  15859. 1332590856,
  15860. 1866599683,
  15861. 4127851711,
  15862. 750260880,
  15863. 613907577,
  15864. 1450815602,
  15865. 3165620655,
  15866. 3734664991,
  15867. 3650291728,
  15868. 3012275730,
  15869. 3704569646,
  15870. 1427272223,
  15871. 778793252,
  15872. 1343938022,
  15873. 2676280711,
  15874. 2052605720,
  15875. 1946737175,
  15876. 3164576444,
  15877. 3914038668,
  15878. 3967478842,
  15879. 3682934266,
  15880. 1661551462,
  15881. 3294938066,
  15882. 4011595847,
  15883. 840292616,
  15884. 3712170807,
  15885. 616741398,
  15886. 312560963,
  15887. 711312465,
  15888. 1351876610,
  15889. 322626781,
  15890. 1910503582,
  15891. 271666773,
  15892. 2175563734,
  15893. 1594956187,
  15894. 70604529,
  15895. 3617834859,
  15896. 1007753275,
  15897. 1495573769,
  15898. 4069517037,
  15899. 2549218298,
  15900. 2663038764,
  15901. 504708206,
  15902. 2263041392,
  15903. 3941167025,
  15904. 2249088522,
  15905. 1514023603,
  15906. 1998579484,
  15907. 1312622330,
  15908. 694541497,
  15909. 2582060303,
  15910. 2151582166,
  15911. 1382467621,
  15912. 776784248,
  15913. 2618340202,
  15914. 3323268794,
  15915. 2497899128,
  15916. 2784771155,
  15917. 503983604,
  15918. 4076293799,
  15919. 907881277,
  15920. 423175695,
  15921. 432175456,
  15922. 1378068232,
  15923. 4145222326,
  15924. 3954048622,
  15925. 3938656102,
  15926. 3820766613,
  15927. 2793130115,
  15928. 2977904593,
  15929. 26017576,
  15930. 3274890735,
  15931. 3194772133,
  15932. 1700274565,
  15933. 1756076034,
  15934. 4006520079,
  15935. 3677328699,
  15936. 720338349,
  15937. 1533947780,
  15938. 354530856,
  15939. 688349552,
  15940. 3973924725,
  15941. 1637815568,
  15942. 332179504,
  15943. 3949051286,
  15944. 53804574,
  15945. 2852348879,
  15946. 3044236432,
  15947. 1282449977,
  15948. 3583942155,
  15949. 3416972820,
  15950. 4006381244,
  15951. 1617046695,
  15952. 2628476075,
  15953. 3002303598,
  15954. 1686838959,
  15955. 431878346,
  15956. 2686675385,
  15957. 1700445008,
  15958. 1080580658,
  15959. 1009431731,
  15960. 832498133,
  15961. 3223435511,
  15962. 2605976345,
  15963. 2271191193,
  15964. 2516031870,
  15965. 1648197032,
  15966. 4164389018,
  15967. 2548247927,
  15968. 300782431,
  15969. 375919233,
  15970. 238389289,
  15971. 3353747414,
  15972. 2531188641,
  15973. 2019080857,
  15974. 1475708069,
  15975. 455242339,
  15976. 2609103871,
  15977. 448939670,
  15978. 3451063019,
  15979. 1395535956,
  15980. 2413381860,
  15981. 1841049896,
  15982. 1491858159,
  15983. 885456874,
  15984. 4264095073,
  15985. 4001119347,
  15986. 1565136089,
  15987. 3898914787,
  15988. 1108368660,
  15989. 540939232,
  15990. 1173283510,
  15991. 2745871338,
  15992. 3681308437,
  15993. 4207628240,
  15994. 3343053890,
  15995. 4016749493,
  15996. 1699691293,
  15997. 1103962373,
  15998. 3625875870,
  15999. 2256883143,
  16000. 3830138730,
  16001. 1031889488,
  16002. 3479347698,
  16003. 1535977030,
  16004. 4236805024,
  16005. 3251091107,
  16006. 2132092099,
  16007. 1774941330,
  16008. 1199868427,
  16009. 1452454533,
  16010. 157007616,
  16011. 2904115357,
  16012. 342012276,
  16013. 595725824,
  16014. 1480756522,
  16015. 206960106,
  16016. 497939518,
  16017. 591360097,
  16018. 863170706,
  16019. 2375253569,
  16020. 3596610801,
  16021. 1814182875,
  16022. 2094937945,
  16023. 3421402208,
  16024. 1082520231,
  16025. 3463918190,
  16026. 2785509508,
  16027. 435703966,
  16028. 3908032597,
  16029. 1641649973,
  16030. 2842273706,
  16031. 3305899714,
  16032. 1510255612,
  16033. 2148256476,
  16034. 2655287854,
  16035. 3276092548,
  16036. 4258621189,
  16037. 236887753,
  16038. 3681803219,
  16039. 274041037,
  16040. 1734335097,
  16041. 3815195456,
  16042. 3317970021,
  16043. 1899903192,
  16044. 1026095262,
  16045. 4050517792,
  16046. 356393447,
  16047. 2410691914,
  16048. 3873677099,
  16049. 3682840055
  16050. ],
  16051. [
  16052. 3913112168,
  16053. 2491498743,
  16054. 4132185628,
  16055. 2489919796,
  16056. 1091903735,
  16057. 1979897079,
  16058. 3170134830,
  16059. 3567386728,
  16060. 3557303409,
  16061. 857797738,
  16062. 1136121015,
  16063. 1342202287,
  16064. 507115054,
  16065. 2535736646,
  16066. 337727348,
  16067. 3213592640,
  16068. 1301675037,
  16069. 2528481711,
  16070. 1895095763,
  16071. 1721773893,
  16072. 3216771564,
  16073. 62756741,
  16074. 2142006736,
  16075. 835421444,
  16076. 2531993523,
  16077. 1442658625,
  16078. 3659876326,
  16079. 2882144922,
  16080. 676362277,
  16081. 1392781812,
  16082. 170690266,
  16083. 3921047035,
  16084. 1759253602,
  16085. 3611846912,
  16086. 1745797284,
  16087. 664899054,
  16088. 1329594018,
  16089. 3901205900,
  16090. 3045908486,
  16091. 2062866102,
  16092. 2865634940,
  16093. 3543621612,
  16094. 3464012697,
  16095. 1080764994,
  16096. 553557557,
  16097. 3656615353,
  16098. 3996768171,
  16099. 991055499,
  16100. 499776247,
  16101. 1265440854,
  16102. 648242737,
  16103. 3940784050,
  16104. 980351604,
  16105. 3713745714,
  16106. 1749149687,
  16107. 3396870395,
  16108. 4211799374,
  16109. 3640570775,
  16110. 1161844396,
  16111. 3125318951,
  16112. 1431517754,
  16113. 545492359,
  16114. 4268468663,
  16115. 3499529547,
  16116. 1437099964,
  16117. 2702547544,
  16118. 3433638243,
  16119. 2581715763,
  16120. 2787789398,
  16121. 1060185593,
  16122. 1593081372,
  16123. 2418618748,
  16124. 4260947970,
  16125. 69676912,
  16126. 2159744348,
  16127. 86519011,
  16128. 2512459080,
  16129. 3838209314,
  16130. 1220612927,
  16131. 3339683548,
  16132. 133810670,
  16133. 1090789135,
  16134. 1078426020,
  16135. 1569222167,
  16136. 845107691,
  16137. 3583754449,
  16138. 4072456591,
  16139. 1091646820,
  16140. 628848692,
  16141. 1613405280,
  16142. 3757631651,
  16143. 526609435,
  16144. 236106946,
  16145. 48312990,
  16146. 2942717905,
  16147. 3402727701,
  16148. 1797494240,
  16149. 859738849,
  16150. 992217954,
  16151. 4005476642,
  16152. 2243076622,
  16153. 3870952857,
  16154. 3732016268,
  16155. 765654824,
  16156. 3490871365,
  16157. 2511836413,
  16158. 1685915746,
  16159. 3888969200,
  16160. 1414112111,
  16161. 2273134842,
  16162. 3281911079,
  16163. 4080962846,
  16164. 172450625,
  16165. 2569994100,
  16166. 980381355,
  16167. 4109958455,
  16168. 2819808352,
  16169. 2716589560,
  16170. 2568741196,
  16171. 3681446669,
  16172. 3329971472,
  16173. 1835478071,
  16174. 660984891,
  16175. 3704678404,
  16176. 4045999559,
  16177. 3422617507,
  16178. 3040415634,
  16179. 1762651403,
  16180. 1719377915,
  16181. 3470491036,
  16182. 2693910283,
  16183. 3642056355,
  16184. 3138596744,
  16185. 1364962596,
  16186. 2073328063,
  16187. 1983633131,
  16188. 926494387,
  16189. 3423689081,
  16190. 2150032023,
  16191. 4096667949,
  16192. 1749200295,
  16193. 3328846651,
  16194. 309677260,
  16195. 2016342300,
  16196. 1779581495,
  16197. 3079819751,
  16198. 111262694,
  16199. 1274766160,
  16200. 443224088,
  16201. 298511866,
  16202. 1025883608,
  16203. 3806446537,
  16204. 1145181785,
  16205. 168956806,
  16206. 3641502830,
  16207. 3584813610,
  16208. 1689216846,
  16209. 3666258015,
  16210. 3200248200,
  16211. 1692713982,
  16212. 2646376535,
  16213. 4042768518,
  16214. 1618508792,
  16215. 1610833997,
  16216. 3523052358,
  16217. 4130873264,
  16218. 2001055236,
  16219. 3610705100,
  16220. 2202168115,
  16221. 4028541809,
  16222. 2961195399,
  16223. 1006657119,
  16224. 2006996926,
  16225. 3186142756,
  16226. 1430667929,
  16227. 3210227297,
  16228. 1314452623,
  16229. 4074634658,
  16230. 4101304120,
  16231. 2273951170,
  16232. 1399257539,
  16233. 3367210612,
  16234. 3027628629,
  16235. 1190975929,
  16236. 2062231137,
  16237. 2333990788,
  16238. 2221543033,
  16239. 2438960610,
  16240. 1181637006,
  16241. 548689776,
  16242. 2362791313,
  16243. 3372408396,
  16244. 3104550113,
  16245. 3145860560,
  16246. 296247880,
  16247. 1970579870,
  16248. 3078560182,
  16249. 3769228297,
  16250. 1714227617,
  16251. 3291629107,
  16252. 3898220290,
  16253. 166772364,
  16254. 1251581989,
  16255. 493813264,
  16256. 448347421,
  16257. 195405023,
  16258. 2709975567,
  16259. 677966185,
  16260. 3703036547,
  16261. 1463355134,
  16262. 2715995803,
  16263. 1338867538,
  16264. 1343315457,
  16265. 2802222074,
  16266. 2684532164,
  16267. 233230375,
  16268. 2599980071,
  16269. 2000651841,
  16270. 3277868038,
  16271. 1638401717,
  16272. 4028070440,
  16273. 3237316320,
  16274. 6314154,
  16275. 819756386,
  16276. 300326615,
  16277. 590932579,
  16278. 1405279636,
  16279. 3267499572,
  16280. 3150704214,
  16281. 2428286686,
  16282. 3959192993,
  16283. 3461946742,
  16284. 1862657033,
  16285. 1266418056,
  16286. 963775037,
  16287. 2089974820,
  16288. 2263052895,
  16289. 1917689273,
  16290. 448879540,
  16291. 3550394620,
  16292. 3981727096,
  16293. 150775221,
  16294. 3627908307,
  16295. 1303187396,
  16296. 508620638,
  16297. 2975983352,
  16298. 2726630617,
  16299. 1817252668,
  16300. 1876281319,
  16301. 1457606340,
  16302. 908771278,
  16303. 3720792119,
  16304. 3617206836,
  16305. 2455994898,
  16306. 1729034894,
  16307. 1080033504
  16308. ],
  16309. [
  16310. 976866871,
  16311. 3556439503,
  16312. 2881648439,
  16313. 1522871579,
  16314. 1555064734,
  16315. 1336096578,
  16316. 3548522304,
  16317. 2579274686,
  16318. 3574697629,
  16319. 3205460757,
  16320. 3593280638,
  16321. 3338716283,
  16322. 3079412587,
  16323. 564236357,
  16324. 2993598910,
  16325. 1781952180,
  16326. 1464380207,
  16327. 3163844217,
  16328. 3332601554,
  16329. 1699332808,
  16330. 1393555694,
  16331. 1183702653,
  16332. 3581086237,
  16333. 1288719814,
  16334. 691649499,
  16335. 2847557200,
  16336. 2895455976,
  16337. 3193889540,
  16338. 2717570544,
  16339. 1781354906,
  16340. 1676643554,
  16341. 2592534050,
  16342. 3230253752,
  16343. 1126444790,
  16344. 2770207658,
  16345. 2633158820,
  16346. 2210423226,
  16347. 2615765581,
  16348. 2414155088,
  16349. 3127139286,
  16350. 673620729,
  16351. 2805611233,
  16352. 1269405062,
  16353. 4015350505,
  16354. 3341807571,
  16355. 4149409754,
  16356. 1057255273,
  16357. 2012875353,
  16358. 2162469141,
  16359. 2276492801,
  16360. 2601117357,
  16361. 993977747,
  16362. 3918593370,
  16363. 2654263191,
  16364. 753973209,
  16365. 36408145,
  16366. 2530585658,
  16367. 25011837,
  16368. 3520020182,
  16369. 2088578344,
  16370. 530523599,
  16371. 2918365339,
  16372. 1524020338,
  16373. 1518925132,
  16374. 3760827505,
  16375. 3759777254,
  16376. 1202760957,
  16377. 3985898139,
  16378. 3906192525,
  16379. 674977740,
  16380. 4174734889,
  16381. 2031300136,
  16382. 2019492241,
  16383. 3983892565,
  16384. 4153806404,
  16385. 3822280332,
  16386. 352677332,
  16387. 2297720250,
  16388. 60907813,
  16389. 90501309,
  16390. 3286998549,
  16391. 1016092578,
  16392. 2535922412,
  16393. 2839152426,
  16394. 457141659,
  16395. 509813237,
  16396. 4120667899,
  16397. 652014361,
  16398. 1966332200,
  16399. 2975202805,
  16400. 55981186,
  16401. 2327461051,
  16402. 676427537,
  16403. 3255491064,
  16404. 2882294119,
  16405. 3433927263,
  16406. 1307055953,
  16407. 942726286,
  16408. 933058658,
  16409. 2468411793,
  16410. 3933900994,
  16411. 4215176142,
  16412. 1361170020,
  16413. 2001714738,
  16414. 2830558078,
  16415. 3274259782,
  16416. 1222529897,
  16417. 1679025792,
  16418. 2729314320,
  16419. 3714953764,
  16420. 1770335741,
  16421. 151462246,
  16422. 3013232138,
  16423. 1682292957,
  16424. 1483529935,
  16425. 471910574,
  16426. 1539241949,
  16427. 458788160,
  16428. 3436315007,
  16429. 1807016891,
  16430. 3718408830,
  16431. 978976581,
  16432. 1043663428,
  16433. 3165965781,
  16434. 1927990952,
  16435. 4200891579,
  16436. 2372276910,
  16437. 3208408903,
  16438. 3533431907,
  16439. 1412390302,
  16440. 2931980059,
  16441. 4132332400,
  16442. 1947078029,
  16443. 3881505623,
  16444. 4168226417,
  16445. 2941484381,
  16446. 1077988104,
  16447. 1320477388,
  16448. 886195818,
  16449. 18198404,
  16450. 3786409e3,
  16451. 2509781533,
  16452. 112762804,
  16453. 3463356488,
  16454. 1866414978,
  16455. 891333506,
  16456. 18488651,
  16457. 661792760,
  16458. 1628790961,
  16459. 3885187036,
  16460. 3141171499,
  16461. 876946877,
  16462. 2693282273,
  16463. 1372485963,
  16464. 791857591,
  16465. 2686433993,
  16466. 3759982718,
  16467. 3167212022,
  16468. 3472953795,
  16469. 2716379847,
  16470. 445679433,
  16471. 3561995674,
  16472. 3504004811,
  16473. 3574258232,
  16474. 54117162,
  16475. 3331405415,
  16476. 2381918588,
  16477. 3769707343,
  16478. 4154350007,
  16479. 1140177722,
  16480. 4074052095,
  16481. 668550556,
  16482. 3214352940,
  16483. 367459370,
  16484. 261225585,
  16485. 2610173221,
  16486. 4209349473,
  16487. 3468074219,
  16488. 3265815641,
  16489. 314222801,
  16490. 3066103646,
  16491. 3808782860,
  16492. 282218597,
  16493. 3406013506,
  16494. 3773591054,
  16495. 379116347,
  16496. 1285071038,
  16497. 846784868,
  16498. 2669647154,
  16499. 3771962079,
  16500. 3550491691,
  16501. 2305946142,
  16502. 453669953,
  16503. 1268987020,
  16504. 3317592352,
  16505. 3279303384,
  16506. 3744833421,
  16507. 2610507566,
  16508. 3859509063,
  16509. 266596637,
  16510. 3847019092,
  16511. 517658769,
  16512. 3462560207,
  16513. 3443424879,
  16514. 370717030,
  16515. 4247526661,
  16516. 2224018117,
  16517. 4143653529,
  16518. 4112773975,
  16519. 2788324899,
  16520. 2477274417,
  16521. 1456262402,
  16522. 2901442914,
  16523. 1517677493,
  16524. 1846949527,
  16525. 2295493580,
  16526. 3734397586,
  16527. 2176403920,
  16528. 1280348187,
  16529. 1908823572,
  16530. 3871786941,
  16531. 846861322,
  16532. 1172426758,
  16533. 3287448474,
  16534. 3383383037,
  16535. 1655181056,
  16536. 3139813346,
  16537. 901632758,
  16538. 1897031941,
  16539. 2986607138,
  16540. 3066810236,
  16541. 3447102507,
  16542. 1393639104,
  16543. 373351379,
  16544. 950779232,
  16545. 625454576,
  16546. 3124240540,
  16547. 4148612726,
  16548. 2007998917,
  16549. 544563296,
  16550. 2244738638,
  16551. 2330496472,
  16552. 2058025392,
  16553. 1291430526,
  16554. 424198748,
  16555. 50039436,
  16556. 29584100,
  16557. 3605783033,
  16558. 2429876329,
  16559. 2791104160,
  16560. 1057563949,
  16561. 3255363231,
  16562. 3075367218,
  16563. 3463963227,
  16564. 1469046755,
  16565. 985887462
  16566. ]
  16567. ];
  16568. var BLOWFISH_CTX = {
  16569. pbox: [],
  16570. sbox: []
  16571. };
  16572. function F(ctx, x) {
  16573. let a = x >> 24 & 255;
  16574. let b = x >> 16 & 255;
  16575. let c = x >> 8 & 255;
  16576. let d = x & 255;
  16577. let y = ctx.sbox[0][a] + ctx.sbox[1][b];
  16578. y = y ^ ctx.sbox[2][c];
  16579. y = y + ctx.sbox[3][d];
  16580. return y;
  16581. }
  16582. function BlowFish_Encrypt(ctx, left, right) {
  16583. let Xl = left;
  16584. let Xr = right;
  16585. let temp;
  16586. for (let i = 0; i < N; ++i) {
  16587. Xl = Xl ^ ctx.pbox[i];
  16588. Xr = F(ctx, Xl) ^ Xr;
  16589. temp = Xl;
  16590. Xl = Xr;
  16591. Xr = temp;
  16592. }
  16593. temp = Xl;
  16594. Xl = Xr;
  16595. Xr = temp;
  16596. Xr = Xr ^ ctx.pbox[N];
  16597. Xl = Xl ^ ctx.pbox[N + 1];
  16598. return { left: Xl, right: Xr };
  16599. }
  16600. function BlowFish_Decrypt(ctx, left, right) {
  16601. let Xl = left;
  16602. let Xr = right;
  16603. let temp;
  16604. for (let i = N + 1; i > 1; --i) {
  16605. Xl = Xl ^ ctx.pbox[i];
  16606. Xr = F(ctx, Xl) ^ Xr;
  16607. temp = Xl;
  16608. Xl = Xr;
  16609. Xr = temp;
  16610. }
  16611. temp = Xl;
  16612. Xl = Xr;
  16613. Xr = temp;
  16614. Xr = Xr ^ ctx.pbox[1];
  16615. Xl = Xl ^ ctx.pbox[0];
  16616. return { left: Xl, right: Xr };
  16617. }
  16618. function BlowFishInit(ctx, key, keysize) {
  16619. for (let Row = 0; Row < 4; Row++) {
  16620. ctx.sbox[Row] = [];
  16621. for (let Col = 0; Col < 256; Col++) {
  16622. ctx.sbox[Row][Col] = ORIG_S[Row][Col];
  16623. }
  16624. }
  16625. let keyIndex = 0;
  16626. for (let index2 = 0; index2 < N + 2; index2++) {
  16627. ctx.pbox[index2] = ORIG_P[index2] ^ key[keyIndex];
  16628. keyIndex++;
  16629. if (keyIndex >= keysize) {
  16630. keyIndex = 0;
  16631. }
  16632. }
  16633. let Data1 = 0;
  16634. let Data2 = 0;
  16635. let res = 0;
  16636. for (let i = 0; i < N + 2; i += 2) {
  16637. res = BlowFish_Encrypt(ctx, Data1, Data2);
  16638. Data1 = res.left;
  16639. Data2 = res.right;
  16640. ctx.pbox[i] = Data1;
  16641. ctx.pbox[i + 1] = Data2;
  16642. }
  16643. for (let i = 0; i < 4; i++) {
  16644. for (let j = 0; j < 256; j += 2) {
  16645. res = BlowFish_Encrypt(ctx, Data1, Data2);
  16646. Data1 = res.left;
  16647. Data2 = res.right;
  16648. ctx.sbox[i][j] = Data1;
  16649. ctx.sbox[i][j + 1] = Data2;
  16650. }
  16651. }
  16652. return true;
  16653. }
  16654. var Blowfish = C_algo.Blowfish = BlockCipher.extend({
  16655. _doReset: function() {
  16656. if (this._keyPriorReset === this._key) {
  16657. return;
  16658. }
  16659. var key = this._keyPriorReset = this._key;
  16660. var keyWords = key.words;
  16661. var keySize = key.sigBytes / 4;
  16662. BlowFishInit(BLOWFISH_CTX, keyWords, keySize);
  16663. },
  16664. encryptBlock: function(M, offset) {
  16665. var res = BlowFish_Encrypt(BLOWFISH_CTX, M[offset], M[offset + 1]);
  16666. M[offset] = res.left;
  16667. M[offset + 1] = res.right;
  16668. },
  16669. decryptBlock: function(M, offset) {
  16670. var res = BlowFish_Decrypt(BLOWFISH_CTX, M[offset], M[offset + 1]);
  16671. M[offset] = res.left;
  16672. M[offset + 1] = res.right;
  16673. },
  16674. blockSize: 64 / 32,
  16675. keySize: 128 / 32,
  16676. ivSize: 64 / 32
  16677. });
  16678. C.Blowfish = BlockCipher._createHelper(Blowfish);
  16679. })();
  16680. return CryptoJS.Blowfish;
  16681. });
  16682. })(blowfish);
  16683. return blowfish.exports;
  16684. }
  16685. (function(module, exports) {
  16686. (function(root, factory, undef) {
  16687. {
  16688. module.exports = factory(requireCore(), requireX64Core(), requireLibTypedarrays(), requireEncUtf16(), requireEncBase64(), requireEncBase64url(), requireMd5(), requireSha1(), requireSha256(), requireSha224(), requireSha512(), requireSha384(), requireSha3(), requireRipemd160(), requireHmac(), requirePbkdf2(), requireEvpkdf(), requireCipherCore(), requireModeCfb(), requireModeCtr(), requireModeCtrGladman(), requireModeOfb(), requireModeEcb(), requirePadAnsix923(), requirePadIso10126(), requirePadIso97971(), requirePadZeropadding(), requirePadNopadding(), requireFormatHex(), requireAes(), requireTripledes(), requireRc4(), requireRabbit(), requireRabbitLegacy(), requireBlowfish());
  16689. }
  16690. })(commonjsGlobal, function(CryptoJS) {
  16691. return CryptoJS;
  16692. });
  16693. })(cryptoJs);
  16694. var cryptoJsExports = cryptoJs.exports;
  16695. var stateEncrypt = (state, key) => {
  16696. return key ? cryptoJsExports.AES.encrypt(JSON.stringify(state), key).toString() : JSON.stringify(state);
  16697. };
  16698. var storageSet = (store, storage, encryptionKey, keys) => {
  16699. if (!keys) {
  16700. const state = stateEncrypt(store.$state, encryptionKey);
  16701. storage.setItem(store.$id, state);
  16702. } else {
  16703. const state = {};
  16704. keys.forEach((key) => {
  16705. const value = store.$state[key];
  16706. if (value !== void 0 && value !== null) {
  16707. state[key] = store.$state[key];
  16708. } else {
  16709. console.warn("Persist key not found", key, store.$id);
  16710. }
  16711. });
  16712. storage.setItem(store.$id, stateEncrypt(state, encryptionKey));
  16713. }
  16714. };
  16715. var storageSync = (store, storage, oldState, encryptionKey, keys) => {
  16716. if (oldState) {
  16717. let stateObj;
  16718. if (encryptionKey) {
  16719. const bytes = cryptoJsExports.AES.decrypt(oldState, encryptionKey);
  16720. const originalText = bytes.toString(cryptoJsExports.enc.Utf8);
  16721. stateObj = JSON.parse(originalText);
  16722. } else {
  16723. stateObj = JSON.parse(oldState);
  16724. }
  16725. if (!keys) {
  16726. store.$patch(stateObj);
  16727. } else {
  16728. keys.forEach((key) => {
  16729. store.$patch((state) => {
  16730. if ((state == null ? void 0 : state[key]) !== void 0 && (state == null ? void 0 : state[key]) !== null) {
  16731. state[key] = stateObj[key];
  16732. } else {
  16733. console.warn(`${store.$id} not found key ${key}`);
  16734. }
  16735. });
  16736. });
  16737. }
  16738. } else {
  16739. storageSet(store, storage, encryptionKey, keys);
  16740. }
  16741. };
  16742. function usePersist({ store, options: { persist } }) {
  16743. if (persist == null ? void 0 : persist.enabled) {
  16744. if (persist.keys && !Array.isArray(persist.keys)) {
  16745. console.warn("Persist keys is String[]", store.$id);
  16746. }
  16747. const keys = persist == null ? void 0 : persist.keys;
  16748. const storage = (persist == null ? void 0 : persist.storage) || localStorage;
  16749. const encryptionKey = persist == null ? void 0 : persist.encryptionKey;
  16750. try {
  16751. const oldState = storage.getItem(store.$id);
  16752. storageSync(store, storage, oldState, encryptionKey, keys);
  16753. } catch (error) {
  16754. console.error("Persist error", error);
  16755. }
  16756. store.$subscribe(() => {
  16757. storageSet(store, storage, encryptionKey, keys);
  16758. }, {
  16759. detached: (persist == null ? void 0 : persist.detached) || true,
  16760. deep: true
  16761. });
  16762. }
  16763. }
  16764. const base = "";
  16765. const index$6 = "";
  16766. const index$5 = "";
  16767. const index$4 = "";
  16768. const index$3 = "";
  16769. const index$2 = "";
  16770. const index$1 = "";
  16771. const index = "";
  16772. const app = createApp(App);
  16773. app.use(router);
  16774. const pinia = createPinia();
  16775. pinia.use(usePersist);
  16776. app.use(pinia);
  16777. app.mount("#app");
  16778. export {
  16779. useStoreOfUserInfo as A,
  16780. unref as B,
  16781. createCommentVNode as C,
  16782. commonjsGlobal as D,
  16783. getDefaultExportFromCjs as E,
  16784. Fragment as F,
  16785. onUnmounted as G,
  16786. defineStore as H,
  16787. createStaticVNode as I,
  16788. createSlots as J,
  16789. KeepAlive as K,
  16790. Transition as L,
  16791. onBeforeUnmount as M,
  16792. resolveDirective as N,
  16793. normalizeStyle as O,
  16794. renderSlot as P,
  16795. refreshCurrentRoute as Q,
  16796. withKeys as R,
  16797. watchEffect as S,
  16798. Teleport as T,
  16799. provide as U,
  16800. onDeactivated as V,
  16801. createApp as W,
  16802. inject as X,
  16803. isRef as Y,
  16804. isVNode as Z,
  16805. _export_sfc as _,
  16806. computed as a,
  16807. createElementBlock as b,
  16808. createVNode as c,
  16809. defineComponent as d,
  16810. createBaseVNode as e,
  16811. withCtx as f,
  16812. getCurrentInstance as g,
  16813. withDirectives as h,
  16814. resolveComponent as i,
  16815. openBlock as j,
  16816. createBlock as k,
  16817. resolveDynamicComponent as l,
  16818. mergeProps as m,
  16819. reactive as n,
  16820. onMounted as o,
  16821. onActivated as p,
  16822. onBeforeRouteLeave as q,
  16823. ref as r,
  16824. createTextVNode as s,
  16825. toDisplayString as t,
  16826. useRouter as u,
  16827. vShow as v,
  16828. watch as w,
  16829. renderList as x,
  16830. withModifiers as y,
  16831. nextTick as z
  16832. };