cheerio.min.js 496 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945
  1. var e, t = function() {
  2. return t = Object.assign || function(e) {
  3. for (var t, n = 1, r = arguments.length; n < r; n++)
  4. for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
  5. return e
  6. }, t.apply(this, arguments)
  7. },
  8. n = {
  9. xml: !1,
  10. decodeEntities: !0
  11. },
  12. r = {
  13. _useHtmlParser2: !0,
  14. xmlMode: !0
  15. };
  16. function i(e) {
  17. return (null == e ? void 0 : e.xml) ? "boolean" == typeof e.xml ? r : t(t({}, r), e.xml) : null != e ? e : void 0
  18. }! function(e) {
  19. e.Root = "root", e.Text = "text", e.Directive = "directive", e.Comment = "comment", e.Script = "script", e.Style = "style", e.Tag = "tag", e.CDATA = "cdata", e.Doctype = "doctype"
  20. }(e || (e = {}));
  21. const s = e.Root,
  22. a = e.Text,
  23. o = e.Directive,
  24. c = e.Comment,
  25. l = e.Script,
  26. h = e.Style,
  27. u = e.Tag,
  28. p = e.CDATA,
  29. f = e.Doctype;
  30. class d {
  31. constructor() {
  32. this.parent = null, this.prev = null, this.next = null, this.startIndex = null, this.endIndex = null
  33. }
  34. get parentNode() {
  35. return this.parent
  36. }
  37. set parentNode(e) {
  38. this.parent = e
  39. }
  40. get previousSibling() {
  41. return this.prev
  42. }
  43. set previousSibling(e) {
  44. this.prev = e
  45. }
  46. get nextSibling() {
  47. return this.next
  48. }
  49. set nextSibling(e) {
  50. this.next = e
  51. }
  52. cloneNode(e = !1) {
  53. return v(this, e)
  54. }
  55. }
  56. class E extends d {
  57. constructor(e) {
  58. super(), this.data = e
  59. }
  60. get nodeValue() {
  61. return this.data
  62. }
  63. set nodeValue(e) {
  64. this.data = e
  65. }
  66. }
  67. class m extends E {
  68. constructor() {
  69. super(...arguments), this.type = e.Text
  70. }
  71. get nodeType() {
  72. return 3
  73. }
  74. }
  75. class T extends E {
  76. constructor() {
  77. super(...arguments), this.type = e.Comment
  78. }
  79. get nodeType() {
  80. return 8
  81. }
  82. }
  83. class _ extends E {
  84. constructor(t, n) {
  85. super(n), this.name = t, this.type = e.Directive
  86. }
  87. get nodeType() {
  88. return 1
  89. }
  90. }
  91. class A extends d {
  92. constructor(e) {
  93. super(), this.children = e
  94. }
  95. get firstChild() {
  96. var e;
  97. return null !== (e = this.children[0]) && void 0 !== e ? e : null
  98. }
  99. get lastChild() {
  100. return this.children.length > 0 ? this.children[this.children.length - 1] : null
  101. }
  102. get childNodes() {
  103. return this.children
  104. }
  105. set childNodes(e) {
  106. this.children = e
  107. }
  108. }
  109. class g extends A {
  110. constructor() {
  111. super(...arguments), this.type = e.CDATA
  112. }
  113. get nodeType() {
  114. return 4
  115. }
  116. }
  117. class N extends A {
  118. constructor() {
  119. super(...arguments), this.type = e.Root
  120. }
  121. get nodeType() {
  122. return 9
  123. }
  124. }
  125. class C extends A {
  126. constructor(t, n, r = [], i = ("script" === t ? e.Script : "style" === t ? e.Style : e.Tag)) {
  127. super(r), this.name = t, this.attribs = n, this.type = i
  128. }
  129. get nodeType() {
  130. return 1
  131. }
  132. get tagName() {
  133. return this.name
  134. }
  135. set tagName(e) {
  136. this.name = e
  137. }
  138. get attributes() {
  139. return Object.keys(this.attribs).map((e => {
  140. var t, n;
  141. return {
  142. name: e,
  143. value: this.attribs[e],
  144. namespace: null === (t = this["x-attribsNamespace"]) || void 0 === t ? void 0 : t[e],
  145. prefix: null === (n = this["x-attribsPrefix"]) || void 0 === n ? void 0 : n[e]
  146. }
  147. }))
  148. }
  149. }
  150. function I(t) {
  151. return (n = t).type === e.Tag || n.type === e.Script || n.type === e.Style;
  152. var n
  153. }
  154. function S(t) {
  155. return t.type === e.CDATA
  156. }
  157. function b(t) {
  158. return t.type === e.Text
  159. }
  160. function O(t) {
  161. return t.type === e.Comment
  162. }
  163. function y(t) {
  164. return t.type === e.Directive
  165. }
  166. function L(t) {
  167. return t.type === e.Root
  168. }
  169. function k(e) {
  170. return Object.prototype.hasOwnProperty.call(e, "children")
  171. }
  172. function v(e, t = !1) {
  173. let n;
  174. if (b(e)) n = new m(e.data);
  175. else if (O(e)) n = new T(e.data);
  176. else if (I(e)) {
  177. const r = t ? D(e.children) : [],
  178. i = new C(e.name, {
  179. ...e.attribs
  180. }, r);
  181. r.forEach((e => e.parent = i)), null != e.namespace && (i.namespace = e.namespace), e["x-attribsNamespace"] && (i["x-attribsNamespace"] = {
  182. ...e["x-attribsNamespace"]
  183. }), e["x-attribsPrefix"] && (i["x-attribsPrefix"] = {
  184. ...e["x-attribsPrefix"]
  185. }), n = i
  186. } else if (S(e)) {
  187. const r = t ? D(e.children) : [],
  188. i = new g(r);
  189. r.forEach((e => e.parent = i)), n = i
  190. } else if (L(e)) {
  191. const r = t ? D(e.children) : [],
  192. i = new N(r);
  193. r.forEach((e => e.parent = i)), e["x-mode"] && (i["x-mode"] = e["x-mode"]), n = i
  194. } else {
  195. if (!y(e)) throw new Error(`Not implemented yet: ${e.type}`);
  196. {
  197. const t = new _(e.name, e.data);
  198. null != e["x-name"] && (t["x-name"] = e["x-name"], t["x-publicId"] = e["x-publicId"], t["x-systemId"] = e["x-systemId"]), n = t
  199. }
  200. }
  201. return n.startIndex = e.startIndex, n.endIndex = e.endIndex, null != e.sourceCodeLocation && (n.sourceCodeLocation = e.sourceCodeLocation), n
  202. }
  203. function D(e) {
  204. const t = e.map((e => v(e, !0)));
  205. for (let e = 1; e < t.length; e++) t[e].prev = t[e - 1], t[e - 1].next = t[e];
  206. return t
  207. }
  208. const R = {
  209. withStartIndices: !1,
  210. withEndIndices: !1,
  211. xmlMode: !1
  212. };
  213. class M {
  214. constructor(e, t, n) {
  215. this.dom = [], this.root = new N(this.dom), this.done = !1, this.tagStack = [this.root], this.lastNode = null, this.parser = null, "function" == typeof t && (n = t, t = R), "object" == typeof e && (t = e, e = void 0), this.callback = null != e ? e : null, this.options = null != t ? t : R, this.elementCB = null != n ? n : null
  216. }
  217. onparserinit(e) {
  218. this.parser = e
  219. }
  220. onreset() {
  221. this.dom = [], this.root = new N(this.dom), this.done = !1, this.tagStack = [this.root], this.lastNode = null, this.parser = null
  222. }
  223. onend() {
  224. this.done || (this.done = !0, this.parser = null, this.handleCallback(null))
  225. }
  226. onerror(e) {
  227. this.handleCallback(e)
  228. }
  229. onclosetag() {
  230. this.lastNode = null;
  231. const e = this.tagStack.pop();
  232. this.options.withEndIndices && (e.endIndex = this.parser.endIndex), this.elementCB && this.elementCB(e)
  233. }
  234. onopentag(t, n) {
  235. const r = this.options.xmlMode ? e.Tag : void 0,
  236. i = new C(t, n, void 0, r);
  237. this.addNode(i), this.tagStack.push(i)
  238. }
  239. ontext(t) {
  240. const {
  241. lastNode: n
  242. } = this;
  243. if (n && n.type === e.Text) n.data += t, this.options.withEndIndices && (n.endIndex = this.parser.endIndex);
  244. else {
  245. const e = new m(t);
  246. this.addNode(e), this.lastNode = e
  247. }
  248. }
  249. oncomment(t) {
  250. if (this.lastNode && this.lastNode.type === e.Comment) return void(this.lastNode.data += t);
  251. const n = new T(t);
  252. this.addNode(n), this.lastNode = n
  253. }
  254. oncommentend() {
  255. this.lastNode = null
  256. }
  257. oncdatastart() {
  258. const e = new m(""),
  259. t = new g([e]);
  260. this.addNode(t), e.parent = t, this.lastNode = e
  261. }
  262. oncdataend() {
  263. this.lastNode = null
  264. }
  265. onprocessinginstruction(e, t) {
  266. const n = new _(e, t);
  267. this.addNode(n)
  268. }
  269. handleCallback(e) {
  270. if ("function" == typeof this.callback) this.callback(e, this.dom);
  271. else if (e) throw e
  272. }
  273. addNode(e) {
  274. const t = this.tagStack[this.tagStack.length - 1],
  275. n = t.children[t.children.length - 1];
  276. this.options.withStartIndices && (e.startIndex = this.parser.startIndex), this.options.withEndIndices && (e.endIndex = this.parser.endIndex), t.children.push(e), n && (e.prev = n, n.next = e), e.parent = t, this.lastNode = null
  277. }
  278. }
  279. const P = /["&'<>$\x80-\uFFFF]/g,
  280. x = new Map([
  281. [34, "&quot;"],
  282. [38, "&amp;"],
  283. [39, "&apos;"],
  284. [60, "&lt;"],
  285. [62, "&gt;"]
  286. ]),
  287. w = null != String.prototype.codePointAt ? (e, t) => e.codePointAt(t) : (e, t) => 55296 == (64512 & e.charCodeAt(t)) ? 1024 * (e.charCodeAt(t) - 55296) + e.charCodeAt(t + 1) - 56320 + 65536 : e.charCodeAt(t);
  288. function B(e) {
  289. let t, n = "",
  290. r = 0;
  291. for (; null !== (t = P.exec(e));) {
  292. const i = t.index,
  293. s = e.charCodeAt(i),
  294. a = x.get(s);
  295. void 0 !== a ? (n += e.substring(r, i) + a, r = i + 1) : (n += `${e.substring(r,i)}&#x${w(e,i).toString(16)};`, r = P.lastIndex += Number(55296 == (64512 & s)))
  296. }
  297. return n + e.substr(r)
  298. }
  299. function F(e, t) {
  300. return function(n) {
  301. let r, i = 0,
  302. s = "";
  303. for (; r = e.exec(n);) i !== r.index && (s += n.substring(i, r.index)), s += t.get(r[0].charCodeAt(0)), i = r.index + 1;
  304. return s + n.substring(i)
  305. }
  306. }
  307. const U = F(/["&\u00A0]/g, new Map([
  308. [34, "&quot;"],
  309. [38, "&amp;"],
  310. [160, "&nbsp;"]
  311. ])),
  312. H = F(/[&<>\u00A0]/g, new Map([
  313. [38, "&amp;"],
  314. [60, "&lt;"],
  315. [62, "&gt;"],
  316. [160, "&nbsp;"]
  317. ])),
  318. G = new Map(["altGlyph", "altGlyphDef", "altGlyphItem", "animateColor", "animateMotion", "animateTransform", "clipPath", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence", "foreignObject", "glyphRef", "linearGradient", "radialGradient", "textPath"].map((e => [e.toLowerCase(), e]))),
  319. Y = new Map(["definitionURL", "attributeName", "attributeType", "baseFrequency", "baseProfile", "calcMode", "clipPathUnits", "diffuseConstant", "edgeMode", "filterUnits", "glyphRef", "gradientTransform", "gradientUnits", "kernelMatrix", "kernelUnitLength", "keyPoints", "keySplines", "keyTimes", "lengthAdjust", "limitingConeAngle", "markerHeight", "markerUnits", "markerWidth", "maskContentUnits", "maskUnits", "numOctaves", "pathLength", "patternContentUnits", "patternTransform", "patternUnits", "pointsAtX", "pointsAtY", "pointsAtZ", "preserveAlpha", "preserveAspectRatio", "primitiveUnits", "refX", "refY", "repeatCount", "repeatDur", "requiredExtensions", "requiredFeatures", "specularConstant", "specularExponent", "spreadMethod", "startOffset", "stdDeviation", "stitchTiles", "surfaceScale", "systemLanguage", "tableValues", "targetX", "targetY", "textLength", "viewBox", "viewTarget", "xChannelSelector", "yChannelSelector", "zoomAndPan"].map((e => [e.toLowerCase(), e]))),
  320. q = new Set(["style", "script", "xmp", "iframe", "noembed", "noframes", "plaintext", "noscript"]);
  321. function K(e) {
  322. return e.replace(/"/g, "&quot;")
  323. }
  324. const j = new Set(["area", "base", "basefont", "br", "col", "command", "embed", "frame", "hr", "img", "input", "isindex", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
  325. function V(e, t = {}) {
  326. const n = "length" in e ? e : [e];
  327. let r = "";
  328. for (let e = 0; e < n.length; e++) r += W(n[e], t);
  329. return r
  330. }
  331. function W(e, t) {
  332. switch (e.type) {
  333. case s:
  334. return V(e.children, t);
  335. case f:
  336. case o:
  337. return `<${e.data}>`;
  338. case c:
  339. return function(e) {
  340. return `\x3c!--${e.data}--\x3e`
  341. }(e);
  342. case p:
  343. return function(e) {
  344. return `<![CDATA[${e.children[0].data}]]>`
  345. }(e);
  346. case l:
  347. case h:
  348. case u:
  349. return function(e, t) {
  350. var n;
  351. "foreign" === t.xmlMode && (e.name = null !== (n = G.get(e.name)) && void 0 !== n ? n : e.name, e.parent && Q.has(e.parent.name) && (t = {
  352. ...t,
  353. xmlMode: !1
  354. }));
  355. !t.xmlMode && X.has(e.name) && (t = {
  356. ...t,
  357. xmlMode: "foreign"
  358. });
  359. let r = `<${e.name}`;
  360. const i = function(e, t) {
  361. var n;
  362. if (!e) return;
  363. const r = !1 === (null !== (n = t.encodeEntities) && void 0 !== n ? n : t.decodeEntities) ? K : t.xmlMode || "utf8" !== t.encodeEntities ? B : U;
  364. return Object.keys(e).map((n => {
  365. var i, s;
  366. const a = null !== (i = e[n]) && void 0 !== i ? i : "";
  367. return "foreign" === t.xmlMode && (n = null !== (s = Y.get(n)) && void 0 !== s ? s : n), t.emptyAttrs || t.xmlMode || "" !== a ? `${n}="${r(a)}"` : n
  368. })).join(" ")
  369. }(e.attribs, t);
  370. i && (r += ` ${i}`);
  371. 0 === e.children.length && (t.xmlMode ? !1 !== t.selfClosingTags : t.selfClosingTags && j.has(e.name)) ? (t.xmlMode || (r += " "), r += "/>") : (r += ">", e.children.length > 0 && (r += V(e.children, t)), !t.xmlMode && j.has(e.name) || (r += `</${e.name}>`));
  372. return r
  373. }(e, t);
  374. case a:
  375. return function(e, t) {
  376. var n;
  377. let r = e.data || "";
  378. !1 === (null !== (n = t.encodeEntities) && void 0 !== n ? n : t.decodeEntities) || !t.xmlMode && e.parent && q.has(e.parent.name) || (r = t.xmlMode || "utf8" !== t.encodeEntities ? B(r) : H(r));
  379. return r
  380. }(e, t)
  381. }
  382. }
  383. const Q = new Set(["mi", "mo", "mn", "ms", "mtext", "annotation-xml", "foreignObject", "desc", "title"]),
  384. X = new Set(["svg", "math"]);
  385. function $(e, t) {
  386. return V(e, t)
  387. }
  388. function z(e) {
  389. return Array.isArray(e) ? e.map(z).join("") : k(e) && !O(e) ? z(e.children) : b(e) ? e.data : ""
  390. }
  391. function J(t) {
  392. return Array.isArray(t) ? t.map(J).join("") : k(t) && (t.type === e.Tag || S(t)) ? J(t.children) : b(t) ? t.data : ""
  393. }
  394. function Z(e) {
  395. return k(e) ? e.children : []
  396. }
  397. function ee(e) {
  398. return e.parent || null
  399. }
  400. function te(e) {
  401. const t = ee(e);
  402. if (null != t) return Z(t);
  403. const n = [e];
  404. let {
  405. prev: r,
  406. next: i
  407. } = e;
  408. for (; null != r;) n.unshift(r), ({
  409. prev: r
  410. } = r);
  411. for (; null != i;) n.push(i), ({
  412. next: i
  413. } = i);
  414. return n
  415. }
  416. function ne(e) {
  417. let {
  418. next: t
  419. } = e;
  420. for (; null !== t && !I(t);)({
  421. next: t
  422. } = t);
  423. return t
  424. }
  425. function re(e) {
  426. let {
  427. prev: t
  428. } = e;
  429. for (; null !== t && !I(t);)({
  430. prev: t
  431. } = t);
  432. return t
  433. }
  434. function ie(e) {
  435. if (e.prev && (e.prev.next = e.next), e.next && (e.next.prev = e.prev), e.parent) {
  436. const t = e.parent.children;
  437. t.splice(t.lastIndexOf(e), 1)
  438. }
  439. }
  440. function se(e, t, n = !0, r = 1 / 0) {
  441. return Array.isArray(t) || (t = [t]), ae(e, t, n, r)
  442. }
  443. function ae(e, t, n, r) {
  444. const i = [];
  445. for (const s of t) {
  446. if (e(s) && (i.push(s), --r <= 0)) break;
  447. if (n && k(s) && s.children.length > 0) {
  448. const t = ae(e, s.children, n, r);
  449. if (i.push(...t), r -= t.length, r <= 0) break
  450. }
  451. }
  452. return i
  453. }
  454. function oe(e, t, n = !0) {
  455. let r = null;
  456. for (let i = 0; i < t.length && !r; i++) {
  457. const s = t[i];
  458. I(s) && (e(s) ? r = s : n && s.children.length > 0 && (r = oe(e, s.children, !0)))
  459. }
  460. return r
  461. }
  462. const ce = {
  463. tag_name: e => "function" == typeof e ? t => I(t) && e(t.name) : "*" === e ? I : t => I(t) && t.name === e,
  464. tag_type: e => "function" == typeof e ? t => e(t.type) : t => t.type === e,
  465. tag_contains: e => "function" == typeof e ? t => b(t) && e(t.data) : t => b(t) && t.data === e
  466. };
  467. function le(e, t) {
  468. return "function" == typeof t ? n => I(n) && t(n.attribs[e]) : n => I(n) && n.attribs[e] === t
  469. }
  470. function he(e, t) {
  471. return n => e(n) || t(n)
  472. }
  473. function ue(e) {
  474. const t = Object.keys(e).map((t => {
  475. const n = e[t];
  476. return Object.prototype.hasOwnProperty.call(ce, t) ? ce[t](n) : le(t, n)
  477. }));
  478. return 0 === t.length ? null : t.reduce(he)
  479. }
  480. function pe(e, t, n = !0, r = 1 / 0) {
  481. return se(ce.tag_name(e), t, n, r)
  482. }
  483. var fe;
  484. function de(e, t) {
  485. const n = [],
  486. r = [];
  487. if (e === t) return 0;
  488. let i = k(e) ? e : e.parent;
  489. for (; i;) n.unshift(i), i = i.parent;
  490. for (i = k(t) ? t : t.parent; i;) r.unshift(i), i = i.parent;
  491. const s = Math.min(n.length, r.length);
  492. let a = 0;
  493. for (; a < s && n[a] === r[a];) a++;
  494. if (0 === a) return fe.DISCONNECTED;
  495. const o = n[a - 1],
  496. c = o.children,
  497. l = n[a],
  498. h = r[a];
  499. return c.indexOf(l) > c.indexOf(h) ? o === t ? fe.FOLLOWING | fe.CONTAINED_BY : fe.FOLLOWING : o === e ? fe.PRECEDING | fe.CONTAINS : fe.PRECEDING
  500. }
  501. function Ee(e) {
  502. return (e = e.filter(((e, t, n) => !n.includes(e, t + 1)))).sort(((e, t) => {
  503. const n = de(e, t);
  504. return n & fe.PRECEDING ? -1 : n & fe.FOLLOWING ? 1 : 0
  505. })), e
  506. }! function(e) {
  507. e[e.DISCONNECTED = 1] = "DISCONNECTED", e[e.PRECEDING = 2] = "PRECEDING", e[e.FOLLOWING = 4] = "FOLLOWING", e[e.CONTAINS = 8] = "CONTAINS", e[e.CONTAINED_BY = 16] = "CONTAINED_BY"
  508. }(fe || (fe = {}));
  509. const me = ["url", "type", "lang"],
  510. Te = ["fileSize", "bitrate", "framerate", "samplingrate", "channels", "duration", "height", "width"];
  511. function _e(e) {
  512. return pe("media:content", e).map((e => {
  513. const {
  514. attribs: t
  515. } = e, n = {
  516. medium: t.medium,
  517. isDefault: !!t.isDefault
  518. };
  519. for (const e of me) t[e] && (n[e] = t[e]);
  520. for (const e of Te) t[e] && (n[e] = parseInt(t[e], 10));
  521. return t.expression && (n.expression = t.expression), n
  522. }))
  523. }
  524. function Ae(e, t) {
  525. return pe(e, t, !0, 1)[0]
  526. }
  527. function ge(e, t, n = !1) {
  528. return z(pe(e, t, n, 1)).trim()
  529. }
  530. function Ne(e, t, n, r, i = !1) {
  531. const s = ge(n, r, i);
  532. s && (e[t] = s)
  533. }
  534. function Ce(e) {
  535. return "rss" === e || "feed" === e || "rdf:RDF" === e
  536. }
  537. var Ie, Se = Object.freeze({
  538. __proto__: null,
  539. isTag: I,
  540. isCDATA: S,
  541. isText: b,
  542. isComment: O,
  543. isDocument: L,
  544. hasChildren: k,
  545. getOuterHTML: $,
  546. getInnerHTML: function(e, t) {
  547. return k(e) ? e.children.map((e => $(e, t))).join("") : ""
  548. },
  549. getText: function e(t) {
  550. return Array.isArray(t) ? t.map(e).join("") : I(t) ? "br" === t.name ? "\n" : e(t.children) : S(t) ? e(t.children) : b(t) ? t.data : ""
  551. },
  552. textContent: z,
  553. innerText: J,
  554. getChildren: Z,
  555. getParent: ee,
  556. getSiblings: te,
  557. getAttributeValue: function(e, t) {
  558. var n;
  559. return null === (n = e.attribs) || void 0 === n ? void 0 : n[t]
  560. },
  561. hasAttrib: function(e, t) {
  562. return null != e.attribs && Object.prototype.hasOwnProperty.call(e.attribs, t) && null != e.attribs[t]
  563. },
  564. getName: function(e) {
  565. return e.name
  566. },
  567. nextElementSibling: ne,
  568. prevElementSibling: re,
  569. removeElement: ie,
  570. replaceElement: function(e, t) {
  571. const n = t.prev = e.prev;
  572. n && (n.next = t);
  573. const r = t.next = e.next;
  574. r && (r.prev = t);
  575. const i = t.parent = e.parent;
  576. if (i) {
  577. const n = i.children;
  578. n[n.lastIndexOf(e)] = t, e.parent = null
  579. }
  580. },
  581. appendChild: function(e, t) {
  582. if (ie(t), t.next = null, t.parent = e, e.children.push(t) > 1) {
  583. const n = e.children[e.children.length - 2];
  584. n.next = t, t.prev = n
  585. } else t.prev = null
  586. },
  587. append: function(e, t) {
  588. ie(t);
  589. const {
  590. parent: n
  591. } = e, r = e.next;
  592. if (t.next = r, t.prev = e, e.next = t, t.parent = n, r) {
  593. if (r.prev = t, n) {
  594. const e = n.children;
  595. e.splice(e.lastIndexOf(r), 0, t)
  596. }
  597. } else n && n.children.push(t)
  598. },
  599. prependChild: function(e, t) {
  600. if (ie(t), t.parent = e, t.prev = null, 1 !== e.children.unshift(t)) {
  601. const n = e.children[1];
  602. n.prev = t, t.next = n
  603. } else t.next = null
  604. },
  605. prepend: function(e, t) {
  606. ie(t);
  607. const {
  608. parent: n
  609. } = e;
  610. if (n) {
  611. const r = n.children;
  612. r.splice(r.indexOf(e), 0, t)
  613. }
  614. e.prev && (e.prev.next = t), t.parent = n, t.prev = e.prev, t.next = e, e.prev = t
  615. },
  616. filter: se,
  617. find: ae,
  618. findOneChild: function(e, t) {
  619. return t.find(e)
  620. },
  621. findOne: oe,
  622. existsOne: function e(t, n) {
  623. return n.some((n => I(n) && (t(n) || n.children.length > 0 && e(t, n.children))))
  624. },
  625. findAll: function(e, t) {
  626. var n;
  627. const r = [],
  628. i = t.filter(I);
  629. let s;
  630. for (; s = i.shift();) {
  631. const t = null === (n = s.children) || void 0 === n ? void 0 : n.filter(I);
  632. t && t.length > 0 && i.unshift(...t), e(s) && r.push(s)
  633. }
  634. return r
  635. },
  636. testElement: function(e, t) {
  637. const n = ue(e);
  638. return !n || n(t)
  639. },
  640. getElements: function(e, t, n, r = 1 / 0) {
  641. const i = ue(e);
  642. return i ? se(i, t, n, r) : []
  643. },
  644. getElementById: function(e, t, n = !0) {
  645. return Array.isArray(t) || (t = [t]), oe(le("id", e), t, n)
  646. },
  647. getElementsByTagName: pe,
  648. getElementsByTagType: function(e, t, n = !0, r = 1 / 0) {
  649. return se(ce.tag_type(e), t, n, r)
  650. },
  651. removeSubsets: function(e) {
  652. let t = e.length;
  653. for (; --t >= 0;) {
  654. const n = e[t];
  655. if (t > 0 && e.lastIndexOf(n, t - 1) >= 0) e.splice(t, 1);
  656. else
  657. for (let r = n.parent; r; r = r.parent)
  658. if (e.includes(r)) {
  659. e.splice(t, 1);
  660. break
  661. }
  662. }
  663. return e
  664. },
  665. get DocumentPosition() {
  666. return fe
  667. },
  668. compareDocumentPosition: de,
  669. uniqueSort: Ee,
  670. getFeed: function(e) {
  671. const t = Ae(Ce, e);
  672. return t ? "feed" === t.name ? function(e) {
  673. var t;
  674. const n = e.children,
  675. r = {
  676. type: "atom",
  677. items: pe("entry", n).map((e => {
  678. var t;
  679. const {
  680. children: n
  681. } = e, r = {
  682. media: _e(n)
  683. };
  684. Ne(r, "id", "id", n), Ne(r, "title", "title", n);
  685. const i = null === (t = Ae("link", n)) || void 0 === t ? void 0 : t.attribs.href;
  686. i && (r.link = i);
  687. const s = ge("summary", n) || ge("content", n);
  688. s && (r.description = s);
  689. const a = ge("updated", n);
  690. return a && (r.pubDate = new Date(a)), r
  691. }))
  692. };
  693. Ne(r, "id", "id", n), Ne(r, "title", "title", n);
  694. const i = null === (t = Ae("link", n)) || void 0 === t ? void 0 : t.attribs.href;
  695. i && (r.link = i);
  696. Ne(r, "description", "subtitle", n);
  697. const s = ge("updated", n);
  698. s && (r.updated = new Date(s));
  699. return Ne(r, "author", "email", n, !0), r
  700. }(t) : function(e) {
  701. var t, n;
  702. const r = null !== (n = null === (t = Ae("channel", e.children)) || void 0 === t ? void 0 : t.children) && void 0 !== n ? n : [],
  703. i = {
  704. type: e.name.substr(0, 3),
  705. id: "",
  706. items: pe("item", e.children).map((e => {
  707. const {
  708. children: t
  709. } = e, n = {
  710. media: _e(t)
  711. };
  712. Ne(n, "id", "guid", t), Ne(n, "title", "title", t), Ne(n, "link", "link", t), Ne(n, "description", "description", t);
  713. const r = ge("pubDate", t);
  714. return r && (n.pubDate = new Date(r)), n
  715. }))
  716. };
  717. Ne(i, "title", "title", r), Ne(i, "link", "link", r), Ne(i, "description", "description", r);
  718. const s = ge("lastBuildDate", r);
  719. s && (i.updated = new Date(s));
  720. return Ne(i, "author", "managingEditor", r, !0), i
  721. }(t) : null
  722. }
  723. }),
  724. be = "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {};
  725. function Oe(e) {
  726. if (Object.keys) return Object.keys(e);
  727. var t = [];
  728. for (var n in e) t.push(n);
  729. return t
  730. }
  731. function ye(e, t) {
  732. if (e.forEach) return e.forEach(t);
  733. for (var n = 0; n < e.length; n++) t(e[n], n, e)
  734. }
  735. function Le() {
  736. try {
  737. return Object.defineProperty({}, "_", {}),
  738. function(e, t, n) {
  739. Object.defineProperty(e, t, {
  740. writable: !0,
  741. enumerable: !1,
  742. configurable: !0,
  743. value: n
  744. })
  745. }
  746. } catch (e) {
  747. return function(e, t, n) {
  748. e[t] = n
  749. }
  750. }
  751. }
  752. var ke = ["Array", "Boolean", "Date", "Error", "EvalError", "Function", "Infinity", "JSON", "Math", "NaN", "Number", "Object", "RangeError", "ReferenceError", "RegExp", "String", "SyntaxError", "TypeError", "URIError", "decodeURI", "decodeURIComponent", "encodeURI", "encodeURIComponent", "escape", "eval", "isFinite", "isNaN", "parseFloat", "parseInt", "undefined", "unescape"];
  753. function ve() {}
  754. function De(e) {
  755. if (!(this instanceof De)) return new De(e);
  756. this.code = e
  757. }
  758. function Re(e) {
  759. if (Me(e)) return e;
  760. var t = new ve;
  761. return "object" == typeof e && ye(Oe(e), (function(n) {
  762. t[n] = e[n]
  763. })), t
  764. }
  765. function Me(e) {
  766. return e instanceof ve
  767. }
  768. ve.prototype = {}, De.prototype.runInContext = function(e) {
  769. if (!(e instanceof ve)) throw new TypeError("needs a 'context' argument.");
  770. if (be.document) {
  771. var t = be.document.createElement("iframe");
  772. t.style || (t.style = {}), t.style.display = "none", be.document.body.appendChild(t);
  773. var n = t.contentWindow,
  774. r = n.eval,
  775. i = n.execScript;
  776. !r && i && (i.call(n, "null"), r = n.eval), ye(Oe(e), (function(t) {
  777. n[t] = e[t]
  778. })), ye(ke, (function(t) {
  779. e[t] && (n[t] = e[t])
  780. }));
  781. var s = Oe(n),
  782. a = r.call(n, this.code);
  783. return ye(Oe(n), (function(t) {
  784. (t in e || -1 === function(e, t) {
  785. if (xe) return e.indexOf(t);
  786. for (var n = 0; n < e.length; ++n)
  787. if (e[n] === t) return n;
  788. return -1
  789. }(s, t)) && (e[t] = n[t])
  790. })), ye(ke, (function(t) {
  791. var r, i, s;
  792. t in e || (r = e, i = t, s = n[t], "function" != typeof Ie && (Ie = Le), Ie(r, i, s))
  793. })), be.document.body.removeChild(t), a
  794. }
  795. return function(e, t) {
  796. var n = Oe(be);
  797. return n.push("with (this.__ctx__){return eval(this.__code__)}"), Function.apply(null, n).apply({
  798. __code__: e,
  799. __ctx__: t
  800. })
  801. }(this.code, e)
  802. }, De.prototype.runInThisContext = function() {
  803. return new Function("code", "return eval(code);").call(be, this.code)
  804. }, De.prototype.runInNewContext = function(e) {
  805. var t = Re(e),
  806. n = this.runInContext(t);
  807. return e && ye(Oe(t), (function(n) {
  808. e[n] = t[n]
  809. })), n
  810. };
  811. var Pe = {
  812. runInContext: function(e, t, n) {
  813. return new De(e).runInContext(t, n)
  814. },
  815. isContext: Me,
  816. createContext: Re,
  817. createScript: function(e) {
  818. return new De(e)
  819. },
  820. Script: De,
  821. runInThisContext: function(e, t) {
  822. return new De(e).runInThisContext(t)
  823. },
  824. runInNewContext: function(e, t, n) {
  825. return new De(e).runInNewContext(t, n)
  826. }
  827. },
  828. xe = [].indexOf;
  829. const {
  830. hasOwnProperty: we
  831. } = Object.prototype;
  832. function Be(e, t) {
  833. return (e = e.slice()).push(t), e
  834. }
  835. function Fe(e, t) {
  836. return (t = t.slice()).unshift(e), t
  837. }
  838. class Ue extends Error {
  839. constructor(e) {
  840. super('JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)'), this.avoidNew = !0, this.value = e, this.name = "NewError"
  841. }
  842. }
  843. function He(e, t, n, r, i) {
  844. if (!(this instanceof He)) try {
  845. return new He(e, t, n, r, i)
  846. } catch (e) {
  847. if (!e.avoidNew) throw e;
  848. return e.value
  849. }
  850. "string" == typeof e && (i = r, r = n, n = t, t = e, e = null);
  851. const s = e && "object" == typeof e;
  852. if (e = e || {}, this.json = e.json || n, this.path = e.path || t, this.resultType = e.resultType || "value", this.flatten = e.flatten || !1, this.wrap = !we.call(e, "wrap") || e.wrap, this.sandbox = e.sandbox || {}, this.preventEval = e.preventEval || !1, this.parent = e.parent || null, this.parentProperty = e.parentProperty || null, this.callback = e.callback || r || null, this.otherTypeCallback = e.otherTypeCallback || i || function() {
  853. throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")
  854. }, !1 !== e.autostart) {
  855. const r = {
  856. path: s ? e.path : t
  857. };
  858. s ? "json" in e && (r.json = e.json) : r.json = n;
  859. const i = this.evaluate(r);
  860. if (!i || "object" != typeof i) throw new Ue(i);
  861. return i
  862. }
  863. }
  864. He.prototype.evaluate = function(e, t, n, r) {
  865. let i = this.parent,
  866. s = this.parentProperty,
  867. {
  868. flatten: a,
  869. wrap: o
  870. } = this;
  871. if (this.currResultType = this.resultType, this.currPreventEval = this.preventEval, this.currSandbox = this.sandbox, n = n || this.callback, this.currOtherTypeCallback = r || this.otherTypeCallback, t = t || this.json, (e = e || this.path) && "object" == typeof e && !Array.isArray(e)) {
  872. if (!e.path && "" !== e.path) throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');
  873. if (!we.call(e, "json")) throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');
  874. ({
  875. json: t
  876. } = e), a = we.call(e, "flatten") ? e.flatten : a, this.currResultType = we.call(e, "resultType") ? e.resultType : this.currResultType, this.currSandbox = we.call(e, "sandbox") ? e.sandbox : this.currSandbox, o = we.call(e, "wrap") ? e.wrap : o, this.currPreventEval = we.call(e, "preventEval") ? e.preventEval : this.currPreventEval, n = we.call(e, "callback") ? e.callback : n, this.currOtherTypeCallback = we.call(e, "otherTypeCallback") ? e.otherTypeCallback : this.currOtherTypeCallback, i = we.call(e, "parent") ? e.parent : i, s = we.call(e, "parentProperty") ? e.parentProperty : s, e = e.path
  877. }
  878. if (i = i || null, s = s || null, Array.isArray(e) && (e = He.toPathString(e)), !e && "" !== e || !t) return;
  879. const c = He.toPathArray(e);
  880. "$" === c[0] && c.length > 1 && c.shift(), this._hasParentSelector = null;
  881. const l = this._trace(c, t, ["$"], i, s, n).filter((function(e) {
  882. return e && !e.isParentSelector
  883. }));
  884. return l.length ? o || 1 !== l.length || l[0].hasArrExpr ? l.reduce(((e, t) => {
  885. const n = this._getPreferredOutput(t);
  886. return a && Array.isArray(n) ? e = e.concat(n) : e.push(n), e
  887. }), []) : this._getPreferredOutput(l[0]) : o ? [] : void 0
  888. }, He.prototype._getPreferredOutput = function(e) {
  889. const t = this.currResultType;
  890. switch (t) {
  891. case "all": {
  892. const t = Array.isArray(e.path) ? e.path : He.toPathArray(e.path);
  893. return e.pointer = He.toPointer(t), e.path = "string" == typeof e.path ? e.path : He.toPathString(e.path), e
  894. }
  895. case "value":
  896. case "parent":
  897. case "parentProperty":
  898. return e[t];
  899. case "path":
  900. return He.toPathString(e[t]);
  901. case "pointer":
  902. return He.toPointer(e.path);
  903. default:
  904. throw new TypeError("Unknown result type")
  905. }
  906. }, He.prototype._handleCallback = function(e, t, n) {
  907. if (t) {
  908. const r = this._getPreferredOutput(e);
  909. e.path = "string" == typeof e.path ? e.path : He.toPathString(e.path), t(r, n, e)
  910. }
  911. }, He.prototype._trace = function(e, t, n, r, i, s, a, o) {
  912. let c;
  913. if (!e.length) return c = {
  914. path: n,
  915. value: t,
  916. parent: r,
  917. parentProperty: i,
  918. hasArrExpr: a
  919. }, this._handleCallback(c, s, "value"), c;
  920. const l = e[0],
  921. h = e.slice(1),
  922. u = [];
  923. function p(e) {
  924. Array.isArray(e) ? e.forEach((e => {
  925. u.push(e)
  926. })) : u.push(e)
  927. }
  928. if (("string" != typeof l || o) && t && we.call(t, l)) p(this._trace(h, t[l], Be(n, l), t, l, s, a));
  929. else if ("*" === l) this._walk(t, (e => {
  930. p(this._trace(h, t[e], Be(n, e), t, e, s, !0, !0))
  931. }));
  932. else if (".." === l) p(this._trace(h, t, n, r, i, s, a)), this._walk(t, (r => {
  933. "object" == typeof t[r] && p(this._trace(e.slice(), t[r], Be(n, r), t, r, s, !0))
  934. }));
  935. else {
  936. if ("^" === l) return this._hasParentSelector = !0, {
  937. path: n.slice(0, -1),
  938. expr: h,
  939. isParentSelector: !0
  940. };
  941. if ("~" === l) return c = {
  942. path: Be(n, l),
  943. value: i,
  944. parent: r,
  945. parentProperty: null
  946. }, this._handleCallback(c, s, "property"), c;
  947. if ("$" === l) p(this._trace(h, t, n, null, null, s, a));
  948. else if (/^(-?\d*):(-?\d*):?(\d*)$/u.test(l)) p(this._slice(l, h, t, n, r, i, s));
  949. else if (0 === l.indexOf("?(")) {
  950. if (this.currPreventEval) throw new Error("Eval [?(expr)] prevented in JSONPath expression.");
  951. const e = l.replace(/^\?\((.*?)\)$/u, "$1");
  952. this._walk(t, (a => {
  953. this._eval(e, t[a], a, n, r, i) && p(this._trace(h, t[a], Be(n, a), t, a, s, !0))
  954. }))
  955. } else if ("(" === l[0]) {
  956. if (this.currPreventEval) throw new Error("Eval [(expr)] prevented in JSONPath expression.");
  957. p(this._trace(Fe(this._eval(l, t, n[n.length - 1], n.slice(0, -1), r, i), h), t, n, r, i, s, a))
  958. } else if ("@" === l[0]) {
  959. let e = !1;
  960. const a = l.slice(1, -2);
  961. switch (a) {
  962. case "scalar":
  963. t && ["object", "function"].includes(typeof t) || (e = !0);
  964. break;
  965. case "boolean":
  966. case "string":
  967. case "undefined":
  968. case "function":
  969. typeof t === a && (e = !0);
  970. break;
  971. case "integer":
  972. !Number.isFinite(t) || t % 1 || (e = !0);
  973. break;
  974. case "number":
  975. Number.isFinite(t) && (e = !0);
  976. break;
  977. case "nonFinite":
  978. "number" != typeof t || Number.isFinite(t) || (e = !0);
  979. break;
  980. case "object":
  981. t && typeof t === a && (e = !0);
  982. break;
  983. case "array":
  984. Array.isArray(t) && (e = !0);
  985. break;
  986. case "other":
  987. e = this.currOtherTypeCallback(t, n, r, i);
  988. break;
  989. case "null":
  990. null === t && (e = !0);
  991. break;
  992. default:
  993. throw new TypeError("Unknown value type " + a)
  994. }
  995. if (e) return c = {
  996. path: n,
  997. value: t,
  998. parent: r,
  999. parentProperty: i
  1000. }, this._handleCallback(c, s, "value"), c
  1001. } else if ("`" === l[0] && t && we.call(t, l.slice(1))) {
  1002. const e = l.slice(1);
  1003. p(this._trace(h, t[e], Be(n, e), t, e, s, a, !0))
  1004. } else if (l.includes(",")) {
  1005. const e = l.split(",");
  1006. for (const a of e) p(this._trace(Fe(a, h), t, n, r, i, s, !0))
  1007. } else !o && t && we.call(t, l) && p(this._trace(h, t[l], Be(n, l), t, l, s, a, !0))
  1008. }
  1009. if (this._hasParentSelector)
  1010. for (let e = 0; e < u.length; e++) {
  1011. const n = u[e];
  1012. if (n && n.isParentSelector) {
  1013. const o = this._trace(n.expr, t, n.path, r, i, s, a);
  1014. if (Array.isArray(o)) {
  1015. u[e] = o[0];
  1016. const t = o.length;
  1017. for (let n = 1; n < t; n++) e++, u.splice(e, 0, o[n])
  1018. } else u[e] = o
  1019. }
  1020. }
  1021. return u
  1022. }, He.prototype._walk = function(e, t) {
  1023. if (Array.isArray(e)) {
  1024. const n = e.length;
  1025. for (let e = 0; e < n; e++) t(e)
  1026. } else e && "object" == typeof e && Object.keys(e).forEach((e => {
  1027. t(e)
  1028. }))
  1029. }, He.prototype._slice = function(e, t, n, r, i, s, a) {
  1030. if (!Array.isArray(n)) return;
  1031. const o = n.length,
  1032. c = e.split(":"),
  1033. l = c[2] && Number.parseInt(c[2]) || 1;
  1034. let h = c[0] && Number.parseInt(c[0]) || 0,
  1035. u = c[1] && Number.parseInt(c[1]) || o;
  1036. h = h < 0 ? Math.max(0, h + o) : Math.min(o, h), u = u < 0 ? Math.max(0, u + o) : Math.min(o, u);
  1037. const p = [];
  1038. for (let e = h; e < u; e += l) {
  1039. this._trace(Fe(e, t), n, r, i, s, a, !0).forEach((e => {
  1040. p.push(e)
  1041. }))
  1042. }
  1043. return p
  1044. }, He.prototype._eval = function(e, t, n, r, i, s) {
  1045. this.currSandbox._$_parentProperty = s, this.currSandbox._$_parent = i, this.currSandbox._$_property = n, this.currSandbox._$_root = this.json, this.currSandbox._$_v = t;
  1046. const a = e.includes("@path");
  1047. a && (this.currSandbox._$_path = He.toPathString(r.concat([n])));
  1048. const o = "script:" + e;
  1049. if (!He.cache[o]) {
  1050. let t = e.replace(/@parentProperty/gu, "_$_parentProperty").replace(/@parent/gu, "_$_parent").replace(/@property/gu, "_$_property").replace(/@root/gu, "_$_root").replace(/@([.\s)[])/gu, "_$_v$1");
  1051. a && (t = t.replace(/@path/gu, "_$_path")), He.cache[o] = new this.vm.Script(t)
  1052. }
  1053. try {
  1054. return He.cache[o].runInNewContext(this.currSandbox)
  1055. } catch (t) {
  1056. throw new Error("jsonPath: " + t.message + ": " + e)
  1057. }
  1058. }, He.cache = {}, He.toPathString = function(e) {
  1059. const t = e,
  1060. n = t.length;
  1061. let r = "$";
  1062. for (let e = 1; e < n; e++) /^(~|\^|@.*?\(\))$/u.test(t[e]) || (r += /^[0-9*]+$/u.test(t[e]) ? "[" + t[e] + "]" : "['" + t[e] + "']");
  1063. return r
  1064. }, He.toPointer = function(e) {
  1065. const t = e,
  1066. n = t.length;
  1067. let r = "";
  1068. for (let e = 1; e < n; e++) /^(~|\^|@.*?\(\))$/u.test(t[e]) || (r += "/" + t[e].toString().replace(/~/gu, "~0").replace(/\//gu, "~1"));
  1069. return r
  1070. }, He.toPathArray = function(e) {
  1071. const {
  1072. cache: t
  1073. } = He;
  1074. if (t[e]) return t[e].concat();
  1075. const n = [],
  1076. r = e.replace(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/gu, ";$&;").replace(/[['](\??\(.*?\))[\]']/gu, (function(e, t) {
  1077. return "[#" + (n.push(t) - 1) + "]"
  1078. })).replace(/\[['"]([^'\]]*)['"]\]/gu, (function(e, t) {
  1079. return "['" + t.replace(/\./gu, "%@%").replace(/~/gu, "%%@@%%") + "']"
  1080. })).replace(/~/gu, ";~;").replace(/['"]?\.['"]?(?![^[]*\])|\[['"]?/gu, ";").replace(/%@%/gu, ".").replace(/%%@@%%/gu, "~").replace(/(?:;)?(\^+)(?:;)?/gu, (function(e, t) {
  1081. return ";" + t.split("").join(";") + ";"
  1082. })).replace(/;;;|;;/gu, ";..;").replace(/;$|'?\]|'$/gu, ""),
  1083. i = r.split(";").map((function(e) {
  1084. const t = e.match(/#(\d+)/u);
  1085. return t && t[1] ? n[t[1]] : e
  1086. }));
  1087. return t[e] = i, t[e].concat()
  1088. }, He.prototype.vm = Pe;
  1089. var Ge = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {};
  1090. function Ye() {
  1091. throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")
  1092. }
  1093. function qe(e) {
  1094. return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e
  1095. }
  1096. function Ke(e, t) {
  1097. return e(t = {
  1098. exports: {}
  1099. }, t.exports), t.exports
  1100. }
  1101. var je = Ke((function(e) {
  1102. var t = Array.prototype,
  1103. n = Object.prototype,
  1104. r = {
  1105. "&": "&amp;",
  1106. '"': "&quot;",
  1107. "'": "&#39;",
  1108. "<": "&lt;",
  1109. ">": "&gt;"
  1110. },
  1111. i = /[&"'<>]/g,
  1112. s = e.exports = {};
  1113. function a(e, t) {
  1114. return n.hasOwnProperty.call(e, t)
  1115. }
  1116. function o(e) {
  1117. return r[e]
  1118. }
  1119. function c(e, t, n) {
  1120. var r, i, s;
  1121. if (e instanceof Error && (e = (i = e).name + ": " + i.message), Object.setPrototypeOf ? (r = new Error(e), Object.setPrototypeOf(r, c.prototype)) : (r = this, Object.defineProperty(r, "message", {
  1122. enumerable: !1,
  1123. writable: !0,
  1124. value: e
  1125. })), Object.defineProperty(r, "name", {
  1126. value: "Template render error"
  1127. }), Error.captureStackTrace && Error.captureStackTrace(r, this.constructor), i) {
  1128. var a = Object.getOwnPropertyDescriptor(i, "stack");
  1129. (s = a && (a.get || function() {
  1130. return a.value
  1131. })) || (s = function() {
  1132. return i.stack
  1133. })
  1134. } else {
  1135. var o = new Error(e).stack;
  1136. s = function() {
  1137. return o
  1138. }
  1139. }
  1140. return Object.defineProperty(r, "stack", {
  1141. get: function() {
  1142. return s.call(r)
  1143. }
  1144. }), Object.defineProperty(r, "cause", {
  1145. value: i
  1146. }), r.lineno = t, r.colno = n, r.firstUpdate = !0, r.Update = function(e) {
  1147. var t = "(" + (e || "unknown path") + ")";
  1148. return this.firstUpdate && (this.lineno && this.colno ? t += " [Line " + this.lineno + ", Column " + this.colno + "]" : this.lineno && (t += " [Line " + this.lineno + "]")), t += "\n ", this.firstUpdate && (t += " "), this.message = t + (this.message || ""), this.firstUpdate = !1, this
  1149. }, r
  1150. }
  1151. function l(e) {
  1152. return "[object Function]" === n.toString.call(e)
  1153. }
  1154. function h(e) {
  1155. return "[object Array]" === n.toString.call(e)
  1156. }
  1157. function u(e) {
  1158. return "[object String]" === n.toString.call(e)
  1159. }
  1160. function p(e) {
  1161. return "[object Object]" === n.toString.call(e)
  1162. }
  1163. function f(e) {
  1164. var t = function(e) {
  1165. return e ? "string" == typeof e ? e.split(".") : [e] : []
  1166. }(e);
  1167. return function(e) {
  1168. for (var n = e, r = 0; r < t.length; r++) {
  1169. var i = t[r];
  1170. if (!a(n, i)) return;
  1171. n = n[i]
  1172. }
  1173. return n
  1174. }
  1175. }
  1176. function d(e) {
  1177. return Array.prototype.slice.call(e)
  1178. }
  1179. function E(e, t, n) {
  1180. return Array.prototype.indexOf.call(e || [], t, n)
  1181. }
  1182. function m(e) {
  1183. var t = [];
  1184. for (var n in e) a(e, n) && t.push(n);
  1185. return t
  1186. }
  1187. s.hasOwnProp = a, s._prettifyError = function(e, t, n) {
  1188. if (n.Update || (n = new s.TemplateError(n)), n.Update(e), !t) {
  1189. var r = n;
  1190. (n = new Error(r.message)).name = r.name
  1191. }
  1192. return n
  1193. }, Object.setPrototypeOf ? Object.setPrototypeOf(c.prototype, Error.prototype) : c.prototype = Object.create(Error.prototype, {
  1194. constructor: {
  1195. value: c
  1196. }
  1197. }), s.TemplateError = c, s.escape = function(e) {
  1198. return e.replace(i, o)
  1199. }, s.isFunction = l, s.isArray = h, s.isString = u, s.isObject = p, s.getAttrGetter = f, s.groupBy = function(e, t, n) {
  1200. for (var r = {}, i = l(t) ? t : f(t), s = 0; s < e.length; s++) {
  1201. var a = e[s],
  1202. o = i(a, s);
  1203. if (void 0 === o && !0 === n) throw new TypeError('groupby: attribute "' + t + '" resolved to undefined');
  1204. (r[o] || (r[o] = [])).push(a)
  1205. }
  1206. return r
  1207. }, s.toArray = d, s.without = function(e) {
  1208. var t = [];
  1209. if (!e) return t;
  1210. for (var n = e.length, r = d(arguments).slice(1), i = -1; ++i < n;) - 1 === E(r, e[i]) && t.push(e[i]);
  1211. return t
  1212. }, s.repeat = function(e, t) {
  1213. for (var n = "", r = 0; r < t; r++) n += e;
  1214. return n
  1215. }, s.each = function(e, n, r) {
  1216. if (null != e)
  1217. if (t.forEach && e.forEach === t.forEach) e.forEach(n, r);
  1218. else if (e.length === +e.length)
  1219. for (var i = 0, s = e.length; i < s; i++) n.call(r, e[i], i, e)
  1220. }, s.map = function(e, n) {
  1221. var r = [];
  1222. if (null == e) return r;
  1223. if (t.map && e.map === t.map) return e.map(n);
  1224. for (var i = 0; i < e.length; i++) r[r.length] = n(e[i], i);
  1225. return e.length === +e.length && (r.length = e.length), r
  1226. }, s.asyncIter = function(e, t, n) {
  1227. var r = -1;
  1228. ! function i() {
  1229. ++r < e.length ? t(e[r], r, i, n) : n()
  1230. }()
  1231. }, s.asyncFor = function(e, t, n) {
  1232. var r = m(e || {}),
  1233. i = r.length,
  1234. s = -1;
  1235. ! function a() {
  1236. s++;
  1237. var o = r[s];
  1238. s < i ? t(o, e[o], s, i, a) : n()
  1239. }()
  1240. }, s.indexOf = E, s.keys = m, s._entries = function(e) {
  1241. return m(e).map((function(t) {
  1242. return [t, e[t]]
  1243. }))
  1244. }, s._values = function(e) {
  1245. return m(e).map((function(t) {
  1246. return e[t]
  1247. }))
  1248. }, s._assign = s.extend = function(e, t) {
  1249. return e = e || {}, m(t).forEach((function(n) {
  1250. e[n] = t[n]
  1251. })), e
  1252. }, s.inOperator = function(e, t) {
  1253. if (h(t) || u(t)) return -1 !== t.indexOf(e);
  1254. if (p(t)) return e in t;
  1255. throw new Error('Cannot use "in" operator to search for "' + e + '" in unexpected types.')
  1256. }
  1257. }));
  1258. function Ve() {
  1259. throw new Error("setTimeout has not been defined")
  1260. }
  1261. function We() {
  1262. throw new Error("clearTimeout has not been defined")
  1263. }
  1264. var Qe = Ve,
  1265. Xe = We;
  1266. function $e(e) {
  1267. if (Qe === setTimeout) return setTimeout(e, 0);
  1268. if ((Qe === Ve || !Qe) && setTimeout) return Qe = setTimeout, setTimeout(e, 0);
  1269. try {
  1270. return Qe(e, 0)
  1271. } catch (t) {
  1272. try {
  1273. return Qe.call(null, e, 0)
  1274. } catch (t) {
  1275. return Qe.call(this, e, 0)
  1276. }
  1277. }
  1278. }
  1279. "function" == typeof be.setTimeout && (Qe = setTimeout), "function" == typeof be.clearTimeout && (Xe = clearTimeout);
  1280. var ze, Je = [],
  1281. Ze = !1,
  1282. et = -1;
  1283. function tt() {
  1284. Ze && ze && (Ze = !1, ze.length ? Je = ze.concat(Je) : et = -1, Je.length && nt())
  1285. }
  1286. function nt() {
  1287. if (!Ze) {
  1288. var e = $e(tt);
  1289. Ze = !0;
  1290. for (var t = Je.length; t;) {
  1291. for (ze = Je, Je = []; ++et < t;) ze && ze[et].run();
  1292. et = -1, t = Je.length
  1293. }
  1294. ze = null, Ze = !1,
  1295. function(e) {
  1296. if (Xe === clearTimeout) return clearTimeout(e);
  1297. if ((Xe === We || !Xe) && clearTimeout) return Xe = clearTimeout, clearTimeout(e);
  1298. try {
  1299. Xe(e)
  1300. } catch (t) {
  1301. try {
  1302. return Xe.call(null, e)
  1303. } catch (t) {
  1304. return Xe.call(this, e)
  1305. }
  1306. }
  1307. }(e)
  1308. }
  1309. }
  1310. function rt(e, t) {
  1311. this.fun = e, this.array = t
  1312. }
  1313. rt.prototype.run = function() {
  1314. this.fun.apply(null, this.array)
  1315. };
  1316. function it() {}
  1317. var st = it,
  1318. at = it,
  1319. ot = it,
  1320. ct = it,
  1321. lt = it,
  1322. ht = it,
  1323. ut = it;
  1324. var pt = be.performance || {},
  1325. ft = pt.now || pt.mozNow || pt.msNow || pt.oNow || pt.webkitNow || function() {
  1326. return (new Date).getTime()
  1327. };
  1328. var dt = new Date;
  1329. var Et = {
  1330. nextTick: function(e) {
  1331. var t = new Array(arguments.length - 1);
  1332. if (arguments.length > 1)
  1333. for (var n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
  1334. Je.push(new rt(e, t)), 1 !== Je.length || Ze || $e(nt)
  1335. },
  1336. title: "browser",
  1337. browser: !0,
  1338. env: {},
  1339. argv: [],
  1340. version: "",
  1341. versions: {},
  1342. on: st,
  1343. addListener: at,
  1344. once: ot,
  1345. off: ct,
  1346. removeListener: lt,
  1347. removeAllListeners: ht,
  1348. emit: ut,
  1349. binding: function(e) {
  1350. throw new Error("process.binding is not supported")
  1351. },
  1352. cwd: function() {
  1353. return "/"
  1354. },
  1355. chdir: function(e) {
  1356. throw new Error("process.chdir is not supported")
  1357. },
  1358. umask: function() {
  1359. return 0
  1360. },
  1361. hrtime: function(e) {
  1362. var t = .001 * ft.call(pt),
  1363. n = Math.floor(t),
  1364. r = Math.floor(t % 1 * 1e9);
  1365. return e && (n -= e[0], (r -= e[1]) < 0 && (n--, r += 1e9)), [n, r]
  1366. },
  1367. platform: "browser",
  1368. release: {},
  1369. config: {},
  1370. uptime: function() {
  1371. return (new Date - dt) / 1e3
  1372. }
  1373. };
  1374. function mt() {}
  1375. function Tt() {
  1376. Tt.init.call(this)
  1377. }
  1378. function _t(e) {
  1379. return void 0 === e._maxListeners ? Tt.defaultMaxListeners : e._maxListeners
  1380. }
  1381. function At(e, t, n) {
  1382. if (t) e.call(n);
  1383. else
  1384. for (var r = e.length, i = yt(e, r), s = 0; s < r; ++s) i[s].call(n)
  1385. }
  1386. function gt(e, t, n, r) {
  1387. if (t) e.call(n, r);
  1388. else
  1389. for (var i = e.length, s = yt(e, i), a = 0; a < i; ++a) s[a].call(n, r)
  1390. }
  1391. function Nt(e, t, n, r, i) {
  1392. if (t) e.call(n, r, i);
  1393. else
  1394. for (var s = e.length, a = yt(e, s), o = 0; o < s; ++o) a[o].call(n, r, i)
  1395. }
  1396. function Ct(e, t, n, r, i, s) {
  1397. if (t) e.call(n, r, i, s);
  1398. else
  1399. for (var a = e.length, o = yt(e, a), c = 0; c < a; ++c) o[c].call(n, r, i, s)
  1400. }
  1401. function It(e, t, n, r) {
  1402. if (t) e.apply(n, r);
  1403. else
  1404. for (var i = e.length, s = yt(e, i), a = 0; a < i; ++a) s[a].apply(n, r)
  1405. }
  1406. function St(e, t, n, r) {
  1407. var i, s, a;
  1408. if ("function" != typeof n) throw new TypeError('"listener" argument must be a function');
  1409. if ((s = e._events) ? (s.newListener && (e.emit("newListener", t, n.listener ? n.listener : n), s = e._events), a = s[t]) : (s = e._events = new mt, e._eventsCount = 0), a) {
  1410. if ("function" == typeof a ? a = s[t] = r ? [n, a] : [a, n] : r ? a.unshift(n) : a.push(n), !a.warned && (i = _t(e)) && i > 0 && a.length > i) {
  1411. a.warned = !0;
  1412. var o = new Error("Possible EventEmitter memory leak detected. " + a.length + " " + t + " listeners added. Use emitter.setMaxListeners() to increase limit");
  1413. o.name = "MaxListenersExceededWarning", o.emitter = e, o.type = t, o.count = a.length,
  1414. function(e) {
  1415. "function" == typeof console.warn ? console.warn(e) : console.log(e)
  1416. }(o)
  1417. }
  1418. } else a = s[t] = n, ++e._eventsCount;
  1419. return e
  1420. }
  1421. function bt(e, t, n) {
  1422. var r = !1;
  1423. function i() {
  1424. e.removeListener(t, i), r || (r = !0, n.apply(e, arguments))
  1425. }
  1426. return i.listener = n, i
  1427. }
  1428. function Ot(e) {
  1429. var t = this._events;
  1430. if (t) {
  1431. var n = t[e];
  1432. if ("function" == typeof n) return 1;
  1433. if (n) return n.length
  1434. }
  1435. return 0
  1436. }
  1437. function yt(e, t) {
  1438. for (var n = new Array(t); t--;) n[t] = e[t];
  1439. return n
  1440. }
  1441. function Lt() {
  1442. var e;
  1443. Tt.call(this), this.__emitError = (e = this, function(t) {
  1444. e.emit("error", t)
  1445. })
  1446. }
  1447. function kt() {
  1448. return new Lt
  1449. }
  1450. mt.prototype = Object.create(null), Tt.EventEmitter = Tt, Tt.usingDomains = !1, Tt.prototype.domain = void 0, Tt.prototype._events = void 0, Tt.prototype._maxListeners = void 0, Tt.defaultMaxListeners = 10, Tt.init = function() {
  1451. this.domain = null, Tt.usingDomains && undefined.active, this._events && this._events !== Object.getPrototypeOf(this)._events || (this._events = new mt, this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0
  1452. }, Tt.prototype.setMaxListeners = function(e) {
  1453. if ("number" != typeof e || e < 0 || isNaN(e)) throw new TypeError('"n" argument must be a positive number');
  1454. return this._maxListeners = e, this
  1455. }, Tt.prototype.getMaxListeners = function() {
  1456. return _t(this)
  1457. }, Tt.prototype.emit = function(e) {
  1458. var t, n, r, i, s, a, o, c = "error" === e;
  1459. if (a = this._events) c = c && null == a.error;
  1460. else if (!c) return !1;
  1461. if (o = this.domain, c) {
  1462. if (t = arguments[1], !o) {
  1463. if (t instanceof Error) throw t;
  1464. var l = new Error('Uncaught, unspecified "error" event. (' + t + ")");
  1465. throw l.context = t, l
  1466. }
  1467. return t || (t = new Error('Uncaught, unspecified "error" event')), t.domainEmitter = this, t.domain = o, t.domainThrown = !1, o.emit("error", t), !1
  1468. }
  1469. if (!(n = a[e])) return !1;
  1470. var h = "function" == typeof n;
  1471. switch (r = arguments.length) {
  1472. case 1:
  1473. At(n, h, this);
  1474. break;
  1475. case 2:
  1476. gt(n, h, this, arguments[1]);
  1477. break;
  1478. case 3:
  1479. Nt(n, h, this, arguments[1], arguments[2]);
  1480. break;
  1481. case 4:
  1482. Ct(n, h, this, arguments[1], arguments[2], arguments[3]);
  1483. break;
  1484. default:
  1485. for (i = new Array(r - 1), s = 1; s < r; s++) i[s - 1] = arguments[s];
  1486. It(n, h, this, i)
  1487. }
  1488. return !0
  1489. }, Tt.prototype.addListener = function(e, t) {
  1490. return St(this, e, t, !1)
  1491. }, Tt.prototype.on = Tt.prototype.addListener, Tt.prototype.prependListener = function(e, t) {
  1492. return St(this, e, t, !0)
  1493. }, Tt.prototype.once = function(e, t) {
  1494. if ("function" != typeof t) throw new TypeError('"listener" argument must be a function');
  1495. return this.on(e, bt(this, e, t)), this
  1496. }, Tt.prototype.prependOnceListener = function(e, t) {
  1497. if ("function" != typeof t) throw new TypeError('"listener" argument must be a function');
  1498. return this.prependListener(e, bt(this, e, t)), this
  1499. }, Tt.prototype.removeListener = function(e, t) {
  1500. var n, r, i, s, a;
  1501. if ("function" != typeof t) throw new TypeError('"listener" argument must be a function');
  1502. if (!(r = this._events)) return this;
  1503. if (!(n = r[e])) return this;
  1504. if (n === t || n.listener && n.listener === t) 0 == --this._eventsCount ? this._events = new mt : (delete r[e], r.removeListener && this.emit("removeListener", e, n.listener || t));
  1505. else if ("function" != typeof n) {
  1506. for (i = -1, s = n.length; s-- > 0;)
  1507. if (n[s] === t || n[s].listener && n[s].listener === t) {
  1508. a = n[s].listener, i = s;
  1509. break
  1510. } if (i < 0) return this;
  1511. if (1 === n.length) {
  1512. if (n[0] = void 0, 0 == --this._eventsCount) return this._events = new mt, this;
  1513. delete r[e]
  1514. } else ! function(e, t) {
  1515. for (var n = t, r = n + 1, i = e.length; r < i; n += 1, r += 1) e[n] = e[r];
  1516. e.pop()
  1517. }(n, i);
  1518. r.removeListener && this.emit("removeListener", e, a || t)
  1519. }
  1520. return this
  1521. }, Tt.prototype.removeAllListeners = function(e) {
  1522. var t, n;
  1523. if (!(n = this._events)) return this;
  1524. if (!n.removeListener) return 0 === arguments.length ? (this._events = new mt, this._eventsCount = 0) : n[e] && (0 == --this._eventsCount ? this._events = new mt : delete n[e]), this;
  1525. if (0 === arguments.length) {
  1526. for (var r, i = Object.keys(n), s = 0; s < i.length; ++s) "removeListener" !== (r = i[s]) && this.removeAllListeners(r);
  1527. return this.removeAllListeners("removeListener"), this._events = new mt, this._eventsCount = 0, this
  1528. }
  1529. if ("function" == typeof(t = n[e])) this.removeListener(e, t);
  1530. else if (t)
  1531. do {
  1532. this.removeListener(e, t[t.length - 1])
  1533. } while (t[0]);
  1534. return this
  1535. }, Tt.prototype.listeners = function(e) {
  1536. var t, n = this._events;
  1537. return n && (t = n[e]) ? "function" == typeof t ? [t.listener || t] : function(e) {
  1538. for (var t = new Array(e.length), n = 0; n < t.length; ++n) t[n] = e[n].listener || e[n];
  1539. return t
  1540. }(t) : []
  1541. }, Tt.listenerCount = function(e, t) {
  1542. return "function" == typeof e.listenerCount ? e.listenerCount(t) : Ot.call(e, t)
  1543. }, Tt.prototype.listenerCount = Ot, Tt.prototype.eventNames = function() {
  1544. return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : []
  1545. }, ("function" == typeof Object.create ? function(e, t) {
  1546. e.super_ = t, e.prototype = Object.create(t.prototype, {
  1547. constructor: {
  1548. value: e,
  1549. enumerable: !1,
  1550. writable: !0,
  1551. configurable: !0
  1552. }
  1553. })
  1554. } : function(e, t) {
  1555. e.super_ = t;
  1556. var n = function() {};
  1557. n.prototype = t.prototype, e.prototype = new n, e.prototype.constructor = e
  1558. })(Lt, Tt), Lt.prototype.add = function(e) {
  1559. e.on("error", this.__emitError)
  1560. }, Lt.prototype.remove = function(e) {
  1561. e.removeListener("error", this.__emitError)
  1562. }, Lt.prototype.bind = function(e) {
  1563. var t = this.__emitError;
  1564. return function() {
  1565. var n = Array.prototype.slice.call(arguments);
  1566. try {
  1567. e.apply(null, n)
  1568. } catch (e) {
  1569. t(e)
  1570. }
  1571. }
  1572. }, Lt.prototype.intercept = function(e) {
  1573. var t = this.__emitError;
  1574. return function(n) {
  1575. if (n) t(n);
  1576. else {
  1577. var r = Array.prototype.slice.call(arguments, 1);
  1578. try {
  1579. e.apply(null, r)
  1580. } catch (n) {
  1581. t(n)
  1582. }
  1583. }
  1584. }
  1585. }, Lt.prototype.run = function(e) {
  1586. var t = this.__emitError;
  1587. try {
  1588. e()
  1589. } catch (e) {
  1590. t(e)
  1591. }
  1592. return this
  1593. }, Lt.prototype.dispose = function() {
  1594. return this.removeAllListeners(), this
  1595. }, Lt.prototype.enter = Lt.prototype.exit = function() {
  1596. return this
  1597. };
  1598. var vt, Dt = {
  1599. Domain: Lt,
  1600. createDomain: kt,
  1601. create: kt
  1602. },
  1603. Rt = "function" == typeof setImmediate,
  1604. Mt = Pt;
  1605. function Pt(e) {
  1606. xt.length || (Ut(), wt = !0), xt[xt.length] = e
  1607. }
  1608. var xt = [],
  1609. wt = !1,
  1610. Bt = 0;
  1611. function Ft() {
  1612. for (; Bt < xt.length;) {
  1613. var e = Bt;
  1614. if (Bt += 1, xt[e].call(), Bt > 1024) {
  1615. for (var t = 0, n = xt.length - Bt; t < n; t++) xt[t] = xt[t + Bt];
  1616. xt.length -= Bt, Bt = 0
  1617. }
  1618. }
  1619. xt.length = 0, Bt = 0, wt = !1
  1620. }
  1621. function Ut() {
  1622. var e = Et.domain;
  1623. e && (vt || (vt = Dt), vt.active = Et.domain = null), wt && Rt ? setImmediate(Ft) : Et.nextTick(Ft), e && (vt.active = Et.domain = e)
  1624. }
  1625. Pt.requestFlush = Ut;
  1626. var Ht = [],
  1627. Gt = function(e) {
  1628. var t;
  1629. t = Ht.length ? Ht.pop() : new Yt;
  1630. t.task = e, t.domain = Et.domain, Mt(t)
  1631. };
  1632. function Yt() {
  1633. this.task = null, this.domain = null
  1634. }
  1635. Yt.prototype.call = function() {
  1636. this.domain && this.domain.enter();
  1637. var e = !0;
  1638. try {
  1639. this.task.call(), e = !1, this.domain && this.domain.exit()
  1640. } finally {
  1641. e && Mt.requestFlush(), this.task = null, this.domain = null, Ht.push(this)
  1642. }
  1643. };
  1644. var qt = Ke((function(e) {
  1645. ! function(t) {
  1646. var n = function() {
  1647. var e = Array.prototype.slice.call(arguments);
  1648. "function" == typeof e[0] && e[0].apply(null, e.splice(1))
  1649. },
  1650. r = function(e) {
  1651. "function" == typeof setImmediate ? setImmediate(e) : void 0 !== Et && Et.nextTick ? Et.nextTick(e) : setTimeout(e, 0)
  1652. },
  1653. i = Array.isArray || function(e) {
  1654. return "[object Array]" === Object.prototype.toString.call(e)
  1655. },
  1656. s = function(e, t, s) {
  1657. var a = s ? r : n;
  1658. if (t = t || function() {}, !i(e)) {
  1659. var o = new Error("First argument to waterfall must be an array of functions");
  1660. return t(o)
  1661. }
  1662. if (!e.length) return t();
  1663. var c = function(e) {
  1664. return function(n) {
  1665. if (n) t.apply(null, arguments), t = function() {};
  1666. else {
  1667. var r = Array.prototype.slice.call(arguments, 1),
  1668. i = e.next();
  1669. i ? r.push(c(i)) : r.push(t), a((function() {
  1670. e.apply(null, r)
  1671. }))
  1672. }
  1673. }
  1674. };
  1675. c(function(e) {
  1676. var t = function(n) {
  1677. var r = function() {
  1678. return e.length && e[n].apply(null, arguments), r.next()
  1679. };
  1680. return r.next = function() {
  1681. return n < e.length - 1 ? t(n + 1) : null
  1682. }, r
  1683. };
  1684. return t(0)
  1685. }(e))()
  1686. };
  1687. e.exports ? e.exports = s : t.waterfall = s
  1688. }(Ge)
  1689. }));
  1690. function Kt(e, t, n, r) {
  1691. return {
  1692. type: e,
  1693. value: t,
  1694. lineno: n,
  1695. colno: r
  1696. }
  1697. }
  1698. var jt = function() {
  1699. function e(e, t) {
  1700. this.str = e, this.index = 0, this.len = e.length, this.lineno = 0, this.colno = 0, this.in_code = !1;
  1701. var n = (t = t || {}).tags || {};
  1702. this.tags = {
  1703. BLOCK_START: n.blockStart || "{%",
  1704. BLOCK_END: n.blockEnd || "%}",
  1705. VARIABLE_START: n.variableStart || "{{",
  1706. VARIABLE_END: n.variableEnd || "}}",
  1707. COMMENT_START: n.commentStart || "{#",
  1708. COMMENT_END: n.commentEnd || "#}"
  1709. }, this.trimBlocks = !!t.trimBlocks, this.lstripBlocks = !!t.lstripBlocks
  1710. }
  1711. var t = e.prototype;
  1712. return t.nextToken = function() {
  1713. var e, t = this.lineno,
  1714. n = this.colno;
  1715. if (this.in_code) {
  1716. var r = this.current();
  1717. if (this.isFinished()) return null;
  1718. if ('"' === r || "'" === r) return Kt("string", this._parseString(r), t, n);
  1719. if (e = this._extract(" \n\t\r ")) return Kt("whitespace", e, t, n);
  1720. if ((e = this._extractString(this.tags.BLOCK_END)) || (e = this._extractString("-" + this.tags.BLOCK_END))) return this.in_code = !1, this.trimBlocks && ("\n" === (r = this.current()) ? this.forward() : "\r" === r && (this.forward(), "\n" === (r = this.current()) ? this.forward() : this.back())), Kt("block-end", e, t, n);
  1721. if ((e = this._extractString(this.tags.VARIABLE_END)) || (e = this._extractString("-" + this.tags.VARIABLE_END))) return this.in_code = !1, Kt("variable-end", e, t, n);
  1722. if ("r" === r && "/" === this.str.charAt(this.index + 1)) {
  1723. this.forwardN(2);
  1724. for (var i = ""; !this.isFinished();) {
  1725. if ("/" === this.current() && "\\" !== this.previous()) {
  1726. this.forward();
  1727. break
  1728. }
  1729. i += this.current(), this.forward()
  1730. }
  1731. for (var s = ["g", "i", "m", "y"], a = ""; !this.isFinished();) {
  1732. if (!(-1 !== s.indexOf(this.current()))) break;
  1733. a += this.current(), this.forward()
  1734. }
  1735. return Kt("regex", {
  1736. body: i,
  1737. flags: a
  1738. }, t, n)
  1739. }
  1740. if (-1 !== "()[]{}%*-+~/#,:|.<>=!".indexOf(r)) {
  1741. this.forward();
  1742. var o, c = ["==", "===", "!=", "!==", "<=", ">=", "//", "**"],
  1743. l = r + this.current();
  1744. switch (-1 !== je.indexOf(c, l) && (this.forward(), r = l, -1 !== je.indexOf(c, l + this.current()) && (r = l + this.current(), this.forward())), r) {
  1745. case "(":
  1746. o = "left-paren";
  1747. break;
  1748. case ")":
  1749. o = "right-paren";
  1750. break;
  1751. case "[":
  1752. o = "left-bracket";
  1753. break;
  1754. case "]":
  1755. o = "right-bracket";
  1756. break;
  1757. case "{":
  1758. o = "left-curly";
  1759. break;
  1760. case "}":
  1761. o = "right-curly";
  1762. break;
  1763. case ",":
  1764. o = "comma";
  1765. break;
  1766. case ":":
  1767. o = "colon";
  1768. break;
  1769. case "~":
  1770. o = "tilde";
  1771. break;
  1772. case "|":
  1773. o = "pipe";
  1774. break;
  1775. default:
  1776. o = "operator"
  1777. }
  1778. return Kt(o, r, t, n)
  1779. }
  1780. if ((e = this._extractUntil(" \n\t\r ()[]{}%*-+~/#,:|.<>=!")).match(/^[-+]?[0-9]+$/)) return "." === this.current() ? (this.forward(), Kt("float", e + "." + this._extract("0123456789"), t, n)) : Kt("int", e, t, n);
  1781. if (e.match(/^(true|false)$/)) return Kt("boolean", e, t, n);
  1782. if ("none" === e) return Kt("none", e, t, n);
  1783. if ("null" === e) return Kt("none", e, t, n);
  1784. if (e) return Kt("symbol", e, t, n);
  1785. throw new Error("Unexpected value while parsing: " + e)
  1786. }
  1787. var h, u = this.tags.BLOCK_START.charAt(0) + this.tags.VARIABLE_START.charAt(0) + this.tags.COMMENT_START.charAt(0) + this.tags.COMMENT_END.charAt(0);
  1788. if (this.isFinished()) return null;
  1789. if ((e = this._extractString(this.tags.BLOCK_START + "-")) || (e = this._extractString(this.tags.BLOCK_START))) return this.in_code = !0, Kt("block-start", e, t, n);
  1790. if ((e = this._extractString(this.tags.VARIABLE_START + "-")) || (e = this._extractString(this.tags.VARIABLE_START))) return this.in_code = !0, Kt("variable-start", e, t, n);
  1791. e = "";
  1792. var p = !1;
  1793. for (this._matches(this.tags.COMMENT_START) && (p = !0, e = this._extractString(this.tags.COMMENT_START)); null !== (h = this._extractUntil(u));) {
  1794. if (e += h, (this._matches(this.tags.BLOCK_START) || this._matches(this.tags.VARIABLE_START) || this._matches(this.tags.COMMENT_START)) && !p) {
  1795. if (this.lstripBlocks && this._matches(this.tags.BLOCK_START) && this.colno > 0 && this.colno <= e.length) {
  1796. var f = e.slice(-this.colno);
  1797. if (/^\s+$/.test(f) && !(e = e.slice(0, -this.colno)).length) return this.nextToken()
  1798. }
  1799. break
  1800. }
  1801. if (this._matches(this.tags.COMMENT_END)) {
  1802. if (!p) throw new Error("unexpected end of comment");
  1803. e += this._extractString(this.tags.COMMENT_END);
  1804. break
  1805. }
  1806. e += this.current(), this.forward()
  1807. }
  1808. if (null === h && p) throw new Error("expected end of comment, got end of file");
  1809. return Kt(p ? "comment" : "data", e, t, n)
  1810. }, t._parseString = function(e) {
  1811. this.forward();
  1812. for (var t = ""; !this.isFinished() && this.current() !== e;) {
  1813. var n = this.current();
  1814. if ("\\" === n) {
  1815. switch (this.forward(), this.current()) {
  1816. case "n":
  1817. t += "\n";
  1818. break;
  1819. case "t":
  1820. t += "\t";
  1821. break;
  1822. case "r":
  1823. t += "\r";
  1824. break;
  1825. default:
  1826. t += this.current()
  1827. }
  1828. this.forward()
  1829. } else t += n, this.forward()
  1830. }
  1831. return this.forward(), t
  1832. }, t._matches = function(e) {
  1833. return this.index + e.length > this.len ? null : this.str.slice(this.index, this.index + e.length) === e
  1834. }, t._extractString = function(e) {
  1835. return this._matches(e) ? (this.forwardN(e.length), e) : null
  1836. }, t._extractUntil = function(e) {
  1837. return this._extractMatching(!0, e || "")
  1838. }, t._extract = function(e) {
  1839. return this._extractMatching(!1, e)
  1840. }, t._extractMatching = function(e, t) {
  1841. if (this.isFinished()) return null;
  1842. var n = t.indexOf(this.current());
  1843. if (e && -1 === n || !e && -1 !== n) {
  1844. var r = this.current();
  1845. this.forward();
  1846. for (var i = t.indexOf(this.current());
  1847. (e && -1 === i || !e && -1 !== i) && !this.isFinished();) r += this.current(), this.forward(), i = t.indexOf(this.current());
  1848. return r
  1849. }
  1850. return ""
  1851. }, t._extractRegex = function(e) {
  1852. var t = this.currentStr().match(e);
  1853. return t ? (this.forwardN(t[0].length), t) : null
  1854. }, t.isFinished = function() {
  1855. return this.index >= this.len
  1856. }, t.forwardN = function(e) {
  1857. for (var t = 0; t < e; t++) this.forward()
  1858. }, t.forward = function() {
  1859. this.index++, "\n" === this.previous() ? (this.lineno++, this.colno = 0) : this.colno++
  1860. }, t.backN = function(e) {
  1861. for (var t = 0; t < e; t++) this.back()
  1862. }, t.back = function() {
  1863. if (this.index--, "\n" === this.current()) {
  1864. this.lineno--;
  1865. var e = this.src.lastIndexOf("\n", this.index - 1);
  1866. this.colno = -1 === e ? this.index : this.index - e
  1867. } else this.colno--
  1868. }, t.current = function() {
  1869. return this.isFinished() ? "" : this.str.charAt(this.index)
  1870. }, t.currentStr = function() {
  1871. return this.isFinished() ? "" : this.str.substr(this.index)
  1872. }, t.previous = function() {
  1873. return this.str.charAt(this.index - 1)
  1874. }, e
  1875. }(),
  1876. Vt = {
  1877. lex: function(e, t) {
  1878. return new jt(e, t)
  1879. },
  1880. TOKEN_STRING: "string",
  1881. TOKEN_WHITESPACE: "whitespace",
  1882. TOKEN_DATA: "data",
  1883. TOKEN_BLOCK_START: "block-start",
  1884. TOKEN_BLOCK_END: "block-end",
  1885. TOKEN_VARIABLE_START: "variable-start",
  1886. TOKEN_VARIABLE_END: "variable-end",
  1887. TOKEN_COMMENT: "comment",
  1888. TOKEN_LEFT_PAREN: "left-paren",
  1889. TOKEN_RIGHT_PAREN: "right-paren",
  1890. TOKEN_LEFT_BRACKET: "left-bracket",
  1891. TOKEN_RIGHT_BRACKET: "right-bracket",
  1892. TOKEN_LEFT_CURLY: "left-curly",
  1893. TOKEN_RIGHT_CURLY: "right-curly",
  1894. TOKEN_OPERATOR: "operator",
  1895. TOKEN_COMMA: "comma",
  1896. TOKEN_COLON: "colon",
  1897. TOKEN_TILDE: "tilde",
  1898. TOKEN_PIPE: "pipe",
  1899. TOKEN_INT: "int",
  1900. TOKEN_FLOAT: "float",
  1901. TOKEN_BOOLEAN: "boolean",
  1902. TOKEN_NONE: "none",
  1903. TOKEN_SYMBOL: "symbol",
  1904. TOKEN_SPECIAL: "special",
  1905. TOKEN_REGEX: "regex"
  1906. };
  1907. function Wt(e, t) {
  1908. for (var n = 0; n < t.length; n++) {
  1909. var r = t[n];
  1910. r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r)
  1911. }
  1912. }
  1913. function Qt(e, t, n) {
  1914. return t && Wt(e.prototype, t), n && Wt(e, n), e
  1915. }
  1916. function Xt(e, t) {
  1917. e.prototype = Object.create(t.prototype), e.prototype.constructor = e, $t(e, t)
  1918. }
  1919. function $t(e, t) {
  1920. return $t = Object.setPrototypeOf || function(e, t) {
  1921. return e.__proto__ = t, e
  1922. }, $t(e, t)
  1923. }
  1924. function zt(e, t, n) {
  1925. n = n || {}, je.keys(n).forEach((function(t) {
  1926. n[t] = function(e, t) {
  1927. return "function" != typeof e || "function" != typeof t ? t : function() {
  1928. var n = this.parent;
  1929. this.parent = e;
  1930. var r = t.apply(this, arguments);
  1931. return this.parent = n, r
  1932. }
  1933. }(e.prototype[t], n[t])
  1934. }));
  1935. var r = function(e) {
  1936. function n() {
  1937. return e.apply(this, arguments) || this
  1938. }
  1939. return Xt(n, e), Qt(n, [{
  1940. key: "typename",
  1941. get: function() {
  1942. return t
  1943. }
  1944. }]), n
  1945. }(e);
  1946. return je._assign(r.prototype, n), r
  1947. }
  1948. var Jt = function() {
  1949. function e() {
  1950. this.init.apply(this, arguments)
  1951. }
  1952. return e.prototype.init = function() {}, e.extend = function(e, t) {
  1953. return "object" == typeof e && (t = e, e = "anonymous"), zt(this, e, t)
  1954. }, Qt(e, [{
  1955. key: "typename",
  1956. get: function() {
  1957. return this.constructor.name
  1958. }
  1959. }]), e
  1960. }(),
  1961. Zt = function(e) {
  1962. function t() {
  1963. var t, n;
  1964. return (t = n = e.call(this) || this).init.apply(t, arguments), n
  1965. }
  1966. return Xt(t, e), t.prototype.init = function() {}, t.extend = function(e, t) {
  1967. return "object" == typeof e && (t = e, e = "anonymous"), zt(this, e, t)
  1968. }, Qt(t, [{
  1969. key: "typename",
  1970. get: function() {
  1971. return this.constructor.name
  1972. }
  1973. }]), t
  1974. }(Tt),
  1975. en = {
  1976. Obj: Jt,
  1977. EmitterObj: Zt
  1978. };
  1979. function tn(e, t) {
  1980. for (var n = 0; n < t.length; n++) {
  1981. var r = t[n];
  1982. r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r)
  1983. }
  1984. }
  1985. function nn(e, t, n) {
  1986. return t && tn(e.prototype, t), n && tn(e, n), e
  1987. }
  1988. function rn(e, t) {
  1989. e.prototype = Object.create(t.prototype), e.prototype.constructor = e, sn(e, t)
  1990. }
  1991. function sn(e, t) {
  1992. return sn = Object.setPrototypeOf || function(e, t) {
  1993. return e.__proto__ = t, e
  1994. }, sn(e, t)
  1995. }
  1996. function an(e, t, n) {
  1997. e instanceof t && n.push(e), e instanceof on && e.findAll(t, n)
  1998. }
  1999. var on = function(e) {
  2000. function t() {
  2001. return e.apply(this, arguments) || this
  2002. }
  2003. rn(t, e);
  2004. var n = t.prototype;
  2005. return n.init = function(e, t) {
  2006. for (var n = arguments, r = this, i = arguments.length, s = new Array(i > 2 ? i - 2 : 0), a = 2; a < i; a++) s[a - 2] = arguments[a];
  2007. this.lineno = e, this.colno = t, this.fields.forEach((function(e, t) {
  2008. var i = n[t + 2];
  2009. void 0 === i && (i = null), r[e] = i
  2010. }))
  2011. }, n.findAll = function(e, t) {
  2012. var n = this;
  2013. return t = t || [], this instanceof ln ? this.children.forEach((function(n) {
  2014. return an(n, e, t)
  2015. })) : this.fields.forEach((function(r) {
  2016. return an(n[r], e, t)
  2017. })), t
  2018. }, n.iterFields = function(e) {
  2019. var t = this;
  2020. this.fields.forEach((function(n) {
  2021. e(t[n], n)
  2022. }))
  2023. }, t
  2024. }(en.Obj),
  2025. cn = function(e) {
  2026. function t() {
  2027. return e.apply(this, arguments) || this
  2028. }
  2029. return rn(t, e), nn(t, [{
  2030. key: "typename",
  2031. get: function() {
  2032. return "Value"
  2033. }
  2034. }, {
  2035. key: "fields",
  2036. get: function() {
  2037. return ["value"]
  2038. }
  2039. }]), t
  2040. }(on),
  2041. ln = function(e) {
  2042. function t() {
  2043. return e.apply(this, arguments) || this
  2044. }
  2045. rn(t, e);
  2046. var n = t.prototype;
  2047. return n.init = function(t, n, r) {
  2048. e.prototype.init.call(this, t, n, r || [])
  2049. }, n.addChild = function(e) {
  2050. this.children.push(e)
  2051. }, nn(t, [{
  2052. key: "typename",
  2053. get: function() {
  2054. return "NodeList"
  2055. }
  2056. }, {
  2057. key: "fields",
  2058. get: function() {
  2059. return ["children"]
  2060. }
  2061. }]), t
  2062. }(on),
  2063. hn = ln.extend("Root"),
  2064. un = cn.extend("Literal"),
  2065. pn = cn.extend("Symbol"),
  2066. fn = ln.extend("Group"),
  2067. dn = ln.extend("Array"),
  2068. En = on.extend("Pair", {
  2069. fields: ["key", "value"]
  2070. }),
  2071. mn = ln.extend("Dict"),
  2072. Tn = on.extend("LookupVal", {
  2073. fields: ["target", "val"]
  2074. }),
  2075. _n = on.extend("If", {
  2076. fields: ["cond", "body", "else_"]
  2077. }),
  2078. An = _n.extend("IfAsync"),
  2079. gn = on.extend("InlineIf", {
  2080. fields: ["cond", "body", "else_"]
  2081. }),
  2082. Nn = on.extend("For", {
  2083. fields: ["arr", "name", "body", "else_"]
  2084. }),
  2085. Cn = Nn.extend("AsyncEach"),
  2086. In = Nn.extend("AsyncAll"),
  2087. Sn = on.extend("Macro", {
  2088. fields: ["name", "args", "body"]
  2089. }),
  2090. bn = Sn.extend("Caller"),
  2091. On = on.extend("Import", {
  2092. fields: ["template", "target", "withContext"]
  2093. }),
  2094. yn = function(e) {
  2095. function t() {
  2096. return e.apply(this, arguments) || this
  2097. }
  2098. return rn(t, e), t.prototype.init = function(t, n, r, i, s) {
  2099. e.prototype.init.call(this, t, n, r, i || new ln, s)
  2100. }, nn(t, [{
  2101. key: "typename",
  2102. get: function() {
  2103. return "FromImport"
  2104. }
  2105. }, {
  2106. key: "fields",
  2107. get: function() {
  2108. return ["template", "names", "withContext"]
  2109. }
  2110. }]), t
  2111. }(on),
  2112. Ln = on.extend("FunCall", {
  2113. fields: ["name", "args"]
  2114. }),
  2115. kn = Ln.extend("Filter"),
  2116. vn = kn.extend("FilterAsync", {
  2117. fields: ["name", "args", "symbol"]
  2118. }),
  2119. Dn = mn.extend("KeywordArgs"),
  2120. Rn = on.extend("Block", {
  2121. fields: ["name", "body"]
  2122. }),
  2123. Mn = on.extend("Super", {
  2124. fields: ["blockName", "symbol"]
  2125. }),
  2126. Pn = on.extend("TemplateRef", {
  2127. fields: ["template"]
  2128. }).extend("Extends"),
  2129. xn = on.extend("Include", {
  2130. fields: ["template", "ignoreMissing"]
  2131. }),
  2132. wn = on.extend("Set", {
  2133. fields: ["targets", "value"]
  2134. }),
  2135. Bn = on.extend("Switch", {
  2136. fields: ["expr", "cases", "default"]
  2137. }),
  2138. Fn = on.extend("Case", {
  2139. fields: ["cond", "body"]
  2140. }),
  2141. Un = ln.extend("Output"),
  2142. Hn = on.extend("Capture", {
  2143. fields: ["body"]
  2144. }),
  2145. Gn = un.extend("TemplateData"),
  2146. Yn = on.extend("UnaryOp", {
  2147. fields: ["target"]
  2148. }),
  2149. qn = on.extend("BinOp", {
  2150. fields: ["left", "right"]
  2151. }),
  2152. Kn = qn.extend("In"),
  2153. jn = qn.extend("Is"),
  2154. Vn = qn.extend("Or"),
  2155. Wn = qn.extend("And"),
  2156. Qn = Yn.extend("Not"),
  2157. Xn = qn.extend("Add"),
  2158. $n = qn.extend("Concat"),
  2159. zn = qn.extend("Sub"),
  2160. Jn = qn.extend("Mul"),
  2161. Zn = qn.extend("Div"),
  2162. er = qn.extend("FloorDiv"),
  2163. tr = qn.extend("Mod"),
  2164. nr = qn.extend("Pow"),
  2165. rr = Yn.extend("Neg"),
  2166. ir = Yn.extend("Pos"),
  2167. sr = on.extend("Compare", {
  2168. fields: ["expr", "ops"]
  2169. }),
  2170. ar = on.extend("CompareOperand", {
  2171. fields: ["expr", "type"]
  2172. }),
  2173. or = on.extend("CallExtension", {
  2174. init: function(e, t, n, r) {
  2175. this.parent(), this.extName = e.__name || e, this.prop = t, this.args = n || new ln, this.contentArgs = r || [], this.autoescape = e.autoescape
  2176. },
  2177. fields: ["extName", "prop", "args", "contentArgs"]
  2178. }),
  2179. cr = or.extend("CallExtensionAsync");
  2180. function lr(e, t, n) {
  2181. var r = e.split("\n");
  2182. r.forEach((function(e, i) {
  2183. e && (n && i > 0 || !n) && Et.stdout.write(" ".repeat(t));
  2184. var s = i === r.length - 1 ? "" : "\n";
  2185. Et.stdout.write("" + e + s)
  2186. }))
  2187. }
  2188. var hr = {
  2189. Node: on,
  2190. Root: hn,
  2191. NodeList: ln,
  2192. Value: cn,
  2193. Literal: un,
  2194. Symbol: pn,
  2195. Group: fn,
  2196. Array: dn,
  2197. Pair: En,
  2198. Dict: mn,
  2199. Output: Un,
  2200. Capture: Hn,
  2201. TemplateData: Gn,
  2202. If: _n,
  2203. IfAsync: An,
  2204. InlineIf: gn,
  2205. For: Nn,
  2206. AsyncEach: Cn,
  2207. AsyncAll: In,
  2208. Macro: Sn,
  2209. Caller: bn,
  2210. Import: On,
  2211. FromImport: yn,
  2212. FunCall: Ln,
  2213. Filter: kn,
  2214. FilterAsync: vn,
  2215. KeywordArgs: Dn,
  2216. Block: Rn,
  2217. Super: Mn,
  2218. Extends: Pn,
  2219. Include: xn,
  2220. Set: wn,
  2221. Switch: Bn,
  2222. Case: Fn,
  2223. LookupVal: Tn,
  2224. BinOp: qn,
  2225. In: Kn,
  2226. Is: jn,
  2227. Or: Vn,
  2228. And: Wn,
  2229. Not: Qn,
  2230. Add: Xn,
  2231. Concat: $n,
  2232. Sub: zn,
  2233. Mul: Jn,
  2234. Div: Zn,
  2235. FloorDiv: er,
  2236. Mod: tr,
  2237. Pow: nr,
  2238. Neg: rr,
  2239. Pos: ir,
  2240. Compare: sr,
  2241. CompareOperand: ar,
  2242. CallExtension: or,
  2243. CallExtensionAsync: cr,
  2244. printNodes: function e(t, n) {
  2245. if (n = n || 0, lr(t.typename + ": ", n), t instanceof ln) lr("\n"), t.children.forEach((function(t) {
  2246. e(t, n + 2)
  2247. }));
  2248. else if (t instanceof or) lr(t.extName + "." + t.prop + "\n"), t.args && e(t.args, n + 2), t.contentArgs && t.contentArgs.forEach((function(t) {
  2249. e(t, n + 2)
  2250. }));
  2251. else {
  2252. var r = [],
  2253. i = null;
  2254. t.iterFields((function(e, t) {
  2255. e instanceof on ? r.push([t, e]) : (i = i || {})[t] = e
  2256. })), i ? lr(JSON.stringify(i, null, 2) + "\n", null, !0) : lr("\n"), r.forEach((function(t) {
  2257. var r = t[0],
  2258. i = t[1];
  2259. lr("[" + r + "] =>", n + 2), e(i, n + 4)
  2260. }))
  2261. }
  2262. }
  2263. };
  2264. function ur(e, t) {
  2265. return ur = Object.setPrototypeOf || function(e, t) {
  2266. return e.__proto__ = t, e
  2267. }, ur(e, t)
  2268. }
  2269. hr.Node, hr.Root, hr.NodeList, hr.Value, hr.Literal, hr.Group, hr.Pair, hr.Dict, hr.Output, hr.Capture, hr.TemplateData, hr.If, hr.IfAsync, hr.InlineIf, hr.For, hr.AsyncEach, hr.AsyncAll, hr.Macro, hr.Caller, hr.Import, hr.FromImport, hr.FunCall, hr.Filter, hr.FilterAsync, hr.KeywordArgs, hr.Block, hr.Super, hr.Extends, hr.Include, hr.Switch, hr.Case, hr.LookupVal, hr.BinOp, hr.In, hr.Is, hr.Or, hr.And, hr.Not, hr.Add, hr.Concat, hr.Sub, hr.Mul, hr.Div, hr.FloorDiv, hr.Mod, hr.Pow, hr.Neg, hr.Pos, hr.Compare, hr.CompareOperand, hr.CallExtension, hr.CallExtensionAsync, hr.printNodes;
  2270. var pr = function(e) {
  2271. var t, n;
  2272. function r() {
  2273. return e.apply(this, arguments) || this
  2274. }
  2275. n = e, (t = r).prototype = Object.create(n.prototype), t.prototype.constructor = t, ur(t, n);
  2276. var i = r.prototype;
  2277. return i.init = function(e) {
  2278. this.tokens = e, this.peeked = null, this.breakOnBlocks = null, this.dropLeadingWhitespace = !1, this.extensions = []
  2279. }, i.nextToken = function(e) {
  2280. var t;
  2281. if (this.peeked) {
  2282. if (e || this.peeked.type !== Vt.TOKEN_WHITESPACE) return t = this.peeked, this.peeked = null, t;
  2283. this.peeked = null
  2284. }
  2285. if (t = this.tokens.nextToken(), !e)
  2286. for (; t && t.type === Vt.TOKEN_WHITESPACE;) t = this.tokens.nextToken();
  2287. return t
  2288. }, i.peekToken = function() {
  2289. return this.peeked = this.peeked || this.nextToken(), this.peeked
  2290. }, i.pushToken = function(e) {
  2291. if (this.peeked) throw new Error("pushToken: can only push one token on between reads");
  2292. this.peeked = e
  2293. }, i.error = function(e, t, n) {
  2294. if (void 0 === t || void 0 === n) {
  2295. var r = this.peekToken() || {};
  2296. t = r.lineno, n = r.colno
  2297. }
  2298. return void 0 !== t && (t += 1), void 0 !== n && (n += 1), new je.TemplateError(e, t, n)
  2299. }, i.fail = function(e, t, n) {
  2300. throw this.error(e, t, n)
  2301. }, i.skip = function(e) {
  2302. var t = this.nextToken();
  2303. return !(!t || t.type !== e) || (this.pushToken(t), !1)
  2304. }, i.expect = function(e) {
  2305. var t = this.nextToken();
  2306. return t.type !== e && this.fail("expected " + e + ", got " + t.type, t.lineno, t.colno), t
  2307. }, i.skipValue = function(e, t) {
  2308. var n = this.nextToken();
  2309. return !(!n || n.type !== e || n.value !== t) || (this.pushToken(n), !1)
  2310. }, i.skipSymbol = function(e) {
  2311. return this.skipValue(Vt.TOKEN_SYMBOL, e)
  2312. }, i.advanceAfterBlockEnd = function(e) {
  2313. var t;
  2314. return e || ((t = this.peekToken()) || this.fail("unexpected end of file"), t.type !== Vt.TOKEN_SYMBOL && this.fail("advanceAfterBlockEnd: expected symbol token or explicit name to be passed"), e = this.nextToken().value), (t = this.nextToken()) && t.type === Vt.TOKEN_BLOCK_END ? "-" === t.value.charAt(0) && (this.dropLeadingWhitespace = !0) : this.fail("expected block end in " + e + " statement"), t
  2315. }, i.advanceAfterVariableEnd = function() {
  2316. var e = this.nextToken();
  2317. e && e.type === Vt.TOKEN_VARIABLE_END ? this.dropLeadingWhitespace = "-" === e.value.charAt(e.value.length - this.tokens.tags.VARIABLE_END.length - 1) : (this.pushToken(e), this.fail("expected variable end"))
  2318. }, i.parseFor = function() {
  2319. var e, t, n = this.peekToken();
  2320. if (this.skipSymbol("for") ? (e = new hr.For(n.lineno, n.colno), t = "endfor") : this.skipSymbol("asyncEach") ? (e = new hr.AsyncEach(n.lineno, n.colno), t = "endeach") : this.skipSymbol("asyncAll") ? (e = new hr.AsyncAll(n.lineno, n.colno), t = "endall") : this.fail("parseFor: expected for{Async}", n.lineno, n.colno), e.name = this.parsePrimary(), e.name instanceof hr.Symbol || this.fail("parseFor: variable name expected for loop"), this.peekToken().type === Vt.TOKEN_COMMA) {
  2321. var r = e.name;
  2322. for (e.name = new hr.Array(r.lineno, r.colno), e.name.addChild(r); this.skip(Vt.TOKEN_COMMA);) {
  2323. var i = this.parsePrimary();
  2324. e.name.addChild(i)
  2325. }
  2326. }
  2327. return this.skipSymbol("in") || this.fail('parseFor: expected "in" keyword for loop', n.lineno, n.colno), e.arr = this.parseExpression(), this.advanceAfterBlockEnd(n.value), e.body = this.parseUntilBlocks(t, "else"), this.skipSymbol("else") && (this.advanceAfterBlockEnd("else"), e.else_ = this.parseUntilBlocks(t)), this.advanceAfterBlockEnd(), e
  2328. }, i.parseMacro = function() {
  2329. var e = this.peekToken();
  2330. this.skipSymbol("macro") || this.fail("expected macro");
  2331. var t = this.parsePrimary(!0),
  2332. n = this.parseSignature(),
  2333. r = new hr.Macro(e.lineno, e.colno, t, n);
  2334. return this.advanceAfterBlockEnd(e.value), r.body = this.parseUntilBlocks("endmacro"), this.advanceAfterBlockEnd(), r
  2335. }, i.parseCall = function() {
  2336. var e = this.peekToken();
  2337. this.skipSymbol("call") || this.fail("expected call");
  2338. var t = this.parseSignature(!0) || new hr.NodeList,
  2339. n = this.parsePrimary();
  2340. this.advanceAfterBlockEnd(e.value);
  2341. var r = this.parseUntilBlocks("endcall");
  2342. this.advanceAfterBlockEnd();
  2343. var i = new hr.Symbol(e.lineno, e.colno, "caller"),
  2344. s = new hr.Caller(e.lineno, e.colno, i, t, r),
  2345. a = n.args.children;
  2346. return a[a.length - 1] instanceof hr.KeywordArgs || a.push(new hr.KeywordArgs), a[a.length - 1].addChild(new hr.Pair(e.lineno, e.colno, i, s)), new hr.Output(e.lineno, e.colno, [n])
  2347. }, i.parseWithContext = function() {
  2348. var e = this.peekToken(),
  2349. t = null;
  2350. return this.skipSymbol("with") ? t = !0 : this.skipSymbol("without") && (t = !1), null !== t && (this.skipSymbol("context") || this.fail("parseFrom: expected context after with/without", e.lineno, e.colno)), t
  2351. }, i.parseImport = function() {
  2352. var e = this.peekToken();
  2353. this.skipSymbol("import") || this.fail("parseImport: expected import", e.lineno, e.colno);
  2354. var t = this.parseExpression();
  2355. this.skipSymbol("as") || this.fail('parseImport: expected "as" keyword', e.lineno, e.colno);
  2356. var n = this.parseExpression(),
  2357. r = this.parseWithContext(),
  2358. i = new hr.Import(e.lineno, e.colno, t, n, r);
  2359. return this.advanceAfterBlockEnd(e.value), i
  2360. }, i.parseFrom = function() {
  2361. var e = this.peekToken();
  2362. this.skipSymbol("from") || this.fail("parseFrom: expected from");
  2363. var t = this.parseExpression();
  2364. this.skipSymbol("import") || this.fail("parseFrom: expected import", e.lineno, e.colno);
  2365. for (var n, r = new hr.NodeList;;) {
  2366. var i = this.peekToken();
  2367. if (i.type === Vt.TOKEN_BLOCK_END) {
  2368. r.children.length || this.fail("parseFrom: Expected at least one import name", e.lineno, e.colno), "-" === i.value.charAt(0) && (this.dropLeadingWhitespace = !0), this.nextToken();
  2369. break
  2370. }
  2371. r.children.length > 0 && !this.skip(Vt.TOKEN_COMMA) && this.fail("parseFrom: expected comma", e.lineno, e.colno);
  2372. var s = this.parsePrimary();
  2373. if ("_" === s.value.charAt(0) && this.fail("parseFrom: names starting with an underscore cannot be imported", s.lineno, s.colno), this.skipSymbol("as")) {
  2374. var a = this.parsePrimary();
  2375. r.addChild(new hr.Pair(s.lineno, s.colno, s, a))
  2376. } else r.addChild(s);
  2377. n = this.parseWithContext()
  2378. }
  2379. return new hr.FromImport(e.lineno, e.colno, t, r, n)
  2380. }, i.parseBlock = function() {
  2381. var e = this.peekToken();
  2382. this.skipSymbol("block") || this.fail("parseBlock: expected block", e.lineno, e.colno);
  2383. var t = new hr.Block(e.lineno, e.colno);
  2384. t.name = this.parsePrimary(), t.name instanceof hr.Symbol || this.fail("parseBlock: variable name expected", e.lineno, e.colno), this.advanceAfterBlockEnd(e.value), t.body = this.parseUntilBlocks("endblock"), this.skipSymbol("endblock"), this.skipSymbol(t.name.value);
  2385. var n = this.peekToken();
  2386. return n || this.fail("parseBlock: expected endblock, got end of file"), this.advanceAfterBlockEnd(n.value), t
  2387. }, i.parseExtends = function() {
  2388. var e = "extends",
  2389. t = this.peekToken();
  2390. this.skipSymbol(e) || this.fail("parseTemplateRef: expected extends");
  2391. var n = new hr.Extends(t.lineno, t.colno);
  2392. return n.template = this.parseExpression(), this.advanceAfterBlockEnd(t.value), n
  2393. }, i.parseInclude = function() {
  2394. var e = "include",
  2395. t = this.peekToken();
  2396. this.skipSymbol(e) || this.fail("parseInclude: expected include");
  2397. var n = new hr.Include(t.lineno, t.colno);
  2398. return n.template = this.parseExpression(), this.skipSymbol("ignore") && this.skipSymbol("missing") && (n.ignoreMissing = !0), this.advanceAfterBlockEnd(t.value), n
  2399. }, i.parseIf = function() {
  2400. var e, t = this.peekToken();
  2401. this.skipSymbol("if") || this.skipSymbol("elif") || this.skipSymbol("elseif") ? e = new hr.If(t.lineno, t.colno) : this.skipSymbol("ifAsync") ? e = new hr.IfAsync(t.lineno, t.colno) : this.fail("parseIf: expected if, elif, or elseif", t.lineno, t.colno), e.cond = this.parseExpression(), this.advanceAfterBlockEnd(t.value), e.body = this.parseUntilBlocks("elif", "elseif", "else", "endif");
  2402. var n = this.peekToken();
  2403. switch (n && n.value) {
  2404. case "elseif":
  2405. case "elif":
  2406. e.else_ = this.parseIf();
  2407. break;
  2408. case "else":
  2409. this.advanceAfterBlockEnd(), e.else_ = this.parseUntilBlocks("endif"), this.advanceAfterBlockEnd();
  2410. break;
  2411. case "endif":
  2412. e.else_ = null, this.advanceAfterBlockEnd();
  2413. break;
  2414. default:
  2415. this.fail("parseIf: expected elif, else, or endif, got end of file")
  2416. }
  2417. return e
  2418. }, i.parseSet = function() {
  2419. var e = this.peekToken();
  2420. this.skipSymbol("set") || this.fail("parseSet: expected set", e.lineno, e.colno);
  2421. for (var t, n = new hr.Set(e.lineno, e.colno, []);
  2422. (t = this.parsePrimary()) && (n.targets.push(t), this.skip(Vt.TOKEN_COMMA)););
  2423. return this.skipValue(Vt.TOKEN_OPERATOR, "=") ? (n.value = this.parseExpression(), this.advanceAfterBlockEnd(e.value)) : this.skip(Vt.TOKEN_BLOCK_END) ? (n.body = new hr.Capture(e.lineno, e.colno, this.parseUntilBlocks("endset")), n.value = null, this.advanceAfterBlockEnd()) : this.fail("parseSet: expected = or block end in set tag", e.lineno, e.colno), n
  2424. }, i.parseSwitch = function() {
  2425. var e = "switch",
  2426. t = "endswitch",
  2427. n = "case",
  2428. r = "default",
  2429. i = this.peekToken();
  2430. this.skipSymbol(e) || this.skipSymbol(n) || this.skipSymbol(r) || this.fail('parseSwitch: expected "switch," "case" or "default"', i.lineno, i.colno);
  2431. var s = this.parseExpression();
  2432. this.advanceAfterBlockEnd(e), this.parseUntilBlocks(n, r, t);
  2433. var a, o = this.peekToken(),
  2434. c = [];
  2435. do {
  2436. this.skipSymbol(n);
  2437. var l = this.parseExpression();
  2438. this.advanceAfterBlockEnd(e);
  2439. var h = this.parseUntilBlocks(n, r, t);
  2440. c.push(new hr.Case(o.line, o.col, l, h)), o = this.peekToken()
  2441. } while (o && o.value === n);
  2442. switch (o.value) {
  2443. case r:
  2444. this.advanceAfterBlockEnd(), a = this.parseUntilBlocks(t), this.advanceAfterBlockEnd();
  2445. break;
  2446. case t:
  2447. this.advanceAfterBlockEnd();
  2448. break;
  2449. default:
  2450. this.fail('parseSwitch: expected "case," "default" or "endswitch," got EOF.')
  2451. }
  2452. return new hr.Switch(i.lineno, i.colno, s, c, a)
  2453. }, i.parseStatement = function() {
  2454. var e = this.peekToken();
  2455. if (e.type !== Vt.TOKEN_SYMBOL && this.fail("tag name expected", e.lineno, e.colno), this.breakOnBlocks && -1 !== je.indexOf(this.breakOnBlocks, e.value)) return null;
  2456. switch (e.value) {
  2457. case "raw":
  2458. return this.parseRaw();
  2459. case "verbatim":
  2460. return this.parseRaw("verbatim");
  2461. case "if":
  2462. case "ifAsync":
  2463. return this.parseIf();
  2464. case "for":
  2465. case "asyncEach":
  2466. case "asyncAll":
  2467. return this.parseFor();
  2468. case "block":
  2469. return this.parseBlock();
  2470. case "extends":
  2471. return this.parseExtends();
  2472. case "include":
  2473. return this.parseInclude();
  2474. case "set":
  2475. return this.parseSet();
  2476. case "macro":
  2477. return this.parseMacro();
  2478. case "call":
  2479. return this.parseCall();
  2480. case "import":
  2481. return this.parseImport();
  2482. case "from":
  2483. return this.parseFrom();
  2484. case "filter":
  2485. return this.parseFilterStatement();
  2486. case "switch":
  2487. return this.parseSwitch();
  2488. default:
  2489. if (this.extensions.length)
  2490. for (var t = 0; t < this.extensions.length; t++) {
  2491. var n = this.extensions[t];
  2492. if (-1 !== je.indexOf(n.tags || [], e.value)) return n.parse(this, hr, Vt)
  2493. }
  2494. this.fail("unknown block tag: " + e.value, e.lineno, e.colno)
  2495. }
  2496. }, i.parseRaw = function(e) {
  2497. for (var t = "end" + (e = e || "raw"), n = new RegExp("([\\s\\S]*?){%\\s*(" + e + "|" + t + ")\\s*(?=%})%}"), r = 1, i = "", s = null, a = this.advanceAfterBlockEnd();
  2498. (s = this.tokens._extractRegex(n)) && r > 0;) {
  2499. var o = s[0],
  2500. c = s[1],
  2501. l = s[2];
  2502. l === e ? r += 1 : l === t && (r -= 1), 0 === r ? (i += c, this.tokens.backN(o.length - c.length)) : i += o
  2503. }
  2504. return new hr.Output(a.lineno, a.colno, [new hr.TemplateData(a.lineno, a.colno, i)])
  2505. }, i.parsePostfix = function(e) {
  2506. for (var t, n = this.peekToken(); n;) {
  2507. if (n.type === Vt.TOKEN_LEFT_PAREN) e = new hr.FunCall(n.lineno, n.colno, e, this.parseSignature());
  2508. else if (n.type === Vt.TOKEN_LEFT_BRACKET)(t = this.parseAggregate()).children.length > 1 && this.fail("invalid index"), e = new hr.LookupVal(n.lineno, n.colno, e, t.children[0]);
  2509. else {
  2510. if (n.type !== Vt.TOKEN_OPERATOR || "." !== n.value) break;
  2511. this.nextToken();
  2512. var r = this.nextToken();
  2513. r.type !== Vt.TOKEN_SYMBOL && this.fail("expected name as lookup value, got " + r.value, r.lineno, r.colno), t = new hr.Literal(r.lineno, r.colno, r.value), e = new hr.LookupVal(n.lineno, n.colno, e, t)
  2514. }
  2515. n = this.peekToken()
  2516. }
  2517. return e
  2518. }, i.parseExpression = function() {
  2519. return this.parseInlineIf()
  2520. }, i.parseInlineIf = function() {
  2521. var e = this.parseOr();
  2522. if (this.skipSymbol("if")) {
  2523. var t = this.parseOr(),
  2524. n = e;
  2525. (e = new hr.InlineIf(e.lineno, e.colno)).body = n, e.cond = t, this.skipSymbol("else") ? e.else_ = this.parseOr() : e.else_ = null
  2526. }
  2527. return e
  2528. }, i.parseOr = function() {
  2529. for (var e = this.parseAnd(); this.skipSymbol("or");) {
  2530. var t = this.parseAnd();
  2531. e = new hr.Or(e.lineno, e.colno, e, t)
  2532. }
  2533. return e
  2534. }, i.parseAnd = function() {
  2535. for (var e = this.parseNot(); this.skipSymbol("and");) {
  2536. var t = this.parseNot();
  2537. e = new hr.And(e.lineno, e.colno, e, t)
  2538. }
  2539. return e
  2540. }, i.parseNot = function() {
  2541. var e = this.peekToken();
  2542. return this.skipSymbol("not") ? new hr.Not(e.lineno, e.colno, this.parseNot()) : this.parseIn()
  2543. }, i.parseIn = function() {
  2544. for (var e = this.parseIs();;) {
  2545. var t = this.nextToken();
  2546. if (!t) break;
  2547. var n = t.type === Vt.TOKEN_SYMBOL && "not" === t.value;
  2548. if (n || this.pushToken(t), !this.skipSymbol("in")) {
  2549. n && this.pushToken(t);
  2550. break
  2551. }
  2552. var r = this.parseIs();
  2553. e = new hr.In(e.lineno, e.colno, e, r), n && (e = new hr.Not(e.lineno, e.colno, e))
  2554. }
  2555. return e
  2556. }, i.parseIs = function() {
  2557. var e = this.parseCompare();
  2558. if (this.skipSymbol("is")) {
  2559. var t = this.skipSymbol("not"),
  2560. n = this.parseCompare();
  2561. e = new hr.Is(e.lineno, e.colno, e, n), t && (e = new hr.Not(e.lineno, e.colno, e))
  2562. }
  2563. return e
  2564. }, i.parseCompare = function() {
  2565. for (var e = ["==", "===", "!=", "!==", "<", ">", "<=", ">="], t = this.parseConcat(), n = [];;) {
  2566. var r = this.nextToken();
  2567. if (!r) break;
  2568. if (-1 === e.indexOf(r.value)) {
  2569. this.pushToken(r);
  2570. break
  2571. }
  2572. n.push(new hr.CompareOperand(r.lineno, r.colno, this.parseConcat(), r.value))
  2573. }
  2574. return n.length ? new hr.Compare(n[0].lineno, n[0].colno, t, n) : t
  2575. }, i.parseConcat = function() {
  2576. for (var e = this.parseAdd(); this.skipValue(Vt.TOKEN_TILDE, "~");) {
  2577. var t = this.parseAdd();
  2578. e = new hr.Concat(e.lineno, e.colno, e, t)
  2579. }
  2580. return e
  2581. }, i.parseAdd = function() {
  2582. for (var e = this.parseSub(); this.skipValue(Vt.TOKEN_OPERATOR, "+");) {
  2583. var t = this.parseSub();
  2584. e = new hr.Add(e.lineno, e.colno, e, t)
  2585. }
  2586. return e
  2587. }, i.parseSub = function() {
  2588. for (var e = this.parseMul(); this.skipValue(Vt.TOKEN_OPERATOR, "-");) {
  2589. var t = this.parseMul();
  2590. e = new hr.Sub(e.lineno, e.colno, e, t)
  2591. }
  2592. return e
  2593. }, i.parseMul = function() {
  2594. for (var e = this.parseDiv(); this.skipValue(Vt.TOKEN_OPERATOR, "*");) {
  2595. var t = this.parseDiv();
  2596. e = new hr.Mul(e.lineno, e.colno, e, t)
  2597. }
  2598. return e
  2599. }, i.parseDiv = function() {
  2600. for (var e = this.parseFloorDiv(); this.skipValue(Vt.TOKEN_OPERATOR, "/");) {
  2601. var t = this.parseFloorDiv();
  2602. e = new hr.Div(e.lineno, e.colno, e, t)
  2603. }
  2604. return e
  2605. }, i.parseFloorDiv = function() {
  2606. for (var e = this.parseMod(); this.skipValue(Vt.TOKEN_OPERATOR, "//");) {
  2607. var t = this.parseMod();
  2608. e = new hr.FloorDiv(e.lineno, e.colno, e, t)
  2609. }
  2610. return e
  2611. }, i.parseMod = function() {
  2612. for (var e = this.parsePow(); this.skipValue(Vt.TOKEN_OPERATOR, "%");) {
  2613. var t = this.parsePow();
  2614. e = new hr.Mod(e.lineno, e.colno, e, t)
  2615. }
  2616. return e
  2617. }, i.parsePow = function() {
  2618. for (var e = this.parseUnary(); this.skipValue(Vt.TOKEN_OPERATOR, "**");) {
  2619. var t = this.parseUnary();
  2620. e = new hr.Pow(e.lineno, e.colno, e, t)
  2621. }
  2622. return e
  2623. }, i.parseUnary = function(e) {
  2624. var t, n = this.peekToken();
  2625. return t = this.skipValue(Vt.TOKEN_OPERATOR, "-") ? new hr.Neg(n.lineno, n.colno, this.parseUnary(!0)) : this.skipValue(Vt.TOKEN_OPERATOR, "+") ? new hr.Pos(n.lineno, n.colno, this.parseUnary(!0)) : this.parsePrimary(), e || (t = this.parseFilter(t)), t
  2626. }, i.parsePrimary = function(e) {
  2627. var t, n = this.nextToken(),
  2628. r = null;
  2629. if (n ? n.type === Vt.TOKEN_STRING ? t = n.value : n.type === Vt.TOKEN_INT ? t = parseInt(n.value, 10) : n.type === Vt.TOKEN_FLOAT ? t = parseFloat(n.value) : n.type === Vt.TOKEN_BOOLEAN ? "true" === n.value ? t = !0 : "false" === n.value ? t = !1 : this.fail("invalid boolean: " + n.value, n.lineno, n.colno) : n.type === Vt.TOKEN_NONE ? t = null : n.type === Vt.TOKEN_REGEX && (t = new RegExp(n.value.body, n.value.flags)) : this.fail("expected expression, got end of file"), void 0 !== t ? r = new hr.Literal(n.lineno, n.colno, t) : n.type === Vt.TOKEN_SYMBOL ? r = new hr.Symbol(n.lineno, n.colno, n.value) : (this.pushToken(n), r = this.parseAggregate()), e || (r = this.parsePostfix(r)), r) return r;
  2630. throw this.error("unexpected token: " + n.value, n.lineno, n.colno)
  2631. }, i.parseFilterName = function() {
  2632. for (var e = this.expect(Vt.TOKEN_SYMBOL), t = e.value; this.skipValue(Vt.TOKEN_OPERATOR, ".");) t += "." + this.expect(Vt.TOKEN_SYMBOL).value;
  2633. return new hr.Symbol(e.lineno, e.colno, t)
  2634. }, i.parseFilterArgs = function(e) {
  2635. return this.peekToken().type === Vt.TOKEN_LEFT_PAREN ? this.parsePostfix(e).args.children : []
  2636. }, i.parseFilter = function(e) {
  2637. for (; this.skip(Vt.TOKEN_PIPE);) {
  2638. var t = this.parseFilterName();
  2639. e = new hr.Filter(t.lineno, t.colno, t, new hr.NodeList(t.lineno, t.colno, [e].concat(this.parseFilterArgs(e))))
  2640. }
  2641. return e
  2642. }, i.parseFilterStatement = function() {
  2643. var e = this.peekToken();
  2644. this.skipSymbol("filter") || this.fail("parseFilterStatement: expected filter");
  2645. var t = this.parseFilterName(),
  2646. n = this.parseFilterArgs(t);
  2647. this.advanceAfterBlockEnd(e.value);
  2648. var r = new hr.Capture(t.lineno, t.colno, this.parseUntilBlocks("endfilter"));
  2649. this.advanceAfterBlockEnd();
  2650. var i = new hr.Filter(t.lineno, t.colno, t, new hr.NodeList(t.lineno, t.colno, [r].concat(n)));
  2651. return new hr.Output(t.lineno, t.colno, [i])
  2652. }, i.parseAggregate = function() {
  2653. var e, t = this.nextToken();
  2654. switch (t.type) {
  2655. case Vt.TOKEN_LEFT_PAREN:
  2656. e = new hr.Group(t.lineno, t.colno);
  2657. break;
  2658. case Vt.TOKEN_LEFT_BRACKET:
  2659. e = new hr.Array(t.lineno, t.colno);
  2660. break;
  2661. case Vt.TOKEN_LEFT_CURLY:
  2662. e = new hr.Dict(t.lineno, t.colno);
  2663. break;
  2664. default:
  2665. return null
  2666. }
  2667. for (;;) {
  2668. var n = this.peekToken().type;
  2669. if (n === Vt.TOKEN_RIGHT_PAREN || n === Vt.TOKEN_RIGHT_BRACKET || n === Vt.TOKEN_RIGHT_CURLY) {
  2670. this.nextToken();
  2671. break
  2672. }
  2673. if (e.children.length > 0 && (this.skip(Vt.TOKEN_COMMA) || this.fail("parseAggregate: expected comma after expression", t.lineno, t.colno)), e instanceof hr.Dict) {
  2674. var r = this.parsePrimary();
  2675. this.skip(Vt.TOKEN_COLON) || this.fail("parseAggregate: expected colon after dict key", t.lineno, t.colno);
  2676. var i = this.parseExpression();
  2677. e.addChild(new hr.Pair(r.lineno, r.colno, r, i))
  2678. } else {
  2679. var s = this.parseExpression();
  2680. e.addChild(s)
  2681. }
  2682. }
  2683. return e
  2684. }, i.parseSignature = function(e, t) {
  2685. var n = this.peekToken();
  2686. if (!t && n.type !== Vt.TOKEN_LEFT_PAREN) {
  2687. if (e) return null;
  2688. this.fail("expected arguments", n.lineno, n.colno)
  2689. }
  2690. n.type === Vt.TOKEN_LEFT_PAREN && (n = this.nextToken());
  2691. for (var r = new hr.NodeList(n.lineno, n.colno), i = new hr.KeywordArgs(n.lineno, n.colno), s = !1;;) {
  2692. if (n = this.peekToken(), !t && n.type === Vt.TOKEN_RIGHT_PAREN) {
  2693. this.nextToken();
  2694. break
  2695. }
  2696. if (t && n.type === Vt.TOKEN_BLOCK_END) break;
  2697. if (s && !this.skip(Vt.TOKEN_COMMA)) this.fail("parseSignature: expected comma after expression", n.lineno, n.colno);
  2698. else {
  2699. var a = this.parseExpression();
  2700. this.skipValue(Vt.TOKEN_OPERATOR, "=") ? i.addChild(new hr.Pair(a.lineno, a.colno, a, this.parseExpression())) : r.addChild(a)
  2701. }
  2702. s = !0
  2703. }
  2704. return i.children.length && r.addChild(i), r
  2705. }, i.parseUntilBlocks = function() {
  2706. for (var e = this.breakOnBlocks, t = arguments.length, n = new Array(t), r = 0; r < t; r++) n[r] = arguments[r];
  2707. this.breakOnBlocks = n;
  2708. var i = this.parse();
  2709. return this.breakOnBlocks = e, i
  2710. }, i.parseNodes = function() {
  2711. for (var e, t = []; e = this.nextToken();)
  2712. if (e.type === Vt.TOKEN_DATA) {
  2713. var n = e.value,
  2714. r = this.peekToken(),
  2715. i = r && r.value;
  2716. this.dropLeadingWhitespace && (n = n.replace(/^\s*/, ""), this.dropLeadingWhitespace = !1), r && (r.type === Vt.TOKEN_BLOCK_START && "-" === i.charAt(i.length - 1) || r.type === Vt.TOKEN_VARIABLE_START && "-" === i.charAt(this.tokens.tags.VARIABLE_START.length) || r.type === Vt.TOKEN_COMMENT && "-" === i.charAt(this.tokens.tags.COMMENT_START.length)) && (n = n.replace(/\s*$/, "")), t.push(new hr.Output(e.lineno, e.colno, [new hr.TemplateData(e.lineno, e.colno, n)]))
  2717. } else if (e.type === Vt.TOKEN_BLOCK_START) {
  2718. this.dropLeadingWhitespace = !1;
  2719. var s = this.parseStatement();
  2720. if (!s) break;
  2721. t.push(s)
  2722. } else if (e.type === Vt.TOKEN_VARIABLE_START) {
  2723. var a = this.parseExpression();
  2724. this.dropLeadingWhitespace = !1, this.advanceAfterVariableEnd(), t.push(new hr.Output(e.lineno, e.colno, [a]))
  2725. } else e.type === Vt.TOKEN_COMMENT ? this.dropLeadingWhitespace = "-" === e.value.charAt(e.value.length - this.tokens.tags.COMMENT_END.length - 1) : this.fail("Unexpected token at top-level: " + e.type, e.lineno, e.colno);
  2726. return t
  2727. }, i.parse = function() {
  2728. return new hr.NodeList(0, 0, this.parseNodes())
  2729. }, i.parseAsRoot = function() {
  2730. return new hr.Root(0, 0, this.parseNodes())
  2731. }, r
  2732. }(en.Obj),
  2733. fr = {
  2734. parse: function(e, t, n) {
  2735. var r = new pr(Vt.lex(e, n));
  2736. return void 0 !== t && (r.extensions = t), r.parseAsRoot()
  2737. },
  2738. Parser: pr
  2739. },
  2740. dr = 0;
  2741. function Er() {
  2742. return "hole_" + dr++
  2743. }
  2744. function mr(e, t) {
  2745. for (var n = null, r = 0; r < e.length; r++) {
  2746. var i = t(e[r]);
  2747. i !== e[r] && (n || (n = e.slice()), n[r] = i)
  2748. }
  2749. return n || e
  2750. }
  2751. function Tr(e, t, n) {
  2752. if (!(e instanceof hr.Node)) return e;
  2753. if (!n) {
  2754. var r = t(e);
  2755. if (r && r !== e) return r
  2756. }
  2757. if (e instanceof hr.NodeList) {
  2758. var i = mr(e.children, (function(e) {
  2759. return Tr(e, t, n)
  2760. }));
  2761. i !== e.children && (e = new hr[e.typename](e.lineno, e.colno, i))
  2762. } else if (e instanceof hr.CallExtension) {
  2763. var s = Tr(e.args, t, n),
  2764. a = mr(e.contentArgs, (function(e) {
  2765. return Tr(e, t, n)
  2766. }));
  2767. s === e.args && a === e.contentArgs || (e = new hr[e.typename](e.extName, e.prop, s, a))
  2768. } else {
  2769. var o = e.fields.map((function(t) {
  2770. return e[t]
  2771. })),
  2772. c = mr(o, (function(e) {
  2773. return Tr(e, t, n)
  2774. }));
  2775. c !== o && (e = new hr[e.typename](e.lineno, e.colno), c.forEach((function(t, n) {
  2776. e[e.fields[n]] = t
  2777. })))
  2778. }
  2779. return n && t(e) || e
  2780. }
  2781. function _r(e, t) {
  2782. return Tr(e, t, !0)
  2783. }
  2784. function Ar(e, t, n) {
  2785. var r = [],
  2786. i = _r(n ? e[n] : e, (function(e) {
  2787. var n;
  2788. return e instanceof hr.Block ? e : ((e instanceof hr.Filter && -1 !== je.indexOf(t, e.name.value) || e instanceof hr.CallExtensionAsync) && (n = new hr.Symbol(e.lineno, e.colno, Er()), r.push(new hr.FilterAsync(e.lineno, e.colno, e.name, e.args, n))), n)
  2789. }));
  2790. return n ? e[n] = i : e = i, r.length ? (r.push(e), new hr.NodeList(e.lineno, e.colno, r)) : e
  2791. }
  2792. function gr(e, t) {
  2793. return function(e) {
  2794. return _r(e, (function(e) {
  2795. if (e instanceof hr.If || e instanceof hr.For) {
  2796. var t = !1;
  2797. if (Tr(e, (function(e) {
  2798. if (e instanceof hr.FilterAsync || e instanceof hr.IfAsync || e instanceof hr.AsyncEach || e instanceof hr.AsyncAll || e instanceof hr.CallExtensionAsync) return t = !0, e
  2799. })), t) {
  2800. if (e instanceof hr.If) return new hr.IfAsync(e.lineno, e.colno, e.cond, e.body, e.else_);
  2801. if (e instanceof hr.For && !(e instanceof hr.AsyncAll)) return new hr.AsyncEach(e.lineno, e.colno, e.arr, e.name, e.body, e.else_)
  2802. }
  2803. }
  2804. }))
  2805. }(function(e) {
  2806. return Tr(e, (function(e) {
  2807. if (e instanceof hr.Block) {
  2808. var t = !1,
  2809. n = Er();
  2810. e.body = Tr(e.body, (function(e) {
  2811. if (e instanceof hr.FunCall && "super" === e.name.value) return t = !0, new hr.Symbol(e.lineno, e.colno, n)
  2812. })), t && e.body.children.unshift(new hr.Super(0, 0, e.name, new hr.Symbol(0, 0, n)))
  2813. }
  2814. }))
  2815. }(function(e, t) {
  2816. return _r(e, (function(e) {
  2817. return e instanceof hr.Output ? Ar(e, t) : e instanceof hr.Set ? Ar(e, t, "value") : e instanceof hr.For ? Ar(e, t, "arr") : e instanceof hr.If ? Ar(e, t, "cond") : e instanceof hr.CallExtension ? Ar(e, t, "args") : void 0
  2818. }))
  2819. }(e, t)))
  2820. }
  2821. var Nr = {
  2822. transform: function(e, t) {
  2823. return gr(e, t || [])
  2824. }
  2825. },
  2826. Cr = Array.from,
  2827. Ir = "function" == typeof Symbol && Symbol.iterator && "function" == typeof Cr,
  2828. Sr = function() {
  2829. function e(e, t) {
  2830. this.variables = Object.create(null), this.parent = e, this.topLevel = !1, this.isolateWrites = t
  2831. }
  2832. var t = e.prototype;
  2833. return t.set = function(e, t, n) {
  2834. var r = e.split("."),
  2835. i = this.variables,
  2836. s = this;
  2837. if (n && (s = this.resolve(r[0], !0))) s.set(e, t);
  2838. else {
  2839. for (var a = 0; a < r.length - 1; a++) {
  2840. var o = r[a];
  2841. i[o] || (i[o] = {}), i = i[o]
  2842. }
  2843. i[r[r.length - 1]] = t
  2844. }
  2845. }, t.get = function(e) {
  2846. var t = this.variables[e];
  2847. return void 0 !== t ? t : null
  2848. }, t.lookup = function(e) {
  2849. var t = this.parent,
  2850. n = this.variables[e];
  2851. return void 0 !== n ? n : t && t.lookup(e)
  2852. }, t.resolve = function(e, t) {
  2853. var n = t && this.isolateWrites ? void 0 : this.parent;
  2854. return void 0 !== this.variables[e] ? this : n && n.resolve(e)
  2855. }, t.push = function(t) {
  2856. return new e(this, t)
  2857. }, t.pop = function() {
  2858. return this.parent
  2859. }, e
  2860. }();
  2861. function br(e) {
  2862. return e && Object.prototype.hasOwnProperty.call(e, "__keywords")
  2863. }
  2864. function Or(e) {
  2865. var t = e.length;
  2866. if (t) {
  2867. var n = e[t - 1];
  2868. if (br(n)) return n
  2869. }
  2870. return {}
  2871. }
  2872. function yr(e) {
  2873. var t = e.length;
  2874. return 0 === t ? 0 : br(e[t - 1]) ? t - 1 : t
  2875. }
  2876. function Lr(e) {
  2877. if ("string" != typeof e) return e;
  2878. this.val = e, Object.defineProperty(this, "length", {
  2879. writable: !0,
  2880. configurable: !0,
  2881. value: e.length
  2882. })
  2883. }
  2884. Lr.prototype = Object.create(String.prototype, {
  2885. length: {
  2886. writable: !0,
  2887. configurable: !0,
  2888. value: 0
  2889. }
  2890. }), Lr.prototype.valueOf = function() {
  2891. return this.val
  2892. }, Lr.prototype.toString = function() {
  2893. return this.val
  2894. };
  2895. var kr = {
  2896. Frame: Sr,
  2897. makeMacro: function(e, t, n) {
  2898. return function() {
  2899. for (var r = arguments.length, i = new Array(r), s = 0; s < r; s++) i[s] = arguments[s];
  2900. var a, o = yr(i),
  2901. c = Or(i);
  2902. if (o > e.length) a = i.slice(0, e.length), i.slice(a.length, o).forEach((function(e, n) {
  2903. n < t.length && (c[t[n]] = e)
  2904. })), a.push(c);
  2905. else if (o < e.length) {
  2906. a = i.slice(0, o);
  2907. for (var l = o; l < e.length; l++) {
  2908. var h = e[l];
  2909. a.push(c[h]), delete c[h]
  2910. }
  2911. a.push(c)
  2912. } else a = i;
  2913. return n.apply(this, a)
  2914. }
  2915. },
  2916. makeKeywordArgs: function(e) {
  2917. return e.__keywords = !0, e
  2918. },
  2919. numArgs: yr,
  2920. suppressValue: function(e, t) {
  2921. return "object" == typeof(e = null != e ? e : "") ? new Lr(JSON.stringify(e).toString()) : (!t || e instanceof Lr || (e = je.escape(e.toString())), e)
  2922. },
  2923. ensureDefined: function(e, t, n) {
  2924. if (null == e) throw new je.TemplateError("attempted to output null or undefined value", t + 1, n + 1);
  2925. return e
  2926. },
  2927. memberLookup: function(e, t) {
  2928. if (null != e) return "function" == typeof e[t] ? function() {
  2929. for (var n = arguments.length, r = new Array(n), i = 0; i < n; i++) r[i] = arguments[i];
  2930. return e[t].apply(e, r)
  2931. } : e[t]
  2932. },
  2933. contextOrFrameLookup: function(e, t, n) {
  2934. var r = t.lookup(n);
  2935. return void 0 !== r ? r : e.lookup(n)
  2936. },
  2937. callWrap: function(e, t, n, r) {
  2938. if (!e) throw new Error("Unable to call `" + t + "`, which is undefined or falsey");
  2939. if ("function" != typeof e) throw new Error("Unable to call `" + t + "`, which is not a function");
  2940. return e.apply(n, r)
  2941. },
  2942. handleError: function(e, t, n) {
  2943. return e.lineno ? e : new je.TemplateError(e, t, n)
  2944. },
  2945. isArray: je.isArray,
  2946. keys: je.keys,
  2947. SafeString: Lr,
  2948. copySafeness: function(e, t) {
  2949. return e instanceof Lr ? new Lr(t) : t.toString()
  2950. },
  2951. markSafe: function(e) {
  2952. var t = typeof e;
  2953. return "string" === t ? new Lr(e) : "function" !== t ? e : function(t) {
  2954. var n = e.apply(this, arguments);
  2955. return "string" == typeof n ? new Lr(n) : n
  2956. }
  2957. },
  2958. asyncEach: function(e, t, n, r) {
  2959. if (je.isArray(e)) {
  2960. var i = e.length;
  2961. je.asyncIter(e, (function(e, r, s) {
  2962. switch (t) {
  2963. case 1:
  2964. n(e, r, i, s);
  2965. break;
  2966. case 2:
  2967. n(e[0], e[1], r, i, s);
  2968. break;
  2969. case 3:
  2970. n(e[0], e[1], e[2], r, i, s);
  2971. break;
  2972. default:
  2973. e.push(r, i, s), n.apply(this, e)
  2974. }
  2975. }), r)
  2976. } else je.asyncFor(e, (function(e, t, r, i, s) {
  2977. n(e, t, r, i, s)
  2978. }), r)
  2979. },
  2980. asyncAll: function(e, t, n, r) {
  2981. var i, s, a = 0;
  2982. function o(e, t) {
  2983. a++, s[e] = t, a === i && r(null, s.join(""))
  2984. }
  2985. if (je.isArray(e))
  2986. if (i = e.length, s = new Array(i), 0 === i) r(null, "");
  2987. else
  2988. for (var c = 0; c < e.length; c++) {
  2989. var l = e[c];
  2990. switch (t) {
  2991. case 1:
  2992. n(l, c, i, o);
  2993. break;
  2994. case 2:
  2995. n(l[0], l[1], c, i, o);
  2996. break;
  2997. case 3:
  2998. n(l[0], l[1], l[2], c, i, o);
  2999. break;
  3000. default:
  3001. l.push(c, i, o), n.apply(this, l)
  3002. }
  3003. } else {
  3004. var h = je.keys(e || {});
  3005. if (i = h.length, s = new Array(i), 0 === i) r(null, "");
  3006. else
  3007. for (var u = 0; u < h.length; u++) {
  3008. var p = h[u];
  3009. n(p, e[p], u, i, o)
  3010. }
  3011. }
  3012. },
  3013. inOperator: je.inOperator,
  3014. fromIterator: function(e) {
  3015. return "object" != typeof e || null === e || je.isArray(e) ? e : Ir && Symbol.iterator in e ? Cr(e) : e
  3016. }
  3017. };
  3018. function vr(e, t) {
  3019. return vr = Object.setPrototypeOf || function(e, t) {
  3020. return e.__proto__ = t, e
  3021. }, vr(e, t)
  3022. }
  3023. kr.Frame, kr.makeMacro, kr.makeKeywordArgs, kr.numArgs, kr.suppressValue, kr.ensureDefined, kr.memberLookup, kr.contextOrFrameLookup, kr.callWrap, kr.handleError, kr.isArray, kr.keys, kr.SafeString, kr.copySafeness, kr.markSafe, kr.asyncEach, kr.asyncAll, kr.inOperator, kr.fromIterator;
  3024. var Dr = je.TemplateError,
  3025. Rr = kr.Frame,
  3026. Mr = {
  3027. "==": "==",
  3028. "===": "===",
  3029. "!=": "!=",
  3030. "!==": "!==",
  3031. "<": "<",
  3032. ">": ">",
  3033. "<=": "<=",
  3034. ">=": ">="
  3035. },
  3036. Pr = function(e) {
  3037. var t, n;
  3038. function r() {
  3039. return e.apply(this, arguments) || this
  3040. }
  3041. n = e, (t = r).prototype = Object.create(n.prototype), t.prototype.constructor = t, vr(t, n);
  3042. var i = r.prototype;
  3043. return i.init = function(e, t) {
  3044. this.templateName = e, this.codebuf = [], this.lastId = 0, this.buffer = null, this.bufferStack = [], this._scopeClosers = "", this.inBlock = !1, this.throwOnUndefined = t
  3045. }, i.fail = function(e, t, n) {
  3046. throw void 0 !== t && (t += 1), void 0 !== n && (n += 1), new Dr(e, t, n)
  3047. }, i._pushBuffer = function() {
  3048. var e = this._tmpid();
  3049. return this.bufferStack.push(this.buffer), this.buffer = e, this._emit("var " + this.buffer + ' = "";'), e
  3050. }, i._popBuffer = function() {
  3051. this.buffer = this.bufferStack.pop()
  3052. }, i._emit = function(e) {
  3053. this.codebuf.push(e)
  3054. }, i._emitLine = function(e) {
  3055. this._emit(e + "\n")
  3056. }, i._emitLines = function() {
  3057. for (var e = this, t = arguments.length, n = new Array(t), r = 0; r < t; r++) n[r] = arguments[r];
  3058. n.forEach((function(t) {
  3059. return e._emitLine(t)
  3060. }))
  3061. }, i._emitFuncBegin = function(e, t) {
  3062. this.buffer = "output", this._scopeClosers = "", this._emitLine("function " + t + "(env, context, frame, runtime, cb) {"), this._emitLine("var lineno = " + e.lineno + ";"), this._emitLine("var colno = " + e.colno + ";"), this._emitLine("var " + this.buffer + ' = "";'), this._emitLine("try {")
  3063. }, i._emitFuncEnd = function(e) {
  3064. e || this._emitLine("cb(null, " + this.buffer + ");"), this._closeScopeLevels(), this._emitLine("} catch (e) {"), this._emitLine(" cb(runtime.handleError(e, lineno, colno));"), this._emitLine("}"), this._emitLine("}"), this.buffer = null
  3065. }, i._addScopeLevel = function() {
  3066. this._scopeClosers += "})"
  3067. }, i._closeScopeLevels = function() {
  3068. this._emitLine(this._scopeClosers + ";"), this._scopeClosers = ""
  3069. }, i._withScopedSyntax = function(e) {
  3070. var t = this._scopeClosers;
  3071. this._scopeClosers = "", e.call(this), this._closeScopeLevels(), this._scopeClosers = t
  3072. }, i._makeCallback = function(e) {
  3073. var t = this._tmpid();
  3074. return "function(" + t + (e ? "," + e : "") + ") {\nif(" + t + ") { cb(" + t + "); return; }"
  3075. }, i._tmpid = function() {
  3076. return this.lastId++, "t_" + this.lastId
  3077. }, i._templateName = function() {
  3078. return null == this.templateName ? "undefined" : JSON.stringify(this.templateName)
  3079. }, i._compileChildren = function(e, t) {
  3080. var n = this;
  3081. e.children.forEach((function(e) {
  3082. n.compile(e, t)
  3083. }))
  3084. }, i._compileAggregate = function(e, t, n, r) {
  3085. var i = this;
  3086. n && this._emit(n), e.children.forEach((function(e, n) {
  3087. n > 0 && i._emit(","), i.compile(e, t)
  3088. })), r && this._emit(r)
  3089. }, i._compileExpression = function(e, t) {
  3090. this.assertType(e, hr.Literal, hr.Symbol, hr.Group, hr.Array, hr.Dict, hr.FunCall, hr.Caller, hr.Filter, hr.LookupVal, hr.Compare, hr.InlineIf, hr.In, hr.Is, hr.And, hr.Or, hr.Not, hr.Add, hr.Concat, hr.Sub, hr.Mul, hr.Div, hr.FloorDiv, hr.Mod, hr.Pow, hr.Neg, hr.Pos, hr.Compare, hr.NodeList), this.compile(e, t)
  3091. }, i.assertType = function(e) {
  3092. for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++) n[r - 1] = arguments[r];
  3093. n.some((function(t) {
  3094. return e instanceof t
  3095. })) || this.fail("assertType: invalid type: " + e.typename, e.lineno, e.colno)
  3096. }, i.compileCallExtension = function(e, t, n) {
  3097. var r = this,
  3098. i = e.args,
  3099. s = e.contentArgs,
  3100. a = "boolean" != typeof e.autoescape || e.autoescape;
  3101. if (n || this._emit(this.buffer + " += runtime.suppressValue("), this._emit('env.getExtension("' + e.extName + '")["' + e.prop + '"]('), this._emit("context"), (i || s) && this._emit(","), i && (i instanceof hr.NodeList || this.fail("compileCallExtension: arguments must be a NodeList, use `parser.parseSignature`"), i.children.forEach((function(e, n) {
  3102. r._compileExpression(e, t), (n !== i.children.length - 1 || s.length) && r._emit(",")
  3103. }))), s.length && s.forEach((function(e, n) {
  3104. if (n > 0 && r._emit(","), e) {
  3105. r._emitLine("function(cb) {"), r._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}");
  3106. var i = r._pushBuffer();
  3107. r._withScopedSyntax((function() {
  3108. r.compile(e, t), r._emitLine("cb(null, " + i + ");")
  3109. })), r._popBuffer(), r._emitLine("return " + i + ";"), r._emitLine("}")
  3110. } else r._emit("null")
  3111. })), n) {
  3112. var o = this._tmpid();
  3113. this._emitLine(", " + this._makeCallback(o)), this._emitLine(this.buffer + " += runtime.suppressValue(" + o + ", " + a + " && env.opts.autoescape);"), this._addScopeLevel()
  3114. } else this._emit(")"), this._emit(", " + a + " && env.opts.autoescape);\n")
  3115. }, i.compileCallExtensionAsync = function(e, t) {
  3116. this.compileCallExtension(e, t, !0)
  3117. }, i.compileNodeList = function(e, t) {
  3118. this._compileChildren(e, t)
  3119. }, i.compileLiteral = function(e) {
  3120. if ("string" == typeof e.value) {
  3121. var t = e.value.replace(/\\/g, "\\\\");
  3122. t = (t = (t = (t = (t = t.replace(/"/g, '\\"')).replace(/\n/g, "\\n")).replace(/\r/g, "\\r")).replace(/\t/g, "\\t")).replace(/\u2028/g, "\\u2028"), this._emit('"' + t + '"')
  3123. } else null === e.value ? this._emit("null") : this._emit(e.value.toString())
  3124. }, i.compileSymbol = function(e, t) {
  3125. var n = e.value,
  3126. r = t.lookup(n);
  3127. r ? this._emit(r) : this._emit('runtime.contextOrFrameLookup(context, frame, "' + n + '")')
  3128. }, i.compileGroup = function(e, t) {
  3129. this._compileAggregate(e, t, "(", ")")
  3130. }, i.compileArray = function(e, t) {
  3131. this._compileAggregate(e, t, "[", "]")
  3132. }, i.compileDict = function(e, t) {
  3133. this._compileAggregate(e, t, "{", "}")
  3134. }, i.compilePair = function(e, t) {
  3135. var n = e.key,
  3136. r = e.value;
  3137. n instanceof hr.Symbol ? n = new hr.Literal(n.lineno, n.colno, n.value) : n instanceof hr.Literal && "string" == typeof n.value || this.fail("compilePair: Dict keys must be strings or names", n.lineno, n.colno), this.compile(n, t), this._emit(": "), this._compileExpression(r, t)
  3138. }, i.compileInlineIf = function(e, t) {
  3139. this._emit("("), this.compile(e.cond, t), this._emit("?"), this.compile(e.body, t), this._emit(":"), null !== e.else_ ? this.compile(e.else_, t) : this._emit('""'), this._emit(")")
  3140. }, i.compileIn = function(e, t) {
  3141. this._emit("runtime.inOperator("), this.compile(e.left, t), this._emit(","), this.compile(e.right, t), this._emit(")")
  3142. }, i.compileIs = function(e, t) {
  3143. var n = e.right.name ? e.right.name.value : e.right.value;
  3144. this._emit('env.getTest("' + n + '").call(context, '), this.compile(e.left, t), e.right.args && (this._emit(","), this.compile(e.right.args, t)), this._emit(") === true")
  3145. }, i._binOpEmitter = function(e, t, n) {
  3146. this.compile(e.left, t), this._emit(n), this.compile(e.right, t)
  3147. }, i.compileOr = function(e, t) {
  3148. return this._binOpEmitter(e, t, " || ")
  3149. }, i.compileAnd = function(e, t) {
  3150. return this._binOpEmitter(e, t, " && ")
  3151. }, i.compileAdd = function(e, t) {
  3152. return this._binOpEmitter(e, t, " + ")
  3153. }, i.compileConcat = function(e, t) {
  3154. return this._binOpEmitter(e, t, ' + "" + ')
  3155. }, i.compileSub = function(e, t) {
  3156. return this._binOpEmitter(e, t, " - ")
  3157. }, i.compileMul = function(e, t) {
  3158. return this._binOpEmitter(e, t, " * ")
  3159. }, i.compileDiv = function(e, t) {
  3160. return this._binOpEmitter(e, t, " / ")
  3161. }, i.compileMod = function(e, t) {
  3162. return this._binOpEmitter(e, t, " % ")
  3163. }, i.compileNot = function(e, t) {
  3164. this._emit("!"), this.compile(e.target, t)
  3165. }, i.compileFloorDiv = function(e, t) {
  3166. this._emit("Math.floor("), this.compile(e.left, t), this._emit(" / "), this.compile(e.right, t), this._emit(")")
  3167. }, i.compilePow = function(e, t) {
  3168. this._emit("Math.pow("), this.compile(e.left, t), this._emit(", "), this.compile(e.right, t), this._emit(")")
  3169. }, i.compileNeg = function(e, t) {
  3170. this._emit("-"), this.compile(e.target, t)
  3171. }, i.compilePos = function(e, t) {
  3172. this._emit("+"), this.compile(e.target, t)
  3173. }, i.compileCompare = function(e, t) {
  3174. var n = this;
  3175. this.compile(e.expr, t), e.ops.forEach((function(e) {
  3176. n._emit(" " + Mr[e.type] + " "), n.compile(e.expr, t)
  3177. }))
  3178. }, i.compileLookupVal = function(e, t) {
  3179. this._emit("runtime.memberLookup(("), this._compileExpression(e.target, t), this._emit("),"), this._compileExpression(e.val, t), this._emit(")")
  3180. }, i._getNodeName = function(e) {
  3181. switch (e.typename) {
  3182. case "Symbol":
  3183. return e.value;
  3184. case "FunCall":
  3185. return "the return value of (" + this._getNodeName(e.name) + ")";
  3186. case "LookupVal":
  3187. return this._getNodeName(e.target) + '["' + this._getNodeName(e.val) + '"]';
  3188. case "Literal":
  3189. return e.value.toString();
  3190. default:
  3191. return "--expression--"
  3192. }
  3193. }, i.compileFunCall = function(e, t) {
  3194. this._emit("(lineno = " + e.lineno + ", colno = " + e.colno + ", "), this._emit("runtime.callWrap("), this._compileExpression(e.name, t), this._emit(', "' + this._getNodeName(e.name).replace(/"/g, '\\"') + '", context, '), this._compileAggregate(e.args, t, "[", "])"), this._emit(")")
  3195. }, i.compileFilter = function(e, t) {
  3196. var n = e.name;
  3197. this.assertType(n, hr.Symbol), this._emit('env.getFilter("' + n.value + '").call(context, '), this._compileAggregate(e.args, t), this._emit(")")
  3198. }, i.compileFilterAsync = function(e, t) {
  3199. var n = e.name,
  3200. r = e.symbol.value;
  3201. this.assertType(n, hr.Symbol), t.set(r, r), this._emit('env.getFilter("' + n.value + '").call(context, '), this._compileAggregate(e.args, t), this._emitLine(", " + this._makeCallback(r)), this._addScopeLevel()
  3202. }, i.compileKeywordArgs = function(e, t) {
  3203. this._emit("runtime.makeKeywordArgs("), this.compileDict(e, t), this._emit(")")
  3204. }, i.compileSet = function(e, t) {
  3205. var n = this,
  3206. r = [];
  3207. e.targets.forEach((function(e) {
  3208. var i = e.value,
  3209. s = t.lookup(i);
  3210. null == s && (s = n._tmpid(), n._emitLine("var " + s + ";")), r.push(s)
  3211. })), e.value ? (this._emit(r.join(" = ") + " = "), this._compileExpression(e.value, t), this._emitLine(";")) : (this._emit(r.join(" = ") + " = "), this.compile(e.body, t), this._emitLine(";")), e.targets.forEach((function(e, t) {
  3212. var i = r[t],
  3213. s = e.value;
  3214. n._emitLine('frame.set("' + s + '", ' + i + ", true);"), n._emitLine("if(frame.topLevel) {"), n._emitLine('context.setVariable("' + s + '", ' + i + ");"), n._emitLine("}"), "_" !== s.charAt(0) && (n._emitLine("if(frame.topLevel) {"), n._emitLine('context.addExport("' + s + '", ' + i + ");"), n._emitLine("}"))
  3215. }))
  3216. }, i.compileSwitch = function(e, t) {
  3217. var n = this;
  3218. this._emit("switch ("), this.compile(e.expr, t), this._emit(") {"), e.cases.forEach((function(e, r) {
  3219. n._emit("case "), n.compile(e.cond, t), n._emit(": "), n.compile(e.body, t), e.body.children.length && n._emitLine("break;")
  3220. })), e.default && (this._emit("default:"), this.compile(e.default, t)), this._emit("}")
  3221. }, i.compileIf = function(e, t, n) {
  3222. var r = this;
  3223. this._emit("if("), this._compileExpression(e.cond, t), this._emitLine(") {"), this._withScopedSyntax((function() {
  3224. r.compile(e.body, t), n && r._emit("cb()")
  3225. })), e.else_ ? (this._emitLine("}\nelse {"), this._withScopedSyntax((function() {
  3226. r.compile(e.else_, t), n && r._emit("cb()")
  3227. }))) : n && (this._emitLine("}\nelse {"), this._emit("cb()")), this._emitLine("}")
  3228. }, i.compileIfAsync = function(e, t) {
  3229. this._emit("(function(cb) {"), this.compileIf(e, t, !0), this._emit("})(" + this._makeCallback()), this._addScopeLevel()
  3230. }, i._emitLoopBindings = function(e, t, n, r) {
  3231. var i = this;
  3232. [{
  3233. name: "index",
  3234. val: n + " + 1"
  3235. }, {
  3236. name: "index0",
  3237. val: n
  3238. }, {
  3239. name: "revindex",
  3240. val: r + " - " + n
  3241. }, {
  3242. name: "revindex0",
  3243. val: r + " - " + n + " - 1"
  3244. }, {
  3245. name: "first",
  3246. val: n + " === 0"
  3247. }, {
  3248. name: "last",
  3249. val: n + " === " + r + " - 1"
  3250. }, {
  3251. name: "length",
  3252. val: r
  3253. }].forEach((function(e) {
  3254. i._emitLine('frame.set("loop.' + e.name + '", ' + e.val + ");")
  3255. }))
  3256. }, i.compileFor = function(e, t) {
  3257. var n = this,
  3258. r = this._tmpid(),
  3259. i = this._tmpid(),
  3260. s = this._tmpid();
  3261. if (t = t.push(), this._emitLine("frame = frame.push();"), this._emit("var " + s + " = "), this._compileExpression(e.arr, t), this._emitLine(";"), this._emit("if(" + s + ") {"), this._emitLine(s + " = runtime.fromIterator(" + s + ");"), e.name instanceof hr.Array) {
  3262. this._emitLine("var " + r + ";"), this._emitLine("if(runtime.isArray(" + s + ")) {"), this._emitLine("var " + i + " = " + s + ".length;"), this._emitLine("for(" + r + "=0; " + r + " < " + s + ".length; " + r + "++) {"), e.name.children.forEach((function(i, a) {
  3263. var o = n._tmpid();
  3264. n._emitLine("var " + o + " = " + s + "[" + r + "][" + a + "];"), n._emitLine('frame.set("' + i + '", ' + s + "[" + r + "][" + a + "]);"), t.set(e.name.children[a].value, o)
  3265. })), this._emitLoopBindings(e, s, r, i), this._withScopedSyntax((function() {
  3266. n.compile(e.body, t)
  3267. })), this._emitLine("}"), this._emitLine("} else {");
  3268. var a = e.name.children,
  3269. o = a[0],
  3270. c = a[1],
  3271. l = this._tmpid(),
  3272. h = this._tmpid();
  3273. t.set(o.value, l), t.set(c.value, h), this._emitLine(r + " = -1;"), this._emitLine("var " + i + " = runtime.keys(" + s + ").length;"), this._emitLine("for(var " + l + " in " + s + ") {"), this._emitLine(r + "++;"), this._emitLine("var " + h + " = " + s + "[" + l + "];"), this._emitLine('frame.set("' + o.value + '", ' + l + ");"), this._emitLine('frame.set("' + c.value + '", ' + h + ");"), this._emitLoopBindings(e, s, r, i), this._withScopedSyntax((function() {
  3274. n.compile(e.body, t)
  3275. })), this._emitLine("}"), this._emitLine("}")
  3276. } else {
  3277. var u = this._tmpid();
  3278. t.set(e.name.value, u), this._emitLine("var " + i + " = " + s + ".length;"), this._emitLine("for(var " + r + "=0; " + r + " < " + s + ".length; " + r + "++) {"), this._emitLine("var " + u + " = " + s + "[" + r + "];"), this._emitLine('frame.set("' + e.name.value + '", ' + u + ");"), this._emitLoopBindings(e, s, r, i), this._withScopedSyntax((function() {
  3279. n.compile(e.body, t)
  3280. })), this._emitLine("}")
  3281. }
  3282. this._emitLine("}"), e.else_ && (this._emitLine("if (!" + i + ") {"), this.compile(e.else_, t), this._emitLine("}")), this._emitLine("frame = frame.pop();")
  3283. }, i._compileAsyncLoop = function(e, t, n) {
  3284. var r = this,
  3285. i = this._tmpid(),
  3286. s = this._tmpid(),
  3287. a = this._tmpid(),
  3288. o = n ? "asyncAll" : "asyncEach";
  3289. if (t = t.push(), this._emitLine("frame = frame.push();"), this._emit("var " + a + " = runtime.fromIterator("), this._compileExpression(e.arr, t), this._emitLine(");"), e.name instanceof hr.Array) {
  3290. var c = e.name.children.length;
  3291. this._emit("runtime." + o + "(" + a + ", " + c + ", function("), e.name.children.forEach((function(e) {
  3292. r._emit(e.value + ",")
  3293. })), this._emit(i + "," + s + ",next) {"), e.name.children.forEach((function(e) {
  3294. var n = e.value;
  3295. t.set(n, n), r._emitLine('frame.set("' + n + '", ' + n + ");")
  3296. }))
  3297. } else {
  3298. var l = e.name.value;
  3299. this._emitLine("runtime." + o + "(" + a + ", 1, function(" + l + ", " + i + ", " + s + ",next) {"), this._emitLine('frame.set("' + l + '", ' + l + ");"), t.set(l, l)
  3300. }
  3301. this._emitLoopBindings(e, a, i, s), this._withScopedSyntax((function() {
  3302. var s;
  3303. n && (s = r._pushBuffer()), r.compile(e.body, t), r._emitLine("next(" + i + (s ? "," + s : "") + ");"), n && r._popBuffer()
  3304. }));
  3305. var h = this._tmpid();
  3306. this._emitLine("}, " + this._makeCallback(h)), this._addScopeLevel(), n && this._emitLine(this.buffer + " += " + h + ";"), e.else_ && (this._emitLine("if (!" + a + ".length) {"), this.compile(e.else_, t), this._emitLine("}")), this._emitLine("frame = frame.pop();")
  3307. }, i.compileAsyncEach = function(e, t) {
  3308. this._compileAsyncLoop(e, t)
  3309. }, i.compileAsyncAll = function(e, t) {
  3310. this._compileAsyncLoop(e, t, !0)
  3311. }, i._compileMacro = function(e, t) {
  3312. var n = this,
  3313. r = [],
  3314. i = null,
  3315. s = "macro_" + this._tmpid(),
  3316. a = void 0 !== t;
  3317. e.args.children.forEach((function(t, s) {
  3318. s === e.args.children.length - 1 && t instanceof hr.Dict ? i = t : (n.assertType(t, hr.Symbol), r.push(t))
  3319. }));
  3320. var o, c = [].concat(r.map((function(e) {
  3321. return "l_" + e.value
  3322. })), ["kwargs"]),
  3323. l = r.map((function(e) {
  3324. return '"' + e.value + '"'
  3325. })),
  3326. h = (i && i.children || []).map((function(e) {
  3327. return '"' + e.key.value + '"'
  3328. }));
  3329. o = a ? t.push(!0) : new Rr, this._emitLines("var " + s + " = runtime.makeMacro(", "[" + l.join(", ") + "], ", "[" + h.join(", ") + "], ", "function (" + c.join(", ") + ") {", "var callerFrame = frame;", "frame = " + (a ? "frame.push(true);" : "new runtime.Frame();"), "kwargs = kwargs || {};", 'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {', 'frame.set("caller", kwargs.caller); }'), r.forEach((function(e) {
  3330. n._emitLine('frame.set("' + e.value + '", l_' + e.value + ");"), o.set(e.value, "l_" + e.value)
  3331. })), i && i.children.forEach((function(e) {
  3332. var t = e.key.value;
  3333. n._emit('frame.set("' + t + '", '), n._emit('Object.prototype.hasOwnProperty.call(kwargs, "' + t + '")'), n._emit(' ? kwargs["' + t + '"] : '), n._compileExpression(e.value, o), n._emit(");")
  3334. }));
  3335. var u = this._pushBuffer();
  3336. return this._withScopedSyntax((function() {
  3337. n.compile(e.body, o)
  3338. })), this._emitLine("frame = " + (a ? "frame.pop();" : "callerFrame;")), this._emitLine("return new runtime.SafeString(" + u + ");"), this._emitLine("});"), this._popBuffer(), s
  3339. }, i.compileMacro = function(e, t) {
  3340. var n = this._compileMacro(e),
  3341. r = e.name.value;
  3342. t.set(r, n), t.parent ? this._emitLine('frame.set("' + r + '", ' + n + ");") : ("_" !== e.name.value.charAt(0) && this._emitLine('context.addExport("' + r + '");'), this._emitLine('context.setVariable("' + r + '", ' + n + ");"))
  3343. }, i.compileCaller = function(e, t) {
  3344. this._emit("(function (){");
  3345. var n = this._compileMacro(e, t);
  3346. this._emit("return " + n + ";})()")
  3347. }, i._compileGetTemplate = function(e, t, n, r) {
  3348. var i = this._tmpid(),
  3349. s = this._templateName(),
  3350. a = this._makeCallback(i),
  3351. o = n ? "true" : "false",
  3352. c = r ? "true" : "false";
  3353. return this._emit("env.getTemplate("), this._compileExpression(e.template, t), this._emitLine(", " + o + ", " + s + ", " + c + ", " + a), i
  3354. }, i.compileImport = function(e, t) {
  3355. var n = e.target.value,
  3356. r = this._compileGetTemplate(e, t, !1, !1);
  3357. this._addScopeLevel(), this._emitLine(r + ".getExported(" + (e.withContext ? "context.getVariables(), frame, " : "") + this._makeCallback(r)), this._addScopeLevel(), t.set(n, r), t.parent ? this._emitLine('frame.set("' + n + '", ' + r + ");") : this._emitLine('context.setVariable("' + n + '", ' + r + ");")
  3358. }, i.compileFromImport = function(e, t) {
  3359. var n = this,
  3360. r = this._compileGetTemplate(e, t, !1, !1);
  3361. this._addScopeLevel(), this._emitLine(r + ".getExported(" + (e.withContext ? "context.getVariables(), frame, " : "") + this._makeCallback(r)), this._addScopeLevel(), e.names.children.forEach((function(e) {
  3362. var i, s, a = n._tmpid();
  3363. e instanceof hr.Pair ? (i = e.key.value, s = e.value.value) : s = i = e.value, n._emitLine("if(Object.prototype.hasOwnProperty.call(" + r + ', "' + i + '")) {'), n._emitLine("var " + a + " = " + r + "." + i + ";"), n._emitLine("} else {"), n._emitLine("cb(new Error(\"cannot import '" + i + "'\")); return;"), n._emitLine("}"), t.set(s, a), t.parent ? n._emitLine('frame.set("' + s + '", ' + a + ");") : n._emitLine('context.setVariable("' + s + '", ' + a + ");")
  3364. }))
  3365. }, i.compileBlock = function(e) {
  3366. var t = this._tmpid();
  3367. this.inBlock || this._emit('(parentTemplate ? function(e, c, f, r, cb) { cb(""); } : '), this._emit('context.getBlock("' + e.name.value + '")'), this.inBlock || this._emit(")"), this._emitLine("(env, context, frame, runtime, " + this._makeCallback(t)), this._emitLine(this.buffer + " += " + t + ";"), this._addScopeLevel()
  3368. }, i.compileSuper = function(e, t) {
  3369. var n = e.blockName.value,
  3370. r = e.symbol.value,
  3371. i = this._makeCallback(r);
  3372. this._emitLine('context.getSuper(env, "' + n + '", b_' + n + ", frame, runtime, " + i), this._emitLine(r + " = runtime.markSafe(" + r + ");"), this._addScopeLevel(), t.set(r, r)
  3373. }, i.compileExtends = function(e, t) {
  3374. var n = this._tmpid(),
  3375. r = this._compileGetTemplate(e, t, !0, !1);
  3376. this._emitLine("parentTemplate = " + r), this._emitLine("for(var " + n + " in parentTemplate.blocks) {"), this._emitLine("context.addBlock(" + n + ", parentTemplate.blocks[" + n + "]);"), this._emitLine("}"), this._addScopeLevel()
  3377. }, i.compileInclude = function(e, t) {
  3378. this._emitLine("var tasks = [];"), this._emitLine("tasks.push("), this._emitLine("function(callback) {");
  3379. var n = this._compileGetTemplate(e, t, !1, e.ignoreMissing);
  3380. this._emitLine("callback(null," + n + ");});"), this._emitLine("});");
  3381. var r = this._tmpid();
  3382. this._emitLine("tasks.push("), this._emitLine("function(template, callback){"), this._emitLine("template.render(context.getVariables(), frame, " + this._makeCallback(r)), this._emitLine("callback(null," + r + ");});"), this._emitLine("});"), this._emitLine("tasks.push("), this._emitLine("function(result, callback){"), this._emitLine(this.buffer + " += result;"), this._emitLine("callback(null);"), this._emitLine("});"), this._emitLine("env.waterfall(tasks, function(){"), this._addScopeLevel()
  3383. }, i.compileTemplateData = function(e, t) {
  3384. this.compileLiteral(e, t)
  3385. }, i.compileCapture = function(e, t) {
  3386. var n = this,
  3387. r = this.buffer;
  3388. this.buffer = "output", this._emitLine("(function() {"), this._emitLine('var output = "";'), this._withScopedSyntax((function() {
  3389. n.compile(e.body, t)
  3390. })), this._emitLine("return output;"), this._emitLine("})()"), this.buffer = r
  3391. }, i.compileOutput = function(e, t) {
  3392. var n = this;
  3393. e.children.forEach((function(r) {
  3394. r instanceof hr.TemplateData ? r.value && (n._emit(n.buffer + " += "), n.compileLiteral(r, t), n._emitLine(";")) : (n._emit(n.buffer + " += runtime.suppressValue("), n.throwOnUndefined && n._emit("runtime.ensureDefined("), n.compile(r, t), n.throwOnUndefined && n._emit("," + e.lineno + "," + e.colno + ")"), n._emit(", env.opts.autoescape);\n"))
  3395. }))
  3396. }, i.compileRoot = function(e, t) {
  3397. var n = this;
  3398. t && this.fail("compileRoot: root node can't have frame"), t = new Rr, this._emitFuncBegin(e, "root"), this._emitLine("var parentTemplate = null;"), this._compileChildren(e, t), this._emitLine("if(parentTemplate) {"), this._emitLine("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"), this._emitLine("} else {"), this._emitLine("cb(null, " + this.buffer + ");"), this._emitLine("}"), this._emitFuncEnd(!0), this.inBlock = !0;
  3399. var r = [],
  3400. i = e.findAll(hr.Block);
  3401. i.forEach((function(e, t) {
  3402. var i = e.name.value;
  3403. if (-1 !== r.indexOf(i)) throw new Error('Block "' + i + '" defined more than once.');
  3404. r.push(i), n._emitFuncBegin(e, "b_" + i);
  3405. var s = new Rr;
  3406. n._emitLine("var frame = frame.push(true);"), n.compile(e.body, s), n._emitFuncEnd()
  3407. })), this._emitLine("return {"), i.forEach((function(e, t) {
  3408. var r = "b_" + e.name.value;
  3409. n._emitLine(r + ": " + r + ",")
  3410. })), this._emitLine("root: root\n};")
  3411. }, i.compile = function(e, t) {
  3412. var n = this["compile" + e.typename];
  3413. n ? n.call(this, e, t) : this.fail("compile: Cannot compile node: " + e.typename, e.lineno, e.colno)
  3414. }, i.getCode = function() {
  3415. return this.codebuf.join("")
  3416. }, r
  3417. }(en.Obj),
  3418. xr = {
  3419. compile: function(e, t, n, r, i) {
  3420. void 0 === i && (i = {});
  3421. var s = new Pr(r, i.throwOnUndefined),
  3422. a = (n || []).map((function(e) {
  3423. return e.preprocess
  3424. })).filter((function(e) {
  3425. return !!e
  3426. })).reduce((function(e, t) {
  3427. return t(e)
  3428. }), e);
  3429. return s.compile(Nr.transform(fr.parse(a, n, i), t, r)), s.getCode()
  3430. },
  3431. Compiler: Pr
  3432. },
  3433. wr = Ke((function(e) {
  3434. var t = e.exports = {};
  3435. function n(e, t) {
  3436. return null == e || !1 === e ? t : e
  3437. }
  3438. function r(e) {
  3439. return e != e
  3440. }
  3441. function i(e) {
  3442. var t = (e = n(e, "")).toLowerCase();
  3443. return kr.copySafeness(e, t.charAt(0).toUpperCase() + t.slice(1))
  3444. }
  3445. function s(e) {
  3446. if (je.isString(e)) return e.split("");
  3447. if (je.isObject(e)) return je._entries(e || {}).map((function(e) {
  3448. return {
  3449. key: e[0],
  3450. value: e[1]
  3451. }
  3452. }));
  3453. if (je.isArray(e)) return e;
  3454. throw new je.TemplateError("list filter: type not iterable")
  3455. }
  3456. function a(e) {
  3457. return function(t, n, r) {
  3458. void 0 === n && (n = "truthy");
  3459. var i = this,
  3460. s = i.env.getTest(n);
  3461. return je.toArray(t).filter((function(t) {
  3462. return s.call(i, t, r) === e
  3463. }))
  3464. }
  3465. }
  3466. function o(e) {
  3467. return kr.copySafeness(e, e.replace(/^\s*|\s*$/g, ""))
  3468. }
  3469. t.abs = Math.abs, t.batch = function(e, t, n) {
  3470. var r, i = [],
  3471. s = [];
  3472. for (r = 0; r < e.length; r++) r % t == 0 && s.length && (i.push(s), s = []), s.push(e[r]);
  3473. if (s.length) {
  3474. if (n)
  3475. for (r = s.length; r < t; r++) s.push(n);
  3476. i.push(s)
  3477. }
  3478. return i
  3479. }, t.capitalize = i, t.center = function(e, t) {
  3480. if (t = t || 80, (e = n(e, "")).length >= t) return e;
  3481. var r = t - e.length,
  3482. i = je.repeat(" ", r / 2 - r % 2),
  3483. s = je.repeat(" ", r / 2);
  3484. return kr.copySafeness(e, i + e + s)
  3485. }, t.default = function(e, t, n) {
  3486. return n ? e || t : void 0 !== e ? e : t
  3487. }, t.dictsort = function(e, t, n) {
  3488. if (!je.isObject(e)) throw new je.TemplateError("dictsort filter: val must be an object");
  3489. var r, i = [];
  3490. for (var s in e) i.push([s, e[s]]);
  3491. if (void 0 === n || "key" === n) r = 0;
  3492. else {
  3493. if ("value" !== n) throw new je.TemplateError("dictsort filter: You can only sort by either key or value");
  3494. r = 1
  3495. }
  3496. return i.sort((function(e, n) {
  3497. var i = e[r],
  3498. s = n[r];
  3499. return t || (je.isString(i) && (i = i.toUpperCase()), je.isString(s) && (s = s.toUpperCase())), i > s ? 1 : i === s ? 0 : -1
  3500. })), i
  3501. }, t.dump = function(e, t) {
  3502. return JSON.stringify(e, null, t)
  3503. }, t.escape = function(e) {
  3504. return e instanceof kr.SafeString ? e : (e = null == e ? "" : e, kr.markSafe(je.escape(e.toString())))
  3505. }, t.safe = function(e) {
  3506. return e instanceof kr.SafeString ? e : (e = null == e ? "" : e, kr.markSafe(e.toString()))
  3507. }, t.first = function(e) {
  3508. return e[0]
  3509. }, t.forceescape = function(e) {
  3510. return e = null == e ? "" : e, kr.markSafe(je.escape(e.toString()))
  3511. }, t.groupby = function(e, t) {
  3512. return je.groupBy(e, t, this.env.opts.throwOnUndefined)
  3513. }, t.indent = function(e, t, r) {
  3514. if ("" === (e = n(e, ""))) return "";
  3515. t = t || 4;
  3516. var i = e.split("\n"),
  3517. s = je.repeat(" ", t),
  3518. a = i.map((function(e, t) {
  3519. return 0 !== t || r ? "" + s + e : e
  3520. })).join("\n");
  3521. return kr.copySafeness(e, a)
  3522. }, t.join = function(e, t, n) {
  3523. return t = t || "", n && (e = je.map(e, (function(e) {
  3524. return e[n]
  3525. }))), e.join(t)
  3526. }, t.last = function(e) {
  3527. return e[e.length - 1]
  3528. }, t.length = function(e) {
  3529. var t = n(e, "");
  3530. return void 0 !== t ? "function" == typeof Map && t instanceof Map || "function" == typeof Set && t instanceof Set ? t.size : !je.isObject(t) || t instanceof kr.SafeString ? t.length : je.keys(t).length : 0
  3531. }, t.list = s, t.lower = function(e) {
  3532. return (e = n(e, "")).toLowerCase()
  3533. }, t.nl2br = function(e) {
  3534. return null == e ? "" : kr.copySafeness(e, e.replace(/\r\n|\n/g, "<br />\n"))
  3535. }, t.random = function(e) {
  3536. return e[Math.floor(Math.random() * e.length)]
  3537. }, t.reject = a(!1), t.rejectattr = function(e, t) {
  3538. return e.filter((function(e) {
  3539. return !e[t]
  3540. }))
  3541. }, t.select = a(!0), t.selectattr = function(e, t) {
  3542. return e.filter((function(e) {
  3543. return !!e[t]
  3544. }))
  3545. }, t.replace = function(e, t, n, r) {
  3546. var i = e;
  3547. if (t instanceof RegExp) return e.replace(t, n);
  3548. void 0 === r && (r = -1);
  3549. var s = "";
  3550. if ("number" == typeof t) t = "" + t;
  3551. else if ("string" != typeof t) return e;
  3552. if ("number" == typeof e && (e = "" + e), "string" != typeof e && !(e instanceof kr.SafeString)) return e;
  3553. if ("" === t) return s = n + e.split("").join(n) + n, kr.copySafeness(e, s);
  3554. var a = e.indexOf(t);
  3555. if (0 === r || -1 === a) return e;
  3556. for (var o = 0, c = 0; a > -1 && (-1 === r || c < r);) s += e.substring(o, a) + n, o = a + t.length, c++, a = e.indexOf(t, o);
  3557. return o < e.length && (s += e.substring(o)), kr.copySafeness(i, s)
  3558. }, t.reverse = function(e) {
  3559. var t;
  3560. return (t = je.isString(e) ? s(e) : je.map(e, (function(e) {
  3561. return e
  3562. }))).reverse(), je.isString(e) ? kr.copySafeness(e, t.join("")) : t
  3563. }, t.round = function(e, t, n) {
  3564. t = t || 0;
  3565. var r = Math.pow(10, t);
  3566. return ("ceil" === n ? Math.ceil : "floor" === n ? Math.floor : Math.round)(e * r) / r
  3567. }, t.slice = function(e, t, n) {
  3568. for (var r = Math.floor(e.length / t), i = e.length % t, s = [], a = 0, o = 0; o < t; o++) {
  3569. var c = a + o * r;
  3570. o < i && a++;
  3571. var l = a + (o + 1) * r,
  3572. h = e.slice(c, l);
  3573. n && o >= i && h.push(n), s.push(h)
  3574. }
  3575. return s
  3576. }, t.sum = function(e, t, n) {
  3577. return void 0 === n && (n = 0), t && (e = je.map(e, (function(e) {
  3578. return e[t]
  3579. }))), n + e.reduce((function(e, t) {
  3580. return e + t
  3581. }), 0)
  3582. }, t.sort = kr.makeMacro(["value", "reverse", "case_sensitive", "attribute"], [], (function(e, t, n, r) {
  3583. var i = this,
  3584. s = je.map(e, (function(e) {
  3585. return e
  3586. })),
  3587. a = je.getAttrGetter(r);
  3588. return s.sort((function(e, s) {
  3589. var o = r ? a(e) : e,
  3590. c = r ? a(s) : s;
  3591. if (i.env.opts.throwOnUndefined && r && (void 0 === o || void 0 === c)) throw new TypeError('sort: attribute "' + r + '" resolved to undefined');
  3592. return !n && je.isString(o) && je.isString(c) && (o = o.toLowerCase(), c = c.toLowerCase()), o < c ? t ? 1 : -1 : o > c ? t ? -1 : 1 : 0
  3593. })), s
  3594. })), t.string = function(e) {
  3595. return kr.copySafeness(e, e)
  3596. }, t.striptags = function(e, t) {
  3597. var r = o((e = n(e, "")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|<!--[\s\S]*?-->/gi, "")),
  3598. i = "";
  3599. return i = t ? r.replace(/^ +| +$/gm, "").replace(/ +/g, " ").replace(/(\r\n)/g, "\n").replace(/\n\n\n+/g, "\n\n") : r.replace(/\s+/gi, " "), kr.copySafeness(e, i)
  3600. }, t.title = function(e) {
  3601. var t = (e = n(e, "")).split(" ").map((function(e) {
  3602. return i(e)
  3603. }));
  3604. return kr.copySafeness(e, t.join(" "))
  3605. }, t.trim = o, t.truncate = function(e, t, r, i) {
  3606. var s = e;
  3607. if (t = t || 255, (e = n(e, "")).length <= t) return e;
  3608. if (r) e = e.substring(0, t);
  3609. else {
  3610. var a = e.lastIndexOf(" ", t); - 1 === a && (a = t), e = e.substring(0, a)
  3611. }
  3612. return e += null != i ? i : "...", kr.copySafeness(s, e)
  3613. }, t.upper = function(e) {
  3614. return (e = n(e, "")).toUpperCase()
  3615. }, t.urlencode = function(e) {
  3616. var t = encodeURIComponent;
  3617. return je.isString(e) ? t(e) : (je.isArray(e) ? e : je._entries(e)).map((function(e) {
  3618. var n = e[0],
  3619. r = e[1];
  3620. return t(n) + "=" + t(r)
  3621. })).join("&")
  3622. };
  3623. var c = /^(?:\(|<|&lt;)?(.*?)(?:\.|,|\)|\n|&gt;)?$/,
  3624. l = /^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,
  3625. h = /^https?:\/\/.*$/,
  3626. u = /^www\./,
  3627. p = /\.(?:org|net|com)(?:\:|\/|$)/;
  3628. t.urlize = function(e, t, n) {
  3629. r(t) && (t = 1 / 0);
  3630. var i = !0 === n ? ' rel="nofollow"' : "";
  3631. return e.split(/(\s+)/).filter((function(e) {
  3632. return e && e.length
  3633. })).map((function(e) {
  3634. var n = e.match(c),
  3635. r = n ? n[1] : e,
  3636. s = r.substr(0, t);
  3637. return h.test(r) ? '<a href="' + r + '"' + i + ">" + s + "</a>" : u.test(r) ? '<a href="http://' + r + '"' + i + ">" + s + "</a>" : l.test(r) ? '<a href="mailto:' + r + '">' + r + "</a>" : p.test(r) ? '<a href="http://' + r + '"' + i + ">" + s + "</a>" : e
  3638. })).join("")
  3639. }, t.wordcount = function(e) {
  3640. var t = (e = n(e, "")) ? e.match(/\w+/g) : null;
  3641. return t ? t.length : null
  3642. }, t.float = function(e, t) {
  3643. var n = parseFloat(e);
  3644. return r(n) ? t : n
  3645. };
  3646. var f = kr.makeMacro(["value", "default", "base"], [], (function(e, t, n) {
  3647. void 0 === n && (n = 10);
  3648. var i = parseInt(e, n);
  3649. return r(i) ? t : i
  3650. }));
  3651. t.int = f, t.d = t.default, t.e = t.escape
  3652. })),
  3653. Br = {};
  3654. function Fr(e, t) {
  3655. for (var n = 0, r = e.length - 1; r >= 0; r--) {
  3656. var i = e[r];
  3657. "." === i ? e.splice(r, 1) : ".." === i ? (e.splice(r, 1), n++) : n && (e.splice(r, 1), n--)
  3658. }
  3659. if (t)
  3660. for (; n--; n) e.unshift("..");
  3661. return e
  3662. }
  3663. var Ur = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,
  3664. Hr = function(e) {
  3665. return Ur.exec(e).slice(1)
  3666. };
  3667. function Gr() {
  3668. for (var e = "", t = !1, n = arguments.length - 1; n >= -1 && !t; n--) {
  3669. var r = n >= 0 ? arguments[n] : "/";
  3670. if ("string" != typeof r) throw new TypeError("Arguments to path.resolve must be strings");
  3671. r && (e = r + "/" + e, t = "/" === r.charAt(0))
  3672. }
  3673. return (t ? "/" : "") + (e = Fr(jr(e.split("/"), (function(e) {
  3674. return !!e
  3675. })), !t).join("/")) || "."
  3676. }
  3677. function Yr(e) {
  3678. var t = qr(e),
  3679. n = "/" === Vr(e, -1);
  3680. return (e = Fr(jr(e.split("/"), (function(e) {
  3681. return !!e
  3682. })), !t).join("/")) || t || (e = "."), e && n && (e += "/"), (t ? "/" : "") + e
  3683. }
  3684. function qr(e) {
  3685. return "/" === e.charAt(0)
  3686. }
  3687. var Kr = {
  3688. extname: function(e) {
  3689. return Hr(e)[3]
  3690. },
  3691. basename: function(e, t) {
  3692. var n = Hr(e)[2];
  3693. return t && n.substr(-1 * t.length) === t && (n = n.substr(0, n.length - t.length)), n
  3694. },
  3695. dirname: function(e) {
  3696. var t = Hr(e),
  3697. n = t[0],
  3698. r = t[1];
  3699. return n || r ? (r && (r = r.substr(0, r.length - 1)), n + r) : "."
  3700. },
  3701. sep: "/",
  3702. delimiter: ":",
  3703. relative: function(e, t) {
  3704. function n(e) {
  3705. for (var t = 0; t < e.length && "" === e[t]; t++);
  3706. for (var n = e.length - 1; n >= 0 && "" === e[n]; n--);
  3707. return t > n ? [] : e.slice(t, n - t + 1)
  3708. }
  3709. e = Gr(e).substr(1), t = Gr(t).substr(1);
  3710. for (var r = n(e.split("/")), i = n(t.split("/")), s = Math.min(r.length, i.length), a = s, o = 0; o < s; o++)
  3711. if (r[o] !== i[o]) {
  3712. a = o;
  3713. break
  3714. } var c = [];
  3715. for (o = a; o < r.length; o++) c.push("..");
  3716. return (c = c.concat(i.slice(a))).join("/")
  3717. },
  3718. join: function() {
  3719. var e = Array.prototype.slice.call(arguments, 0);
  3720. return Yr(jr(e, (function(e, t) {
  3721. if ("string" != typeof e) throw new TypeError("Arguments to path.join must be strings");
  3722. return e
  3723. })).join("/"))
  3724. },
  3725. isAbsolute: qr,
  3726. normalize: Yr,
  3727. resolve: Gr
  3728. };
  3729. function jr(e, t) {
  3730. if (e.filter) return e.filter(t);
  3731. for (var n = [], r = 0; r < e.length; r++) t(e[r], r, e) && n.push(e[r]);
  3732. return n
  3733. }
  3734. var Vr = "b" === "ab".substr(-1) ? function(e, t, n) {
  3735. return e.substr(t, n)
  3736. } : function(e, t, n) {
  3737. return t < 0 && (t = e.length + t), e.substr(t, n)
  3738. };
  3739. function Wr(e, t) {
  3740. return Wr = Object.setPrototypeOf || function(e, t) {
  3741. return e.__proto__ = t, e
  3742. }, Wr(e, t)
  3743. }
  3744. var Qr = function(e) {
  3745. var t, n;
  3746. function r() {
  3747. return e.apply(this, arguments) || this
  3748. }
  3749. n = e, (t = r).prototype = Object.create(n.prototype), t.prototype.constructor = t, Wr(t, n);
  3750. var i = r.prototype;
  3751. return i.resolve = function(e, t) {
  3752. return Kr.resolve(Kr.dirname(e), t)
  3753. }, i.isRelative = function(e) {
  3754. return 0 === e.indexOf("./") || 0 === e.indexOf("../")
  3755. }, r
  3756. }(en.EmitterObj);
  3757. function Xr(e, t) {
  3758. return Xr = Object.setPrototypeOf || function(e, t) {
  3759. return e.__proto__ = t, e
  3760. }, Xr(e, t)
  3761. }
  3762. var $r = function(e) {
  3763. var t, n;
  3764. function r(t) {
  3765. var n;
  3766. return (n = e.call(this) || this).precompiled = t || {}, n
  3767. }
  3768. return n = e, (t = r).prototype = Object.create(n.prototype), t.prototype.constructor = t, Xr(t, n), r.prototype.getSource = function(e) {
  3769. return this.precompiled[e] ? {
  3770. src: {
  3771. type: "code",
  3772. obj: this.precompiled[e]
  3773. },
  3774. path: e
  3775. } : null
  3776. }, r
  3777. }(Qr);
  3778. function zr(e, t) {
  3779. e.prototype = Object.create(t.prototype), e.prototype.constructor = e, Jr(e, t)
  3780. }
  3781. function Jr(e, t) {
  3782. return Jr = Object.setPrototypeOf || function(e, t) {
  3783. return e.__proto__ = t, e
  3784. }, Jr(e, t)
  3785. }
  3786. var Zr = {
  3787. PrecompiledLoader: $r
  3788. }.PrecompiledLoader,
  3789. ei = function(e) {
  3790. function t(t, n) {
  3791. var r;
  3792. return n = n || {}, (r = e.call(this) || this).pathsToNames = {}, r.noCache = !!n.noCache, t ? (t = Array.isArray(t) ? t : [t], r.searchPaths = t.map(Kr.normalize)) : r.searchPaths = ["."], r
  3793. }
  3794. return zr(t, e), t.prototype.getSource = function(e) {
  3795. for (var t = null, n = this.searchPaths, r = 0; r < n.length; r++) {
  3796. var i = Kr.resolve(n[r]),
  3797. s = Kr.resolve(n[r], e);
  3798. if (0 === s.indexOf(i) && Br.existsSync(s)) {
  3799. t = s;
  3800. break
  3801. }
  3802. }
  3803. if (!t) return null;
  3804. this.pathsToNames[t] = e;
  3805. var a = {
  3806. src: Br.readFileSync(t, "utf-8"),
  3807. path: t,
  3808. noCache: this.noCache
  3809. };
  3810. return this.emit("load", e, a), a
  3811. }, t
  3812. }(Qr),
  3813. ti = {
  3814. FileSystemLoader: ei,
  3815. PrecompiledLoader: Zr,
  3816. NodeResolveLoader: function(e) {
  3817. function t(t) {
  3818. var n;
  3819. return t = t || {}, (n = e.call(this) || this).pathsToNames = {}, n.noCache = !!t.noCache, n
  3820. }
  3821. return zr(t, e), t.prototype.getSource = function(e) {
  3822. if (/^\.?\.?(\/|\\)/.test(e)) return null;
  3823. if (/^[A-Z]:/.test(e)) return null;
  3824. var t;
  3825. try {
  3826. t = Ye.resolve(e)
  3827. } catch (e) {
  3828. return null
  3829. }
  3830. this.pathsToNames[t] = e;
  3831. var n = {
  3832. src: Br.readFileSync(t, "utf-8"),
  3833. path: t,
  3834. noCache: this.noCache
  3835. };
  3836. return this.emit("load", e, n), n
  3837. }, t
  3838. }(Qr)
  3839. },
  3840. ni = Ke((function(e, t) {
  3841. var n = kr.SafeString;
  3842. t.callable = function(e) {
  3843. return "function" == typeof e
  3844. }, t.defined = function(e) {
  3845. return void 0 !== e
  3846. }, t.divisibleby = function(e, t) {
  3847. return e % t == 0
  3848. }, t.escaped = function(e) {
  3849. return e instanceof n
  3850. }, t.equalto = function(e, t) {
  3851. return e === t
  3852. }, t.eq = t.equalto, t.sameas = t.equalto, t.even = function(e) {
  3853. return e % 2 == 0
  3854. }, t.falsy = function(e) {
  3855. return !e
  3856. }, t.ge = function(e, t) {
  3857. return e >= t
  3858. }, t.greaterthan = function(e, t) {
  3859. return e > t
  3860. }, t.gt = t.greaterthan, t.le = function(e, t) {
  3861. return e <= t
  3862. }, t.lessthan = function(e, t) {
  3863. return e < t
  3864. }, t.lt = t.lessthan, t.lower = function(e) {
  3865. return e.toLowerCase() === e
  3866. }, t.ne = function(e, t) {
  3867. return e !== t
  3868. }, t.null = function(e) {
  3869. return null === e
  3870. }, t.number = function(e) {
  3871. return "number" == typeof e
  3872. }, t.odd = function(e) {
  3873. return e % 2 == 1
  3874. }, t.string = function(e) {
  3875. return "string" == typeof e
  3876. }, t.truthy = function(e) {
  3877. return !!e
  3878. }, t.undefined = function(e) {
  3879. return void 0 === e
  3880. }, t.upper = function(e) {
  3881. return e.toUpperCase() === e
  3882. }, t.iterable = function(e) {
  3883. return "undefined" != typeof Symbol ? !!e[Symbol.iterator] : Array.isArray(e) || "string" == typeof e
  3884. }, t.mapping = function(e) {
  3885. var t = null != e && "object" == typeof e && !Array.isArray(e);
  3886. return Set ? t && !(e instanceof Set) : t
  3887. }
  3888. }));
  3889. function ri(e) {
  3890. var t = -1;
  3891. return {
  3892. current: null,
  3893. reset: function() {
  3894. t = -1, this.current = null
  3895. },
  3896. next: function() {
  3897. return ++t >= e.length && (t = 0), this.current = e[t], this.current
  3898. }
  3899. }
  3900. }
  3901. ni.callable, ni.defined, ni.divisibleby, ni.escaped, ni.equalto, ni.eq, ni.sameas, ni.even, ni.falsy, ni.ge, ni.greaterthan, ni.gt, ni.le, ni.lessthan, ni.lt, ni.lower, ni.ne, ni.number, ni.odd, ni.string, ni.truthy, ni.undefined, ni.upper, ni.iterable, ni.mapping;
  3902. var ii = function() {
  3903. return {
  3904. range: function(e, t, n) {
  3905. void 0 === t ? (t = e, e = 0, n = 1) : n || (n = 1);
  3906. var r = [];
  3907. if (n > 0)
  3908. for (var i = e; i < t; i += n) r.push(i);
  3909. else
  3910. for (var s = e; s > t; s += n) r.push(s);
  3911. return r
  3912. },
  3913. cycler: function() {
  3914. return ri(Array.prototype.slice.call(arguments))
  3915. },
  3916. joiner: function(e) {
  3917. return function(e) {
  3918. e = e || ",";
  3919. var t = !0;
  3920. return function() {
  3921. var n = t ? "" : e;
  3922. return t = !1, n
  3923. }
  3924. }(e)
  3925. }
  3926. }
  3927. };
  3928. function si(e, t) {
  3929. e.prototype = Object.create(t.prototype), e.prototype.constructor = e, ai(e, t)
  3930. }
  3931. function ai(e, t) {
  3932. return ai = Object.setPrototypeOf || function(e, t) {
  3933. return e.__proto__ = t, e
  3934. }, ai(e, t)
  3935. }
  3936. var oi = ti.FileSystemLoader,
  3937. ci = ti.WebLoader,
  3938. li = ti.PrecompiledLoader,
  3939. hi = en.Obj,
  3940. ui = en.EmitterObj,
  3941. pi = kr.handleError,
  3942. fi = kr.Frame;
  3943. function di(e, t, n) {
  3944. Gt((function() {
  3945. e(t, n)
  3946. }))
  3947. }
  3948. var Ei = {
  3949. type: "code",
  3950. obj: {
  3951. root: function(e, t, n, r, i) {
  3952. try {
  3953. i(null, "")
  3954. } catch (e) {
  3955. i(pi(e, null, null))
  3956. }
  3957. }
  3958. }
  3959. },
  3960. mi = function(e) {
  3961. function t() {
  3962. return e.apply(this, arguments) || this
  3963. }
  3964. si(t, e);
  3965. var n = t.prototype;
  3966. return n.init = function(e, t) {
  3967. var n = this;
  3968. t = this.opts = t || {}, this.opts.dev = !!t.dev, this.opts.autoescape = null == t.autoescape || t.autoescape, this.opts.throwOnUndefined = !!t.throwOnUndefined, this.opts.trimBlocks = !!t.trimBlocks, this.opts.lstripBlocks = !!t.lstripBlocks, this.loaders = [], e ? this.loaders = je.isArray(e) ? e : [e] : oi ? this.loaders = [new oi("views")] : ci && (this.loaders = [new ci("/views")]), "undefined" != typeof window && window.jinja2Precompiled && this.loaders.unshift(new li(window.jinja2Precompiled)), this._initLoaders(), this.globals = ii(), this.filters = {}, this.tests = {}, this.asyncFilters = [], this.extensions = {}, this.extensionsList = [], je._entries(wr).forEach((function(e) {
  3969. var t = e[0],
  3970. r = e[1];
  3971. return n.addFilter(t, r)
  3972. })), je._entries(ni).forEach((function(e) {
  3973. var t = e[0],
  3974. r = e[1];
  3975. return n.addTest(t, r)
  3976. }))
  3977. }, n._initLoaders = function() {
  3978. var e = this;
  3979. this.loaders.forEach((function(t) {
  3980. t.cache = {}, "function" == typeof t.on && (t.on("update", (function(n, r) {
  3981. t.cache[n] = null, e.emit("update", n, r, t)
  3982. })), t.on("load", (function(n, r) {
  3983. e.emit("load", n, r, t)
  3984. })))
  3985. }))
  3986. }, n.invalidateCache = function() {
  3987. this.loaders.forEach((function(e) {
  3988. e.cache = {}
  3989. }))
  3990. }, n.addExtension = function(e, t) {
  3991. return t.__name = e, this.extensions[e] = t, this.extensionsList.push(t), this
  3992. }, n.removeExtension = function(e) {
  3993. var t = this.getExtension(e);
  3994. t && (this.extensionsList = je.without(this.extensionsList, t), delete this.extensions[e])
  3995. }, n.getExtension = function(e) {
  3996. return this.extensions[e]
  3997. }, n.hasExtension = function(e) {
  3998. return !!this.extensions[e]
  3999. }, n.addGlobal = function(e, t) {
  4000. return this.globals[e] = t, this
  4001. }, n.getGlobal = function(e) {
  4002. if (void 0 === this.globals[e]) throw new Error("global not found: " + e);
  4003. return this.globals[e]
  4004. }, n.addFilter = function(e, t, n) {
  4005. var r = t;
  4006. return n && this.asyncFilters.push(e), this.filters[e] = r, this
  4007. }, n.getFilter = function(e) {
  4008. if (!this.filters[e]) throw new Error("filter not found: " + e);
  4009. return this.filters[e]
  4010. }, n.addTest = function(e, t) {
  4011. return this.tests[e] = t, this
  4012. }, n.getTest = function(e) {
  4013. if (!this.tests[e]) throw new Error("test not found: " + e);
  4014. return this.tests[e]
  4015. }, n.resolveTemplate = function(e, t, n) {
  4016. return !(!e.isRelative || !t) && e.isRelative(n) && e.resolve ? e.resolve(t, n) : n
  4017. }, n.getTemplate = function(e, t, n, r, i) {
  4018. var s, a = this,
  4019. o = this,
  4020. c = null;
  4021. if (e && e.raw && (e = e.raw), je.isFunction(n) && (i = n, n = null, t = t || !1), je.isFunction(t) && (i = t, t = !1), e instanceof _i) c = e;
  4022. else {
  4023. if ("string" != typeof e) throw new Error("template names must be a string: " + e);
  4024. for (var l = 0; l < this.loaders.length; l++) {
  4025. var h = this.loaders[l];
  4026. if (c = h.cache[this.resolveTemplate(h, n, e)]) break
  4027. }
  4028. }
  4029. if (c) return t && c.compile(), i ? void i(null, c) : c;
  4030. return je.asyncIter(this.loaders, (function(t, r, i, s) {
  4031. function a(e, n) {
  4032. e ? s(e) : n ? (n.loader = t, s(null, n)) : i()
  4033. }
  4034. e = o.resolveTemplate(t, n, e), t.async ? t.getSource(e, a) : a(null, t.getSource(e))
  4035. }), (function(n, o) {
  4036. if (o || n || r || (n = new Error("template not found: " + e)), n) {
  4037. if (i) return void i(n);
  4038. throw n
  4039. }
  4040. var c;
  4041. o ? (c = new _i(o.src, a, o.path, t), o.noCache || (o.loader.cache[e] = c)) : c = new _i(Ei, a, "", t), i ? i(null, c) : s = c
  4042. })), s
  4043. }, n.express = function(e) {
  4044. return function(e, t) {
  4045. function n(e, t) {
  4046. if (this.name = e, this.path = e, this.defaultEngine = t.defaultEngine, this.ext = Kr.extname(e), !this.ext && !this.defaultEngine) throw new Error("No default engine was specified and no extension was provided.");
  4047. this.ext || (this.name += this.ext = ("." !== this.defaultEngine[0] ? "." : "") + this.defaultEngine)
  4048. }
  4049. return n.prototype.render = function(t, n) {
  4050. e.render(this.name, t, n)
  4051. }, t.set("view", n), t.set("jinja2Env", e), e
  4052. }(this, e)
  4053. }, n.render = function(e, t, n) {
  4054. je.isFunction(t) && (n = t, t = null);
  4055. var r = null;
  4056. return this.getTemplate(e, (function(e, i) {
  4057. if (e && n) di(n, e);
  4058. else {
  4059. if (e) throw e;
  4060. r = i.render(t, n)
  4061. }
  4062. })), r
  4063. }, n.renderString = function(e, t, n, r) {
  4064. return je.isFunction(n) && (r = n, n = {}), new _i(e, this, (n = n || {}).path).render(t, r)
  4065. }, n.waterfall = function(e, t, n) {
  4066. return qt(e, t, n)
  4067. }, t
  4068. }(ui),
  4069. Ti = function(e) {
  4070. function t() {
  4071. return e.apply(this, arguments) || this
  4072. }
  4073. si(t, e);
  4074. var n = t.prototype;
  4075. return n.init = function(e, t, n) {
  4076. var r = this;
  4077. this.env = n || new mi, this.ctx = je.extend({}, e), this.blocks = {}, this.exported = [], je.keys(t).forEach((function(e) {
  4078. r.addBlock(e, t[e])
  4079. }))
  4080. }, n.lookup = function(e) {
  4081. return e in this.env.globals && !(e in this.ctx) ? this.env.globals[e] : this.ctx[e]
  4082. }, n.setVariable = function(e, t) {
  4083. this.ctx[e] = t
  4084. }, n.getVariables = function() {
  4085. return this.ctx
  4086. }, n.addBlock = function(e, t) {
  4087. return this.blocks[e] = this.blocks[e] || [], this.blocks[e].push(t), this
  4088. }, n.getBlock = function(e) {
  4089. if (!this.blocks[e]) throw new Error('unknown block "' + e + '"');
  4090. return this.blocks[e][0]
  4091. }, n.getSuper = function(e, t, n, r, i, s) {
  4092. var a = je.indexOf(this.blocks[t] || [], n),
  4093. o = this.blocks[t][a + 1];
  4094. if (-1 === a || !o) throw new Error('no super block available for "' + t + '"');
  4095. o(e, this, r, i, s)
  4096. }, n.addExport = function(e) {
  4097. this.exported.push(e)
  4098. }, n.getExported = function() {
  4099. var e = this,
  4100. t = {};
  4101. return this.exported.forEach((function(n) {
  4102. t[n] = e.ctx[n]
  4103. })), t
  4104. }, t
  4105. }(hi),
  4106. _i = function(e) {
  4107. function t() {
  4108. return e.apply(this, arguments) || this
  4109. }
  4110. si(t, e);
  4111. var n = t.prototype;
  4112. return n.init = function(e, t, n, r) {
  4113. if (this.env = t || new mi, je.isObject(e)) switch (e.type) {
  4114. case "code":
  4115. this.tmplProps = e.obj;
  4116. break;
  4117. case "string":
  4118. this.tmplStr = e.obj;
  4119. break;
  4120. default:
  4121. throw new Error("Unexpected template object type " + e.type + "; expected 'code', or 'string'")
  4122. } else {
  4123. if (!je.isString(e)) throw new Error("src must be a string or an object describing the source");
  4124. this.tmplStr = e
  4125. }
  4126. if (this.path = n, r) try {
  4127. this._compile()
  4128. } catch (e) {
  4129. throw je._prettifyError(this.path, this.env.opts.dev, e)
  4130. } else this.compiled = !1
  4131. }, n.render = function(e, t, n) {
  4132. var r = this;
  4133. "function" == typeof e ? (n = e, e = {}) : "function" == typeof t && (n = t, t = null);
  4134. var i = !t;
  4135. try {
  4136. this.compile()
  4137. } catch (e) {
  4138. var s = je._prettifyError(this.path, this.env.opts.dev, e);
  4139. if (n) return di(n, s);
  4140. throw s
  4141. }
  4142. var a = new Ti(e || {}, this.blocks, this.env),
  4143. o = t ? t.push(!0) : new fi;
  4144. o.topLevel = !0;
  4145. var c = null,
  4146. l = !1;
  4147. return this.rootRenderFunc(this.env, a, o, kr, (function(e, t) {
  4148. if (!l || !n || void 0 === t)
  4149. if (e && (e = je._prettifyError(r.path, r.env.opts.dev, e), l = !0), n) i ? di(n, e, t) : n(e, t);
  4150. else {
  4151. if (e) throw e;
  4152. c = t
  4153. }
  4154. })), c
  4155. }, n.getExported = function(e, t, n) {
  4156. "function" == typeof e && (n = e, e = {}), "function" == typeof t && (n = t, t = null);
  4157. try {
  4158. this.compile()
  4159. } catch (e) {
  4160. if (n) return n(e);
  4161. throw e
  4162. }
  4163. var r = t ? t.push() : new fi;
  4164. r.topLevel = !0;
  4165. var i = new Ti(e || {}, this.blocks, this.env);
  4166. this.rootRenderFunc(this.env, i, r, kr, (function(e) {
  4167. e ? n(e, null) : n(null, i.getExported())
  4168. }))
  4169. }, n.compile = function() {
  4170. this.compiled || this._compile()
  4171. }, n._compile = function() {
  4172. var e;
  4173. if (this.tmplProps) e = this.tmplProps;
  4174. else {
  4175. var t = xr.compile(this.tmplStr, this.env.asyncFilters, this.env.extensionsList, this.path, this.env.opts);
  4176. e = new Function(t)()
  4177. }
  4178. this.blocks = this._getBlocks(e), this.rootRenderFunc = e.root, this.compiled = !0
  4179. }, n._getBlocks = function(e) {
  4180. var t = {};
  4181. return je.keys(e).forEach((function(n) {
  4182. "b_" === n.slice(0, 2) && (t[n.slice(2)] = e[n])
  4183. })), t
  4184. }, t
  4185. }(hi),
  4186. Ai = {
  4187. Environment: mi,
  4188. Template: _i
  4189. };
  4190. je._prettifyError;
  4191. var gi, Ni = Ai.Environment;
  4192. function Ci(e, t) {
  4193. var n;
  4194. return t = t || {}, je.isObject(e) && (t = e, e = null), ti.FileSystemLoader ? n = new ti.FileSystemLoader(e, {
  4195. watch: t.watch,
  4196. noCache: t.noCache
  4197. }) : ti.WebLoader && (n = new ti.WebLoader(e, {
  4198. useCache: t.web && t.web.useCache,
  4199. async: t.web && t.web.async
  4200. })), gi = new Ni(n, t), t && t.express && gi.express(t.express), gi
  4201. }
  4202. ti.FileSystemLoader, ti.NodeResolveLoader, ti.PrecompiledLoader, ti.WebLoader;
  4203. var Ii = function(e, t, n) {
  4204. return gi || Ci(), gi.renderString(e, t, n)
  4205. },
  4206. Si = function() {
  4207. return Si = Object.assign || function(e) {
  4208. for (var t, n = 1, r = arguments.length; n < r; n++)
  4209. for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
  4210. return e
  4211. }, Si.apply(this, arguments)
  4212. };
  4213. function bi(e, t, n) {
  4214. return e ? e(null != t ? t : e._root.children, null, void 0, n).toString() : ""
  4215. }
  4216. function Oi(e, t) {
  4217. return bi(this, function(e, t) {
  4218. return !t && "object" == typeof e && null != e && !("length" in e) && !("type" in e)
  4219. }(e) ? void(t = e) : e, Si(Si(Si({}, n), null == this ? void 0 : this._options), i(null != t ? t : {})))
  4220. }
  4221. function yi(e) {
  4222. return bi(this, e, Si(Si({}, this._options), {
  4223. xmlMode: !0
  4224. }))
  4225. }
  4226. function Li(e) {
  4227. for (var t = e || (this ? this.root() : []), n = "", r = 0; r < t.length; r++) n += z(t[r]);
  4228. return n
  4229. }
  4230. function ki(e, t, r) {
  4231. if (void 0 === r && (r = "boolean" == typeof t && t), !e || "string" != typeof e) return null;
  4232. "boolean" == typeof t && (r = t);
  4233. var i = this.load(e, n, !1);
  4234. return r || i("script").remove(), i.root()[0].children.slice()
  4235. }
  4236. function vi() {
  4237. return this(this._root)
  4238. }
  4239. function Di(e, t) {
  4240. if (t === e) return !1;
  4241. for (var n = t; n && n !== n.parent;)
  4242. if ((n = n.parent) === e) return !0;
  4243. return !1
  4244. }
  4245. function Ri(e, t) {
  4246. if (Mi(e) && Mi(t)) {
  4247. for (var n = e.length, r = +t.length, i = 0; i < r; i++) e[n++] = t[i];
  4248. return e.length = n, e
  4249. }
  4250. }
  4251. function Mi(e) {
  4252. if (Array.isArray(e)) return !0;
  4253. if ("object" != typeof e || !Object.prototype.hasOwnProperty.call(e, "length") || "number" != typeof e.length || e.length < 0) return !1;
  4254. for (var t = 0; t < e.length; t++)
  4255. if (!(t in e)) return !1;
  4256. return !0
  4257. }
  4258. var Pi, xi = Object.freeze({
  4259. __proto__: null,
  4260. html: Oi,
  4261. xml: yi,
  4262. text: Li,
  4263. parseHTML: ki,
  4264. root: vi,
  4265. contains: Di,
  4266. merge: Ri,
  4267. jp: function(e, t) {
  4268. return He({
  4269. path: e,
  4270. json: t
  4271. })
  4272. },
  4273. jpo: function(e) {
  4274. return He(e)
  4275. },
  4276. jinja2: function(e, t) {
  4277. return Ii(e, t)
  4278. }
  4279. });
  4280. function wi(e) {
  4281. return null != e.cheerio
  4282. }
  4283. function Bi(e, t) {
  4284. for (var n = e.length, r = 0; r < n; r++) t(e[r], r);
  4285. return e
  4286. }
  4287. function Fi(e) {
  4288. var t = "length" in e ? Array.prototype.map.call(e, (function(e) {
  4289. return v(e, !0)
  4290. })) : [v(e, !0)],
  4291. n = new N(t);
  4292. return t.forEach((function(e) {
  4293. e.parent = n
  4294. })), t
  4295. }
  4296. function Ui(e) {
  4297. var t = e.indexOf("<");
  4298. if (t < 0 || t > e.length - 3) return !1;
  4299. var n = e.charCodeAt(t + 1);
  4300. return (n >= Pi.LowerA && n <= Pi.LowerZ || n >= Pi.UpperA && n <= Pi.UpperZ || n === Pi.Exclamation) && e.includes(">", t + 2)
  4301. }! function(e) {
  4302. e[e.LowerA = 97] = "LowerA", e[e.LowerZ = 122] = "LowerZ", e[e.UpperA = 65] = "UpperA", e[e.UpperZ = 90] = "UpperZ", e[e.Exclamation = 33] = "Exclamation"
  4303. }(Pi || (Pi = {}));
  4304. var Hi = Object.prototype.hasOwnProperty,
  4305. Gi = /\s+/,
  4306. Yi = {
  4307. null: null,
  4308. true: !0,
  4309. false: !1
  4310. },
  4311. qi = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
  4312. Ki = /^{[^]*}$|^\[[^]*]$/;
  4313. function ji(e, t, n) {
  4314. var r;
  4315. if (e && I(e)) return null !== (r = e.attribs) && void 0 !== r || (e.attribs = {}), t ? Hi.call(e.attribs, t) ? !n && qi.test(t) ? t : e.attribs[t] : "option" === e.name && "value" === t ? Li(e.children) : "input" !== e.name || "radio" !== e.attribs.type && "checkbox" !== e.attribs.type || "value" !== t ? void 0 : "on" : e.attribs
  4316. }
  4317. function Vi(e, t, n) {
  4318. null === n ? zi(e, t) : e.attribs[t] = "".concat(n)
  4319. }
  4320. function Wi(e, t, n) {
  4321. return t in e ? e[t] : !n && qi.test(t) ? void 0 !== ji(e, t, !1) : ji(e, t, n)
  4322. }
  4323. function Qi(e, t, n, r) {
  4324. t in e ? e[t] = n : Vi(e, t, !r && qi.test(t) ? n ? "" : null : "".concat(n))
  4325. }
  4326. function Xi(e, t, n) {
  4327. var r, i = e;
  4328. null !== (r = i.data) && void 0 !== r || (i.data = {}), "object" == typeof t ? Object.assign(i.data, t) : "string" == typeof t && void 0 !== n && (i.data[t] = n)
  4329. }
  4330. function $i(e, t) {
  4331. var n, r, i, s;
  4332. null == t ? r = (n = Object.keys(e.attribs).filter((function(e) {
  4333. return e.startsWith("data-")
  4334. }))).map((function(e) {
  4335. return e.slice("data-".length).replace(/[_.-](\w|$)/g, (function(e, t) {
  4336. return t.toUpperCase()
  4337. }))
  4338. })) : (n = ["data-" + (s = t, s.replace(/[A-Z]/g, "-$&").toLowerCase())], r = [t]);
  4339. for (var a = 0; a < n.length; ++a) {
  4340. var o = n[a],
  4341. c = r[a];
  4342. if (Hi.call(e.attribs, o) && !Hi.call(e.data, c)) {
  4343. if (i = e.attribs[o], Hi.call(Yi, i)) i = Yi[i];
  4344. else if (i === String(Number(i))) i = Number(i);
  4345. else if (Ki.test(i)) try {
  4346. i = JSON.parse(i)
  4347. } catch (e) {}
  4348. e.data[c] = i
  4349. }
  4350. }
  4351. return null == t ? e.data : i
  4352. }
  4353. function zi(e, t) {
  4354. e.attribs && Hi.call(e.attribs, t) && delete e.attribs[t]
  4355. }
  4356. function Ji(e) {
  4357. return e ? e.trim().split(Gi) : []
  4358. }
  4359. var Zi, es, ts = Object.freeze({
  4360. __proto__: null,
  4361. attr: function(e, t) {
  4362. if ("object" == typeof e || void 0 !== t) {
  4363. if ("function" == typeof t) {
  4364. if ("string" != typeof e) throw new Error("Bad combination of arguments.");
  4365. return Bi(this, (function(n, r) {
  4366. I(n) && Vi(n, e, t.call(n, r, n.attribs[e]))
  4367. }))
  4368. }
  4369. return Bi(this, (function(n) {
  4370. I(n) && ("object" == typeof e ? Object.keys(e).forEach((function(t) {
  4371. var r = e[t];
  4372. Vi(n, t, r)
  4373. })) : Vi(n, e, t))
  4374. }))
  4375. }
  4376. return arguments.length > 1 ? this : ji(this[0], e, this.options.xmlMode)
  4377. },
  4378. prop: function(e, t) {
  4379. var n, r = this;
  4380. if ("string" == typeof e && void 0 === t) {
  4381. var i = this[0];
  4382. if (!i || !I(i)) return;
  4383. switch (e) {
  4384. case "style":
  4385. var s = this.css(),
  4386. a = Object.keys(s);
  4387. return a.forEach((function(e, t) {
  4388. s[t] = e
  4389. })), s.length = a.length, s;
  4390. case "tagName":
  4391. case "nodeName":
  4392. return i.name.toUpperCase();
  4393. case "href":
  4394. case "src":
  4395. var o = null === (n = i.attribs) || void 0 === n ? void 0 : n[e];
  4396. return "undefined" == typeof URL || ("href" !== e || "a" !== i.tagName && "link" !== i.name) && ("src" !== e || "img" !== i.tagName && "iframe" !== i.tagName && "audio" !== i.tagName && "video" !== i.tagName && "source" !== i.tagName) || void 0 === o || !this.options.baseURI ? o : new URL(o, this.options.baseURI).href;
  4397. case "innerText":
  4398. return J(i);
  4399. case "textContent":
  4400. return z(i);
  4401. case "outerHTML":
  4402. return this.clone().wrap("<container />").parent().html();
  4403. case "innerHTML":
  4404. return this.html();
  4405. default:
  4406. return Wi(i, e, this.options.xmlMode)
  4407. }
  4408. }
  4409. if ("object" == typeof e || void 0 !== t) {
  4410. if ("function" == typeof t) {
  4411. if ("object" == typeof e) throw new Error("Bad combination of arguments.");
  4412. return Bi(this, (function(n, i) {
  4413. I(n) && Qi(n, e, t.call(n, i, Wi(n, e, r.options.xmlMode)), r.options.xmlMode)
  4414. }))
  4415. }
  4416. return Bi(this, (function(n) {
  4417. I(n) && ("object" == typeof e ? Object.keys(e).forEach((function(t) {
  4418. var i = e[t];
  4419. Qi(n, t, i, r.options.xmlMode)
  4420. })) : Qi(n, e, t, r.options.xmlMode))
  4421. }))
  4422. }
  4423. },
  4424. data: function(e, t) {
  4425. var n, r = this[0];
  4426. if (r && I(r)) {
  4427. var i = r;
  4428. return null !== (n = i.data) && void 0 !== n || (i.data = {}), e ? "object" == typeof e || void 0 !== t ? (Bi(this, (function(n) {
  4429. I(n) && ("object" == typeof e ? Xi(n, e) : Xi(n, e, t))
  4430. })), this) : Hi.call(i.data, e) ? i.data[e] : $i(i, e) : $i(i)
  4431. }
  4432. },
  4433. val: function(e) {
  4434. var t = 0 === arguments.length,
  4435. n = this[0];
  4436. if (!n || !I(n)) return t ? void 0 : this;
  4437. switch (n.name) {
  4438. case "textarea":
  4439. return this.text(e);
  4440. case "select":
  4441. var r = this.find("option:selected");
  4442. if (!t) {
  4443. if (null == this.attr("multiple") && "object" == typeof e) return this;
  4444. this.find("option").removeAttr("selected");
  4445. for (var i = "object" != typeof e ? [e] : e, s = 0; s < i.length; s++) this.find('option[value="'.concat(i[s], '"]')).attr("selected", "");
  4446. return this
  4447. }
  4448. return this.attr("multiple") ? r.toArray().map((function(e) {
  4449. return Li(e.children)
  4450. })) : r.attr("value");
  4451. case "input":
  4452. case "option":
  4453. return t ? this.attr("value") : this.attr("value", e)
  4454. }
  4455. },
  4456. removeAttr: function(e) {
  4457. for (var t = Ji(e), n = function(e) {
  4458. Bi(r, (function(n) {
  4459. I(n) && zi(n, t[e])
  4460. }))
  4461. }, r = this, i = 0; i < t.length; i++) n(i);
  4462. return this
  4463. },
  4464. hasClass: function(e) {
  4465. return this.toArray().some((function(t) {
  4466. var n = I(t) && t.attribs.class,
  4467. r = -1;
  4468. if (n && e.length)
  4469. for (;
  4470. (r = n.indexOf(e, r + 1)) > -1;) {
  4471. var i = r + e.length;
  4472. if ((0 === r || Gi.test(n[r - 1])) && (i === n.length || Gi.test(n[i]))) return !0
  4473. }
  4474. return !1
  4475. }))
  4476. },
  4477. addClass: function e(t) {
  4478. if ("function" == typeof t) return Bi(this, (function(n, r) {
  4479. if (I(n)) {
  4480. var i = n.attribs.class || "";
  4481. e.call([n], t.call(n, r, i))
  4482. }
  4483. }));
  4484. if (!t || "string" != typeof t) return this;
  4485. for (var n = t.split(Gi), r = this.length, i = 0; i < r; i++) {
  4486. var s = this[i];
  4487. if (I(s)) {
  4488. var a = ji(s, "class", !1);
  4489. if (a) {
  4490. for (var o = " ".concat(a, " "), c = 0; c < n.length; c++) {
  4491. var l = "".concat(n[c], " ");
  4492. o.includes(" ".concat(l)) || (o += l)
  4493. }
  4494. Vi(s, "class", o.trim())
  4495. } else Vi(s, "class", n.join(" ").trim())
  4496. }
  4497. }
  4498. return this
  4499. },
  4500. removeClass: function e(t) {
  4501. if ("function" == typeof t) return Bi(this, (function(n, r) {
  4502. I(n) && e.call([n], t.call(n, r, n.attribs.class || ""))
  4503. }));
  4504. var n = Ji(t),
  4505. r = n.length,
  4506. i = 0 === arguments.length;
  4507. return Bi(this, (function(e) {
  4508. if (I(e))
  4509. if (i) e.attribs.class = "";
  4510. else {
  4511. for (var t = Ji(e.attribs.class), s = !1, a = 0; a < r; a++) {
  4512. var o = t.indexOf(n[a]);
  4513. o >= 0 && (t.splice(o, 1), s = !0, a--)
  4514. }
  4515. s && (e.attribs.class = t.join(" "))
  4516. }
  4517. }))
  4518. },
  4519. toggleClass: function e(t, n) {
  4520. if ("function" == typeof t) return Bi(this, (function(r, i) {
  4521. I(r) && e.call([r], t.call(r, i, r.attribs.class || "", n), n)
  4522. }));
  4523. if (!t || "string" != typeof t) return this;
  4524. for (var r = t.split(Gi), i = r.length, s = "boolean" == typeof n ? n ? 1 : -1 : 0, a = this.length, o = 0; o < a; o++) {
  4525. var c = this[o];
  4526. if (I(c)) {
  4527. for (var l = Ji(c.attribs.class), h = 0; h < i; h++) {
  4528. var u = l.indexOf(r[h]);
  4529. s >= 0 && u < 0 ? l.push(r[h]) : s <= 0 && u >= 0 && l.splice(u, 1)
  4530. }
  4531. c.attribs.class = l.join(" ")
  4532. }
  4533. }
  4534. return this
  4535. }
  4536. });
  4537. ! function(e) {
  4538. e.Attribute = "attribute", e.Pseudo = "pseudo", e.PseudoElement = "pseudo-element", e.Tag = "tag", e.Universal = "universal", e.Adjacent = "adjacent", e.Child = "child", e.Descendant = "descendant", e.Parent = "parent", e.Sibling = "sibling", e.ColumnCombinator = "column-combinator"
  4539. }(Zi || (Zi = {})),
  4540. function(e) {
  4541. e.Any = "any", e.Element = "element", e.End = "end", e.Equals = "equals", e.Exists = "exists", e.Hyphen = "hyphen", e.Not = "not", e.Start = "start"
  4542. }(es || (es = {}));
  4543. const ns = /^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,
  4544. rs = /\\([\da-f]{1,6}\s?|(\s)|.)/gi,
  4545. is = new Map([
  4546. [126, es.Element],
  4547. [94, es.Start],
  4548. [36, es.End],
  4549. [42, es.Any],
  4550. [33, es.Not],
  4551. [124, es.Hyphen]
  4552. ]),
  4553. ss = new Set(["has", "not", "matches", "is", "where", "host", "host-context"]);
  4554. function as(e) {
  4555. switch (e.type) {
  4556. case Zi.Adjacent:
  4557. case Zi.Child:
  4558. case Zi.Descendant:
  4559. case Zi.Parent:
  4560. case Zi.Sibling:
  4561. case Zi.ColumnCombinator:
  4562. return !0;
  4563. default:
  4564. return !1
  4565. }
  4566. }
  4567. const os = new Set(["contains", "icontains"]);
  4568. function cs(e, t, n) {
  4569. const r = parseInt(t, 16) - 65536;
  4570. return r != r || n ? t : r < 0 ? String.fromCharCode(r + 65536) : String.fromCharCode(r >> 10 | 55296, 1023 & r | 56320)
  4571. }
  4572. function ls(e) {
  4573. return e.replace(rs, cs)
  4574. }
  4575. function hs(e) {
  4576. return 39 === e || 34 === e
  4577. }
  4578. function us(e) {
  4579. return 32 === e || 9 === e || 10 === e || 12 === e || 13 === e
  4580. }
  4581. function ps(e) {
  4582. const t = [],
  4583. n = fs(t, `${e}`, 0);
  4584. if (n < e.length) throw new Error(`Unmatched selector: ${e.slice(n)}`);
  4585. return t
  4586. }
  4587. function fs(e, t, n) {
  4588. let r = [];
  4589. function i(e) {
  4590. const r = t.slice(n + e).match(ns);
  4591. if (!r) throw new Error(`Expected name, found ${t.slice(n)}`);
  4592. const [i] = r;
  4593. return n += e + i.length, ls(i)
  4594. }
  4595. function s(e) {
  4596. for (n += e; n < t.length && us(t.charCodeAt(n));) n++
  4597. }
  4598. function a() {
  4599. const e = n += 1;
  4600. let r = 1;
  4601. for (; r > 0 && n < t.length; n++) 40 !== t.charCodeAt(n) || o(n) ? 41 !== t.charCodeAt(n) || o(n) || r-- : r++;
  4602. if (r) throw new Error("Parenthesis not matched");
  4603. return ls(t.slice(e, n - 1))
  4604. }
  4605. function o(e) {
  4606. let n = 0;
  4607. for (; 92 === t.charCodeAt(--e);) n++;
  4608. return 1 == (1 & n)
  4609. }
  4610. function c() {
  4611. if (r.length > 0 && as(r[r.length - 1])) throw new Error("Did not expect successive traversals.")
  4612. }
  4613. function l(e) {
  4614. r.length > 0 && r[r.length - 1].type === Zi.Descendant ? r[r.length - 1].type = e : (c(), r.push({
  4615. type: e
  4616. }))
  4617. }
  4618. function h(e, t) {
  4619. r.push({
  4620. type: Zi.Attribute,
  4621. name: e,
  4622. action: t,
  4623. value: i(1),
  4624. namespace: null,
  4625. ignoreCase: "quirks"
  4626. })
  4627. }
  4628. function u() {
  4629. if (r.length && r[r.length - 1].type === Zi.Descendant && r.pop(), 0 === r.length) throw new Error("Empty sub-selector");
  4630. e.push(r)
  4631. }
  4632. if (s(0), t.length === n) return n;
  4633. e: for (; n < t.length;) {
  4634. const e = t.charCodeAt(n);
  4635. switch (e) {
  4636. case 32:
  4637. case 9:
  4638. case 10:
  4639. case 12:
  4640. case 13:
  4641. 0 !== r.length && r[0].type === Zi.Descendant || (c(), r.push({
  4642. type: Zi.Descendant
  4643. })), s(1);
  4644. break;
  4645. case 62:
  4646. l(Zi.Child), s(1);
  4647. break;
  4648. case 60:
  4649. l(Zi.Parent), s(1);
  4650. break;
  4651. case 126:
  4652. l(Zi.Sibling), s(1);
  4653. break;
  4654. case 43:
  4655. l(Zi.Adjacent), s(1);
  4656. break;
  4657. case 46:
  4658. h("class", es.Element);
  4659. break;
  4660. case 35:
  4661. h("id", es.Equals);
  4662. break;
  4663. case 91: {
  4664. let e;
  4665. s(1);
  4666. let a = null;
  4667. 124 === t.charCodeAt(n) ? e = i(1) : t.startsWith("*|", n) ? (a = "*", e = i(2)) : (e = i(0), 124 === t.charCodeAt(n) && 61 !== t.charCodeAt(n + 1) && (a = e, e = i(1))), s(0);
  4668. let c = es.Exists;
  4669. const l = is.get(t.charCodeAt(n));
  4670. if (l) {
  4671. if (c = l, 61 !== t.charCodeAt(n + 1)) throw new Error("Expected `=`");
  4672. s(2)
  4673. } else 61 === t.charCodeAt(n) && (c = es.Equals, s(1));
  4674. let h = "",
  4675. u = null;
  4676. if ("exists" !== c) {
  4677. if (hs(t.charCodeAt(n))) {
  4678. const e = t.charCodeAt(n);
  4679. let r = n + 1;
  4680. for (; r < t.length && (t.charCodeAt(r) !== e || o(r));) r += 1;
  4681. if (t.charCodeAt(r) !== e) throw new Error("Attribute value didn't end");
  4682. h = ls(t.slice(n + 1, r)), n = r + 1
  4683. } else {
  4684. const e = n;
  4685. for (; n < t.length && (!us(t.charCodeAt(n)) && 93 !== t.charCodeAt(n) || o(n));) n += 1;
  4686. h = ls(t.slice(e, n))
  4687. }
  4688. s(0);
  4689. const e = 32 | t.charCodeAt(n);
  4690. 115 === e ? (u = !1, s(1)) : 105 === e && (u = !0, s(1))
  4691. }
  4692. if (93 !== t.charCodeAt(n)) throw new Error("Attribute selector didn't terminate");
  4693. n += 1;
  4694. const p = {
  4695. type: Zi.Attribute,
  4696. name: e,
  4697. action: c,
  4698. value: h,
  4699. namespace: a,
  4700. ignoreCase: u
  4701. };
  4702. r.push(p);
  4703. break
  4704. }
  4705. case 58: {
  4706. if (58 === t.charCodeAt(n + 1)) {
  4707. r.push({
  4708. type: Zi.PseudoElement,
  4709. name: i(2).toLowerCase(),
  4710. data: 40 === t.charCodeAt(n) ? a() : null
  4711. });
  4712. continue
  4713. }
  4714. const e = i(1).toLowerCase();
  4715. let s = null;
  4716. if (40 === t.charCodeAt(n))
  4717. if (ss.has(e)) {
  4718. if (hs(t.charCodeAt(n + 1))) throw new Error(`Pseudo-selector ${e} cannot be quoted`);
  4719. if (s = [], n = fs(s, t, n + 1), 41 !== t.charCodeAt(n)) throw new Error(`Missing closing parenthesis in :${e} (${t})`);
  4720. n += 1
  4721. } else {
  4722. if (s = a(), os.has(e)) {
  4723. const e = s.charCodeAt(0);
  4724. e === s.charCodeAt(s.length - 1) && hs(e) && (s = s.slice(1, -1))
  4725. }
  4726. s = ls(s)
  4727. } r.push({
  4728. type: Zi.Pseudo,
  4729. name: e,
  4730. data: s
  4731. });
  4732. break
  4733. }
  4734. case 44:
  4735. u(), r = [], s(1);
  4736. break;
  4737. default: {
  4738. if (t.startsWith("/*", n)) {
  4739. const e = t.indexOf("*/", n + 2);
  4740. if (e < 0) throw new Error("Comment was not terminated");
  4741. n = e + 2, 0 === r.length && s(0);
  4742. break
  4743. }
  4744. let a, o = null;
  4745. if (42 === e) n += 1, a = "*";
  4746. else if (124 === e) {
  4747. if (a = "", 124 === t.charCodeAt(n + 1)) {
  4748. l(Zi.ColumnCombinator), s(2);
  4749. break
  4750. }
  4751. } else {
  4752. if (!ns.test(t.slice(n))) break e;
  4753. a = i(0)
  4754. }
  4755. 124 === t.charCodeAt(n) && 124 !== t.charCodeAt(n + 1) && (o = a, 42 === t.charCodeAt(n + 1) ? (a = "*", n += 2) : a = i(1)), r.push("*" === a ? {
  4756. type: Zi.Universal,
  4757. namespace: o
  4758. } : {
  4759. type: Zi.Tag,
  4760. name: a,
  4761. namespace: o
  4762. })
  4763. }
  4764. }
  4765. }
  4766. return u(), n
  4767. }
  4768. var ds = {
  4769. trueFunc: function() {
  4770. return !0
  4771. },
  4772. falseFunc: function() {
  4773. return !1
  4774. }
  4775. },
  4776. Es = ds.trueFunc;
  4777. const ms = new Map([
  4778. [Zi.Universal, 50],
  4779. [Zi.Tag, 30],
  4780. [Zi.Attribute, 1],
  4781. [Zi.Pseudo, 0]
  4782. ]);
  4783. function Ts(e) {
  4784. return !ms.has(e.type)
  4785. }
  4786. const _s = new Map([
  4787. [es.Exists, 10],
  4788. [es.Equals, 8],
  4789. [es.Not, 7],
  4790. [es.Start, 6],
  4791. [es.End, 6],
  4792. [es.Any, 5]
  4793. ]);
  4794. function As(e) {
  4795. const t = e.map(gs);
  4796. for (let n = 1; n < e.length; n++) {
  4797. const r = t[n];
  4798. if (!(r < 0))
  4799. for (let i = n - 1; i >= 0 && r < t[i]; i--) {
  4800. const n = e[i + 1];
  4801. e[i + 1] = e[i], e[i] = n, t[i + 1] = t[i], t[i] = r
  4802. }
  4803. }
  4804. }
  4805. function gs(e) {
  4806. var t, n;
  4807. let r = null !== (t = ms.get(e.type)) && void 0 !== t ? t : -1;
  4808. return e.type === Zi.Attribute ? (r = null !== (n = _s.get(e.action)) && void 0 !== n ? n : 4, e.action === es.Equals && "id" === e.name && (r = 9), e.ignoreCase && (r >>= 1)) : e.type === Zi.Pseudo && (e.data ? "has" === e.name || "contains" === e.name ? r = 0 : Array.isArray(e.data) ? (r = Math.min(...e.data.map((e => Math.min(...e.map(gs))))), r < 0 && (r = 0)) : r = 2 : r = 3), r
  4809. }
  4810. const Ns = /[-[\]{}()*+?.,\\^$|#\s]/g;
  4811. function Cs(e) {
  4812. return e.replace(Ns, "\\$&")
  4813. }
  4814. const Is = new Set(["accept", "accept-charset", "align", "alink", "axis", "bgcolor", "charset", "checked", "clear", "codetype", "color", "compact", "declare", "defer", "dir", "direction", "disabled", "enctype", "face", "frame", "hreflang", "http-equiv", "lang", "language", "link", "media", "method", "multiple", "nohref", "noresize", "noshade", "nowrap", "readonly", "rel", "rev", "rules", "scope", "scrolling", "selected", "shape", "target", "text", "type", "valign", "valuetype", "vlink"]);
  4815. function Ss(e, t) {
  4816. return "boolean" == typeof e.ignoreCase ? e.ignoreCase : "quirks" === e.ignoreCase ? !!t.quirksMode : !t.xmlMode && Is.has(e.name)
  4817. }
  4818. const bs = {
  4819. equals(e, t, n) {
  4820. const {
  4821. adapter: r
  4822. } = n, {
  4823. name: i
  4824. } = t;
  4825. let {
  4826. value: s
  4827. } = t;
  4828. return Ss(t, n) ? (s = s.toLowerCase(), t => {
  4829. const n = r.getAttributeValue(t, i);
  4830. return null != n && n.length === s.length && n.toLowerCase() === s && e(t)
  4831. }) : t => r.getAttributeValue(t, i) === s && e(t)
  4832. },
  4833. hyphen(e, t, n) {
  4834. const {
  4835. adapter: r
  4836. } = n, {
  4837. name: i
  4838. } = t;
  4839. let {
  4840. value: s
  4841. } = t;
  4842. const a = s.length;
  4843. return Ss(t, n) ? (s = s.toLowerCase(), function(t) {
  4844. const n = r.getAttributeValue(t, i);
  4845. return null != n && (n.length === a || "-" === n.charAt(a)) && n.substr(0, a).toLowerCase() === s && e(t)
  4846. }) : function(t) {
  4847. const n = r.getAttributeValue(t, i);
  4848. return null != n && (n.length === a || "-" === n.charAt(a)) && n.substr(0, a) === s && e(t)
  4849. }
  4850. },
  4851. element(e, t, n) {
  4852. const {
  4853. adapter: r
  4854. } = n, {
  4855. name: i,
  4856. value: s
  4857. } = t;
  4858. if (/\s/.test(s)) return ds.falseFunc;
  4859. const a = new RegExp(`(?:^|\\s)${Cs(s)}(?:$|\\s)`, Ss(t, n) ? "i" : "");
  4860. return function(t) {
  4861. const n = r.getAttributeValue(t, i);
  4862. return null != n && n.length >= s.length && a.test(n) && e(t)
  4863. }
  4864. },
  4865. exists: (e, {
  4866. name: t
  4867. }, {
  4868. adapter: n
  4869. }) => r => n.hasAttrib(r, t) && e(r),
  4870. start(e, t, n) {
  4871. const {
  4872. adapter: r
  4873. } = n, {
  4874. name: i
  4875. } = t;
  4876. let {
  4877. value: s
  4878. } = t;
  4879. const a = s.length;
  4880. return 0 === a ? ds.falseFunc : Ss(t, n) ? (s = s.toLowerCase(), t => {
  4881. const n = r.getAttributeValue(t, i);
  4882. return null != n && n.length >= a && n.substr(0, a).toLowerCase() === s && e(t)
  4883. }) : t => {
  4884. var n;
  4885. return !!(null === (n = r.getAttributeValue(t, i)) || void 0 === n ? void 0 : n.startsWith(s)) && e(t)
  4886. }
  4887. },
  4888. end(e, t, n) {
  4889. const {
  4890. adapter: r
  4891. } = n, {
  4892. name: i
  4893. } = t;
  4894. let {
  4895. value: s
  4896. } = t;
  4897. const a = -s.length;
  4898. return 0 === a ? ds.falseFunc : Ss(t, n) ? (s = s.toLowerCase(), t => {
  4899. var n;
  4900. return (null === (n = r.getAttributeValue(t, i)) || void 0 === n ? void 0 : n.substr(a).toLowerCase()) === s && e(t)
  4901. }) : t => {
  4902. var n;
  4903. return !!(null === (n = r.getAttributeValue(t, i)) || void 0 === n ? void 0 : n.endsWith(s)) && e(t)
  4904. }
  4905. },
  4906. any(e, t, n) {
  4907. const {
  4908. adapter: r
  4909. } = n, {
  4910. name: i,
  4911. value: s
  4912. } = t;
  4913. if ("" === s) return ds.falseFunc;
  4914. if (Ss(t, n)) {
  4915. const t = new RegExp(Cs(s), "i");
  4916. return function(n) {
  4917. const a = r.getAttributeValue(n, i);
  4918. return null != a && a.length >= s.length && t.test(a) && e(n)
  4919. }
  4920. }
  4921. return t => {
  4922. var n;
  4923. return !!(null === (n = r.getAttributeValue(t, i)) || void 0 === n ? void 0 : n.includes(s)) && e(t)
  4924. }
  4925. },
  4926. not(e, t, n) {
  4927. const {
  4928. adapter: r
  4929. } = n, {
  4930. name: i
  4931. } = t;
  4932. let {
  4933. value: s
  4934. } = t;
  4935. return "" === s ? t => !!r.getAttributeValue(t, i) && e(t) : Ss(t, n) ? (s = s.toLowerCase(), t => {
  4936. const n = r.getAttributeValue(t, i);
  4937. return (null == n || n.length !== s.length || n.toLowerCase() !== s) && e(t)
  4938. }) : t => r.getAttributeValue(t, i) !== s && e(t)
  4939. }
  4940. };
  4941. var Os = Ke((function(e, t) {
  4942. Object.defineProperty(t, "__esModule", {
  4943. value: !0
  4944. }), t.parse = void 0;
  4945. var n = new Set([9, 10, 12, 13, 32]),
  4946. r = "0".charCodeAt(0),
  4947. i = "9".charCodeAt(0);
  4948. t.parse = function(e) {
  4949. if ("even" === (e = e.trim().toLowerCase())) return [2, 0];
  4950. if ("odd" === e) return [2, 1];
  4951. var t = 0,
  4952. s = 0,
  4953. a = c(),
  4954. o = l();
  4955. if (t < e.length && "n" === e.charAt(t) && (t++, s = a * (null != o ? o : 1), h(), t < e.length ? (a = c(), h(), o = l()) : a = o = 0), null === o || t < e.length) throw new Error("n-th rule couldn't be parsed ('" + e + "')");
  4956. return [s, a * o];
  4957. function c() {
  4958. return "-" === e.charAt(t) ? (t++, -1) : ("+" === e.charAt(t) && t++, 1)
  4959. }
  4960. function l() {
  4961. for (var n = t, s = 0; t < e.length && e.charCodeAt(t) >= r && e.charCodeAt(t) <= i;) s = 10 * s + (e.charCodeAt(t) - r), t++;
  4962. return t === n ? null : s
  4963. }
  4964. function h() {
  4965. for (; t < e.length && n.has(e.charCodeAt(t));) t++
  4966. }
  4967. }
  4968. }));
  4969. qe(Os), Os.parse;
  4970. var ys = Ke((function(e, t) {
  4971. Object.defineProperty(t, "__esModule", {
  4972. value: !0
  4973. }), t.compile = void 0, t.compile = function(e) {
  4974. var t = e[0],
  4975. n = e[1] - 1;
  4976. if (n < 0 && t <= 0) return ds.falseFunc;
  4977. if (-1 === t) return function(e) {
  4978. return e <= n
  4979. };
  4980. if (0 === t) return function(e) {
  4981. return e === n
  4982. };
  4983. if (1 === t) return n < 0 ? ds.trueFunc : function(e) {
  4984. return e >= n
  4985. };
  4986. var r = Math.abs(t),
  4987. i = (n % r + r) % r;
  4988. return t > 1 ? function(e) {
  4989. return e >= n && e % r === i
  4990. } : function(e) {
  4991. return e <= n && e % r === i
  4992. }
  4993. }
  4994. }));
  4995. qe(ys), ys.compile;
  4996. var Ls = Os,
  4997. ks = ys,
  4998. vs = Ke((function(e, t) {
  4999. Object.defineProperty(t, "__esModule", {
  5000. value: !0
  5001. }), t.compile = t.parse = void 0, Object.defineProperty(t, "parse", {
  5002. enumerable: !0,
  5003. get: function() {
  5004. return Ls.parse
  5005. }
  5006. }), Object.defineProperty(t, "compile", {
  5007. enumerable: !0,
  5008. get: function() {
  5009. return ks.compile
  5010. }
  5011. }), t.default = function(e) {
  5012. return (0, ks.compile)((0, Ls.parse)(e))
  5013. }
  5014. })),
  5015. Ds = qe(vs);
  5016. function Rs(e, t) {
  5017. return n => {
  5018. const r = t.getParent(n);
  5019. return null != r && t.isTag(r) && e(n)
  5020. }
  5021. }
  5022. vs.compile, vs.parse;
  5023. const Ms = {
  5024. contains: (e, t, {
  5025. adapter: n
  5026. }) => function(r) {
  5027. return e(r) && n.getText(r).includes(t)
  5028. },
  5029. icontains(e, t, {
  5030. adapter: n
  5031. }) {
  5032. const r = t.toLowerCase();
  5033. return function(t) {
  5034. return e(t) && n.getText(t).toLowerCase().includes(r)
  5035. }
  5036. },
  5037. "nth-child"(e, t, {
  5038. adapter: n,
  5039. equals: r
  5040. }) {
  5041. const i = Ds(t);
  5042. return i === ds.falseFunc ? ds.falseFunc : i === ds.trueFunc ? Rs(e, n) : function(t) {
  5043. const s = n.getSiblings(t);
  5044. let a = 0;
  5045. for (let e = 0; e < s.length && !r(t, s[e]); e++) n.isTag(s[e]) && a++;
  5046. return i(a) && e(t)
  5047. }
  5048. },
  5049. "nth-last-child"(e, t, {
  5050. adapter: n,
  5051. equals: r
  5052. }) {
  5053. const i = Ds(t);
  5054. return i === ds.falseFunc ? ds.falseFunc : i === ds.trueFunc ? Rs(e, n) : function(t) {
  5055. const s = n.getSiblings(t);
  5056. let a = 0;
  5057. for (let e = s.length - 1; e >= 0 && !r(t, s[e]); e--) n.isTag(s[e]) && a++;
  5058. return i(a) && e(t)
  5059. }
  5060. },
  5061. "nth-of-type"(e, t, {
  5062. adapter: n,
  5063. equals: r
  5064. }) {
  5065. const i = Ds(t);
  5066. return i === ds.falseFunc ? ds.falseFunc : i === ds.trueFunc ? Rs(e, n) : function(t) {
  5067. const s = n.getSiblings(t);
  5068. let a = 0;
  5069. for (let e = 0; e < s.length; e++) {
  5070. const i = s[e];
  5071. if (r(t, i)) break;
  5072. n.isTag(i) && n.getName(i) === n.getName(t) && a++
  5073. }
  5074. return i(a) && e(t)
  5075. }
  5076. },
  5077. "nth-last-of-type"(e, t, {
  5078. adapter: n,
  5079. equals: r
  5080. }) {
  5081. const i = Ds(t);
  5082. return i === ds.falseFunc ? ds.falseFunc : i === ds.trueFunc ? Rs(e, n) : function(t) {
  5083. const s = n.getSiblings(t);
  5084. let a = 0;
  5085. for (let e = s.length - 1; e >= 0; e--) {
  5086. const i = s[e];
  5087. if (r(t, i)) break;
  5088. n.isTag(i) && n.getName(i) === n.getName(t) && a++
  5089. }
  5090. return i(a) && e(t)
  5091. }
  5092. },
  5093. root: (e, t, {
  5094. adapter: n
  5095. }) => t => {
  5096. const r = n.getParent(t);
  5097. return (null == r || !n.isTag(r)) && e(t)
  5098. },
  5099. scope(e, t, n, r) {
  5100. const {
  5101. equals: i
  5102. } = n;
  5103. return r && 0 !== r.length ? 1 === r.length ? t => i(r[0], t) && e(t) : t => r.includes(t) && e(t) : Ms.root(e, t, n)
  5104. },
  5105. hover: Ps("isHovered"),
  5106. visited: Ps("isVisited"),
  5107. active: Ps("isActive")
  5108. };
  5109. function Ps(e) {
  5110. return function(t, n, {
  5111. adapter: r
  5112. }) {
  5113. const i = r[e];
  5114. return "function" != typeof i ? ds.falseFunc : function(e) {
  5115. return i(e) && t(e)
  5116. }
  5117. }
  5118. }
  5119. const xs = {
  5120. empty: (e, {
  5121. adapter: t
  5122. }) => !t.getChildren(e).some((e => t.isTag(e) || "" !== t.getText(e))),
  5123. "first-child"(e, {
  5124. adapter: t,
  5125. equals: n
  5126. }) {
  5127. if (t.prevElementSibling) return null == t.prevElementSibling(e);
  5128. const r = t.getSiblings(e).find((e => t.isTag(e)));
  5129. return null != r && n(e, r)
  5130. },
  5131. "last-child"(e, {
  5132. adapter: t,
  5133. equals: n
  5134. }) {
  5135. const r = t.getSiblings(e);
  5136. for (let i = r.length - 1; i >= 0; i--) {
  5137. if (n(e, r[i])) return !0;
  5138. if (t.isTag(r[i])) break
  5139. }
  5140. return !1
  5141. },
  5142. "first-of-type"(e, {
  5143. adapter: t,
  5144. equals: n
  5145. }) {
  5146. const r = t.getSiblings(e),
  5147. i = t.getName(e);
  5148. for (let s = 0; s < r.length; s++) {
  5149. const a = r[s];
  5150. if (n(e, a)) return !0;
  5151. if (t.isTag(a) && t.getName(a) === i) break
  5152. }
  5153. return !1
  5154. },
  5155. "last-of-type"(e, {
  5156. adapter: t,
  5157. equals: n
  5158. }) {
  5159. const r = t.getSiblings(e),
  5160. i = t.getName(e);
  5161. for (let s = r.length - 1; s >= 0; s--) {
  5162. const a = r[s];
  5163. if (n(e, a)) return !0;
  5164. if (t.isTag(a) && t.getName(a) === i) break
  5165. }
  5166. return !1
  5167. },
  5168. "only-of-type"(e, {
  5169. adapter: t,
  5170. equals: n
  5171. }) {
  5172. const r = t.getName(e);
  5173. return t.getSiblings(e).every((i => n(e, i) || !t.isTag(i) || t.getName(i) !== r))
  5174. },
  5175. "only-child": (e, {
  5176. adapter: t,
  5177. equals: n
  5178. }) => t.getSiblings(e).every((r => n(e, r) || !t.isTag(r)))
  5179. };
  5180. function ws(e, t, n, r) {
  5181. if (null === n) {
  5182. if (e.length > r) throw new Error(`Pseudo-class :${t} requires an argument`)
  5183. } else if (e.length === r) throw new Error(`Pseudo-class :${t} doesn't have any arguments`)
  5184. }
  5185. const Bs = {
  5186. "any-link": ":is(a, area, link)[href]",
  5187. link: ":any-link:not(:visited)",
  5188. disabled: ":is(\n :is(button, input, select, textarea, optgroup, option)[disabled],\n optgroup[disabled] > option,\n fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)\n )",
  5189. enabled: ":not(:disabled)",
  5190. checked: ":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",
  5191. required: ":is(input, select, textarea)[required]",
  5192. optional: ":is(input, select, textarea):not([required])",
  5193. selected: "option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",
  5194. checkbox: "[type=checkbox]",
  5195. file: "[type=file]",
  5196. password: "[type=password]",
  5197. radio: "[type=radio]",
  5198. reset: "[type=reset]",
  5199. image: "[type=image]",
  5200. submit: "[type=submit]",
  5201. parent: ":not(:empty)",
  5202. header: ":is(h1, h2, h3, h4, h5, h6)",
  5203. button: ":is(button, input[type=button])",
  5204. input: ":is(input, textarea, select, button)",
  5205. text: "input:is(:not([type!='']), [type=text])"
  5206. },
  5207. Fs = {};
  5208. function Us(e, t) {
  5209. const n = t.getSiblings(e);
  5210. if (n.length <= 1) return [];
  5211. const r = n.indexOf(e);
  5212. return r < 0 || r === n.length - 1 ? [] : n.slice(r + 1).filter(t.isTag)
  5213. }
  5214. function Hs(e) {
  5215. return {
  5216. xmlMode: !!e.xmlMode,
  5217. lowerCaseAttributeNames: !!e.lowerCaseAttributeNames,
  5218. lowerCaseTags: !!e.lowerCaseTags,
  5219. quirksMode: !!e.quirksMode,
  5220. cacheResults: !!e.cacheResults,
  5221. pseudos: e.pseudos,
  5222. adapter: e.adapter,
  5223. equals: e.equals
  5224. }
  5225. }
  5226. const Gs = (e, t, n, r, i) => {
  5227. const s = i(t, Hs(n), r);
  5228. return s === ds.trueFunc ? e : s === ds.falseFunc ? ds.falseFunc : t => s(t) && e(t)
  5229. },
  5230. Ys = {
  5231. is: Gs,
  5232. matches: Gs,
  5233. where: Gs,
  5234. not(e, t, n, r, i) {
  5235. const s = i(t, Hs(n), r);
  5236. return s === ds.falseFunc ? e : s === ds.trueFunc ? ds.falseFunc : t => !s(t) && e(t)
  5237. },
  5238. has(e, t, n, r, i) {
  5239. const {
  5240. adapter: s
  5241. } = n, a = Hs(n);
  5242. a.relativeSelector = !0;
  5243. const o = t.some((e => e.some(Ts))) ? [Fs] : void 0,
  5244. c = i(t, a, o);
  5245. if (c === ds.falseFunc) return ds.falseFunc;
  5246. const l = function(e, t) {
  5247. return e === ds.falseFunc ? ds.falseFunc : n => t.isTag(n) && e(n)
  5248. }(c, s);
  5249. if (o && c !== ds.trueFunc) {
  5250. const {
  5251. shouldTestNextSiblings: t = !1
  5252. } = c;
  5253. return n => {
  5254. if (!e(n)) return !1;
  5255. o[0] = n;
  5256. const r = s.getChildren(n),
  5257. i = t ? [...r, ...Us(n, s)] : r;
  5258. return s.existsOne(l, i)
  5259. }
  5260. }
  5261. return t => e(t) && s.existsOne(l, s.getChildren(t))
  5262. }
  5263. };
  5264. function qs(e, t) {
  5265. const n = t.getParent(e);
  5266. return n && t.isTag(n) ? n : null
  5267. }
  5268. function Ks(e, t, n, r, i) {
  5269. const {
  5270. adapter: s,
  5271. equals: a
  5272. } = n;
  5273. switch (t.type) {
  5274. case Zi.PseudoElement:
  5275. throw new Error("Pseudo-elements are not supported by css-select");
  5276. case Zi.ColumnCombinator:
  5277. throw new Error("Column combinators are not yet supported by css-select");
  5278. case Zi.Attribute:
  5279. if (null != t.namespace) throw new Error("Namespaced attributes are not yet supported by css-select");
  5280. return n.xmlMode && !n.lowerCaseAttributeNames || (t.name = t.name.toLowerCase()), bs[t.action](e, t, n);
  5281. case Zi.Pseudo:
  5282. return function(e, t, n, r, i) {
  5283. var s;
  5284. const {
  5285. name: a,
  5286. data: o
  5287. } = t;
  5288. if (Array.isArray(o)) {
  5289. if (!(a in Ys)) throw new Error(`Unknown pseudo-class :${a}(${o})`);
  5290. return Ys[a](e, o, n, r, i)
  5291. }
  5292. const c = null === (s = n.pseudos) || void 0 === s ? void 0 : s[a],
  5293. l = "string" == typeof c ? c : Bs[a];
  5294. if ("string" == typeof l) {
  5295. if (null != o) throw new Error(`Pseudo ${a} doesn't have any arguments`);
  5296. const t = ps(l);
  5297. return Ys.is(e, t, n, r, i)
  5298. }
  5299. if ("function" == typeof c) return ws(c, a, o, 1), t => c(t, o) && e(t);
  5300. if (a in Ms) return Ms[a](e, o, n, r);
  5301. if (a in xs) {
  5302. const t = xs[a];
  5303. return ws(t, a, o, 2), r => t(r, n, o) && e(r)
  5304. }
  5305. throw new Error(`Unknown pseudo-class :${a}`)
  5306. }(e, t, n, r, i);
  5307. case Zi.Tag: {
  5308. if (null != t.namespace) throw new Error("Namespaced tag names are not yet supported by css-select");
  5309. let {
  5310. name: r
  5311. } = t;
  5312. return n.xmlMode && !n.lowerCaseTags || (r = r.toLowerCase()),
  5313. function(t) {
  5314. return s.getName(t) === r && e(t)
  5315. }
  5316. }
  5317. case Zi.Descendant: {
  5318. if (!1 === n.cacheResults || "undefined" == typeof WeakSet) return function(t) {
  5319. let n = t;
  5320. for (; n = qs(n, s);)
  5321. if (e(n)) return !0;
  5322. return !1
  5323. };
  5324. const t = new WeakSet;
  5325. return function(n) {
  5326. let r = n;
  5327. for (; r = qs(r, s);)
  5328. if (!t.has(r)) {
  5329. if (s.isTag(r) && e(r)) return !0;
  5330. t.add(r)
  5331. } return !1
  5332. }
  5333. }
  5334. case "_flexibleDescendant":
  5335. return function(t) {
  5336. let n = t;
  5337. do {
  5338. if (e(n)) return !0
  5339. } while (n = qs(n, s));
  5340. return !1
  5341. };
  5342. case Zi.Parent:
  5343. return function(t) {
  5344. return s.getChildren(t).some((t => s.isTag(t) && e(t)))
  5345. };
  5346. case Zi.Child:
  5347. return function(t) {
  5348. const n = s.getParent(t);
  5349. return null != n && s.isTag(n) && e(n)
  5350. };
  5351. case Zi.Sibling:
  5352. return function(t) {
  5353. const n = s.getSiblings(t);
  5354. for (let r = 0; r < n.length; r++) {
  5355. const i = n[r];
  5356. if (a(t, i)) break;
  5357. if (s.isTag(i) && e(i)) return !0
  5358. }
  5359. return !1
  5360. };
  5361. case Zi.Adjacent:
  5362. return s.prevElementSibling ? function(t) {
  5363. const n = s.prevElementSibling(t);
  5364. return null != n && e(n)
  5365. } : function(t) {
  5366. const n = s.getSiblings(t);
  5367. let r;
  5368. for (let e = 0; e < n.length; e++) {
  5369. const i = n[e];
  5370. if (a(t, i)) break;
  5371. s.isTag(i) && (r = i)
  5372. }
  5373. return !!r && e(r)
  5374. };
  5375. case Zi.Universal:
  5376. if (null != t.namespace && "*" !== t.namespace) throw new Error("Namespaced universal selectors are not yet supported by css-select");
  5377. return e
  5378. }
  5379. }
  5380. function js(e) {
  5381. return e.type === Zi.Pseudo && ("scope" === e.name || Array.isArray(e.data) && e.data.some((e => e.some(js))))
  5382. }
  5383. const Vs = {
  5384. type: Zi.Descendant
  5385. },
  5386. Ws = {
  5387. type: "_flexibleDescendant"
  5388. },
  5389. Qs = {
  5390. type: Zi.Pseudo,
  5391. name: "scope",
  5392. data: null
  5393. };
  5394. function Xs(e, t, n) {
  5395. var r;
  5396. e.forEach(As), n = null !== (r = t.context) && void 0 !== r ? r : n;
  5397. const i = Array.isArray(n),
  5398. s = n && (Array.isArray(n) ? n : [n]);
  5399. if (!1 !== t.relativeSelector) ! function(e, {
  5400. adapter: t
  5401. }, n) {
  5402. const r = !!(null == n ? void 0 : n.every((e => {
  5403. const n = t.isTag(e) && t.getParent(e);
  5404. return e === Fs || n && t.isTag(n)
  5405. })));
  5406. for (const t of e) {
  5407. if (t.length > 0 && Ts(t[0]) && t[0].type !== Zi.Descendant);
  5408. else {
  5409. if (!r || t.some(js)) continue;
  5410. t.unshift(Vs)
  5411. }
  5412. t.unshift(Qs)
  5413. }
  5414. }(e, t, s);
  5415. else if (e.some((e => e.length > 0 && Ts(e[0])))) throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");
  5416. let a = !1;
  5417. const o = e.map((e => {
  5418. if (e.length >= 2) {
  5419. const [t, n] = e;
  5420. t.type !== Zi.Pseudo || "scope" !== t.name || (i && n.type === Zi.Descendant ? e[1] = Ws : n.type !== Zi.Adjacent && n.type !== Zi.Sibling || (a = !0))
  5421. }
  5422. return function(e, t, n) {
  5423. var r;
  5424. return e.reduce(((e, r) => e === ds.falseFunc ? ds.falseFunc : Ks(e, r, t, n, Xs)), null !== (r = t.rootFunc) && void 0 !== r ? r : ds.trueFunc)
  5425. }(e, t, s)
  5426. })).reduce($s, ds.falseFunc);
  5427. return o.shouldTestNextSiblings = a, o
  5428. }
  5429. function $s(e, t) {
  5430. return t === ds.falseFunc || e === ds.trueFunc ? e : e === ds.falseFunc || t === ds.trueFunc ? t : function(n) {
  5431. return e(n) || t(n)
  5432. }
  5433. }
  5434. const zs = (e, t) => e === t,
  5435. Js = {
  5436. adapter: Se,
  5437. equals: zs
  5438. };
  5439. const Zs = (ea = Xs, function(e, t, n) {
  5440. const r = function(e) {
  5441. var t, n, r, i;
  5442. const s = null != e ? e : Js;
  5443. return null !== (t = s.adapter) && void 0 !== t || (s.adapter = Se), null !== (n = s.equals) && void 0 !== n || (s.equals = null !== (i = null === (r = s.adapter) || void 0 === r ? void 0 : r.equals) && void 0 !== i ? i : zs), s
  5444. }(t);
  5445. return ea(e, r, n)
  5446. });
  5447. var ea;
  5448. function ta(e, t, n = !1) {
  5449. return n && (e = function(e, t) {
  5450. const n = Array.isArray(e) ? e.slice(0) : [e],
  5451. r = n.length;
  5452. for (let e = 0; e < r; e++) {
  5453. const r = Us(n[e], t);
  5454. n.push(...r)
  5455. }
  5456. return n
  5457. }(e, t)), Array.isArray(e) ? t.removeSubsets(e) : t.getChildren(e)
  5458. }
  5459. const na = new Set(["first", "last", "eq", "gt", "nth", "lt", "even", "odd"]);
  5460. function ra(e) {
  5461. return "pseudo" === e.type && (!!na.has(e.name) || !("not" !== e.name || !Array.isArray(e.data)) && e.data.some((e => e.some(ra))))
  5462. }
  5463. function ia(e) {
  5464. const t = [],
  5465. n = [];
  5466. for (const r of e) r.some(ra) ? t.push(r) : n.push(r);
  5467. return [n, t]
  5468. }
  5469. const sa = {
  5470. type: Zi.Universal,
  5471. namespace: null
  5472. },
  5473. aa = {
  5474. type: Zi.Pseudo,
  5475. name: "scope",
  5476. data: null
  5477. };
  5478. function oa(e, t, n = {}) {
  5479. return ca([e], t, n)
  5480. }
  5481. function ca(e, t, n = {}) {
  5482. if ("function" == typeof t) return e.some(t);
  5483. const [r, i] = ia(ps(t));
  5484. return r.length > 0 && e.some(Zs(r, n)) || i.some((t => ua(t, e, n).length > 0))
  5485. }
  5486. function la(e, t, n = {}) {
  5487. return ha(ps(e), t, n)
  5488. }
  5489. function ha(e, t, n) {
  5490. if (0 === t.length) return [];
  5491. const [r, i] = ia(e);
  5492. let s;
  5493. if (r.length) {
  5494. const e = Ea(t, r, n);
  5495. if (0 === i.length) return e;
  5496. e.length && (s = new Set(e))
  5497. }
  5498. for (let e = 0; e < i.length && (null == s ? void 0 : s.size) !== t.length; e++) {
  5499. const r = i[e],
  5500. a = s ? t.filter((e => I(e) && !s.has(e))) : t;
  5501. if (0 === a.length) break;
  5502. const o = ua(r, t, n);
  5503. if (o.length)
  5504. if (s) o.forEach((e => s.add(e)));
  5505. else {
  5506. if (e === i.length - 1) return o;
  5507. s = new Set(o)
  5508. }
  5509. }
  5510. return void 0 !== s ? s.size === t.length ? t : t.filter((e => s.has(e))) : []
  5511. }
  5512. function ua(e, t, n) {
  5513. var r;
  5514. if (e.some(as)) {
  5515. const i = null !== (r = n.root) && void 0 !== r ? r : function(e) {
  5516. for (; e.parent;) e = e.parent;
  5517. return e
  5518. }(t[0]),
  5519. s = {
  5520. ...n,
  5521. context: t,
  5522. relativeSelector: !1
  5523. };
  5524. return e.push(aa), pa(i, e, s, !0, t.length)
  5525. }
  5526. return pa(t, e, n, !1, t.length)
  5527. }
  5528. function pa(e, t, n, r, i) {
  5529. const s = t.findIndex(ra),
  5530. a = t.slice(0, s),
  5531. o = t[s],
  5532. c = t.length - 1 === s ? i : 1 / 0,
  5533. l = function(e, t, n) {
  5534. const r = null != t ? parseInt(t, 10) : NaN;
  5535. switch (e) {
  5536. case "first":
  5537. return 1;
  5538. case "nth":
  5539. case "eq":
  5540. return isFinite(r) ? r >= 0 ? r + 1 : 1 / 0 : 0;
  5541. case "lt":
  5542. return isFinite(r) ? r >= 0 ? Math.min(r, n) : 1 / 0 : 0;
  5543. case "gt":
  5544. return isFinite(r) ? 1 / 0 : 0;
  5545. case "odd":
  5546. return 2 * n;
  5547. case "even":
  5548. return 2 * n - 1;
  5549. case "last":
  5550. case "not":
  5551. return 1 / 0
  5552. }
  5553. }(o.name, o.data, c);
  5554. if (0 === l) return [];
  5555. const h = (0 !== a.length || Array.isArray(e) ? 0 === a.length ? (Array.isArray(e) ? e : [e]).filter(I) : r || a.some(as) ? fa(e, [a], n, l) : Ea(e, [a], n) : Z(e).filter(I)).slice(0, l);
  5556. let u = function(e, t, n, r) {
  5557. const i = "string" == typeof n ? parseInt(n, 10) : NaN;
  5558. switch (e) {
  5559. case "first":
  5560. case "lt":
  5561. return t;
  5562. case "last":
  5563. return t.length > 0 ? [t[t.length - 1]] : t;
  5564. case "nth":
  5565. case "eq":
  5566. return isFinite(i) && Math.abs(i) < t.length ? [i < 0 ? t[t.length + i] : t[i]] : [];
  5567. case "gt":
  5568. return isFinite(i) ? t.slice(i + 1) : [];
  5569. case "even":
  5570. return t.filter(((e, t) => t % 2 == 0));
  5571. case "odd":
  5572. return t.filter(((e, t) => t % 2 == 1));
  5573. case "not": {
  5574. const e = new Set(ha(n, t, r));
  5575. return t.filter((t => !e.has(t)))
  5576. }
  5577. }
  5578. }(o.name, h, o.data, n);
  5579. if (0 === u.length || t.length === s + 1) return u;
  5580. const p = t.slice(s + 1),
  5581. f = p.some(as);
  5582. if (f) {
  5583. if (as(p[0])) {
  5584. const {
  5585. type: e
  5586. } = p[0];
  5587. e !== Zi.Sibling && e !== Zi.Adjacent || (u = ta(u, Se, !0)), p.unshift(sa)
  5588. }
  5589. n = {
  5590. ...n,
  5591. relativeSelector: !1,
  5592. rootFunc: e => u.includes(e)
  5593. }
  5594. } else n.rootFunc && n.rootFunc !== Es && (n = {
  5595. ...n,
  5596. rootFunc: Es
  5597. });
  5598. return p.some(ra) ? pa(u, p, n, !1, i) : f ? fa(u, [p], n, i) : Ea(u, [p], n)
  5599. }
  5600. function fa(e, t, n, r) {
  5601. return da(e, Zs(t, n, e), r)
  5602. }
  5603. function da(e, t, n = 1 / 0) {
  5604. return ae((e => I(e) && t(e)), ta(e, Se, t.shouldTestNextSiblings), !0, n)
  5605. }
  5606. function Ea(e, t, n) {
  5607. const r = (Array.isArray(e) ? e : [e]).filter(I);
  5608. if (0 === r.length) return r;
  5609. const i = Zs(t, n);
  5610. return i === Es ? r : r.filter(i)
  5611. }
  5612. var ma = function(e, t, n) {
  5613. if (n || 2 === arguments.length)
  5614. for (var r, i = 0, s = t.length; i < s; i++) !r && i in t || (r || (r = Array.prototype.slice.call(t, 0, i)), r[i] = t[i]);
  5615. return e.concat(r || Array.prototype.slice.call(t))
  5616. },
  5617. Ta = /^\s*[~+]/;
  5618. function _a(e) {
  5619. return function(t) {
  5620. for (var n = [], r = 1; r < arguments.length; r++) n[r - 1] = arguments[r];
  5621. return function(r) {
  5622. var i, s = e(t, this);
  5623. return r && (s = xa(s, r, this.options.xmlMode, null === (i = this._root) || void 0 === i ? void 0 : i[0])), this._make(this.length > 1 && s.length > 1 ? n.reduce((function(e, t) {
  5624. return t(e)
  5625. }), s) : s)
  5626. }
  5627. }
  5628. }
  5629. var Aa = _a((function(e, t) {
  5630. for (var n, r = [], i = 0; i < t.length; i++) {
  5631. var s = e(t[i]);
  5632. r.push(s)
  5633. }
  5634. return (n = new Array).concat.apply(n, r)
  5635. })),
  5636. ga = _a((function(e, t) {
  5637. for (var n = [], r = 0; r < t.length; r++) {
  5638. var i = e(t[r]);
  5639. null !== i && n.push(i)
  5640. }
  5641. return n
  5642. }));
  5643. function Na(e) {
  5644. for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
  5645. var r = null,
  5646. i = _a((function(e, t) {
  5647. var n = [];
  5648. return Bi(t, (function(t) {
  5649. for (var i;
  5650. (i = e(t)) && !(null == r ? void 0 : r(i, n.length)); t = i) n.push(i)
  5651. })), n
  5652. })).apply(void 0, ma([e], t, !1));
  5653. return function(e, t) {
  5654. var n = this;
  5655. r = "string" == typeof e ? function(t) {
  5656. return oa(t, e, n.options)
  5657. } : e ? Pa(e) : null;
  5658. var s = i.call(this, t);
  5659. return r = null, s
  5660. }
  5661. }
  5662. function Ca(e) {
  5663. return Array.from(new Set(e))
  5664. }
  5665. var Ia = ga((function(e) {
  5666. var t = e.parent;
  5667. return t && !L(t) ? t : null
  5668. }), Ca),
  5669. Sa = Aa((function(e) {
  5670. for (var t = []; e.parent && !L(e.parent);) t.push(e.parent), e = e.parent;
  5671. return t
  5672. }), Ee, (function(e) {
  5673. return e.reverse()
  5674. })),
  5675. ba = Na((function(e) {
  5676. var t = e.parent;
  5677. return t && !L(t) ? t : null
  5678. }), Ee, (function(e) {
  5679. return e.reverse()
  5680. }));
  5681. var Oa = ga((function(e) {
  5682. return ne(e)
  5683. })),
  5684. ya = Aa((function(e) {
  5685. for (var t = []; e.next;) I(e = e.next) && t.push(e);
  5686. return t
  5687. }), Ca),
  5688. La = Na((function(e) {
  5689. return ne(e)
  5690. }), Ca),
  5691. ka = ga((function(e) {
  5692. return re(e)
  5693. })),
  5694. va = Aa((function(e) {
  5695. for (var t = []; e.prev;) I(e = e.prev) && t.push(e);
  5696. return t
  5697. }), Ca),
  5698. Da = Na((function(e) {
  5699. return re(e)
  5700. }), Ca),
  5701. Ra = Aa((function(e) {
  5702. return te(e).filter((function(t) {
  5703. return I(t) && t !== e
  5704. }))
  5705. }), Ee),
  5706. Ma = Aa((function(e) {
  5707. return Z(e).filter(I)
  5708. }), Ca);
  5709. function Pa(e) {
  5710. return "function" == typeof e ? function(t, n) {
  5711. return e.call(t, n, t)
  5712. } : wi(e) ? function(t) {
  5713. return Array.prototype.includes.call(e, t)
  5714. } : function(t) {
  5715. return e === t
  5716. }
  5717. }
  5718. function xa(e, t, n, r) {
  5719. return "string" == typeof t ? la(t, e, {
  5720. xmlMode: n,
  5721. root: r
  5722. }) : e.filter(Pa(t))
  5723. }
  5724. var wa = Object.freeze({
  5725. __proto__: null,
  5726. find: function(e) {
  5727. var t;
  5728. if (!e) return this._make([]);
  5729. var n = this.toArray();
  5730. if ("string" != typeof e) {
  5731. var r = wi(e) ? e.toArray() : [e];
  5732. return this._make(r.filter((function(e) {
  5733. return n.some((function(t) {
  5734. return Di(t, e)
  5735. }))
  5736. })))
  5737. }
  5738. var i = Ta.test(e) ? n : this.children().toArray(),
  5739. s = {
  5740. context: n,
  5741. root: null === (t = this._root) || void 0 === t ? void 0 : t[0],
  5742. xmlMode: this.options.xmlMode,
  5743. lowerCaseTags: this.options.lowerCaseTags,
  5744. lowerCaseAttributeNames: this.options.lowerCaseAttributeNames,
  5745. pseudos: this.options.pseudos,
  5746. quirksMode: this.options.quirksMode
  5747. };
  5748. return this._make(function(e, t, n = {}, r = 1 / 0) {
  5749. if ("function" == typeof e) return da(t, e);
  5750. const [i, s] = ia(ps(e)), a = s.map((e => pa(t, e, n, !0, r)));
  5751. return i.length && a.push(fa(t, i, n, r)), 0 === a.length ? [] : 1 === a.length ? a[0] : Ee(a.reduce(((e, t) => [...e, ...t])))
  5752. }(e, i, s))
  5753. },
  5754. parent: Ia,
  5755. parents: Sa,
  5756. parentsUntil: ba,
  5757. closest: function(e) {
  5758. var t, n = [];
  5759. if (!e) return this._make(n);
  5760. var r = {
  5761. xmlMode: this.options.xmlMode,
  5762. root: null === (t = this._root) || void 0 === t ? void 0 : t[0]
  5763. },
  5764. i = "string" == typeof e ? function(t) {
  5765. return oa(t, e, r)
  5766. } : Pa(e);
  5767. return Bi(this, (function(e) {
  5768. for (; e && I(e);) {
  5769. if (i(e, 0)) {
  5770. n.includes(e) || n.push(e);
  5771. break
  5772. }
  5773. e = e.parent
  5774. }
  5775. })), this._make(n)
  5776. },
  5777. next: Oa,
  5778. nextAll: ya,
  5779. nextUntil: La,
  5780. prev: ka,
  5781. prevAll: va,
  5782. prevUntil: Da,
  5783. siblings: Ra,
  5784. children: Ma,
  5785. contents: function() {
  5786. var e = this.toArray().reduce((function(e, t) {
  5787. return k(t) ? e.concat(t.children) : e
  5788. }), []);
  5789. return this._make(e)
  5790. },
  5791. each: function(e) {
  5792. for (var t = 0, n = this.length; t < n && !1 !== e.call(this[t], t, this[t]);) ++t;
  5793. return this
  5794. },
  5795. map: function(e) {
  5796. for (var t = [], n = 0; n < this.length; n++) {
  5797. var r = this[n],
  5798. i = e.call(r, n, r);
  5799. null != i && (t = t.concat(i))
  5800. }
  5801. return this._make(t)
  5802. },
  5803. filter: function(e) {
  5804. var t;
  5805. return this._make(xa(this.toArray(), e, this.options.xmlMode, null === (t = this._root) || void 0 === t ? void 0 : t[0]))
  5806. },
  5807. filterArray: xa,
  5808. is: function(e) {
  5809. var t = this.toArray();
  5810. return "string" == typeof e ? ca(t.filter(I), e, this.options) : !!e && t.some(Pa(e))
  5811. },
  5812. not: function(e) {
  5813. var t = this.toArray();
  5814. if ("string" == typeof e) {
  5815. var n = new Set(la(e, t, this.options));
  5816. t = t.filter((function(e) {
  5817. return !n.has(e)
  5818. }))
  5819. } else {
  5820. var r = Pa(e);
  5821. t = t.filter((function(e, t) {
  5822. return !r(e, t)
  5823. }))
  5824. }
  5825. return this._make(t)
  5826. },
  5827. has: function(e) {
  5828. var t = this;
  5829. return this.filter("string" == typeof e ? ":has(".concat(e, ")") : function(n, r) {
  5830. return t._make(r).find(e).length > 0
  5831. })
  5832. },
  5833. first: function() {
  5834. return this.length > 1 ? this._make(this[0]) : this
  5835. },
  5836. last: function() {
  5837. return this.length > 0 ? this._make(this[this.length - 1]) : this
  5838. },
  5839. eq: function(e) {
  5840. var t;
  5841. return 0 === (e = +e) && this.length <= 1 ? this : (e < 0 && (e = this.length + e), this._make(null !== (t = this[e]) && void 0 !== t ? t : []))
  5842. },
  5843. get: function(e) {
  5844. return null == e ? this.toArray() : this[e < 0 ? this.length + e : e]
  5845. },
  5846. toArray: function() {
  5847. return Array.prototype.slice.call(this)
  5848. },
  5849. index: function(e) {
  5850. var t, n;
  5851. return null == e ? (t = this.parent().children(), n = this[0]) : "string" == typeof e ? (t = this._make(e), n = this[0]) : (t = this, n = wi(e) ? e[0] : e), Array.prototype.indexOf.call(t, n)
  5852. },
  5853. slice: function(e, t) {
  5854. return this._make(Array.prototype.slice.call(this, e, t))
  5855. },
  5856. end: function() {
  5857. var e;
  5858. return null !== (e = this.prevObject) && void 0 !== e ? e : this._make([])
  5859. },
  5860. add: function(e, t) {
  5861. var n = this._make(e, t),
  5862. r = Ee(ma(ma([], this.get(), !0), n.get(), !0));
  5863. return this._make(r)
  5864. },
  5865. addBack: function(e) {
  5866. return this.prevObject ? this.add(e ? this.prevObject.filter(e) : this.prevObject) : this
  5867. }
  5868. });
  5869. function Ba(e, t) {
  5870. var n = Array.isArray(e) ? e : [e];
  5871. t ? t.children = n : t = null;
  5872. for (var r = 0; r < n.length; r++) {
  5873. var i = n[r];
  5874. i.parent && i.parent.children !== n && ie(i), t ? (i.prev = n[r - 1] || null, i.next = n[r + 1] || null) : i.prev = i.next = null, i.parent = t
  5875. }
  5876. return t
  5877. }
  5878. var Fa = function(e, t, n) {
  5879. if (n || 2 === arguments.length)
  5880. for (var r, i = 0, s = t.length; i < s; i++) !r && i in t || (r || (r = Array.prototype.slice.call(t, 0, i)), r[i] = t[i]);
  5881. return e.concat(r || Array.prototype.slice.call(t))
  5882. };
  5883. function Ua(e) {
  5884. return function() {
  5885. for (var t = this, n = [], r = 0; r < arguments.length; r++) n[r] = arguments[r];
  5886. var i = this.length - 1;
  5887. return Bi(this, (function(r, s) {
  5888. if (k(r)) {
  5889. var a = "function" == typeof n[0] ? n[0].call(r, s, t._render(r.children)) : n,
  5890. o = t._makeDomArray(a, s < i);
  5891. e(o, r.children, r)
  5892. }
  5893. }))
  5894. }
  5895. }
  5896. function Ha(e, t, n, r, i) {
  5897. for (var s, a, o = Fa([t, n], r, !0), c = 0 === t ? null : e[t - 1], l = t + n >= e.length ? null : e[t + n], h = 0; h < r.length; ++h) {
  5898. var u = r[h],
  5899. p = u.parent;
  5900. if (p) {
  5901. var f = p.children.indexOf(u);
  5902. f > -1 && (p.children.splice(f, 1), i === p && t > f && o[0]--)
  5903. }
  5904. u.parent = i, u.prev && (u.prev.next = null !== (s = u.next) && void 0 !== s ? s : null), u.next && (u.next.prev = null !== (a = u.prev) && void 0 !== a ? a : null), u.prev = 0 === h ? c : r[h - 1], u.next = h === r.length - 1 ? l : r[h + 1]
  5905. }
  5906. return c && (c.next = r[0]), l && (l.prev = r[r.length - 1]), e.splice.apply(e, o)
  5907. }
  5908. var Ga = Ua((function(e, t, n) {
  5909. Ha(t, t.length, 0, e, n)
  5910. })),
  5911. Ya = Ua((function(e, t, n) {
  5912. Ha(t, 0, 0, e, n)
  5913. }));
  5914. function qa(e) {
  5915. return function(t) {
  5916. for (var n = this.length - 1, r = this.parents().last(), i = 0; i < this.length; i++) {
  5917. var s = this[i],
  5918. a = "function" == typeof t ? t.call(s, i, s) : "string" != typeof t || Ui(t) ? t : r.find(t).clone(),
  5919. o = this._makeDomArray(a, i < n)[0];
  5920. if (o && k(o)) {
  5921. for (var c = o, l = 0; l < c.children.length;) {
  5922. var h = c.children[l];
  5923. I(h) ? (c = h, l = 0) : l++
  5924. }
  5925. e(s, c, [o])
  5926. }
  5927. }
  5928. return this
  5929. }
  5930. }
  5931. var Ka = qa((function(e, t, n) {
  5932. var r = e.parent;
  5933. if (r) {
  5934. var i = r.children,
  5935. s = i.indexOf(e);
  5936. Ba([e], t), Ha(i, s, 0, n, r)
  5937. }
  5938. })),
  5939. ja = qa((function(e, t, n) {
  5940. k(e) && (Ba(e.children, t), Ba(n, e))
  5941. }));
  5942. var Va = Object.freeze({
  5943. __proto__: null,
  5944. _makeDomArray: function(e, t) {
  5945. var n = this;
  5946. return null == e ? [] : wi(e) ? t ? Fi(e.get()) : e.get() : Array.isArray(e) ? e.reduce((function(e, r) {
  5947. return e.concat(n._makeDomArray(r, t))
  5948. }), []) : "string" == typeof e ? this._parse(e, this.options, !1, null).children : t ? Fi([e]) : [e]
  5949. },
  5950. appendTo: function(e) {
  5951. return (wi(e) ? e : this._make(e)).append(this), this
  5952. },
  5953. prependTo: function(e) {
  5954. return (wi(e) ? e : this._make(e)).prepend(this), this
  5955. },
  5956. append: Ga,
  5957. prepend: Ya,
  5958. wrap: Ka,
  5959. wrapInner: ja,
  5960. unwrap: function(e) {
  5961. var t = this;
  5962. return this.parent(e).not("body").each((function(e, n) {
  5963. t._make(n).replaceWith(n.children)
  5964. })), this
  5965. },
  5966. wrapAll: function(e) {
  5967. var t = this[0];
  5968. if (t) {
  5969. for (var n = this._make("function" == typeof e ? e.call(t, 0, t) : e).insertBefore(t), r = void 0, i = 0; i < n.length; i++) "tag" === n[i].type && (r = n[i]);
  5970. for (var s = 0; r && s < r.children.length;) {
  5971. var a = r.children[s];
  5972. "tag" === a.type ? (r = a, s = 0) : s++
  5973. }
  5974. r && this._make(r).append(this)
  5975. }
  5976. return this
  5977. },
  5978. after: function() {
  5979. for (var e = this, t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n];
  5980. var r = this.length - 1;
  5981. return Bi(this, (function(n, i) {
  5982. var s = n.parent;
  5983. if (k(n) && s) {
  5984. var a = s.children,
  5985. o = a.indexOf(n);
  5986. if (!(o < 0)) {
  5987. var c = "function" == typeof t[0] ? t[0].call(n, i, e._render(n.children)) : t;
  5988. Ha(a, o + 1, 0, e._makeDomArray(c, i < r), s)
  5989. }
  5990. }
  5991. }))
  5992. },
  5993. insertAfter: function(e) {
  5994. var t = this;
  5995. "string" == typeof e && (e = this._make(e)), this.remove();
  5996. var n = [];
  5997. return this._makeDomArray(e).forEach((function(e) {
  5998. var r = t.clone().toArray(),
  5999. i = e.parent;
  6000. if (i) {
  6001. var s = i.children,
  6002. a = s.indexOf(e);
  6003. a < 0 || (Ha(s, a + 1, 0, r, i), n.push.apply(n, r))
  6004. }
  6005. })), this._make(n)
  6006. },
  6007. before: function() {
  6008. for (var e = this, t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n];
  6009. var r = this.length - 1;
  6010. return Bi(this, (function(n, i) {
  6011. var s = n.parent;
  6012. if (k(n) && s) {
  6013. var a = s.children,
  6014. o = a.indexOf(n);
  6015. if (!(o < 0)) {
  6016. var c = "function" == typeof t[0] ? t[0].call(n, i, e._render(n.children)) : t;
  6017. Ha(a, o, 0, e._makeDomArray(c, i < r), s)
  6018. }
  6019. }
  6020. }))
  6021. },
  6022. insertBefore: function(e) {
  6023. var t = this,
  6024. n = this._make(e);
  6025. this.remove();
  6026. var r = [];
  6027. return Bi(n, (function(e) {
  6028. var n = t.clone().toArray(),
  6029. i = e.parent;
  6030. if (i) {
  6031. var s = i.children,
  6032. a = s.indexOf(e);
  6033. a < 0 || (Ha(s, a, 0, n, i), r.push.apply(r, n))
  6034. }
  6035. })), this._make(r)
  6036. },
  6037. remove: function(e) {
  6038. return Bi(e ? this.filter(e) : this, (function(e) {
  6039. ie(e), e.prev = e.next = e.parent = null
  6040. })), this
  6041. },
  6042. replaceWith: function(e) {
  6043. var t = this;
  6044. return Bi(this, (function(n, r) {
  6045. var i = n.parent;
  6046. if (i) {
  6047. var s = i.children,
  6048. a = "function" == typeof e ? e.call(n, r, n) : e,
  6049. o = t._makeDomArray(a);
  6050. Ba(o, null);
  6051. var c = s.indexOf(n);
  6052. Ha(s, c, 1, o, i), o.includes(n) || (n.parent = n.prev = n.next = null)
  6053. }
  6054. }))
  6055. },
  6056. empty: function() {
  6057. return Bi(this, (function(e) {
  6058. k(e) && (e.children.forEach((function(e) {
  6059. e.next = e.prev = e.parent = null
  6060. })), e.children.length = 0)
  6061. }))
  6062. },
  6063. html: function(e) {
  6064. var t = this;
  6065. if (void 0 === e) {
  6066. var n = this[0];
  6067. return n && k(n) ? this._render(n.children) : null
  6068. }
  6069. return Bi(this, (function(n) {
  6070. k(n) && (n.children.forEach((function(e) {
  6071. e.next = e.prev = e.parent = null
  6072. })), Ba(wi(e) ? e.toArray() : t._parse("".concat(e), t.options, !1, n).children, n))
  6073. }))
  6074. },
  6075. toString: function() {
  6076. return this._render(this)
  6077. },
  6078. text: function(e) {
  6079. var t = this;
  6080. return void 0 === e ? Li(this) : Bi(this, "function" == typeof e ? function(n, r) {
  6081. return t._make(n).text(e.call(n, r, Li([n])))
  6082. } : function(t) {
  6083. k(t) && (t.children.forEach((function(e) {
  6084. e.next = e.prev = e.parent = null
  6085. })), Ba(new m("".concat(e)), t))
  6086. })
  6087. },
  6088. clone: function() {
  6089. return this._make(Fi(this.get()))
  6090. }
  6091. });
  6092. function Wa(e, t, n, r) {
  6093. if ("string" == typeof t) {
  6094. var i = Qa(e),
  6095. s = "function" == typeof n ? n.call(e, r, i[t]) : n;
  6096. "" === s ? delete i[t] : null != s && (i[t] = s), e.attribs.style = (a = i, Object.keys(a).reduce((function(e, t) {
  6097. return "".concat(e).concat(e ? " " : "").concat(t, ": ").concat(a[t], ";")
  6098. }), ""))
  6099. } else "object" == typeof t && Object.keys(t).forEach((function(n, r) {
  6100. Wa(e, n, t[n], r)
  6101. }));
  6102. var a
  6103. }
  6104. function Qa(e, t) {
  6105. if (e && I(e)) {
  6106. var n = function(e) {
  6107. if (!(e = (e || "").trim())) return {};
  6108. for (var t, n = {}, r = 0, i = e.split(";"); r < i.length; r++) {
  6109. var s = i[r],
  6110. a = s.indexOf(":");
  6111. if (a < 1 || a === s.length - 1) {
  6112. var o = s.trimEnd();
  6113. o.length > 0 && void 0 !== t && (n[t] += ";".concat(o))
  6114. } else n[t = s.slice(0, a).trim()] = s.slice(a + 1).trim()
  6115. }
  6116. return n
  6117. }(e.attribs.style);
  6118. if ("string" == typeof t) return n[t];
  6119. if (Array.isArray(t)) {
  6120. var r = {};
  6121. return t.forEach((function(e) {
  6122. null != n[e] && (r[e] = n[e])
  6123. })), r
  6124. }
  6125. return n
  6126. }
  6127. }
  6128. var Xa = Object.freeze({
  6129. __proto__: null,
  6130. css: function(e, t) {
  6131. return null != e && null != t || "object" == typeof e && !Array.isArray(e) ? Bi(this, (function(n, r) {
  6132. I(n) && Wa(n, e, t, r)
  6133. })) : 0 !== this.length ? Qa(this[0], e) : void 0
  6134. }
  6135. }),
  6136. $a = /%20/g,
  6137. za = /\r?\n/g;
  6138. var Ja = Object.freeze({
  6139. __proto__: null,
  6140. serialize: function() {
  6141. var e = this.serializeArray().map((function(e) {
  6142. return "".concat(encodeURIComponent(e.name), "=").concat(encodeURIComponent(e.value))
  6143. }));
  6144. return e.join("&").replace($a, "+")
  6145. },
  6146. serializeArray: function() {
  6147. var e = this;
  6148. return this.map((function(t, n) {
  6149. var r = e._make(n);
  6150. return I(n) && "form" === n.name ? r.find("input,select,textarea,keygen").toArray() : r.filter("input,select,textarea,keygen").toArray()
  6151. })).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map((function(t, n) {
  6152. var r, i = e._make(n),
  6153. s = i.attr("name"),
  6154. a = null !== (r = i.val()) && void 0 !== r ? r : "";
  6155. return Array.isArray(a) ? a.map((function(e) {
  6156. return {
  6157. name: s,
  6158. value: e.replace(za, "\r\n")
  6159. }
  6160. })) : {
  6161. name: s,
  6162. value: a.replace(za, "\r\n")
  6163. }
  6164. })).toArray()
  6165. }
  6166. }),
  6167. Za = function(e, t, n) {
  6168. if (this.length = 0, this.options = n, this._root = t, e) {
  6169. for (var r = 0; r < e.length; r++) this[r] = e[r];
  6170. this.length = e.length
  6171. }
  6172. };
  6173. Za.prototype.cheerio = "[cheerio object]", Za.prototype.splice = Array.prototype.splice, Za.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator], Object.assign(Za.prototype, ts, wa, Va, Xa, Ja);
  6174. var eo, to = (eo = function(e, t) {
  6175. return eo = Object.setPrototypeOf || {
  6176. __proto__: []
  6177. }
  6178. instanceof Array && function(e, t) {
  6179. e.__proto__ = t
  6180. } || function(e, t) {
  6181. for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n])
  6182. }, eo(e, t)
  6183. }, function(e, t) {
  6184. if ("function" != typeof t && null !== t) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
  6185. function n() {
  6186. this.constructor = e
  6187. }
  6188. eo(e, t), e.prototype = null === t ? Object.create(t) : (n.prototype = t.prototype, new n)
  6189. }),
  6190. no = function() {
  6191. return no = Object.assign || function(e) {
  6192. for (var t, n = 1, r = arguments.length; n < r; n++)
  6193. for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
  6194. return e
  6195. }, no.apply(this, arguments)
  6196. };
  6197. const ro = new Set([65534, 65535, 131070, 131071, 196606, 196607, 262142, 262143, 327678, 327679, 393214, 393215, 458750, 458751, 524286, 524287, 589822, 589823, 655358, 655359, 720894, 720895, 786430, 786431, 851966, 851967, 917502, 917503, 983038, 983039, 1048574, 1048575, 1114110, 1114111]);
  6198. var io;
  6199. ! function(e) {
  6200. e[e.EOF = -1] = "EOF", e[e.NULL = 0] = "NULL", e[e.TABULATION = 9] = "TABULATION", e[e.CARRIAGE_RETURN = 13] = "CARRIAGE_RETURN", e[e.LINE_FEED = 10] = "LINE_FEED", e[e.FORM_FEED = 12] = "FORM_FEED", e[e.SPACE = 32] = "SPACE", e[e.EXCLAMATION_MARK = 33] = "EXCLAMATION_MARK", e[e.QUOTATION_MARK = 34] = "QUOTATION_MARK", e[e.NUMBER_SIGN = 35] = "NUMBER_SIGN", e[e.AMPERSAND = 38] = "AMPERSAND", e[e.APOSTROPHE = 39] = "APOSTROPHE", e[e.HYPHEN_MINUS = 45] = "HYPHEN_MINUS", e[e.SOLIDUS = 47] = "SOLIDUS", e[e.DIGIT_0 = 48] = "DIGIT_0", e[e.DIGIT_9 = 57] = "DIGIT_9", e[e.SEMICOLON = 59] = "SEMICOLON", e[e.LESS_THAN_SIGN = 60] = "LESS_THAN_SIGN", e[e.EQUALS_SIGN = 61] = "EQUALS_SIGN", e[e.GREATER_THAN_SIGN = 62] = "GREATER_THAN_SIGN", e[e.QUESTION_MARK = 63] = "QUESTION_MARK", e[e.LATIN_CAPITAL_A = 65] = "LATIN_CAPITAL_A", e[e.LATIN_CAPITAL_F = 70] = "LATIN_CAPITAL_F", e[e.LATIN_CAPITAL_X = 88] = "LATIN_CAPITAL_X", e[e.LATIN_CAPITAL_Z = 90] = "LATIN_CAPITAL_Z", e[e.RIGHT_SQUARE_BRACKET = 93] = "RIGHT_SQUARE_BRACKET", e[e.GRAVE_ACCENT = 96] = "GRAVE_ACCENT", e[e.LATIN_SMALL_A = 97] = "LATIN_SMALL_A", e[e.LATIN_SMALL_F = 102] = "LATIN_SMALL_F", e[e.LATIN_SMALL_X = 120] = "LATIN_SMALL_X", e[e.LATIN_SMALL_Z = 122] = "LATIN_SMALL_Z", e[e.REPLACEMENT_CHARACTER = 65533] = "REPLACEMENT_CHARACTER"
  6201. }(io = io || (io = {}));
  6202. const so = "--",
  6203. ao = "[CDATA[",
  6204. oo = "doctype",
  6205. co = "script",
  6206. lo = "public",
  6207. ho = "system";
  6208. function uo(e) {
  6209. return e >= 55296 && e <= 57343
  6210. }
  6211. function po(e) {
  6212. return 32 !== e && 10 !== e && 13 !== e && 9 !== e && 12 !== e && e >= 1 && e <= 31 || e >= 127 && e <= 159
  6213. }
  6214. function fo(e) {
  6215. return e >= 64976 && e <= 65007 || ro.has(e)
  6216. }
  6217. var Eo;
  6218. ! function(e) {
  6219. e.controlCharacterInInputStream = "control-character-in-input-stream", e.noncharacterInInputStream = "noncharacter-in-input-stream", e.surrogateInInputStream = "surrogate-in-input-stream", e.nonVoidHtmlElementStartTagWithTrailingSolidus = "non-void-html-element-start-tag-with-trailing-solidus", e.endTagWithAttributes = "end-tag-with-attributes", e.endTagWithTrailingSolidus = "end-tag-with-trailing-solidus", e.unexpectedSolidusInTag = "unexpected-solidus-in-tag", e.unexpectedNullCharacter = "unexpected-null-character", e.unexpectedQuestionMarkInsteadOfTagName = "unexpected-question-mark-instead-of-tag-name", e.invalidFirstCharacterOfTagName = "invalid-first-character-of-tag-name", e.unexpectedEqualsSignBeforeAttributeName = "unexpected-equals-sign-before-attribute-name", e.missingEndTagName = "missing-end-tag-name", e.unexpectedCharacterInAttributeName = "unexpected-character-in-attribute-name", e.unknownNamedCharacterReference = "unknown-named-character-reference", e.missingSemicolonAfterCharacterReference = "missing-semicolon-after-character-reference", e.unexpectedCharacterAfterDoctypeSystemIdentifier = "unexpected-character-after-doctype-system-identifier", e.unexpectedCharacterInUnquotedAttributeValue = "unexpected-character-in-unquoted-attribute-value", e.eofBeforeTagName = "eof-before-tag-name", e.eofInTag = "eof-in-tag", e.missingAttributeValue = "missing-attribute-value", e.missingWhitespaceBetweenAttributes = "missing-whitespace-between-attributes", e.missingWhitespaceAfterDoctypePublicKeyword = "missing-whitespace-after-doctype-public-keyword", e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers = "missing-whitespace-between-doctype-public-and-system-identifiers", e.missingWhitespaceAfterDoctypeSystemKeyword = "missing-whitespace-after-doctype-system-keyword", e.missingQuoteBeforeDoctypePublicIdentifier = "missing-quote-before-doctype-public-identifier", e.missingQuoteBeforeDoctypeSystemIdentifier = "missing-quote-before-doctype-system-identifier", e.missingDoctypePublicIdentifier = "missing-doctype-public-identifier", e.missingDoctypeSystemIdentifier = "missing-doctype-system-identifier", e.abruptDoctypePublicIdentifier = "abrupt-doctype-public-identifier", e.abruptDoctypeSystemIdentifier = "abrupt-doctype-system-identifier", e.cdataInHtmlContent = "cdata-in-html-content", e.incorrectlyOpenedComment = "incorrectly-opened-comment", e.eofInScriptHtmlCommentLikeText = "eof-in-script-html-comment-like-text", e.eofInDoctype = "eof-in-doctype", e.nestedComment = "nested-comment", e.abruptClosingOfEmptyComment = "abrupt-closing-of-empty-comment", e.eofInComment = "eof-in-comment", e.incorrectlyClosedComment = "incorrectly-closed-comment", e.eofInCdata = "eof-in-cdata", e.absenceOfDigitsInNumericCharacterReference = "absence-of-digits-in-numeric-character-reference", e.nullCharacterReference = "null-character-reference", e.surrogateCharacterReference = "surrogate-character-reference", e.characterReferenceOutsideUnicodeRange = "character-reference-outside-unicode-range", e.controlCharacterReference = "control-character-reference", e.noncharacterCharacterReference = "noncharacter-character-reference", e.missingWhitespaceBeforeDoctypeName = "missing-whitespace-before-doctype-name", e.missingDoctypeName = "missing-doctype-name", e.invalidCharacterSequenceAfterDoctypeName = "invalid-character-sequence-after-doctype-name", e.duplicateAttribute = "duplicate-attribute", e.nonConformingDoctype = "non-conforming-doctype", e.missingDoctype = "missing-doctype", e.misplacedDoctype = "misplaced-doctype", e.endTagWithoutMatchingOpenElement = "end-tag-without-matching-open-element", e.closingOfElementWithOpenChildElements = "closing-of-element-with-open-child-elements", e.disallowedContentInNoscriptInHead = "disallowed-content-in-noscript-in-head", e.openElementsLeftAfterEof = "open-elements-left-after-eof", e.abandonedHeadElementChild = "abandoned-head-element-child", e.misplacedStartTagForHeadElement = "misplaced-start-tag-for-head-element", e.nestedNoscriptInHead = "nested-noscript-in-head", e.eofInElementThatCanContainOnlyText = "eof-in-element-that-can-contain-only-text"
  6220. }(Eo = Eo || (Eo = {}));
  6221. class mo {
  6222. constructor(e) {
  6223. this.handler = e, this.html = "", this.pos = -1, this.lastGapPos = -2, this.gapStack = [], this.skipNextNewLine = !1, this.lastChunkWritten = !1, this.endOfChunkHit = !1, this.bufferWaterline = 65536, this.isEol = !1, this.lineStartPos = 0, this.droppedBufferSize = 0, this.line = 1, this.lastErrOffset = -1
  6224. }
  6225. get col() {
  6226. return this.pos - this.lineStartPos + Number(this.lastGapPos !== this.pos)
  6227. }
  6228. get offset() {
  6229. return this.droppedBufferSize + this.pos
  6230. }
  6231. getError(e) {
  6232. const {
  6233. line: t,
  6234. col: n,
  6235. offset: r
  6236. } = this;
  6237. return {
  6238. code: e,
  6239. startLine: t,
  6240. endLine: t,
  6241. startCol: n,
  6242. endCol: n,
  6243. startOffset: r,
  6244. endOffset: r
  6245. }
  6246. }
  6247. _err(e) {
  6248. this.handler.onParseError && this.lastErrOffset !== this.offset && (this.lastErrOffset = this.offset, this.handler.onParseError(this.getError(e)))
  6249. }
  6250. _addGap() {
  6251. this.gapStack.push(this.lastGapPos), this.lastGapPos = this.pos
  6252. }
  6253. _processSurrogate(e) {
  6254. if (this.pos !== this.html.length - 1) {
  6255. const t = this.html.charCodeAt(this.pos + 1);
  6256. if (function(e) {
  6257. return e >= 56320 && e <= 57343
  6258. }(t)) return this.pos++, this._addGap(), 1024 * (e - 55296) + 9216 + t
  6259. } else if (!this.lastChunkWritten) return this.endOfChunkHit = !0, io.EOF;
  6260. return this._err(Eo.surrogateInInputStream), e
  6261. }
  6262. willDropParsedChunk() {
  6263. return this.pos > this.bufferWaterline
  6264. }
  6265. dropParsedChunk() {
  6266. this.willDropParsedChunk() && (this.html = this.html.substring(this.pos), this.lineStartPos -= this.pos, this.droppedBufferSize += this.pos, this.pos = 0, this.lastGapPos = -2, this.gapStack.length = 0)
  6267. }
  6268. write(e, t) {
  6269. this.html.length > 0 ? this.html += e : this.html = e, this.endOfChunkHit = !1, this.lastChunkWritten = t
  6270. }
  6271. insertHtmlAtCurrentPos(e) {
  6272. this.html = this.html.substring(0, this.pos + 1) + e + this.html.substring(this.pos + 1), this.endOfChunkHit = !1
  6273. }
  6274. startsWith(e, t) {
  6275. if (this.pos + e.length > this.html.length) return this.endOfChunkHit = !this.lastChunkWritten, !1;
  6276. if (t) return this.html.startsWith(e, this.pos);
  6277. for (let t = 0; t < e.length; t++) {
  6278. if ((32 | this.html.charCodeAt(this.pos + t)) !== e.charCodeAt(t)) return !1
  6279. }
  6280. return !0
  6281. }
  6282. peek(e) {
  6283. const t = this.pos + e;
  6284. return t >= this.html.length ? (this.endOfChunkHit = !this.lastChunkWritten, io.EOF) : this.html.charCodeAt(t)
  6285. }
  6286. advance() {
  6287. if (this.pos++, this.isEol && (this.isEol = !1, this.line++, this.lineStartPos = this.pos), this.pos >= this.html.length) return this.endOfChunkHit = !this.lastChunkWritten, io.EOF;
  6288. let e = this.html.charCodeAt(this.pos);
  6289. if (e === io.CARRIAGE_RETURN) return this.isEol = !0, this.skipNextNewLine = !0, io.LINE_FEED;
  6290. if (e === io.LINE_FEED && (this.isEol = !0, this.skipNextNewLine)) return this.line--, this.skipNextNewLine = !1, this._addGap(), this.advance();
  6291. this.skipNextNewLine = !1, uo(e) && (e = this._processSurrogate(e));
  6292. return null === this.handler.onParseError || e > 31 && e < 127 || e === io.LINE_FEED || e === io.CARRIAGE_RETURN || e > 159 && e < 64976 || this._checkForProblematicCharacters(e), e
  6293. }
  6294. _checkForProblematicCharacters(e) {
  6295. po(e) ? this._err(Eo.controlCharacterInInputStream) : fo(e) && this._err(Eo.noncharacterInInputStream)
  6296. }
  6297. retreat(e) {
  6298. for (this.pos -= e; this.pos < this.lastGapPos;) this.lastGapPos = this.gapStack.pop(), this.pos--;
  6299. this.isEol = !1
  6300. }
  6301. }
  6302. var To;
  6303. function _o(e, t) {
  6304. for (let n = e.attrs.length - 1; n >= 0; n--)
  6305. if (e.attrs[n].name === t) return e.attrs[n].value;
  6306. return null
  6307. }! function(e) {
  6308. e[e.CHARACTER = 0] = "CHARACTER", e[e.NULL_CHARACTER = 1] = "NULL_CHARACTER", e[e.WHITESPACE_CHARACTER = 2] = "WHITESPACE_CHARACTER", e[e.START_TAG = 3] = "START_TAG", e[e.END_TAG = 4] = "END_TAG", e[e.COMMENT = 5] = "COMMENT", e[e.DOCTYPE = 6] = "DOCTYPE", e[e.EOF = 7] = "EOF", e[e.HIBERNATION = 8] = "HIBERNATION"
  6309. }(To = To || (To = {}));
  6310. var Ao = Ke((function(e, t) {
  6311. Object.defineProperty(t, "__esModule", {
  6312. value: !0
  6313. }), t.default = new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((function(e) {
  6314. return e.charCodeAt(0)
  6315. })))
  6316. }));
  6317. qe(Ao);
  6318. var go = Ke((function(e, t) {
  6319. Object.defineProperty(t, "__esModule", {
  6320. value: !0
  6321. }), t.default = new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((function(e) {
  6322. return e.charCodeAt(0)
  6323. })))
  6324. }));
  6325. qe(go);
  6326. var No = Ke((function(e, t) {
  6327. var n;
  6328. Object.defineProperty(t, "__esModule", {
  6329. value: !0
  6330. }), t.replaceCodePoint = t.fromCodePoint = void 0;
  6331. var r = new Map([
  6332. [0, 65533],
  6333. [128, 8364],
  6334. [130, 8218],
  6335. [131, 402],
  6336. [132, 8222],
  6337. [133, 8230],
  6338. [134, 8224],
  6339. [135, 8225],
  6340. [136, 710],
  6341. [137, 8240],
  6342. [138, 352],
  6343. [139, 8249],
  6344. [140, 338],
  6345. [142, 381],
  6346. [145, 8216],
  6347. [146, 8217],
  6348. [147, 8220],
  6349. [148, 8221],
  6350. [149, 8226],
  6351. [150, 8211],
  6352. [151, 8212],
  6353. [152, 732],
  6354. [153, 8482],
  6355. [154, 353],
  6356. [155, 8250],
  6357. [156, 339],
  6358. [158, 382],
  6359. [159, 376]
  6360. ]);
  6361. function i(e) {
  6362. var t;
  6363. return e >= 55296 && e <= 57343 || e > 1114111 ? 65533 : null !== (t = r.get(e)) && void 0 !== t ? t : e
  6364. }
  6365. t.fromCodePoint = null !== (n = String.fromCodePoint) && void 0 !== n ? n : function(e) {
  6366. var t = "";
  6367. return e > 65535 && (e -= 65536, t += String.fromCharCode(e >>> 10 & 1023 | 55296), e = 56320 | 1023 & e), t += String.fromCharCode(e)
  6368. }, t.replaceCodePoint = i, t.default = function(e) {
  6369. return (0, t.fromCodePoint)(i(e))
  6370. }
  6371. }));
  6372. qe(No), No.replaceCodePoint, No.fromCodePoint;
  6373. var Co = Ao,
  6374. Io = go,
  6375. So = No,
  6376. bo = Ke((function(e, t) {
  6377. var n = Ge && Ge.__importDefault || function(e) {
  6378. return e && e.__esModule ? e : {
  6379. default: e
  6380. }
  6381. };
  6382. Object.defineProperty(t, "__esModule", {
  6383. value: !0
  6384. }), t.decodeXML = t.decodeHTMLStrict = t.decodeHTML = t.determineBranch = t.BinTrieFlags = t.fromCodePoint = t.replaceCodePoint = t.decodeCodePoint = t.xmlDecodeTree = t.htmlDecodeTree = void 0;
  6385. var r = n(Co);
  6386. t.htmlDecodeTree = r.default;
  6387. var i = n(Io);
  6388. t.xmlDecodeTree = i.default;
  6389. var s = n(So);
  6390. t.decodeCodePoint = s.default;
  6391. var a, o, c = So;
  6392. function l(e) {
  6393. return function(t, n) {
  6394. for (var r = "", i = 0, c = 0;
  6395. (c = t.indexOf("&", c)) >= 0;)
  6396. if (r += t.slice(i, c), i = c, c += 1, t.charCodeAt(c) !== a.NUM) {
  6397. for (var l = 0, u = 1, p = 0, f = e[p]; c < t.length && !((p = h(e, f, p + 1, t.charCodeAt(c))) < 0); c++, u++) {
  6398. var d = (f = e[p]) & o.VALUE_LENGTH;
  6399. if (d) {
  6400. var E;
  6401. if (n && t.charCodeAt(c) !== a.SEMI || (l = p, u = 0), 0 === (E = (d >> 14) - 1)) break;
  6402. p += E
  6403. }
  6404. }
  6405. if (0 !== l) r += 1 === (E = (e[l] & o.VALUE_LENGTH) >> 14) ? String.fromCharCode(e[l] & ~o.VALUE_LENGTH) : 2 === E ? String.fromCharCode(e[l + 1]) : String.fromCharCode(e[l + 1], e[l + 2]), i = c - u + 1
  6406. } else {
  6407. var m = c + 1,
  6408. T = 10,
  6409. _ = t.charCodeAt(m);
  6410. (_ | a.To_LOWER_BIT) === a.LOWER_X && (T = 16, c += 1, m += 1);
  6411. do {
  6412. _ = t.charCodeAt(++c)
  6413. } while (_ >= a.ZERO && _ <= a.NINE || 16 === T && (_ | a.To_LOWER_BIT) >= a.LOWER_A && (_ | a.To_LOWER_BIT) <= a.LOWER_F);
  6414. if (m !== c) {
  6415. var A = t.substring(m, c),
  6416. g = parseInt(A, T);
  6417. if (t.charCodeAt(c) === a.SEMI) c += 1;
  6418. else if (n) continue;
  6419. r += (0, s.default)(g), i = c
  6420. }
  6421. } return r + t.slice(i)
  6422. }
  6423. }
  6424. function h(e, t, n, r) {
  6425. var i = (t & o.BRANCH_LENGTH) >> 7,
  6426. s = t & o.JUMP_TABLE;
  6427. if (0 === i) return 0 !== s && r === s ? n : -1;
  6428. if (s) {
  6429. var a = r - s;
  6430. return a < 0 || a >= i ? -1 : e[n + a] - 1
  6431. }
  6432. for (var c = n, l = c + i - 1; c <= l;) {
  6433. var h = c + l >>> 1,
  6434. u = e[h];
  6435. if (u < r) c = h + 1;
  6436. else {
  6437. if (!(u > r)) return e[h + i];
  6438. l = h - 1
  6439. }
  6440. }
  6441. return -1
  6442. }
  6443. Object.defineProperty(t, "replaceCodePoint", {
  6444. enumerable: !0,
  6445. get: function() {
  6446. return c.replaceCodePoint
  6447. }
  6448. }), Object.defineProperty(t, "fromCodePoint", {
  6449. enumerable: !0,
  6450. get: function() {
  6451. return c.fromCodePoint
  6452. }
  6453. }),
  6454. function(e) {
  6455. e[e.NUM = 35] = "NUM", e[e.SEMI = 59] = "SEMI", e[e.ZERO = 48] = "ZERO", e[e.NINE = 57] = "NINE", e[e.LOWER_A = 97] = "LOWER_A", e[e.LOWER_F = 102] = "LOWER_F", e[e.LOWER_X = 120] = "LOWER_X", e[e.To_LOWER_BIT = 32] = "To_LOWER_BIT"
  6456. }(a || (a = {})),
  6457. function(e) {
  6458. e[e.VALUE_LENGTH = 49152] = "VALUE_LENGTH", e[e.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", e[e.JUMP_TABLE = 127] = "JUMP_TABLE"
  6459. }(o = t.BinTrieFlags || (t.BinTrieFlags = {})), t.determineBranch = h;
  6460. var u = l(r.default),
  6461. p = l(i.default);
  6462. t.decodeHTML = function(e) {
  6463. return u(e, !1)
  6464. }, t.decodeHTMLStrict = function(e) {
  6465. return u(e, !0)
  6466. }, t.decodeXML = function(e) {
  6467. return p(e, !0)
  6468. }
  6469. }));
  6470. qe(bo), bo.decodeXML, bo.decodeHTMLStrict, bo.decodeHTML;
  6471. var Oo = bo.determineBranch,
  6472. yo = bo.BinTrieFlags,
  6473. Lo = bo.fromCodePoint,
  6474. ko = bo.replaceCodePoint;
  6475. bo.decodeCodePoint;
  6476. var vo, Do, Ro, Mo, Po, xo = bo.xmlDecodeTree,
  6477. wo = bo.htmlDecodeTree;
  6478. ! function(e) {
  6479. e.HTML = "http://www.w3.org/1999/xhtml", e.MATHML = "http://www.w3.org/1998/Math/MathML", e.SVG = "http://www.w3.org/2000/svg", e.XLINK = "http://www.w3.org/1999/xlink", e.XML = "http://www.w3.org/XML/1998/namespace", e.XMLNS = "http://www.w3.org/2000/xmlns/"
  6480. }(vo = vo || (vo = {})),
  6481. function(e) {
  6482. e.TYPE = "type", e.ACTION = "action", e.ENCODING = "encoding", e.PROMPT = "prompt", e.NAME = "name", e.COLOR = "color", e.FACE = "face", e.SIZE = "size"
  6483. }(Do = Do || (Do = {})),
  6484. function(e) {
  6485. e.NO_QUIRKS = "no-quirks", e.QUIRKS = "quirks", e.LIMITED_QUIRKS = "limited-quirks"
  6486. }(Ro = Ro || (Ro = {})),
  6487. function(e) {
  6488. e.A = "a", e.ADDRESS = "address", e.ANNOTATION_XML = "annotation-xml", e.APPLET = "applet", e.AREA = "area", e.ARTICLE = "article", e.ASIDE = "aside", e.B = "b", e.BASE = "base", e.BASEFONT = "basefont", e.BGSOUND = "bgsound", e.BIG = "big", e.BLOCKQUOTE = "blockquote", e.BODY = "body", e.BR = "br", e.BUTTON = "button", e.CAPTION = "caption", e.CENTER = "center", e.CODE = "code", e.COL = "col", e.COLGROUP = "colgroup", e.DD = "dd", e.DESC = "desc", e.DETAILS = "details", e.DIALOG = "dialog", e.DIR = "dir", e.DIV = "div", e.DL = "dl", e.DT = "dt", e.EM = "em", e.EMBED = "embed", e.FIELDSET = "fieldset", e.FIGCAPTION = "figcaption", e.FIGURE = "figure", e.FONT = "font", e.FOOTER = "footer", e.FOREIGN_OBJECT = "foreignObject", e.FORM = "form", e.FRAME = "frame", e.FRAMESET = "frameset", e.H1 = "h1", e.H2 = "h2", e.H3 = "h3", e.H4 = "h4", e.H5 = "h5", e.H6 = "h6", e.HEAD = "head", e.HEADER = "header", e.HGROUP = "hgroup", e.HR = "hr", e.HTML = "html", e.I = "i", e.IMG = "img", e.IMAGE = "image", e.INPUT = "input", e.IFRAME = "iframe", e.KEYGEN = "keygen", e.LABEL = "label", e.LI = "li", e.LINK = "link", e.LISTING = "listing", e.MAIN = "main", e.MALIGNMARK = "malignmark", e.MARQUEE = "marquee", e.MATH = "math", e.MENU = "menu", e.META = "meta", e.MGLYPH = "mglyph", e.MI = "mi", e.MO = "mo", e.MN = "mn", e.MS = "ms", e.MTEXT = "mtext", e.NAV = "nav", e.NOBR = "nobr", e.NOFRAMES = "noframes", e.NOEMBED = "noembed", e.NOSCRIPT = "noscript", e.OBJECT = "object", e.OL = "ol", e.OPTGROUP = "optgroup", e.OPTION = "option", e.P = "p", e.PARAM = "param", e.PLAINTEXT = "plaintext", e.PRE = "pre", e.RB = "rb", e.RP = "rp", e.RT = "rt", e.RTC = "rtc", e.RUBY = "ruby", e.S = "s", e.SCRIPT = "script", e.SECTION = "section", e.SELECT = "select", e.SOURCE = "source", e.SMALL = "small", e.SPAN = "span", e.STRIKE = "strike", e.STRONG = "strong", e.STYLE = "style", e.SUB = "sub", e.SUMMARY = "summary", e.SUP = "sup", e.TABLE = "table", e.TBODY = "tbody", e.TEMPLATE = "template", e.TEXTAREA = "textarea", e.TFOOT = "tfoot", e.TD = "td", e.TH = "th", e.THEAD = "thead", e.TITLE = "title", e.TR = "tr", e.TRACK = "track", e.TT = "tt", e.U = "u", e.UL = "ul", e.SVG = "svg", e.VAR = "var", e.WBR = "wbr", e.XMP = "xmp"
  6489. }(Mo = Mo || (Mo = {})),
  6490. function(e) {
  6491. e[e.UNKNOWN = 0] = "UNKNOWN", e[e.A = 1] = "A", e[e.ADDRESS = 2] = "ADDRESS", e[e.ANNOTATION_XML = 3] = "ANNOTATION_XML", e[e.APPLET = 4] = "APPLET", e[e.AREA = 5] = "AREA", e[e.ARTICLE = 6] = "ARTICLE", e[e.ASIDE = 7] = "ASIDE", e[e.B = 8] = "B", e[e.BASE = 9] = "BASE", e[e.BASEFONT = 10] = "BASEFONT", e[e.BGSOUND = 11] = "BGSOUND", e[e.BIG = 12] = "BIG", e[e.BLOCKQUOTE = 13] = "BLOCKQUOTE", e[e.BODY = 14] = "BODY", e[e.BR = 15] = "BR", e[e.BUTTON = 16] = "BUTTON", e[e.CAPTION = 17] = "CAPTION", e[e.CENTER = 18] = "CENTER", e[e.CODE = 19] = "CODE", e[e.COL = 20] = "COL", e[e.COLGROUP = 21] = "COLGROUP", e[e.DD = 22] = "DD", e[e.DESC = 23] = "DESC", e[e.DETAILS = 24] = "DETAILS", e[e.DIALOG = 25] = "DIALOG", e[e.DIR = 26] = "DIR", e[e.DIV = 27] = "DIV", e[e.DL = 28] = "DL", e[e.DT = 29] = "DT", e[e.EM = 30] = "EM", e[e.EMBED = 31] = "EMBED", e[e.FIELDSET = 32] = "FIELDSET", e[e.FIGCAPTION = 33] = "FIGCAPTION", e[e.FIGURE = 34] = "FIGURE", e[e.FONT = 35] = "FONT", e[e.FOOTER = 36] = "FOOTER", e[e.FOREIGN_OBJECT = 37] = "FOREIGN_OBJECT", e[e.FORM = 38] = "FORM", e[e.FRAME = 39] = "FRAME", e[e.FRAMESET = 40] = "FRAMESET", e[e.H1 = 41] = "H1", e[e.H2 = 42] = "H2", e[e.H3 = 43] = "H3", e[e.H4 = 44] = "H4", e[e.H5 = 45] = "H5", e[e.H6 = 46] = "H6", e[e.HEAD = 47] = "HEAD", e[e.HEADER = 48] = "HEADER", e[e.HGROUP = 49] = "HGROUP", e[e.HR = 50] = "HR", e[e.HTML = 51] = "HTML", e[e.I = 52] = "I", e[e.IMG = 53] = "IMG", e[e.IMAGE = 54] = "IMAGE", e[e.INPUT = 55] = "INPUT", e[e.IFRAME = 56] = "IFRAME", e[e.KEYGEN = 57] = "KEYGEN", e[e.LABEL = 58] = "LABEL", e[e.LI = 59] = "LI", e[e.LINK = 60] = "LINK", e[e.LISTING = 61] = "LISTING", e[e.MAIN = 62] = "MAIN", e[e.MALIGNMARK = 63] = "MALIGNMARK", e[e.MARQUEE = 64] = "MARQUEE", e[e.MATH = 65] = "MATH", e[e.MENU = 66] = "MENU", e[e.META = 67] = "META", e[e.MGLYPH = 68] = "MGLYPH", e[e.MI = 69] = "MI", e[e.MO = 70] = "MO", e[e.MN = 71] = "MN", e[e.MS = 72] = "MS", e[e.MTEXT = 73] = "MTEXT", e[e.NAV = 74] = "NAV", e[e.NOBR = 75] = "NOBR", e[e.NOFRAMES = 76] = "NOFRAMES", e[e.NOEMBED = 77] = "NOEMBED", e[e.NOSCRIPT = 78] = "NOSCRIPT", e[e.OBJECT = 79] = "OBJECT", e[e.OL = 80] = "OL", e[e.OPTGROUP = 81] = "OPTGROUP", e[e.OPTION = 82] = "OPTION", e[e.P = 83] = "P", e[e.PARAM = 84] = "PARAM", e[e.PLAINTEXT = 85] = "PLAINTEXT", e[e.PRE = 86] = "PRE", e[e.RB = 87] = "RB", e[e.RP = 88] = "RP", e[e.RT = 89] = "RT", e[e.RTC = 90] = "RTC", e[e.RUBY = 91] = "RUBY", e[e.S = 92] = "S", e[e.SCRIPT = 93] = "SCRIPT", e[e.SECTION = 94] = "SECTION", e[e.SELECT = 95] = "SELECT", e[e.SOURCE = 96] = "SOURCE", e[e.SMALL = 97] = "SMALL", e[e.SPAN = 98] = "SPAN", e[e.STRIKE = 99] = "STRIKE", e[e.STRONG = 100] = "STRONG", e[e.STYLE = 101] = "STYLE", e[e.SUB = 102] = "SUB", e[e.SUMMARY = 103] = "SUMMARY", e[e.SUP = 104] = "SUP", e[e.TABLE = 105] = "TABLE", e[e.TBODY = 106] = "TBODY", e[e.TEMPLATE = 107] = "TEMPLATE", e[e.TEXTAREA = 108] = "TEXTAREA", e[e.TFOOT = 109] = "TFOOT", e[e.TD = 110] = "TD", e[e.TH = 111] = "TH", e[e.THEAD = 112] = "THEAD", e[e.TITLE = 113] = "TITLE", e[e.TR = 114] = "TR", e[e.TRACK = 115] = "TRACK", e[e.TT = 116] = "TT", e[e.U = 117] = "U", e[e.UL = 118] = "UL", e[e.SVG = 119] = "SVG", e[e.VAR = 120] = "VAR", e[e.WBR = 121] = "WBR", e[e.XMP = 122] = "XMP"
  6492. }(Po = Po || (Po = {}));
  6493. const Bo = new Map([
  6494. [Mo.A, Po.A],
  6495. [Mo.ADDRESS, Po.ADDRESS],
  6496. [Mo.ANNOTATION_XML, Po.ANNOTATION_XML],
  6497. [Mo.APPLET, Po.APPLET],
  6498. [Mo.AREA, Po.AREA],
  6499. [Mo.ARTICLE, Po.ARTICLE],
  6500. [Mo.ASIDE, Po.ASIDE],
  6501. [Mo.B, Po.B],
  6502. [Mo.BASE, Po.BASE],
  6503. [Mo.BASEFONT, Po.BASEFONT],
  6504. [Mo.BGSOUND, Po.BGSOUND],
  6505. [Mo.BIG, Po.BIG],
  6506. [Mo.BLOCKQUOTE, Po.BLOCKQUOTE],
  6507. [Mo.BODY, Po.BODY],
  6508. [Mo.BR, Po.BR],
  6509. [Mo.BUTTON, Po.BUTTON],
  6510. [Mo.CAPTION, Po.CAPTION],
  6511. [Mo.CENTER, Po.CENTER],
  6512. [Mo.CODE, Po.CODE],
  6513. [Mo.COL, Po.COL],
  6514. [Mo.COLGROUP, Po.COLGROUP],
  6515. [Mo.DD, Po.DD],
  6516. [Mo.DESC, Po.DESC],
  6517. [Mo.DETAILS, Po.DETAILS],
  6518. [Mo.DIALOG, Po.DIALOG],
  6519. [Mo.DIR, Po.DIR],
  6520. [Mo.DIV, Po.DIV],
  6521. [Mo.DL, Po.DL],
  6522. [Mo.DT, Po.DT],
  6523. [Mo.EM, Po.EM],
  6524. [Mo.EMBED, Po.EMBED],
  6525. [Mo.FIELDSET, Po.FIELDSET],
  6526. [Mo.FIGCAPTION, Po.FIGCAPTION],
  6527. [Mo.FIGURE, Po.FIGURE],
  6528. [Mo.FONT, Po.FONT],
  6529. [Mo.FOOTER, Po.FOOTER],
  6530. [Mo.FOREIGN_OBJECT, Po.FOREIGN_OBJECT],
  6531. [Mo.FORM, Po.FORM],
  6532. [Mo.FRAME, Po.FRAME],
  6533. [Mo.FRAMESET, Po.FRAMESET],
  6534. [Mo.H1, Po.H1],
  6535. [Mo.H2, Po.H2],
  6536. [Mo.H3, Po.H3],
  6537. [Mo.H4, Po.H4],
  6538. [Mo.H5, Po.H5],
  6539. [Mo.H6, Po.H6],
  6540. [Mo.HEAD, Po.HEAD],
  6541. [Mo.HEADER, Po.HEADER],
  6542. [Mo.HGROUP, Po.HGROUP],
  6543. [Mo.HR, Po.HR],
  6544. [Mo.HTML, Po.HTML],
  6545. [Mo.I, Po.I],
  6546. [Mo.IMG, Po.IMG],
  6547. [Mo.IMAGE, Po.IMAGE],
  6548. [Mo.INPUT, Po.INPUT],
  6549. [Mo.IFRAME, Po.IFRAME],
  6550. [Mo.KEYGEN, Po.KEYGEN],
  6551. [Mo.LABEL, Po.LABEL],
  6552. [Mo.LI, Po.LI],
  6553. [Mo.LINK, Po.LINK],
  6554. [Mo.LISTING, Po.LISTING],
  6555. [Mo.MAIN, Po.MAIN],
  6556. [Mo.MALIGNMARK, Po.MALIGNMARK],
  6557. [Mo.MARQUEE, Po.MARQUEE],
  6558. [Mo.MATH, Po.MATH],
  6559. [Mo.MENU, Po.MENU],
  6560. [Mo.META, Po.META],
  6561. [Mo.MGLYPH, Po.MGLYPH],
  6562. [Mo.MI, Po.MI],
  6563. [Mo.MO, Po.MO],
  6564. [Mo.MN, Po.MN],
  6565. [Mo.MS, Po.MS],
  6566. [Mo.MTEXT, Po.MTEXT],
  6567. [Mo.NAV, Po.NAV],
  6568. [Mo.NOBR, Po.NOBR],
  6569. [Mo.NOFRAMES, Po.NOFRAMES],
  6570. [Mo.NOEMBED, Po.NOEMBED],
  6571. [Mo.NOSCRIPT, Po.NOSCRIPT],
  6572. [Mo.OBJECT, Po.OBJECT],
  6573. [Mo.OL, Po.OL],
  6574. [Mo.OPTGROUP, Po.OPTGROUP],
  6575. [Mo.OPTION, Po.OPTION],
  6576. [Mo.P, Po.P],
  6577. [Mo.PARAM, Po.PARAM],
  6578. [Mo.PLAINTEXT, Po.PLAINTEXT],
  6579. [Mo.PRE, Po.PRE],
  6580. [Mo.RB, Po.RB],
  6581. [Mo.RP, Po.RP],
  6582. [Mo.RT, Po.RT],
  6583. [Mo.RTC, Po.RTC],
  6584. [Mo.RUBY, Po.RUBY],
  6585. [Mo.S, Po.S],
  6586. [Mo.SCRIPT, Po.SCRIPT],
  6587. [Mo.SECTION, Po.SECTION],
  6588. [Mo.SELECT, Po.SELECT],
  6589. [Mo.SOURCE, Po.SOURCE],
  6590. [Mo.SMALL, Po.SMALL],
  6591. [Mo.SPAN, Po.SPAN],
  6592. [Mo.STRIKE, Po.STRIKE],
  6593. [Mo.STRONG, Po.STRONG],
  6594. [Mo.STYLE, Po.STYLE],
  6595. [Mo.SUB, Po.SUB],
  6596. [Mo.SUMMARY, Po.SUMMARY],
  6597. [Mo.SUP, Po.SUP],
  6598. [Mo.TABLE, Po.TABLE],
  6599. [Mo.TBODY, Po.TBODY],
  6600. [Mo.TEMPLATE, Po.TEMPLATE],
  6601. [Mo.TEXTAREA, Po.TEXTAREA],
  6602. [Mo.TFOOT, Po.TFOOT],
  6603. [Mo.TD, Po.TD],
  6604. [Mo.TH, Po.TH],
  6605. [Mo.THEAD, Po.THEAD],
  6606. [Mo.TITLE, Po.TITLE],
  6607. [Mo.TR, Po.TR],
  6608. [Mo.TRACK, Po.TRACK],
  6609. [Mo.TT, Po.TT],
  6610. [Mo.U, Po.U],
  6611. [Mo.UL, Po.UL],
  6612. [Mo.SVG, Po.SVG],
  6613. [Mo.VAR, Po.VAR],
  6614. [Mo.WBR, Po.WBR],
  6615. [Mo.XMP, Po.XMP]
  6616. ]);
  6617. function Fo(e) {
  6618. var t;
  6619. return null !== (t = Bo.get(e)) && void 0 !== t ? t : Po.UNKNOWN
  6620. }
  6621. const Uo = Po,
  6622. Ho = {
  6623. [vo.HTML]: new Set([Uo.ADDRESS, Uo.APPLET, Uo.AREA, Uo.ARTICLE, Uo.ASIDE, Uo.BASE, Uo.BASEFONT, Uo.BGSOUND, Uo.BLOCKQUOTE, Uo.BODY, Uo.BR, Uo.BUTTON, Uo.CAPTION, Uo.CENTER, Uo.COL, Uo.COLGROUP, Uo.DD, Uo.DETAILS, Uo.DIR, Uo.DIV, Uo.DL, Uo.DT, Uo.EMBED, Uo.FIELDSET, Uo.FIGCAPTION, Uo.FIGURE, Uo.FOOTER, Uo.FORM, Uo.FRAME, Uo.FRAMESET, Uo.H1, Uo.H2, Uo.H3, Uo.H4, Uo.H5, Uo.H6, Uo.HEAD, Uo.HEADER, Uo.HGROUP, Uo.HR, Uo.HTML, Uo.IFRAME, Uo.IMG, Uo.INPUT, Uo.LI, Uo.LINK, Uo.LISTING, Uo.MAIN, Uo.MARQUEE, Uo.MENU, Uo.META, Uo.NAV, Uo.NOEMBED, Uo.NOFRAMES, Uo.NOSCRIPT, Uo.OBJECT, Uo.OL, Uo.P, Uo.PARAM, Uo.PLAINTEXT, Uo.PRE, Uo.SCRIPT, Uo.SECTION, Uo.SELECT, Uo.SOURCE, Uo.STYLE, Uo.SUMMARY, Uo.TABLE, Uo.TBODY, Uo.TD, Uo.TEMPLATE, Uo.TEXTAREA, Uo.TFOOT, Uo.TH, Uo.THEAD, Uo.TITLE, Uo.TR, Uo.TRACK, Uo.UL, Uo.WBR, Uo.XMP]),
  6624. [vo.MATHML]: new Set([Uo.MI, Uo.MO, Uo.MN, Uo.MS, Uo.MTEXT, Uo.ANNOTATION_XML]),
  6625. [vo.SVG]: new Set([Uo.TITLE, Uo.FOREIGN_OBJECT, Uo.DESC]),
  6626. [vo.XLINK]: new Set,
  6627. [vo.XML]: new Set,
  6628. [vo.XMLNS]: new Set
  6629. };
  6630. function Go(e) {
  6631. return e === Uo.H1 || e === Uo.H2 || e === Uo.H3 || e === Uo.H4 || e === Uo.H5 || e === Uo.H6
  6632. }
  6633. const Yo = new Set([Mo.STYLE, Mo.SCRIPT, Mo.XMP, Mo.IFRAME, Mo.NOEMBED, Mo.NOFRAMES, Mo.PLAINTEXT]);
  6634. const qo = new Map([
  6635. [128, 8364],
  6636. [130, 8218],
  6637. [131, 402],
  6638. [132, 8222],
  6639. [133, 8230],
  6640. [134, 8224],
  6641. [135, 8225],
  6642. [136, 710],
  6643. [137, 8240],
  6644. [138, 352],
  6645. [139, 8249],
  6646. [140, 338],
  6647. [142, 381],
  6648. [145, 8216],
  6649. [146, 8217],
  6650. [147, 8220],
  6651. [148, 8221],
  6652. [149, 8226],
  6653. [150, 8211],
  6654. [151, 8212],
  6655. [152, 732],
  6656. [153, 8482],
  6657. [154, 353],
  6658. [155, 8250],
  6659. [156, 339],
  6660. [158, 382],
  6661. [159, 376]
  6662. ]);
  6663. var Ko;
  6664. ! function(e) {
  6665. e[e.DATA = 0] = "DATA", e[e.RCDATA = 1] = "RCDATA", e[e.RAWTEXT = 2] = "RAWTEXT", e[e.SCRIPT_DATA = 3] = "SCRIPT_DATA", e[e.PLAINTEXT = 4] = "PLAINTEXT", e[e.TAG_OPEN = 5] = "TAG_OPEN", e[e.END_TAG_OPEN = 6] = "END_TAG_OPEN", e[e.TAG_NAME = 7] = "TAG_NAME", e[e.RCDATA_LESS_THAN_SIGN = 8] = "RCDATA_LESS_THAN_SIGN", e[e.RCDATA_END_TAG_OPEN = 9] = "RCDATA_END_TAG_OPEN", e[e.RCDATA_END_TAG_NAME = 10] = "RCDATA_END_TAG_NAME", e[e.RAWTEXT_LESS_THAN_SIGN = 11] = "RAWTEXT_LESS_THAN_SIGN", e[e.RAWTEXT_END_TAG_OPEN = 12] = "RAWTEXT_END_TAG_OPEN", e[e.RAWTEXT_END_TAG_NAME = 13] = "RAWTEXT_END_TAG_NAME", e[e.SCRIPT_DATA_LESS_THAN_SIGN = 14] = "SCRIPT_DATA_LESS_THAN_SIGN", e[e.SCRIPT_DATA_END_TAG_OPEN = 15] = "SCRIPT_DATA_END_TAG_OPEN", e[e.SCRIPT_DATA_END_TAG_NAME = 16] = "SCRIPT_DATA_END_TAG_NAME", e[e.SCRIPT_DATA_ESCAPE_START = 17] = "SCRIPT_DATA_ESCAPE_START", e[e.SCRIPT_DATA_ESCAPE_START_DASH = 18] = "SCRIPT_DATA_ESCAPE_START_DASH", e[e.SCRIPT_DATA_ESCAPED = 19] = "SCRIPT_DATA_ESCAPED", e[e.SCRIPT_DATA_ESCAPED_DASH = 20] = "SCRIPT_DATA_ESCAPED_DASH", e[e.SCRIPT_DATA_ESCAPED_DASH_DASH = 21] = "SCRIPT_DATA_ESCAPED_DASH_DASH", e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN = 22] = "SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN", e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN = 23] = "SCRIPT_DATA_ESCAPED_END_TAG_OPEN", e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME = 24] = "SCRIPT_DATA_ESCAPED_END_TAG_NAME", e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START = 25] = "SCRIPT_DATA_DOUBLE_ESCAPE_START", e[e.SCRIPT_DATA_DOUBLE_ESCAPED = 26] = "SCRIPT_DATA_DOUBLE_ESCAPED", e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH = 27] = "SCRIPT_DATA_DOUBLE_ESCAPED_DASH", e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH = 28] = "SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH", e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN = 29] = "SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN", e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END = 30] = "SCRIPT_DATA_DOUBLE_ESCAPE_END", e[e.BEFORE_ATTRIBUTE_NAME = 31] = "BEFORE_ATTRIBUTE_NAME", e[e.ATTRIBUTE_NAME = 32] = "ATTRIBUTE_NAME", e[e.AFTER_ATTRIBUTE_NAME = 33] = "AFTER_ATTRIBUTE_NAME", e[e.BEFORE_ATTRIBUTE_VALUE = 34] = "BEFORE_ATTRIBUTE_VALUE", e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED = 35] = "ATTRIBUTE_VALUE_DOUBLE_QUOTED", e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED = 36] = "ATTRIBUTE_VALUE_SINGLE_QUOTED", e[e.ATTRIBUTE_VALUE_UNQUOTED = 37] = "ATTRIBUTE_VALUE_UNQUOTED", e[e.AFTER_ATTRIBUTE_VALUE_QUOTED = 38] = "AFTER_ATTRIBUTE_VALUE_QUOTED", e[e.SELF_CLOSING_START_TAG = 39] = "SELF_CLOSING_START_TAG", e[e.BOGUS_COMMENT = 40] = "BOGUS_COMMENT", e[e.MARKUP_DECLARATION_OPEN = 41] = "MARKUP_DECLARATION_OPEN", e[e.COMMENT_START = 42] = "COMMENT_START", e[e.COMMENT_START_DASH = 43] = "COMMENT_START_DASH", e[e.COMMENT = 44] = "COMMENT", e[e.COMMENT_LESS_THAN_SIGN = 45] = "COMMENT_LESS_THAN_SIGN", e[e.COMMENT_LESS_THAN_SIGN_BANG = 46] = "COMMENT_LESS_THAN_SIGN_BANG", e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH = 47] = "COMMENT_LESS_THAN_SIGN_BANG_DASH", e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH = 48] = "COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH", e[e.COMMENT_END_DASH = 49] = "COMMENT_END_DASH", e[e.COMMENT_END = 50] = "COMMENT_END", e[e.COMMENT_END_BANG = 51] = "COMMENT_END_BANG", e[e.DOCTYPE = 52] = "DOCTYPE", e[e.BEFORE_DOCTYPE_NAME = 53] = "BEFORE_DOCTYPE_NAME", e[e.DOCTYPE_NAME = 54] = "DOCTYPE_NAME", e[e.AFTER_DOCTYPE_NAME = 55] = "AFTER_DOCTYPE_NAME", e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD = 56] = "AFTER_DOCTYPE_PUBLIC_KEYWORD", e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER = 57] = "BEFORE_DOCTYPE_PUBLIC_IDENTIFIER", e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED = 58] = "DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED", e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED = 59] = "DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED", e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER = 60] = "AFTER_DOCTYPE_PUBLIC_IDENTIFIER", e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS = 61] = "BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS", e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD = 62] = "AFTER_DOCTYPE_SYSTEM_KEYWORD", e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER = 63] = "BEFORE_DOCTYPE_SYSTEM_IDENTIFIER", e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED = 64] = "DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED", e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED = 65] = "DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED", e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER = 66] = "AFTER_DOCTYPE_SYSTEM_IDENTIFIER", e[e.BOGUS_DOCTYPE = 67] = "BOGUS_DOCTYPE", e[e.CDATA_SECTION = 68] = "CDATA_SECTION", e[e.CDATA_SECTION_BRACKET = 69] = "CDATA_SECTION_BRACKET", e[e.CDATA_SECTION_END = 70] = "CDATA_SECTION_END", e[e.CHARACTER_REFERENCE = 71] = "CHARACTER_REFERENCE", e[e.NAMED_CHARACTER_REFERENCE = 72] = "NAMED_CHARACTER_REFERENCE", e[e.AMBIGUOUS_AMPERSAND = 73] = "AMBIGUOUS_AMPERSAND", e[e.NUMERIC_CHARACTER_REFERENCE = 74] = "NUMERIC_CHARACTER_REFERENCE", e[e.HEXADEMICAL_CHARACTER_REFERENCE_START = 75] = "HEXADEMICAL_CHARACTER_REFERENCE_START", e[e.HEXADEMICAL_CHARACTER_REFERENCE = 76] = "HEXADEMICAL_CHARACTER_REFERENCE", e[e.DECIMAL_CHARACTER_REFERENCE = 77] = "DECIMAL_CHARACTER_REFERENCE", e[e.NUMERIC_CHARACTER_REFERENCE_END = 78] = "NUMERIC_CHARACTER_REFERENCE_END"
  6666. }(Ko || (Ko = {}));
  6667. const jo = {
  6668. DATA: Ko.DATA,
  6669. RCDATA: Ko.RCDATA,
  6670. RAWTEXT: Ko.RAWTEXT,
  6671. SCRIPT_DATA: Ko.SCRIPT_DATA,
  6672. PLAINTEXT: Ko.PLAINTEXT,
  6673. CDATA_SECTION: Ko.CDATA_SECTION
  6674. };
  6675. function Vo(e) {
  6676. return e >= io.DIGIT_0 && e <= io.DIGIT_9
  6677. }
  6678. function Wo(e) {
  6679. return e >= io.LATIN_CAPITAL_A && e <= io.LATIN_CAPITAL_Z
  6680. }
  6681. function Qo(e) {
  6682. return function(e) {
  6683. return e >= io.LATIN_SMALL_A && e <= io.LATIN_SMALL_Z
  6684. }(e) || Wo(e)
  6685. }
  6686. function Xo(e) {
  6687. return Qo(e) || Vo(e)
  6688. }
  6689. function $o(e) {
  6690. return e >= io.LATIN_CAPITAL_A && e <= io.LATIN_CAPITAL_F
  6691. }
  6692. function zo(e) {
  6693. return e >= io.LATIN_SMALL_A && e <= io.LATIN_SMALL_F
  6694. }
  6695. function Jo(e) {
  6696. return e + 32
  6697. }
  6698. function Zo(e) {
  6699. return e === io.SPACE || e === io.LINE_FEED || e === io.TABULATION || e === io.FORM_FEED
  6700. }
  6701. function ec(e) {
  6702. return Zo(e) || e === io.SOLIDUS || e === io.GREATER_THAN_SIGN
  6703. }
  6704. class tc {
  6705. constructor(e, t) {
  6706. this.options = e, this.handler = t, this.paused = !1, this.inLoop = !1, this.inForeignNode = !1, this.lastStartTagName = "", this.active = !1, this.state = Ko.DATA, this.returnState = Ko.DATA, this.charRefCode = -1, this.consumedAfterSnapshot = -1, this.currentCharacterToken = null, this.currentToken = null, this.currentAttr = {
  6707. name: "",
  6708. value: ""
  6709. }, this.preprocessor = new mo(t), this.currentLocation = this.getCurrentLocation(-1)
  6710. }
  6711. _err(e) {
  6712. var t, n;
  6713. null === (n = (t = this.handler).onParseError) || void 0 === n || n.call(t, this.preprocessor.getError(e))
  6714. }
  6715. getCurrentLocation(e) {
  6716. return this.options.sourceCodeLocationInfo ? {
  6717. startLine: this.preprocessor.line,
  6718. startCol: this.preprocessor.col - e,
  6719. startOffset: this.preprocessor.offset - e,
  6720. endLine: -1,
  6721. endCol: -1,
  6722. endOffset: -1
  6723. } : null
  6724. }
  6725. _runParsingLoop() {
  6726. if (!this.inLoop) {
  6727. for (this.inLoop = !0; this.active && !this.paused;) {
  6728. this.consumedAfterSnapshot = 0;
  6729. const e = this._consume();
  6730. this._ensureHibernation() || this._callState(e)
  6731. }
  6732. this.inLoop = !1
  6733. }
  6734. }
  6735. pause() {
  6736. this.paused = !0
  6737. }
  6738. resume(e) {
  6739. if (!this.paused) throw new Error("Parser was already resumed");
  6740. this.paused = !1, this.inLoop || (this._runParsingLoop(), this.paused || null == e || e())
  6741. }
  6742. write(e, t, n) {
  6743. this.active = !0, this.preprocessor.write(e, t), this._runParsingLoop(), this.paused || null == n || n()
  6744. }
  6745. insertHtmlAtCurrentPos(e) {
  6746. this.active = !0, this.preprocessor.insertHtmlAtCurrentPos(e), this._runParsingLoop()
  6747. }
  6748. _ensureHibernation() {
  6749. return !!this.preprocessor.endOfChunkHit && (this._unconsume(this.consumedAfterSnapshot), this.active = !1, !0)
  6750. }
  6751. _consume() {
  6752. return this.consumedAfterSnapshot++, this.preprocessor.advance()
  6753. }
  6754. _unconsume(e) {
  6755. this.consumedAfterSnapshot -= e, this.preprocessor.retreat(e)
  6756. }
  6757. _reconsumeInState(e, t) {
  6758. this.state = e, this._callState(t)
  6759. }
  6760. _advanceBy(e) {
  6761. this.consumedAfterSnapshot += e;
  6762. for (let t = 0; t < e; t++) this.preprocessor.advance()
  6763. }
  6764. _consumeSequenceIfMatch(e, t) {
  6765. return !!this.preprocessor.startsWith(e, t) && (this._advanceBy(e.length - 1), !0)
  6766. }
  6767. _createStartTagToken() {
  6768. this.currentToken = {
  6769. type: To.START_TAG,
  6770. tagName: "",
  6771. tagID: Po.UNKNOWN,
  6772. selfClosing: !1,
  6773. ackSelfClosing: !1,
  6774. attrs: [],
  6775. location: this.getCurrentLocation(1)
  6776. }
  6777. }
  6778. _createEndTagToken() {
  6779. this.currentToken = {
  6780. type: To.END_TAG,
  6781. tagName: "",
  6782. tagID: Po.UNKNOWN,
  6783. selfClosing: !1,
  6784. ackSelfClosing: !1,
  6785. attrs: [],
  6786. location: this.getCurrentLocation(2)
  6787. }
  6788. }
  6789. _createCommentToken(e) {
  6790. this.currentToken = {
  6791. type: To.COMMENT,
  6792. data: "",
  6793. location: this.getCurrentLocation(e)
  6794. }
  6795. }
  6796. _createDoctypeToken(e) {
  6797. this.currentToken = {
  6798. type: To.DOCTYPE,
  6799. name: e,
  6800. forceQuirks: !1,
  6801. publicId: null,
  6802. systemId: null,
  6803. location: this.currentLocation
  6804. }
  6805. }
  6806. _createCharacterToken(e, t) {
  6807. this.currentCharacterToken = {
  6808. type: e,
  6809. chars: t,
  6810. location: this.currentLocation
  6811. }
  6812. }
  6813. _createAttr(e) {
  6814. this.currentAttr = {
  6815. name: e,
  6816. value: ""
  6817. }, this.currentLocation = this.getCurrentLocation(0)
  6818. }
  6819. _leaveAttrName() {
  6820. var e, t;
  6821. const n = this.currentToken;
  6822. if (null === _o(n, this.currentAttr.name)) {
  6823. if (n.attrs.push(this.currentAttr), n.location && this.currentLocation) {
  6824. (null !== (e = (t = n.location).attrs) && void 0 !== e ? e : t.attrs = Object.create(null))[this.currentAttr.name] = this.currentLocation, this._leaveAttrValue()
  6825. }
  6826. } else this._err(Eo.duplicateAttribute)
  6827. }
  6828. _leaveAttrValue() {
  6829. this.currentLocation && (this.currentLocation.endLine = this.preprocessor.line, this.currentLocation.endCol = this.preprocessor.col, this.currentLocation.endOffset = this.preprocessor.offset)
  6830. }
  6831. prepareToken(e) {
  6832. this._emitCurrentCharacterToken(e.location), this.currentToken = null, e.location && (e.location.endLine = this.preprocessor.line, e.location.endCol = this.preprocessor.col + 1, e.location.endOffset = this.preprocessor.offset + 1), this.currentLocation = this.getCurrentLocation(-1)
  6833. }
  6834. emitCurrentTagToken() {
  6835. const e = this.currentToken;
  6836. this.prepareToken(e), e.tagID = Fo(e.tagName), e.type === To.START_TAG ? (this.lastStartTagName = e.tagName, this.handler.onStartTag(e)) : (e.attrs.length > 0 && this._err(Eo.endTagWithAttributes), e.selfClosing && this._err(Eo.endTagWithTrailingSolidus), this.handler.onEndTag(e)), this.preprocessor.dropParsedChunk()
  6837. }
  6838. emitCurrentComment(e) {
  6839. this.prepareToken(e), this.handler.onComment(e), this.preprocessor.dropParsedChunk()
  6840. }
  6841. emitCurrentDoctype(e) {
  6842. this.prepareToken(e), this.handler.onDoctype(e), this.preprocessor.dropParsedChunk()
  6843. }
  6844. _emitCurrentCharacterToken(e) {
  6845. if (this.currentCharacterToken) {
  6846. switch (e && this.currentCharacterToken.location && (this.currentCharacterToken.location.endLine = e.startLine, this.currentCharacterToken.location.endCol = e.startCol, this.currentCharacterToken.location.endOffset = e.startOffset), this.currentCharacterToken.type) {
  6847. case To.CHARACTER:
  6848. this.handler.onCharacter(this.currentCharacterToken);
  6849. break;
  6850. case To.NULL_CHARACTER:
  6851. this.handler.onNullCharacter(this.currentCharacterToken);
  6852. break;
  6853. case To.WHITESPACE_CHARACTER:
  6854. this.handler.onWhitespaceCharacter(this.currentCharacterToken)
  6855. }
  6856. this.currentCharacterToken = null
  6857. }
  6858. }
  6859. _emitEOFToken() {
  6860. const e = this.getCurrentLocation(0);
  6861. e && (e.endLine = e.startLine, e.endCol = e.startCol, e.endOffset = e.startOffset), this._emitCurrentCharacterToken(e), this.handler.onEof({
  6862. type: To.EOF,
  6863. location: e
  6864. }), this.active = !1
  6865. }
  6866. _appendCharToCurrentCharacterToken(e, t) {
  6867. if (this.currentCharacterToken) {
  6868. if (this.currentCharacterToken.type === e) return void(this.currentCharacterToken.chars += t);
  6869. this.currentLocation = this.getCurrentLocation(0), this._emitCurrentCharacterToken(this.currentLocation), this.preprocessor.dropParsedChunk()
  6870. }
  6871. this._createCharacterToken(e, t)
  6872. }
  6873. _emitCodePoint(e) {
  6874. const t = Zo(e) ? To.WHITESPACE_CHARACTER : e === io.NULL ? To.NULL_CHARACTER : To.CHARACTER;
  6875. this._appendCharToCurrentCharacterToken(t, String.fromCodePoint(e))
  6876. }
  6877. _emitChars(e) {
  6878. this._appendCharToCurrentCharacterToken(To.CHARACTER, e)
  6879. }
  6880. _matchNamedCharacterReference(e) {
  6881. let t = null,
  6882. n = 0,
  6883. r = !1;
  6884. for (let s = 0, a = wo[0]; s >= 0 && (s = Oo(wo, a, s + 1, e), !(s < 0)); e = this._consume()) {
  6885. n += 1, a = wo[s];
  6886. const o = a & yo.VALUE_LENGTH;
  6887. if (o) {
  6888. const a = (o >> 14) - 1;
  6889. if (e !== io.SEMICOLON && this._isCharacterReferenceInAttribute() && ((i = this.preprocessor.peek(1)) === io.EQUALS_SIGN || Xo(i)) ? (t = [io.AMPERSAND], s += a) : (t = 0 === a ? [wo[s] & ~yo.VALUE_LENGTH] : 1 === a ? [wo[++s]] : [wo[++s], wo[++s]], n = 0, r = e !== io.SEMICOLON), 0 === a) {
  6890. this._consume();
  6891. break
  6892. }
  6893. }
  6894. }
  6895. var i;
  6896. return this._unconsume(n), r && !this.preprocessor.endOfChunkHit && this._err(Eo.missingSemicolonAfterCharacterReference), this._unconsume(1), t
  6897. }
  6898. _isCharacterReferenceInAttribute() {
  6899. return this.returnState === Ko.ATTRIBUTE_VALUE_DOUBLE_QUOTED || this.returnState === Ko.ATTRIBUTE_VALUE_SINGLE_QUOTED || this.returnState === Ko.ATTRIBUTE_VALUE_UNQUOTED
  6900. }
  6901. _flushCodePointConsumedAsCharacterReference(e) {
  6902. this._isCharacterReferenceInAttribute() ? this.currentAttr.value += String.fromCodePoint(e) : this._emitCodePoint(e)
  6903. }
  6904. _callState(e) {
  6905. switch (this.state) {
  6906. case Ko.DATA:
  6907. this._stateData(e);
  6908. break;
  6909. case Ko.RCDATA:
  6910. this._stateRcdata(e);
  6911. break;
  6912. case Ko.RAWTEXT:
  6913. this._stateRawtext(e);
  6914. break;
  6915. case Ko.SCRIPT_DATA:
  6916. this._stateScriptData(e);
  6917. break;
  6918. case Ko.PLAINTEXT:
  6919. this._statePlaintext(e);
  6920. break;
  6921. case Ko.TAG_OPEN:
  6922. this._stateTagOpen(e);
  6923. break;
  6924. case Ko.END_TAG_OPEN:
  6925. this._stateEndTagOpen(e);
  6926. break;
  6927. case Ko.TAG_NAME:
  6928. this._stateTagName(e);
  6929. break;
  6930. case Ko.RCDATA_LESS_THAN_SIGN:
  6931. this._stateRcdataLessThanSign(e);
  6932. break;
  6933. case Ko.RCDATA_END_TAG_OPEN:
  6934. this._stateRcdataEndTagOpen(e);
  6935. break;
  6936. case Ko.RCDATA_END_TAG_NAME:
  6937. this._stateRcdataEndTagName(e);
  6938. break;
  6939. case Ko.RAWTEXT_LESS_THAN_SIGN:
  6940. this._stateRawtextLessThanSign(e);
  6941. break;
  6942. case Ko.RAWTEXT_END_TAG_OPEN:
  6943. this._stateRawtextEndTagOpen(e);
  6944. break;
  6945. case Ko.RAWTEXT_END_TAG_NAME:
  6946. this._stateRawtextEndTagName(e);
  6947. break;
  6948. case Ko.SCRIPT_DATA_LESS_THAN_SIGN:
  6949. this._stateScriptDataLessThanSign(e);
  6950. break;
  6951. case Ko.SCRIPT_DATA_END_TAG_OPEN:
  6952. this._stateScriptDataEndTagOpen(e);
  6953. break;
  6954. case Ko.SCRIPT_DATA_END_TAG_NAME:
  6955. this._stateScriptDataEndTagName(e);
  6956. break;
  6957. case Ko.SCRIPT_DATA_ESCAPE_START:
  6958. this._stateScriptDataEscapeStart(e);
  6959. break;
  6960. case Ko.SCRIPT_DATA_ESCAPE_START_DASH:
  6961. this._stateScriptDataEscapeStartDash(e);
  6962. break;
  6963. case Ko.SCRIPT_DATA_ESCAPED:
  6964. this._stateScriptDataEscaped(e);
  6965. break;
  6966. case Ko.SCRIPT_DATA_ESCAPED_DASH:
  6967. this._stateScriptDataEscapedDash(e);
  6968. break;
  6969. case Ko.SCRIPT_DATA_ESCAPED_DASH_DASH:
  6970. this._stateScriptDataEscapedDashDash(e);
  6971. break;
  6972. case Ko.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:
  6973. this._stateScriptDataEscapedLessThanSign(e);
  6974. break;
  6975. case Ko.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:
  6976. this._stateScriptDataEscapedEndTagOpen(e);
  6977. break;
  6978. case Ko.SCRIPT_DATA_ESCAPED_END_TAG_NAME:
  6979. this._stateScriptDataEscapedEndTagName(e);
  6980. break;
  6981. case Ko.SCRIPT_DATA_DOUBLE_ESCAPE_START:
  6982. this._stateScriptDataDoubleEscapeStart(e);
  6983. break;
  6984. case Ko.SCRIPT_DATA_DOUBLE_ESCAPED:
  6985. this._stateScriptDataDoubleEscaped(e);
  6986. break;
  6987. case Ko.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:
  6988. this._stateScriptDataDoubleEscapedDash(e);
  6989. break;
  6990. case Ko.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:
  6991. this._stateScriptDataDoubleEscapedDashDash(e);
  6992. break;
  6993. case Ko.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:
  6994. this._stateScriptDataDoubleEscapedLessThanSign(e);
  6995. break;
  6996. case Ko.SCRIPT_DATA_DOUBLE_ESCAPE_END:
  6997. this._stateScriptDataDoubleEscapeEnd(e);
  6998. break;
  6999. case Ko.BEFORE_ATTRIBUTE_NAME:
  7000. this._stateBeforeAttributeName(e);
  7001. break;
  7002. case Ko.ATTRIBUTE_NAME:
  7003. this._stateAttributeName(e);
  7004. break;
  7005. case Ko.AFTER_ATTRIBUTE_NAME:
  7006. this._stateAfterAttributeName(e);
  7007. break;
  7008. case Ko.BEFORE_ATTRIBUTE_VALUE:
  7009. this._stateBeforeAttributeValue(e);
  7010. break;
  7011. case Ko.ATTRIBUTE_VALUE_DOUBLE_QUOTED:
  7012. this._stateAttributeValueDoubleQuoted(e);
  7013. break;
  7014. case Ko.ATTRIBUTE_VALUE_SINGLE_QUOTED:
  7015. this._stateAttributeValueSingleQuoted(e);
  7016. break;
  7017. case Ko.ATTRIBUTE_VALUE_UNQUOTED:
  7018. this._stateAttributeValueUnquoted(e);
  7019. break;
  7020. case Ko.AFTER_ATTRIBUTE_VALUE_QUOTED:
  7021. this._stateAfterAttributeValueQuoted(e);
  7022. break;
  7023. case Ko.SELF_CLOSING_START_TAG:
  7024. this._stateSelfClosingStartTag(e);
  7025. break;
  7026. case Ko.BOGUS_COMMENT:
  7027. this._stateBogusComment(e);
  7028. break;
  7029. case Ko.MARKUP_DECLARATION_OPEN:
  7030. this._stateMarkupDeclarationOpen(e);
  7031. break;
  7032. case Ko.COMMENT_START:
  7033. this._stateCommentStart(e);
  7034. break;
  7035. case Ko.COMMENT_START_DASH:
  7036. this._stateCommentStartDash(e);
  7037. break;
  7038. case Ko.COMMENT:
  7039. this._stateComment(e);
  7040. break;
  7041. case Ko.COMMENT_LESS_THAN_SIGN:
  7042. this._stateCommentLessThanSign(e);
  7043. break;
  7044. case Ko.COMMENT_LESS_THAN_SIGN_BANG:
  7045. this._stateCommentLessThanSignBang(e);
  7046. break;
  7047. case Ko.COMMENT_LESS_THAN_SIGN_BANG_DASH:
  7048. this._stateCommentLessThanSignBangDash(e);
  7049. break;
  7050. case Ko.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:
  7051. this._stateCommentLessThanSignBangDashDash(e);
  7052. break;
  7053. case Ko.COMMENT_END_DASH:
  7054. this._stateCommentEndDash(e);
  7055. break;
  7056. case Ko.COMMENT_END:
  7057. this._stateCommentEnd(e);
  7058. break;
  7059. case Ko.COMMENT_END_BANG:
  7060. this._stateCommentEndBang(e);
  7061. break;
  7062. case Ko.DOCTYPE:
  7063. this._stateDoctype(e);
  7064. break;
  7065. case Ko.BEFORE_DOCTYPE_NAME:
  7066. this._stateBeforeDoctypeName(e);
  7067. break;
  7068. case Ko.DOCTYPE_NAME:
  7069. this._stateDoctypeName(e);
  7070. break;
  7071. case Ko.AFTER_DOCTYPE_NAME:
  7072. this._stateAfterDoctypeName(e);
  7073. break;
  7074. case Ko.AFTER_DOCTYPE_PUBLIC_KEYWORD:
  7075. this._stateAfterDoctypePublicKeyword(e);
  7076. break;
  7077. case Ko.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:
  7078. this._stateBeforeDoctypePublicIdentifier(e);
  7079. break;
  7080. case Ko.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:
  7081. this._stateDoctypePublicIdentifierDoubleQuoted(e);
  7082. break;
  7083. case Ko.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:
  7084. this._stateDoctypePublicIdentifierSingleQuoted(e);
  7085. break;
  7086. case Ko.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:
  7087. this._stateAfterDoctypePublicIdentifier(e);
  7088. break;
  7089. case Ko.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:
  7090. this._stateBetweenDoctypePublicAndSystemIdentifiers(e);
  7091. break;
  7092. case Ko.AFTER_DOCTYPE_SYSTEM_KEYWORD:
  7093. this._stateAfterDoctypeSystemKeyword(e);
  7094. break;
  7095. case Ko.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:
  7096. this._stateBeforeDoctypeSystemIdentifier(e);
  7097. break;
  7098. case Ko.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:
  7099. this._stateDoctypeSystemIdentifierDoubleQuoted(e);
  7100. break;
  7101. case Ko.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:
  7102. this._stateDoctypeSystemIdentifierSingleQuoted(e);
  7103. break;
  7104. case Ko.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:
  7105. this._stateAfterDoctypeSystemIdentifier(e);
  7106. break;
  7107. case Ko.BOGUS_DOCTYPE:
  7108. this._stateBogusDoctype(e);
  7109. break;
  7110. case Ko.CDATA_SECTION:
  7111. this._stateCdataSection(e);
  7112. break;
  7113. case Ko.CDATA_SECTION_BRACKET:
  7114. this._stateCdataSectionBracket(e);
  7115. break;
  7116. case Ko.CDATA_SECTION_END:
  7117. this._stateCdataSectionEnd(e);
  7118. break;
  7119. case Ko.CHARACTER_REFERENCE:
  7120. this._stateCharacterReference(e);
  7121. break;
  7122. case Ko.NAMED_CHARACTER_REFERENCE:
  7123. this._stateNamedCharacterReference(e);
  7124. break;
  7125. case Ko.AMBIGUOUS_AMPERSAND:
  7126. this._stateAmbiguousAmpersand(e);
  7127. break;
  7128. case Ko.NUMERIC_CHARACTER_REFERENCE:
  7129. this._stateNumericCharacterReference(e);
  7130. break;
  7131. case Ko.HEXADEMICAL_CHARACTER_REFERENCE_START:
  7132. this._stateHexademicalCharacterReferenceStart(e);
  7133. break;
  7134. case Ko.HEXADEMICAL_CHARACTER_REFERENCE:
  7135. this._stateHexademicalCharacterReference(e);
  7136. break;
  7137. case Ko.DECIMAL_CHARACTER_REFERENCE:
  7138. this._stateDecimalCharacterReference(e);
  7139. break;
  7140. case Ko.NUMERIC_CHARACTER_REFERENCE_END:
  7141. this._stateNumericCharacterReferenceEnd(e);
  7142. break;
  7143. default:
  7144. throw new Error("Unknown state")
  7145. }
  7146. }
  7147. _stateData(e) {
  7148. switch (e) {
  7149. case io.LESS_THAN_SIGN:
  7150. this.state = Ko.TAG_OPEN;
  7151. break;
  7152. case io.AMPERSAND:
  7153. this.returnState = Ko.DATA, this.state = Ko.CHARACTER_REFERENCE;
  7154. break;
  7155. case io.NULL:
  7156. this._err(Eo.unexpectedNullCharacter), this._emitCodePoint(e);
  7157. break;
  7158. case io.EOF:
  7159. this._emitEOFToken();
  7160. break;
  7161. default:
  7162. this._emitCodePoint(e)
  7163. }
  7164. }
  7165. _stateRcdata(e) {
  7166. switch (e) {
  7167. case io.AMPERSAND:
  7168. this.returnState = Ko.RCDATA, this.state = Ko.CHARACTER_REFERENCE;
  7169. break;
  7170. case io.LESS_THAN_SIGN:
  7171. this.state = Ko.RCDATA_LESS_THAN_SIGN;
  7172. break;
  7173. case io.NULL:
  7174. this._err(Eo.unexpectedNullCharacter), this._emitChars("�");
  7175. break;
  7176. case io.EOF:
  7177. this._emitEOFToken();
  7178. break;
  7179. default:
  7180. this._emitCodePoint(e)
  7181. }
  7182. }
  7183. _stateRawtext(e) {
  7184. switch (e) {
  7185. case io.LESS_THAN_SIGN:
  7186. this.state = Ko.RAWTEXT_LESS_THAN_SIGN;
  7187. break;
  7188. case io.NULL:
  7189. this._err(Eo.unexpectedNullCharacter), this._emitChars("�");
  7190. break;
  7191. case io.EOF:
  7192. this._emitEOFToken();
  7193. break;
  7194. default:
  7195. this._emitCodePoint(e)
  7196. }
  7197. }
  7198. _stateScriptData(e) {
  7199. switch (e) {
  7200. case io.LESS_THAN_SIGN:
  7201. this.state = Ko.SCRIPT_DATA_LESS_THAN_SIGN;
  7202. break;
  7203. case io.NULL:
  7204. this._err(Eo.unexpectedNullCharacter), this._emitChars("�");
  7205. break;
  7206. case io.EOF:
  7207. this._emitEOFToken();
  7208. break;
  7209. default:
  7210. this._emitCodePoint(e)
  7211. }
  7212. }
  7213. _statePlaintext(e) {
  7214. switch (e) {
  7215. case io.NULL:
  7216. this._err(Eo.unexpectedNullCharacter), this._emitChars("�");
  7217. break;
  7218. case io.EOF:
  7219. this._emitEOFToken();
  7220. break;
  7221. default:
  7222. this._emitCodePoint(e)
  7223. }
  7224. }
  7225. _stateTagOpen(e) {
  7226. if (Qo(e)) this._createStartTagToken(), this.state = Ko.TAG_NAME, this._stateTagName(e);
  7227. else switch (e) {
  7228. case io.EXCLAMATION_MARK:
  7229. this.state = Ko.MARKUP_DECLARATION_OPEN;
  7230. break;
  7231. case io.SOLIDUS:
  7232. this.state = Ko.END_TAG_OPEN;
  7233. break;
  7234. case io.QUESTION_MARK:
  7235. this._err(Eo.unexpectedQuestionMarkInsteadOfTagName), this._createCommentToken(1), this.state = Ko.BOGUS_COMMENT, this._stateBogusComment(e);
  7236. break;
  7237. case io.EOF:
  7238. this._err(Eo.eofBeforeTagName), this._emitChars("<"), this._emitEOFToken();
  7239. break;
  7240. default:
  7241. this._err(Eo.invalidFirstCharacterOfTagName), this._emitChars("<"), this.state = Ko.DATA, this._stateData(e)
  7242. }
  7243. }
  7244. _stateEndTagOpen(e) {
  7245. if (Qo(e)) this._createEndTagToken(), this.state = Ko.TAG_NAME, this._stateTagName(e);
  7246. else switch (e) {
  7247. case io.GREATER_THAN_SIGN:
  7248. this._err(Eo.missingEndTagName), this.state = Ko.DATA;
  7249. break;
  7250. case io.EOF:
  7251. this._err(Eo.eofBeforeTagName), this._emitChars("</"), this._emitEOFToken();
  7252. break;
  7253. default:
  7254. this._err(Eo.invalidFirstCharacterOfTagName), this._createCommentToken(2), this.state = Ko.BOGUS_COMMENT, this._stateBogusComment(e)
  7255. }
  7256. }
  7257. _stateTagName(e) {
  7258. const t = this.currentToken;
  7259. switch (e) {
  7260. case io.SPACE:
  7261. case io.LINE_FEED:
  7262. case io.TABULATION:
  7263. case io.FORM_FEED:
  7264. this.state = Ko.BEFORE_ATTRIBUTE_NAME;
  7265. break;
  7266. case io.SOLIDUS:
  7267. this.state = Ko.SELF_CLOSING_START_TAG;
  7268. break;
  7269. case io.GREATER_THAN_SIGN:
  7270. this.state = Ko.DATA, this.emitCurrentTagToken();
  7271. break;
  7272. case io.NULL:
  7273. this._err(Eo.unexpectedNullCharacter), t.tagName += "�";
  7274. break;
  7275. case io.EOF:
  7276. this._err(Eo.eofInTag), this._emitEOFToken();
  7277. break;
  7278. default:
  7279. t.tagName += String.fromCodePoint(Wo(e) ? Jo(e) : e)
  7280. }
  7281. }
  7282. _stateRcdataLessThanSign(e) {
  7283. e === io.SOLIDUS ? this.state = Ko.RCDATA_END_TAG_OPEN : (this._emitChars("<"), this.state = Ko.RCDATA, this._stateRcdata(e))
  7284. }
  7285. _stateRcdataEndTagOpen(e) {
  7286. Qo(e) ? (this.state = Ko.RCDATA_END_TAG_NAME, this._stateRcdataEndTagName(e)) : (this._emitChars("</"), this.state = Ko.RCDATA, this._stateRcdata(e))
  7287. }
  7288. handleSpecialEndTag(e) {
  7289. if (!this.preprocessor.startsWith(this.lastStartTagName, !1)) return !this._ensureHibernation();
  7290. this._createEndTagToken();
  7291. this.currentToken.tagName = this.lastStartTagName;
  7292. switch (this.preprocessor.peek(this.lastStartTagName.length)) {
  7293. case io.SPACE:
  7294. case io.LINE_FEED:
  7295. case io.TABULATION:
  7296. case io.FORM_FEED:
  7297. return this._advanceBy(this.lastStartTagName.length), this.state = Ko.BEFORE_ATTRIBUTE_NAME, !1;
  7298. case io.SOLIDUS:
  7299. return this._advanceBy(this.lastStartTagName.length), this.state = Ko.SELF_CLOSING_START_TAG, !1;
  7300. case io.GREATER_THAN_SIGN:
  7301. return this._advanceBy(this.lastStartTagName.length), this.emitCurrentTagToken(), this.state = Ko.DATA, !1;
  7302. default:
  7303. return !this._ensureHibernation()
  7304. }
  7305. }
  7306. _stateRcdataEndTagName(e) {
  7307. this.handleSpecialEndTag(e) && (this._emitChars("</"), this.state = Ko.RCDATA, this._stateRcdata(e))
  7308. }
  7309. _stateRawtextLessThanSign(e) {
  7310. e === io.SOLIDUS ? this.state = Ko.RAWTEXT_END_TAG_OPEN : (this._emitChars("<"), this.state = Ko.RAWTEXT, this._stateRawtext(e))
  7311. }
  7312. _stateRawtextEndTagOpen(e) {
  7313. Qo(e) ? (this.state = Ko.RAWTEXT_END_TAG_NAME, this._stateRawtextEndTagName(e)) : (this._emitChars("</"), this.state = Ko.RAWTEXT, this._stateRawtext(e))
  7314. }
  7315. _stateRawtextEndTagName(e) {
  7316. this.handleSpecialEndTag(e) && (this._emitChars("</"), this.state = Ko.RAWTEXT, this._stateRawtext(e))
  7317. }
  7318. _stateScriptDataLessThanSign(e) {
  7319. switch (e) {
  7320. case io.SOLIDUS:
  7321. this.state = Ko.SCRIPT_DATA_END_TAG_OPEN;
  7322. break;
  7323. case io.EXCLAMATION_MARK:
  7324. this.state = Ko.SCRIPT_DATA_ESCAPE_START, this._emitChars("<!");
  7325. break;
  7326. default:
  7327. this._emitChars("<"), this.state = Ko.SCRIPT_DATA, this._stateScriptData(e)
  7328. }
  7329. }
  7330. _stateScriptDataEndTagOpen(e) {
  7331. Qo(e) ? (this.state = Ko.SCRIPT_DATA_END_TAG_NAME, this._stateScriptDataEndTagName(e)) : (this._emitChars("</"), this.state = Ko.SCRIPT_DATA, this._stateScriptData(e))
  7332. }
  7333. _stateScriptDataEndTagName(e) {
  7334. this.handleSpecialEndTag(e) && (this._emitChars("</"), this.state = Ko.SCRIPT_DATA, this._stateScriptData(e))
  7335. }
  7336. _stateScriptDataEscapeStart(e) {
  7337. e === io.HYPHEN_MINUS ? (this.state = Ko.SCRIPT_DATA_ESCAPE_START_DASH, this._emitChars("-")) : (this.state = Ko.SCRIPT_DATA, this._stateScriptData(e))
  7338. }
  7339. _stateScriptDataEscapeStartDash(e) {
  7340. e === io.HYPHEN_MINUS ? (this.state = Ko.SCRIPT_DATA_ESCAPED_DASH_DASH, this._emitChars("-")) : (this.state = Ko.SCRIPT_DATA, this._stateScriptData(e))
  7341. }
  7342. _stateScriptDataEscaped(e) {
  7343. switch (e) {
  7344. case io.HYPHEN_MINUS:
  7345. this.state = Ko.SCRIPT_DATA_ESCAPED_DASH, this._emitChars("-");
  7346. break;
  7347. case io.LESS_THAN_SIGN:
  7348. this.state = Ko.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;
  7349. break;
  7350. case io.NULL:
  7351. this._err(Eo.unexpectedNullCharacter), this._emitChars("�");
  7352. break;
  7353. case io.EOF:
  7354. this._err(Eo.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
  7355. break;
  7356. default:
  7357. this._emitCodePoint(e)
  7358. }
  7359. }
  7360. _stateScriptDataEscapedDash(e) {
  7361. switch (e) {
  7362. case io.HYPHEN_MINUS:
  7363. this.state = Ko.SCRIPT_DATA_ESCAPED_DASH_DASH, this._emitChars("-");
  7364. break;
  7365. case io.LESS_THAN_SIGN:
  7366. this.state = Ko.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;
  7367. break;
  7368. case io.NULL:
  7369. this._err(Eo.unexpectedNullCharacter), this.state = Ko.SCRIPT_DATA_ESCAPED, this._emitChars("�");
  7370. break;
  7371. case io.EOF:
  7372. this._err(Eo.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
  7373. break;
  7374. default:
  7375. this.state = Ko.SCRIPT_DATA_ESCAPED, this._emitCodePoint(e)
  7376. }
  7377. }
  7378. _stateScriptDataEscapedDashDash(e) {
  7379. switch (e) {
  7380. case io.HYPHEN_MINUS:
  7381. this._emitChars("-");
  7382. break;
  7383. case io.LESS_THAN_SIGN:
  7384. this.state = Ko.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;
  7385. break;
  7386. case io.GREATER_THAN_SIGN:
  7387. this.state = Ko.SCRIPT_DATA, this._emitChars(">");
  7388. break;
  7389. case io.NULL:
  7390. this._err(Eo.unexpectedNullCharacter), this.state = Ko.SCRIPT_DATA_ESCAPED, this._emitChars("�");
  7391. break;
  7392. case io.EOF:
  7393. this._err(Eo.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
  7394. break;
  7395. default:
  7396. this.state = Ko.SCRIPT_DATA_ESCAPED, this._emitCodePoint(e)
  7397. }
  7398. }
  7399. _stateScriptDataEscapedLessThanSign(e) {
  7400. e === io.SOLIDUS ? this.state = Ko.SCRIPT_DATA_ESCAPED_END_TAG_OPEN : Qo(e) ? (this._emitChars("<"), this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPE_START, this._stateScriptDataDoubleEscapeStart(e)) : (this._emitChars("<"), this.state = Ko.SCRIPT_DATA_ESCAPED, this._stateScriptDataEscaped(e))
  7401. }
  7402. _stateScriptDataEscapedEndTagOpen(e) {
  7403. Qo(e) ? (this.state = Ko.SCRIPT_DATA_ESCAPED_END_TAG_NAME, this._stateScriptDataEscapedEndTagName(e)) : (this._emitChars("</"), this.state = Ko.SCRIPT_DATA_ESCAPED, this._stateScriptDataEscaped(e))
  7404. }
  7405. _stateScriptDataEscapedEndTagName(e) {
  7406. this.handleSpecialEndTag(e) && (this._emitChars("</"), this.state = Ko.SCRIPT_DATA_ESCAPED, this._stateScriptDataEscaped(e))
  7407. }
  7408. _stateScriptDataDoubleEscapeStart(e) {
  7409. if (this.preprocessor.startsWith(co, !1) && ec(this.preprocessor.peek(co.length))) {
  7410. this._emitCodePoint(e);
  7411. for (let e = 0; e < co.length; e++) this._emitCodePoint(this._consume());
  7412. this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED
  7413. } else this._ensureHibernation() || (this.state = Ko.SCRIPT_DATA_ESCAPED, this._stateScriptDataEscaped(e))
  7414. }
  7415. _stateScriptDataDoubleEscaped(e) {
  7416. switch (e) {
  7417. case io.HYPHEN_MINUS:
  7418. this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED_DASH, this._emitChars("-");
  7419. break;
  7420. case io.LESS_THAN_SIGN:
  7421. this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN, this._emitChars("<");
  7422. break;
  7423. case io.NULL:
  7424. this._err(Eo.unexpectedNullCharacter), this._emitChars("�");
  7425. break;
  7426. case io.EOF:
  7427. this._err(Eo.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
  7428. break;
  7429. default:
  7430. this._emitCodePoint(e)
  7431. }
  7432. }
  7433. _stateScriptDataDoubleEscapedDash(e) {
  7434. switch (e) {
  7435. case io.HYPHEN_MINUS:
  7436. this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH, this._emitChars("-");
  7437. break;
  7438. case io.LESS_THAN_SIGN:
  7439. this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN, this._emitChars("<");
  7440. break;
  7441. case io.NULL:
  7442. this._err(Eo.unexpectedNullCharacter), this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitChars("�");
  7443. break;
  7444. case io.EOF:
  7445. this._err(Eo.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
  7446. break;
  7447. default:
  7448. this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitCodePoint(e)
  7449. }
  7450. }
  7451. _stateScriptDataDoubleEscapedDashDash(e) {
  7452. switch (e) {
  7453. case io.HYPHEN_MINUS:
  7454. this._emitChars("-");
  7455. break;
  7456. case io.LESS_THAN_SIGN:
  7457. this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN, this._emitChars("<");
  7458. break;
  7459. case io.GREATER_THAN_SIGN:
  7460. this.state = Ko.SCRIPT_DATA, this._emitChars(">");
  7461. break;
  7462. case io.NULL:
  7463. this._err(Eo.unexpectedNullCharacter), this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitChars("�");
  7464. break;
  7465. case io.EOF:
  7466. this._err(Eo.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
  7467. break;
  7468. default:
  7469. this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitCodePoint(e)
  7470. }
  7471. }
  7472. _stateScriptDataDoubleEscapedLessThanSign(e) {
  7473. e === io.SOLIDUS ? (this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPE_END, this._emitChars("/")) : (this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED, this._stateScriptDataDoubleEscaped(e))
  7474. }
  7475. _stateScriptDataDoubleEscapeEnd(e) {
  7476. if (this.preprocessor.startsWith(co, !1) && ec(this.preprocessor.peek(co.length))) {
  7477. this._emitCodePoint(e);
  7478. for (let e = 0; e < co.length; e++) this._emitCodePoint(this._consume());
  7479. this.state = Ko.SCRIPT_DATA_ESCAPED
  7480. } else this._ensureHibernation() || (this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED, this._stateScriptDataDoubleEscaped(e))
  7481. }
  7482. _stateBeforeAttributeName(e) {
  7483. switch (e) {
  7484. case io.SPACE:
  7485. case io.LINE_FEED:
  7486. case io.TABULATION:
  7487. case io.FORM_FEED:
  7488. break;
  7489. case io.SOLIDUS:
  7490. case io.GREATER_THAN_SIGN:
  7491. case io.EOF:
  7492. this.state = Ko.AFTER_ATTRIBUTE_NAME, this._stateAfterAttributeName(e);
  7493. break;
  7494. case io.EQUALS_SIGN:
  7495. this._err(Eo.unexpectedEqualsSignBeforeAttributeName), this._createAttr("="), this.state = Ko.ATTRIBUTE_NAME;
  7496. break;
  7497. default:
  7498. this._createAttr(""), this.state = Ko.ATTRIBUTE_NAME, this._stateAttributeName(e)
  7499. }
  7500. }
  7501. _stateAttributeName(e) {
  7502. switch (e) {
  7503. case io.SPACE:
  7504. case io.LINE_FEED:
  7505. case io.TABULATION:
  7506. case io.FORM_FEED:
  7507. case io.SOLIDUS:
  7508. case io.GREATER_THAN_SIGN:
  7509. case io.EOF:
  7510. this._leaveAttrName(), this.state = Ko.AFTER_ATTRIBUTE_NAME, this._stateAfterAttributeName(e);
  7511. break;
  7512. case io.EQUALS_SIGN:
  7513. this._leaveAttrName(), this.state = Ko.BEFORE_ATTRIBUTE_VALUE;
  7514. break;
  7515. case io.QUOTATION_MARK:
  7516. case io.APOSTROPHE:
  7517. case io.LESS_THAN_SIGN:
  7518. this._err(Eo.unexpectedCharacterInAttributeName), this.currentAttr.name += String.fromCodePoint(e);
  7519. break;
  7520. case io.NULL:
  7521. this._err(Eo.unexpectedNullCharacter), this.currentAttr.name += "�";
  7522. break;
  7523. default:
  7524. this.currentAttr.name += String.fromCodePoint(Wo(e) ? Jo(e) : e)
  7525. }
  7526. }
  7527. _stateAfterAttributeName(e) {
  7528. switch (e) {
  7529. case io.SPACE:
  7530. case io.LINE_FEED:
  7531. case io.TABULATION:
  7532. case io.FORM_FEED:
  7533. break;
  7534. case io.SOLIDUS:
  7535. this.state = Ko.SELF_CLOSING_START_TAG;
  7536. break;
  7537. case io.EQUALS_SIGN:
  7538. this.state = Ko.BEFORE_ATTRIBUTE_VALUE;
  7539. break;
  7540. case io.GREATER_THAN_SIGN:
  7541. this.state = Ko.DATA, this.emitCurrentTagToken();
  7542. break;
  7543. case io.EOF:
  7544. this._err(Eo.eofInTag), this._emitEOFToken();
  7545. break;
  7546. default:
  7547. this._createAttr(""), this.state = Ko.ATTRIBUTE_NAME, this._stateAttributeName(e)
  7548. }
  7549. }
  7550. _stateBeforeAttributeValue(e) {
  7551. switch (e) {
  7552. case io.SPACE:
  7553. case io.LINE_FEED:
  7554. case io.TABULATION:
  7555. case io.FORM_FEED:
  7556. break;
  7557. case io.QUOTATION_MARK:
  7558. this.state = Ko.ATTRIBUTE_VALUE_DOUBLE_QUOTED;
  7559. break;
  7560. case io.APOSTROPHE:
  7561. this.state = Ko.ATTRIBUTE_VALUE_SINGLE_QUOTED;
  7562. break;
  7563. case io.GREATER_THAN_SIGN:
  7564. this._err(Eo.missingAttributeValue), this.state = Ko.DATA, this.emitCurrentTagToken();
  7565. break;
  7566. default:
  7567. this.state = Ko.ATTRIBUTE_VALUE_UNQUOTED, this._stateAttributeValueUnquoted(e)
  7568. }
  7569. }
  7570. _stateAttributeValueDoubleQuoted(e) {
  7571. switch (e) {
  7572. case io.QUOTATION_MARK:
  7573. this.state = Ko.AFTER_ATTRIBUTE_VALUE_QUOTED;
  7574. break;
  7575. case io.AMPERSAND:
  7576. this.returnState = Ko.ATTRIBUTE_VALUE_DOUBLE_QUOTED, this.state = Ko.CHARACTER_REFERENCE;
  7577. break;
  7578. case io.NULL:
  7579. this._err(Eo.unexpectedNullCharacter), this.currentAttr.value += "�";
  7580. break;
  7581. case io.EOF:
  7582. this._err(Eo.eofInTag), this._emitEOFToken();
  7583. break;
  7584. default:
  7585. this.currentAttr.value += String.fromCodePoint(e)
  7586. }
  7587. }
  7588. _stateAttributeValueSingleQuoted(e) {
  7589. switch (e) {
  7590. case io.APOSTROPHE:
  7591. this.state = Ko.AFTER_ATTRIBUTE_VALUE_QUOTED;
  7592. break;
  7593. case io.AMPERSAND:
  7594. this.returnState = Ko.ATTRIBUTE_VALUE_SINGLE_QUOTED, this.state = Ko.CHARACTER_REFERENCE;
  7595. break;
  7596. case io.NULL:
  7597. this._err(Eo.unexpectedNullCharacter), this.currentAttr.value += "�";
  7598. break;
  7599. case io.EOF:
  7600. this._err(Eo.eofInTag), this._emitEOFToken();
  7601. break;
  7602. default:
  7603. this.currentAttr.value += String.fromCodePoint(e)
  7604. }
  7605. }
  7606. _stateAttributeValueUnquoted(e) {
  7607. switch (e) {
  7608. case io.SPACE:
  7609. case io.LINE_FEED:
  7610. case io.TABULATION:
  7611. case io.FORM_FEED:
  7612. this._leaveAttrValue(), this.state = Ko.BEFORE_ATTRIBUTE_NAME;
  7613. break;
  7614. case io.AMPERSAND:
  7615. this.returnState = Ko.ATTRIBUTE_VALUE_UNQUOTED, this.state = Ko.CHARACTER_REFERENCE;
  7616. break;
  7617. case io.GREATER_THAN_SIGN:
  7618. this._leaveAttrValue(), this.state = Ko.DATA, this.emitCurrentTagToken();
  7619. break;
  7620. case io.NULL:
  7621. this._err(Eo.unexpectedNullCharacter), this.currentAttr.value += "�";
  7622. break;
  7623. case io.QUOTATION_MARK:
  7624. case io.APOSTROPHE:
  7625. case io.LESS_THAN_SIGN:
  7626. case io.EQUALS_SIGN:
  7627. case io.GRAVE_ACCENT:
  7628. this._err(Eo.unexpectedCharacterInUnquotedAttributeValue), this.currentAttr.value += String.fromCodePoint(e);
  7629. break;
  7630. case io.EOF:
  7631. this._err(Eo.eofInTag), this._emitEOFToken();
  7632. break;
  7633. default:
  7634. this.currentAttr.value += String.fromCodePoint(e)
  7635. }
  7636. }
  7637. _stateAfterAttributeValueQuoted(e) {
  7638. switch (e) {
  7639. case io.SPACE:
  7640. case io.LINE_FEED:
  7641. case io.TABULATION:
  7642. case io.FORM_FEED:
  7643. this._leaveAttrValue(), this.state = Ko.BEFORE_ATTRIBUTE_NAME;
  7644. break;
  7645. case io.SOLIDUS:
  7646. this._leaveAttrValue(), this.state = Ko.SELF_CLOSING_START_TAG;
  7647. break;
  7648. case io.GREATER_THAN_SIGN:
  7649. this._leaveAttrValue(), this.state = Ko.DATA, this.emitCurrentTagToken();
  7650. break;
  7651. case io.EOF:
  7652. this._err(Eo.eofInTag), this._emitEOFToken();
  7653. break;
  7654. default:
  7655. this._err(Eo.missingWhitespaceBetweenAttributes), this.state = Ko.BEFORE_ATTRIBUTE_NAME, this._stateBeforeAttributeName(e)
  7656. }
  7657. }
  7658. _stateSelfClosingStartTag(e) {
  7659. switch (e) {
  7660. case io.GREATER_THAN_SIGN:
  7661. this.currentToken.selfClosing = !0, this.state = Ko.DATA, this.emitCurrentTagToken();
  7662. break;
  7663. case io.EOF:
  7664. this._err(Eo.eofInTag), this._emitEOFToken();
  7665. break;
  7666. default:
  7667. this._err(Eo.unexpectedSolidusInTag), this.state = Ko.BEFORE_ATTRIBUTE_NAME, this._stateBeforeAttributeName(e)
  7668. }
  7669. }
  7670. _stateBogusComment(e) {
  7671. const t = this.currentToken;
  7672. switch (e) {
  7673. case io.GREATER_THAN_SIGN:
  7674. this.state = Ko.DATA, this.emitCurrentComment(t);
  7675. break;
  7676. case io.EOF:
  7677. this.emitCurrentComment(t), this._emitEOFToken();
  7678. break;
  7679. case io.NULL:
  7680. this._err(Eo.unexpectedNullCharacter), t.data += "�";
  7681. break;
  7682. default:
  7683. t.data += String.fromCodePoint(e)
  7684. }
  7685. }
  7686. _stateMarkupDeclarationOpen(e) {
  7687. this._consumeSequenceIfMatch(so, !0) ? (this._createCommentToken(so.length + 1), this.state = Ko.COMMENT_START) : this._consumeSequenceIfMatch(oo, !1) ? (this.currentLocation = this.getCurrentLocation(oo.length + 1), this.state = Ko.DOCTYPE) : this._consumeSequenceIfMatch(ao, !0) ? this.inForeignNode ? this.state = Ko.CDATA_SECTION : (this._err(Eo.cdataInHtmlContent), this._createCommentToken(ao.length + 1), this.currentToken.data = "[CDATA[", this.state = Ko.BOGUS_COMMENT) : this._ensureHibernation() || (this._err(Eo.incorrectlyOpenedComment), this._createCommentToken(2), this.state = Ko.BOGUS_COMMENT, this._stateBogusComment(e))
  7688. }
  7689. _stateCommentStart(e) {
  7690. switch (e) {
  7691. case io.HYPHEN_MINUS:
  7692. this.state = Ko.COMMENT_START_DASH;
  7693. break;
  7694. case io.GREATER_THAN_SIGN: {
  7695. this._err(Eo.abruptClosingOfEmptyComment), this.state = Ko.DATA;
  7696. const e = this.currentToken;
  7697. this.emitCurrentComment(e);
  7698. break
  7699. }
  7700. default:
  7701. this.state = Ko.COMMENT, this._stateComment(e)
  7702. }
  7703. }
  7704. _stateCommentStartDash(e) {
  7705. const t = this.currentToken;
  7706. switch (e) {
  7707. case io.HYPHEN_MINUS:
  7708. this.state = Ko.COMMENT_END;
  7709. break;
  7710. case io.GREATER_THAN_SIGN:
  7711. this._err(Eo.abruptClosingOfEmptyComment), this.state = Ko.DATA, this.emitCurrentComment(t);
  7712. break;
  7713. case io.EOF:
  7714. this._err(Eo.eofInComment), this.emitCurrentComment(t), this._emitEOFToken();
  7715. break;
  7716. default:
  7717. t.data += "-", this.state = Ko.COMMENT, this._stateComment(e)
  7718. }
  7719. }
  7720. _stateComment(e) {
  7721. const t = this.currentToken;
  7722. switch (e) {
  7723. case io.HYPHEN_MINUS:
  7724. this.state = Ko.COMMENT_END_DASH;
  7725. break;
  7726. case io.LESS_THAN_SIGN:
  7727. t.data += "<", this.state = Ko.COMMENT_LESS_THAN_SIGN;
  7728. break;
  7729. case io.NULL:
  7730. this._err(Eo.unexpectedNullCharacter), t.data += "�";
  7731. break;
  7732. case io.EOF:
  7733. this._err(Eo.eofInComment), this.emitCurrentComment(t), this._emitEOFToken();
  7734. break;
  7735. default:
  7736. t.data += String.fromCodePoint(e)
  7737. }
  7738. }
  7739. _stateCommentLessThanSign(e) {
  7740. const t = this.currentToken;
  7741. switch (e) {
  7742. case io.EXCLAMATION_MARK:
  7743. t.data += "!", this.state = Ko.COMMENT_LESS_THAN_SIGN_BANG;
  7744. break;
  7745. case io.LESS_THAN_SIGN:
  7746. t.data += "<";
  7747. break;
  7748. default:
  7749. this.state = Ko.COMMENT, this._stateComment(e)
  7750. }
  7751. }
  7752. _stateCommentLessThanSignBang(e) {
  7753. e === io.HYPHEN_MINUS ? this.state = Ko.COMMENT_LESS_THAN_SIGN_BANG_DASH : (this.state = Ko.COMMENT, this._stateComment(e))
  7754. }
  7755. _stateCommentLessThanSignBangDash(e) {
  7756. e === io.HYPHEN_MINUS ? this.state = Ko.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH : (this.state = Ko.COMMENT_END_DASH, this._stateCommentEndDash(e))
  7757. }
  7758. _stateCommentLessThanSignBangDashDash(e) {
  7759. e !== io.GREATER_THAN_SIGN && e !== io.EOF && this._err(Eo.nestedComment), this.state = Ko.COMMENT_END, this._stateCommentEnd(e)
  7760. }
  7761. _stateCommentEndDash(e) {
  7762. const t = this.currentToken;
  7763. switch (e) {
  7764. case io.HYPHEN_MINUS:
  7765. this.state = Ko.COMMENT_END;
  7766. break;
  7767. case io.EOF:
  7768. this._err(Eo.eofInComment), this.emitCurrentComment(t), this._emitEOFToken();
  7769. break;
  7770. default:
  7771. t.data += "-", this.state = Ko.COMMENT, this._stateComment(e)
  7772. }
  7773. }
  7774. _stateCommentEnd(e) {
  7775. const t = this.currentToken;
  7776. switch (e) {
  7777. case io.GREATER_THAN_SIGN:
  7778. this.state = Ko.DATA, this.emitCurrentComment(t);
  7779. break;
  7780. case io.EXCLAMATION_MARK:
  7781. this.state = Ko.COMMENT_END_BANG;
  7782. break;
  7783. case io.HYPHEN_MINUS:
  7784. t.data += "-";
  7785. break;
  7786. case io.EOF:
  7787. this._err(Eo.eofInComment), this.emitCurrentComment(t), this._emitEOFToken();
  7788. break;
  7789. default:
  7790. t.data += "--", this.state = Ko.COMMENT, this._stateComment(e)
  7791. }
  7792. }
  7793. _stateCommentEndBang(e) {
  7794. const t = this.currentToken;
  7795. switch (e) {
  7796. case io.HYPHEN_MINUS:
  7797. t.data += "--!", this.state = Ko.COMMENT_END_DASH;
  7798. break;
  7799. case io.GREATER_THAN_SIGN:
  7800. this._err(Eo.incorrectlyClosedComment), this.state = Ko.DATA, this.emitCurrentComment(t);
  7801. break;
  7802. case io.EOF:
  7803. this._err(Eo.eofInComment), this.emitCurrentComment(t), this._emitEOFToken();
  7804. break;
  7805. default:
  7806. t.data += "--!", this.state = Ko.COMMENT, this._stateComment(e)
  7807. }
  7808. }
  7809. _stateDoctype(e) {
  7810. switch (e) {
  7811. case io.SPACE:
  7812. case io.LINE_FEED:
  7813. case io.TABULATION:
  7814. case io.FORM_FEED:
  7815. this.state = Ko.BEFORE_DOCTYPE_NAME;
  7816. break;
  7817. case io.GREATER_THAN_SIGN:
  7818. this.state = Ko.BEFORE_DOCTYPE_NAME, this._stateBeforeDoctypeName(e);
  7819. break;
  7820. case io.EOF: {
  7821. this._err(Eo.eofInDoctype), this._createDoctypeToken(null);
  7822. const e = this.currentToken;
  7823. e.forceQuirks = !0, this.emitCurrentDoctype(e), this._emitEOFToken();
  7824. break
  7825. }
  7826. default:
  7827. this._err(Eo.missingWhitespaceBeforeDoctypeName), this.state = Ko.BEFORE_DOCTYPE_NAME, this._stateBeforeDoctypeName(e)
  7828. }
  7829. }
  7830. _stateBeforeDoctypeName(e) {
  7831. if (Wo(e)) this._createDoctypeToken(String.fromCharCode(Jo(e))), this.state = Ko.DOCTYPE_NAME;
  7832. else switch (e) {
  7833. case io.SPACE:
  7834. case io.LINE_FEED:
  7835. case io.TABULATION:
  7836. case io.FORM_FEED:
  7837. break;
  7838. case io.NULL:
  7839. this._err(Eo.unexpectedNullCharacter), this._createDoctypeToken("�"), this.state = Ko.DOCTYPE_NAME;
  7840. break;
  7841. case io.GREATER_THAN_SIGN: {
  7842. this._err(Eo.missingDoctypeName), this._createDoctypeToken(null);
  7843. const e = this.currentToken;
  7844. e.forceQuirks = !0, this.emitCurrentDoctype(e), this.state = Ko.DATA;
  7845. break
  7846. }
  7847. case io.EOF: {
  7848. this._err(Eo.eofInDoctype), this._createDoctypeToken(null);
  7849. const e = this.currentToken;
  7850. e.forceQuirks = !0, this.emitCurrentDoctype(e), this._emitEOFToken();
  7851. break
  7852. }
  7853. default:
  7854. this._createDoctypeToken(String.fromCodePoint(e)), this.state = Ko.DOCTYPE_NAME
  7855. }
  7856. }
  7857. _stateDoctypeName(e) {
  7858. const t = this.currentToken;
  7859. switch (e) {
  7860. case io.SPACE:
  7861. case io.LINE_FEED:
  7862. case io.TABULATION:
  7863. case io.FORM_FEED:
  7864. this.state = Ko.AFTER_DOCTYPE_NAME;
  7865. break;
  7866. case io.GREATER_THAN_SIGN:
  7867. this.state = Ko.DATA, this.emitCurrentDoctype(t);
  7868. break;
  7869. case io.NULL:
  7870. this._err(Eo.unexpectedNullCharacter), t.name += "�";
  7871. break;
  7872. case io.EOF:
  7873. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  7874. break;
  7875. default:
  7876. t.name += String.fromCodePoint(Wo(e) ? Jo(e) : e)
  7877. }
  7878. }
  7879. _stateAfterDoctypeName(e) {
  7880. const t = this.currentToken;
  7881. switch (e) {
  7882. case io.SPACE:
  7883. case io.LINE_FEED:
  7884. case io.TABULATION:
  7885. case io.FORM_FEED:
  7886. break;
  7887. case io.GREATER_THAN_SIGN:
  7888. this.state = Ko.DATA, this.emitCurrentDoctype(t);
  7889. break;
  7890. case io.EOF:
  7891. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  7892. break;
  7893. default:
  7894. this._consumeSequenceIfMatch(lo, !1) ? this.state = Ko.AFTER_DOCTYPE_PUBLIC_KEYWORD : this._consumeSequenceIfMatch(ho, !1) ? this.state = Ko.AFTER_DOCTYPE_SYSTEM_KEYWORD : this._ensureHibernation() || (this._err(Eo.invalidCharacterSequenceAfterDoctypeName), t.forceQuirks = !0, this.state = Ko.BOGUS_DOCTYPE, this._stateBogusDoctype(e))
  7895. }
  7896. }
  7897. _stateAfterDoctypePublicKeyword(e) {
  7898. const t = this.currentToken;
  7899. switch (e) {
  7900. case io.SPACE:
  7901. case io.LINE_FEED:
  7902. case io.TABULATION:
  7903. case io.FORM_FEED:
  7904. this.state = Ko.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;
  7905. break;
  7906. case io.QUOTATION_MARK:
  7907. this._err(Eo.missingWhitespaceAfterDoctypePublicKeyword), t.publicId = "", this.state = Ko.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;
  7908. break;
  7909. case io.APOSTROPHE:
  7910. this._err(Eo.missingWhitespaceAfterDoctypePublicKeyword), t.publicId = "", this.state = Ko.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;
  7911. break;
  7912. case io.GREATER_THAN_SIGN:
  7913. this._err(Eo.missingDoctypePublicIdentifier), t.forceQuirks = !0, this.state = Ko.DATA, this.emitCurrentDoctype(t);
  7914. break;
  7915. case io.EOF:
  7916. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  7917. break;
  7918. default:
  7919. this._err(Eo.missingQuoteBeforeDoctypePublicIdentifier), t.forceQuirks = !0, this.state = Ko.BOGUS_DOCTYPE, this._stateBogusDoctype(e)
  7920. }
  7921. }
  7922. _stateBeforeDoctypePublicIdentifier(e) {
  7923. const t = this.currentToken;
  7924. switch (e) {
  7925. case io.SPACE:
  7926. case io.LINE_FEED:
  7927. case io.TABULATION:
  7928. case io.FORM_FEED:
  7929. break;
  7930. case io.QUOTATION_MARK:
  7931. t.publicId = "", this.state = Ko.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;
  7932. break;
  7933. case io.APOSTROPHE:
  7934. t.publicId = "", this.state = Ko.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;
  7935. break;
  7936. case io.GREATER_THAN_SIGN:
  7937. this._err(Eo.missingDoctypePublicIdentifier), t.forceQuirks = !0, this.state = Ko.DATA, this.emitCurrentDoctype(t);
  7938. break;
  7939. case io.EOF:
  7940. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  7941. break;
  7942. default:
  7943. this._err(Eo.missingQuoteBeforeDoctypePublicIdentifier), t.forceQuirks = !0, this.state = Ko.BOGUS_DOCTYPE, this._stateBogusDoctype(e)
  7944. }
  7945. }
  7946. _stateDoctypePublicIdentifierDoubleQuoted(e) {
  7947. const t = this.currentToken;
  7948. switch (e) {
  7949. case io.QUOTATION_MARK:
  7950. this.state = Ko.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;
  7951. break;
  7952. case io.NULL:
  7953. this._err(Eo.unexpectedNullCharacter), t.publicId += "�";
  7954. break;
  7955. case io.GREATER_THAN_SIGN:
  7956. this._err(Eo.abruptDoctypePublicIdentifier), t.forceQuirks = !0, this.emitCurrentDoctype(t), this.state = Ko.DATA;
  7957. break;
  7958. case io.EOF:
  7959. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  7960. break;
  7961. default:
  7962. t.publicId += String.fromCodePoint(e)
  7963. }
  7964. }
  7965. _stateDoctypePublicIdentifierSingleQuoted(e) {
  7966. const t = this.currentToken;
  7967. switch (e) {
  7968. case io.APOSTROPHE:
  7969. this.state = Ko.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;
  7970. break;
  7971. case io.NULL:
  7972. this._err(Eo.unexpectedNullCharacter), t.publicId += "�";
  7973. break;
  7974. case io.GREATER_THAN_SIGN:
  7975. this._err(Eo.abruptDoctypePublicIdentifier), t.forceQuirks = !0, this.emitCurrentDoctype(t), this.state = Ko.DATA;
  7976. break;
  7977. case io.EOF:
  7978. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  7979. break;
  7980. default:
  7981. t.publicId += String.fromCodePoint(e)
  7982. }
  7983. }
  7984. _stateAfterDoctypePublicIdentifier(e) {
  7985. const t = this.currentToken;
  7986. switch (e) {
  7987. case io.SPACE:
  7988. case io.LINE_FEED:
  7989. case io.TABULATION:
  7990. case io.FORM_FEED:
  7991. this.state = Ko.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;
  7992. break;
  7993. case io.GREATER_THAN_SIGN:
  7994. this.state = Ko.DATA, this.emitCurrentDoctype(t);
  7995. break;
  7996. case io.QUOTATION_MARK:
  7997. this._err(Eo.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers), t.systemId = "", this.state = Ko.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;
  7998. break;
  7999. case io.APOSTROPHE:
  8000. this._err(Eo.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers), t.systemId = "", this.state = Ko.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;
  8001. break;
  8002. case io.EOF:
  8003. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  8004. break;
  8005. default:
  8006. this._err(Eo.missingQuoteBeforeDoctypeSystemIdentifier), t.forceQuirks = !0, this.state = Ko.BOGUS_DOCTYPE, this._stateBogusDoctype(e)
  8007. }
  8008. }
  8009. _stateBetweenDoctypePublicAndSystemIdentifiers(e) {
  8010. const t = this.currentToken;
  8011. switch (e) {
  8012. case io.SPACE:
  8013. case io.LINE_FEED:
  8014. case io.TABULATION:
  8015. case io.FORM_FEED:
  8016. break;
  8017. case io.GREATER_THAN_SIGN:
  8018. this.emitCurrentDoctype(t), this.state = Ko.DATA;
  8019. break;
  8020. case io.QUOTATION_MARK:
  8021. t.systemId = "", this.state = Ko.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;
  8022. break;
  8023. case io.APOSTROPHE:
  8024. t.systemId = "", this.state = Ko.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;
  8025. break;
  8026. case io.EOF:
  8027. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  8028. break;
  8029. default:
  8030. this._err(Eo.missingQuoteBeforeDoctypeSystemIdentifier), t.forceQuirks = !0, this.state = Ko.BOGUS_DOCTYPE, this._stateBogusDoctype(e)
  8031. }
  8032. }
  8033. _stateAfterDoctypeSystemKeyword(e) {
  8034. const t = this.currentToken;
  8035. switch (e) {
  8036. case io.SPACE:
  8037. case io.LINE_FEED:
  8038. case io.TABULATION:
  8039. case io.FORM_FEED:
  8040. this.state = Ko.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;
  8041. break;
  8042. case io.QUOTATION_MARK:
  8043. this._err(Eo.missingWhitespaceAfterDoctypeSystemKeyword), t.systemId = "", this.state = Ko.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;
  8044. break;
  8045. case io.APOSTROPHE:
  8046. this._err(Eo.missingWhitespaceAfterDoctypeSystemKeyword), t.systemId = "", this.state = Ko.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;
  8047. break;
  8048. case io.GREATER_THAN_SIGN:
  8049. this._err(Eo.missingDoctypeSystemIdentifier), t.forceQuirks = !0, this.state = Ko.DATA, this.emitCurrentDoctype(t);
  8050. break;
  8051. case io.EOF:
  8052. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  8053. break;
  8054. default:
  8055. this._err(Eo.missingQuoteBeforeDoctypeSystemIdentifier), t.forceQuirks = !0, this.state = Ko.BOGUS_DOCTYPE, this._stateBogusDoctype(e)
  8056. }
  8057. }
  8058. _stateBeforeDoctypeSystemIdentifier(e) {
  8059. const t = this.currentToken;
  8060. switch (e) {
  8061. case io.SPACE:
  8062. case io.LINE_FEED:
  8063. case io.TABULATION:
  8064. case io.FORM_FEED:
  8065. break;
  8066. case io.QUOTATION_MARK:
  8067. t.systemId = "", this.state = Ko.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;
  8068. break;
  8069. case io.APOSTROPHE:
  8070. t.systemId = "", this.state = Ko.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;
  8071. break;
  8072. case io.GREATER_THAN_SIGN:
  8073. this._err(Eo.missingDoctypeSystemIdentifier), t.forceQuirks = !0, this.state = Ko.DATA, this.emitCurrentDoctype(t);
  8074. break;
  8075. case io.EOF:
  8076. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  8077. break;
  8078. default:
  8079. this._err(Eo.missingQuoteBeforeDoctypeSystemIdentifier), t.forceQuirks = !0, this.state = Ko.BOGUS_DOCTYPE, this._stateBogusDoctype(e)
  8080. }
  8081. }
  8082. _stateDoctypeSystemIdentifierDoubleQuoted(e) {
  8083. const t = this.currentToken;
  8084. switch (e) {
  8085. case io.QUOTATION_MARK:
  8086. this.state = Ko.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;
  8087. break;
  8088. case io.NULL:
  8089. this._err(Eo.unexpectedNullCharacter), t.systemId += "�";
  8090. break;
  8091. case io.GREATER_THAN_SIGN:
  8092. this._err(Eo.abruptDoctypeSystemIdentifier), t.forceQuirks = !0, this.emitCurrentDoctype(t), this.state = Ko.DATA;
  8093. break;
  8094. case io.EOF:
  8095. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  8096. break;
  8097. default:
  8098. t.systemId += String.fromCodePoint(e)
  8099. }
  8100. }
  8101. _stateDoctypeSystemIdentifierSingleQuoted(e) {
  8102. const t = this.currentToken;
  8103. switch (e) {
  8104. case io.APOSTROPHE:
  8105. this.state = Ko.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;
  8106. break;
  8107. case io.NULL:
  8108. this._err(Eo.unexpectedNullCharacter), t.systemId += "�";
  8109. break;
  8110. case io.GREATER_THAN_SIGN:
  8111. this._err(Eo.abruptDoctypeSystemIdentifier), t.forceQuirks = !0, this.emitCurrentDoctype(t), this.state = Ko.DATA;
  8112. break;
  8113. case io.EOF:
  8114. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  8115. break;
  8116. default:
  8117. t.systemId += String.fromCodePoint(e)
  8118. }
  8119. }
  8120. _stateAfterDoctypeSystemIdentifier(e) {
  8121. const t = this.currentToken;
  8122. switch (e) {
  8123. case io.SPACE:
  8124. case io.LINE_FEED:
  8125. case io.TABULATION:
  8126. case io.FORM_FEED:
  8127. break;
  8128. case io.GREATER_THAN_SIGN:
  8129. this.emitCurrentDoctype(t), this.state = Ko.DATA;
  8130. break;
  8131. case io.EOF:
  8132. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  8133. break;
  8134. default:
  8135. this._err(Eo.unexpectedCharacterAfterDoctypeSystemIdentifier), this.state = Ko.BOGUS_DOCTYPE, this._stateBogusDoctype(e)
  8136. }
  8137. }
  8138. _stateBogusDoctype(e) {
  8139. const t = this.currentToken;
  8140. switch (e) {
  8141. case io.GREATER_THAN_SIGN:
  8142. this.emitCurrentDoctype(t), this.state = Ko.DATA;
  8143. break;
  8144. case io.NULL:
  8145. this._err(Eo.unexpectedNullCharacter);
  8146. break;
  8147. case io.EOF:
  8148. this.emitCurrentDoctype(t), this._emitEOFToken()
  8149. }
  8150. }
  8151. _stateCdataSection(e) {
  8152. switch (e) {
  8153. case io.RIGHT_SQUARE_BRACKET:
  8154. this.state = Ko.CDATA_SECTION_BRACKET;
  8155. break;
  8156. case io.EOF:
  8157. this._err(Eo.eofInCdata), this._emitEOFToken();
  8158. break;
  8159. default:
  8160. this._emitCodePoint(e)
  8161. }
  8162. }
  8163. _stateCdataSectionBracket(e) {
  8164. e === io.RIGHT_SQUARE_BRACKET ? this.state = Ko.CDATA_SECTION_END : (this._emitChars("]"), this.state = Ko.CDATA_SECTION, this._stateCdataSection(e))
  8165. }
  8166. _stateCdataSectionEnd(e) {
  8167. switch (e) {
  8168. case io.GREATER_THAN_SIGN:
  8169. this.state = Ko.DATA;
  8170. break;
  8171. case io.RIGHT_SQUARE_BRACKET:
  8172. this._emitChars("]");
  8173. break;
  8174. default:
  8175. this._emitChars("]]"), this.state = Ko.CDATA_SECTION, this._stateCdataSection(e)
  8176. }
  8177. }
  8178. _stateCharacterReference(e) {
  8179. e === io.NUMBER_SIGN ? this.state = Ko.NUMERIC_CHARACTER_REFERENCE : Xo(e) ? (this.state = Ko.NAMED_CHARACTER_REFERENCE, this._stateNamedCharacterReference(e)) : (this._flushCodePointConsumedAsCharacterReference(io.AMPERSAND), this._reconsumeInState(this.returnState, e))
  8180. }
  8181. _stateNamedCharacterReference(e) {
  8182. const t = this._matchNamedCharacterReference(e);
  8183. if (this._ensureHibernation());
  8184. else if (t) {
  8185. for (let e = 0; e < t.length; e++) this._flushCodePointConsumedAsCharacterReference(t[e]);
  8186. this.state = this.returnState
  8187. } else this._flushCodePointConsumedAsCharacterReference(io.AMPERSAND), this.state = Ko.AMBIGUOUS_AMPERSAND
  8188. }
  8189. _stateAmbiguousAmpersand(e) {
  8190. Xo(e) ? this._flushCodePointConsumedAsCharacterReference(e) : (e === io.SEMICOLON && this._err(Eo.unknownNamedCharacterReference), this._reconsumeInState(this.returnState, e))
  8191. }
  8192. _stateNumericCharacterReference(e) {
  8193. this.charRefCode = 0, e === io.LATIN_SMALL_X || e === io.LATIN_CAPITAL_X ? this.state = Ko.HEXADEMICAL_CHARACTER_REFERENCE_START : Vo(e) ? (this.state = Ko.DECIMAL_CHARACTER_REFERENCE, this._stateDecimalCharacterReference(e)) : (this._err(Eo.absenceOfDigitsInNumericCharacterReference), this._flushCodePointConsumedAsCharacterReference(io.AMPERSAND), this._flushCodePointConsumedAsCharacterReference(io.NUMBER_SIGN), this._reconsumeInState(this.returnState, e))
  8194. }
  8195. _stateHexademicalCharacterReferenceStart(e) {
  8196. ! function(e) {
  8197. return Vo(e) || $o(e) || zo(e)
  8198. }(e) ? (this._err(Eo.absenceOfDigitsInNumericCharacterReference), this._flushCodePointConsumedAsCharacterReference(io.AMPERSAND), this._flushCodePointConsumedAsCharacterReference(io.NUMBER_SIGN), this._unconsume(2), this.state = this.returnState) : (this.state = Ko.HEXADEMICAL_CHARACTER_REFERENCE, this._stateHexademicalCharacterReference(e))
  8199. }
  8200. _stateHexademicalCharacterReference(e) {
  8201. $o(e) ? this.charRefCode = 16 * this.charRefCode + e - 55 : zo(e) ? this.charRefCode = 16 * this.charRefCode + e - 87 : Vo(e) ? this.charRefCode = 16 * this.charRefCode + e - 48 : e === io.SEMICOLON ? this.state = Ko.NUMERIC_CHARACTER_REFERENCE_END : (this._err(Eo.missingSemicolonAfterCharacterReference), this.state = Ko.NUMERIC_CHARACTER_REFERENCE_END, this._stateNumericCharacterReferenceEnd(e))
  8202. }
  8203. _stateDecimalCharacterReference(e) {
  8204. Vo(e) ? this.charRefCode = 10 * this.charRefCode + e - 48 : e === io.SEMICOLON ? this.state = Ko.NUMERIC_CHARACTER_REFERENCE_END : (this._err(Eo.missingSemicolonAfterCharacterReference), this.state = Ko.NUMERIC_CHARACTER_REFERENCE_END, this._stateNumericCharacterReferenceEnd(e))
  8205. }
  8206. _stateNumericCharacterReferenceEnd(e) {
  8207. if (this.charRefCode === io.NULL) this._err(Eo.nullCharacterReference), this.charRefCode = io.REPLACEMENT_CHARACTER;
  8208. else if (this.charRefCode > 1114111) this._err(Eo.characterReferenceOutsideUnicodeRange), this.charRefCode = io.REPLACEMENT_CHARACTER;
  8209. else if (uo(this.charRefCode)) this._err(Eo.surrogateCharacterReference), this.charRefCode = io.REPLACEMENT_CHARACTER;
  8210. else if (fo(this.charRefCode)) this._err(Eo.noncharacterCharacterReference);
  8211. else if (po(this.charRefCode) || this.charRefCode === io.CARRIAGE_RETURN) {
  8212. this._err(Eo.controlCharacterReference);
  8213. const e = qo.get(this.charRefCode);
  8214. void 0 !== e && (this.charRefCode = e)
  8215. }
  8216. this._flushCodePointConsumedAsCharacterReference(this.charRefCode), this._reconsumeInState(this.returnState, e)
  8217. }
  8218. }
  8219. const nc = new Set([Po.DD, Po.DT, Po.LI, Po.OPTGROUP, Po.OPTION, Po.P, Po.RB, Po.RP, Po.RT, Po.RTC]),
  8220. rc = new Set([...nc, Po.CAPTION, Po.COLGROUP, Po.TBODY, Po.TD, Po.TFOOT, Po.TH, Po.THEAD, Po.TR]),
  8221. ic = new Map([
  8222. [Po.APPLET, vo.HTML],
  8223. [Po.CAPTION, vo.HTML],
  8224. [Po.HTML, vo.HTML],
  8225. [Po.MARQUEE, vo.HTML],
  8226. [Po.OBJECT, vo.HTML],
  8227. [Po.TABLE, vo.HTML],
  8228. [Po.TD, vo.HTML],
  8229. [Po.TEMPLATE, vo.HTML],
  8230. [Po.TH, vo.HTML],
  8231. [Po.ANNOTATION_XML, vo.MATHML],
  8232. [Po.MI, vo.MATHML],
  8233. [Po.MN, vo.MATHML],
  8234. [Po.MO, vo.MATHML],
  8235. [Po.MS, vo.MATHML],
  8236. [Po.MTEXT, vo.MATHML],
  8237. [Po.DESC, vo.SVG],
  8238. [Po.FOREIGN_OBJECT, vo.SVG],
  8239. [Po.TITLE, vo.SVG]
  8240. ]),
  8241. sc = [Po.H1, Po.H2, Po.H3, Po.H4, Po.H5, Po.H6],
  8242. ac = [Po.TR, Po.TEMPLATE, Po.HTML],
  8243. oc = [Po.TBODY, Po.TFOOT, Po.THEAD, Po.TEMPLATE, Po.HTML],
  8244. cc = [Po.TABLE, Po.TEMPLATE, Po.HTML],
  8245. lc = [Po.TD, Po.TH];
  8246. class hc {
  8247. constructor(e, t, n) {
  8248. this.treeAdapter = t, this.handler = n, this.items = [], this.tagIDs = [], this.stackTop = -1, this.tmplCount = 0, this.currentTagId = Po.UNKNOWN, this.current = e
  8249. }
  8250. get currentTmplContentOrNode() {
  8251. return this._isInTemplate() ? this.treeAdapter.getTemplateContent(this.current) : this.current
  8252. }
  8253. _indexOf(e) {
  8254. return this.items.lastIndexOf(e, this.stackTop)
  8255. }
  8256. _isInTemplate() {
  8257. return this.currentTagId === Po.TEMPLATE && this.treeAdapter.getNamespaceURI(this.current) === vo.HTML
  8258. }
  8259. _updateCurrentElement() {
  8260. this.current = this.items[this.stackTop], this.currentTagId = this.tagIDs[this.stackTop]
  8261. }
  8262. push(e, t) {
  8263. this.stackTop++, this.items[this.stackTop] = e, this.current = e, this.tagIDs[this.stackTop] = t, this.currentTagId = t, this._isInTemplate() && this.tmplCount++, this.handler.onItemPush(e, t, !0)
  8264. }
  8265. pop() {
  8266. const e = this.current;
  8267. this.tmplCount > 0 && this._isInTemplate() && this.tmplCount--, this.stackTop--, this._updateCurrentElement(), this.handler.onItemPop(e, !0)
  8268. }
  8269. replace(e, t) {
  8270. const n = this._indexOf(e);
  8271. this.items[n] = t, n === this.stackTop && (this.current = t)
  8272. }
  8273. insertAfter(e, t, n) {
  8274. const r = this._indexOf(e) + 1;
  8275. this.items.splice(r, 0, t), this.tagIDs.splice(r, 0, n), this.stackTop++, r === this.stackTop && this._updateCurrentElement(), this.handler.onItemPush(this.current, this.currentTagId, r === this.stackTop)
  8276. }
  8277. popUntilTagNamePopped(e) {
  8278. let t = this.stackTop + 1;
  8279. do {
  8280. t = this.tagIDs.lastIndexOf(e, t - 1)
  8281. } while (t > 0 && this.treeAdapter.getNamespaceURI(this.items[t]) !== vo.HTML);
  8282. this.shortenToLength(t < 0 ? 0 : t)
  8283. }
  8284. shortenToLength(e) {
  8285. for (; this.stackTop >= e;) {
  8286. const t = this.current;
  8287. this.tmplCount > 0 && this._isInTemplate() && (this.tmplCount -= 1), this.stackTop--, this._updateCurrentElement(), this.handler.onItemPop(t, this.stackTop < e)
  8288. }
  8289. }
  8290. popUntilElementPopped(e) {
  8291. const t = this._indexOf(e);
  8292. this.shortenToLength(t < 0 ? 0 : t)
  8293. }
  8294. popUntilPopped(e, t) {
  8295. const n = this._indexOfTagNames(e, t);
  8296. this.shortenToLength(n < 0 ? 0 : n)
  8297. }
  8298. popUntilNumberedHeaderPopped() {
  8299. this.popUntilPopped(sc, vo.HTML)
  8300. }
  8301. popUntilTableCellPopped() {
  8302. this.popUntilPopped(lc, vo.HTML)
  8303. }
  8304. popAllUpToHtmlElement() {
  8305. this.tmplCount = 0, this.shortenToLength(1)
  8306. }
  8307. _indexOfTagNames(e, t) {
  8308. for (let n = this.stackTop; n >= 0; n--)
  8309. if (e.includes(this.tagIDs[n]) && this.treeAdapter.getNamespaceURI(this.items[n]) === t) return n;
  8310. return -1
  8311. }
  8312. clearBackTo(e, t) {
  8313. const n = this._indexOfTagNames(e, t);
  8314. this.shortenToLength(n + 1)
  8315. }
  8316. clearBackToTableContext() {
  8317. this.clearBackTo(cc, vo.HTML)
  8318. }
  8319. clearBackToTableBodyContext() {
  8320. this.clearBackTo(oc, vo.HTML)
  8321. }
  8322. clearBackToTableRowContext() {
  8323. this.clearBackTo(ac, vo.HTML)
  8324. }
  8325. remove(e) {
  8326. const t = this._indexOf(e);
  8327. t >= 0 && (t === this.stackTop ? this.pop() : (this.items.splice(t, 1), this.tagIDs.splice(t, 1), this.stackTop--, this._updateCurrentElement(), this.handler.onItemPop(e, !1)))
  8328. }
  8329. tryPeekProperlyNestedBodyElement() {
  8330. return this.stackTop >= 1 && this.tagIDs[1] === Po.BODY ? this.items[1] : null
  8331. }
  8332. contains(e) {
  8333. return this._indexOf(e) > -1
  8334. }
  8335. getCommonAncestor(e) {
  8336. const t = this._indexOf(e) - 1;
  8337. return t >= 0 ? this.items[t] : null
  8338. }
  8339. isRootHtmlElementCurrent() {
  8340. return 0 === this.stackTop && this.tagIDs[0] === Po.HTML
  8341. }
  8342. hasInScope(e) {
  8343. for (let t = this.stackTop; t >= 0; t--) {
  8344. const n = this.tagIDs[t],
  8345. r = this.treeAdapter.getNamespaceURI(this.items[t]);
  8346. if (n === e && r === vo.HTML) return !0;
  8347. if (ic.get(n) === r) return !1
  8348. }
  8349. return !0
  8350. }
  8351. hasNumberedHeaderInScope() {
  8352. for (let e = this.stackTop; e >= 0; e--) {
  8353. const t = this.tagIDs[e],
  8354. n = this.treeAdapter.getNamespaceURI(this.items[e]);
  8355. if (Go(t) && n === vo.HTML) return !0;
  8356. if (ic.get(t) === n) return !1
  8357. }
  8358. return !0
  8359. }
  8360. hasInListItemScope(e) {
  8361. for (let t = this.stackTop; t >= 0; t--) {
  8362. const n = this.tagIDs[t],
  8363. r = this.treeAdapter.getNamespaceURI(this.items[t]);
  8364. if (n === e && r === vo.HTML) return !0;
  8365. if ((n === Po.UL || n === Po.OL) && r === vo.HTML || ic.get(n) === r) return !1
  8366. }
  8367. return !0
  8368. }
  8369. hasInButtonScope(e) {
  8370. for (let t = this.stackTop; t >= 0; t--) {
  8371. const n = this.tagIDs[t],
  8372. r = this.treeAdapter.getNamespaceURI(this.items[t]);
  8373. if (n === e && r === vo.HTML) return !0;
  8374. if (n === Po.BUTTON && r === vo.HTML || ic.get(n) === r) return !1
  8375. }
  8376. return !0
  8377. }
  8378. hasInTableScope(e) {
  8379. for (let t = this.stackTop; t >= 0; t--) {
  8380. const n = this.tagIDs[t];
  8381. if (this.treeAdapter.getNamespaceURI(this.items[t]) === vo.HTML) {
  8382. if (n === e) return !0;
  8383. if (n === Po.TABLE || n === Po.TEMPLATE || n === Po.HTML) return !1
  8384. }
  8385. }
  8386. return !0
  8387. }
  8388. hasTableBodyContextInTableScope() {
  8389. for (let e = this.stackTop; e >= 0; e--) {
  8390. const t = this.tagIDs[e];
  8391. if (this.treeAdapter.getNamespaceURI(this.items[e]) === vo.HTML) {
  8392. if (t === Po.TBODY || t === Po.THEAD || t === Po.TFOOT) return !0;
  8393. if (t === Po.TABLE || t === Po.HTML) return !1
  8394. }
  8395. }
  8396. return !0
  8397. }
  8398. hasInSelectScope(e) {
  8399. for (let t = this.stackTop; t >= 0; t--) {
  8400. const n = this.tagIDs[t];
  8401. if (this.treeAdapter.getNamespaceURI(this.items[t]) === vo.HTML) {
  8402. if (n === e) return !0;
  8403. if (n !== Po.OPTION && n !== Po.OPTGROUP) return !1
  8404. }
  8405. }
  8406. return !0
  8407. }
  8408. generateImpliedEndTags() {
  8409. for (; nc.has(this.currentTagId);) this.pop()
  8410. }
  8411. generateImpliedEndTagsThoroughly() {
  8412. for (; rc.has(this.currentTagId);) this.pop()
  8413. }
  8414. generateImpliedEndTagsWithExclusion(e) {
  8415. for (; this.currentTagId !== e && rc.has(this.currentTagId);) this.pop()
  8416. }
  8417. }
  8418. var uc;
  8419. ! function(e) {
  8420. e[e.Marker = 0] = "Marker", e[e.Element = 1] = "Element"
  8421. }(uc = uc || (uc = {}));
  8422. const pc = {
  8423. type: uc.Marker
  8424. };
  8425. class fc {
  8426. constructor(e) {
  8427. this.treeAdapter = e, this.entries = [], this.bookmark = null
  8428. }
  8429. _getNoahArkConditionCandidates(e, t) {
  8430. const n = [],
  8431. r = t.length,
  8432. i = this.treeAdapter.getTagName(e),
  8433. s = this.treeAdapter.getNamespaceURI(e);
  8434. for (let e = 0; e < this.entries.length; e++) {
  8435. const t = this.entries[e];
  8436. if (t.type === uc.Marker) break;
  8437. const {
  8438. element: a
  8439. } = t;
  8440. if (this.treeAdapter.getTagName(a) === i && this.treeAdapter.getNamespaceURI(a) === s) {
  8441. const t = this.treeAdapter.getAttrList(a);
  8442. t.length === r && n.push({
  8443. idx: e,
  8444. attrs: t
  8445. })
  8446. }
  8447. }
  8448. return n
  8449. }
  8450. _ensureNoahArkCondition(e) {
  8451. if (this.entries.length < 3) return;
  8452. const t = this.treeAdapter.getAttrList(e),
  8453. n = this._getNoahArkConditionCandidates(e, t);
  8454. if (n.length < 3) return;
  8455. const r = new Map(t.map((e => [e.name, e.value])));
  8456. let i = 0;
  8457. for (let e = 0; e < n.length; e++) {
  8458. const t = n[e];
  8459. t.attrs.every((e => r.get(e.name) === e.value)) && (i += 1, i >= 3 && this.entries.splice(t.idx, 1))
  8460. }
  8461. }
  8462. insertMarker() {
  8463. this.entries.unshift(pc)
  8464. }
  8465. pushElement(e, t) {
  8466. this._ensureNoahArkCondition(e), this.entries.unshift({
  8467. type: uc.Element,
  8468. element: e,
  8469. token: t
  8470. })
  8471. }
  8472. insertElementAfterBookmark(e, t) {
  8473. const n = this.entries.indexOf(this.bookmark);
  8474. this.entries.splice(n, 0, {
  8475. type: uc.Element,
  8476. element: e,
  8477. token: t
  8478. })
  8479. }
  8480. removeEntry(e) {
  8481. const t = this.entries.indexOf(e);
  8482. t >= 0 && this.entries.splice(t, 1)
  8483. }
  8484. clearToLastMarker() {
  8485. const e = this.entries.indexOf(pc);
  8486. e >= 0 ? this.entries.splice(0, e + 1) : this.entries.length = 0
  8487. }
  8488. getElementEntryInScopeWithTagName(e) {
  8489. const t = this.entries.find((t => t.type === uc.Marker || this.treeAdapter.getTagName(t.element) === e));
  8490. return t && t.type === uc.Element ? t : null
  8491. }
  8492. getElementEntry(e) {
  8493. return this.entries.find((t => t.type === uc.Element && t.element === e))
  8494. }
  8495. }
  8496. function dc(e) {
  8497. return {
  8498. nodeName: "#text",
  8499. value: e,
  8500. parentNode: null
  8501. }
  8502. }
  8503. const Ec = {
  8504. createDocument: () => ({
  8505. nodeName: "#document",
  8506. mode: Ro.NO_QUIRKS,
  8507. childNodes: []
  8508. }),
  8509. createDocumentFragment: () => ({
  8510. nodeName: "#document-fragment",
  8511. childNodes: []
  8512. }),
  8513. createElement: (e, t, n) => ({
  8514. nodeName: e,
  8515. tagName: e,
  8516. attrs: n,
  8517. namespaceURI: t,
  8518. childNodes: [],
  8519. parentNode: null
  8520. }),
  8521. createCommentNode: e => ({
  8522. nodeName: "#comment",
  8523. data: e,
  8524. parentNode: null
  8525. }),
  8526. appendChild(e, t) {
  8527. e.childNodes.push(t), t.parentNode = e
  8528. },
  8529. insertBefore(e, t, n) {
  8530. const r = e.childNodes.indexOf(n);
  8531. e.childNodes.splice(r, 0, t), t.parentNode = e
  8532. },
  8533. setTemplateContent(e, t) {
  8534. e.content = t
  8535. },
  8536. getTemplateContent: e => e.content,
  8537. setDocumentType(e, t, n, r) {
  8538. const i = e.childNodes.find((e => "#documentType" === e.nodeName));
  8539. if (i) i.name = t, i.publicId = n, i.systemId = r;
  8540. else {
  8541. const i = {
  8542. nodeName: "#documentType",
  8543. name: t,
  8544. publicId: n,
  8545. systemId: r,
  8546. parentNode: null
  8547. };
  8548. Ec.appendChild(e, i)
  8549. }
  8550. },
  8551. setDocumentMode(e, t) {
  8552. e.mode = t
  8553. },
  8554. getDocumentMode: e => e.mode,
  8555. detachNode(e) {
  8556. if (e.parentNode) {
  8557. const t = e.parentNode.childNodes.indexOf(e);
  8558. e.parentNode.childNodes.splice(t, 1), e.parentNode = null
  8559. }
  8560. },
  8561. insertText(e, t) {
  8562. if (e.childNodes.length > 0) {
  8563. const n = e.childNodes[e.childNodes.length - 1];
  8564. if (Ec.isTextNode(n)) return void(n.value += t)
  8565. }
  8566. Ec.appendChild(e, dc(t))
  8567. },
  8568. insertTextBefore(e, t, n) {
  8569. const r = e.childNodes[e.childNodes.indexOf(n) - 1];
  8570. r && Ec.isTextNode(r) ? r.value += t : Ec.insertBefore(e, dc(t), n)
  8571. },
  8572. adoptAttributes(e, t) {
  8573. const n = new Set(e.attrs.map((e => e.name)));
  8574. for (let r = 0; r < t.length; r++) n.has(t[r].name) || e.attrs.push(t[r])
  8575. },
  8576. getFirstChild: e => e.childNodes[0],
  8577. getChildNodes: e => e.childNodes,
  8578. getParentNode: e => e.parentNode,
  8579. getAttrList: e => e.attrs,
  8580. getTagName: e => e.tagName,
  8581. getNamespaceURI: e => e.namespaceURI,
  8582. getTextNodeContent: e => e.value,
  8583. getCommentNodeContent: e => e.data,
  8584. getDocumentTypeNodeName: e => e.name,
  8585. getDocumentTypeNodePublicId: e => e.publicId,
  8586. getDocumentTypeNodeSystemId: e => e.systemId,
  8587. isTextNode: e => "#text" === e.nodeName,
  8588. isCommentNode: e => "#comment" === e.nodeName,
  8589. isDocumentTypeNode: e => "#documentType" === e.nodeName,
  8590. isElementNode: e => Object.prototype.hasOwnProperty.call(e, "tagName"),
  8591. setNodeSourceCodeLocation(e, t) {
  8592. e.sourceCodeLocation = t
  8593. },
  8594. getNodeSourceCodeLocation: e => e.sourceCodeLocation,
  8595. updateNodeSourceCodeLocation(e, t) {
  8596. e.sourceCodeLocation = {
  8597. ...e.sourceCodeLocation,
  8598. ...t
  8599. }
  8600. }
  8601. },
  8602. mc = ["+//silmaril//dtd html pro v0r11 19970101//", "-//as//dtd html 3.0 aswedit + extensions//", "-//advasoft ltd//dtd html 3.0 aswedit + extensions//", "-//ietf//dtd html 2.0 level 1//", "-//ietf//dtd html 2.0 level 2//", "-//ietf//dtd html 2.0 strict level 1//", "-//ietf//dtd html 2.0 strict level 2//", "-//ietf//dtd html 2.0 strict//", "-//ietf//dtd html 2.0//", "-//ietf//dtd html 2.1e//", "-//ietf//dtd html 3.0//", "-//ietf//dtd html 3.2 final//", "-//ietf//dtd html 3.2//", "-//ietf//dtd html 3//", "-//ietf//dtd html level 0//", "-//ietf//dtd html level 1//", "-//ietf//dtd html level 2//", "-//ietf//dtd html level 3//", "-//ietf//dtd html strict level 0//", "-//ietf//dtd html strict level 1//", "-//ietf//dtd html strict level 2//", "-//ietf//dtd html strict level 3//", "-//ietf//dtd html strict//", "-//ietf//dtd html//", "-//metrius//dtd metrius presentational//", "-//microsoft//dtd internet explorer 2.0 html strict//", "-//microsoft//dtd internet explorer 2.0 html//", "-//microsoft//dtd internet explorer 2.0 tables//", "-//microsoft//dtd internet explorer 3.0 html strict//", "-//microsoft//dtd internet explorer 3.0 html//", "-//microsoft//dtd internet explorer 3.0 tables//", "-//netscape comm. corp.//dtd html//", "-//netscape comm. corp.//dtd strict html//", "-//o'reilly and associates//dtd html 2.0//", "-//o'reilly and associates//dtd html extended 1.0//", "-//o'reilly and associates//dtd html extended relaxed 1.0//", "-//sq//dtd html 2.0 hotmetal + extensions//", "-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//", "-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//", "-//spyglass//dtd html 2.0 extended//", "-//sun microsystems corp.//dtd hotjava html//", "-//sun microsystems corp.//dtd hotjava strict html//", "-//w3c//dtd html 3 1995-03-24//", "-//w3c//dtd html 3.2 draft//", "-//w3c//dtd html 3.2 final//", "-//w3c//dtd html 3.2//", "-//w3c//dtd html 3.2s draft//", "-//w3c//dtd html 4.0 frameset//", "-//w3c//dtd html 4.0 transitional//", "-//w3c//dtd html experimental 19960712//", "-//w3c//dtd html experimental 970421//", "-//w3c//dtd w3 html//", "-//w3o//dtd w3 html 3.0//", "-//webtechs//dtd mozilla html 2.0//", "-//webtechs//dtd mozilla html//"],
  8603. Tc = [...mc, "-//w3c//dtd html 4.01 frameset//", "-//w3c//dtd html 4.01 transitional//"],
  8604. _c = new Set(["-//w3o//dtd w3 html strict 3.0//en//", "-/w3c/dtd html 4.0 transitional/en", "html"]),
  8605. Ac = ["-//w3c//dtd xhtml 1.0 frameset//", "-//w3c//dtd xhtml 1.0 transitional//"],
  8606. gc = [...Ac, "-//w3c//dtd html 4.01 frameset//", "-//w3c//dtd html 4.01 transitional//"];
  8607. function Nc(e, t) {
  8608. return t.some((t => e.startsWith(t)))
  8609. }
  8610. const Cc = "text/html",
  8611. Ic = "application/xhtml+xml",
  8612. Sc = new Map(["attributeName", "attributeType", "baseFrequency", "baseProfile", "calcMode", "clipPathUnits", "diffuseConstant", "edgeMode", "filterUnits", "glyphRef", "gradientTransform", "gradientUnits", "kernelMatrix", "kernelUnitLength", "keyPoints", "keySplines", "keyTimes", "lengthAdjust", "limitingConeAngle", "markerHeight", "markerUnits", "markerWidth", "maskContentUnits", "maskUnits", "numOctaves", "pathLength", "patternContentUnits", "patternTransform", "patternUnits", "pointsAtX", "pointsAtY", "pointsAtZ", "preserveAlpha", "preserveAspectRatio", "primitiveUnits", "refX", "refY", "repeatCount", "repeatDur", "requiredExtensions", "requiredFeatures", "specularConstant", "specularExponent", "spreadMethod", "startOffset", "stdDeviation", "stitchTiles", "surfaceScale", "systemLanguage", "tableValues", "targetX", "targetY", "textLength", "viewBox", "viewTarget", "xChannelSelector", "yChannelSelector", "zoomAndPan"].map((e => [e.toLowerCase(), e]))),
  8613. bc = new Map([
  8614. ["xlink:actuate", {
  8615. prefix: "xlink",
  8616. name: "actuate",
  8617. namespace: vo.XLINK
  8618. }],
  8619. ["xlink:arcrole", {
  8620. prefix: "xlink",
  8621. name: "arcrole",
  8622. namespace: vo.XLINK
  8623. }],
  8624. ["xlink:href", {
  8625. prefix: "xlink",
  8626. name: "href",
  8627. namespace: vo.XLINK
  8628. }],
  8629. ["xlink:role", {
  8630. prefix: "xlink",
  8631. name: "role",
  8632. namespace: vo.XLINK
  8633. }],
  8634. ["xlink:show", {
  8635. prefix: "xlink",
  8636. name: "show",
  8637. namespace: vo.XLINK
  8638. }],
  8639. ["xlink:title", {
  8640. prefix: "xlink",
  8641. name: "title",
  8642. namespace: vo.XLINK
  8643. }],
  8644. ["xlink:type", {
  8645. prefix: "xlink",
  8646. name: "type",
  8647. namespace: vo.XLINK
  8648. }],
  8649. ["xml:base", {
  8650. prefix: "xml",
  8651. name: "base",
  8652. namespace: vo.XML
  8653. }],
  8654. ["xml:lang", {
  8655. prefix: "xml",
  8656. name: "lang",
  8657. namespace: vo.XML
  8658. }],
  8659. ["xml:space", {
  8660. prefix: "xml",
  8661. name: "space",
  8662. namespace: vo.XML
  8663. }],
  8664. ["xmlns", {
  8665. prefix: "",
  8666. name: "xmlns",
  8667. namespace: vo.XMLNS
  8668. }],
  8669. ["xmlns:xlink", {
  8670. prefix: "xmlns",
  8671. name: "xlink",
  8672. namespace: vo.XMLNS
  8673. }]
  8674. ]),
  8675. Oc = new Map(["altGlyph", "altGlyphDef", "altGlyphItem", "animateColor", "animateMotion", "animateTransform", "clipPath", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence", "foreignObject", "glyphRef", "linearGradient", "radialGradient", "textPath"].map((e => [e.toLowerCase(), e]))),
  8676. yc = new Set([Po.B, Po.BIG, Po.BLOCKQUOTE, Po.BODY, Po.BR, Po.CENTER, Po.CODE, Po.DD, Po.DIV, Po.DL, Po.DT, Po.EM, Po.EMBED, Po.H1, Po.H2, Po.H3, Po.H4, Po.H5, Po.H6, Po.HEAD, Po.HR, Po.I, Po.IMG, Po.LI, Po.LISTING, Po.MENU, Po.META, Po.NOBR, Po.OL, Po.P, Po.PRE, Po.RUBY, Po.S, Po.SMALL, Po.SPAN, Po.STRONG, Po.STRIKE, Po.SUB, Po.SUP, Po.TABLE, Po.TT, Po.U, Po.UL, Po.VAR]);
  8677. function Lc(e) {
  8678. for (let t = 0; t < e.attrs.length; t++)
  8679. if ("definitionurl" === e.attrs[t].name) {
  8680. e.attrs[t].name = "definitionURL";
  8681. break
  8682. }
  8683. }
  8684. function kc(e) {
  8685. for (let t = 0; t < e.attrs.length; t++) {
  8686. const n = Sc.get(e.attrs[t].name);
  8687. null != n && (e.attrs[t].name = n)
  8688. }
  8689. }
  8690. function vc(e) {
  8691. for (let t = 0; t < e.attrs.length; t++) {
  8692. const n = bc.get(e.attrs[t].name);
  8693. n && (e.attrs[t].prefix = n.prefix, e.attrs[t].name = n.name, e.attrs[t].namespace = n.namespace)
  8694. }
  8695. }
  8696. function Dc(e, t, n, r) {
  8697. return (!r || r === vo.HTML) && function(e, t, n) {
  8698. if (t === vo.MATHML && e === Po.ANNOTATION_XML)
  8699. for (let e = 0; e < n.length; e++)
  8700. if (n[e].name === Do.ENCODING) {
  8701. const t = n[e].value.toLowerCase();
  8702. return t === Cc || t === Ic
  8703. } return t === vo.SVG && (e === Po.FOREIGN_OBJECT || e === Po.DESC || e === Po.TITLE)
  8704. }(e, t, n) || (!r || r === vo.MATHML) && function(e, t) {
  8705. return t === vo.MATHML && (e === Po.MI || e === Po.MO || e === Po.MN || e === Po.MS || e === Po.MTEXT)
  8706. }(e, t)
  8707. }
  8708. var Rc;
  8709. ! function(e) {
  8710. e[e.INITIAL = 0] = "INITIAL", e[e.BEFORE_HTML = 1] = "BEFORE_HTML", e[e.BEFORE_HEAD = 2] = "BEFORE_HEAD", e[e.IN_HEAD = 3] = "IN_HEAD", e[e.IN_HEAD_NO_SCRIPT = 4] = "IN_HEAD_NO_SCRIPT", e[e.AFTER_HEAD = 5] = "AFTER_HEAD", e[e.IN_BODY = 6] = "IN_BODY", e[e.TEXT = 7] = "TEXT", e[e.IN_TABLE = 8] = "IN_TABLE", e[e.IN_TABLE_TEXT = 9] = "IN_TABLE_TEXT", e[e.IN_CAPTION = 10] = "IN_CAPTION", e[e.IN_COLUMN_GROUP = 11] = "IN_COLUMN_GROUP", e[e.IN_TABLE_BODY = 12] = "IN_TABLE_BODY", e[e.IN_ROW = 13] = "IN_ROW", e[e.IN_CELL = 14] = "IN_CELL", e[e.IN_SELECT = 15] = "IN_SELECT", e[e.IN_SELECT_IN_TABLE = 16] = "IN_SELECT_IN_TABLE", e[e.IN_TEMPLATE = 17] = "IN_TEMPLATE", e[e.AFTER_BODY = 18] = "AFTER_BODY", e[e.IN_FRAMESET = 19] = "IN_FRAMESET", e[e.AFTER_FRAMESET = 20] = "AFTER_FRAMESET", e[e.AFTER_AFTER_BODY = 21] = "AFTER_AFTER_BODY", e[e.AFTER_AFTER_FRAMESET = 22] = "AFTER_AFTER_FRAMESET"
  8711. }(Rc || (Rc = {}));
  8712. const Mc = {
  8713. startLine: -1,
  8714. startCol: -1,
  8715. startOffset: -1,
  8716. endLine: -1,
  8717. endCol: -1,
  8718. endOffset: -1
  8719. },
  8720. Pc = new Set([Po.TABLE, Po.TBODY, Po.TFOOT, Po.THEAD, Po.TR]),
  8721. xc = {
  8722. scriptingEnabled: !0,
  8723. sourceCodeLocationInfo: !1,
  8724. treeAdapter: Ec,
  8725. onParseError: null
  8726. };
  8727. class wc {
  8728. constructor(e, t, n = null, r = null) {
  8729. this.fragmentContext = n, this.scriptHandler = r, this.currentToken = null, this.stopped = !1, this.insertionMode = Rc.INITIAL, this.originalInsertionMode = Rc.INITIAL, this.headElement = null, this.formElement = null, this.currentNotInHTML = !1, this.tmplInsertionModeStack = [], this.pendingCharacterTokens = [], this.hasNonWhitespacePendingCharacterToken = !1, this.framesetOk = !0, this.skipNextNewLine = !1, this.fosterParentingEnabled = !1, this.options = {
  8730. ...xc,
  8731. ...e
  8732. }, this.treeAdapter = this.options.treeAdapter, this.onParseError = this.options.onParseError, this.onParseError && (this.options.sourceCodeLocationInfo = !0), this.document = null != t ? t : this.treeAdapter.createDocument(), this.tokenizer = new tc(this.options, this), this.activeFormattingElements = new fc(this.treeAdapter), this.fragmentContextID = n ? Fo(this.treeAdapter.getTagName(n)) : Po.UNKNOWN, this._setContextModes(null != n ? n : this.document, this.fragmentContextID), this.openElements = new hc(this.document, this.treeAdapter, this)
  8733. }
  8734. static parse(e, t) {
  8735. const n = new this(t);
  8736. return n.tokenizer.write(e, !0), n.document
  8737. }
  8738. static getFragmentParser(e, t) {
  8739. const n = {
  8740. ...xc,
  8741. ...t
  8742. };
  8743. null != e || (e = n.treeAdapter.createElement(Mo.TEMPLATE, vo.HTML, []));
  8744. const r = n.treeAdapter.createElement("documentmock", vo.HTML, []),
  8745. i = new this(n, r, e);
  8746. return i.fragmentContextID === Po.TEMPLATE && i.tmplInsertionModeStack.unshift(Rc.IN_TEMPLATE), i._initTokenizerForFragmentParsing(), i._insertFakeRootElement(), i._resetInsertionMode(), i._findFormInFragmentContext(), i
  8747. }
  8748. getFragment() {
  8749. const e = this.treeAdapter.getFirstChild(this.document),
  8750. t = this.treeAdapter.createDocumentFragment();
  8751. return this._adoptNodes(e, t), t
  8752. }
  8753. _err(e, t, n) {
  8754. var r;
  8755. if (!this.onParseError) return;
  8756. const i = null !== (r = e.location) && void 0 !== r ? r : Mc,
  8757. s = {
  8758. code: t,
  8759. startLine: i.startLine,
  8760. startCol: i.startCol,
  8761. startOffset: i.startOffset,
  8762. endLine: n ? i.startLine : i.endLine,
  8763. endCol: n ? i.startCol : i.endCol,
  8764. endOffset: n ? i.startOffset : i.endOffset
  8765. };
  8766. this.onParseError(s)
  8767. }
  8768. onItemPush(e, t, n) {
  8769. var r, i;
  8770. null === (i = (r = this.treeAdapter).onItemPush) || void 0 === i || i.call(r, e), n && this.openElements.stackTop > 0 && this._setContextModes(e, t)
  8771. }
  8772. onItemPop(e, t) {
  8773. var n, r;
  8774. if (this.options.sourceCodeLocationInfo && this._setEndLocation(e, this.currentToken), null === (r = (n = this.treeAdapter).onItemPop) || void 0 === r || r.call(n, e, this.openElements.current), t) {
  8775. let e, t;
  8776. 0 === this.openElements.stackTop && this.fragmentContext ? (e = this.fragmentContext, t = this.fragmentContextID) : ({
  8777. current: e,
  8778. currentTagId: t
  8779. } = this.openElements), this._setContextModes(e, t)
  8780. }
  8781. }
  8782. _setContextModes(e, t) {
  8783. const n = e === this.document || this.treeAdapter.getNamespaceURI(e) === vo.HTML;
  8784. this.currentNotInHTML = !n, this.tokenizer.inForeignNode = !n && !this._isIntegrationPoint(t, e)
  8785. }
  8786. _switchToTextParsing(e, t) {
  8787. this._insertElement(e, vo.HTML), this.tokenizer.state = t, this.originalInsertionMode = this.insertionMode, this.insertionMode = Rc.TEXT
  8788. }
  8789. switchToPlaintextParsing() {
  8790. this.insertionMode = Rc.TEXT, this.originalInsertionMode = Rc.IN_BODY, this.tokenizer.state = jo.PLAINTEXT
  8791. }
  8792. _getAdjustedCurrentElement() {
  8793. return 0 === this.openElements.stackTop && this.fragmentContext ? this.fragmentContext : this.openElements.current
  8794. }
  8795. _findFormInFragmentContext() {
  8796. let e = this.fragmentContext;
  8797. for (; e;) {
  8798. if (this.treeAdapter.getTagName(e) === Mo.FORM) {
  8799. this.formElement = e;
  8800. break
  8801. }
  8802. e = this.treeAdapter.getParentNode(e)
  8803. }
  8804. }
  8805. _initTokenizerForFragmentParsing() {
  8806. if (this.fragmentContext && this.treeAdapter.getNamespaceURI(this.fragmentContext) === vo.HTML) switch (this.fragmentContextID) {
  8807. case Po.TITLE:
  8808. case Po.TEXTAREA:
  8809. this.tokenizer.state = jo.RCDATA;
  8810. break;
  8811. case Po.STYLE:
  8812. case Po.XMP:
  8813. case Po.IFRAME:
  8814. case Po.NOEMBED:
  8815. case Po.NOFRAMES:
  8816. case Po.NOSCRIPT:
  8817. this.tokenizer.state = jo.RAWTEXT;
  8818. break;
  8819. case Po.SCRIPT:
  8820. this.tokenizer.state = jo.SCRIPT_DATA;
  8821. break;
  8822. case Po.PLAINTEXT:
  8823. this.tokenizer.state = jo.PLAINTEXT
  8824. }
  8825. }
  8826. _setDocumentType(e) {
  8827. const t = e.name || "",
  8828. n = e.publicId || "",
  8829. r = e.systemId || "";
  8830. if (this.treeAdapter.setDocumentType(this.document, t, n, r), e.location) {
  8831. const t = this.treeAdapter.getChildNodes(this.document).find((e => this.treeAdapter.isDocumentTypeNode(e)));
  8832. t && this.treeAdapter.setNodeSourceCodeLocation(t, e.location)
  8833. }
  8834. }
  8835. _attachElementToTree(e, t) {
  8836. if (this.options.sourceCodeLocationInfo) {
  8837. const n = t && {
  8838. ...t,
  8839. startTag: t
  8840. };
  8841. this.treeAdapter.setNodeSourceCodeLocation(e, n)
  8842. }
  8843. if (this._shouldFosterParentOnInsertion()) this._fosterParentElement(e);
  8844. else {
  8845. const t = this.openElements.currentTmplContentOrNode;
  8846. this.treeAdapter.appendChild(t, e)
  8847. }
  8848. }
  8849. _appendElement(e, t) {
  8850. const n = this.treeAdapter.createElement(e.tagName, t, e.attrs);
  8851. this._attachElementToTree(n, e.location)
  8852. }
  8853. _insertElement(e, t) {
  8854. const n = this.treeAdapter.createElement(e.tagName, t, e.attrs);
  8855. this._attachElementToTree(n, e.location), this.openElements.push(n, e.tagID)
  8856. }
  8857. _insertFakeElement(e, t) {
  8858. const n = this.treeAdapter.createElement(e, vo.HTML, []);
  8859. this._attachElementToTree(n, null), this.openElements.push(n, t)
  8860. }
  8861. _insertTemplate(e) {
  8862. const t = this.treeAdapter.createElement(e.tagName, vo.HTML, e.attrs),
  8863. n = this.treeAdapter.createDocumentFragment();
  8864. this.treeAdapter.setTemplateContent(t, n), this._attachElementToTree(t, e.location), this.openElements.push(t, e.tagID), this.options.sourceCodeLocationInfo && this.treeAdapter.setNodeSourceCodeLocation(n, null)
  8865. }
  8866. _insertFakeRootElement() {
  8867. const e = this.treeAdapter.createElement(Mo.HTML, vo.HTML, []);
  8868. this.options.sourceCodeLocationInfo && this.treeAdapter.setNodeSourceCodeLocation(e, null), this.treeAdapter.appendChild(this.openElements.current, e), this.openElements.push(e, Po.HTML)
  8869. }
  8870. _appendCommentNode(e, t) {
  8871. const n = this.treeAdapter.createCommentNode(e.data);
  8872. this.treeAdapter.appendChild(t, n), this.options.sourceCodeLocationInfo && this.treeAdapter.setNodeSourceCodeLocation(n, e.location)
  8873. }
  8874. _insertCharacters(e) {
  8875. let t, n;
  8876. if (this._shouldFosterParentOnInsertion() ? (({
  8877. parent: t,
  8878. beforeElement: n
  8879. } = this._findFosterParentingLocation()), n ? this.treeAdapter.insertTextBefore(t, e.chars, n) : this.treeAdapter.insertText(t, e.chars)) : (t = this.openElements.currentTmplContentOrNode, this.treeAdapter.insertText(t, e.chars)), !e.location) return;
  8880. const r = this.treeAdapter.getChildNodes(t),
  8881. i = n ? r.lastIndexOf(n) : r.length,
  8882. s = r[i - 1];
  8883. if (this.treeAdapter.getNodeSourceCodeLocation(s)) {
  8884. const {
  8885. endLine: t,
  8886. endCol: n,
  8887. endOffset: r
  8888. } = e.location;
  8889. this.treeAdapter.updateNodeSourceCodeLocation(s, {
  8890. endLine: t,
  8891. endCol: n,
  8892. endOffset: r
  8893. })
  8894. } else this.options.sourceCodeLocationInfo && this.treeAdapter.setNodeSourceCodeLocation(s, e.location)
  8895. }
  8896. _adoptNodes(e, t) {
  8897. for (let n = this.treeAdapter.getFirstChild(e); n; n = this.treeAdapter.getFirstChild(e)) this.treeAdapter.detachNode(n), this.treeAdapter.appendChild(t, n)
  8898. }
  8899. _setEndLocation(e, t) {
  8900. if (this.treeAdapter.getNodeSourceCodeLocation(e) && t.location) {
  8901. const n = t.location,
  8902. r = this.treeAdapter.getTagName(e),
  8903. i = t.type === To.END_TAG && r === t.tagName ? {
  8904. endTag: {
  8905. ...n
  8906. },
  8907. endLine: n.endLine,
  8908. endCol: n.endCol,
  8909. endOffset: n.endOffset
  8910. } : {
  8911. endLine: n.startLine,
  8912. endCol: n.startCol,
  8913. endOffset: n.startOffset
  8914. };
  8915. this.treeAdapter.updateNodeSourceCodeLocation(e, i)
  8916. }
  8917. }
  8918. shouldProcessStartTagTokenInForeignContent(e) {
  8919. if (!this.currentNotInHTML) return !1;
  8920. let t, n;
  8921. return 0 === this.openElements.stackTop && this.fragmentContext ? (t = this.fragmentContext, n = this.fragmentContextID) : ({
  8922. current: t,
  8923. currentTagId: n
  8924. } = this.openElements), (e.tagID !== Po.SVG || this.treeAdapter.getTagName(t) !== Mo.ANNOTATION_XML || this.treeAdapter.getNamespaceURI(t) !== vo.MATHML) && (this.tokenizer.inForeignNode || (e.tagID === Po.MGLYPH || e.tagID === Po.MALIGNMARK) && !this._isIntegrationPoint(n, t, vo.HTML))
  8925. }
  8926. _processToken(e) {
  8927. switch (e.type) {
  8928. case To.CHARACTER:
  8929. this.onCharacter(e);
  8930. break;
  8931. case To.NULL_CHARACTER:
  8932. this.onNullCharacter(e);
  8933. break;
  8934. case To.COMMENT:
  8935. this.onComment(e);
  8936. break;
  8937. case To.DOCTYPE:
  8938. this.onDoctype(e);
  8939. break;
  8940. case To.START_TAG:
  8941. this._processStartTag(e);
  8942. break;
  8943. case To.END_TAG:
  8944. this.onEndTag(e);
  8945. break;
  8946. case To.EOF:
  8947. this.onEof(e);
  8948. break;
  8949. case To.WHITESPACE_CHARACTER:
  8950. this.onWhitespaceCharacter(e)
  8951. }
  8952. }
  8953. _isIntegrationPoint(e, t, n) {
  8954. return Dc(e, this.treeAdapter.getNamespaceURI(t), this.treeAdapter.getAttrList(t), n)
  8955. }
  8956. _reconstructActiveFormattingElements() {
  8957. const e = this.activeFormattingElements.entries.length;
  8958. if (e) {
  8959. const t = this.activeFormattingElements.entries.findIndex((e => e.type === uc.Marker || this.openElements.contains(e.element)));
  8960. for (let n = t < 0 ? e - 1 : t - 1; n >= 0; n--) {
  8961. const e = this.activeFormattingElements.entries[n];
  8962. this._insertElement(e.token, this.treeAdapter.getNamespaceURI(e.element)), e.element = this.openElements.current
  8963. }
  8964. }
  8965. }
  8966. _closeTableCell() {
  8967. this.openElements.generateImpliedEndTags(), this.openElements.popUntilTableCellPopped(), this.activeFormattingElements.clearToLastMarker(), this.insertionMode = Rc.IN_ROW
  8968. }
  8969. _closePElement() {
  8970. this.openElements.generateImpliedEndTagsWithExclusion(Po.P), this.openElements.popUntilTagNamePopped(Po.P)
  8971. }
  8972. _resetInsertionMode() {
  8973. for (let e = this.openElements.stackTop; e >= 0; e--) switch (0 === e && this.fragmentContext ? this.fragmentContextID : this.openElements.tagIDs[e]) {
  8974. case Po.TR:
  8975. return void(this.insertionMode = Rc.IN_ROW);
  8976. case Po.TBODY:
  8977. case Po.THEAD:
  8978. case Po.TFOOT:
  8979. return void(this.insertionMode = Rc.IN_TABLE_BODY);
  8980. case Po.CAPTION:
  8981. return void(this.insertionMode = Rc.IN_CAPTION);
  8982. case Po.COLGROUP:
  8983. return void(this.insertionMode = Rc.IN_COLUMN_GROUP);
  8984. case Po.TABLE:
  8985. return void(this.insertionMode = Rc.IN_TABLE);
  8986. case Po.BODY:
  8987. return void(this.insertionMode = Rc.IN_BODY);
  8988. case Po.FRAMESET:
  8989. return void(this.insertionMode = Rc.IN_FRAMESET);
  8990. case Po.SELECT:
  8991. return void this._resetInsertionModeForSelect(e);
  8992. case Po.TEMPLATE:
  8993. return void(this.insertionMode = this.tmplInsertionModeStack[0]);
  8994. case Po.HTML:
  8995. return void(this.insertionMode = this.headElement ? Rc.AFTER_HEAD : Rc.BEFORE_HEAD);
  8996. case Po.TD:
  8997. case Po.TH:
  8998. if (e > 0) return void(this.insertionMode = Rc.IN_CELL);
  8999. break;
  9000. case Po.HEAD:
  9001. if (e > 0) return void(this.insertionMode = Rc.IN_HEAD)
  9002. }
  9003. this.insertionMode = Rc.IN_BODY
  9004. }
  9005. _resetInsertionModeForSelect(e) {
  9006. if (e > 0)
  9007. for (let t = e - 1; t > 0; t--) {
  9008. const e = this.openElements.tagIDs[t];
  9009. if (e === Po.TEMPLATE) break;
  9010. if (e === Po.TABLE) return void(this.insertionMode = Rc.IN_SELECT_IN_TABLE)
  9011. }
  9012. this.insertionMode = Rc.IN_SELECT
  9013. }
  9014. _isElementCausesFosterParenting(e) {
  9015. return Pc.has(e)
  9016. }
  9017. _shouldFosterParentOnInsertion() {
  9018. return this.fosterParentingEnabled && this._isElementCausesFosterParenting(this.openElements.currentTagId)
  9019. }
  9020. _findFosterParentingLocation() {
  9021. for (let e = this.openElements.stackTop; e >= 0; e--) {
  9022. const t = this.openElements.items[e];
  9023. switch (this.openElements.tagIDs[e]) {
  9024. case Po.TEMPLATE:
  9025. if (this.treeAdapter.getNamespaceURI(t) === vo.HTML) return {
  9026. parent: this.treeAdapter.getTemplateContent(t),
  9027. beforeElement: null
  9028. };
  9029. break;
  9030. case Po.TABLE: {
  9031. const n = this.treeAdapter.getParentNode(t);
  9032. return n ? {
  9033. parent: n,
  9034. beforeElement: t
  9035. } : {
  9036. parent: this.openElements.items[e - 1],
  9037. beforeElement: null
  9038. }
  9039. }
  9040. }
  9041. }
  9042. return {
  9043. parent: this.openElements.items[0],
  9044. beforeElement: null
  9045. }
  9046. }
  9047. _fosterParentElement(e) {
  9048. const t = this._findFosterParentingLocation();
  9049. t.beforeElement ? this.treeAdapter.insertBefore(t.parent, e, t.beforeElement) : this.treeAdapter.appendChild(t.parent, e)
  9050. }
  9051. _isSpecialElement(e, t) {
  9052. const n = this.treeAdapter.getNamespaceURI(e);
  9053. return Ho[n].has(t)
  9054. }
  9055. onCharacter(e) {
  9056. if (this.skipNextNewLine = !1, this.tokenizer.inForeignNode) ! function(e, t) {
  9057. e._insertCharacters(t), e.framesetOk = !1
  9058. }(this, e);
  9059. else switch (this.insertionMode) {
  9060. case Rc.INITIAL:
  9061. Vc(this, e);
  9062. break;
  9063. case Rc.BEFORE_HTML:
  9064. Wc(this, e);
  9065. break;
  9066. case Rc.BEFORE_HEAD:
  9067. Qc(this, e);
  9068. break;
  9069. case Rc.IN_HEAD:
  9070. zc(this, e);
  9071. break;
  9072. case Rc.IN_HEAD_NO_SCRIPT:
  9073. Jc(this, e);
  9074. break;
  9075. case Rc.AFTER_HEAD:
  9076. Zc(this, e);
  9077. break;
  9078. case Rc.IN_BODY:
  9079. case Rc.IN_CAPTION:
  9080. case Rc.IN_CELL:
  9081. case Rc.IN_TEMPLATE:
  9082. nl(this, e);
  9083. break;
  9084. case Rc.TEXT:
  9085. case Rc.IN_SELECT:
  9086. case Rc.IN_SELECT_IN_TABLE:
  9087. this._insertCharacters(e);
  9088. break;
  9089. case Rc.IN_TABLE:
  9090. case Rc.IN_TABLE_BODY:
  9091. case Rc.IN_ROW:
  9092. ul(this, e);
  9093. break;
  9094. case Rc.IN_TABLE_TEXT:
  9095. ml(this, e);
  9096. break;
  9097. case Rc.IN_COLUMN_GROUP:
  9098. gl(this, e);
  9099. break;
  9100. case Rc.AFTER_BODY:
  9101. kl(this, e);
  9102. break;
  9103. case Rc.AFTER_AFTER_BODY:
  9104. vl(this, e)
  9105. }
  9106. }
  9107. onNullCharacter(e) {
  9108. if (this.skipNextNewLine = !1, this.tokenizer.inForeignNode) ! function(e, t) {
  9109. t.chars = "�", e._insertCharacters(t)
  9110. }(this, e);
  9111. else switch (this.insertionMode) {
  9112. case Rc.INITIAL:
  9113. Vc(this, e);
  9114. break;
  9115. case Rc.BEFORE_HTML:
  9116. Wc(this, e);
  9117. break;
  9118. case Rc.BEFORE_HEAD:
  9119. Qc(this, e);
  9120. break;
  9121. case Rc.IN_HEAD:
  9122. zc(this, e);
  9123. break;
  9124. case Rc.IN_HEAD_NO_SCRIPT:
  9125. Jc(this, e);
  9126. break;
  9127. case Rc.AFTER_HEAD:
  9128. Zc(this, e);
  9129. break;
  9130. case Rc.TEXT:
  9131. this._insertCharacters(e);
  9132. break;
  9133. case Rc.IN_TABLE:
  9134. case Rc.IN_TABLE_BODY:
  9135. case Rc.IN_ROW:
  9136. ul(this, e);
  9137. break;
  9138. case Rc.IN_COLUMN_GROUP:
  9139. gl(this, e);
  9140. break;
  9141. case Rc.AFTER_BODY:
  9142. kl(this, e);
  9143. break;
  9144. case Rc.AFTER_AFTER_BODY:
  9145. vl(this, e)
  9146. }
  9147. }
  9148. onComment(e) {
  9149. if (this.skipNextNewLine = !1, this.currentNotInHTML) Kc(this, e);
  9150. else switch (this.insertionMode) {
  9151. case Rc.INITIAL:
  9152. case Rc.BEFORE_HTML:
  9153. case Rc.BEFORE_HEAD:
  9154. case Rc.IN_HEAD:
  9155. case Rc.IN_HEAD_NO_SCRIPT:
  9156. case Rc.AFTER_HEAD:
  9157. case Rc.IN_BODY:
  9158. case Rc.IN_TABLE:
  9159. case Rc.IN_CAPTION:
  9160. case Rc.IN_COLUMN_GROUP:
  9161. case Rc.IN_TABLE_BODY:
  9162. case Rc.IN_ROW:
  9163. case Rc.IN_CELL:
  9164. case Rc.IN_SELECT:
  9165. case Rc.IN_SELECT_IN_TABLE:
  9166. case Rc.IN_TEMPLATE:
  9167. case Rc.IN_FRAMESET:
  9168. case Rc.AFTER_FRAMESET:
  9169. Kc(this, e);
  9170. break;
  9171. case Rc.IN_TABLE_TEXT:
  9172. Tl(this, e);
  9173. break;
  9174. case Rc.AFTER_BODY:
  9175. ! function(e, t) {
  9176. e._appendCommentNode(t, e.openElements.items[0])
  9177. }(this, e);
  9178. break;
  9179. case Rc.AFTER_AFTER_BODY:
  9180. case Rc.AFTER_AFTER_FRAMESET:
  9181. ! function(e, t) {
  9182. e._appendCommentNode(t, e.document)
  9183. }(this, e)
  9184. }
  9185. }
  9186. onDoctype(e) {
  9187. switch (this.skipNextNewLine = !1, this.insertionMode) {
  9188. case Rc.INITIAL:
  9189. ! function(e, t) {
  9190. e._setDocumentType(t);
  9191. const n = t.forceQuirks ? Ro.QUIRKS : function(e) {
  9192. if ("html" !== e.name) return Ro.QUIRKS;
  9193. const {
  9194. systemId: t
  9195. } = e;
  9196. if (t && "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd" === t.toLowerCase()) return Ro.QUIRKS;
  9197. let {
  9198. publicId: n
  9199. } = e;
  9200. if (null !== n) {
  9201. if (n = n.toLowerCase(), _c.has(n)) return Ro.QUIRKS;
  9202. let e = null === t ? Tc : mc;
  9203. if (Nc(n, e)) return Ro.QUIRKS;
  9204. if (e = null === t ? Ac : gc, Nc(n, e)) return Ro.LIMITED_QUIRKS
  9205. }
  9206. return Ro.NO_QUIRKS
  9207. }(t);
  9208. (function(e) {
  9209. return "html" === e.name && null === e.publicId && (null === e.systemId || "about:legacy-compat" === e.systemId)
  9210. })(t) || e._err(t, Eo.nonConformingDoctype);
  9211. e.treeAdapter.setDocumentMode(e.document, n), e.insertionMode = Rc.BEFORE_HTML
  9212. }(this, e);
  9213. break;
  9214. case Rc.BEFORE_HEAD:
  9215. case Rc.IN_HEAD:
  9216. case Rc.IN_HEAD_NO_SCRIPT:
  9217. case Rc.AFTER_HEAD:
  9218. this._err(e, Eo.misplacedDoctype);
  9219. break;
  9220. case Rc.IN_TABLE_TEXT:
  9221. Tl(this, e)
  9222. }
  9223. }
  9224. onStartTag(e) {
  9225. this.skipNextNewLine = !1, this.currentToken = e, this._processStartTag(e), e.selfClosing && !e.ackSelfClosing && this._err(e, Eo.nonVoidHtmlElementStartTagWithTrailingSolidus)
  9226. }
  9227. _processStartTag(e) {
  9228. this.shouldProcessStartTagTokenInForeignContent(e) ? function(e, t) {
  9229. if (function(e) {
  9230. const t = e.tagID;
  9231. return t === Po.FONT && e.attrs.some((({
  9232. name: e
  9233. }) => e === Do.COLOR || e === Do.SIZE || e === Do.FACE)) || yc.has(t)
  9234. }(t)) Dl(e), e._startTagOutsideForeignContent(t);
  9235. else {
  9236. const n = e._getAdjustedCurrentElement(),
  9237. r = e.treeAdapter.getNamespaceURI(n);
  9238. r === vo.MATHML ? Lc(t) : r === vo.SVG && (! function(e) {
  9239. const t = Oc.get(e.tagName);
  9240. null != t && (e.tagName = t, e.tagID = Fo(e.tagName))
  9241. }(t), kc(t)), vc(t), t.selfClosing ? e._appendElement(t, r) : e._insertElement(t, r), t.ackSelfClosing = !0
  9242. }
  9243. }(this, e) : this._startTagOutsideForeignContent(e)
  9244. }
  9245. _startTagOutsideForeignContent(e) {
  9246. switch (this.insertionMode) {
  9247. case Rc.INITIAL:
  9248. Vc(this, e);
  9249. break;
  9250. case Rc.BEFORE_HTML:
  9251. ! function(e, t) {
  9252. t.tagID === Po.HTML ? (e._insertElement(t, vo.HTML), e.insertionMode = Rc.BEFORE_HEAD) : Wc(e, t)
  9253. }(this, e);
  9254. break;
  9255. case Rc.BEFORE_HEAD:
  9256. ! function(e, t) {
  9257. switch (t.tagID) {
  9258. case Po.HTML:
  9259. ol(e, t);
  9260. break;
  9261. case Po.HEAD:
  9262. e._insertElement(t, vo.HTML), e.headElement = e.openElements.current, e.insertionMode = Rc.IN_HEAD;
  9263. break;
  9264. default:
  9265. Qc(e, t)
  9266. }
  9267. }(this, e);
  9268. break;
  9269. case Rc.IN_HEAD:
  9270. Xc(this, e);
  9271. break;
  9272. case Rc.IN_HEAD_NO_SCRIPT:
  9273. ! function(e, t) {
  9274. switch (t.tagID) {
  9275. case Po.HTML:
  9276. ol(e, t);
  9277. break;
  9278. case Po.BASEFONT:
  9279. case Po.BGSOUND:
  9280. case Po.HEAD:
  9281. case Po.LINK:
  9282. case Po.META:
  9283. case Po.NOFRAMES:
  9284. case Po.STYLE:
  9285. Xc(e, t);
  9286. break;
  9287. case Po.NOSCRIPT:
  9288. e._err(t, Eo.nestedNoscriptInHead);
  9289. break;
  9290. default:
  9291. Jc(e, t)
  9292. }
  9293. }(this, e);
  9294. break;
  9295. case Rc.AFTER_HEAD:
  9296. ! function(e, t) {
  9297. switch (t.tagID) {
  9298. case Po.HTML:
  9299. ol(e, t);
  9300. break;
  9301. case Po.BODY:
  9302. e._insertElement(t, vo.HTML), e.framesetOk = !1, e.insertionMode = Rc.IN_BODY;
  9303. break;
  9304. case Po.FRAMESET:
  9305. e._insertElement(t, vo.HTML), e.insertionMode = Rc.IN_FRAMESET;
  9306. break;
  9307. case Po.BASE:
  9308. case Po.BASEFONT:
  9309. case Po.BGSOUND:
  9310. case Po.LINK:
  9311. case Po.META:
  9312. case Po.NOFRAMES:
  9313. case Po.SCRIPT:
  9314. case Po.STYLE:
  9315. case Po.TEMPLATE:
  9316. case Po.TITLE:
  9317. e._err(t, Eo.abandonedHeadElementChild), e.openElements.push(e.headElement, Po.HEAD), Xc(e, t), e.openElements.remove(e.headElement);
  9318. break;
  9319. case Po.HEAD:
  9320. e._err(t, Eo.misplacedStartTagForHeadElement);
  9321. break;
  9322. default:
  9323. Zc(e, t)
  9324. }
  9325. }(this, e);
  9326. break;
  9327. case Rc.IN_BODY:
  9328. ol(this, e);
  9329. break;
  9330. case Rc.IN_TABLE:
  9331. pl(this, e);
  9332. break;
  9333. case Rc.IN_TABLE_TEXT:
  9334. Tl(this, e);
  9335. break;
  9336. case Rc.IN_CAPTION:
  9337. ! function(e, t) {
  9338. const n = t.tagID;
  9339. _l.has(n) ? e.openElements.hasInTableScope(Po.CAPTION) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(Po.CAPTION), e.activeFormattingElements.clearToLastMarker(), e.insertionMode = Rc.IN_TABLE, pl(e, t)) : ol(e, t)
  9340. }(this, e);
  9341. break;
  9342. case Rc.IN_COLUMN_GROUP:
  9343. Al(this, e);
  9344. break;
  9345. case Rc.IN_TABLE_BODY:
  9346. Nl(this, e);
  9347. break;
  9348. case Rc.IN_ROW:
  9349. Il(this, e);
  9350. break;
  9351. case Rc.IN_CELL:
  9352. ! function(e, t) {
  9353. const n = t.tagID;
  9354. _l.has(n) ? (e.openElements.hasInTableScope(Po.TD) || e.openElements.hasInTableScope(Po.TH)) && (e._closeTableCell(), Il(e, t)) : ol(e, t)
  9355. }(this, e);
  9356. break;
  9357. case Rc.IN_SELECT:
  9358. bl(this, e);
  9359. break;
  9360. case Rc.IN_SELECT_IN_TABLE:
  9361. ! function(e, t) {
  9362. const n = t.tagID;
  9363. n === Po.CAPTION || n === Po.TABLE || n === Po.TBODY || n === Po.TFOOT || n === Po.THEAD || n === Po.TR || n === Po.TD || n === Po.TH ? (e.openElements.popUntilTagNamePopped(Po.SELECT), e._resetInsertionMode(), e._processStartTag(t)) : bl(e, t)
  9364. }(this, e);
  9365. break;
  9366. case Rc.IN_TEMPLATE:
  9367. ! function(e, t) {
  9368. switch (t.tagID) {
  9369. case Po.BASE:
  9370. case Po.BASEFONT:
  9371. case Po.BGSOUND:
  9372. case Po.LINK:
  9373. case Po.META:
  9374. case Po.NOFRAMES:
  9375. case Po.SCRIPT:
  9376. case Po.STYLE:
  9377. case Po.TEMPLATE:
  9378. case Po.TITLE:
  9379. Xc(e, t);
  9380. break;
  9381. case Po.CAPTION:
  9382. case Po.COLGROUP:
  9383. case Po.TBODY:
  9384. case Po.TFOOT:
  9385. case Po.THEAD:
  9386. e.tmplInsertionModeStack[0] = Rc.IN_TABLE, e.insertionMode = Rc.IN_TABLE, pl(e, t);
  9387. break;
  9388. case Po.COL:
  9389. e.tmplInsertionModeStack[0] = Rc.IN_COLUMN_GROUP, e.insertionMode = Rc.IN_COLUMN_GROUP, Al(e, t);
  9390. break;
  9391. case Po.TR:
  9392. e.tmplInsertionModeStack[0] = Rc.IN_TABLE_BODY, e.insertionMode = Rc.IN_TABLE_BODY, Nl(e, t);
  9393. break;
  9394. case Po.TD:
  9395. case Po.TH:
  9396. e.tmplInsertionModeStack[0] = Rc.IN_ROW, e.insertionMode = Rc.IN_ROW, Il(e, t);
  9397. break;
  9398. default:
  9399. e.tmplInsertionModeStack[0] = Rc.IN_BODY, e.insertionMode = Rc.IN_BODY, ol(e, t)
  9400. }
  9401. }(this, e);
  9402. break;
  9403. case Rc.AFTER_BODY:
  9404. ! function(e, t) {
  9405. t.tagID === Po.HTML ? ol(e, t) : kl(e, t)
  9406. }(this, e);
  9407. break;
  9408. case Rc.IN_FRAMESET:
  9409. ! function(e, t) {
  9410. switch (t.tagID) {
  9411. case Po.HTML:
  9412. ol(e, t);
  9413. break;
  9414. case Po.FRAMESET:
  9415. e._insertElement(t, vo.HTML);
  9416. break;
  9417. case Po.FRAME:
  9418. e._appendElement(t, vo.HTML), t.ackSelfClosing = !0;
  9419. break;
  9420. case Po.NOFRAMES:
  9421. Xc(e, t)
  9422. }
  9423. }(this, e);
  9424. break;
  9425. case Rc.AFTER_FRAMESET:
  9426. ! function(e, t) {
  9427. switch (t.tagID) {
  9428. case Po.HTML:
  9429. ol(e, t);
  9430. break;
  9431. case Po.NOFRAMES:
  9432. Xc(e, t)
  9433. }
  9434. }(this, e);
  9435. break;
  9436. case Rc.AFTER_AFTER_BODY:
  9437. ! function(e, t) {
  9438. t.tagID === Po.HTML ? ol(e, t) : vl(e, t)
  9439. }(this, e);
  9440. break;
  9441. case Rc.AFTER_AFTER_FRAMESET:
  9442. ! function(e, t) {
  9443. switch (t.tagID) {
  9444. case Po.HTML:
  9445. ol(e, t);
  9446. break;
  9447. case Po.NOFRAMES:
  9448. Xc(e, t)
  9449. }
  9450. }(this, e)
  9451. }
  9452. }
  9453. onEndTag(e) {
  9454. this.skipNextNewLine = !1, this.currentToken = e, this.currentNotInHTML ? function(e, t) {
  9455. if (t.tagID === Po.P || t.tagID === Po.BR) return Dl(e), void e._endTagOutsideForeignContent(t);
  9456. for (let n = e.openElements.stackTop; n > 0; n--) {
  9457. const r = e.openElements.items[n];
  9458. if (e.treeAdapter.getNamespaceURI(r) === vo.HTML) {
  9459. e._endTagOutsideForeignContent(t);
  9460. break
  9461. }
  9462. const i = e.treeAdapter.getTagName(r);
  9463. if (i.toLowerCase() === t.tagName) {
  9464. t.tagName = i, e.openElements.shortenToLength(n);
  9465. break
  9466. }
  9467. }
  9468. }(this, e) : this._endTagOutsideForeignContent(e)
  9469. }
  9470. _endTagOutsideForeignContent(e) {
  9471. switch (this.insertionMode) {
  9472. case Rc.INITIAL:
  9473. Vc(this, e);
  9474. break;
  9475. case Rc.BEFORE_HTML:
  9476. ! function(e, t) {
  9477. const n = t.tagID;
  9478. n !== Po.HTML && n !== Po.HEAD && n !== Po.BODY && n !== Po.BR || Wc(e, t)
  9479. }(this, e);
  9480. break;
  9481. case Rc.BEFORE_HEAD:
  9482. ! function(e, t) {
  9483. const n = t.tagID;
  9484. n === Po.HEAD || n === Po.BODY || n === Po.HTML || n === Po.BR ? Qc(e, t) : e._err(t, Eo.endTagWithoutMatchingOpenElement)
  9485. }(this, e);
  9486. break;
  9487. case Rc.IN_HEAD:
  9488. ! function(e, t) {
  9489. switch (t.tagID) {
  9490. case Po.HEAD:
  9491. e.openElements.pop(), e.insertionMode = Rc.AFTER_HEAD;
  9492. break;
  9493. case Po.BODY:
  9494. case Po.BR:
  9495. case Po.HTML:
  9496. zc(e, t);
  9497. break;
  9498. case Po.TEMPLATE:
  9499. $c(e, t);
  9500. break;
  9501. default:
  9502. e._err(t, Eo.endTagWithoutMatchingOpenElement)
  9503. }
  9504. }(this, e);
  9505. break;
  9506. case Rc.IN_HEAD_NO_SCRIPT:
  9507. ! function(e, t) {
  9508. switch (t.tagID) {
  9509. case Po.NOSCRIPT:
  9510. e.openElements.pop(), e.insertionMode = Rc.IN_HEAD;
  9511. break;
  9512. case Po.BR:
  9513. Jc(e, t);
  9514. break;
  9515. default:
  9516. e._err(t, Eo.endTagWithoutMatchingOpenElement)
  9517. }
  9518. }(this, e);
  9519. break;
  9520. case Rc.AFTER_HEAD:
  9521. ! function(e, t) {
  9522. switch (t.tagID) {
  9523. case Po.BODY:
  9524. case Po.HTML:
  9525. case Po.BR:
  9526. Zc(e, t);
  9527. break;
  9528. case Po.TEMPLATE:
  9529. $c(e, t);
  9530. break;
  9531. default:
  9532. e._err(t, Eo.endTagWithoutMatchingOpenElement)
  9533. }
  9534. }(this, e);
  9535. break;
  9536. case Rc.IN_BODY:
  9537. ll(this, e);
  9538. break;
  9539. case Rc.TEXT:
  9540. ! function(e, t) {
  9541. var n;
  9542. t.tagID === Po.SCRIPT && (null === (n = e.scriptHandler) || void 0 === n || n.call(e, e.openElements.current));
  9543. e.openElements.pop(), e.insertionMode = e.originalInsertionMode
  9544. }(this, e);
  9545. break;
  9546. case Rc.IN_TABLE:
  9547. fl(this, e);
  9548. break;
  9549. case Rc.IN_TABLE_TEXT:
  9550. Tl(this, e);
  9551. break;
  9552. case Rc.IN_CAPTION:
  9553. ! function(e, t) {
  9554. const n = t.tagID;
  9555. switch (n) {
  9556. case Po.CAPTION:
  9557. case Po.TABLE:
  9558. e.openElements.hasInTableScope(Po.CAPTION) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(Po.CAPTION), e.activeFormattingElements.clearToLastMarker(), e.insertionMode = Rc.IN_TABLE, n === Po.TABLE && fl(e, t));
  9559. break;
  9560. case Po.BODY:
  9561. case Po.COL:
  9562. case Po.COLGROUP:
  9563. case Po.HTML:
  9564. case Po.TBODY:
  9565. case Po.TD:
  9566. case Po.TFOOT:
  9567. case Po.TH:
  9568. case Po.THEAD:
  9569. case Po.TR:
  9570. break;
  9571. default:
  9572. ll(e, t)
  9573. }
  9574. }(this, e);
  9575. break;
  9576. case Rc.IN_COLUMN_GROUP:
  9577. ! function(e, t) {
  9578. switch (t.tagID) {
  9579. case Po.COLGROUP:
  9580. e.openElements.currentTagId === Po.COLGROUP && (e.openElements.pop(), e.insertionMode = Rc.IN_TABLE);
  9581. break;
  9582. case Po.TEMPLATE:
  9583. $c(e, t);
  9584. break;
  9585. case Po.COL:
  9586. break;
  9587. default:
  9588. gl(e, t)
  9589. }
  9590. }(this, e);
  9591. break;
  9592. case Rc.IN_TABLE_BODY:
  9593. Cl(this, e);
  9594. break;
  9595. case Rc.IN_ROW:
  9596. Sl(this, e);
  9597. break;
  9598. case Rc.IN_CELL:
  9599. ! function(e, t) {
  9600. const n = t.tagID;
  9601. switch (n) {
  9602. case Po.TD:
  9603. case Po.TH:
  9604. e.openElements.hasInTableScope(n) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(n), e.activeFormattingElements.clearToLastMarker(), e.insertionMode = Rc.IN_ROW);
  9605. break;
  9606. case Po.TABLE:
  9607. case Po.TBODY:
  9608. case Po.TFOOT:
  9609. case Po.THEAD:
  9610. case Po.TR:
  9611. e.openElements.hasInTableScope(n) && (e._closeTableCell(), Sl(e, t));
  9612. break;
  9613. case Po.BODY:
  9614. case Po.CAPTION:
  9615. case Po.COL:
  9616. case Po.COLGROUP:
  9617. case Po.HTML:
  9618. break;
  9619. default:
  9620. ll(e, t)
  9621. }
  9622. }(this, e);
  9623. break;
  9624. case Rc.IN_SELECT:
  9625. Ol(this, e);
  9626. break;
  9627. case Rc.IN_SELECT_IN_TABLE:
  9628. ! function(e, t) {
  9629. const n = t.tagID;
  9630. n === Po.CAPTION || n === Po.TABLE || n === Po.TBODY || n === Po.TFOOT || n === Po.THEAD || n === Po.TR || n === Po.TD || n === Po.TH ? e.openElements.hasInTableScope(n) && (e.openElements.popUntilTagNamePopped(Po.SELECT), e._resetInsertionMode(), e.onEndTag(t)) : Ol(e, t)
  9631. }(this, e);
  9632. break;
  9633. case Rc.IN_TEMPLATE:
  9634. ! function(e, t) {
  9635. t.tagID === Po.TEMPLATE && $c(e, t)
  9636. }(this, e);
  9637. break;
  9638. case Rc.AFTER_BODY:
  9639. Ll(this, e);
  9640. break;
  9641. case Rc.IN_FRAMESET:
  9642. ! function(e, t) {
  9643. t.tagID !== Po.FRAMESET || e.openElements.isRootHtmlElementCurrent() || (e.openElements.pop(), e.fragmentContext || e.openElements.currentTagId === Po.FRAMESET || (e.insertionMode = Rc.AFTER_FRAMESET))
  9644. }(this, e);
  9645. break;
  9646. case Rc.AFTER_FRAMESET:
  9647. ! function(e, t) {
  9648. t.tagID === Po.HTML && (e.insertionMode = Rc.AFTER_AFTER_FRAMESET)
  9649. }(this, e);
  9650. break;
  9651. case Rc.AFTER_AFTER_BODY:
  9652. vl(this, e)
  9653. }
  9654. }
  9655. onEof(e) {
  9656. switch (this.insertionMode) {
  9657. case Rc.INITIAL:
  9658. Vc(this, e);
  9659. break;
  9660. case Rc.BEFORE_HTML:
  9661. Wc(this, e);
  9662. break;
  9663. case Rc.BEFORE_HEAD:
  9664. Qc(this, e);
  9665. break;
  9666. case Rc.IN_HEAD:
  9667. zc(this, e);
  9668. break;
  9669. case Rc.IN_HEAD_NO_SCRIPT:
  9670. Jc(this, e);
  9671. break;
  9672. case Rc.AFTER_HEAD:
  9673. Zc(this, e);
  9674. break;
  9675. case Rc.IN_BODY:
  9676. case Rc.IN_TABLE:
  9677. case Rc.IN_CAPTION:
  9678. case Rc.IN_COLUMN_GROUP:
  9679. case Rc.IN_TABLE_BODY:
  9680. case Rc.IN_ROW:
  9681. case Rc.IN_CELL:
  9682. case Rc.IN_SELECT:
  9683. case Rc.IN_SELECT_IN_TABLE:
  9684. hl(this, e);
  9685. break;
  9686. case Rc.TEXT:
  9687. ! function(e, t) {
  9688. e._err(t, Eo.eofInElementThatCanContainOnlyText), e.openElements.pop(), e.insertionMode = e.originalInsertionMode, e.onEof(t)
  9689. }(this, e);
  9690. break;
  9691. case Rc.IN_TABLE_TEXT:
  9692. Tl(this, e);
  9693. break;
  9694. case Rc.IN_TEMPLATE:
  9695. yl(this, e);
  9696. break;
  9697. case Rc.AFTER_BODY:
  9698. case Rc.IN_FRAMESET:
  9699. case Rc.AFTER_FRAMESET:
  9700. case Rc.AFTER_AFTER_BODY:
  9701. case Rc.AFTER_AFTER_FRAMESET:
  9702. jc(this, e)
  9703. }
  9704. }
  9705. onWhitespaceCharacter(e) {
  9706. if (this.skipNextNewLine && (this.skipNextNewLine = !1, e.chars.charCodeAt(0) === io.LINE_FEED)) {
  9707. if (1 === e.chars.length) return;
  9708. e.chars = e.chars.substr(1)
  9709. }
  9710. if (this.tokenizer.inForeignNode) this._insertCharacters(e);
  9711. else switch (this.insertionMode) {
  9712. case Rc.IN_HEAD:
  9713. case Rc.IN_HEAD_NO_SCRIPT:
  9714. case Rc.AFTER_HEAD:
  9715. case Rc.TEXT:
  9716. case Rc.IN_COLUMN_GROUP:
  9717. case Rc.IN_SELECT:
  9718. case Rc.IN_SELECT_IN_TABLE:
  9719. case Rc.IN_FRAMESET:
  9720. case Rc.AFTER_FRAMESET:
  9721. this._insertCharacters(e);
  9722. break;
  9723. case Rc.IN_BODY:
  9724. case Rc.IN_CAPTION:
  9725. case Rc.IN_CELL:
  9726. case Rc.IN_TEMPLATE:
  9727. case Rc.AFTER_BODY:
  9728. case Rc.AFTER_AFTER_BODY:
  9729. case Rc.AFTER_AFTER_FRAMESET:
  9730. tl(this, e);
  9731. break;
  9732. case Rc.IN_TABLE:
  9733. case Rc.IN_TABLE_BODY:
  9734. case Rc.IN_ROW:
  9735. ul(this, e);
  9736. break;
  9737. case Rc.IN_TABLE_TEXT:
  9738. El(this, e)
  9739. }
  9740. }
  9741. }
  9742. function Bc(e, t) {
  9743. let n = e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);
  9744. return n ? e.openElements.contains(n.element) ? e.openElements.hasInScope(t.tagID) || (n = null) : (e.activeFormattingElements.removeEntry(n), n = null) : cl(e, t), n
  9745. }
  9746. function Fc(e, t) {
  9747. let n = null,
  9748. r = e.openElements.stackTop;
  9749. for (; r >= 0; r--) {
  9750. const i = e.openElements.items[r];
  9751. if (i === t.element) break;
  9752. e._isSpecialElement(i, e.openElements.tagIDs[r]) && (n = i)
  9753. }
  9754. return n || (e.openElements.shortenToLength(r < 0 ? 0 : r), e.activeFormattingElements.removeEntry(t)), n
  9755. }
  9756. function Uc(e, t, n) {
  9757. let r = t,
  9758. i = e.openElements.getCommonAncestor(t);
  9759. for (let s = 0, a = i; a !== n; s++, a = i) {
  9760. i = e.openElements.getCommonAncestor(a);
  9761. const n = e.activeFormattingElements.getElementEntry(a),
  9762. o = n && s >= 3;
  9763. !n || o ? (o && e.activeFormattingElements.removeEntry(n), e.openElements.remove(a)) : (a = Hc(e, n), r === t && (e.activeFormattingElements.bookmark = n), e.treeAdapter.detachNode(r), e.treeAdapter.appendChild(a, r), r = a)
  9764. }
  9765. return r
  9766. }
  9767. function Hc(e, t) {
  9768. const n = e.treeAdapter.getNamespaceURI(t.element),
  9769. r = e.treeAdapter.createElement(t.token.tagName, n, t.token.attrs);
  9770. return e.openElements.replace(t.element, r), t.element = r, r
  9771. }
  9772. function Gc(e, t, n) {
  9773. const r = Fo(e.treeAdapter.getTagName(t));
  9774. if (e._isElementCausesFosterParenting(r)) e._fosterParentElement(n);
  9775. else {
  9776. const i = e.treeAdapter.getNamespaceURI(t);
  9777. r === Po.TEMPLATE && i === vo.HTML && (t = e.treeAdapter.getTemplateContent(t)), e.treeAdapter.appendChild(t, n)
  9778. }
  9779. }
  9780. function Yc(e, t, n) {
  9781. const r = e.treeAdapter.getNamespaceURI(n.element),
  9782. {
  9783. token: i
  9784. } = n,
  9785. s = e.treeAdapter.createElement(i.tagName, r, i.attrs);
  9786. e._adoptNodes(t, s), e.treeAdapter.appendChild(t, s), e.activeFormattingElements.insertElementAfterBookmark(s, i), e.activeFormattingElements.removeEntry(n), e.openElements.remove(n.element), e.openElements.insertAfter(t, s, i.tagID)
  9787. }
  9788. function qc(e, t) {
  9789. for (let n = 0; n < 8; n++) {
  9790. const n = Bc(e, t);
  9791. if (!n) break;
  9792. const r = Fc(e, n);
  9793. if (!r) break;
  9794. e.activeFormattingElements.bookmark = n;
  9795. const i = Uc(e, r, n.element),
  9796. s = e.openElements.getCommonAncestor(n.element);
  9797. e.treeAdapter.detachNode(i), s && Gc(e, s, i), Yc(e, r, n)
  9798. }
  9799. }
  9800. function Kc(e, t) {
  9801. e._appendCommentNode(t, e.openElements.currentTmplContentOrNode)
  9802. }
  9803. function jc(e, t) {
  9804. if (e.stopped = !0, t.location) {
  9805. const n = e.fragmentContext ? 0 : 2;
  9806. for (let r = e.openElements.stackTop; r >= n; r--) e._setEndLocation(e.openElements.items[r], t);
  9807. if (!e.fragmentContext && e.openElements.stackTop >= 0) {
  9808. const n = e.openElements.items[0],
  9809. r = e.treeAdapter.getNodeSourceCodeLocation(n);
  9810. if (r && !r.endTag && (e._setEndLocation(n, t), e.openElements.stackTop >= 1)) {
  9811. const n = e.openElements.items[1],
  9812. r = e.treeAdapter.getNodeSourceCodeLocation(n);
  9813. r && !r.endTag && e._setEndLocation(n, t)
  9814. }
  9815. }
  9816. }
  9817. }
  9818. function Vc(e, t) {
  9819. e._err(t, Eo.missingDoctype, !0), e.treeAdapter.setDocumentMode(e.document, Ro.QUIRKS), e.insertionMode = Rc.BEFORE_HTML, e._processToken(t)
  9820. }
  9821. function Wc(e, t) {
  9822. e._insertFakeRootElement(), e.insertionMode = Rc.BEFORE_HEAD, e._processToken(t)
  9823. }
  9824. function Qc(e, t) {
  9825. e._insertFakeElement(Mo.HEAD, Po.HEAD), e.headElement = e.openElements.current, e.insertionMode = Rc.IN_HEAD, e._processToken(t)
  9826. }
  9827. function Xc(e, t) {
  9828. switch (t.tagID) {
  9829. case Po.HTML:
  9830. ol(e, t);
  9831. break;
  9832. case Po.BASE:
  9833. case Po.BASEFONT:
  9834. case Po.BGSOUND:
  9835. case Po.LINK:
  9836. case Po.META:
  9837. e._appendElement(t, vo.HTML), t.ackSelfClosing = !0;
  9838. break;
  9839. case Po.TITLE:
  9840. e._switchToTextParsing(t, jo.RCDATA);
  9841. break;
  9842. case Po.NOSCRIPT:
  9843. e.options.scriptingEnabled ? e._switchToTextParsing(t, jo.RAWTEXT) : (e._insertElement(t, vo.HTML), e.insertionMode = Rc.IN_HEAD_NO_SCRIPT);
  9844. break;
  9845. case Po.NOFRAMES:
  9846. case Po.STYLE:
  9847. e._switchToTextParsing(t, jo.RAWTEXT);
  9848. break;
  9849. case Po.SCRIPT:
  9850. e._switchToTextParsing(t, jo.SCRIPT_DATA);
  9851. break;
  9852. case Po.TEMPLATE:
  9853. e._insertTemplate(t), e.activeFormattingElements.insertMarker(), e.framesetOk = !1, e.insertionMode = Rc.IN_TEMPLATE, e.tmplInsertionModeStack.unshift(Rc.IN_TEMPLATE);
  9854. break;
  9855. case Po.HEAD:
  9856. e._err(t, Eo.misplacedStartTagForHeadElement);
  9857. break;
  9858. default:
  9859. zc(e, t)
  9860. }
  9861. }
  9862. function $c(e, t) {
  9863. e.openElements.tmplCount > 0 ? (e.openElements.generateImpliedEndTagsThoroughly(), e.openElements.currentTagId !== Po.TEMPLATE && e._err(t, Eo.closingOfElementWithOpenChildElements), e.openElements.popUntilTagNamePopped(Po.TEMPLATE), e.activeFormattingElements.clearToLastMarker(), e.tmplInsertionModeStack.shift(), e._resetInsertionMode()) : e._err(t, Eo.endTagWithoutMatchingOpenElement)
  9864. }
  9865. function zc(e, t) {
  9866. e.openElements.pop(), e.insertionMode = Rc.AFTER_HEAD, e._processToken(t)
  9867. }
  9868. function Jc(e, t) {
  9869. const n = t.type === To.EOF ? Eo.openElementsLeftAfterEof : Eo.disallowedContentInNoscriptInHead;
  9870. e._err(t, n), e.openElements.pop(), e.insertionMode = Rc.IN_HEAD, e._processToken(t)
  9871. }
  9872. function Zc(e, t) {
  9873. e._insertFakeElement(Mo.BODY, Po.BODY), e.insertionMode = Rc.IN_BODY, el(e, t)
  9874. }
  9875. function el(e, t) {
  9876. switch (t.type) {
  9877. case To.CHARACTER:
  9878. nl(e, t);
  9879. break;
  9880. case To.WHITESPACE_CHARACTER:
  9881. tl(e, t);
  9882. break;
  9883. case To.COMMENT:
  9884. Kc(e, t);
  9885. break;
  9886. case To.START_TAG:
  9887. ol(e, t);
  9888. break;
  9889. case To.END_TAG:
  9890. ll(e, t);
  9891. break;
  9892. case To.EOF:
  9893. hl(e, t)
  9894. }
  9895. }
  9896. function tl(e, t) {
  9897. e._reconstructActiveFormattingElements(), e._insertCharacters(t)
  9898. }
  9899. function nl(e, t) {
  9900. e._reconstructActiveFormattingElements(), e._insertCharacters(t), e.framesetOk = !1
  9901. }
  9902. function rl(e, t) {
  9903. e._reconstructActiveFormattingElements(), e._appendElement(t, vo.HTML), e.framesetOk = !1, t.ackSelfClosing = !0
  9904. }
  9905. function il(e) {
  9906. const t = _o(e, Do.TYPE);
  9907. return null != t && "hidden" === t.toLowerCase()
  9908. }
  9909. function sl(e, t) {
  9910. e._switchToTextParsing(t, jo.RAWTEXT)
  9911. }
  9912. function al(e, t) {
  9913. e._reconstructActiveFormattingElements(), e._insertElement(t, vo.HTML)
  9914. }
  9915. function ol(e, t) {
  9916. switch (t.tagID) {
  9917. case Po.I:
  9918. case Po.S:
  9919. case Po.B:
  9920. case Po.U:
  9921. case Po.EM:
  9922. case Po.TT:
  9923. case Po.BIG:
  9924. case Po.CODE:
  9925. case Po.FONT:
  9926. case Po.SMALL:
  9927. case Po.STRIKE:
  9928. case Po.STRONG:
  9929. ! function(e, t) {
  9930. e._reconstructActiveFormattingElements(), e._insertElement(t, vo.HTML), e.activeFormattingElements.pushElement(e.openElements.current, t)
  9931. }(e, t);
  9932. break;
  9933. case Po.A:
  9934. ! function(e, t) {
  9935. const n = e.activeFormattingElements.getElementEntryInScopeWithTagName(Mo.A);
  9936. n && (qc(e, t), e.openElements.remove(n.element), e.activeFormattingElements.removeEntry(n)), e._reconstructActiveFormattingElements(), e._insertElement(t, vo.HTML), e.activeFormattingElements.pushElement(e.openElements.current, t)
  9937. }(e, t);
  9938. break;
  9939. case Po.H1:
  9940. case Po.H2:
  9941. case Po.H3:
  9942. case Po.H4:
  9943. case Po.H5:
  9944. case Po.H6:
  9945. ! function(e, t) {
  9946. e.openElements.hasInButtonScope(Po.P) && e._closePElement(), Go(e.openElements.currentTagId) && e.openElements.pop(), e._insertElement(t, vo.HTML)
  9947. }(e, t);
  9948. break;
  9949. case Po.P:
  9950. case Po.DL:
  9951. case Po.OL:
  9952. case Po.UL:
  9953. case Po.DIV:
  9954. case Po.DIR:
  9955. case Po.NAV:
  9956. case Po.MAIN:
  9957. case Po.MENU:
  9958. case Po.ASIDE:
  9959. case Po.CENTER:
  9960. case Po.FIGURE:
  9961. case Po.FOOTER:
  9962. case Po.HEADER:
  9963. case Po.HGROUP:
  9964. case Po.DIALOG:
  9965. case Po.DETAILS:
  9966. case Po.ADDRESS:
  9967. case Po.ARTICLE:
  9968. case Po.SECTION:
  9969. case Po.SUMMARY:
  9970. case Po.FIELDSET:
  9971. case Po.BLOCKQUOTE:
  9972. case Po.FIGCAPTION:
  9973. ! function(e, t) {
  9974. e.openElements.hasInButtonScope(Po.P) && e._closePElement(), e._insertElement(t, vo.HTML)
  9975. }(e, t);
  9976. break;
  9977. case Po.LI:
  9978. case Po.DD:
  9979. case Po.DT:
  9980. ! function(e, t) {
  9981. e.framesetOk = !1;
  9982. const n = t.tagID;
  9983. for (let t = e.openElements.stackTop; t >= 0; t--) {
  9984. const r = e.openElements.tagIDs[t];
  9985. if (n === Po.LI && r === Po.LI || (n === Po.DD || n === Po.DT) && (r === Po.DD || r === Po.DT)) {
  9986. e.openElements.generateImpliedEndTagsWithExclusion(r), e.openElements.popUntilTagNamePopped(r);
  9987. break
  9988. }
  9989. if (r !== Po.ADDRESS && r !== Po.DIV && r !== Po.P && e._isSpecialElement(e.openElements.items[t], r)) break
  9990. }
  9991. e.openElements.hasInButtonScope(Po.P) && e._closePElement(), e._insertElement(t, vo.HTML)
  9992. }(e, t);
  9993. break;
  9994. case Po.BR:
  9995. case Po.IMG:
  9996. case Po.WBR:
  9997. case Po.AREA:
  9998. case Po.EMBED:
  9999. case Po.KEYGEN:
  10000. rl(e, t);
  10001. break;
  10002. case Po.HR:
  10003. ! function(e, t) {
  10004. e.openElements.hasInButtonScope(Po.P) && e._closePElement(), e._appendElement(t, vo.HTML), e.framesetOk = !1, t.ackSelfClosing = !0
  10005. }(e, t);
  10006. break;
  10007. case Po.RB:
  10008. case Po.RTC:
  10009. ! function(e, t) {
  10010. e.openElements.hasInScope(Po.RUBY) && e.openElements.generateImpliedEndTags(), e._insertElement(t, vo.HTML)
  10011. }(e, t);
  10012. break;
  10013. case Po.RT:
  10014. case Po.RP:
  10015. ! function(e, t) {
  10016. e.openElements.hasInScope(Po.RUBY) && e.openElements.generateImpliedEndTagsWithExclusion(Po.RTC), e._insertElement(t, vo.HTML)
  10017. }(e, t);
  10018. break;
  10019. case Po.PRE:
  10020. case Po.LISTING:
  10021. ! function(e, t) {
  10022. e.openElements.hasInButtonScope(Po.P) && e._closePElement(), e._insertElement(t, vo.HTML), e.skipNextNewLine = !0, e.framesetOk = !1
  10023. }(e, t);
  10024. break;
  10025. case Po.XMP:
  10026. ! function(e, t) {
  10027. e.openElements.hasInButtonScope(Po.P) && e._closePElement(), e._reconstructActiveFormattingElements(), e.framesetOk = !1, e._switchToTextParsing(t, jo.RAWTEXT)
  10028. }(e, t);
  10029. break;
  10030. case Po.SVG:
  10031. ! function(e, t) {
  10032. e._reconstructActiveFormattingElements(), kc(t), vc(t), t.selfClosing ? e._appendElement(t, vo.SVG) : e._insertElement(t, vo.SVG), t.ackSelfClosing = !0
  10033. }(e, t);
  10034. break;
  10035. case Po.HTML:
  10036. ! function(e, t) {
  10037. 0 === e.openElements.tmplCount && e.treeAdapter.adoptAttributes(e.openElements.items[0], t.attrs)
  10038. }(e, t);
  10039. break;
  10040. case Po.BASE:
  10041. case Po.LINK:
  10042. case Po.META:
  10043. case Po.STYLE:
  10044. case Po.TITLE:
  10045. case Po.SCRIPT:
  10046. case Po.BGSOUND:
  10047. case Po.BASEFONT:
  10048. case Po.TEMPLATE:
  10049. Xc(e, t);
  10050. break;
  10051. case Po.BODY:
  10052. ! function(e, t) {
  10053. const n = e.openElements.tryPeekProperlyNestedBodyElement();
  10054. n && 0 === e.openElements.tmplCount && (e.framesetOk = !1, e.treeAdapter.adoptAttributes(n, t.attrs))
  10055. }(e, t);
  10056. break;
  10057. case Po.FORM:
  10058. ! function(e, t) {
  10059. const n = e.openElements.tmplCount > 0;
  10060. e.formElement && !n || (e.openElements.hasInButtonScope(Po.P) && e._closePElement(), e._insertElement(t, vo.HTML), n || (e.formElement = e.openElements.current))
  10061. }(e, t);
  10062. break;
  10063. case Po.NOBR:
  10064. ! function(e, t) {
  10065. e._reconstructActiveFormattingElements(), e.openElements.hasInScope(Po.NOBR) && (qc(e, t), e._reconstructActiveFormattingElements()), e._insertElement(t, vo.HTML), e.activeFormattingElements.pushElement(e.openElements.current, t)
  10066. }(e, t);
  10067. break;
  10068. case Po.MATH:
  10069. ! function(e, t) {
  10070. e._reconstructActiveFormattingElements(), Lc(t), vc(t), t.selfClosing ? e._appendElement(t, vo.MATHML) : e._insertElement(t, vo.MATHML), t.ackSelfClosing = !0
  10071. }(e, t);
  10072. break;
  10073. case Po.TABLE:
  10074. ! function(e, t) {
  10075. e.treeAdapter.getDocumentMode(e.document) !== Ro.QUIRKS && e.openElements.hasInButtonScope(Po.P) && e._closePElement(), e._insertElement(t, vo.HTML), e.framesetOk = !1, e.insertionMode = Rc.IN_TABLE
  10076. }(e, t);
  10077. break;
  10078. case Po.INPUT:
  10079. ! function(e, t) {
  10080. e._reconstructActiveFormattingElements(), e._appendElement(t, vo.HTML), il(t) || (e.framesetOk = !1), t.ackSelfClosing = !0
  10081. }(e, t);
  10082. break;
  10083. case Po.PARAM:
  10084. case Po.TRACK:
  10085. case Po.SOURCE:
  10086. ! function(e, t) {
  10087. e._appendElement(t, vo.HTML), t.ackSelfClosing = !0
  10088. }(e, t);
  10089. break;
  10090. case Po.IMAGE:
  10091. ! function(e, t) {
  10092. t.tagName = Mo.IMG, t.tagID = Po.IMG, rl(e, t)
  10093. }(e, t);
  10094. break;
  10095. case Po.BUTTON:
  10096. ! function(e, t) {
  10097. e.openElements.hasInScope(Po.BUTTON) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(Po.BUTTON)), e._reconstructActiveFormattingElements(), e._insertElement(t, vo.HTML), e.framesetOk = !1
  10098. }(e, t);
  10099. break;
  10100. case Po.APPLET:
  10101. case Po.OBJECT:
  10102. case Po.MARQUEE:
  10103. ! function(e, t) {
  10104. e._reconstructActiveFormattingElements(), e._insertElement(t, vo.HTML), e.activeFormattingElements.insertMarker(), e.framesetOk = !1
  10105. }(e, t);
  10106. break;
  10107. case Po.IFRAME:
  10108. ! function(e, t) {
  10109. e.framesetOk = !1, e._switchToTextParsing(t, jo.RAWTEXT)
  10110. }(e, t);
  10111. break;
  10112. case Po.SELECT:
  10113. ! function(e, t) {
  10114. e._reconstructActiveFormattingElements(), e._insertElement(t, vo.HTML), e.framesetOk = !1, e.insertionMode = e.insertionMode === Rc.IN_TABLE || e.insertionMode === Rc.IN_CAPTION || e.insertionMode === Rc.IN_TABLE_BODY || e.insertionMode === Rc.IN_ROW || e.insertionMode === Rc.IN_CELL ? Rc.IN_SELECT_IN_TABLE : Rc.IN_SELECT
  10115. }(e, t);
  10116. break;
  10117. case Po.OPTION:
  10118. case Po.OPTGROUP:
  10119. ! function(e, t) {
  10120. e.openElements.currentTagId === Po.OPTION && e.openElements.pop(), e._reconstructActiveFormattingElements(), e._insertElement(t, vo.HTML)
  10121. }(e, t);
  10122. break;
  10123. case Po.NOEMBED:
  10124. sl(e, t);
  10125. break;
  10126. case Po.FRAMESET:
  10127. ! function(e, t) {
  10128. const n = e.openElements.tryPeekProperlyNestedBodyElement();
  10129. e.framesetOk && n && (e.treeAdapter.detachNode(n), e.openElements.popAllUpToHtmlElement(), e._insertElement(t, vo.HTML), e.insertionMode = Rc.IN_FRAMESET)
  10130. }(e, t);
  10131. break;
  10132. case Po.TEXTAREA:
  10133. ! function(e, t) {
  10134. e._insertElement(t, vo.HTML), e.skipNextNewLine = !0, e.tokenizer.state = jo.RCDATA, e.originalInsertionMode = e.insertionMode, e.framesetOk = !1, e.insertionMode = Rc.TEXT
  10135. }(e, t);
  10136. break;
  10137. case Po.NOSCRIPT:
  10138. e.options.scriptingEnabled ? sl(e, t) : al(e, t);
  10139. break;
  10140. case Po.PLAINTEXT:
  10141. ! function(e, t) {
  10142. e.openElements.hasInButtonScope(Po.P) && e._closePElement(), e._insertElement(t, vo.HTML), e.tokenizer.state = jo.PLAINTEXT
  10143. }(e, t);
  10144. break;
  10145. case Po.COL:
  10146. case Po.TH:
  10147. case Po.TD:
  10148. case Po.TR:
  10149. case Po.HEAD:
  10150. case Po.FRAME:
  10151. case Po.TBODY:
  10152. case Po.TFOOT:
  10153. case Po.THEAD:
  10154. case Po.CAPTION:
  10155. case Po.COLGROUP:
  10156. break;
  10157. default:
  10158. al(e, t)
  10159. }
  10160. }
  10161. function cl(e, t) {
  10162. const n = t.tagName,
  10163. r = t.tagID;
  10164. for (let t = e.openElements.stackTop; t > 0; t--) {
  10165. const i = e.openElements.items[t],
  10166. s = e.openElements.tagIDs[t];
  10167. if (r === s && (r !== Po.UNKNOWN || e.treeAdapter.getTagName(i) === n)) {
  10168. e.openElements.generateImpliedEndTagsWithExclusion(r), e.openElements.stackTop >= t && e.openElements.shortenToLength(t);
  10169. break
  10170. }
  10171. if (e._isSpecialElement(i, s)) break
  10172. }
  10173. }
  10174. function ll(e, t) {
  10175. switch (t.tagID) {
  10176. case Po.A:
  10177. case Po.B:
  10178. case Po.I:
  10179. case Po.S:
  10180. case Po.U:
  10181. case Po.EM:
  10182. case Po.TT:
  10183. case Po.BIG:
  10184. case Po.CODE:
  10185. case Po.FONT:
  10186. case Po.NOBR:
  10187. case Po.SMALL:
  10188. case Po.STRIKE:
  10189. case Po.STRONG:
  10190. qc(e, t);
  10191. break;
  10192. case Po.P:
  10193. ! function(e) {
  10194. e.openElements.hasInButtonScope(Po.P) || e._insertFakeElement(Mo.P, Po.P), e._closePElement()
  10195. }(e);
  10196. break;
  10197. case Po.DL:
  10198. case Po.UL:
  10199. case Po.OL:
  10200. case Po.DIR:
  10201. case Po.DIV:
  10202. case Po.NAV:
  10203. case Po.PRE:
  10204. case Po.MAIN:
  10205. case Po.MENU:
  10206. case Po.ASIDE:
  10207. case Po.BUTTON:
  10208. case Po.CENTER:
  10209. case Po.FIGURE:
  10210. case Po.FOOTER:
  10211. case Po.HEADER:
  10212. case Po.HGROUP:
  10213. case Po.DIALOG:
  10214. case Po.ADDRESS:
  10215. case Po.ARTICLE:
  10216. case Po.DETAILS:
  10217. case Po.SECTION:
  10218. case Po.SUMMARY:
  10219. case Po.LISTING:
  10220. case Po.FIELDSET:
  10221. case Po.BLOCKQUOTE:
  10222. case Po.FIGCAPTION:
  10223. ! function(e, t) {
  10224. const n = t.tagID;
  10225. e.openElements.hasInScope(n) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(n))
  10226. }(e, t);
  10227. break;
  10228. case Po.LI:
  10229. ! function(e) {
  10230. e.openElements.hasInListItemScope(Po.LI) && (e.openElements.generateImpliedEndTagsWithExclusion(Po.LI), e.openElements.popUntilTagNamePopped(Po.LI))
  10231. }(e);
  10232. break;
  10233. case Po.DD:
  10234. case Po.DT:
  10235. ! function(e, t) {
  10236. const n = t.tagID;
  10237. e.openElements.hasInScope(n) && (e.openElements.generateImpliedEndTagsWithExclusion(n), e.openElements.popUntilTagNamePopped(n))
  10238. }(e, t);
  10239. break;
  10240. case Po.H1:
  10241. case Po.H2:
  10242. case Po.H3:
  10243. case Po.H4:
  10244. case Po.H5:
  10245. case Po.H6:
  10246. ! function(e) {
  10247. e.openElements.hasNumberedHeaderInScope() && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilNumberedHeaderPopped())
  10248. }(e);
  10249. break;
  10250. case Po.BR:
  10251. ! function(e) {
  10252. e._reconstructActiveFormattingElements(), e._insertFakeElement(Mo.BR, Po.BR), e.openElements.pop(), e.framesetOk = !1
  10253. }(e);
  10254. break;
  10255. case Po.BODY:
  10256. ! function(e, t) {
  10257. if (e.openElements.hasInScope(Po.BODY) && (e.insertionMode = Rc.AFTER_BODY, e.options.sourceCodeLocationInfo)) {
  10258. const n = e.openElements.tryPeekProperlyNestedBodyElement();
  10259. n && e._setEndLocation(n, t)
  10260. }
  10261. }(e, t);
  10262. break;
  10263. case Po.HTML:
  10264. ! function(e, t) {
  10265. e.openElements.hasInScope(Po.BODY) && (e.insertionMode = Rc.AFTER_BODY, Ll(e, t))
  10266. }(e, t);
  10267. break;
  10268. case Po.FORM:
  10269. ! function(e) {
  10270. const t = e.openElements.tmplCount > 0,
  10271. {
  10272. formElement: n
  10273. } = e;
  10274. t || (e.formElement = null), (n || t) && e.openElements.hasInScope(Po.FORM) && (e.openElements.generateImpliedEndTags(), t ? e.openElements.popUntilTagNamePopped(Po.FORM) : n && e.openElements.remove(n))
  10275. }(e);
  10276. break;
  10277. case Po.APPLET:
  10278. case Po.OBJECT:
  10279. case Po.MARQUEE:
  10280. ! function(e, t) {
  10281. const n = t.tagID;
  10282. e.openElements.hasInScope(n) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(n), e.activeFormattingElements.clearToLastMarker())
  10283. }(e, t);
  10284. break;
  10285. case Po.TEMPLATE:
  10286. $c(e, t);
  10287. break;
  10288. default:
  10289. cl(e, t)
  10290. }
  10291. }
  10292. function hl(e, t) {
  10293. e.tmplInsertionModeStack.length > 0 ? yl(e, t) : jc(e, t)
  10294. }
  10295. function ul(e, t) {
  10296. if (Pc.has(e.openElements.currentTagId)) switch (e.pendingCharacterTokens.length = 0, e.hasNonWhitespacePendingCharacterToken = !1, e.originalInsertionMode = e.insertionMode, e.insertionMode = Rc.IN_TABLE_TEXT, t.type) {
  10297. case To.CHARACTER:
  10298. ml(e, t);
  10299. break;
  10300. case To.WHITESPACE_CHARACTER:
  10301. El(e, t)
  10302. } else dl(e, t)
  10303. }
  10304. function pl(e, t) {
  10305. switch (t.tagID) {
  10306. case Po.TD:
  10307. case Po.TH:
  10308. case Po.TR:
  10309. ! function(e, t) {
  10310. e.openElements.clearBackToTableContext(), e._insertFakeElement(Mo.TBODY, Po.TBODY), e.insertionMode = Rc.IN_TABLE_BODY, Nl(e, t)
  10311. }(e, t);
  10312. break;
  10313. case Po.STYLE:
  10314. case Po.SCRIPT:
  10315. case Po.TEMPLATE:
  10316. Xc(e, t);
  10317. break;
  10318. case Po.COL:
  10319. ! function(e, t) {
  10320. e.openElements.clearBackToTableContext(), e._insertFakeElement(Mo.COLGROUP, Po.COLGROUP), e.insertionMode = Rc.IN_COLUMN_GROUP, Al(e, t)
  10321. }(e, t);
  10322. break;
  10323. case Po.FORM:
  10324. ! function(e, t) {
  10325. e.formElement || 0 !== e.openElements.tmplCount || (e._insertElement(t, vo.HTML), e.formElement = e.openElements.current, e.openElements.pop())
  10326. }(e, t);
  10327. break;
  10328. case Po.TABLE:
  10329. ! function(e, t) {
  10330. e.openElements.hasInTableScope(Po.TABLE) && (e.openElements.popUntilTagNamePopped(Po.TABLE), e._resetInsertionMode(), e._processStartTag(t))
  10331. }(e, t);
  10332. break;
  10333. case Po.TBODY:
  10334. case Po.TFOOT:
  10335. case Po.THEAD:
  10336. ! function(e, t) {
  10337. e.openElements.clearBackToTableContext(), e._insertElement(t, vo.HTML), e.insertionMode = Rc.IN_TABLE_BODY
  10338. }(e, t);
  10339. break;
  10340. case Po.INPUT:
  10341. ! function(e, t) {
  10342. il(t) ? e._appendElement(t, vo.HTML) : dl(e, t), t.ackSelfClosing = !0
  10343. }(e, t);
  10344. break;
  10345. case Po.CAPTION:
  10346. ! function(e, t) {
  10347. e.openElements.clearBackToTableContext(), e.activeFormattingElements.insertMarker(), e._insertElement(t, vo.HTML), e.insertionMode = Rc.IN_CAPTION
  10348. }(e, t);
  10349. break;
  10350. case Po.COLGROUP:
  10351. ! function(e, t) {
  10352. e.openElements.clearBackToTableContext(), e._insertElement(t, vo.HTML), e.insertionMode = Rc.IN_COLUMN_GROUP
  10353. }(e, t);
  10354. break;
  10355. default:
  10356. dl(e, t)
  10357. }
  10358. }
  10359. function fl(e, t) {
  10360. switch (t.tagID) {
  10361. case Po.TABLE:
  10362. e.openElements.hasInTableScope(Po.TABLE) && (e.openElements.popUntilTagNamePopped(Po.TABLE), e._resetInsertionMode());
  10363. break;
  10364. case Po.TEMPLATE:
  10365. $c(e, t);
  10366. break;
  10367. case Po.BODY:
  10368. case Po.CAPTION:
  10369. case Po.COL:
  10370. case Po.COLGROUP:
  10371. case Po.HTML:
  10372. case Po.TBODY:
  10373. case Po.TD:
  10374. case Po.TFOOT:
  10375. case Po.TH:
  10376. case Po.THEAD:
  10377. case Po.TR:
  10378. break;
  10379. default:
  10380. dl(e, t)
  10381. }
  10382. }
  10383. function dl(e, t) {
  10384. const n = e.fosterParentingEnabled;
  10385. e.fosterParentingEnabled = !0, el(e, t), e.fosterParentingEnabled = n
  10386. }
  10387. function El(e, t) {
  10388. e.pendingCharacterTokens.push(t)
  10389. }
  10390. function ml(e, t) {
  10391. e.pendingCharacterTokens.push(t), e.hasNonWhitespacePendingCharacterToken = !0
  10392. }
  10393. function Tl(e, t) {
  10394. let n = 0;
  10395. if (e.hasNonWhitespacePendingCharacterToken)
  10396. for (; n < e.pendingCharacterTokens.length; n++) dl(e, e.pendingCharacterTokens[n]);
  10397. else
  10398. for (; n < e.pendingCharacterTokens.length; n++) e._insertCharacters(e.pendingCharacterTokens[n]);
  10399. e.insertionMode = e.originalInsertionMode, e._processToken(t)
  10400. }
  10401. const _l = new Set([Po.CAPTION, Po.COL, Po.COLGROUP, Po.TBODY, Po.TD, Po.TFOOT, Po.TH, Po.THEAD, Po.TR]);
  10402. function Al(e, t) {
  10403. switch (t.tagID) {
  10404. case Po.HTML:
  10405. ol(e, t);
  10406. break;
  10407. case Po.COL:
  10408. e._appendElement(t, vo.HTML), t.ackSelfClosing = !0;
  10409. break;
  10410. case Po.TEMPLATE:
  10411. Xc(e, t);
  10412. break;
  10413. default:
  10414. gl(e, t)
  10415. }
  10416. }
  10417. function gl(e, t) {
  10418. e.openElements.currentTagId === Po.COLGROUP && (e.openElements.pop(), e.insertionMode = Rc.IN_TABLE, e._processToken(t))
  10419. }
  10420. function Nl(e, t) {
  10421. switch (t.tagID) {
  10422. case Po.TR:
  10423. e.openElements.clearBackToTableBodyContext(), e._insertElement(t, vo.HTML), e.insertionMode = Rc.IN_ROW;
  10424. break;
  10425. case Po.TH:
  10426. case Po.TD:
  10427. e.openElements.clearBackToTableBodyContext(), e._insertFakeElement(Mo.TR, Po.TR), e.insertionMode = Rc.IN_ROW, Il(e, t);
  10428. break;
  10429. case Po.CAPTION:
  10430. case Po.COL:
  10431. case Po.COLGROUP:
  10432. case Po.TBODY:
  10433. case Po.TFOOT:
  10434. case Po.THEAD:
  10435. e.openElements.hasTableBodyContextInTableScope() && (e.openElements.clearBackToTableBodyContext(), e.openElements.pop(), e.insertionMode = Rc.IN_TABLE, pl(e, t));
  10436. break;
  10437. default:
  10438. pl(e, t)
  10439. }
  10440. }
  10441. function Cl(e, t) {
  10442. const n = t.tagID;
  10443. switch (t.tagID) {
  10444. case Po.TBODY:
  10445. case Po.TFOOT:
  10446. case Po.THEAD:
  10447. e.openElements.hasInTableScope(n) && (e.openElements.clearBackToTableBodyContext(), e.openElements.pop(), e.insertionMode = Rc.IN_TABLE);
  10448. break;
  10449. case Po.TABLE:
  10450. e.openElements.hasTableBodyContextInTableScope() && (e.openElements.clearBackToTableBodyContext(), e.openElements.pop(), e.insertionMode = Rc.IN_TABLE, fl(e, t));
  10451. break;
  10452. case Po.BODY:
  10453. case Po.CAPTION:
  10454. case Po.COL:
  10455. case Po.COLGROUP:
  10456. case Po.HTML:
  10457. case Po.TD:
  10458. case Po.TH:
  10459. case Po.TR:
  10460. break;
  10461. default:
  10462. fl(e, t)
  10463. }
  10464. }
  10465. function Il(e, t) {
  10466. switch (t.tagID) {
  10467. case Po.TH:
  10468. case Po.TD:
  10469. e.openElements.clearBackToTableRowContext(), e._insertElement(t, vo.HTML), e.insertionMode = Rc.IN_CELL, e.activeFormattingElements.insertMarker();
  10470. break;
  10471. case Po.CAPTION:
  10472. case Po.COL:
  10473. case Po.COLGROUP:
  10474. case Po.TBODY:
  10475. case Po.TFOOT:
  10476. case Po.THEAD:
  10477. case Po.TR:
  10478. e.openElements.hasInTableScope(Po.TR) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = Rc.IN_TABLE_BODY, Nl(e, t));
  10479. break;
  10480. default:
  10481. pl(e, t)
  10482. }
  10483. }
  10484. function Sl(e, t) {
  10485. switch (t.tagID) {
  10486. case Po.TR:
  10487. e.openElements.hasInTableScope(Po.TR) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = Rc.IN_TABLE_BODY);
  10488. break;
  10489. case Po.TABLE:
  10490. e.openElements.hasInTableScope(Po.TR) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = Rc.IN_TABLE_BODY, Cl(e, t));
  10491. break;
  10492. case Po.TBODY:
  10493. case Po.TFOOT:
  10494. case Po.THEAD:
  10495. (e.openElements.hasInTableScope(t.tagID) || e.openElements.hasInTableScope(Po.TR)) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = Rc.IN_TABLE_BODY, Cl(e, t));
  10496. break;
  10497. case Po.BODY:
  10498. case Po.CAPTION:
  10499. case Po.COL:
  10500. case Po.COLGROUP:
  10501. case Po.HTML:
  10502. case Po.TD:
  10503. case Po.TH:
  10504. break;
  10505. default:
  10506. fl(e, t)
  10507. }
  10508. }
  10509. function bl(e, t) {
  10510. switch (t.tagID) {
  10511. case Po.HTML:
  10512. ol(e, t);
  10513. break;
  10514. case Po.OPTION:
  10515. e.openElements.currentTagId === Po.OPTION && e.openElements.pop(), e._insertElement(t, vo.HTML);
  10516. break;
  10517. case Po.OPTGROUP:
  10518. e.openElements.currentTagId === Po.OPTION && e.openElements.pop(), e.openElements.currentTagId === Po.OPTGROUP && e.openElements.pop(), e._insertElement(t, vo.HTML);
  10519. break;
  10520. case Po.INPUT:
  10521. case Po.KEYGEN:
  10522. case Po.TEXTAREA:
  10523. case Po.SELECT:
  10524. e.openElements.hasInSelectScope(Po.SELECT) && (e.openElements.popUntilTagNamePopped(Po.SELECT), e._resetInsertionMode(), t.tagID !== Po.SELECT && e._processStartTag(t));
  10525. break;
  10526. case Po.SCRIPT:
  10527. case Po.TEMPLATE:
  10528. Xc(e, t)
  10529. }
  10530. }
  10531. function Ol(e, t) {
  10532. switch (t.tagID) {
  10533. case Po.OPTGROUP:
  10534. e.openElements.stackTop > 0 && e.openElements.currentTagId === Po.OPTION && e.openElements.tagIDs[e.openElements.stackTop - 1] === Po.OPTGROUP && e.openElements.pop(), e.openElements.currentTagId === Po.OPTGROUP && e.openElements.pop();
  10535. break;
  10536. case Po.OPTION:
  10537. e.openElements.currentTagId === Po.OPTION && e.openElements.pop();
  10538. break;
  10539. case Po.SELECT:
  10540. e.openElements.hasInSelectScope(Po.SELECT) && (e.openElements.popUntilTagNamePopped(Po.SELECT), e._resetInsertionMode());
  10541. break;
  10542. case Po.TEMPLATE:
  10543. $c(e, t)
  10544. }
  10545. }
  10546. function yl(e, t) {
  10547. e.openElements.tmplCount > 0 ? (e.openElements.popUntilTagNamePopped(Po.TEMPLATE), e.activeFormattingElements.clearToLastMarker(), e.tmplInsertionModeStack.shift(), e._resetInsertionMode(), e.onEof(t)) : jc(e, t)
  10548. }
  10549. function Ll(e, t) {
  10550. var n;
  10551. if (t.tagID === Po.HTML) {
  10552. if (e.fragmentContext || (e.insertionMode = Rc.AFTER_AFTER_BODY), e.options.sourceCodeLocationInfo && e.openElements.tagIDs[0] === Po.HTML) {
  10553. e._setEndLocation(e.openElements.items[0], t);
  10554. const r = e.openElements.items[1];
  10555. r && !(null === (n = e.treeAdapter.getNodeSourceCodeLocation(r)) || void 0 === n ? void 0 : n.endTag) && e._setEndLocation(r, t)
  10556. }
  10557. } else kl(e, t)
  10558. }
  10559. function kl(e, t) {
  10560. e.insertionMode = Rc.IN_BODY, el(e, t)
  10561. }
  10562. function vl(e, t) {
  10563. e.insertionMode = Rc.IN_BODY, el(e, t)
  10564. }
  10565. function Dl(e) {
  10566. for (; e.treeAdapter.getNamespaceURI(e.openElements.current) !== vo.HTML && !e._isIntegrationPoint(e.openElements.currentTagId, e.openElements.current);) e.openElements.pop()
  10567. }
  10568. var Rl = Ke((function(e, t) {
  10569. Object.defineProperty(t, "__esModule", {
  10570. value: !0
  10571. }), t.escapeText = t.escapeAttribute = t.escapeUTF8 = t.escape = t.encodeXML = t.getCodePoint = t.xmlReplacer = void 0, t.xmlReplacer = /["&'<>$\x80-\uFFFF]/g;
  10572. var n = new Map([
  10573. [34, "&quot;"],
  10574. [38, "&amp;"],
  10575. [39, "&apos;"],
  10576. [60, "&lt;"],
  10577. [62, "&gt;"]
  10578. ]);
  10579. function r(e) {
  10580. for (var r, i = "", s = 0; null !== (r = t.xmlReplacer.exec(e));) {
  10581. var a = r.index,
  10582. o = e.charCodeAt(a),
  10583. c = n.get(o);
  10584. void 0 !== c ? (i += e.substring(s, a) + c, s = a + 1) : (i += "".concat(e.substring(s, a), "&#x").concat((0, t.getCodePoint)(e, a).toString(16), ";"), s = t.xmlReplacer.lastIndex += Number(55296 == (64512 & o)))
  10585. }
  10586. return i + e.substr(s)
  10587. }
  10588. function i(e, t) {
  10589. return function(n) {
  10590. for (var r, i = 0, s = ""; r = e.exec(n);) i !== r.index && (s += n.substring(i, r.index)), s += t.get(r[0].charCodeAt(0)), i = r.index + 1;
  10591. return s + n.substring(i)
  10592. }
  10593. }
  10594. t.getCodePoint = null != String.prototype.codePointAt ? function(e, t) {
  10595. return e.codePointAt(t)
  10596. } : function(e, t) {
  10597. return 55296 == (64512 & e.charCodeAt(t)) ? 1024 * (e.charCodeAt(t) - 55296) + e.charCodeAt(t + 1) - 56320 + 65536 : e.charCodeAt(t)
  10598. }, t.encodeXML = r, t.escape = r, t.escapeUTF8 = i(/[&<>'"]/g, n), t.escapeAttribute = i(/["&\u00A0]/g, new Map([
  10599. [34, "&quot;"],
  10600. [38, "&amp;"],
  10601. [160, "&nbsp;"]
  10602. ])), t.escapeText = i(/[&<>\u00A0]/g, new Map([
  10603. [38, "&amp;"],
  10604. [60, "&lt;"],
  10605. [62, "&gt;"],
  10606. [160, "&nbsp;"]
  10607. ]))
  10608. }));
  10609. qe(Rl);
  10610. var Ml = Rl.escapeText,
  10611. Pl = Rl.escapeAttribute;
  10612. Rl.escapeUTF8, Rl.escape, Rl.encodeXML, Rl.getCodePoint, Rl.xmlReplacer;
  10613. const xl = new Set([Mo.AREA, Mo.BASE, Mo.BASEFONT, Mo.BGSOUND, Mo.BR, Mo.COL, Mo.EMBED, Mo.FRAME, Mo.HR, Mo.IMG, Mo.INPUT, Mo.KEYGEN, Mo.LINK, Mo.META, Mo.PARAM, Mo.SOURCE, Mo.TRACK, Mo.WBR]);
  10614. const wl = {
  10615. treeAdapter: Ec,
  10616. scriptingEnabled: !0
  10617. };
  10618. function Bl(e, t) {
  10619. return Fl(e, {
  10620. ...wl,
  10621. ...t
  10622. })
  10623. }
  10624. function Fl(e, t) {
  10625. return t.treeAdapter.isElementNode(e) ? function(e, t) {
  10626. const n = t.treeAdapter.getTagName(e);
  10627. return `<${n}${function(e,{treeAdapter:t}){let n="";for(const r of t.getAttrList(e)){if(n+=" ",r.namespace)switch(r.namespace){case vo.XML:n+=`
  10628. xml: $ {
  10629. r.name
  10630. }
  10631. `;break;case vo.XMLNS:"xmlns"!==r.name&&(n+="xmlns:"),n+=r.name;break;case vo.XLINK:n+=`
  10632. xlink: $ {
  10633. r.name
  10634. }
  10635. `;break;default:n+=`
  10636. $ {
  10637. r.prefix
  10638. }: $ {
  10639. r.name
  10640. }
  10641. `}else n+=r.name;n+=` = "${Pl(r.value)}"
  10642. `}return n}(e,t)}>${function(e,t){return t.treeAdapter.isElementNode(e)&&t.treeAdapter.getNamespaceURI(e)===vo.HTML&&xl.has(t.treeAdapter.getTagName(e))}(e,t)?"":`
  10643. $ {
  10644. function(e, t) {
  10645. let n = "";
  10646. const r = t.treeAdapter.isElementNode(e) && t.treeAdapter.getTagName(e) === Mo.TEMPLATE && t.treeAdapter.getNamespaceURI(e) === vo.HTML ? t.treeAdapter.getTemplateContent(e) : e,
  10647. i = t.treeAdapter.getChildNodes(r);
  10648. if (i)
  10649. for (const e of i) n += Fl(e, t);
  10650. return n
  10651. }(e, t)
  10652. } < /${n}>`}`}(e,t):t.treeAdapter.isTextNode(e)?function(e,t){const{treeAdapter:n}=t,r=n.getTextNodeContent(e),i=n.getParentNode(e),s=i&&n.isElementNode(i)&&n.getTagName(i);return s&&n.getNamespaceURI(i)===vo.HTML&&(a=s,o=t.scriptingEnabled,Yo.has(a)||o&&a===Mo.NOSCRIPT)?r:Ml(r);var a,o}(e,t):t.treeAdapter.isCommentNode(e)?function(e,{treeAdapter:t}){return`\x3c!--${t.getCommentNodeContent(e)}--\x3e`}(e,t):t.treeAdapter.isDocumentTypeNode(e)?function(e,{treeAdapter:t}){return`<!DOCTYPE ${t.getDocumentTypeNodeName(e)}>`}(e,t):""}function Ul(e){return new m(e)}function Hl(e){const t=e.includes('"')?"'":'"';return t+e+t}const Gl={isCommentNode:O,isElementNode:I,isTextNode:b,createDocument(){const e=new N([]);return e["x-mode"]=Ro.NO_QUIRKS,e},createDocumentFragment:()=>new N([]),createElement(e,t,n){const r=Object.create(null),i=Object.create(null),s=Object.create(null);for(let e=0;e<n.length;e++){const t=n[e].name;r[t]=n[e].value,i[t]=n[e].namespace,s[t]=n[e].prefix}const a=new C(e,r,[]);return a.namespace=t,a["x-attribsNamespace"]=i,a["x-attribsPrefix"]=s,a},createCommentNode:e=>new T(e),appendChild(e,t){const n=e.children[e.children.length-1];n&&(n.next=t,t.prev=n),e.children.push(t),t.parent=e},insertBefore(e,t,n){const r=e.children.indexOf(n),{prev:i}=n;i&&(i.next=t,t.prev=i),n.prev=t,t.next=n,e.children.splice(r,0,t),t.parent=e},setTemplateContent(e,t){Gl.appendChild(e,t)},getTemplateContent:e=>e.children[0],setDocumentType(e,t,n,r){const i=function(e,t,n){let r="!DOCTYPE ";return e&&(r+=e),t?r+=` PUBLIC ${Hl(t)}`:n&&(r+=" SYSTEM"),n&&(r+=` ${Hl(n)}`),r}(t,n,r);let s=e.children.find((e=>y(e)&&"!doctype"===e.name));s?s.data=null!=i?i:null:(s=new _("!doctype",i),Gl.appendChild(e,s)),s["x-name"]=null!=t?t:void 0,s["x-publicId"]=null!=n?n:void 0,s["x-systemId"]=null!=r?r:void 0},setDocumentMode(e,t){e["x-mode"]=t},getDocumentMode:e=>e["x-mode"],detachNode(e){if(e.parent){const t=e.parent.children.indexOf(e),{prev:n,next:r}=e;e.prev=null,e.next=null,n&&(n.next=r),r&&(r.prev=n),e.parent.children.splice(t,1),e.parent=null}},insertText(e,t){const n=e.children[e.children.length-1];n&&b(n)?n.data+=t:Gl.appendChild(e,Ul(t))},insertTextBefore(e,t,n){const r=e.children[e.children.indexOf(n)-1];r&&b(r)?r.data+=t:Gl.insertBefore(e,Ul(t),n)},adoptAttributes(e,t){for(let n=0;n<t.length;n++){const r=t[n].name;void 0===e.attribs[r]&&(e.attribs[r]=t[n].value,e["x-attribsNamespace"][r]=t[n].namespace,e["x-attribsPrefix"][r]=t[n].prefix)}},getFirstChild:e=>e.children[0],getChildNodes:e=>e.children,getParentNode:e=>e.parent,getAttrList:e=>e.attributes,getTagName:e=>e.name,getNamespaceURI:e=>e.namespace,getTextNodeContent:e=>e.data,getCommentNodeContent:e=>e.data,getDocumentTypeNodeName(e){var t;return null!==(t=e["x-name"])&&void 0!==t?t:""},getDocumentTypeNodePublicId(e){var t;return null!==(t=e["x-publicId"])&&void 0!==t?t:""},getDocumentTypeNodeSystemId(e){var t;return null!==(t=e["x-systemId"])&&void 0!==t?t:""},isDocumentTypeNode:e=>y(e)&&"!doctype"===e.name,setNodeSourceCodeLocation(e,t){t&&(e.startIndex=t.startOffset,e.endIndex=t.endOffset),e.sourceCodeLocation=t},getNodeSourceCodeLocation:e=>e.sourceCodeLocation,updateNodeSourceCodeLocation(e,t){null!=t.endOffset&&(e.endIndex=t.endOffset),e.sourceCodeLocation={...e.sourceCodeLocation,...t}}};var Yl=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,s=t.length;i<s;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};function ql(e,t,n,r){var i={scriptingEnabled:"boolean"!=typeof t.scriptingEnabled||t.scriptingEnabled,treeAdapter:Gl,sourceCodeLocationInfo:t.sourceCodeLocationInfo};return n?function(e,t){return wc.parse(e,t)}(e,i):function(e,t,n){"string"==typeof e&&(n=t,t=e,e=null);const r=wc.getFragmentParser(e,n);return r.tokenizer.write(t,!0),r.getFragment()}(r,e,i)}var Kl,jl,Vl,Wl={treeAdapter:Gl};function Ql(e){return e===Kl.Space||e===Kl.NewLine||e===Kl.Tab||e===Kl.FormFeed||e===Kl.CarriageReturn}function Xl(e){return e===Kl.Slash||e===Kl.Gt||Ql(e)}function $l(e){return e>=Kl.Zero&&e<=Kl.Nine}!function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Num=35]="Num",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"}(Kl||(Kl={})),function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.InSpecialComment=20]="InSpecialComment",e[e.InCommentLike=21]="InCommentLike",e[e.BeforeSpecialS=22]="BeforeSpecialS",e[e.SpecialStartSequence=23]="SpecialStartSequence",e[e.InSpecialTag=24]="InSpecialTag",e[e.BeforeEntity=25]="BeforeEntity",e[e.BeforeNumericEntity=26]="BeforeNumericEntity",e[e.InNamedEntity=27]="InNamedEntity",e[e.InNumericEntity=28]="InNumericEntity",e[e.InHexEntity=29]="InHexEntity"}(jl||(jl={})),function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"}(Vl||(Vl={}));const zl={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])};class Jl{constructor({xmlMode:e=!1,decodeEntities:t=!0},n){this.cbs=n,this.state=jl.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=jl.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=e,this.decodeEntities=t,this.entityTrie=e?xo:wo}reset(){this.state=jl.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=jl.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(e){this.offset+=this.buffer.length,this.buffer=e,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()}getIndex(){return this.index}getSectionStart(){return this.sectionStart}stateText(e){e===Kl.Lt||!this.decodeEntities&&this.fastForwardTo(Kl.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=jl.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&e===Kl.Amp&&(this.state=jl.BeforeEntity)}stateSpecialStartSequence(e){const t=this.sequenceIndex===this.currentSequence.length;if(t?Xl(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t)return void this.sequenceIndex++}else this.isSpecial=!1;this.sequenceIndex=0,this.state=jl.InTagName,this.stateInTagName(e)}stateInSpecialTag(e){if(this.sequenceIndex===this.currentSequence.length){if(e===Kl.Gt||Ql(e)){const t=this.index-this.currentSequence.length;if(this.sectionStart<t){const e=this.index;this.index=t,this.cbs.ontext(this.sectionStart,t),this.index=e}return this.isSpecial=!1,this.sectionStart=t+2,void this.stateInClosingTagName(e)}this.sequenceIndex=0}(32|e)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:0===this.sequenceIndex?this.currentSequence===zl.TitleEnd?this.decodeEntities&&e===Kl.Amp&&(this.state=jl.BeforeEntity):this.fastForwardTo(Kl.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=Number(e===Kl.Lt)}stateCDATASequence(e){e===zl.Cdata[this.sequenceIndex]?++this.sequenceIndex===zl.Cdata.length&&(this.state=jl.InCommentLike,this.currentSequence=zl.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=jl.InDeclaration,this.stateInDeclaration(e))}fastForwardTo(e){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===e)return!0;return this.index=this.buffer.length+this.offset-1,!1}stateInCommentLike(e){e===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===zl.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=jl.Text):0===this.sequenceIndex?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}isTagStartChar(e){return this.xmlMode?!Xl(e):function(e){return e>=Kl.LowerA&&e<=Kl.LowerZ||e>=Kl.UpperA&&e<=Kl.UpperZ}(e)}startSpecial(e,t){this.isSpecial=!0,this.currentSequence=e,this.sequenceIndex=t,this.state=jl.SpecialStartSequence}stateBeforeTagName(e){if(e===Kl.ExclamationMark)this.state=jl.BeforeDeclaration,this.sectionStart=this.index+1;else if(e===Kl.Questionmark)this.state=jl.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(e)){const t=32|e;this.sectionStart=this.index,this.xmlMode||t!==zl.TitleEnd[2]?this.state=this.xmlMode||t!==zl.ScriptEnd[2]?jl.InTagName:jl.BeforeSpecialS:this.startSpecial(zl.TitleEnd,3)}else e===Kl.Slash?this.state=jl.BeforeClosingTagName:(this.state=jl.Text,this.stateText(e))}stateInTagName(e){Xl(e)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=jl.BeforeAttributeName,this.stateBeforeAttributeName(e))}stateBeforeClosingTagName(e){Ql(e)||(e===Kl.Gt?this.state=jl.Text:(this.state=this.isTagStartChar(e)?jl.InClosingTagName:jl.InSpecialComment,this.sectionStart=this.index))}stateInClosingTagName(e){(e===Kl.Gt||Ql(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=jl.AfterClosingTagName,this.stateAfterClosingTagName(e))}stateAfterClosingTagName(e){(e===Kl.Gt||this.fastForwardTo(Kl.Gt))&&(this.state=jl.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(e){e===Kl.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=jl.InSpecialTag,this.sequenceIndex=0):this.state=jl.Text,this.baseState=this.state,this.sectionStart=this.index+1):e===Kl.Slash?this.state=jl.InSelfClosingTag:Ql(e)||(this.state=jl.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(e){e===Kl.Gt?(this.cbs.onselfclosingtag(this.index),this.state=jl.Text,this.baseState=jl.Text,this.sectionStart=this.index+1,this.isSpecial=!1):Ql(e)||(this.state=jl.BeforeAttributeName,this.stateBeforeAttributeName(e))}stateInAttributeName(e){(e===Kl.Eq||Xl(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=-1,this.state=jl.AfterAttributeName,this.stateAfterAttributeName(e))}stateAfterAttributeName(e){e===Kl.Eq?this.state=jl.BeforeAttributeValue:e===Kl.Slash||e===Kl.Gt?(this.cbs.onattribend(Vl.NoValue,this.index),this.state=jl.BeforeAttributeName,this.stateBeforeAttributeName(e)):Ql(e)||(this.cbs.onattribend(Vl.NoValue,this.index),this.state=jl.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(e){e===Kl.DoubleQuote?(this.state=jl.InAttributeValueDq,this.sectionStart=this.index+1):e===Kl.SingleQuote?(this.state=jl.InAttributeValueSq,this.sectionStart=this.index+1):Ql(e)||(this.sectionStart=this.index,this.state=jl.InAttributeValueNq,this.stateInAttributeValueNoQuotes(e))}handleInAttributeValue(e,t){e===t||!this.decodeEntities&&this.fastForwardTo(t)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(t===Kl.DoubleQuote?Vl.Double:Vl.Single,this.index),this.state=jl.BeforeAttributeName):this.decodeEntities&&e===Kl.Amp&&(this.baseState=this.state,this.state=jl.BeforeEntity)}stateInAttributeValueDoubleQuotes(e){this.handleInAttributeValue(e,Kl.DoubleQuote)}stateInAttributeValueSingleQuotes(e){this.handleInAttributeValue(e,Kl.SingleQuote)}stateInAttributeValueNoQuotes(e){Ql(e)||e===Kl.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(Vl.Unquoted,this.index),this.state=jl.BeforeAttributeName,this.stateBeforeAttributeName(e)):this.decodeEntities&&e===Kl.Amp&&(this.baseState=this.state,this.state=jl.BeforeEntity)}stateBeforeDeclaration(e){e===Kl.OpeningSquareBracket?(this.state=jl.CDATASequence,this.sequenceIndex=0):this.state=e===Kl.Dash?jl.BeforeComment:jl.InDeclaration}stateInDeclaration(e){(e===Kl.Gt||this.fastForwardTo(Kl.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=jl.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(e){(e===Kl.Gt||this.fastForwardTo(Kl.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=jl.Text,this.sectionStart=this.index+1)}stateBeforeComment(e){e===Kl.Dash?(this.state=jl.InCommentLike,this.currentSequence=zl.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=jl.InDeclaration}stateInSpecialComment(e){(e===Kl.Gt||this.fastForwardTo(Kl.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=jl.Text,this.sectionStart=this.index+1)}stateBeforeSpecialS(e){const t=32|e;t===zl.ScriptEnd[3]?this.startSpecial(zl.ScriptEnd,4):t===zl.StyleEnd[3]?this.startSpecial(zl.StyleEnd,4):(this.state=jl.InTagName,this.stateInTagName(e))}stateBeforeEntity(e){this.entityExcess=1,this.entityResult=0,e===Kl.Num?this.state=jl.BeforeNumericEntity:e===Kl.Amp||(this.trieIndex=0,this.trieCurrent=this.entityTrie[0],this.state=jl.InNamedEntity,this.stateInNamedEntity(e))}stateInNamedEntity(e){if(this.entityExcess+=1,this.trieIndex=Oo(this.entityTrie,this.trieCurrent,this.trieIndex+1,e),this.trieIndex<0)return this.emitNamedEntity(),void this.index--;this.trieCurrent=this.entityTrie[this.trieIndex];const t=this.trieCurrent&yo.VALUE_LENGTH;if(t){const n=(t>>14)-1;if(this.allowLegacyEntity()||e===Kl.Semi){const e=this.index-this.entityExcess+1;e>this.sectionStart&&this.emitPartial(this.sectionStart,e),this.entityResult=this.trieIndex,this.trieIndex+=n,this.entityExcess=0,this.sectionStart=this.index+1,0===n&&this.emitNamedEntity()}else this.trieIndex+=n}}emitNamedEntity(){if(this.state=this.baseState,0===this.entityResult)return;switch((this.entityTrie[this.entityResult]&yo.VALUE_LENGTH)>>14){case 1:this.emitCodePoint(this.entityTrie[this.entityResult]&~yo.VALUE_LENGTH);break;case 2:this.emitCodePoint(this.entityTrie[this.entityResult+1]);break;case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}}stateBeforeNumericEntity(e){(32|e)===Kl.LowerX?(this.entityExcess++,this.state=jl.InHexEntity):(this.state=jl.InNumericEntity,this.stateInNumericEntity(e))}emitNumericEntity(e){const t=this.index-this.entityExcess-1;t+2+Number(this.state===jl.InHexEntity)!==this.index&&(t>this.sectionStart&&this.emitPartial(this.sectionStart,t),this.sectionStart=this.index+Number(e),this.emitCodePoint(ko(this.entityResult))),this.state=this.baseState}stateInNumericEntity(e){e===Kl.Semi?this.emitNumericEntity(!0):$l(e)?(this.entityResult=10*this.entityResult+(e-Kl.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)}stateInHexEntity(e){e===Kl.Semi?this.emitNumericEntity(!0):$l(e)?(this.entityResult=16*this.entityResult+(e-Kl.Zero),this.entityExcess++):!function(e){return e>=Kl.UpperA&&e<=Kl.UpperF||e>=Kl.LowerA&&e<=Kl.LowerF}(e)?(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--):(this.entityResult=16*this.entityResult+((32|e)-Kl.LowerA+10),this.entityExcess++)}allowLegacyEntity(){return!this.xmlMode&&(this.baseState===jl.Text||this.baseState===jl.InSpecialTag)}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===jl.Text||this.state===jl.InSpecialTag&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):this.state!==jl.InAttributeValueDq&&this.state!==jl.InAttributeValueSq&&this.state!==jl.InAttributeValueNq||(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}shouldContinue(){return this.index<this.buffer.length+this.offset&&this.running}parse(){for(;this.shouldContinue();){const e=this.buffer.charCodeAt(this.index-this.offset);this.state===jl.Text?this.stateText(e):this.state===jl.SpecialStartSequence?this.stateSpecialStartSequence(e):this.state===jl.InSpecialTag?this.stateInSpecialTag(e):this.state===jl.CDATASequence?this.stateCDATASequence(e):this.state===jl.InAttributeValueDq?this.stateInAttributeValueDoubleQuotes(e):this.state===jl.InAttributeName?this.stateInAttributeName(e):this.state===jl.InCommentLike?this.stateInCommentLike(e):this.state===jl.InSpecialComment?this.stateInSpecialComment(e):this.state===jl.BeforeAttributeName?this.stateBeforeAttributeName(e):this.state===jl.InTagName?this.stateInTagName(e):this.state===jl.InClosingTagName?this.stateInClosingTagName(e):this.state===jl.BeforeTagName?this.stateBeforeTagName(e):this.state===jl.AfterAttributeName?this.stateAfterAttributeName(e):this.state===jl.InAttributeValueSq?this.stateInAttributeValueSingleQuotes(e):this.state===jl.BeforeAttributeValue?this.stateBeforeAttributeValue(e):this.state===jl.BeforeClosingTagName?this.stateBeforeClosingTagName(e):this.state===jl.AfterClosingTagName?this.stateAfterClosingTagName(e):this.state===jl.BeforeSpecialS?this.stateBeforeSpecialS(e):this.state===jl.InAttributeValueNq?this.stateInAttributeValueNoQuotes(e):this.state===jl.InSelfClosingTag?this.stateInSelfClosingTag(e):this.state===jl.InDeclaration?this.stateInDeclaration(e):this.state===jl.BeforeDeclaration?this.stateBeforeDeclaration(e):this.state===jl.BeforeComment?this.stateBeforeComment(e):this.state===jl.InProcessingInstruction?this.stateInProcessingInstruction(e):this.state===jl.InNamedEntity?this.stateInNamedEntity(e):this.state===jl.BeforeEntity?this.stateBeforeEntity(e):this.state===jl.InHexEntity?this.stateInHexEntity(e):this.state===jl.InNumericEntity?this.stateInNumericEntity(e):this.stateBeforeNumericEntity(e),this.index++}this.cleanup()}finish(){this.state===jl.InNamedEntity&&this.emitNamedEntity(),this.sectionStart<this.index&&this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const e=this.buffer.length+this.offset;this.state===jl.InCommentLike?this.currentSequence===zl.CdataEnd?this.cbs.oncdata(this.sectionStart,e,0):this.cbs.oncomment(this.sectionStart,e,0):this.state===jl.InNumericEntity&&this.allowLegacyEntity()||this.state===jl.InHexEntity&&this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state===jl.InTagName||this.state===jl.BeforeAttributeName||this.state===jl.BeforeAttributeValue||this.state===jl.AfterAttributeName||this.state===jl.InAttributeName||this.state===jl.InAttributeValueSq||this.state===jl.InAttributeValueDq||this.state===jl.InAttributeValueNq||this.state===jl.InClosingTagName||this.cbs.ontext(this.sectionStart,e)}emitPartial(e,t){this.baseState!==jl.Text&&this.baseState!==jl.InSpecialTag?this.cbs.onattribdata(e,t):this.cbs.ontext(e,t)}emitCodePoint(e){this.baseState!==jl.Text&&this.baseState!==jl.InSpecialTag?this.cbs.onattribentity(e):this.cbs.ontextentity(e)}}const Zl=new Set(["input","option","optgroup","select","button","datalist","textarea"]),eh=new Set(["p"]),th=new Set(["thead","tbody"]),nh=new Set(["dd","dt"]),rh=new Set(["rt","rp"]),ih=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",eh],["h1",eh],["h2",eh],["h3",eh],["h4",eh],["h5",eh],["h6",eh],["select",Zl],["input",Zl],["output",Zl],["button",Zl],["datalist",Zl],["textarea",Zl],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",nh],["dt",nh],["address",eh],["article",eh],["aside",eh],["blockquote",eh],["details",eh],["div",eh],["dl",eh],["fieldset",eh],["figcaption",eh],["figure",eh],["footer",eh],["form",eh],["header",eh],["hr",eh],["main",eh],["nav",eh],["ol",eh],["pre",eh],["section",eh],["table",eh],["ul",eh],["rt",rh],["rp",rh],["tbody",th],["tfoot",th]]),sh=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),ah=new Set(["math","svg"]),oh=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),ch=/\
  10653. s | \ //;class lh{constructor(e,t={}){var n,r,i,s,a;this.options=t,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=null!=e?e:{},this.lowerCaseTagNames=null!==(n=t.lowerCaseTags)&&void 0!==n?n:!t.xmlMode,this.lowerCaseAttributeNames=null!==(r=t.lowerCaseAttributeNames)&&void 0!==r?r:!t.xmlMode,this.tokenizer=new(null!==(i=t.Tokenizer)&&void 0!==i?i:Jl)(this.options,this),null===(a=(s=this.cbs).onparserinit)||void 0===a||a.call(s,this)}ontext(e,t){var n,r;const i=this.getSlice(e,t);this.endIndex=t-1,null===(r=(n=this.cbs).ontext)||void 0===r||r.call(n,i),this.startIndex=t}ontextentity(e){var t,n;const r=this.tokenizer.getSectionStart();this.endIndex=r-1,null===(n=(t=this.cbs).ontext)||void 0===n||n.call(t,Lo(e)),this.startIndex=r}isVoidElement(e){return!this.options.xmlMode&&sh.has(e)}onopentagname(e,t){this.endIndex=t;let n=this.getSlice(e,t);this.lowerCaseTagNames&&(n=n.toLowerCase()),this.emitOpenTag(n)}emitOpenTag(e){var t,n,r,i;this.openTagStart=this.startIndex,this.tagname=e;const s=!this.options.xmlMode&&ih.get(e);if(s)for(;this.stack.length>0&&s.has(this.stack[this.stack.length-1]);){const e=this.stack.pop();null===(n=(t=this.cbs).onclosetag)||void 0===n||n.call(t,e,!0)}this.isVoidElement(e)||(this.stack.push(e),ah.has(e)?this.foreignContext.push(!0):oh.has(e)&&this.foreignContext.push(!1)),null===(i=(r=this.cbs).onopentagname)||void 0===i||i.call(r,e),this.cbs.onopentag&&(this.attribs={})}endOpenTag(e){var t,n;this.startIndex=this.openTagStart,this.attribs&&(null===(n=(t=this.cbs).onopentag)||void 0===n||n.call(t,this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1}onclosetag(e,t){var n,r,i,s,a,o;this.endIndex=t;let c=this.getSlice(e,t);if(this.lowerCaseTagNames&&(c=c.toLowerCase()),(ah.has(c)||oh.has(c))&&this.foreignContext.pop(),this.isVoidElement(c))this.options.xmlMode||"br"!==c||(null===(r=(n=this.cbs).onopentagname)||void 0===r||r.call(n,"br"),null===(s=(i=this.cbs).onopentag)||void 0===s||s.call(i,"br",{},!0),null===(o=(a=this.cbs).onclosetag)||void 0===o||o.call(a,"br",!1));else{const e=this.stack.lastIndexOf(c);if(-1!==e)if(this.cbs.onclosetag){let t=this.stack.length-e;for(;t--;)this.cbs.onclosetag(this.stack.pop(),0!==t)}else this.stack.length=e;else this.options.xmlMode||"p"!==c||(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=t+1}onselfclosingtag(e){this.endIndex=e,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=e+1):this.onopentagend(e)}closeCurrentTag(e){var t,n;const r=this.tagname;this.endOpenTag(e),this.stack[this.stack.length-1]===r&&(null===(n=(t=this.cbs).onclosetag)||void 0===n||n.call(t,r,!e),this.stack.pop())}onattribname(e,t){this.startIndex=e;const n=this.getSlice(e,t);this.attribname=this.lowerCaseAttributeNames?n.toLowerCase():n}onattribdata(e,t){this.attribvalue+=this.getSlice(e,t)}onattribentity(e){this.attribvalue+=Lo(e)}onattribend(e,t){var n,r;this.endIndex=t,null===(r=(n=this.cbs).onattribute)||void 0===r||r.call(n,this.attribname,this.attribvalue,e===Vl.Double?'"':e===Vl.Single?"'":e===Vl.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""}getInstructionName(e){const t=e.search(ch);let n=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(n=n.toLowerCase()),n}ondeclaration(e,t){this.endIndex=t;const n=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){const e=this.getInstructionName(n);this.cbs.onprocessinginstruction(`!${e}`,`!${n}`)}this.startIndex=t+1}onprocessinginstruction(e,t){this.endIndex=t;const n=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){const e=this.getInstructionName(n);this.cbs.onprocessinginstruction(`?${e}`,`?${n}`)}this.startIndex=t+1}oncomment(e,t,n){var r,i,s,a;this.endIndex=t,null===(i=(r=this.cbs).oncomment)||void 0===i||i.call(r,this.getSlice(e,t-n)),null===(a=(s=this.cbs).oncommentend)||void 0===a||a.call(s),this.startIndex=t+1}oncdata(e,t,n){var r,i,s,a,o,c,l,h,u,p;this.endIndex=t;const f=this.getSlice(e,t-n);this.options.xmlMode||this.options.recognizeCDATA?(null===(i=(r=this.cbs).oncdatastart)||void 0===i||i.call(r),null===(a=(s=this.cbs).ontext)||void 0===a||a.call(s,f),null===(c=(o=this.cbs).oncdataend)||void 0===c||c.call(o)):(null===(h=(l=this.cbs).oncomment)||void 0===h||h.call(l,`[CDATA[${f}]]`),null===(p=(u=this.cbs).oncommentend)||void 0===p||p.call(u)),this.startIndex=t+1}onend(){var e,t;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let e=this.stack.length;e>0;this.cbs.onclosetag(this.stack[--e],!0));}null===(t=(e=this.cbs).onend)||void 0===t||t.call(e)}reset(){var e,t,n,r;null===(t=(e=this.cbs).onreset)||void 0===t||t.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,null===(r=(n=this.cbs).onparserinit)||void 0===r||r.call(n,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(e){this.reset(),this.end(e)}getSlice(e,t){for(;e-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();let n=this.buffers[0].slice(e-this.bufferOffset,t-this.bufferOffset);for(;t-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),n+=this.buffers[0].slice(0,t-this.bufferOffset);return n}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(e){var t,n;this.ended?null===(n=(t=this.cbs).onerror)||void 0===n||n.call(t,new Error(".write() after done!")):(this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++))}end(e){var t,n;this.ended?null===(n=(t=this.cbs).onerror)||void 0===n||n.call(t,Error(".end() after done!")):(e&&this.write(e),this.ended=!0,this.tokenizer.end())}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()}parseChunk(e){this.write(e)}done(e){this.end(e)}}var hh=function(e){return function(t,n,r,i){if("undefined"!=typeof Buffer&&Buffer.isBuffer(t)&&(t=t.toString()),"string"==typeof t)return e(t,n,r,i);var s=t;if(!Array.isArray(s)&&L(s))return s;var a=new N([]);return Ba(s,a),a}}((function(e,t,n,r){return t.xmlMode||t._useHtmlParser2?function(e,t){const n=new M(void 0,t);return new lh(n,t).end(e),n.root}(e,t):ql(e,t,n,r)})),uh=function(e,t){return function r(s,a,o){if(void 0===o&&(o=!0),null==s)throw new Error("cheerio.load() expects a string");var c=no(no({},n),i(a)),l=e(s,c,o,null),h=function(n){function r(){return null!==n&&n.apply(this,arguments)||this}return to(r,n),r.prototype._make=function(e,t){var n=u(e,t);return n.prevObject=this,n},r.prototype._parse=function(t,n,r,i){return e(t,n,r,i)},r.prototype._render=function(e){return t(e,this.options)},r}(Za);function u(t,n,r,s){if(void 0===r&&(r=l),t&&wi(t))return t;var a=no(no({},c),i(s)),o="string"==typeof r?[e(r,a,!1,null)]:"length"in r?r:[r],u=wi(o)?o:new h(o,null,a);if(u._root=u,!t)return new h(void 0,u,a);var p,f="string"==typeof t&&Ui(t)?e(t,a,!1,null).children:(p=t).name||"root"===p.type||"text"===p.type||"comment"===p.type?[t]:Array.isArray(t)?t:void 0,d=new h(f,u,a);if(f)return d;if("string"!=typeof t)throw new Error("Unexpected type of selector");var E=t,m=n?"string"==typeof n?Ui(n)?new h([e(n,a,!1,null)],u,a):(E="".concat(n," ").concat(E),u):wi(n)?n:new h(Array.isArray(n)?n:[n],u,a):u;return m?m.find(E):d}return Object.assign(u,xi,{load:r,_root:l,_options:c,fn:h.prototype,prototype:h.prototype}),u}}(hh,(function(e,t){return t.xmlMode||t._useHtmlParser2?V(e,t):function(e){for(var t,n=("length"in e?e:[e]),r=0;r<n.length;r+=1)L(s=n[r])&&(t=Array.prototype.splice).call.apply(t,Yl([n,r,1],s.children,!1));var i="";for(r=0;r<n.length;r+=1){var s;i+=Bl(s=n[r],Wl)}return i}(e)}));function ph(e,t){return He({path:e,json:t})}function fh(e){return He(e)}function dh(e,t){return Ii(e,t)}var Eh=uh([]),mh=Di,Th=Ri,_h=ki,Ah=vi;export{mh as contains,Eh as default,Oi as html,dh as jinja2,ph as jp,fh as jpo,uh as load,Th as merge,_h as parseHTML,Ah as root,Li as text,yi as xml};