cheerio.min.js 490 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756
  1. var e, t = function() {
  2. return t = Object.assign || function(e) {
  3. for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
  4. return e
  5. }, t.apply(this, arguments)
  6. }, n = {
  7. xml: !1,
  8. decodeEntities: !0
  9. }, r = {
  10. _useHtmlParser2: !0,
  11. xmlMode: !0
  12. };
  13. function i(e) {
  14. return (null == e ? void 0 : e.xml) ? "boolean" == typeof e.xml ? r : t(t({}, r), e.xml) : null != e ? e : void 0
  15. }! function(e) {
  16. 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"
  17. }(e || (e = {}));
  18. const s = e.Root, a = e.Text, o = e.Directive, c = e.Comment, l = e.Script, h = e.Style, u = e.Tag, p = e.CDATA, f = e.Doctype;
  19. class d {
  20. constructor() {
  21. this.parent = null, this.prev = null, this.next = null, this.startIndex = null, this.endIndex = null
  22. }
  23. get parentNode() {
  24. return this.parent
  25. }
  26. set parentNode(e) {
  27. this.parent = e
  28. }
  29. get previousSibling() {
  30. return this.prev
  31. }
  32. set previousSibling(e) {
  33. this.prev = e
  34. }
  35. get nextSibling() {
  36. return this.next
  37. }
  38. set nextSibling(e) {
  39. this.next = e
  40. }
  41. cloneNode(e = !1) {
  42. return v(this, e)
  43. }
  44. }
  45. class E extends d {
  46. constructor(e) {
  47. super(), this.data = e
  48. }
  49. get nodeValue() {
  50. return this.data
  51. }
  52. set nodeValue(e) {
  53. this.data = e
  54. }
  55. }
  56. class m extends E {
  57. constructor() {
  58. super(...arguments), this.type = e.Text
  59. }
  60. get nodeType() {
  61. return 3
  62. }
  63. }
  64. class T extends E {
  65. constructor() {
  66. super(...arguments), this.type = e.Comment
  67. }
  68. get nodeType() {
  69. return 8
  70. }
  71. }
  72. class _ extends E {
  73. constructor(t, n) {
  74. super(n), this.name = t, this.type = e.Directive
  75. }
  76. get nodeType() {
  77. return 1
  78. }
  79. }
  80. class A extends d {
  81. constructor(e) {
  82. super(), this.children = e
  83. }
  84. get firstChild() {
  85. var e;
  86. return null !== (e = this.children[0]) && void 0 !== e ? e : null
  87. }
  88. get lastChild() {
  89. return this.children.length > 0 ? this.children[this.children.length - 1] : null
  90. }
  91. get childNodes() {
  92. return this.children
  93. }
  94. set childNodes(e) {
  95. this.children = e
  96. }
  97. }
  98. class g extends A {
  99. constructor() {
  100. super(...arguments), this.type = e.CDATA
  101. }
  102. get nodeType() {
  103. return 4
  104. }
  105. }
  106. class N extends A {
  107. constructor() {
  108. super(...arguments), this.type = e.Root
  109. }
  110. get nodeType() {
  111. return 9
  112. }
  113. }
  114. class C extends A {
  115. constructor(t, n, r = [], i = ("script" === t ? e.Script : "style" === t ? e.Style : e.Tag)) {
  116. super(r), this.name = t, this.attribs = n, this.type = i
  117. }
  118. get nodeType() {
  119. return 1
  120. }
  121. get tagName() {
  122. return this.name
  123. }
  124. set tagName(e) {
  125. this.name = e
  126. }
  127. get attributes() {
  128. return Object.keys(this.attribs)
  129. .map((e => {
  130. var t, n;
  131. return {
  132. name: e,
  133. value: this.attribs[e],
  134. namespace: null === (t = this["x-attribsNamespace"]) || void 0 === t ? void 0 : t[e],
  135. prefix: null === (n = this["x-attribsPrefix"]) || void 0 === n ? void 0 : n[e]
  136. }
  137. }))
  138. }
  139. }
  140. function I(t) {
  141. return (n = t)
  142. .type === e.Tag || n.type === e.Script || n.type === e.Style;
  143. var n
  144. }
  145. function S(t) {
  146. return t.type === e.CDATA
  147. }
  148. function b(t) {
  149. return t.type === e.Text
  150. }
  151. function O(t) {
  152. return t.type === e.Comment
  153. }
  154. function y(t) {
  155. return t.type === e.Directive
  156. }
  157. function L(t) {
  158. return t.type === e.Root
  159. }
  160. function k(e) {
  161. return Object.prototype.hasOwnProperty.call(e, "children")
  162. }
  163. function v(e, t = !1) {
  164. let n;
  165. if (b(e)) n = new m(e.data);
  166. else if (O(e)) n = new T(e.data);
  167. else if (I(e)) {
  168. const r = t ? D(e.children) : [], i = new C(e.name, {...e.attribs
  169. }, r);
  170. r.forEach((e => e.parent = i)), null != e.namespace && (i.namespace = e.namespace), e["x-attribsNamespace"] && (i["x-attribsNamespace"] = {...e["x-attribsNamespace"]
  171. }), e["x-attribsPrefix"] && (i["x-attribsPrefix"] = {...e["x-attribsPrefix"]
  172. }), n = i
  173. } else if (S(e)) {
  174. const r = t ? D(e.children) : [], i = new g(r);
  175. r.forEach((e => e.parent = i)), n = i
  176. } else if (L(e)) {
  177. const r = t ? D(e.children) : [], i = new N(r);
  178. r.forEach((e => e.parent = i)), e["x-mode"] && (i["x-mode"] = e["x-mode"]), n = i
  179. } else {
  180. if (!y(e)) throw new Error(`Not implemented yet: ${e.type}`); {
  181. const t = new _(e.name, e.data);
  182. null != e["x-name"] && (t["x-name"] = e["x-name"], t["x-publicId"] = e["x-publicId"], t["x-systemId"] = e["x-systemId"]), n = t
  183. }
  184. }
  185. return n.startIndex = e.startIndex, n.endIndex = e.endIndex, null != e.sourceCodeLocation && (n.sourceCodeLocation = e.sourceCodeLocation), n
  186. }
  187. function D(e) {
  188. const t = e.map((e => v(e, !0)));
  189. for (let e = 1; e < t.length; e++) t[e].prev = t[e - 1], t[e - 1].next = t[e];
  190. return t
  191. }
  192. const R = {
  193. withStartIndices: !1,
  194. withEndIndices: !1,
  195. xmlMode: !1
  196. };
  197. class M {
  198. constructor(e, t, n) {
  199. 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
  200. }
  201. onparserinit(e) {
  202. this.parser = e
  203. }
  204. onreset() {
  205. this.dom = [], this.root = new N(this.dom), this.done = !1, this.tagStack = [this.root], this.lastNode = null, this.parser = null
  206. }
  207. onend() {
  208. this.done || (this.done = !0, this.parser = null, this.handleCallback(null))
  209. }
  210. onerror(e) {
  211. this.handleCallback(e)
  212. }
  213. onclosetag() {
  214. this.lastNode = null;
  215. const e = this.tagStack.pop();
  216. this.options.withEndIndices && (e.endIndex = this.parser.endIndex), this.elementCB && this.elementCB(e)
  217. }
  218. onopentag(t, n) {
  219. const r = this.options.xmlMode ? e.Tag : void 0, i = new C(t, n, void 0, r);
  220. this.addNode(i), this.tagStack.push(i)
  221. }
  222. ontext(t) {
  223. const {
  224. lastNode: n
  225. } = this;
  226. if (n && n.type === e.Text) n.data += t, this.options.withEndIndices && (n.endIndex = this.parser.endIndex);
  227. else {
  228. const e = new m(t);
  229. this.addNode(e), this.lastNode = e
  230. }
  231. }
  232. oncomment(t) {
  233. if (this.lastNode && this.lastNode.type === e.Comment) return void(this.lastNode.data += t);
  234. const n = new T(t);
  235. this.addNode(n), this.lastNode = n
  236. }
  237. oncommentend() {
  238. this.lastNode = null
  239. }
  240. oncdatastart() {
  241. const e = new m(""), t = new g([e]);
  242. this.addNode(t), e.parent = t, this.lastNode = e
  243. }
  244. oncdataend() {
  245. this.lastNode = null
  246. }
  247. onprocessinginstruction(e, t) {
  248. const n = new _(e, t);
  249. this.addNode(n)
  250. }
  251. handleCallback(e) {
  252. if ("function" == typeof this.callback) this.callback(e, this.dom);
  253. else if (e) throw e
  254. }
  255. addNode(e) {
  256. const t = this.tagStack[this.tagStack.length - 1], n = t.children[t.children.length - 1];
  257. 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
  258. }
  259. }
  260. const P = /["&'<>$\x80-\uFFFF]/g, x = new Map([
  261. [34, "&quot;"],
  262. [38, "&amp;"],
  263. [39, "&apos;"],
  264. [60, "&lt;"],
  265. [62, "&gt;"]
  266. ]), 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);
  267. function B(e) {
  268. let t, n = "", r = 0;
  269. for (; null !== (t = P.exec(e));) {
  270. const i = t.index, s = e.charCodeAt(i), a = x.get(s);
  271. 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)))
  272. }
  273. return n + e.substr(r)
  274. }
  275. function F(e, t) {
  276. return function(n) {
  277. let r, i = 0, s = "";
  278. 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;
  279. return s + n.substring(i)
  280. }
  281. }
  282. const U = F(/["&\u00A0]/g, new Map([
  283. [34, "&quot;"],
  284. [38, "&amp;"],
  285. [160, "&nbsp;"]
  286. ])), H = F(/[&<>\u00A0]/g, new Map([
  287. [38, "&amp;"],
  288. [60, "&lt;"],
  289. [62, "&gt;"],
  290. [160, "&nbsp;"]
  291. ])), 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]))), 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]))), q = new Set(["style", "script", "xmp", "iframe", "noembed", "noframes", "plaintext", "noscript"]);
  292. function K(e) {
  293. return e.replace(/"/g, "&quot;")
  294. }
  295. const j = new Set(["area", "base", "basefont", "br", "col", "command", "embed", "frame", "hr", "img", "input", "isindex", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
  296. function V(e, t = {}) {
  297. const n = "length" in e ? e : [e];
  298. let r = "";
  299. for (let e = 0; e < n.length; e++) r += W(n[e], t);
  300. return r
  301. }
  302. function W(e, t) {
  303. switch (e.type) {
  304. case s:
  305. return V(e.children, t);
  306. case f:
  307. case o:
  308. return `<${e.data}>`;
  309. case c:
  310. return function(e) {
  311. return `\x3c!--${e.data}--\x3e`
  312. }(e);
  313. case p:
  314. return function(e) {
  315. return `<![CDATA[${e.children[0].data}]]>`
  316. }(e);
  317. case l:
  318. case h:
  319. case u:
  320. return function(e, t) {
  321. var n;
  322. "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 = {...t, xmlMode: !1
  323. }));
  324. !t.xmlMode && X.has(e.name) && (t = {...t, xmlMode: "foreign"
  325. });
  326. let r = `<${e.name}`;
  327. const i = function(e, t) {
  328. var n;
  329. if (!e) return;
  330. const r = !1 === (null !== (n = t.encodeEntities) && void 0 !== n ? n : t.decodeEntities) ? K : t.xmlMode || "utf8" !== t.encodeEntities ? B : U;
  331. return Object.keys(e)
  332. .map((n => {
  333. var i, s;
  334. const a = null !== (i = e[n]) && void 0 !== i ? i : "";
  335. return "foreign" === t.xmlMode && (n = null !== (s = Y.get(n)) && void 0 !== s ? s : n), t.emptyAttrs || t.xmlMode || "" !== a ? `${n}="${r(a)}"` : n
  336. }))
  337. .join(" ")
  338. }(e.attribs, t);
  339. i && (r += ` ${i}`);
  340. 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}>`));
  341. return r
  342. }(e, t);
  343. case a:
  344. return function(e, t) {
  345. var n;
  346. let r = e.data || "";
  347. !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));
  348. return r
  349. }(e, t)
  350. }
  351. }
  352. const Q = new Set(["mi", "mo", "mn", "ms", "mtext", "annotation-xml", "foreignObject", "desc", "title"]), X = new Set(["svg", "math"]);
  353. function $(e, t) {
  354. return V(e, t)
  355. }
  356. function z(e) {
  357. return Array.isArray(e) ? e.map(z)
  358. .join("") : k(e) && !O(e) ? z(e.children) : b(e) ? e.data : ""
  359. }
  360. function J(t) {
  361. return Array.isArray(t) ? t.map(J)
  362. .join("") : k(t) && (t.type === e.Tag || S(t)) ? J(t.children) : b(t) ? t.data : ""
  363. }
  364. function Z(e) {
  365. return k(e) ? e.children : []
  366. }
  367. function ee(e) {
  368. return e.parent || null
  369. }
  370. function te(e) {
  371. const t = ee(e);
  372. if (null != t) return Z(t);
  373. const n = [e];
  374. let {
  375. prev: r,
  376. next: i
  377. } = e;
  378. for (; null != r;) n.unshift(r), ({
  379. prev: r
  380. } = r);
  381. for (; null != i;) n.push(i), ({
  382. next: i
  383. } = i);
  384. return n
  385. }
  386. function ne(e) {
  387. let {
  388. next: t
  389. } = e;
  390. for (; null !== t && !I(t);)({
  391. next: t
  392. } = t);
  393. return t
  394. }
  395. function re(e) {
  396. let {
  397. prev: t
  398. } = e;
  399. for (; null !== t && !I(t);)({
  400. prev: t
  401. } = t);
  402. return t
  403. }
  404. function ie(e) {
  405. if (e.prev && (e.prev.next = e.next), e.next && (e.next.prev = e.prev), e.parent) {
  406. const t = e.parent.children;
  407. t.splice(t.lastIndexOf(e), 1)
  408. }
  409. }
  410. function se(e, t, n = !0, r = 1 / 0) {
  411. return Array.isArray(t) || (t = [t]), ae(e, t, n, r)
  412. }
  413. function ae(e, t, n, r) {
  414. const i = [];
  415. for (const s of t) {
  416. if (e(s) && (i.push(s), --r <= 0)) break;
  417. if (n && k(s) && s.children.length > 0) {
  418. const t = ae(e, s.children, n, r);
  419. if (i.push(...t), r -= t.length, r <= 0) break
  420. }
  421. }
  422. return i
  423. }
  424. function oe(e, t, n = !0) {
  425. let r = null;
  426. for (let i = 0; i < t.length && !r; i++) {
  427. const s = t[i];
  428. I(s) && (e(s) ? r = s : n && s.children.length > 0 && (r = oe(e, s.children, !0)))
  429. }
  430. return r
  431. }
  432. const ce = {
  433. tag_name: e => "function" == typeof e ? t => I(t) && e(t.name) : "*" === e ? I : t => I(t) && t.name === e,
  434. tag_type: e => "function" == typeof e ? t => e(t.type) : t => t.type === e,
  435. tag_contains: e => "function" == typeof e ? t => b(t) && e(t.data) : t => b(t) && t.data === e
  436. };
  437. function le(e, t) {
  438. return "function" == typeof t ? n => I(n) && t(n.attribs[e]) : n => I(n) && n.attribs[e] === t
  439. }
  440. function he(e, t) {
  441. return n => e(n) || t(n)
  442. }
  443. function ue(e) {
  444. const t = Object.keys(e)
  445. .map((t => {
  446. const n = e[t];
  447. return Object.prototype.hasOwnProperty.call(ce, t) ? ce[t](n) : le(t, n)
  448. }));
  449. return 0 === t.length ? null : t.reduce(he)
  450. }
  451. function pe(e, t, n = !0, r = 1 / 0) {
  452. return se(ce.tag_name(e), t, n, r)
  453. }
  454. var fe;
  455. function de(e, t) {
  456. const n = [], r = [];
  457. if (e === t) return 0;
  458. let i = k(e) ? e : e.parent;
  459. for (; i;) n.unshift(i), i = i.parent;
  460. for (i = k(t) ? t : t.parent; i;) r.unshift(i), i = i.parent;
  461. const s = Math.min(n.length, r.length);
  462. let a = 0;
  463. for (; a < s && n[a] === r[a];) a++;
  464. if (0 === a) return fe.DISCONNECTED;
  465. const o = n[a - 1], c = o.children, l = n[a], h = r[a];
  466. return c.indexOf(l) > c.indexOf(h) ? o === t ? fe.FOLLOWING | fe.CONTAINED_BY : fe.FOLLOWING : o === e ? fe.PRECEDING | fe.CONTAINS : fe.PRECEDING
  467. }
  468. function Ee(e) {
  469. return (e = e.filter(((e, t, n) => !n.includes(e, t + 1))))
  470. .sort(((e, t) => {
  471. const n = de(e, t);
  472. return n & fe.PRECEDING ? -1 : n & fe.FOLLOWING ? 1 : 0
  473. })), e
  474. }! function(e) {
  475. 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"
  476. }(fe || (fe = {}));
  477. const me = ["url", "type", "lang"], Te = ["fileSize", "bitrate", "framerate", "samplingrate", "channels", "duration", "height", "width"];
  478. function _e(e) {
  479. return pe("media:content", e)
  480. .map((e => {
  481. const {
  482. attribs: t
  483. } = e, n = {
  484. medium: t.medium,
  485. isDefault: !! t.isDefault
  486. };
  487. for (const e of me) t[e] && (n[e] = t[e]);
  488. for (const e of Te) t[e] && (n[e] = parseInt(t[e], 10));
  489. return t.expression && (n.expression = t.expression), n
  490. }))
  491. }
  492. function Ae(e, t) {
  493. return pe(e, t, !0, 1)[0]
  494. }
  495. function ge(e, t, n = !1) {
  496. return z(pe(e, t, n, 1))
  497. .trim()
  498. }
  499. function Ne(e, t, n, r, i = !1) {
  500. const s = ge(n, r, i);
  501. s && (e[t] = s)
  502. }
  503. function Ce(e) {
  504. return "rss" === e || "feed" === e || "rdf:RDF" === e
  505. }
  506. var Ie, Se = Object.freeze({
  507. __proto__: null,
  508. isTag: I,
  509. isCDATA: S,
  510. isText: b,
  511. isComment: O,
  512. isDocument: L,
  513. hasChildren: k,
  514. getOuterHTML: $,
  515. getInnerHTML: function(e, t) {
  516. return k(e) ? e.children.map((e => $(e, t)))
  517. .join("") : ""
  518. },
  519. getText: function e(t) {
  520. return Array.isArray(t) ? t.map(e)
  521. .join("") : I(t) ? "br" === t.name ? "\n" : e(t.children) : S(t) ? e(t.children) : b(t) ? t.data : ""
  522. },
  523. textContent: z,
  524. innerText: J,
  525. getChildren: Z,
  526. getParent: ee,
  527. getSiblings: te,
  528. getAttributeValue: function(e, t) {
  529. var n;
  530. return null === (n = e.attribs) || void 0 === n ? void 0 : n[t]
  531. },
  532. hasAttrib: function(e, t) {
  533. return null != e.attribs && Object.prototype.hasOwnProperty.call(e.attribs, t) && null != e.attribs[t]
  534. },
  535. getName: function(e) {
  536. return e.name
  537. },
  538. nextElementSibling: ne,
  539. prevElementSibling: re,
  540. removeElement: ie,
  541. replaceElement: function(e, t) {
  542. const n = t.prev = e.prev;
  543. n && (n.next = t);
  544. const r = t.next = e.next;
  545. r && (r.prev = t);
  546. const i = t.parent = e.parent;
  547. if (i) {
  548. const n = i.children;
  549. n[n.lastIndexOf(e)] = t, e.parent = null
  550. }
  551. },
  552. appendChild: function(e, t) {
  553. if (ie(t), t.next = null, t.parent = e, e.children.push(t) > 1) {
  554. const n = e.children[e.children.length - 2];
  555. n.next = t, t.prev = n
  556. } else t.prev = null
  557. },
  558. append: function(e, t) {
  559. ie(t);
  560. const {
  561. parent: n
  562. } = e, r = e.next;
  563. if (t.next = r, t.prev = e, e.next = t, t.parent = n, r) {
  564. if (r.prev = t, n) {
  565. const e = n.children;
  566. e.splice(e.lastIndexOf(r), 0, t)
  567. }
  568. } else n && n.children.push(t)
  569. },
  570. prependChild: function(e, t) {
  571. if (ie(t), t.parent = e, t.prev = null, 1 !== e.children.unshift(t)) {
  572. const n = e.children[1];
  573. n.prev = t, t.next = n
  574. } else t.next = null
  575. },
  576. prepend: function(e, t) {
  577. ie(t);
  578. const {
  579. parent: n
  580. } = e;
  581. if (n) {
  582. const r = n.children;
  583. r.splice(r.indexOf(e), 0, t)
  584. }
  585. e.prev && (e.prev.next = t), t.parent = n, t.prev = e.prev, t.next = e, e.prev = t
  586. },
  587. filter: se,
  588. find: ae,
  589. findOneChild: function(e, t) {
  590. return t.find(e)
  591. },
  592. findOne: oe,
  593. existsOne: function e(t, n) {
  594. return n.some((n => I(n) && (t(n) || n.children.length > 0 && e(t, n.children))))
  595. },
  596. findAll: function(e, t) {
  597. var n;
  598. const r = [], i = t.filter(I);
  599. let s;
  600. for (; s = i.shift();) {
  601. const t = null === (n = s.children) || void 0 === n ? void 0 : n.filter(I);
  602. t && t.length > 0 && i.unshift(...t), e(s) && r.push(s)
  603. }
  604. return r
  605. },
  606. testElement: function(e, t) {
  607. const n = ue(e);
  608. return !n || n(t)
  609. },
  610. getElements: function(e, t, n, r = 1 / 0) {
  611. const i = ue(e);
  612. return i ? se(i, t, n, r) : []
  613. },
  614. getElementById: function(e, t, n = !0) {
  615. return Array.isArray(t) || (t = [t]), oe(le("id", e), t, n)
  616. },
  617. getElementsByTagName: pe,
  618. getElementsByTagType: function(e, t, n = !0, r = 1 / 0) {
  619. return se(ce.tag_type(e), t, n, r)
  620. },
  621. removeSubsets: function(e) {
  622. let t = e.length;
  623. for (; --t >= 0;) {
  624. const n = e[t];
  625. if (t > 0 && e.lastIndexOf(n, t - 1) >= 0) e.splice(t, 1);
  626. else for (let r = n.parent; r; r = r.parent) if (e.includes(r)) {
  627. e.splice(t, 1);
  628. break
  629. }
  630. }
  631. return e
  632. },
  633. get DocumentPosition() {
  634. return fe
  635. },
  636. compareDocumentPosition: de,
  637. uniqueSort: Ee,
  638. getFeed: function(e) {
  639. const t = Ae(Ce, e);
  640. return t ? "feed" === t.name ? function(e) {
  641. var t;
  642. const n = e.children, r = {
  643. type: "atom",
  644. items: pe("entry", n)
  645. .map((e => {
  646. var t;
  647. const {
  648. children: n
  649. } = e, r = {
  650. media: _e(n)
  651. };
  652. Ne(r, "id", "id", n), Ne(r, "title", "title", n);
  653. const i = null === (t = Ae("link", n)) || void 0 === t ? void 0 : t.attribs.href;
  654. i && (r.link = i);
  655. const s = ge("summary", n) || ge("content", n);
  656. s && (r.description = s);
  657. const a = ge("updated", n);
  658. return a && (r.pubDate = new Date(a)), r
  659. }))
  660. };
  661. Ne(r, "id", "id", n), Ne(r, "title", "title", n);
  662. const i = null === (t = Ae("link", n)) || void 0 === t ? void 0 : t.attribs.href;
  663. i && (r.link = i);
  664. Ne(r, "description", "subtitle", n);
  665. const s = ge("updated", n);
  666. s && (r.updated = new Date(s));
  667. return Ne(r, "author", "email", n, !0), r
  668. }(t) : function(e) {
  669. var t, n;
  670. const r = null !== (n = null === (t = Ae("channel", e.children)) || void 0 === t ? void 0 : t.children) && void 0 !== n ? n : [], i = {
  671. type: e.name.substr(0, 3),
  672. id: "",
  673. items: pe("item", e.children)
  674. .map((e => {
  675. const {
  676. children: t
  677. } = e, n = {
  678. media: _e(t)
  679. };
  680. Ne(n, "id", "guid", t), Ne(n, "title", "title", t), Ne(n, "link", "link", t), Ne(n, "description", "description", t);
  681. const r = ge("pubDate", t);
  682. return r && (n.pubDate = new Date(r)), n
  683. }))
  684. };
  685. Ne(i, "title", "title", r), Ne(i, "link", "link", r), Ne(i, "description", "description", r);
  686. const s = ge("lastBuildDate", r);
  687. s && (i.updated = new Date(s));
  688. return Ne(i, "author", "managingEditor", r, !0), i
  689. }(t) : null
  690. }
  691. }),
  692. be = "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {};
  693. function Oe(e) {
  694. if (Object.keys) return Object.keys(e);
  695. var t = [];
  696. for (var n in e) t.push(n);
  697. return t
  698. }
  699. function ye(e, t) {
  700. if (e.forEach) return e.forEach(t);
  701. for (var n = 0; n < e.length; n++) t(e[n], n, e)
  702. }
  703. function Le() {
  704. try {
  705. return Object.defineProperty({}, "_", {}),
  706. function(e, t, n) {
  707. Object.defineProperty(e, t, {
  708. writable: !0,
  709. enumerable: !1,
  710. configurable: !0,
  711. value: n
  712. })
  713. }
  714. } catch (e) {
  715. return function(e, t, n) {
  716. e[t] = n
  717. }
  718. }
  719. }
  720. 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"];
  721. function ve() {}
  722. function De(e) {
  723. if (!(this instanceof De)) return new De(e);
  724. this.code = e
  725. }
  726. function Re(e) {
  727. if (Me(e)) return e;
  728. var t = new ve;
  729. return "object" == typeof e && ye(Oe(e), (function(n) {
  730. t[n] = e[n]
  731. })), t
  732. }
  733. function Me(e) {
  734. return e instanceof ve
  735. }
  736. ve.prototype = {}, De.prototype.runInContext = function(e) {
  737. if (!(e instanceof ve)) throw new TypeError("needs a 'context' argument.");
  738. if (be.document) {
  739. var t = be.document.createElement("iframe");
  740. t.style || (t.style = {}), t.style.display = "none", be.document.body.appendChild(t);
  741. var n = t.contentWindow,
  742. r = n.eval,
  743. i = n.execScript;
  744. !r && i && (i.call(n, "null"), r = n.eval), ye(Oe(e), (function(t) {
  745. n[t] = e[t]
  746. })), ye(ke, (function(t) {
  747. e[t] && (n[t] = e[t])
  748. }));
  749. var s = Oe(n),
  750. a = r.call(n, this.code);
  751. return ye(Oe(n), (function(t) {
  752. (t in e || -1 === function(e, t) {
  753. if (xe) return e.indexOf(t);
  754. for (var n = 0; n < e.length; ++n) if (e[n] === t) return n;
  755. return -1
  756. }(s, t)) && (e[t] = n[t])
  757. })), ye(ke, (function(t) {
  758. var r, i, s;
  759. t in e || (r = e, i = t, s = n[t], "function" != typeof Ie && (Ie = Le), Ie(r, i, s))
  760. })), be.document.body.removeChild(t), a
  761. }
  762. return function(e, t) {
  763. var n = Oe(be);
  764. return n.push("with (this.__ctx__){return eval(this.__code__)}"), Function.apply(null, n)
  765. .apply({
  766. __code__: e,
  767. __ctx__: t
  768. })
  769. }(this.code, e)
  770. }, De.prototype.runInThisContext = function() {
  771. return new Function("code", "return eval(code);")
  772. .call(be, this.code)
  773. }, De.prototype.runInNewContext = function(e) {
  774. var t = Re(e),
  775. n = this.runInContext(t);
  776. return e && ye(Oe(t), (function(n) {
  777. e[n] = t[n]
  778. })), n
  779. };
  780. var Pe = {
  781. runInContext: function(e, t, n) {
  782. return new De(e)
  783. .runInContext(t, n)
  784. },
  785. isContext: Me,
  786. createContext: Re,
  787. createScript: function(e) {
  788. return new De(e)
  789. },
  790. Script: De,
  791. runInThisContext: function(e, t) {
  792. return new De(e)
  793. .runInThisContext(t)
  794. },
  795. runInNewContext: function(e, t, n) {
  796. return new De(e)
  797. .runInNewContext(t, n)
  798. }
  799. }, xe = [].indexOf;
  800. const {
  801. hasOwnProperty: we
  802. } = Object.prototype;
  803. function Be(e, t) {
  804. return (e = e.slice())
  805. .push(t), e
  806. }
  807. function Fe(e, t) {
  808. return (t = t.slice())
  809. .unshift(e), t
  810. }
  811. class Ue extends Error {
  812. constructor(e) {
  813. super('JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)'), this.avoidNew = !0, this.value = e, this.name = "NewError"
  814. }
  815. }
  816. function He(e, t, n, r, i) {
  817. if (!(this instanceof He)) try {
  818. return new He(e, t, n, r, i)
  819. } catch (e) {
  820. if (!e.avoidNew) throw e;
  821. return e.value
  822. }
  823. "string" == typeof e && (i = r, r = n, n = t, t = e, e = null);
  824. const s = e && "object" == typeof e;
  825. 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() {
  826. throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")
  827. }, !1 !== e.autostart) {
  828. const r = {
  829. path: s ? e.path : t
  830. };
  831. s ? "json" in e && (r.json = e.json) : r.json = n;
  832. const i = this.evaluate(r);
  833. if (!i || "object" != typeof i) throw new Ue(i);
  834. return i
  835. }
  836. }
  837. He.prototype.evaluate = function(e, t, n, r) {
  838. let i = this.parent, s = this.parentProperty, {
  839. flatten: a,
  840. wrap: o
  841. } = this;
  842. 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)) {
  843. if (!e.path && "" !== e.path) throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');
  844. if (!we.call(e, "json")) throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');
  845. ({
  846. json: t
  847. } = 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
  848. }
  849. if (i = i || null, s = s || null, Array.isArray(e) && (e = He.toPathString(e)), !e && "" !== e || !t) return;
  850. const c = He.toPathArray(e);
  851. "$" === c[0] && c.length > 1 && c.shift(), this._hasParentSelector = null;
  852. const l = this._trace(c, t, ["$"], i, s, n)
  853. .filter((function(e) {
  854. return e && !e.isParentSelector
  855. }));
  856. return l.length ? o || 1 !== l.length || l[0].hasArrExpr ? l.reduce(((e, t) => {
  857. const n = this._getPreferredOutput(t);
  858. return a && Array.isArray(n) ? e = e.concat(n) : e.push(n), e
  859. }), []) : this._getPreferredOutput(l[0]) : o ? [] : void 0
  860. }, He.prototype._getPreferredOutput = function(e) {
  861. const t = this.currResultType;
  862. switch (t) {
  863. case "all":
  864. {
  865. const t = Array.isArray(e.path) ? e.path : He.toPathArray(e.path);
  866. return e.pointer = He.toPointer(t), e.path = "string" == typeof e.path ? e.path : He.toPathString(e.path), e
  867. }
  868. case "value":
  869. case "parent":
  870. case "parentProperty":
  871. return e[t];
  872. case "path":
  873. return He.toPathString(e[t]);
  874. case "pointer":
  875. return He.toPointer(e.path);
  876. default:
  877. throw new TypeError("Unknown result type")
  878. }
  879. }, He.prototype._handleCallback = function(e, t, n) {
  880. if (t) {
  881. const r = this._getPreferredOutput(e);
  882. e.path = "string" == typeof e.path ? e.path : He.toPathString(e.path), t(r, n, e)
  883. }
  884. }, He.prototype._trace = function(e, t, n, r, i, s, a, o) {
  885. let c;
  886. if (!e.length) return c = {
  887. path: n,
  888. value: t,
  889. parent: r,
  890. parentProperty: i,
  891. hasArrExpr: a
  892. }, this._handleCallback(c, s, "value"), c;
  893. const l = e[0], h = e.slice(1), u = [];
  894. function p(e) {
  895. Array.isArray(e) ? e.forEach((e => {
  896. u.push(e)
  897. })) : u.push(e)
  898. }
  899. if (("string" != typeof l || o) && t && we.call(t, l)) p(this._trace(h, t[l], Be(n, l), t, l, s, a));
  900. else if ("*" === l) this._walk(t, (e => {
  901. p(this._trace(h, t[e], Be(n, e), t, e, s, !0, !0))
  902. }));
  903. else if (".." === l) p(this._trace(h, t, n, r, i, s, a)), this._walk(t, (r => {
  904. "object" == typeof t[r] && p(this._trace(e.slice(), t[r], Be(n, r), t, r, s, !0))
  905. }));
  906. else {
  907. if ("^" === l) return this._hasParentSelector = !0, {
  908. path: n.slice(0, -1),
  909. expr: h,
  910. isParentSelector: !0
  911. };
  912. if ("~" === l) return c = {
  913. path: Be(n, l),
  914. value: i,
  915. parent: r,
  916. parentProperty: null
  917. }, this._handleCallback(c, s, "property"), c;
  918. if ("$" === l) p(this._trace(h, t, n, null, null, s, a));
  919. else if (/^(-?\d*):(-?\d*):?(\d*)$/u.test(l)) p(this._slice(l, h, t, n, r, i, s));
  920. else if (0 === l.indexOf("?(")) {
  921. if (this.currPreventEval) throw new Error("Eval [?(expr)] prevented in JSONPath expression.");
  922. const e = l.replace(/^\?\((.*?)\)$/u, "$1");
  923. this._walk(t, (a => {
  924. this._eval(e, t[a], a, n, r, i) && p(this._trace(h, t[a], Be(n, a), t, a, s, !0))
  925. }))
  926. } else if ("(" === l[0]) {
  927. if (this.currPreventEval) throw new Error("Eval [(expr)] prevented in JSONPath expression.");
  928. 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))
  929. } else if ("@" === l[0]) {
  930. let e = !1;
  931. const a = l.slice(1, -2);
  932. switch (a) {
  933. case "scalar":
  934. t && ["object", "function"].includes(typeof t) || (e = !0);
  935. break;
  936. case "boolean":
  937. case "string":
  938. case "undefined":
  939. case "function":
  940. typeof t === a && (e = !0);
  941. break;
  942. case "integer":
  943. !Number.isFinite(t) || t % 1 || (e = !0);
  944. break;
  945. case "number":
  946. Number.isFinite(t) && (e = !0);
  947. break;
  948. case "nonFinite":
  949. "number" != typeof t || Number.isFinite(t) || (e = !0);
  950. break;
  951. case "object":
  952. t && typeof t === a && (e = !0);
  953. break;
  954. case "array":
  955. Array.isArray(t) && (e = !0);
  956. break;
  957. case "other":
  958. e = this.currOtherTypeCallback(t, n, r, i);
  959. break;
  960. case "null":
  961. null === t && (e = !0);
  962. break;
  963. default:
  964. throw new TypeError("Unknown value type " + a)
  965. }
  966. if (e) return c = {
  967. path: n,
  968. value: t,
  969. parent: r,
  970. parentProperty: i
  971. }, this._handleCallback(c, s, "value"), c
  972. } else if ("`" === l[0] && t && we.call(t, l.slice(1))) {
  973. const e = l.slice(1);
  974. p(this._trace(h, t[e], Be(n, e), t, e, s, a, !0))
  975. } else if (l.includes(",")) {
  976. const e = l.split(",");
  977. for (const a of e) p(this._trace(Fe(a, h), t, n, r, i, s, !0))
  978. } else !o && t && we.call(t, l) && p(this._trace(h, t[l], Be(n, l), t, l, s, a, !0))
  979. }
  980. if (this._hasParentSelector) for (let e = 0; e < u.length; e++) {
  981. const n = u[e];
  982. if (n && n.isParentSelector) {
  983. const o = this._trace(n.expr, t, n.path, r, i, s, a);
  984. if (Array.isArray(o)) {
  985. u[e] = o[0];
  986. const t = o.length;
  987. for (let n = 1; n < t; n++) e++, u.splice(e, 0, o[n])
  988. } else u[e] = o
  989. }
  990. }
  991. return u
  992. }, He.prototype._walk = function(e, t) {
  993. if (Array.isArray(e)) {
  994. const n = e.length;
  995. for (let e = 0; e < n; e++) t(e)
  996. } else e && "object" == typeof e && Object.keys(e)
  997. .forEach((e => {
  998. t(e)
  999. }))
  1000. }, He.prototype._slice = function(e, t, n, r, i, s, a) {
  1001. if (!Array.isArray(n)) return;
  1002. const o = n.length, c = e.split(":"), l = c[2] && Number.parseInt(c[2]) || 1;
  1003. let h = c[0] && Number.parseInt(c[0]) || 0, u = c[1] && Number.parseInt(c[1]) || o;
  1004. h = h < 0 ? Math.max(0, h + o) : Math.min(o, h), u = u < 0 ? Math.max(0, u + o) : Math.min(o, u);
  1005. const p = [];
  1006. for (let e = h; e < u; e += l) {
  1007. this._trace(Fe(e, t), n, r, i, s, a, !0)
  1008. .forEach((e => {
  1009. p.push(e)
  1010. }))
  1011. }
  1012. return p
  1013. }, He.prototype._eval = function(e, t, n, r, i, s) {
  1014. this.currSandbox._$_parentProperty = s, this.currSandbox._$_parent = i, this.currSandbox._$_property = n, this.currSandbox._$_root = this.json, this.currSandbox._$_v = t;
  1015. const a = e.includes("@path");
  1016. a && (this.currSandbox._$_path = He.toPathString(r.concat([n])));
  1017. const o = "script:" + e;
  1018. if (!He.cache[o]) {
  1019. let t = e.replace(/@parentProperty/gu, "_$_parentProperty")
  1020. .replace(/@parent/gu, "_$_parent")
  1021. .replace(/@property/gu, "_$_property")
  1022. .replace(/@root/gu, "_$_root")
  1023. .replace(/@([.\s)[])/gu, "_$_v$1");
  1024. a && (t = t.replace(/@path/gu, "_$_path")), He.cache[o] = new this.vm.Script(t)
  1025. }
  1026. try {
  1027. return He.cache[o].runInNewContext(this.currSandbox)
  1028. } catch (t) {
  1029. throw new Error("jsonPath: " + t.message + ": " + e)
  1030. }
  1031. }, He.cache = {}, He.toPathString = function(e) {
  1032. const t = e, n = t.length;
  1033. let r = "$";
  1034. for (let e = 1; e < n; e++) /^(~|\^|@.*?\(\))$/u.test(t[e]) || (r += /^[0-9*]+$/u.test(t[e]) ? "[" + t[e] + "]" : "['" + t[e] + "']");
  1035. return r
  1036. }, He.toPointer = function(e) {
  1037. const t = e, n = t.length;
  1038. let r = "";
  1039. for (let e = 1; e < n; e++) /^(~|\^|@.*?\(\))$/u.test(t[e]) || (r += "/" + t[e].toString()
  1040. .replace(/~/gu, "~0")
  1041. .replace(/\//gu, "~1"));
  1042. return r
  1043. }, He.toPathArray = function(e) {
  1044. const {
  1045. cache: t
  1046. } = He;
  1047. if (t[e]) return t[e].concat();
  1048. const n = [], r = e.replace(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/gu, ";$&;")
  1049. .replace(/[['](\??\(.*?\))[\]']/gu, (function(e, t) {
  1050. return "[#" + (n.push(t) - 1) + "]"
  1051. }))
  1052. .replace(/\[['"]([^'\]]*)['"]\]/gu, (function(e, t) {
  1053. return "['" + t.replace(/\./gu, "%@%")
  1054. .replace(/~/gu, "%%@@%%") + "']"
  1055. }))
  1056. .replace(/~/gu, ";~;")
  1057. .replace(/['"]?\.['"]?(?![^[]*\])|\[['"]?/gu, ";")
  1058. .replace(/%@%/gu, ".")
  1059. .replace(/%%@@%%/gu, "~")
  1060. .replace(/(?:;)?(\^+)(?:;)?/gu, (function(e, t) {
  1061. return ";" + t.split("")
  1062. .join(";") + ";"
  1063. }))
  1064. .replace(/;;;|;;/gu, ";..;")
  1065. .replace(/;$|'?\]|'$/gu, ""), i = r.split(";")
  1066. .map((function(e) {
  1067. const t = e.match(/#(\d+)/u);
  1068. return t && t[1] ? n[t[1]] : e
  1069. }));
  1070. return t[e] = i, t[e].concat()
  1071. }, He.prototype.vm = Pe;
  1072. var Ge = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {};
  1073. function Ye() {
  1074. throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")
  1075. }
  1076. function qe(e) {
  1077. return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.
  1078. default : e
  1079. }
  1080. function Ke(e, t) {
  1081. return e(t = {
  1082. exports: {}
  1083. }, t.exports), t.exports
  1084. }
  1085. var je = Ke((function(e) {
  1086. var t = Array.prototype,
  1087. n = Object.prototype,
  1088. r = {
  1089. "&": "&amp;",
  1090. '"': "&quot;",
  1091. "'": "&#39;",
  1092. "<": "&lt;",
  1093. ">": "&gt;"
  1094. }, i = /[&"'<>]/g,
  1095. s = e.exports = {};
  1096. function a(e, t) {
  1097. return n.hasOwnProperty.call(e, t)
  1098. }
  1099. function o(e) {
  1100. return r[e]
  1101. }
  1102. function c(e, t, n) {
  1103. var r, i, s;
  1104. if (e instanceof Error && (e = (i = e)
  1105. .name + ": " + i.message), Object.setPrototypeOf ? (r = new Error(e), Object.setPrototypeOf(r, c.prototype)) : (r = this, Object.defineProperty(r, "message", {
  1106. enumerable: !1,
  1107. writable: !0,
  1108. value: e
  1109. })), Object.defineProperty(r, "name", {
  1110. value: "Template render error"
  1111. }), Error.captureStackTrace && Error.captureStackTrace(r, this.constructor), i) {
  1112. var a = Object.getOwnPropertyDescriptor(i, "stack");
  1113. (s = a && (a.get || function() {
  1114. return a.value
  1115. })) || (s = function() {
  1116. return i.stack
  1117. })
  1118. } else {
  1119. var o = new Error(e)
  1120. .stack;
  1121. s = function() {
  1122. return o
  1123. }
  1124. }
  1125. return Object.defineProperty(r, "stack", {
  1126. get: function() {
  1127. return s.call(r)
  1128. }
  1129. }), Object.defineProperty(r, "cause", {
  1130. value: i
  1131. }), r.lineno = t, r.colno = n, r.firstUpdate = !0, r.Update = function(e) {
  1132. var t = "(" + (e || "unknown path") + ")";
  1133. 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
  1134. }, r
  1135. }
  1136. function l(e) {
  1137. return "[object Function]" === n.toString.call(e)
  1138. }
  1139. function h(e) {
  1140. return "[object Array]" === n.toString.call(e)
  1141. }
  1142. function u(e) {
  1143. return "[object String]" === n.toString.call(e)
  1144. }
  1145. function p(e) {
  1146. return "[object Object]" === n.toString.call(e)
  1147. }
  1148. function f(e) {
  1149. var t = function(e) {
  1150. return e ? "string" == typeof e ? e.split(".") : [e] : []
  1151. }(e);
  1152. return function(e) {
  1153. for (var n = e, r = 0; r < t.length; r++) {
  1154. var i = t[r];
  1155. if (!a(n, i)) return;
  1156. n = n[i]
  1157. }
  1158. return n
  1159. }
  1160. }
  1161. function d(e) {
  1162. return Array.prototype.slice.call(e)
  1163. }
  1164. function E(e, t, n) {
  1165. return Array.prototype.indexOf.call(e || [], t, n)
  1166. }
  1167. function m(e) {
  1168. var t = [];
  1169. for (var n in e) a(e, n) && t.push(n);
  1170. return t
  1171. }
  1172. s.hasOwnProp = a, s._prettifyError = function(e, t, n) {
  1173. if (n.Update || (n = new s.TemplateError(n)), n.Update(e), !t) {
  1174. var r = n;
  1175. (n = new Error(r.message))
  1176. .name = r.name
  1177. }
  1178. return n
  1179. }, Object.setPrototypeOf ? Object.setPrototypeOf(c.prototype, Error.prototype) : c.prototype = Object.create(Error.prototype, {
  1180. constructor: {
  1181. value: c
  1182. }
  1183. }), s.TemplateError = c, s.escape = function(e) {
  1184. return e.replace(i, o)
  1185. }, s.isFunction = l, s.isArray = h, s.isString = u, s.isObject = p, s.getAttrGetter = f, s.groupBy = function(e, t, n) {
  1186. for (var r = {}, i = l(t) ? t : f(t), s = 0; s < e.length; s++) {
  1187. var a = e[s],
  1188. o = i(a, s);
  1189. if (void 0 === o && !0 === n) throw new TypeError('groupby: attribute "' + t + '" resolved to undefined');
  1190. (r[o] || (r[o] = []))
  1191. .push(a)
  1192. }
  1193. return r
  1194. }, s.toArray = d, s.without = function(e) {
  1195. var t = [];
  1196. if (!e) return t;
  1197. for (var n = e.length, r = d(arguments)
  1198. .slice(1), i = -1; ++i < n;) - 1 === E(r, e[i]) && t.push(e[i]);
  1199. return t
  1200. }, s.repeat = function(e, t) {
  1201. for (var n = "", r = 0; r < t; r++) n += e;
  1202. return n
  1203. }, s.each = function(e, n, r) {
  1204. if (null != e) if (t.forEach && e.forEach === t.forEach) e.forEach(n, r);
  1205. else if (e.length === +e.length) for (var i = 0, s = e.length; i < s; i++) n.call(r, e[i], i, e)
  1206. }, s.map = function(e, n) {
  1207. var r = [];
  1208. if (null == e) return r;
  1209. if (t.map && e.map === t.map) return e.map(n);
  1210. for (var i = 0; i < e.length; i++) r[r.length] = n(e[i], i);
  1211. return e.length === +e.length && (r.length = e.length), r
  1212. }, s.asyncIter = function(e, t, n) {
  1213. var r = -1;
  1214. ! function i() {
  1215. ++r < e.length ? t(e[r], r, i, n) : n()
  1216. }()
  1217. }, s.asyncFor = function(e, t, n) {
  1218. var r = m(e || {}),
  1219. i = r.length,
  1220. s = -1;
  1221. ! function a() {
  1222. s++;
  1223. var o = r[s];
  1224. s < i ? t(o, e[o], s, i, a) : n()
  1225. }()
  1226. }, s.indexOf = E, s.keys = m, s._entries = function(e) {
  1227. return m(e)
  1228. .map((function(t) {
  1229. return [t, e[t]]
  1230. }))
  1231. }, s._values = function(e) {
  1232. return m(e)
  1233. .map((function(t) {
  1234. return e[t]
  1235. }))
  1236. }, s._assign = s.extend = function(e, t) {
  1237. return e = e || {}, m(t)
  1238. .forEach((function(n) {
  1239. e[n] = t[n]
  1240. })), e
  1241. }, s.inOperator = function(e, t) {
  1242. if (h(t) || u(t)) return -1 !== t.indexOf(e);
  1243. if (p(t)) return e in t;
  1244. throw new Error('Cannot use "in" operator to search for "' + e + '" in unexpected types.')
  1245. }
  1246. }));
  1247. function Ve() {
  1248. throw new Error("setTimeout has not been defined")
  1249. }
  1250. function We() {
  1251. throw new Error("clearTimeout has not been defined")
  1252. }
  1253. var Qe = Ve,
  1254. Xe = We;
  1255. function $e(e) {
  1256. if (Qe === setTimeout) return setTimeout(e, 0);
  1257. if ((Qe === Ve || !Qe) && setTimeout) return Qe = setTimeout, setTimeout(e, 0);
  1258. try {
  1259. return Qe(e, 0)
  1260. } catch (t) {
  1261. try {
  1262. return Qe.call(null, e, 0)
  1263. } catch (t) {
  1264. return Qe.call(this, e, 0)
  1265. }
  1266. }
  1267. }
  1268. "function" == typeof be.setTimeout && (Qe = setTimeout), "function" == typeof be.clearTimeout && (Xe = clearTimeout);
  1269. var ze, Je = [],
  1270. Ze = !1,
  1271. et = -1;
  1272. function tt() {
  1273. Ze && ze && (Ze = !1, ze.length ? Je = ze.concat(Je) : et = -1, Je.length && nt())
  1274. }
  1275. function nt() {
  1276. if (!Ze) {
  1277. var e = $e(tt);
  1278. Ze = !0;
  1279. for (var t = Je.length; t;) {
  1280. for (ze = Je, Je = []; ++et < t;) ze && ze[et].run();
  1281. et = -1, t = Je.length
  1282. }
  1283. ze = null, Ze = !1,
  1284. function(e) {
  1285. if (Xe === clearTimeout) return clearTimeout(e);
  1286. if ((Xe === We || !Xe) && clearTimeout) return Xe = clearTimeout, clearTimeout(e);
  1287. try {
  1288. Xe(e)
  1289. } catch (t) {
  1290. try {
  1291. return Xe.call(null, e)
  1292. } catch (t) {
  1293. return Xe.call(this, e)
  1294. }
  1295. }
  1296. }(e)
  1297. }
  1298. }
  1299. function rt(e, t) {
  1300. this.fun = e, this.array = t
  1301. }
  1302. rt.prototype.run = function() {
  1303. this.fun.apply(null, this.array)
  1304. };
  1305. function it() {}
  1306. var st = it,
  1307. at = it,
  1308. ot = it,
  1309. ct = it,
  1310. lt = it,
  1311. ht = it,
  1312. ut = it;
  1313. var pt = be.performance || {}, ft = pt.now || pt.mozNow || pt.msNow || pt.oNow || pt.webkitNow || function() {
  1314. return (new Date)
  1315. .getTime()
  1316. };
  1317. var dt = new Date;
  1318. var Et = {
  1319. nextTick: function(e) {
  1320. var t = new Array(arguments.length - 1);
  1321. if (arguments.length > 1) for (var n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
  1322. Je.push(new rt(e, t)), 1 !== Je.length || Ze || $e(nt)
  1323. },
  1324. title: "browser",
  1325. browser: !0,
  1326. env: {},
  1327. argv: [],
  1328. version: "",
  1329. versions: {},
  1330. on: st,
  1331. addListener: at,
  1332. once: ot,
  1333. off: ct,
  1334. removeListener: lt,
  1335. removeAllListeners: ht,
  1336. emit: ut,
  1337. binding: function(e) {
  1338. throw new Error("process.binding is not supported")
  1339. },
  1340. cwd: function() {
  1341. return "/"
  1342. },
  1343. chdir: function(e) {
  1344. throw new Error("process.chdir is not supported")
  1345. },
  1346. umask: function() {
  1347. return 0
  1348. },
  1349. hrtime: function(e) {
  1350. var t = .001 * ft.call(pt),
  1351. n = Math.floor(t),
  1352. r = Math.floor(t % 1 * 1e9);
  1353. return e && (n -= e[0], (r -= e[1]) < 0 && (n--, r += 1e9)), [n, r]
  1354. },
  1355. platform: "browser",
  1356. release: {},
  1357. config: {},
  1358. uptime: function() {
  1359. return (new Date - dt) / 1e3
  1360. }
  1361. };
  1362. function mt() {}
  1363. function Tt() {
  1364. Tt.init.call(this)
  1365. }
  1366. function _t(e) {
  1367. return void 0 === e._maxListeners ? Tt.defaultMaxListeners : e._maxListeners
  1368. }
  1369. function At(e, t, n) {
  1370. if (t) e.call(n);
  1371. else for (var r = e.length, i = yt(e, r), s = 0; s < r; ++s) i[s].call(n)
  1372. }
  1373. function gt(e, t, n, r) {
  1374. if (t) e.call(n, r);
  1375. else for (var i = e.length, s = yt(e, i), a = 0; a < i; ++a) s[a].call(n, r)
  1376. }
  1377. function Nt(e, t, n, r, i) {
  1378. if (t) e.call(n, r, i);
  1379. else for (var s = e.length, a = yt(e, s), o = 0; o < s; ++o) a[o].call(n, r, i)
  1380. }
  1381. function Ct(e, t, n, r, i, s) {
  1382. if (t) e.call(n, r, i, s);
  1383. else for (var a = e.length, o = yt(e, a), c = 0; c < a; ++c) o[c].call(n, r, i, s)
  1384. }
  1385. function It(e, t, n, r) {
  1386. if (t) e.apply(n, r);
  1387. else for (var i = e.length, s = yt(e, i), a = 0; a < i; ++a) s[a].apply(n, r)
  1388. }
  1389. function St(e, t, n, r) {
  1390. var i, s, a;
  1391. if ("function" != typeof n) throw new TypeError('"listener" argument must be a function');
  1392. 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) {
  1393. 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) {
  1394. a.warned = !0;
  1395. var o = new Error("Possible EventEmitter memory leak detected. " + a.length + " " + t + " listeners added. Use emitter.setMaxListeners() to increase limit");
  1396. o.name = "MaxListenersExceededWarning", o.emitter = e, o.type = t, o.count = a.length,
  1397. function(e) {
  1398. "function" == typeof console.warn ? console.warn(e) : console.log(e)
  1399. }(o)
  1400. }
  1401. } else a = s[t] = n, ++e._eventsCount;
  1402. return e
  1403. }
  1404. function bt(e, t, n) {
  1405. var r = !1;
  1406. function i() {
  1407. e.removeListener(t, i), r || (r = !0, n.apply(e, arguments))
  1408. }
  1409. return i.listener = n, i
  1410. }
  1411. function Ot(e) {
  1412. var t = this._events;
  1413. if (t) {
  1414. var n = t[e];
  1415. if ("function" == typeof n) return 1;
  1416. if (n) return n.length
  1417. }
  1418. return 0
  1419. }
  1420. function yt(e, t) {
  1421. for (var n = new Array(t); t--;) n[t] = e[t];
  1422. return n
  1423. }
  1424. function Lt() {
  1425. var e;
  1426. Tt.call(this), this.__emitError = (e = this, function(t) {
  1427. e.emit("error", t)
  1428. })
  1429. }
  1430. function kt() {
  1431. return new Lt
  1432. }
  1433. 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() {
  1434. this.domain = null, Tt.usingDomains && undefined.active, this._events && this._events !== Object.getPrototypeOf(this)
  1435. ._events || (this._events = new mt, this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0
  1436. }, Tt.prototype.setMaxListeners = function(e) {
  1437. if ("number" != typeof e || e < 0 || isNaN(e)) throw new TypeError('"n" argument must be a positive number');
  1438. return this._maxListeners = e, this
  1439. }, Tt.prototype.getMaxListeners = function() {
  1440. return _t(this)
  1441. }, Tt.prototype.emit = function(e) {
  1442. var t, n, r, i, s, a, o, c = "error" === e;
  1443. if (a = this._events) c = c && null == a.error;
  1444. else if (!c) return !1;
  1445. if (o = this.domain, c) {
  1446. if (t = arguments[1], !o) {
  1447. if (t instanceof Error) throw t;
  1448. var l = new Error('Uncaught, unspecified "error" event. (' + t + ")");
  1449. throw l.context = t, l
  1450. }
  1451. return t || (t = new Error('Uncaught, unspecified "error" event')), t.domainEmitter = this, t.domain = o, t.domainThrown = !1, o.emit("error", t), !1
  1452. }
  1453. if (!(n = a[e])) return !1;
  1454. var h = "function" == typeof n;
  1455. switch (r = arguments.length) {
  1456. case 1:
  1457. At(n, h, this);
  1458. break;
  1459. case 2:
  1460. gt(n, h, this, arguments[1]);
  1461. break;
  1462. case 3:
  1463. Nt(n, h, this, arguments[1], arguments[2]);
  1464. break;
  1465. case 4:
  1466. Ct(n, h, this, arguments[1], arguments[2], arguments[3]);
  1467. break;
  1468. default:
  1469. for (i = new Array(r - 1), s = 1; s < r; s++) i[s - 1] = arguments[s];
  1470. It(n, h, this, i)
  1471. }
  1472. return !0
  1473. }, Tt.prototype.addListener = function(e, t) {
  1474. return St(this, e, t, !1)
  1475. }, Tt.prototype.on = Tt.prototype.addListener, Tt.prototype.prependListener = function(e, t) {
  1476. return St(this, e, t, !0)
  1477. }, Tt.prototype.once = function(e, t) {
  1478. if ("function" != typeof t) throw new TypeError('"listener" argument must be a function');
  1479. return this.on(e, bt(this, e, t)), this
  1480. }, Tt.prototype.prependOnceListener = function(e, t) {
  1481. if ("function" != typeof t) throw new TypeError('"listener" argument must be a function');
  1482. return this.prependListener(e, bt(this, e, t)), this
  1483. }, Tt.prototype.removeListener = function(e, t) {
  1484. var n, r, i, s, a;
  1485. if ("function" != typeof t) throw new TypeError('"listener" argument must be a function');
  1486. if (!(r = this._events)) return this;
  1487. if (!(n = r[e])) return this;
  1488. 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));
  1489. else if ("function" != typeof n) {
  1490. for (i = -1, s = n.length; s-- > 0;) if (n[s] === t || n[s].listener && n[s].listener === t) {
  1491. a = n[s].listener, i = s;
  1492. break
  1493. }
  1494. if (i < 0) return this;
  1495. if (1 === n.length) {
  1496. if (n[0] = void 0, 0 == --this._eventsCount) return this._events = new mt, this;
  1497. delete r[e]
  1498. } else ! function(e, t) {
  1499. for (var n = t, r = n + 1, i = e.length; r < i; n += 1, r += 1) e[n] = e[r];
  1500. e.pop()
  1501. }(n, i);
  1502. r.removeListener && this.emit("removeListener", e, a || t)
  1503. }
  1504. return this
  1505. }, Tt.prototype.removeAllListeners = function(e) {
  1506. var t, n;
  1507. if (!(n = this._events)) return this;
  1508. 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;
  1509. if (0 === arguments.length) {
  1510. for (var r, i = Object.keys(n), s = 0; s < i.length; ++s) "removeListener" !== (r = i[s]) && this.removeAllListeners(r);
  1511. return this.removeAllListeners("removeListener"), this._events = new mt, this._eventsCount = 0, this
  1512. }
  1513. if ("function" == typeof(t = n[e])) this.removeListener(e, t);
  1514. else if (t) do {
  1515. this.removeListener(e, t[t.length - 1])
  1516. } while (t[0]);
  1517. return this
  1518. }, Tt.prototype.listeners = function(e) {
  1519. var t, n = this._events;
  1520. return n && (t = n[e]) ? "function" == typeof t ? [t.listener || t] : function(e) {
  1521. for (var t = new Array(e.length), n = 0; n < t.length; ++n) t[n] = e[n].listener || e[n];
  1522. return t
  1523. }(t) : []
  1524. }, Tt.listenerCount = function(e, t) {
  1525. return "function" == typeof e.listenerCount ? e.listenerCount(t) : Ot.call(e, t)
  1526. }, Tt.prototype.listenerCount = Ot, Tt.prototype.eventNames = function() {
  1527. return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : []
  1528. }, ("function" == typeof Object.create ? function(e, t) {
  1529. e.super_ = t, e.prototype = Object.create(t.prototype, {
  1530. constructor: {
  1531. value: e,
  1532. enumerable: !1,
  1533. writable: !0,
  1534. configurable: !0
  1535. }
  1536. })
  1537. } : function(e, t) {
  1538. e.super_ = t;
  1539. var n = function() {};
  1540. n.prototype = t.prototype, e.prototype = new n, e.prototype.constructor = e
  1541. })(Lt, Tt), Lt.prototype.add = function(e) {
  1542. e.on("error", this.__emitError)
  1543. }, Lt.prototype.remove = function(e) {
  1544. e.removeListener("error", this.__emitError)
  1545. }, Lt.prototype.bind = function(e) {
  1546. var t = this.__emitError;
  1547. return function() {
  1548. var n = Array.prototype.slice.call(arguments);
  1549. try {
  1550. e.apply(null, n)
  1551. } catch (e) {
  1552. t(e)
  1553. }
  1554. }
  1555. }, Lt.prototype.intercept = function(e) {
  1556. var t = this.__emitError;
  1557. return function(n) {
  1558. if (n) t(n);
  1559. else {
  1560. var r = Array.prototype.slice.call(arguments, 1);
  1561. try {
  1562. e.apply(null, r)
  1563. } catch (n) {
  1564. t(n)
  1565. }
  1566. }
  1567. }
  1568. }, Lt.prototype.run = function(e) {
  1569. var t = this.__emitError;
  1570. try {
  1571. e()
  1572. } catch (e) {
  1573. t(e)
  1574. }
  1575. return this
  1576. }, Lt.prototype.dispose = function() {
  1577. return this.removeAllListeners(), this
  1578. }, Lt.prototype.enter = Lt.prototype.exit = function() {
  1579. return this
  1580. };
  1581. var vt, Dt = {
  1582. Domain: Lt,
  1583. createDomain: kt,
  1584. create: kt
  1585. }, Rt = "function" == typeof setImmediate,
  1586. Mt = Pt;
  1587. function Pt(e) {
  1588. xt.length || (Ut(), wt = !0), xt[xt.length] = e
  1589. }
  1590. var xt = [],
  1591. wt = !1,
  1592. Bt = 0;
  1593. function Ft() {
  1594. for (; Bt < xt.length;) {
  1595. var e = Bt;
  1596. if (Bt += 1, xt[e].call(), Bt > 1024) {
  1597. for (var t = 0, n = xt.length - Bt; t < n; t++) xt[t] = xt[t + Bt];
  1598. xt.length -= Bt, Bt = 0
  1599. }
  1600. }
  1601. xt.length = 0, Bt = 0, wt = !1
  1602. }
  1603. function Ut() {
  1604. var e = Et.domain;
  1605. e && (vt || (vt = Dt), vt.active = Et.domain = null), wt && Rt ? setImmediate(Ft) : Et.nextTick(Ft), e && (vt.active = Et.domain = e)
  1606. }
  1607. Pt.requestFlush = Ut;
  1608. var Ht = [],
  1609. Gt = function(e) {
  1610. var t;
  1611. t = Ht.length ? Ht.pop() : new Yt;
  1612. t.task = e, t.domain = Et.domain, Mt(t)
  1613. };
  1614. function Yt() {
  1615. this.task = null, this.domain = null
  1616. }
  1617. Yt.prototype.call = function() {
  1618. this.domain && this.domain.enter();
  1619. var e = !0;
  1620. try {
  1621. this.task.call(), e = !1, this.domain && this.domain.exit()
  1622. } finally {
  1623. e && Mt.requestFlush(), this.task = null, this.domain = null, Ht.push(this)
  1624. }
  1625. };
  1626. var qt = Ke((function(e) {
  1627. ! function(t) {
  1628. var n = function() {
  1629. var e = Array.prototype.slice.call(arguments);
  1630. "function" == typeof e[0] && e[0].apply(null, e.splice(1))
  1631. }, r = function(e) {
  1632. "function" == typeof setImmediate ? setImmediate(e) : void 0 !== Et && Et.nextTick ? Et.nextTick(e) : setTimeout(e, 0)
  1633. }, i = Array.isArray || function(e) {
  1634. return "[object Array]" === Object.prototype.toString.call(e)
  1635. }, s = function(e, t, s) {
  1636. var a = s ? r : n;
  1637. if (t = t || function() {}, !i(e)) {
  1638. var o = new Error("First argument to waterfall must be an array of functions");
  1639. return t(o)
  1640. }
  1641. if (!e.length) return t();
  1642. var c = function(e) {
  1643. return function(n) {
  1644. if (n) t.apply(null, arguments), t = function() {};
  1645. else {
  1646. var r = Array.prototype.slice.call(arguments, 1),
  1647. i = e.next();
  1648. i ? r.push(c(i)) : r.push(t), a((function() {
  1649. e.apply(null, r)
  1650. }))
  1651. }
  1652. }
  1653. };
  1654. c(function(e) {
  1655. var t = function(n) {
  1656. var r = function() {
  1657. return e.length && e[n].apply(null, arguments), r.next()
  1658. };
  1659. return r.next = function() {
  1660. return n < e.length - 1 ? t(n + 1) : null
  1661. }, r
  1662. };
  1663. return t(0)
  1664. }(e))()
  1665. };
  1666. e.exports ? e.exports = s : t.waterfall = s
  1667. }(Ge)
  1668. }));
  1669. function Kt(e, t, n, r) {
  1670. return {
  1671. type: e,
  1672. value: t,
  1673. lineno: n,
  1674. colno: r
  1675. }
  1676. }
  1677. var jt = function() {
  1678. function e(e, t) {
  1679. this.str = e, this.index = 0, this.len = e.length, this.lineno = 0, this.colno = 0, this.in_code = !1;
  1680. var n = (t = t || {})
  1681. .tags || {};
  1682. this.tags = {
  1683. BLOCK_START: n.blockStart || "{%",
  1684. BLOCK_END: n.blockEnd || "%}",
  1685. VARIABLE_START: n.variableStart || "{{",
  1686. VARIABLE_END: n.variableEnd || "}}",
  1687. COMMENT_START: n.commentStart || "{#",
  1688. COMMENT_END: n.commentEnd || "#}"
  1689. }, this.trimBlocks = !! t.trimBlocks, this.lstripBlocks = !! t.lstripBlocks
  1690. }
  1691. var t = e.prototype;
  1692. return t.nextToken = function() {
  1693. var e, t = this.lineno,
  1694. n = this.colno;
  1695. if (this.in_code) {
  1696. var r = this.current();
  1697. if (this.isFinished()) return null;
  1698. if ('"' === r || "'" === r) return Kt("string", this._parseString(r), t, n);
  1699. if (e = this._extract(" \n\t\r ")) return Kt("whitespace", e, t, n);
  1700. 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);
  1701. 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);
  1702. if ("r" === r && "/" === this.str.charAt(this.index + 1)) {
  1703. this.forwardN(2);
  1704. for (var i = ""; !this.isFinished();) {
  1705. if ("/" === this.current() && "\\" !== this.previous()) {
  1706. this.forward();
  1707. break
  1708. }
  1709. i += this.current(), this.forward()
  1710. }
  1711. for (var s = ["g", "i", "m", "y"], a = ""; !this.isFinished();) {
  1712. if (!(-1 !== s.indexOf(this.current()))) break;
  1713. a += this.current(), this.forward()
  1714. }
  1715. return Kt("regex", {
  1716. body: i,
  1717. flags: a
  1718. }, t, n)
  1719. }
  1720. if (-1 !== "()[]{}%*-+~/#,:|.<>=!".indexOf(r)) {
  1721. this.forward();
  1722. var o, c = ["==", "===", "!=", "!==", "<=", ">=", "//", "**"],
  1723. l = r + this.current();
  1724. switch (-1 !== je.indexOf(c, l) && (this.forward(), r = l, -1 !== je.indexOf(c, l + this.current()) && (r = l + this.current(), this.forward())), r) {
  1725. case "(":
  1726. o = "left-paren";
  1727. break;
  1728. case ")":
  1729. o = "right-paren";
  1730. break;
  1731. case "[":
  1732. o = "left-bracket";
  1733. break;
  1734. case "]":
  1735. o = "right-bracket";
  1736. break;
  1737. case "{":
  1738. o = "left-curly";
  1739. break;
  1740. case "}":
  1741. o = "right-curly";
  1742. break;
  1743. case ",":
  1744. o = "comma";
  1745. break;
  1746. case ":":
  1747. o = "colon";
  1748. break;
  1749. case "~":
  1750. o = "tilde";
  1751. break;
  1752. case "|":
  1753. o = "pipe";
  1754. break;
  1755. default:
  1756. o = "operator"
  1757. }
  1758. return Kt(o, r, t, n)
  1759. }
  1760. if ((e = this._extractUntil(" \n\t\r ()[]{}%*-+~/#,:|.<>=!"))
  1761. .match(/^[-+]?[0-9]+$/)) return "." === this.current() ? (this.forward(), Kt("float", e + "." + this._extract("0123456789"), t, n)) : Kt("int", e, t, n);
  1762. if (e.match(/^(true|false)$/)) return Kt("boolean", e, t, n);
  1763. if ("none" === e) return Kt("none", e, t, n);
  1764. if ("null" === e) return Kt("none", e, t, n);
  1765. if (e) return Kt("symbol", e, t, n);
  1766. throw new Error("Unexpected value while parsing: " + e)
  1767. }
  1768. 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);
  1769. if (this.isFinished()) return null;
  1770. 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);
  1771. 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);
  1772. e = "";
  1773. var p = !1;
  1774. for (this._matches(this.tags.COMMENT_START) && (p = !0, e = this._extractString(this.tags.COMMENT_START)); null !== (h = this._extractUntil(u));) {
  1775. if (e += h, (this._matches(this.tags.BLOCK_START) || this._matches(this.tags.VARIABLE_START) || this._matches(this.tags.COMMENT_START)) && !p) {
  1776. if (this.lstripBlocks && this._matches(this.tags.BLOCK_START) && this.colno > 0 && this.colno <= e.length) {
  1777. var f = e.slice(-this.colno);
  1778. if (/^\s+$/.test(f) && !(e = e.slice(0, -this.colno))
  1779. .length) return this.nextToken()
  1780. }
  1781. break
  1782. }
  1783. if (this._matches(this.tags.COMMENT_END)) {
  1784. if (!p) throw new Error("unexpected end of comment");
  1785. e += this._extractString(this.tags.COMMENT_END);
  1786. break
  1787. }
  1788. e += this.current(), this.forward()
  1789. }
  1790. if (null === h && p) throw new Error("expected end of comment, got end of file");
  1791. return Kt(p ? "comment" : "data", e, t, n)
  1792. }, t._parseString = function(e) {
  1793. this.forward();
  1794. for (var t = ""; !this.isFinished() && this.current() !== e;) {
  1795. var n = this.current();
  1796. if ("\\" === n) {
  1797. switch (this.forward(), this.current()) {
  1798. case "n":
  1799. t += "\n";
  1800. break;
  1801. case "t":
  1802. t += "\t";
  1803. break;
  1804. case "r":
  1805. t += "\r";
  1806. break;
  1807. default:
  1808. t += this.current()
  1809. }
  1810. this.forward()
  1811. } else t += n, this.forward()
  1812. }
  1813. return this.forward(), t
  1814. }, t._matches = function(e) {
  1815. return this.index + e.length > this.len ? null : this.str.slice(this.index, this.index + e.length) === e
  1816. }, t._extractString = function(e) {
  1817. return this._matches(e) ? (this.forwardN(e.length), e) : null
  1818. }, t._extractUntil = function(e) {
  1819. return this._extractMatching(!0, e || "")
  1820. }, t._extract = function(e) {
  1821. return this._extractMatching(!1, e)
  1822. }, t._extractMatching = function(e, t) {
  1823. if (this.isFinished()) return null;
  1824. var n = t.indexOf(this.current());
  1825. if (e && -1 === n || !e && -1 !== n) {
  1826. var r = this.current();
  1827. this.forward();
  1828. for (var i = t.indexOf(this.current());
  1829. (e && -1 === i || !e && -1 !== i) && !this.isFinished();) r += this.current(), this.forward(), i = t.indexOf(this.current());
  1830. return r
  1831. }
  1832. return ""
  1833. }, t._extractRegex = function(e) {
  1834. var t = this.currentStr()
  1835. .match(e);
  1836. return t ? (this.forwardN(t[0].length), t) : null
  1837. }, t.isFinished = function() {
  1838. return this.index >= this.len
  1839. }, t.forwardN = function(e) {
  1840. for (var t = 0; t < e; t++) this.forward()
  1841. }, t.forward = function() {
  1842. this.index++, "\n" === this.previous() ? (this.lineno++, this.colno = 0) : this.colno++
  1843. }, t.backN = function(e) {
  1844. for (var t = 0; t < e; t++) this.back()
  1845. }, t.back = function() {
  1846. if (this.index--, "\n" === this.current()) {
  1847. this.lineno--;
  1848. var e = this.src.lastIndexOf("\n", this.index - 1);
  1849. this.colno = -1 === e ? this.index : this.index - e
  1850. } else this.colno--
  1851. }, t.current = function() {
  1852. return this.isFinished() ? "" : this.str.charAt(this.index)
  1853. }, t.currentStr = function() {
  1854. return this.isFinished() ? "" : this.str.substr(this.index)
  1855. }, t.previous = function() {
  1856. return this.str.charAt(this.index - 1)
  1857. }, e
  1858. }(),
  1859. Vt = {
  1860. lex: function(e, t) {
  1861. return new jt(e, t)
  1862. },
  1863. TOKEN_STRING: "string",
  1864. TOKEN_WHITESPACE: "whitespace",
  1865. TOKEN_DATA: "data",
  1866. TOKEN_BLOCK_START: "block-start",
  1867. TOKEN_BLOCK_END: "block-end",
  1868. TOKEN_VARIABLE_START: "variable-start",
  1869. TOKEN_VARIABLE_END: "variable-end",
  1870. TOKEN_COMMENT: "comment",
  1871. TOKEN_LEFT_PAREN: "left-paren",
  1872. TOKEN_RIGHT_PAREN: "right-paren",
  1873. TOKEN_LEFT_BRACKET: "left-bracket",
  1874. TOKEN_RIGHT_BRACKET: "right-bracket",
  1875. TOKEN_LEFT_CURLY: "left-curly",
  1876. TOKEN_RIGHT_CURLY: "right-curly",
  1877. TOKEN_OPERATOR: "operator",
  1878. TOKEN_COMMA: "comma",
  1879. TOKEN_COLON: "colon",
  1880. TOKEN_TILDE: "tilde",
  1881. TOKEN_PIPE: "pipe",
  1882. TOKEN_INT: "int",
  1883. TOKEN_FLOAT: "float",
  1884. TOKEN_BOOLEAN: "boolean",
  1885. TOKEN_NONE: "none",
  1886. TOKEN_SYMBOL: "symbol",
  1887. TOKEN_SPECIAL: "special",
  1888. TOKEN_REGEX: "regex"
  1889. };
  1890. function Wt(e, t) {
  1891. for (var n = 0; n < t.length; n++) {
  1892. var r = t[n];
  1893. r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r)
  1894. }
  1895. }
  1896. function Qt(e, t, n) {
  1897. return t && Wt(e.prototype, t), n && Wt(e, n), e
  1898. }
  1899. function Xt(e, t) {
  1900. e.prototype = Object.create(t.prototype), e.prototype.constructor = e, $t(e, t)
  1901. }
  1902. function $t(e, t) {
  1903. return $t = Object.setPrototypeOf || function(e, t) {
  1904. return e.__proto__ = t, e
  1905. }, $t(e, t)
  1906. }
  1907. function zt(e, t, n) {
  1908. n = n || {}, je.keys(n)
  1909. .forEach((function(t) {
  1910. n[t] = function(e, t) {
  1911. return "function" != typeof e || "function" != typeof t ? t : function() {
  1912. var n = this.parent;
  1913. this.parent = e;
  1914. var r = t.apply(this, arguments);
  1915. return this.parent = n, r
  1916. }
  1917. }(e.prototype[t], n[t])
  1918. }));
  1919. var r = function(e) {
  1920. function n() {
  1921. return e.apply(this, arguments) || this
  1922. }
  1923. return Xt(n, e), Qt(n, [{
  1924. key: "typename",
  1925. get: function() {
  1926. return t
  1927. }
  1928. }]), n
  1929. }(e);
  1930. return je._assign(r.prototype, n), r
  1931. }
  1932. var Jt = function() {
  1933. function e() {
  1934. this.init.apply(this, arguments)
  1935. }
  1936. return e.prototype.init = function() {}, e.extend = function(e, t) {
  1937. return "object" == typeof e && (t = e, e = "anonymous"), zt(this, e, t)
  1938. }, Qt(e, [{
  1939. key: "typename",
  1940. get: function() {
  1941. return this.constructor.name
  1942. }
  1943. }]), e
  1944. }(),
  1945. Zt = function(e) {
  1946. function t() {
  1947. var t, n;
  1948. return (t = n = e.call(this) || this)
  1949. .init.apply(t, arguments), n
  1950. }
  1951. return Xt(t, e), t.prototype.init = function() {}, t.extend = function(e, t) {
  1952. return "object" == typeof e && (t = e, e = "anonymous"), zt(this, e, t)
  1953. }, Qt(t, [{
  1954. key: "typename",
  1955. get: function() {
  1956. return this.constructor.name
  1957. }
  1958. }]), t
  1959. }(Tt),
  1960. en = {
  1961. Obj: Jt,
  1962. EmitterObj: Zt
  1963. };
  1964. function tn(e, t) {
  1965. for (var n = 0; n < t.length; n++) {
  1966. var r = t[n];
  1967. r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r)
  1968. }
  1969. }
  1970. function nn(e, t, n) {
  1971. return t && tn(e.prototype, t), n && tn(e, n), e
  1972. }
  1973. function rn(e, t) {
  1974. e.prototype = Object.create(t.prototype), e.prototype.constructor = e, sn(e, t)
  1975. }
  1976. function sn(e, t) {
  1977. return sn = Object.setPrototypeOf || function(e, t) {
  1978. return e.__proto__ = t, e
  1979. }, sn(e, t)
  1980. }
  1981. function an(e, t, n) {
  1982. e instanceof t && n.push(e), e instanceof on && e.findAll(t, n)
  1983. }
  1984. var on = function(e) {
  1985. function t() {
  1986. return e.apply(this, arguments) || this
  1987. }
  1988. rn(t, e);
  1989. var n = t.prototype;
  1990. return n.init = function(e, t) {
  1991. 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];
  1992. this.lineno = e, this.colno = t, this.fields.forEach((function(e, t) {
  1993. var i = n[t + 2];
  1994. void 0 === i && (i = null), r[e] = i
  1995. }))
  1996. }, n.findAll = function(e, t) {
  1997. var n = this;
  1998. return t = t || [], this instanceof ln ? this.children.forEach((function(n) {
  1999. return an(n, e, t)
  2000. })) : this.fields.forEach((function(r) {
  2001. return an(n[r], e, t)
  2002. })), t
  2003. }, n.iterFields = function(e) {
  2004. var t = this;
  2005. this.fields.forEach((function(n) {
  2006. e(t[n], n)
  2007. }))
  2008. }, t
  2009. }(en.Obj),
  2010. cn = function(e) {
  2011. function t() {
  2012. return e.apply(this, arguments) || this
  2013. }
  2014. return rn(t, e), nn(t, [{
  2015. key: "typename",
  2016. get: function() {
  2017. return "Value"
  2018. }
  2019. }, {
  2020. key: "fields",
  2021. get: function() {
  2022. return ["value"]
  2023. }
  2024. }]), t
  2025. }(on),
  2026. ln = function(e) {
  2027. function t() {
  2028. return e.apply(this, arguments) || this
  2029. }
  2030. rn(t, e);
  2031. var n = t.prototype;
  2032. return n.init = function(t, n, r) {
  2033. e.prototype.init.call(this, t, n, r || [])
  2034. }, n.addChild = function(e) {
  2035. this.children.push(e)
  2036. }, nn(t, [{
  2037. key: "typename",
  2038. get: function() {
  2039. return "NodeList"
  2040. }
  2041. }, {
  2042. key: "fields",
  2043. get: function() {
  2044. return ["children"]
  2045. }
  2046. }]), t
  2047. }(on),
  2048. hn = ln.extend("Root"),
  2049. un = cn.extend("Literal"),
  2050. pn = cn.extend("Symbol"),
  2051. fn = ln.extend("Group"),
  2052. dn = ln.extend("Array"),
  2053. En = on.extend("Pair", {
  2054. fields: ["key", "value"]
  2055. }),
  2056. mn = ln.extend("Dict"),
  2057. Tn = on.extend("LookupVal", {
  2058. fields: ["target", "val"]
  2059. }),
  2060. _n = on.extend("If", {
  2061. fields: ["cond", "body", "else_"]
  2062. }),
  2063. An = _n.extend("IfAsync"),
  2064. gn = on.extend("InlineIf", {
  2065. fields: ["cond", "body", "else_"]
  2066. }),
  2067. Nn = on.extend("For", {
  2068. fields: ["arr", "name", "body", "else_"]
  2069. }),
  2070. Cn = Nn.extend("AsyncEach"),
  2071. In = Nn.extend("AsyncAll"),
  2072. Sn = on.extend("Macro", {
  2073. fields: ["name", "args", "body"]
  2074. }),
  2075. bn = Sn.extend("Caller"),
  2076. On = on.extend("Import", {
  2077. fields: ["template", "target", "withContext"]
  2078. }),
  2079. yn = function(e) {
  2080. function t() {
  2081. return e.apply(this, arguments) || this
  2082. }
  2083. return rn(t, e), t.prototype.init = function(t, n, r, i, s) {
  2084. e.prototype.init.call(this, t, n, r, i || new ln, s)
  2085. }, nn(t, [{
  2086. key: "typename",
  2087. get: function() {
  2088. return "FromImport"
  2089. }
  2090. }, {
  2091. key: "fields",
  2092. get: function() {
  2093. return ["template", "names", "withContext"]
  2094. }
  2095. }]), t
  2096. }(on),
  2097. Ln = on.extend("FunCall", {
  2098. fields: ["name", "args"]
  2099. }),
  2100. kn = Ln.extend("Filter"),
  2101. vn = kn.extend("FilterAsync", {
  2102. fields: ["name", "args", "symbol"]
  2103. }),
  2104. Dn = mn.extend("KeywordArgs"),
  2105. Rn = on.extend("Block", {
  2106. fields: ["name", "body"]
  2107. }),
  2108. Mn = on.extend("Super", {
  2109. fields: ["blockName", "symbol"]
  2110. }),
  2111. Pn = on.extend("TemplateRef", {
  2112. fields: ["template"]
  2113. })
  2114. .extend("Extends"),
  2115. xn = on.extend("Include", {
  2116. fields: ["template", "ignoreMissing"]
  2117. }),
  2118. wn = on.extend("Set", {
  2119. fields: ["targets", "value"]
  2120. }),
  2121. Bn = on.extend("Switch", {
  2122. fields: ["expr", "cases", "default"]
  2123. }),
  2124. Fn = on.extend("Case", {
  2125. fields: ["cond", "body"]
  2126. }),
  2127. Un = ln.extend("Output"),
  2128. Hn = on.extend("Capture", {
  2129. fields: ["body"]
  2130. }),
  2131. Gn = un.extend("TemplateData"),
  2132. Yn = on.extend("UnaryOp", {
  2133. fields: ["target"]
  2134. }),
  2135. qn = on.extend("BinOp", {
  2136. fields: ["left", "right"]
  2137. }),
  2138. Kn = qn.extend("In"),
  2139. jn = qn.extend("Is"),
  2140. Vn = qn.extend("Or"),
  2141. Wn = qn.extend("And"),
  2142. Qn = Yn.extend("Not"),
  2143. Xn = qn.extend("Add"),
  2144. $n = qn.extend("Concat"),
  2145. zn = qn.extend("Sub"),
  2146. Jn = qn.extend("Mul"),
  2147. Zn = qn.extend("Div"),
  2148. er = qn.extend("FloorDiv"),
  2149. tr = qn.extend("Mod"),
  2150. nr = qn.extend("Pow"),
  2151. rr = Yn.extend("Neg"),
  2152. ir = Yn.extend("Pos"),
  2153. sr = on.extend("Compare", {
  2154. fields: ["expr", "ops"]
  2155. }),
  2156. ar = on.extend("CompareOperand", {
  2157. fields: ["expr", "type"]
  2158. }),
  2159. or = on.extend("CallExtension", {
  2160. init: function(e, t, n, r) {
  2161. this.parent(), this.extName = e.__name || e, this.prop = t, this.args = n || new ln, this.contentArgs = r || [], this.autoescape = e.autoescape
  2162. },
  2163. fields: ["extName", "prop", "args", "contentArgs"]
  2164. }),
  2165. cr = or.extend("CallExtensionAsync");
  2166. function lr(e, t, n) {
  2167. var r = e.split("\n");
  2168. r.forEach((function(e, i) {
  2169. e && (n && i > 0 || !n) && Et.stdout.write(" ".repeat(t));
  2170. var s = i === r.length - 1 ? "" : "\n";
  2171. Et.stdout.write("" + e + s)
  2172. }))
  2173. }
  2174. var hr = {
  2175. Node: on,
  2176. Root: hn,
  2177. NodeList: ln,
  2178. Value: cn,
  2179. Literal: un,
  2180. Symbol: pn,
  2181. Group: fn,
  2182. Array: dn,
  2183. Pair: En,
  2184. Dict: mn,
  2185. Output: Un,
  2186. Capture: Hn,
  2187. TemplateData: Gn,
  2188. If: _n,
  2189. IfAsync: An,
  2190. InlineIf: gn,
  2191. For: Nn,
  2192. AsyncEach: Cn,
  2193. AsyncAll: In,
  2194. Macro: Sn,
  2195. Caller: bn,
  2196. Import: On,
  2197. FromImport: yn,
  2198. FunCall: Ln,
  2199. Filter: kn,
  2200. FilterAsync: vn,
  2201. KeywordArgs: Dn,
  2202. Block: Rn,
  2203. Super: Mn,
  2204. Extends: Pn,
  2205. Include: xn,
  2206. Set: wn,
  2207. Switch: Bn,
  2208. Case: Fn,
  2209. LookupVal: Tn,
  2210. BinOp: qn,
  2211. In: Kn,
  2212. Is: jn,
  2213. Or: Vn,
  2214. And: Wn,
  2215. Not: Qn,
  2216. Add: Xn,
  2217. Concat: $n,
  2218. Sub: zn,
  2219. Mul: Jn,
  2220. Div: Zn,
  2221. FloorDiv: er,
  2222. Mod: tr,
  2223. Pow: nr,
  2224. Neg: rr,
  2225. Pos: ir,
  2226. Compare: sr,
  2227. CompareOperand: ar,
  2228. CallExtension: or,
  2229. CallExtensionAsync: cr,
  2230. printNodes: function e(t, n) {
  2231. if (n = n || 0, lr(t.typename + ": ", n), t instanceof ln) lr("\n"), t.children.forEach((function(t) {
  2232. e(t, n + 2)
  2233. }));
  2234. 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) {
  2235. e(t, n + 2)
  2236. }));
  2237. else {
  2238. var r = [],
  2239. i = null;
  2240. t.iterFields((function(e, t) {
  2241. e instanceof on ? r.push([t, e]) : (i = i || {})[t] = e
  2242. })), i ? lr(JSON.stringify(i, null, 2) + "\n", null, !0) : lr("\n"), r.forEach((function(t) {
  2243. var r = t[0],
  2244. i = t[1];
  2245. lr("[" + r + "] =>", n + 2), e(i, n + 4)
  2246. }))
  2247. }
  2248. }
  2249. };
  2250. function ur(e, t) {
  2251. return ur = Object.setPrototypeOf || function(e, t) {
  2252. return e.__proto__ = t, e
  2253. }, ur(e, t)
  2254. }
  2255. 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;
  2256. var pr = function(e) {
  2257. var t, n;
  2258. function r() {
  2259. return e.apply(this, arguments) || this
  2260. }
  2261. n = e, (t = r)
  2262. .prototype = Object.create(n.prototype), t.prototype.constructor = t, ur(t, n);
  2263. var i = r.prototype;
  2264. return i.init = function(e) {
  2265. this.tokens = e, this.peeked = null, this.breakOnBlocks = null, this.dropLeadingWhitespace = !1, this.extensions = []
  2266. }, i.nextToken = function(e) {
  2267. var t;
  2268. if (this.peeked) {
  2269. if (e || this.peeked.type !== Vt.TOKEN_WHITESPACE) return t = this.peeked, this.peeked = null, t;
  2270. this.peeked = null
  2271. }
  2272. if (t = this.tokens.nextToken(), !e) for (; t && t.type === Vt.TOKEN_WHITESPACE;) t = this.tokens.nextToken();
  2273. return t
  2274. }, i.peekToken = function() {
  2275. return this.peeked = this.peeked || this.nextToken(), this.peeked
  2276. }, i.pushToken = function(e) {
  2277. if (this.peeked) throw new Error("pushToken: can only push one token on between reads");
  2278. this.peeked = e
  2279. }, i.error = function(e, t, n) {
  2280. if (void 0 === t || void 0 === n) {
  2281. var r = this.peekToken() || {};
  2282. t = r.lineno, n = r.colno
  2283. }
  2284. return void 0 !== t && (t += 1), void 0 !== n && (n += 1), new je.TemplateError(e, t, n)
  2285. }, i.fail = function(e, t, n) {
  2286. throw this.error(e, t, n)
  2287. }, i.skip = function(e) {
  2288. var t = this.nextToken();
  2289. return !(!t || t.type !== e) || (this.pushToken(t), !1)
  2290. }, i.expect = function(e) {
  2291. var t = this.nextToken();
  2292. return t.type !== e && this.fail("expected " + e + ", got " + t.type, t.lineno, t.colno), t
  2293. }, i.skipValue = function(e, t) {
  2294. var n = this.nextToken();
  2295. return !(!n || n.type !== e || n.value !== t) || (this.pushToken(n), !1)
  2296. }, i.skipSymbol = function(e) {
  2297. return this.skipValue(Vt.TOKEN_SYMBOL, e)
  2298. }, i.advanceAfterBlockEnd = function(e) {
  2299. var t;
  2300. 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()
  2301. .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
  2302. }, i.advanceAfterVariableEnd = function() {
  2303. var e = this.nextToken();
  2304. 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"))
  2305. }, i.parseFor = function() {
  2306. var e, t, n = this.peekToken();
  2307. 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()
  2308. .type === Vt.TOKEN_COMMA) {
  2309. var r = e.name;
  2310. for (e.name = new hr.Array(r.lineno, r.colno), e.name.addChild(r); this.skip(Vt.TOKEN_COMMA);) {
  2311. var i = this.parsePrimary();
  2312. e.name.addChild(i)
  2313. }
  2314. }
  2315. 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
  2316. }, i.parseMacro = function() {
  2317. var e = this.peekToken();
  2318. this.skipSymbol("macro") || this.fail("expected macro");
  2319. var t = this.parsePrimary(!0),
  2320. n = this.parseSignature(),
  2321. r = new hr.Macro(e.lineno, e.colno, t, n);
  2322. return this.advanceAfterBlockEnd(e.value), r.body = this.parseUntilBlocks("endmacro"), this.advanceAfterBlockEnd(), r
  2323. }, i.parseCall = function() {
  2324. var e = this.peekToken();
  2325. this.skipSymbol("call") || this.fail("expected call");
  2326. var t = this.parseSignature(!0) || new hr.NodeList,
  2327. n = this.parsePrimary();
  2328. this.advanceAfterBlockEnd(e.value);
  2329. var r = this.parseUntilBlocks("endcall");
  2330. this.advanceAfterBlockEnd();
  2331. var i = new hr.Symbol(e.lineno, e.colno, "caller"),
  2332. s = new hr.Caller(e.lineno, e.colno, i, t, r),
  2333. a = n.args.children;
  2334. 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])
  2335. }, i.parseWithContext = function() {
  2336. var e = this.peekToken(),
  2337. t = null;
  2338. 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
  2339. }, i.parseImport = function() {
  2340. var e = this.peekToken();
  2341. this.skipSymbol("import") || this.fail("parseImport: expected import", e.lineno, e.colno);
  2342. var t = this.parseExpression();
  2343. this.skipSymbol("as") || this.fail('parseImport: expected "as" keyword', e.lineno, e.colno);
  2344. var n = this.parseExpression(),
  2345. r = this.parseWithContext(),
  2346. i = new hr.Import(e.lineno, e.colno, t, n, r);
  2347. return this.advanceAfterBlockEnd(e.value), i
  2348. }, i.parseFrom = function() {
  2349. var e = this.peekToken();
  2350. this.skipSymbol("from") || this.fail("parseFrom: expected from");
  2351. var t = this.parseExpression();
  2352. this.skipSymbol("import") || this.fail("parseFrom: expected import", e.lineno, e.colno);
  2353. for (var n, r = new hr.NodeList;;) {
  2354. var i = this.peekToken();
  2355. if (i.type === Vt.TOKEN_BLOCK_END) {
  2356. 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();
  2357. break
  2358. }
  2359. r.children.length > 0 && !this.skip(Vt.TOKEN_COMMA) && this.fail("parseFrom: expected comma", e.lineno, e.colno);
  2360. var s = this.parsePrimary();
  2361. if ("_" === s.value.charAt(0) && this.fail("parseFrom: names starting with an underscore cannot be imported", s.lineno, s.colno), this.skipSymbol("as")) {
  2362. var a = this.parsePrimary();
  2363. r.addChild(new hr.Pair(s.lineno, s.colno, s, a))
  2364. } else r.addChild(s);
  2365. n = this.parseWithContext()
  2366. }
  2367. return new hr.FromImport(e.lineno, e.colno, t, r, n)
  2368. }, i.parseBlock = function() {
  2369. var e = this.peekToken();
  2370. this.skipSymbol("block") || this.fail("parseBlock: expected block", e.lineno, e.colno);
  2371. var t = new hr.Block(e.lineno, e.colno);
  2372. 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);
  2373. var n = this.peekToken();
  2374. return n || this.fail("parseBlock: expected endblock, got end of file"), this.advanceAfterBlockEnd(n.value), t
  2375. }, i.parseExtends = function() {
  2376. var e = "extends",
  2377. t = this.peekToken();
  2378. this.skipSymbol(e) || this.fail("parseTemplateRef: expected extends");
  2379. var n = new hr.Extends(t.lineno, t.colno);
  2380. return n.template = this.parseExpression(), this.advanceAfterBlockEnd(t.value), n
  2381. }, i.parseInclude = function() {
  2382. var e = "include",
  2383. t = this.peekToken();
  2384. this.skipSymbol(e) || this.fail("parseInclude: expected include");
  2385. var n = new hr.Include(t.lineno, t.colno);
  2386. return n.template = this.parseExpression(), this.skipSymbol("ignore") && this.skipSymbol("missing") && (n.ignoreMissing = !0), this.advanceAfterBlockEnd(t.value), n
  2387. }, i.parseIf = function() {
  2388. var e, t = this.peekToken();
  2389. 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");
  2390. var n = this.peekToken();
  2391. switch (n && n.value) {
  2392. case "elseif":
  2393. case "elif":
  2394. e.else_ = this.parseIf();
  2395. break;
  2396. case "else":
  2397. this.advanceAfterBlockEnd(), e.else_ = this.parseUntilBlocks("endif"), this.advanceAfterBlockEnd();
  2398. break;
  2399. case "endif":
  2400. e.else_ = null, this.advanceAfterBlockEnd();
  2401. break;
  2402. default:
  2403. this.fail("parseIf: expected elif, else, or endif, got end of file")
  2404. }
  2405. return e
  2406. }, i.parseSet = function() {
  2407. var e = this.peekToken();
  2408. this.skipSymbol("set") || this.fail("parseSet: expected set", e.lineno, e.colno);
  2409. for (var t, n = new hr.Set(e.lineno, e.colno, []);
  2410. (t = this.parsePrimary()) && (n.targets.push(t), this.skip(Vt.TOKEN_COMMA)););
  2411. 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
  2412. }, i.parseSwitch = function() {
  2413. var e = "switch",
  2414. t = "endswitch",
  2415. n = "case",
  2416. r = "default",
  2417. i = this.peekToken();
  2418. this.skipSymbol(e) || this.skipSymbol(n) || this.skipSymbol(r) || this.fail('parseSwitch: expected "switch," "case" or "default"', i.lineno, i.colno);
  2419. var s = this.parseExpression();
  2420. this.advanceAfterBlockEnd(e), this.parseUntilBlocks(n, r, t);
  2421. var a, o = this.peekToken(),
  2422. c = [];
  2423. do {
  2424. this.skipSymbol(n);
  2425. var l = this.parseExpression();
  2426. this.advanceAfterBlockEnd(e);
  2427. var h = this.parseUntilBlocks(n, r, t);
  2428. c.push(new hr.Case(o.line, o.col, l, h)), o = this.peekToken()
  2429. } while (o && o.value === n);
  2430. switch (o.value) {
  2431. case r:
  2432. this.advanceAfterBlockEnd(), a = this.parseUntilBlocks(t), this.advanceAfterBlockEnd();
  2433. break;
  2434. case t:
  2435. this.advanceAfterBlockEnd();
  2436. break;
  2437. default:
  2438. this.fail('parseSwitch: expected "case," "default" or "endswitch," got EOF.')
  2439. }
  2440. return new hr.Switch(i.lineno, i.colno, s, c, a)
  2441. }, i.parseStatement = function() {
  2442. var e = this.peekToken();
  2443. 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;
  2444. switch (e.value) {
  2445. case "raw":
  2446. return this.parseRaw();
  2447. case "verbatim":
  2448. return this.parseRaw("verbatim");
  2449. case "if":
  2450. case "ifAsync":
  2451. return this.parseIf();
  2452. case "for":
  2453. case "asyncEach":
  2454. case "asyncAll":
  2455. return this.parseFor();
  2456. case "block":
  2457. return this.parseBlock();
  2458. case "extends":
  2459. return this.parseExtends();
  2460. case "include":
  2461. return this.parseInclude();
  2462. case "set":
  2463. return this.parseSet();
  2464. case "macro":
  2465. return this.parseMacro();
  2466. case "call":
  2467. return this.parseCall();
  2468. case "import":
  2469. return this.parseImport();
  2470. case "from":
  2471. return this.parseFrom();
  2472. case "filter":
  2473. return this.parseFilterStatement();
  2474. case "switch":
  2475. return this.parseSwitch();
  2476. default:
  2477. if (this.extensions.length) for (var t = 0; t < this.extensions.length; t++) {
  2478. var n = this.extensions[t];
  2479. if (-1 !== je.indexOf(n.tags || [], e.value)) return n.parse(this, hr, Vt)
  2480. }
  2481. this.fail("unknown block tag: " + e.value, e.lineno, e.colno)
  2482. }
  2483. }, i.parseRaw = function(e) {
  2484. for (var t = "end" + (e = e || "raw"), n = new RegExp("([\\s\\S]*?){%\\s*(" + e + "|" + t + ")\\s*(?=%})%}"), r = 1, i = "", s = null, a = this.advanceAfterBlockEnd();
  2485. (s = this.tokens._extractRegex(n)) && r > 0;) {
  2486. var o = s[0],
  2487. c = s[1],
  2488. l = s[2];
  2489. l === e ? r += 1 : l === t && (r -= 1), 0 === r ? (i += c, this.tokens.backN(o.length - c.length)) : i += o
  2490. }
  2491. return new hr.Output(a.lineno, a.colno, [new hr.TemplateData(a.lineno, a.colno, i)])
  2492. }, i.parsePostfix = function(e) {
  2493. for (var t, n = this.peekToken(); n;) {
  2494. if (n.type === Vt.TOKEN_LEFT_PAREN) e = new hr.FunCall(n.lineno, n.colno, e, this.parseSignature());
  2495. else if (n.type === Vt.TOKEN_LEFT_BRACKET)(t = this.parseAggregate())
  2496. .children.length > 1 && this.fail("invalid index"), e = new hr.LookupVal(n.lineno, n.colno, e, t.children[0]);
  2497. else {
  2498. if (n.type !== Vt.TOKEN_OPERATOR || "." !== n.value) break;
  2499. this.nextToken();
  2500. var r = this.nextToken();
  2501. 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)
  2502. }
  2503. n = this.peekToken()
  2504. }
  2505. return e
  2506. }, i.parseExpression = function() {
  2507. return this.parseInlineIf()
  2508. }, i.parseInlineIf = function() {
  2509. var e = this.parseOr();
  2510. if (this.skipSymbol("if")) {
  2511. var t = this.parseOr(),
  2512. n = e;
  2513. (e = new hr.InlineIf(e.lineno, e.colno))
  2514. .body = n, e.cond = t, this.skipSymbol("else") ? e.else_ = this.parseOr() : e.else_ = null
  2515. }
  2516. return e
  2517. }, i.parseOr = function() {
  2518. for (var e = this.parseAnd(); this.skipSymbol("or");) {
  2519. var t = this.parseAnd();
  2520. e = new hr.Or(e.lineno, e.colno, e, t)
  2521. }
  2522. return e
  2523. }, i.parseAnd = function() {
  2524. for (var e = this.parseNot(); this.skipSymbol("and");) {
  2525. var t = this.parseNot();
  2526. e = new hr.And(e.lineno, e.colno, e, t)
  2527. }
  2528. return e
  2529. }, i.parseNot = function() {
  2530. var e = this.peekToken();
  2531. return this.skipSymbol("not") ? new hr.Not(e.lineno, e.colno, this.parseNot()) : this.parseIn()
  2532. }, i.parseIn = function() {
  2533. for (var e = this.parseIs();;) {
  2534. var t = this.nextToken();
  2535. if (!t) break;
  2536. var n = t.type === Vt.TOKEN_SYMBOL && "not" === t.value;
  2537. if (n || this.pushToken(t), !this.skipSymbol("in")) {
  2538. n && this.pushToken(t);
  2539. break
  2540. }
  2541. var r = this.parseIs();
  2542. e = new hr.In(e.lineno, e.colno, e, r), n && (e = new hr.Not(e.lineno, e.colno, e))
  2543. }
  2544. return e
  2545. }, i.parseIs = function() {
  2546. var e = this.parseCompare();
  2547. if (this.skipSymbol("is")) {
  2548. var t = this.skipSymbol("not"),
  2549. n = this.parseCompare();
  2550. e = new hr.Is(e.lineno, e.colno, e, n), t && (e = new hr.Not(e.lineno, e.colno, e))
  2551. }
  2552. return e
  2553. }, i.parseCompare = function() {
  2554. for (var e = ["==", "===", "!=", "!==", "<", ">", "<=", ">="], t = this.parseConcat(), n = [];;) {
  2555. var r = this.nextToken();
  2556. if (!r) break;
  2557. if (-1 === e.indexOf(r.value)) {
  2558. this.pushToken(r);
  2559. break
  2560. }
  2561. n.push(new hr.CompareOperand(r.lineno, r.colno, this.parseConcat(), r.value))
  2562. }
  2563. return n.length ? new hr.Compare(n[0].lineno, n[0].colno, t, n) : t
  2564. }, i.parseConcat = function() {
  2565. for (var e = this.parseAdd(); this.skipValue(Vt.TOKEN_TILDE, "~");) {
  2566. var t = this.parseAdd();
  2567. e = new hr.Concat(e.lineno, e.colno, e, t)
  2568. }
  2569. return e
  2570. }, i.parseAdd = function() {
  2571. for (var e = this.parseSub(); this.skipValue(Vt.TOKEN_OPERATOR, "+");) {
  2572. var t = this.parseSub();
  2573. e = new hr.Add(e.lineno, e.colno, e, t)
  2574. }
  2575. return e
  2576. }, i.parseSub = function() {
  2577. for (var e = this.parseMul(); this.skipValue(Vt.TOKEN_OPERATOR, "-");) {
  2578. var t = this.parseMul();
  2579. e = new hr.Sub(e.lineno, e.colno, e, t)
  2580. }
  2581. return e
  2582. }, i.parseMul = function() {
  2583. for (var e = this.parseDiv(); this.skipValue(Vt.TOKEN_OPERATOR, "*");) {
  2584. var t = this.parseDiv();
  2585. e = new hr.Mul(e.lineno, e.colno, e, t)
  2586. }
  2587. return e
  2588. }, i.parseDiv = function() {
  2589. for (var e = this.parseFloorDiv(); this.skipValue(Vt.TOKEN_OPERATOR, "/");) {
  2590. var t = this.parseFloorDiv();
  2591. e = new hr.Div(e.lineno, e.colno, e, t)
  2592. }
  2593. return e
  2594. }, i.parseFloorDiv = function() {
  2595. for (var e = this.parseMod(); this.skipValue(Vt.TOKEN_OPERATOR, "//");) {
  2596. var t = this.parseMod();
  2597. e = new hr.FloorDiv(e.lineno, e.colno, e, t)
  2598. }
  2599. return e
  2600. }, i.parseMod = function() {
  2601. for (var e = this.parsePow(); this.skipValue(Vt.TOKEN_OPERATOR, "%");) {
  2602. var t = this.parsePow();
  2603. e = new hr.Mod(e.lineno, e.colno, e, t)
  2604. }
  2605. return e
  2606. }, i.parsePow = function() {
  2607. for (var e = this.parseUnary(); this.skipValue(Vt.TOKEN_OPERATOR, "**");) {
  2608. var t = this.parseUnary();
  2609. e = new hr.Pow(e.lineno, e.colno, e, t)
  2610. }
  2611. return e
  2612. }, i.parseUnary = function(e) {
  2613. var t, n = this.peekToken();
  2614. 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
  2615. }, i.parsePrimary = function(e) {
  2616. var t, n = this.nextToken(),
  2617. r = null;
  2618. 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;
  2619. throw this.error("unexpected token: " + n.value, n.lineno, n.colno)
  2620. }, i.parseFilterName = function() {
  2621. for (var e = this.expect(Vt.TOKEN_SYMBOL), t = e.value; this.skipValue(Vt.TOKEN_OPERATOR, ".");) t += "." + this.expect(Vt.TOKEN_SYMBOL)
  2622. .value;
  2623. return new hr.Symbol(e.lineno, e.colno, t)
  2624. }, i.parseFilterArgs = function(e) {
  2625. return this.peekToken()
  2626. .type === Vt.TOKEN_LEFT_PAREN ? this.parsePostfix(e)
  2627. .args.children : []
  2628. }, i.parseFilter = function(e) {
  2629. for (; this.skip(Vt.TOKEN_PIPE);) {
  2630. var t = this.parseFilterName();
  2631. e = new hr.Filter(t.lineno, t.colno, t, new hr.NodeList(t.lineno, t.colno, [e].concat(this.parseFilterArgs(e))))
  2632. }
  2633. return e
  2634. }, i.parseFilterStatement = function() {
  2635. var e = this.peekToken();
  2636. this.skipSymbol("filter") || this.fail("parseFilterStatement: expected filter");
  2637. var t = this.parseFilterName(),
  2638. n = this.parseFilterArgs(t);
  2639. this.advanceAfterBlockEnd(e.value);
  2640. var r = new hr.Capture(t.lineno, t.colno, this.parseUntilBlocks("endfilter"));
  2641. this.advanceAfterBlockEnd();
  2642. var i = new hr.Filter(t.lineno, t.colno, t, new hr.NodeList(t.lineno, t.colno, [r].concat(n)));
  2643. return new hr.Output(t.lineno, t.colno, [i])
  2644. }, i.parseAggregate = function() {
  2645. var e, t = this.nextToken();
  2646. switch (t.type) {
  2647. case Vt.TOKEN_LEFT_PAREN:
  2648. e = new hr.Group(t.lineno, t.colno);
  2649. break;
  2650. case Vt.TOKEN_LEFT_BRACKET:
  2651. e = new hr.Array(t.lineno, t.colno);
  2652. break;
  2653. case Vt.TOKEN_LEFT_CURLY:
  2654. e = new hr.Dict(t.lineno, t.colno);
  2655. break;
  2656. default:
  2657. return null
  2658. }
  2659. for (;;) {
  2660. var n = this.peekToken()
  2661. .type;
  2662. if (n === Vt.TOKEN_RIGHT_PAREN || n === Vt.TOKEN_RIGHT_BRACKET || n === Vt.TOKEN_RIGHT_CURLY) {
  2663. this.nextToken();
  2664. break
  2665. }
  2666. 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) {
  2667. var r = this.parsePrimary();
  2668. this.skip(Vt.TOKEN_COLON) || this.fail("parseAggregate: expected colon after dict key", t.lineno, t.colno);
  2669. var i = this.parseExpression();
  2670. e.addChild(new hr.Pair(r.lineno, r.colno, r, i))
  2671. } else {
  2672. var s = this.parseExpression();
  2673. e.addChild(s)
  2674. }
  2675. }
  2676. return e
  2677. }, i.parseSignature = function(e, t) {
  2678. var n = this.peekToken();
  2679. if (!t && n.type !== Vt.TOKEN_LEFT_PAREN) {
  2680. if (e) return null;
  2681. this.fail("expected arguments", n.lineno, n.colno)
  2682. }
  2683. n.type === Vt.TOKEN_LEFT_PAREN && (n = this.nextToken());
  2684. for (var r = new hr.NodeList(n.lineno, n.colno), i = new hr.KeywordArgs(n.lineno, n.colno), s = !1;;) {
  2685. if (n = this.peekToken(), !t && n.type === Vt.TOKEN_RIGHT_PAREN) {
  2686. this.nextToken();
  2687. break
  2688. }
  2689. if (t && n.type === Vt.TOKEN_BLOCK_END) break;
  2690. if (s && !this.skip(Vt.TOKEN_COMMA)) this.fail("parseSignature: expected comma after expression", n.lineno, n.colno);
  2691. else {
  2692. var a = this.parseExpression();
  2693. this.skipValue(Vt.TOKEN_OPERATOR, "=") ? i.addChild(new hr.Pair(a.lineno, a.colno, a, this.parseExpression())) : r.addChild(a)
  2694. }
  2695. s = !0
  2696. }
  2697. return i.children.length && r.addChild(i), r
  2698. }, i.parseUntilBlocks = function() {
  2699. for (var e = this.breakOnBlocks, t = arguments.length, n = new Array(t), r = 0; r < t; r++) n[r] = arguments[r];
  2700. this.breakOnBlocks = n;
  2701. var i = this.parse();
  2702. return this.breakOnBlocks = e, i
  2703. }, i.parseNodes = function() {
  2704. for (var e, t = []; e = this.nextToken();) if (e.type === Vt.TOKEN_DATA) {
  2705. var n = e.value,
  2706. r = this.peekToken(),
  2707. i = r && r.value;
  2708. 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)]))
  2709. } else if (e.type === Vt.TOKEN_BLOCK_START) {
  2710. this.dropLeadingWhitespace = !1;
  2711. var s = this.parseStatement();
  2712. if (!s) break;
  2713. t.push(s)
  2714. } else if (e.type === Vt.TOKEN_VARIABLE_START) {
  2715. var a = this.parseExpression();
  2716. this.dropLeadingWhitespace = !1, this.advanceAfterVariableEnd(), t.push(new hr.Output(e.lineno, e.colno, [a]))
  2717. } 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);
  2718. return t
  2719. }, i.parse = function() {
  2720. return new hr.NodeList(0, 0, this.parseNodes())
  2721. }, i.parseAsRoot = function() {
  2722. return new hr.Root(0, 0, this.parseNodes())
  2723. }, r
  2724. }(en.Obj),
  2725. fr = {
  2726. parse: function(e, t, n) {
  2727. var r = new pr(Vt.lex(e, n));
  2728. return void 0 !== t && (r.extensions = t), r.parseAsRoot()
  2729. },
  2730. Parser: pr
  2731. }, dr = 0;
  2732. function Er() {
  2733. return "hole_" + dr++
  2734. }
  2735. function mr(e, t) {
  2736. for (var n = null, r = 0; r < e.length; r++) {
  2737. var i = t(e[r]);
  2738. i !== e[r] && (n || (n = e.slice()), n[r] = i)
  2739. }
  2740. return n || e
  2741. }
  2742. function Tr(e, t, n) {
  2743. if (!(e instanceof hr.Node)) return e;
  2744. if (!n) {
  2745. var r = t(e);
  2746. if (r && r !== e) return r
  2747. }
  2748. if (e instanceof hr.NodeList) {
  2749. var i = mr(e.children, (function(e) {
  2750. return Tr(e, t, n)
  2751. }));
  2752. i !== e.children && (e = new hr[e.typename](e.lineno, e.colno, i))
  2753. } else if (e instanceof hr.CallExtension) {
  2754. var s = Tr(e.args, t, n),
  2755. a = mr(e.contentArgs, (function(e) {
  2756. return Tr(e, t, n)
  2757. }));
  2758. s === e.args && a === e.contentArgs || (e = new hr[e.typename](e.extName, e.prop, s, a))
  2759. } else {
  2760. var o = e.fields.map((function(t) {
  2761. return e[t]
  2762. })),
  2763. c = mr(o, (function(e) {
  2764. return Tr(e, t, n)
  2765. }));
  2766. c !== o && (e = new hr[e.typename](e.lineno, e.colno), c.forEach((function(t, n) {
  2767. e[e.fields[n]] = t
  2768. })))
  2769. }
  2770. return n && t(e) || e
  2771. }
  2772. function _r(e, t) {
  2773. return Tr(e, t, !0)
  2774. }
  2775. function Ar(e, t, n) {
  2776. var r = [],
  2777. i = _r(n ? e[n] : e, (function(e) {
  2778. var n;
  2779. 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)
  2780. }));
  2781. return n ? e[n] = i : e = i, r.length ? (r.push(e), new hr.NodeList(e.lineno, e.colno, r)) : e
  2782. }
  2783. function gr(e, t) {
  2784. return function(e) {
  2785. return _r(e, (function(e) {
  2786. if (e instanceof hr.If || e instanceof hr.For) {
  2787. var t = !1;
  2788. if (Tr(e, (function(e) {
  2789. 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
  2790. })), t) {
  2791. if (e instanceof hr.If) return new hr.IfAsync(e.lineno, e.colno, e.cond, e.body, e.else_);
  2792. 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_)
  2793. }
  2794. }
  2795. }))
  2796. }(function(e) {
  2797. return Tr(e, (function(e) {
  2798. if (e instanceof hr.Block) {
  2799. var t = !1,
  2800. n = Er();
  2801. e.body = Tr(e.body, (function(e) {
  2802. if (e instanceof hr.FunCall && "super" === e.name.value) return t = !0, new hr.Symbol(e.lineno, e.colno, n)
  2803. })), t && e.body.children.unshift(new hr.Super(0, 0, e.name, new hr.Symbol(0, 0, n)))
  2804. }
  2805. }))
  2806. }(function(e, t) {
  2807. return _r(e, (function(e) {
  2808. 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
  2809. }))
  2810. }(e, t)))
  2811. }
  2812. var Nr = {
  2813. transform: function(e, t) {
  2814. return gr(e, t || [])
  2815. }
  2816. }, Cr = Array.from,
  2817. Ir = "function" == typeof Symbol && Symbol.iterator && "function" == typeof Cr,
  2818. Sr = function() {
  2819. function e(e, t) {
  2820. this.variables = Object.create(null), this.parent = e, this.topLevel = !1, this.isolateWrites = t
  2821. }
  2822. var t = e.prototype;
  2823. return t.set = function(e, t, n) {
  2824. var r = e.split("."),
  2825. i = this.variables,
  2826. s = this;
  2827. if (n && (s = this.resolve(r[0], !0))) s.set(e, t);
  2828. else {
  2829. for (var a = 0; a < r.length - 1; a++) {
  2830. var o = r[a];
  2831. i[o] || (i[o] = {}), i = i[o]
  2832. }
  2833. i[r[r.length - 1]] = t
  2834. }
  2835. }, t.get = function(e) {
  2836. var t = this.variables[e];
  2837. return void 0 !== t ? t : null
  2838. }, t.lookup = function(e) {
  2839. var t = this.parent,
  2840. n = this.variables[e];
  2841. return void 0 !== n ? n : t && t.lookup(e)
  2842. }, t.resolve = function(e, t) {
  2843. var n = t && this.isolateWrites ? void 0 : this.parent;
  2844. return void 0 !== this.variables[e] ? this : n && n.resolve(e)
  2845. }, t.push = function(t) {
  2846. return new e(this, t)
  2847. }, t.pop = function() {
  2848. return this.parent
  2849. }, e
  2850. }();
  2851. function br(e) {
  2852. return e && Object.prototype.hasOwnProperty.call(e, "__keywords")
  2853. }
  2854. function Or(e) {
  2855. var t = e.length;
  2856. if (t) {
  2857. var n = e[t - 1];
  2858. if (br(n)) return n
  2859. }
  2860. return {}
  2861. }
  2862. function yr(e) {
  2863. var t = e.length;
  2864. return 0 === t ? 0 : br(e[t - 1]) ? t - 1 : t
  2865. }
  2866. function Lr(e) {
  2867. if ("string" != typeof e) return e;
  2868. this.val = e, Object.defineProperty(this, "length", {
  2869. writable: !0,
  2870. configurable: !0,
  2871. value: e.length
  2872. })
  2873. }
  2874. Lr.prototype = Object.create(String.prototype, {
  2875. length: {
  2876. writable: !0,
  2877. configurable: !0,
  2878. value: 0
  2879. }
  2880. }), Lr.prototype.valueOf = function() {
  2881. return this.val
  2882. }, Lr.prototype.toString = function() {
  2883. return this.val
  2884. };
  2885. var kr = {
  2886. Frame: Sr,
  2887. makeMacro: function(e, t, n) {
  2888. return function() {
  2889. for (var r = arguments.length, i = new Array(r), s = 0; s < r; s++) i[s] = arguments[s];
  2890. var a, o = yr(i),
  2891. c = Or(i);
  2892. if (o > e.length) a = i.slice(0, e.length), i.slice(a.length, o)
  2893. .forEach((function(e, n) {
  2894. n < t.length && (c[t[n]] = e)
  2895. })), a.push(c);
  2896. else if (o < e.length) {
  2897. a = i.slice(0, o);
  2898. for (var l = o; l < e.length; l++) {
  2899. var h = e[l];
  2900. a.push(c[h]), delete c[h]
  2901. }
  2902. a.push(c)
  2903. } else a = i;
  2904. return n.apply(this, a)
  2905. }
  2906. },
  2907. makeKeywordArgs: function(e) {
  2908. return e.__keywords = !0, e
  2909. },
  2910. numArgs: yr,
  2911. suppressValue: function(e, t) {
  2912. return "object" == typeof(e = null != e ? e : "") ? new Lr(JSON.stringify(e)
  2913. .toString()) : (!t || e instanceof Lr || (e = je.escape(e.toString())), e)
  2914. },
  2915. ensureDefined: function(e, t, n) {
  2916. if (null == e) throw new je.TemplateError("attempted to output null or undefined value", t + 1, n + 1);
  2917. return e
  2918. },
  2919. memberLookup: function(e, t) {
  2920. if (null != e) return "function" == typeof e[t] ? function() {
  2921. for (var n = arguments.length, r = new Array(n), i = 0; i < n; i++) r[i] = arguments[i];
  2922. return e[t].apply(e, r)
  2923. } : e[t]
  2924. },
  2925. contextOrFrameLookup: function(e, t, n) {
  2926. var r = t.lookup(n);
  2927. return void 0 !== r ? r : e.lookup(n)
  2928. },
  2929. callWrap: function(e, t, n, r) {
  2930. if (!e) throw new Error("Unable to call `" + t + "`, which is undefined or falsey");
  2931. if ("function" != typeof e) throw new Error("Unable to call `" + t + "`, which is not a function");
  2932. return e.apply(n, r)
  2933. },
  2934. handleError: function(e, t, n) {
  2935. return e.lineno ? e : new je.TemplateError(e, t, n)
  2936. },
  2937. isArray: je.isArray,
  2938. keys: je.keys,
  2939. SafeString: Lr,
  2940. copySafeness: function(e, t) {
  2941. return e instanceof Lr ? new Lr(t) : t.toString()
  2942. },
  2943. markSafe: function(e) {
  2944. var t = typeof e;
  2945. return "string" === t ? new Lr(e) : "function" !== t ? e : function(t) {
  2946. var n = e.apply(this, arguments);
  2947. return "string" == typeof n ? new Lr(n) : n
  2948. }
  2949. },
  2950. asyncEach: function(e, t, n, r) {
  2951. if (je.isArray(e)) {
  2952. var i = e.length;
  2953. je.asyncIter(e, (function(e, r, s) {
  2954. switch (t) {
  2955. case 1:
  2956. n(e, r, i, s);
  2957. break;
  2958. case 2:
  2959. n(e[0], e[1], r, i, s);
  2960. break;
  2961. case 3:
  2962. n(e[0], e[1], e[2], r, i, s);
  2963. break;
  2964. default:
  2965. e.push(r, i, s), n.apply(this, e)
  2966. }
  2967. }), r)
  2968. } else je.asyncFor(e, (function(e, t, r, i, s) {
  2969. n(e, t, r, i, s)
  2970. }), r)
  2971. },
  2972. asyncAll: function(e, t, n, r) {
  2973. var i, s, a = 0;
  2974. function o(e, t) {
  2975. a++, s[e] = t, a === i && r(null, s.join(""))
  2976. }
  2977. if (je.isArray(e)) if (i = e.length, s = new Array(i), 0 === i) r(null, "");
  2978. else for (var c = 0; c < e.length; c++) {
  2979. var l = e[c];
  2980. switch (t) {
  2981. case 1:
  2982. n(l, c, i, o);
  2983. break;
  2984. case 2:
  2985. n(l[0], l[1], c, i, o);
  2986. break;
  2987. case 3:
  2988. n(l[0], l[1], l[2], c, i, o);
  2989. break;
  2990. default:
  2991. l.push(c, i, o), n.apply(this, l)
  2992. }
  2993. } else {
  2994. var h = je.keys(e || {});
  2995. if (i = h.length, s = new Array(i), 0 === i) r(null, "");
  2996. else for (var u = 0; u < h.length; u++) {
  2997. var p = h[u];
  2998. n(p, e[p], u, i, o)
  2999. }
  3000. }
  3001. },
  3002. inOperator: je.inOperator,
  3003. fromIterator: function(e) {
  3004. return "object" != typeof e || null === e || je.isArray(e) ? e : Ir && Symbol.iterator in e ? Cr(e) : e
  3005. }
  3006. };
  3007. function vr(e, t) {
  3008. return vr = Object.setPrototypeOf || function(e, t) {
  3009. return e.__proto__ = t, e
  3010. }, vr(e, t)
  3011. }
  3012. 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;
  3013. var Dr = je.TemplateError,
  3014. Rr = kr.Frame,
  3015. Mr = {
  3016. "==": "==",
  3017. "===": "===",
  3018. "!=": "!=",
  3019. "!==": "!==",
  3020. "<": "<",
  3021. ">": ">",
  3022. "<=": "<=",
  3023. ">=": ">="
  3024. }, Pr = function(e) {
  3025. var t, n;
  3026. function r() {
  3027. return e.apply(this, arguments) || this
  3028. }
  3029. n = e, (t = r)
  3030. .prototype = Object.create(n.prototype), t.prototype.constructor = t, vr(t, n);
  3031. var i = r.prototype;
  3032. return i.init = function(e, t) {
  3033. this.templateName = e, this.codebuf = [], this.lastId = 0, this.buffer = null, this.bufferStack = [], this._scopeClosers = "", this.inBlock = !1, this.throwOnUndefined = t
  3034. }, i.fail = function(e, t, n) {
  3035. throw void 0 !== t && (t += 1), void 0 !== n && (n += 1), new Dr(e, t, n)
  3036. }, i._pushBuffer = function() {
  3037. var e = this._tmpid();
  3038. return this.bufferStack.push(this.buffer), this.buffer = e, this._emit("var " + this.buffer + ' = "";'), e
  3039. }, i._popBuffer = function() {
  3040. this.buffer = this.bufferStack.pop()
  3041. }, i._emit = function(e) {
  3042. this.codebuf.push(e)
  3043. }, i._emitLine = function(e) {
  3044. this._emit(e + "\n")
  3045. }, i._emitLines = function() {
  3046. for (var e = this, t = arguments.length, n = new Array(t), r = 0; r < t; r++) n[r] = arguments[r];
  3047. n.forEach((function(t) {
  3048. return e._emitLine(t)
  3049. }))
  3050. }, i._emitFuncBegin = function(e, t) {
  3051. 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 {")
  3052. }, i._emitFuncEnd = function(e) {
  3053. 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
  3054. }, i._addScopeLevel = function() {
  3055. this._scopeClosers += "})"
  3056. }, i._closeScopeLevels = function() {
  3057. this._emitLine(this._scopeClosers + ";"), this._scopeClosers = ""
  3058. }, i._withScopedSyntax = function(e) {
  3059. var t = this._scopeClosers;
  3060. this._scopeClosers = "", e.call(this), this._closeScopeLevels(), this._scopeClosers = t
  3061. }, i._makeCallback = function(e) {
  3062. var t = this._tmpid();
  3063. return "function(" + t + (e ? "," + e : "") + ") {\nif(" + t + ") { cb(" + t + "); return; }"
  3064. }, i._tmpid = function() {
  3065. return this.lastId++, "t_" + this.lastId
  3066. }, i._templateName = function() {
  3067. return null == this.templateName ? "undefined" : JSON.stringify(this.templateName)
  3068. }, i._compileChildren = function(e, t) {
  3069. var n = this;
  3070. e.children.forEach((function(e) {
  3071. n.compile(e, t)
  3072. }))
  3073. }, i._compileAggregate = function(e, t, n, r) {
  3074. var i = this;
  3075. n && this._emit(n), e.children.forEach((function(e, n) {
  3076. n > 0 && i._emit(","), i.compile(e, t)
  3077. })), r && this._emit(r)
  3078. }, i._compileExpression = function(e, t) {
  3079. 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)
  3080. }, i.assertType = function(e) {
  3081. for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++) n[r - 1] = arguments[r];
  3082. n.some((function(t) {
  3083. return e instanceof t
  3084. })) || this.fail("assertType: invalid type: " + e.typename, e.lineno, e.colno)
  3085. }, i.compileCallExtension = function(e, t, n) {
  3086. var r = this,
  3087. i = e.args,
  3088. s = e.contentArgs,
  3089. a = "boolean" != typeof e.autoescape || e.autoescape;
  3090. 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) {
  3091. r._compileExpression(e, t), (n !== i.children.length - 1 || s.length) && r._emit(",")
  3092. }))), s.length && s.forEach((function(e, n) {
  3093. if (n > 0 && r._emit(","), e) {
  3094. r._emitLine("function(cb) {"), r._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}");
  3095. var i = r._pushBuffer();
  3096. r._withScopedSyntax((function() {
  3097. r.compile(e, t), r._emitLine("cb(null, " + i + ");")
  3098. })), r._popBuffer(), r._emitLine("return " + i + ";"), r._emitLine("}")
  3099. } else r._emit("null")
  3100. })), n) {
  3101. var o = this._tmpid();
  3102. this._emitLine(", " + this._makeCallback(o)), this._emitLine(this.buffer + " += runtime.suppressValue(" + o + ", " + a + " && env.opts.autoescape);"), this._addScopeLevel()
  3103. } else this._emit(")"), this._emit(", " + a + " && env.opts.autoescape);\n")
  3104. }, i.compileCallExtensionAsync = function(e, t) {
  3105. this.compileCallExtension(e, t, !0)
  3106. }, i.compileNodeList = function(e, t) {
  3107. this._compileChildren(e, t)
  3108. }, i.compileLiteral = function(e) {
  3109. if ("string" == typeof e.value) {
  3110. var t = e.value.replace(/\\/g, "\\\\");
  3111. t = (t = (t = (t = (t = t.replace(/"/g, '\\"'))
  3112. .replace(/\n/g, "\\n"))
  3113. .replace(/\r/g, "\\r"))
  3114. .replace(/\t/g, "\\t"))
  3115. .replace(/\u2028/g, "\\u2028"), this._emit('"' + t + '"')
  3116. } else null === e.value ? this._emit("null") : this._emit(e.value.toString())
  3117. }, i.compileSymbol = function(e, t) {
  3118. var n = e.value,
  3119. r = t.lookup(n);
  3120. r ? this._emit(r) : this._emit('runtime.contextOrFrameLookup(context, frame, "' + n + '")')
  3121. }, i.compileGroup = function(e, t) {
  3122. this._compileAggregate(e, t, "(", ")")
  3123. }, i.compileArray = function(e, t) {
  3124. this._compileAggregate(e, t, "[", "]")
  3125. }, i.compileDict = function(e, t) {
  3126. this._compileAggregate(e, t, "{", "}")
  3127. }, i.compilePair = function(e, t) {
  3128. var n = e.key,
  3129. r = e.value;
  3130. 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)
  3131. }, i.compileInlineIf = function(e, t) {
  3132. 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(")")
  3133. }, i.compileIn = function(e, t) {
  3134. this._emit("runtime.inOperator("), this.compile(e.left, t), this._emit(","), this.compile(e.right, t), this._emit(")")
  3135. }, i.compileIs = function(e, t) {
  3136. var n = e.right.name ? e.right.name.value : e.right.value;
  3137. 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")
  3138. }, i._binOpEmitter = function(e, t, n) {
  3139. this.compile(e.left, t), this._emit(n), this.compile(e.right, t)
  3140. }, i.compileOr = function(e, t) {
  3141. return this._binOpEmitter(e, t, " || ")
  3142. }, i.compileAnd = function(e, t) {
  3143. return this._binOpEmitter(e, t, " && ")
  3144. }, i.compileAdd = function(e, t) {
  3145. return this._binOpEmitter(e, t, " + ")
  3146. }, i.compileConcat = function(e, t) {
  3147. return this._binOpEmitter(e, t, ' + "" + ')
  3148. }, i.compileSub = function(e, t) {
  3149. return this._binOpEmitter(e, t, " - ")
  3150. }, i.compileMul = function(e, t) {
  3151. return this._binOpEmitter(e, t, " * ")
  3152. }, i.compileDiv = function(e, t) {
  3153. return this._binOpEmitter(e, t, " / ")
  3154. }, i.compileMod = function(e, t) {
  3155. return this._binOpEmitter(e, t, " % ")
  3156. }, i.compileNot = function(e, t) {
  3157. this._emit("!"), this.compile(e.target, t)
  3158. }, i.compileFloorDiv = function(e, t) {
  3159. this._emit("Math.floor("), this.compile(e.left, t), this._emit(" / "), this.compile(e.right, t), this._emit(")")
  3160. }, i.compilePow = function(e, t) {
  3161. this._emit("Math.pow("), this.compile(e.left, t), this._emit(", "), this.compile(e.right, t), this._emit(")")
  3162. }, i.compileNeg = function(e, t) {
  3163. this._emit("-"), this.compile(e.target, t)
  3164. }, i.compilePos = function(e, t) {
  3165. this._emit("+"), this.compile(e.target, t)
  3166. }, i.compileCompare = function(e, t) {
  3167. var n = this;
  3168. this.compile(e.expr, t), e.ops.forEach((function(e) {
  3169. n._emit(" " + Mr[e.type] + " "), n.compile(e.expr, t)
  3170. }))
  3171. }, i.compileLookupVal = function(e, t) {
  3172. this._emit("runtime.memberLookup(("), this._compileExpression(e.target, t), this._emit("),"), this._compileExpression(e.val, t), this._emit(")")
  3173. }, i._getNodeName = function(e) {
  3174. switch (e.typename) {
  3175. case "Symbol":
  3176. return e.value;
  3177. case "FunCall":
  3178. return "the return value of (" + this._getNodeName(e.name) + ")";
  3179. case "LookupVal":
  3180. return this._getNodeName(e.target) + '["' + this._getNodeName(e.val) + '"]';
  3181. case "Literal":
  3182. return e.value.toString();
  3183. default:
  3184. return "--expression--"
  3185. }
  3186. }, i.compileFunCall = function(e, t) {
  3187. this._emit("(lineno = " + e.lineno + ", colno = " + e.colno + ", "), this._emit("runtime.callWrap("), this._compileExpression(e.name, t), this._emit(', "' + this._getNodeName(e.name)
  3188. .replace(/"/g, '\\"') + '", context, '), this._compileAggregate(e.args, t, "[", "])"), this._emit(")")
  3189. }, i.compileFilter = function(e, t) {
  3190. var n = e.name;
  3191. this.assertType(n, hr.Symbol), this._emit('env.getFilter("' + n.value + '").call(context, '), this._compileAggregate(e.args, t), this._emit(")")
  3192. }, i.compileFilterAsync = function(e, t) {
  3193. var n = e.name,
  3194. r = e.symbol.value;
  3195. 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()
  3196. }, i.compileKeywordArgs = function(e, t) {
  3197. this._emit("runtime.makeKeywordArgs("), this.compileDict(e, t), this._emit(")")
  3198. }, i.compileSet = function(e, t) {
  3199. var n = this,
  3200. r = [];
  3201. e.targets.forEach((function(e) {
  3202. var i = e.value,
  3203. s = t.lookup(i);
  3204. null == s && (s = n._tmpid(), n._emitLine("var " + s + ";")), r.push(s)
  3205. })), 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) {
  3206. var i = r[t],
  3207. s = e.value;
  3208. 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("}"))
  3209. }))
  3210. }, i.compileSwitch = function(e, t) {
  3211. var n = this;
  3212. this._emit("switch ("), this.compile(e.expr, t), this._emit(") {"), e.cases.forEach((function(e, r) {
  3213. n._emit("case "), n.compile(e.cond, t), n._emit(": "), n.compile(e.body, t), e.body.children.length && n._emitLine("break;")
  3214. })), e.
  3215. default && (this._emit("default:"), this.compile(e.
  3216. default, t)), this._emit("}")
  3217. }, i.compileIf = function(e, t, n) {
  3218. var r = this;
  3219. this._emit("if("), this._compileExpression(e.cond, t), this._emitLine(") {"), this._withScopedSyntax((function() {
  3220. r.compile(e.body, t), n && r._emit("cb()")
  3221. })), e.else_ ? (this._emitLine("}\nelse {"), this._withScopedSyntax((function() {
  3222. r.compile(e.else_, t), n && r._emit("cb()")
  3223. }))) : n && (this._emitLine("}\nelse {"), this._emit("cb()")), this._emitLine("}")
  3224. }, i.compileIfAsync = function(e, t) {
  3225. this._emit("(function(cb) {"), this.compileIf(e, t, !0), this._emit("})(" + this._makeCallback()), this._addScopeLevel()
  3226. }, i._emitLoopBindings = function(e, t, n, r) {
  3227. var i = this;
  3228. [{
  3229. name: "index",
  3230. val: n + " + 1"
  3231. }, {
  3232. name: "index0",
  3233. val: n
  3234. }, {
  3235. name: "revindex",
  3236. val: r + " - " + n
  3237. }, {
  3238. name: "revindex0",
  3239. val: r + " - " + n + " - 1"
  3240. }, {
  3241. name: "first",
  3242. val: n + " === 0"
  3243. }, {
  3244. name: "last",
  3245. val: n + " === " + r + " - 1"
  3246. }, {
  3247. name: "length",
  3248. val: r
  3249. }].forEach((function(e) {
  3250. i._emitLine('frame.set("loop.' + e.name + '", ' + e.val + ");")
  3251. }))
  3252. }, i.compileFor = function(e, t) {
  3253. var n = this,
  3254. r = this._tmpid(),
  3255. i = this._tmpid(),
  3256. s = this._tmpid();
  3257. 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) {
  3258. 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) {
  3259. var o = n._tmpid();
  3260. n._emitLine("var " + o + " = " + s + "[" + r + "][" + a + "];"), n._emitLine('frame.set("' + i + '", ' + s + "[" + r + "][" + a + "]);"), t.set(e.name.children[a].value, o)
  3261. })), this._emitLoopBindings(e, s, r, i), this._withScopedSyntax((function() {
  3262. n.compile(e.body, t)
  3263. })), this._emitLine("}"), this._emitLine("} else {");
  3264. var a = e.name.children,
  3265. o = a[0],
  3266. c = a[1],
  3267. l = this._tmpid(),
  3268. h = this._tmpid();
  3269. 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() {
  3270. n.compile(e.body, t)
  3271. })), this._emitLine("}"), this._emitLine("}")
  3272. } else {
  3273. var u = this._tmpid();
  3274. 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() {
  3275. n.compile(e.body, t)
  3276. })), this._emitLine("}")
  3277. }
  3278. this._emitLine("}"), e.else_ && (this._emitLine("if (!" + i + ") {"), this.compile(e.else_, t), this._emitLine("}")), this._emitLine("frame = frame.pop();")
  3279. }, i._compileAsyncLoop = function(e, t, n) {
  3280. var r = this,
  3281. i = this._tmpid(),
  3282. s = this._tmpid(),
  3283. a = this._tmpid(),
  3284. o = n ? "asyncAll" : "asyncEach";
  3285. 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) {
  3286. var c = e.name.children.length;
  3287. this._emit("runtime." + o + "(" + a + ", " + c + ", function("), e.name.children.forEach((function(e) {
  3288. r._emit(e.value + ",")
  3289. })), this._emit(i + "," + s + ",next) {"), e.name.children.forEach((function(e) {
  3290. var n = e.value;
  3291. t.set(n, n), r._emitLine('frame.set("' + n + '", ' + n + ");")
  3292. }))
  3293. } else {
  3294. var l = e.name.value;
  3295. this._emitLine("runtime." + o + "(" + a + ", 1, function(" + l + ", " + i + ", " + s + ",next) {"), this._emitLine('frame.set("' + l + '", ' + l + ");"), t.set(l, l)
  3296. }
  3297. this._emitLoopBindings(e, a, i, s), this._withScopedSyntax((function() {
  3298. var s;
  3299. n && (s = r._pushBuffer()), r.compile(e.body, t), r._emitLine("next(" + i + (s ? "," + s : "") + ");"), n && r._popBuffer()
  3300. }));
  3301. var h = this._tmpid();
  3302. 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();")
  3303. }, i.compileAsyncEach = function(e, t) {
  3304. this._compileAsyncLoop(e, t)
  3305. }, i.compileAsyncAll = function(e, t) {
  3306. this._compileAsyncLoop(e, t, !0)
  3307. }, i._compileMacro = function(e, t) {
  3308. var n = this,
  3309. r = [],
  3310. i = null,
  3311. s = "macro_" + this._tmpid(),
  3312. a = void 0 !== t;
  3313. e.args.children.forEach((function(t, s) {
  3314. s === e.args.children.length - 1 && t instanceof hr.Dict ? i = t : (n.assertType(t, hr.Symbol), r.push(t))
  3315. }));
  3316. var o, c = [].concat(r.map((function(e) {
  3317. return "l_" + e.value
  3318. })), ["kwargs"]),
  3319. l = r.map((function(e) {
  3320. return '"' + e.value + '"'
  3321. })),
  3322. h = (i && i.children || [])
  3323. .map((function(e) {
  3324. return '"' + e.key.value + '"'
  3325. }));
  3326. 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) {
  3327. n._emitLine('frame.set("' + e.value + '", l_' + e.value + ");"), o.set(e.value, "l_" + e.value)
  3328. })), i && i.children.forEach((function(e) {
  3329. var t = e.key.value;
  3330. n._emit('frame.set("' + t + '", '), n._emit('Object.prototype.hasOwnProperty.call(kwargs, "' + t + '")'), n._emit(' ? kwargs["' + t + '"] : '), n._compileExpression(e.value, o), n._emit(");")
  3331. }));
  3332. var u = this._pushBuffer();
  3333. return this._withScopedSyntax((function() {
  3334. n.compile(e.body, o)
  3335. })), this._emitLine("frame = " + (a ? "frame.pop();" : "callerFrame;")), this._emitLine("return new runtime.SafeString(" + u + ");"), this._emitLine("});"), this._popBuffer(), s
  3336. }, i.compileMacro = function(e, t) {
  3337. var n = this._compileMacro(e),
  3338. r = e.name.value;
  3339. 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 + ");"))
  3340. }, i.compileCaller = function(e, t) {
  3341. this._emit("(function (){");
  3342. var n = this._compileMacro(e, t);
  3343. this._emit("return " + n + ";})()")
  3344. }, i._compileGetTemplate = function(e, t, n, r) {
  3345. var i = this._tmpid(),
  3346. s = this._templateName(),
  3347. a = this._makeCallback(i),
  3348. o = n ? "true" : "false",
  3349. c = r ? "true" : "false";
  3350. return this._emit("env.getTemplate("), this._compileExpression(e.template, t), this._emitLine(", " + o + ", " + s + ", " + c + ", " + a), i
  3351. }, i.compileImport = function(e, t) {
  3352. var n = e.target.value,
  3353. r = this._compileGetTemplate(e, t, !1, !1);
  3354. 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 + ");")
  3355. }, i.compileFromImport = function(e, t) {
  3356. var n = this,
  3357. r = this._compileGetTemplate(e, t, !1, !1);
  3358. this._addScopeLevel(), this._emitLine(r + ".getExported(" + (e.withContext ? "context.getVariables(), frame, " : "") + this._makeCallback(r)), this._addScopeLevel(), e.names.children.forEach((function(e) {
  3359. var i, s, a = n._tmpid();
  3360. 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 + ");")
  3361. }))
  3362. }, i.compileBlock = function(e) {
  3363. var t = this._tmpid();
  3364. 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()
  3365. }, i.compileSuper = function(e, t) {
  3366. var n = e.blockName.value,
  3367. r = e.symbol.value,
  3368. i = this._makeCallback(r);
  3369. this._emitLine('context.getSuper(env, "' + n + '", b_' + n + ", frame, runtime, " + i), this._emitLine(r + " = runtime.markSafe(" + r + ");"), this._addScopeLevel(), t.set(r, r)
  3370. }, i.compileExtends = function(e, t) {
  3371. var n = this._tmpid(),
  3372. r = this._compileGetTemplate(e, t, !0, !1);
  3373. this._emitLine("parentTemplate = " + r), this._emitLine("for(var " + n + " in parentTemplate.blocks) {"), this._emitLine("context.addBlock(" + n + ", parentTemplate.blocks[" + n + "]);"), this._emitLine("}"), this._addScopeLevel()
  3374. }, i.compileInclude = function(e, t) {
  3375. this._emitLine("var tasks = [];"), this._emitLine("tasks.push("), this._emitLine("function(callback) {");
  3376. var n = this._compileGetTemplate(e, t, !1, e.ignoreMissing);
  3377. this._emitLine("callback(null," + n + ");});"), this._emitLine("});");
  3378. var r = this._tmpid();
  3379. 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()
  3380. }, i.compileTemplateData = function(e, t) {
  3381. this.compileLiteral(e, t)
  3382. }, i.compileCapture = function(e, t) {
  3383. var n = this,
  3384. r = this.buffer;
  3385. this.buffer = "output", this._emitLine("(function() {"), this._emitLine('var output = "";'), this._withScopedSyntax((function() {
  3386. n.compile(e.body, t)
  3387. })), this._emitLine("return output;"), this._emitLine("})()"), this.buffer = r
  3388. }, i.compileOutput = function(e, t) {
  3389. var n = this;
  3390. e.children.forEach((function(r) {
  3391. 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"))
  3392. }))
  3393. }, i.compileRoot = function(e, t) {
  3394. var n = this;
  3395. 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;
  3396. var r = [],
  3397. i = e.findAll(hr.Block);
  3398. i.forEach((function(e, t) {
  3399. var i = e.name.value;
  3400. if (-1 !== r.indexOf(i)) throw new Error('Block "' + i + '" defined more than once.');
  3401. r.push(i), n._emitFuncBegin(e, "b_" + i);
  3402. var s = new Rr;
  3403. n._emitLine("var frame = frame.push(true);"), n.compile(e.body, s), n._emitFuncEnd()
  3404. })), this._emitLine("return {"), i.forEach((function(e, t) {
  3405. var r = "b_" + e.name.value;
  3406. n._emitLine(r + ": " + r + ",")
  3407. })), this._emitLine("root: root\n};")
  3408. }, i.compile = function(e, t) {
  3409. var n = this["compile" + e.typename];
  3410. n ? n.call(this, e, t) : this.fail("compile: Cannot compile node: " + e.typename, e.lineno, e.colno)
  3411. }, i.getCode = function() {
  3412. return this.codebuf.join("")
  3413. }, r
  3414. }(en.Obj),
  3415. xr = {
  3416. compile: function(e, t, n, r, i) {
  3417. void 0 === i && (i = {});
  3418. var s = new Pr(r, i.throwOnUndefined),
  3419. a = (n || [])
  3420. .map((function(e) {
  3421. return e.preprocess
  3422. }))
  3423. .filter((function(e) {
  3424. return !!e
  3425. }))
  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. }, wr = Ke((function(e) {
  3433. var t = e.exports = {};
  3434. function n(e, t) {
  3435. return null == e || !1 === e ? t : e
  3436. }
  3437. function r(e) {
  3438. return e != e
  3439. }
  3440. function i(e) {
  3441. var t = (e = n(e, ""))
  3442. .toLowerCase();
  3443. return kr.copySafeness(e, t.charAt(0)
  3444. .toUpperCase() + t.slice(1))
  3445. }
  3446. function s(e) {
  3447. if (je.isString(e)) return e.split("");
  3448. if (je.isObject(e)) return je._entries(e || {})
  3449. .map((function(e) {
  3450. return {
  3451. key: e[0],
  3452. value: e[1]
  3453. }
  3454. }));
  3455. if (je.isArray(e)) return e;
  3456. throw new je.TemplateError("list filter: type not iterable")
  3457. }
  3458. function a(e) {
  3459. return function(t, n, r) {
  3460. void 0 === n && (n = "truthy");
  3461. var i = this,
  3462. s = i.env.getTest(n);
  3463. return je.toArray(t)
  3464. .filter((function(t) {
  3465. return s.call(i, t, r) === e
  3466. }))
  3467. }
  3468. }
  3469. function o(e) {
  3470. return kr.copySafeness(e, e.replace(/^\s*|\s*$/g, ""))
  3471. }
  3472. t.abs = Math.abs, t.batch = function(e, t, n) {
  3473. var r, i = [],
  3474. s = [];
  3475. for (r = 0; r < e.length; r++) r % t == 0 && s.length && (i.push(s), s = []), s.push(e[r]);
  3476. if (s.length) {
  3477. if (n) for (r = s.length; r < t; r++) s.push(n);
  3478. i.push(s)
  3479. }
  3480. return i
  3481. }, t.capitalize = i, t.center = function(e, t) {
  3482. if (t = t || 80, (e = n(e, ""))
  3483. .length >= t) return e;
  3484. var r = t - e.length,
  3485. i = je.repeat(" ", r / 2 - r % 2),
  3486. s = je.repeat(" ", r / 2);
  3487. return kr.copySafeness(e, i + e + s)
  3488. }, t.
  3489. default = function(e, t, n) {
  3490. return n ? e || t : void 0 !== e ? e : t
  3491. }, t.dictsort = function(e, t, n) {
  3492. if (!je.isObject(e)) throw new je.TemplateError("dictsort filter: val must be an object");
  3493. var r, i = [];
  3494. for (var s in e) i.push([s, e[s]]);
  3495. if (void 0 === n || "key" === n) r = 0;
  3496. else {
  3497. if ("value" !== n) throw new je.TemplateError("dictsort filter: You can only sort by either key or value");
  3498. r = 1
  3499. }
  3500. return i.sort((function(e, n) {
  3501. var i = e[r],
  3502. s = n[r];
  3503. return t || (je.isString(i) && (i = i.toUpperCase()), je.isString(s) && (s = s.toUpperCase())), i > s ? 1 : i === s ? 0 : -1
  3504. })), i
  3505. }, t.dump = function(e, t) {
  3506. return JSON.stringify(e, null, t)
  3507. }, t.escape = function(e) {
  3508. return e instanceof kr.SafeString ? e : (e = null == e ? "" : e, kr.markSafe(je.escape(e.toString())))
  3509. }, t.safe = function(e) {
  3510. return e instanceof kr.SafeString ? e : (e = null == e ? "" : e, kr.markSafe(e.toString()))
  3511. }, t.first = function(e) {
  3512. return e[0]
  3513. }, t.forceescape = function(e) {
  3514. return e = null == e ? "" : e, kr.markSafe(je.escape(e.toString()))
  3515. }, t.groupby = function(e, t) {
  3516. return je.groupBy(e, t, this.env.opts.throwOnUndefined)
  3517. }, t.indent = function(e, t, r) {
  3518. if ("" === (e = n(e, ""))) return "";
  3519. t = t || 4;
  3520. var i = e.split("\n"),
  3521. s = je.repeat(" ", t),
  3522. a = i.map((function(e, t) {
  3523. return 0 !== t || r ? "" + s + e : e
  3524. }))
  3525. .join("\n");
  3526. return kr.copySafeness(e, a)
  3527. }, t.join = function(e, t, n) {
  3528. return t = t || "", n && (e = je.map(e, (function(e) {
  3529. return e[n]
  3530. }))), e.join(t)
  3531. }, t.last = function(e) {
  3532. return e[e.length - 1]
  3533. }, t.length = function(e) {
  3534. var t = n(e, "");
  3535. 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)
  3536. .length : 0
  3537. }, t.list = s, t.lower = function(e) {
  3538. return (e = n(e, ""))
  3539. .toLowerCase()
  3540. }, t.nl2br = function(e) {
  3541. return null == e ? "" : kr.copySafeness(e, e.replace(/\r\n|\n/g, "<br />\n"))
  3542. }, t.random = function(e) {
  3543. return e[Math.floor(Math.random() * e.length)]
  3544. }, t.reject = a(!1), t.rejectattr = function(e, t) {
  3545. return e.filter((function(e) {
  3546. return !e[t]
  3547. }))
  3548. }, t.select = a(!0), t.selectattr = function(e, t) {
  3549. return e.filter((function(e) {
  3550. return !!e[t]
  3551. }))
  3552. }, t.replace = function(e, t, n, r) {
  3553. var i = e;
  3554. if (t instanceof RegExp) return e.replace(t, n);
  3555. void 0 === r && (r = -1);
  3556. var s = "";
  3557. if ("number" == typeof t) t = "" + t;
  3558. else if ("string" != typeof t) return e;
  3559. if ("number" == typeof e && (e = "" + e), "string" != typeof e && !(e instanceof kr.SafeString)) return e;
  3560. if ("" === t) return s = n + e.split("")
  3561. .join(n) + n, kr.copySafeness(e, s);
  3562. var a = e.indexOf(t);
  3563. if (0 === r || -1 === a) return e;
  3564. 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);
  3565. return o < e.length && (s += e.substring(o)), kr.copySafeness(i, s)
  3566. }, t.reverse = function(e) {
  3567. var t;
  3568. return (t = je.isString(e) ? s(e) : je.map(e, (function(e) {
  3569. return e
  3570. })))
  3571. .reverse(), je.isString(e) ? kr.copySafeness(e, t.join("")) : t
  3572. }, t.round = function(e, t, n) {
  3573. t = t || 0;
  3574. var r = Math.pow(10, t);
  3575. return ("ceil" === n ? Math.ceil : "floor" === n ? Math.floor : Math.round)(e * r) / r
  3576. }, t.slice = function(e, t, n) {
  3577. for (var r = Math.floor(e.length / t), i = e.length % t, s = [], a = 0, o = 0; o < t; o++) {
  3578. var c = a + o * r;
  3579. o < i && a++;
  3580. var l = a + (o + 1) * r,
  3581. h = e.slice(c, l);
  3582. n && o >= i && h.push(n), s.push(h)
  3583. }
  3584. return s
  3585. }, t.sum = function(e, t, n) {
  3586. return void 0 === n && (n = 0), t && (e = je.map(e, (function(e) {
  3587. return e[t]
  3588. }))), n + e.reduce((function(e, t) {
  3589. return e + t
  3590. }), 0)
  3591. }, t.sort = kr.makeMacro(["value", "reverse", "case_sensitive", "attribute"], [], (function(e, t, n, r) {
  3592. var i = this,
  3593. s = je.map(e, (function(e) {
  3594. return e
  3595. })),
  3596. a = je.getAttrGetter(r);
  3597. return s.sort((function(e, s) {
  3598. var o = r ? a(e) : e,
  3599. c = r ? a(s) : s;
  3600. if (i.env.opts.throwOnUndefined && r && (void 0 === o || void 0 === c)) throw new TypeError('sort: attribute "' + r + '" resolved to undefined');
  3601. 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
  3602. })), s
  3603. })), t.string = function(e) {
  3604. return kr.copySafeness(e, e)
  3605. }, t.striptags = function(e, t) {
  3606. var r = o((e = n(e, ""))
  3607. .replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|<!--[\s\S]*?-->/gi, "")),
  3608. i = "";
  3609. return i = t ? r.replace(/^ +| +$/gm, "")
  3610. .replace(/ +/g, " ")
  3611. .replace(/(\r\n)/g, "\n")
  3612. .replace(/\n\n\n+/g, "\n\n") : r.replace(/\s+/gi, " "), kr.copySafeness(e, i)
  3613. }, t.title = function(e) {
  3614. var t = (e = n(e, ""))
  3615. .split(" ")
  3616. .map((function(e) {
  3617. return i(e)
  3618. }));
  3619. return kr.copySafeness(e, t.join(" "))
  3620. }, t.trim = o, t.truncate = function(e, t, r, i) {
  3621. var s = e;
  3622. if (t = t || 255, (e = n(e, ""))
  3623. .length <= t) return e;
  3624. if (r) e = e.substring(0, t);
  3625. else {
  3626. var a = e.lastIndexOf(" ", t); - 1 === a && (a = t), e = e.substring(0, a)
  3627. }
  3628. return e += null != i ? i : "...", kr.copySafeness(s, e)
  3629. }, t.upper = function(e) {
  3630. return (e = n(e, ""))
  3631. .toUpperCase()
  3632. }, t.urlencode = function(e) {
  3633. var t = encodeURIComponent;
  3634. return je.isString(e) ? t(e) : (je.isArray(e) ? e : je._entries(e))
  3635. .map((function(e) {
  3636. var n = e[0],
  3637. r = e[1];
  3638. return t(n) + "=" + t(r)
  3639. }))
  3640. .join("&")
  3641. };
  3642. var c = /^(?:\(|<|&lt;)?(.*?)(?:\.|,|\)|\n|&gt;)?$/,
  3643. l = /^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,
  3644. h = /^https?:\/\/.*$/,
  3645. u = /^www\./,
  3646. p = /\.(?:org|net|com)(?:\:|\/|$)/;
  3647. t.urlize = function(e, t, n) {
  3648. r(t) && (t = 1 / 0);
  3649. var i = !0 === n ? ' rel="nofollow"' : "";
  3650. return e.split(/(\s+)/)
  3651. .filter((function(e) {
  3652. return e && e.length
  3653. }))
  3654. .map((function(e) {
  3655. var n = e.match(c),
  3656. r = n ? n[1] : e,
  3657. s = r.substr(0, t);
  3658. 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
  3659. }))
  3660. .join("")
  3661. }, t.wordcount = function(e) {
  3662. var t = (e = n(e, "")) ? e.match(/\w+/g) : null;
  3663. return t ? t.length : null
  3664. }, t.float = function(e, t) {
  3665. var n = parseFloat(e);
  3666. return r(n) ? t : n
  3667. };
  3668. var f = kr.makeMacro(["value", "default", "base"], [], (function(e, t, n) {
  3669. void 0 === n && (n = 10);
  3670. var i = parseInt(e, n);
  3671. return r(i) ? t : i
  3672. }));
  3673. t.int = f, t.d = t.
  3674. default, t.e = t.escape
  3675. })),
  3676. Br = {};
  3677. function Fr(e, t) {
  3678. for (var n = 0, r = e.length - 1; r >= 0; r--) {
  3679. var i = e[r];
  3680. "." === i ? e.splice(r, 1) : ".." === i ? (e.splice(r, 1), n++) : n && (e.splice(r, 1), n--)
  3681. }
  3682. if (t) for (; n--; n) e.unshift("..");
  3683. return e
  3684. }
  3685. var Ur = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,
  3686. Hr = function(e) {
  3687. return Ur.exec(e)
  3688. .slice(1)
  3689. };
  3690. function Gr() {
  3691. for (var e = "", t = !1, n = arguments.length - 1; n >= -1 && !t; n--) {
  3692. var r = n >= 0 ? arguments[n] : "/";
  3693. if ("string" != typeof r) throw new TypeError("Arguments to path.resolve must be strings");
  3694. r && (e = r + "/" + e, t = "/" === r.charAt(0))
  3695. }
  3696. return (t ? "/" : "") + (e = Fr(jr(e.split("/"), (function(e) {
  3697. return !!e
  3698. })), !t)
  3699. .join("/")) || "."
  3700. }
  3701. function Yr(e) {
  3702. var t = qr(e),
  3703. n = "/" === Vr(e, -1);
  3704. return (e = Fr(jr(e.split("/"), (function(e) {
  3705. return !!e
  3706. })), !t)
  3707. .join("/")) || t || (e = "."), e && n && (e += "/"), (t ? "/" : "") + e
  3708. }
  3709. function qr(e) {
  3710. return "/" === e.charAt(0)
  3711. }
  3712. var Kr = {
  3713. extname: function(e) {
  3714. return Hr(e)[3]
  3715. },
  3716. basename: function(e, t) {
  3717. var n = Hr(e)[2];
  3718. return t && n.substr(-1 * t.length) === t && (n = n.substr(0, n.length - t.length)), n
  3719. },
  3720. dirname: function(e) {
  3721. var t = Hr(e),
  3722. n = t[0],
  3723. r = t[1];
  3724. return n || r ? (r && (r = r.substr(0, r.length - 1)), n + r) : "."
  3725. },
  3726. sep: "/",
  3727. delimiter: ":",
  3728. relative: function(e, t) {
  3729. function n(e) {
  3730. for (var t = 0; t < e.length && "" === e[t]; t++);
  3731. for (var n = e.length - 1; n >= 0 && "" === e[n]; n--);
  3732. return t > n ? [] : e.slice(t, n - t + 1)
  3733. }
  3734. e = Gr(e)
  3735. .substr(1), t = Gr(t)
  3736. .substr(1);
  3737. for (var r = n(e.split("/")), i = n(t.split("/")), s = Math.min(r.length, i.length), a = s, o = 0; o < s; o++) if (r[o] !== i[o]) {
  3738. a = o;
  3739. break
  3740. }
  3741. var c = [];
  3742. for (o = a; o < r.length; o++) c.push("..");
  3743. return (c = c.concat(i.slice(a)))
  3744. .join("/")
  3745. },
  3746. join: function() {
  3747. var e = Array.prototype.slice.call(arguments, 0);
  3748. return Yr(jr(e, (function(e, t) {
  3749. if ("string" != typeof e) throw new TypeError("Arguments to path.join must be strings");
  3750. return e
  3751. }))
  3752. .join("/"))
  3753. },
  3754. isAbsolute: qr,
  3755. normalize: Yr,
  3756. resolve: Gr
  3757. };
  3758. function jr(e, t) {
  3759. if (e.filter) return e.filter(t);
  3760. for (var n = [], r = 0; r < e.length; r++) t(e[r], r, e) && n.push(e[r]);
  3761. return n
  3762. }
  3763. var Vr = "b" === "ab".substr(-1) ? function(e, t, n) {
  3764. return e.substr(t, n)
  3765. } : function(e, t, n) {
  3766. return t < 0 && (t = e.length + t), e.substr(t, n)
  3767. };
  3768. function Wr(e, t) {
  3769. return Wr = Object.setPrototypeOf || function(e, t) {
  3770. return e.__proto__ = t, e
  3771. }, Wr(e, t)
  3772. }
  3773. var Qr = function(e) {
  3774. var t, n;
  3775. function r() {
  3776. return e.apply(this, arguments) || this
  3777. }
  3778. n = e, (t = r)
  3779. .prototype = Object.create(n.prototype), t.prototype.constructor = t, Wr(t, n);
  3780. var i = r.prototype;
  3781. return i.resolve = function(e, t) {
  3782. return Kr.resolve(Kr.dirname(e), t)
  3783. }, i.isRelative = function(e) {
  3784. return 0 === e.indexOf("./") || 0 === e.indexOf("../")
  3785. }, r
  3786. }(en.EmitterObj);
  3787. function Xr(e, t) {
  3788. return Xr = Object.setPrototypeOf || function(e, t) {
  3789. return e.__proto__ = t, e
  3790. }, Xr(e, t)
  3791. }
  3792. var $r = function(e) {
  3793. var t, n;
  3794. function r(t) {
  3795. var n;
  3796. return (n = e.call(this) || this)
  3797. .precompiled = t || {}, n
  3798. }
  3799. return n = e, (t = r)
  3800. .prototype = Object.create(n.prototype), t.prototype.constructor = t, Xr(t, n), r.prototype.getSource = function(e) {
  3801. return this.precompiled[e] ? {
  3802. src: {
  3803. type: "code",
  3804. obj: this.precompiled[e]
  3805. },
  3806. path: e
  3807. } : null
  3808. }, r
  3809. }(Qr);
  3810. function zr(e, t) {
  3811. e.prototype = Object.create(t.prototype), e.prototype.constructor = e, Jr(e, t)
  3812. }
  3813. function Jr(e, t) {
  3814. return Jr = Object.setPrototypeOf || function(e, t) {
  3815. return e.__proto__ = t, e
  3816. }, Jr(e, t)
  3817. }
  3818. var Zr = {
  3819. PrecompiledLoader: $r
  3820. }.PrecompiledLoader,
  3821. ei = function(e) {
  3822. function t(t, n) {
  3823. var r;
  3824. return n = n || {}, (r = e.call(this) || this)
  3825. .pathsToNames = {}, r.noCache = !! n.noCache, t ? (t = Array.isArray(t) ? t : [t], r.searchPaths = t.map(Kr.normalize)) : r.searchPaths = ["."], r
  3826. }
  3827. return zr(t, e), t.prototype.getSource = function(e) {
  3828. for (var t = null, n = this.searchPaths, r = 0; r < n.length; r++) {
  3829. var i = Kr.resolve(n[r]),
  3830. s = Kr.resolve(n[r], e);
  3831. if (0 === s.indexOf(i) && Br.existsSync(s)) {
  3832. t = s;
  3833. break
  3834. }
  3835. }
  3836. if (!t) return null;
  3837. this.pathsToNames[t] = e;
  3838. var a = {
  3839. src: Br.readFileSync(t, "utf-8"),
  3840. path: t,
  3841. noCache: this.noCache
  3842. };
  3843. return this.emit("load", e, a), a
  3844. }, t
  3845. }(Qr),
  3846. ti = {
  3847. FileSystemLoader: ei,
  3848. PrecompiledLoader: Zr,
  3849. NodeResolveLoader: function(e) {
  3850. function t(t) {
  3851. var n;
  3852. return t = t || {}, (n = e.call(this) || this)
  3853. .pathsToNames = {}, n.noCache = !! t.noCache, n
  3854. }
  3855. return zr(t, e), t.prototype.getSource = function(e) {
  3856. if (/^\.?\.?(\/|\\)/.test(e)) return null;
  3857. if (/^[A-Z]:/.test(e)) return null;
  3858. var t;
  3859. try {
  3860. t = Ye.resolve(e)
  3861. } catch (e) {
  3862. return null
  3863. }
  3864. this.pathsToNames[t] = e;
  3865. var n = {
  3866. src: Br.readFileSync(t, "utf-8"),
  3867. path: t,
  3868. noCache: this.noCache
  3869. };
  3870. return this.emit("load", e, n), n
  3871. }, t
  3872. }(Qr)
  3873. }, ni = Ke((function(e, t) {
  3874. var n = kr.SafeString;
  3875. t.callable = function(e) {
  3876. return "function" == typeof e
  3877. }, t.defined = function(e) {
  3878. return void 0 !== e
  3879. }, t.divisibleby = function(e, t) {
  3880. return e % t == 0
  3881. }, t.escaped = function(e) {
  3882. return e instanceof n
  3883. }, t.equalto = function(e, t) {
  3884. return e === t
  3885. }, t.eq = t.equalto, t.sameas = t.equalto, t.even = function(e) {
  3886. return e % 2 == 0
  3887. }, t.falsy = function(e) {
  3888. return !e
  3889. }, t.ge = function(e, t) {
  3890. return e >= t
  3891. }, t.greaterthan = function(e, t) {
  3892. return e > t
  3893. }, t.gt = t.greaterthan, t.le = function(e, t) {
  3894. return e <= t
  3895. }, t.lessthan = function(e, t) {
  3896. return e < t
  3897. }, t.lt = t.lessthan, t.lower = function(e) {
  3898. return e.toLowerCase() === e
  3899. }, t.ne = function(e, t) {
  3900. return e !== t
  3901. }, t.null = function(e) {
  3902. return null === e
  3903. }, t.number = function(e) {
  3904. return "number" == typeof e
  3905. }, t.odd = function(e) {
  3906. return e % 2 == 1
  3907. }, t.string = function(e) {
  3908. return "string" == typeof e
  3909. }, t.truthy = function(e) {
  3910. return !!e
  3911. }, t.undefined = function(e) {
  3912. return void 0 === e
  3913. }, t.upper = function(e) {
  3914. return e.toUpperCase() === e
  3915. }, t.iterable = function(e) {
  3916. return "undefined" != typeof Symbol ? !! e[Symbol.iterator] : Array.isArray(e) || "string" == typeof e
  3917. }, t.mapping = function(e) {
  3918. var t = null != e && "object" == typeof e && !Array.isArray(e);
  3919. return Set ? t && !(e instanceof Set) : t
  3920. }
  3921. }));
  3922. function ri(e) {
  3923. var t = -1;
  3924. return {
  3925. current: null,
  3926. reset: function() {
  3927. t = -1, this.current = null
  3928. },
  3929. next: function() {
  3930. return ++t >= e.length && (t = 0), this.current = e[t], this.current
  3931. }
  3932. }
  3933. }
  3934. 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;
  3935. var ii = function() {
  3936. return {
  3937. range: function(e, t, n) {
  3938. void 0 === t ? (t = e, e = 0, n = 1) : n || (n = 1);
  3939. var r = [];
  3940. if (n > 0) for (var i = e; i < t; i += n) r.push(i);
  3941. else for (var s = e; s > t; s += n) r.push(s);
  3942. return r
  3943. },
  3944. cycler: function() {
  3945. return ri(Array.prototype.slice.call(arguments))
  3946. },
  3947. joiner: function(e) {
  3948. return function(e) {
  3949. e = e || ",";
  3950. var t = !0;
  3951. return function() {
  3952. var n = t ? "" : e;
  3953. return t = !1, n
  3954. }
  3955. }(e)
  3956. }
  3957. }
  3958. };
  3959. function si(e, t) {
  3960. e.prototype = Object.create(t.prototype), e.prototype.constructor = e, ai(e, t)
  3961. }
  3962. function ai(e, t) {
  3963. return ai = Object.setPrototypeOf || function(e, t) {
  3964. return e.__proto__ = t, e
  3965. }, ai(e, t)
  3966. }
  3967. var oi = ti.FileSystemLoader,
  3968. ci = ti.WebLoader,
  3969. li = ti.PrecompiledLoader,
  3970. hi = en.Obj,
  3971. ui = en.EmitterObj,
  3972. pi = kr.handleError,
  3973. fi = kr.Frame;
  3974. function di(e, t, n) {
  3975. Gt((function() {
  3976. e(t, n)
  3977. }))
  3978. }
  3979. var Ei = {
  3980. type: "code",
  3981. obj: {
  3982. root: function(e, t, n, r, i) {
  3983. try {
  3984. i(null, "")
  3985. } catch (e) {
  3986. i(pi(e, null, null))
  3987. }
  3988. }
  3989. }
  3990. }, mi = function(e) {
  3991. function t() {
  3992. return e.apply(this, arguments) || this
  3993. }
  3994. si(t, e);
  3995. var n = t.prototype;
  3996. return n.init = function(e, t) {
  3997. var n = this;
  3998. 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)
  3999. .forEach((function(e) {
  4000. var t = e[0],
  4001. r = e[1];
  4002. return n.addFilter(t, r)
  4003. })), je._entries(ni)
  4004. .forEach((function(e) {
  4005. var t = e[0],
  4006. r = e[1];
  4007. return n.addTest(t, r)
  4008. }))
  4009. }, n._initLoaders = function() {
  4010. var e = this;
  4011. this.loaders.forEach((function(t) {
  4012. t.cache = {}, "function" == typeof t.on && (t.on("update", (function(n, r) {
  4013. t.cache[n] = null, e.emit("update", n, r, t)
  4014. })), t.on("load", (function(n, r) {
  4015. e.emit("load", n, r, t)
  4016. })))
  4017. }))
  4018. }, n.invalidateCache = function() {
  4019. this.loaders.forEach((function(e) {
  4020. e.cache = {}
  4021. }))
  4022. }, n.addExtension = function(e, t) {
  4023. return t.__name = e, this.extensions[e] = t, this.extensionsList.push(t), this
  4024. }, n.removeExtension = function(e) {
  4025. var t = this.getExtension(e);
  4026. t && (this.extensionsList = je.without(this.extensionsList, t), delete this.extensions[e])
  4027. }, n.getExtension = function(e) {
  4028. return this.extensions[e]
  4029. }, n.hasExtension = function(e) {
  4030. return !!this.extensions[e]
  4031. }, n.addGlobal = function(e, t) {
  4032. return this.globals[e] = t, this
  4033. }, n.getGlobal = function(e) {
  4034. if (void 0 === this.globals[e]) throw new Error("global not found: " + e);
  4035. return this.globals[e]
  4036. }, n.addFilter = function(e, t, n) {
  4037. var r = t;
  4038. return n && this.asyncFilters.push(e), this.filters[e] = r, this
  4039. }, n.getFilter = function(e) {
  4040. if (!this.filters[e]) throw new Error("filter not found: " + e);
  4041. return this.filters[e]
  4042. }, n.addTest = function(e, t) {
  4043. return this.tests[e] = t, this
  4044. }, n.getTest = function(e) {
  4045. if (!this.tests[e]) throw new Error("test not found: " + e);
  4046. return this.tests[e]
  4047. }, n.resolveTemplate = function(e, t, n) {
  4048. return !(!e.isRelative || !t) && e.isRelative(n) && e.resolve ? e.resolve(t, n) : n
  4049. }, n.getTemplate = function(e, t, n, r, i) {
  4050. var s, a = this,
  4051. o = this,
  4052. c = null;
  4053. 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;
  4054. else {
  4055. if ("string" != typeof e) throw new Error("template names must be a string: " + e);
  4056. for (var l = 0; l < this.loaders.length; l++) {
  4057. var h = this.loaders[l];
  4058. if (c = h.cache[this.resolveTemplate(h, n, e)]) break
  4059. }
  4060. }
  4061. if (c) return t && c.compile(), i ? void i(null, c) : c;
  4062. return je.asyncIter(this.loaders, (function(t, r, i, s) {
  4063. function a(e, n) {
  4064. e ? s(e) : n ? (n.loader = t, s(null, n)) : i()
  4065. }
  4066. e = o.resolveTemplate(t, n, e), t.async ? t.getSource(e, a) : a(null, t.getSource(e))
  4067. }), (function(n, o) {
  4068. if (o || n || r || (n = new Error("template not found: " + e)), n) {
  4069. if (i) return void i(n);
  4070. throw n
  4071. }
  4072. var c;
  4073. 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
  4074. })), s
  4075. }, n.express = function(e) {
  4076. return function(e, t) {
  4077. function n(e, t) {
  4078. 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.");
  4079. this.ext || (this.name += this.ext = ("." !== this.defaultEngine[0] ? "." : "") + this.defaultEngine)
  4080. }
  4081. return n.prototype.render = function(t, n) {
  4082. e.render(this.name, t, n)
  4083. }, t.set("view", n), t.set("jinja2Env", e), e
  4084. }(this, e)
  4085. }, n.render = function(e, t, n) {
  4086. je.isFunction(t) && (n = t, t = null);
  4087. var r = null;
  4088. return this.getTemplate(e, (function(e, i) {
  4089. if (e && n) di(n, e);
  4090. else {
  4091. if (e) throw e;
  4092. r = i.render(t, n)
  4093. }
  4094. })), r
  4095. }, n.renderString = function(e, t, n, r) {
  4096. return je.isFunction(n) && (r = n, n = {}), new _i(e, this, (n = n || {})
  4097. .path)
  4098. .render(t, r)
  4099. }, n.waterfall = function(e, t, n) {
  4100. return qt(e, t, n)
  4101. }, t
  4102. }(ui),
  4103. Ti = function(e) {
  4104. function t() {
  4105. return e.apply(this, arguments) || this
  4106. }
  4107. si(t, e);
  4108. var n = t.prototype;
  4109. return n.init = function(e, t, n) {
  4110. var r = this;
  4111. this.env = n || new mi, this.ctx = je.extend({}, e), this.blocks = {}, this.exported = [], je.keys(t)
  4112. .forEach((function(e) {
  4113. r.addBlock(e, t[e])
  4114. }))
  4115. }, n.lookup = function(e) {
  4116. return e in this.env.globals && !(e in this.ctx) ? this.env.globals[e] : this.ctx[e]
  4117. }, n.setVariable = function(e, t) {
  4118. this.ctx[e] = t
  4119. }, n.getVariables = function() {
  4120. return this.ctx
  4121. }, n.addBlock = function(e, t) {
  4122. return this.blocks[e] = this.blocks[e] || [], this.blocks[e].push(t), this
  4123. }, n.getBlock = function(e) {
  4124. if (!this.blocks[e]) throw new Error('unknown block "' + e + '"');
  4125. return this.blocks[e][0]
  4126. }, n.getSuper = function(e, t, n, r, i, s) {
  4127. var a = je.indexOf(this.blocks[t] || [], n),
  4128. o = this.blocks[t][a + 1];
  4129. if (-1 === a || !o) throw new Error('no super block available for "' + t + '"');
  4130. o(e, this, r, i, s)
  4131. }, n.addExport = function(e) {
  4132. this.exported.push(e)
  4133. }, n.getExported = function() {
  4134. var e = this,
  4135. t = {};
  4136. return this.exported.forEach((function(n) {
  4137. t[n] = e.ctx[n]
  4138. })), t
  4139. }, t
  4140. }(hi),
  4141. _i = function(e) {
  4142. function t() {
  4143. return e.apply(this, arguments) || this
  4144. }
  4145. si(t, e);
  4146. var n = t.prototype;
  4147. return n.init = function(e, t, n, r) {
  4148. if (this.env = t || new mi, je.isObject(e)) switch (e.type) {
  4149. case "code":
  4150. this.tmplProps = e.obj;
  4151. break;
  4152. case "string":
  4153. this.tmplStr = e.obj;
  4154. break;
  4155. default:
  4156. throw new Error("Unexpected template object type " + e.type + "; expected 'code', or 'string'")
  4157. } else {
  4158. if (!je.isString(e)) throw new Error("src must be a string or an object describing the source");
  4159. this.tmplStr = e
  4160. }
  4161. if (this.path = n, r) try {
  4162. this._compile()
  4163. } catch (e) {
  4164. throw je._prettifyError(this.path, this.env.opts.dev, e)
  4165. } else this.compiled = !1
  4166. }, n.render = function(e, t, n) {
  4167. var r = this;
  4168. "function" == typeof e ? (n = e, e = {}) : "function" == typeof t && (n = t, t = null);
  4169. var i = !t;
  4170. try {
  4171. this.compile()
  4172. } catch (e) {
  4173. var s = je._prettifyError(this.path, this.env.opts.dev, e);
  4174. if (n) return di(n, s);
  4175. throw s
  4176. }
  4177. var a = new Ti(e || {}, this.blocks, this.env),
  4178. o = t ? t.push(!0) : new fi;
  4179. o.topLevel = !0;
  4180. var c = null,
  4181. l = !1;
  4182. return this.rootRenderFunc(this.env, a, o, kr, (function(e, t) {
  4183. if (!l || !n || void 0 === t) if (e && (e = je._prettifyError(r.path, r.env.opts.dev, e), l = !0), n) i ? di(n, e, t) : n(e, t);
  4184. else {
  4185. if (e) throw e;
  4186. c = t
  4187. }
  4188. })), c
  4189. }, n.getExported = function(e, t, n) {
  4190. "function" == typeof e && (n = e, e = {}), "function" == typeof t && (n = t, t = null);
  4191. try {
  4192. this.compile()
  4193. } catch (e) {
  4194. if (n) return n(e);
  4195. throw e
  4196. }
  4197. var r = t ? t.push() : new fi;
  4198. r.topLevel = !0;
  4199. var i = new Ti(e || {}, this.blocks, this.env);
  4200. this.rootRenderFunc(this.env, i, r, kr, (function(e) {
  4201. e ? n(e, null) : n(null, i.getExported())
  4202. }))
  4203. }, n.compile = function() {
  4204. this.compiled || this._compile()
  4205. }, n._compile = function() {
  4206. var e;
  4207. if (this.tmplProps) e = this.tmplProps;
  4208. else {
  4209. var t = xr.compile(this.tmplStr, this.env.asyncFilters, this.env.extensionsList, this.path, this.env.opts);
  4210. e = new Function(t)()
  4211. }
  4212. this.blocks = this._getBlocks(e), this.rootRenderFunc = e.root, this.compiled = !0
  4213. }, n._getBlocks = function(e) {
  4214. var t = {};
  4215. return je.keys(e)
  4216. .forEach((function(n) {
  4217. "b_" === n.slice(0, 2) && (t[n.slice(2)] = e[n])
  4218. })), t
  4219. }, t
  4220. }(hi),
  4221. Ai = {
  4222. Environment: mi,
  4223. Template: _i
  4224. };
  4225. je._prettifyError;
  4226. var gi, Ni = Ai.Environment;
  4227. function Ci(e, t) {
  4228. var n;
  4229. return t = t || {}, je.isObject(e) && (t = e, e = null), ti.FileSystemLoader ? n = new ti.FileSystemLoader(e, {
  4230. watch: t.watch,
  4231. noCache: t.noCache
  4232. }) : ti.WebLoader && (n = new ti.WebLoader(e, {
  4233. useCache: t.web && t.web.useCache,
  4234. async: t.web && t.web.async
  4235. })), gi = new Ni(n, t), t && t.express && gi.express(t.express), gi
  4236. }
  4237. ti.FileSystemLoader, ti.NodeResolveLoader, ti.PrecompiledLoader, ti.WebLoader;
  4238. var Ii = function(e, t, n) {
  4239. return gi || Ci(), gi.renderString(e, t, n)
  4240. }, Si = function() {
  4241. return Si = Object.assign || function(e) {
  4242. for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
  4243. return e
  4244. }, Si.apply(this, arguments)
  4245. };
  4246. function bi(e, t, n) {
  4247. return e ? e(null != t ? t : e._root.children, null, void 0, n)
  4248. .toString() : ""
  4249. }
  4250. function Oi(e, t) {
  4251. return bi(this, function(e, t) {
  4252. return !t && "object" == typeof e && null != e && !("length" in e) && !("type" in e)
  4253. }(e) ? void(t = e) : e, Si(Si(Si({}, n), null == this ? void 0 : this._options), i(null != t ? t : {})))
  4254. }
  4255. function yi(e) {
  4256. return bi(this, e, Si(Si({}, this._options), {
  4257. xmlMode: !0
  4258. }))
  4259. }
  4260. function Li(e) {
  4261. for (var t = e || (this ? this.root() : []), n = "", r = 0; r < t.length; r++) n += z(t[r]);
  4262. return n
  4263. }
  4264. function ki(e, t, r) {
  4265. if (void 0 === r && (r = "boolean" == typeof t && t), !e || "string" != typeof e) return null;
  4266. "boolean" == typeof t && (r = t);
  4267. var i = this.load(e, n, !1);
  4268. return r || i("script")
  4269. .remove(), i.root()[0].children.slice()
  4270. }
  4271. function vi() {
  4272. return this(this._root)
  4273. }
  4274. function Di(e, t) {
  4275. if (t === e) return !1;
  4276. for (var n = t; n && n !== n.parent;) if ((n = n.parent) === e) return !0;
  4277. return !1
  4278. }
  4279. function Ri(e, t) {
  4280. if (Mi(e) && Mi(t)) {
  4281. for (var n = e.length, r = +t.length, i = 0; i < r; i++) e[n++] = t[i];
  4282. return e.length = n, e
  4283. }
  4284. }
  4285. function Mi(e) {
  4286. if (Array.isArray(e)) return !0;
  4287. if ("object" != typeof e || !Object.prototype.hasOwnProperty.call(e, "length") || "number" != typeof e.length || e.length < 0) return !1;
  4288. for (var t = 0; t < e.length; t++) if (!(t in e)) return !1;
  4289. return !0
  4290. }
  4291. var Pi, xi = Object.freeze({
  4292. __proto__: null,
  4293. html: Oi,
  4294. xml: yi,
  4295. text: Li,
  4296. parseHTML: ki,
  4297. root: vi,
  4298. contains: Di,
  4299. merge: Ri,
  4300. jp: function(e, t) {
  4301. return He({
  4302. path: e,
  4303. json: t
  4304. })
  4305. },
  4306. jpo: function(e) {
  4307. return He(e)
  4308. },
  4309. jinja2: function(e, t) {
  4310. return Ii(e, t)
  4311. }
  4312. });
  4313. function wi(e) {
  4314. return null != e.cheerio
  4315. }
  4316. function Bi(e, t) {
  4317. for (var n = e.length, r = 0; r < n; r++) t(e[r], r);
  4318. return e
  4319. }
  4320. function Fi(e) {
  4321. var t = "length" in e ? Array.prototype.map.call(e, (function(e) {
  4322. return v(e, !0)
  4323. })) : [v(e, !0)],
  4324. n = new N(t);
  4325. return t.forEach((function(e) {
  4326. e.parent = n
  4327. })), t
  4328. }
  4329. function Ui(e) {
  4330. var t = e.indexOf("<");
  4331. if (t < 0 || t > e.length - 3) return !1;
  4332. var n = e.charCodeAt(t + 1);
  4333. return (n >= Pi.LowerA && n <= Pi.LowerZ || n >= Pi.UpperA && n <= Pi.UpperZ || n === Pi.Exclamation) && e.includes(">", t + 2)
  4334. }! function(e) {
  4335. 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"
  4336. }(Pi || (Pi = {}));
  4337. var Hi = Object.prototype.hasOwnProperty,
  4338. Gi = /\s+/,
  4339. Yi = {
  4340. null: null,
  4341. true: !0,
  4342. false: !1
  4343. }, qi = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
  4344. Ki = /^{[^]*}$|^\[[^]*]$/;
  4345. function ji(e, t, n) {
  4346. var r;
  4347. 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
  4348. }
  4349. function Vi(e, t, n) {
  4350. null === n ? zi(e, t) : e.attribs[t] = "".concat(n)
  4351. }
  4352. function Wi(e, t, n) {
  4353. return t in e ? e[t] : !n && qi.test(t) ? void 0 !== ji(e, t, !1) : ji(e, t, n)
  4354. }
  4355. function Qi(e, t, n, r) {
  4356. t in e ? e[t] = n : Vi(e, t, !r && qi.test(t) ? n ? "" : null : "".concat(n))
  4357. }
  4358. function Xi(e, t, n) {
  4359. var r, i = e;
  4360. 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)
  4361. }
  4362. function $i(e, t) {
  4363. var n, r, i, s;
  4364. null == t ? r = (n = Object.keys(e.attribs)
  4365. .filter((function(e) {
  4366. return e.startsWith("data-")
  4367. })))
  4368. .map((function(e) {
  4369. return e.slice("data-".length)
  4370. .replace(/[_.-](\w|$)/g, (function(e, t) {
  4371. return t.toUpperCase()
  4372. }))
  4373. })) : (n = ["data-" + (s = t, s.replace(/[A-Z]/g, "-$&")
  4374. .toLowerCase())], r = [t]);
  4375. for (var a = 0; a < n.length; ++a) {
  4376. var o = n[a],
  4377. c = r[a];
  4378. if (Hi.call(e.attribs, o) && !Hi.call(e.data, c)) {
  4379. if (i = e.attribs[o], Hi.call(Yi, i)) i = Yi[i];
  4380. else if (i === String(Number(i))) i = Number(i);
  4381. else if (Ki.test(i)) try {
  4382. i = JSON.parse(i)
  4383. } catch (e) {}
  4384. e.data[c] = i
  4385. }
  4386. }
  4387. return null == t ? e.data : i
  4388. }
  4389. function zi(e, t) {
  4390. e.attribs && Hi.call(e.attribs, t) && delete e.attribs[t]
  4391. }
  4392. function Ji(e) {
  4393. return e ? e.trim()
  4394. .split(Gi) : []
  4395. }
  4396. var Zi, es, ts = Object.freeze({
  4397. __proto__: null,
  4398. attr: function(e, t) {
  4399. if ("object" == typeof e || void 0 !== t) {
  4400. if ("function" == typeof t) {
  4401. if ("string" != typeof e) throw new Error("Bad combination of arguments.");
  4402. return Bi(this, (function(n, r) {
  4403. I(n) && Vi(n, e, t.call(n, r, n.attribs[e]))
  4404. }))
  4405. }
  4406. return Bi(this, (function(n) {
  4407. I(n) && ("object" == typeof e ? Object.keys(e)
  4408. .forEach((function(t) {
  4409. var r = e[t];
  4410. Vi(n, t, r)
  4411. })) : Vi(n, e, t))
  4412. }))
  4413. }
  4414. return arguments.length > 1 ? this : ji(this[0], e, this.options.xmlMode)
  4415. },
  4416. prop: function(e, t) {
  4417. var n, r = this;
  4418. if ("string" == typeof e && void 0 === t) {
  4419. var i = this[0];
  4420. if (!i || !I(i)) return;
  4421. switch (e) {
  4422. case "style":
  4423. var s = this.css(),
  4424. a = Object.keys(s);
  4425. return a.forEach((function(e, t) {
  4426. s[t] = e
  4427. })), s.length = a.length, s;
  4428. case "tagName":
  4429. case "nodeName":
  4430. return i.name.toUpperCase();
  4431. case "href":
  4432. case "src":
  4433. var o = null === (n = i.attribs) || void 0 === n ? void 0 : n[e];
  4434. 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)
  4435. .href;
  4436. case "innerText":
  4437. return J(i);
  4438. case "textContent":
  4439. return z(i);
  4440. case "outerHTML":
  4441. return this.clone()
  4442. .wrap("<container />")
  4443. .parent()
  4444. .html();
  4445. case "innerHTML":
  4446. return this.html();
  4447. default:
  4448. return Wi(i, e, this.options.xmlMode)
  4449. }
  4450. }
  4451. if ("object" == typeof e || void 0 !== t) {
  4452. if ("function" == typeof t) {
  4453. if ("object" == typeof e) throw new Error("Bad combination of arguments.");
  4454. return Bi(this, (function(n, i) {
  4455. I(n) && Qi(n, e, t.call(n, i, Wi(n, e, r.options.xmlMode)), r.options.xmlMode)
  4456. }))
  4457. }
  4458. return Bi(this, (function(n) {
  4459. I(n) && ("object" == typeof e ? Object.keys(e)
  4460. .forEach((function(t) {
  4461. var i = e[t];
  4462. Qi(n, t, i, r.options.xmlMode)
  4463. })) : Qi(n, e, t, r.options.xmlMode))
  4464. }))
  4465. }
  4466. },
  4467. data: function(e, t) {
  4468. var n, r = this[0];
  4469. if (r && I(r)) {
  4470. var i = r;
  4471. return null !== (n = i.data) && void 0 !== n || (i.data = {}), e ? "object" == typeof e || void 0 !== t ? (Bi(this, (function(n) {
  4472. I(n) && ("object" == typeof e ? Xi(n, e) : Xi(n, e, t))
  4473. })), this) : Hi.call(i.data, e) ? i.data[e] : $i(i, e) : $i(i)
  4474. }
  4475. },
  4476. val: function(e) {
  4477. var t = 0 === arguments.length,
  4478. n = this[0];
  4479. if (!n || !I(n)) return t ? void 0 : this;
  4480. switch (n.name) {
  4481. case "textarea":
  4482. return this.text(e);
  4483. case "select":
  4484. var r = this.find("option:selected");
  4485. if (!t) {
  4486. if (null == this.attr("multiple") && "object" == typeof e) return this;
  4487. this.find("option")
  4488. .removeAttr("selected");
  4489. for (var i = "object" != typeof e ? [e] : e, s = 0; s < i.length; s++) this.find('option[value="'.concat(i[s], '"]'))
  4490. .attr("selected", "");
  4491. return this
  4492. }
  4493. return this.attr("multiple") ? r.toArray()
  4494. .map((function(e) {
  4495. return Li(e.children)
  4496. })) : r.attr("value");
  4497. case "input":
  4498. case "option":
  4499. return t ? this.attr("value") : this.attr("value", e)
  4500. }
  4501. },
  4502. removeAttr: function(e) {
  4503. for (var t = Ji(e), n = function(e) {
  4504. Bi(r, (function(n) {
  4505. I(n) && zi(n, t[e])
  4506. }))
  4507. }, r = this, i = 0; i < t.length; i++) n(i);
  4508. return this
  4509. },
  4510. hasClass: function(e) {
  4511. return this.toArray()
  4512. .some((function(t) {
  4513. var n = I(t) && t.attribs.class,
  4514. r = -1;
  4515. if (n && e.length) for (;
  4516. (r = n.indexOf(e, r + 1)) > -1;) {
  4517. var i = r + e.length;
  4518. if ((0 === r || Gi.test(n[r - 1])) && (i === n.length || Gi.test(n[i]))) return !0
  4519. }
  4520. return !1
  4521. }))
  4522. },
  4523. addClass: function e(t) {
  4524. if ("function" == typeof t) return Bi(this, (function(n, r) {
  4525. if (I(n)) {
  4526. var i = n.attribs.class || "";
  4527. e.call([n], t.call(n, r, i))
  4528. }
  4529. }));
  4530. if (!t || "string" != typeof t) return this;
  4531. for (var n = t.split(Gi), r = this.length, i = 0; i < r; i++) {
  4532. var s = this[i];
  4533. if (I(s)) {
  4534. var a = ji(s, "class", !1);
  4535. if (a) {
  4536. for (var o = " ".concat(a, " "), c = 0; c < n.length; c++) {
  4537. var l = "".concat(n[c], " ");
  4538. o.includes(" ".concat(l)) || (o += l)
  4539. }
  4540. Vi(s, "class", o.trim())
  4541. } else Vi(s, "class", n.join(" ")
  4542. .trim())
  4543. }
  4544. }
  4545. return this
  4546. },
  4547. removeClass: function e(t) {
  4548. if ("function" == typeof t) return Bi(this, (function(n, r) {
  4549. I(n) && e.call([n], t.call(n, r, n.attribs.class || ""))
  4550. }));
  4551. var n = Ji(t),
  4552. r = n.length,
  4553. i = 0 === arguments.length;
  4554. return Bi(this, (function(e) {
  4555. if (I(e)) if (i) e.attribs.class = "";
  4556. else {
  4557. for (var t = Ji(e.attribs.class), s = !1, a = 0; a < r; a++) {
  4558. var o = t.indexOf(n[a]);
  4559. o >= 0 && (t.splice(o, 1), s = !0, a--)
  4560. }
  4561. s && (e.attribs.class = t.join(" "))
  4562. }
  4563. }))
  4564. },
  4565. toggleClass: function e(t, n) {
  4566. if ("function" == typeof t) return Bi(this, (function(r, i) {
  4567. I(r) && e.call([r], t.call(r, i, r.attribs.class || "", n), n)
  4568. }));
  4569. if (!t || "string" != typeof t) return this;
  4570. 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++) {
  4571. var c = this[o];
  4572. if (I(c)) {
  4573. for (var l = Ji(c.attribs.class), h = 0; h < i; h++) {
  4574. var u = l.indexOf(r[h]);
  4575. s >= 0 && u < 0 ? l.push(r[h]) : s <= 0 && u >= 0 && l.splice(u, 1)
  4576. }
  4577. c.attribs.class = l.join(" ")
  4578. }
  4579. }
  4580. return this
  4581. }
  4582. });
  4583. ! function(e) {
  4584. 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"
  4585. }(Zi || (Zi = {})),
  4586. function(e) {
  4587. e.Any = "any", e.Element = "element", e.End = "end", e.Equals = "equals", e.Exists = "exists", e.Hyphen = "hyphen", e.Not = "not", e.Start = "start"
  4588. }(es || (es = {}));
  4589. const ns = /^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/, rs = /\\([\da-f]{1,6}\s?|(\s)|.)/gi, is = new Map([
  4590. [126, es.Element],
  4591. [94, es.Start],
  4592. [36, es.End],
  4593. [42, es.Any],
  4594. [33, es.Not],
  4595. [124, es.Hyphen]
  4596. ]), ss = new Set(["has", "not", "matches", "is", "where", "host", "host-context"]);
  4597. function as(e) {
  4598. switch (e.type) {
  4599. case Zi.Adjacent:
  4600. case Zi.Child:
  4601. case Zi.Descendant:
  4602. case Zi.Parent:
  4603. case Zi.Sibling:
  4604. case Zi.ColumnCombinator:
  4605. return !0;
  4606. default:
  4607. return !1
  4608. }
  4609. }
  4610. const os = new Set(["contains", "icontains"]);
  4611. function cs(e, t, n) {
  4612. const r = parseInt(t, 16) - 65536;
  4613. return r != r || n ? t : r < 0 ? String.fromCharCode(r + 65536) : String.fromCharCode(r >> 10 | 55296, 1023 & r | 56320)
  4614. }
  4615. function ls(e) {
  4616. return e.replace(rs, cs)
  4617. }
  4618. function hs(e) {
  4619. return 39 === e || 34 === e
  4620. }
  4621. function us(e) {
  4622. return 32 === e || 9 === e || 10 === e || 12 === e || 13 === e
  4623. }
  4624. function ps(e) {
  4625. const t = [], n = fs(t, `${e}`, 0);
  4626. if (n < e.length) throw new Error(`Unmatched selector: ${e.slice(n)}`);
  4627. return t
  4628. }
  4629. function fs(e, t, n) {
  4630. let r = [];
  4631. function i(e) {
  4632. const r = t.slice(n + e)
  4633. .match(ns);
  4634. if (!r) throw new Error(`Expected name, found ${t.slice(n)}`);
  4635. const[i] = r;
  4636. return n += e + i.length, ls(i)
  4637. }
  4638. function s(e) {
  4639. for (n += e; n < t.length && us(t.charCodeAt(n));) n++
  4640. }
  4641. function a() {
  4642. const e = n += 1;
  4643. let r = 1;
  4644. for (; r > 0 && n < t.length; n++) 40 !== t.charCodeAt(n) || o(n) ? 41 !== t.charCodeAt(n) || o(n) || r-- : r++;
  4645. if (r) throw new Error("Parenthesis not matched");
  4646. return ls(t.slice(e, n - 1))
  4647. }
  4648. function o(e) {
  4649. let n = 0;
  4650. for (; 92 === t.charCodeAt(--e);) n++;
  4651. return 1 == (1 & n)
  4652. }
  4653. function c() {
  4654. if (r.length > 0 && as(r[r.length - 1])) throw new Error("Did not expect successive traversals.")
  4655. }
  4656. function l(e) {
  4657. r.length > 0 && r[r.length - 1].type === Zi.Descendant ? r[r.length - 1].type = e : (c(), r.push({
  4658. type: e
  4659. }))
  4660. }
  4661. function h(e, t) {
  4662. r.push({
  4663. type: Zi.Attribute,
  4664. name: e,
  4665. action: t,
  4666. value: i(1),
  4667. namespace: null,
  4668. ignoreCase: "quirks"
  4669. })
  4670. }
  4671. function u() {
  4672. if (r.length && r[r.length - 1].type === Zi.Descendant && r.pop(), 0 === r.length) throw new Error("Empty sub-selector");
  4673. e.push(r)
  4674. }
  4675. if (s(0), t.length === n) return n;
  4676. e: for (; n < t.length;) {
  4677. const e = t.charCodeAt(n);
  4678. switch (e) {
  4679. case 32:
  4680. case 9:
  4681. case 10:
  4682. case 12:
  4683. case 13:
  4684. 0 !== r.length && r[0].type === Zi.Descendant || (c(), r.push({
  4685. type: Zi.Descendant
  4686. })), s(1);
  4687. break;
  4688. case 62:
  4689. l(Zi.Child), s(1);
  4690. break;
  4691. case 60:
  4692. l(Zi.Parent), s(1);
  4693. break;
  4694. case 126:
  4695. l(Zi.Sibling), s(1);
  4696. break;
  4697. case 43:
  4698. l(Zi.Adjacent), s(1);
  4699. break;
  4700. case 46:
  4701. h("class", es.Element);
  4702. break;
  4703. case 35:
  4704. h("id", es.Equals);
  4705. break;
  4706. case 91:
  4707. {
  4708. let e;
  4709. s(1);
  4710. let a = null;
  4711. 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);
  4712. let c = es.Exists;
  4713. const l = is.get(t.charCodeAt(n));
  4714. if (l) {
  4715. if (c = l, 61 !== t.charCodeAt(n + 1)) throw new Error("Expected `=`");
  4716. s(2)
  4717. } else 61 === t.charCodeAt(n) && (c = es.Equals, s(1));
  4718. let h = "", u = null;
  4719. if ("exists" !== c) {
  4720. if (hs(t.charCodeAt(n))) {
  4721. const e = t.charCodeAt(n);
  4722. let r = n + 1;
  4723. for (; r < t.length && (t.charCodeAt(r) !== e || o(r));) r += 1;
  4724. if (t.charCodeAt(r) !== e) throw new Error("Attribute value didn't end");
  4725. h = ls(t.slice(n + 1, r)), n = r + 1
  4726. } else {
  4727. const e = n;
  4728. for (; n < t.length && (!us(t.charCodeAt(n)) && 93 !== t.charCodeAt(n) || o(n));) n += 1;
  4729. h = ls(t.slice(e, n))
  4730. }
  4731. s(0);
  4732. const e = 32 | t.charCodeAt(n);
  4733. 115 === e ? (u = !1, s(1)) : 105 === e && (u = !0, s(1))
  4734. }
  4735. if (93 !== t.charCodeAt(n)) throw new Error("Attribute selector didn't terminate");
  4736. n += 1;
  4737. const p = {
  4738. type: Zi.Attribute,
  4739. name: e,
  4740. action: c,
  4741. value: h,
  4742. namespace: a,
  4743. ignoreCase: u
  4744. };
  4745. r.push(p);
  4746. break
  4747. }
  4748. case 58:
  4749. {
  4750. if (58 === t.charCodeAt(n + 1)) {
  4751. r.push({
  4752. type: Zi.PseudoElement,
  4753. name: i(2)
  4754. .toLowerCase(),
  4755. data: 40 === t.charCodeAt(n) ? a() : null
  4756. });
  4757. continue
  4758. }
  4759. const e = i(1)
  4760. .toLowerCase();
  4761. let s = null;
  4762. if (40 === t.charCodeAt(n)) if (ss.has(e)) {
  4763. if (hs(t.charCodeAt(n + 1))) throw new Error(`Pseudo-selector ${e} cannot be quoted`);
  4764. if (s = [], n = fs(s, t, n + 1), 41 !== t.charCodeAt(n)) throw new Error(`Missing closing parenthesis in :${e} (${t})`);
  4765. n += 1
  4766. } else {
  4767. if (s = a(), os.has(e)) {
  4768. const e = s.charCodeAt(0);
  4769. e === s.charCodeAt(s.length - 1) && hs(e) && (s = s.slice(1, -1))
  4770. }
  4771. s = ls(s)
  4772. }
  4773. r.push({
  4774. type: Zi.Pseudo,
  4775. name: e,
  4776. data: s
  4777. });
  4778. break
  4779. }
  4780. case 44:
  4781. u(), r = [], s(1);
  4782. break;
  4783. default:
  4784. {
  4785. if (t.startsWith("/*", n)) {
  4786. const e = t.indexOf("*/", n + 2);
  4787. if (e < 0) throw new Error("Comment was not terminated");
  4788. n = e + 2, 0 === r.length && s(0);
  4789. break
  4790. }
  4791. let a, o = null;
  4792. if (42 === e) n += 1, a = "*";
  4793. else if (124 === e) {
  4794. if (a = "", 124 === t.charCodeAt(n + 1)) {
  4795. l(Zi.ColumnCombinator), s(2);
  4796. break
  4797. }
  4798. } else {
  4799. if (!ns.test(t.slice(n))) break e;
  4800. a = i(0)
  4801. }
  4802. 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 ? {
  4803. type: Zi.Universal,
  4804. namespace: o
  4805. } : {
  4806. type: Zi.Tag,
  4807. name: a,
  4808. namespace: o
  4809. })
  4810. }
  4811. }
  4812. }
  4813. return u(),
  4814. n
  4815. }
  4816. var ds = {
  4817. trueFunc: function() {
  4818. return !0
  4819. },
  4820. falseFunc: function() {
  4821. return !1
  4822. }
  4823. }, Es = ds.trueFunc;
  4824. const ms = new Map([
  4825. [Zi.Universal, 50],
  4826. [Zi.Tag, 30],
  4827. [Zi.Attribute, 1],
  4828. [Zi.Pseudo, 0]
  4829. ]);
  4830. function Ts(e) {
  4831. return !ms.has(e.type)
  4832. }
  4833. const _s = new Map([
  4834. [es.Exists, 10],
  4835. [es.Equals, 8],
  4836. [es.Not, 7],
  4837. [es.Start, 6],
  4838. [es.End, 6],
  4839. [es.Any, 5]
  4840. ]);
  4841. function As(e) {
  4842. const t = e.map(gs);
  4843. for (let n = 1; n < e.length; n++) {
  4844. const r = t[n];
  4845. if (!(r < 0)) for (let i = n - 1; i >= 0 && r < t[i]; i--) {
  4846. const n = e[i + 1];
  4847. e[i + 1] = e[i], e[i] = n, t[i + 1] = t[i], t[i] = r
  4848. }
  4849. }
  4850. }
  4851. function gs(e) {
  4852. var t, n;
  4853. let r = null !== (t = ms.get(e.type)) && void 0 !== t ? t : -1;
  4854. 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
  4855. }
  4856. const Ns = /[-[\]{}()*+?.,\\^$|#\s]/g;
  4857. function Cs(e) {
  4858. return e.replace(Ns, "\\$&")
  4859. }
  4860. 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"]);
  4861. function Ss(e, t) {
  4862. return "boolean" == typeof e.ignoreCase ? e.ignoreCase : "quirks" === e.ignoreCase ? !! t.quirksMode : !t.xmlMode && Is.has(e.name)
  4863. }
  4864. const bs = {
  4865. equals(e, t, n) {
  4866. const {
  4867. adapter: r
  4868. } = n, {
  4869. name: i
  4870. } = t;
  4871. let {
  4872. value: s
  4873. } = t;
  4874. return Ss(t, n) ? (s = s.toLowerCase(), t => {
  4875. const n = r.getAttributeValue(t, i);
  4876. return null != n && n.length === s.length && n.toLowerCase() === s && e(t)
  4877. }) : t => r.getAttributeValue(t, i) === s && e(t)
  4878. }, hyphen(e, t, n) {
  4879. const {
  4880. adapter: r
  4881. } = n, {
  4882. name: i
  4883. } = t;
  4884. let {
  4885. value: s
  4886. } = t;
  4887. const a = s.length;
  4888. return Ss(t, n) ? (s = s.toLowerCase(), function(t) {
  4889. const n = r.getAttributeValue(t, i);
  4890. return null != n && (n.length === a || "-" === n.charAt(a)) && n.substr(0, a)
  4891. .toLowerCase() === s && e(t)
  4892. }) : function(t) {
  4893. const n = r.getAttributeValue(t, i);
  4894. return null != n && (n.length === a || "-" === n.charAt(a)) && n.substr(0, a) === s && e(t)
  4895. }
  4896. }, element(e, t, n) {
  4897. const {
  4898. adapter: r
  4899. } = n, {
  4900. name: i,
  4901. value: s
  4902. } = t;
  4903. if (/\s/.test(s)) return ds.falseFunc;
  4904. const a = new RegExp(`(?:^|\\s)${Cs(s)}(?:$|\\s)`, Ss(t, n) ? "i" : "");
  4905. return function(t) {
  4906. const n = r.getAttributeValue(t, i);
  4907. return null != n && n.length >= s.length && a.test(n) && e(t)
  4908. }
  4909. }, exists: (e, {
  4910. name: t
  4911. }, {
  4912. adapter: n
  4913. }) => r => n.hasAttrib(r, t) && e(r),
  4914. start(e, t, n) {
  4915. const {
  4916. adapter: r
  4917. } = n, {
  4918. name: i
  4919. } = t;
  4920. let {
  4921. value: s
  4922. } = t;
  4923. const a = s.length;
  4924. return 0 === a ? ds.falseFunc : Ss(t, n) ? (s = s.toLowerCase(), t => {
  4925. const n = r.getAttributeValue(t, i);
  4926. return null != n && n.length >= a && n.substr(0, a)
  4927. .toLowerCase() === s && e(t)
  4928. }) : t => {
  4929. var n;
  4930. return !!(null === (n = r.getAttributeValue(t, i)) || void 0 === n ? void 0 : n.startsWith(s)) && e(t)
  4931. }
  4932. },
  4933. end(e, t, n) {
  4934. const {
  4935. adapter: r
  4936. } = n, {
  4937. name: i
  4938. } = t;
  4939. let {
  4940. value: s
  4941. } = t;
  4942. const a = -s.length;
  4943. return 0 === a ? ds.falseFunc : Ss(t, n) ? (s = s.toLowerCase(), t => {
  4944. var n;
  4945. return (null === (n = r.getAttributeValue(t, i)) || void 0 === n ? void 0 : n.substr(a)
  4946. .toLowerCase()) === s && e(t)
  4947. }) : t => {
  4948. var n;
  4949. return !!(null === (n = r.getAttributeValue(t, i)) || void 0 === n ? void 0 : n.endsWith(s)) && e(t)
  4950. }
  4951. },
  4952. any(e, t, n) {
  4953. const {
  4954. adapter: r
  4955. } = n, {
  4956. name: i,
  4957. value: s
  4958. } = t;
  4959. if ("" === s) return ds.falseFunc;
  4960. if (Ss(t, n)) {
  4961. const t = new RegExp(Cs(s), "i");
  4962. return function(n) {
  4963. const a = r.getAttributeValue(n, i);
  4964. return null != a && a.length >= s.length && t.test(a) && e(n)
  4965. }
  4966. }
  4967. return t => {
  4968. var n;
  4969. return !!(null === (n = r.getAttributeValue(t, i)) || void 0 === n ? void 0 : n.includes(s)) && e(t)
  4970. }
  4971. },
  4972. not(e, t, n) {
  4973. const {
  4974. adapter: r
  4975. } = n, {
  4976. name: i
  4977. } = t;
  4978. let {
  4979. value: s
  4980. } = t;
  4981. return "" === s ? t => !! r.getAttributeValue(t, i) && e(t) : Ss(t, n) ? (s = s.toLowerCase(), t => {
  4982. const n = r.getAttributeValue(t, i);
  4983. return (null == n || n.length !== s.length || n.toLowerCase() !== s) && e(t)
  4984. }) : t => r.getAttributeValue(t, i) !== s && e(t)
  4985. }
  4986. };
  4987. var Os = Ke((function(e, t) {
  4988. Object.defineProperty(t, "__esModule", {
  4989. value: !0
  4990. }), t.parse = void 0;
  4991. var n = new Set([9, 10, 12, 13, 32]),
  4992. r = "0".charCodeAt(0),
  4993. i = "9".charCodeAt(0);
  4994. t.parse = function(e) {
  4995. if ("even" === (e = e.trim()
  4996. .toLowerCase())) return [2, 0];
  4997. if ("odd" === e) return [2, 1];
  4998. var t = 0,
  4999. s = 0,
  5000. a = c(),
  5001. o = l();
  5002. 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 + "')");
  5003. return [s, a * o];
  5004. function c() {
  5005. return "-" === e.charAt(t) ? (t++, -1) : ("+" === e.charAt(t) && t++, 1)
  5006. }
  5007. function l() {
  5008. 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++;
  5009. return t === n ? null : s
  5010. }
  5011. function h() {
  5012. for (; t < e.length && n.has(e.charCodeAt(t));) t++
  5013. }
  5014. }
  5015. }));
  5016. qe(Os), Os.parse;
  5017. var ys = Ke((function(e, t) {
  5018. Object.defineProperty(t, "__esModule", {
  5019. value: !0
  5020. }), t.compile = void 0, t.compile = function(e) {
  5021. var t = e[0],
  5022. n = e[1] - 1;
  5023. if (n < 0 && t <= 0) return ds.falseFunc;
  5024. if (-1 === t) return function(e) {
  5025. return e <= n
  5026. };
  5027. if (0 === t) return function(e) {
  5028. return e === n
  5029. };
  5030. if (1 === t) return n < 0 ? ds.trueFunc : function(e) {
  5031. return e >= n
  5032. };
  5033. var r = Math.abs(t),
  5034. i = (n % r + r) % r;
  5035. return t > 1 ? function(e) {
  5036. return e >= n && e % r === i
  5037. } : function(e) {
  5038. return e <= n && e % r === i
  5039. }
  5040. }
  5041. }));
  5042. qe(ys), ys.compile;
  5043. var Ls = Os,
  5044. ks = ys,
  5045. vs = Ke((function(e, t) {
  5046. Object.defineProperty(t, "__esModule", {
  5047. value: !0
  5048. }), t.compile = t.parse = void 0, Object.defineProperty(t, "parse", {
  5049. enumerable: !0,
  5050. get: function() {
  5051. return Ls.parse
  5052. }
  5053. }), Object.defineProperty(t, "compile", {
  5054. enumerable: !0,
  5055. get: function() {
  5056. return ks.compile
  5057. }
  5058. }), t.
  5059. default = function(e) {
  5060. return (0, ks.compile)((0, Ls.parse)(e))
  5061. }
  5062. })),
  5063. Ds = qe(vs);
  5064. function Rs(e, t) {
  5065. return n => {
  5066. const r = t.getParent(n);
  5067. return null != r && t.isTag(r) && e(n)
  5068. }
  5069. }
  5070. vs.compile, vs.parse;
  5071. const Ms = {
  5072. contains: (e, t, {
  5073. adapter: n
  5074. }) => function(r) {
  5075. return e(r) && n.getText(r)
  5076. .includes(t)
  5077. },
  5078. icontains(e, t, {
  5079. adapter: n
  5080. }) {
  5081. const r = t.toLowerCase();
  5082. return function(t) {
  5083. return e(t) && n.getText(t)
  5084. .toLowerCase()
  5085. .includes(r)
  5086. }
  5087. },
  5088. "nth-child" (e, t, {
  5089. adapter: n,
  5090. equals: r
  5091. }) {
  5092. const i = Ds(t);
  5093. return i === ds.falseFunc ? ds.falseFunc : i === ds.trueFunc ? Rs(e, n) : function(t) {
  5094. const s = n.getSiblings(t);
  5095. let a = 0;
  5096. for (let e = 0; e < s.length && !r(t, s[e]); e++) n.isTag(s[e]) && a++;
  5097. return i(a) && e(t)
  5098. }
  5099. },
  5100. "nth-last-child" (e, t, {
  5101. adapter: n,
  5102. equals: r
  5103. }) {
  5104. const i = Ds(t);
  5105. return i === ds.falseFunc ? ds.falseFunc : i === ds.trueFunc ? Rs(e, n) : function(t) {
  5106. const s = n.getSiblings(t);
  5107. let a = 0;
  5108. for (let e = s.length - 1; e >= 0 && !r(t, s[e]); e--) n.isTag(s[e]) && a++;
  5109. return i(a) && e(t)
  5110. }
  5111. },
  5112. "nth-of-type" (e, t, {
  5113. adapter: n,
  5114. equals: r
  5115. }) {
  5116. const i = Ds(t);
  5117. return i === ds.falseFunc ? ds.falseFunc : i === ds.trueFunc ? Rs(e, n) : function(t) {
  5118. const s = n.getSiblings(t);
  5119. let a = 0;
  5120. for (let e = 0; e < s.length; e++) {
  5121. const i = s[e];
  5122. if (r(t, i)) break;
  5123. n.isTag(i) && n.getName(i) === n.getName(t) && a++
  5124. }
  5125. return i(a) && e(t)
  5126. }
  5127. },
  5128. "nth-last-of-type" (e, t, {
  5129. adapter: n,
  5130. equals: r
  5131. }) {
  5132. const i = Ds(t);
  5133. return i === ds.falseFunc ? ds.falseFunc : i === ds.trueFunc ? Rs(e, n) : function(t) {
  5134. const s = n.getSiblings(t);
  5135. let a = 0;
  5136. for (let e = s.length - 1; e >= 0; e--) {
  5137. const i = s[e];
  5138. if (r(t, i)) break;
  5139. n.isTag(i) && n.getName(i) === n.getName(t) && a++
  5140. }
  5141. return i(a) && e(t)
  5142. }
  5143. },
  5144. root: (e, t, {
  5145. adapter: n
  5146. }) => t => {
  5147. const r = n.getParent(t);
  5148. return (null == r || !n.isTag(r)) && e(t)
  5149. },
  5150. scope(e, t, n, r) {
  5151. const {
  5152. equals: i
  5153. } = n;
  5154. 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)
  5155. },
  5156. hover: Ps("isHovered"),
  5157. visited: Ps("isVisited"),
  5158. active: Ps("isActive")
  5159. };
  5160. function Ps(e) {
  5161. return function(t, n, {
  5162. adapter: r
  5163. }) {
  5164. const i = r[e];
  5165. return "function" != typeof i ? ds.falseFunc : function(e) {
  5166. return i(e) && t(e)
  5167. }
  5168. }
  5169. }
  5170. const xs = {
  5171. empty: (e, {
  5172. adapter: t
  5173. }) => !t.getChildren(e)
  5174. .some((e => t.isTag(e) || "" !== t.getText(e))),
  5175. "first-child" (e, {
  5176. adapter: t,
  5177. equals: n
  5178. }) {
  5179. if (t.prevElementSibling) return null == t.prevElementSibling(e);
  5180. const r = t.getSiblings(e)
  5181. .find((e => t.isTag(e)));
  5182. return null != r && n(e, r)
  5183. },
  5184. "last-child" (e, {
  5185. adapter: t,
  5186. equals: n
  5187. }) {
  5188. const r = t.getSiblings(e);
  5189. for (let i = r.length - 1; i >= 0; i--) {
  5190. if (n(e, r[i])) return !0;
  5191. if (t.isTag(r[i])) break
  5192. }
  5193. return !1
  5194. },
  5195. "first-of-type" (e, {
  5196. adapter: t,
  5197. equals: n
  5198. }) {
  5199. const r = t.getSiblings(e), i = t.getName(e);
  5200. for (let s = 0; s < r.length; s++) {
  5201. const a = r[s];
  5202. if (n(e, a)) return !0;
  5203. if (t.isTag(a) && t.getName(a) === i) break
  5204. }
  5205. return !1
  5206. },
  5207. "last-of-type" (e, {
  5208. adapter: t,
  5209. equals: n
  5210. }) {
  5211. const r = t.getSiblings(e), i = t.getName(e);
  5212. for (let s = r.length - 1; s >= 0; s--) {
  5213. const a = r[s];
  5214. if (n(e, a)) return !0;
  5215. if (t.isTag(a) && t.getName(a) === i) break
  5216. }
  5217. return !1
  5218. },
  5219. "only-of-type" (e, {
  5220. adapter: t,
  5221. equals: n
  5222. }) {
  5223. const r = t.getName(e);
  5224. return t.getSiblings(e)
  5225. .every((i => n(e, i) || !t.isTag(i) || t.getName(i) !== r))
  5226. },
  5227. "only-child": (e, {
  5228. adapter: t,
  5229. equals: n
  5230. }) => t.getSiblings(e)
  5231. .every((r => n(e, r) || !t.isTag(r)))
  5232. };
  5233. function ws(e, t, n, r) {
  5234. if (null === n) {
  5235. if (e.length > r) throw new Error(`Pseudo-class :${t} requires an argument`)
  5236. } else if (e.length === r) throw new Error(`Pseudo-class :${t} doesn't have any arguments`)
  5237. }
  5238. const Bs = {
  5239. "any-link": ":is(a, area, link)[href]",
  5240. link: ":any-link:not(:visited)",
  5241. 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 )",
  5242. enabled: ":not(:disabled)",
  5243. checked: ":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",
  5244. required: ":is(input, select, textarea)[required]",
  5245. optional: ":is(input, select, textarea):not([required])",
  5246. selected: "option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",
  5247. checkbox: "[type=checkbox]",
  5248. file: "[type=file]",
  5249. password: "[type=password]",
  5250. radio: "[type=radio]",
  5251. reset: "[type=reset]",
  5252. image: "[type=image]",
  5253. submit: "[type=submit]",
  5254. parent: ":not(:empty)",
  5255. header: ":is(h1, h2, h3, h4, h5, h6)",
  5256. button: ":is(button, input[type=button])",
  5257. input: ":is(input, textarea, select, button)",
  5258. text: "input:is(:not([type!='']), [type=text])"
  5259. }, Fs = {};
  5260. function Us(e, t) {
  5261. const n = t.getSiblings(e);
  5262. if (n.length <= 1) return [];
  5263. const r = n.indexOf(e);
  5264. return r < 0 || r === n.length - 1 ? [] : n.slice(r + 1)
  5265. .filter(t.isTag)
  5266. }
  5267. function Hs(e) {
  5268. return {
  5269. xmlMode: !! e.xmlMode,
  5270. lowerCaseAttributeNames: !! e.lowerCaseAttributeNames,
  5271. lowerCaseTags: !! e.lowerCaseTags,
  5272. quirksMode: !! e.quirksMode,
  5273. cacheResults: !! e.cacheResults,
  5274. pseudos: e.pseudos,
  5275. adapter: e.adapter,
  5276. equals: e.equals
  5277. }
  5278. }
  5279. const Gs = (e, t, n, r, i) => {
  5280. const s = i(t, Hs(n), r);
  5281. return s === ds.trueFunc ? e : s === ds.falseFunc ? ds.falseFunc : t => s(t) && e(t)
  5282. }, Ys = {
  5283. is: Gs,
  5284. matches: Gs,
  5285. where: Gs,
  5286. not(e, t, n, r, i) {
  5287. const s = i(t, Hs(n), r);
  5288. return s === ds.falseFunc ? e : s === ds.trueFunc ? ds.falseFunc : t => !s(t) && e(t)
  5289. },
  5290. has(e, t, n, r, i) {
  5291. const {
  5292. adapter: s
  5293. } = n, a = Hs(n);
  5294. a.relativeSelector = !0;
  5295. const o = t.some((e => e.some(Ts))) ? [Fs] : void 0, c = i(t, a, o);
  5296. if (c === ds.falseFunc) return ds.falseFunc;
  5297. const l = function(e, t) {
  5298. return e === ds.falseFunc ? ds.falseFunc : n => t.isTag(n) && e(n)
  5299. }(c, s);
  5300. if (o && c !== ds.trueFunc) {
  5301. const {
  5302. shouldTestNextSiblings: t = !1
  5303. } = c;
  5304. return n => {
  5305. if (!e(n)) return !1;
  5306. o[0] = n;
  5307. const r = s.getChildren(n), i = t ? [...r, ...Us(n, s)] : r;
  5308. return s.existsOne(l, i)
  5309. }
  5310. }
  5311. return t => e(t) && s.existsOne(l, s.getChildren(t))
  5312. }
  5313. };
  5314. function qs(e, t) {
  5315. const n = t.getParent(e);
  5316. return n && t.isTag(n) ? n : null
  5317. }
  5318. function Ks(e, t, n, r, i) {
  5319. const {
  5320. adapter: s,
  5321. equals: a
  5322. } = n;
  5323. switch (t.type) {
  5324. case Zi.PseudoElement:
  5325. throw new Error("Pseudo-elements are not supported by css-select");
  5326. case Zi.ColumnCombinator:
  5327. throw new Error("Column combinators are not yet supported by css-select");
  5328. case Zi.Attribute:
  5329. if (null != t.namespace) throw new Error("Namespaced attributes are not yet supported by css-select");
  5330. return n.xmlMode && !n.lowerCaseAttributeNames || (t.name = t.name.toLowerCase()), bs[t.action](e, t, n);
  5331. case Zi.Pseudo:
  5332. return function(e, t, n, r, i) {
  5333. var s;
  5334. const {
  5335. name: a,
  5336. data: o
  5337. } = t;
  5338. if (Array.isArray(o)) {
  5339. if (!(a in Ys)) throw new Error(`Unknown pseudo-class :${a}(${o})`);
  5340. return Ys[a](e, o, n, r, i)
  5341. }
  5342. const c = null === (s = n.pseudos) || void 0 === s ? void 0 : s[a], l = "string" == typeof c ? c : Bs[a];
  5343. if ("string" == typeof l) {
  5344. if (null != o) throw new Error(`Pseudo ${a} doesn't have any arguments`);
  5345. const t = ps(l);
  5346. return Ys.is(e, t, n, r, i)
  5347. }
  5348. if ("function" == typeof c) return ws(c, a, o, 1), t => c(t, o) && e(t);
  5349. if (a in Ms) return Ms[a](e, o, n, r);
  5350. if (a in xs) {
  5351. const t = xs[a];
  5352. return ws(t, a, o, 2), r => t(r, n, o) && e(r)
  5353. }
  5354. throw new Error(`Unknown pseudo-class :${a}`)
  5355. }(e, t, n, r, i);
  5356. case Zi.Tag:
  5357. {
  5358. if (null != t.namespace) throw new Error("Namespaced tag names are not yet supported by css-select");
  5359. let {
  5360. name: r
  5361. } = t;
  5362. return n.xmlMode && !n.lowerCaseTags || (r = r.toLowerCase()),
  5363. function(t) {
  5364. return s.getName(t) === r && e(t)
  5365. }
  5366. }
  5367. case Zi.Descendant:
  5368. {
  5369. if (!1 === n.cacheResults || "undefined" == typeof WeakSet) return function(t) {
  5370. let n = t;
  5371. for (; n = qs(n, s);) if (e(n)) return !0;
  5372. return !1
  5373. };
  5374. const t = new WeakSet;
  5375. return function(n) {
  5376. let r = n;
  5377. for (; r = qs(r, s);) if (!t.has(r)) {
  5378. if (s.isTag(r) && e(r)) return !0;
  5379. t.add(r)
  5380. }
  5381. return !1
  5382. }
  5383. }
  5384. case "_flexibleDescendant":
  5385. return function(t) {
  5386. let n = t;
  5387. do {
  5388. if (e(n)) return !0
  5389. } while (n = qs(n, s));
  5390. return !1
  5391. };
  5392. case Zi.Parent:
  5393. return function(t) {
  5394. return s.getChildren(t)
  5395. .some((t => s.isTag(t) && e(t)))
  5396. };
  5397. case Zi.Child:
  5398. return function(t) {
  5399. const n = s.getParent(t);
  5400. return null != n && s.isTag(n) && e(n)
  5401. };
  5402. case Zi.Sibling:
  5403. return function(t) {
  5404. const n = s.getSiblings(t);
  5405. for (let r = 0; r < n.length; r++) {
  5406. const i = n[r];
  5407. if (a(t, i)) break;
  5408. if (s.isTag(i) && e(i)) return !0
  5409. }
  5410. return !1
  5411. };
  5412. case Zi.Adjacent:
  5413. return s.prevElementSibling ? function(t) {
  5414. const n = s.prevElementSibling(t);
  5415. return null != n && e(n)
  5416. } : function(t) {
  5417. const n = s.getSiblings(t);
  5418. let r;
  5419. for (let e = 0; e < n.length; e++) {
  5420. const i = n[e];
  5421. if (a(t, i)) break;
  5422. s.isTag(i) && (r = i)
  5423. }
  5424. return !!r && e(r)
  5425. };
  5426. case Zi.Universal:
  5427. if (null != t.namespace && "*" !== t.namespace) throw new Error("Namespaced universal selectors are not yet supported by css-select");
  5428. return e
  5429. }
  5430. }
  5431. function js(e) {
  5432. return e.type === Zi.Pseudo && ("scope" === e.name || Array.isArray(e.data) && e.data.some((e => e.some(js))))
  5433. }
  5434. const Vs = {
  5435. type: Zi.Descendant
  5436. }, Ws = {
  5437. type: "_flexibleDescendant"
  5438. }, Qs = {
  5439. type: Zi.Pseudo,
  5440. name: "scope",
  5441. data: null
  5442. };
  5443. function Xs(e, t, n) {
  5444. var r;
  5445. e.forEach(As), n = null !== (r = t.context) && void 0 !== r ? r : n;
  5446. const i = Array.isArray(n), s = n && (Array.isArray(n) ? n : [n]);
  5447. if (!1 !== t.relativeSelector)! function(e, {
  5448. adapter: t
  5449. }, n) {
  5450. const r = !! (null == n ? void 0 : n.every((e => {
  5451. const n = t.isTag(e) && t.getParent(e);
  5452. return e === Fs || n && t.isTag(n)
  5453. })));
  5454. for (const t of e) {
  5455. if (t.length > 0 && Ts(t[0]) && t[0].type !== Zi.Descendant);
  5456. else {
  5457. if (!r || t.some(js)) continue;
  5458. t.unshift(Vs)
  5459. }
  5460. t.unshift(Qs)
  5461. }
  5462. }(e, t, s);
  5463. 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");
  5464. let a = !1;
  5465. const o = e.map((e => {
  5466. if (e.length >= 2) {
  5467. const[t, n] = e;
  5468. 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))
  5469. }
  5470. return function(e, t, n) {
  5471. var r;
  5472. 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)
  5473. }(e, t, s)
  5474. }))
  5475. .reduce($s, ds.falseFunc);
  5476. return o.shouldTestNextSiblings = a, o
  5477. }
  5478. function $s(e, t) {
  5479. return t === ds.falseFunc || e === ds.trueFunc ? e : e === ds.falseFunc || t === ds.trueFunc ? t : function(n) {
  5480. return e(n) || t(n)
  5481. }
  5482. }
  5483. const zs = (e, t) => e === t, Js = {
  5484. adapter: Se,
  5485. equals: zs
  5486. };
  5487. const Zs = (ea = Xs, function(e, t, n) {
  5488. const r = function(e) {
  5489. var t, n, r, i;
  5490. const s = null != e ? e : Js;
  5491. 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
  5492. }(t);
  5493. return ea(e, r, n)
  5494. });
  5495. var ea;
  5496. function ta(e, t, n = !1) {
  5497. return n && (e = function(e, t) {
  5498. const n = Array.isArray(e) ? e.slice(0) : [e], r = n.length;
  5499. for (let e = 0; e < r; e++) {
  5500. const r = Us(n[e], t);
  5501. n.push(...r)
  5502. }
  5503. return n
  5504. }(e, t)), Array.isArray(e) ? t.removeSubsets(e) : t.getChildren(e)
  5505. }
  5506. const na = new Set(["first", "last", "eq", "gt", "nth", "lt", "even", "odd"]);
  5507. function ra(e) {
  5508. return "pseudo" === e.type && ( !! na.has(e.name) || !("not" !== e.name || !Array.isArray(e.data)) && e.data.some((e => e.some(ra))))
  5509. }
  5510. function ia(e) {
  5511. const t = [], n = [];
  5512. for (const r of e) r.some(ra) ? t.push(r) : n.push(r);
  5513. return [n, t]
  5514. }
  5515. const sa = {
  5516. type: Zi.Universal,
  5517. namespace: null
  5518. }, aa = {
  5519. type: Zi.Pseudo,
  5520. name: "scope",
  5521. data: null
  5522. };
  5523. function oa(e, t, n = {}) {
  5524. return ca([e], t, n)
  5525. }
  5526. function ca(e, t, n = {}) {
  5527. if ("function" == typeof t) return e.some(t);
  5528. const[r, i] = ia(ps(t));
  5529. return r.length > 0 && e.some(Zs(r, n)) || i.some((t => ua(t, e, n)
  5530. .length > 0))
  5531. }
  5532. function la(e, t, n = {}) {
  5533. return ha(ps(e), t, n)
  5534. }
  5535. function ha(e, t, n) {
  5536. if (0 === t.length) return [];
  5537. const[r, i] = ia(e);
  5538. let s;
  5539. if (r.length) {
  5540. const e = Ea(t, r, n);
  5541. if (0 === i.length) return e;
  5542. e.length && (s = new Set(e))
  5543. }
  5544. for (let e = 0; e < i.length && (null == s ? void 0 : s.size) !== t.length; e++) {
  5545. const r = i[e], a = s ? t.filter((e => I(e) && !s.has(e))) : t;
  5546. if (0 === a.length) break;
  5547. const o = ua(r, t, n);
  5548. if (o.length) if (s) o.forEach((e => s.add(e)));
  5549. else {
  5550. if (e === i.length - 1) return o;
  5551. s = new Set(o)
  5552. }
  5553. }
  5554. return void 0 !== s ? s.size === t.length ? t : t.filter((e => s.has(e))) : []
  5555. }
  5556. function ua(e, t, n) {
  5557. var r;
  5558. if (e.some(as)) {
  5559. const i = null !== (r = n.root) && void 0 !== r ? r : function(e) {
  5560. for (; e.parent;) e = e.parent;
  5561. return e
  5562. }(t[0]), s = {...n, context: t,
  5563. relativeSelector: !1
  5564. };
  5565. return e.push(aa), pa(i, e, s, !0, t.length)
  5566. }
  5567. return pa(t, e, n, !1, t.length)
  5568. }
  5569. function pa(e, t, n, r, i) {
  5570. const s = t.findIndex(ra), a = t.slice(0, s), o = t[s], c = t.length - 1 === s ? i : 1 / 0, l = function(e, t, n) {
  5571. const r = null != t ? parseInt(t, 10) : NaN;
  5572. switch (e) {
  5573. case "first":
  5574. return 1;
  5575. case "nth":
  5576. case "eq":
  5577. return isFinite(r) ? r >= 0 ? r + 1 : 1 / 0 : 0;
  5578. case "lt":
  5579. return isFinite(r) ? r >= 0 ? Math.min(r, n) : 1 / 0 : 0;
  5580. case "gt":
  5581. return isFinite(r) ? 1 / 0 : 0;
  5582. case "odd":
  5583. return 2 * n;
  5584. case "even":
  5585. return 2 * n - 1;
  5586. case "last":
  5587. case "not":
  5588. return 1 / 0
  5589. }
  5590. }(o.name, o.data, c);
  5591. if (0 === l) return [];
  5592. const h = (0 !== a.length || Array.isArray(e) ? 0 === a.length ? (Array.isArray(e) ? e : [e])
  5593. .filter(I) : r || a.some(as) ? fa(e, [a], n, l) : Ea(e, [a], n) : Z(e)
  5594. .filter(I))
  5595. .slice(0, l);
  5596. let u = function(e, t, n, r) {
  5597. const i = "string" == typeof n ? parseInt(n, 10) : NaN;
  5598. switch (e) {
  5599. case "first":
  5600. case "lt":
  5601. return t;
  5602. case "last":
  5603. return t.length > 0 ? [t[t.length - 1]] : t;
  5604. case "nth":
  5605. case "eq":
  5606. return isFinite(i) && Math.abs(i) < t.length ? [i < 0 ? t[t.length + i] : t[i]] : [];
  5607. case "gt":
  5608. return isFinite(i) ? t.slice(i + 1) : [];
  5609. case "even":
  5610. return t.filter(((e, t) => t % 2 == 0));
  5611. case "odd":
  5612. return t.filter(((e, t) => t % 2 == 1));
  5613. case "not":
  5614. {
  5615. const e = new Set(ha(n, t, r));
  5616. return t.filter((t => !e.has(t)))
  5617. }
  5618. }
  5619. }(o.name, h, o.data, n);
  5620. if (0 === u.length || t.length === s + 1) return u;
  5621. const p = t.slice(s + 1), f = p.some(as);
  5622. if (f) {
  5623. if (as(p[0])) {
  5624. const {
  5625. type: e
  5626. } = p[0];
  5627. e !== Zi.Sibling && e !== Zi.Adjacent || (u = ta(u, Se, !0)), p.unshift(sa)
  5628. }
  5629. n = {...n, relativeSelector: !1,
  5630. rootFunc: e => u.includes(e)
  5631. }
  5632. } else n.rootFunc && n.rootFunc !== Es && (n = {...n, rootFunc: Es
  5633. });
  5634. return p.some(ra) ? pa(u, p, n, !1, i) : f ? fa(u, [p], n, i) : Ea(u, [p], n)
  5635. }
  5636. function fa(e, t, n, r) {
  5637. return da(e, Zs(t, n, e), r)
  5638. }
  5639. function da(e, t, n = 1 / 0) {
  5640. return ae((e => I(e) && t(e)), ta(e, Se, t.shouldTestNextSiblings), !0, n)
  5641. }
  5642. function Ea(e, t, n) {
  5643. const r = (Array.isArray(e) ? e : [e])
  5644. .filter(I);
  5645. if (0 === r.length) return r;
  5646. const i = Zs(t, n);
  5647. return i === Es ? r : r.filter(i)
  5648. }
  5649. var ma = function(e, t, n) {
  5650. 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]);
  5651. return e.concat(r || Array.prototype.slice.call(t))
  5652. }, Ta = /^\s*[~+]/;
  5653. function _a(e) {
  5654. return function(t) {
  5655. for (var n = [], r = 1; r < arguments.length; r++) n[r - 1] = arguments[r];
  5656. return function(r) {
  5657. var i, s = e(t, this);
  5658. 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) {
  5659. return t(e)
  5660. }), s) : s)
  5661. }
  5662. }
  5663. }
  5664. var Aa = _a((function(e, t) {
  5665. for (var n, r = [], i = 0; i < t.length; i++) {
  5666. var s = e(t[i]);
  5667. r.push(s)
  5668. }
  5669. return (n = new Array)
  5670. .concat.apply(n, r)
  5671. })),
  5672. ga = _a((function(e, t) {
  5673. for (var n = [], r = 0; r < t.length; r++) {
  5674. var i = e(t[r]);
  5675. null !== i && n.push(i)
  5676. }
  5677. return n
  5678. }));
  5679. function Na(e) {
  5680. for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
  5681. var r = null,
  5682. i = _a((function(e, t) {
  5683. var n = [];
  5684. return Bi(t, (function(t) {
  5685. for (var i;
  5686. (i = e(t)) && !(null == r ? void 0 : r(i, n.length)); t = i) n.push(i)
  5687. })), n
  5688. }))
  5689. .apply(void 0, ma([e], t, !1));
  5690. return function(e, t) {
  5691. var n = this;
  5692. r = "string" == typeof e ? function(t) {
  5693. return oa(t, e, n.options)
  5694. } : e ? Pa(e) : null;
  5695. var s = i.call(this, t);
  5696. return r = null, s
  5697. }
  5698. }
  5699. function Ca(e) {
  5700. return Array.from(new Set(e))
  5701. }
  5702. var Ia = ga((function(e) {
  5703. var t = e.parent;
  5704. return t && !L(t) ? t : null
  5705. }), Ca),
  5706. Sa = Aa((function(e) {
  5707. for (var t = []; e.parent && !L(e.parent);) t.push(e.parent), e = e.parent;
  5708. return t
  5709. }), Ee, (function(e) {
  5710. return e.reverse()
  5711. })),
  5712. ba = Na((function(e) {
  5713. var t = e.parent;
  5714. return t && !L(t) ? t : null
  5715. }), Ee, (function(e) {
  5716. return e.reverse()
  5717. }));
  5718. var Oa = ga((function(e) {
  5719. return ne(e)
  5720. })),
  5721. ya = Aa((function(e) {
  5722. for (var t = []; e.next;) I(e = e.next) && t.push(e);
  5723. return t
  5724. }), Ca),
  5725. La = Na((function(e) {
  5726. return ne(e)
  5727. }), Ca),
  5728. ka = ga((function(e) {
  5729. return re(e)
  5730. })),
  5731. va = Aa((function(e) {
  5732. for (var t = []; e.prev;) I(e = e.prev) && t.push(e);
  5733. return t
  5734. }), Ca),
  5735. Da = Na((function(e) {
  5736. return re(e)
  5737. }), Ca),
  5738. Ra = Aa((function(e) {
  5739. return te(e)
  5740. .filter((function(t) {
  5741. return I(t) && t !== e
  5742. }))
  5743. }), Ee),
  5744. Ma = Aa((function(e) {
  5745. return Z(e)
  5746. .filter(I)
  5747. }), Ca);
  5748. function Pa(e) {
  5749. return "function" == typeof e ? function(t, n) {
  5750. return e.call(t, n, t)
  5751. } : wi(e) ? function(t) {
  5752. return Array.prototype.includes.call(e, t)
  5753. } : function(t) {
  5754. return e === t
  5755. }
  5756. }
  5757. function xa(e, t, n, r) {
  5758. return "string" == typeof t ? la(t, e, {
  5759. xmlMode: n,
  5760. root: r
  5761. }) : e.filter(Pa(t))
  5762. }
  5763. var wa = Object.freeze({
  5764. __proto__: null,
  5765. find: function(e) {
  5766. var t;
  5767. if (!e) return this._make([]);
  5768. var n = this.toArray();
  5769. if ("string" != typeof e) {
  5770. var r = wi(e) ? e.toArray() : [e];
  5771. return this._make(r.filter((function(e) {
  5772. return n.some((function(t) {
  5773. return Di(t, e)
  5774. }))
  5775. })))
  5776. }
  5777. var i = Ta.test(e) ? n : this.children()
  5778. .toArray(),
  5779. s = {
  5780. context: n,
  5781. root: null === (t = this._root) || void 0 === t ? void 0 : t[0],
  5782. xmlMode: this.options.xmlMode,
  5783. lowerCaseTags: this.options.lowerCaseTags,
  5784. lowerCaseAttributeNames: this.options.lowerCaseAttributeNames,
  5785. pseudos: this.options.pseudos,
  5786. quirksMode: this.options.quirksMode
  5787. };
  5788. return this._make(function(e, t, n = {}, r = 1 / 0) {
  5789. if ("function" == typeof e) return da(t, e);
  5790. const[i, s] = ia(ps(e)), a = s.map((e => pa(t, e, n, !0, r)));
  5791. 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])))
  5792. }(e, i, s))
  5793. },
  5794. parent: Ia,
  5795. parents: Sa,
  5796. parentsUntil: ba,
  5797. closest: function(e) {
  5798. var t, n = [];
  5799. if (!e) return this._make(n);
  5800. var r = {
  5801. xmlMode: this.options.xmlMode,
  5802. root: null === (t = this._root) || void 0 === t ? void 0 : t[0]
  5803. }, i = "string" == typeof e ? function(t) {
  5804. return oa(t, e, r)
  5805. } : Pa(e);
  5806. return Bi(this, (function(e) {
  5807. for (; e && I(e);) {
  5808. if (i(e, 0)) {
  5809. n.includes(e) || n.push(e);
  5810. break
  5811. }
  5812. e = e.parent
  5813. }
  5814. })), this._make(n)
  5815. },
  5816. next: Oa,
  5817. nextAll: ya,
  5818. nextUntil: La,
  5819. prev: ka,
  5820. prevAll: va,
  5821. prevUntil: Da,
  5822. siblings: Ra,
  5823. children: Ma,
  5824. contents: function() {
  5825. var e = this.toArray()
  5826. .reduce((function(e, t) {
  5827. return k(t) ? e.concat(t.children) : e
  5828. }), []);
  5829. return this._make(e)
  5830. },
  5831. each: function(e) {
  5832. for (var t = 0, n = this.length; t < n && !1 !== e.call(this[t], t, this[t]);)++t;
  5833. return this
  5834. },
  5835. map: function(e) {
  5836. for (var t = [], n = 0; n < this.length; n++) {
  5837. var r = this[n],
  5838. i = e.call(r, n, r);
  5839. null != i && (t = t.concat(i))
  5840. }
  5841. return this._make(t)
  5842. },
  5843. filter: function(e) {
  5844. var t;
  5845. return this._make(xa(this.toArray(), e, this.options.xmlMode, null === (t = this._root) || void 0 === t ? void 0 : t[0]))
  5846. },
  5847. filterArray: xa,
  5848. is: function(e) {
  5849. var t = this.toArray();
  5850. return "string" == typeof e ? ca(t.filter(I), e, this.options) : !! e && t.some(Pa(e))
  5851. },
  5852. not: function(e) {
  5853. var t = this.toArray();
  5854. if ("string" == typeof e) {
  5855. var n = new Set(la(e, t, this.options));
  5856. t = t.filter((function(e) {
  5857. return !n.has(e)
  5858. }))
  5859. } else {
  5860. var r = Pa(e);
  5861. t = t.filter((function(e, t) {
  5862. return !r(e, t)
  5863. }))
  5864. }
  5865. return this._make(t)
  5866. },
  5867. has: function(e) {
  5868. var t = this;
  5869. return this.filter("string" == typeof e ? ":has(".concat(e, ")") : function(n, r) {
  5870. return t._make(r)
  5871. .find(e)
  5872. .length > 0
  5873. })
  5874. },
  5875. first: function() {
  5876. return this.length > 1 ? this._make(this[0]) : this
  5877. },
  5878. last: function() {
  5879. return this.length > 0 ? this._make(this[this.length - 1]) : this
  5880. },
  5881. eq: function(e) {
  5882. var t;
  5883. return 0 === (e = +e) && this.length <= 1 ? this : (e < 0 && (e = this.length + e), this._make(null !== (t = this[e]) && void 0 !== t ? t : []))
  5884. },
  5885. get: function(e) {
  5886. return null == e ? this.toArray() : this[e < 0 ? this.length + e : e]
  5887. },
  5888. toArray: function() {
  5889. return Array.prototype.slice.call(this)
  5890. },
  5891. index: function(e) {
  5892. var t, n;
  5893. return null == e ? (t = this.parent()
  5894. .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)
  5895. },
  5896. slice: function(e, t) {
  5897. return this._make(Array.prototype.slice.call(this, e, t))
  5898. },
  5899. end: function() {
  5900. var e;
  5901. return null !== (e = this.prevObject) && void 0 !== e ? e : this._make([])
  5902. },
  5903. add: function(e, t) {
  5904. var n = this._make(e, t),
  5905. r = Ee(ma(ma([], this.get(), !0), n.get(), !0));
  5906. return this._make(r)
  5907. },
  5908. addBack: function(e) {
  5909. return this.prevObject ? this.add(e ? this.prevObject.filter(e) : this.prevObject) : this
  5910. }
  5911. });
  5912. function Ba(e, t) {
  5913. var n = Array.isArray(e) ? e : [e];
  5914. t ? t.children = n : t = null;
  5915. for (var r = 0; r < n.length; r++) {
  5916. var i = n[r];
  5917. 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
  5918. }
  5919. return t
  5920. }
  5921. var Fa = function(e, t, n) {
  5922. 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]);
  5923. return e.concat(r || Array.prototype.slice.call(t))
  5924. };
  5925. function Ua(e) {
  5926. return function() {
  5927. for (var t = this, n = [], r = 0; r < arguments.length; r++) n[r] = arguments[r];
  5928. var i = this.length - 1;
  5929. return Bi(this, (function(r, s) {
  5930. if (k(r)) {
  5931. var a = "function" == typeof n[0] ? n[0].call(r, s, t._render(r.children)) : n,
  5932. o = t._makeDomArray(a, s < i);
  5933. e(o, r.children, r)
  5934. }
  5935. }))
  5936. }
  5937. }
  5938. function Ha(e, t, n, r, i) {
  5939. 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) {
  5940. var u = r[h],
  5941. p = u.parent;
  5942. if (p) {
  5943. var f = p.children.indexOf(u);
  5944. f > -1 && (p.children.splice(f, 1), i === p && t > f && o[0]--)
  5945. }
  5946. 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]
  5947. }
  5948. return c && (c.next = r[0]), l && (l.prev = r[r.length - 1]), e.splice.apply(e, o)
  5949. }
  5950. var Ga = Ua((function(e, t, n) {
  5951. Ha(t, t.length, 0, e, n)
  5952. })),
  5953. Ya = Ua((function(e, t, n) {
  5954. Ha(t, 0, 0, e, n)
  5955. }));
  5956. function qa(e) {
  5957. return function(t) {
  5958. for (var n = this.length - 1, r = this.parents()
  5959. .last(), i = 0; i < this.length; i++) {
  5960. var s = this[i],
  5961. a = "function" == typeof t ? t.call(s, i, s) : "string" != typeof t || Ui(t) ? t : r.find(t)
  5962. .clone(),
  5963. o = this._makeDomArray(a, i < n)[0];
  5964. if (o && k(o)) {
  5965. for (var c = o, l = 0; l < c.children.length;) {
  5966. var h = c.children[l];
  5967. I(h) ? (c = h, l = 0) : l++
  5968. }
  5969. e(s, c, [o])
  5970. }
  5971. }
  5972. return this
  5973. }
  5974. }
  5975. var Ka = qa((function(e, t, n) {
  5976. var r = e.parent;
  5977. if (r) {
  5978. var i = r.children,
  5979. s = i.indexOf(e);
  5980. Ba([e], t), Ha(i, s, 0, n, r)
  5981. }
  5982. })),
  5983. ja = qa((function(e, t, n) {
  5984. k(e) && (Ba(e.children, t), Ba(n, e))
  5985. }));
  5986. var Va = Object.freeze({
  5987. __proto__: null,
  5988. _makeDomArray: function(e, t) {
  5989. var n = this;
  5990. return null == e ? [] : wi(e) ? t ? Fi(e.get()) : e.get() : Array.isArray(e) ? e.reduce((function(e, r) {
  5991. return e.concat(n._makeDomArray(r, t))
  5992. }), []) : "string" == typeof e ? this._parse(e, this.options, !1, null)
  5993. .children : t ? Fi([e]) : [e]
  5994. },
  5995. appendTo: function(e) {
  5996. return (wi(e) ? e : this._make(e))
  5997. .append(this), this
  5998. },
  5999. prependTo: function(e) {
  6000. return (wi(e) ? e : this._make(e))
  6001. .prepend(this), this
  6002. },
  6003. append: Ga,
  6004. prepend: Ya,
  6005. wrap: Ka,
  6006. wrapInner: ja,
  6007. unwrap: function(e) {
  6008. var t = this;
  6009. return this.parent(e)
  6010. .not("body")
  6011. .each((function(e, n) {
  6012. t._make(n)
  6013. .replaceWith(n.children)
  6014. })), this
  6015. },
  6016. wrapAll: function(e) {
  6017. var t = this[0];
  6018. if (t) {
  6019. for (var n = this._make("function" == typeof e ? e.call(t, 0, t) : e)
  6020. .insertBefore(t), r = void 0, i = 0; i < n.length; i++) "tag" === n[i].type && (r = n[i]);
  6021. for (var s = 0; r && s < r.children.length;) {
  6022. var a = r.children[s];
  6023. "tag" === a.type ? (r = a, s = 0) : s++
  6024. }
  6025. r && this._make(r)
  6026. .append(this)
  6027. }
  6028. return this
  6029. },
  6030. after: function() {
  6031. for (var e = this, t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n];
  6032. var r = this.length - 1;
  6033. return Bi(this, (function(n, i) {
  6034. var s = n.parent;
  6035. if (k(n) && s) {
  6036. var a = s.children,
  6037. o = a.indexOf(n);
  6038. if (!(o < 0)) {
  6039. var c = "function" == typeof t[0] ? t[0].call(n, i, e._render(n.children)) : t;
  6040. Ha(a, o + 1, 0, e._makeDomArray(c, i < r), s)
  6041. }
  6042. }
  6043. }))
  6044. },
  6045. insertAfter: function(e) {
  6046. var t = this;
  6047. "string" == typeof e && (e = this._make(e)), this.remove();
  6048. var n = [];
  6049. return this._makeDomArray(e)
  6050. .forEach((function(e) {
  6051. var r = t.clone()
  6052. .toArray(),
  6053. i = e.parent;
  6054. if (i) {
  6055. var s = i.children,
  6056. a = s.indexOf(e);
  6057. a < 0 || (Ha(s, a + 1, 0, r, i), n.push.apply(n, r))
  6058. }
  6059. })), this._make(n)
  6060. },
  6061. before: function() {
  6062. for (var e = this, t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n];
  6063. var r = this.length - 1;
  6064. return Bi(this, (function(n, i) {
  6065. var s = n.parent;
  6066. if (k(n) && s) {
  6067. var a = s.children,
  6068. o = a.indexOf(n);
  6069. if (!(o < 0)) {
  6070. var c = "function" == typeof t[0] ? t[0].call(n, i, e._render(n.children)) : t;
  6071. Ha(a, o, 0, e._makeDomArray(c, i < r), s)
  6072. }
  6073. }
  6074. }))
  6075. },
  6076. insertBefore: function(e) {
  6077. var t = this,
  6078. n = this._make(e);
  6079. this.remove();
  6080. var r = [];
  6081. return Bi(n, (function(e) {
  6082. var n = t.clone()
  6083. .toArray(),
  6084. i = e.parent;
  6085. if (i) {
  6086. var s = i.children,
  6087. a = s.indexOf(e);
  6088. a < 0 || (Ha(s, a, 0, n, i), r.push.apply(r, n))
  6089. }
  6090. })), this._make(r)
  6091. },
  6092. remove: function(e) {
  6093. return Bi(e ? this.filter(e) : this, (function(e) {
  6094. ie(e), e.prev = e.next = e.parent = null
  6095. })), this
  6096. },
  6097. replaceWith: function(e) {
  6098. var t = this;
  6099. return Bi(this, (function(n, r) {
  6100. var i = n.parent;
  6101. if (i) {
  6102. var s = i.children,
  6103. a = "function" == typeof e ? e.call(n, r, n) : e,
  6104. o = t._makeDomArray(a);
  6105. Ba(o, null);
  6106. var c = s.indexOf(n);
  6107. Ha(s, c, 1, o, i), o.includes(n) || (n.parent = n.prev = n.next = null)
  6108. }
  6109. }))
  6110. },
  6111. empty: function() {
  6112. return Bi(this, (function(e) {
  6113. k(e) && (e.children.forEach((function(e) {
  6114. e.next = e.prev = e.parent = null
  6115. })), e.children.length = 0)
  6116. }))
  6117. },
  6118. html: function(e) {
  6119. var t = this;
  6120. if (void 0 === e) {
  6121. var n = this[0];
  6122. return n && k(n) ? this._render(n.children) : null
  6123. }
  6124. return Bi(this, (function(n) {
  6125. k(n) && (n.children.forEach((function(e) {
  6126. e.next = e.prev = e.parent = null
  6127. })), Ba(wi(e) ? e.toArray() : t._parse("".concat(e), t.options, !1, n)
  6128. .children, n))
  6129. }))
  6130. },
  6131. toString: function() {
  6132. return this._render(this)
  6133. },
  6134. text: function(e) {
  6135. var t = this;
  6136. return void 0 === e ? Li(this) : Bi(this, "function" == typeof e ? function(n, r) {
  6137. return t._make(n)
  6138. .text(e.call(n, r, Li([n])))
  6139. } : function(t) {
  6140. k(t) && (t.children.forEach((function(e) {
  6141. e.next = e.prev = e.parent = null
  6142. })), Ba(new m("".concat(e)), t))
  6143. })
  6144. },
  6145. clone: function() {
  6146. return this._make(Fi(this.get()))
  6147. }
  6148. });
  6149. function Wa(e, t, n, r) {
  6150. if ("string" == typeof t) {
  6151. var i = Qa(e),
  6152. s = "function" == typeof n ? n.call(e, r, i[t]) : n;
  6153. "" === s ? delete i[t] : null != s && (i[t] = s), e.attribs.style = (a = i, Object.keys(a)
  6154. .reduce((function(e, t) {
  6155. return "".concat(e)
  6156. .concat(e ? " " : "")
  6157. .concat(t, ": ")
  6158. .concat(a[t], ";")
  6159. }), ""))
  6160. } else "object" == typeof t && Object.keys(t)
  6161. .forEach((function(n, r) {
  6162. Wa(e, n, t[n], r)
  6163. }));
  6164. var a
  6165. }
  6166. function Qa(e, t) {
  6167. if (e && I(e)) {
  6168. var n = function(e) {
  6169. if (!(e = (e || "")
  6170. .trim())) return {};
  6171. for (var t, n = {}, r = 0, i = e.split(";"); r < i.length; r++) {
  6172. var s = i[r],
  6173. a = s.indexOf(":");
  6174. if (a < 1 || a === s.length - 1) {
  6175. var o = s.trimEnd();
  6176. o.length > 0 && void 0 !== t && (n[t] += ";".concat(o))
  6177. } else n[t = s.slice(0, a)
  6178. .trim()] = s.slice(a + 1)
  6179. .trim()
  6180. }
  6181. return n
  6182. }(e.attribs.style);
  6183. if ("string" == typeof t) return n[t];
  6184. if (Array.isArray(t)) {
  6185. var r = {};
  6186. return t.forEach((function(e) {
  6187. null != n[e] && (r[e] = n[e])
  6188. })), r
  6189. }
  6190. return n
  6191. }
  6192. }
  6193. var Xa = Object.freeze({
  6194. __proto__: null,
  6195. css: function(e, t) {
  6196. return null != e && null != t || "object" == typeof e && !Array.isArray(e) ? Bi(this, (function(n, r) {
  6197. I(n) && Wa(n, e, t, r)
  6198. })) : 0 !== this.length ? Qa(this[0], e) : void 0
  6199. }
  6200. }),
  6201. $a = /%20/g,
  6202. za = /\r?\n/g;
  6203. var Ja = Object.freeze({
  6204. __proto__: null,
  6205. serialize: function() {
  6206. var e = this.serializeArray()
  6207. .map((function(e) {
  6208. return "".concat(encodeURIComponent(e.name), "=")
  6209. .concat(encodeURIComponent(e.value))
  6210. }));
  6211. return e.join("&")
  6212. .replace($a, "+")
  6213. },
  6214. serializeArray: function() {
  6215. var e = this;
  6216. return this.map((function(t, n) {
  6217. var r = e._make(n);
  6218. return I(n) && "form" === n.name ? r.find("input,select,textarea,keygen")
  6219. .toArray() : r.filter("input,select,textarea,keygen")
  6220. .toArray()
  6221. }))
  6222. .filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))')
  6223. .map((function(t, n) {
  6224. var r, i = e._make(n),
  6225. s = i.attr("name"),
  6226. a = null !== (r = i.val()) && void 0 !== r ? r : "";
  6227. return Array.isArray(a) ? a.map((function(e) {
  6228. return {
  6229. name: s,
  6230. value: e.replace(za, "\r\n")
  6231. }
  6232. })) : {
  6233. name: s,
  6234. value: a.replace(za, "\r\n")
  6235. }
  6236. }))
  6237. .toArray()
  6238. }
  6239. }),
  6240. Za = function(e, t, n) {
  6241. if (this.length = 0, this.options = n, this._root = t, e) {
  6242. for (var r = 0; r < e.length; r++) this[r] = e[r];
  6243. this.length = e.length
  6244. }
  6245. };
  6246. 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);
  6247. var eo, to = (eo = function(e, t) {
  6248. return eo = Object.setPrototypeOf || {
  6249. __proto__: []
  6250. }
  6251. instanceof Array && function(e, t) {
  6252. e.__proto__ = t
  6253. } || function(e, t) {
  6254. for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n])
  6255. }, eo(e, t)
  6256. }, function(e, t) {
  6257. if ("function" != typeof t && null !== t) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
  6258. function n() {
  6259. this.constructor = e
  6260. }
  6261. eo(e, t), e.prototype = null === t ? Object.create(t) : (n.prototype = t.prototype, new n)
  6262. }),
  6263. no = function() {
  6264. return no = Object.assign || function(e) {
  6265. for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
  6266. return e
  6267. }, no.apply(this, arguments)
  6268. };
  6269. 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]);
  6270. var io;
  6271. ! function(e) {
  6272. 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"
  6273. }(io = io || (io = {}));
  6274. const so = "--", ao = "[CDATA[", oo = "doctype", co = "script", lo = "public", ho = "system";
  6275. function uo(e) {
  6276. return e >= 55296 && e <= 57343
  6277. }
  6278. function po(e) {
  6279. return 32 !== e && 10 !== e && 13 !== e && 9 !== e && 12 !== e && e >= 1 && e <= 31 || e >= 127 && e <= 159
  6280. }
  6281. function fo(e) {
  6282. return e >= 64976 && e <= 65007 || ro.has(e)
  6283. }
  6284. var Eo;
  6285. ! function(e) {
  6286. 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"
  6287. }(Eo = Eo || (Eo = {}));
  6288. class mo {
  6289. constructor(e) {
  6290. 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
  6291. }
  6292. get col() {
  6293. return this.pos - this.lineStartPos + Number(this.lastGapPos !== this.pos)
  6294. }
  6295. get offset() {
  6296. return this.droppedBufferSize + this.pos
  6297. }
  6298. getError(e) {
  6299. const {
  6300. line: t,
  6301. col: n,
  6302. offset: r
  6303. } = this;
  6304. return {
  6305. code: e,
  6306. startLine: t,
  6307. endLine: t,
  6308. startCol: n,
  6309. endCol: n,
  6310. startOffset: r,
  6311. endOffset: r
  6312. }
  6313. }
  6314. _err(e) {
  6315. this.handler.onParseError && this.lastErrOffset !== this.offset && (this.lastErrOffset = this.offset, this.handler.onParseError(this.getError(e)))
  6316. }
  6317. _addGap() {
  6318. this.gapStack.push(this.lastGapPos), this.lastGapPos = this.pos
  6319. }
  6320. _processSurrogate(e) {
  6321. if (this.pos !== this.html.length - 1) {
  6322. const t = this.html.charCodeAt(this.pos + 1);
  6323. if (function(e) {
  6324. return e >= 56320 && e <= 57343
  6325. }(t)) return this.pos++, this._addGap(), 1024 * (e - 55296) + 9216 + t
  6326. } else if (!this.lastChunkWritten) return this.endOfChunkHit = !0, io.EOF;
  6327. return this._err(Eo.surrogateInInputStream), e
  6328. }
  6329. willDropParsedChunk() {
  6330. return this.pos > this.bufferWaterline
  6331. }
  6332. dropParsedChunk() {
  6333. 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)
  6334. }
  6335. write(e, t) {
  6336. this.html.length > 0 ? this.html += e : this.html = e, this.endOfChunkHit = !1, this.lastChunkWritten = t
  6337. }
  6338. insertHtmlAtCurrentPos(e) {
  6339. this.html = this.html.substring(0, this.pos + 1) + e + this.html.substring(this.pos + 1), this.endOfChunkHit = !1
  6340. }
  6341. startsWith(e, t) {
  6342. if (this.pos + e.length > this.html.length) return this.endOfChunkHit = !this.lastChunkWritten, !1;
  6343. if (t) return this.html.startsWith(e, this.pos);
  6344. for (let t = 0; t < e.length; t++) {
  6345. if ((32 | this.html.charCodeAt(this.pos + t)) !== e.charCodeAt(t)) return !1
  6346. }
  6347. return !0
  6348. }
  6349. peek(e) {
  6350. const t = this.pos + e;
  6351. return t >= this.html.length ? (this.endOfChunkHit = !this.lastChunkWritten, io.EOF) : this.html.charCodeAt(t)
  6352. }
  6353. advance() {
  6354. 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;
  6355. let e = this.html.charCodeAt(this.pos);
  6356. if (e === io.CARRIAGE_RETURN) return this.isEol = !0, this.skipNextNewLine = !0, io.LINE_FEED;
  6357. if (e === io.LINE_FEED && (this.isEol = !0, this.skipNextNewLine)) return this.line--, this.skipNextNewLine = !1, this._addGap(), this.advance();
  6358. this.skipNextNewLine = !1, uo(e) && (e = this._processSurrogate(e));
  6359. 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
  6360. }
  6361. _checkForProblematicCharacters(e) {
  6362. po(e) ? this._err(Eo.controlCharacterInInputStream) : fo(e) && this._err(Eo.noncharacterInInputStream)
  6363. }
  6364. retreat(e) {
  6365. for (this.pos -= e; this.pos < this.lastGapPos;) this.lastGapPos = this.gapStack.pop(), this.pos--;
  6366. this.isEol = !1
  6367. }
  6368. }
  6369. var To;
  6370. function _o(e, t) {
  6371. for (let n = e.attrs.length - 1; n >= 0; n--) if (e.attrs[n].name === t) return e.attrs[n].value;
  6372. return null
  6373. }! function(e) {
  6374. 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"
  6375. }(To = To || (To = {}));
  6376. var Ao = Ke((function(e, t) {
  6377. Object.defineProperty(t, "__esModule", {
  6378. value: !0
  6379. }), t.
  6380. 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("")
  6381. .map((function(e) {
  6382. return e.charCodeAt(0)
  6383. })))
  6384. }));
  6385. qe(Ao);
  6386. var go = Ke((function(e, t) {
  6387. Object.defineProperty(t, "__esModule", {
  6388. value: !0
  6389. }), t.
  6390. default = new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("")
  6391. .map((function(e) {
  6392. return e.charCodeAt(0)
  6393. })))
  6394. }));
  6395. qe(go);
  6396. var No = Ke((function(e, t) {
  6397. var n;
  6398. Object.defineProperty(t, "__esModule", {
  6399. value: !0
  6400. }), t.replaceCodePoint = t.fromCodePoint = void 0;
  6401. var r = new Map([
  6402. [0, 65533],
  6403. [128, 8364],
  6404. [130, 8218],
  6405. [131, 402],
  6406. [132, 8222],
  6407. [133, 8230],
  6408. [134, 8224],
  6409. [135, 8225],
  6410. [136, 710],
  6411. [137, 8240],
  6412. [138, 352],
  6413. [139, 8249],
  6414. [140, 338],
  6415. [142, 381],
  6416. [145, 8216],
  6417. [146, 8217],
  6418. [147, 8220],
  6419. [148, 8221],
  6420. [149, 8226],
  6421. [150, 8211],
  6422. [151, 8212],
  6423. [152, 732],
  6424. [153, 8482],
  6425. [154, 353],
  6426. [155, 8250],
  6427. [156, 339],
  6428. [158, 382],
  6429. [159, 376]
  6430. ]);
  6431. function i(e) {
  6432. var t;
  6433. return e >= 55296 && e <= 57343 || e > 1114111 ? 65533 : null !== (t = r.get(e)) && void 0 !== t ? t : e
  6434. }
  6435. t.fromCodePoint = null !== (n = String.fromCodePoint) && void 0 !== n ? n : function(e) {
  6436. var t = "";
  6437. return e > 65535 && (e -= 65536, t += String.fromCharCode(e >>> 10 & 1023 | 55296), e = 56320 | 1023 & e), t += String.fromCharCode(e)
  6438. }, t.replaceCodePoint = i, t.
  6439. default = function(e) {
  6440. return (0, t.fromCodePoint)(i(e))
  6441. }
  6442. }));
  6443. qe(No), No.replaceCodePoint, No.fromCodePoint;
  6444. var Co = Ao,
  6445. Io = go,
  6446. So = No,
  6447. bo = Ke((function(e, t) {
  6448. var n = Ge && Ge.__importDefault || function(e) {
  6449. return e && e.__esModule ? e : {
  6450. default: e
  6451. }
  6452. };
  6453. Object.defineProperty(t, "__esModule", {
  6454. value: !0
  6455. }), t.decodeXML = t.decodeHTMLStrict = t.decodeHTML = t.determineBranch = t.BinTrieFlags = t.fromCodePoint = t.replaceCodePoint = t.decodeCodePoint = t.xmlDecodeTree = t.htmlDecodeTree = void 0;
  6456. var r = n(Co);
  6457. t.htmlDecodeTree = r.
  6458. default;
  6459. var i = n(Io);
  6460. t.xmlDecodeTree = i.
  6461. default;
  6462. var s = n(So);
  6463. t.decodeCodePoint = s.
  6464. default;
  6465. var a, o, c = So;
  6466. function l(e) {
  6467. return function(t, n) {
  6468. for (var r = "", i = 0, c = 0;
  6469. (c = t.indexOf("&", c)) >= 0;) if (r += t.slice(i, c), i = c, c += 1, t.charCodeAt(c) !== a.NUM) {
  6470. 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++) {
  6471. var d = (f = e[p]) & o.VALUE_LENGTH;
  6472. if (d) {
  6473. var E;
  6474. if (n && t.charCodeAt(c) !== a.SEMI || (l = p, u = 0), 0 === (E = (d >> 14) - 1)) break;
  6475. p += E
  6476. }
  6477. }
  6478. 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
  6479. } else {
  6480. var m = c + 1,
  6481. T = 10,
  6482. _ = t.charCodeAt(m);
  6483. (_ | a.To_LOWER_BIT) === a.LOWER_X && (T = 16, c += 1, m += 1);
  6484. do {
  6485. _ = t.charCodeAt(++c)
  6486. } while (_ >= a.ZERO && _ <= a.NINE || 16 === T && (_ | a.To_LOWER_BIT) >= a.LOWER_A && (_ | a.To_LOWER_BIT) <= a.LOWER_F);
  6487. if (m !== c) {
  6488. var A = t.substring(m, c),
  6489. g = parseInt(A, T);
  6490. if (t.charCodeAt(c) === a.SEMI) c += 1;
  6491. else if (n) continue;
  6492. r += (0, s.
  6493. default)(g), i = c
  6494. }
  6495. }
  6496. return r + t.slice(i)
  6497. }
  6498. }
  6499. function h(e, t, n, r) {
  6500. var i = (t & o.BRANCH_LENGTH) >> 7,
  6501. s = t & o.JUMP_TABLE;
  6502. if (0 === i) return 0 !== s && r === s ? n : -1;
  6503. if (s) {
  6504. var a = r - s;
  6505. return a < 0 || a >= i ? -1 : e[n + a] - 1
  6506. }
  6507. for (var c = n, l = c + i - 1; c <= l;) {
  6508. var h = c + l >>> 1,
  6509. u = e[h];
  6510. if (u < r) c = h + 1;
  6511. else {
  6512. if (!(u > r)) return e[h + i];
  6513. l = h - 1
  6514. }
  6515. }
  6516. return -1
  6517. }
  6518. Object.defineProperty(t, "replaceCodePoint", {
  6519. enumerable: !0,
  6520. get: function() {
  6521. return c.replaceCodePoint
  6522. }
  6523. }), Object.defineProperty(t, "fromCodePoint", {
  6524. enumerable: !0,
  6525. get: function() {
  6526. return c.fromCodePoint
  6527. }
  6528. }),
  6529. function(e) {
  6530. 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"
  6531. }(a || (a = {})),
  6532. function(e) {
  6533. e[e.VALUE_LENGTH = 49152] = "VALUE_LENGTH", e[e.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", e[e.JUMP_TABLE = 127] = "JUMP_TABLE"
  6534. }(o = t.BinTrieFlags || (t.BinTrieFlags = {})), t.determineBranch = h;
  6535. var u = l(r.
  6536. default),
  6537. p = l(i.
  6538. default);
  6539. t.decodeHTML = function(e) {
  6540. return u(e, !1)
  6541. }, t.decodeHTMLStrict = function(e) {
  6542. return u(e, !0)
  6543. }, t.decodeXML = function(e) {
  6544. return p(e, !0)
  6545. }
  6546. }));
  6547. qe(bo), bo.decodeXML, bo.decodeHTMLStrict, bo.decodeHTML;
  6548. var Oo = bo.determineBranch,
  6549. yo = bo.BinTrieFlags,
  6550. Lo = bo.fromCodePoint,
  6551. ko = bo.replaceCodePoint;
  6552. bo.decodeCodePoint;
  6553. var vo, Do, Ro, Mo, Po, xo = bo.xmlDecodeTree,
  6554. wo = bo.htmlDecodeTree;
  6555. ! function(e) {
  6556. 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/"
  6557. }(vo = vo || (vo = {})),
  6558. function(e) {
  6559. e.TYPE = "type", e.ACTION = "action", e.ENCODING = "encoding", e.PROMPT = "prompt", e.NAME = "name", e.COLOR = "color", e.FACE = "face", e.SIZE = "size"
  6560. }(Do = Do || (Do = {})),
  6561. function(e) {
  6562. e.NO_QUIRKS = "no-quirks", e.QUIRKS = "quirks", e.LIMITED_QUIRKS = "limited-quirks"
  6563. }(Ro = Ro || (Ro = {})),
  6564. function(e) {
  6565. 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"
  6566. }(Mo = Mo || (Mo = {})),
  6567. function(e) {
  6568. 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"
  6569. }(Po = Po || (Po = {}));
  6570. const Bo = new Map([
  6571. [Mo.A, Po.A],
  6572. [Mo.ADDRESS, Po.ADDRESS],
  6573. [Mo.ANNOTATION_XML, Po.ANNOTATION_XML],
  6574. [Mo.APPLET, Po.APPLET],
  6575. [Mo.AREA, Po.AREA],
  6576. [Mo.ARTICLE, Po.ARTICLE],
  6577. [Mo.ASIDE, Po.ASIDE],
  6578. [Mo.B, Po.B],
  6579. [Mo.BASE, Po.BASE],
  6580. [Mo.BASEFONT, Po.BASEFONT],
  6581. [Mo.BGSOUND, Po.BGSOUND],
  6582. [Mo.BIG, Po.BIG],
  6583. [Mo.BLOCKQUOTE, Po.BLOCKQUOTE],
  6584. [Mo.BODY, Po.BODY],
  6585. [Mo.BR, Po.BR],
  6586. [Mo.BUTTON, Po.BUTTON],
  6587. [Mo.CAPTION, Po.CAPTION],
  6588. [Mo.CENTER, Po.CENTER],
  6589. [Mo.CODE, Po.CODE],
  6590. [Mo.COL, Po.COL],
  6591. [Mo.COLGROUP, Po.COLGROUP],
  6592. [Mo.DD, Po.DD],
  6593. [Mo.DESC, Po.DESC],
  6594. [Mo.DETAILS, Po.DETAILS],
  6595. [Mo.DIALOG, Po.DIALOG],
  6596. [Mo.DIR, Po.DIR],
  6597. [Mo.DIV, Po.DIV],
  6598. [Mo.DL, Po.DL],
  6599. [Mo.DT, Po.DT],
  6600. [Mo.EM, Po.EM],
  6601. [Mo.EMBED, Po.EMBED],
  6602. [Mo.FIELDSET, Po.FIELDSET],
  6603. [Mo.FIGCAPTION, Po.FIGCAPTION],
  6604. [Mo.FIGURE, Po.FIGURE],
  6605. [Mo.FONT, Po.FONT],
  6606. [Mo.FOOTER, Po.FOOTER],
  6607. [Mo.FOREIGN_OBJECT, Po.FOREIGN_OBJECT],
  6608. [Mo.FORM, Po.FORM],
  6609. [Mo.FRAME, Po.FRAME],
  6610. [Mo.FRAMESET, Po.FRAMESET],
  6611. [Mo.H1, Po.H1],
  6612. [Mo.H2, Po.H2],
  6613. [Mo.H3, Po.H3],
  6614. [Mo.H4, Po.H4],
  6615. [Mo.H5, Po.H5],
  6616. [Mo.H6, Po.H6],
  6617. [Mo.HEAD, Po.HEAD],
  6618. [Mo.HEADER, Po.HEADER],
  6619. [Mo.HGROUP, Po.HGROUP],
  6620. [Mo.HR, Po.HR],
  6621. [Mo.HTML, Po.HTML],
  6622. [Mo.I, Po.I],
  6623. [Mo.IMG, Po.IMG],
  6624. [Mo.IMAGE, Po.IMAGE],
  6625. [Mo.INPUT, Po.INPUT],
  6626. [Mo.IFRAME, Po.IFRAME],
  6627. [Mo.KEYGEN, Po.KEYGEN],
  6628. [Mo.LABEL, Po.LABEL],
  6629. [Mo.LI, Po.LI],
  6630. [Mo.LINK, Po.LINK],
  6631. [Mo.LISTING, Po.LISTING],
  6632. [Mo.MAIN, Po.MAIN],
  6633. [Mo.MALIGNMARK, Po.MALIGNMARK],
  6634. [Mo.MARQUEE, Po.MARQUEE],
  6635. [Mo.MATH, Po.MATH],
  6636. [Mo.MENU, Po.MENU],
  6637. [Mo.META, Po.META],
  6638. [Mo.MGLYPH, Po.MGLYPH],
  6639. [Mo.MI, Po.MI],
  6640. [Mo.MO, Po.MO],
  6641. [Mo.MN, Po.MN],
  6642. [Mo.MS, Po.MS],
  6643. [Mo.MTEXT, Po.MTEXT],
  6644. [Mo.NAV, Po.NAV],
  6645. [Mo.NOBR, Po.NOBR],
  6646. [Mo.NOFRAMES, Po.NOFRAMES],
  6647. [Mo.NOEMBED, Po.NOEMBED],
  6648. [Mo.NOSCRIPT, Po.NOSCRIPT],
  6649. [Mo.OBJECT, Po.OBJECT],
  6650. [Mo.OL, Po.OL],
  6651. [Mo.OPTGROUP, Po.OPTGROUP],
  6652. [Mo.OPTION, Po.OPTION],
  6653. [Mo.P, Po.P],
  6654. [Mo.PARAM, Po.PARAM],
  6655. [Mo.PLAINTEXT, Po.PLAINTEXT],
  6656. [Mo.PRE, Po.PRE],
  6657. [Mo.RB, Po.RB],
  6658. [Mo.RP, Po.RP],
  6659. [Mo.RT, Po.RT],
  6660. [Mo.RTC, Po.RTC],
  6661. [Mo.RUBY, Po.RUBY],
  6662. [Mo.S, Po.S],
  6663. [Mo.SCRIPT, Po.SCRIPT],
  6664. [Mo.SECTION, Po.SECTION],
  6665. [Mo.SELECT, Po.SELECT],
  6666. [Mo.SOURCE, Po.SOURCE],
  6667. [Mo.SMALL, Po.SMALL],
  6668. [Mo.SPAN, Po.SPAN],
  6669. [Mo.STRIKE, Po.STRIKE],
  6670. [Mo.STRONG, Po.STRONG],
  6671. [Mo.STYLE, Po.STYLE],
  6672. [Mo.SUB, Po.SUB],
  6673. [Mo.SUMMARY, Po.SUMMARY],
  6674. [Mo.SUP, Po.SUP],
  6675. [Mo.TABLE, Po.TABLE],
  6676. [Mo.TBODY, Po.TBODY],
  6677. [Mo.TEMPLATE, Po.TEMPLATE],
  6678. [Mo.TEXTAREA, Po.TEXTAREA],
  6679. [Mo.TFOOT, Po.TFOOT],
  6680. [Mo.TD, Po.TD],
  6681. [Mo.TH, Po.TH],
  6682. [Mo.THEAD, Po.THEAD],
  6683. [Mo.TITLE, Po.TITLE],
  6684. [Mo.TR, Po.TR],
  6685. [Mo.TRACK, Po.TRACK],
  6686. [Mo.TT, Po.TT],
  6687. [Mo.U, Po.U],
  6688. [Mo.UL, Po.UL],
  6689. [Mo.SVG, Po.SVG],
  6690. [Mo.VAR, Po.VAR],
  6691. [Mo.WBR, Po.WBR],
  6692. [Mo.XMP, Po.XMP]
  6693. ]);
  6694. function Fo(e) {
  6695. var t;
  6696. return null !== (t = Bo.get(e)) && void 0 !== t ? t : Po.UNKNOWN
  6697. }
  6698. const Uo = Po, Ho = {
  6699. [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]),
  6700. [vo.MATHML]: new Set([Uo.MI, Uo.MO, Uo.MN, Uo.MS, Uo.MTEXT, Uo.ANNOTATION_XML]),
  6701. [vo.SVG]: new Set([Uo.TITLE, Uo.FOREIGN_OBJECT, Uo.DESC]),
  6702. [vo.XLINK]: new Set,
  6703. [vo.XML]: new Set,
  6704. [vo.XMLNS]: new Set
  6705. };
  6706. function Go(e) {
  6707. return e === Uo.H1 || e === Uo.H2 || e === Uo.H3 || e === Uo.H4 || e === Uo.H5 || e === Uo.H6
  6708. }
  6709. const Yo = new Set([Mo.STYLE, Mo.SCRIPT, Mo.XMP, Mo.IFRAME, Mo.NOEMBED, Mo.NOFRAMES, Mo.PLAINTEXT]);
  6710. const qo = new Map([
  6711. [128, 8364],
  6712. [130, 8218],
  6713. [131, 402],
  6714. [132, 8222],
  6715. [133, 8230],
  6716. [134, 8224],
  6717. [135, 8225],
  6718. [136, 710],
  6719. [137, 8240],
  6720. [138, 352],
  6721. [139, 8249],
  6722. [140, 338],
  6723. [142, 381],
  6724. [145, 8216],
  6725. [146, 8217],
  6726. [147, 8220],
  6727. [148, 8221],
  6728. [149, 8226],
  6729. [150, 8211],
  6730. [151, 8212],
  6731. [152, 732],
  6732. [153, 8482],
  6733. [154, 353],
  6734. [155, 8250],
  6735. [156, 339],
  6736. [158, 382],
  6737. [159, 376]
  6738. ]);
  6739. var Ko;
  6740. ! function(e) {
  6741. 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"
  6742. }(Ko || (Ko = {}));
  6743. const jo = {
  6744. DATA: Ko.DATA,
  6745. RCDATA: Ko.RCDATA,
  6746. RAWTEXT: Ko.RAWTEXT,
  6747. SCRIPT_DATA: Ko.SCRIPT_DATA,
  6748. PLAINTEXT: Ko.PLAINTEXT,
  6749. CDATA_SECTION: Ko.CDATA_SECTION
  6750. };
  6751. function Vo(e) {
  6752. return e >= io.DIGIT_0 && e <= io.DIGIT_9
  6753. }
  6754. function Wo(e) {
  6755. return e >= io.LATIN_CAPITAL_A && e <= io.LATIN_CAPITAL_Z
  6756. }
  6757. function Qo(e) {
  6758. return function(e) {
  6759. return e >= io.LATIN_SMALL_A && e <= io.LATIN_SMALL_Z
  6760. }(e) || Wo(e)
  6761. }
  6762. function Xo(e) {
  6763. return Qo(e) || Vo(e)
  6764. }
  6765. function $o(e) {
  6766. return e >= io.LATIN_CAPITAL_A && e <= io.LATIN_CAPITAL_F
  6767. }
  6768. function zo(e) {
  6769. return e >= io.LATIN_SMALL_A && e <= io.LATIN_SMALL_F
  6770. }
  6771. function Jo(e) {
  6772. return e + 32
  6773. }
  6774. function Zo(e) {
  6775. return e === io.SPACE || e === io.LINE_FEED || e === io.TABULATION || e === io.FORM_FEED
  6776. }
  6777. function ec(e) {
  6778. return Zo(e) || e === io.SOLIDUS || e === io.GREATER_THAN_SIGN
  6779. }
  6780. class tc {
  6781. constructor(e, t) {
  6782. 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 = {
  6783. name: "",
  6784. value: ""
  6785. }, this.preprocessor = new mo(t), this.currentLocation = this.getCurrentLocation(-1)
  6786. }
  6787. _err(e) {
  6788. var t, n;
  6789. null === (n = (t = this.handler)
  6790. .onParseError) || void 0 === n || n.call(t, this.preprocessor.getError(e))
  6791. }
  6792. getCurrentLocation(e) {
  6793. return this.options.sourceCodeLocationInfo ? {
  6794. startLine: this.preprocessor.line,
  6795. startCol: this.preprocessor.col - e,
  6796. startOffset: this.preprocessor.offset - e,
  6797. endLine: -1,
  6798. endCol: -1,
  6799. endOffset: -1
  6800. } : null
  6801. }
  6802. _runParsingLoop() {
  6803. if (!this.inLoop) {
  6804. for (this.inLoop = !0; this.active && !this.paused;) {
  6805. this.consumedAfterSnapshot = 0;
  6806. const e = this._consume();
  6807. this._ensureHibernation() || this._callState(e)
  6808. }
  6809. this.inLoop = !1
  6810. }
  6811. }
  6812. pause() {
  6813. this.paused = !0
  6814. }
  6815. resume(e) {
  6816. if (!this.paused) throw new Error("Parser was already resumed");
  6817. this.paused = !1, this.inLoop || (this._runParsingLoop(), this.paused || null == e || e())
  6818. }
  6819. write(e, t, n) {
  6820. this.active = !0, this.preprocessor.write(e, t), this._runParsingLoop(), this.paused || null == n || n()
  6821. }
  6822. insertHtmlAtCurrentPos(e) {
  6823. this.active = !0, this.preprocessor.insertHtmlAtCurrentPos(e), this._runParsingLoop()
  6824. }
  6825. _ensureHibernation() {
  6826. return !!this.preprocessor.endOfChunkHit && (this._unconsume(this.consumedAfterSnapshot), this.active = !1, !0)
  6827. }
  6828. _consume() {
  6829. return this.consumedAfterSnapshot++, this.preprocessor.advance()
  6830. }
  6831. _unconsume(e) {
  6832. this.consumedAfterSnapshot -= e, this.preprocessor.retreat(e)
  6833. }
  6834. _reconsumeInState(e, t) {
  6835. this.state = e, this._callState(t)
  6836. }
  6837. _advanceBy(e) {
  6838. this.consumedAfterSnapshot += e;
  6839. for (let t = 0; t < e; t++) this.preprocessor.advance()
  6840. }
  6841. _consumeSequenceIfMatch(e, t) {
  6842. return !!this.preprocessor.startsWith(e, t) && (this._advanceBy(e.length - 1), !0)
  6843. }
  6844. _createStartTagToken() {
  6845. this.currentToken = {
  6846. type: To.START_TAG,
  6847. tagName: "",
  6848. tagID: Po.UNKNOWN,
  6849. selfClosing: !1,
  6850. ackSelfClosing: !1,
  6851. attrs: [],
  6852. location: this.getCurrentLocation(1)
  6853. }
  6854. }
  6855. _createEndTagToken() {
  6856. this.currentToken = {
  6857. type: To.END_TAG,
  6858. tagName: "",
  6859. tagID: Po.UNKNOWN,
  6860. selfClosing: !1,
  6861. ackSelfClosing: !1,
  6862. attrs: [],
  6863. location: this.getCurrentLocation(2)
  6864. }
  6865. }
  6866. _createCommentToken(e) {
  6867. this.currentToken = {
  6868. type: To.COMMENT,
  6869. data: "",
  6870. location: this.getCurrentLocation(e)
  6871. }
  6872. }
  6873. _createDoctypeToken(e) {
  6874. this.currentToken = {
  6875. type: To.DOCTYPE,
  6876. name: e,
  6877. forceQuirks: !1,
  6878. publicId: null,
  6879. systemId: null,
  6880. location: this.currentLocation
  6881. }
  6882. }
  6883. _createCharacterToken(e, t) {
  6884. this.currentCharacterToken = {
  6885. type: e,
  6886. chars: t,
  6887. location: this.currentLocation
  6888. }
  6889. }
  6890. _createAttr(e) {
  6891. this.currentAttr = {
  6892. name: e,
  6893. value: ""
  6894. }, this.currentLocation = this.getCurrentLocation(0)
  6895. }
  6896. _leaveAttrName() {
  6897. var e, t;
  6898. const n = this.currentToken;
  6899. if (null === _o(n, this.currentAttr.name)) {
  6900. if (n.attrs.push(this.currentAttr), n.location && this.currentLocation) {
  6901. (null !== (e = (t = n.location)
  6902. .attrs) && void 0 !== e ? e : t.attrs = Object.create(null))[this.currentAttr.name] = this.currentLocation, this._leaveAttrValue()
  6903. }
  6904. } else this._err(Eo.duplicateAttribute)
  6905. }
  6906. _leaveAttrValue() {
  6907. this.currentLocation && (this.currentLocation.endLine = this.preprocessor.line, this.currentLocation.endCol = this.preprocessor.col, this.currentLocation.endOffset = this.preprocessor.offset)
  6908. }
  6909. prepareToken(e) {
  6910. 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)
  6911. }
  6912. emitCurrentTagToken() {
  6913. const e = this.currentToken;
  6914. 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()
  6915. }
  6916. emitCurrentComment(e) {
  6917. this.prepareToken(e), this.handler.onComment(e), this.preprocessor.dropParsedChunk()
  6918. }
  6919. emitCurrentDoctype(e) {
  6920. this.prepareToken(e), this.handler.onDoctype(e), this.preprocessor.dropParsedChunk()
  6921. }
  6922. _emitCurrentCharacterToken(e) {
  6923. if (this.currentCharacterToken) {
  6924. 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) {
  6925. case To.CHARACTER:
  6926. this.handler.onCharacter(this.currentCharacterToken);
  6927. break;
  6928. case To.NULL_CHARACTER:
  6929. this.handler.onNullCharacter(this.currentCharacterToken);
  6930. break;
  6931. case To.WHITESPACE_CHARACTER:
  6932. this.handler.onWhitespaceCharacter(this.currentCharacterToken)
  6933. }
  6934. this.currentCharacterToken = null
  6935. }
  6936. }
  6937. _emitEOFToken() {
  6938. const e = this.getCurrentLocation(0);
  6939. e && (e.endLine = e.startLine, e.endCol = e.startCol, e.endOffset = e.startOffset), this._emitCurrentCharacterToken(e), this.handler.onEof({
  6940. type: To.EOF,
  6941. location: e
  6942. }), this.active = !1
  6943. }
  6944. _appendCharToCurrentCharacterToken(e, t) {
  6945. if (this.currentCharacterToken) {
  6946. if (this.currentCharacterToken.type === e) return void(this.currentCharacterToken.chars += t);
  6947. this.currentLocation = this.getCurrentLocation(0), this._emitCurrentCharacterToken(this.currentLocation), this.preprocessor.dropParsedChunk()
  6948. }
  6949. this._createCharacterToken(e, t)
  6950. }
  6951. _emitCodePoint(e) {
  6952. const t = Zo(e) ? To.WHITESPACE_CHARACTER : e === io.NULL ? To.NULL_CHARACTER : To.CHARACTER;
  6953. this._appendCharToCurrentCharacterToken(t, String.fromCodePoint(e))
  6954. }
  6955. _emitChars(e) {
  6956. this._appendCharToCurrentCharacterToken(To.CHARACTER, e)
  6957. }
  6958. _matchNamedCharacterReference(e) {
  6959. let t = null, n = 0, r = !1;
  6960. for (let s = 0, a = wo[0]; s >= 0 && (s = Oo(wo, a, s + 1, e), !(s < 0)); e = this._consume()) {
  6961. n += 1, a = wo[s];
  6962. const o = a & yo.VALUE_LENGTH;
  6963. if (o) {
  6964. const a = (o >> 14) - 1;
  6965. 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) {
  6966. this._consume();
  6967. break
  6968. }
  6969. }
  6970. }
  6971. var i;
  6972. return this._unconsume(n), r && !this.preprocessor.endOfChunkHit && this._err(Eo.missingSemicolonAfterCharacterReference), this._unconsume(1), t
  6973. }
  6974. _isCharacterReferenceInAttribute() {
  6975. return this.returnState === Ko.ATTRIBUTE_VALUE_DOUBLE_QUOTED || this.returnState === Ko.ATTRIBUTE_VALUE_SINGLE_QUOTED || this.returnState === Ko.ATTRIBUTE_VALUE_UNQUOTED
  6976. }
  6977. _flushCodePointConsumedAsCharacterReference(e) {
  6978. this._isCharacterReferenceInAttribute() ? this.currentAttr.value += String.fromCodePoint(e) : this._emitCodePoint(e)
  6979. }
  6980. _callState(e) {
  6981. switch (this.state) {
  6982. case Ko.DATA:
  6983. this._stateData(e);
  6984. break;
  6985. case Ko.RCDATA:
  6986. this._stateRcdata(e);
  6987. break;
  6988. case Ko.RAWTEXT:
  6989. this._stateRawtext(e);
  6990. break;
  6991. case Ko.SCRIPT_DATA:
  6992. this._stateScriptData(e);
  6993. break;
  6994. case Ko.PLAINTEXT:
  6995. this._statePlaintext(e);
  6996. break;
  6997. case Ko.TAG_OPEN:
  6998. this._stateTagOpen(e);
  6999. break;
  7000. case Ko.END_TAG_OPEN:
  7001. this._stateEndTagOpen(e);
  7002. break;
  7003. case Ko.TAG_NAME:
  7004. this._stateTagName(e);
  7005. break;
  7006. case Ko.RCDATA_LESS_THAN_SIGN:
  7007. this._stateRcdataLessThanSign(e);
  7008. break;
  7009. case Ko.RCDATA_END_TAG_OPEN:
  7010. this._stateRcdataEndTagOpen(e);
  7011. break;
  7012. case Ko.RCDATA_END_TAG_NAME:
  7013. this._stateRcdataEndTagName(e);
  7014. break;
  7015. case Ko.RAWTEXT_LESS_THAN_SIGN:
  7016. this._stateRawtextLessThanSign(e);
  7017. break;
  7018. case Ko.RAWTEXT_END_TAG_OPEN:
  7019. this._stateRawtextEndTagOpen(e);
  7020. break;
  7021. case Ko.RAWTEXT_END_TAG_NAME:
  7022. this._stateRawtextEndTagName(e);
  7023. break;
  7024. case Ko.SCRIPT_DATA_LESS_THAN_SIGN:
  7025. this._stateScriptDataLessThanSign(e);
  7026. break;
  7027. case Ko.SCRIPT_DATA_END_TAG_OPEN:
  7028. this._stateScriptDataEndTagOpen(e);
  7029. break;
  7030. case Ko.SCRIPT_DATA_END_TAG_NAME:
  7031. this._stateScriptDataEndTagName(e);
  7032. break;
  7033. case Ko.SCRIPT_DATA_ESCAPE_START:
  7034. this._stateScriptDataEscapeStart(e);
  7035. break;
  7036. case Ko.SCRIPT_DATA_ESCAPE_START_DASH:
  7037. this._stateScriptDataEscapeStartDash(e);
  7038. break;
  7039. case Ko.SCRIPT_DATA_ESCAPED:
  7040. this._stateScriptDataEscaped(e);
  7041. break;
  7042. case Ko.SCRIPT_DATA_ESCAPED_DASH:
  7043. this._stateScriptDataEscapedDash(e);
  7044. break;
  7045. case Ko.SCRIPT_DATA_ESCAPED_DASH_DASH:
  7046. this._stateScriptDataEscapedDashDash(e);
  7047. break;
  7048. case Ko.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:
  7049. this._stateScriptDataEscapedLessThanSign(e);
  7050. break;
  7051. case Ko.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:
  7052. this._stateScriptDataEscapedEndTagOpen(e);
  7053. break;
  7054. case Ko.SCRIPT_DATA_ESCAPED_END_TAG_NAME:
  7055. this._stateScriptDataEscapedEndTagName(e);
  7056. break;
  7057. case Ko.SCRIPT_DATA_DOUBLE_ESCAPE_START:
  7058. this._stateScriptDataDoubleEscapeStart(e);
  7059. break;
  7060. case Ko.SCRIPT_DATA_DOUBLE_ESCAPED:
  7061. this._stateScriptDataDoubleEscaped(e);
  7062. break;
  7063. case Ko.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:
  7064. this._stateScriptDataDoubleEscapedDash(e);
  7065. break;
  7066. case Ko.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:
  7067. this._stateScriptDataDoubleEscapedDashDash(e);
  7068. break;
  7069. case Ko.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:
  7070. this._stateScriptDataDoubleEscapedLessThanSign(e);
  7071. break;
  7072. case Ko.SCRIPT_DATA_DOUBLE_ESCAPE_END:
  7073. this._stateScriptDataDoubleEscapeEnd(e);
  7074. break;
  7075. case Ko.BEFORE_ATTRIBUTE_NAME:
  7076. this._stateBeforeAttributeName(e);
  7077. break;
  7078. case Ko.ATTRIBUTE_NAME:
  7079. this._stateAttributeName(e);
  7080. break;
  7081. case Ko.AFTER_ATTRIBUTE_NAME:
  7082. this._stateAfterAttributeName(e);
  7083. break;
  7084. case Ko.BEFORE_ATTRIBUTE_VALUE:
  7085. this._stateBeforeAttributeValue(e);
  7086. break;
  7087. case Ko.ATTRIBUTE_VALUE_DOUBLE_QUOTED:
  7088. this._stateAttributeValueDoubleQuoted(e);
  7089. break;
  7090. case Ko.ATTRIBUTE_VALUE_SINGLE_QUOTED:
  7091. this._stateAttributeValueSingleQuoted(e);
  7092. break;
  7093. case Ko.ATTRIBUTE_VALUE_UNQUOTED:
  7094. this._stateAttributeValueUnquoted(e);
  7095. break;
  7096. case Ko.AFTER_ATTRIBUTE_VALUE_QUOTED:
  7097. this._stateAfterAttributeValueQuoted(e);
  7098. break;
  7099. case Ko.SELF_CLOSING_START_TAG:
  7100. this._stateSelfClosingStartTag(e);
  7101. break;
  7102. case Ko.BOGUS_COMMENT:
  7103. this._stateBogusComment(e);
  7104. break;
  7105. case Ko.MARKUP_DECLARATION_OPEN:
  7106. this._stateMarkupDeclarationOpen(e);
  7107. break;
  7108. case Ko.COMMENT_START:
  7109. this._stateCommentStart(e);
  7110. break;
  7111. case Ko.COMMENT_START_DASH:
  7112. this._stateCommentStartDash(e);
  7113. break;
  7114. case Ko.COMMENT:
  7115. this._stateComment(e);
  7116. break;
  7117. case Ko.COMMENT_LESS_THAN_SIGN:
  7118. this._stateCommentLessThanSign(e);
  7119. break;
  7120. case Ko.COMMENT_LESS_THAN_SIGN_BANG:
  7121. this._stateCommentLessThanSignBang(e);
  7122. break;
  7123. case Ko.COMMENT_LESS_THAN_SIGN_BANG_DASH:
  7124. this._stateCommentLessThanSignBangDash(e);
  7125. break;
  7126. case Ko.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:
  7127. this._stateCommentLessThanSignBangDashDash(e);
  7128. break;
  7129. case Ko.COMMENT_END_DASH:
  7130. this._stateCommentEndDash(e);
  7131. break;
  7132. case Ko.COMMENT_END:
  7133. this._stateCommentEnd(e);
  7134. break;
  7135. case Ko.COMMENT_END_BANG:
  7136. this._stateCommentEndBang(e);
  7137. break;
  7138. case Ko.DOCTYPE:
  7139. this._stateDoctype(e);
  7140. break;
  7141. case Ko.BEFORE_DOCTYPE_NAME:
  7142. this._stateBeforeDoctypeName(e);
  7143. break;
  7144. case Ko.DOCTYPE_NAME:
  7145. this._stateDoctypeName(e);
  7146. break;
  7147. case Ko.AFTER_DOCTYPE_NAME:
  7148. this._stateAfterDoctypeName(e);
  7149. break;
  7150. case Ko.AFTER_DOCTYPE_PUBLIC_KEYWORD:
  7151. this._stateAfterDoctypePublicKeyword(e);
  7152. break;
  7153. case Ko.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:
  7154. this._stateBeforeDoctypePublicIdentifier(e);
  7155. break;
  7156. case Ko.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:
  7157. this._stateDoctypePublicIdentifierDoubleQuoted(e);
  7158. break;
  7159. case Ko.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:
  7160. this._stateDoctypePublicIdentifierSingleQuoted(e);
  7161. break;
  7162. case Ko.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:
  7163. this._stateAfterDoctypePublicIdentifier(e);
  7164. break;
  7165. case Ko.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:
  7166. this._stateBetweenDoctypePublicAndSystemIdentifiers(e);
  7167. break;
  7168. case Ko.AFTER_DOCTYPE_SYSTEM_KEYWORD:
  7169. this._stateAfterDoctypeSystemKeyword(e);
  7170. break;
  7171. case Ko.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:
  7172. this._stateBeforeDoctypeSystemIdentifier(e);
  7173. break;
  7174. case Ko.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:
  7175. this._stateDoctypeSystemIdentifierDoubleQuoted(e);
  7176. break;
  7177. case Ko.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:
  7178. this._stateDoctypeSystemIdentifierSingleQuoted(e);
  7179. break;
  7180. case Ko.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:
  7181. this._stateAfterDoctypeSystemIdentifier(e);
  7182. break;
  7183. case Ko.BOGUS_DOCTYPE:
  7184. this._stateBogusDoctype(e);
  7185. break;
  7186. case Ko.CDATA_SECTION:
  7187. this._stateCdataSection(e);
  7188. break;
  7189. case Ko.CDATA_SECTION_BRACKET:
  7190. this._stateCdataSectionBracket(e);
  7191. break;
  7192. case Ko.CDATA_SECTION_END:
  7193. this._stateCdataSectionEnd(e);
  7194. break;
  7195. case Ko.CHARACTER_REFERENCE:
  7196. this._stateCharacterReference(e);
  7197. break;
  7198. case Ko.NAMED_CHARACTER_REFERENCE:
  7199. this._stateNamedCharacterReference(e);
  7200. break;
  7201. case Ko.AMBIGUOUS_AMPERSAND:
  7202. this._stateAmbiguousAmpersand(e);
  7203. break;
  7204. case Ko.NUMERIC_CHARACTER_REFERENCE:
  7205. this._stateNumericCharacterReference(e);
  7206. break;
  7207. case Ko.HEXADEMICAL_CHARACTER_REFERENCE_START:
  7208. this._stateHexademicalCharacterReferenceStart(e);
  7209. break;
  7210. case Ko.HEXADEMICAL_CHARACTER_REFERENCE:
  7211. this._stateHexademicalCharacterReference(e);
  7212. break;
  7213. case Ko.DECIMAL_CHARACTER_REFERENCE:
  7214. this._stateDecimalCharacterReference(e);
  7215. break;
  7216. case Ko.NUMERIC_CHARACTER_REFERENCE_END:
  7217. this._stateNumericCharacterReferenceEnd(e);
  7218. break;
  7219. default:
  7220. throw new Error("Unknown state")
  7221. }
  7222. }
  7223. _stateData(e) {
  7224. switch (e) {
  7225. case io.LESS_THAN_SIGN:
  7226. this.state = Ko.TAG_OPEN;
  7227. break;
  7228. case io.AMPERSAND:
  7229. this.returnState = Ko.DATA, this.state = Ko.CHARACTER_REFERENCE;
  7230. break;
  7231. case io.NULL:
  7232. this._err(Eo.unexpectedNullCharacter), this._emitCodePoint(e);
  7233. break;
  7234. case io.EOF:
  7235. this._emitEOFToken();
  7236. break;
  7237. default:
  7238. this._emitCodePoint(e)
  7239. }
  7240. }
  7241. _stateRcdata(e) {
  7242. switch (e) {
  7243. case io.AMPERSAND:
  7244. this.returnState = Ko.RCDATA, this.state = Ko.CHARACTER_REFERENCE;
  7245. break;
  7246. case io.LESS_THAN_SIGN:
  7247. this.state = Ko.RCDATA_LESS_THAN_SIGN;
  7248. break;
  7249. case io.NULL:
  7250. this._err(Eo.unexpectedNullCharacter), this._emitChars("�");
  7251. break;
  7252. case io.EOF:
  7253. this._emitEOFToken();
  7254. break;
  7255. default:
  7256. this._emitCodePoint(e)
  7257. }
  7258. }
  7259. _stateRawtext(e) {
  7260. switch (e) {
  7261. case io.LESS_THAN_SIGN:
  7262. this.state = Ko.RAWTEXT_LESS_THAN_SIGN;
  7263. break;
  7264. case io.NULL:
  7265. this._err(Eo.unexpectedNullCharacter), this._emitChars("�");
  7266. break;
  7267. case io.EOF:
  7268. this._emitEOFToken();
  7269. break;
  7270. default:
  7271. this._emitCodePoint(e)
  7272. }
  7273. }
  7274. _stateScriptData(e) {
  7275. switch (e) {
  7276. case io.LESS_THAN_SIGN:
  7277. this.state = Ko.SCRIPT_DATA_LESS_THAN_SIGN;
  7278. break;
  7279. case io.NULL:
  7280. this._err(Eo.unexpectedNullCharacter), this._emitChars("�");
  7281. break;
  7282. case io.EOF:
  7283. this._emitEOFToken();
  7284. break;
  7285. default:
  7286. this._emitCodePoint(e)
  7287. }
  7288. }
  7289. _statePlaintext(e) {
  7290. switch (e) {
  7291. case io.NULL:
  7292. this._err(Eo.unexpectedNullCharacter), this._emitChars("�");
  7293. break;
  7294. case io.EOF:
  7295. this._emitEOFToken();
  7296. break;
  7297. default:
  7298. this._emitCodePoint(e)
  7299. }
  7300. }
  7301. _stateTagOpen(e) {
  7302. if (Qo(e)) this._createStartTagToken(), this.state = Ko.TAG_NAME, this._stateTagName(e);
  7303. else switch (e) {
  7304. case io.EXCLAMATION_MARK:
  7305. this.state = Ko.MARKUP_DECLARATION_OPEN;
  7306. break;
  7307. case io.SOLIDUS:
  7308. this.state = Ko.END_TAG_OPEN;
  7309. break;
  7310. case io.QUESTION_MARK:
  7311. this._err(Eo.unexpectedQuestionMarkInsteadOfTagName), this._createCommentToken(1), this.state = Ko.BOGUS_COMMENT, this._stateBogusComment(e);
  7312. break;
  7313. case io.EOF:
  7314. this._err(Eo.eofBeforeTagName), this._emitChars("<"), this._emitEOFToken();
  7315. break;
  7316. default:
  7317. this._err(Eo.invalidFirstCharacterOfTagName), this._emitChars("<"), this.state = Ko.DATA, this._stateData(e)
  7318. }
  7319. }
  7320. _stateEndTagOpen(e) {
  7321. if (Qo(e)) this._createEndTagToken(), this.state = Ko.TAG_NAME, this._stateTagName(e);
  7322. else switch (e) {
  7323. case io.GREATER_THAN_SIGN:
  7324. this._err(Eo.missingEndTagName), this.state = Ko.DATA;
  7325. break;
  7326. case io.EOF:
  7327. this._err(Eo.eofBeforeTagName), this._emitChars("</"), this._emitEOFToken();
  7328. break;
  7329. default:
  7330. this._err(Eo.invalidFirstCharacterOfTagName), this._createCommentToken(2), this.state = Ko.BOGUS_COMMENT, this._stateBogusComment(e)
  7331. }
  7332. }
  7333. _stateTagName(e) {
  7334. const t = this.currentToken;
  7335. switch (e) {
  7336. case io.SPACE:
  7337. case io.LINE_FEED:
  7338. case io.TABULATION:
  7339. case io.FORM_FEED:
  7340. this.state = Ko.BEFORE_ATTRIBUTE_NAME;
  7341. break;
  7342. case io.SOLIDUS:
  7343. this.state = Ko.SELF_CLOSING_START_TAG;
  7344. break;
  7345. case io.GREATER_THAN_SIGN:
  7346. this.state = Ko.DATA, this.emitCurrentTagToken();
  7347. break;
  7348. case io.NULL:
  7349. this._err(Eo.unexpectedNullCharacter), t.tagName += "�";
  7350. break;
  7351. case io.EOF:
  7352. this._err(Eo.eofInTag), this._emitEOFToken();
  7353. break;
  7354. default:
  7355. t.tagName += String.fromCodePoint(Wo(e) ? Jo(e) : e)
  7356. }
  7357. }
  7358. _stateRcdataLessThanSign(e) {
  7359. e === io.SOLIDUS ? this.state = Ko.RCDATA_END_TAG_OPEN : (this._emitChars("<"), this.state = Ko.RCDATA, this._stateRcdata(e))
  7360. }
  7361. _stateRcdataEndTagOpen(e) {
  7362. Qo(e) ? (this.state = Ko.RCDATA_END_TAG_NAME, this._stateRcdataEndTagName(e)) : (this._emitChars("</"), this.state = Ko.RCDATA, this._stateRcdata(e))
  7363. }
  7364. handleSpecialEndTag(e) {
  7365. if (!this.preprocessor.startsWith(this.lastStartTagName, !1)) return !this._ensureHibernation();
  7366. this._createEndTagToken();
  7367. this.currentToken.tagName = this.lastStartTagName;
  7368. switch (this.preprocessor.peek(this.lastStartTagName.length)) {
  7369. case io.SPACE:
  7370. case io.LINE_FEED:
  7371. case io.TABULATION:
  7372. case io.FORM_FEED:
  7373. return this._advanceBy(this.lastStartTagName.length), this.state = Ko.BEFORE_ATTRIBUTE_NAME, !1;
  7374. case io.SOLIDUS:
  7375. return this._advanceBy(this.lastStartTagName.length), this.state = Ko.SELF_CLOSING_START_TAG, !1;
  7376. case io.GREATER_THAN_SIGN:
  7377. return this._advanceBy(this.lastStartTagName.length), this.emitCurrentTagToken(), this.state = Ko.DATA, !1;
  7378. default:
  7379. return !this._ensureHibernation()
  7380. }
  7381. }
  7382. _stateRcdataEndTagName(e) {
  7383. this.handleSpecialEndTag(e) && (this._emitChars("</"), this.state = Ko.RCDATA, this._stateRcdata(e))
  7384. }
  7385. _stateRawtextLessThanSign(e) {
  7386. e === io.SOLIDUS ? this.state = Ko.RAWTEXT_END_TAG_OPEN : (this._emitChars("<"), this.state = Ko.RAWTEXT, this._stateRawtext(e))
  7387. }
  7388. _stateRawtextEndTagOpen(e) {
  7389. Qo(e) ? (this.state = Ko.RAWTEXT_END_TAG_NAME, this._stateRawtextEndTagName(e)) : (this._emitChars("</"), this.state = Ko.RAWTEXT, this._stateRawtext(e))
  7390. }
  7391. _stateRawtextEndTagName(e) {
  7392. this.handleSpecialEndTag(e) && (this._emitChars("</"), this.state = Ko.RAWTEXT, this._stateRawtext(e))
  7393. }
  7394. _stateScriptDataLessThanSign(e) {
  7395. switch (e) {
  7396. case io.SOLIDUS:
  7397. this.state = Ko.SCRIPT_DATA_END_TAG_OPEN;
  7398. break;
  7399. case io.EXCLAMATION_MARK:
  7400. this.state = Ko.SCRIPT_DATA_ESCAPE_START, this._emitChars("<!");
  7401. break;
  7402. default:
  7403. this._emitChars("<"), this.state = Ko.SCRIPT_DATA, this._stateScriptData(e)
  7404. }
  7405. }
  7406. _stateScriptDataEndTagOpen(e) {
  7407. Qo(e) ? (this.state = Ko.SCRIPT_DATA_END_TAG_NAME, this._stateScriptDataEndTagName(e)) : (this._emitChars("</"), this.state = Ko.SCRIPT_DATA, this._stateScriptData(e))
  7408. }
  7409. _stateScriptDataEndTagName(e) {
  7410. this.handleSpecialEndTag(e) && (this._emitChars("</"), this.state = Ko.SCRIPT_DATA, this._stateScriptData(e))
  7411. }
  7412. _stateScriptDataEscapeStart(e) {
  7413. e === io.HYPHEN_MINUS ? (this.state = Ko.SCRIPT_DATA_ESCAPE_START_DASH, this._emitChars("-")) : (this.state = Ko.SCRIPT_DATA, this._stateScriptData(e))
  7414. }
  7415. _stateScriptDataEscapeStartDash(e) {
  7416. e === io.HYPHEN_MINUS ? (this.state = Ko.SCRIPT_DATA_ESCAPED_DASH_DASH, this._emitChars("-")) : (this.state = Ko.SCRIPT_DATA, this._stateScriptData(e))
  7417. }
  7418. _stateScriptDataEscaped(e) {
  7419. switch (e) {
  7420. case io.HYPHEN_MINUS:
  7421. this.state = Ko.SCRIPT_DATA_ESCAPED_DASH, this._emitChars("-");
  7422. break;
  7423. case io.LESS_THAN_SIGN:
  7424. this.state = Ko.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;
  7425. break;
  7426. case io.NULL:
  7427. this._err(Eo.unexpectedNullCharacter), this._emitChars("�");
  7428. break;
  7429. case io.EOF:
  7430. this._err(Eo.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
  7431. break;
  7432. default:
  7433. this._emitCodePoint(e)
  7434. }
  7435. }
  7436. _stateScriptDataEscapedDash(e) {
  7437. switch (e) {
  7438. case io.HYPHEN_MINUS:
  7439. this.state = Ko.SCRIPT_DATA_ESCAPED_DASH_DASH, this._emitChars("-");
  7440. break;
  7441. case io.LESS_THAN_SIGN:
  7442. this.state = Ko.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;
  7443. break;
  7444. case io.NULL:
  7445. this._err(Eo.unexpectedNullCharacter), this.state = Ko.SCRIPT_DATA_ESCAPED, this._emitChars("�");
  7446. break;
  7447. case io.EOF:
  7448. this._err(Eo.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
  7449. break;
  7450. default:
  7451. this.state = Ko.SCRIPT_DATA_ESCAPED, this._emitCodePoint(e)
  7452. }
  7453. }
  7454. _stateScriptDataEscapedDashDash(e) {
  7455. switch (e) {
  7456. case io.HYPHEN_MINUS:
  7457. this._emitChars("-");
  7458. break;
  7459. case io.LESS_THAN_SIGN:
  7460. this.state = Ko.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;
  7461. break;
  7462. case io.GREATER_THAN_SIGN:
  7463. this.state = Ko.SCRIPT_DATA, this._emitChars(">");
  7464. break;
  7465. case io.NULL:
  7466. this._err(Eo.unexpectedNullCharacter), this.state = Ko.SCRIPT_DATA_ESCAPED, this._emitChars("�");
  7467. break;
  7468. case io.EOF:
  7469. this._err(Eo.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
  7470. break;
  7471. default:
  7472. this.state = Ko.SCRIPT_DATA_ESCAPED, this._emitCodePoint(e)
  7473. }
  7474. }
  7475. _stateScriptDataEscapedLessThanSign(e) {
  7476. 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))
  7477. }
  7478. _stateScriptDataEscapedEndTagOpen(e) {
  7479. 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))
  7480. }
  7481. _stateScriptDataEscapedEndTagName(e) {
  7482. this.handleSpecialEndTag(e) && (this._emitChars("</"), this.state = Ko.SCRIPT_DATA_ESCAPED, this._stateScriptDataEscaped(e))
  7483. }
  7484. _stateScriptDataDoubleEscapeStart(e) {
  7485. if (this.preprocessor.startsWith(co, !1) && ec(this.preprocessor.peek(co.length))) {
  7486. this._emitCodePoint(e);
  7487. for (let e = 0; e < co.length; e++) this._emitCodePoint(this._consume());
  7488. this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED
  7489. } else this._ensureHibernation() || (this.state = Ko.SCRIPT_DATA_ESCAPED, this._stateScriptDataEscaped(e))
  7490. }
  7491. _stateScriptDataDoubleEscaped(e) {
  7492. switch (e) {
  7493. case io.HYPHEN_MINUS:
  7494. this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED_DASH, this._emitChars("-");
  7495. break;
  7496. case io.LESS_THAN_SIGN:
  7497. this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN, this._emitChars("<");
  7498. break;
  7499. case io.NULL:
  7500. this._err(Eo.unexpectedNullCharacter), this._emitChars("�");
  7501. break;
  7502. case io.EOF:
  7503. this._err(Eo.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
  7504. break;
  7505. default:
  7506. this._emitCodePoint(e)
  7507. }
  7508. }
  7509. _stateScriptDataDoubleEscapedDash(e) {
  7510. switch (e) {
  7511. case io.HYPHEN_MINUS:
  7512. this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH, this._emitChars("-");
  7513. break;
  7514. case io.LESS_THAN_SIGN:
  7515. this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN, this._emitChars("<");
  7516. break;
  7517. case io.NULL:
  7518. this._err(Eo.unexpectedNullCharacter), this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitChars("�");
  7519. break;
  7520. case io.EOF:
  7521. this._err(Eo.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
  7522. break;
  7523. default:
  7524. this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitCodePoint(e)
  7525. }
  7526. }
  7527. _stateScriptDataDoubleEscapedDashDash(e) {
  7528. switch (e) {
  7529. case io.HYPHEN_MINUS:
  7530. this._emitChars("-");
  7531. break;
  7532. case io.LESS_THAN_SIGN:
  7533. this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN, this._emitChars("<");
  7534. break;
  7535. case io.GREATER_THAN_SIGN:
  7536. this.state = Ko.SCRIPT_DATA, this._emitChars(">");
  7537. break;
  7538. case io.NULL:
  7539. this._err(Eo.unexpectedNullCharacter), this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitChars("�");
  7540. break;
  7541. case io.EOF:
  7542. this._err(Eo.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
  7543. break;
  7544. default:
  7545. this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitCodePoint(e)
  7546. }
  7547. }
  7548. _stateScriptDataDoubleEscapedLessThanSign(e) {
  7549. e === io.SOLIDUS ? (this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPE_END, this._emitChars("/")) : (this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED, this._stateScriptDataDoubleEscaped(e))
  7550. }
  7551. _stateScriptDataDoubleEscapeEnd(e) {
  7552. if (this.preprocessor.startsWith(co, !1) && ec(this.preprocessor.peek(co.length))) {
  7553. this._emitCodePoint(e);
  7554. for (let e = 0; e < co.length; e++) this._emitCodePoint(this._consume());
  7555. this.state = Ko.SCRIPT_DATA_ESCAPED
  7556. } else this._ensureHibernation() || (this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED, this._stateScriptDataDoubleEscaped(e))
  7557. }
  7558. _stateBeforeAttributeName(e) {
  7559. switch (e) {
  7560. case io.SPACE:
  7561. case io.LINE_FEED:
  7562. case io.TABULATION:
  7563. case io.FORM_FEED:
  7564. break;
  7565. case io.SOLIDUS:
  7566. case io.GREATER_THAN_SIGN:
  7567. case io.EOF:
  7568. this.state = Ko.AFTER_ATTRIBUTE_NAME, this._stateAfterAttributeName(e);
  7569. break;
  7570. case io.EQUALS_SIGN:
  7571. this._err(Eo.unexpectedEqualsSignBeforeAttributeName), this._createAttr("="), this.state = Ko.ATTRIBUTE_NAME;
  7572. break;
  7573. default:
  7574. this._createAttr(""), this.state = Ko.ATTRIBUTE_NAME, this._stateAttributeName(e)
  7575. }
  7576. }
  7577. _stateAttributeName(e) {
  7578. switch (e) {
  7579. case io.SPACE:
  7580. case io.LINE_FEED:
  7581. case io.TABULATION:
  7582. case io.FORM_FEED:
  7583. case io.SOLIDUS:
  7584. case io.GREATER_THAN_SIGN:
  7585. case io.EOF:
  7586. this._leaveAttrName(), this.state = Ko.AFTER_ATTRIBUTE_NAME, this._stateAfterAttributeName(e);
  7587. break;
  7588. case io.EQUALS_SIGN:
  7589. this._leaveAttrName(), this.state = Ko.BEFORE_ATTRIBUTE_VALUE;
  7590. break;
  7591. case io.QUOTATION_MARK:
  7592. case io.APOSTROPHE:
  7593. case io.LESS_THAN_SIGN:
  7594. this._err(Eo.unexpectedCharacterInAttributeName), this.currentAttr.name += String.fromCodePoint(e);
  7595. break;
  7596. case io.NULL:
  7597. this._err(Eo.unexpectedNullCharacter), this.currentAttr.name += "�";
  7598. break;
  7599. default:
  7600. this.currentAttr.name += String.fromCodePoint(Wo(e) ? Jo(e) : e)
  7601. }
  7602. }
  7603. _stateAfterAttributeName(e) {
  7604. switch (e) {
  7605. case io.SPACE:
  7606. case io.LINE_FEED:
  7607. case io.TABULATION:
  7608. case io.FORM_FEED:
  7609. break;
  7610. case io.SOLIDUS:
  7611. this.state = Ko.SELF_CLOSING_START_TAG;
  7612. break;
  7613. case io.EQUALS_SIGN:
  7614. this.state = Ko.BEFORE_ATTRIBUTE_VALUE;
  7615. break;
  7616. case io.GREATER_THAN_SIGN:
  7617. this.state = Ko.DATA, this.emitCurrentTagToken();
  7618. break;
  7619. case io.EOF:
  7620. this._err(Eo.eofInTag), this._emitEOFToken();
  7621. break;
  7622. default:
  7623. this._createAttr(""), this.state = Ko.ATTRIBUTE_NAME, this._stateAttributeName(e)
  7624. }
  7625. }
  7626. _stateBeforeAttributeValue(e) {
  7627. switch (e) {
  7628. case io.SPACE:
  7629. case io.LINE_FEED:
  7630. case io.TABULATION:
  7631. case io.FORM_FEED:
  7632. break;
  7633. case io.QUOTATION_MARK:
  7634. this.state = Ko.ATTRIBUTE_VALUE_DOUBLE_QUOTED;
  7635. break;
  7636. case io.APOSTROPHE:
  7637. this.state = Ko.ATTRIBUTE_VALUE_SINGLE_QUOTED;
  7638. break;
  7639. case io.GREATER_THAN_SIGN:
  7640. this._err(Eo.missingAttributeValue), this.state = Ko.DATA, this.emitCurrentTagToken();
  7641. break;
  7642. default:
  7643. this.state = Ko.ATTRIBUTE_VALUE_UNQUOTED, this._stateAttributeValueUnquoted(e)
  7644. }
  7645. }
  7646. _stateAttributeValueDoubleQuoted(e) {
  7647. switch (e) {
  7648. case io.QUOTATION_MARK:
  7649. this.state = Ko.AFTER_ATTRIBUTE_VALUE_QUOTED;
  7650. break;
  7651. case io.AMPERSAND:
  7652. this.returnState = Ko.ATTRIBUTE_VALUE_DOUBLE_QUOTED, this.state = Ko.CHARACTER_REFERENCE;
  7653. break;
  7654. case io.NULL:
  7655. this._err(Eo.unexpectedNullCharacter), this.currentAttr.value += "�";
  7656. break;
  7657. case io.EOF:
  7658. this._err(Eo.eofInTag), this._emitEOFToken();
  7659. break;
  7660. default:
  7661. this.currentAttr.value += String.fromCodePoint(e)
  7662. }
  7663. }
  7664. _stateAttributeValueSingleQuoted(e) {
  7665. switch (e) {
  7666. case io.APOSTROPHE:
  7667. this.state = Ko.AFTER_ATTRIBUTE_VALUE_QUOTED;
  7668. break;
  7669. case io.AMPERSAND:
  7670. this.returnState = Ko.ATTRIBUTE_VALUE_SINGLE_QUOTED, this.state = Ko.CHARACTER_REFERENCE;
  7671. break;
  7672. case io.NULL:
  7673. this._err(Eo.unexpectedNullCharacter), this.currentAttr.value += "�";
  7674. break;
  7675. case io.EOF:
  7676. this._err(Eo.eofInTag), this._emitEOFToken();
  7677. break;
  7678. default:
  7679. this.currentAttr.value += String.fromCodePoint(e)
  7680. }
  7681. }
  7682. _stateAttributeValueUnquoted(e) {
  7683. switch (e) {
  7684. case io.SPACE:
  7685. case io.LINE_FEED:
  7686. case io.TABULATION:
  7687. case io.FORM_FEED:
  7688. this._leaveAttrValue(), this.state = Ko.BEFORE_ATTRIBUTE_NAME;
  7689. break;
  7690. case io.AMPERSAND:
  7691. this.returnState = Ko.ATTRIBUTE_VALUE_UNQUOTED, this.state = Ko.CHARACTER_REFERENCE;
  7692. break;
  7693. case io.GREATER_THAN_SIGN:
  7694. this._leaveAttrValue(), this.state = Ko.DATA, this.emitCurrentTagToken();
  7695. break;
  7696. case io.NULL:
  7697. this._err(Eo.unexpectedNullCharacter), this.currentAttr.value += "�";
  7698. break;
  7699. case io.QUOTATION_MARK:
  7700. case io.APOSTROPHE:
  7701. case io.LESS_THAN_SIGN:
  7702. case io.EQUALS_SIGN:
  7703. case io.GRAVE_ACCENT:
  7704. this._err(Eo.unexpectedCharacterInUnquotedAttributeValue), this.currentAttr.value += String.fromCodePoint(e);
  7705. break;
  7706. case io.EOF:
  7707. this._err(Eo.eofInTag), this._emitEOFToken();
  7708. break;
  7709. default:
  7710. this.currentAttr.value += String.fromCodePoint(e)
  7711. }
  7712. }
  7713. _stateAfterAttributeValueQuoted(e) {
  7714. switch (e) {
  7715. case io.SPACE:
  7716. case io.LINE_FEED:
  7717. case io.TABULATION:
  7718. case io.FORM_FEED:
  7719. this._leaveAttrValue(), this.state = Ko.BEFORE_ATTRIBUTE_NAME;
  7720. break;
  7721. case io.SOLIDUS:
  7722. this._leaveAttrValue(), this.state = Ko.SELF_CLOSING_START_TAG;
  7723. break;
  7724. case io.GREATER_THAN_SIGN:
  7725. this._leaveAttrValue(), this.state = Ko.DATA, this.emitCurrentTagToken();
  7726. break;
  7727. case io.EOF:
  7728. this._err(Eo.eofInTag), this._emitEOFToken();
  7729. break;
  7730. default:
  7731. this._err(Eo.missingWhitespaceBetweenAttributes), this.state = Ko.BEFORE_ATTRIBUTE_NAME, this._stateBeforeAttributeName(e)
  7732. }
  7733. }
  7734. _stateSelfClosingStartTag(e) {
  7735. switch (e) {
  7736. case io.GREATER_THAN_SIGN:
  7737. this.currentToken.selfClosing = !0, this.state = Ko.DATA, this.emitCurrentTagToken();
  7738. break;
  7739. case io.EOF:
  7740. this._err(Eo.eofInTag), this._emitEOFToken();
  7741. break;
  7742. default:
  7743. this._err(Eo.unexpectedSolidusInTag), this.state = Ko.BEFORE_ATTRIBUTE_NAME, this._stateBeforeAttributeName(e)
  7744. }
  7745. }
  7746. _stateBogusComment(e) {
  7747. const t = this.currentToken;
  7748. switch (e) {
  7749. case io.GREATER_THAN_SIGN:
  7750. this.state = Ko.DATA, this.emitCurrentComment(t);
  7751. break;
  7752. case io.EOF:
  7753. this.emitCurrentComment(t), this._emitEOFToken();
  7754. break;
  7755. case io.NULL:
  7756. this._err(Eo.unexpectedNullCharacter), t.data += "�";
  7757. break;
  7758. default:
  7759. t.data += String.fromCodePoint(e)
  7760. }
  7761. }
  7762. _stateMarkupDeclarationOpen(e) {
  7763. 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))
  7764. }
  7765. _stateCommentStart(e) {
  7766. switch (e) {
  7767. case io.HYPHEN_MINUS:
  7768. this.state = Ko.COMMENT_START_DASH;
  7769. break;
  7770. case io.GREATER_THAN_SIGN:
  7771. {
  7772. this._err(Eo.abruptClosingOfEmptyComment), this.state = Ko.DATA;
  7773. const e = this.currentToken;
  7774. this.emitCurrentComment(e);
  7775. break
  7776. }
  7777. default:
  7778. this.state = Ko.COMMENT, this._stateComment(e)
  7779. }
  7780. }
  7781. _stateCommentStartDash(e) {
  7782. const t = this.currentToken;
  7783. switch (e) {
  7784. case io.HYPHEN_MINUS:
  7785. this.state = Ko.COMMENT_END;
  7786. break;
  7787. case io.GREATER_THAN_SIGN:
  7788. this._err(Eo.abruptClosingOfEmptyComment), this.state = Ko.DATA, this.emitCurrentComment(t);
  7789. break;
  7790. case io.EOF:
  7791. this._err(Eo.eofInComment), this.emitCurrentComment(t), this._emitEOFToken();
  7792. break;
  7793. default:
  7794. t.data += "-", this.state = Ko.COMMENT, this._stateComment(e)
  7795. }
  7796. }
  7797. _stateComment(e) {
  7798. const t = this.currentToken;
  7799. switch (e) {
  7800. case io.HYPHEN_MINUS:
  7801. this.state = Ko.COMMENT_END_DASH;
  7802. break;
  7803. case io.LESS_THAN_SIGN:
  7804. t.data += "<", this.state = Ko.COMMENT_LESS_THAN_SIGN;
  7805. break;
  7806. case io.NULL:
  7807. this._err(Eo.unexpectedNullCharacter), t.data += "�";
  7808. break;
  7809. case io.EOF:
  7810. this._err(Eo.eofInComment), this.emitCurrentComment(t), this._emitEOFToken();
  7811. break;
  7812. default:
  7813. t.data += String.fromCodePoint(e)
  7814. }
  7815. }
  7816. _stateCommentLessThanSign(e) {
  7817. const t = this.currentToken;
  7818. switch (e) {
  7819. case io.EXCLAMATION_MARK:
  7820. t.data += "!", this.state = Ko.COMMENT_LESS_THAN_SIGN_BANG;
  7821. break;
  7822. case io.LESS_THAN_SIGN:
  7823. t.data += "<";
  7824. break;
  7825. default:
  7826. this.state = Ko.COMMENT, this._stateComment(e)
  7827. }
  7828. }
  7829. _stateCommentLessThanSignBang(e) {
  7830. e === io.HYPHEN_MINUS ? this.state = Ko.COMMENT_LESS_THAN_SIGN_BANG_DASH : (this.state = Ko.COMMENT, this._stateComment(e))
  7831. }
  7832. _stateCommentLessThanSignBangDash(e) {
  7833. e === io.HYPHEN_MINUS ? this.state = Ko.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH : (this.state = Ko.COMMENT_END_DASH, this._stateCommentEndDash(e))
  7834. }
  7835. _stateCommentLessThanSignBangDashDash(e) {
  7836. e !== io.GREATER_THAN_SIGN && e !== io.EOF && this._err(Eo.nestedComment), this.state = Ko.COMMENT_END, this._stateCommentEnd(e)
  7837. }
  7838. _stateCommentEndDash(e) {
  7839. const t = this.currentToken;
  7840. switch (e) {
  7841. case io.HYPHEN_MINUS:
  7842. this.state = Ko.COMMENT_END;
  7843. break;
  7844. case io.EOF:
  7845. this._err(Eo.eofInComment), this.emitCurrentComment(t), this._emitEOFToken();
  7846. break;
  7847. default:
  7848. t.data += "-", this.state = Ko.COMMENT, this._stateComment(e)
  7849. }
  7850. }
  7851. _stateCommentEnd(e) {
  7852. const t = this.currentToken;
  7853. switch (e) {
  7854. case io.GREATER_THAN_SIGN:
  7855. this.state = Ko.DATA, this.emitCurrentComment(t);
  7856. break;
  7857. case io.EXCLAMATION_MARK:
  7858. this.state = Ko.COMMENT_END_BANG;
  7859. break;
  7860. case io.HYPHEN_MINUS:
  7861. t.data += "-";
  7862. break;
  7863. case io.EOF:
  7864. this._err(Eo.eofInComment), this.emitCurrentComment(t), this._emitEOFToken();
  7865. break;
  7866. default:
  7867. t.data += "--", this.state = Ko.COMMENT, this._stateComment(e)
  7868. }
  7869. }
  7870. _stateCommentEndBang(e) {
  7871. const t = this.currentToken;
  7872. switch (e) {
  7873. case io.HYPHEN_MINUS:
  7874. t.data += "--!", this.state = Ko.COMMENT_END_DASH;
  7875. break;
  7876. case io.GREATER_THAN_SIGN:
  7877. this._err(Eo.incorrectlyClosedComment), this.state = Ko.DATA, this.emitCurrentComment(t);
  7878. break;
  7879. case io.EOF:
  7880. this._err(Eo.eofInComment), this.emitCurrentComment(t), this._emitEOFToken();
  7881. break;
  7882. default:
  7883. t.data += "--!", this.state = Ko.COMMENT, this._stateComment(e)
  7884. }
  7885. }
  7886. _stateDoctype(e) {
  7887. switch (e) {
  7888. case io.SPACE:
  7889. case io.LINE_FEED:
  7890. case io.TABULATION:
  7891. case io.FORM_FEED:
  7892. this.state = Ko.BEFORE_DOCTYPE_NAME;
  7893. break;
  7894. case io.GREATER_THAN_SIGN:
  7895. this.state = Ko.BEFORE_DOCTYPE_NAME, this._stateBeforeDoctypeName(e);
  7896. break;
  7897. case io.EOF:
  7898. {
  7899. this._err(Eo.eofInDoctype), this._createDoctypeToken(null);
  7900. const e = this.currentToken;
  7901. e.forceQuirks = !0, this.emitCurrentDoctype(e), this._emitEOFToken();
  7902. break
  7903. }
  7904. default:
  7905. this._err(Eo.missingWhitespaceBeforeDoctypeName), this.state = Ko.BEFORE_DOCTYPE_NAME, this._stateBeforeDoctypeName(e)
  7906. }
  7907. }
  7908. _stateBeforeDoctypeName(e) {
  7909. if (Wo(e)) this._createDoctypeToken(String.fromCharCode(Jo(e))), this.state = Ko.DOCTYPE_NAME;
  7910. else switch (e) {
  7911. case io.SPACE:
  7912. case io.LINE_FEED:
  7913. case io.TABULATION:
  7914. case io.FORM_FEED:
  7915. break;
  7916. case io.NULL:
  7917. this._err(Eo.unexpectedNullCharacter), this._createDoctypeToken("�"), this.state = Ko.DOCTYPE_NAME;
  7918. break;
  7919. case io.GREATER_THAN_SIGN:
  7920. {
  7921. this._err(Eo.missingDoctypeName), this._createDoctypeToken(null);
  7922. const e = this.currentToken;
  7923. e.forceQuirks = !0, this.emitCurrentDoctype(e), this.state = Ko.DATA;
  7924. break
  7925. }
  7926. case io.EOF:
  7927. {
  7928. this._err(Eo.eofInDoctype), this._createDoctypeToken(null);
  7929. const e = this.currentToken;
  7930. e.forceQuirks = !0, this.emitCurrentDoctype(e), this._emitEOFToken();
  7931. break
  7932. }
  7933. default:
  7934. this._createDoctypeToken(String.fromCodePoint(e)), this.state = Ko.DOCTYPE_NAME
  7935. }
  7936. }
  7937. _stateDoctypeName(e) {
  7938. const t = this.currentToken;
  7939. switch (e) {
  7940. case io.SPACE:
  7941. case io.LINE_FEED:
  7942. case io.TABULATION:
  7943. case io.FORM_FEED:
  7944. this.state = Ko.AFTER_DOCTYPE_NAME;
  7945. break;
  7946. case io.GREATER_THAN_SIGN:
  7947. this.state = Ko.DATA, this.emitCurrentDoctype(t);
  7948. break;
  7949. case io.NULL:
  7950. this._err(Eo.unexpectedNullCharacter), t.name += "�";
  7951. break;
  7952. case io.EOF:
  7953. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  7954. break;
  7955. default:
  7956. t.name += String.fromCodePoint(Wo(e) ? Jo(e) : e)
  7957. }
  7958. }
  7959. _stateAfterDoctypeName(e) {
  7960. const t = this.currentToken;
  7961. switch (e) {
  7962. case io.SPACE:
  7963. case io.LINE_FEED:
  7964. case io.TABULATION:
  7965. case io.FORM_FEED:
  7966. break;
  7967. case io.GREATER_THAN_SIGN:
  7968. this.state = Ko.DATA, this.emitCurrentDoctype(t);
  7969. break;
  7970. case io.EOF:
  7971. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  7972. break;
  7973. default:
  7974. 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))
  7975. }
  7976. }
  7977. _stateAfterDoctypePublicKeyword(e) {
  7978. const t = this.currentToken;
  7979. switch (e) {
  7980. case io.SPACE:
  7981. case io.LINE_FEED:
  7982. case io.TABULATION:
  7983. case io.FORM_FEED:
  7984. this.state = Ko.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;
  7985. break;
  7986. case io.QUOTATION_MARK:
  7987. this._err(Eo.missingWhitespaceAfterDoctypePublicKeyword), t.publicId = "", this.state = Ko.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;
  7988. break;
  7989. case io.APOSTROPHE:
  7990. this._err(Eo.missingWhitespaceAfterDoctypePublicKeyword), t.publicId = "", this.state = Ko.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;
  7991. break;
  7992. case io.GREATER_THAN_SIGN:
  7993. this._err(Eo.missingDoctypePublicIdentifier), t.forceQuirks = !0, this.state = Ko.DATA, this.emitCurrentDoctype(t);
  7994. break;
  7995. case io.EOF:
  7996. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  7997. break;
  7998. default:
  7999. this._err(Eo.missingQuoteBeforeDoctypePublicIdentifier), t.forceQuirks = !0, this.state = Ko.BOGUS_DOCTYPE, this._stateBogusDoctype(e)
  8000. }
  8001. }
  8002. _stateBeforeDoctypePublicIdentifier(e) {
  8003. const t = this.currentToken;
  8004. switch (e) {
  8005. case io.SPACE:
  8006. case io.LINE_FEED:
  8007. case io.TABULATION:
  8008. case io.FORM_FEED:
  8009. break;
  8010. case io.QUOTATION_MARK:
  8011. t.publicId = "", this.state = Ko.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;
  8012. break;
  8013. case io.APOSTROPHE:
  8014. t.publicId = "", this.state = Ko.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;
  8015. break;
  8016. case io.GREATER_THAN_SIGN:
  8017. this._err(Eo.missingDoctypePublicIdentifier), t.forceQuirks = !0, this.state = Ko.DATA, this.emitCurrentDoctype(t);
  8018. break;
  8019. case io.EOF:
  8020. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  8021. break;
  8022. default:
  8023. this._err(Eo.missingQuoteBeforeDoctypePublicIdentifier), t.forceQuirks = !0, this.state = Ko.BOGUS_DOCTYPE, this._stateBogusDoctype(e)
  8024. }
  8025. }
  8026. _stateDoctypePublicIdentifierDoubleQuoted(e) {
  8027. const t = this.currentToken;
  8028. switch (e) {
  8029. case io.QUOTATION_MARK:
  8030. this.state = Ko.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;
  8031. break;
  8032. case io.NULL:
  8033. this._err(Eo.unexpectedNullCharacter), t.publicId += "�";
  8034. break;
  8035. case io.GREATER_THAN_SIGN:
  8036. this._err(Eo.abruptDoctypePublicIdentifier), t.forceQuirks = !0, this.emitCurrentDoctype(t), this.state = Ko.DATA;
  8037. break;
  8038. case io.EOF:
  8039. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  8040. break;
  8041. default:
  8042. t.publicId += String.fromCodePoint(e)
  8043. }
  8044. }
  8045. _stateDoctypePublicIdentifierSingleQuoted(e) {
  8046. const t = this.currentToken;
  8047. switch (e) {
  8048. case io.APOSTROPHE:
  8049. this.state = Ko.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;
  8050. break;
  8051. case io.NULL:
  8052. this._err(Eo.unexpectedNullCharacter), t.publicId += "�";
  8053. break;
  8054. case io.GREATER_THAN_SIGN:
  8055. this._err(Eo.abruptDoctypePublicIdentifier), t.forceQuirks = !0, this.emitCurrentDoctype(t), this.state = Ko.DATA;
  8056. break;
  8057. case io.EOF:
  8058. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  8059. break;
  8060. default:
  8061. t.publicId += String.fromCodePoint(e)
  8062. }
  8063. }
  8064. _stateAfterDoctypePublicIdentifier(e) {
  8065. const t = this.currentToken;
  8066. switch (e) {
  8067. case io.SPACE:
  8068. case io.LINE_FEED:
  8069. case io.TABULATION:
  8070. case io.FORM_FEED:
  8071. this.state = Ko.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;
  8072. break;
  8073. case io.GREATER_THAN_SIGN:
  8074. this.state = Ko.DATA, this.emitCurrentDoctype(t);
  8075. break;
  8076. case io.QUOTATION_MARK:
  8077. this._err(Eo.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers), t.systemId = "", this.state = Ko.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;
  8078. break;
  8079. case io.APOSTROPHE:
  8080. this._err(Eo.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers), t.systemId = "", this.state = Ko.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;
  8081. break;
  8082. case io.EOF:
  8083. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  8084. break;
  8085. default:
  8086. this._err(Eo.missingQuoteBeforeDoctypeSystemIdentifier), t.forceQuirks = !0, this.state = Ko.BOGUS_DOCTYPE, this._stateBogusDoctype(e)
  8087. }
  8088. }
  8089. _stateBetweenDoctypePublicAndSystemIdentifiers(e) {
  8090. const t = this.currentToken;
  8091. switch (e) {
  8092. case io.SPACE:
  8093. case io.LINE_FEED:
  8094. case io.TABULATION:
  8095. case io.FORM_FEED:
  8096. break;
  8097. case io.GREATER_THAN_SIGN:
  8098. this.emitCurrentDoctype(t), this.state = Ko.DATA;
  8099. break;
  8100. case io.QUOTATION_MARK:
  8101. t.systemId = "", this.state = Ko.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;
  8102. break;
  8103. case io.APOSTROPHE:
  8104. t.systemId = "", this.state = Ko.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;
  8105. break;
  8106. case io.EOF:
  8107. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  8108. break;
  8109. default:
  8110. this._err(Eo.missingQuoteBeforeDoctypeSystemIdentifier), t.forceQuirks = !0, this.state = Ko.BOGUS_DOCTYPE, this._stateBogusDoctype(e)
  8111. }
  8112. }
  8113. _stateAfterDoctypeSystemKeyword(e) {
  8114. const t = this.currentToken;
  8115. switch (e) {
  8116. case io.SPACE:
  8117. case io.LINE_FEED:
  8118. case io.TABULATION:
  8119. case io.FORM_FEED:
  8120. this.state = Ko.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;
  8121. break;
  8122. case io.QUOTATION_MARK:
  8123. this._err(Eo.missingWhitespaceAfterDoctypeSystemKeyword), t.systemId = "", this.state = Ko.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;
  8124. break;
  8125. case io.APOSTROPHE:
  8126. this._err(Eo.missingWhitespaceAfterDoctypeSystemKeyword), t.systemId = "", this.state = Ko.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;
  8127. break;
  8128. case io.GREATER_THAN_SIGN:
  8129. this._err(Eo.missingDoctypeSystemIdentifier), t.forceQuirks = !0, this.state = Ko.DATA, this.emitCurrentDoctype(t);
  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.missingQuoteBeforeDoctypeSystemIdentifier), t.forceQuirks = !0, this.state = Ko.BOGUS_DOCTYPE, this._stateBogusDoctype(e)
  8136. }
  8137. }
  8138. _stateBeforeDoctypeSystemIdentifier(e) {
  8139. const t = this.currentToken;
  8140. switch (e) {
  8141. case io.SPACE:
  8142. case io.LINE_FEED:
  8143. case io.TABULATION:
  8144. case io.FORM_FEED:
  8145. break;
  8146. case io.QUOTATION_MARK:
  8147. t.systemId = "", this.state = Ko.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;
  8148. break;
  8149. case io.APOSTROPHE:
  8150. t.systemId = "", this.state = Ko.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;
  8151. break;
  8152. case io.GREATER_THAN_SIGN:
  8153. this._err(Eo.missingDoctypeSystemIdentifier), t.forceQuirks = !0, this.state = Ko.DATA, this.emitCurrentDoctype(t);
  8154. break;
  8155. case io.EOF:
  8156. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  8157. break;
  8158. default:
  8159. this._err(Eo.missingQuoteBeforeDoctypeSystemIdentifier), t.forceQuirks = !0, this.state = Ko.BOGUS_DOCTYPE, this._stateBogusDoctype(e)
  8160. }
  8161. }
  8162. _stateDoctypeSystemIdentifierDoubleQuoted(e) {
  8163. const t = this.currentToken;
  8164. switch (e) {
  8165. case io.QUOTATION_MARK:
  8166. this.state = Ko.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;
  8167. break;
  8168. case io.NULL:
  8169. this._err(Eo.unexpectedNullCharacter), t.systemId += "�";
  8170. break;
  8171. case io.GREATER_THAN_SIGN:
  8172. this._err(Eo.abruptDoctypeSystemIdentifier), t.forceQuirks = !0, this.emitCurrentDoctype(t), this.state = Ko.DATA;
  8173. break;
  8174. case io.EOF:
  8175. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  8176. break;
  8177. default:
  8178. t.systemId += String.fromCodePoint(e)
  8179. }
  8180. }
  8181. _stateDoctypeSystemIdentifierSingleQuoted(e) {
  8182. const t = this.currentToken;
  8183. switch (e) {
  8184. case io.APOSTROPHE:
  8185. this.state = Ko.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;
  8186. break;
  8187. case io.NULL:
  8188. this._err(Eo.unexpectedNullCharacter), t.systemId += "�";
  8189. break;
  8190. case io.GREATER_THAN_SIGN:
  8191. this._err(Eo.abruptDoctypeSystemIdentifier), t.forceQuirks = !0, this.emitCurrentDoctype(t), this.state = Ko.DATA;
  8192. break;
  8193. case io.EOF:
  8194. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  8195. break;
  8196. default:
  8197. t.systemId += String.fromCodePoint(e)
  8198. }
  8199. }
  8200. _stateAfterDoctypeSystemIdentifier(e) {
  8201. const t = this.currentToken;
  8202. switch (e) {
  8203. case io.SPACE:
  8204. case io.LINE_FEED:
  8205. case io.TABULATION:
  8206. case io.FORM_FEED:
  8207. break;
  8208. case io.GREATER_THAN_SIGN:
  8209. this.emitCurrentDoctype(t), this.state = Ko.DATA;
  8210. break;
  8211. case io.EOF:
  8212. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  8213. break;
  8214. default:
  8215. this._err(Eo.unexpectedCharacterAfterDoctypeSystemIdentifier), this.state = Ko.BOGUS_DOCTYPE, this._stateBogusDoctype(e)
  8216. }
  8217. }
  8218. _stateBogusDoctype(e) {
  8219. const t = this.currentToken;
  8220. switch (e) {
  8221. case io.GREATER_THAN_SIGN:
  8222. this.emitCurrentDoctype(t), this.state = Ko.DATA;
  8223. break;
  8224. case io.NULL:
  8225. this._err(Eo.unexpectedNullCharacter);
  8226. break;
  8227. case io.EOF:
  8228. this.emitCurrentDoctype(t), this._emitEOFToken()
  8229. }
  8230. }
  8231. _stateCdataSection(e) {
  8232. switch (e) {
  8233. case io.RIGHT_SQUARE_BRACKET:
  8234. this.state = Ko.CDATA_SECTION_BRACKET;
  8235. break;
  8236. case io.EOF:
  8237. this._err(Eo.eofInCdata), this._emitEOFToken();
  8238. break;
  8239. default:
  8240. this._emitCodePoint(e)
  8241. }
  8242. }
  8243. _stateCdataSectionBracket(e) {
  8244. e === io.RIGHT_SQUARE_BRACKET ? this.state = Ko.CDATA_SECTION_END : (this._emitChars("]"), this.state = Ko.CDATA_SECTION, this._stateCdataSection(e))
  8245. }
  8246. _stateCdataSectionEnd(e) {
  8247. switch (e) {
  8248. case io.GREATER_THAN_SIGN:
  8249. this.state = Ko.DATA;
  8250. break;
  8251. case io.RIGHT_SQUARE_BRACKET:
  8252. this._emitChars("]");
  8253. break;
  8254. default:
  8255. this._emitChars("]]"), this.state = Ko.CDATA_SECTION, this._stateCdataSection(e)
  8256. }
  8257. }
  8258. _stateCharacterReference(e) {
  8259. 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))
  8260. }
  8261. _stateNamedCharacterReference(e) {
  8262. const t = this._matchNamedCharacterReference(e);
  8263. if (this._ensureHibernation());
  8264. else if (t) {
  8265. for (let e = 0; e < t.length; e++) this._flushCodePointConsumedAsCharacterReference(t[e]);
  8266. this.state = this.returnState
  8267. } else this._flushCodePointConsumedAsCharacterReference(io.AMPERSAND), this.state = Ko.AMBIGUOUS_AMPERSAND
  8268. }
  8269. _stateAmbiguousAmpersand(e) {
  8270. Xo(e) ? this._flushCodePointConsumedAsCharacterReference(e) : (e === io.SEMICOLON && this._err(Eo.unknownNamedCharacterReference), this._reconsumeInState(this.returnState, e))
  8271. }
  8272. _stateNumericCharacterReference(e) {
  8273. 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))
  8274. }
  8275. _stateHexademicalCharacterReferenceStart(e) {
  8276. ! function(e) {
  8277. return Vo(e) || $o(e) || zo(e)
  8278. }(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))
  8279. }
  8280. _stateHexademicalCharacterReference(e) {
  8281. $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))
  8282. }
  8283. _stateDecimalCharacterReference(e) {
  8284. 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))
  8285. }
  8286. _stateNumericCharacterReferenceEnd(e) {
  8287. if (this.charRefCode === io.NULL) this._err(Eo.nullCharacterReference), this.charRefCode = io.REPLACEMENT_CHARACTER;
  8288. else if (this.charRefCode > 1114111) this._err(Eo.characterReferenceOutsideUnicodeRange), this.charRefCode = io.REPLACEMENT_CHARACTER;
  8289. else if (uo(this.charRefCode)) this._err(Eo.surrogateCharacterReference), this.charRefCode = io.REPLACEMENT_CHARACTER;
  8290. else if (fo(this.charRefCode)) this._err(Eo.noncharacterCharacterReference);
  8291. else if (po(this.charRefCode) || this.charRefCode === io.CARRIAGE_RETURN) {
  8292. this._err(Eo.controlCharacterReference);
  8293. const e = qo.get(this.charRefCode);
  8294. void 0 !== e && (this.charRefCode = e)
  8295. }
  8296. this._flushCodePointConsumedAsCharacterReference(this.charRefCode), this._reconsumeInState(this.returnState, e)
  8297. }
  8298. }
  8299. const nc = new Set([Po.DD, Po.DT, Po.LI, Po.OPTGROUP, Po.OPTION, Po.P, Po.RB, Po.RP, Po.RT, Po.RTC]), rc = new Set([...nc, Po.CAPTION, Po.COLGROUP, Po.TBODY, Po.TD, Po.TFOOT, Po.TH, Po.THEAD, Po.TR]), ic = new Map([
  8300. [Po.APPLET, vo.HTML],
  8301. [Po.CAPTION, vo.HTML],
  8302. [Po.HTML, vo.HTML],
  8303. [Po.MARQUEE, vo.HTML],
  8304. [Po.OBJECT, vo.HTML],
  8305. [Po.TABLE, vo.HTML],
  8306. [Po.TD, vo.HTML],
  8307. [Po.TEMPLATE, vo.HTML],
  8308. [Po.TH, vo.HTML],
  8309. [Po.ANNOTATION_XML, vo.MATHML],
  8310. [Po.MI, vo.MATHML],
  8311. [Po.MN, vo.MATHML],
  8312. [Po.MO, vo.MATHML],
  8313. [Po.MS, vo.MATHML],
  8314. [Po.MTEXT, vo.MATHML],
  8315. [Po.DESC, vo.SVG],
  8316. [Po.FOREIGN_OBJECT, vo.SVG],
  8317. [Po.TITLE, vo.SVG]
  8318. ]), sc = [Po.H1, Po.H2, Po.H3, Po.H4, Po.H5, Po.H6], ac = [Po.TR, Po.TEMPLATE, Po.HTML], oc = [Po.TBODY, Po.TFOOT, Po.THEAD, Po.TEMPLATE, Po.HTML], cc = [Po.TABLE, Po.TEMPLATE, Po.HTML], lc = [Po.TD, Po.TH];
  8319. class hc {
  8320. constructor(e, t, n) {
  8321. this.treeAdapter = t, this.handler = n, this.items = [], this.tagIDs = [], this.stackTop = -1, this.tmplCount = 0, this.currentTagId = Po.UNKNOWN, this.current = e
  8322. }
  8323. get currentTmplContentOrNode() {
  8324. return this._isInTemplate() ? this.treeAdapter.getTemplateContent(this.current) : this.current
  8325. }
  8326. _indexOf(e) {
  8327. return this.items.lastIndexOf(e, this.stackTop)
  8328. }
  8329. _isInTemplate() {
  8330. return this.currentTagId === Po.TEMPLATE && this.treeAdapter.getNamespaceURI(this.current) === vo.HTML
  8331. }
  8332. _updateCurrentElement() {
  8333. this.current = this.items[this.stackTop], this.currentTagId = this.tagIDs[this.stackTop]
  8334. }
  8335. push(e, t) {
  8336. 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)
  8337. }
  8338. pop() {
  8339. const e = this.current;
  8340. this.tmplCount > 0 && this._isInTemplate() && this.tmplCount--, this.stackTop--, this._updateCurrentElement(), this.handler.onItemPop(e, !0)
  8341. }
  8342. replace(e, t) {
  8343. const n = this._indexOf(e);
  8344. this.items[n] = t, n === this.stackTop && (this.current = t)
  8345. }
  8346. insertAfter(e, t, n) {
  8347. const r = this._indexOf(e) + 1;
  8348. 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)
  8349. }
  8350. popUntilTagNamePopped(e) {
  8351. let t = this.stackTop + 1;
  8352. do {
  8353. t = this.tagIDs.lastIndexOf(e, t - 1)
  8354. } while (t > 0 && this.treeAdapter.getNamespaceURI(this.items[t]) !== vo.HTML);
  8355. this.shortenToLength(t < 0 ? 0 : t)
  8356. }
  8357. shortenToLength(e) {
  8358. for (; this.stackTop >= e;) {
  8359. const t = this.current;
  8360. this.tmplCount > 0 && this._isInTemplate() && (this.tmplCount -= 1), this.stackTop--, this._updateCurrentElement(), this.handler.onItemPop(t, this.stackTop < e)
  8361. }
  8362. }
  8363. popUntilElementPopped(e) {
  8364. const t = this._indexOf(e);
  8365. this.shortenToLength(t < 0 ? 0 : t)
  8366. }
  8367. popUntilPopped(e, t) {
  8368. const n = this._indexOfTagNames(e, t);
  8369. this.shortenToLength(n < 0 ? 0 : n)
  8370. }
  8371. popUntilNumberedHeaderPopped() {
  8372. this.popUntilPopped(sc, vo.HTML)
  8373. }
  8374. popUntilTableCellPopped() {
  8375. this.popUntilPopped(lc, vo.HTML)
  8376. }
  8377. popAllUpToHtmlElement() {
  8378. this.tmplCount = 0, this.shortenToLength(1)
  8379. }
  8380. _indexOfTagNames(e, t) {
  8381. for (let n = this.stackTop; n >= 0; n--) if (e.includes(this.tagIDs[n]) && this.treeAdapter.getNamespaceURI(this.items[n]) === t) return n;
  8382. return -1
  8383. }
  8384. clearBackTo(e, t) {
  8385. const n = this._indexOfTagNames(e, t);
  8386. this.shortenToLength(n + 1)
  8387. }
  8388. clearBackToTableContext() {
  8389. this.clearBackTo(cc, vo.HTML)
  8390. }
  8391. clearBackToTableBodyContext() {
  8392. this.clearBackTo(oc, vo.HTML)
  8393. }
  8394. clearBackToTableRowContext() {
  8395. this.clearBackTo(ac, vo.HTML)
  8396. }
  8397. remove(e) {
  8398. const t = this._indexOf(e);
  8399. 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)))
  8400. }
  8401. tryPeekProperlyNestedBodyElement() {
  8402. return this.stackTop >= 1 && this.tagIDs[1] === Po.BODY ? this.items[1] : null
  8403. }
  8404. contains(e) {
  8405. return this._indexOf(e) > -1
  8406. }
  8407. getCommonAncestor(e) {
  8408. const t = this._indexOf(e) - 1;
  8409. return t >= 0 ? this.items[t] : null
  8410. }
  8411. isRootHtmlElementCurrent() {
  8412. return 0 === this.stackTop && this.tagIDs[0] === Po.HTML
  8413. }
  8414. hasInScope(e) {
  8415. for (let t = this.stackTop; t >= 0; t--) {
  8416. const n = this.tagIDs[t], r = this.treeAdapter.getNamespaceURI(this.items[t]);
  8417. if (n === e && r === vo.HTML) return !0;
  8418. if (ic.get(n) === r) return !1
  8419. }
  8420. return !0
  8421. }
  8422. hasNumberedHeaderInScope() {
  8423. for (let e = this.stackTop; e >= 0; e--) {
  8424. const t = this.tagIDs[e], n = this.treeAdapter.getNamespaceURI(this.items[e]);
  8425. if (Go(t) && n === vo.HTML) return !0;
  8426. if (ic.get(t) === n) return !1
  8427. }
  8428. return !0
  8429. }
  8430. hasInListItemScope(e) {
  8431. for (let t = this.stackTop; t >= 0; t--) {
  8432. const n = this.tagIDs[t], r = this.treeAdapter.getNamespaceURI(this.items[t]);
  8433. if (n === e && r === vo.HTML) return !0;
  8434. if ((n === Po.UL || n === Po.OL) && r === vo.HTML || ic.get(n) === r) return !1
  8435. }
  8436. return !0
  8437. }
  8438. hasInButtonScope(e) {
  8439. for (let t = this.stackTop; t >= 0; t--) {
  8440. const n = this.tagIDs[t], r = this.treeAdapter.getNamespaceURI(this.items[t]);
  8441. if (n === e && r === vo.HTML) return !0;
  8442. if (n === Po.BUTTON && r === vo.HTML || ic.get(n) === r) return !1
  8443. }
  8444. return !0
  8445. }
  8446. hasInTableScope(e) {
  8447. for (let t = this.stackTop; t >= 0; t--) {
  8448. const n = this.tagIDs[t];
  8449. if (this.treeAdapter.getNamespaceURI(this.items[t]) === vo.HTML) {
  8450. if (n === e) return !0;
  8451. if (n === Po.TABLE || n === Po.TEMPLATE || n === Po.HTML) return !1
  8452. }
  8453. }
  8454. return !0
  8455. }
  8456. hasTableBodyContextInTableScope() {
  8457. for (let e = this.stackTop; e >= 0; e--) {
  8458. const t = this.tagIDs[e];
  8459. if (this.treeAdapter.getNamespaceURI(this.items[e]) === vo.HTML) {
  8460. if (t === Po.TBODY || t === Po.THEAD || t === Po.TFOOT) return !0;
  8461. if (t === Po.TABLE || t === Po.HTML) return !1
  8462. }
  8463. }
  8464. return !0
  8465. }
  8466. hasInSelectScope(e) {
  8467. for (let t = this.stackTop; t >= 0; t--) {
  8468. const n = this.tagIDs[t];
  8469. if (this.treeAdapter.getNamespaceURI(this.items[t]) === vo.HTML) {
  8470. if (n === e) return !0;
  8471. if (n !== Po.OPTION && n !== Po.OPTGROUP) return !1
  8472. }
  8473. }
  8474. return !0
  8475. }
  8476. generateImpliedEndTags() {
  8477. for (; nc.has(this.currentTagId);) this.pop()
  8478. }
  8479. generateImpliedEndTagsThoroughly() {
  8480. for (; rc.has(this.currentTagId);) this.pop()
  8481. }
  8482. generateImpliedEndTagsWithExclusion(e) {
  8483. for (; this.currentTagId !== e && rc.has(this.currentTagId);) this.pop()
  8484. }
  8485. }
  8486. var uc;
  8487. ! function(e) {
  8488. e[e.Marker = 0] = "Marker", e[e.Element = 1] = "Element"
  8489. }(uc = uc || (uc = {}));
  8490. const pc = {
  8491. type: uc.Marker
  8492. };
  8493. class fc {
  8494. constructor(e) {
  8495. this.treeAdapter = e, this.entries = [], this.bookmark = null
  8496. }
  8497. _getNoahArkConditionCandidates(e, t) {
  8498. const n = [], r = t.length, i = this.treeAdapter.getTagName(e), s = this.treeAdapter.getNamespaceURI(e);
  8499. for (let e = 0; e < this.entries.length; e++) {
  8500. const t = this.entries[e];
  8501. if (t.type === uc.Marker) break;
  8502. const {
  8503. element: a
  8504. } = t;
  8505. if (this.treeAdapter.getTagName(a) === i && this.treeAdapter.getNamespaceURI(a) === s) {
  8506. const t = this.treeAdapter.getAttrList(a);
  8507. t.length === r && n.push({
  8508. idx: e,
  8509. attrs: t
  8510. })
  8511. }
  8512. }
  8513. return n
  8514. }
  8515. _ensureNoahArkCondition(e) {
  8516. if (this.entries.length < 3) return;
  8517. const t = this.treeAdapter.getAttrList(e), n = this._getNoahArkConditionCandidates(e, t);
  8518. if (n.length < 3) return;
  8519. const r = new Map(t.map((e => [e.name, e.value])));
  8520. let i = 0;
  8521. for (let e = 0; e < n.length; e++) {
  8522. const t = n[e];
  8523. t.attrs.every((e => r.get(e.name) === e.value)) && (i += 1, i >= 3 && this.entries.splice(t.idx, 1))
  8524. }
  8525. }
  8526. insertMarker() {
  8527. this.entries.unshift(pc)
  8528. }
  8529. pushElement(e, t) {
  8530. this._ensureNoahArkCondition(e), this.entries.unshift({
  8531. type: uc.Element,
  8532. element: e,
  8533. token: t
  8534. })
  8535. }
  8536. insertElementAfterBookmark(e, t) {
  8537. const n = this.entries.indexOf(this.bookmark);
  8538. this.entries.splice(n, 0, {
  8539. type: uc.Element,
  8540. element: e,
  8541. token: t
  8542. })
  8543. }
  8544. removeEntry(e) {
  8545. const t = this.entries.indexOf(e);
  8546. t >= 0 && this.entries.splice(t, 1)
  8547. }
  8548. clearToLastMarker() {
  8549. const e = this.entries.indexOf(pc);
  8550. e >= 0 ? this.entries.splice(0, e + 1) : this.entries.length = 0
  8551. }
  8552. getElementEntryInScopeWithTagName(e) {
  8553. const t = this.entries.find((t => t.type === uc.Marker || this.treeAdapter.getTagName(t.element) === e));
  8554. return t && t.type === uc.Element ? t : null
  8555. }
  8556. getElementEntry(e) {
  8557. return this.entries.find((t => t.type === uc.Element && t.element === e))
  8558. }
  8559. }
  8560. function dc(e) {
  8561. return {
  8562. nodeName: "#text",
  8563. value: e,
  8564. parentNode: null
  8565. }
  8566. }
  8567. const Ec = {
  8568. createDocument: () => ({
  8569. nodeName: "#document",
  8570. mode: Ro.NO_QUIRKS,
  8571. childNodes: []
  8572. }),
  8573. createDocumentFragment: () => ({
  8574. nodeName: "#document-fragment",
  8575. childNodes: []
  8576. }),
  8577. createElement: (e, t, n) => ({
  8578. nodeName: e,
  8579. tagName: e,
  8580. attrs: n,
  8581. namespaceURI: t,
  8582. childNodes: [],
  8583. parentNode: null
  8584. }),
  8585. createCommentNode: e => ({
  8586. nodeName: "#comment",
  8587. data: e,
  8588. parentNode: null
  8589. }),
  8590. appendChild(e, t) {
  8591. e.childNodes.push(t), t.parentNode = e
  8592. },
  8593. insertBefore(e, t, n) {
  8594. const r = e.childNodes.indexOf(n);
  8595. e.childNodes.splice(r, 0, t), t.parentNode = e
  8596. },
  8597. setTemplateContent(e, t) {
  8598. e.content = t
  8599. },
  8600. getTemplateContent: e => e.content,
  8601. setDocumentType(e, t, n, r) {
  8602. const i = e.childNodes.find((e => "#documentType" === e.nodeName));
  8603. if (i) i.name = t, i.publicId = n, i.systemId = r;
  8604. else {
  8605. const i = {
  8606. nodeName: "#documentType",
  8607. name: t,
  8608. publicId: n,
  8609. systemId: r,
  8610. parentNode: null
  8611. };
  8612. Ec.appendChild(e, i)
  8613. }
  8614. },
  8615. setDocumentMode(e, t) {
  8616. e.mode = t
  8617. },
  8618. getDocumentMode: e => e.mode,
  8619. detachNode(e) {
  8620. if (e.parentNode) {
  8621. const t = e.parentNode.childNodes.indexOf(e);
  8622. e.parentNode.childNodes.splice(t, 1), e.parentNode = null
  8623. }
  8624. },
  8625. insertText(e, t) {
  8626. if (e.childNodes.length > 0) {
  8627. const n = e.childNodes[e.childNodes.length - 1];
  8628. if (Ec.isTextNode(n)) return void(n.value += t)
  8629. }
  8630. Ec.appendChild(e, dc(t))
  8631. },
  8632. insertTextBefore(e, t, n) {
  8633. const r = e.childNodes[e.childNodes.indexOf(n) - 1];
  8634. r && Ec.isTextNode(r) ? r.value += t : Ec.insertBefore(e, dc(t), n)
  8635. },
  8636. adoptAttributes(e, t) {
  8637. const n = new Set(e.attrs.map((e => e.name)));
  8638. for (let r = 0; r < t.length; r++) n.has(t[r].name) || e.attrs.push(t[r])
  8639. },
  8640. getFirstChild: e => e.childNodes[0],
  8641. getChildNodes: e => e.childNodes,
  8642. getParentNode: e => e.parentNode,
  8643. getAttrList: e => e.attrs,
  8644. getTagName: e => e.tagName,
  8645. getNamespaceURI: e => e.namespaceURI,
  8646. getTextNodeContent: e => e.value,
  8647. getCommentNodeContent: e => e.data,
  8648. getDocumentTypeNodeName: e => e.name,
  8649. getDocumentTypeNodePublicId: e => e.publicId,
  8650. getDocumentTypeNodeSystemId: e => e.systemId,
  8651. isTextNode: e => "#text" === e.nodeName,
  8652. isCommentNode: e => "#comment" === e.nodeName,
  8653. isDocumentTypeNode: e => "#documentType" === e.nodeName,
  8654. isElementNode: e => Object.prototype.hasOwnProperty.call(e, "tagName"),
  8655. setNodeSourceCodeLocation(e, t) {
  8656. e.sourceCodeLocation = t
  8657. },
  8658. getNodeSourceCodeLocation: e => e.sourceCodeLocation,
  8659. updateNodeSourceCodeLocation(e, t) {
  8660. e.sourceCodeLocation = {...e.sourceCodeLocation, ...t
  8661. }
  8662. }
  8663. }, 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//"], Tc = [...mc, "-//w3c//dtd html 4.01 frameset//", "-//w3c//dtd html 4.01 transitional//"], _c = new Set(["-//w3o//dtd w3 html strict 3.0//en//", "-/w3c/dtd html 4.0 transitional/en", "html"]), Ac = ["-//w3c//dtd xhtml 1.0 frameset//", "-//w3c//dtd xhtml 1.0 transitional//"], gc = [...Ac, "-//w3c//dtd html 4.01 frameset//", "-//w3c//dtd html 4.01 transitional//"];
  8664. function Nc(e, t) {
  8665. return t.some((t => e.startsWith(t)))
  8666. }
  8667. const Cc = "text/html", Ic = "application/xhtml+xml", 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]))), bc = new Map([
  8668. ["xlink:actuate", {
  8669. prefix: "xlink",
  8670. name: "actuate",
  8671. namespace: vo.XLINK
  8672. }],
  8673. ["xlink:arcrole", {
  8674. prefix: "xlink",
  8675. name: "arcrole",
  8676. namespace: vo.XLINK
  8677. }],
  8678. ["xlink:href", {
  8679. prefix: "xlink",
  8680. name: "href",
  8681. namespace: vo.XLINK
  8682. }],
  8683. ["xlink:role", {
  8684. prefix: "xlink",
  8685. name: "role",
  8686. namespace: vo.XLINK
  8687. }],
  8688. ["xlink:show", {
  8689. prefix: "xlink",
  8690. name: "show",
  8691. namespace: vo.XLINK
  8692. }],
  8693. ["xlink:title", {
  8694. prefix: "xlink",
  8695. name: "title",
  8696. namespace: vo.XLINK
  8697. }],
  8698. ["xlink:type", {
  8699. prefix: "xlink",
  8700. name: "type",
  8701. namespace: vo.XLINK
  8702. }],
  8703. ["xml:base", {
  8704. prefix: "xml",
  8705. name: "base",
  8706. namespace: vo.XML
  8707. }],
  8708. ["xml:lang", {
  8709. prefix: "xml",
  8710. name: "lang",
  8711. namespace: vo.XML
  8712. }],
  8713. ["xml:space", {
  8714. prefix: "xml",
  8715. name: "space",
  8716. namespace: vo.XML
  8717. }],
  8718. ["xmlns", {
  8719. prefix: "",
  8720. name: "xmlns",
  8721. namespace: vo.XMLNS
  8722. }],
  8723. ["xmlns:xlink", {
  8724. prefix: "xmlns",
  8725. name: "xlink",
  8726. namespace: vo.XMLNS
  8727. }]
  8728. ]), 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]))), 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]);
  8729. function Lc(e) {
  8730. for (let t = 0; t < e.attrs.length; t++) if ("definitionurl" === e.attrs[t].name) {
  8731. e.attrs[t].name = "definitionURL";
  8732. break
  8733. }
  8734. }
  8735. function kc(e) {
  8736. for (let t = 0; t < e.attrs.length; t++) {
  8737. const n = Sc.get(e.attrs[t].name);
  8738. null != n && (e.attrs[t].name = n)
  8739. }
  8740. }
  8741. function vc(e) {
  8742. for (let t = 0; t < e.attrs.length; t++) {
  8743. const n = bc.get(e.attrs[t].name);
  8744. n && (e.attrs[t].prefix = n.prefix, e.attrs[t].name = n.name, e.attrs[t].namespace = n.namespace)
  8745. }
  8746. }
  8747. function Dc(e, t, n, r) {
  8748. return (!r || r === vo.HTML) && function(e, t, n) {
  8749. if (t === vo.MATHML && e === Po.ANNOTATION_XML) for (let e = 0; e < n.length; e++) if (n[e].name === Do.ENCODING) {
  8750. const t = n[e].value.toLowerCase();
  8751. return t === Cc || t === Ic
  8752. }
  8753. return t === vo.SVG && (e === Po.FOREIGN_OBJECT || e === Po.DESC || e === Po.TITLE)
  8754. }(e, t, n) || (!r || r === vo.MATHML) && function(e, t) {
  8755. return t === vo.MATHML && (e === Po.MI || e === Po.MO || e === Po.MN || e === Po.MS || e === Po.MTEXT)
  8756. }(e, t)
  8757. }
  8758. var Rc;
  8759. ! function(e) {
  8760. 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"
  8761. }(Rc || (Rc = {}));
  8762. const Mc = {
  8763. startLine: -1,
  8764. startCol: -1,
  8765. startOffset: -1,
  8766. endLine: -1,
  8767. endCol: -1,
  8768. endOffset: -1
  8769. }, Pc = new Set([Po.TABLE, Po.TBODY, Po.TFOOT, Po.THEAD, Po.TR]), xc = {
  8770. scriptingEnabled: !0,
  8771. sourceCodeLocationInfo: !1,
  8772. treeAdapter: Ec,
  8773. onParseError: null
  8774. };
  8775. class wc {
  8776. constructor(e, t, n = null, r = null) {
  8777. 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 = {...xc, ...e
  8778. }, 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)
  8779. }
  8780. static parse(e, t) {
  8781. const n = new this(t);
  8782. return n.tokenizer.write(e, !0), n.document
  8783. }
  8784. static getFragmentParser(e, t) {
  8785. const n = {...xc, ...t
  8786. };
  8787. null != e || (e = n.treeAdapter.createElement(Mo.TEMPLATE, vo.HTML, []));
  8788. const r = n.treeAdapter.createElement("documentmock", vo.HTML, []), i = new this(n, r, e);
  8789. return i.fragmentContextID === Po.TEMPLATE && i.tmplInsertionModeStack.unshift(Rc.IN_TEMPLATE), i._initTokenizerForFragmentParsing(), i._insertFakeRootElement(), i._resetInsertionMode(), i._findFormInFragmentContext(), i
  8790. }
  8791. getFragment() {
  8792. const e = this.treeAdapter.getFirstChild(this.document), t = this.treeAdapter.createDocumentFragment();
  8793. return this._adoptNodes(e, t), t
  8794. }
  8795. _err(e, t, n) {
  8796. var r;
  8797. if (!this.onParseError) return;
  8798. const i = null !== (r = e.location) && void 0 !== r ? r : Mc, s = {
  8799. code: t,
  8800. startLine: i.startLine,
  8801. startCol: i.startCol,
  8802. startOffset: i.startOffset,
  8803. endLine: n ? i.startLine : i.endLine,
  8804. endCol: n ? i.startCol : i.endCol,
  8805. endOffset: n ? i.startOffset : i.endOffset
  8806. };
  8807. this.onParseError(s)
  8808. }
  8809. onItemPush(e, t, n) {
  8810. var r, i;
  8811. null === (i = (r = this.treeAdapter)
  8812. .onItemPush) || void 0 === i || i.call(r, e), n && this.openElements.stackTop > 0 && this._setContextModes(e, t)
  8813. }
  8814. onItemPop(e, t) {
  8815. var n, r;
  8816. if (this.options.sourceCodeLocationInfo && this._setEndLocation(e, this.currentToken), null === (r = (n = this.treeAdapter)
  8817. .onItemPop) || void 0 === r || r.call(n, e, this.openElements.current), t) {
  8818. let e, t;
  8819. 0 === this.openElements.stackTop && this.fragmentContext ? (e = this.fragmentContext, t = this.fragmentContextID) : ({
  8820. current: e,
  8821. currentTagId: t
  8822. } = this.openElements), this._setContextModes(e, t)
  8823. }
  8824. }
  8825. _setContextModes(e, t) {
  8826. const n = e === this.document || this.treeAdapter.getNamespaceURI(e) === vo.HTML;
  8827. this.currentNotInHTML = !n, this.tokenizer.inForeignNode = !n && !this._isIntegrationPoint(t, e)
  8828. }
  8829. _switchToTextParsing(e, t) {
  8830. this._insertElement(e, vo.HTML), this.tokenizer.state = t, this.originalInsertionMode = this.insertionMode, this.insertionMode = Rc.TEXT
  8831. }
  8832. switchToPlaintextParsing() {
  8833. this.insertionMode = Rc.TEXT, this.originalInsertionMode = Rc.IN_BODY, this.tokenizer.state = jo.PLAINTEXT
  8834. }
  8835. _getAdjustedCurrentElement() {
  8836. return 0 === this.openElements.stackTop && this.fragmentContext ? this.fragmentContext : this.openElements.current
  8837. }
  8838. _findFormInFragmentContext() {
  8839. let e = this.fragmentContext;
  8840. for (; e;) {
  8841. if (this.treeAdapter.getTagName(e) === Mo.FORM) {
  8842. this.formElement = e;
  8843. break
  8844. }
  8845. e = this.treeAdapter.getParentNode(e)
  8846. }
  8847. }
  8848. _initTokenizerForFragmentParsing() {
  8849. if (this.fragmentContext && this.treeAdapter.getNamespaceURI(this.fragmentContext) === vo.HTML) switch (this.fragmentContextID) {
  8850. case Po.TITLE:
  8851. case Po.TEXTAREA:
  8852. this.tokenizer.state = jo.RCDATA;
  8853. break;
  8854. case Po.STYLE:
  8855. case Po.XMP:
  8856. case Po.IFRAME:
  8857. case Po.NOEMBED:
  8858. case Po.NOFRAMES:
  8859. case Po.NOSCRIPT:
  8860. this.tokenizer.state = jo.RAWTEXT;
  8861. break;
  8862. case Po.SCRIPT:
  8863. this.tokenizer.state = jo.SCRIPT_DATA;
  8864. break;
  8865. case Po.PLAINTEXT:
  8866. this.tokenizer.state = jo.PLAINTEXT
  8867. }
  8868. }
  8869. _setDocumentType(e) {
  8870. const t = e.name || "", n = e.publicId || "", r = e.systemId || "";
  8871. if (this.treeAdapter.setDocumentType(this.document, t, n, r), e.location) {
  8872. const t = this.treeAdapter.getChildNodes(this.document)
  8873. .find((e => this.treeAdapter.isDocumentTypeNode(e)));
  8874. t && this.treeAdapter.setNodeSourceCodeLocation(t, e.location)
  8875. }
  8876. }
  8877. _attachElementToTree(e, t) {
  8878. if (this.options.sourceCodeLocationInfo) {
  8879. const n = t && {...t, startTag: t
  8880. };
  8881. this.treeAdapter.setNodeSourceCodeLocation(e, n)
  8882. }
  8883. if (this._shouldFosterParentOnInsertion()) this._fosterParentElement(e);
  8884. else {
  8885. const t = this.openElements.currentTmplContentOrNode;
  8886. this.treeAdapter.appendChild(t, e)
  8887. }
  8888. }
  8889. _appendElement(e, t) {
  8890. const n = this.treeAdapter.createElement(e.tagName, t, e.attrs);
  8891. this._attachElementToTree(n, e.location)
  8892. }
  8893. _insertElement(e, t) {
  8894. const n = this.treeAdapter.createElement(e.tagName, t, e.attrs);
  8895. this._attachElementToTree(n, e.location), this.openElements.push(n, e.tagID)
  8896. }
  8897. _insertFakeElement(e, t) {
  8898. const n = this.treeAdapter.createElement(e, vo.HTML, []);
  8899. this._attachElementToTree(n, null), this.openElements.push(n, t)
  8900. }
  8901. _insertTemplate(e) {
  8902. const t = this.treeAdapter.createElement(e.tagName, vo.HTML, e.attrs), n = this.treeAdapter.createDocumentFragment();
  8903. this.treeAdapter.setTemplateContent(t, n), this._attachElementToTree(t, e.location), this.openElements.push(t, e.tagID), this.options.sourceCodeLocationInfo && this.treeAdapter.setNodeSourceCodeLocation(n, null)
  8904. }
  8905. _insertFakeRootElement() {
  8906. const e = this.treeAdapter.createElement(Mo.HTML, vo.HTML, []);
  8907. this.options.sourceCodeLocationInfo && this.treeAdapter.setNodeSourceCodeLocation(e, null), this.treeAdapter.appendChild(this.openElements.current, e), this.openElements.push(e, Po.HTML)
  8908. }
  8909. _appendCommentNode(e, t) {
  8910. const n = this.treeAdapter.createCommentNode(e.data);
  8911. this.treeAdapter.appendChild(t, n), this.options.sourceCodeLocationInfo && this.treeAdapter.setNodeSourceCodeLocation(n, e.location)
  8912. }
  8913. _insertCharacters(e) {
  8914. let t, n;
  8915. if (this._shouldFosterParentOnInsertion() ? (({
  8916. parent: t,
  8917. beforeElement: n
  8918. } = 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;
  8919. const r = this.treeAdapter.getChildNodes(t), i = n ? r.lastIndexOf(n) : r.length, s = r[i - 1];
  8920. if (this.treeAdapter.getNodeSourceCodeLocation(s)) {
  8921. const {
  8922. endLine: t,
  8923. endCol: n,
  8924. endOffset: r
  8925. } = e.location;
  8926. this.treeAdapter.updateNodeSourceCodeLocation(s, {
  8927. endLine: t,
  8928. endCol: n,
  8929. endOffset: r
  8930. })
  8931. } else this.options.sourceCodeLocationInfo && this.treeAdapter.setNodeSourceCodeLocation(s, e.location)
  8932. }
  8933. _adoptNodes(e, t) {
  8934. for (let n = this.treeAdapter.getFirstChild(e); n; n = this.treeAdapter.getFirstChild(e)) this.treeAdapter.detachNode(n), this.treeAdapter.appendChild(t, n)
  8935. }
  8936. _setEndLocation(e, t) {
  8937. if (this.treeAdapter.getNodeSourceCodeLocation(e) && t.location) {
  8938. const n = t.location, r = this.treeAdapter.getTagName(e), i = t.type === To.END_TAG && r === t.tagName ? {
  8939. endTag: {...n
  8940. },
  8941. endLine: n.endLine,
  8942. endCol: n.endCol,
  8943. endOffset: n.endOffset
  8944. } : {
  8945. endLine: n.startLine,
  8946. endCol: n.startCol,
  8947. endOffset: n.startOffset
  8948. };
  8949. this.treeAdapter.updateNodeSourceCodeLocation(e, i)
  8950. }
  8951. }
  8952. shouldProcessStartTagTokenInForeignContent(e) {
  8953. if (!this.currentNotInHTML) return !1;
  8954. let t, n;
  8955. return 0 === this.openElements.stackTop && this.fragmentContext ? (t = this.fragmentContext, n = this.fragmentContextID) : ({
  8956. current: t,
  8957. currentTagId: n
  8958. } = 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))
  8959. }
  8960. _processToken(e) {
  8961. switch (e.type) {
  8962. case To.CHARACTER:
  8963. this.onCharacter(e);
  8964. break;
  8965. case To.NULL_CHARACTER:
  8966. this.onNullCharacter(e);
  8967. break;
  8968. case To.COMMENT:
  8969. this.onComment(e);
  8970. break;
  8971. case To.DOCTYPE:
  8972. this.onDoctype(e);
  8973. break;
  8974. case To.START_TAG:
  8975. this._processStartTag(e);
  8976. break;
  8977. case To.END_TAG:
  8978. this.onEndTag(e);
  8979. break;
  8980. case To.EOF:
  8981. this.onEof(e);
  8982. break;
  8983. case To.WHITESPACE_CHARACTER:
  8984. this.onWhitespaceCharacter(e)
  8985. }
  8986. }
  8987. _isIntegrationPoint(e, t, n) {
  8988. return Dc(e, this.treeAdapter.getNamespaceURI(t), this.treeAdapter.getAttrList(t), n)
  8989. }
  8990. _reconstructActiveFormattingElements() {
  8991. const e = this.activeFormattingElements.entries.length;
  8992. if (e) {
  8993. const t = this.activeFormattingElements.entries.findIndex((e => e.type === uc.Marker || this.openElements.contains(e.element)));
  8994. for (let n = t < 0 ? e - 1 : t - 1; n >= 0; n--) {
  8995. const e = this.activeFormattingElements.entries[n];
  8996. this._insertElement(e.token, this.treeAdapter.getNamespaceURI(e.element)), e.element = this.openElements.current
  8997. }
  8998. }
  8999. }
  9000. _closeTableCell() {
  9001. this.openElements.generateImpliedEndTags(), this.openElements.popUntilTableCellPopped(), this.activeFormattingElements.clearToLastMarker(), this.insertionMode = Rc.IN_ROW
  9002. }
  9003. _closePElement() {
  9004. this.openElements.generateImpliedEndTagsWithExclusion(Po.P), this.openElements.popUntilTagNamePopped(Po.P)
  9005. }
  9006. _resetInsertionMode() {
  9007. for (let e = this.openElements.stackTop; e >= 0; e--) switch (0 === e && this.fragmentContext ? this.fragmentContextID : this.openElements.tagIDs[e]) {
  9008. case Po.TR:
  9009. return void(this.insertionMode = Rc.IN_ROW);
  9010. case Po.TBODY:
  9011. case Po.THEAD:
  9012. case Po.TFOOT:
  9013. return void(this.insertionMode = Rc.IN_TABLE_BODY);
  9014. case Po.CAPTION:
  9015. return void(this.insertionMode = Rc.IN_CAPTION);
  9016. case Po.COLGROUP:
  9017. return void(this.insertionMode = Rc.IN_COLUMN_GROUP);
  9018. case Po.TABLE:
  9019. return void(this.insertionMode = Rc.IN_TABLE);
  9020. case Po.BODY:
  9021. return void(this.insertionMode = Rc.IN_BODY);
  9022. case Po.FRAMESET:
  9023. return void(this.insertionMode = Rc.IN_FRAMESET);
  9024. case Po.SELECT:
  9025. return void this._resetInsertionModeForSelect(e);
  9026. case Po.TEMPLATE:
  9027. return void(this.insertionMode = this.tmplInsertionModeStack[0]);
  9028. case Po.HTML:
  9029. return void(this.insertionMode = this.headElement ? Rc.AFTER_HEAD : Rc.BEFORE_HEAD);
  9030. case Po.TD:
  9031. case Po.TH:
  9032. if (e > 0) return void(this.insertionMode = Rc.IN_CELL);
  9033. break;
  9034. case Po.HEAD:
  9035. if (e > 0) return void(this.insertionMode = Rc.IN_HEAD)
  9036. }
  9037. this.insertionMode = Rc.IN_BODY
  9038. }
  9039. _resetInsertionModeForSelect(e) {
  9040. if (e > 0) for (let t = e - 1; t > 0; t--) {
  9041. const e = this.openElements.tagIDs[t];
  9042. if (e === Po.TEMPLATE) break;
  9043. if (e === Po.TABLE) return void(this.insertionMode = Rc.IN_SELECT_IN_TABLE)
  9044. }
  9045. this.insertionMode = Rc.IN_SELECT
  9046. }
  9047. _isElementCausesFosterParenting(e) {
  9048. return Pc.has(e)
  9049. }
  9050. _shouldFosterParentOnInsertion() {
  9051. return this.fosterParentingEnabled && this._isElementCausesFosterParenting(this.openElements.currentTagId)
  9052. }
  9053. _findFosterParentingLocation() {
  9054. for (let e = this.openElements.stackTop; e >= 0; e--) {
  9055. const t = this.openElements.items[e];
  9056. switch (this.openElements.tagIDs[e]) {
  9057. case Po.TEMPLATE:
  9058. if (this.treeAdapter.getNamespaceURI(t) === vo.HTML) return {
  9059. parent: this.treeAdapter.getTemplateContent(t),
  9060. beforeElement: null
  9061. };
  9062. break;
  9063. case Po.TABLE:
  9064. {
  9065. const n = this.treeAdapter.getParentNode(t);
  9066. return n ? {
  9067. parent: n,
  9068. beforeElement: t
  9069. } : {
  9070. parent: this.openElements.items[e - 1],
  9071. beforeElement: null
  9072. }
  9073. }
  9074. }
  9075. }
  9076. return {
  9077. parent: this.openElements.items[0],
  9078. beforeElement: null
  9079. }
  9080. }
  9081. _fosterParentElement(e) {
  9082. const t = this._findFosterParentingLocation();
  9083. t.beforeElement ? this.treeAdapter.insertBefore(t.parent, e, t.beforeElement) : this.treeAdapter.appendChild(t.parent, e)
  9084. }
  9085. _isSpecialElement(e, t) {
  9086. const n = this.treeAdapter.getNamespaceURI(e);
  9087. return Ho[n].has(t)
  9088. }
  9089. onCharacter(e) {
  9090. if (this.skipNextNewLine = !1, this.tokenizer.inForeignNode)! function(e, t) {
  9091. e._insertCharacters(t), e.framesetOk = !1
  9092. }(this, e);
  9093. else switch (this.insertionMode) {
  9094. case Rc.INITIAL:
  9095. Vc(this, e);
  9096. break;
  9097. case Rc.BEFORE_HTML:
  9098. Wc(this, e);
  9099. break;
  9100. case Rc.BEFORE_HEAD:
  9101. Qc(this, e);
  9102. break;
  9103. case Rc.IN_HEAD:
  9104. zc(this, e);
  9105. break;
  9106. case Rc.IN_HEAD_NO_SCRIPT:
  9107. Jc(this, e);
  9108. break;
  9109. case Rc.AFTER_HEAD:
  9110. Zc(this, e);
  9111. break;
  9112. case Rc.IN_BODY:
  9113. case Rc.IN_CAPTION:
  9114. case Rc.IN_CELL:
  9115. case Rc.IN_TEMPLATE:
  9116. nl(this, e);
  9117. break;
  9118. case Rc.TEXT:
  9119. case Rc.IN_SELECT:
  9120. case Rc.IN_SELECT_IN_TABLE:
  9121. this._insertCharacters(e);
  9122. break;
  9123. case Rc.IN_TABLE:
  9124. case Rc.IN_TABLE_BODY:
  9125. case Rc.IN_ROW:
  9126. ul(this, e);
  9127. break;
  9128. case Rc.IN_TABLE_TEXT:
  9129. ml(this, e);
  9130. break;
  9131. case Rc.IN_COLUMN_GROUP:
  9132. gl(this, e);
  9133. break;
  9134. case Rc.AFTER_BODY:
  9135. kl(this, e);
  9136. break;
  9137. case Rc.AFTER_AFTER_BODY:
  9138. vl(this, e)
  9139. }
  9140. }
  9141. onNullCharacter(e) {
  9142. if (this.skipNextNewLine = !1, this.tokenizer.inForeignNode)! function(e, t) {
  9143. t.chars = "�", e._insertCharacters(t)
  9144. }(this, e);
  9145. else switch (this.insertionMode) {
  9146. case Rc.INITIAL:
  9147. Vc(this, e);
  9148. break;
  9149. case Rc.BEFORE_HTML:
  9150. Wc(this, e);
  9151. break;
  9152. case Rc.BEFORE_HEAD:
  9153. Qc(this, e);
  9154. break;
  9155. case Rc.IN_HEAD:
  9156. zc(this, e);
  9157. break;
  9158. case Rc.IN_HEAD_NO_SCRIPT:
  9159. Jc(this, e);
  9160. break;
  9161. case Rc.AFTER_HEAD:
  9162. Zc(this, e);
  9163. break;
  9164. case Rc.TEXT:
  9165. this._insertCharacters(e);
  9166. break;
  9167. case Rc.IN_TABLE:
  9168. case Rc.IN_TABLE_BODY:
  9169. case Rc.IN_ROW:
  9170. ul(this, e);
  9171. break;
  9172. case Rc.IN_COLUMN_GROUP:
  9173. gl(this, e);
  9174. break;
  9175. case Rc.AFTER_BODY:
  9176. kl(this, e);
  9177. break;
  9178. case Rc.AFTER_AFTER_BODY:
  9179. vl(this, e)
  9180. }
  9181. }
  9182. onComment(e) {
  9183. if (this.skipNextNewLine = !1, this.currentNotInHTML) Kc(this, e);
  9184. else switch (this.insertionMode) {
  9185. case Rc.INITIAL:
  9186. case Rc.BEFORE_HTML:
  9187. case Rc.BEFORE_HEAD:
  9188. case Rc.IN_HEAD:
  9189. case Rc.IN_HEAD_NO_SCRIPT:
  9190. case Rc.AFTER_HEAD:
  9191. case Rc.IN_BODY:
  9192. case Rc.IN_TABLE:
  9193. case Rc.IN_CAPTION:
  9194. case Rc.IN_COLUMN_GROUP:
  9195. case Rc.IN_TABLE_BODY:
  9196. case Rc.IN_ROW:
  9197. case Rc.IN_CELL:
  9198. case Rc.IN_SELECT:
  9199. case Rc.IN_SELECT_IN_TABLE:
  9200. case Rc.IN_TEMPLATE:
  9201. case Rc.IN_FRAMESET:
  9202. case Rc.AFTER_FRAMESET:
  9203. Kc(this, e);
  9204. break;
  9205. case Rc.IN_TABLE_TEXT:
  9206. Tl(this, e);
  9207. break;
  9208. case Rc.AFTER_BODY:
  9209. ! function(e, t) {
  9210. e._appendCommentNode(t, e.openElements.items[0])
  9211. }(this, e);
  9212. break;
  9213. case Rc.AFTER_AFTER_BODY:
  9214. case Rc.AFTER_AFTER_FRAMESET:
  9215. ! function(e, t) {
  9216. e._appendCommentNode(t, e.document)
  9217. }(this, e)
  9218. }
  9219. }
  9220. onDoctype(e) {
  9221. switch (this.skipNextNewLine = !1, this.insertionMode) {
  9222. case Rc.INITIAL:
  9223. ! function(e, t) {
  9224. e._setDocumentType(t);
  9225. const n = t.forceQuirks ? Ro.QUIRKS : function(e) {
  9226. if ("html" !== e.name) return Ro.QUIRKS;
  9227. const {
  9228. systemId: t
  9229. } = e;
  9230. if (t && "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd" === t.toLowerCase()) return Ro.QUIRKS;
  9231. let {
  9232. publicId: n
  9233. } = e;
  9234. if (null !== n) {
  9235. if (n = n.toLowerCase(), _c.has(n)) return Ro.QUIRKS;
  9236. let e = null === t ? Tc : mc;
  9237. if (Nc(n, e)) return Ro.QUIRKS;
  9238. if (e = null === t ? Ac : gc, Nc(n, e)) return Ro.LIMITED_QUIRKS
  9239. }
  9240. return Ro.NO_QUIRKS
  9241. }(t);
  9242. (function(e) {
  9243. return "html" === e.name && null === e.publicId && (null === e.systemId || "about:legacy-compat" === e.systemId)
  9244. })(t) || e._err(t, Eo.nonConformingDoctype);
  9245. e.treeAdapter.setDocumentMode(e.document, n), e.insertionMode = Rc.BEFORE_HTML
  9246. }(this, e);
  9247. break;
  9248. case Rc.BEFORE_HEAD:
  9249. case Rc.IN_HEAD:
  9250. case Rc.IN_HEAD_NO_SCRIPT:
  9251. case Rc.AFTER_HEAD:
  9252. this._err(e, Eo.misplacedDoctype);
  9253. break;
  9254. case Rc.IN_TABLE_TEXT:
  9255. Tl(this, e)
  9256. }
  9257. }
  9258. onStartTag(e) {
  9259. this.skipNextNewLine = !1, this.currentToken = e, this._processStartTag(e), e.selfClosing && !e.ackSelfClosing && this._err(e, Eo.nonVoidHtmlElementStartTagWithTrailingSolidus)
  9260. }
  9261. _processStartTag(e) {
  9262. this.shouldProcessStartTagTokenInForeignContent(e) ? function(e, t) {
  9263. if (function(e) {
  9264. const t = e.tagID;
  9265. return t === Po.FONT && e.attrs.some((({
  9266. name: e
  9267. }) => e === Do.COLOR || e === Do.SIZE || e === Do.FACE)) || yc.has(t)
  9268. }(t)) Dl(e), e._startTagOutsideForeignContent(t);
  9269. else {
  9270. const n = e._getAdjustedCurrentElement(), r = e.treeAdapter.getNamespaceURI(n);
  9271. r === vo.MATHML ? Lc(t) : r === vo.SVG && (! function(e) {
  9272. const t = Oc.get(e.tagName);
  9273. null != t && (e.tagName = t, e.tagID = Fo(e.tagName))
  9274. }(t), kc(t)), vc(t), t.selfClosing ? e._appendElement(t, r) : e._insertElement(t, r), t.ackSelfClosing = !0
  9275. }
  9276. }(this, e) : this._startTagOutsideForeignContent(e)
  9277. }
  9278. _startTagOutsideForeignContent(e) {
  9279. switch (this.insertionMode) {
  9280. case Rc.INITIAL:
  9281. Vc(this, e);
  9282. break;
  9283. case Rc.BEFORE_HTML:
  9284. ! function(e, t) {
  9285. t.tagID === Po.HTML ? (e._insertElement(t, vo.HTML), e.insertionMode = Rc.BEFORE_HEAD) : Wc(e, t)
  9286. }(this, e);
  9287. break;
  9288. case Rc.BEFORE_HEAD:
  9289. ! function(e, t) {
  9290. switch (t.tagID) {
  9291. case Po.HTML:
  9292. ol(e, t);
  9293. break;
  9294. case Po.HEAD:
  9295. e._insertElement(t, vo.HTML), e.headElement = e.openElements.current, e.insertionMode = Rc.IN_HEAD;
  9296. break;
  9297. default:
  9298. Qc(e, t)
  9299. }
  9300. }(this, e);
  9301. break;
  9302. case Rc.IN_HEAD:
  9303. Xc(this, e);
  9304. break;
  9305. case Rc.IN_HEAD_NO_SCRIPT:
  9306. ! function(e, t) {
  9307. switch (t.tagID) {
  9308. case Po.HTML:
  9309. ol(e, t);
  9310. break;
  9311. case Po.BASEFONT:
  9312. case Po.BGSOUND:
  9313. case Po.HEAD:
  9314. case Po.LINK:
  9315. case Po.META:
  9316. case Po.NOFRAMES:
  9317. case Po.STYLE:
  9318. Xc(e, t);
  9319. break;
  9320. case Po.NOSCRIPT:
  9321. e._err(t, Eo.nestedNoscriptInHead);
  9322. break;
  9323. default:
  9324. Jc(e, t)
  9325. }
  9326. }(this, e);
  9327. break;
  9328. case Rc.AFTER_HEAD:
  9329. ! function(e, t) {
  9330. switch (t.tagID) {
  9331. case Po.HTML:
  9332. ol(e, t);
  9333. break;
  9334. case Po.BODY:
  9335. e._insertElement(t, vo.HTML), e.framesetOk = !1, e.insertionMode = Rc.IN_BODY;
  9336. break;
  9337. case Po.FRAMESET:
  9338. e._insertElement(t, vo.HTML), e.insertionMode = Rc.IN_FRAMESET;
  9339. break;
  9340. case Po.BASE:
  9341. case Po.BASEFONT:
  9342. case Po.BGSOUND:
  9343. case Po.LINK:
  9344. case Po.META:
  9345. case Po.NOFRAMES:
  9346. case Po.SCRIPT:
  9347. case Po.STYLE:
  9348. case Po.TEMPLATE:
  9349. case Po.TITLE:
  9350. e._err(t, Eo.abandonedHeadElementChild), e.openElements.push(e.headElement, Po.HEAD), Xc(e, t), e.openElements.remove(e.headElement);
  9351. break;
  9352. case Po.HEAD:
  9353. e._err(t, Eo.misplacedStartTagForHeadElement);
  9354. break;
  9355. default:
  9356. Zc(e, t)
  9357. }
  9358. }(this, e);
  9359. break;
  9360. case Rc.IN_BODY:
  9361. ol(this, e);
  9362. break;
  9363. case Rc.IN_TABLE:
  9364. pl(this, e);
  9365. break;
  9366. case Rc.IN_TABLE_TEXT:
  9367. Tl(this, e);
  9368. break;
  9369. case Rc.IN_CAPTION:
  9370. ! function(e, t) {
  9371. const n = t.tagID;
  9372. _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)
  9373. }(this, e);
  9374. break;
  9375. case Rc.IN_COLUMN_GROUP:
  9376. Al(this, e);
  9377. break;
  9378. case Rc.IN_TABLE_BODY:
  9379. Nl(this, e);
  9380. break;
  9381. case Rc.IN_ROW:
  9382. Il(this, e);
  9383. break;
  9384. case Rc.IN_CELL:
  9385. ! function(e, t) {
  9386. const n = t.tagID;
  9387. _l.has(n) ? (e.openElements.hasInTableScope(Po.TD) || e.openElements.hasInTableScope(Po.TH)) && (e._closeTableCell(), Il(e, t)) : ol(e, t)
  9388. }(this, e);
  9389. break;
  9390. case Rc.IN_SELECT:
  9391. bl(this, e);
  9392. break;
  9393. case Rc.IN_SELECT_IN_TABLE:
  9394. ! function(e, t) {
  9395. const n = t.tagID;
  9396. 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)
  9397. }(this, e);
  9398. break;
  9399. case Rc.IN_TEMPLATE:
  9400. ! function(e, t) {
  9401. switch (t.tagID) {
  9402. case Po.BASE:
  9403. case Po.BASEFONT:
  9404. case Po.BGSOUND:
  9405. case Po.LINK:
  9406. case Po.META:
  9407. case Po.NOFRAMES:
  9408. case Po.SCRIPT:
  9409. case Po.STYLE:
  9410. case Po.TEMPLATE:
  9411. case Po.TITLE:
  9412. Xc(e, t);
  9413. break;
  9414. case Po.CAPTION:
  9415. case Po.COLGROUP:
  9416. case Po.TBODY:
  9417. case Po.TFOOT:
  9418. case Po.THEAD:
  9419. e.tmplInsertionModeStack[0] = Rc.IN_TABLE, e.insertionMode = Rc.IN_TABLE, pl(e, t);
  9420. break;
  9421. case Po.COL:
  9422. e.tmplInsertionModeStack[0] = Rc.IN_COLUMN_GROUP, e.insertionMode = Rc.IN_COLUMN_GROUP, Al(e, t);
  9423. break;
  9424. case Po.TR:
  9425. e.tmplInsertionModeStack[0] = Rc.IN_TABLE_BODY, e.insertionMode = Rc.IN_TABLE_BODY, Nl(e, t);
  9426. break;
  9427. case Po.TD:
  9428. case Po.TH:
  9429. e.tmplInsertionModeStack[0] = Rc.IN_ROW, e.insertionMode = Rc.IN_ROW, Il(e, t);
  9430. break;
  9431. default:
  9432. e.tmplInsertionModeStack[0] = Rc.IN_BODY, e.insertionMode = Rc.IN_BODY, ol(e, t)
  9433. }
  9434. }(this, e);
  9435. break;
  9436. case Rc.AFTER_BODY:
  9437. ! function(e, t) {
  9438. t.tagID === Po.HTML ? ol(e, t) : kl(e, t)
  9439. }(this, e);
  9440. break;
  9441. case Rc.IN_FRAMESET:
  9442. ! function(e, t) {
  9443. switch (t.tagID) {
  9444. case Po.HTML:
  9445. ol(e, t);
  9446. break;
  9447. case Po.FRAMESET:
  9448. e._insertElement(t, vo.HTML);
  9449. break;
  9450. case Po.FRAME:
  9451. e._appendElement(t, vo.HTML), t.ackSelfClosing = !0;
  9452. break;
  9453. case Po.NOFRAMES:
  9454. Xc(e, t)
  9455. }
  9456. }(this, e);
  9457. break;
  9458. case Rc.AFTER_FRAMESET:
  9459. ! function(e, t) {
  9460. switch (t.tagID) {
  9461. case Po.HTML:
  9462. ol(e, t);
  9463. break;
  9464. case Po.NOFRAMES:
  9465. Xc(e, t)
  9466. }
  9467. }(this, e);
  9468. break;
  9469. case Rc.AFTER_AFTER_BODY:
  9470. ! function(e, t) {
  9471. t.tagID === Po.HTML ? ol(e, t) : vl(e, t)
  9472. }(this, e);
  9473. break;
  9474. case Rc.AFTER_AFTER_FRAMESET:
  9475. ! function(e, t) {
  9476. switch (t.tagID) {
  9477. case Po.HTML:
  9478. ol(e, t);
  9479. break;
  9480. case Po.NOFRAMES:
  9481. Xc(e, t)
  9482. }
  9483. }(this, e)
  9484. }
  9485. }
  9486. onEndTag(e) {
  9487. this.skipNextNewLine = !1, this.currentToken = e, this.currentNotInHTML ? function(e, t) {
  9488. if (t.tagID === Po.P || t.tagID === Po.BR) return Dl(e), void e._endTagOutsideForeignContent(t);
  9489. for (let n = e.openElements.stackTop; n > 0; n--) {
  9490. const r = e.openElements.items[n];
  9491. if (e.treeAdapter.getNamespaceURI(r) === vo.HTML) {
  9492. e._endTagOutsideForeignContent(t);
  9493. break
  9494. }
  9495. const i = e.treeAdapter.getTagName(r);
  9496. if (i.toLowerCase() === t.tagName) {
  9497. t.tagName = i, e.openElements.shortenToLength(n);
  9498. break
  9499. }
  9500. }
  9501. }(this, e) : this._endTagOutsideForeignContent(e)
  9502. }
  9503. _endTagOutsideForeignContent(e) {
  9504. switch (this.insertionMode) {
  9505. case Rc.INITIAL:
  9506. Vc(this, e);
  9507. break;
  9508. case Rc.BEFORE_HTML:
  9509. ! function(e, t) {
  9510. const n = t.tagID;
  9511. n !== Po.HTML && n !== Po.HEAD && n !== Po.BODY && n !== Po.BR || Wc(e, t)
  9512. }(this, e);
  9513. break;
  9514. case Rc.BEFORE_HEAD:
  9515. ! function(e, t) {
  9516. const n = t.tagID;
  9517. n === Po.HEAD || n === Po.BODY || n === Po.HTML || n === Po.BR ? Qc(e, t) : e._err(t, Eo.endTagWithoutMatchingOpenElement)
  9518. }(this, e);
  9519. break;
  9520. case Rc.IN_HEAD:
  9521. ! function(e, t) {
  9522. switch (t.tagID) {
  9523. case Po.HEAD:
  9524. e.openElements.pop(), e.insertionMode = Rc.AFTER_HEAD;
  9525. break;
  9526. case Po.BODY:
  9527. case Po.BR:
  9528. case Po.HTML:
  9529. zc(e, t);
  9530. break;
  9531. case Po.TEMPLATE:
  9532. $c(e, t);
  9533. break;
  9534. default:
  9535. e._err(t, Eo.endTagWithoutMatchingOpenElement)
  9536. }
  9537. }(this, e);
  9538. break;
  9539. case Rc.IN_HEAD_NO_SCRIPT:
  9540. ! function(e, t) {
  9541. switch (t.tagID) {
  9542. case Po.NOSCRIPT:
  9543. e.openElements.pop(), e.insertionMode = Rc.IN_HEAD;
  9544. break;
  9545. case Po.BR:
  9546. Jc(e, t);
  9547. break;
  9548. default:
  9549. e._err(t, Eo.endTagWithoutMatchingOpenElement)
  9550. }
  9551. }(this, e);
  9552. break;
  9553. case Rc.AFTER_HEAD:
  9554. ! function(e, t) {
  9555. switch (t.tagID) {
  9556. case Po.BODY:
  9557. case Po.HTML:
  9558. case Po.BR:
  9559. Zc(e, t);
  9560. break;
  9561. case Po.TEMPLATE:
  9562. $c(e, t);
  9563. break;
  9564. default:
  9565. e._err(t, Eo.endTagWithoutMatchingOpenElement)
  9566. }
  9567. }(this, e);
  9568. break;
  9569. case Rc.IN_BODY:
  9570. ll(this, e);
  9571. break;
  9572. case Rc.TEXT:
  9573. ! function(e, t) {
  9574. var n;
  9575. t.tagID === Po.SCRIPT && (null === (n = e.scriptHandler) || void 0 === n || n.call(e, e.openElements.current));
  9576. e.openElements.pop(), e.insertionMode = e.originalInsertionMode
  9577. }(this, e);
  9578. break;
  9579. case Rc.IN_TABLE:
  9580. fl(this, e);
  9581. break;
  9582. case Rc.IN_TABLE_TEXT:
  9583. Tl(this, e);
  9584. break;
  9585. case Rc.IN_CAPTION:
  9586. ! function(e, t) {
  9587. const n = t.tagID;
  9588. switch (n) {
  9589. case Po.CAPTION:
  9590. case Po.TABLE:
  9591. 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));
  9592. break;
  9593. case Po.BODY:
  9594. case Po.COL:
  9595. case Po.COLGROUP:
  9596. case Po.HTML:
  9597. case Po.TBODY:
  9598. case Po.TD:
  9599. case Po.TFOOT:
  9600. case Po.TH:
  9601. case Po.THEAD:
  9602. case Po.TR:
  9603. break;
  9604. default:
  9605. ll(e, t)
  9606. }
  9607. }(this, e);
  9608. break;
  9609. case Rc.IN_COLUMN_GROUP:
  9610. ! function(e, t) {
  9611. switch (t.tagID) {
  9612. case Po.COLGROUP:
  9613. e.openElements.currentTagId === Po.COLGROUP && (e.openElements.pop(), e.insertionMode = Rc.IN_TABLE);
  9614. break;
  9615. case Po.TEMPLATE:
  9616. $c(e, t);
  9617. break;
  9618. case Po.COL:
  9619. break;
  9620. default:
  9621. gl(e, t)
  9622. }
  9623. }(this, e);
  9624. break;
  9625. case Rc.IN_TABLE_BODY:
  9626. Cl(this, e);
  9627. break;
  9628. case Rc.IN_ROW:
  9629. Sl(this, e);
  9630. break;
  9631. case Rc.IN_CELL:
  9632. ! function(e, t) {
  9633. const n = t.tagID;
  9634. switch (n) {
  9635. case Po.TD:
  9636. case Po.TH:
  9637. e.openElements.hasInTableScope(n) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(n), e.activeFormattingElements.clearToLastMarker(), e.insertionMode = Rc.IN_ROW);
  9638. break;
  9639. case Po.TABLE:
  9640. case Po.TBODY:
  9641. case Po.TFOOT:
  9642. case Po.THEAD:
  9643. case Po.TR:
  9644. e.openElements.hasInTableScope(n) && (e._closeTableCell(), Sl(e, t));
  9645. break;
  9646. case Po.BODY:
  9647. case Po.CAPTION:
  9648. case Po.COL:
  9649. case Po.COLGROUP:
  9650. case Po.HTML:
  9651. break;
  9652. default:
  9653. ll(e, t)
  9654. }
  9655. }(this, e);
  9656. break;
  9657. case Rc.IN_SELECT:
  9658. Ol(this, e);
  9659. break;
  9660. case Rc.IN_SELECT_IN_TABLE:
  9661. ! function(e, t) {
  9662. const n = t.tagID;
  9663. 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)
  9664. }(this, e);
  9665. break;
  9666. case Rc.IN_TEMPLATE:
  9667. ! function(e, t) {
  9668. t.tagID === Po.TEMPLATE && $c(e, t)
  9669. }(this, e);
  9670. break;
  9671. case Rc.AFTER_BODY:
  9672. Ll(this, e);
  9673. break;
  9674. case Rc.IN_FRAMESET:
  9675. ! function(e, t) {
  9676. t.tagID !== Po.FRAMESET || e.openElements.isRootHtmlElementCurrent() || (e.openElements.pop(), e.fragmentContext || e.openElements.currentTagId === Po.FRAMESET || (e.insertionMode = Rc.AFTER_FRAMESET))
  9677. }(this, e);
  9678. break;
  9679. case Rc.AFTER_FRAMESET:
  9680. ! function(e, t) {
  9681. t.tagID === Po.HTML && (e.insertionMode = Rc.AFTER_AFTER_FRAMESET)
  9682. }(this, e);
  9683. break;
  9684. case Rc.AFTER_AFTER_BODY:
  9685. vl(this, e)
  9686. }
  9687. }
  9688. onEof(e) {
  9689. switch (this.insertionMode) {
  9690. case Rc.INITIAL:
  9691. Vc(this, e);
  9692. break;
  9693. case Rc.BEFORE_HTML:
  9694. Wc(this, e);
  9695. break;
  9696. case Rc.BEFORE_HEAD:
  9697. Qc(this, e);
  9698. break;
  9699. case Rc.IN_HEAD:
  9700. zc(this, e);
  9701. break;
  9702. case Rc.IN_HEAD_NO_SCRIPT:
  9703. Jc(this, e);
  9704. break;
  9705. case Rc.AFTER_HEAD:
  9706. Zc(this, e);
  9707. break;
  9708. case Rc.IN_BODY:
  9709. case Rc.IN_TABLE:
  9710. case Rc.IN_CAPTION:
  9711. case Rc.IN_COLUMN_GROUP:
  9712. case Rc.IN_TABLE_BODY:
  9713. case Rc.IN_ROW:
  9714. case Rc.IN_CELL:
  9715. case Rc.IN_SELECT:
  9716. case Rc.IN_SELECT_IN_TABLE:
  9717. hl(this, e);
  9718. break;
  9719. case Rc.TEXT:
  9720. ! function(e, t) {
  9721. e._err(t, Eo.eofInElementThatCanContainOnlyText), e.openElements.pop(), e.insertionMode = e.originalInsertionMode, e.onEof(t)
  9722. }(this, e);
  9723. break;
  9724. case Rc.IN_TABLE_TEXT:
  9725. Tl(this, e);
  9726. break;
  9727. case Rc.IN_TEMPLATE:
  9728. yl(this, e);
  9729. break;
  9730. case Rc.AFTER_BODY:
  9731. case Rc.IN_FRAMESET:
  9732. case Rc.AFTER_FRAMESET:
  9733. case Rc.AFTER_AFTER_BODY:
  9734. case Rc.AFTER_AFTER_FRAMESET:
  9735. jc(this, e)
  9736. }
  9737. }
  9738. onWhitespaceCharacter(e) {
  9739. if (this.skipNextNewLine && (this.skipNextNewLine = !1, e.chars.charCodeAt(0) === io.LINE_FEED)) {
  9740. if (1 === e.chars.length) return;
  9741. e.chars = e.chars.substr(1)
  9742. }
  9743. if (this.tokenizer.inForeignNode) this._insertCharacters(e);
  9744. else switch (this.insertionMode) {
  9745. case Rc.IN_HEAD:
  9746. case Rc.IN_HEAD_NO_SCRIPT:
  9747. case Rc.AFTER_HEAD:
  9748. case Rc.TEXT:
  9749. case Rc.IN_COLUMN_GROUP:
  9750. case Rc.IN_SELECT:
  9751. case Rc.IN_SELECT_IN_TABLE:
  9752. case Rc.IN_FRAMESET:
  9753. case Rc.AFTER_FRAMESET:
  9754. this._insertCharacters(e);
  9755. break;
  9756. case Rc.IN_BODY:
  9757. case Rc.IN_CAPTION:
  9758. case Rc.IN_CELL:
  9759. case Rc.IN_TEMPLATE:
  9760. case Rc.AFTER_BODY:
  9761. case Rc.AFTER_AFTER_BODY:
  9762. case Rc.AFTER_AFTER_FRAMESET:
  9763. tl(this, e);
  9764. break;
  9765. case Rc.IN_TABLE:
  9766. case Rc.IN_TABLE_BODY:
  9767. case Rc.IN_ROW:
  9768. ul(this, e);
  9769. break;
  9770. case Rc.IN_TABLE_TEXT:
  9771. El(this, e)
  9772. }
  9773. }
  9774. }
  9775. function Bc(e, t) {
  9776. let n = e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);
  9777. return n ? e.openElements.contains(n.element) ? e.openElements.hasInScope(t.tagID) || (n = null) : (e.activeFormattingElements.removeEntry(n), n = null) : cl(e, t), n
  9778. }
  9779. function Fc(e, t) {
  9780. let n = null, r = e.openElements.stackTop;
  9781. for (; r >= 0; r--) {
  9782. const i = e.openElements.items[r];
  9783. if (i === t.element) break;
  9784. e._isSpecialElement(i, e.openElements.tagIDs[r]) && (n = i)
  9785. }
  9786. return n || (e.openElements.shortenToLength(r < 0 ? 0 : r), e.activeFormattingElements.removeEntry(t)), n
  9787. }
  9788. function Uc(e, t, n) {
  9789. let r = t, i = e.openElements.getCommonAncestor(t);
  9790. for (let s = 0, a = i; a !== n; s++, a = i) {
  9791. i = e.openElements.getCommonAncestor(a);
  9792. const n = e.activeFormattingElements.getElementEntry(a), o = n && s >= 3;
  9793. !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)
  9794. }
  9795. return r
  9796. }
  9797. function Hc(e, t) {
  9798. const n = e.treeAdapter.getNamespaceURI(t.element), r = e.treeAdapter.createElement(t.token.tagName, n, t.token.attrs);
  9799. return e.openElements.replace(t.element, r), t.element = r, r
  9800. }
  9801. function Gc(e, t, n) {
  9802. const r = Fo(e.treeAdapter.getTagName(t));
  9803. if (e._isElementCausesFosterParenting(r)) e._fosterParentElement(n);
  9804. else {
  9805. const i = e.treeAdapter.getNamespaceURI(t);
  9806. r === Po.TEMPLATE && i === vo.HTML && (t = e.treeAdapter.getTemplateContent(t)), e.treeAdapter.appendChild(t, n)
  9807. }
  9808. }
  9809. function Yc(e, t, n) {
  9810. const r = e.treeAdapter.getNamespaceURI(n.element), {
  9811. token: i
  9812. } = n, s = e.treeAdapter.createElement(i.tagName, r, i.attrs);
  9813. 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)
  9814. }
  9815. function qc(e, t) {
  9816. for (let n = 0; n < 8; n++) {
  9817. const n = Bc(e, t);
  9818. if (!n) break;
  9819. const r = Fc(e, n);
  9820. if (!r) break;
  9821. e.activeFormattingElements.bookmark = n;
  9822. const i = Uc(e, r, n.element), s = e.openElements.getCommonAncestor(n.element);
  9823. e.treeAdapter.detachNode(i), s && Gc(e, s, i), Yc(e, r, n)
  9824. }
  9825. }
  9826. function Kc(e, t) {
  9827. e._appendCommentNode(t, e.openElements.currentTmplContentOrNode)
  9828. }
  9829. function jc(e, t) {
  9830. if (e.stopped = !0, t.location) {
  9831. const n = e.fragmentContext ? 0 : 2;
  9832. for (let r = e.openElements.stackTop; r >= n; r--) e._setEndLocation(e.openElements.items[r], t);
  9833. if (!e.fragmentContext && e.openElements.stackTop >= 0) {
  9834. const n = e.openElements.items[0], r = e.treeAdapter.getNodeSourceCodeLocation(n);
  9835. if (r && !r.endTag && (e._setEndLocation(n, t), e.openElements.stackTop >= 1)) {
  9836. const n = e.openElements.items[1], r = e.treeAdapter.getNodeSourceCodeLocation(n);
  9837. r && !r.endTag && e._setEndLocation(n, t)
  9838. }
  9839. }
  9840. }
  9841. }
  9842. function Vc(e, t) {
  9843. e._err(t, Eo.missingDoctype, !0), e.treeAdapter.setDocumentMode(e.document, Ro.QUIRKS), e.insertionMode = Rc.BEFORE_HTML, e._processToken(t)
  9844. }
  9845. function Wc(e, t) {
  9846. e._insertFakeRootElement(), e.insertionMode = Rc.BEFORE_HEAD, e._processToken(t)
  9847. }
  9848. function Qc(e, t) {
  9849. e._insertFakeElement(Mo.HEAD, Po.HEAD), e.headElement = e.openElements.current, e.insertionMode = Rc.IN_HEAD, e._processToken(t)
  9850. }
  9851. function Xc(e, t) {
  9852. switch (t.tagID) {
  9853. case Po.HTML:
  9854. ol(e, t);
  9855. break;
  9856. case Po.BASE:
  9857. case Po.BASEFONT:
  9858. case Po.BGSOUND:
  9859. case Po.LINK:
  9860. case Po.META:
  9861. e._appendElement(t, vo.HTML), t.ackSelfClosing = !0;
  9862. break;
  9863. case Po.TITLE:
  9864. e._switchToTextParsing(t, jo.RCDATA);
  9865. break;
  9866. case Po.NOSCRIPT:
  9867. e.options.scriptingEnabled ? e._switchToTextParsing(t, jo.RAWTEXT) : (e._insertElement(t, vo.HTML), e.insertionMode = Rc.IN_HEAD_NO_SCRIPT);
  9868. break;
  9869. case Po.NOFRAMES:
  9870. case Po.STYLE:
  9871. e._switchToTextParsing(t, jo.RAWTEXT);
  9872. break;
  9873. case Po.SCRIPT:
  9874. e._switchToTextParsing(t, jo.SCRIPT_DATA);
  9875. break;
  9876. case Po.TEMPLATE:
  9877. e._insertTemplate(t), e.activeFormattingElements.insertMarker(), e.framesetOk = !1, e.insertionMode = Rc.IN_TEMPLATE, e.tmplInsertionModeStack.unshift(Rc.IN_TEMPLATE);
  9878. break;
  9879. case Po.HEAD:
  9880. e._err(t, Eo.misplacedStartTagForHeadElement);
  9881. break;
  9882. default:
  9883. zc(e, t)
  9884. }
  9885. }
  9886. function $c(e, t) {
  9887. 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)
  9888. }
  9889. function zc(e, t) {
  9890. e.openElements.pop(), e.insertionMode = Rc.AFTER_HEAD, e._processToken(t)
  9891. }
  9892. function Jc(e, t) {
  9893. const n = t.type === To.EOF ? Eo.openElementsLeftAfterEof : Eo.disallowedContentInNoscriptInHead;
  9894. e._err(t, n), e.openElements.pop(), e.insertionMode = Rc.IN_HEAD, e._processToken(t)
  9895. }
  9896. function Zc(e, t) {
  9897. e._insertFakeElement(Mo.BODY, Po.BODY), e.insertionMode = Rc.IN_BODY, el(e, t)
  9898. }
  9899. function el(e, t) {
  9900. switch (t.type) {
  9901. case To.CHARACTER:
  9902. nl(e, t);
  9903. break;
  9904. case To.WHITESPACE_CHARACTER:
  9905. tl(e, t);
  9906. break;
  9907. case To.COMMENT:
  9908. Kc(e, t);
  9909. break;
  9910. case To.START_TAG:
  9911. ol(e, t);
  9912. break;
  9913. case To.END_TAG:
  9914. ll(e, t);
  9915. break;
  9916. case To.EOF:
  9917. hl(e, t)
  9918. }
  9919. }
  9920. function tl(e, t) {
  9921. e._reconstructActiveFormattingElements(), e._insertCharacters(t)
  9922. }
  9923. function nl(e, t) {
  9924. e._reconstructActiveFormattingElements(), e._insertCharacters(t), e.framesetOk = !1
  9925. }
  9926. function rl(e, t) {
  9927. e._reconstructActiveFormattingElements(), e._appendElement(t, vo.HTML), e.framesetOk = !1, t.ackSelfClosing = !0
  9928. }
  9929. function il(e) {
  9930. const t = _o(e, Do.TYPE);
  9931. return null != t && "hidden" === t.toLowerCase()
  9932. }
  9933. function sl(e, t) {
  9934. e._switchToTextParsing(t, jo.RAWTEXT)
  9935. }
  9936. function al(e, t) {
  9937. e._reconstructActiveFormattingElements(), e._insertElement(t, vo.HTML)
  9938. }
  9939. function ol(e, t) {
  9940. switch (t.tagID) {
  9941. case Po.I:
  9942. case Po.S:
  9943. case Po.B:
  9944. case Po.U:
  9945. case Po.EM:
  9946. case Po.TT:
  9947. case Po.BIG:
  9948. case Po.CODE:
  9949. case Po.FONT:
  9950. case Po.SMALL:
  9951. case Po.STRIKE:
  9952. case Po.STRONG:
  9953. ! function(e, t) {
  9954. e._reconstructActiveFormattingElements(), e._insertElement(t, vo.HTML), e.activeFormattingElements.pushElement(e.openElements.current, t)
  9955. }(e, t);
  9956. break;
  9957. case Po.A:
  9958. ! function(e, t) {
  9959. const n = e.activeFormattingElements.getElementEntryInScopeWithTagName(Mo.A);
  9960. 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)
  9961. }(e, t);
  9962. break;
  9963. case Po.H1:
  9964. case Po.H2:
  9965. case Po.H3:
  9966. case Po.H4:
  9967. case Po.H5:
  9968. case Po.H6:
  9969. ! function(e, t) {
  9970. e.openElements.hasInButtonScope(Po.P) && e._closePElement(), Go(e.openElements.currentTagId) && e.openElements.pop(), e._insertElement(t, vo.HTML)
  9971. }(e, t);
  9972. break;
  9973. case Po.P:
  9974. case Po.DL:
  9975. case Po.OL:
  9976. case Po.UL:
  9977. case Po.DIV:
  9978. case Po.DIR:
  9979. case Po.NAV:
  9980. case Po.MAIN:
  9981. case Po.MENU:
  9982. case Po.ASIDE:
  9983. case Po.CENTER:
  9984. case Po.FIGURE:
  9985. case Po.FOOTER:
  9986. case Po.HEADER:
  9987. case Po.HGROUP:
  9988. case Po.DIALOG:
  9989. case Po.DETAILS:
  9990. case Po.ADDRESS:
  9991. case Po.ARTICLE:
  9992. case Po.SECTION:
  9993. case Po.SUMMARY:
  9994. case Po.FIELDSET:
  9995. case Po.BLOCKQUOTE:
  9996. case Po.FIGCAPTION:
  9997. ! function(e, t) {
  9998. e.openElements.hasInButtonScope(Po.P) && e._closePElement(), e._insertElement(t, vo.HTML)
  9999. }(e, t);
  10000. break;
  10001. case Po.LI:
  10002. case Po.DD:
  10003. case Po.DT:
  10004. ! function(e, t) {
  10005. e.framesetOk = !1;
  10006. const n = t.tagID;
  10007. for (let t = e.openElements.stackTop; t >= 0; t--) {
  10008. const r = e.openElements.tagIDs[t];
  10009. if (n === Po.LI && r === Po.LI || (n === Po.DD || n === Po.DT) && (r === Po.DD || r === Po.DT)) {
  10010. e.openElements.generateImpliedEndTagsWithExclusion(r), e.openElements.popUntilTagNamePopped(r);
  10011. break
  10012. }
  10013. if (r !== Po.ADDRESS && r !== Po.DIV && r !== Po.P && e._isSpecialElement(e.openElements.items[t], r)) break
  10014. }
  10015. e.openElements.hasInButtonScope(Po.P) && e._closePElement(), e._insertElement(t, vo.HTML)
  10016. }(e, t);
  10017. break;
  10018. case Po.BR:
  10019. case Po.IMG:
  10020. case Po.WBR:
  10021. case Po.AREA:
  10022. case Po.EMBED:
  10023. case Po.KEYGEN:
  10024. rl(e, t);
  10025. break;
  10026. case Po.HR:
  10027. ! function(e, t) {
  10028. e.openElements.hasInButtonScope(Po.P) && e._closePElement(), e._appendElement(t, vo.HTML), e.framesetOk = !1, t.ackSelfClosing = !0
  10029. }(e, t);
  10030. break;
  10031. case Po.RB:
  10032. case Po.RTC:
  10033. ! function(e, t) {
  10034. e.openElements.hasInScope(Po.RUBY) && e.openElements.generateImpliedEndTags(), e._insertElement(t, vo.HTML)
  10035. }(e, t);
  10036. break;
  10037. case Po.RT:
  10038. case Po.RP:
  10039. ! function(e, t) {
  10040. e.openElements.hasInScope(Po.RUBY) && e.openElements.generateImpliedEndTagsWithExclusion(Po.RTC), e._insertElement(t, vo.HTML)
  10041. }(e, t);
  10042. break;
  10043. case Po.PRE:
  10044. case Po.LISTING:
  10045. ! function(e, t) {
  10046. e.openElements.hasInButtonScope(Po.P) && e._closePElement(), e._insertElement(t, vo.HTML), e.skipNextNewLine = !0, e.framesetOk = !1
  10047. }(e, t);
  10048. break;
  10049. case Po.XMP:
  10050. ! function(e, t) {
  10051. e.openElements.hasInButtonScope(Po.P) && e._closePElement(), e._reconstructActiveFormattingElements(), e.framesetOk = !1, e._switchToTextParsing(t, jo.RAWTEXT)
  10052. }(e, t);
  10053. break;
  10054. case Po.SVG:
  10055. ! function(e, t) {
  10056. e._reconstructActiveFormattingElements(), kc(t), vc(t), t.selfClosing ? e._appendElement(t, vo.SVG) : e._insertElement(t, vo.SVG), t.ackSelfClosing = !0
  10057. }(e, t);
  10058. break;
  10059. case Po.HTML:
  10060. ! function(e, t) {
  10061. 0 === e.openElements.tmplCount && e.treeAdapter.adoptAttributes(e.openElements.items[0], t.attrs)
  10062. }(e, t);
  10063. break;
  10064. case Po.BASE:
  10065. case Po.LINK:
  10066. case Po.META:
  10067. case Po.STYLE:
  10068. case Po.TITLE:
  10069. case Po.SCRIPT:
  10070. case Po.BGSOUND:
  10071. case Po.BASEFONT:
  10072. case Po.TEMPLATE:
  10073. Xc(e, t);
  10074. break;
  10075. case Po.BODY:
  10076. ! function(e, t) {
  10077. const n = e.openElements.tryPeekProperlyNestedBodyElement();
  10078. n && 0 === e.openElements.tmplCount && (e.framesetOk = !1, e.treeAdapter.adoptAttributes(n, t.attrs))
  10079. }(e, t);
  10080. break;
  10081. case Po.FORM:
  10082. ! function(e, t) {
  10083. const n = e.openElements.tmplCount > 0;
  10084. e.formElement && !n || (e.openElements.hasInButtonScope(Po.P) && e._closePElement(), e._insertElement(t, vo.HTML), n || (e.formElement = e.openElements.current))
  10085. }(e, t);
  10086. break;
  10087. case Po.NOBR:
  10088. ! function(e, t) {
  10089. e._reconstructActiveFormattingElements(), e.openElements.hasInScope(Po.NOBR) && (qc(e, t), e._reconstructActiveFormattingElements()), e._insertElement(t, vo.HTML), e.activeFormattingElements.pushElement(e.openElements.current, t)
  10090. }(e, t);
  10091. break;
  10092. case Po.MATH:
  10093. ! function(e, t) {
  10094. e._reconstructActiveFormattingElements(), Lc(t), vc(t), t.selfClosing ? e._appendElement(t, vo.MATHML) : e._insertElement(t, vo.MATHML), t.ackSelfClosing = !0
  10095. }(e, t);
  10096. break;
  10097. case Po.TABLE:
  10098. ! function(e, t) {
  10099. 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
  10100. }(e, t);
  10101. break;
  10102. case Po.INPUT:
  10103. ! function(e, t) {
  10104. e._reconstructActiveFormattingElements(), e._appendElement(t, vo.HTML), il(t) || (e.framesetOk = !1), t.ackSelfClosing = !0
  10105. }(e, t);
  10106. break;
  10107. case Po.PARAM:
  10108. case Po.TRACK:
  10109. case Po.SOURCE:
  10110. ! function(e, t) {
  10111. e._appendElement(t, vo.HTML), t.ackSelfClosing = !0
  10112. }(e, t);
  10113. break;
  10114. case Po.IMAGE:
  10115. ! function(e, t) {
  10116. t.tagName = Mo.IMG, t.tagID = Po.IMG, rl(e, t)
  10117. }(e, t);
  10118. break;
  10119. case Po.BUTTON:
  10120. ! function(e, t) {
  10121. e.openElements.hasInScope(Po.BUTTON) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(Po.BUTTON)), e._reconstructActiveFormattingElements(), e._insertElement(t, vo.HTML), e.framesetOk = !1
  10122. }(e, t);
  10123. break;
  10124. case Po.APPLET:
  10125. case Po.OBJECT:
  10126. case Po.MARQUEE:
  10127. ! function(e, t) {
  10128. e._reconstructActiveFormattingElements(), e._insertElement(t, vo.HTML), e.activeFormattingElements.insertMarker(), e.framesetOk = !1
  10129. }(e, t);
  10130. break;
  10131. case Po.IFRAME:
  10132. ! function(e, t) {
  10133. e.framesetOk = !1, e._switchToTextParsing(t, jo.RAWTEXT)
  10134. }(e, t);
  10135. break;
  10136. case Po.SELECT:
  10137. ! function(e, t) {
  10138. 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
  10139. }(e, t);
  10140. break;
  10141. case Po.OPTION:
  10142. case Po.OPTGROUP:
  10143. ! function(e, t) {
  10144. e.openElements.currentTagId === Po.OPTION && e.openElements.pop(), e._reconstructActiveFormattingElements(), e._insertElement(t, vo.HTML)
  10145. }(e, t);
  10146. break;
  10147. case Po.NOEMBED:
  10148. sl(e, t);
  10149. break;
  10150. case Po.FRAMESET:
  10151. ! function(e, t) {
  10152. const n = e.openElements.tryPeekProperlyNestedBodyElement();
  10153. e.framesetOk && n && (e.treeAdapter.detachNode(n), e.openElements.popAllUpToHtmlElement(), e._insertElement(t, vo.HTML), e.insertionMode = Rc.IN_FRAMESET)
  10154. }(e, t);
  10155. break;
  10156. case Po.TEXTAREA:
  10157. ! function(e, t) {
  10158. e._insertElement(t, vo.HTML), e.skipNextNewLine = !0, e.tokenizer.state = jo.RCDATA, e.originalInsertionMode = e.insertionMode, e.framesetOk = !1, e.insertionMode = Rc.TEXT
  10159. }(e, t);
  10160. break;
  10161. case Po.NOSCRIPT:
  10162. e.options.scriptingEnabled ? sl(e, t) : al(e, t);
  10163. break;
  10164. case Po.PLAINTEXT:
  10165. ! function(e, t) {
  10166. e.openElements.hasInButtonScope(Po.P) && e._closePElement(), e._insertElement(t, vo.HTML), e.tokenizer.state = jo.PLAINTEXT
  10167. }(e, t);
  10168. break;
  10169. case Po.COL:
  10170. case Po.TH:
  10171. case Po.TD:
  10172. case Po.TR:
  10173. case Po.HEAD:
  10174. case Po.FRAME:
  10175. case Po.TBODY:
  10176. case Po.TFOOT:
  10177. case Po.THEAD:
  10178. case Po.CAPTION:
  10179. case Po.COLGROUP:
  10180. break;
  10181. default:
  10182. al(e, t)
  10183. }
  10184. }
  10185. function cl(e, t) {
  10186. const n = t.tagName, r = t.tagID;
  10187. for (let t = e.openElements.stackTop; t > 0; t--) {
  10188. const i = e.openElements.items[t], s = e.openElements.tagIDs[t];
  10189. if (r === s && (r !== Po.UNKNOWN || e.treeAdapter.getTagName(i) === n)) {
  10190. e.openElements.generateImpliedEndTagsWithExclusion(r), e.openElements.stackTop >= t && e.openElements.shortenToLength(t);
  10191. break
  10192. }
  10193. if (e._isSpecialElement(i, s)) break
  10194. }
  10195. }
  10196. function ll(e, t) {
  10197. switch (t.tagID) {
  10198. case Po.A:
  10199. case Po.B:
  10200. case Po.I:
  10201. case Po.S:
  10202. case Po.U:
  10203. case Po.EM:
  10204. case Po.TT:
  10205. case Po.BIG:
  10206. case Po.CODE:
  10207. case Po.FONT:
  10208. case Po.NOBR:
  10209. case Po.SMALL:
  10210. case Po.STRIKE:
  10211. case Po.STRONG:
  10212. qc(e, t);
  10213. break;
  10214. case Po.P:
  10215. ! function(e) {
  10216. e.openElements.hasInButtonScope(Po.P) || e._insertFakeElement(Mo.P, Po.P), e._closePElement()
  10217. }(e);
  10218. break;
  10219. case Po.DL:
  10220. case Po.UL:
  10221. case Po.OL:
  10222. case Po.DIR:
  10223. case Po.DIV:
  10224. case Po.NAV:
  10225. case Po.PRE:
  10226. case Po.MAIN:
  10227. case Po.MENU:
  10228. case Po.ASIDE:
  10229. case Po.BUTTON:
  10230. case Po.CENTER:
  10231. case Po.FIGURE:
  10232. case Po.FOOTER:
  10233. case Po.HEADER:
  10234. case Po.HGROUP:
  10235. case Po.DIALOG:
  10236. case Po.ADDRESS:
  10237. case Po.ARTICLE:
  10238. case Po.DETAILS:
  10239. case Po.SECTION:
  10240. case Po.SUMMARY:
  10241. case Po.LISTING:
  10242. case Po.FIELDSET:
  10243. case Po.BLOCKQUOTE:
  10244. case Po.FIGCAPTION:
  10245. ! function(e, t) {
  10246. const n = t.tagID;
  10247. e.openElements.hasInScope(n) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(n))
  10248. }(e, t);
  10249. break;
  10250. case Po.LI:
  10251. ! function(e) {
  10252. e.openElements.hasInListItemScope(Po.LI) && (e.openElements.generateImpliedEndTagsWithExclusion(Po.LI), e.openElements.popUntilTagNamePopped(Po.LI))
  10253. }(e);
  10254. break;
  10255. case Po.DD:
  10256. case Po.DT:
  10257. ! function(e, t) {
  10258. const n = t.tagID;
  10259. e.openElements.hasInScope(n) && (e.openElements.generateImpliedEndTagsWithExclusion(n), e.openElements.popUntilTagNamePopped(n))
  10260. }(e, t);
  10261. break;
  10262. case Po.H1:
  10263. case Po.H2:
  10264. case Po.H3:
  10265. case Po.H4:
  10266. case Po.H5:
  10267. case Po.H6:
  10268. ! function(e) {
  10269. e.openElements.hasNumberedHeaderInScope() && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilNumberedHeaderPopped())
  10270. }(e);
  10271. break;
  10272. case Po.BR:
  10273. ! function(e) {
  10274. e._reconstructActiveFormattingElements(), e._insertFakeElement(Mo.BR, Po.BR), e.openElements.pop(), e.framesetOk = !1
  10275. }(e);
  10276. break;
  10277. case Po.BODY:
  10278. ! function(e, t) {
  10279. if (e.openElements.hasInScope(Po.BODY) && (e.insertionMode = Rc.AFTER_BODY, e.options.sourceCodeLocationInfo)) {
  10280. const n = e.openElements.tryPeekProperlyNestedBodyElement();
  10281. n && e._setEndLocation(n, t)
  10282. }
  10283. }(e, t);
  10284. break;
  10285. case Po.HTML:
  10286. ! function(e, t) {
  10287. e.openElements.hasInScope(Po.BODY) && (e.insertionMode = Rc.AFTER_BODY, Ll(e, t))
  10288. }(e, t);
  10289. break;
  10290. case Po.FORM:
  10291. ! function(e) {
  10292. const t = e.openElements.tmplCount > 0, {
  10293. formElement: n
  10294. } = e;
  10295. 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))
  10296. }(e);
  10297. break;
  10298. case Po.APPLET:
  10299. case Po.OBJECT:
  10300. case Po.MARQUEE:
  10301. ! function(e, t) {
  10302. const n = t.tagID;
  10303. e.openElements.hasInScope(n) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(n), e.activeFormattingElements.clearToLastMarker())
  10304. }(e, t);
  10305. break;
  10306. case Po.TEMPLATE:
  10307. $c(e, t);
  10308. break;
  10309. default:
  10310. cl(e, t)
  10311. }
  10312. }
  10313. function hl(e, t) {
  10314. e.tmplInsertionModeStack.length > 0 ? yl(e, t) : jc(e, t)
  10315. }
  10316. function ul(e, t) {
  10317. 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) {
  10318. case To.CHARACTER:
  10319. ml(e, t);
  10320. break;
  10321. case To.WHITESPACE_CHARACTER:
  10322. El(e, t)
  10323. } else dl(e, t)
  10324. }
  10325. function pl(e, t) {
  10326. switch (t.tagID) {
  10327. case Po.TD:
  10328. case Po.TH:
  10329. case Po.TR:
  10330. ! function(e, t) {
  10331. e.openElements.clearBackToTableContext(), e._insertFakeElement(Mo.TBODY, Po.TBODY), e.insertionMode = Rc.IN_TABLE_BODY, Nl(e, t)
  10332. }(e, t);
  10333. break;
  10334. case Po.STYLE:
  10335. case Po.SCRIPT:
  10336. case Po.TEMPLATE:
  10337. Xc(e, t);
  10338. break;
  10339. case Po.COL:
  10340. ! function(e, t) {
  10341. e.openElements.clearBackToTableContext(), e._insertFakeElement(Mo.COLGROUP, Po.COLGROUP), e.insertionMode = Rc.IN_COLUMN_GROUP, Al(e, t)
  10342. }(e, t);
  10343. break;
  10344. case Po.FORM:
  10345. ! function(e, t) {
  10346. e.formElement || 0 !== e.openElements.tmplCount || (e._insertElement(t, vo.HTML), e.formElement = e.openElements.current, e.openElements.pop())
  10347. }(e, t);
  10348. break;
  10349. case Po.TABLE:
  10350. ! function(e, t) {
  10351. e.openElements.hasInTableScope(Po.TABLE) && (e.openElements.popUntilTagNamePopped(Po.TABLE), e._resetInsertionMode(), e._processStartTag(t))
  10352. }(e, t);
  10353. break;
  10354. case Po.TBODY:
  10355. case Po.TFOOT:
  10356. case Po.THEAD:
  10357. ! function(e, t) {
  10358. e.openElements.clearBackToTableContext(), e._insertElement(t, vo.HTML), e.insertionMode = Rc.IN_TABLE_BODY
  10359. }(e, t);
  10360. break;
  10361. case Po.INPUT:
  10362. ! function(e, t) {
  10363. il(t) ? e._appendElement(t, vo.HTML) : dl(e, t), t.ackSelfClosing = !0
  10364. }(e, t);
  10365. break;
  10366. case Po.CAPTION:
  10367. ! function(e, t) {
  10368. e.openElements.clearBackToTableContext(), e.activeFormattingElements.insertMarker(), e._insertElement(t, vo.HTML), e.insertionMode = Rc.IN_CAPTION
  10369. }(e, t);
  10370. break;
  10371. case Po.COLGROUP:
  10372. ! function(e, t) {
  10373. e.openElements.clearBackToTableContext(), e._insertElement(t, vo.HTML), e.insertionMode = Rc.IN_COLUMN_GROUP
  10374. }(e, t);
  10375. break;
  10376. default:
  10377. dl(e, t)
  10378. }
  10379. }
  10380. function fl(e, t) {
  10381. switch (t.tagID) {
  10382. case Po.TABLE:
  10383. e.openElements.hasInTableScope(Po.TABLE) && (e.openElements.popUntilTagNamePopped(Po.TABLE), e._resetInsertionMode());
  10384. break;
  10385. case Po.TEMPLATE:
  10386. $c(e, t);
  10387. break;
  10388. case Po.BODY:
  10389. case Po.CAPTION:
  10390. case Po.COL:
  10391. case Po.COLGROUP:
  10392. case Po.HTML:
  10393. case Po.TBODY:
  10394. case Po.TD:
  10395. case Po.TFOOT:
  10396. case Po.TH:
  10397. case Po.THEAD:
  10398. case Po.TR:
  10399. break;
  10400. default:
  10401. dl(e, t)
  10402. }
  10403. }
  10404. function dl(e, t) {
  10405. const n = e.fosterParentingEnabled;
  10406. e.fosterParentingEnabled = !0, el(e, t), e.fosterParentingEnabled = n
  10407. }
  10408. function El(e, t) {
  10409. e.pendingCharacterTokens.push(t)
  10410. }
  10411. function ml(e, t) {
  10412. e.pendingCharacterTokens.push(t), e.hasNonWhitespacePendingCharacterToken = !0
  10413. }
  10414. function Tl(e, t) {
  10415. let n = 0;
  10416. if (e.hasNonWhitespacePendingCharacterToken) for (; n < e.pendingCharacterTokens.length; n++) dl(e, e.pendingCharacterTokens[n]);
  10417. else for (; n < e.pendingCharacterTokens.length; n++) e._insertCharacters(e.pendingCharacterTokens[n]);
  10418. e.insertionMode = e.originalInsertionMode, e._processToken(t)
  10419. }
  10420. const _l = new Set([Po.CAPTION, Po.COL, Po.COLGROUP, Po.TBODY, Po.TD, Po.TFOOT, Po.TH, Po.THEAD, Po.TR]);
  10421. function Al(e, t) {
  10422. switch (t.tagID) {
  10423. case Po.HTML:
  10424. ol(e, t);
  10425. break;
  10426. case Po.COL:
  10427. e._appendElement(t, vo.HTML), t.ackSelfClosing = !0;
  10428. break;
  10429. case Po.TEMPLATE:
  10430. Xc(e, t);
  10431. break;
  10432. default:
  10433. gl(e, t)
  10434. }
  10435. }
  10436. function gl(e, t) {
  10437. e.openElements.currentTagId === Po.COLGROUP && (e.openElements.pop(), e.insertionMode = Rc.IN_TABLE, e._processToken(t))
  10438. }
  10439. function Nl(e, t) {
  10440. switch (t.tagID) {
  10441. case Po.TR:
  10442. e.openElements.clearBackToTableBodyContext(), e._insertElement(t, vo.HTML), e.insertionMode = Rc.IN_ROW;
  10443. break;
  10444. case Po.TH:
  10445. case Po.TD:
  10446. e.openElements.clearBackToTableBodyContext(), e._insertFakeElement(Mo.TR, Po.TR), e.insertionMode = Rc.IN_ROW, Il(e, t);
  10447. break;
  10448. case Po.CAPTION:
  10449. case Po.COL:
  10450. case Po.COLGROUP:
  10451. case Po.TBODY:
  10452. case Po.TFOOT:
  10453. case Po.THEAD:
  10454. e.openElements.hasTableBodyContextInTableScope() && (e.openElements.clearBackToTableBodyContext(), e.openElements.pop(), e.insertionMode = Rc.IN_TABLE, pl(e, t));
  10455. break;
  10456. default:
  10457. pl(e, t)
  10458. }
  10459. }
  10460. function Cl(e, t) {
  10461. const n = t.tagID;
  10462. switch (t.tagID) {
  10463. case Po.TBODY:
  10464. case Po.TFOOT:
  10465. case Po.THEAD:
  10466. e.openElements.hasInTableScope(n) && (e.openElements.clearBackToTableBodyContext(), e.openElements.pop(), e.insertionMode = Rc.IN_TABLE);
  10467. break;
  10468. case Po.TABLE:
  10469. e.openElements.hasTableBodyContextInTableScope() && (e.openElements.clearBackToTableBodyContext(), e.openElements.pop(), e.insertionMode = Rc.IN_TABLE, fl(e, t));
  10470. break;
  10471. case Po.BODY:
  10472. case Po.CAPTION:
  10473. case Po.COL:
  10474. case Po.COLGROUP:
  10475. case Po.HTML:
  10476. case Po.TD:
  10477. case Po.TH:
  10478. case Po.TR:
  10479. break;
  10480. default:
  10481. fl(e, t)
  10482. }
  10483. }
  10484. function Il(e, t) {
  10485. switch (t.tagID) {
  10486. case Po.TH:
  10487. case Po.TD:
  10488. e.openElements.clearBackToTableRowContext(), e._insertElement(t, vo.HTML), e.insertionMode = Rc.IN_CELL, e.activeFormattingElements.insertMarker();
  10489. break;
  10490. case Po.CAPTION:
  10491. case Po.COL:
  10492. case Po.COLGROUP:
  10493. case Po.TBODY:
  10494. case Po.TFOOT:
  10495. case Po.THEAD:
  10496. case Po.TR:
  10497. e.openElements.hasInTableScope(Po.TR) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = Rc.IN_TABLE_BODY, Nl(e, t));
  10498. break;
  10499. default:
  10500. pl(e, t)
  10501. }
  10502. }
  10503. function Sl(e, t) {
  10504. switch (t.tagID) {
  10505. case Po.TR:
  10506. e.openElements.hasInTableScope(Po.TR) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = Rc.IN_TABLE_BODY);
  10507. break;
  10508. case Po.TABLE:
  10509. e.openElements.hasInTableScope(Po.TR) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = Rc.IN_TABLE_BODY, Cl(e, t));
  10510. break;
  10511. case Po.TBODY:
  10512. case Po.TFOOT:
  10513. case Po.THEAD:
  10514. (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));
  10515. break;
  10516. case Po.BODY:
  10517. case Po.CAPTION:
  10518. case Po.COL:
  10519. case Po.COLGROUP:
  10520. case Po.HTML:
  10521. case Po.TD:
  10522. case Po.TH:
  10523. break;
  10524. default:
  10525. fl(e, t)
  10526. }
  10527. }
  10528. function bl(e, t) {
  10529. switch (t.tagID) {
  10530. case Po.HTML:
  10531. ol(e, t);
  10532. break;
  10533. case Po.OPTION:
  10534. e.openElements.currentTagId === Po.OPTION && e.openElements.pop(), e._insertElement(t, vo.HTML);
  10535. break;
  10536. case Po.OPTGROUP:
  10537. e.openElements.currentTagId === Po.OPTION && e.openElements.pop(), e.openElements.currentTagId === Po.OPTGROUP && e.openElements.pop(), e._insertElement(t, vo.HTML);
  10538. break;
  10539. case Po.INPUT:
  10540. case Po.KEYGEN:
  10541. case Po.TEXTAREA:
  10542. case Po.SELECT:
  10543. e.openElements.hasInSelectScope(Po.SELECT) && (e.openElements.popUntilTagNamePopped(Po.SELECT), e._resetInsertionMode(), t.tagID !== Po.SELECT && e._processStartTag(t));
  10544. break;
  10545. case Po.SCRIPT:
  10546. case Po.TEMPLATE:
  10547. Xc(e, t)
  10548. }
  10549. }
  10550. function Ol(e, t) {
  10551. switch (t.tagID) {
  10552. case Po.OPTGROUP:
  10553. 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();
  10554. break;
  10555. case Po.OPTION:
  10556. e.openElements.currentTagId === Po.OPTION && e.openElements.pop();
  10557. break;
  10558. case Po.SELECT:
  10559. e.openElements.hasInSelectScope(Po.SELECT) && (e.openElements.popUntilTagNamePopped(Po.SELECT), e._resetInsertionMode());
  10560. break;
  10561. case Po.TEMPLATE:
  10562. $c(e, t)
  10563. }
  10564. }
  10565. function yl(e, t) {
  10566. e.openElements.tmplCount > 0 ? (e.openElements.popUntilTagNamePopped(Po.TEMPLATE), e.activeFormattingElements.clearToLastMarker(), e.tmplInsertionModeStack.shift(), e._resetInsertionMode(), e.onEof(t)) : jc(e, t)
  10567. }
  10568. function Ll(e, t) {
  10569. var n;
  10570. if (t.tagID === Po.HTML) {
  10571. if (e.fragmentContext || (e.insertionMode = Rc.AFTER_AFTER_BODY), e.options.sourceCodeLocationInfo && e.openElements.tagIDs[0] === Po.HTML) {
  10572. e._setEndLocation(e.openElements.items[0], t);
  10573. const r = e.openElements.items[1];
  10574. r && !(null === (n = e.treeAdapter.getNodeSourceCodeLocation(r)) || void 0 === n ? void 0 : n.endTag) && e._setEndLocation(r, t)
  10575. }
  10576. } else kl(e, t)
  10577. }
  10578. function kl(e, t) {
  10579. e.insertionMode = Rc.IN_BODY, el(e, t)
  10580. }
  10581. function vl(e, t) {
  10582. e.insertionMode = Rc.IN_BODY, el(e, t)
  10583. }
  10584. function Dl(e) {
  10585. for (; e.treeAdapter.getNamespaceURI(e.openElements.current) !== vo.HTML && !e._isIntegrationPoint(e.openElements.currentTagId, e.openElements.current);) e.openElements.pop()
  10586. }
  10587. var Rl = Ke((function(e, t) {
  10588. Object.defineProperty(t, "__esModule", {
  10589. value: !0
  10590. }), t.escapeText = t.escapeAttribute = t.escapeUTF8 = t.escape = t.encodeXML = t.getCodePoint = t.xmlReplacer = void 0, t.xmlReplacer = /["&'<>$\x80-\uFFFF]/g;
  10591. var n = new Map([
  10592. [34, "&quot;"],
  10593. [38, "&amp;"],
  10594. [39, "&apos;"],
  10595. [60, "&lt;"],
  10596. [62, "&gt;"]
  10597. ]);
  10598. function r(e) {
  10599. for (var r, i = "", s = 0; null !== (r = t.xmlReplacer.exec(e));) {
  10600. var a = r.index,
  10601. o = e.charCodeAt(a),
  10602. c = n.get(o);
  10603. void 0 !== c ? (i += e.substring(s, a) + c, s = a + 1) : (i += "".concat(e.substring(s, a), "&#x")
  10604. .concat((0, t.getCodePoint)(e, a)
  10605. .toString(16), ";"), s = t.xmlReplacer.lastIndex += Number(55296 == (64512 & o)))
  10606. }
  10607. return i + e.substr(s)
  10608. }
  10609. function i(e, t) {
  10610. return function(n) {
  10611. 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;
  10612. return s + n.substring(i)
  10613. }
  10614. }
  10615. t.getCodePoint = null != String.prototype.codePointAt ? function(e, t) {
  10616. return e.codePointAt(t)
  10617. } : function(e, t) {
  10618. return 55296 == (64512 & e.charCodeAt(t)) ? 1024 * (e.charCodeAt(t) - 55296) + e.charCodeAt(t + 1) - 56320 + 65536 : e.charCodeAt(t)
  10619. }, t.encodeXML = r, t.escape = r, t.escapeUTF8 = i(/[&<>'"]/g, n), t.escapeAttribute = i(/["&\u00A0]/g, new Map([
  10620. [34, "&quot;"],
  10621. [38, "&amp;"],
  10622. [160, "&nbsp;"]
  10623. ])), t.escapeText = i(/[&<>\u00A0]/g, new Map([
  10624. [38, "&amp;"],
  10625. [60, "&lt;"],
  10626. [62, "&gt;"],
  10627. [160, "&nbsp;"]
  10628. ]))
  10629. }));
  10630. qe(Rl);
  10631. var Ml = Rl.escapeText,
  10632. Pl = Rl.escapeAttribute;
  10633. Rl.escapeUTF8, Rl.escape, Rl.encodeXML, Rl.getCodePoint, Rl.xmlReplacer;
  10634. 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]);
  10635. const wl = {
  10636. treeAdapter: Ec,
  10637. scriptingEnabled: !0
  10638. };
  10639. function Bl(e, t) {
  10640. return Fl(e, {...wl, ...t
  10641. })
  10642. }
  10643. function Fl(e, t) {
  10644. return t.treeAdapter.isElementNode(e) ? function(e, t) {
  10645. const n = t.treeAdapter.getTagName(e);
  10646. 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+=`
  10647. xml: $ {
  10648. r.name
  10649. }
  10650. `;break;case vo.XMLNS:"xmlns"!==r.name&&(n+="xmlns:"),n+=r.name;break;case vo.XLINK:n+=`
  10651. xlink: $ {
  10652. r.name
  10653. }
  10654. `;break;default:n+=`
  10655. $ {
  10656. r.prefix
  10657. }: $ {
  10658. r.name
  10659. }
  10660. `}else n+=r.name;n+=` = "${Pl(r.value)}"
  10661. `}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)?"":`
  10662. $ {
  10663. function(e, t) {
  10664. let n = "";
  10665. const r = t.treeAdapter.isElementNode(e) && t.treeAdapter.getTagName(e) === Mo.TEMPLATE && t.treeAdapter.getNamespaceURI(e) === vo.HTML ? t.treeAdapter.getTemplateContent(e) : e, i = t.treeAdapter.getChildNodes(r);
  10666. if (i) for (const e of i) n += Fl(e, t);
  10667. return n
  10668. }(e, t)
  10669. } < /${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=/\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};