Нет описания

timeline.js 339KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661
  1. /*! For license information please see timeline.js.LICENSE.txt */
  2. var TL;
  3. ( () => {
  4. var t = {
  5. 838: function(t) {
  6. t.exports = function() {
  7. "use strict";
  8. const {entries: t, setPrototypeOf: e, isFrozen: i, getPrototypeOf: a, getOwnPropertyDescriptor: s} = Object;
  9. let {freeze: n, seal: o, create: r} = Object
  10. , {apply: l, construct: h} = "undefined" != typeof Reflect && Reflect;
  11. n || (n = function(t) {
  12. return t
  13. }
  14. ),
  15. o || (o = function(t) {
  16. return t
  17. }
  18. ),
  19. l || (l = function(t, e, i) {
  20. return t.apply(e, i)
  21. }
  22. ),
  23. h || (h = function(t, e) {
  24. return new t(...e)
  25. }
  26. );
  27. const d = x(Array.prototype.forEach)
  28. , c = x(Array.prototype.pop)
  29. , u = x(Array.prototype.push)
  30. , m = x(String.prototype.toLowerCase)
  31. , _ = x(String.prototype.toString)
  32. , p = x(String.prototype.match)
  33. , f = x(String.prototype.replace)
  34. , g = x(String.prototype.indexOf)
  35. , v = x(String.prototype.trim)
  36. , y = x(Object.prototype.hasOwnProperty)
  37. , b = x(RegExp.prototype.test)
  38. , w = (k = TypeError,
  39. function() {
  40. for (var t = arguments.length, e = new Array(t), i = 0; i < t; i++)
  41. e[i] = arguments[i];
  42. return h(k, e)
  43. }
  44. );
  45. var k;
  46. function x(t) {
  47. return function(e) {
  48. for (var i = arguments.length, a = new Array(i > 1 ? i - 1 : 0), s = 1; s < i; s++)
  49. a[s - 1] = arguments[s];
  50. return l(t, e, a)
  51. }
  52. }
  53. function T(t, a) {
  54. let s = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : m;
  55. e && e(t, null);
  56. let n = a.length;
  57. for (; n--; ) {
  58. let e = a[n];
  59. if ("string" == typeof e) {
  60. const t = s(e);
  61. t !== e && (i(a) || (a[n] = t),
  62. e = t)
  63. }
  64. t[e] = !0
  65. }
  66. return t
  67. }
  68. function M(t) {
  69. for (let e = 0; e < t.length; e++)
  70. y(t, e) || (t[e] = null);
  71. return t
  72. }
  73. function E(e) {
  74. const i = r(null);
  75. for (const [a,s] of t(e))
  76. y(e, a) && (Array.isArray(s) ? i[a] = M(s) : s && "object" == typeof s && s.constructor === Object ? i[a] = E(s) : i[a] = s);
  77. return i
  78. }
  79. function L(t, e) {
  80. for (; null !== t; ) {
  81. const i = s(t, e);
  82. if (i) {
  83. if (i.get)
  84. return x(i.get);
  85. if ("function" == typeof i.value)
  86. return x(i.value)
  87. }
  88. t = a(t)
  89. }
  90. return function() {
  91. return null
  92. }
  93. }
  94. const D = n(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"])
  95. , S = n(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"])
  96. , N = n(["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"])
  97. , A = n(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"])
  98. , C = n(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"])
  99. , I = n(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"])
  100. , O = n(["#text"])
  101. , R = n(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"])
  102. , j = n(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"])
  103. , P = n(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"])
  104. , z = n(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"])
  105. , H = o(/\{\{[\w\W]*|[\w\W]*\}\}/gm)
  106. , F = o(/<%[\w\W]*|[\w\W]*%>/gm)
  107. , q = o(/\${[\w\W]*}/gm)
  108. , $ = o(/^data-[\-\w.\u00B7-\uFFFF]/)
  109. , U = o(/^aria-[\-\w]+$/)
  110. , B = o(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i)
  111. , W = o(/^(?:\w+script|data):/i)
  112. , G = o(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g)
  113. , Y = o(/^html$/i)
  114. , Z = o(/^[a-z][.\w]*(-[.\w]+)+$/i);
  115. var V = Object.freeze({
  116. __proto__: null,
  117. MUSTACHE_EXPR: H,
  118. ERB_EXPR: F,
  119. TMPLIT_EXPR: q,
  120. DATA_ATTR: $,
  121. ARIA_ATTR: U,
  122. IS_ALLOWED_URI: B,
  123. IS_SCRIPT_OR_DATA: W,
  124. ATTR_WHITESPACE: G,
  125. DOCTYPE_NAME: Y,
  126. CUSTOM_ELEMENT: Z
  127. });
  128. const X = 1
  129. , J = 3
  130. , K = 7
  131. , Q = 8
  132. , tt = 9
  133. , et = function() {
  134. return "undefined" == typeof window ? null : window
  135. };
  136. return function e() {
  137. let i = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : et();
  138. const a = t => e(t);
  139. if (a.version = "3.1.7",
  140. a.removed = [],
  141. !i || !i.document || i.document.nodeType !== tt)
  142. return a.isSupported = !1,
  143. a;
  144. let {document: s} = i;
  145. const o = s
  146. , l = o.currentScript
  147. , {DocumentFragment: h, HTMLTemplateElement: k, Node: x, Element: M, NodeFilter: H, NamedNodeMap: F=i.NamedNodeMap || i.MozNamedAttrMap, HTMLFormElement: q, DOMParser: $, trustedTypes: U} = i
  148. , W = M.prototype
  149. , G = L(W, "cloneNode")
  150. , Z = L(W, "remove")
  151. , it = L(W, "nextSibling")
  152. , at = L(W, "childNodes")
  153. , st = L(W, "parentNode");
  154. if ("function" == typeof k) {
  155. const t = s.createElement("template");
  156. t.content && t.content.ownerDocument && (s = t.content.ownerDocument)
  157. }
  158. let nt, ot = "";
  159. const {implementation: rt, createNodeIterator: lt, createDocumentFragment: ht, getElementsByTagName: dt} = s
  160. , {importNode: ct} = o;
  161. let ut = {};
  162. a.isSupported = "function" == typeof t && "function" == typeof st && rt && void 0 !== rt.createHTMLDocument;
  163. const {MUSTACHE_EXPR: mt, ERB_EXPR: _t, TMPLIT_EXPR: pt, DATA_ATTR: ft, ARIA_ATTR: gt, IS_SCRIPT_OR_DATA: vt, ATTR_WHITESPACE: yt, CUSTOM_ELEMENT: bt} = V;
  164. let {IS_ALLOWED_URI: wt} = V
  165. , kt = null;
  166. const xt = T({}, [...D, ...S, ...N, ...C, ...O]);
  167. let Tt = null;
  168. const Mt = T({}, [...R, ...j, ...P, ...z]);
  169. let Et = Object.seal(r(null, {
  170. tagNameCheck: {
  171. writable: !0,
  172. configurable: !1,
  173. enumerable: !0,
  174. value: null
  175. },
  176. attributeNameCheck: {
  177. writable: !0,
  178. configurable: !1,
  179. enumerable: !0,
  180. value: null
  181. },
  182. allowCustomizedBuiltInElements: {
  183. writable: !0,
  184. configurable: !1,
  185. enumerable: !0,
  186. value: !1
  187. }
  188. }))
  189. , Lt = null
  190. , Dt = null
  191. , St = !0
  192. , Nt = !0
  193. , At = !1
  194. , Ct = !0
  195. , It = !1
  196. , Ot = !0
  197. , Rt = !1
  198. , jt = !1
  199. , Pt = !1
  200. , zt = !1
  201. , Ht = !1
  202. , Ft = !1
  203. , qt = !0
  204. , $t = !1
  205. , Ut = !0
  206. , Bt = !1
  207. , Wt = {}
  208. , Gt = null;
  209. const Yt = T({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
  210. let Zt = null;
  211. const Vt = T({}, ["audio", "video", "img", "source", "image", "track"]);
  212. let Xt = null;
  213. const Jt = T({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"])
  214. , Kt = "http://www.w3.org/1998/Math/MathML"
  215. , Qt = "http://www.w3.org/2000/svg"
  216. , te = "http://www.w3.org/1999/xhtml";
  217. let ee = te
  218. , ie = !1
  219. , ae = null;
  220. const se = T({}, [Kt, Qt, te], _);
  221. let ne = null;
  222. const oe = ["application/xhtml+xml", "text/html"];
  223. let re = null
  224. , le = null;
  225. const he = s.createElement("form")
  226. , de = function(t) {
  227. return t instanceof RegExp || t instanceof Function
  228. }
  229. , ce = function() {
  230. let t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
  231. if (!le || le !== t) {
  232. if (t && "object" == typeof t || (t = {}),
  233. t = E(t),
  234. ne = -1 === oe.indexOf(t.PARSER_MEDIA_TYPE) ? "text/html" : t.PARSER_MEDIA_TYPE,
  235. re = "application/xhtml+xml" === ne ? _ : m,
  236. kt = y(t, "ALLOWED_TAGS") ? T({}, t.ALLOWED_TAGS, re) : xt,
  237. Tt = y(t, "ALLOWED_ATTR") ? T({}, t.ALLOWED_ATTR, re) : Mt,
  238. ae = y(t, "ALLOWED_NAMESPACES") ? T({}, t.ALLOWED_NAMESPACES, _) : se,
  239. Xt = y(t, "ADD_URI_SAFE_ATTR") ? T(E(Jt), t.ADD_URI_SAFE_ATTR, re) : Jt,
  240. Zt = y(t, "ADD_DATA_URI_TAGS") ? T(E(Vt), t.ADD_DATA_URI_TAGS, re) : Vt,
  241. Gt = y(t, "FORBID_CONTENTS") ? T({}, t.FORBID_CONTENTS, re) : Yt,
  242. Lt = y(t, "FORBID_TAGS") ? T({}, t.FORBID_TAGS, re) : {},
  243. Dt = y(t, "FORBID_ATTR") ? T({}, t.FORBID_ATTR, re) : {},
  244. Wt = !!y(t, "USE_PROFILES") && t.USE_PROFILES,
  245. St = !1 !== t.ALLOW_ARIA_ATTR,
  246. Nt = !1 !== t.ALLOW_DATA_ATTR,
  247. At = t.ALLOW_UNKNOWN_PROTOCOLS || !1,
  248. Ct = !1 !== t.ALLOW_SELF_CLOSE_IN_ATTR,
  249. It = t.SAFE_FOR_TEMPLATES || !1,
  250. Ot = !1 !== t.SAFE_FOR_XML,
  251. Rt = t.WHOLE_DOCUMENT || !1,
  252. zt = t.RETURN_DOM || !1,
  253. Ht = t.RETURN_DOM_FRAGMENT || !1,
  254. Ft = t.RETURN_TRUSTED_TYPE || !1,
  255. Pt = t.FORCE_BODY || !1,
  256. qt = !1 !== t.SANITIZE_DOM,
  257. $t = t.SANITIZE_NAMED_PROPS || !1,
  258. Ut = !1 !== t.KEEP_CONTENT,
  259. Bt = t.IN_PLACE || !1,
  260. wt = t.ALLOWED_URI_REGEXP || B,
  261. ee = t.NAMESPACE || te,
  262. Et = t.CUSTOM_ELEMENT_HANDLING || {},
  263. t.CUSTOM_ELEMENT_HANDLING && de(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (Et.tagNameCheck = t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),
  264. t.CUSTOM_ELEMENT_HANDLING && de(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (Et.attributeNameCheck = t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),
  265. t.CUSTOM_ELEMENT_HANDLING && "boolean" == typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (Et.allowCustomizedBuiltInElements = t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),
  266. It && (Nt = !1),
  267. Ht && (zt = !0),
  268. Wt && (kt = T({}, O),
  269. Tt = [],
  270. !0 === Wt.html && (T(kt, D),
  271. T(Tt, R)),
  272. !0 === Wt.svg && (T(kt, S),
  273. T(Tt, j),
  274. T(Tt, z)),
  275. !0 === Wt.svgFilters && (T(kt, N),
  276. T(Tt, j),
  277. T(Tt, z)),
  278. !0 === Wt.mathMl && (T(kt, C),
  279. T(Tt, P),
  280. T(Tt, z))),
  281. t.ADD_TAGS && (kt === xt && (kt = E(kt)),
  282. T(kt, t.ADD_TAGS, re)),
  283. t.ADD_ATTR && (Tt === Mt && (Tt = E(Tt)),
  284. T(Tt, t.ADD_ATTR, re)),
  285. t.ADD_URI_SAFE_ATTR && T(Xt, t.ADD_URI_SAFE_ATTR, re),
  286. t.FORBID_CONTENTS && (Gt === Yt && (Gt = E(Gt)),
  287. T(Gt, t.FORBID_CONTENTS, re)),
  288. Ut && (kt["#text"] = !0),
  289. Rt && T(kt, ["html", "head", "body"]),
  290. kt.table && (T(kt, ["tbody"]),
  291. delete Lt.tbody),
  292. t.TRUSTED_TYPES_POLICY) {
  293. if ("function" != typeof t.TRUSTED_TYPES_POLICY.createHTML)
  294. throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
  295. if ("function" != typeof t.TRUSTED_TYPES_POLICY.createScriptURL)
  296. throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
  297. nt = t.TRUSTED_TYPES_POLICY,
  298. ot = nt.createHTML("")
  299. } else
  300. void 0 === nt && (nt = function(t, e) {
  301. if ("object" != typeof t || "function" != typeof t.createPolicy)
  302. return null;
  303. let i = null;
  304. const a = "data-tt-policy-suffix";
  305. e && e.hasAttribute(a) && (i = e.getAttribute(a));
  306. const s = "dompurify" + (i ? "#" + i : "");
  307. try {
  308. return t.createPolicy(s, {
  309. createHTML: t => t,
  310. createScriptURL: t => t
  311. })
  312. } catch (t) {
  313. return console.warn("TrustedTypes policy " + s + " could not be created."),
  314. null
  315. }
  316. }(U, l)),
  317. null !== nt && "string" == typeof ot && (ot = nt.createHTML(""));
  318. n && n(t),
  319. le = t
  320. }
  321. }
  322. , ue = T({}, ["mi", "mo", "mn", "ms", "mtext"])
  323. , me = T({}, ["annotation-xml"])
  324. , _e = T({}, ["title", "style", "font", "a", "script"])
  325. , pe = T({}, [...S, ...N, ...A])
  326. , fe = T({}, [...C, ...I])
  327. , ge = function(t) {
  328. u(a.removed, {
  329. element: t
  330. });
  331. try {
  332. st(t).removeChild(t)
  333. } catch (e) {
  334. Z(t)
  335. }
  336. }
  337. , ve = function(t, e) {
  338. try {
  339. u(a.removed, {
  340. attribute: e.getAttributeNode(t),
  341. from: e
  342. })
  343. } catch (t) {
  344. u(a.removed, {
  345. attribute: null,
  346. from: e
  347. })
  348. }
  349. if (e.removeAttribute(t),
  350. "is" === t && !Tt[t])
  351. if (zt || Ht)
  352. try {
  353. ge(e)
  354. } catch (t) {}
  355. else
  356. try {
  357. e.setAttribute(t, "")
  358. } catch (t) {}
  359. }
  360. , ye = function(t) {
  361. let e = null
  362. , i = null;
  363. if (Pt)
  364. t = "<remove></remove>" + t;
  365. else {
  366. const e = p(t, /^[\r\n\t ]+/);
  367. i = e && e[0]
  368. }
  369. "application/xhtml+xml" === ne && ee === te && (t = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + t + "</body></html>");
  370. const a = nt ? nt.createHTML(t) : t;
  371. if (ee === te)
  372. try {
  373. e = (new $).parseFromString(a, ne)
  374. } catch (t) {}
  375. if (!e || !e.documentElement) {
  376. e = rt.createDocument(ee, "template", null);
  377. try {
  378. e.documentElement.innerHTML = ie ? ot : a
  379. } catch (t) {}
  380. }
  381. const n = e.body || e.documentElement;
  382. return t && i && n.insertBefore(s.createTextNode(i), n.childNodes[0] || null),
  383. ee === te ? dt.call(e, Rt ? "html" : "body")[0] : Rt ? e.documentElement : n
  384. }
  385. , be = function(t) {
  386. return lt.call(t.ownerDocument || t, t, H.SHOW_ELEMENT | H.SHOW_COMMENT | H.SHOW_TEXT | H.SHOW_PROCESSING_INSTRUCTION | H.SHOW_CDATA_SECTION, null)
  387. }
  388. , we = function(t) {
  389. return t instanceof q && ("string" != typeof t.nodeName || "string" != typeof t.textContent || "function" != typeof t.removeChild || !(t.attributes instanceof F) || "function" != typeof t.removeAttribute || "function" != typeof t.setAttribute || "string" != typeof t.namespaceURI || "function" != typeof t.insertBefore || "function" != typeof t.hasChildNodes)
  390. }
  391. , ke = function(t) {
  392. return "function" == typeof x && t instanceof x
  393. }
  394. , xe = function(t, e, i) {
  395. ut[t] && d(ut[t], (t => {
  396. t.call(a, e, i, le)
  397. }
  398. ))
  399. }
  400. , Te = function(t) {
  401. let e = null;
  402. if (xe("beforeSanitizeElements", t, null),
  403. we(t))
  404. return ge(t),
  405. !0;
  406. const i = re(t.nodeName);
  407. if (xe("uponSanitizeElement", t, {
  408. tagName: i,
  409. allowedTags: kt
  410. }),
  411. t.hasChildNodes() && !ke(t.firstElementChild) && b(/<[/\w]/g, t.innerHTML) && b(/<[/\w]/g, t.textContent))
  412. return ge(t),
  413. !0;
  414. if (t.nodeType === K)
  415. return ge(t),
  416. !0;
  417. if (Ot && t.nodeType === Q && b(/<[/\w]/g, t.data))
  418. return ge(t),
  419. !0;
  420. if (!kt[i] || Lt[i]) {
  421. if (!Lt[i] && Ee(i)) {
  422. if (Et.tagNameCheck instanceof RegExp && b(Et.tagNameCheck, i))
  423. return !1;
  424. if (Et.tagNameCheck instanceof Function && Et.tagNameCheck(i))
  425. return !1
  426. }
  427. if (Ut && !Gt[i]) {
  428. const e = st(t) || t.parentNode
  429. , i = at(t) || t.childNodes;
  430. if (i && e)
  431. for (let a = i.length - 1; a >= 0; --a) {
  432. const s = G(i[a], !0);
  433. s.__removalCount = (t.__removalCount || 0) + 1,
  434. e.insertBefore(s, it(t))
  435. }
  436. }
  437. return ge(t),
  438. !0
  439. }
  440. return t instanceof M && !function(t) {
  441. let e = st(t);
  442. e && e.tagName || (e = {
  443. namespaceURI: ee,
  444. tagName: "template"
  445. });
  446. const i = m(t.tagName)
  447. , a = m(e.tagName);
  448. return !!ae[t.namespaceURI] && (t.namespaceURI === Qt ? e.namespaceURI === te ? "svg" === i : e.namespaceURI === Kt ? "svg" === i && ("annotation-xml" === a || ue[a]) : Boolean(pe[i]) : t.namespaceURI === Kt ? e.namespaceURI === te ? "math" === i : e.namespaceURI === Qt ? "math" === i && me[a] : Boolean(fe[i]) : t.namespaceURI === te ? !(e.namespaceURI === Qt && !me[a]) && !(e.namespaceURI === Kt && !ue[a]) && !fe[i] && (_e[i] || !pe[i]) : !("application/xhtml+xml" !== ne || !ae[t.namespaceURI]))
  449. }(t) ? (ge(t),
  450. !0) : "noscript" !== i && "noembed" !== i && "noframes" !== i || !b(/<\/no(script|embed|frames)/i, t.innerHTML) ? (It && t.nodeType === J && (e = t.textContent,
  451. d([mt, _t, pt], (t => {
  452. e = f(e, t, " ")
  453. }
  454. )),
  455. t.textContent !== e && (u(a.removed, {
  456. element: t.cloneNode()
  457. }),
  458. t.textContent = e)),
  459. xe("afterSanitizeElements", t, null),
  460. !1) : (ge(t),
  461. !0)
  462. }
  463. , Me = function(t, e, i) {
  464. if (qt && ("id" === e || "name" === e) && (i in s || i in he))
  465. return !1;
  466. if (Nt && !Dt[e] && b(ft, e))
  467. ;
  468. else if (St && b(gt, e))
  469. ;
  470. else if (!Tt[e] || Dt[e]) {
  471. if (!(Ee(t) && (Et.tagNameCheck instanceof RegExp && b(Et.tagNameCheck, t) || Et.tagNameCheck instanceof Function && Et.tagNameCheck(t)) && (Et.attributeNameCheck instanceof RegExp && b(Et.attributeNameCheck, e) || Et.attributeNameCheck instanceof Function && Et.attributeNameCheck(e)) || "is" === e && Et.allowCustomizedBuiltInElements && (Et.tagNameCheck instanceof RegExp && b(Et.tagNameCheck, i) || Et.tagNameCheck instanceof Function && Et.tagNameCheck(i))))
  472. return !1
  473. } else if (Xt[e])
  474. ;
  475. else if (b(wt, f(i, yt, "")))
  476. ;
  477. else if ("src" !== e && "xlink:href" !== e && "href" !== e || "script" === t || 0 !== g(i, "data:") || !Zt[t])
  478. if (At && !b(vt, f(i, yt, "")))
  479. ;
  480. else if (i)
  481. return !1;
  482. return !0
  483. }
  484. , Ee = function(t) {
  485. return "annotation-xml" !== t && p(t, bt)
  486. }
  487. , Le = function(t) {
  488. xe("beforeSanitizeAttributes", t, null);
  489. const {attributes: e} = t;
  490. if (!e)
  491. return;
  492. const i = {
  493. attrName: "",
  494. attrValue: "",
  495. keepAttr: !0,
  496. allowedAttributes: Tt
  497. };
  498. let s = e.length;
  499. for (; s--; ) {
  500. const n = e[s]
  501. , {name: o, namespaceURI: r, value: l} = n
  502. , h = re(o);
  503. let u = "value" === o ? l : v(l);
  504. if (i.attrName = h,
  505. i.attrValue = u,
  506. i.keepAttr = !0,
  507. i.forceKeepAttr = void 0,
  508. xe("uponSanitizeAttribute", t, i),
  509. u = i.attrValue,
  510. i.forceKeepAttr)
  511. continue;
  512. if (ve(o, t),
  513. !i.keepAttr)
  514. continue;
  515. if (!Ct && b(/\/>/i, u)) {
  516. ve(o, t);
  517. continue
  518. }
  519. It && d([mt, _t, pt], (t => {
  520. u = f(u, t, " ")
  521. }
  522. ));
  523. const m = re(t.nodeName);
  524. if (Me(m, h, u))
  525. if (!$t || "id" !== h && "name" !== h || (ve(o, t),
  526. u = "user-content-" + u),
  527. Ot && b(/((--!?|])>)|<\/(style|title)/i, u))
  528. ve(o, t);
  529. else {
  530. if (nt && "object" == typeof U && "function" == typeof U.getAttributeType)
  531. if (r)
  532. ;
  533. else
  534. switch (U.getAttributeType(m, h)) {
  535. case "TrustedHTML":
  536. u = nt.createHTML(u);
  537. break;
  538. case "TrustedScriptURL":
  539. u = nt.createScriptURL(u)
  540. }
  541. try {
  542. r ? t.setAttributeNS(r, o, u) : t.setAttribute(o, u),
  543. we(t) ? ge(t) : c(a.removed)
  544. } catch (t) {}
  545. }
  546. }
  547. xe("afterSanitizeAttributes", t, null)
  548. }
  549. , De = function t(e) {
  550. let i = null;
  551. const a = be(e);
  552. for (xe("beforeSanitizeShadowDOM", e, null); i = a.nextNode(); )
  553. xe("uponSanitizeShadowNode", i, null),
  554. Te(i) || (i.content instanceof h && t(i.content),
  555. Le(i));
  556. xe("afterSanitizeShadowDOM", e, null)
  557. };
  558. return a.sanitize = function(t) {
  559. let e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}
  560. , i = null
  561. , s = null
  562. , n = null
  563. , r = null;
  564. if (ie = !t,
  565. ie && (t = "\x3c!--\x3e"),
  566. "string" != typeof t && !ke(t)) {
  567. if ("function" != typeof t.toString)
  568. throw w("toString is not a function");
  569. if ("string" != typeof (t = t.toString()))
  570. throw w("dirty is not a string, aborting")
  571. }
  572. if (!a.isSupported)
  573. return t;
  574. if (jt || ce(e),
  575. a.removed = [],
  576. "string" == typeof t && (Bt = !1),
  577. Bt) {
  578. if (t.nodeName) {
  579. const e = re(t.nodeName);
  580. if (!kt[e] || Lt[e])
  581. throw w("root node is forbidden and cannot be sanitized in-place")
  582. }
  583. } else if (t instanceof x)
  584. i = ye("\x3c!----\x3e"),
  585. s = i.ownerDocument.importNode(t, !0),
  586. s.nodeType === X && "BODY" === s.nodeName || "HTML" === s.nodeName ? i = s : i.appendChild(s);
  587. else {
  588. if (!zt && !It && !Rt && -1 === t.indexOf("<"))
  589. return nt && Ft ? nt.createHTML(t) : t;
  590. if (i = ye(t),
  591. !i)
  592. return zt ? null : Ft ? ot : ""
  593. }
  594. i && Pt && ge(i.firstChild);
  595. const l = be(Bt ? t : i);
  596. for (; n = l.nextNode(); )
  597. Te(n) || (n.content instanceof h && De(n.content),
  598. Le(n));
  599. if (Bt)
  600. return t;
  601. if (zt) {
  602. if (Ht)
  603. for (r = ht.call(i.ownerDocument); i.firstChild; )
  604. r.appendChild(i.firstChild);
  605. else
  606. r = i;
  607. return (Tt.shadowroot || Tt.shadowrootmode) && (r = ct.call(o, r, !0)),
  608. r
  609. }
  610. let c = Rt ? i.outerHTML : i.innerHTML;
  611. return Rt && kt["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && b(Y, i.ownerDocument.doctype.name) && (c = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + c),
  612. It && d([mt, _t, pt], (t => {
  613. c = f(c, t, " ")
  614. }
  615. )),
  616. nt && Ft ? nt.createHTML(c) : c
  617. }
  618. ,
  619. a.setConfig = function() {
  620. ce(arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}),
  621. jt = !0
  622. }
  623. ,
  624. a.clearConfig = function() {
  625. le = null,
  626. jt = !1
  627. }
  628. ,
  629. a.isValidAttribute = function(t, e, i) {
  630. le || ce({});
  631. const a = re(t)
  632. , s = re(e);
  633. return Me(a, s, i)
  634. }
  635. ,
  636. a.addHook = function(t, e) {
  637. "function" == typeof e && (ut[t] = ut[t] || [],
  638. u(ut[t], e))
  639. }
  640. ,
  641. a.removeHook = function(t) {
  642. if (ut[t])
  643. return c(ut[t])
  644. }
  645. ,
  646. a.removeHooks = function(t) {
  647. ut[t] && (ut[t] = [])
  648. }
  649. ,
  650. a.removeAllHooks = function() {
  651. ut = {}
  652. }
  653. ,
  654. a
  655. }()
  656. }()
  657. },
  658. 142: () => {
  659. var t = function() {
  660. function t(t, e) {
  661. for (var i = 0; i < e.length; i++) {
  662. var a = e[i];
  663. a.enumerable = a.enumerable || !1,
  664. a.configurable = !0,
  665. "value"in a && (a.writable = !0),
  666. Object.defineProperty(t, a.key, a)
  667. }
  668. }
  669. return function(e, i, a) {
  670. return i && t(e.prototype, i),
  671. a && t(e, a),
  672. e
  673. }
  674. }();
  675. function e(t, e) {
  676. if (!(t instanceof e))
  677. throw new TypeError("Cannot call a class as a function")
  678. }
  679. !function() {
  680. if ("undefined" != typeof window) {
  681. var i = Array.prototype.slice
  682. , a = Element.prototype.matches || Element.prototype.msMatchesSelector
  683. , s = ["a[href]", "area[href]", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])", "button:not([disabled])", "details", "summary", "iframe", "object", "embed", "[contenteditable]"].join(",")
  684. , n = function() {
  685. function n(t, i) {
  686. e(this, n),
  687. this._inertManager = i,
  688. this._rootElement = t,
  689. this._managedNodes = new Set,
  690. this._rootElement.hasAttribute("aria-hidden") ? this._savedAriaHidden = this._rootElement.getAttribute("aria-hidden") : this._savedAriaHidden = null,
  691. this._rootElement.setAttribute("aria-hidden", "true"),
  692. this._makeSubtreeUnfocusable(this._rootElement),
  693. this._observer = new MutationObserver(this._onMutation.bind(this)),
  694. this._observer.observe(this._rootElement, {
  695. attributes: !0,
  696. childList: !0,
  697. subtree: !0
  698. })
  699. }
  700. return t(n, [{
  701. key: "destructor",
  702. value: function() {
  703. this._observer.disconnect(),
  704. this._rootElement && (null !== this._savedAriaHidden ? this._rootElement.setAttribute("aria-hidden", this._savedAriaHidden) : this._rootElement.removeAttribute("aria-hidden")),
  705. this._managedNodes.forEach((function(t) {
  706. this._unmanageNode(t.node)
  707. }
  708. ), this),
  709. this._observer = null,
  710. this._rootElement = null,
  711. this._managedNodes = null,
  712. this._inertManager = null
  713. }
  714. }, {
  715. key: "_makeSubtreeUnfocusable",
  716. value: function(t) {
  717. var e = this;
  718. h(t, (function(t) {
  719. return e._visitNode(t)
  720. }
  721. ));
  722. var i = document.activeElement;
  723. if (!document.body.contains(t)) {
  724. for (var a = t, s = void 0; a; ) {
  725. if (a.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
  726. s = a;
  727. break
  728. }
  729. a = a.parentNode
  730. }
  731. s && (i = s.activeElement)
  732. }
  733. t.contains(i) && (i.blur(),
  734. i === document.activeElement && document.body.focus())
  735. }
  736. }, {
  737. key: "_visitNode",
  738. value: function(t) {
  739. if (t.nodeType === Node.ELEMENT_NODE) {
  740. var e = t;
  741. e !== this._rootElement && e.hasAttribute("inert") && this._adoptInertRoot(e),
  742. (a.call(e, s) || e.hasAttribute("tabindex")) && this._manageNode(e)
  743. }
  744. }
  745. }, {
  746. key: "_manageNode",
  747. value: function(t) {
  748. var e = this._inertManager.register(t, this);
  749. this._managedNodes.add(e)
  750. }
  751. }, {
  752. key: "_unmanageNode",
  753. value: function(t) {
  754. var e = this._inertManager.deregister(t, this);
  755. e && this._managedNodes.delete(e)
  756. }
  757. }, {
  758. key: "_unmanageSubtree",
  759. value: function(t) {
  760. var e = this;
  761. h(t, (function(t) {
  762. return e._unmanageNode(t)
  763. }
  764. ))
  765. }
  766. }, {
  767. key: "_adoptInertRoot",
  768. value: function(t) {
  769. var e = this._inertManager.getInertRoot(t);
  770. e || (this._inertManager.setInert(t, !0),
  771. e = this._inertManager.getInertRoot(t)),
  772. e.managedNodes.forEach((function(t) {
  773. this._manageNode(t.node)
  774. }
  775. ), this)
  776. }
  777. }, {
  778. key: "_onMutation",
  779. value: function(t, e) {
  780. t.forEach((function(t) {
  781. var e = t.target;
  782. if ("childList" === t.type)
  783. i.call(t.addedNodes).forEach((function(t) {
  784. this._makeSubtreeUnfocusable(t)
  785. }
  786. ), this),
  787. i.call(t.removedNodes).forEach((function(t) {
  788. this._unmanageSubtree(t)
  789. }
  790. ), this);
  791. else if ("attributes" === t.type)
  792. if ("tabindex" === t.attributeName)
  793. this._manageNode(e);
  794. else if (e !== this._rootElement && "inert" === t.attributeName && e.hasAttribute("inert")) {
  795. this._adoptInertRoot(e);
  796. var a = this._inertManager.getInertRoot(e);
  797. this._managedNodes.forEach((function(t) {
  798. e.contains(t.node) && a._manageNode(t.node)
  799. }
  800. ))
  801. }
  802. }
  803. ), this)
  804. }
  805. }, {
  806. key: "managedNodes",
  807. get: function() {
  808. return new Set(this._managedNodes)
  809. }
  810. }, {
  811. key: "hasSavedAriaHidden",
  812. get: function() {
  813. return null !== this._savedAriaHidden
  814. }
  815. }, {
  816. key: "savedAriaHidden",
  817. set: function(t) {
  818. this._savedAriaHidden = t
  819. },
  820. get: function() {
  821. return this._savedAriaHidden
  822. }
  823. }]),
  824. n
  825. }()
  826. , o = function() {
  827. function i(t, a) {
  828. e(this, i),
  829. this._node = t,
  830. this._overrodeFocusMethod = !1,
  831. this._inertRoots = new Set([a]),
  832. this._savedTabIndex = null,
  833. this._destroyed = !1,
  834. this.ensureUntabbable()
  835. }
  836. return t(i, [{
  837. key: "destructor",
  838. value: function() {
  839. if (this._throwIfDestroyed(),
  840. this._node && this._node.nodeType === Node.ELEMENT_NODE) {
  841. var t = this._node;
  842. null !== this._savedTabIndex ? t.setAttribute("tabindex", this._savedTabIndex) : t.removeAttribute("tabindex"),
  843. this._overrodeFocusMethod && delete t.focus
  844. }
  845. this._node = null,
  846. this._inertRoots = null,
  847. this._destroyed = !0
  848. }
  849. }, {
  850. key: "_throwIfDestroyed",
  851. value: function() {
  852. if (this.destroyed)
  853. throw new Error("Trying to access destroyed InertNode")
  854. }
  855. }, {
  856. key: "ensureUntabbable",
  857. value: function() {
  858. if (this.node.nodeType === Node.ELEMENT_NODE) {
  859. var t = this.node;
  860. if (a.call(t, s)) {
  861. if (-1 === t.tabIndex && this.hasSavedTabIndex)
  862. return;
  863. t.hasAttribute("tabindex") && (this._savedTabIndex = t.tabIndex),
  864. t.setAttribute("tabindex", "-1"),
  865. t.nodeType === Node.ELEMENT_NODE && (t.focus = function() {}
  866. ,
  867. this._overrodeFocusMethod = !0)
  868. } else
  869. t.hasAttribute("tabindex") && (this._savedTabIndex = t.tabIndex,
  870. t.removeAttribute("tabindex"))
  871. }
  872. }
  873. }, {
  874. key: "addInertRoot",
  875. value: function(t) {
  876. this._throwIfDestroyed(),
  877. this._inertRoots.add(t)
  878. }
  879. }, {
  880. key: "removeInertRoot",
  881. value: function(t) {
  882. this._throwIfDestroyed(),
  883. this._inertRoots.delete(t),
  884. 0 === this._inertRoots.size && this.destructor()
  885. }
  886. }, {
  887. key: "destroyed",
  888. get: function() {
  889. return this._destroyed
  890. }
  891. }, {
  892. key: "hasSavedTabIndex",
  893. get: function() {
  894. return null !== this._savedTabIndex
  895. }
  896. }, {
  897. key: "node",
  898. get: function() {
  899. return this._throwIfDestroyed(),
  900. this._node
  901. }
  902. }, {
  903. key: "savedTabIndex",
  904. set: function(t) {
  905. this._throwIfDestroyed(),
  906. this._savedTabIndex = t
  907. },
  908. get: function() {
  909. return this._throwIfDestroyed(),
  910. this._savedTabIndex
  911. }
  912. }]),
  913. i
  914. }()
  915. , r = function() {
  916. function s(t) {
  917. if (e(this, s),
  918. !t)
  919. throw new Error("Missing required argument; InertManager needs to wrap a document.");
  920. this._document = t,
  921. this._managedNodes = new Map,
  922. this._inertRoots = new Map,
  923. this._observer = new MutationObserver(this._watchForInert.bind(this)),
  924. d(t.head || t.body || t.documentElement),
  925. "loading" === t.readyState ? t.addEventListener("DOMContentLoaded", this._onDocumentLoaded.bind(this)) : this._onDocumentLoaded()
  926. }
  927. return t(s, [{
  928. key: "setInert",
  929. value: function(t, e) {
  930. if (e) {
  931. if (this._inertRoots.has(t))
  932. return;
  933. var i = new n(t,this);
  934. if (t.setAttribute("inert", ""),
  935. this._inertRoots.set(t, i),
  936. !this._document.body.contains(t))
  937. for (var a = t.parentNode; a; )
  938. 11 === a.nodeType && d(a),
  939. a = a.parentNode
  940. } else {
  941. if (!this._inertRoots.has(t))
  942. return;
  943. this._inertRoots.get(t).destructor(),
  944. this._inertRoots.delete(t),
  945. t.removeAttribute("inert")
  946. }
  947. }
  948. }, {
  949. key: "getInertRoot",
  950. value: function(t) {
  951. return this._inertRoots.get(t)
  952. }
  953. }, {
  954. key: "register",
  955. value: function(t, e) {
  956. var i = this._managedNodes.get(t);
  957. return void 0 !== i ? i.addInertRoot(e) : i = new o(t,e),
  958. this._managedNodes.set(t, i),
  959. i
  960. }
  961. }, {
  962. key: "deregister",
  963. value: function(t, e) {
  964. var i = this._managedNodes.get(t);
  965. return i ? (i.removeInertRoot(e),
  966. i.destroyed && this._managedNodes.delete(t),
  967. i) : null
  968. }
  969. }, {
  970. key: "_onDocumentLoaded",
  971. value: function() {
  972. i.call(this._document.querySelectorAll("[inert]")).forEach((function(t) {
  973. this.setInert(t, !0)
  974. }
  975. ), this),
  976. this._observer.observe(this._document.body || this._document.documentElement, {
  977. attributes: !0,
  978. subtree: !0,
  979. childList: !0
  980. })
  981. }
  982. }, {
  983. key: "_watchForInert",
  984. value: function(t, e) {
  985. var s = this;
  986. t.forEach((function(t) {
  987. switch (t.type) {
  988. case "childList":
  989. i.call(t.addedNodes).forEach((function(t) {
  990. if (t.nodeType === Node.ELEMENT_NODE) {
  991. var e = i.call(t.querySelectorAll("[inert]"));
  992. a.call(t, "[inert]") && e.unshift(t),
  993. e.forEach((function(t) {
  994. this.setInert(t, !0)
  995. }
  996. ), s)
  997. }
  998. }
  999. ), s);
  1000. break;
  1001. case "attributes":
  1002. if ("inert" !== t.attributeName)
  1003. return;
  1004. var e = t.target
  1005. , n = e.hasAttribute("inert");
  1006. s.setInert(e, n)
  1007. }
  1008. }
  1009. ), this)
  1010. }
  1011. }]),
  1012. s
  1013. }();
  1014. if (!HTMLElement.prototype.hasOwnProperty("inert")) {
  1015. var l = new r(document);
  1016. Object.defineProperty(HTMLElement.prototype, "inert", {
  1017. enumerable: !0,
  1018. get: function() {
  1019. return this.hasAttribute("inert")
  1020. },
  1021. set: function(t) {
  1022. l.setInert(this, t)
  1023. }
  1024. })
  1025. }
  1026. }
  1027. function h(t, e, i) {
  1028. if (t.nodeType == Node.ELEMENT_NODE) {
  1029. var a = t;
  1030. e && e(a);
  1031. var s = a.shadowRoot;
  1032. if (s)
  1033. return void h(s, e, s);
  1034. if ("content" == a.localName) {
  1035. for (var n = a, o = n.getDistributedNodes ? n.getDistributedNodes() : [], r = 0; r < o.length; r++)
  1036. h(o[r], e, i);
  1037. return
  1038. }
  1039. if ("slot" == a.localName) {
  1040. for (var l = a, d = l.assignedNodes ? l.assignedNodes({
  1041. flatten: !0
  1042. }) : [], c = 0; c < d.length; c++)
  1043. h(d[c], e, i);
  1044. return
  1045. }
  1046. }
  1047. for (var u = t.firstChild; null != u; )
  1048. h(u, e, i),
  1049. u = u.nextSibling
  1050. }
  1051. function d(t) {
  1052. if (!t.querySelector("style#inert-style, link#inert-style")) {
  1053. var e = document.createElement("style");
  1054. e.setAttribute("id", "inert-style"),
  1055. e.textContent = "\n[inert] {\n pointer-events: none;\n cursor: default;\n}\n\n[inert], [inert] * {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n",
  1056. t.appendChild(e)
  1057. }
  1058. }
  1059. }()
  1060. }
  1061. }
  1062. , e = {};
  1063. function i(a) {
  1064. var s = e[a];
  1065. if (void 0 !== s)
  1066. return s.exports;
  1067. var n = e[a] = {
  1068. exports: {}
  1069. };
  1070. return t[a].call(n.exports, n, n.exports, i),
  1071. n.exports
  1072. }
  1073. i.n = t => {
  1074. var e = t && t.__esModule ? () => t.default : () => t;
  1075. return i.d(e, {
  1076. a: e
  1077. }),
  1078. e
  1079. }
  1080. ,
  1081. i.d = (t, e) => {
  1082. for (var a in e)
  1083. i.o(e, a) && !i.o(t, a) && Object.defineProperty(t, a, {
  1084. enumerable: !0,
  1085. get: e[a]
  1086. })
  1087. }
  1088. ,
  1089. i.o = (t, e) => Object.prototype.hasOwnProperty.call(t, e),
  1090. i.r = t => {
  1091. "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, {
  1092. value: "Module"
  1093. }),
  1094. Object.defineProperty(t, "__esModule", {
  1095. value: !0
  1096. })
  1097. }
  1098. ;
  1099. var a = {};
  1100. ( () => {
  1101. "use strict";
  1102. i.r(a),
  1103. i.d(a, {
  1104. Timeline: () => Xe,
  1105. exportJSON: () => Je,
  1106. lookupMediaType: () => qe,
  1107. parseGoogleSpreadsheetURL: () => Kt
  1108. });
  1109. const t = navigator ? navigator.userAgent.toLowerCase() : "no-user-agent-specified"
  1110. , e = document ? document.documentElement : null
  1111. , s = !!t && -1 !== t.indexOf("phantom")
  1112. , o = window && "ActiveXObject"in window
  1113. , r = (Boolean(o && t.match(/MSIE 9/i)),
  1114. o && document && document.addEventListener,
  1115. -1 !== t.indexOf("webkit"))
  1116. , l = (t.indexOf("android"),
  1117. -1 !== t.search("android [23]"))
  1118. , h = !!window && void 0 !== window.orientation
  1119. , d = !(!navigator || !window) && navigator.msPointerEnabled && navigator.msMaxTouchPoints && !window.PointerEvent
  1120. , c = navigator && window ? window.PointerEvent && navigator.pointerEnabled && navigator.maxTouchPoints : d
  1121. , u = !!window && window.opera
  1122. , m = (t.indexOf("gecko"),
  1123. -1 !== t.indexOf("gecko") && !r && !u && !o)
  1124. , _ = (t.indexOf("chrome"),
  1125. -1 !== t.indexOf("edge/"));
  1126. !!e && o && e.style,
  1127. !!window && "WebKitCSSMatrix"in window && new window.WebKitCSSMatrix,
  1128. !!e && e.style,
  1129. !!e && e.style;
  1130. window && window.L_DISABLE_3D,
  1131. h && window.opera;
  1132. let p = !!window && "devicePixelRatio"in window && window.devicePixelRatio > 1;
  1133. if (!p && window && "matchMedia"in window) {
  1134. let t = window.matchMedia("(min-resolution:144dpi)");
  1135. p = t && t.matches
  1136. }
  1137. const f = window && !window.L_NO_TOUCH && !s && (c || "ontouchstart"in window || window.DocumentTouch && document instanceof window.DocumentTouch);
  1138. function g(t) {
  1139. return "string" == typeof t ? document.getElementById(t) : t
  1140. }
  1141. function v(t, e, i) {
  1142. var a = document.createElement(t);
  1143. return a.className = e,
  1144. i && i.appendChild(a),
  1145. a
  1146. }
  1147. function y(t, e) {
  1148. var i = v("button", t, e);
  1149. return i.type = "button",
  1150. i
  1151. }
  1152. function b(t) {
  1153. for (var e = {
  1154. x: 0,
  1155. y: 0
  1156. }; t && !isNaN(t.offsetLeft) && !isNaN(t.offsetTop); )
  1157. e.x += t.offsetLeft,
  1158. e.y += t.offsetTop,
  1159. t = t.offsetParent;
  1160. return e
  1161. }
  1162. function w(t) {
  1163. for (var e = document.documentElement.style, i = 0; i < t.length; i++)
  1164. if (t[i]in e)
  1165. return t[i];
  1166. return !1
  1167. }
  1168. w(["transition", "webkitTransition", "OTransition", "MozTransition", "msTransition"]),
  1169. w(["transformProperty", "WebkitTransform", "OTransform", "MozTransform", "msTransform"]);
  1170. class x extends Error {
  1171. constructor(t, e) {
  1172. super(),
  1173. this.name = "TLError",
  1174. this.message = t || "error",
  1175. this.message_key = this.message,
  1176. this.detail = e || ""
  1177. }
  1178. }
  1179. const T = {
  1180. aliceblue: "#f0f8ff",
  1181. antiquewhite: "#faebd7",
  1182. aqua: "#00ffff",
  1183. aquamarine: "#7fffd4",
  1184. azure: "#f0ffff",
  1185. beige: "#f5f5dc",
  1186. bisque: "#ffe4c4",
  1187. black: "#000000",
  1188. blanchedalmond: "#ffebcd",
  1189. blue: "#0000ff",
  1190. blueviolet: "#8a2be2",
  1191. brown: "#a52a2a",
  1192. burlywood: "#deb887",
  1193. cadetblue: "#5f9ea0",
  1194. chartreuse: "#7fff00",
  1195. chocolate: "#d2691e",
  1196. coral: "#ff7f50",
  1197. cornflowerblue: "#6495ed",
  1198. cornsilk: "#fff8dc",
  1199. crimson: "#dc143c",
  1200. cyan: "#00ffff",
  1201. darkblue: "#00008b",
  1202. darkcyan: "#008b8b",
  1203. darkgoldenrod: "#b8860b",
  1204. darkgray: "#a9a9a9",
  1205. darkgreen: "#006400",
  1206. darkkhaki: "#bdb76b",
  1207. darkmagenta: "#8b008b",
  1208. darkolivegreen: "#556b2f",
  1209. darkorange: "#ff8c00",
  1210. darkorchid: "#9932cc",
  1211. darkred: "#8b0000",
  1212. darksalmon: "#e9967a",
  1213. darkseagreen: "#8fbc8f",
  1214. darkslateblue: "#483d8b",
  1215. darkslategray: "#2f4f4f",
  1216. darkturquoise: "#00ced1",
  1217. darkviolet: "#9400d3",
  1218. deeppink: "#ff1493",
  1219. deepskyblue: "#00bfff",
  1220. dimgray: "#696969",
  1221. dodgerblue: "#1e90ff",
  1222. firebrick: "#b22222",
  1223. floralwhite: "#fffaf0",
  1224. forestgreen: "#228b22",
  1225. fuchsia: "#ff00ff",
  1226. gainsboro: "#dcdcdc",
  1227. ghostwhite: "#f8f8ff",
  1228. gold: "#ffd700",
  1229. goldenrod: "#daa520",
  1230. gray: "#808080",
  1231. green: "#008000",
  1232. greenyellow: "#adff2f",
  1233. honeydew: "#f0fff0",
  1234. hotpink: "#ff69b4",
  1235. indianred: "#cd5c5c",
  1236. indigo: "#4b0082",
  1237. ivory: "#fffff0",
  1238. khaki: "#f0e68c",
  1239. lavender: "#e6e6fa",
  1240. lavenderblush: "#fff0f5",
  1241. lawngreen: "#7cfc00",
  1242. lemonchiffon: "#fffacd",
  1243. lightblue: "#add8e6",
  1244. lightcoral: "#f08080",
  1245. lightcyan: "#e0ffff",
  1246. lightgoldenrodyellow: "#fafad2",
  1247. lightgray: "#d3d3d3",
  1248. lightgreen: "#90ee90",
  1249. lightpink: "#ffb6c1",
  1250. lightsalmon: "#ffa07a",
  1251. lightseagreen: "#20b2aa",
  1252. lightskyblue: "#87cefa",
  1253. lightslategray: "#778899",
  1254. lightsteelblue: "#b0c4de",
  1255. lightyellow: "#ffffe0",
  1256. lime: "#00ff00",
  1257. limegreen: "#32cd32",
  1258. linen: "#faf0e6",
  1259. magenta: "#ff00ff",
  1260. maroon: "#800000",
  1261. mediumaquamarine: "#66cdaa",
  1262. mediumblue: "#0000cd",
  1263. mediumorchid: "#ba55d3",
  1264. mediumpurple: "#9370db",
  1265. mediumseagreen: "#3cb371",
  1266. mediumslateblue: "#7b68ee",
  1267. mediumspringgreen: "#00fa9a",
  1268. mediumturquoise: "#48d1cc",
  1269. mediumvioletred: "#c71585",
  1270. midnightblue: "#191970",
  1271. mintcream: "#f5fffa",
  1272. mistyrose: "#ffe4e1",
  1273. moccasin: "#ffe4b5",
  1274. navajowhite: "#ffdead",
  1275. navy: "#000080",
  1276. oldlace: "#fdf5e6",
  1277. olive: "#808000",
  1278. olivedrab: "#6b8e23",
  1279. orange: "#ffa500",
  1280. orangered: "#ff4500",
  1281. orchid: "#da70d6",
  1282. palegoldenrod: "#eee8aa",
  1283. palegreen: "#98fb98",
  1284. paleturquoise: "#afeeee",
  1285. palevioletred: "#db7093",
  1286. papayawhip: "#ffefd5",
  1287. peachpuff: "#ffdab9",
  1288. peru: "#cd853f",
  1289. pink: "#ffc0cb",
  1290. plum: "#dda0dd",
  1291. powderblue: "#b0e0e6",
  1292. purple: "#800080",
  1293. rebeccapurple: "#663399",
  1294. red: "#ff0000",
  1295. rosybrown: "#bc8f8f",
  1296. royalblue: "#4169e1",
  1297. saddlebrown: "#8b4513",
  1298. salmon: "#fa8072",
  1299. sandybrown: "#f4a460",
  1300. seagreen: "#2e8b57",
  1301. seashell: "#fff5ee",
  1302. sienna: "#a0522d",
  1303. silver: "#c0c0c0",
  1304. skyblue: "#87ceeb",
  1305. slateblue: "#6a5acd",
  1306. slategray: "#708090",
  1307. snow: "#fffafa",
  1308. springgreen: "#00ff7f",
  1309. steelblue: "#4682b4",
  1310. tan: "#d2b48c",
  1311. teal: "#008080",
  1312. thistle: "#d8bfd8",
  1313. tomato: "#ff6347",
  1314. turquoise: "#40e0d0",
  1315. violet: "#ee82ee",
  1316. wheat: "#f5deb3",
  1317. white: "#ffffff",
  1318. whitesmoke: "#f5f5f5",
  1319. yellow: "#ffff00",
  1320. yellowgreen: "#9acd32"
  1321. };
  1322. function M(t) {
  1323. T[t.toLowerCase()] && (t = T[t.toLowerCase()]),
  1324. t = t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (function(t, e, i, a) {
  1325. return e + e + i + i + a + a
  1326. }
  1327. ));
  1328. var e = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);
  1329. return e ? {
  1330. r: parseInt(e[1], 16),
  1331. g: parseInt(e[2], 16),
  1332. b: parseInt(e[3], 16)
  1333. } : null
  1334. }
  1335. function E(t, e) {
  1336. var i;
  1337. for (i in e)
  1338. Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
  1339. return t
  1340. }
  1341. function L(t) {
  1342. for (var e = Array.prototype.slice.call(arguments, 1), i = 0, a = e.length; i < a; i++)
  1343. E(t, e[i] || {});
  1344. return t
  1345. }
  1346. const D = [];
  1347. function S(t) {
  1348. D.forEach((e => {
  1349. try {
  1350. e(t)
  1351. } catch (t) {
  1352. console && console.log && console.log("Error handling trace", t)
  1353. }
  1354. }
  1355. ))
  1356. }
  1357. function N(t, e) {
  1358. for (t = String(t),
  1359. e = e || 2; t.length < e; )
  1360. t = "0" + t;
  1361. return t
  1362. }
  1363. const A = (C = 0,
  1364. I = "_tl_id",
  1365. function(t) {
  1366. return t[I] = t[I] || ++C,
  1367. t[I]
  1368. }
  1369. );
  1370. var C, I;
  1371. function O(t) {
  1372. return t && "function" == typeof t.replace ? t.replace(/^\s+|\s+$/g, "") : ""
  1373. }
  1374. function R(t, ...e) {
  1375. for (let a of e)
  1376. for (var i of Object.getOwnPropertyNames(a.prototype))
  1377. t.prototype[i] = a.prototype[i]
  1378. }
  1379. function j(t) {
  1380. t = (t = O(t)).toLowerCase();
  1381. for (var e = 0; e < 31; e++)
  1382. t = t.replace(new RegExp("ãàáäâẽèéëêìíïîõòóöôùúüûñç·/_,:;".charAt(e),"g"), "aaaaaeeeeeiiiiooooouuuunc------".charAt(e));
  1383. return (t = t.replace(/[^a-z0-9 -]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-")).replace(/^([0-9])/, "_$1")
  1384. }
  1385. function P(t, e) {
  1386. var i = function(t) {
  1387. for (var e = "", i = 0; i < t; i++)
  1388. e += "abcdefghijklmnopqurstuvwxyz".substr(Math.floor(32 * Math.random()), 1);
  1389. return e
  1390. };
  1391. return e ? e + "-" + i(t) : "tl-" + i(t)
  1392. }
  1393. function z(t) {
  1394. return t == parseFloat(t) ? !(t % 2) : void 0
  1395. }
  1396. function H(t, e, i, a) {
  1397. for (var s = a || 0, n = 0; n < e.length; n++)
  1398. e[n].data[i] == t && (s = n);
  1399. return s
  1400. }
  1401. function F(t) {
  1402. return t ? t = (t = t.replace(/<a\b[^>]*>/i, "")).replace(/<\/a>/i, "") : t
  1403. }
  1404. function q(t) {
  1405. if (!t) return t;
  1406. t = DOMPurify.sanitize(t, { ALLOWED_TAGS: [] });
  1407. return t.replace(/"/g, "'");
  1408. }
  1409. function $(t, e, i) {
  1410. var a = function(t, e, i) {
  1411. return i || (i = ""),
  1412. e && e.length > 30 && (e = e.substring(0, 30) + "…"),
  1413. i + "<a class='tl-makelink' href='" + t + "' onclick='void(0)'>" + e + "</a>"
  1414. };
  1415. return t.replace(/\b(?:https?|ftp):\/\/([a-z0-9-+&@#\/%?=~_|!:,.;]*[a-z0-9-+&@#\/%=~_|])/gim, (function(t, e, i, s) {
  1416. if (i > 0) {
  1417. var n = s[i - 1];
  1418. if ('"' == n || "'" == n || "=" == n)
  1419. return t
  1420. }
  1421. return a(t, e)
  1422. }
  1423. )).replace(/(^|[^\/>])(www\.[\S]+(\b|$))/gim, (function(t, e, i, s, n) {
  1424. return a("http://" + i, i, e)
  1425. }
  1426. )).replace(/([a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+)/gim, (function(t, e, i, s) {
  1427. return a("mailto:" + e, e)
  1428. }
  1429. ))
  1430. }
  1431. function U(t) {
  1432. return t.replace(/(.*)www.dropbox.com\/(.*)/, "$1dl\.dropboxusercontent.com/$2")
  1433. }
  1434. const B = t => {
  1435. var e = {
  1436. w: 0,
  1437. h: 0
  1438. };
  1439. return t.w > t.h && t.h > 0 ? (e.h = t.h,
  1440. e.w = t.h) : (e.w = t.w,
  1441. e.h = t.w),
  1442. e
  1443. }
  1444. , W = t => null !== t.w && "" !== t.w ? Math.round(t.w / 16 * 9) : null !== t.h && "" !== t.h ? Math.round(t.h / 9 * 16) : 0;
  1445. let G = (Z = (Y = "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ").length,
  1446. {
  1447. encode: function(t) {
  1448. if ("number" != typeof t || t !== parseInt(t))
  1449. throw '"encode" only accepts integers.';
  1450. for (var e = ""; t; ) {
  1451. var i = t % Z;
  1452. t = Math.floor(t / Z),
  1453. e = Y[i].toString() + e
  1454. }
  1455. return e
  1456. },
  1457. decode: function(t) {
  1458. if ("string" != typeof t)
  1459. throw '"decode" only accepts strings.';
  1460. for (var e = 0; t; ) {
  1461. var i = Y.indexOf(t[0]);
  1462. if (i < 0)
  1463. throw '"decode" can\'t find "' + t[0] + '" in the alphabet: "' + Y + '"';
  1464. var a = t.length - 1;
  1465. e += i * Math.pow(Z, a),
  1466. t = t.substring(1)
  1467. }
  1468. return e
  1469. }
  1470. });
  1471. var Y, Z;
  1472. function V(t) {
  1473. if ("string" == typeof t) {
  1474. let a = t.match(/^\s*(\d+h)?(\d+m)?(\d+s)?\s*/i);
  1475. if (a) {
  1476. var e = parseInt(a[1]) || 0
  1477. , i = parseInt(a[2]) || 0;
  1478. return (parseInt(a[3]) || 0) + 60 * i + 60 * e * 60
  1479. }
  1480. } else if ("number" == typeof t)
  1481. return t;
  1482. return 0
  1483. }
  1484. function X(t) {
  1485. return (new DOMParser).parseFromString(t, "text/html").body.textContent || ""
  1486. }
  1487. const J = [.42, 0, 1, 1];
  1488. function K(t) {}
  1489. function Q(t) {
  1490. return new K(J).get(t)
  1491. }
  1492. function tt(t) {
  1493. return 1 == t ? 1 : 1 - Math.pow(2, -10 * t)
  1494. }
  1495. function et(t) {
  1496. return t < .5 ? 16 * t * t * t * t * t : 1 + 16 * --t * t * t * t * t
  1497. }
  1498. let it = function() {};
  1499. it.extend = function(t) {
  1500. var e = function() {
  1501. this.initialize && this.initialize.apply(this, arguments)
  1502. }
  1503. , i = function() {};
  1504. i.prototype = this.prototype;
  1505. var a = new i;
  1506. for (var s in a.constructor = e,
  1507. e.prototype = a,
  1508. e.superclass = this.prototype,
  1509. this)
  1510. this.hasOwnProperty(s) && "prototype" !== s && "superclass" !== s && (e[s] = this[s]);
  1511. return t.statics && (L(e, t.statics),
  1512. delete t.statics),
  1513. t.includes && (L.apply(null, [a].concat(t.includes)),
  1514. delete t.includes),
  1515. t.options && a.options && (t.options = L({}, a.options, t.options)),
  1516. L(a, t),
  1517. e.extend = it.extend,
  1518. e.include = function(t) {
  1519. L(this.prototype, t)
  1520. }
  1521. ,
  1522. e
  1523. }
  1524. ;
  1525. class at {
  1526. on(t, e, i) {
  1527. if (!e)
  1528. throw new x("No callback function provided");
  1529. var a = this._tl_events = this._tl_events || {};
  1530. return a[t] = a[t] || [],
  1531. a[t].push({
  1532. action: e,
  1533. context: i || this
  1534. }),
  1535. this
  1536. }
  1537. addEventListener(t, e, i) {
  1538. return this.on(t, e, i)
  1539. }
  1540. hasEventListeners(t) {
  1541. var e = "_tl_events";
  1542. return e in this && t in this[e] && this[e][t].length > 0
  1543. }
  1544. removeEventListener(t, e, i) {
  1545. if (!this.hasEventListeners(t))
  1546. return this;
  1547. for (var a = 0, s = this._tl_events, n = s[t].length; a < n; a++)
  1548. if (s[t][a].action === e && (!i || s[t][a].context === i))
  1549. return s[t].splice(a, 1),
  1550. this;
  1551. return this
  1552. }
  1553. off(t, e, i) {
  1554. return this.removeEventListener(t, e, i)
  1555. }
  1556. fire(t, e) {
  1557. if (!this.hasEventListeners(t))
  1558. return this;
  1559. for (var i = E({
  1560. type: t,
  1561. target: this
  1562. }, e), a = this._tl_events[t].slice(), s = 0, n = a.length; s < n; s++)
  1563. a[s].action ? a[s].action.call(a[s].context || this, i) : S(`no action defined for ${t} listener`);
  1564. return this
  1565. }
  1566. }
  1567. function st(t, e) {
  1568. return nt(t, e)
  1569. }
  1570. const nt = function() {
  1571. var t = document
  1572. , e = window
  1573. , i = e.performance
  1574. , a = i && (i.now || i.webkitNow || i.msNow || i.mozNow)
  1575. , s = a ? function() {
  1576. return a.call(i)
  1577. }
  1578. : function() {
  1579. return +new Date
  1580. }
  1581. , n = t.documentElement
  1582. , o = !1
  1583. , r = 1e3
  1584. , l = /^rgb\(|#/
  1585. , h = /^([+\-])=([\d\.]+)/
  1586. , d = /^(?:[\+\-]=?)?\d+(?:\.\d+)?(%|in|cm|mm|em|ex|pt|pc|px)$/
  1587. , c = /rotate\(((?:[+\-]=)?([\-\d\.]+))deg\)/
  1588. , u = /scale\(((?:[+\-]=)?([\d\.]+))\)/
  1589. , m = /skew\(((?:[+\-]=)?([\-\d\.]+))deg, ?((?:[+\-]=)?([\-\d\.]+))deg\)/
  1590. , _ = /translate\(((?:[+\-]=)?([\-\d\.]+))px, ?((?:[+\-]=)?([\-\d\.]+))px\)/
  1591. , p = {
  1592. lineHeight: 1,
  1593. zoom: 1,
  1594. zIndex: 1,
  1595. opacity: 1,
  1596. transform: 1
  1597. }
  1598. , f = function() {
  1599. var e, i = t.createElement("a").style, a = ["webkitTransform", "MozTransform", "OTransform", "msTransform", "Transform"];
  1600. for (e = 0; e < a.length; e++)
  1601. if (a[e]in i)
  1602. return a[e]
  1603. }()
  1604. , g = void 0 !== t.createElement("a").style.opacity
  1605. , v = t.defaultView && t.defaultView.getComputedStyle ? function(e, i) {
  1606. i = M(i = "transform" == i ? f : i);
  1607. var a = null
  1608. , s = t.defaultView.getComputedStyle(e, "");
  1609. return s && (a = s[i]),
  1610. e.style[i] || a
  1611. }
  1612. : n.currentStyle ? function(t, e) {
  1613. if ("opacity" == (e = M(e))) {
  1614. var i = 100;
  1615. try {
  1616. i = t.filters["DXImageTransform.Microsoft.Alpha"].opacity
  1617. } catch (e) {
  1618. try {
  1619. i = t.filters("alpha").opacity
  1620. } catch (t) {}
  1621. }
  1622. return i / 100
  1623. }
  1624. var a = t.currentStyle ? t.currentStyle[e] : null;
  1625. return t.style[e] || a
  1626. }
  1627. : function(t, e) {
  1628. return t.style[M(e)]
  1629. }
  1630. , y = e.requestAnimationFrame || e.webkitRequestAnimationFrame || e.mozRequestAnimationFrame || e.msRequestAnimationFrame || e.oRequestAnimationFrame || function(t) {
  1631. e.setTimeout((function() {
  1632. t(+new Date)
  1633. }
  1634. ), 17)
  1635. }
  1636. , b = [];
  1637. function w(t) {
  1638. var e, i = b.length;
  1639. for (a && t > 1e12 && (t = s()),
  1640. o && (t = s()),
  1641. e = i; e--; )
  1642. b[e](t);
  1643. b.length && y(w)
  1644. }
  1645. function k(t, e) {
  1646. var i, a = {};
  1647. return (i = t.match(c)) && (a.rotate = A(i[1], e ? e.rotate : null)),
  1648. (i = t.match(u)) && (a.scale = A(i[1], e ? e.scale : null)),
  1649. (i = t.match(m)) && (a.skewx = A(i[1], e ? e.skewx : null),
  1650. a.skewy = A(i[3], e ? e.skewy : null)),
  1651. (i = t.match(_)) && (a.translatex = A(i[1], e ? e.translatex : null),
  1652. a.translatey = A(i[3], e ? e.translatey : null)),
  1653. a
  1654. }
  1655. function x(t) {
  1656. var e = "";
  1657. return "rotate"in t && (e += "rotate(" + t.rotate + "deg) "),
  1658. "scale"in t && (e += "scale(" + t.scale + ") "),
  1659. "translatex"in t && (e += "translate(" + t.translatex + "px," + t.translatey + "px) "),
  1660. "skewx"in t && (e += "skew(" + t.skewx + "deg," + t.skewy + "deg)"),
  1661. e
  1662. }
  1663. function T(t) {
  1664. var e, i, a, s = t.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);
  1665. return (s ? (e = s[1],
  1666. i = s[2],
  1667. a = s[3],
  1668. "#" + (1 << 24 | e << 16 | i << 8 | a).toString(16).slice(1)) : t).replace(/#(\w)(\w)(\w)$/, "#$1$1$2$2$3$3")
  1669. }
  1670. function M(t) {
  1671. return t.replace(/-(.)/g, (function(t, e) {
  1672. return e.toUpperCase()
  1673. }
  1674. ))
  1675. }
  1676. function E(t) {
  1677. return "function" == typeof t
  1678. }
  1679. function L(t) {
  1680. return Math.sin(t * Math.PI / 2)
  1681. }
  1682. function D(t, e, i, a, n, o) {
  1683. a = E(a) ? a : C.easings[a] || L;
  1684. var l, h = t || r, d = this, c = o - n, u = s(), m = 0, _ = 0;
  1685. return l = function t(s) {
  1686. var r = s - u;
  1687. if (r > h || m)
  1688. return o = isFinite(o) ? o : 1,
  1689. m ? _ && e(o) : e(o),
  1690. function(t) {
  1691. var e, i = function(t, e, i) {
  1692. if (Array.prototype.indexOf)
  1693. return t.indexOf(e);
  1694. for (i = 0; i < t.length; ++i)
  1695. if (t[i] === e)
  1696. return i
  1697. }(b, t);
  1698. i >= 0 && (e = b.slice(i + 1),
  1699. b.length = i,
  1700. b = b.concat(e))
  1701. }(t),
  1702. i && i.apply(d);
  1703. isFinite(o) ? e(c * a(r / h) + n) : e(a(r / h))
  1704. }
  1705. ,
  1706. 1 === b.push(l) && y(w),
  1707. {
  1708. stop: function(t) {
  1709. m = 1,
  1710. _ = t,
  1711. t || (i = null)
  1712. }
  1713. }
  1714. }
  1715. function S(t, e) {
  1716. var i, a, s = t.length, n = [];
  1717. for (i = 0; i < s; ++i)
  1718. n[i] = [t[i][0], t[i][1]];
  1719. for (a = 1; a < s; ++a)
  1720. for (i = 0; i < s - a; ++i)
  1721. n[i][0] = (1 - e) * n[i][0] + e * n[parseInt(i + 1, 10)][0],
  1722. n[i][1] = (1 - e) * n[i][1] + e * n[parseInt(i + 1, 10)][1];
  1723. return [n[0][0], n[0][1]]
  1724. }
  1725. function N(t, e, i, a, s, n, o) {
  1726. if ("transform" == s) {
  1727. for (var l in o = {},
  1728. i[n][s])
  1729. o[l] = l in a[n][s] ? Math.round(((a[n][s][l] - i[n][s][l]) * t + i[n][s][l]) * r) / r : i[n][s][l];
  1730. return o
  1731. }
  1732. return "string" == typeof i[n][s] ? function(t, e, i) {
  1733. var a, s, n, o, r = [];
  1734. for (a = 0; a < 6; a++)
  1735. n = Math.min(15, parseInt(e.charAt(a), 16)),
  1736. o = Math.min(15, parseInt(i.charAt(a), 16)),
  1737. s = (s = Math.floor((o - n) * t + n)) > 15 ? 15 : s < 0 ? 0 : s,
  1738. r[a] = s.toString(16);
  1739. return "#" + r.join("")
  1740. }(t, i[n][s], a[n][s]) : (o = Math.round(((a[n][s] - i[n][s]) * t + i[n][s]) * r) / r,
  1741. s in p || (o += e[n][s] || "px"),
  1742. o)
  1743. }
  1744. function A(t, e, i, a, s) {
  1745. return (i = h.exec(t)) ? (s = parseFloat(i[2])) && e + ("+" == i[1] ? 1 : -1) * s : parseFloat(t)
  1746. }
  1747. function C(t, e) {
  1748. var i, a, s, n = t ? n = isFinite(t.length) ? t : [t] : [], o = e.complete, r = e.duration, h = e.easing, c = e.bezier, u = [], m = [], _ = [], p = [];
  1749. for (c && (a = e.left,
  1750. s = e.top,
  1751. delete e.right,
  1752. delete e.bottom,
  1753. delete e.left,
  1754. delete e.top),
  1755. i = n.length; i--; ) {
  1756. if (u[i] = {},
  1757. m[i] = {},
  1758. _[i] = {},
  1759. c) {
  1760. var y = v(n[i], "left")
  1761. , b = v(n[i], "top")
  1762. , w = [A(E(a) ? a(n[i]) : a || 0, parseFloat(y)), A(E(s) ? s(n[i]) : s || 0, parseFloat(b))];
  1763. p[i] = E(c) ? c(n[i], w) : c,
  1764. p[i].push(w),
  1765. p[i].unshift([parseInt(y, 10), parseInt(b, 10)])
  1766. }
  1767. for (var L in e) {
  1768. switch (L) {
  1769. case "complete":
  1770. case "duration":
  1771. case "easing":
  1772. case "bezier":
  1773. continue
  1774. }
  1775. var C, I = v(n[i], L), O = E(e[L]) ? e[L](n[i]) : e[L];
  1776. "string" != typeof O || !l.test(O) || l.test(I) ? (u[i][L] = "transform" == L ? k(I) : "string" == typeof O && l.test(O) ? T(I).slice(1) : parseFloat(I),
  1777. m[i][L] = "transform" == L ? k(O, u[i][L]) : "string" == typeof O && "#" == O.charAt(0) ? T(O).slice(1) : A(O, parseFloat(I)),
  1778. "string" == typeof O && (C = O.match(d)) && (_[i][L] = C[1])) : delete e[L]
  1779. }
  1780. }
  1781. return D.apply(n, [r, function(t, a, s) {
  1782. for (i = n.length; i--; )
  1783. for (var o in c && (s = S(p[i], t),
  1784. n[i].style.left = s[0] + "px",
  1785. n[i].style.top = s[1] + "px"),
  1786. e)
  1787. a = N(t, _, u, m, o, i),
  1788. "transform" == o ? n[i].style[f] = x(a) : "opacity" != o || g ? n[i].style[M(o)] = a : n[i].style.filter = "alpha(opacity=" + 100 * a + ")"
  1789. }
  1790. , o, h])
  1791. }
  1792. return y((function(t) {
  1793. o = t > 1e12 != s() > 1e12
  1794. }
  1795. )),
  1796. C.tween = D,
  1797. C.getStyle = v,
  1798. C.bezier = S,
  1799. C.transform = f,
  1800. C.parseTransform = k,
  1801. C.formatTransform = x,
  1802. C.easings = {},
  1803. C
  1804. }();
  1805. class ot {
  1806. show(t) {
  1807. t || (this._el.container.style.display = "block")
  1808. }
  1809. hide(t) {
  1810. this._el.container.style.display = "none"
  1811. }
  1812. addTo(t) {
  1813. t.appendChild(this._el.container),
  1814. this.onAdd()
  1815. }
  1816. removeFrom(t) {
  1817. t.removeChild(this._el.container),
  1818. this.onRemove()
  1819. }
  1820. animatePosition(t, e) {
  1821. var i = {
  1822. duration: this.options.duration,
  1823. easing: this.options.ease
  1824. };
  1825. for (var a in t)
  1826. t.hasOwnProperty(a) && (i[a] = t[a] + "px");
  1827. this.animator && this.animator.stop(),
  1828. this.animator = st(e, i)
  1829. }
  1830. onLoaded() {
  1831. this.fire("loaded", this.data)
  1832. }
  1833. onAdd() {
  1834. this.fire("added", this.data)
  1835. }
  1836. onRemove() {
  1837. this.fire("removed", this.data)
  1838. }
  1839. setPosition(t, e) {
  1840. for (var i in t)
  1841. t.hasOwnProperty(i) && (e ? e.style[i] = t[i] + "px" : this._el.container.style[i] = t[i] + "px")
  1842. }
  1843. getPosition() {
  1844. return b(this._el.container)
  1845. }
  1846. }
  1847. class rt {
  1848. constructor(t, e, i) {
  1849. this._el = {
  1850. drag: t,
  1851. move: t
  1852. },
  1853. this.mousedrag = {
  1854. down: "mousedown",
  1855. up: "mouseup",
  1856. leave: "mouseleave",
  1857. move: "mousemove"
  1858. },
  1859. this.touchdrag = {
  1860. down: "touchstart",
  1861. up: "touchend",
  1862. leave: "mouseleave",
  1863. move: "touchmove"
  1864. },
  1865. i && (this._el.move = i),
  1866. this.options = {
  1867. enable: {
  1868. x: !0,
  1869. y: !0
  1870. },
  1871. constraint: {
  1872. top: !1,
  1873. bottom: !1,
  1874. left: !1,
  1875. right: !1
  1876. },
  1877. momentum_multiplier: 2e3,
  1878. duration: 1e3,
  1879. ease: et
  1880. },
  1881. this.animator = null,
  1882. this.dragevent = this.mousedrag,
  1883. f && (this.dragevent = this.touchdrag),
  1884. this.data = {
  1885. sliding: !1,
  1886. direction: "none",
  1887. pagex: {
  1888. start: 0,
  1889. end: 0
  1890. },
  1891. pagey: {
  1892. start: 0,
  1893. end: 0
  1894. },
  1895. pos: {
  1896. start: {
  1897. x: 0,
  1898. y: 0
  1899. },
  1900. end: {
  1901. x: 0,
  1902. y: 0
  1903. }
  1904. },
  1905. new_pos: {
  1906. x: 0,
  1907. y: 0
  1908. },
  1909. new_pos_parent: {
  1910. x: 0,
  1911. y: 0
  1912. },
  1913. time: {
  1914. start: 0,
  1915. end: 0
  1916. },
  1917. touch: !1
  1918. },
  1919. E(this.options, e)
  1920. }
  1921. enable(t) {
  1922. this.data.pos.start = 0,
  1923. this._el.move.style.left = this.data.pos.start.x + "px",
  1924. this._el.move.style.top = this.data.pos.start.y + "px",
  1925. this._el.move.style.position = "absolute"
  1926. }
  1927. disable() {
  1928. ht.removeListener(this._el.drag, this.dragevent.down, this._onDragStart, this),
  1929. ht.removeListener(this._el.drag, this.dragevent.up, this._onDragEnd, this)
  1930. }
  1931. stopMomentum() {
  1932. this.animator && this.animator.stop()
  1933. }
  1934. updateConstraint(t) {
  1935. this.options.constraint = t
  1936. }
  1937. _onDragStart(t) {
  1938. f ? t.originalEvent ? (this.data.pagex.start = t.originalEvent.touches[0].screenX,
  1939. this.data.pagey.start = t.originalEvent.touches[0].screenY) : (this.data.pagex.start = t.targetTouches[0].screenX,
  1940. this.data.pagey.start = t.targetTouches[0].screenY) : (this.data.pagex.start = t.pageX,
  1941. this.data.pagey.start = t.pageY),
  1942. this.options.enable.x && (this._el.move.style.left = this.data.pagex.start - this._el.move.offsetWidth / 2 + "px"),
  1943. this.options.enable.y && (this._el.move.style.top = this.data.pagey.start - this._el.move.offsetHeight / 2 + "px"),
  1944. this.data.pos.start = b(this._el.drag),
  1945. this.data.time.start = (new Date).getTime(),
  1946. this.fire("dragstart", this.data),
  1947. ht.addListener(this._el.drag, this.dragevent.move, this._onDragMove, this),
  1948. ht.addListener(this._el.drag, this.dragevent.leave, this._onDragEnd, this)
  1949. }
  1950. _onDragEnd(t) {
  1951. this.data.sliding = !1,
  1952. ht.removeListener(this._el.drag, this.dragevent.move, this._onDragMove, this),
  1953. ht.removeListener(this._el.drag, this.dragevent.leave, this._onDragEnd, this),
  1954. this.fire("dragend", this.data),
  1955. this._momentum()
  1956. }
  1957. _onDragMove(t) {
  1958. t.preventDefault(),
  1959. this.data.sliding = !0,
  1960. f ? t.originalEvent ? (this.data.pagex.end = t.originalEvent.touches[0].screenX,
  1961. this.data.pagey.end = t.originalEvent.touches[0].screenY) : (this.data.pagex.end = t.targetTouches[0].screenX,
  1962. this.data.pagey.end = t.targetTouches[0].screenY) : (this.data.pagex.end = t.pageX,
  1963. this.data.pagey.end = t.pageY),
  1964. this.data.pos.end = b(this._el.drag),
  1965. this.data.new_pos.x = -(this.data.pagex.start - this.data.pagex.end - this.data.pos.start.x),
  1966. this.data.new_pos.y = -(this.data.pagey.start - this.data.pagey.end - this.data.pos.start.y),
  1967. this.options.enable.x && (this._el.move.style.left = this.data.new_pos.x + "px"),
  1968. this.options.enable.y && (this._el.move.style.top = this.data.new_pos.y + "px"),
  1969. this.fire("dragmove", this.data)
  1970. }
  1971. _momentum() {
  1972. var t = {
  1973. x: 0,
  1974. y: 0,
  1975. time: 0
  1976. }
  1977. , e = {
  1978. x: 0,
  1979. y: 0,
  1980. time: 0
  1981. }
  1982. , i = !1;
  1983. t.time = 10 * ((new Date).getTime() - this.data.time.start),
  1984. e.time = 10 * ((new Date).getTime() - this.data.time.start),
  1985. e.x = this.options.momentum_multiplier * (Math.abs(this.data.pagex.end) - Math.abs(this.data.pagex.start)),
  1986. e.y = this.options.momentum_multiplier * (Math.abs(this.data.pagey.end) - Math.abs(this.data.pagey.start)),
  1987. t.x = Math.round(e.x / e.time),
  1988. t.y = Math.round(e.y / e.time),
  1989. this.data.new_pos.x = Math.min(this.data.pos.end.x + t.x),
  1990. this.data.new_pos.y = Math.min(this.data.pos.end.y + t.y),
  1991. this.options.enable.x ? this.data.new_pos.x < 0 && (this.data.new_pos.x = 0) : this.data.new_pos.x = this.data.pos.start.x,
  1992. this.options.enable.y ? this.data.new_pos.y < 0 && (this.data.new_pos.y = 0) : this.data.new_pos.y = this.data.pos.start.y,
  1993. e.time < 3e3 && (i = !0),
  1994. Math.abs(e.x) > 1e4 && (this.data.direction = "left",
  1995. e.x > 0 && (this.data.direction = "right")),
  1996. Math.abs(e.y) > 1e4 && (this.data.direction = "up",
  1997. e.y > 0 && (this.data.direction = "down")),
  1998. this._animateMomentum(),
  1999. i && this.fire("swipe_" + this.data.direction, this.data)
  2000. }
  2001. _animateMomentum() {
  2002. var t = {
  2003. x: this.data.new_pos.x,
  2004. y: this.data.new_pos.y
  2005. }
  2006. , e = {
  2007. duration: this.options.duration,
  2008. easing: tt
  2009. };
  2010. this.options.enable.y && ((this.options.constraint.top || this.options.constraint.bottom) && (t.y > this.options.constraint.bottom ? t.y = this.options.constraint.bottom : t.y < this.options.constraint.top && (t.y = this.options.constraint.top)),
  2011. e.top = Math.floor(t.y) + "px"),
  2012. this.options.enable.x && ((this.options.constraint.left || this.options.constraint.right) && (t.x > this.options.constraint.left ? t.x = this.options.constraint.left : t.x < this.options.constraint.right && (t.x = this.options.constraint.right)),
  2013. e.left = Math.floor(t.x) + "px"),
  2014. this.animator = st(this._el.move, e),
  2015. this.fire("momentum", this.data)
  2016. }
  2017. }
  2018. R(at);
  2019. var lt, ht = {
  2020. addListener: function(t, e, i, a) {
  2021. var s = A(i)
  2022. , n = "_tl_" + e + s;
  2023. if (!t[n]) {
  2024. var o = function(e) {
  2025. return i.call(a || t, e || ht._getEvent())
  2026. };
  2027. if (f && "dblclick" === e && this.addDoubleTapListener)
  2028. this.addDoubleTapListener(t, o, s);
  2029. else if ("addEventListener"in t)
  2030. if ("mousewheel" === e)
  2031. t.addEventListener("DOMMouseScroll", o, !1),
  2032. t.addEventListener(e, o, !1);
  2033. else if ("mouseenter" === e || "mouseleave" === e) {
  2034. var r = o
  2035. , l = "mouseenter" === e ? "mouseover" : "mouseout";
  2036. o = function(e) {
  2037. if (ht._checkMouse(t, e))
  2038. return r(e)
  2039. }
  2040. ,
  2041. t.addEventListener(l, o, !1)
  2042. } else
  2043. t.addEventListener(e, o, !1);
  2044. else
  2045. "attachEvent"in t && t.attachEvent("on" + e, o);
  2046. t[n] = o
  2047. }
  2048. },
  2049. removeListener: function(t, e, i) {
  2050. var a = A(i)
  2051. , s = "_tl_" + e + a
  2052. , n = t[s];
  2053. n && (f && "dblclick" === e && this.removeDoubleTapListener ? this.removeDoubleTapListener(t, a) : "removeEventListener"in t ? "mousewheel" === e ? (t.removeEventListener("DOMMouseScroll", n, !1),
  2054. t.removeEventListener(e, n, !1)) : "mouseenter" === e || "mouseleave" === e ? t.removeEventListener("mouseenter" === e ? "mouseover" : "mouseout", n, !1) : t.removeEventListener(e, n, !1) : "detachEvent"in t && t.detachEvent("on" + e, n),
  2055. t[s] = null)
  2056. },
  2057. _checkMouse: function(t, e) {
  2058. var i = e.relatedTarget;
  2059. if (!i)
  2060. return !0;
  2061. try {
  2062. for (; i && i !== t; )
  2063. i = i.parentNode
  2064. } catch (t) {
  2065. return !1
  2066. }
  2067. return i !== t
  2068. },
  2069. _getEvent: function() {
  2070. var t = window.event;
  2071. if (!t)
  2072. for (var e = arguments.callee.caller; e && (!(t = e.arguments[0]) || window.Event !== t.constructor); )
  2073. e = e.caller;
  2074. return t
  2075. },
  2076. stopPropagation: function(t) {
  2077. t.stopPropagation ? t.stopPropagation() : t.cancelBubble = !0
  2078. },
  2079. disableClickPropagation: function(t) {
  2080. ht.addListener(t, rt.START, ht.stopPropagation),
  2081. ht.addListener(t, "click", ht.stopPropagation),
  2082. ht.addListener(t, "dblclick", ht.stopPropagation)
  2083. },
  2084. preventDefault: function(t) {
  2085. t.preventDefault ? t.preventDefault() : t.returnValue = !1
  2086. },
  2087. stop: function(t) {
  2088. ht.preventDefault(t),
  2089. ht.stopPropagation(t)
  2090. },
  2091. getWheelDelta: function(t) {
  2092. var e = 0;
  2093. return t.wheelDelta && (e = t.wheelDelta / 120),
  2094. t.detail && (e = -t.detail / 3),
  2095. e
  2096. }
  2097. }, dt = function() {
  2098. var t, e, i, a, s, n, o = [], r = o.slice, l = o.filter, h = window.document, d = {}, c = {}, u = {
  2099. "column-count": 1,
  2100. columns: 1,
  2101. "font-weight": 1,
  2102. "line-height": 1,
  2103. opacity: 1,
  2104. "z-index": 1,
  2105. zoom: 1
  2106. }, m = /^\s*<(\w+|!)[^>]*>/, _ = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, p = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, f = /^(?:body|html)$/i, g = /([A-Z])/g, v = ["val", "css", "html", "text", "data", "width", "height", "offset"], y = h.createElement("table"), b = h.createElement("tr"), w = {
  2107. tr: h.createElement("tbody"),
  2108. tbody: y,
  2109. thead: y,
  2110. tfoot: y,
  2111. td: b,
  2112. th: b,
  2113. "*": h.createElement("div")
  2114. }, k = /complete|loaded|interactive/, x = /^[\w-]*$/, T = {}, M = T.toString, E = {}, L = h.createElement("div"), D = {
  2115. tabindex: "tabIndex",
  2116. readonly: "readOnly",
  2117. for: "htmlFor",
  2118. class: "className",
  2119. maxlength: "maxLength",
  2120. cellspacing: "cellSpacing",
  2121. cellpadding: "cellPadding",
  2122. rowspan: "rowSpan",
  2123. colspan: "colSpan",
  2124. usemap: "useMap",
  2125. frameborder: "frameBorder",
  2126. contenteditable: "contentEditable"
  2127. }, S = Array.isArray || function(t) {
  2128. return t instanceof Array
  2129. }
  2130. ;
  2131. function N(t) {
  2132. return null == t ? String(t) : T[M.call(t)] || "object"
  2133. }
  2134. function A(t) {
  2135. return "function" == N(t)
  2136. }
  2137. function C(t) {
  2138. return null != t && t == t.window
  2139. }
  2140. function I(t) {
  2141. return null != t && t.nodeType == t.DOCUMENT_NODE
  2142. }
  2143. function O(t) {
  2144. return "object" == N(t)
  2145. }
  2146. function R(t) {
  2147. return O(t) && !C(t) && Object.getPrototypeOf(t) == Object.prototype
  2148. }
  2149. function j(t) {
  2150. return "number" == typeof t.length
  2151. }
  2152. function P(t) {
  2153. return t.replace(/::/g, "/").replace(/([A-Z]+)([A-Z][a-z])/g, "$1_$2").replace(/([a-z\d])([A-Z])/g, "$1_$2").replace(/_/g, "-").toLowerCase()
  2154. }
  2155. function z(t) {
  2156. return t in c ? c[t] : c[t] = new RegExp("(^|\\s)" + t + "(\\s|$)")
  2157. }
  2158. function H(t, e) {
  2159. return "number" != typeof e || u[P(t)] ? e : e + "px"
  2160. }
  2161. function F(t) {
  2162. return "children"in t ? r.call(t.children) : i.map(t.childNodes, (function(t) {
  2163. if (1 == t.nodeType)
  2164. return t
  2165. }
  2166. ))
  2167. }
  2168. function q(i, a, s) {
  2169. for (e in a)
  2170. s && (R(a[e]) || S(a[e])) ? (R(a[e]) && !R(i[e]) && (i[e] = {}),
  2171. S(a[e]) && !S(i[e]) && (i[e] = []),
  2172. q(i[e], a[e], s)) : a[e] !== t && (i[e] = a[e])
  2173. }
  2174. function $(t, e) {
  2175. return null == e ? i(t) : i(t).filter(e)
  2176. }
  2177. function U(t, e, i, a) {
  2178. return A(e) ? e.call(t, i, a) : e
  2179. }
  2180. function B(t, e, i) {
  2181. null == i ? t.removeAttribute(e) : t.setAttribute(e, i)
  2182. }
  2183. function W(e, i) {
  2184. var a = e.className
  2185. , s = a && a.baseVal !== t;
  2186. if (i === t)
  2187. return s ? a.baseVal : a;
  2188. s ? a.baseVal = i : e.className = i
  2189. }
  2190. function G(t) {
  2191. var e;
  2192. try {
  2193. return t ? "true" == t || "false" != t && ("null" == t ? null : /^0/.test(t) || isNaN(e = Number(t)) ? /^[\[\{]/.test(t) ? i.parseJSON(t) : t : e) : t
  2194. } catch (e) {
  2195. return t
  2196. }
  2197. }
  2198. function Y(t, e) {
  2199. for (var i in e(t),
  2200. t.childNodes)
  2201. Y(t.childNodes[i], e)
  2202. }
  2203. return E.matches = function(t, e) {
  2204. if (!e || !t || 1 !== t.nodeType)
  2205. return !1;
  2206. var i = t.webkitMatchesSelector || t.mozMatchesSelector || t.oMatchesSelector || t.matchesSelector;
  2207. if (i)
  2208. return i.call(t, e);
  2209. var a, s = t.parentNode, n = !s;
  2210. return n && (s = L).appendChild(t),
  2211. a = ~E.qsa(s, e).indexOf(t),
  2212. n && L.removeChild(t),
  2213. a
  2214. }
  2215. ,
  2216. s = function(t) {
  2217. return t.replace(/-+(.)?/g, (function(t, e) {
  2218. return e ? e.toUpperCase() : ""
  2219. }
  2220. ))
  2221. }
  2222. ,
  2223. n = function(t) {
  2224. return l.call(t, (function(e, i) {
  2225. return t.indexOf(e) == i
  2226. }
  2227. ))
  2228. }
  2229. ,
  2230. E.fragment = function(e, a, s) {
  2231. var n, o, l;
  2232. return _.test(e) && (n = i(h.createElement(RegExp.$1))),
  2233. n || (e.replace && (e = e.replace(p, (match, p1, p2) => p2 ? `<${p2}></${p2}>` : match)),
  2234. a === t && (a = m.test(e) && RegExp.$1),
  2235. a in w || (a = "*"),
  2236. (l = w[a]).innerHTML = "" + e,
  2237. n = i.each(r.call(l.childNodes), (function() {
  2238. l.removeChild(this)
  2239. }
  2240. ))),
  2241. R(s) && (o = i(n),
  2242. i.each(s, (function(t, e) {
  2243. v.indexOf(t) > -1 ? o[t](e) : o.attr(t, e)
  2244. }
  2245. ))),
  2246. n
  2247. }
  2248. ,
  2249. E.Z = function(t, e) {
  2250. return (t = t || []).__proto__ = i.fn,
  2251. t.selector = e || "",
  2252. t
  2253. }
  2254. ,
  2255. E.isZ = function(t) {
  2256. return t instanceof E.Z
  2257. }
  2258. ,
  2259. E.init = function(e, a) {
  2260. var s, n;
  2261. if (!e)
  2262. return E.Z();
  2263. if ("string" == typeof e)
  2264. if ("<" == (e = e.trim())[0] && m.test(e))
  2265. s = E.fragment(e, RegExp.$1, a),
  2266. e = null;
  2267. else {
  2268. if (a !== t)
  2269. return i(a).find(e);
  2270. s = E.qsa(h, e)
  2271. }
  2272. else {
  2273. if (A(e))
  2274. return i(h).ready(e);
  2275. if (E.isZ(e))
  2276. return e;
  2277. if (S(e))
  2278. n = e,
  2279. s = l.call(n, (function(t) {
  2280. return null != t
  2281. }
  2282. ));
  2283. else if (O(e))
  2284. s = [e],
  2285. e = null;
  2286. else if (m.test(e))
  2287. s = E.fragment(e.trim(), RegExp.$1, a),
  2288. e = null;
  2289. else {
  2290. if (a !== t)
  2291. return i(a).find(e);
  2292. s = E.qsa(h, e)
  2293. }
  2294. }
  2295. return E.Z(s, e)
  2296. }
  2297. ,
  2298. (i = function(t, e) {
  2299. return E.init(t, e)
  2300. }
  2301. ).extend = function(t) {
  2302. var e, i = r.call(arguments, 1);
  2303. return "boolean" == typeof t && (e = t,
  2304. t = i.shift()),
  2305. i.forEach((function(i) {
  2306. q(t, i, e)
  2307. }
  2308. )),
  2309. t
  2310. }
  2311. ,
  2312. E.qsa = function(t, e) {
  2313. var i, a = "#" == e[0], s = !a && "." == e[0], n = a || s ? e.slice(1) : e, o = x.test(n);
  2314. return I(t) && o && a ? (i = t.getElementById(n)) ? [i] : [] : 1 !== t.nodeType && 9 !== t.nodeType ? [] : r.call(o && !a ? s ? t.getElementsByClassName(n) : t.getElementsByTagName(e) : t.querySelectorAll(e))
  2315. }
  2316. ,
  2317. i.contains = function(t, e) {
  2318. return t !== e && t.contains(e)
  2319. }
  2320. ,
  2321. i.type = N,
  2322. i.isFunction = A,
  2323. i.isWindow = C,
  2324. i.isArray = S,
  2325. i.isPlainObject = R,
  2326. i.isEmptyObject = function(t) {
  2327. var e;
  2328. for (e in t)
  2329. return !1;
  2330. return !0
  2331. }
  2332. ,
  2333. i.inArray = function(t, e, i) {
  2334. return o.indexOf.call(e, t, i)
  2335. }
  2336. ,
  2337. i.camelCase = s,
  2338. i.trim = function(t) {
  2339. return null == t ? "" : String.prototype.trim.call(t)
  2340. }
  2341. ,
  2342. i.uuid = 0,
  2343. i.support = {},
  2344. i.expr = {},
  2345. i.map = function(t, e) {
  2346. var a, s, n, o, r = [];
  2347. if (j(t))
  2348. for (s = 0; s < t.length; s++)
  2349. null != (a = e(t[s], s)) && r.push(a);
  2350. else
  2351. for (n in t)
  2352. null != (a = e(t[n], n)) && r.push(a);
  2353. return (o = r).length > 0 ? i.fn.concat.apply([], o) : o
  2354. }
  2355. ,
  2356. i.each = function(t, e) {
  2357. var i, a;
  2358. if (j(t)) {
  2359. for (i = 0; i < t.length; i++)
  2360. if (!1 === e.call(t[i], i, t[i]))
  2361. return t
  2362. } else
  2363. for (a in t)
  2364. if (!1 === e.call(t[a], a, t[a]))
  2365. return t;
  2366. return t
  2367. }
  2368. ,
  2369. i.grep = function(t, e) {
  2370. return l.call(t, e)
  2371. }
  2372. ,
  2373. window.JSON && (i.parseJSON = JSON.parse),
  2374. i.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), (function(t, e) {
  2375. T["[object " + e + "]"] = e.toLowerCase()
  2376. }
  2377. )),
  2378. i.fn = {
  2379. forEach: o.forEach,
  2380. reduce: o.reduce,
  2381. push: o.push,
  2382. sort: o.sort,
  2383. indexOf: o.indexOf,
  2384. concat: o.concat,
  2385. map: function(t) {
  2386. return i(i.map(this, (function(e, i) {
  2387. return t.call(e, i, e)
  2388. }
  2389. )))
  2390. },
  2391. slice: function() {
  2392. return i(r.apply(this, arguments))
  2393. },
  2394. ready: function(t) {
  2395. return k.test(h.readyState) && h.body ? t(i) : h.addEventListener("DOMContentLoaded", (function() {
  2396. t(i)
  2397. }
  2398. ), !1),
  2399. this
  2400. },
  2401. get: function(e) {
  2402. return e === t ? r.call(this) : this[e >= 0 ? e : e + this.length]
  2403. },
  2404. toArray: function() {
  2405. return this.get()
  2406. },
  2407. size: function() {
  2408. return this.length
  2409. },
  2410. remove: function() {
  2411. return this.each((function() {
  2412. null != this.parentNode && this.parentNode.removeChild(this)
  2413. }
  2414. ))
  2415. },
  2416. each: function(t) {
  2417. return o.every.call(this, (function(e, i) {
  2418. return !1 !== t.call(e, i, e)
  2419. }
  2420. )),
  2421. this
  2422. },
  2423. filter: function(t) {
  2424. return A(t) ? this.not(this.not(t)) : i(l.call(this, (function(e) {
  2425. return E.matches(e, t)
  2426. }
  2427. )))
  2428. },
  2429. add: function(t, e) {
  2430. return i(n(this.concat(i(t, e))))
  2431. },
  2432. is: function(t) {
  2433. return this.length > 0 && E.matches(this[0], t)
  2434. },
  2435. not: function(e) {
  2436. var a = [];
  2437. if (A(e) && e.call !== t)
  2438. this.each((function(t) {
  2439. e.call(this, t) || a.push(this)
  2440. }
  2441. ));
  2442. else {
  2443. var s = "string" == typeof e ? this.filter(e) : j(e) && A(e.item) ? r.call(e) : i(e);
  2444. this.forEach((function(t) {
  2445. s.indexOf(t) < 0 && a.push(t)
  2446. }
  2447. ))
  2448. }
  2449. return i(a)
  2450. },
  2451. has: function(t) {
  2452. return this.filter((function() {
  2453. return O(t) ? i.contains(this, t) : i(this).find(t).size()
  2454. }
  2455. ))
  2456. },
  2457. eq: function(t) {
  2458. return -1 === t ? this.slice(t) : this.slice(t, +t + 1)
  2459. },
  2460. first: function() {
  2461. var t = this[0];
  2462. return t && !O(t) ? t : i(t)
  2463. },
  2464. last: function() {
  2465. var t = this[this.length - 1];
  2466. return t && !O(t) ? t : i(t)
  2467. },
  2468. find: function(t) {
  2469. var e = this;
  2470. return "object" == typeof t ? i(t).filter((function() {
  2471. var t = this;
  2472. return o.some.call(e, (function(e) {
  2473. return i.contains(e, t)
  2474. }
  2475. ))
  2476. }
  2477. )) : 1 == this.length ? i(E.qsa(this[0], t)) : this.map((function() {
  2478. return E.qsa(this, t)
  2479. }
  2480. ))
  2481. },
  2482. closest: function(t, e) {
  2483. var a = this[0]
  2484. , s = !1;
  2485. for ("object" == typeof t && (s = i(t)); a && !(s ? s.indexOf(a) >= 0 : E.matches(a, t)); )
  2486. a = a !== e && !I(a) && a.parentNode;
  2487. return i(a)
  2488. },
  2489. parents: function(t) {
  2490. for (var e = [], a = this; a.length > 0; )
  2491. a = i.map(a, (function(t) {
  2492. if ((t = t.parentNode) && !I(t) && e.indexOf(t) < 0)
  2493. return e.push(t),
  2494. t
  2495. }
  2496. ));
  2497. return $(e, t)
  2498. },
  2499. parent: function(t) {
  2500. return $(n(this.pluck("parentNode")), t)
  2501. },
  2502. children: function(t) {
  2503. return $(this.map((function() {
  2504. return F(this)
  2505. }
  2506. )), t)
  2507. },
  2508. contents: function() {
  2509. return this.map((function() {
  2510. return r.call(this.childNodes)
  2511. }
  2512. ))
  2513. },
  2514. siblings: function(t) {
  2515. return $(this.map((function(t, e) {
  2516. return l.call(F(e.parentNode), (function(t) {
  2517. return t !== e
  2518. }
  2519. ))
  2520. }
  2521. )), t)
  2522. },
  2523. empty: function() {
  2524. return this.each((function() {
  2525. this.innerHTML = ""
  2526. }
  2527. ))
  2528. },
  2529. pluck: function(t) {
  2530. return i.map(this, (function(e) {
  2531. return e[t]
  2532. }
  2533. ))
  2534. },
  2535. show: function() {
  2536. return this.each((function() {
  2537. var t, e, i;
  2538. "none" == this.style.display && (this.style.display = ""),
  2539. "none" == getComputedStyle(this, "").getPropertyValue("display") && (this.style.display = (t = this.nodeName,
  2540. d[t] || (e = h.createElement(t),
  2541. h.body.appendChild(e),
  2542. i = getComputedStyle(e, "").getPropertyValue("display"),
  2543. e.parentNode.removeChild(e),
  2544. "none" == i && (i = "block"),
  2545. d[t] = i),
  2546. d[t]))
  2547. }
  2548. ))
  2549. },
  2550. replaceWith: function(t) {
  2551. return this.before(t).remove()
  2552. },
  2553. wrap: function(t) {
  2554. var e = A(t);
  2555. if (this[0] && !e)
  2556. var a = i(t).get(0)
  2557. , s = a.parentNode || this.length > 1;
  2558. return this.each((function(n) {
  2559. i(this).wrapAll(e ? t.call(this, n) : s ? a.cloneNode(!0) : a)
  2560. }
  2561. ))
  2562. },
  2563. wrapAll: function(t) {
  2564. if (this[0]) {
  2565. var e;
  2566. for (i(this[0]).before(t = i(t)); (e = t.children()).length; )
  2567. t = e.first();
  2568. i(t).append(this)
  2569. }
  2570. return this
  2571. },
  2572. wrapInner: function(t) {
  2573. var e = A(t);
  2574. return this.each((function(a) {
  2575. var s = i(this)
  2576. , n = s.contents()
  2577. , o = e ? t.call(this, a) : t;
  2578. n.length ? n.wrapAll(o) : s.append(o)
  2579. }
  2580. ))
  2581. },
  2582. unwrap: function() {
  2583. return this.parent().each((function() {
  2584. i(this).replaceWith(i(this).children())
  2585. }
  2586. )),
  2587. this
  2588. },
  2589. clone: function() {
  2590. return this.map((function() {
  2591. return this.cloneNode(!0)
  2592. }
  2593. ))
  2594. },
  2595. hide: function() {
  2596. return this.css("display", "none")
  2597. },
  2598. toggle: function(e) {
  2599. return this.each((function() {
  2600. var a = i(this);
  2601. (e === t ? "none" == a.css("display") : e) ? a.show() : a.hide()
  2602. }
  2603. ))
  2604. },
  2605. prev: function(t) {
  2606. return i(this.pluck("previousElementSibling")).filter(t || "*")
  2607. },
  2608. next: function(t) {
  2609. return i(this.pluck("nextElementSibling")).filter(t || "*")
  2610. },
  2611. html: function(t) {
  2612. return 0 === arguments.length ? this.length > 0 ? this[0].innerHTML : null : this.each((function(e) {
  2613. var a = this.innerHTML;
  2614. i(this).empty().append(U(this, t, e, a))
  2615. }
  2616. ))
  2617. },
  2618. text: function(e) {
  2619. return 0 === arguments.length ? this.length > 0 ? this[0].textContent : null : this.each((function() {
  2620. this.textContent = e === t ? "" : "" + e
  2621. }
  2622. ))
  2623. },
  2624. attr: function(i, a) {
  2625. var s;
  2626. return "string" == typeof i && a === t ? 0 == this.length || 1 !== this[0].nodeType ? t : "value" == i && "INPUT" == this[0].nodeName ? this.val() : !(s = this[0].getAttribute(i)) && i in this[0] ? this[0][i] : s : this.each((function(t) {
  2627. if (1 === this.nodeType)
  2628. if (O(i))
  2629. for (e in i)
  2630. B(this, e, i[e]);
  2631. else
  2632. B(this, i, U(this, a, t, this.getAttribute(i)))
  2633. }
  2634. ))
  2635. },
  2636. removeAttr: function(t) {
  2637. return this.each((function() {
  2638. 1 === this.nodeType && B(this, t)
  2639. }
  2640. ))
  2641. },
  2642. prop: function(e, i) {
  2643. return e = D[e] || e,
  2644. i === t ? this[0] && this[0][e] : this.each((function(t) {
  2645. this[e] = U(this, i, t, this[e])
  2646. }
  2647. ))
  2648. },
  2649. data: function(e, i) {
  2650. var a = this.attr("data-" + e.replace(g, "-$1").toLowerCase(), i);
  2651. return null !== a ? G(a) : t
  2652. },
  2653. val: function(t) {
  2654. return 0 === arguments.length ? this[0] && (this[0].multiple ? i(this[0]).find("option").filter((function() {
  2655. return this.selected
  2656. }
  2657. )).pluck("value") : this[0].value) : this.each((function(e) {
  2658. this.value = U(this, t, e, this.value)
  2659. }
  2660. ))
  2661. },
  2662. offset: function(t) {
  2663. if (t)
  2664. return this.each((function(e) {
  2665. var a = i(this)
  2666. , s = U(this, t, e, a.offset())
  2667. , n = a.offsetParent().offset()
  2668. , o = {
  2669. top: s.top - n.top,
  2670. left: s.left - n.left
  2671. };
  2672. "static" == a.css("position") && (o.position = "relative"),
  2673. a.css(o)
  2674. }
  2675. ));
  2676. if (0 == this.length)
  2677. return null;
  2678. var e = this[0].getBoundingClientRect();
  2679. return {
  2680. left: e.left + window.pageXOffset,
  2681. top: e.top + window.pageYOffset,
  2682. width: Math.round(e.width),
  2683. height: Math.round(e.height)
  2684. }
  2685. },
  2686. css: function(t, a) {
  2687. if (arguments.length < 2) {
  2688. var n = this[0]
  2689. , o = getComputedStyle(n, "");
  2690. if (!n)
  2691. return;
  2692. if ("string" == typeof t)
  2693. return n.style[s(t)] || o.getPropertyValue(t);
  2694. if (S(t)) {
  2695. var r = {};
  2696. return i.each(S(t) ? t : [t], (function(t, e) {
  2697. r[e] = n.style[s(e)] || o.getPropertyValue(e)
  2698. }
  2699. )),
  2700. r
  2701. }
  2702. }
  2703. var l = "";
  2704. if ("string" == N(t))
  2705. a || 0 === a ? l = P(t) + ":" + H(t, a) : this.each((function() {
  2706. this.style.removeProperty(P(t))
  2707. }
  2708. ));
  2709. else
  2710. for (e in t)
  2711. t[e] || 0 === t[e] ? l += P(e) + ":" + H(e, t[e]) + ";" : this.each((function() {
  2712. this.style.removeProperty(P(e))
  2713. }
  2714. ));
  2715. return this.each((function() {
  2716. this.style.cssText += ";" + l
  2717. }
  2718. ))
  2719. },
  2720. index: function(t) {
  2721. return t ? this.indexOf(i(t)[0]) : this.parent().children().indexOf(this[0])
  2722. },
  2723. hasClass: function(t) {
  2724. return !!t && o.some.call(this, (function(t) {
  2725. return this.test(W(t))
  2726. }
  2727. ), z(t))
  2728. },
  2729. addClass: function(t) {
  2730. return t ? this.each((function(e) {
  2731. a = [];
  2732. var s = W(this);
  2733. U(this, t, e, s).split(/\s+/g).forEach((function(t) {
  2734. i(this).hasClass(t) || a.push(t)
  2735. }
  2736. ), this),
  2737. a.length && W(this, s + (s ? " " : "") + a.join(" "))
  2738. }
  2739. )) : this
  2740. },
  2741. removeClass: function(e) {
  2742. return this.each((function(i) {
  2743. if (e === t)
  2744. return W(this, "");
  2745. a = W(this),
  2746. U(this, e, i, a).split(/\s+/g).forEach((function(t) {
  2747. a = a.replace(z(t), " ")
  2748. }
  2749. )),
  2750. W(this, a.trim())
  2751. }
  2752. ))
  2753. },
  2754. toggleClass: function(e, a) {
  2755. return e ? this.each((function(s) {
  2756. var n = i(this);
  2757. U(this, e, s, W(this)).split(/\s+/g).forEach((function(e) {
  2758. (a === t ? !n.hasClass(e) : a) ? n.addClass(e) : n.removeClass(e)
  2759. }
  2760. ))
  2761. }
  2762. )) : this
  2763. },
  2764. scrollTop: function(e) {
  2765. if (this.length) {
  2766. var i = "scrollTop"in this[0];
  2767. return e === t ? i ? this[0].scrollTop : this[0].pageYOffset : this.each(i ? function() {
  2768. this.scrollTop = e
  2769. }
  2770. : function() {
  2771. this.scrollTo(this.scrollX, e)
  2772. }
  2773. )
  2774. }
  2775. },
  2776. scrollLeft: function(e) {
  2777. if (this.length) {
  2778. var i = "scrollLeft"in this[0];
  2779. return e === t ? i ? this[0].scrollLeft : this[0].pageXOffset : this.each(i ? function() {
  2780. this.scrollLeft = e
  2781. }
  2782. : function() {
  2783. this.scrollTo(e, this.scrollY)
  2784. }
  2785. )
  2786. }
  2787. },
  2788. position: function() {
  2789. if (this.length) {
  2790. var t = this[0]
  2791. , e = this.offsetParent()
  2792. , a = this.offset()
  2793. , s = f.test(e[0].nodeName) ? {
  2794. top: 0,
  2795. left: 0
  2796. } : e.offset();
  2797. return a.top -= parseFloat(i(t).css("margin-top")) || 0,
  2798. a.left -= parseFloat(i(t).css("margin-left")) || 0,
  2799. s.top += parseFloat(i(e[0]).css("border-top-width")) || 0,
  2800. s.left += parseFloat(i(e[0]).css("border-left-width")) || 0,
  2801. {
  2802. top: a.top - s.top,
  2803. left: a.left - s.left
  2804. }
  2805. }
  2806. },
  2807. offsetParent: function() {
  2808. return this.map((function() {
  2809. for (var t = this.offsetParent || h.body; t && !f.test(t.nodeName) && "static" == i(t).css("position"); )
  2810. t = t.offsetParent;
  2811. return t
  2812. }
  2813. ))
  2814. }
  2815. },
  2816. i.fn.detach = i.fn.remove,
  2817. ["width", "height"].forEach((function(e) {
  2818. var a = e.replace(/./, (function(t) {
  2819. return t[0].toUpperCase()
  2820. }
  2821. ));
  2822. i.fn[e] = function(s) {
  2823. var n, o = this[0];
  2824. return s === t ? C(o) ? o["inner" + a] : I(o) ? o.documentElement["scroll" + a] : (n = this.offset()) && n[e] : this.each((function(t) {
  2825. (o = i(this)).css(e, U(this, s, t, o[e]()))
  2826. }
  2827. ))
  2828. }
  2829. }
  2830. )),
  2831. ["after", "prepend", "before", "append"].forEach((function(t, e) {
  2832. var a = e % 2;
  2833. i.fn[t] = function() {
  2834. var t, s, n = i.map(arguments, (function(e) {
  2835. return "object" == (t = N(e)) || "array" == t || null == e ? e : E.fragment(e)
  2836. }
  2837. )), o = this.length > 1;
  2838. return n.length < 1 ? this : this.each((function(t, r) {
  2839. s = a ? r : r.parentNode,
  2840. r = 0 == e ? r.nextSibling : 1 == e ? r.firstChild : 2 == e ? r : null,
  2841. n.forEach((function(t) {
  2842. if (o)
  2843. t = t.cloneNode(!0);
  2844. else if (!s)
  2845. return i(t).remove();
  2846. Y(s.insertBefore(t, r), (function(t) {
  2847. null == t.nodeName || "SCRIPT" !== t.nodeName.toUpperCase() || t.type && "text/javascript" !== t.type || t.src || window.eval.call(window, t.innerHTML)
  2848. }
  2849. ))
  2850. }
  2851. ))
  2852. }
  2853. ))
  2854. }
  2855. ,
  2856. i.fn[a ? t + "To" : "insert" + (e ? "Before" : "After")] = function(e) {
  2857. return i(e)[t](this),
  2858. this
  2859. }
  2860. }
  2861. )),
  2862. E.Z.prototype = i.fn,
  2863. E.uniq = n,
  2864. E.deserializeValue = G,
  2865. i.zepto = E,
  2866. i
  2867. }();
  2868. window.Zepto = dt,
  2869. void 0 === window.$ && (window.$ = dt),
  2870. function(t) {
  2871. t.zepto.qsa;
  2872. var e, i = 1, a = Array.prototype.slice, s = t.isFunction, n = function(t) {
  2873. return "string" == typeof t
  2874. }, o = {}, r = {}, l = "onfocusin"in window, h = {
  2875. focus: "focusin",
  2876. blur: "focusout"
  2877. }, d = {
  2878. mouseenter: "mouseover",
  2879. mouseleave: "mouseout"
  2880. };
  2881. function c(t) {
  2882. return t._zid || (t._zid = i++)
  2883. }
  2884. function u(t, e, i, a) {
  2885. if ((e = m(e)).ns)
  2886. var s = (n = e.ns,
  2887. new RegExp("(?:^| )" + n.replace(" ", " .* ?") + "(?: |$)"));
  2888. var n;
  2889. return (o[c(t)] || []).filter((function(t) {
  2890. return t && (!e.e || t.e == e.e) && (!e.ns || s.test(t.ns)) && (!i || c(t.fn) === c(i)) && (!a || t.sel == a)
  2891. }
  2892. ))
  2893. }
  2894. function m(t) {
  2895. var e = ("" + t).split(".");
  2896. return {
  2897. e: e[0],
  2898. ns: e.slice(1).sort().join(" ")
  2899. }
  2900. }
  2901. function _(t, e) {
  2902. return t.del && !l && t.e in h || !!e
  2903. }
  2904. function p(t) {
  2905. return d[t] || l && h[t] || t
  2906. }
  2907. function f(i, a, s, n, r, l, h) {
  2908. var u = c(i)
  2909. , f = o[u] || (o[u] = []);
  2910. a.split(/\s/).forEach((function(a) {
  2911. if ("ready" == a)
  2912. return t(document).ready(s);
  2913. var o = m(a);
  2914. o.fn = s,
  2915. o.sel = r,
  2916. o.e in d && (s = function(e) {
  2917. var i = e.relatedTarget;
  2918. if (!i || i !== this && !t.contains(this, i))
  2919. return o.fn.apply(this, arguments)
  2920. }
  2921. ),
  2922. o.del = l;
  2923. var c = l || s;
  2924. o.proxy = function(t) {
  2925. if (!(t = k(t)).isImmediatePropagationStopped()) {
  2926. t.data = n;
  2927. var a = c.apply(i, t._args == e ? [t] : [t].concat(t._args));
  2928. return !1 === a && (t.preventDefault(),
  2929. t.stopPropagation()),
  2930. a
  2931. }
  2932. }
  2933. ,
  2934. o.i = f.length,
  2935. f.push(o),
  2936. "addEventListener"in i && i.addEventListener(p(o.e), o.proxy, _(o, h))
  2937. }
  2938. ))
  2939. }
  2940. function g(t, e, i, a, s) {
  2941. var n = c(t);
  2942. (e || "").split(/\s/).forEach((function(e) {
  2943. u(t, e, i, a).forEach((function(e) {
  2944. delete o[n][e.i],
  2945. "removeEventListener"in t && t.removeEventListener(p(e.e), e.proxy, _(e, s))
  2946. }
  2947. ))
  2948. }
  2949. ))
  2950. }
  2951. r.click = r.mousedown = r.mouseup = r.mousemove = "MouseEvents",
  2952. t.event = {
  2953. add: f,
  2954. remove: g
  2955. },
  2956. t.proxy = function(e, i) {
  2957. if (s(e)) {
  2958. var a = function() {
  2959. return e.apply(i, arguments)
  2960. };
  2961. return a._zid = c(e),
  2962. a
  2963. }
  2964. if (n(i))
  2965. return t.proxy(e[i], e);
  2966. throw new TypeError("expected function")
  2967. }
  2968. ,
  2969. t.fn.bind = function(t, e, i) {
  2970. return this.on(t, e, i)
  2971. }
  2972. ,
  2973. t.fn.unbind = function(t, e) {
  2974. return this.off(t, e)
  2975. }
  2976. ,
  2977. t.fn.one = function(t, e, i, a) {
  2978. return this.on(t, e, i, a, 1)
  2979. }
  2980. ;
  2981. var v = function() {
  2982. return !0
  2983. }
  2984. , y = function() {
  2985. return !1
  2986. }
  2987. , b = /^([A-Z]|returnValue$|layer[XY]$)/
  2988. , w = {
  2989. preventDefault: "isDefaultPrevented",
  2990. stopImmediatePropagation: "isImmediatePropagationStopped",
  2991. stopPropagation: "isPropagationStopped"
  2992. };
  2993. function k(i, a) {
  2994. return !a && i.isDefaultPrevented || (a || (a = i),
  2995. t.each(w, (function(t, e) {
  2996. var s = a[t];
  2997. i[t] = function() {
  2998. return this[e] = v,
  2999. s && s.apply(a, arguments)
  3000. }
  3001. ,
  3002. i[e] = y
  3003. }
  3004. )),
  3005. (a.defaultPrevented !== e ? a.defaultPrevented : "returnValue"in a ? !1 === a.returnValue : a.getPreventDefault && a.getPreventDefault()) && (i.isDefaultPrevented = v)),
  3006. i
  3007. }
  3008. function x(t) {
  3009. var i, a = {
  3010. originalEvent: t
  3011. };
  3012. for (i in t)
  3013. b.test(i) || t[i] === e || (a[i] = t[i]);
  3014. return k(a, t)
  3015. }
  3016. t.fn.delegate = function(t, e, i) {
  3017. return this.on(e, t, i)
  3018. }
  3019. ,
  3020. t.fn.undelegate = function(t, e, i) {
  3021. return this.off(e, t, i)
  3022. }
  3023. ,
  3024. t.fn.live = function(e, i) {
  3025. return t(document.body).delegate(this.selector, e, i),
  3026. this
  3027. }
  3028. ,
  3029. t.fn.die = function(e, i) {
  3030. return t(document.body).undelegate(this.selector, e, i),
  3031. this
  3032. }
  3033. ,
  3034. t.fn.on = function(i, o, r, l, h) {
  3035. var d, c, u = this;
  3036. return i && !n(i) ? (t.each(i, (function(t, e) {
  3037. u.on(t, o, r, e, h)
  3038. }
  3039. )),
  3040. u) : (n(o) || s(l) || !1 === l || (l = r,
  3041. r = o,
  3042. o = e),
  3043. (s(r) || !1 === r) && (l = r,
  3044. r = e),
  3045. !1 === l && (l = y),
  3046. u.each((function(e, s) {
  3047. h && (d = function(t) {
  3048. return g(s, t.type, l),
  3049. l.apply(this, arguments)
  3050. }
  3051. ),
  3052. o && (c = function(e) {
  3053. var i, n = t(e.target).closest(o, s).get(0);
  3054. if (n && n !== s)
  3055. return i = t.extend(x(e), {
  3056. currentTarget: n,
  3057. liveFired: s
  3058. }),
  3059. (d || l).apply(n, [i].concat(a.call(arguments, 1)))
  3060. }
  3061. ),
  3062. f(s, i, l, r, o, c || d)
  3063. }
  3064. )))
  3065. }
  3066. ,
  3067. t.fn.off = function(i, a, o) {
  3068. var r = this;
  3069. return i && !n(i) ? (t.each(i, (function(t, e) {
  3070. r.off(t, a, e)
  3071. }
  3072. )),
  3073. r) : (n(a) || s(o) || !1 === o || (o = a,
  3074. a = e),
  3075. !1 === o && (o = y),
  3076. r.each((function() {
  3077. g(this, i, o, a)
  3078. }
  3079. )))
  3080. }
  3081. ,
  3082. t.fn.trigger = function(e, i) {
  3083. return (e = n(e) || t.isPlainObject(e) ? t.Event(e) : k(e))._args = i,
  3084. this.each((function() {
  3085. "dispatchEvent"in this ? this.dispatchEvent(e) : t(this).triggerHandler(e, i)
  3086. }
  3087. ))
  3088. }
  3089. ,
  3090. t.fn.triggerHandler = function(e, i) {
  3091. var a, s;
  3092. return this.each((function(o, r) {
  3093. (a = x(n(e) ? t.Event(e) : e))._args = i,
  3094. a.target = r,
  3095. t.each(u(r, e.type || e), (function(t, e) {
  3096. if (s = e.proxy(a),
  3097. a.isImmediatePropagationStopped())
  3098. return !1
  3099. }
  3100. ))
  3101. }
  3102. )),
  3103. s
  3104. }
  3105. ,
  3106. "focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach((function(e) {
  3107. t.fn[e] = function(t) {
  3108. return t ? this.bind(e, t) : this.trigger(e)
  3109. }
  3110. }
  3111. )),
  3112. ["focus", "blur"].forEach((function(e) {
  3113. t.fn[e] = function(t) {
  3114. return t ? this.bind(e, t) : this.each((function() {
  3115. try {
  3116. this[e]()
  3117. } catch (t) {}
  3118. }
  3119. )),
  3120. this
  3121. }
  3122. }
  3123. )),
  3124. t.Event = function(t, e) {
  3125. n(t) || (t = (e = t).type);
  3126. var i = document.createEvent(r[t] || "Events")
  3127. , a = !0;
  3128. if (e)
  3129. for (var s in e)
  3130. "bubbles" == s ? a = !!e[s] : i[s] = e[s];
  3131. return i.initEvent(t, a, !0),
  3132. k(i)
  3133. }
  3134. }(dt),
  3135. function(t) {
  3136. var e, i, a = 0, s = window.document, n = /<script\b[^<]*(?:(?!<\/script\b)[^<]*)*<\/script\b[^>]*>/gi, o = /^(?:text|application)\/javascript/i, r = /^(?:text|application)\/xml/i, l = "application/json", h = "text/html", d = /^\s*$/;
  3137. function c(e, i, a, n) {
  3138. if (e.global)
  3139. return function(e, i, a) {
  3140. var s = t.Event(i);
  3141. return t(e).trigger(s, a),
  3142. !s.isDefaultPrevented()
  3143. }(i || s, a, n)
  3144. }
  3145. function u(t, e) {
  3146. var i = e.context;
  3147. if (!1 === e.beforeSend.call(i, t, e) || !1 === c(e, i, "ajaxBeforeSend", [t, e]))
  3148. return !1;
  3149. c(e, i, "ajaxSend", [t, e])
  3150. }
  3151. function m(t, e, i, a) {
  3152. var s = i.context
  3153. , n = "success";
  3154. i.success.call(s, t, n, e),
  3155. a && a.resolveWith(s, [t, n, e]),
  3156. c(i, s, "ajaxSuccess", [e, i, t]),
  3157. p(n, e, i)
  3158. }
  3159. function _(t, e, i, a, s) {
  3160. var n = a.context;
  3161. a.error.call(n, i, e, t),
  3162. s && s.rejectWith(n, [i, e, t]),
  3163. c(a, n, "ajaxError", [i, a, t || e]),
  3164. p(e, i, a)
  3165. }
  3166. function p(e, i, a) {
  3167. var s = a.context;
  3168. a.complete.call(s, i, e),
  3169. c(a, s, "ajaxComplete", [i, a]),
  3170. function(e) {
  3171. e.global && !--t.active && c(e, null, "ajaxStop")
  3172. }(a)
  3173. }
  3174. function f() {}
  3175. function g(t, e) {
  3176. return "" == e ? t : (t + "&" + e).replace(/[&?]{1,2}/, "?")
  3177. }
  3178. function v(e, i, a, s) {
  3179. var n = !t.isFunction(i);
  3180. return {
  3181. url: e,
  3182. data: n ? i : void 0,
  3183. success: n ? t.isFunction(a) ? a : void 0 : i,
  3184. dataType: n && s || a
  3185. }
  3186. }
  3187. t.active = 0,
  3188. t.ajaxJSONP = function(e, i) {
  3189. if (!("type"in e))
  3190. return t.ajax(e);
  3191. var n, o, r = e.jsonpCallback, l = (t.isFunction(r) ? r() : r) || "jsonp" + ++a, h = s.createElement("script"), d = window[l], c = function(e) {
  3192. t(h).triggerHandler("error", e || "abort")
  3193. }, p = {
  3194. abort: c
  3195. };
  3196. return i && i.promise(p),
  3197. t(h).on("load error", (function(a, s) {
  3198. clearTimeout(o),
  3199. t(h).off().remove(),
  3200. "error" != a.type && n ? m(n[0], p, e, i) : _(null, s || "error", p, e, i),
  3201. window[l] = d,
  3202. n && t.isFunction(d) && d(n[0]),
  3203. d = n = void 0
  3204. }
  3205. )),
  3206. !1 === u(p, e) ? (c("abort"),
  3207. p) : (window[l] = function() {
  3208. n = arguments
  3209. }
  3210. ,
  3211. h.src = e.url.replace(/\?(.+)=\?/, "?$1=" + l),
  3212. s.head.appendChild(h),
  3213. e.timeout > 0 && (o = setTimeout((function() {
  3214. c("timeout")
  3215. }
  3216. ), e.timeout)),
  3217. p)
  3218. }
  3219. ,
  3220. t.ajaxSettings = {
  3221. type: "GET",
  3222. beforeSend: f,
  3223. success: f,
  3224. error: f,
  3225. complete: f,
  3226. context: null,
  3227. global: !0,
  3228. xhr: function() {
  3229. return new window.XMLHttpRequest
  3230. },
  3231. accepts: {
  3232. script: "text/javascript, application/javascript, application/x-javascript",
  3233. json: l,
  3234. xml: "application/xml, text/xml",
  3235. html: h,
  3236. text: "text/plain"
  3237. },
  3238. crossDomain: !1,
  3239. timeout: 0,
  3240. processData: !0,
  3241. cache: !0
  3242. },
  3243. t.ajax = function(a) {
  3244. var s = t.extend({}, a || {})
  3245. , n = t.Deferred && t.Deferred();
  3246. for (e in t.ajaxSettings)
  3247. void 0 === s[e] && (s[e] = t.ajaxSettings[e]);
  3248. !function(e) {
  3249. e.global && 0 == t.active++ && c(e, null, "ajaxStart")
  3250. }(s),
  3251. s.crossDomain || (s.crossDomain = /^([\w-]+:)?\/\/([^\/]+)/.test(s.url) && RegExp.$2 != window.location.host),
  3252. s.url || (s.url = window.location.toString()),
  3253. function(e) {
  3254. e.processData && e.data && "string" != t.type(e.data) && (e.data = t.param(e.data, e.traditional)),
  3255. !e.data || e.type && "GET" != e.type.toUpperCase() || (e.url = g(e.url, e.data),
  3256. e.data = void 0)
  3257. }(s),
  3258. !1 === s.cache && (s.url = g(s.url, "_=" + Date.now()));
  3259. var p = s.dataType
  3260. , v = /\?.+=\?/.test(s.url);
  3261. if ("jsonp" == p || v)
  3262. return v || (s.url = g(s.url, s.jsonp ? s.jsonp + "=?" : !1 === s.jsonp ? "" : "callback=?")),
  3263. t.ajaxJSONP(s, n);
  3264. var y, b = s.accepts[p], w = {}, k = function(t, e) {
  3265. w[t.toLowerCase()] = [t, e]
  3266. }, x = /^([\w-]+:)\/\//.test(s.url) ? RegExp.$1 : window.location.protocol, T = s.xhr(), M = T.setRequestHeader;
  3267. if (n && n.promise(T),
  3268. s.crossDomain || k("X-Requested-With", "XMLHttpRequest"),
  3269. k("Accept", b || "*/*"),
  3270. (b = s.mimeType || b) && (b.indexOf(",") > -1 && (b = b.split(",", 2)[0]),
  3271. T.overrideMimeType && T.overrideMimeType(b)),
  3272. (s.contentType || !1 !== s.contentType && s.data && "GET" != s.type.toUpperCase()) && k("Content-Type", s.contentType || "application/x-www-form-urlencoded"),
  3273. s.headers)
  3274. for (i in s.headers)
  3275. k(i, s.headers[i]);
  3276. if (T.setRequestHeader = k,
  3277. T.onreadystatechange = function() {
  3278. if (4 == T.readyState) {
  3279. T.onreadystatechange = f,
  3280. clearTimeout(y);
  3281. var e, i = !1;
  3282. if (T.status >= 200 && T.status < 300 || 304 == T.status || 0 == T.status && "file:" == x) {
  3283. p = p || function(t) {
  3284. return t && (t = t.split(";", 2)[0]),
  3285. t && (t == h ? "html" : t == l ? "json" : o.test(t) ? "script" : r.test(t) && "xml") || "text"
  3286. }(s.mimeType || T.getResponseHeader("content-type")),
  3287. e = T.responseText;
  3288. try {
  3289. "script" == p ? (0,
  3290. eval)(e) : "xml" == p ? e = T.responseXML : "json" == p && (e = d.test(e) ? null : t.parseJSON(e))
  3291. } catch (t) {
  3292. i = t
  3293. }
  3294. i ? _(i, "parsererror", T, s, n) : m(e, T, s, n)
  3295. } else
  3296. _(T.statusText || null, T.status ? "error" : "abort", T, s, n)
  3297. }
  3298. }
  3299. ,
  3300. !1 === u(T, s))
  3301. return T.abort(),
  3302. _(null, "abort", T, s, n),
  3303. T;
  3304. if (s.xhrFields)
  3305. for (i in s.xhrFields)
  3306. T[i] = s.xhrFields[i];
  3307. var E = !("async"in s) || s.async;
  3308. for (i in T.open(s.type, s.url, E, s.username, s.password),
  3309. w)
  3310. M.apply(T, w[i]);
  3311. return s.timeout > 0 && (y = setTimeout((function() {
  3312. T.onreadystatechange = f,
  3313. T.abort(),
  3314. _(null, "timeout", T, s, n)
  3315. }
  3316. ), s.timeout)),
  3317. T.send(s.data ? s.data : null),
  3318. T
  3319. }
  3320. ,
  3321. t.get = function(e, i, a, s) {
  3322. return t.ajax(v.apply(null, arguments))
  3323. }
  3324. ,
  3325. t.post = function(e, i, a, s) {
  3326. var n = v.apply(null, arguments);
  3327. return n.type = "POST",
  3328. t.ajax(n)
  3329. }
  3330. ,
  3331. t.getJSON = function(e, i, a) {
  3332. var s = v.apply(null, arguments);
  3333. return s.dataType = "json",
  3334. t.ajax(s)
  3335. }
  3336. ,
  3337. t.fetchJSON = function(t) {
  3338. var e = new XMLHttpRequest;
  3339. return new Promise((function(i, a) {
  3340. e.onreadystatechange = function() {
  3341. try {
  3342. if (4 !== e.readyState)
  3343. return;
  3344. if (e.status >= 200 && e.status < 300) {
  3345. var s = JSON.parse(e.responseText);
  3346. i(s)
  3347. } else
  3348. a({
  3349. status: e.status,
  3350. statusText: e.statusText
  3351. })
  3352. } catch (e) {
  3353. a({
  3354. status: 400,
  3355. statusText: `Error fetching JSON from ${t}: ${e}`
  3356. })
  3357. }
  3358. }
  3359. ,
  3360. e.open("GET", t, !0),
  3361. e.send()
  3362. }
  3363. ))
  3364. }
  3365. ,
  3366. t.fn.load = function(e, i, a) {
  3367. if (!this.length)
  3368. return this;
  3369. var s, o = this, r = e.split(/\s/), l = v(e, i, a), h = l.success;
  3370. return r.length > 1 && (l.url = r[0],
  3371. s = r[1]),
  3372. l.success = function(e) {
  3373. var safeHTML = DOMPurify.sanitize(e);
  3374. o.html(s
  3375. ? t("<div>").html(safeHTML).find(s)
  3376. : safeHTML);
  3377. h && h.apply(o, arguments);
  3378. }
  3379. ,
  3380. t.ajax(l),
  3381. this
  3382. }
  3383. ;
  3384. var y = encodeURIComponent;
  3385. function b(e, i, a, s) {
  3386. var n, o = t.isArray(i), r = t.isPlainObject(i);
  3387. t.each(i, (function(i, l) {
  3388. n = t.type(l),
  3389. s && (i = a ? s : s + "[" + (r || "object" == n || "array" == n ? i : "") + "]"),
  3390. !s && o ? e.add(l.name, l.value) : "array" == n || !a && "object" == n ? b(e, l, a, i) : e.add(i, l)
  3391. }
  3392. ))
  3393. }
  3394. t.param = function(t, e) {
  3395. var i = [];
  3396. return i.add = function(t, e) {
  3397. this.push(y(t) + "=" + y(e))
  3398. }
  3399. ,
  3400. b(i, t, e),
  3401. i.join("&").replace(/%20/g, "+")
  3402. }
  3403. }(dt),
  3404. (lt = dt).fn.serializeArray = function() {
  3405. var t, e = [];
  3406. return lt([].slice.call(this.get(0).elements)).each((function() {
  3407. var i = (t = lt(this)).attr("type");
  3408. "fieldset" != this.nodeName.toLowerCase() && !this.disabled && "submit" != i && "reset" != i && "button" != i && ("radio" != i && "checkbox" != i || this.checked) && e.push({
  3409. name: t.attr("name"),
  3410. value: t.val()
  3411. })
  3412. }
  3413. )),
  3414. e
  3415. }
  3416. ,
  3417. lt.fn.serialize = function() {
  3418. var t = [];
  3419. return this.serializeArray().forEach((function(e) {
  3420. t.push(encodeURIComponent(e.name) + "=" + encodeURIComponent(e.value))
  3421. }
  3422. )),
  3423. t.join("&")
  3424. }
  3425. ,
  3426. lt.fn.submit = function(t) {
  3427. if (t)
  3428. this.bind("submit", t);
  3429. else if (this.length) {
  3430. var e = lt.Event("submit");
  3431. this.eq(0).trigger(e),
  3432. e.isDefaultPrevented() || this.get(0).submit()
  3433. }
  3434. return this
  3435. }
  3436. ,
  3437. function(t) {
  3438. "__proto__"in {} || t.extend(t.zepto, {
  3439. Z: function(e, i) {
  3440. return e = e || [],
  3441. t.extend(e, t.fn),
  3442. e.selector = i || "",
  3443. e.__Z = !0,
  3444. e
  3445. },
  3446. isZ: function(e) {
  3447. return "array" === t.type(e) && "__Z"in e
  3448. }
  3449. });
  3450. try {
  3451. getComputedStyle(void 0)
  3452. } catch (t) {
  3453. var e = getComputedStyle;
  3454. window.getComputedStyle = function(t, i) {
  3455. try {
  3456. return e(t, i)
  3457. } catch (t) {
  3458. return null
  3459. }
  3460. }
  3461. }
  3462. }(dt);
  3463. const ct = dt.getJSON
  3464. , ut = dt.ajax
  3465. , mt = dt.fetchJSON
  3466. , _t = [["millisecond", 1, function(t) {}
  3467. ], ["second", 1e3, function(t) {
  3468. t.setMilliseconds(0)
  3469. }
  3470. ], ["minute", 6e4, function(t) {
  3471. t.setSeconds(0)
  3472. }
  3473. ], ["hour", 36e5, function(t) {
  3474. t.setMinutes(0)
  3475. }
  3476. ], ["day", 864e5, function(t) {
  3477. t.setHours(0)
  3478. }
  3479. ], ["month", 2592e6, function(t) {
  3480. t.setDate(1)
  3481. }
  3482. ], ["year", 31536e6, function(t) {
  3483. t.setMonth(0)
  3484. }
  3485. ], ["decade", 31536e7, function(t) {
  3486. var e = t.getFullYear();
  3487. t.setFullYear(e - e % 10)
  3488. }
  3489. ], ["century", 31536e8, function(t) {
  3490. var e = t.getFullYear();
  3491. t.setFullYear(e - e % 100)
  3492. }
  3493. ], ["millennium", 31536e9, function(t) {
  3494. var e = t.getFullYear();
  3495. t.setFullYear(e - e % 1e3)
  3496. }
  3497. ]]
  3498. , pt = ["millisecond", "second", "minute", "hour", "day", "month", "year"]
  3499. , ft = /^([\+-]?\d+?)(-\d{2}?)?(-\d{2}?)?$/
  3500. , gt = /^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/
  3501. , vt = {
  3502. base: {
  3503. millisecond: "time_short",
  3504. second: "time",
  3505. minute: "time_no_seconds_small_date",
  3506. hour: "time_no_seconds_small_date",
  3507. day: "full",
  3508. month: "month",
  3509. year: "year",
  3510. decade: "year",
  3511. century: "year",
  3512. millennium: "year",
  3513. age: "fallback",
  3514. epoch: "fallback",
  3515. era: "fallback",
  3516. eon: "fallback",
  3517. eon2: "fallback"
  3518. },
  3519. short: {
  3520. millisecond: "time_short",
  3521. second: "time_short",
  3522. minute: "time_no_seconds_short",
  3523. hour: "time_no_minutes_short",
  3524. day: "full_short",
  3525. month: "month_short",
  3526. year: "year",
  3527. decade: "year",
  3528. century: "year",
  3529. millennium: "year",
  3530. age: "fallback",
  3531. epoch: "fallback",
  3532. era: "fallback",
  3533. eon: "fallback",
  3534. eon2: "fallback"
  3535. }
  3536. }
  3537. , yt = it.extend({
  3538. initialize: function(t, e, i) {
  3539. "number" == typeof t ? this.data = {
  3540. format: "yyyy mmmm",
  3541. date_obj: new Date(t)
  3542. } : Date == t.constructor ? this.data = {
  3543. format: "yyyy mmmm",
  3544. date_obj: t
  3545. } : (this.data = JSON.parse(JSON.stringify(t)),
  3546. this._createDateObj()),
  3547. t.format && !e && (e = t.format),
  3548. this._setFormat(e, i)
  3549. },
  3550. setDateFormat: function(t) {
  3551. this.data.format = t
  3552. },
  3553. getDisplayDate: function(t, e) {
  3554. if (this.data.display_date)
  3555. return this.data.display_date;
  3556. t || (t = Nt.fallback),
  3557. t.constructor != Nt && (S("First argument to getDisplayDate must be type Language"),
  3558. t = Nt.fallback);
  3559. var i = e || this.data.format;
  3560. return t.formatDate(this.data.date_obj, i)
  3561. },
  3562. getMillisecond: function() {
  3563. return this.getTime()
  3564. },
  3565. getTime: function() {
  3566. return this.data.date_obj.getTime()
  3567. },
  3568. isBefore: function(t) {
  3569. if (!this.data.date_obj.constructor == t.data.date_obj.constructor)
  3570. throw new x("date_compare_err");
  3571. return "isBefore"in this.data.date_obj ? this.data.date_obj.isBefore(t.data.date_obj) : this.data.date_obj < t.data.date_obj
  3572. },
  3573. isAfter: function(t) {
  3574. if (!this.data.date_obj.constructor == t.data.date_obj.constructor)
  3575. throw new x("date_compare_err");
  3576. return "isAfter"in this.data.date_obj ? this.data.date_obj.isAfter(t.data.date_obj) : this.data.date_obj > t.data.date_obj
  3577. },
  3578. floor: function(t) {
  3579. for (var e = new Date(this.data.date_obj.getTime()), i = 0; i < _t.length; i++)
  3580. if (_t[i][2](e),
  3581. _t[i][0] == t)
  3582. return new yt(e);
  3583. throw new x("invalid_scale_err",t)
  3584. },
  3585. _getDateData: function() {
  3586. var t = {
  3587. year: 0,
  3588. month: 1,
  3589. day: 1,
  3590. hour: 0,
  3591. minute: 0,
  3592. second: 0,
  3593. millisecond: 0
  3594. };
  3595. for (var e in E(t, this.data),
  3596. pt) {
  3597. if (!O(t[pt[e]]).match(/^-?\d*$/))
  3598. throw new x("invalid_date_err",pt[e] + " = '" + t[pt[e]] + "'");
  3599. var i = parseInt(t[pt[e]]);
  3600. isNaN(i) && (i = 4 == e || 5 == e ? 1 : 0),
  3601. t[pt[e]] = i
  3602. }
  3603. return t.month > 0 && t.month <= 12 && (t.month = t.month - 1),
  3604. t
  3605. },
  3606. _createDateObj: function() {
  3607. var t = this._getDateData();
  3608. this.data.date_obj = new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond),
  3609. this.data.date_obj.getFullYear() != t.year && this.data.date_obj.setFullYear(t.year)
  3610. },
  3611. findBestFormat: function(t) {
  3612. for (var e = pt, i = 0; i < e.length; i++)
  3613. if (this.data[e[i]])
  3614. return t ? t in vt || (t = "short") : t = "base",
  3615. vt[t][e[i]];
  3616. return ""
  3617. },
  3618. _setFormat: function(t, e) {
  3619. t ? this.data.format = t : this.data.format || (this.data.format = this.findBestFormat()),
  3620. e ? this.data.format_short = e : this.data.format_short || (this.data.format_short = this.findBestFormat(!0))
  3621. },
  3622. getFullYear: function() {
  3623. return this.data.date_obj.getFullYear()
  3624. }
  3625. });
  3626. function bt(t) {
  3627. if (t.match(ft)) {
  3628. var e = t.match(ft).slice(1)
  3629. , i = {
  3630. year: e[0].replace("+", "")
  3631. };
  3632. return e[1] && (i.month = e[1].replace("-", "")),
  3633. e[2] && (i.day = e[2].replace("-", "")),
  3634. i
  3635. }
  3636. if (t.match(gt))
  3637. return cls.parseISODate(t);
  3638. if (t.match(/^\-?\d+$/))
  3639. return {
  3640. year: t
  3641. };
  3642. var a = {};
  3643. if (t.match(/\d+\/\d+\/\d+/)) {
  3644. var s = t.match(/\d+\/\d+\/\d+/)[0];
  3645. t = O(t.replace(s, ""));
  3646. var n = s.split("/");
  3647. a.month = n[0],
  3648. a.day = n[1],
  3649. a.year = n[2]
  3650. }
  3651. if (t.match(/\d+\/\d+/) && (s = t.match(/\d+\/\d+/)[0],
  3652. t = O(t.replace(s, "")),
  3653. n = s.split("/"),
  3654. a.month = n[0],
  3655. a.year = n[1]),
  3656. t.match(":")) {
  3657. var o = t.split(":");
  3658. if (a.hour = o[0],
  3659. a.minute = o[1],
  3660. o[2]) {
  3661. let t = o[2].split(".");
  3662. a.second = t[0],
  3663. a.millisecond = t[1]
  3664. }
  3665. }
  3666. return a
  3667. }
  3668. const wt = it.extend({
  3669. initialize: function(t) {
  3670. if (this.year = parseInt(t),
  3671. isNaN(this.year))
  3672. throw new x("invalid_year_err",t)
  3673. },
  3674. isBefore: function(t) {
  3675. return this.year < t.year
  3676. },
  3677. isAfter: function(t) {
  3678. return this.year > t.year
  3679. },
  3680. getTime: function() {
  3681. return this.year
  3682. }
  3683. })
  3684. , kt = 1e6
  3685. , xt = 10 * kt
  3686. , Tt = 10 * xt
  3687. , Mt = 10 * Tt;
  3688. function Et(t) {
  3689. return function(e) {
  3690. var i = e.getTime();
  3691. return new wt(Math.floor(i / t) * t)
  3692. }
  3693. }
  3694. const Lt = [["year", 1, new Et(1)], ["decade", 10, new Et(10)], ["century", 100, new Et(100)], ["millennium", 1e3, new Et(1e3)], ["age", kt, new Et(kt)], ["epoch", xt, new Et(xt)], ["era", Tt, new Et(Tt)], ["eon", Mt, new Et(Mt)]]
  3695. , Dt = yt.extend({
  3696. initialize: function(t, e, i) {
  3697. wt == t.constructor ? this.data = {
  3698. date_obj: t
  3699. } : (this.data = JSON.parse(JSON.stringify(t)),
  3700. this._createDateObj()),
  3701. t.format && !e && (e = t.format),
  3702. this._setFormat(e, i)
  3703. },
  3704. _createDateObj: function() {
  3705. var t = this._getDateData();
  3706. this.data.date_obj = new wt(t.year)
  3707. },
  3708. floor: function(t) {
  3709. for (var e = 0; e < Lt.length; e++)
  3710. if (Lt[e][0] == t) {
  3711. var i = Lt[e][2](this.data.date_obj);
  3712. return new Dt(i)
  3713. }
  3714. throw new x("invalid_scale_err",t)
  3715. },
  3716. getFullYear: function() {
  3717. return this.data.date_obj.getTime()
  3718. }
  3719. })
  3720. , St = new RegExp(/\$\{(.+?)\}/g);
  3721. class Nt {
  3722. constructor(t, e) {
  3723. for (let t in It.en)
  3724. this[t] = It.en[t];
  3725. if (t && "string" == typeof t && "en" != t) {
  3726. var i = t;
  3727. if (!(i in It)) {
  3728. console.log(`Expected language ${i} to be cached. Did you call the constructor directly?`);
  3729. var a = At(i, e);
  3730. mt(a).then((t => {
  3731. It[i] = t
  3732. }
  3733. )).catch((t => {
  3734. console.log(`Error loading language [${a}] ${t.statusText} [${t.status}]`)
  3735. }
  3736. ))
  3737. }
  3738. E(this, It[i])
  3739. }
  3740. }
  3741. mergeData(t) {
  3742. for (k in It.en)
  3743. t[k] && ("object" == typeof this[k] ? E(t[k], this[k]) : this[k] = t[k])
  3744. }
  3745. formatBigYear(t, e) {
  3746. var i = t.year
  3747. , a = this.bigdateformats[e] || this.bigdateformats.fallback;
  3748. if (a) {
  3749. for (var s = 0; s < a.length; s++) {
  3750. var n = a[s];
  3751. if (Math.abs(i / n[0]) > 1)
  3752. return Ct(Math.abs(i / n[0]), n[1])
  3753. }
  3754. return i.toString()
  3755. }
  3756. return S("Language file dateformats missing cosmological. Falling back."),
  3757. Ct(i, e)
  3758. }
  3759. _(t, e) {
  3760. let i = this.messages[t] || Nt.fallback.messages[t] || t;
  3761. if (i.match(St)) {
  3762. if (!e)
  3763. throw new x("template_message_without_context");
  3764. for (let t of i.matchAll(St)) {
  3765. if (!(t[1]in e))
  3766. throw new x("template_message_without_context");
  3767. i = i.replace(t[0], e[t[1]])
  3768. }
  3769. }
  3770. return i
  3771. }
  3772. formatDate(t, e) {
  3773. return t.constructor == Date ? this.formatJSDate(t, e) : t.constructor == wt ? this.formatBigYear(t, e) : t.data && t.data.date_obj ? this.formatDate(t.data.date_obj, e) : (S("Unfamiliar date presented for formatting"),
  3774. t.toString())
  3775. }
  3776. formatJSDate(t, e) {
  3777. var i = this
  3778. , a = function(t, e) {
  3779. var a = i.period_labels[t];
  3780. return a && (t = e < 12 ? a[0] : a[1]),
  3781. "<span class='tl-timeaxis-timesuffix'>" + t + "</span>"
  3782. };
  3783. e || (e = "full");
  3784. var s = this.dateformats[e] || Nt.fallback.dateformats[e];
  3785. s || (s = e);
  3786. var n = "get"
  3787. , o = t[n + "Date"]()
  3788. , r = t[n + "Day"]()
  3789. , l = t[n + "Month"]()
  3790. , h = t[n + "FullYear"]()
  3791. , d = t[n + "Hours"]()
  3792. , c = t[n + "Minutes"]()
  3793. , u = t[n + "Seconds"]()
  3794. , m = t[n + "Milliseconds"]()
  3795. , _ = t.getTimezoneOffset()
  3796. , p = {
  3797. d: o,
  3798. dd: N(o),
  3799. ddd: this.date.day_abbr[r],
  3800. dddd: this.date.day[r],
  3801. m: l + 1,
  3802. mm: N(l + 1),
  3803. mmm: this.date.month_abbr[l],
  3804. mmmm: this.date.month[l],
  3805. yy: String(h).slice(2),
  3806. yyyy: h < 0 && this.has_negative_year_modifier() ? Math.abs(h) : h,
  3807. h: d % 12 || 12,
  3808. hh: N(d % 12 || 12),
  3809. H: d,
  3810. HH: N(d),
  3811. M: c,
  3812. MM: N(c),
  3813. s: u,
  3814. ss: N(u),
  3815. l: N(m, 3),
  3816. L: N(m > 99 ? Math.round(m / 10) : m),
  3817. t: a("t", d),
  3818. tt: a("tt", d),
  3819. T: a("T", d),
  3820. TT: a("TT", d),
  3821. Z: (String(t).match(/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g) || [""]).pop().replace(/[^-+\dA-Z]/g, ""),
  3822. o: (_ > 0 ? "-" : "+") + N(100 * Math.floor(Math.abs(_) / 60) + Math.abs(_) % 60, 4),
  3823. S: ["th", "st", "nd", "rd"][o % 10 > 3 ? 0 : (o % 100 - o % 10 != 10) * o % 10]
  3824. }
  3825. , f = s.replace(Nt.DATE_FORMAT_TOKENS, (function(t) {
  3826. return t in p ? p[t] : t.slice(1, t.length - 1)
  3827. }
  3828. ));
  3829. return this._applyEra(f, h)
  3830. }
  3831. has_negative_year_modifier() {
  3832. return Boolean(this.era_labels.negative_year.prefix || this.era_labels.negative_year.suffix)
  3833. }
  3834. _applyEra(t, e) {
  3835. var i = e < 0 ? this.era_labels.negative_year : this.era_labels.positive_year
  3836. , a = "";
  3837. return i.prefix && (a += "<span>" + i.prefix + "</span> "),
  3838. a += t,
  3839. i.suffix && (a += " <span>" + i.suffix + "</span>"),
  3840. a
  3841. }
  3842. }
  3843. function At(t, e) {
  3844. if (/\.json$/.test(t))
  3845. var i = t;
  3846. else {
  3847. var a = "/locale/" + t + ".json";
  3848. /\/$/.test(e) && (a = a.substr(1)),
  3849. i = e + a
  3850. }
  3851. return i
  3852. }
  3853. function Ct(t, e) {
  3854. if (e.match(/%(\.(\d+))?f/)) {
  3855. var i = e.match(/%(\.(\d+))?f/)
  3856. , a = i[0];
  3857. return i[2] && (t = t.toFixed(i[2])),
  3858. e.replace(a, t)
  3859. }
  3860. return e
  3861. }
  3862. Nt.fallback = {
  3863. messages: {}
  3864. },
  3865. Nt.DATE_FORMAT_TOKENS = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g;
  3866. var It = {
  3867. en: {
  3868. name: "English (built-in)",
  3869. lang: "en",
  3870. api: {
  3871. wikipedia: "en"
  3872. },
  3873. messages: {
  3874. loading: "Loading",
  3875. wikipedia: "From Wikipedia, the free encyclopedia",
  3876. error: "Error",
  3877. return_to_title: "Return to Title",
  3878. go_to_end: "Go to the last slide",
  3879. loading_content: "Loading Content",
  3880. loading_timeline: "Loading Timeline... ",
  3881. swipe_to_navigate: "Swipe to Navigate<br><span class='tl-button'>OK</span>",
  3882. zoom_in: "Zoom in",
  3883. zoom_out: "Zoom out",
  3884. unknown_read_err: "An unexpected error occurred trying to read your spreadsheet data",
  3885. invalid_url_err: "Unable to read Timeline data. Make sure your URL is for a Google Spreadsheet or a Timeline JSON file.",
  3886. network_err: "Unable to read your Google Spreadsheet. Make sure you have published it to the web.",
  3887. missing_start_date_err: "Missing start_date",
  3888. invalid_start_time_without_date: "Invalid configuration: time cannot be used without date.",
  3889. invalid_end_time_without_date: "Invalid configuration: end time cannot be used without end date.",
  3890. date_compare_err: "Can't compare timeline date objects on different scales",
  3891. invalid_scale_err: "Invalid scale",
  3892. invalid_date_err: "Invalid date: month, day and year must be numbers.",
  3893. invalid_separator_error: "Invalid time: misuse of : or . as separator.",
  3894. invalid_hour_err: "Invalid time (hour)",
  3895. invalid_minute_err: "Invalid time (minute)",
  3896. invalid_second_err: "Invalid time (second)",
  3897. invalid_fractional_err: "Invalid time (fractional seconds)",
  3898. invalid_second_fractional_err: "Invalid time (seconds and fractional seconds)",
  3899. invalid_year_err: "Invalid year",
  3900. flickr_notfound_err: "Photo not found or private",
  3901. flickr_invalidurl_err: "Invalid Flickr URL",
  3902. imgur_invalidurl_err: "Invalid Imgur URL",
  3903. twitter_load_err: "Unable to load Tweet",
  3904. twitterembed_invalidurl_err: "Invalid Twitter Embed url",
  3905. wikipedia_load_err: "Unable to load Wikipedia entry",
  3906. wikipedia_image_load_err: "Unable to load Wikipedia image data",
  3907. spotify_invalid_url: "Invalid Spotify URL",
  3908. invalid_rgb_err: "Invalid RGB argument",
  3909. time_scale_scale_err: "Don't know how to get date from time for scale",
  3910. axis_helper_no_options_err: "Axis helper must be configured with options",
  3911. axis_helper_scale_err: "No AxisHelper available for scale",
  3912. invalid_integer_option: "Invalid option value—must be a whole number.",
  3913. instagram_bad_request: "Invalid or private Instagram URL",
  3914. template_message_without_context: "Required variables not provided for template translation message",
  3915. aria_label_timeline: "Timeline",
  3916. aria_label_timeline_navigation: "Timeline navigation",
  3917. aria_label_timeline_content: "Timeline content",
  3918. aria_label_zoomin: "Show less than ${start} to ${end}",
  3919. aria_label_zoomout: "Show more than ${start} to ${end}"
  3920. },
  3921. date: {
  3922. month: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
  3923. month_abbr: ["Jan.", "Feb.", "March", "April", "May", "June", "July", "Aug.", "Sept.", "Oct.", "Nov.", "Dec."],
  3924. day: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
  3925. day_abbr: ["Sun.", "Mon.", "Tues.", "Wed.", "Thurs.", "Fri.", "Sat."]
  3926. },
  3927. era_labels: {
  3928. positive_year: {
  3929. prefix: "",
  3930. suffix: ""
  3931. },
  3932. negative_year: {
  3933. prefix: "",
  3934. suffix: "BCE"
  3935. }
  3936. },
  3937. period_labels: {
  3938. t: ["a", "p"],
  3939. tt: ["am", "pm"],
  3940. T: ["A", "P"],
  3941. TT: ["AM", "PM"]
  3942. },
  3943. dateformats: {
  3944. year: "yyyy",
  3945. month_short: "mmm",
  3946. month: "mmmm yyyy",
  3947. full_short: "mmm d",
  3948. full: "mmmm d',' yyyy",
  3949. time: "h:MM:ss TT' <small>'mmmm d',' yyyy'</small>'",
  3950. time_short: "h:MM:ss TT",
  3951. time_no_seconds_short: "h:MM TT",
  3952. time_no_minutes_short: "h TT",
  3953. time_no_seconds_small_date: "h:MM TT' <small>'mmmm d',' yyyy'</small>'",
  3954. time_milliseconds: "l",
  3955. full_long: "mmm d',' yyyy 'at' h:MM TT",
  3956. full_long_small_date: "h:MM TT' <small>mmm d',' yyyy'</small>'"
  3957. },
  3958. bigdateformats: {
  3959. fallback: [[1e9, "%.2f billion years ago"], [1e6, "%.1f million years ago"], [1e3, "%.1f thousand years ago"], [1, "%f years ago"]],
  3960. compact: [[1e9, "%.2f bya"], [1e6, "%.1f mya"], [1e3, "%.1f kya"], [1, "%f years ago"]],
  3961. verbose: [[1e9, "%.2f billion years ago"], [1e6, "%.1f million years ago"], [1e3, "%.1f thousand years ago"], [1, "%f years ago"]]
  3962. }
  3963. }
  3964. };
  3965. let Ot = new Nt;
  3966. Nt.fallback = Ot;
  3967. class Rt {
  3968. setLanguage(t) {
  3969. this.language = t
  3970. }
  3971. getLanguage() {
  3972. if (this.language) {
  3973. if ("object" == typeof this.language)
  3974. return this.language;
  3975. S("I18NMixins.getLanguage: this.language should be object, but is " + typeof this.language)
  3976. }
  3977. return Ot
  3978. }
  3979. _(t, e) {
  3980. return this.getLanguage()._(t, e)
  3981. }
  3982. }
  3983. class jt {
  3984. constructor(t, e, i) {
  3985. i && this.setLanguage(i),
  3986. this._el = {
  3987. parent: {},
  3988. container: {},
  3989. message_container: {},
  3990. loading_icon: {},
  3991. message: {}
  3992. },
  3993. this.options = {
  3994. width: 600,
  3995. height: 600,
  3996. message_class: "tl-message",
  3997. message_icon_class: "tl-loading-icon"
  3998. },
  3999. this.container = t,
  4000. E(this.options, e),
  4001. this._el.container = v("div", this.options.message_class),
  4002. t && (t.appendChild(this._el.container),
  4003. this._el.parent = t),
  4004. this.animator = {},
  4005. this._initLayout(),
  4006. this._initEvents()
  4007. }
  4008. updateMessage(t) {
  4009. this._el.message.innerHTML = t || this._("loading"),
  4010. !this._el.parent.atributes && this.container.attributes && (this.container.appendChild(this._el.container),
  4011. this._el.parent = this.container)
  4012. }
  4013. updateDisplay(t, e) {}
  4014. _onMouseClick() {
  4015. this.fire("clicked", this.options)
  4016. }
  4017. _onRemove() {
  4018. this._el.parent = {}
  4019. }
  4020. _initLayout() {
  4021. this._el.message_container = v("div", "tl-message-container", this._el.container),
  4022. this._el.loading_icon = v("div", this.options.message_icon_class, this._el.message_container),
  4023. this._el.message = v("div", "tl-message-content", this._el.message_container),
  4024. this.updateMessage()
  4025. }
  4026. _initEvents() {
  4027. ht.addListener(this._el.container, "click", this._onMouseClick, this),
  4028. ht.addListener(this, "removed", this._onRemove, this)
  4029. }
  4030. }
  4031. function Pt(t, e) {
  4032. e = e || "start_date",
  4033. t.sort((function(t, i) {
  4034. return t[e].isBefore(i[e]) ? -1 : t[e].isAfter(i[e]) ? 1 : 0
  4035. }
  4036. ))
  4037. }
  4038. function zt(t) {
  4039. var e = {
  4040. hour: null,
  4041. minute: null,
  4042. second: null,
  4043. millisecond: null
  4044. }
  4045. , i = null
  4046. , a = t.match(/(\s*[AaPp]\.?[Mm]\.?\s*)$/);
  4047. a && (i = O(a[0]),
  4048. t = O(t.substring(0, t.lastIndexOf(i))));
  4049. var s = []
  4050. , n = t.match(/^\s*(\d{1,2})(\d{2})\s*$/);
  4051. if (n ? s = n.slice(1) : 1 == (s = t.split(":")).length && (s = t.split(".")),
  4052. s.length > 4)
  4053. throw new x("invalid_separator_error");
  4054. let o = s[0];
  4055. if (e.hour = parseInt(o),
  4056. i && "p" == i.toLowerCase()[0] && 12 != e.hour ? e.hour += 12 : i && "a" == i.toLowerCase()[0] && 12 == e.hour && (e.hour = 0),
  4057. isNaN(e.hour) || e.hour < 0 || e.hour > 23)
  4058. throw new x("invalid_hour_err",o);
  4059. if (s.length > 1) {
  4060. let t = s[1];
  4061. if (e.minute = parseInt(t),
  4062. isNaN(e.minute))
  4063. throw new x("invalid_minute_err",t)
  4064. }
  4065. if (s.length > 2) {
  4066. var r = s[2].split(/[\.,]/);
  4067. if ((s = r.concat(s.slice(3))).length > 2)
  4068. throw new x("invalid_second_fractional_err");
  4069. if (e.second = parseInt(s[0]),
  4070. isNaN(e.second))
  4071. throw new x("invalid_second_err",s[0]);
  4072. if (2 == s.length) {
  4073. var l = parseInt(s[1]);
  4074. if (isNaN(l))
  4075. throw new x("invalid_fractional_err",s[1]);
  4076. e.millisecond = 100 * l
  4077. }
  4078. }
  4079. return e
  4080. }
  4081. R(jt, Rt, at, ot);
  4082. const Ht = new RegExp("(^-?\\d+$|^$)");
  4083. function Ft(t) {
  4084. try {
  4085. return Object.keys(t).forEach((e => {
  4086. let i = t[e];
  4087. if (i && i.match && !i.match(Ht))
  4088. throw `invalid value ${i} for ${e}`
  4089. }
  4090. )),
  4091. !0
  4092. } catch (t) {
  4093. return !1
  4094. }
  4095. }
  4096. const qt = {
  4097. human: yt,
  4098. cosmological: Dt
  4099. };
  4100. var $t = i(838)
  4101. , Ut = i.n($t);
  4102. const Bt = {
  4103. text: ["headline", "text"],
  4104. media: ["caption", "credit"]
  4105. }
  4106. , Wt = {
  4107. start_date: ["display_date"],
  4108. end_date: ["display_date"],
  4109. slide: ["display_date", "group"],
  4110. date: ["display_date"]
  4111. };
  4112. function Gt(t, e, i) {
  4113. Object.keys(i).forEach((a => {
  4114. var s = "slide" == a ? t : t[a];
  4115. s && i[a].forEach((t => {
  4116. void 0 !== s[t] && (s[t] = e(s[t]))
  4117. }
  4118. ))
  4119. }
  4120. ))
  4121. }
  4122. function Yt(t) {
  4123. return Ut().sanitize(t, {
  4124. ADD_TAGS: ["iframe"],
  4125. ADD_ATTR: ["frameborder", "target"]
  4126. })
  4127. }
  4128. Ut().addHook("afterSanitizeAttributes", (function(t) {
  4129. if ("A" == t.nodeName && "href"in t) {
  4130. "target"in t.attributes || t.setAttribute("target", "_blank");
  4131. let e = t.attributes.rel;
  4132. e ? -1 == e.value.indexOf("noopener") && t.setAttribute("rel", `noopener ${e.value}`) : t.setAttribute("rel", "noopener")
  4133. }
  4134. }
  4135. ));
  4136. class Zt {
  4137. constructor(t) {
  4138. if (this.title = "",
  4139. this.scale = "",
  4140. this.events = [],
  4141. this.eras = [],
  4142. this.event_dict = {},
  4143. this.messages = {
  4144. errors: [],
  4145. warnings: []
  4146. },
  4147. "object" == typeof t && t.events) {
  4148. if (this.scale = t.scale,
  4149. this.events = [],
  4150. this._ensureValidScale(t.events),
  4151. t.title) {
  4152. var e = this._assignID(t.title);
  4153. this._tidyFields(t.title),
  4154. this.title = t.title,
  4155. this.event_dict[e] = this.title
  4156. }
  4157. for (var i = 0; i < t.events.length; i++)
  4158. try {
  4159. this.addEvent(t.events[i], !0)
  4160. } catch (t) {
  4161. this.logError(t)
  4162. }
  4163. t.eras && t.eras.forEach(( (t, e) => {
  4164. try {
  4165. this.addEra(t)
  4166. } catch (t) {
  4167. this.logError("Era " + e + ": " + t)
  4168. }
  4169. }
  4170. )),
  4171. Pt(this.events),
  4172. Pt(this.eras)
  4173. }
  4174. }
  4175. logError(t) {
  4176. S(`logError: ${t}`),
  4177. this.messages.errors.push(t)
  4178. }
  4179. getErrors(t) {
  4180. return t ? this.messages.errors.join(t) : this.messages.errors
  4181. }
  4182. validate() {
  4183. void 0 !== this.events && void 0 !== this.events.length && 0 != this.events.length || this.logError("Timeline configuration has no events.");
  4184. for (var t = 0; t < this.eras.length; t++) {
  4185. var e;
  4186. void 0 !== this.eras[t].start_date && void 0 !== this.eras[t].end_date || (e = this.eras[t].headline ? this.eras[t].headline : "era " + (t + 1),
  4187. this.logError("All eras must have start and end dates. [" + e + "]"))
  4188. }
  4189. }
  4190. isValid() {
  4191. return 0 == this.messages.errors.length
  4192. }
  4193. addEvent(t, e) {
  4194. var i = this._assignID(t);
  4195. return void 0 === t.start_date ? (S("Missing start date, skipping event"),
  4196. console.log(t),
  4197. null) : (this._processDates(t),
  4198. this._tidyFields(t),
  4199. this.events.push(t),
  4200. this.event_dict[i] = t,
  4201. e || Pt(this.events),
  4202. i)
  4203. }
  4204. addEra(t) {
  4205. var e = this._assignID(t);
  4206. if (void 0 === t.start_date)
  4207. throw new x("missing_start_date_err",e);
  4208. this._processDates(t),
  4209. this._tidyFields(t),
  4210. this.eras.push({
  4211. start_date: t.start_date,
  4212. end_date: t.end_date,
  4213. headline: t.text.headline
  4214. })
  4215. }
  4216. _assignID(t) {
  4217. var e = t.unique_id;
  4218. return O(e) || (e = t.text ? j(t.text.headline) : null),
  4219. t.unique_id = function(t, e) {
  4220. if (e || (e = P(6)),
  4221. !(e in t))
  4222. return e;
  4223. var i = e.match(/^(.+)(-\d+)?$/)[1]
  4224. , a = [];
  4225. for (let e in t)
  4226. e.match(/^(.+?)(-\d+)?$/)[1] == i && a.push(e);
  4227. e = i + "-" + (a.length + 1);
  4228. for (var s = a.length; -1 != a.indexOf(e); s++)
  4229. e = i + "-" + s;
  4230. return e
  4231. }(this.event_dict, e),
  4232. t.unique_id
  4233. }
  4234. _makeUniqueIdentifiers(t, e) {
  4235. for (var i = [t], a = 0; a < e.length; a++)
  4236. O(e[a].unique_id) && (e[a].unique_id = j(e[a].unique_id),
  4237. -1 == i.indexOf(e[a].unique_id) ? i.push(e[a].unique_id) : e[a].unique_id = "");
  4238. if (i.length != e.length + 1)
  4239. for (a = 0; a < e.length; a++)
  4240. if (!e[a].unique_id) {
  4241. var s = e[a].text ? j(e[a].text.headline) : null;
  4242. s || (s = P(6)),
  4243. -1 != i.indexOf(s) && (s = s + "-" + a),
  4244. i.push(s),
  4245. e[a].unique_id = s
  4246. }
  4247. }
  4248. _ensureValidScale(t) {
  4249. if (!this.scale) {
  4250. this.scale = "human";
  4251. for (var e = 0; e < t.length; e++) {
  4252. if ("cosmological" == t[e].scale) {
  4253. this.scale = "cosmological";
  4254. break
  4255. }
  4256. if (t[e].start_date && void 0 !== t[e].start_date.year) {
  4257. var i = new Dt(t[e].start_date).data.date_obj.year;
  4258. if (i < -271820 || i > 275759) {
  4259. this.scale = "cosmological";
  4260. break
  4261. }
  4262. }
  4263. }
  4264. S(`Determining scale dynamically: ${this.scale}`)
  4265. }
  4266. qt[this.scale] || this.logError("Don't know how to process dates on scale " + this.scale)
  4267. }
  4268. _processDates(t) {
  4269. var e = qt[this.scale];
  4270. if (!(t.start_date instanceof e)) {
  4271. var i = t.start_date;
  4272. if (t.start_date = new e(i),
  4273. void 0 !== t.end_date && !(t.end_date instanceof e)) {
  4274. var a = t.end_date
  4275. , s = !0;
  4276. for (let t in i)
  4277. s = s && i[t] == a[t];
  4278. s ? (S("End date same as start date is redundant; dropping end date"),
  4279. delete t.end_date) : t.end_date = new e(a)
  4280. }
  4281. }
  4282. }
  4283. getEarliestDate() {
  4284. var t = this.events[0].start_date;
  4285. return this.eras && this.eras.length > 0 && this.eras[0].start_date.isBefore(t) ? this.eras[0].start_date : t
  4286. }
  4287. getLatestDate() {
  4288. for (var t = [], e = 0; e < this.events.length; e++)
  4289. this.events[e].end_date ? t.push({
  4290. date: this.events[e].end_date
  4291. }) : t.push({
  4292. date: this.events[e].start_date
  4293. });
  4294. for (e = 0; e < this.eras.length; e++)
  4295. this.eras[e].end_date ? t.push({
  4296. date: this.eras[e].end_date
  4297. }) : t.push({
  4298. date: this.eras[e].start_date
  4299. });
  4300. return Pt(t, "date"),
  4301. t.slice(-1)[0].date
  4302. }
  4303. _tidyFields(t) {
  4304. function e(t, e, i) {
  4305. i || (i = ""),
  4306. t.hasOwnProperty(e) || (t[e] = i)
  4307. }
  4308. t.group && (t.group = O(t.group)),
  4309. t.text || (t.text = {}),
  4310. e(t.text, "text"),
  4311. e(t.text, "headline"),
  4312. Gt(t, Yt, Bt),
  4313. Gt(t, X, Wt)
  4314. }
  4315. }
  4316. function Vt(t, e) {
  4317. return !0 !== (e = e || {}).noHeaderRow && t.length > 0 ? {
  4318. fields: t[0].map(( (t, e) => t && t.trim ? t.trim() : `untitled${e}`)),
  4319. records: t.slice(1)
  4320. } : {
  4321. records: t
  4322. }
  4323. }
  4324. function Xt(t, e) {
  4325. (!e || e && !e.lineterminator) && (t = function(t, e) {
  4326. return e && !e.lineterminator ? t.replace(/(\r\n|\n|\r)/gm, "\n") : t
  4327. }(t, e));
  4328. var i = function(t) {
  4329. var e = {
  4330. delimiter: ",",
  4331. doublequote: !0,
  4332. lineterminator: "\n",
  4333. quotechar: '"',
  4334. skipinitialspace: !0,
  4335. skipinitialrows: 0
  4336. };
  4337. for (var i in t)
  4338. "trim" === i ? e.skipinitialspace = t.trim : e[i.toLowerCase()] = t[i];
  4339. return e
  4340. }(e);
  4341. t = function(t, e) {
  4342. return null == t ? "" : (e = e || "\n",
  4343. t.charAt(t.length - e.length) !== e ? t : t.substring(0, t.length - e.length))
  4344. }(t, i.lineterminator);
  4345. var a, s, n = "", o = !1, r = !1, l = "", h = [], d = [];
  4346. for (s = function(t) {
  4347. return !0 !== r && ("" === t ? t = null : !0 === i.skipinitialspace && (t = t.trim())),
  4348. t
  4349. }
  4350. ,
  4351. a = 0; a < t.length; a += 1)
  4352. n = t.charAt(a),
  4353. !1 !== o || n !== i.delimiter && n !== i.lineterminator ? n !== i.quotechar ? l += n : o ? t.charAt(a + 1) === i.quotechar ? (l += i.quotechar,
  4354. a += 1) : o = !1 : (o = !0,
  4355. r = !0) : (l = s(l),
  4356. h.push(l),
  4357. n === i.lineterminator && (d.push(h),
  4358. h = []),
  4359. l = "",
  4360. r = !1);
  4361. return l = s(l),
  4362. h.push(l),
  4363. d.push(h),
  4364. i.skipinitialrows && (d = d.slice(i.skipinitialrows)),
  4365. d
  4366. }
  4367. function Jt(t) {
  4368. if (t)
  4369. return t.replace(/[\s,]+/g, "")
  4370. }
  4371. function Kt(t) {
  4372. let e = {
  4373. key: null,
  4374. worksheet: 0
  4375. };
  4376. var i = /\bkey=([-_A-Za-z0-9]+)&?/i
  4377. , a = /docs\.google.com\/spreadsheets(.*?)\/d\//;
  4378. if (t.match(i))
  4379. e.key = t.match(i)[1];
  4380. else if (t.match(a)) {
  4381. var s = t.search(a) + t.match(a)[0].length
  4382. , n = t.substr(s);
  4383. e.key = n.split("/")[0],
  4384. t.match(/\?gid=(\d+)/) && (e.worksheet = t.match(/\?gid=(\d+)/)[1])
  4385. } else
  4386. t.match(/^\b[-_A-Za-z0-9]+$/) && (e.key = t);
  4387. return e.key ? e : null
  4388. }
  4389. async function Qt(t, e) {
  4390. let i = [];
  4391. t = function(t) {
  4392. if ((t = t.trim()).match(/^[a-zA-Z0-9-_]+$/))
  4393. return `https://docs.google.com/spreadsheets/d/${t}/pub?output=csv`;
  4394. if (t.startsWith("https://docs.google.com/spreadsheets/")) {
  4395. if (t.match(/\/pub\?output=csv$/))
  4396. return t;
  4397. let e = new URL(t)
  4398. , i = new URLSearchParams(e.search);
  4399. i.set("output", "csv"),
  4400. i.get("gid") && i.set("single", "true"),
  4401. e.search = `?${i.toString()}`;
  4402. let a = e.pathname.substr(0, e.pathname.lastIndexOf("/"));
  4403. return e.pathname = `${a}/pub`,
  4404. e.toString()
  4405. }
  4406. throw new x("invalid_url_err",t)
  4407. }(t),
  4408. await async function(t) {
  4409. return new Promise(( (e, i) => {
  4410. if (t.data) {
  4411. var a = Vt(Xt(t.data, t), t);
  4412. a.useMemoryStore = !0,
  4413. e(a)
  4414. } else
  4415. t.url && window.fetch(t.url, {
  4416. mode: "cors"
  4417. }).then((function(t) {
  4418. if (200 == t.status)
  4419. return t.text ? t.text() : t;
  4420. "application/json" == t.headers.get("content-type") ? t.text().then((t => {
  4421. i(JSON.parse(t))
  4422. }
  4423. )) : i({
  4424. status_code: t.status,
  4425. message: `Error fetching CSV: [${t.status} ${t.statusText}]`
  4426. })
  4427. }
  4428. )).then((function(i) {
  4429. if (i) {
  4430. var a = function(t, e) {
  4431. let i = Vt(Xt(t, e))
  4432. , a = [];
  4433. return i.records.forEach((t => {
  4434. let e = {};
  4435. i.fields.forEach(( (i, a) => e[i] = t[a])),
  4436. a.push(e)
  4437. }
  4438. )),
  4439. a
  4440. }(i, t);
  4441. a.useMemoryStore = !0,
  4442. e(a)
  4443. }
  4444. }
  4445. )).catch((t => {
  4446. i({
  4447. status_code: 500,
  4448. message: `Error fetching CSV: ${t}`
  4449. })
  4450. }
  4451. ))
  4452. }
  4453. ))
  4454. }({
  4455. url: `${e}${t}`
  4456. }).then((t => {
  4457. i = t
  4458. }
  4459. )).catch((t => {
  4460. if ("response_not_csv" == t.proxy_err_code)
  4461. throw new x("Timeline could not read the data for your timeline. Make sure you have published it to the web.");
  4462. let e = "undefined error";
  4463. throw e = Array.isArray(t.message) ? t.message.join("<br>") : String(t.message),
  4464. new x(e)
  4465. }
  4466. ));
  4467. let a = {
  4468. events: [],
  4469. errors: [],
  4470. warnings: [],
  4471. eras: []
  4472. };
  4473. return i.forEach(( (t, e) => {
  4474. try {
  4475. if (!function(t) {
  4476. var e = [];
  4477. if (Object.keys)
  4478. e = Object.keys(t);
  4479. else
  4480. for (var i in t)
  4481. Object.prototype.hasOwnProperty.call(t, i) && e.push(i);
  4482. for (var a = 0; a < e.length; a++) {
  4483. var s = e[a];
  4484. if (null != t[s] && "string" != typeof t[s])
  4485. return !1;
  4486. if (0 != O(t[s]).length)
  4487. return !1
  4488. }
  4489. return !0
  4490. }(t)) {
  4491. let e = function(t) {
  4492. let e = {};
  4493. Object.keys(t).forEach((i => {
  4494. e[i] = O(t[i])
  4495. }
  4496. ));
  4497. var i, a = {
  4498. media: {
  4499. caption: e["Media Caption"] || "",
  4500. credit: e["Media Credit"] || "",
  4501. url: e.Media || "",
  4502. thumbnail: e["Media Thumbnail"] || "",
  4503. alt: e["Alt Text"] || ""
  4504. },
  4505. text: {
  4506. headline: e.Headline || "",
  4507. text: e.Text || ""
  4508. },
  4509. display_date: e["Display Date"] || "",
  4510. group: e.Group || e.Tag || "",
  4511. background: (i = e.Background,
  4512. "string" != typeof i ? "" : i.match(/^(https?:)?\/\/?/) ? {
  4513. url: i
  4514. } : {
  4515. color: i
  4516. }),
  4517. type: e.Type || ""
  4518. };
  4519. if (Object.keys(e).includes("Start Date") || Object.keys(e).includes("End Date"))
  4520. e["Start Date"] && (a.start_date = bt(e["Start Date"])),
  4521. e["End Date"] && (a.end_date = bt(e["End Date"]));
  4522. else {
  4523. if (e.Year && (a.start_date = {
  4524. year: Jt(e.Year),
  4525. month: Jt(e.Month) || "",
  4526. day: Jt(e.Day) || ""
  4527. }),
  4528. e["End Year"] && (a.end_date = {
  4529. year: Jt(e["End Year"]) || "",
  4530. month: Jt(e["End Month"]) || "",
  4531. day: Jt(e["End Day"]) || ""
  4532. }),
  4533. e.Time) {
  4534. if (!a.start_date)
  4535. throw new x("invalid_start_time_without_date");
  4536. E(a.start_date, zt(e.Time))
  4537. }
  4538. if (e["End Time"]) {
  4539. if (!a.end_date)
  4540. throw new x("invalid_end_time_without_date");
  4541. E(a.end_date, zt(e["End Time"]))
  4542. }
  4543. if (a.start_date && !Ft(a.start_date))
  4544. throw new x("invalid_date_err");
  4545. if (a.end_date && !Ft(a.end_date))
  4546. throw new x("invalid_date_err")
  4547. }
  4548. return a
  4549. }(t);
  4550. !function(t, e) {
  4551. var i = "event";
  4552. void 0 !== t.type && (i = t.type,
  4553. delete t.type),
  4554. "title" == i ? e.title ? (e.warnings.push("Multiple title slides detected."),
  4555. e.events.push(t)) : e.title = t : "era" == i ? e.eras.push(t) : e.events.push(t)
  4556. }(e, a)
  4557. }
  4558. } catch (i) {
  4559. if (i.constructor == x)
  4560. a.errors.push(i);
  4561. else {
  4562. i.message && (i = i.message);
  4563. let s = t.Headline || e;
  4564. a.errors.push(i + `[${s}]`)
  4565. }
  4566. }
  4567. }
  4568. )),
  4569. a
  4570. }
  4571. async function te(t, e) {
  4572. if (!e.sheets_proxy)
  4573. throw new x("Proxy option must be set to read data from Google");
  4574. var i = await Qt(t, e.sheets_proxy);
  4575. if (i)
  4576. return i
  4577. }
  4578. class ee {
  4579. constructor(t) {
  4580. if (!t)
  4581. throw new x("axis_helper_no_options_err");
  4582. this.scale = t.scale,
  4583. this.minor = t.minor,
  4584. this.major = t.major
  4585. }
  4586. getPixelsPerTick(t) {
  4587. return t * this.minor.factor
  4588. }
  4589. getMajorTicks(t) {
  4590. return this._getTicks(t, this.major)
  4591. }
  4592. getMinorTicks(t) {
  4593. return this._getTicks(t, this.minor)
  4594. }
  4595. _getTicks(t, e) {
  4596. for (var i = t._scaled_padding * e.factor, a = t._earliest - i, s = t._latest + i, n = [], o = a; o < s; o += e.factor)
  4597. n.push(t.getDateFromTime(o).floor(e.name));
  4598. return {
  4599. name: e.name,
  4600. ticks: n
  4601. }
  4602. }
  4603. }
  4604. var ie = {}
  4605. , ae = function(t, e) {
  4606. ie[t] = [];
  4607. for (var i = 0; i < e.length - 1; i++) {
  4608. var a = e[i]
  4609. , s = e[i + 1];
  4610. ie[t].push(new ee({
  4611. scale: a[3],
  4612. minor: {
  4613. name: a[0],
  4614. factor: a[1]
  4615. },
  4616. major: {
  4617. name: s[0],
  4618. factor: s[1]
  4619. }
  4620. }))
  4621. }
  4622. };
  4623. ae("human", _t),
  4624. ae("cosmological", Lt);
  4625. const se = {
  4626. millisecond: "time_milliseconds",
  4627. second: "time_short",
  4628. minute: "time_no_seconds_short",
  4629. hour: "time_no_minutes_short",
  4630. day: "full_short",
  4631. month: "month_short",
  4632. year: "year",
  4633. decade: "year",
  4634. century: "year",
  4635. millennium: "year",
  4636. age: "compact",
  4637. epoch: "compact",
  4638. era: "compact",
  4639. eon: "compact",
  4640. eon2: "compact"
  4641. };
  4642. class ne {
  4643. constructor(t, e) {
  4644. var i = t.events;
  4645. this._scale = t.scale,
  4646. e = E({
  4647. display_width: 500,
  4648. screen_multiplier: 3,
  4649. max_rows: null
  4650. }, e),
  4651. this._display_width = e.display_width,
  4652. this._screen_multiplier = e.screen_multiplier,
  4653. this._pixel_width = this._screen_multiplier * this._display_width,
  4654. this._group_labels = void 0,
  4655. this._positions = [],
  4656. this._pixels_per_milli = 0,
  4657. this._earliest = t.getEarliestDate().getTime(),
  4658. this._latest = t.getLatestDate().getTime(),
  4659. this._span_in_millis = this._latest - this._earliest,
  4660. this._span_in_millis <= 0 && (this._span_in_millis = this._computeDefaultSpan(t)),
  4661. this._average = this._span_in_millis / i.length,
  4662. this._pixels_per_milli = this.getPixelWidth() / this._span_in_millis,
  4663. this._axis_helper = function(t, e) {
  4664. "number" != typeof e && (e = 100);
  4665. var i = t.getScale()
  4666. , a = ie[i];
  4667. if (!a)
  4668. throw new x("axis_helper_scale_err",i);
  4669. for (var s = null, n = 0; n < a.length; n++) {
  4670. var o = a[n]
  4671. , r = o.getPixelsPerTick(t._pixels_per_milli);
  4672. if (r > e)
  4673. return null == s || Math.abs(e - r) < Math.abs(e - r) ? o : s;
  4674. s = o
  4675. }
  4676. return a[a.length - 1]
  4677. }(this),
  4678. this._scaled_padding = 1 / this.getPixelsPerTick() * (this._display_width / 2),
  4679. this._computePositionInfo(i, e.max_rows)
  4680. }
  4681. _computeDefaultSpan(t) {
  4682. if ("human" == t.scale) {
  4683. for (var e = {}, i = 0; i < t.events.length; i++) {
  4684. var a = t.events[i].start_date.findBestFormat();
  4685. e[a] = e[a] ? e[a] + 1 : 1
  4686. }
  4687. for (i = _t.length - 1; i >= 0; i--)
  4688. if (e.hasOwnProperty(_t[i][0])) {
  4689. var s = _t[_t.length - 1];
  4690. return _t[i + 1] && (s = _t[i + 1]),
  4691. s[1]
  4692. }
  4693. return 31536e6
  4694. }
  4695. return 2e5
  4696. }
  4697. getGroupLabels() {
  4698. return this._group_labels || []
  4699. }
  4700. getScale() {
  4701. return this._scale
  4702. }
  4703. getNumberOfRows() {
  4704. return this._number_of_rows
  4705. }
  4706. getPixelWidth() {
  4707. return this._pixel_width
  4708. }
  4709. getPosition(t) {
  4710. return (t - this._earliest) * this._pixels_per_milli
  4711. }
  4712. getPositionInfo(t) {
  4713. return this._positions[t]
  4714. }
  4715. getPixelsPerTick() {
  4716. return this._axis_helper.getPixelsPerTick(this._pixels_per_milli)
  4717. }
  4718. getTicks() {
  4719. return {
  4720. major: this._axis_helper.getMajorTicks(this),
  4721. minor: this._axis_helper.getMinorTicks(this)
  4722. }
  4723. }
  4724. getDateFromTime(t) {
  4725. if ("human" == this._scale)
  4726. return new yt(t);
  4727. if ("cosmological" == this._scale)
  4728. return new Dt(new wt(t));
  4729. throw new x("time_scale_scale_err",this._scale)
  4730. }
  4731. getMajorScale() {
  4732. return this._axis_helper.major.name
  4733. }
  4734. getMinorScale() {
  4735. return this._axis_helper.minor.name
  4736. }
  4737. _assessGroups(t) {
  4738. for (var e = [], i = !1, a = 0; a < t.length; a++)
  4739. t[a].group && (e.indexOf(t[a].group) < 0 ? e.push(t[a].group) : i = !0);
  4740. return e.length && i && e.push(""),
  4741. e
  4742. }
  4743. _computeRowInfo(t, e) {
  4744. for (var i = [], a = 0, s = 0; s < t.length; s++) {
  4745. var n = t[s]
  4746. , o = [];
  4747. delete n.row;
  4748. for (var r = 0; r < i.length; r++)
  4749. if (o.push(i[r].end - n.start),
  4750. o[r] <= 0) {
  4751. n.row = r,
  4752. i[r] = n;
  4753. break
  4754. }
  4755. if (void 0 === n.row)
  4756. if (null === e)
  4757. n.row = i.length,
  4758. i.push(n);
  4759. else if (e > 0)
  4760. n.row = i.length,
  4761. i.push(n),
  4762. e--;
  4763. else {
  4764. var l = Math.min.apply(null, o)
  4765. , h = o.indexOf(l);
  4766. n.row = h,
  4767. n.end > i[h].end && (i[h] = n),
  4768. a++
  4769. }
  4770. }
  4771. return {
  4772. n_rows: i.length,
  4773. n_overlaps: a
  4774. }
  4775. }
  4776. _computePositionInfo(t, e, i) {
  4777. i = i || 100;
  4778. for (var a = [], s = !1, n = 0; n < t.length; n++) {
  4779. var o = {
  4780. start: this.getPosition(t[n].start_date.getTime())
  4781. };
  4782. if (this._positions.push(o),
  4783. void 0 !== t[n].end_date) {
  4784. var r = this.getPosition(t[n].end_date.getTime());
  4785. o.width = r - o.start,
  4786. o.width > i ? o.end = o.start + o.width : o.end = o.start + i
  4787. } else
  4788. o.width = i,
  4789. o.end = o.start + i;
  4790. t[n].group ? a.indexOf(t[n].group) < 0 && a.push(t[n].group) : s = !0
  4791. }
  4792. if (a.length) {
  4793. s && a.push("");
  4794. var l = [];
  4795. for (n = 0; n < a.length; n++)
  4796. l[n] = {
  4797. label: a[n],
  4798. idx: n,
  4799. positions: [],
  4800. n_rows: 1,
  4801. n_overlaps: 0
  4802. };
  4803. for (n = 0; n < this._positions.length; n++) {
  4804. (o = this._positions[n]).group = a.indexOf(t[n].group || ""),
  4805. o.row = 0;
  4806. for (var h = (u = l[o.group]).positions.length - 1; h >= 0; h--)
  4807. u.positions[h].end > o.start && u.n_overlaps++;
  4808. u.positions.push(o)
  4809. }
  4810. for (var d = a.length; ; ) {
  4811. var c = Math.max(0, e - d);
  4812. if (!c)
  4813. break;
  4814. if (l.sort((function(t, e) {
  4815. return t.n_overlaps > e.n_overlaps ? -1 : t.n_overlaps < e.n_overlaps ? 1 : t.idx - e.idx
  4816. }
  4817. )),
  4818. !l[0].n_overlaps)
  4819. break;
  4820. for (d = 0,
  4821. n = 0; n < l.length; n++) {
  4822. var u;
  4823. if ((u = l[n]).n_overlaps && c) {
  4824. var m = this._computeRowInfo(u.positions, u.n_rows + 1);
  4825. u.n_rows = m.n_rows,
  4826. u.n_overlaps = m.n_overlaps,
  4827. c--
  4828. }
  4829. d += u.n_rows
  4830. }
  4831. }
  4832. this._number_of_rows = d,
  4833. this._group_labels = [],
  4834. l.sort((function(t, e) {
  4835. return t.idx - e.idx
  4836. }
  4837. )),
  4838. n = 0;
  4839. for (var _ = 0; n < l.length; n++) {
  4840. for (this._group_labels.push({
  4841. label: l[n].label,
  4842. rows: l[n].n_rows
  4843. }),
  4844. h = 0; h < l[n].positions.length; h++)
  4845. (o = l[n].positions[h]).row += _;
  4846. _ += l[n].n_rows
  4847. }
  4848. } else {
  4849. var p = this._computeRowInfo(this._positions, e);
  4850. this._number_of_rows = p.n_rows
  4851. }
  4852. }
  4853. getAxisTickDateFormat(t) {
  4854. return "cosmological" == this._scale ? "compact" : se[t]
  4855. }
  4856. }
  4857. class oe {
  4858. constructor(t) {
  4859. this._el = {
  4860. parent: {},
  4861. container: {},
  4862. message: {}
  4863. },
  4864. this.options = {
  4865. width: 600,
  4866. height: 600
  4867. },
  4868. this.data = {
  4869. label: "",
  4870. rows: 1
  4871. },
  4872. this._el.container = v("div", "tl-timegroup"),
  4873. E(this.data, t),
  4874. this.animator = {},
  4875. this._initLayout(),
  4876. this._initEvents()
  4877. }
  4878. updateDisplay(t, e) {}
  4879. setRowPosition(t, e) {
  4880. this.options.height = e * this.data.rows,
  4881. this.setPosition({
  4882. top: t
  4883. }),
  4884. this._el.container.style.height = this.options.height + "px"
  4885. }
  4886. setAlternateRowColor(t, e) {
  4887. var i = "tl-timegroup";
  4888. t && (i += " tl-timegroup-alternate"),
  4889. e && (i += " tl-timegroup-hidden"),
  4890. this._el.container.className = i
  4891. }
  4892. _onMouseClick() {
  4893. this.fire("clicked", this.options)
  4894. }
  4895. _initLayout() {
  4896. this._el.message = v("div", "tl-timegroup-message", this._el.container),
  4897. this._el.message.innerHTML = this.data.label
  4898. }
  4899. _initEvents() {
  4900. ht.addListener(this._el.container, "click", this._onMouseClick, this)
  4901. }
  4902. _updateDisplay(t, e, i) {}
  4903. }
  4904. R(oe, at, ot);
  4905. class re {
  4906. constructor(t, e, i, a) {
  4907. this.start_date = t,
  4908. this.end_date = e,
  4909. this.headline = i,
  4910. this._el = {
  4911. container: {},
  4912. background: {},
  4913. content_container: {},
  4914. content: {},
  4915. text: {}
  4916. },
  4917. this._text = {},
  4918. this._state = {
  4919. loaded: !1
  4920. },
  4921. this.options = {
  4922. duration: 1e3,
  4923. ease: Q,
  4924. width: 600,
  4925. height: 600,
  4926. marker_width_min: 100
  4927. },
  4928. this.active = !1,
  4929. this.animator = {},
  4930. this.has_end_date = !1,
  4931. E(this.options, a),
  4932. this._initLayout(),
  4933. this._initEvents()
  4934. }
  4935. show() {}
  4936. hide() {}
  4937. setActive(t) {}
  4938. addTo(t) {
  4939. t.appendChild(this._el.container)
  4940. }
  4941. removeFrom(t) {
  4942. t.removeChild(this._el.container)
  4943. }
  4944. updateDisplay(t, e) {
  4945. this._updateDisplay(t, e)
  4946. }
  4947. getLeft() {
  4948. return this._el.container.style.left.slice(0, -2)
  4949. }
  4950. getTime() {
  4951. return this.start_date.getTime()
  4952. }
  4953. getEndTime() {
  4954. return !!this.end_date && this.end_date.getTime()
  4955. }
  4956. setHeight(t) {
  4957. var e = 1;
  4958. this._el.content_container.style.height = t + "px",
  4959. this._el.content.className = "tl-timeera-content",
  4960. r ? ((e = Math.floor(t / 14)) < 1 && (e = 1),
  4961. this._text.className = "tl-headline",
  4962. this._text.style.webkitLineClamp = e) : (e = t / 12,
  4963. this._text.className = e > 1 ? "tl-headline tl-headline-fadeout" : "tl-headline",
  4964. this._text.style.height = 12 * e + "px")
  4965. }
  4966. setWidth(t) {
  4967. this.end_date && (this._el.container.style.width = t + "px",
  4968. t > this.options.marker_width_min ? (this._el.content_container.style.width = t + "px",
  4969. this._el.content_container.className = "tl-timeera-content-container tl-timeera-content-container-long") : (this._el.content_container.style.width = this.options.marker_width_min + "px",
  4970. this._el.content_container.className = "tl-timeera-content-container"))
  4971. }
  4972. setClass(t) {
  4973. this._el.container.className = t
  4974. }
  4975. setRowPosition(t, e) {
  4976. this.setPosition({
  4977. top: t
  4978. }),
  4979. e < 56 && this._el.content_container.remove("tl-timeera-content-container-small")
  4980. }
  4981. setColor(t) {
  4982. this._el.container.className = "tl-timeera tl-timeera-color" + t
  4983. }
  4984. _initLayout() {
  4985. this._el.container = v("div", "tl-timeera"),
  4986. this.end_date && (this.has_end_date = !0,
  4987. this._el.container.className = "tl-timeera tl-timeera-with-end"),
  4988. this._el.content_container = v("div", "tl-timeera-content-container", this._el.container),
  4989. this._el.background = v("div", "tl-timeera-background", this._el.content_container),
  4990. this._el.content = v("div", "tl-timeera-content", this._el.content_container),
  4991. this._el.text = v("div", "tl-timeera-text", this._el.content),
  4992. this._text = v("h2", "tl-headline", this._el.text),
  4993. this.headline && "" != this.headline && (this._text.innerHTML = F(this.headline)),
  4994. this.onLoaded()
  4995. }
  4996. _initEvents() {}
  4997. _updateDisplay(t, e, i) {
  4998. t && (this.options.width = t),
  4999. e && (this.options.height = e)
  5000. }
  5001. }
  5002. R(re, at, ot);
  5003. class le {
  5004. constructor(t, e, i) {
  5005. i && this.setLanguage(i),
  5006. this._el = {
  5007. container: {},
  5008. content_container: {},
  5009. major: {},
  5010. minor: {}
  5011. },
  5012. this._text = {},
  5013. this._state = {
  5014. loaded: !1
  5015. },
  5016. this.data = {},
  5017. this.options = {
  5018. duration: 1e3,
  5019. ease: Q,
  5020. width: 600,
  5021. height: 600
  5022. },
  5023. this.active = !1,
  5024. this.animator = {},
  5025. this.axis_helper = {},
  5026. this.minor_ticks = [],
  5027. this.major_ticks = [],
  5028. this._el.container = "object" == typeof t ? t : g(t),
  5029. E(this.options, e),
  5030. this._initLayout(),
  5031. this._initEvents()
  5032. }
  5033. show() {}
  5034. hide() {}
  5035. addTo(t) {
  5036. t.appendChild(this._el.container)
  5037. }
  5038. removeFrom(t) {
  5039. t.removeChild(this._el.container)
  5040. }
  5041. updateDisplay(t, e) {
  5042. this._updateDisplay(t, e)
  5043. }
  5044. getLeft() {
  5045. return this._el.container.style.left.slice(0, -2)
  5046. }
  5047. drawTicks(t, e) {
  5048. var i = t.getTicks();
  5049. this._el.major.className = "tl-timeaxis-major",
  5050. this._el.minor.className = "tl-timeaxis-minor",
  5051. this._el.major.style.opacity = 0,
  5052. this._el.minor.style.opacity = 0,
  5053. this.major_ticks = this._createTickElements(i.major.ticks, this._el.major, t.getAxisTickDateFormat(i.major.name)),
  5054. this.minor_ticks = this._createTickElements(i.minor.ticks, this._el.minor, t.getAxisTickDateFormat(i.minor.name), i.major.ticks),
  5055. this.positionTicks(t, e, !0),
  5056. this._el.major.className = "tl-timeaxis-major tl-animate-opacity tl-timeaxis-animate-opacity",
  5057. this._el.minor.className = "tl-timeaxis-minor tl-animate-opacity tl-timeaxis-animate-opacity",
  5058. this._el.major.style.opacity = 1,
  5059. this._el.minor.style.opacity = 1
  5060. }
  5061. _createTickElements(t, e, i, a) {
  5062. e.innerHTML = "";
  5063. var s = {};
  5064. if (s[new Date(-1,13,-30).getTime()] = !0,
  5065. a)
  5066. for (var n = 0; n < a.length; n++)
  5067. s[a[n].getTime()] = !0;
  5068. var o = [];
  5069. for (n = 0; n < t.length; n++) {
  5070. var r = t[n];
  5071. if (!(r.getTime()in s)) {
  5072. var l = v("div", "tl-timeaxis-tick", e)
  5073. , h = v("span", "tl-timeaxis-tick-text tl-animate-opacity", l);
  5074. let t = r.getDisplayDate(this.getLanguage(), i);
  5075. h.innerHTML = t,
  5076. o.push({
  5077. tick: l,
  5078. tick_text: h,
  5079. display_date: t,
  5080. date: r
  5081. })
  5082. }
  5083. }
  5084. return o
  5085. }
  5086. positionTicks(t, e, i) {
  5087. i ? (this._el.major.className = "tl-timeaxis-major",
  5088. this._el.minor.className = "tl-timeaxis-minor") : (this._el.major.className = "tl-timeaxis-major tl-timeaxis-animate",
  5089. this._el.minor.className = "tl-timeaxis-minor tl-timeaxis-animate"),
  5090. this._positionTickArray(this.major_ticks, t, e),
  5091. this._positionTickArray(this.minor_ticks, t, e)
  5092. }
  5093. _positionTickArray(t, e, i) {
  5094. if (t[1] && t[0]) {
  5095. var a = 1;
  5096. e.getPosition(t[1].date.getMillisecond()) - e.getPosition(t[0].date.getMillisecond()) < i && (a = Math.round(i / e.getPixelsPerTick()));
  5097. for (var s = 1, n = 0; n < t.length; n++) {
  5098. var o = t[n];
  5099. o.tick.style.left = e.getPosition(o.date.getMillisecond()) + "px",
  5100. o.tick_text.innerHTML = o.display_date,
  5101. a > 1 ? s >= a ? (s = 1,
  5102. o.tick_text.style.opacity = 1,
  5103. o.tick.className = "tl-timeaxis-tick") : (s++,
  5104. o.tick_text.style.opacity = 0,
  5105. o.tick.className = "tl-timeaxis-tick tl-timeaxis-tick-hidden") : (o.tick_text.style.opacity = 1,
  5106. o.tick.className = "tl-timeaxis-tick")
  5107. }
  5108. }
  5109. }
  5110. getVisibleTicks() {
  5111. return {
  5112. major: this._getVisibleTickArray(this.major_ticks),
  5113. minor: this._getVisibleTickArray(this.minor_ticks)
  5114. }
  5115. }
  5116. _getVisibleTickArray(t) {
  5117. return t.filter(( ({tick: t}) => function(t) {
  5118. const e = t.getBoundingClientRect();
  5119. return e.left >= 0 && e.right <= (window.innerWidth || document.documentElement.clientWidth)
  5120. }(t)))
  5121. }
  5122. _initLayout() {
  5123. this._el.content_container = v("div", "tl-timeaxis-content-container", this._el.container),
  5124. this._el.major = v("div", "tl-timeaxis-major", this._el.content_container),
  5125. this._el.minor = v("div", "tl-timeaxis-minor", this._el.content_container),
  5126. this.onLoaded()
  5127. }
  5128. _initEvents() {}
  5129. _updateDisplay(t, e, i) {
  5130. t && (this.options.width = t),
  5131. e && (this.options.height = e)
  5132. }
  5133. }
  5134. R(le, at, ot, Rt);
  5135. class he {
  5136. constructor(t, e, i) {
  5137. this._el = {
  5138. container: {},
  5139. content_container: {},
  5140. content: {},
  5141. headline_container: {},
  5142. headline: {},
  5143. date: {}
  5144. },
  5145. this.options = {
  5146. title: !1
  5147. },
  5148. this.data = {
  5149. unique_id: "",
  5150. headline: "headline",
  5151. text: "text"
  5152. },
  5153. function(t, e) {
  5154. t.data = L({}, t.data, e),
  5155. "" === t.data.unique_id && (t.data.unique_id = P(6))
  5156. }(this, t),
  5157. E(this.options, e),
  5158. this._el.container = v("div", "tl-text"),
  5159. this._el.container.id = this.data.unique_id,
  5160. this._initLayout(),
  5161. i && i.appendChild(this._el.container)
  5162. }
  5163. show() {}
  5164. hide() {}
  5165. addTo(t) {
  5166. t.appendChild(this._el.container)
  5167. }
  5168. removeFrom(t) {
  5169. t.removeChild(this._el.container)
  5170. }
  5171. headlineHeight() {
  5172. return this._el.headline.offsetHeight + 40
  5173. }
  5174. addDateText(t) {
  5175. this._el.date.innerHTML = t
  5176. }
  5177. onLoaded() {
  5178. this.fire("loaded", this.data)
  5179. }
  5180. onAdd() {
  5181. this.fire("added", this.data)
  5182. }
  5183. onRemove() {
  5184. this.fire("removed", this.data)
  5185. }
  5186. _initLayout() {
  5187. if (this._el.content_container = v("div", "tl-text-content-container", this._el.container),
  5188. this._el.headline_container = v("div", "tl-text-headline-container", this._el.content_container),
  5189. "" != this.data.headline) {
  5190. var t = "tl-headline";
  5191. this.options.title && (t = "tl-headline tl-headline-title"),
  5192. this._el.headline = v("h2", t, this._el.headline_container),
  5193. this._el.headline.innerHTML = this.data.headline
  5194. }
  5195. if (this._el.date = v("h3", "tl-headline-date", this._el.headline_container),
  5196. "" != this.data.text) {
  5197. var e = "";
  5198. e += (i = 1 == this.options.autolink ? $(this.data.text) : this.data.text).match(/<p>[\s\S]*?<\/p>/) ? i : "<p>" + i + "</p>",
  5199. this._el.content = v("div", "tl-text-content", this._el.content_container),
  5200. this._el.content.innerHTML = e
  5201. }
  5202. var i;
  5203. this.onLoaded()
  5204. }
  5205. }
  5206. R(he, at);
  5207. class de {
  5208. constructor(t, e, i) {
  5209. i && this.setLanguage(i),
  5210. this._el = {
  5211. container: {},
  5212. content_container: {},
  5213. content: {},
  5214. content_item: {},
  5215. content_link: {},
  5216. caption: null,
  5217. credit: null,
  5218. parent: {},
  5219. link: null
  5220. },
  5221. this.player = null,
  5222. this.timer = null,
  5223. this.load_timer = null,
  5224. this.message = null,
  5225. this.media_id = null,
  5226. this._state = {
  5227. loaded: !1,
  5228. show_meta: !1,
  5229. media_loaded: !1
  5230. },
  5231. this.data = {
  5232. unique_id: null,
  5233. url: null,
  5234. credit: null,
  5235. caption: null,
  5236. credit_alternate: null,
  5237. caption_alternate: null,
  5238. link: null,
  5239. link_target: null
  5240. },
  5241. this.options = {
  5242. api_key_flickr: "bd3a7c45ddd52f3101825d41563a6125",
  5243. api_key_googlemaps: "AIzaSyB9dW8e_iRrATFa8g24qB6BDBGdkrLDZYI",
  5244. api_key_embedly: "",
  5245. credit_height: 0,
  5246. caption_height: 0,
  5247. background: 0
  5248. },
  5249. this.animator = {},
  5250. E(this.options, e),
  5251. E(this.data, t),
  5252. this.options.background || (this._el.container = v("div", "tl-media"),
  5253. this.data.unique_id && (this._el.container.id = this.data.unique_id),
  5254. this._initLayout())
  5255. }
  5256. loadMedia() {
  5257. var t = this;
  5258. if (!this._state.loaded)
  5259. try {
  5260. this.load_timer = setTimeout((function() {
  5261. t.loadingMessage(),
  5262. t._loadMedia(),
  5263. t._updateDisplay()
  5264. }
  5265. ), 1200)
  5266. } catch (t) {
  5267. S("Error loading media for ", this._media),
  5268. S(t)
  5269. }
  5270. }
  5271. _updateMessage(t) {
  5272. this.message && this.message.updateMessage(t)
  5273. }
  5274. loadingMessage() {
  5275. this._updateMessage(this._("loading") + " " + this.options.media_name)
  5276. }
  5277. errorMessage(t) {
  5278. t = t ? this._("error") + ": " + t : this._("error"),
  5279. this._updateMessage(t)
  5280. }
  5281. updateMediaDisplay(t) {
  5282. this._state.loaded && !this.options.background && (this._el.content_item.style.maxHeight = h ? this.options.height / 2 + "px" : this.options.height - this.options.credit_height - this.options.caption_height - 30 + "px",
  5283. this._el.container.style.maxWidth = this.options.width + "px",
  5284. m && (this._el.content_item.offsetWidth,
  5285. this._el.content_item.offsetHeight),
  5286. this._updateMediaDisplay(t),
  5287. this._state.media_loaded && (this._el.credit && (this._el.credit.style.width = this._el.content_item.offsetWidth + "px"),
  5288. this._el.caption && (this._el.caption.style.width = this._el.content_item.offsetWidth + "px")))
  5289. }
  5290. _loadMedia() {
  5291. this.onLoaded()
  5292. }
  5293. _updateMediaDisplay(t) {
  5294. m && (this._el.content_item.style.maxWidth = this.options.width + "px",
  5295. this._el.content_item.style.width = "auto")
  5296. }
  5297. _getMeta() {}
  5298. _getImageURL(t, e) {
  5299. return ""
  5300. }
  5301. show() {}
  5302. hide() {}
  5303. addTo(t) {
  5304. t.appendChild(this._el.container),
  5305. this.onAdd()
  5306. }
  5307. removeFrom(t) {
  5308. t.removeChild(this._el.container),
  5309. this.onRemove()
  5310. }
  5311. getImageURL(t, e) {
  5312. return this._getImageURL(t, e)
  5313. }
  5314. updateDisplay(t, e, i) {
  5315. this._updateDisplay(t, e, i)
  5316. }
  5317. stopMedia() {
  5318. try {
  5319. this._stopMedia()
  5320. } catch (t) {
  5321. S(`stopMedia() exception: ${t}`)
  5322. }
  5323. }
  5324. loadErrorDisplay(t) {
  5325. try {
  5326. this._el.content.removeChild(this._el.content_item)
  5327. } catch (t) {}
  5328. this._el.content_item = v("div", "tl-media-item tl-media-loaderror", this._el.content),
  5329. this._el.content_item.innerHTML = "<div class='tl-icon-" + this.options.media_type + "'></div><p>" + t + "</p>",
  5330. this.onLoaded(!0)
  5331. }
  5332. onLoaded(t) {
  5333. this._state.loaded = !0,
  5334. this.fire("loaded", this.data),
  5335. this.message && this.message.hide(),
  5336. t || this.options.background || this.showMeta(),
  5337. this.updateDisplay()
  5338. }
  5339. onMediaLoaded(t) {
  5340. this._state.media_loaded = !0,
  5341. this.fire("media_loaded", this.data),
  5342. this._el.credit && (this._el.credit.style.width = this._el.content_item.offsetWidth + "px"),
  5343. this._el.caption && (this._el.caption.style.width = this._el.content_item.offsetWidth + "px")
  5344. }
  5345. showMeta(t, e) {
  5346. this._state.show_meta = !0,
  5347. this.data.credit && "" != this.data.credit && (this._el.credit = v("div", "tl-credit", this._el.content_container),
  5348. this._el.credit.innerHTML = 1 == this.options.autolink ? $(this.data.credit) : this.data.credit,
  5349. this.options.credit_height = this._el.credit.offsetHeight),
  5350. this.data.caption && "" != this.data.caption && (this._el.caption = v("div", "tl-caption", this._el.content_container),
  5351. this._el.caption.innerHTML = 1 == this.options.autolink ? $(this.data.caption) : this.data.caption,
  5352. this.options.caption_height = this._el.caption.offsetHeight),
  5353. this.data.caption && this.data.credit || this.getMeta()
  5354. }
  5355. getMeta() {
  5356. this._getMeta()
  5357. }
  5358. updateMeta() {
  5359. !this.data.credit && this.data.credit_alternate && (this._el.credit = v("div", "tl-credit", this._el.content_container),
  5360. this._el.credit.innerHTML = this.data.credit_alternate,
  5361. this.options.credit_height = this._el.credit.offsetHeight),
  5362. !this.data.caption && this.data.caption_alternate && (this._el.caption = v("div", "tl-caption", this._el.content_container),
  5363. this._el.caption.innerHTML = this.data.caption_alternate,
  5364. this.options.caption_height = this._el.caption.offsetHeight),
  5365. this.updateDisplay()
  5366. }
  5367. onAdd() {
  5368. this.fire("added", this.data)
  5369. }
  5370. onRemove() {
  5371. this.fire("removed", this.data)
  5372. }
  5373. _initLayout() {
  5374. this.message = new jt(this._el.container,this.options,this.getLanguage()),
  5375. this._el.content_container = v("div", "tl-media-content-container", this._el.container),
  5376. this.data.link && "" != this.data.link ? (this._el.link = v("a", "tl-media-link", this._el.content_container),
  5377. this._el.link.href = this.data.link,
  5378. this.data.link_target && "" != this.data.link_target ? this._el.link.target = this.data.link_target : this._el.link.target = "_blank",
  5379. "_blank" == this._el.link.target && this._el.link.setAttribute("rel", "noopener"),
  5380. this._el.content = v("div", "tl-media-content", this._el.link)) : this._el.content = v("div", "tl-media-content", this._el.content_container)
  5381. }
  5382. _updateDisplay(t, e, i) {
  5383. t && (this.options.width = t),
  5384. e && (this.options.height = e),
  5385. i && (this.options.layout = i),
  5386. this._el.credit && (this.options.credit_height = this._el.credit.offsetHeight),
  5387. this._el.caption && (this.options.caption_height = this._el.caption.offsetHeight + 5),
  5388. this.updateMediaDisplay(this.options.layout)
  5389. }
  5390. domCreate(...t) {
  5391. return v(...t)
  5392. }
  5393. _stopMedia() {}
  5394. }
  5395. R(de, at, Rt);
  5396. class ce extends de {
  5397. _loadMedia() {
  5398. this.loadingMessage(),
  5399. this.options.background || this.createMedia(),
  5400. this.onLoaded()
  5401. }
  5402. createMedia() {
  5403. var t = this
  5404. , e = "tl-media-item tl-media-image tl-media-shadow";
  5405. (this.data.url.match(/.png(\?.*)?$/) || this.data.url.match(/.svg(\?.*)?$/)) && (e = "tl-media-item tl-media-image"),
  5406. this._el.content_item = this.domCreate("img", e, this._el.content),
  5407. this.data.alt ? this._el.content_item.alt = this.data.alt : this.data.caption && (this._el.content_item.alt = q(this.data.caption)),
  5408. this.data.title ? this._el.content_item.title = this.data.title : this.data.caption && (this._el.content_item.title = q(this.data.caption)),
  5409. this._el.content_item.addEventListener("load", (function(e) {
  5410. t.onMediaLoaded()
  5411. }
  5412. )),
  5413. this._el.content_item.src = this.getImageURL()
  5414. }
  5415. getImageURL(t, e) {
  5416. return U(this.data.url)
  5417. }
  5418. _updateMediaDisplay(t) {
  5419. m && (this._el.content_item.style.width = "auto")
  5420. }
  5421. }
  5422. function ue(t, e, i, a) {
  5423. _e.js(t, e, i, a)
  5424. }
  5425. function me(t, e, i, a) {
  5426. _e.css(t, e, i, a)
  5427. }
  5428. let _e = new class {
  5429. constructor(t) {
  5430. this.doc = t,
  5431. this.pending = {},
  5432. this.queue = {
  5433. css: [],
  5434. js: []
  5435. },
  5436. this.styleSheets = t.styleSheets,
  5437. this.env = this.getEnv(),
  5438. this.head = this.doc.head || this.doc.getElementsByTagName("head")[0],
  5439. this.pollCount = 0
  5440. }
  5441. createNode(t, e) {
  5442. var i, a = this.doc.createElement(t);
  5443. for (i in e)
  5444. e.hasOwnProperty(i) && a.setAttribute(i, e[i]);
  5445. return a
  5446. }
  5447. finish(t) {
  5448. var e, i, a = this.pending[t];
  5449. a && (e = a.callback,
  5450. (i = a.urls).shift(),
  5451. this.pollCount = 0,
  5452. i.length || (e && e.call(a.context, a.obj),
  5453. this.pending[t] = null,
  5454. this.queue[t].length && this.load(t)))
  5455. }
  5456. getEnv() {
  5457. var t = navigator.userAgent
  5458. , e = {
  5459. async: !0 === this.doc.createElement("script").async
  5460. };
  5461. return (e.webkit = /AppleWebKit\//.test(t)) || (e.ie = /MSIE/.test(t)) || (e.opera = /Opera/.test(t)) || (e.gecko = /Gecko\//.test(t)) || (e.unknown = !0),
  5462. e
  5463. }
  5464. load(t, e, i, a, s) {
  5465. var n, o, r, l, h, d, c = function() {
  5466. this.finish(t)
  5467. }
  5468. .bind(this), u = "css" === t, m = [];
  5469. if (e)
  5470. if (e = "string" == typeof e ? [e] : e.concat(),
  5471. u || this.env.async || this.env.gecko || this.env.opera)
  5472. this.queue[t].push({
  5473. urls: e,
  5474. callback: i,
  5475. obj: a,
  5476. context: s
  5477. });
  5478. else
  5479. for (n = 0,
  5480. o = e.length; n < o; ++n)
  5481. this.queue[t].push({
  5482. urls: [e[n]],
  5483. callback: n === o - 1 ? i : null,
  5484. obj: a,
  5485. context: s
  5486. });
  5487. if (!this.pending[t] && (l = this.pending[t] = this.queue[t].shift())) {
  5488. for (n = 0,
  5489. o = (h = l.urls).length; n < o; ++n)
  5490. d = h[n],
  5491. u ? r = this.env.gecko ? this.createNode("style") : this.createNode("link", {
  5492. href: d,
  5493. rel: "stylesheet"
  5494. }) : (r = this.createNode("script", {
  5495. src: d
  5496. })).async = !1,
  5497. r.className = "lazyload",
  5498. r.setAttribute("charset", "utf-8"),
  5499. this.env.ie && !u ? r.onreadystatechange = function() {
  5500. /loaded|complete/.test(r.readyState) && (r.onreadystatechange = null,
  5501. c())
  5502. }
  5503. : u && (this.env.gecko || this.env.webkit) ? this.env.webkit ? (l.urls[n] = r.href,
  5504. this.pollWebKit()) : (r.innerHTML = '@import "' + d + '";',
  5505. this.pollGecko(r)) : r.onload = r.onerror = c,
  5506. m.push(r);
  5507. for (n = 0,
  5508. o = m.length; n < o; ++n)
  5509. this.head.appendChild(m[n])
  5510. }
  5511. }
  5512. pollGecko(t) {
  5513. var e;
  5514. try {
  5515. e = !!t.sheet.cssRules
  5516. } catch (a) {
  5517. if (this.pollCount += 1,
  5518. this.pollCount < 200) {
  5519. var i = this;
  5520. setTimeout((function() {
  5521. i.pollGecko(t)
  5522. }
  5523. ), 50)
  5524. } else
  5525. e && this.finish("css");
  5526. return
  5527. }
  5528. this.finish("css")
  5529. }
  5530. pollWebKit() {
  5531. var t, e = this.pending.css;
  5532. if (e) {
  5533. for (t = this.styleSheets.length; --t >= 0; )
  5534. if (this.styleSheets[t].href === e.urls[0]) {
  5535. this.finish("css");
  5536. break
  5537. }
  5538. this.pollCount += 1,
  5539. e && (this.pollCount < 200 ? setTimeout(this.pollWebKit.bind(this), 50) : this.finish("css"))
  5540. }
  5541. }
  5542. css(t, e, i, a) {
  5543. this.load("css", t, e, i, a)
  5544. }
  5545. js(t, e, i, a) {
  5546. this.load("js", t, e, i, a)
  5547. }
  5548. }
  5549. (document);
  5550. function qe(t, e) {
  5551. return !1
  5552. }
  5553. class $e {
  5554. constructor(t, e) {
  5555. this._el = {
  5556. container: {},
  5557. content_container: {},
  5558. media_container: {},
  5559. timespan: {},
  5560. line_left: {},
  5561. line_right: {},
  5562. content: {},
  5563. text: {},
  5564. media: {}
  5565. },
  5566. this._text = {},
  5567. this._state = {
  5568. loaded: !1
  5569. },
  5570. this.data = {
  5571. unique_id: "",
  5572. background: null,
  5573. date: {
  5574. year: 0,
  5575. month: 0,
  5576. day: 0,
  5577. hour: 0,
  5578. minute: 0,
  5579. second: 0,
  5580. millisecond: 0,
  5581. thumbnail: "",
  5582. format: ""
  5583. },
  5584. text: {
  5585. headline: "",
  5586. text: ""
  5587. },
  5588. media: null
  5589. },
  5590. this.options = {
  5591. duration: 1e3,
  5592. ease: Q,
  5593. width: 600,
  5594. height: 600,
  5595. marker_width_min: 100
  5596. },
  5597. this.active = !1,
  5598. this.animator = {},
  5599. this.has_end_date = !1,
  5600. this.ariaLabel = "",
  5601. E(this.options, e),
  5602. E(this.data, t),
  5603. this._initLayout(),
  5604. this._initEvents()
  5605. }
  5606. show() {}
  5607. hide() {}
  5608. setActive(t) {
  5609. this.active = t,
  5610. this.active && this.has_end_date ? this._el.container.className = "tl-timemarker tl-timemarker-with-end tl-timemarker-active" : this.active ? this._el.container.className = "tl-timemarker tl-timemarker-active" : this.has_end_date ? this._el.container.className = "tl-timemarker tl-timemarker-with-end" : this._el.container.className = "tl-timemarker",
  5611. this._el.container.ariaLabel = this.ariaLabel,
  5612. this.active ? this._el.container.ariaLabel += ", shown" : this._el.container.ariaLabel += ", press space to show"
  5613. }
  5614. setFocus(t={
  5615. preventScroll: !0
  5616. }) {
  5617. this._el.container.focus(t)
  5618. }
  5619. addTo(t) {
  5620. t.appendChild(this._el.container)
  5621. }
  5622. removeFrom(t) {
  5623. t.removeChild(this._el.container)
  5624. }
  5625. updateDisplay(t, e) {
  5626. this._updateDisplay(t, e)
  5627. }
  5628. loadMedia() {
  5629. this._media && !this._state.loaded && (this._media.loadMedia(),
  5630. this._state.loaded = !0)
  5631. }
  5632. stopMedia() {
  5633. this._media && this._state.loaded && this._media.stopMedia()
  5634. }
  5635. getLeft() {
  5636. return this._el.container.style.left.slice(0, -2)
  5637. }
  5638. getTime() {
  5639. return this.data.start_date.getTime()
  5640. }
  5641. getEndTime() {
  5642. return !!this.data.end_date && this.data.end_date.getTime()
  5643. }
  5644. setHeight(t) {
  5645. var e = 1;
  5646. this._el.content_container.style.height = t + "px",
  5647. this._el.timespan_content.style.height = t + "px",
  5648. this._el.content.className = t <= 30 ? "tl-timemarker-content tl-timemarker-content-small" : "tl-timemarker-content",
  5649. t <= 56 ? this._el.content_container.classList.add("tl-timemarker-content-container-small") : this._el.content_container.classList.remove("tl-timemarker-content-container-small"),
  5650. r ? ((e = Math.floor(t / 14)) < 1 && (e = 1),
  5651. this._text.className = "tl-headline",
  5652. this._text.style.webkitLineClamp = e) : (e = t / 12,
  5653. this._text.className = e > 1 ? "tl-headline tl-headline-fadeout" : "tl-headline",
  5654. this._text.style.height = 12 * e + "px")
  5655. }
  5656. setWidth(t) {
  5657. this.data.end_date && (this._el.container.style.width = t + "px",
  5658. t > this.options.marker_width_min ? (this._el.content_container.style.width = t + "px",
  5659. this._el.content_container.className = "tl-timemarker-content-container tl-timemarker-content-container-long") : (this._el.content_container.style.width = this.options.marker_width_min + "px",
  5660. this._el.content_container.className = "tl-timemarker-content-container"))
  5661. }
  5662. setClass(t) {
  5663. this._el.container.className = t
  5664. }
  5665. setRowPosition(t, e) {
  5666. this.setPosition({
  5667. top: t
  5668. }),
  5669. this._el.timespan.style.height = e + "px"
  5670. }
  5671. getFormattedDate() {
  5672. if (O(this.data.display_date).length > 0)
  5673. return this.data.display_date;
  5674. let t = "";
  5675. return this.data.end_date && (t = " to " + this.data.end_date.getDisplayDate(this.getLanguage())),
  5676. this.data.start_date && (t = (t ? "from " : "") + this.data.start_date.getDisplayDate(this.getLanguage()) + t),
  5677. t
  5678. }
  5679. _onMarkerClick(t) {
  5680. this.fire("markerclick", {
  5681. unique_id: this.data.unique_id
  5682. })
  5683. }
  5684. _onMarkerKeydown(t) {
  5685. /Space|Enter/.test(t.code) && this.fire("markerclick", {
  5686. unique_id: this.data.unique_id
  5687. })
  5688. }
  5689. _onMarkerBlur(t) {
  5690. this.fire("markerblur", {
  5691. unique_id: this.data.unique_id
  5692. })
  5693. }
  5694. _initLayout() {
  5695. if (this._el.container = v("div", "tl-timemarker"),
  5696. this._el.container.setAttribute("tabindex", "-1"),
  5697. this.data.unique_id && (this._el.container.id = this.data.unique_id + "-marker"),
  5698. this.data.end_date && (this.has_end_date = !0,
  5699. this._el.container.className = "tl-timemarker tl-timemarker-with-end"),
  5700. this._el.timespan = v("div", "tl-timemarker-timespan", this._el.container),
  5701. this._el.timespan_content = v("div", "tl-timemarker-timespan-content", this._el.timespan),
  5702. this._el.content_container = v("div", "tl-timemarker-content-container", this._el.container),
  5703. this._el.content = v("div", "tl-timemarker-content", this._el.content_container),
  5704. this._el.line_left = v("div", "tl-timemarker-line-left", this._el.timespan),
  5705. this._el.line_right = v("div", "tl-timemarker-line-right", this._el.timespan),
  5706. this.data.media) {
  5707. this._el.media_container = v("div", "tl-timemarker-media-container", this._el.content);
  5708. var t = {
  5709. url: this.data.media.thumbnail
  5710. }
  5711. , e = this.data.media.thumbnail ? qe(t, !0) : null;
  5712. if (e) {
  5713. var i = new e.cls(t);
  5714. i.on("loaded", function() {
  5715. this._el.media = v("img", "tl-timemarker-media", this._el.media_container),
  5716. this._el.media.src = i.getImageURL()
  5717. }
  5718. .bind(this)),
  5719. i.loadMedia()
  5720. } else {
  5721. var a = qe(this.data.media).type;
  5722. this._el.media = v("span", "tl-icon-" + a, this._el.media_container)
  5723. }
  5724. }
  5725. this._el.text = v("div", "tl-timemarker-text", this._el.content),
  5726. this._text = v("h2", "tl-headline", this._el.text),
  5727. this.data.text.headline && "" != this.data.text.headline ? this._text.innerHTML = F(this.data.text.headline) : this.data.text.text && "" != this.data.text.text ? this._text.innerHTML = F(this.data.text.text) : this.data.media && this.data.media.caption && "" != this.data.media.caption && (this._text.innerHTML = F(this.data.media.caption));
  5728. const s = this.getFormattedDate();
  5729. this.ariaLabel = `${this._text.innerHTML}, ${s}`,
  5730. this.onLoaded()
  5731. }
  5732. _initEvents() {
  5733. ht.addListener(this._el.container, "click", this._onMarkerClick, this),
  5734. ht.addListener(this._el.container, "keydown", this._onMarkerKeydown, this),
  5735. ht.addListener(this._el.container, "blur", this._onMarkerBlur, this)
  5736. }
  5737. _updateDisplay(t, e, i) {
  5738. t && (this.options.width = t),
  5739. e && (this.options.height = e)
  5740. }
  5741. }
  5742. R($e, Rt, at, ot);
  5743. class Ue {
  5744. constructor(t, e, i) {
  5745. this._el = {
  5746. drag: t,
  5747. move: t
  5748. },
  5749. this.mousedrag = {
  5750. down: "mousedown",
  5751. up: "mouseup",
  5752. leave: "mouseleave",
  5753. move: "mousemove"
  5754. },
  5755. this.touchdrag = {
  5756. down: "touchstart",
  5757. up: "touchend",
  5758. leave: "mouseleave",
  5759. move: "touchmove"
  5760. },
  5761. e && (this._el.move = e),
  5762. this.options = {
  5763. snap: !1,
  5764. enable: {
  5765. x: !0,
  5766. y: !0
  5767. },
  5768. constraint: {
  5769. top: !1,
  5770. bottom: !1,
  5771. left: 0,
  5772. right: !1
  5773. },
  5774. momentum_multiplier: 2e3,
  5775. duration: 1e3,
  5776. ease: et
  5777. },
  5778. this.animator = null,
  5779. this.dragevent = this.mousedrag,
  5780. f && (this.dragevent = this.touchdrag),
  5781. this.data = {
  5782. sliding: !1,
  5783. direction: "none",
  5784. pagex: {
  5785. start: 0,
  5786. end: 0
  5787. },
  5788. pagey: {
  5789. start: 0,
  5790. end: 0
  5791. },
  5792. pos: {
  5793. start: {
  5794. x: 0,
  5795. y: 0
  5796. },
  5797. end: {
  5798. x: 0,
  5799. y: 0
  5800. }
  5801. },
  5802. new_pos: {
  5803. x: 0,
  5804. y: 0
  5805. },
  5806. new_pos_parent: {
  5807. x: 0,
  5808. y: 0
  5809. },
  5810. time: {
  5811. start: 0,
  5812. end: 0
  5813. },
  5814. touch: !1
  5815. },
  5816. E(this.options, i)
  5817. }
  5818. enable(t) {
  5819. ht.addListener(this._el.drag, this.dragevent.down, this._onDragStart, this),
  5820. ht.addListener(this._el.drag, this.dragevent.up, this._onDragEnd, this),
  5821. this.data.pos.start = 0,
  5822. this._el.move.style.left = this.data.pos.start.x + "px",
  5823. this._el.move.style.top = this.data.pos.start.y + "px",
  5824. this._el.move.style.position = "absolute"
  5825. }
  5826. disable() {
  5827. ht.removeListener(this._el.drag, this.dragevent.down, this._onDragStart, this),
  5828. ht.removeListener(this._el.drag, this.dragevent.up, this._onDragEnd, this)
  5829. }
  5830. stopMomentum() {
  5831. this.animator && this.animator.stop()
  5832. }
  5833. updateConstraint(t) {
  5834. this.options.constraint = t
  5835. }
  5836. _onDragStart(t) {
  5837. this.animator && this.animator.stop(),
  5838. f ? t.originalEvent ? (this.data.pagex.start = t.originalEvent.touches[0].screenX,
  5839. this.data.pagey.start = t.originalEvent.touches[0].screenY) : (this.data.pagex.start = t.targetTouches[0].screenX,
  5840. this.data.pagey.start = t.targetTouches[0].screenY) : (this.data.pagex.start = t.pageX,
  5841. this.data.pagey.start = t.pageY),
  5842. this.options.enable.x,
  5843. this.options.enable.y,
  5844. this.data.pos.start = {
  5845. x: this._el.move.offsetLeft,
  5846. y: this._el.move.offsetTop
  5847. },
  5848. this.data.time.start = (new Date).getTime(),
  5849. this.fire("dragstart", this.data),
  5850. ht.addListener(this._el.drag, this.dragevent.move, this._onDragMove, this),
  5851. ht.addListener(this._el.drag, this.dragevent.leave, this._onDragEnd, this)
  5852. }
  5853. _onDragEnd(t) {
  5854. this.data.sliding = !1,
  5855. ht.removeListener(this._el.drag, this.dragevent.move, this._onDragMove, this),
  5856. ht.removeListener(this._el.drag, this.dragevent.leave, this._onDragEnd, this),
  5857. this.fire("dragend", this.data),
  5858. this._momentum()
  5859. }
  5860. _onDragMove(t) {
  5861. var e = {
  5862. x: 0,
  5863. y: 0
  5864. };
  5865. this.data.sliding = !0,
  5866. f ? t.originalEvent ? (this.data.pagex.end = t.originalEvent.touches[0].screenX,
  5867. this.data.pagey.end = t.originalEvent.touches[0].screenY) : (this.data.pagex.end = t.targetTouches[0].screenX,
  5868. this.data.pagey.end = t.targetTouches[0].screenY) : (this.data.pagex.end = t.pageX,
  5869. this.data.pagey.end = t.pageY),
  5870. e.x = this.data.pagex.start - this.data.pagex.end,
  5871. e.y = this.data.pagey.start - this.data.pagey.end,
  5872. this.data.pos.end = {
  5873. x: this._el.drag.offsetLeft,
  5874. y: this._el.drag.offsetTop
  5875. },
  5876. this.data.new_pos.x = -(e.x - this.data.pos.start.x),
  5877. this.data.new_pos.y = -(e.y - this.data.pos.start.y),
  5878. this.options.enable.x && Math.abs(e.x) > Math.abs(e.y) && (t.preventDefault(),
  5879. this._el.move.style.left = this.data.new_pos.x + "px"),
  5880. this.options.enable.y && Math.abs(e.y) > Math.abs(e.y) && (t.preventDefault(),
  5881. this._el.move.style.top = this.data.new_pos.y + "px"),
  5882. this.fire("dragmove", this.data)
  5883. }
  5884. _momentum() {
  5885. var t = {
  5886. x: 0,
  5887. y: 0,
  5888. time: 0
  5889. }
  5890. , e = {
  5891. x: 0,
  5892. y: 0,
  5893. time: 0
  5894. }
  5895. , i = {
  5896. x: !1,
  5897. y: !1
  5898. }
  5899. , a = !1;
  5900. this.data.direction = null,
  5901. t.time = 10 * ((new Date).getTime() - this.data.time.start),
  5902. e.time = 10 * ((new Date).getTime() - this.data.time.start),
  5903. e.x = this.options.momentum_multiplier * (Math.abs(this.data.pagex.end) - Math.abs(this.data.pagex.start)),
  5904. e.y = this.options.momentum_multiplier * (Math.abs(this.data.pagey.end) - Math.abs(this.data.pagey.start)),
  5905. t.x = Math.round(e.x / e.time),
  5906. t.y = Math.round(e.y / e.time),
  5907. this.data.new_pos.x = Math.min(this.data.new_pos.x + t.x),
  5908. this.data.new_pos.y = Math.min(this.data.new_pos.y + t.y),
  5909. this.options.enable.x ? this.options.constraint.left && this.data.new_pos.x > this.options.constraint.left && (this.data.new_pos.x = this.options.constraint.left) : this.data.new_pos.x = this.data.pos.start.x,
  5910. this.options.enable.y ? this.data.new_pos.y < 0 && (this.data.new_pos.y = 0) : this.data.new_pos.y = this.data.pos.start.y,
  5911. e.time < 2e3 && (a = !0),
  5912. this.options.enable.x && this.options.enable.y ? Math.abs(e.x) > Math.abs(e.y) ? i.x = !0 : i.y = !0 : this.options.enable.x ? Math.abs(e.x) > Math.abs(e.y) && (i.x = !0) : Math.abs(e.y) > Math.abs(e.x) && (i.y = !0),
  5913. i.x && (Math.abs(e.x) > this._el.drag.offsetWidth / 2 && (a = !0),
  5914. Math.abs(e.x) > 1e4 && (this.data.direction = "left",
  5915. e.x > 0 && (this.data.direction = "right"))),
  5916. i.y && (Math.abs(e.y) > this._el.drag.offsetHeight / 2 && (a = !0),
  5917. Math.abs(e.y) > 1e4 && (this.data.direction = "up",
  5918. e.y > 0 && (this.data.direction = "down"))),
  5919. e.time < 1e3 || this._animateMomentum(),
  5920. a && this.data.direction ? this.fire("swipe_" + this.data.direction, this.data) : this.data.direction ? this.fire("swipe_nodirection", this.data) : this.options.snap && (this.animator.stop(),
  5921. this.animator = st(this._el.move, {
  5922. top: this.data.pos.start.y,
  5923. left: this.data.pos.start.x,
  5924. duration: this.options.duration,
  5925. easing: tt
  5926. }))
  5927. }
  5928. _animateMomentum() {
  5929. var t = {
  5930. x: this.data.new_pos.x,
  5931. y: this.data.new_pos.y
  5932. }
  5933. , e = {
  5934. duration: this.options.duration,
  5935. easing: tt
  5936. };
  5937. this.options.enable.y && ((this.options.constraint.top || this.options.constraint.bottom) && (t.y > this.options.constraint.bottom ? t.y = this.options.constraint.bottom : t.y < this.options.constraint.top && (t.y = this.options.constraint.top)),
  5938. e.top = Math.floor(t.y) + "px"),
  5939. this.options.enable.x && (this.options.constraint.left && t.x >= this.options.constraint.left && (t.x = this.options.constraint.left),
  5940. this.options.constraint.right && t.x < this.options.constraint.right && (t.x = this.options.constraint.right),
  5941. e.left = Math.floor(t.x) + "px"),
  5942. this.animator = st(this._el.move, e),
  5943. this.fire("momentum", this.data)
  5944. }
  5945. }
  5946. R(Ue, at);
  5947. class Be {
  5948. constructor(t, e, i, a) {
  5949. this.language = a,
  5950. this._el = {
  5951. parent: {},
  5952. container: {},
  5953. slider: {},
  5954. slider_background: {},
  5955. line: {},
  5956. marker_container_mask: {},
  5957. marker_container: {},
  5958. marker_item_container: {},
  5959. timeaxis: {},
  5960. timeaxis_background: {}
  5961. },
  5962. this.collapsed = !1,
  5963. this._el.container = "object" == typeof t ? t : g(t),
  5964. this._el.container.setAttribute("tabindex", "0"),
  5965. this._el.container.setAttribute("role", "application"),
  5966. this._el.container.setAttribute("aria-label", this._("aria_label_timeline_navigation")),
  5967. this._el.container.setAttribute("aria-description", 'Navigate between markers with arrow keys. Press "Home" for the first and "End" for the last markers'),
  5968. this.config = e,
  5969. this.options = {
  5970. width: 600,
  5971. height: 600,
  5972. duration: 1e3,
  5973. ease: et,
  5974. has_groups: !1,
  5975. optimal_tick_width: 50,
  5976. scale_factor: 2,
  5977. marker_padding: 5,
  5978. timenav_height_min: 150,
  5979. marker_height_min: 30,
  5980. marker_width_min: 100,
  5981. zoom_sequence: [.5, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
  5982. },
  5983. this.animator = null,
  5984. this.ready = !1,
  5985. this._markers = [],
  5986. this._eras = [],
  5987. this.has_eras = !1,
  5988. this._groups = [],
  5989. this._calculated_row_height = 100,
  5990. this.current_id = "",
  5991. this.current_focused_id = "",
  5992. this.timescale = {},
  5993. this.timeaxis = {},
  5994. this.max_rows = 6,
  5995. this.animate_css = !1,
  5996. this._swipable,
  5997. E(this.options, i)
  5998. }
  5999. init() {
  6000. this._initLayout(),
  6001. this._initEvents(),
  6002. this._initData(),
  6003. this.updateDisplay(),
  6004. this._onLoaded()
  6005. }
  6006. positionMarkers(t) {
  6007. for (var e = 0; e < this._markers.length; e++) {
  6008. var i = this.timescale.getPositionInfo(e);
  6009. t ? this._markers[e].setClass("tl-timemarker tl-timemarker-fast") : this._markers[e].setClass("tl-timemarker"),
  6010. this._markers[e].setPosition({
  6011. left: i.start
  6012. }),
  6013. this._markers[e].setWidth(i.width)
  6014. }
  6015. }
  6016. updateDisplay(t, e, i) {
  6017. let a = !1;
  6018. t && (0 == this.options.width && t > 0 && (a = !0),
  6019. this.options.width = t),
  6020. e && e != this.options.height && (this.options.height = e,
  6021. this.timescale = this._getTimeScale()),
  6022. this._assignRowsToMarkers(),
  6023. this._el.slider_background.style.width = this.timescale.getPixelWidth() + this.options.width + "px",
  6024. this._el.slider_background.style.left = -this.options.width / 2 + "px",
  6025. this._el.slider.style.width = this.timescale.getPixelWidth() + this.options.width + "px",
  6026. this._swipable.updateConstraint({
  6027. top: !1,
  6028. bottom: !1,
  6029. left: this.options.width / 2,
  6030. right: -(this.timescale.getPixelWidth() - this.options.width / 2)
  6031. }),
  6032. a && this._drawTimeline(),
  6033. this.goToId(this.current_id, !0)
  6034. }
  6035. _getTimeScale() {
  6036. var t = 0;
  6037. try {
  6038. t = parseInt(this.options.marker_height_min)
  6039. } catch (e) {
  6040. S("Invalid value for marker_height_min option."),
  6041. t = 30
  6042. }
  6043. return 0 == t && (S("marker_height_min option must not be zero."),
  6044. t = 30),
  6045. this.max_rows = Math.round((this.options.height - this._el.timeaxis_background.offsetHeight - this.options.marker_padding) / t),
  6046. this.max_rows < 1 && (this.max_rows = 1),
  6047. new ne(this.config,{
  6048. display_width: this._el.container.offsetWidth,
  6049. screen_multiplier: this.options.scale_factor,
  6050. max_rows: this.max_rows
  6051. })
  6052. }
  6053. _updateTimeScale(t) {
  6054. this.options.scale_factor = t,
  6055. this._updateDrawTimeline()
  6056. }
  6057. zoomIn() {
  6058. var t = function(t, e) {
  6059. for (var i = 0; i < t.length; i++)
  6060. if (e < t[i])
  6061. return t[i];
  6062. return e
  6063. }(this.options.zoom_sequence, this.options.scale_factor);
  6064. this.setZoomFactor(t)
  6065. }
  6066. zoomOut() {
  6067. var t = function(t, e) {
  6068. for (var i = t.length - 1; i >= 0; i--)
  6069. if (e > t[i])
  6070. return t[i];
  6071. return e
  6072. }(this.options.zoom_sequence, this.options.scale_factor);
  6073. this.setZoomFactor(t)
  6074. }
  6075. setZoom(t) {
  6076. var e = this.options.zoom_sequence[t];
  6077. "number" == typeof e ? this.setZoomFactor(e) : console.warn("Invalid zoom level. Please use an index number between 0 and " + (this.options.zoom_sequence.length - 1))
  6078. }
  6079. setZoomFactor(t) {
  6080. t <= this.options.zoom_sequence[0] ? this.fire("zoomtoggle", {
  6081. zoom: "out",
  6082. show: !1
  6083. }) : this.fire("zoomtoggle", {
  6084. zoom: "out",
  6085. show: !0
  6086. }),
  6087. t >= this.options.zoom_sequence[this.options.zoom_sequence.length - 1] ? this.fire("zoomtoggle", {
  6088. zoom: "in",
  6089. show: !1
  6090. }) : this.fire("zoomtoggle", {
  6091. zoom: "in",
  6092. show: !0
  6093. }),
  6094. 0 == t && (console.warn("Zoom factor must be greater than zero. Using 0.1"),
  6095. t = .1),
  6096. this.options.scale_factor = t,
  6097. this.goToId(this.current_id, !this._updateDrawTimeline(!0), !0)
  6098. }
  6099. _createGroups() {
  6100. this._groups = [];
  6101. var t = this.timescale.getGroupLabels();
  6102. if (t) {
  6103. this.options.has_groups = !0;
  6104. for (var e = 0; e < t.length; e++)
  6105. this._createGroup(t[e])
  6106. }
  6107. }
  6108. _createGroup(t) {
  6109. var e = new oe(t);
  6110. this._addGroup(e),
  6111. this._groups.push(e)
  6112. }
  6113. _addGroup(t) {
  6114. t.addTo(this._el.container)
  6115. }
  6116. _positionGroups() {
  6117. if (this.options.has_groups)
  6118. for (var t = this.options.height - this._el.timeaxis_background.offsetHeight, e = Math.floor(t / this.timescale.getNumberOfRows() - this.options.marker_padding), i = (this.timescale.getGroupLabels(),
  6119. 0), a = 0; i < this._groups.length; i++) {
  6120. var s = Math.floor(a * (e + this.options.marker_padding))
  6121. , n = !1;
  6122. s > t - this.options.marker_padding && (n = !0),
  6123. this._groups[i].setRowPosition(s, this._calculated_row_height + this.options.marker_padding / 2),
  6124. this._groups[i].setAlternateRowColor(z(i), n),
  6125. a += this._groups[i].data.rows
  6126. }
  6127. }
  6128. _addMarker(t) {
  6129. t.addTo(this._el.marker_item_container),
  6130. t.on("markerclick", this._onMarkerClick, this),
  6131. t.on("added", this._onMarkerAdded, this)
  6132. }
  6133. _createMarker(t, e) {
  6134. var i = new $e(t,this.options);
  6135. this._addMarker(i),
  6136. e < 0 ? this._markers.push(i) : this._markers.splice(e, 0, i)
  6137. }
  6138. _createMarkers(t) {
  6139. for (var e = 0; e < t.length; e++)
  6140. this._createMarker(t[e], -1)
  6141. }
  6142. _removeMarker(t) {
  6143. t.removeFrom(this._el.marker_item_container)
  6144. }
  6145. _destroyMarker(t) {
  6146. this._removeMarker(this._markers[t]),
  6147. this._markers.splice(t, 1)
  6148. }
  6149. _calculateMarkerHeight(t) {
  6150. return t / this.timescale.getNumberOfRows() - this.options.marker_padding
  6151. }
  6152. _calculateRowHeight(t) {
  6153. return t / this.timescale.getNumberOfRows()
  6154. }
  6155. _calculateAvailableHeight() {
  6156. return this.options.height - this._el.timeaxis_background.offsetHeight - this.options.marker_padding
  6157. }
  6158. _calculateMinimumTimeNavHeight() {
  6159. return this.timescale.getNumberOfRows() * this.options.marker_height_min + this._el.timeaxis_background.offsetHeight + this.options.marker_padding
  6160. }
  6161. getMinimumHeight() {
  6162. return this._calculateMinimumTimeNavHeight()
  6163. }
  6164. _assignRowsToMarkers() {
  6165. var t = this._calculateAvailableHeight()
  6166. , e = this._calculateMarkerHeight(t);
  6167. this._positionGroups(),
  6168. this._calculated_row_height = this._calculateRowHeight(t);
  6169. for (var i = 0; i < this._markers.length; i++) {
  6170. this._markers[i].setHeight(e);
  6171. var a = this.timescale.getPositionInfo(i).row
  6172. , s = Math.floor(a * (e + this.options.marker_padding)) + this.options.marker_padding
  6173. , n = t - s + this.options.marker_padding;
  6174. this._markers[i].setRowPosition(s, n)
  6175. }
  6176. }
  6177. _resetMarkersActive() {
  6178. for (var t = 0; t < this._markers.length; t++)
  6179. this._markers[t].setActive(!1)
  6180. }
  6181. _resetMarkersBlurListeners() {
  6182. for (var t = 0; t < this._markers.length; t++)
  6183. this._markers[t].off("markerblur", this._onMarkerBlur, this)
  6184. }
  6185. _findMarkerIndex(t) {
  6186. var e = -1;
  6187. return ("string" == typeof t || t instanceof String) && (e = H(t, this._markers, "unique_id", e)),
  6188. e
  6189. }
  6190. _createEras(t) {
  6191. for (var e = 0; e < t.length; e++) {
  6192. var i = t[e]
  6193. , a = new re(i.start_date,i.end_date,i.headline,this.options);
  6194. this._eras.push(a),
  6195. a.addTo(this._el.marker_item_container),
  6196. a.on("added", this._onEraAdded, this)
  6197. }
  6198. }
  6199. _positionEras(t) {
  6200. for (var e = 0, i = 0; i < this._eras.length; i++) {
  6201. var a = {
  6202. start: 0,
  6203. end: 0,
  6204. width: 0
  6205. };
  6206. a.start = this.timescale.getPosition(this._eras[i].start_date.getTime()),
  6207. a.end = this.timescale.getPosition(this._eras[i].end_date.getTime()),
  6208. a.width = a.end - a.start,
  6209. t ? this._eras[i].setClass("tl-timeera tl-timeera-fast") : this._eras[i].setClass("tl-timeera"),
  6210. this._eras[i].setPosition({
  6211. left: a.start
  6212. }),
  6213. this._eras[i].setWidth(a.width),
  6214. ++e > 5 && (e = 0),
  6215. this._eras[i].setColor(e)
  6216. }
  6217. }
  6218. createMarker(t, e) {
  6219. this._createMarker(t, e)
  6220. }
  6221. createMarkers(t) {
  6222. this._createMarkers(t)
  6223. }
  6224. destroyMarker(t) {
  6225. this._destroyMarker(t)
  6226. }
  6227. destroyMarkerId(t) {
  6228. this.destroyMarker(this._findMarkerIndex(t))
  6229. }
  6230. goTo(t, e, i) {
  6231. var a = this.options.ease
  6232. , s = this.options.duration
  6233. , n = t < 0 ? 0 : t;
  6234. this._resetMarkersActive(),
  6235. t >= 0 && t < this._markers.length && this._markers[t].setActive(!0),
  6236. this.animateMovement(n, e, i, s, a),
  6237. t >= 0 && t < this._markers.length ? this.current_id = this.current_focused_id = this._markers[t].data.unique_id : this.current_id = this.current_focused_id = "",
  6238. this._setLabelWithCurrentMarker()
  6239. }
  6240. goToId(t, e, i) {
  6241. this.goTo(this._findMarkerIndex(t), e, i)
  6242. }
  6243. focusOn(t, e, i) {
  6244. const a = this.options.ease
  6245. , s = this.options.duration
  6246. , n = t < 0 ? 0 : t;
  6247. this.animateMovement(n, e, i, s, a),
  6248. this._resetMarkersBlurListeners(),
  6249. t >= 0 && t < this._markers.length && (this._markers[t].setFocus(),
  6250. this.current_focused_id = this._markers[t].data.unique_id,
  6251. this._markers[t].on("markerblur", this._onMarkerBlur, this))
  6252. }
  6253. focusNext() {
  6254. const t = this._findMarkerIndex(this.current_focused_id);
  6255. t + 1 < this._markers.length ? this.focusOn(t + 1) : this.focusOn(t)
  6256. }
  6257. focusPrevious() {
  6258. const t = this._findMarkerIndex(this.current_focused_id);
  6259. t - 1 >= 0 ? this.focusOn(t - 1) : this.focusOn(t)
  6260. }
  6261. animateMovement(t, e, i, a, s) {
  6262. this.animator && this.animator.stop(),
  6263. e ? (this._el.slider.className = "tl-timenav-slider",
  6264. this._el.slider.style.left = -this._markers[t].getLeft() + this.options.width / 2 + "px") : i ? (this._el.slider.className = "tl-timenav-slider tl-timenav-slider-animate",
  6265. this.animate_css = !0,
  6266. this._el.slider.style.left = -this._markers[t].getLeft() + this.options.width / 2 + "px") : (this._el.slider.className = "tl-timenav-slider",
  6267. this.animator = st(this._el.slider, {
  6268. left: -this._markers[t].getLeft() + this.options.width / 2 + "px",
  6269. duration: a,
  6270. easing: s
  6271. })),
  6272. t >= 0 && t < this._markers.length ? this.current_id = this._markers[t].data.unique_id : this.current_id = "",
  6273. this._dispatchVisibleTicksChange()
  6274. }
  6275. goToId(t, e, i) {
  6276. this.goTo(this._findMarkerIndex(t), e, i)
  6277. }
  6278. _dispatchVisibleTicksChange() {
  6279. this.ticks_change_timeout && (clearTimeout(this.ticks_change_timeout),
  6280. this.ticks_change_timeout = null),
  6281. this.ticks_change_timeout = setTimeout(( () => {
  6282. const t = this.timeaxis.getVisibleTicks();
  6283. this.fire("visible_ticks_change", {
  6284. visible_ticks: t
  6285. })
  6286. }
  6287. ), this.options.duration)
  6288. }
  6289. _onLoaded() {
  6290. this.ready = !0,
  6291. this.fire("loaded", this.config)
  6292. }
  6293. _onMarkerAdded(t) {
  6294. this.fire("dateAdded", this.config)
  6295. }
  6296. _onEraAdded(t) {
  6297. this.fire("eraAdded", this.config)
  6298. }
  6299. _onMarkerRemoved(t) {
  6300. this.fire("dateRemoved", this.config)
  6301. }
  6302. _onMarkerClick(t) {
  6303. this.goToId(t.unique_id),
  6304. this.fire("change", {
  6305. unique_id: t.unique_id
  6306. })
  6307. }
  6308. _onMarkerBlur(t) {
  6309. this.current_focused_id !== this.current_id && this.focusOn(this._findMarkerIndex(this.current_id))
  6310. }
  6311. _onMouseScroll(t) {
  6312. var e = 0
  6313. , i = 0
  6314. , a = {
  6315. right: -(this.timescale.getPixelWidth() - this.options.width / 2),
  6316. left: this.options.width / 2
  6317. };
  6318. t || (t = window.event),
  6319. t.originalEvent && (t = t.originalEvent),
  6320. void 0 !== t.wheelDeltaX && (e = t.wheelDeltaY / 6,
  6321. e = Math.abs(t.wheelDeltaX) > Math.abs(t.wheelDeltaY) ? t.wheelDeltaX / 6 : 0),
  6322. e && (t.preventDefault && t.preventDefault(),
  6323. t.returnValue = !1),
  6324. (i = parseInt(this._el.slider.style.left.replace("px", "")) + e) > a.left ? i = a.left : i < a.right && (i = a.right),
  6325. this.animate_css && (this._el.slider.className = "tl-timenav-slider",
  6326. this.animate_css = !1),
  6327. this._el.slider.style.left = i + "px"
  6328. }
  6329. _onDragMove(t) {
  6330. this.animate_css && (this._el.slider.className = "tl-timenav-slider",
  6331. this.animate_css = !1)
  6332. }
  6333. _onKeydown(t) {
  6334. switch (ht.stopPropagation(t),
  6335. t.key) {
  6336. case "ArrowUp":
  6337. case "ArrowRight":
  6338. this.focusNext();
  6339. break;
  6340. case "ArrowDown":
  6341. case "ArrowLeft":
  6342. this.focusPrevious();
  6343. break;
  6344. case "Home":
  6345. this.focusOn(0);
  6346. break;
  6347. case "End":
  6348. this.focusOn(this._markers.length - 1)
  6349. }
  6350. }
  6351. _drawTimeline(t) {
  6352. this.timescale = this._getTimeScale(),
  6353. this.timeaxis.drawTicks(this.timescale, this.options.optimal_tick_width),
  6354. this.positionMarkers(t),
  6355. this._assignRowsToMarkers(),
  6356. this._createGroups(),
  6357. this._positionGroups(),
  6358. this.has_eras && this._positionEras(t)
  6359. }
  6360. _updateDrawTimeline(t) {
  6361. var e = !1;
  6362. if (t) {
  6363. var i = new ne(this.config,{
  6364. display_width: this._el.container.offsetWidth,
  6365. screen_multiplier: this.options.scale_factor,
  6366. max_rows: this.max_rows
  6367. });
  6368. this.timescale.getMajorScale() == i.getMajorScale() && this.timescale.getMinorScale() == i.getMinorScale() && (e = !0)
  6369. } else
  6370. e = !0;
  6371. return e ? (this.timescale = this._getTimeScale(),
  6372. this.timeaxis.positionTicks(this.timescale, this.options.optimal_tick_width),
  6373. this.positionMarkers(),
  6374. this._assignRowsToMarkers(),
  6375. this._positionGroups(),
  6376. this.has_eras && this._positionEras(),
  6377. this.updateDisplay()) : this._drawTimeline(!0),
  6378. e
  6379. }
  6380. _setLabelWithCurrentMarker() {
  6381. const t = this._markers[this._findMarkerIndex(this.current_focused_id)]
  6382. , e = t && t.ariaLabel ? `, ${t.ariaLabel}, shown` : "";
  6383. this._el.container.setAttribute("aria-label", `Timeline navigation ${e}`)
  6384. }
  6385. _initLayout() {
  6386. this._el.line = v("div", "tl-timenav-line", this._el.container),
  6387. this._el.slider = v("div", "tl-timenav-slider", this._el.container),
  6388. this._el.slider_background = v("div", "tl-timenav-slider-background", this._el.slider),
  6389. this._el.marker_container_mask = v("div", "tl-timenav-container-mask", this._el.slider),
  6390. this._el.marker_container = v("div", "tl-timenav-container", this._el.marker_container_mask),
  6391. this._el.marker_item_container = v("div", "tl-timenav-item-container", this._el.marker_container),
  6392. this._el.timeaxis = v("div", "tl-timeaxis", this._el.slider),
  6393. this._el.timeaxis_background = v("div", "tl-timeaxis-background", this._el.container),
  6394. this.timeaxis = new le(this._el.timeaxis,this.options,this.language),
  6395. this._swipable = new Ue(this._el.slider_background,this._el.slider,{
  6396. enable: {
  6397. x: !0,
  6398. y: !1
  6399. },
  6400. constraint: {
  6401. top: !1,
  6402. bottom: !1,
  6403. left: this.options.width / 2,
  6404. right: !1
  6405. },
  6406. snap: !1
  6407. }),
  6408. this._swipable.enable()
  6409. }
  6410. _initEvents() {
  6411. this._swipable.on("dragmove", this._onDragMove, this),
  6412. ht.addListener(this._el.container, "mousewheel", this._onMouseScroll, this),
  6413. ht.addListener(this._el.container, "DOMMouseScroll", this._onMouseScroll, this),
  6414. ht.addListener(this._el.container, "keydown", this._onKeydown, this)
  6415. }
  6416. _initData() {
  6417. this._createMarkers(this.config.events),
  6418. this.config.eras && this.config.eras.length > 0 && (this.has_eras = !0,
  6419. this._createEras(this.config.eras)),
  6420. this._drawTimeline()
  6421. }
  6422. }
  6423. R(Be, at, ot, Rt),
  6424. i(142);
  6425. class We {
  6426. constructor(t, e, i, a) {
  6427. a && this.setLanguage(a),
  6428. this._el = {
  6429. container: {},
  6430. scroll_container: {},
  6431. background: {},
  6432. content_container: {},
  6433. content: {}
  6434. },
  6435. this._media = null,
  6436. this._mediaclass = {},
  6437. this._text = {},
  6438. this._background_media = null,
  6439. this._state = {
  6440. loaded: !1
  6441. },
  6442. this.has = {
  6443. headline: !1,
  6444. text: !1,
  6445. media: !1,
  6446. title: !1,
  6447. background: {
  6448. image: !1,
  6449. color: !1,
  6450. color_value: ""
  6451. }
  6452. },
  6453. this.has.title = i,
  6454. this.data = {
  6455. unique_id: null,
  6456. background: null,
  6457. start_date: null,
  6458. end_date: null,
  6459. location: null,
  6460. text: null,
  6461. media: null,
  6462. autolink: !0
  6463. },
  6464. this.options = {
  6465. duration: 1e3,
  6466. slide_padding_lr: 40,
  6467. ease: Q,
  6468. width: 600,
  6469. height: 600,
  6470. skinny_size: 650,
  6471. media_name: ""
  6472. },
  6473. this.active = !1,
  6474. this.animator = {},
  6475. E(this.options, e),
  6476. E(this.data, t),
  6477. this._initLayout(),
  6478. this._initEvents()
  6479. }
  6480. show() {
  6481. this.animator = st(this._el.slider_container, {
  6482. left: -this._el.container.offsetWidth * n + "px",
  6483. duration: this.options.duration,
  6484. easing: this.options.ease
  6485. })
  6486. }
  6487. hide() {}
  6488. setActive(t) {
  6489. this.active = t,
  6490. this.active ? (this.data.background && this.fire("background_change", this.has.background),
  6491. this._setInteractive(!0),
  6492. this.loadMedia()) : (this.stopMedia(),
  6493. this._setInteractive(!1))
  6494. }
  6495. addTo(t) {
  6496. t.appendChild(this._el.container)
  6497. }
  6498. removeFrom(t) {
  6499. t.removeChild(this._el.container)
  6500. }
  6501. updateDisplay(t, e, i) {
  6502. var a, s = this.options.slide_padding_lr, n = this.options.slide_padding_lr;
  6503. this.options.width = t || this._el.container.offsetWidth,
  6504. a = this.options.width - 2 * this.options.slide_padding_lr,
  6505. h && this.options.width <= this.options.skinny_size ? (s = 0,
  6506. n = 0,
  6507. a = this.options.width) : "landscape" == i || this.options.width <= this.options.skinny_size && (s = 50,
  6508. n = 50,
  6509. a = this.options.width - s - n),
  6510. this._el.content.style.paddingLeft = s + "px",
  6511. this._el.content.style.paddingRight = n + "px",
  6512. this._el.content.style.width = a + "px",
  6513. this.options.height = e || this._el.container.offsetHeight,
  6514. this._media && (!this.has.text && this.has.headline ? this._media.updateDisplay(a, this.options.height - this._text.headlineHeight(), i) : this.has.text || this.has.headline ? this.options.width <= this.options.skinny_size ? this._media.updateDisplay(a, this.options.height, i) : this._media.updateDisplay(a / 2, this.options.height, i) : this._media.updateDisplay(a, this.options.height, i)),
  6515. this._updateBackgroundDisplay()
  6516. }
  6517. loadMedia() {
  6518. var t = this;
  6519. this._media && !this._state.loaded && (this._media.loadMedia(),
  6520. this._state.loaded = !0),
  6521. this._background_media && !this._background_media._state.loaded && (this._background_media.on("loaded", (function() {
  6522. t._updateBackgroundDisplay()
  6523. }
  6524. )),
  6525. this._background_media.loadMedia())
  6526. }
  6527. stopMedia() {
  6528. this._media && this._state.loaded && this._media.stopMedia()
  6529. }
  6530. getBackground() {
  6531. return this.has.background
  6532. }
  6533. scrollToTop() {
  6534. this._el.container.scrollTop = 0
  6535. }
  6536. getFormattedDate() {
  6537. if (O(this.data.display_date).length > 0)
  6538. return this.data.display_date;
  6539. var t = "";
  6540. return this.has.title || (this.data.end_date && (t = " &mdash; " + this.data.end_date.getDisplayDate(this.getLanguage())),
  6541. this.data.start_date && (t = this.data.start_date.getDisplayDate(this.getLanguage()) + t)),
  6542. t
  6543. }
  6544. _initLayout() {
  6545. if (this._el.container = v("div", "tl-slide"),
  6546. this.has.title && (this._el.container.className = "tl-slide tl-slide-titleslide"),
  6547. this.data.unique_id && (this._el.container.id = this.data.unique_id),
  6548. this._el.scroll_container = v("div", "tl-slide-scrollable-container", this._el.container),
  6549. this._el.content_container = v("div", "tl-slide-content-container", this._el.scroll_container),
  6550. this._el.content = v("div", "tl-slide-content", this._el.content_container),
  6551. this._el.background = v("div", "tl-slide-background", this._el.container),
  6552. this.data.background) {
  6553. if (this.data.background.url) {
  6554. var t = qe(this.data.background, !0);
  6555. t && (this._background_media = new t.cls(this.data.background,{
  6556. background: 1
  6557. }),
  6558. this.has.background.image = !0,
  6559. this._el.container.className += " tl-full-image-background",
  6560. this.has.background.color_value = "#000",
  6561. this._el.background.style.display = "block"),
  6562. this.data.background.alt && (this._el.background.setAttribute("role", "img"),
  6563. this._el.background.setAttribute("aria-label", this.data.background.alt))
  6564. }
  6565. this.data.background.color && (this.has.background.color = !0,
  6566. this._el.container.className += " tl-full-color-background",
  6567. this.has.background.color_value = this.data.background.color),
  6568. this.data.background.text_background && (this._el.container.className += " tl-text-background")
  6569. }
  6570. this.data.media && this.data.media.url && "" != this.data.media.url && (this.has.media = !0),
  6571. this.data.text && this.data.text.text && (this.has.text = !0),
  6572. this.data.text && this.data.text.headline && (this.has.headline = !0),
  6573. this.has.media && (this.data.media.mediatype = qe(this.data.media),
  6574. this.options.media_name = this.data.media.mediatype.name,
  6575. this.options.media_type = this.data.media.mediatype.type,
  6576. this.options.autolink = this.data.autolink,
  6577. this._media = new this.data.media.mediatype.cls(this.data.media,this.options,this.getLanguage())),
  6578. (this.has.text || this.has.headline) && (this._text = new he(this.data.text,{
  6579. title: this.has.title,
  6580. language: this.getLanguage(),
  6581. autolink: this.data.autolink
  6582. }),
  6583. this._text.addDateText(this.getFormattedDate())),
  6584. this.has.text || this.has.headline || !this.has.media ? this.has.headline && this.has.media && !this.has.text ? (this._el.container.classList.add("tl-slide-media-only"),
  6585. this._text.addTo(this._el.content),
  6586. this._media.addTo(this._el.content)) : this.has.text && this.has.media ? (this._text.addTo(this._el.content),
  6587. this._media.addTo(this._el.content)) : (this.has.text || this.has.headline) && (this._el.container.classList.add("tl-slide-text-only"),
  6588. this._text.addTo(this._el.content)) : (this._el.container.classList.add("tl-slide-media-only"),
  6589. this._media.addTo(this._el.content)),
  6590. this.onLoaded()
  6591. }
  6592. _initEvents() {}
  6593. _updateBackgroundDisplay() {
  6594. this._background_media && this._background_media._state.loaded && (this._el.background.style.backgroundImage = "url('" + this._background_media.getImageURL(this.options.width, this.options.height) + "')")
  6595. }
  6596. _setInteractive(t) {
  6597. t ? this._el.container.removeAttribute("inert") : this._el.container.setAttribute("inert", !0)
  6598. }
  6599. }
  6600. R(We, Rt, at, ot);
  6601. class Ge {
  6602. constructor(t, e, i) {
  6603. this._el = {
  6604. container: {},
  6605. content_container: {},
  6606. icon: {},
  6607. title: {},
  6608. description: {}
  6609. },
  6610. this.mediatype = {},
  6611. this.data = {
  6612. title: "Navigation",
  6613. description: "Description",
  6614. date: "Date"
  6615. },
  6616. this.options = {
  6617. direction: "previous"
  6618. },
  6619. this.animator = null,
  6620. E(this.options, e),
  6621. E(this.data, t),
  6622. this._el.container = y("tl-slidenav-" + this.options.direction),
  6623. h && this._el.container.setAttribute("ontouchstart", " "),
  6624. this._initLayout(),
  6625. this._initEvents(),
  6626. i && i.appendChild(this._el.container)
  6627. }
  6628. update(t) {
  6629. var e = {
  6630. title: "",
  6631. description: "",
  6632. date: t.getFormattedDate()
  6633. };
  6634. t.data.text && t.data.text.headline && (e.title = t.data.text.headline),
  6635. this._update(e)
  6636. }
  6637. setColor(t) {
  6638. this._el.content_container.className = t ? "tl-slidenav-content-container tl-slidenav-inverted" : "tl-slidenav-content-container"
  6639. }
  6640. _onMouseClick() {
  6641. this.fire("clicked", this.options)
  6642. }
  6643. _update(t) {
  6644. this.data = E(this.data, t);
  6645. const e = F(this.data.title);
  6646. this._el.title.innerHTML = e;
  6647. const i = F(this.data.date);
  6648. this._el.description.innerHTML = i,
  6649. this._el.container.setAttribute("aria-label", `${this.options.direction}, ${e}, ${i}`)
  6650. }
  6651. _initLayout() {
  6652. this._el.content_container = v("div", "tl-slidenav-content-container", this._el.container),
  6653. this._el.icon = v("div", "tl-slidenav-icon", this._el.content_container),
  6654. this._el.title = v("div", "tl-slidenav-title", this._el.content_container),
  6655. this._el.description = v("div", "tl-slidenav-description", this._el.content_container),
  6656. this._el.icon.innerHTML = "&nbsp;",
  6657. this._update()
  6658. }
  6659. _initEvents() {
  6660. ht.addListener(this._el.container, "click", this._onMouseClick, this)
  6661. }
  6662. }
  6663. R(Ge, ot, at);
  6664. class Ye {
  6665. constructor(t, e, i, a) {
  6666. a && this.setLanguage(a),
  6667. this._el = {
  6668. container: {},
  6669. background: {},
  6670. slider_container_mask: {},
  6671. slider_container: {},
  6672. slider_item_container: {}
  6673. },
  6674. this._nav = {},
  6675. this._nav.previous = {},
  6676. this._nav.next = {},
  6677. this.slide_spacing = 0,
  6678. this._slides = [],
  6679. this._swipable,
  6680. this.preloadTimer,
  6681. this._message,
  6682. this.current_id = "",
  6683. this.data = {},
  6684. this.options = {
  6685. id: "",
  6686. layout: "portrait",
  6687. width: 600,
  6688. height: 600,
  6689. default_bg_color: {
  6690. r: 255,
  6691. g: 255,
  6692. b: 255
  6693. },
  6694. slide_padding_lr: 40,
  6695. start_at_slide: 1,
  6696. slide_default_fade: "0%",
  6697. duration: 1e3,
  6698. ease: et,
  6699. dragging: !0,
  6700. trackResize: !0
  6701. },
  6702. "object" == typeof t ? (this._el.container = t,
  6703. this.options.id = P(6, "tl")) : (this.options.id = t,
  6704. this._el.container = g(t)),
  6705. this._el.container.id || (this._el.container.id = this.options.id),
  6706. this.animator = null,
  6707. E(this.options, i),
  6708. E(this.data, e)
  6709. }
  6710. init() {
  6711. this._initLayout(),
  6712. this._initEvents(),
  6713. this._initData(),
  6714. this.updateDisplay(),
  6715. this.goTo(this.options.start_at_slide),
  6716. this._onLoaded()
  6717. }
  6718. _addSlide(t) {
  6719. t.addTo(this._el.slider_item_container),
  6720. t.on("added", this._onSlideAdded, this),
  6721. t.on("background_change", this._onBackgroundChange, this)
  6722. }
  6723. _createSlide(t, e, i) {
  6724. var a = new We(t,this.options,e,this.getLanguage());
  6725. this._addSlide(a),
  6726. i < 0 ? this._slides.push(a) : this._slides.splice(i, 0, a)
  6727. }
  6728. _createSlides(t) {
  6729. for (var e = 0; e < t.length; e++)
  6730. "" == t[e].unique_id && (t[e].unique_id = P(6, "tl-slide")),
  6731. this._createSlide(t[e], !1, -1)
  6732. }
  6733. _removeSlide(t) {
  6734. t.removeFrom(this._el.slider_item_container),
  6735. t.off("added", this._onSlideRemoved, this),
  6736. t.off("background_change", this._onBackgroundChange)
  6737. }
  6738. _destroySlide(t) {
  6739. this._removeSlide(this._slides[t]),
  6740. this._slides.splice(t, 1)
  6741. }
  6742. _findSlideIndex(t) {
  6743. var e = t;
  6744. return ("string" == typeof t || t instanceof String) && (e = H(t, this._slides, "unique_id")),
  6745. e
  6746. }
  6747. updateDisplay(t, e, i, a) {
  6748. var s, n;
  6749. n = void 0 === a ? this.options.layout : a,
  6750. this.options.layout = n,
  6751. this.options.width = t || this._el.container.offsetWidth,
  6752. this.options.height = e || this._el.container.offsetHeight,
  6753. this.slide_spacing = 2 * this.options.width,
  6754. s = this.options.height / 2,
  6755. this._nav.next.setPosition({
  6756. top: s
  6757. }),
  6758. this._nav.previous.setPosition({
  6759. top: s
  6760. });
  6761. for (var o = 0; o < this._slides.length; o++)
  6762. this._slides[o].updateDisplay(this.options.width, this.options.height, n),
  6763. this._slides[o].setPosition({
  6764. left: this.slide_spacing * o,
  6765. top: 0
  6766. });
  6767. this.goToId(this.current_id, !0, !0)
  6768. }
  6769. createSlide(t, e) {
  6770. this._createSlide(t, !1, e)
  6771. }
  6772. createSlides(t) {
  6773. this._createSlides(t)
  6774. }
  6775. destroySlide(t) {
  6776. this._destroySlide(t)
  6777. }
  6778. destroySlideId(t) {
  6779. this.destroySlide(this._findSlideIndex(t))
  6780. }
  6781. goTo(t, e, i) {
  6782. t = parseInt(t),
  6783. isNaN(t) && (t = 0);
  6784. var a = this;
  6785. this.changeBackground({
  6786. color_value: "",
  6787. image: !1
  6788. }),
  6789. this.preloadTimer && clearTimeout(this.preloadTimer);
  6790. for (var s = 0; s < this._slides.length; s++)
  6791. this._slides[s].setActive(!1);
  6792. t < this._slides.length && t >= 0 && (this.current_id = this._slides[t].data.unique_id,
  6793. this.animator && this.animator.stop(),
  6794. this._swipable && this._swipable.stopMomentum(),
  6795. e ? (this._el.slider_container.style.left = -this.slide_spacing * t + "px",
  6796. this._onSlideChange(i)) : this.animator = st(this._el.slider_container, {
  6797. left: -this.slide_spacing * t + "px",
  6798. duration: this.options.duration,
  6799. easing: this.options.ease,
  6800. complete: this._onSlideChange(i)
  6801. }),
  6802. this._slides[t].setActive(!0),
  6803. this._slides[t + 1] ? (this.showNav(this._nav.next, !0),
  6804. this._nav.next.update(this._slides[t + 1])) : this.showNav(this._nav.next, !1),
  6805. this._slides[t - 1] ? (this.showNav(this._nav.previous, !0),
  6806. this._nav.previous.update(this._slides[t - 1])) : this.showNav(this._nav.previous, !1),
  6807. this.preloadTimer = setTimeout((function() {
  6808. a.preloadSlides(t)
  6809. }
  6810. ), this.options.duration))
  6811. }
  6812. goToId(t, e, i) {
  6813. this.goTo(this._findSlideIndex(t), e, i)
  6814. }
  6815. preloadSlides(t) {
  6816. this._slides[t + 1] && (this._slides[t + 1].loadMedia(),
  6817. this._slides[t + 1].scrollToTop()),
  6818. this._slides[t + 2] && (this._slides[t + 2].loadMedia(),
  6819. this._slides[t + 2].scrollToTop()),
  6820. this._slides[t - 1] && (this._slides[t - 1].loadMedia(),
  6821. this._slides[t - 1].scrollToTop()),
  6822. this._slides[t - 2] && (this._slides[t - 2].loadMedia(),
  6823. this._slides[t - 2].scrollToTop())
  6824. }
  6825. next() {
  6826. var t = this._findSlideIndex(this.current_id);
  6827. t + 1 < this._slides.length ? this.goTo(t + 1) : this.goTo(t)
  6828. }
  6829. previous() {
  6830. var t = this._findSlideIndex(this.current_id);
  6831. t - 1 >= 0 ? this.goTo(t - 1) : this.goTo(t)
  6832. }
  6833. showNav(t, e) {
  6834. this.options.width <= 500 && h ? t.hide() : e ? t.show() : t.hide()
  6835. }
  6836. changeBackground(t) {
  6837. var e = {
  6838. r: 256,
  6839. g: 256,
  6840. b: 256
  6841. };
  6842. t.color_value && "" != t.color_value ? (e = M(t.color_value)) || (S("Invalid color value " + t.color_value),
  6843. e = this.options.default_bg_color) : (e = this.options.default_bg_color,
  6844. t.color_value = "rgb(" + e.r + " , " + e.g + ", " + e.b + ")"),
  6845. e.r,
  6846. e.g,
  6847. e.b,
  6848. this._el.background.style.backgroundImage = "none",
  6849. t.color_value ? this._el.background.style.backgroundColor = t.color_value : this._el.background.style.backgroundColor = "transparent",
  6850. e.r < 255 || e.g < 255 || e.b < 255 || t.image ? (this._nav.next.setColor(!0),
  6851. this._nav.previous.setColor(!0)) : (this._nav.next.setColor(!1),
  6852. this._nav.previous.setColor(!1))
  6853. }
  6854. _updateDrawSlides() {
  6855. for (var t = this.options.layout, e = 0; e < this._slides.length; e++)
  6856. this._slides[e].updateDisplay(this.options.width, this.options.height, t),
  6857. this._slides[e].setPosition({
  6858. left: this.slide_spacing * e,
  6859. top: 0
  6860. });
  6861. this.goToId(this.current_id, !0, !1)
  6862. }
  6863. _initLayout() {
  6864. this._el.container.classList.add("tl-storyslider"),
  6865. this._nav.previous = new Ge({
  6866. title: "Previous",
  6867. description: "description"
  6868. },{
  6869. direction: "previous"
  6870. },this._el.container),
  6871. this._nav.next = new Ge({
  6872. title: "Next",
  6873. description: "description"
  6874. },{
  6875. direction: "next"
  6876. },this._el.container),
  6877. this._el.slider_container_mask = v("div", "tl-slider-container-mask", this._el.container),
  6878. this._el.background = v("div", "tl-slider-background tl-animate", this._el.container),
  6879. this._el.slider_container = v("div", "tl-slider-container tlanimate", this._el.slider_container_mask),
  6880. this._el.slider_item_container = v("div", "tl-slider-item-container", this._el.slider_container),
  6881. this._el.slider_container.setAttribute("aria-live", "polite"),
  6882. this.options.width = this._el.container.offsetWidth,
  6883. this.options.height = this._el.container.offsetHeight,
  6884. this._el.slider_container.style.left = "0px",
  6885. f && (this._swipable = new Ue(this._el.slider_container_mask,this._el.slider_container,{
  6886. enable: {
  6887. x: !0,
  6888. y: !1
  6889. },
  6890. snap: !0
  6891. }),
  6892. this._swipable.enable(),
  6893. this._message = new jt(this._el.container,{
  6894. message_class: "tl-message-full",
  6895. message_icon_class: "tl-icon-swipe-left"
  6896. },this.getLanguage()),
  6897. this._message.updateMessage(this._("swipe_to_navigate")),
  6898. this._message.addTo(this._el.container))
  6899. }
  6900. _initEvents() {
  6901. this._nav.next.on("clicked", this._onNavigation, this),
  6902. this._nav.previous.on("clicked", this._onNavigation, this),
  6903. this._message && this._message.on("clicked", this._onMessageClick, this),
  6904. this._swipable && (this._swipable.on("swipe_left", this._onNavigation, this),
  6905. this._swipable.on("swipe_right", this._onNavigation, this),
  6906. this._swipable.on("swipe_nodirection", this._onSwipeNoDirection, this))
  6907. }
  6908. _initData() {
  6909. this.data.title && this._createSlide(this.data.title, !0, -1),
  6910. this._createSlides(this.data.events)
  6911. }
  6912. _onBackgroundChange(t) {
  6913. var e = this._findSlideIndex(this.current_id)
  6914. , i = this._slides[e].getBackground();
  6915. this.changeBackground(t),
  6916. this.fire("colorchange", i)
  6917. }
  6918. _onMessageClick(t) {
  6919. this._message.hide()
  6920. }
  6921. _onSwipeNoDirection(t) {
  6922. this.goToId(this.current_id)
  6923. }
  6924. _onNavigation(t) {
  6925. "next" == t.direction || "left" == t.direction ? this.next() : "previous" != t.direction && "right" != t.direction || this.previous(),
  6926. this.fire("nav_" + t.direction, this.data)
  6927. }
  6928. _onSlideAdded(t) {
  6929. S("slideadded"),
  6930. this.fire("slideAdded", this.data)
  6931. }
  6932. _onSlideRemoved(t) {
  6933. this.fire("slideRemoved", this.data)
  6934. }
  6935. _onSlideChange(t) {
  6936. t || this.fire("change", {
  6937. unique_id: this.current_id
  6938. })
  6939. }
  6940. _onMouseClick(t) {}
  6941. _fireMouseEvent(t) {
  6942. if (this._loaded) {
  6943. var e = t.type;
  6944. e = "mouseenter" === e ? "mouseover" : "mouseleave" === e ? "mouseout" : e,
  6945. this.hasEventListeners(e) && ("contextmenu" === e && ht.preventDefault(t),
  6946. this.fire(e, {
  6947. latlng: "something",
  6948. layerPoint: "something else"
  6949. }))
  6950. }
  6951. }
  6952. _onLoaded() {
  6953. this.fire("loaded", this.data)
  6954. }
  6955. }
  6956. R(Ye, Rt, at);
  6957. class Ze {
  6958. constructor(t, e, i, a) {
  6959. this._el = {
  6960. parent: {},
  6961. container: {},
  6962. button_forwardtoend: {},
  6963. button_backtostart: {},
  6964. button_zoomin: {},
  6965. button_zoomout: {},
  6966. arrow: {},
  6967. line: {},
  6968. coverbar: {},
  6969. grip: {}
  6970. },
  6971. this.collapsed = !1,
  6972. this._el.container = "object" == typeof t ? t : g(t),
  6973. e && (this._el.parent = e),
  6974. this.data = {
  6975. visible_ticks_dates: {}
  6976. },
  6977. this.options = {
  6978. width: 600,
  6979. height: 600,
  6980. duration: 1e3,
  6981. ease: et,
  6982. menubar_default_y: 0
  6983. },
  6984. this.animator = {},
  6985. this.setLanguage(a),
  6986. E(this.options, i),
  6987. this._initLayout(),
  6988. this._initEvents()
  6989. }
  6990. show(t) {
  6991. this.options.duration
  6992. }
  6993. hide(t) {}
  6994. toogleZoomIn(t) {
  6995. t ? this._el.button_zoomin.removeAttribute("disabled") : this._el.button_zoomin.setAttribute("disabled", !0)
  6996. }
  6997. toogleZoomOut(t) {
  6998. t ? this._el.button_zoomout.removeAttribute("disabled") : this._el.button_zoomout.setAttribute("disabled", !0)
  6999. }
  7000. changeVisibleTicks(t) {
  7001. const e = t.minor;
  7002. if (!e.length)
  7003. return void (this.data.visible_ticks_dates = {});
  7004. const i = e[0].date.getFullYear()
  7005. , a = e[e.length - 1].date.getFullYear();
  7006. this.data.visible_ticks_dates = {
  7007. start: i,
  7008. end: a
  7009. },
  7010. this._updateZoomAriaLabels()
  7011. }
  7012. setSticky(t) {
  7013. this.options.menubar_default_y = t
  7014. }
  7015. setColor(t) {
  7016. this._el.container.className = t ? "tl-menubar tl-menubar-inverted" : "tl-menubar"
  7017. }
  7018. updateDisplay(t, e, i, a) {
  7019. this._updateDisplay(t, e, i, a)
  7020. }
  7021. _onButtonZoomIn(t) {
  7022. this.fire("zoom_in", t)
  7023. }
  7024. _onButtonZoomOut(t) {
  7025. this.fire("zoom_out", t)
  7026. }
  7027. _onButtonForwardToEnd(t) {
  7028. this.fire("forward_to_end", t)
  7029. }
  7030. _onButtonBackToStart(t) {
  7031. this.fire("back_to_start", t)
  7032. }
  7033. _initLayout() {
  7034. this._el.button_zoomin = y("tl-menubar-button", this._el.container),
  7035. this._el.button_zoomout = y("tl-menubar-button", this._el.container),
  7036. this._el.button_forwardtoend = y("tl-menubar-button", this._el.container),
  7037. this._el.button_backtostart = y("tl-menubar-button", this._el.container),
  7038. h && this._el.container.setAttribute("ontouchstart", " "),
  7039. this._el.button_backtostart.innerHTML = "<span class='tl-icon-goback'></span>",
  7040. this._el.button_backtostart.setAttribute("aria-label", this._("return_to_title")),
  7041. this._el.button_forwardtoend.innerHTML = "<span class='tl-icon-goend'></span>",
  7042. this._el.button_forwardtoend.setAttribute("aria-label", this._("go_to_end")),
  7043. this._el.button_zoomin.innerHTML = "<span class='tl-icon-zoom-in'></span>",
  7044. this._el.button_zoomin.setAttribute("aria-label", this._("zoom_in")),
  7045. this._el.button_zoomout.innerHTML = "<span class='tl-icon-zoom-out'></span>",
  7046. this._el.button_zoomout.setAttribute("aria-label", this._("zoom_out"))
  7047. }
  7048. _initEvents() {
  7049. ht.addListener(this._el.button_forwardtoend, "click", this._onButtonForwardToEnd, this),
  7050. ht.addListener(this._el.button_backtostart, "click", this._onButtonBackToStart, this),
  7051. ht.addListener(this._el.button_zoomin, "click", this._onButtonZoomIn, this),
  7052. ht.addListener(this._el.button_zoomout, "click", this._onButtonZoomOut, this)
  7053. }
  7054. _updateDisplay(t, e, i) {
  7055. t && (this.options.width = t),
  7056. e && (this.options.height = e)
  7057. }
  7058. _updateZoomAriaLabels() {
  7059. 0 == Object.keys(this.data.visible_ticks_dates).length ? (this._el.button_zoomin.setAttribute("aria-description", ""),
  7060. this._el.button_zoomout.setAttribute("aria-description", "")) : (this._el.button_zoomin.setAttribute("aria-description", this._("aria_label_zoomin", this.data.visible_ticks_dates)),
  7061. this._el.button_zoomout.setAttribute("aria-description", this._("aria_label_zoomout", this.data.visible_ticks_dates)))
  7062. }
  7063. }
  7064. R(Ze, ot, at, Rt);
  7065. let Ve = null;
  7066. if (document) {
  7067. let t = document.getElementsByTagName("script");
  7068. t && t.length > 0 && (Ve = t[t.length - 1].src)
  7069. }
  7070. class Xe {
  7071. constructor(t, e, i) {
  7072. if (i || (i = {}),
  7073. this.ready = !1,
  7074. this._el = {
  7075. container: g(t),
  7076. storyslider: {},
  7077. timenav: {},
  7078. menubar: {}
  7079. },
  7080. i.lang && !i.language && (i.language = i.lang),
  7081. this.language = Ot,
  7082. this._storyslider = {},
  7083. this._timenav = {},
  7084. this._menubar = {},
  7085. this._loaded = {
  7086. storyslider: !1,
  7087. timenav: !1
  7088. },
  7089. this.config = null,
  7090. this.options = {
  7091. script_path: "https://cdn.knightlab.com/libs/timeline3/latest/js/",
  7092. height: this._el.container.offsetHeight,
  7093. width: this._el.container.offsetWidth,
  7094. debug: !1,
  7095. font: "default",
  7096. is_embed: !1,
  7097. is_full_embed: !1,
  7098. hash_bookmark: !1,
  7099. default_bg_color: {
  7100. r: 255,
  7101. g: 255,
  7102. b: 255
  7103. },
  7104. scale_factor: 2,
  7105. layout: "landscape",
  7106. timenav_position: "bottom",
  7107. optimal_tick_width: 60,
  7108. base_class: "tl-timeline",
  7109. timenav_height: null,
  7110. timenav_height_percentage: 25,
  7111. timenav_mobile_height_percentage: 40,
  7112. timenav_height_min: 175,
  7113. marker_height_min: 30,
  7114. marker_width_min: 100,
  7115. marker_padding: 5,
  7116. start_at_slide: 0,
  7117. start_at_end: !1,
  7118. menubar_height: 0,
  7119. skinny_size: 650,
  7120. medium_size: 800,
  7121. use_bc: !1,
  7122. duration: 1e3,
  7123. ease: et,
  7124. dragging: !0,
  7125. trackResize: !0,
  7126. map_type: "stamen:toner-lite",
  7127. slide_padding_lr: 100,
  7128. slide_default_fade: "0%",
  7129. zoom_sequence: [.5, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89],
  7130. language: "en",
  7131. ga_measurement_id: null,
  7132. ga_property_id: null,
  7133. track_events: ["back_to_start", "nav_next", "nav_previous", "zoom_in", "zoom_out"],
  7134. theme: null,
  7135. sheets_proxy: "https://sheets-proxy.knightlab.com/proxy/",
  7136. soundcite: !1
  7137. },
  7138. this.animator_timenav = null,
  7139. this.animator_storyslider = null,
  7140. this.animator_menubar = null,
  7141. this.message = new jt(this._el.container,{
  7142. message_class: "tl-message-full"
  7143. }),
  7144. "string" == typeof i.default_bg_color) {
  7145. var a = M(i.default_bg_color);
  7146. a ? i.default_bg_color = a : (delete i.default_bg_color,
  7147. S("Invalid default background color. Ignoring."))
  7148. }
  7149. var s, n;
  7150. E(this.options, i),
  7151. this.options.script_path || (this.options.script_path = this.determineScriptPath()),
  7152. i.soundcite && this.on("ready", ( () => {
  7153. S("Loading Soundcite resources "),
  7154. me("https://cdn.knightlab.com/libs/soundcite/latest/css/player.css"),
  7155. ue("https://cdn.knightlab.com/libs/soundcite/latest/js/soundcite.min.js")
  7156. }
  7157. )),
  7158. this._loadStyles(),
  7159. document.addEventListener("keydown", (s = this,
  7160. function(t) {
  7161. if (s.config) {
  7162. var e = t.key
  7163. , i = s._getSlideIndex(self.current_id)
  7164. , a = s.config.events.length - 1
  7165. , n = s.config.title ? a + 1 : a;
  7166. "ArrowLeft" == e ? 0 != i && s.goToPrev() : "ArrowRight" == e && i != n && s.goToNext()
  7167. }
  7168. }
  7169. )),
  7170. window.addEventListener("resize", function(t) {
  7171. this.updateDisplay()
  7172. }
  7173. .bind(this)),
  7174. this.options.debug && (n = console.log,
  7175. D.push(n)),
  7176. this._el.container.classList.add("tl-timeline"),
  7177. this._el.container.setAttribute("tabindex", "0"),
  7178. this._el.container.setAttribute("role", "region"),
  7179. this._el.container.setAttribute("aria-label", this._("aria_label_timeline")),
  7180. this.options.is_embed && this._el.container.classList.add("tl-timeline-embed"),
  7181. this.options.is_full_embed && this._el.container.classList.add("tl-timeline-full-embed"),
  7182. this._loadLanguage(e)
  7183. }
  7184. _loadStyles() {
  7185. let t = null
  7186. , e = null;
  7187. if (this.options.font && (0 == this.options.font.indexOf("http") || this.options.font.match(/\.css$/)))
  7188. t = this.options.font;
  7189. else if (this.options.font) {
  7190. let e = "../css/fonts/font." + this.options.font.toLowerCase() + ".css";
  7191. t = new URL(e,this.options.script_path).toString()
  7192. }
  7193. if (t && me(t),
  7194. this.options.theme && (0 == this.options.theme.indexOf("http") || this.options.theme.match(/\.css$/)))
  7195. e = this.options.theme;
  7196. else if (this.options.theme) {
  7197. let t = "../css/themes/timeline.theme." + this.options.theme.toLowerCase() + ".css";
  7198. e = new URL(t,this.options.script_path).toString()
  7199. }
  7200. e && me(e)
  7201. }
  7202. _loadLanguage(t) {
  7203. try {
  7204. var e = this.options.language
  7205. , i = this.options.script_path;
  7206. (async function(t, e) {
  7207. var i = At(t, e);
  7208. try {
  7209. if (!It[t]) {
  7210. let e = await mt(i);
  7211. It[t] = e
  7212. }
  7213. return new Nt(t,e)
  7214. } catch (t) {
  7215. return console.log(`Error loading language [${i}] ${t.statusText}`),
  7216. null
  7217. }
  7218. }
  7219. )(e, i).then((i => {
  7220. i ? (this.language = i,
  7221. this.message.setLanguage(this.language),
  7222. this.showMessage(this._("loading_timeline"))) : this.showMessage(`Error loading ${e}`),
  7223. this._initData(t)
  7224. }
  7225. ))
  7226. } catch (t) {
  7227. this.showMessage(this._translateError(t))
  7228. }
  7229. }
  7230. _initData(t) {
  7231. "string" == typeof t ? async function(t, e) {
  7232. let i = null
  7233. , a = {};
  7234. if (a = e,
  7235. i = e.callback,
  7236. "function" == typeof a.callback && (i = a.callback),
  7237. !i)
  7238. throw new x("Second argument to makeConfig must be either a function or an object which includes a 'callback' property with a 'function' type value");
  7239. var s, n;
  7240. if (Kt(t)) {
  7241. try {
  7242. n = await te(t, a)
  7243. } catch (t) {
  7244. return s = new Zt,
  7245. "NetworkError" == t.name ? s.logError(new x("network_err")) : "TLError" == t.name ? s.logError(t) : s.logError(new x("unknown_read_err",t.name)),
  7246. void i(s)
  7247. }
  7248. if (s = new Zt(n),
  7249. n.errors)
  7250. for (var o = 0; o < n.errors.length; o++)
  7251. s.logError(n.errors[o]);
  7252. i(s)
  7253. } else
  7254. ut({
  7255. url: t,
  7256. dataType: "json",
  7257. success: function(t) {
  7258. try {
  7259. s = new Zt(t)
  7260. } catch (t) {
  7261. (s = new Zt).logError(t)
  7262. }
  7263. i(s)
  7264. },
  7265. error: function(t, e, a) {
  7266. s = new Zt,
  7267. a = "parsererror" == e ? new x("invalid_url_err") : new x("unknown_read_err",e),
  7268. s.logError(a),
  7269. i(s)
  7270. }
  7271. })
  7272. }(t, {
  7273. callback: function(t) {
  7274. this.setConfig(t)
  7275. }
  7276. .bind(this),
  7277. sheets_proxy: this.options.sheets_proxy
  7278. }) : Zt == t.constructor ? this.setConfig(t) : this.setConfig(new Zt(t))
  7279. }
  7280. _translateError(t) {
  7281. return t.hasOwnProperty("stack") && S(t.stack),
  7282. t.message_key ? this._(t.message_key) + (t.detail ? " [" + t.detail + "]" : "") : t
  7283. }
  7284. showMessage(t) {
  7285. this.message ? this.message.updateMessage(t) : (S("No message display available."),
  7286. S(t))
  7287. }
  7288. determineScriptPath() {
  7289. let t = null;
  7290. if (Ve)
  7291. t = Ve;
  7292. else {
  7293. let e = document.getElementById("timeline-script-tag");
  7294. e && (t = e.src)
  7295. }
  7296. if (!t) {
  7297. let e = document.getElementsByTagName("script");
  7298. for (let i = e.length - 1; i >= 0; i--)
  7299. if (e[i].src) {
  7300. t = e[i].src;
  7301. break
  7302. }
  7303. }
  7304. return t ? t.substr(0, t.lastIndexOf("/") + 1) : ""
  7305. }
  7306. setConfig(t) {
  7307. if (this.config = t,
  7308. this.config.isValid() && (this.config.validate(),
  7309. this._validateOptions()),
  7310. this.config.isValid())
  7311. try {
  7312. "loading" === document.readyState ? document.addEventListener("DOMContentLoaded", this._onDataLoaded.bind(this)) : this._onDataLoaded()
  7313. } catch (t) {
  7314. this.showMessage("<strong>" + this._("error") + ":</strong> " + this._translateError(t))
  7315. }
  7316. else {
  7317. for (var e = [], i = 0, a = this.config.getErrors(); i < a.length; i++)
  7318. e.push(this._translateError(a[i]));
  7319. this.showMessage("<strong>" + this._("error") + ":</strong> " + e.join("<br>"))
  7320. }
  7321. }
  7322. _onDataLoaded() {
  7323. this.fire("dataloaded"),
  7324. this._initLayout(),
  7325. this._initEvents(),
  7326. this._initAnalytics(),
  7327. this.message && this.message.hide(),
  7328. new IntersectionObserver(( (t, e) => {
  7329. t.reduce(( (t, e) => t || e.isIntersecting), !1) && this.updateDisplay()
  7330. }
  7331. ).bind(this)).observe(this._el.container),
  7332. this.ready = !0,
  7333. this.fire("ready")
  7334. }
  7335. _initLayout() {
  7336. this.message.removeFrom(this._el.container),
  7337. this._el.container.innerHTML = "",
  7338. "top" == this.options.timenav_position ? (this._el.timenav = v("div", "tl-timenav", this._el.container),
  7339. this._el.menubar = v("div", "tl-menubar", this._el.container),
  7340. this._el.storyslider = v("div", "tl-storyslider", this._el.container)) : (this._el.storyslider = v("div", "tl-storyslider", this._el.container),
  7341. this._el.timenav = v("div", "tl-timenav", this._el.container),
  7342. this._el.menubar = v("div", "tl-menubar", this._el.container)),
  7343. this._el.attribution = v("div", "tl-attribution", this._el.container),
  7344. this._el.attribution.innerHTML = "<a href='https://timeline.knightlab.com' target='_blank' rel='noopener'><span class='tl-knightlab-logo'></span>TimelineJS</a>",
  7345. this.options.width = this._el.container.offsetWidth,
  7346. this.options.height = this._el.container.offsetHeight,
  7347. this.options.timenav_height = this._calculateTimeNavHeight(this.options.timenav_height),
  7348. this._timenav = new Be(this._el.timenav,this.config,this.options,this.language),
  7349. this._timenav.on("loaded", this._onTimeNavLoaded, this),
  7350. this._timenav.options.height = this.options.timenav_height,
  7351. this._timenav.init(),
  7352. this.options.initial_zoom && this.setZoom(this.options.initial_zoom),
  7353. this._storyslider = new Ye(this._el.storyslider,this.config,this.options,this.language),
  7354. this._el.storyslider.setAttribute("role", "group"),
  7355. this._el.storyslider.setAttribute("aria-label", this._("aria_label_timeline_content")),
  7356. this._storyslider.on("loaded", this._onStorySliderLoaded, this),
  7357. this._storyslider.init(),
  7358. this._menubar = new Ze(this._el.menubar,this._el.container,this.options,this.getLanguage()),
  7359. "portrait" == this.options.layout ? this.options.storyslider_height = this.options.height - this.options.timenav_height - 1 : this.options.storyslider_height = this.options.height - 1,
  7360. this._updateDisplay()
  7361. }
  7362. _initEvents() {
  7363. this._timenav.on("change", this._onTimeNavChange, this),
  7364. this._timenav.on("zoomtoggle", this._onZoomToggle, this),
  7365. this._timenav.on("visible_ticks_change", this._onVisibleTicksChange, this),
  7366. this._storyslider.on("change", this._onSlideChange, this),
  7367. this._storyslider.on("colorchange", this._onColorChange, this),
  7368. this._storyslider.on("nav_next", this._onStorySliderNext, this),
  7369. this._storyslider.on("nav_previous", this._onStorySliderPrevious, this),
  7370. this._menubar.on("zoom_in", this._onZoomIn, this),
  7371. this._menubar.on("zoom_out", this._onZoomOut, this),
  7372. this._menubar.on("forward_to_end", this._onForwardToEnd, this),
  7373. this._menubar.on("back_to_start", this._onBackToStart, this)
  7374. }
  7375. _onColorChange(t) {
  7376. this.fire("color_change", {
  7377. unique_id: this.current_id
  7378. }, this)
  7379. }
  7380. _onSlideChange(t) {
  7381. this.current_id != t.unique_id && (this.current_id = t.unique_id,
  7382. this._timenav.goToId(this.current_id),
  7383. this._onChange(t))
  7384. }
  7385. _onTimeNavChange(t) {
  7386. this.current_id != t.unique_id && (this.current_id = t.unique_id,
  7387. this._storyslider.goToId(this.current_id),
  7388. this._onChange(t))
  7389. }
  7390. _onZoomToggle(t) {
  7391. "in" == t.zoom ? this._menubar.toogleZoomIn(t.show) : "out" == t.zoom && this._menubar.toogleZoomOut(t.show)
  7392. }
  7393. _onChange(t) {
  7394. this.fire("change", {
  7395. unique_id: this.current_id
  7396. }, this),
  7397. this.options.hash_bookmark && this.current_id && this._updateHashBookmark(this.current_id)
  7398. }
  7399. _onVisibleTicksChange(t) {
  7400. this._menubar.changeVisibleTicks(t.visible_ticks)
  7401. }
  7402. _onForwardToEnd(t) {
  7403. this.goToEnd(),
  7404. this.fire("forward_to_end", {
  7405. unique_id: this.current_id
  7406. }, this)
  7407. }
  7408. _onBackToStart(t) {
  7409. this.goToStart(),
  7410. this.fire("back_to_start", {
  7411. unique_id: this.current_id
  7412. }, this)
  7413. }
  7414. _onZoomIn(t) {
  7415. this._timenav.zoomIn(),
  7416. this.fire("zoom_in", {
  7417. zoom_level: this._timenav.options.scale_factor
  7418. }, this)
  7419. }
  7420. _onZoomOut(t) {
  7421. this._timenav.zoomOut(),
  7422. this.fire("zoom_out", {
  7423. zoom_level: this._timenav.options.scale_factor
  7424. }, this)
  7425. }
  7426. _onTimeNavLoaded() {
  7427. this._loaded.timenav = !0,
  7428. this._onLoaded()
  7429. }
  7430. _onStorySliderLoaded() {
  7431. this._loaded.storyslider = !0,
  7432. this._onLoaded()
  7433. }
  7434. _onStorySliderNext(t) {
  7435. this.fire("nav_next", t)
  7436. }
  7437. _onStorySliderPrevious(t) {
  7438. this.fire("nav_previous", t)
  7439. }
  7440. _updateDisplay(t, e, i) {
  7441. var a, s, n = this.options.duration, o = this.options.base_class;
  7442. i && (n = i),
  7443. this.options.width = this._el.container.offsetWidth,
  7444. this.options.height = this._el.container.offsetHeight,
  7445. this.options.width <= this.options.skinny_size ? (o += " tl-skinny",
  7446. this.options.layout = "portrait") : this.options.width <= this.options.medium_size ? (o += " tl-medium",
  7447. this.options.layout = "landscape") : this.options.layout = "landscape",
  7448. f && (this.options.layout = (a = "portrait",
  7449. window.innerWidth > window.innerHeight && (a = "landscape"),
  7450. Math.abs(window.orientation),
  7451. a)),
  7452. h ? (o += " tl-mobile",
  7453. this.options.timenav_height = this._calculateTimeNavHeight(t, this.options.timenav_mobile_height_percentage)) : this.options.timenav_height = this._calculateTimeNavHeight(t),
  7454. "portrait" == this.options.layout ? o += " tl-layout-portrait" : o += " tl-layout-landscape",
  7455. this.options.storyslider_height = this.options.height - this.options.timenav_height,
  7456. s = "top" == this.options.timenav_position ? Math.ceil(this.options.timenav_height) / 2 - this._el.menubar.offsetHeight / 2 - 19.5 : Math.round(this.options.storyslider_height + 1 + Math.ceil(this.options.timenav_height) / 2 - this._el.menubar.offsetHeight / 2 - 17.5),
  7457. e ? (this._el.timenav.style.height = Math.ceil(this.options.timenav_height) + "px",
  7458. this.animator_storyslider && this.animator_storyslider.stop(),
  7459. this.animator_storyslider = st(this._el.storyslider, {
  7460. height: this.options.storyslider_height + "px",
  7461. duration: n / 2,
  7462. easing: tt
  7463. }),
  7464. this.animator_menubar && this.animator_menubar.stop(),
  7465. this.animator_menubar = st(this._el.menubar, {
  7466. top: s + "px",
  7467. duration: n / 2,
  7468. easing: tt
  7469. })) : (this._el.timenav.style.height = Math.ceil(this.options.timenav_height) + "px",
  7470. this._el.storyslider.style.height = this.options.storyslider_height + "px",
  7471. this._el.menubar.style.top = s + "px"),
  7472. this.message && this.message.updateDisplay(this.options.width, this.options.height),
  7473. this._timenav.updateDisplay(this.options.width, this.options.timenav_height, e),
  7474. this._storyslider.updateDisplay(this.options.width, this.options.storyslider_height, e, this.options.layout),
  7475. "rtl" == this.language.direction && (o += " tl-rtl"),
  7476. this._el.container.className = o
  7477. }
  7478. _calculateTimeNavHeight(t, e) {
  7479. var i = 0;
  7480. return (this.options.timenav_height_percentage || e) && (i = e ? Math.round(this.options.height / 100 * e) : Math.round(this.options.height / 100 * this.options.timenav_height_percentage)),
  7481. this._timenav.ready && this.options.timenav_height_min < this._timenav.getMinimumHeight() && (this.options.timenav_height_min = this._timenav.getMinimumHeight()),
  7482. i < this.options.timenav_height_min && (i = this.options.timenav_height_min),
  7483. i - 2 * this.options.marker_padding
  7484. }
  7485. _validateOptions() {
  7486. for (var t = ["timenav_height", "timenav_height_min", "marker_height_min", "marker_width_min", "marker_padding", "start_at_slide", "slide_padding_lr"], e = 0; e < t.length; e++) {
  7487. var i = t[e]
  7488. , a = this.options[i];
  7489. let s = !0;
  7490. "number" == typeof a ? s = a == parseInt(a) : "string" == typeof a && (s = a.match(/^\s*(\-?\d+)?\s*$/)),
  7491. s || this.config.logError({
  7492. message_key: "invalid_integer_option",
  7493. detail: i
  7494. })
  7495. }
  7496. }
  7497. _getSlideIndex(t) {
  7498. if (this.config) {
  7499. if (this.config.title && this.config.title.unique_id == t)
  7500. return 0;
  7501. for (var e = 0; e < this.config.events.length; e++)
  7502. if (t == this.config.events[e].unique_id)
  7503. return this.config.title ? e + 1 : e
  7504. }
  7505. return -1
  7506. }
  7507. _getEventIndex(t) {
  7508. for (var e = 0; e < this.config.events.length; e++)
  7509. if (t == this.config.events[e].unique_id)
  7510. return e;
  7511. return -1
  7512. }
  7513. _onLoaded() {
  7514. if (this._loaded.storyslider && this._loaded.timenav && (this.fire("loaded", this.config),
  7515. null != (t = this.options.start_at_end) && (1 == t || "true" == String(t).toLowerCase() || 1 == Number(t)) || this.options.start_at_slide > this.config.events.length ? this.goToEnd() : this.goTo(this.options.start_at_slide),
  7516. this.options.hash_bookmark)) {
  7517. "" != window.location.hash ? this.goToId(window.location.hash.replace("#event-", "")) : this._updateHashBookmark(this.current_id);
  7518. let t = this;
  7519. window.addEventListener("hashchange", (function() {
  7520. 0 == window.location.hash.indexOf("#event-") && t.goToId(window.location.hash.replace("#event-", ""))
  7521. }
  7522. ), !1)
  7523. }
  7524. var t
  7525. }
  7526. _updateHashBookmark(t) {
  7527. if (t) {
  7528. var e = "#event-" + t.toString();
  7529. window.history.replaceState(null, "Browsing TimelineJS", e),
  7530. this.fire("hash_updated", {
  7531. unique_id: this.current_id,
  7532. hashbookmark: "#event-" + t.toString()
  7533. }, this)
  7534. }
  7535. }
  7536. zoomIn() {
  7537. this._timenav.zoomIn()
  7538. }
  7539. zoomOut() {
  7540. this._timenav.zoomOut()
  7541. }
  7542. setZoom(t) {
  7543. this._timenav.setZoom(t)
  7544. }
  7545. goToId(t) {
  7546. this.current_id != t && (this.current_id = t,
  7547. this._timenav.goToId(this.current_id),
  7548. this._storyslider.goToId(this.current_id, !1, !0),
  7549. this.fire("change", {
  7550. unique_id: this.current_id
  7551. }, this))
  7552. }
  7553. goTo(t) {
  7554. if (!(t < 0))
  7555. try {
  7556. this.config.title ? 0 === t ? this.goToId(this.config.title.unique_id) : this.goToId(this.config.events[t - 1].unique_id) : this.goToId(this.config.events[t].unique_id)
  7557. } catch {
  7558. return
  7559. }
  7560. }
  7561. goToStart() {
  7562. this.goTo(0)
  7563. }
  7564. goToEnd() {
  7565. var t = this.config.events.length - 1;
  7566. this.goTo(this.config.title ? t + 1 : t)
  7567. }
  7568. goToPrev() {
  7569. this.goTo(this._getSlideIndex(this.current_id) - 1),
  7570. this.focusContainer()
  7571. }
  7572. goToNext() {
  7573. this.goTo(this._getSlideIndex(this.current_id) + 1),
  7574. this.focusContainer()
  7575. }
  7576. add(t) {
  7577. var e = this.config.addEvent(t)
  7578. , i = this._getEventIndex(e)
  7579. , a = this.config.events[i];
  7580. this._storyslider.createSlide(a, this.config.title ? i + 1 : i),
  7581. this._storyslider._updateDrawSlides(),
  7582. this._timenav.createMarker(a, i),
  7583. this._timenav._updateDrawTimeline(!1),
  7584. this.fire("added", {
  7585. unique_id: e
  7586. })
  7587. }
  7588. remove(t) {
  7589. if (t >= 0 && t < this.config.events.length) {
  7590. this.config.events[t].unique_id == this.current_id && (t < this.config.events.length - 1 ? this.goTo(t + 1) : this.goTo(t - 1));
  7591. var e = this.config.events.splice(t, 1);
  7592. delete this.config.event_dict[e[0].unique_id],
  7593. this._storyslider.destroySlide(this.config.title ? t + 1 : t),
  7594. this._storyslider._updateDrawSlides(),
  7595. this._timenav.destroyMarker(t),
  7596. this._timenav._updateDrawTimeline(!1),
  7597. this.fire("removed", {
  7598. unique_id: e[0].unique_id
  7599. })
  7600. }
  7601. }
  7602. removeId(t) {
  7603. this.remove(this._getEventIndex(t))
  7604. }
  7605. getData(t) {
  7606. if (this.config.title) {
  7607. if (0 == t)
  7608. return this.config.title;
  7609. if (t > 0 && t <= this.config.events.length)
  7610. return this.config.events[t - 1]
  7611. } else if (t >= 0 && t < this.config.events.length)
  7612. return this.config.events[t];
  7613. return null
  7614. }
  7615. getDataById(t) {
  7616. return this.getData(this._getSlideIndex(t))
  7617. }
  7618. getSlide(t) {
  7619. return t >= 0 && t < this._storyslider._slides.length ? this._storyslider._slides[t] : null
  7620. }
  7621. getSlideById(t) {
  7622. return this.getSlide(this._getSlideIndex(t))
  7623. }
  7624. getCurrentSlide() {
  7625. return this.getSlideById(this.current_id)
  7626. }
  7627. updateDisplay() {
  7628. this.ready ? this._updateDisplay() : S("updateDisplay called but timeline is not in ready state")
  7629. }
  7630. focusContainer() {
  7631. this._el.container.focus()
  7632. }
  7633. _initGoogleAnalytics(t) {
  7634. return -1;
  7635. }
  7636. _initAnalytics() {
  7637. let t = this.options.ga_measurement_id || this.options.ga_property_id || null;
  7638. if (t) {
  7639. this._initGoogleAnalytics(t);
  7640. var e = this.options.track_events;
  7641. for (let t = 0; t < e.length; t++) {
  7642. var i = e[t];
  7643. this.addEventListener(i, (function(t) {
  7644. gtag("event", t.type)
  7645. }
  7646. ))
  7647. }
  7648. }
  7649. }
  7650. }
  7651. async function Je(t, e) {
  7652. return -1;
  7653. }
  7654. R(Xe, Rt, at)
  7655. }
  7656. )(),
  7657. TL = a
  7658. }
  7659. )();