├── graphCache ├── Category1961births.txt ├── CategoryLivingpeople.txt ├── CategoryMalefeminists.txt ├── CategoryAmericanfeminists.txt ├── CategoryGrammyAwardwinners.txt ├── CategoryIllinoisDemocrats.txt ├── CategoryWritersfromChicago.txt ├── CategoryAfricanAmericanfeminists.txt ├── CategoryAmericanNobellaureates.txt ├── CategoryAmericanfeministwriters.txt ├── CategoryAmericanlegalscholars.txt ├── CategoryHarvardLawSchoolalumni.txt ├── CategoryIllinoisStateSenators.txt ├── CategoryOccidentalCollegealumni.txt ├── CategoryPoliticiansfromChicago.txt ├── CategoryPunahouSchoolalumni.txt ├── CategoryWashingtonDCDemocrats.txt ├── Category20thcenturyAmericanwriters.txt ├── Category21stcenturyAmericanwriters.txt ├── CategoryAmericancivilrightslawyers.txt ├── CategoryAmericanpoliticalwriters.txt ├── CategoryColumbiaUniversityalumni.txt ├── CategoryNobelPeacePrizelaureates.txt ├── Category21stcenturyAmericanpoliticians.txt ├── CategoryAfricanAmericannonfictionwriters.txt ├── CategoryProgressivismintheUnitedStates.txt ├── CategoryUnitedStatesSenatorsfromIllinois.txt ├── CategoryDemocraticPartyUnitedStatesSenators.txt ├── CategoryUnitedStatespresidentialcandidates2008.txt └── CategoryUnitedStatespresidentialcandidates2012.txt ├── templates ├── js │ ├── scripts.js │ ├── cat.js │ ├── new │ ├── gameController.js │ ├── bootstrap.min.js │ └── jquery-2.2.1.min.js ├── css │ ├── greybg.png │ ├── source.gif │ ├── entity.css │ ├── game.css │ ├── demo.css │ └── header-search.css ├── header.html ├── game.html ├── entity.html └── index.html ├── user-config.py ├── Report.pdf ├── algorithm_test.pyc ├── Automatic Trivia Fact Extraction from Wikipedia.pdf ├── Automatic Trivia Fact Extraction from Wikipedia.pptx ├── wiki_parser_test.py ├── input.txt ├── outputCache ├── Narendra Modi.txt ├── Kylie Jenner.txt ├── Napoleon.txt ├── Heath Ledger.txt ├── Johnny Depp.txt ├── Selena Gomez.txt ├── John Cena.txt ├── Will Smith.txt ├── Nikola Tesla.txt ├── Hugh Jackman.txt ├── Dwayne Johnson.txt ├── Barack Obama.txt ├── Steve Jobs.txt ├── Donald Trump.txt ├── Cristiano Ronaldo.txt ├── Lionel Messi.txt ├── Michael Jordan.txt ├── Bill Clinton.txt ├── Bill Gates.txt └── Albert Einstein.txt ├── graph_plot_test.py ├── algorithm_test.py ├── wiki_trivia_metric_calculator_test.py ├── batchRun.py ├── Util.py ├── README.md ├── wiki_trivia_metric_calculator.py ├── wiki_parser.py ├── app.py ├── wiki2plain.py ├── graphplot.py ├── algorithm_wrapper.py └── topEntityList.txt /graphCache/Category1961births.txt: -------------------------------------------------------------------------------- 1 | 3.59896368235 2 | 0.256865465366 3 | -------------------------------------------------------------------------------- /graphCache/CategoryLivingpeople.txt: -------------------------------------------------------------------------------- 1 | 3.59998122273 2 | 0.263733125918 3 | -------------------------------------------------------------------------------- /graphCache/CategoryMalefeminists.txt: -------------------------------------------------------------------------------- 1 | 3.29168891832 2 | 0.296558668133 3 | -------------------------------------------------------------------------------- /graphCache/CategoryAmericanfeminists.txt: -------------------------------------------------------------------------------- 1 | 3.39655266734 2 | 0.320812397956 3 | -------------------------------------------------------------------------------- /graphCache/CategoryGrammyAwardwinners.txt: -------------------------------------------------------------------------------- 1 | 3.42788864576 2 | 0.375148367063 3 | -------------------------------------------------------------------------------- /graphCache/CategoryIllinoisDemocrats.txt: -------------------------------------------------------------------------------- 1 | 2.84799865402 2 | 0.346561937927 3 | -------------------------------------------------------------------------------- /graphCache/CategoryWritersfromChicago.txt: -------------------------------------------------------------------------------- 1 | 3.40208758013 2 | 0.282722990957 3 | -------------------------------------------------------------------------------- /graphCache/CategoryAfricanAmericanfeminists.txt: -------------------------------------------------------------------------------- 1 | 3.15553536749 2 | 0.3539173717 3 | -------------------------------------------------------------------------------- /graphCache/CategoryAmericanNobellaureates.txt: -------------------------------------------------------------------------------- 1 | 3.38539099884 2 | 0.371163385481 3 | -------------------------------------------------------------------------------- /graphCache/CategoryAmericanfeministwriters.txt: -------------------------------------------------------------------------------- 1 | 3.299943801 2 | 0.35006575792 3 | -------------------------------------------------------------------------------- /graphCache/CategoryAmericanlegalscholars.txt: -------------------------------------------------------------------------------- 1 | 3.02761723031 2 | 0.324750554923 3 | -------------------------------------------------------------------------------- /graphCache/CategoryHarvardLawSchoolalumni.txt: -------------------------------------------------------------------------------- 1 | 2.99806289415 2 | 0.331739093367 3 | -------------------------------------------------------------------------------- /graphCache/CategoryIllinoisStateSenators.txt: -------------------------------------------------------------------------------- 1 | 2.83001610309 2 | 0.348345719256 3 | -------------------------------------------------------------------------------- /graphCache/CategoryOccidentalCollegealumni.txt: -------------------------------------------------------------------------------- 1 | 3.18192690806 2 | 0.300249512786 3 | -------------------------------------------------------------------------------- /graphCache/CategoryPoliticiansfromChicago.txt: -------------------------------------------------------------------------------- 1 | 2.83413795426 2 | 0.349319595416 3 | -------------------------------------------------------------------------------- /graphCache/CategoryPunahouSchoolalumni.txt: -------------------------------------------------------------------------------- 1 | 3.16319862597 2 | 0.423239645371 3 | -------------------------------------------------------------------------------- /graphCache/CategoryWashingtonDCDemocrats.txt: -------------------------------------------------------------------------------- 1 | 2.65796328221 2 | 0.315841688909 3 | -------------------------------------------------------------------------------- /graphCache/Category20thcenturyAmericanwriters.txt: -------------------------------------------------------------------------------- 1 | 3.26171817564 2 | 0.288146444452 3 | -------------------------------------------------------------------------------- /graphCache/Category21stcenturyAmericanwriters.txt: -------------------------------------------------------------------------------- 1 | 3.13241906666 2 | 0.309234097347 3 | -------------------------------------------------------------------------------- /graphCache/CategoryAmericancivilrightslawyers.txt: -------------------------------------------------------------------------------- 1 | 3.08642965808 2 | 0.318738407932 3 | -------------------------------------------------------------------------------- /graphCache/CategoryAmericanpoliticalwriters.txt: -------------------------------------------------------------------------------- 1 | 2.86260721879 2 | 0.319162353965 3 | -------------------------------------------------------------------------------- /graphCache/CategoryColumbiaUniversityalumni.txt: -------------------------------------------------------------------------------- 1 | 3.13456055532 2 | 0.296431555391 3 | -------------------------------------------------------------------------------- /graphCache/CategoryNobelPeacePrizelaureates.txt: -------------------------------------------------------------------------------- 1 | 3.06428102246 2 | 0.384652304756 3 | -------------------------------------------------------------------------------- /templates/js/scripts.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | $('#header').load('header.html'); 3 | }); -------------------------------------------------------------------------------- /graphCache/Category21stcenturyAmericanpoliticians.txt: -------------------------------------------------------------------------------- 1 | 2.83968454834 2 | 0.354187152534 3 | -------------------------------------------------------------------------------- /graphCache/CategoryAfricanAmericannonfictionwriters.txt: -------------------------------------------------------------------------------- 1 | 3.08243947584 2 | 0.317478634573 3 | -------------------------------------------------------------------------------- /graphCache/CategoryProgressivismintheUnitedStates.txt: -------------------------------------------------------------------------------- 1 | 2.92746584716 2 | 0.306349072023 3 | -------------------------------------------------------------------------------- /graphCache/CategoryUnitedStatesSenatorsfromIllinois.txt: -------------------------------------------------------------------------------- 1 | 2.68644352685 2 | 0.368238730453 3 | -------------------------------------------------------------------------------- /graphCache/CategoryDemocraticPartyUnitedStatesSenators.txt: -------------------------------------------------------------------------------- 1 | 2.85705161428 2 | 0.348321603886 3 | -------------------------------------------------------------------------------- /graphCache/CategoryUnitedStatespresidentialcandidates2008.txt: -------------------------------------------------------------------------------- 1 | 2.49052623705 2 | 0.370905574485 3 | -------------------------------------------------------------------------------- /graphCache/CategoryUnitedStatespresidentialcandidates2012.txt: -------------------------------------------------------------------------------- 1 | 2.52395241891 2 | 0.354958404291 3 | -------------------------------------------------------------------------------- /user-config.py: -------------------------------------------------------------------------------- 1 | family = 'wikipedia' 2 | mylang = 'en' 3 | usernames['wikipedia']['en'] = u'ExampleBot' 4 | -------------------------------------------------------------------------------- /Report.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bondeanikets/Automatic-Trivia-Fact-Extraction-from-Wikipedia/master/Report.pdf -------------------------------------------------------------------------------- /algorithm_test.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bondeanikets/Automatic-Trivia-Fact-Extraction-from-Wikipedia/master/algorithm_test.pyc -------------------------------------------------------------------------------- /templates/css/greybg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bondeanikets/Automatic-Trivia-Fact-Extraction-from-Wikipedia/master/templates/css/greybg.png -------------------------------------------------------------------------------- /templates/css/source.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bondeanikets/Automatic-Trivia-Fact-Extraction-from-Wikipedia/master/templates/css/source.gif -------------------------------------------------------------------------------- /Automatic Trivia Fact Extraction from Wikipedia.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bondeanikets/Automatic-Trivia-Fact-Extraction-from-Wikipedia/master/Automatic Trivia Fact Extraction from Wikipedia.pdf -------------------------------------------------------------------------------- /Automatic Trivia Fact Extraction from Wikipedia.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bondeanikets/Automatic-Trivia-Fact-Extraction-from-Wikipedia/master/Automatic Trivia Fact Extraction from Wikipedia.pptx -------------------------------------------------------------------------------- /wiki_parser_test.py: -------------------------------------------------------------------------------- 1 | import wiki_parser 2 | 3 | if __name__ == "__main__": 4 | wiki_parser = wiki_parser.WikiParser() 5 | wiki_parser.getEntityTokens("Barack Obama") 6 | wiki_parser.getEntityforCategory("Category:Writers from Chicago") 7 | print(wiki_parser.getCategoryForEntity("Lionel Messi")) 8 | 9 | -------------------------------------------------------------------------------- /input.txt: -------------------------------------------------------------------------------- 1 | Barack Obama 2 | Lionel Messi 3 | Donald Trump 4 | Bill Gates 5 | Hugh Jackman 6 | Narendra Modi 7 | Steve Jobs 8 | Dwayne Johnson 9 | Selena Gomez 10 | Heath Ledger 11 | John Cena 12 | Michael Jordan 13 | Johnny Depp 14 | Kylie Jenner 15 | Will Smith 16 | Napoleon 17 | Nikola Tesla 18 | Bill Clinton 19 | Albert Einstein 20 | Cristiano Ronaldo -------------------------------------------------------------------------------- /outputCache/Narendra Modi.txt: -------------------------------------------------------------------------------- 1 | Lok Sabha members from Uttar Pradesh:1.0714983735235366 2 | 16th Lok Sabha members:1.0535753617707835 3 | Indian Hindus:0.86598070758395718 4 | 1950 births:0.85492686291472741 5 | Living people:0.82131765530393031 6 | Gujarati people:0.79342593478171353 7 | 21st-century Indian politicians:0.76548174931028889 8 | Members of the Gujarat Legislative Assembly:0.45883239958151406 9 | -------------------------------------------------------------------------------- /templates/js/cat.js: -------------------------------------------------------------------------------- 1 | var index = 0; 2 | var data = $('#my-data').data("name"); 3 | $(function() { 4 | for(var i = 0, size = 10; i < size ; i++){ 5 | $('#catList').append('
  • '+data[i]+'
  • '); 6 | } 7 | index = 10; 8 | }); 9 | 10 | $("#loadMore").click(function(){ 11 | for(var i=index; i'+data[i]+''); 13 | } 14 | index = index+5; 15 | }); -------------------------------------------------------------------------------- /templates/js/new: -------------------------------------------------------------------------------- 1 | $(function() { 2 | $('#btnSignUp').click(function() { 3 | 4 | $.ajax({ 5 | url: '/signUp', 6 | data: $('form').serialize(), 7 | type: 'POST', 8 | success: function(response) { 9 | console.log(response); 10 | }, 11 | error: function(error) { 12 | console.log(error); 13 | } 14 | }); 15 | }); 16 | }); -------------------------------------------------------------------------------- /graph_plot_test.py: -------------------------------------------------------------------------------- 1 | import graphplot 2 | import wiki_parser 3 | import wiki_trivia_metric_calculator 4 | wiki_parser_instance = wiki_parser.WikiParser() 5 | wiki_trivia_metric_calculator_instance = wiki_trivia_metric_calculator.WikiTriviaMetricCalculator() 6 | graphplot.drawSimPlotFixed(wiki_parser_instance, wiki_trivia_metric_calculator_instance) 7 | graphplot.drawScatterPlot("Barack Obama", wiki_parser_instance, wiki_trivia_metric_calculator_instance) 8 | #graphplot.graphCache("Barack Obama", wiki_parser_instance, wiki_trivia_metric_calculator_instance) 9 | #graphplot.drawScatterPlot("Barack Obama") 10 | -------------------------------------------------------------------------------- /algorithm_test.py: -------------------------------------------------------------------------------- 1 | import algorithm_wrapper 2 | import wikipedia as wiki 3 | import pdb 4 | import wiki_parser 5 | import wiki_trivia_metric_calculator 6 | 7 | 8 | if __name__ == "__main__": 9 | wiki_parser_instance = wiki_parser.WikiParser() 10 | wiki_trivia_metric_calculator_instance = wiki_trivia_metric_calculator.WikiTriviaMetricCalculator() 11 | print("Init done") 12 | target = open("input.txt", "r") 13 | for line in target: 14 | line = line.replace('\n', '') 15 | print(algorithm_wrapper.triviaAlgorithm(line, wiki_parser_instance, wiki_trivia_metric_calculator_instance)) 16 | target.close() -------------------------------------------------------------------------------- /templates/header.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /outputCache/Kylie Jenner.txt: -------------------------------------------------------------------------------- 1 | 1997 births:1.0839135844093082 2 | American socialites:1.016474488526617 3 | American people of Welsh descent:0.99691011145788888 4 | American people of English descent:0.95499181519954579 5 | American female models:0.94999955185639451 6 | American child models:0.94407054701892712 7 | American people of Dutch descent:0.93170155432050117 8 | Participants in American reality television series:0.9117466305404669 9 | American people of German descent:0.9094463416125238 10 | American people of Irish descent:0.90763991772349562 11 | People from Calabasas, California:0.90673577658417825 12 | American television personalities:0.90375420566313247 13 | Living people:0.87185054587330346 14 | -------------------------------------------------------------------------------- /wiki_trivia_metric_calculator_test.py: -------------------------------------------------------------------------------- 1 | import wiki_trivia_metric_calculator 2 | import wiki_parser 3 | 4 | if __name__ == "__main__": 5 | test = wiki_trivia_metric_calculator.WikiTriviaMetricCalculator() 6 | test_parser = wiki_parser.WikiParser() 7 | 8 | token_freq_map = test_parser.getEntityTokens("Lionel Messi") 9 | #print token_freq_map 10 | test.GetModel() 11 | topk_terms = test.getTopKTFIDFforEntity(token_freq_map) 12 | print(topk_terms) 13 | token_freq_map1 = test_parser.getEntityTokens("Cristiano Ronaldo") 14 | 15 | topk_terms1 = test.getTopKTFIDFforEntity(token_freq_map1) 16 | print(topk_terms1) 17 | print(test.getEntitySimilarity(topk_terms, topk_terms1)) 18 | -------------------------------------------------------------------------------- /outputCache/Napoleon.txt: -------------------------------------------------------------------------------- 1 | Leaders who took power by coup:1.2677889876437587 2 | Deaths from stomach cancer:1.2473396846115563 3 | Members of the French Academy of Sciences:1.1372281625585865 4 | French people of Italian descent:1.1166745738213253 5 | People excommunicated by the Roman Catholic Church:1.0906598727945904 6 | Assassination attempt survivors:1.0812045859470196 7 | House of Bonaparte:1.0447460192061251 8 | French Roman Catholics:1.0123667227877891 9 | People from Ajaccio:1.0053567831574992 10 | Monarchs who abdicated:0.97963168413775303 11 | 1769 births:0.95873218149959671 12 | 1821 deaths:0.95646461834326013 13 | Napoleon:0.91395601150870354 14 | French commanders of the Napoleonic Wars:0.90360978133128322 15 | -------------------------------------------------------------------------------- /batchRun.py: -------------------------------------------------------------------------------- 1 | import algorithm_wrapper 2 | import wiki_parser 3 | import wiki_trivia_metric_calculator 4 | import sys 5 | import os 6 | 7 | if __name__ == "__main__": 8 | file_path = "./topEntityList.txt" 9 | # Read the each line of the entityList and Run the Trivia Algorithm 10 | if os.path.isfile(file_path): 11 | open_entityFile = open(file_path, "r") 12 | wiki_parser_instance = wiki_parser.WikiParser() 13 | wiki_trivia_metric_calculator_instance = wiki_trivia_metric_calculator.WikiTriviaMetricCalculator() 14 | for entity in open_entityFile: 15 | algorithm_wrapper.triviaAlgorithm(entity,wiki_parser_instance,wiki_trivia_metric_calculator_instance) 16 | open_entityFile.close() -------------------------------------------------------------------------------- /outputCache/Heath Ledger.txt: -------------------------------------------------------------------------------- 1 | Best Supporting Actor Golden Globe (film) winners:1.0323982466517061 2 | Burials at Karrakatta Cemetery:1.0045865105060603 3 | Rock Eisteddfod Challenge participants:0.99627424351306126 4 | Best Supporting Actor Academy Award winners:0.98614102500736001 5 | Australian male television actors:0.9505695081385932 6 | 20th-century Australian male actors:0.94291044619789965 7 | 21st-century Australian male actors:0.93657480882581978 8 | Australian male film actors:0.92461688748105419 9 | Australian people of Scottish descent:0.89814879554078197 10 | Accidental deaths in New York:0.89520062824017443 11 | Australian people of Irish descent:0.8908810659238221 12 | 1979 births:0.89082729262552274 13 | Australian people of English descent:0.88076150492608074 14 | 2008 deaths:0.8489333367786106 15 | -------------------------------------------------------------------------------- /Util.py: -------------------------------------------------------------------------------- 1 | import os 2 | import wikipedia as wiki 3 | 4 | #Utility Function to Load the GlobalIDF Function 5 | def getglobalfreqdict(filename): 6 | indexdict = {} 7 | if os.path.exists(filename): 8 | if not os.path.getsize(filename)> 0: 9 | return None 10 | with open(filename) as f: 11 | data = f.readlines() 12 | for line in data: 13 | val = line.split() 14 | if len(val) == 2: 15 | indexdict[val[0]] = float(val[1]) 16 | return indexdict 17 | else: 18 | print("File Doesn't Exist") 19 | 20 | def searchWiki(query_term): 21 | wiki.set_lang("en") 22 | search_result = wiki.search(query=query_term) 23 | if len(search_result): 24 | return search_result[0] 25 | else: 26 | print("No search Results found") 27 | -------------------------------------------------------------------------------- /outputCache/Johnny Depp.txt: -------------------------------------------------------------------------------- 1 | Nightclub owners:0.93884869648474378 2 | American people of French descent:0.92688083549047717 3 | American people of African descent:0.9140337942434299 4 | American people of Dutch descent:0.90847702998109514 5 | Best Musical or Comedy Actor Golden Globe (film) winners:0.90060497082647495 6 | Male Western (genre) film actors:0.90023646385000433 7 | American people of English descent:0.89109290838891386 8 | Male actors from Florida:0.88248742097939359 9 | 21st-century American male actors:0.88146894217101457 10 | Male actors from Kentucky:0.8780664314919806 11 | American film producers:0.875304100984308 12 | American male film actors:0.87451659352171907 13 | American male television actors:0.87362940244053588 14 | American male voice actors:0.85371698218648662 15 | 20th-century American male actors:0.84955876152204857 16 | 1963 births:0.84169802412054462 17 | Living people:0.82432050174104132 18 | -------------------------------------------------------------------------------- /outputCache/Selena Gomez.txt: -------------------------------------------------------------------------------- 1 | American television actresses:1.1081537682223876 2 | American child actresses:1.0951758660510587 3 | Hollywood Records artists:1.0925449089089234 4 | American sopranos:1.0762176254029616 5 | 21st-century American singers:1.0659503587854031 6 | 21st-century American actresses:1.0655329977855812 7 | American dance musicians:1.0644255860564047 8 | 1992 births:1.0609338325828837 9 | American voice actresses:1.0556059097352157 10 | Actresses from Texas:1.052427451840843 11 | American electronic musicians:1.052253038091554 12 | Singers from Texas:1.0512713956850468 13 | Child pop musicians:1.0486416840497461 14 | American pop rock singers:1.037235456484783 15 | Interscope Records artists:1.0325237525624174 16 | American film actresses:1.0221796122494231 17 | American child singers:1.0219792739527864 18 | American female pop singers:1.0029258734550648 19 | UNICEF people:0.96711743840068043 20 | Living people:0.88886788517663085 21 | -------------------------------------------------------------------------------- /outputCache/John Cena.txt: -------------------------------------------------------------------------------- 1 | Drifting drivers:1.8796414561370582 2 | American football offensive linemen:1.5275718371442522 3 | Players of American football from Massachusetts:1.4617592225584675 4 | 21st-century American male actors:1.2884338385555809 5 | Columbia Records artists:1.2746156903766497 6 | LGBT rights activists from the United States:1.2420092835103442 7 | American male film actors:1.2368150107864273 8 | Male actors of Italian descent:1.2332046737041138 9 | East Coast hip hop musicians:1.2215580732155729 10 | American male rappers:1.1657950430257602 11 | Sportspeople from Tampa, Florida:1.160842750432908 12 | 1977 births:1.1484035036638474 13 | American people of English descent:1.1418550128570277 14 | American television hosts:1.0968162444041731 15 | American people of French-Canadian descent:1.0671548948730836 16 | American people of Italian descent:1.0546830625887391 17 | Living people:1.0152836468584112 18 | American professional wrestlers of Italian descent:0.82937129636216478 19 | American male professional wrestlers:0.82623457856603877 20 | Professional wrestlers from Florida:0.80904399242947045 21 | -------------------------------------------------------------------------------- /outputCache/Will Smith.txt: -------------------------------------------------------------------------------- 1 | African-American record producers:1.0307954221606979 2 | African-American male rappers:1.027404695723563 3 | American television producers:1.0259087528815787 4 | East Coast hip hop musicians:1.0164011001010973 5 | 21st-century American singers:1.0101067219903606 6 | African-American sports executives and administrators:1.0063533148880055 7 | Rappers from Philadelphia:1.0044904911800965 8 | Columbia Records artists:0.98931045232013437 9 | 20th-century American singers:0.98189374701863674 10 | Grammy Award winners:0.98006224084092519 11 | 21st-century American male actors:0.97209887735308564 12 | Interscope Records artists:0.96896249036568383 13 | African-American businesspeople:0.96237425799284448 14 | Male actors from Philadelphia:0.94737363282952614 15 | American male television actors:0.94566461275147451 16 | African-American male actors:0.94149950238539326 17 | American male film actors:0.93477476127386849 18 | 20th-century American male actors:0.92724740849133724 19 | African-American film producers:0.92529936411114322 20 | 1968 births:0.91724245490821821 21 | Living people:0.90366563256454602 22 | -------------------------------------------------------------------------------- /outputCache/Nikola Tesla.txt: -------------------------------------------------------------------------------- 1 | 19th-century Serbian people:1.8531817453931674 2 | 20th-century Serbian people:1.7860504382146025 3 | Serbs of Croatia:1.6773284829987432 4 | Members of the Serbian Academy of Sciences and Arts:1.6000721500397563 5 | Fellow Members of the IEEE:1.545999382676434 6 | American humanists:1.4686932787282432 7 | 20th-century physicists:1.3298754730817852 8 | 20th-century engineers:1.2973886162041215 9 | Fellows of the American Association for the Advancement of Science:1.2851654293798536 10 | People from Colorado Springs, Colorado:1.2624563656639591 11 | American physicists:1.2594727927344067 12 | 19th-century physicists:1.2393040222110627 13 | People with acquired American citizenship:1.1871311756530105 14 | 1943 deaths:1.1225646465675394 15 | IEEE Edison Medal recipients:1.1208246661928145 16 | Austro-Hungarian emigrants to the United States:1.0821351062749869 17 | 1856 births:1.0732208443197351 18 | 20th-century American engineers:1.0297902128423233 19 | American mechanical engineers:1.0062464849880719 20 | American electrical engineers:0.99509404960619485 21 | American inventors:0.94593399884468465 22 | Radio pioneers:0.87002125855707402 23 | -------------------------------------------------------------------------------- /outputCache/Hugh Jackman.txt: -------------------------------------------------------------------------------- 1 | Australian television presenters:1.0935988252766977 2 | 20th-century Australian singers:1.0879782212059281 3 | Drama Desk Award winners:1.0835468850317649 4 | Australian male musical theatre actors:1.0760027854850862 5 | Tony Award winners:1.059102287514869 6 | University of Technology Sydney alumni:1.0575906550062295 7 | 21st-century Australian singers:1.0563869263259384 8 | 20th-century Australian male actors:1.0494272748807445 9 | Australian male stage actors:1.0487037666125818 10 | People from Sydney:1.0466111714459039 11 | Male actors from Sydney:1.0427605031793812 12 | Best Musical or Comedy Actor Golden Globe (film) winners:1.0349549344108477 13 | Primetime Emmy Award winners:1.017786245859148 14 | 21st-century Australian male actors:1.0113108716363866 15 | Australian male singers:1.0025981630026948 16 | Australian male television actors:0.99995977254363122 17 | Male actors of Greek descent:0.99748045809762542 18 | Australian people of English descent:0.98573512575801503 19 | Australian male film actors:0.98529523489146231 20 | Australian Christians:0.96955441036750778 21 | Australian male voice actors:0.96458199842663783 22 | Australian people of Greek descent:0.95254414372700946 23 | 1968 births:0.94262146965026239 24 | Living people:0.91088815665405665 25 | -------------------------------------------------------------------------------- /outputCache/Dwayne Johnson.txt: -------------------------------------------------------------------------------- 1 | Calgary Stampeders players:1.3122890589548548 2 | Miami Hurricanes football players:1.2678528290831466 3 | African-American players of American football:1.1864611417270059 4 | African-American players of Canadian football:1.1822905012066685 5 | Players of American football from California:1.1166406935887545 6 | Players of American football from Pennsylvania:1.0984352821199626 7 | American players of American football of Samoan descent:1.0909224654260938 8 | American football defensive linemen:1.0898881913930687 9 | Canadian male professional wrestlers:0.95990661554383139 10 | 21st-century American male actors:0.924928185373599 11 | American people of Samoan descent:0.91727790725299663 12 | Canadian male film actors:0.91134504216413437 13 | Sportspeople from the San Francisco Bay Area:0.90362328642592815 14 | Canadian people of American descent:0.90268441512647368 15 | African-American male actors:0.88716680898387368 16 | American male film actors:0.8867606428632997 17 | Professional wrestlers from California:0.86331572762195052 18 | 20th-century American male actors:0.8620085974458892 19 | 1972 births:0.86196608688396081 20 | American people of Canadian descent:0.85070172266331556 21 | African-American professional wrestlers:0.84445522614147317 22 | Living people:0.79675719450001714 23 | -------------------------------------------------------------------------------- /outputCache/Barack Obama.txt: -------------------------------------------------------------------------------- 1 | Punahou School alumni:1.3387910646917047 2 | Grammy Award winners:1.2859668279303453 3 | American Nobel laureates:1.2565331843053882 4 | Nobel Peace Prize laureates:1.1786827577086749 5 | American feminist writers:1.1551973277907599 6 | African-American feminists:1.1167987835685782 7 | American feminists:1.0896562059932569 8 | 21st-century American politicians:1.0057797842693141 9 | Democratic Party United States Senators:0.99517280067274383 10 | Harvard Law School alumni:0.994574666360582 11 | Politicians from Chicago:0.99001992353592327 12 | United States Senators from Illinois:0.98925255376343268 13 | Illinois Democrats:0.98700793275276311 14 | Illinois State Senators:0.98582399493930195 15 | American civil rights lawyers:0.98376367541117737 16 | American legal scholars:0.98322037563866693 17 | African-American non-fiction writers:0.97860867594288425 18 | Male feminists:0.97617888152671584 19 | 21st-century American writers:0.96865078259322868 20 | Writers from Chicago:0.96184837615133068 21 | Occidental College alumni:0.95537200386795651 22 | Living people:0.94943430111595362 23 | 20th-century American writers:0.93985249511651736 24 | Columbia University alumni:0.9291826608783621 25 | 1961 births:0.92444948110232217 26 | United States presidential candidates, 2008:0.92375006472502208 27 | American political writers:0.91363645842731289 28 | Progressivism in the United States:0.89682644565640368 29 | United States presidential candidates, 2012:0.89589812312207862 30 | Washington, D.C. Democrats:0.83949561211107571 31 | -------------------------------------------------------------------------------- /outputCache/Steve Jobs.txt: -------------------------------------------------------------------------------- 1 | American Zen Buddhists:1.1602851076784637 2 | Organ transplant recipients:1.0460617634651719 3 | Deaths from cancer in California:0.96453922584142449 4 | American inventors:0.95718125266155196 5 | American adoptees:0.93994968308616067 6 | Burials in California:0.93415155241352155 7 | American billionaires:0.93183435772770107 8 | Internet pioneers:0.930196664254481 9 | American film studio executives:0.91424429280250019 10 | American people of German descent:0.90543065484285046 11 | Computer designers:0.90478396556798257 12 | Disney people:0.90366348998816826 13 | People from Palo Alto, California:0.89736551174090995 14 | American people of Syrian descent:0.89217856232547466 15 | 20th-century American businesspeople:0.88577409565686205 16 | 1955 births:0.88185106631915833 17 | Psychedelic drug advocates:0.87755342218321852 18 | Deaths from pancreatic cancer:0.87651100711039842 19 | Businesspeople in software:0.87171602295008288 20 | National Medal of Technology recipients:0.8706443549663575 21 | Businesspeople from San Francisco:0.86114056302038811 22 | American computer businesspeople:0.8597174567467194 23 | American people of Swiss descent:0.8554254443574989 24 | Businesspeople from California:0.85459382644710513 25 | American industrial designers:0.85084837348677211 26 | 21st-century American businesspeople:0.8498673765972925 27 | American technology chief executives:0.84801863254766885 28 | 2011 deaths:0.84459731623016943 29 | Apple Inc.:0.83682657858676757 30 | American technology company founders:0.83571247324970455 31 | -------------------------------------------------------------------------------- /outputCache/Donald Trump.txt: -------------------------------------------------------------------------------- 1 | WWE Hall of Fame:1.6818207894094659 2 | 21st-century American politicians:1.0969672321638444 3 | American Presbyterians:1.0486389796810915 4 | American billionaires:1.0217578561275904 5 | New York Republicans:1.0099299954841732 6 | American political writers:0.98990216116923668 7 | 20th-century American businesspeople:0.97804951163103926 8 | People named in the Panama Papers:0.97584327740485743 9 | American business writers:0.9729638419096035 10 | American hoteliers:0.97001353397863865 11 | Critics of the European Union:0.96382280016770583 12 | Wharton School of the University of Pennsylvania alumni:0.96094307204331242 13 | American investors:0.95979920143364184 14 | Writers from New York City:0.95122468561348905 15 | American male film actors:0.94104108809811571 16 | Politicians from New York City:0.93315059774943976 17 | American casino industry businesspeople:0.93190855692809316 18 | American television hosts:0.92948574306254383 19 | United States presidential candidates, 2016:0.92496416569140427 20 | 21st-century American businesspeople:0.92394851553847868 21 | American infotainers:0.9200120315849597 22 | Television producers from New York:0.91968371284425476 23 | 1946 births:0.91382050636112311 24 | American male writers:0.90090162829880227 25 | People from Manhattan:0.89918471178430071 26 | American people of German descent:0.89782436909236385 27 | American real estate businesspeople:0.89629802371193823 28 | American conspiracy theorists:0.89517506125353008 29 | American people of Scottish descent:0.89501528069586422 30 | Businesspeople from New York City:0.89125976907681248 31 | American television personalities:0.87492559004710135 32 | Living people:0.84660002648587995 33 | People from Jamaica, Queens:0.8236660532267972 34 | -------------------------------------------------------------------------------- /templates/game.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Automatic Trivia Fact Extraction from Wikipedia 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
    Trivia Quiz
    27 |
    28 | 29 | 34 | 35 | -------------------------------------------------------------------------------- /outputCache/Cristiano Ronaldo.txt: -------------------------------------------------------------------------------- 1 | Portuguese Roman Catholics:1.0707361923710679 2 | Golden Globes (Portugal) winners:1.0259853311395597 3 | First Division/Premier League top scorers:1.0159485109521205 4 | Pichichi Trophy winners:1.012105355834449 5 | Premier League players:0.99948524542871875 6 | Association football wingers:0.98553798885917332 7 | Portugal under-21 international footballers:0.98172821624400752 8 | UEFA Euro 2008 players:0.97785449183888151 9 | Portugal international footballers:0.97498903801500159 10 | Manchester United F.C. players:0.97417152947595365 11 | Portuguese expatriate footballers:0.97098795107993208 12 | Olympic footballers of Portugal:0.97010192943971052 13 | Primeira Liga players:0.96838703895093992 14 | Real Madrid C.F. players:0.95705523022923622 15 | Portuguese expatriates in England:0.95694393696870972 16 | UEFA Euro 2004 players:0.95654930979350061 17 | La Liga players:0.95500499275092199 18 | Portuguese expatriates in Spain:0.95472210396700496 19 | Portugal youth international footballers:0.95446479331461487 20 | UEFA Euro 2016 players:0.94679566144341187 21 | UEFA Euro 2012 players:0.94648101687573594 22 | Portuguese footballers:0.93942624637703787 23 | UEFA European Championship-winning players:0.93638384078277181 24 | Portuguese people of Cape Verdean descent:0.93143475929975017 25 | 2014 FIFA World Cup players:0.91846804559722439 26 | Sporting Clube de Portugal footballers:0.91665332870166838 27 | 2010 FIFA World Cup players:0.91347075924515508 28 | 2006 FIFA World Cup players:0.90843628870162973 29 | Association football forwards:0.9071475283872269 30 | Expatriate footballers in England:0.90598927551085817 31 | FIFA Century Club:0.90371435643509002 32 | Footballers at the 2004 Summer Olympics:0.90041774672312025 33 | Expatriate footballers in Spain:0.89449039059544766 34 | People from Funchal:0.87969306390072066 35 | 1985 births:0.78171572605439299 36 | Living people:0.76119228804399264 37 | -------------------------------------------------------------------------------- /templates/css/entity.css: -------------------------------------------------------------------------------- 1 | .category .catHead{ 2 | text-align: center; 3 | } 4 | .catHead{ 5 | text-align: left; 6 | width: 100%; 7 | font-family: Georgia,serif,Times; font-size: 4vh; 8 | color: #f2f2f2; 9 | background-color: #333333; 10 | height:10vh; 11 | } 12 | 13 | .catList{ 14 | background-color: #e6e6e6; 15 | margin-bottom:0px; 16 | } 17 | 18 | .header{ 19 | margin-bottom: 0px; 20 | height:10vw; 21 | } 22 | 23 | .category{ 24 | font-family:Georgia,serif,Times; 25 | font-size:3.0vh; 26 | height:6vh; 27 | } 28 | 29 | #loadMore{ 30 | width:100%; 31 | color:#000000; 32 | font-size: 4vh; 33 | padding: 1% 3%; 34 | height:8vh; 35 | } 36 | 37 | .searchbar{ 38 | margin-left: 0; 39 | } 40 | 41 | #sliding{ 42 | margin-left: 0; 43 | margin-right: 0; 44 | } 45 | 46 | .carousel{ 47 | width:100%; 48 | margin-bottom: 10vh; 49 | margin-left: 0; 50 | margin-top:5vh; 51 | } 52 | 53 | #wrapper { 54 | border : 2px solid #000; 55 | overflow:hidden; 56 | } 57 | 58 | #one { 59 | float:left; 60 | width:50%; 61 | } 62 | #two { 63 | background-color: white; 64 | overflow:hidden; 65 | width:50%; 66 | float:right; 67 | } 68 | 69 | @media screen and (max-width: 600px) { 70 | #one, #two { 71 | float: none; 72 | margin-right:0; 73 | width:auto; 74 | border:0; 75 | border-bottom:2px solid #000; 76 | } 77 | } 78 | 79 | #description{ 80 | text-align:left; 81 | margin-top: 4vh; 82 | margin-right: 6vw; 83 | font-family: Georgia,serif,Times; font-size: 4vh; 84 | } 85 | 86 | #pointList{ 87 | font-size: large; 88 | font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; 89 | } 90 | 91 | .carousel-inner{ 92 | width:inherit; 93 | height:inherit; 94 | } 95 | 96 | .item{ 97 | width:inherit; 98 | height:inherit; 99 | } 100 | 101 | .imgSlide{ 102 | width:inherit; 103 | height:inherit; 104 | } -------------------------------------------------------------------------------- /outputCache/Lionel Messi.txt: -------------------------------------------------------------------------------- 1 | UNICEF people:1.0497703992080623 2 | Segunda División B players:0.98388161998079238 3 | Tercera División players:0.96844193015993729 4 | FC Barcelona B players:0.95284308987382227 5 | People convicted of fraud:0.95047092057799509 6 | Argentine expatriate sportspeople in Spain:0.94809856826859507 7 | Argentine expatriate footballers:0.9372208252127362 8 | 2007 Copa América players:0.93173856053834292 9 | Medalists at the 2008 Summer Olympics:0.92889879772180195 10 | Argentina international footballers:0.92739446296987516 11 | Argentine footballers:0.92684970435864167 12 | Argentina under-20 international footballers:0.92420677648642613 13 | Pichichi Trophy winners:0.92257287689340495 14 | Argentina youth international footballers:0.92041004281636996 15 | Copa América Centenario players:0.91805114281916456 16 | FC Barcelona C players:0.91785680718238327 17 | Argentine Roman Catholics:0.91770477612595469 18 | 2015 Copa América players:0.91658016172255041 19 | 2011 Copa América players:0.91338670691944723 20 | FC Barcelona players:0.9095236528840368 21 | 2014 FIFA World Cup players:0.90644122498068025 22 | La Liga players:0.90298092646755113 23 | FIFA Century Club:0.89550680511836989 24 | Association football forwards:0.89313953203634688 25 | Footballers at the 2008 Summer Olympics:0.89294857641704417 26 | 2006 FIFA World Cup players:0.89101761512398758 27 | 2010 FIFA World Cup players:0.88621997546767128 28 | Sportspeople from Rosario, Santa Fe:0.88217327855441818 29 | Olympic footballers of Argentina:0.87826809737065747 30 | Argentine people of Spanish descent:0.87503781949385284 31 | Olympic medalists in football:0.86621336783512337 32 | Olympic gold medalists for Argentina:0.84857497487873812 33 | Naturalised citizens of Spain:0.84855008941163201 34 | Expatriate footballers in Spain:0.83531869094370204 35 | People named in the Panama Papers:0.80006395071001535 36 | 1987 births:0.7980907520246725 37 | Argentine people of Italian descent:0.78743438425081436 38 | Living people:0.71893264997908013 39 | -------------------------------------------------------------------------------- /templates/css/game.css: -------------------------------------------------------------------------------- 1 | /*The basic template styling model is derived from source: http://www.flashbynight.com/tutes/mcqquiz/ and is then developed over for our use.*/ 2 | html, body { 3 | margin: 0; 4 | padding: 0; 5 | background-color: #292c2f; 6 | font-family: Arial, Helvetica, sans-serif; 7 | } 8 | 9 | #navContent{ 10 | margin:auto; 11 | width:800px; 12 | height:400px; 13 | position:relative; 14 | overflow:hidden; 15 | } 16 | 17 | #game1{ 18 | margin:auto; 19 | width:800px; 20 | height:400px; 21 | right:0px; 22 | position:absolute; 23 | } 24 | 25 | #game2{ 26 | margin:auto; 27 | width:800px; 28 | height:400px; 29 | right:-800px; 30 | position:absolute; 31 | } 32 | 33 | 34 | .questionText{ 35 | font-size:27px; 36 | color:#FFF; 37 | } 38 | 39 | .option{width:400px; 40 | height:30px; 41 | margin:15px; 42 | font-size:18px; 43 | color:#FFFFFF; 44 | padding:2px; 45 | padding-left:10px; 46 | border: 2px solid white; 47 | cursor:pointer; 48 | background-color:#3399FF; 49 | } 50 | 51 | .option:hover{ 52 | border:#FC0 solid 2px; 53 | color:#FC0; 54 | } 55 | 56 | #topbar{ 57 | height:50px; 58 | margin:auto; 59 | margin-top:50px; 60 | color:#FFF; 61 | font-size:36px; 62 | font-family:Arial, Helvetica, sans-serif; 63 | width:800px; 64 | border-bottom:solid white 1px; 65 | } 66 | 67 | .spacer{ 68 | height:30px; 69 | } 70 | 71 | .feedback1{ 72 | width:150px; 73 | padding:5px; 74 | font-size:30px; 75 | color:#FFFFCC; 76 | background-color:#009900; 77 | font-family:Arial, Helvetica, sans-serif; 78 | text-align:center; 79 | } 80 | 81 | .feedback2{ 82 | width:150px; 83 | padding:5px; 84 | font-size:30px; 85 | color:#FFFFCC; 86 | background-color:#CC3300; 87 | font-family:Arial, Helvetica, sans-serif; 88 | text-align:center; 89 | } 90 | 91 | @media screen and (max-width:800px) { 92 | #topbar{margin-left:1%;margin-right:1%; width:96%;} 93 | #navContent{margin:1%; width:98%;} 94 | #game1{margin:1%; width:98%;} 95 | #game2{margin:1%; width:98%;} 96 | 97 | } 98 | 99 | @media screen and (max-width:460px) { 100 | .option{width:80%;margin:5%;} 101 | } -------------------------------------------------------------------------------- /outputCache/Michael Jordan.txt: -------------------------------------------------------------------------------- 1 | Birmingham Barons players:1.2137150895143134 2 | Baseball players from North Carolina:1.1961478723192112 3 | Shoe designers:1.1580528575065092 4 | Scottsdale Scorpions players:1.1179273458586867 5 | Baseball players from New York:1.100370904151005 6 | Medalists at the 1984 Summer Olympics:1.067594099933818 7 | Pan American Games gold medalists for the United States:1.0548634370779526 8 | Washington Wizards players:1.0333139352299343 9 | Businesspeople from Illinois:1.0253034152400309 10 | National Basketball Association players with retired numbers:1.0214958665371374 11 | FIBA Hall of Fame inductees:1.015435001688779 12 | Basketball players at the 1984 Summer Olympics:1.0100666368905831 13 | Businesspeople from New York City:0.9950219110430234 14 | American businesspeople in retailing:0.9918319497935838 15 | North Carolina Tar Heels men's basketball players:0.98693001367893862 16 | Medalists at the 1992 Summer Olympics:0.98664390456394024 17 | Naismith Memorial Basketball Hall of Fame inductees:0.98419124204151387 18 | United States men's national basketball team players:0.97956384142355857 19 | Basketball players at the 1992 Summer Olympics:0.97390363318654827 20 | African-American basketball players:0.97014476654121995 21 | Olympic gold medalists for the United States in basketball:0.96657750033526957 22 | ACC Athlete of the Year:0.96301754351745106 23 | National Basketball Association All-Stars:0.95828391640359212 24 | Chicago Bulls draft picks:0.95778633563062376 25 | McDonald's High School All-Americans:0.95744247818103456 26 | Chicago Bulls players:0.95307732604777173 27 | Basketball players from New York:0.94229041488584875 28 | Presidential Medal of Freedom recipients:0.93686160059234003 29 | Parade High School All-Americans (boys' basketball):0.92980483386104062 30 | Pan American Games medalists in basketball:0.92913996640726659 31 | Basketball players from North Carolina:0.92038619796023291 32 | Shooting guards:0.91062989394384775 33 | Sportspeople from Brooklyn:0.86453882149791461 34 | People from Highland Park, Illinois:0.84861558310911323 35 | 1963 births:0.84347372939945409 36 | African-American sports executives and administrators:0.82984740233557241 37 | Living people:0.810951342288594 38 | -------------------------------------------------------------------------------- /templates/css/demo.css: -------------------------------------------------------------------------------- 1 | @import url('http://fonts.googleapis.com/css?family=Open+Sans:400,700'); 2 | 3 | html{ 4 | background-color: #eaf0f2; 5 | } 6 | 7 | body{ 8 | font:14px/1.5 Arial, Helvetica, sans-serif; 9 | padding:0; 10 | margin:0; 11 | } 12 | 13 | .menu{ 14 | text-align: center; 15 | padding-top: 25px; 16 | margin-bottom:200px; 17 | } 18 | 19 | .menu img{ 20 | opacity: 0.4; 21 | margin: 20px auto; 22 | } 23 | 24 | .menu h1{ 25 | margin-top:0; 26 | font: normal 32px/1.5 'Open Sans', sans-serif; 27 | color: #3F71AE; 28 | padding-bottom: 16px; 29 | } 30 | 31 | .menu h2{ 32 | color: #F05283; 33 | } 34 | 35 | .menu h2 a{ 36 | color:inherit; 37 | text-decoration: none; 38 | display: inline-block; 39 | border: 1px solid #F05283; 40 | padding: 10px 15px; 41 | border-radius: 3px; 42 | font: bold 14px/1 'Open Sans', sans-serif; 43 | text-transform: uppercase; 44 | } 45 | 46 | .menu h2 a:hover{ 47 | background-color:#F05283; 48 | transition:0.2s; 49 | color:#fff; 50 | } 51 | 52 | .menu ul { 53 | max-width: 600px; 54 | margin: 60px auto 0; 55 | } 56 | 57 | .menu ul a{ 58 | text-decoration: none; 59 | color: #FFF; 60 | text-align: left; 61 | background-color: #B9C1CA; 62 | padding: 10px 16px; 63 | border-radius: 2px; 64 | opacity: 0.8; 65 | font-size: 16px; 66 | display: inline-block; 67 | margin: 4px; 68 | line-height: 1; 69 | outline: none; 70 | 71 | transition: 0.2s ease; 72 | } 73 | 74 | .menu ul li a.active{ 75 | background-color: #66B650; 76 | pointer-events: none; 77 | } 78 | 79 | .menu ul li a:hover { 80 | opacity: 1; 81 | } 82 | 83 | .menu ul{ 84 | list-style: none; 85 | padding: 0; 86 | } 87 | 88 | .menu ul li{ 89 | display: inline-block; 90 | } 91 | 92 | @media (max-height:800px){ 93 | .menu { padding-top:40px; } 94 | } 95 | 96 | 97 | /* -- Demo ads -- */ 98 | 99 | @media (max-width: 1200px) { 100 | #bsaHolder{ display:none;} 101 | } 102 | 103 | /* -- Link to Tutorialzine -- */ 104 | 105 | .tz-link{ 106 | text-decoration: none; 107 | color: #fff !important; 108 | font: bold 36px Arial,Helvetica,sans-serif !important; 109 | } 110 | 111 | .tz-link span{ 112 | color: #da431c; 113 | } -------------------------------------------------------------------------------- /outputCache/Bill Clinton.txt: -------------------------------------------------------------------------------- 1 | American saxophonists:1.3495880152758688 2 | Fellows of University College, Oxford:1.1288602831504697 3 | Democratic Party state governors of the United States:1.1069234006874273 4 | 20th-century American politicians:1.0998759819045807 5 | 21st-century American politicians:1.0867892318775616 6 | Governors of Arkansas:1.0670352035048416 7 | Grammy Award winners:1.0536354846620706 8 | Arkansas lawyers:1.0513188086024194 9 | Disbarred lawyers:1.046014459055018 10 | United States presidential electors, 2016:1.0416976505066244 11 | Baptists from the United States:1.0231282931562358 12 | Alumni of University College, Oxford:1.0153753498588014 13 | Spouses of United States Senators:1.0079919643215878 14 | United Nations officials:1.0024383210051058 15 | Yale Law School alumni:1.0016299667842485 16 | Recipients of the Order of the Cross of Terra Mariana, 1st Class:0.99680442427753435 17 | LGBT rights activists from the United States:0.99484662340748664 18 | Arkansas Democrats:0.9938484924061245 19 | American people of Scotch-Irish descent:0.98155858108681437 20 | Fellows of the American Academy of Arts and Sciences:0.96076948697945774 21 | Edmund A. Walsh School of Foreign Service alumni:0.95891410948923317 22 | American people of English descent:0.94256254493978675 23 | 21st-century American writers:0.94034115202967272 24 | American health activists:0.93408086214010944 25 | American Rhodes Scholars:0.92883815948910053 26 | Writers from Arkansas:0.92813717028002352 27 | American political writers:0.92667794498189904 28 | American people of Scottish descent:0.92268637685192334 29 | 1946 births:0.90786727621463037 30 | 20th-century American writers:0.90231562847143065 31 | American male writers:0.89636534801552437 32 | American autobiographers:0.89589545144658755 33 | American gun control advocates:0.89185017281559498 34 | Presidential Medal of Freedom recipients:0.88864791667140219 35 | American memoirists:0.88705102636636401 36 | People from Hot Springs, Arkansas:0.88058639628185209 37 | American people of Irish descent:0.87237699995322338 38 | American humanitarians:0.86545094470647754 39 | Bill Clinton:0.85091966986798873 40 | Living people:0.84118603639459089 41 | Clinton administration cabinet members:0.83629585245342952 42 | Phi Beta Kappa members:0.83476191843272007 43 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Automatic Trivia Fact Extraction from Wikipedia 2 | 3 | ### DATASET (Cached Wikipedia Data) 4 | **[LINK To Data ](https://drive.google.com/open?id=0B0JsA9YchOf7SHdlRFBGXzZJY0k)** (one need to be in tamu.edu domain to open it) 5 | 6 | 7 | ### Introduction 8 | Searching is very important part of present internet era. Most of the search engines try to give you exact and only information you ask through the query. Providing additional interesting facts along with required information makes user search more exploratory and help in increasing the user engagement. The latest search engines have started giving additional information to the user like www.yippy.com and others. 9 | 10 | 11 | ### Data Scrapping 12 | * **[Pywikibot](https://www.mediawiki.org/wiki/Manual:Pywikibot)** has been used to extract wikipedia data for each searched entity. 13 | 14 | ### Execution Instructions (to run locally on the machine): 15 | 16 | - Download and extract the Google News Word2Vec model into the root folder: 17 | https://drive.google.com/file/d/0B7XkCwpI5KDYNlNUTTlSS21pQmM/edit 18 | This is for the case if the entity is not already searched or cached. 19 | 20 | - Install the following Python packages: 21 | 22 | $ pip install gensim 23 | 24 | $ pip install pywikibot 25 | 26 | $pip install wikipedia 27 | 28 | $ pip install flask 29 | 30 | Download nltk corpora, by opening interactive python 31 | 32 | >>> ntlk.download() 33 | 34 | - For running the app there are two options: 35 | 36 | You can either run it from terminal, just type the following command: $ python batchRun.py The above command will automatically start running online for the entities in the topEntityList.txt and generate the output in the outputCache folder for each entity 37 | 38 | Alternativly you can run the web app for already cached entities from the data link given above. Download the outputCache folder and run the following command $ python app.py Open the web on localhost at given port, and then just type any entity from the toEntityList.txt and get ranked trivia facts. You can also play Triviathon- Game on this website. 39 | 40 | 41 | ### Technology stack used 42 | Backend: Backend is powered by python. All the algorithms are written in python. 43 | Full Stack Framework: It is Flask powered framework with python, css, html and javascript. (http://flask.pocoo.org/) 44 | 45 | -------------------------------------------------------------------------------- /outputCache/Bill Gates.txt: -------------------------------------------------------------------------------- 1 | Recipients of the Padma Bhushan in social work:1.4708737483817624 2 | Fellows of the British Computer Society:1.1475037152832963 3 | American inventors:1.1470727926143409 4 | American venture capitalists:1.0977797142378816 5 | American people of Scotch-Irish descent:1.0896140077259906 6 | American nonprofit chief executives:1.0599922961971155 7 | 20th-century American businesspeople:1.0521905799986013 8 | 21st-century American engineers:1.0510360884312417 9 | Freemen of the City of London:1.047293718517188 10 | Dudley–Winthrop family:1.0444813401604542 11 | National Medal of Technology recipients:1.0437516753269371 12 | Members of the United States National Academy of Engineering:1.040716054775874 13 | Harvard University people:1.0400472791048385 14 | American Roman Catholics:1.0391080473563838 15 | Nerd culture:1.0351495928936723 16 | History of computing:1.0332326627771857 17 | American humanitarians:1.0328378396901619 18 | American corporate directors:1.027311875048271 19 | American chairmen of corporations:1.0197994434512352 20 | American people of English descent:1.0185795102827067 21 | Presidential Medal of Freedom recipients:1.0147101581289459 22 | 20th-century American engineers:1.0113176679785589 23 | American technology company founders:1.0111888976881227 24 | Businesspeople in software:1.0093855248869796 25 | 1955 births:1.0061489880573822 26 | American people of Scottish descent:1.0026608413164517 27 | Honorary Knights Commander of the Order of the British Empire:0.99380730734998191 28 | American computer businesspeople:0.99156071613452812 29 | Writers from Seattle:0.98860652656312387 30 | American technology chief executives:0.9884053519284125 31 | American financiers:0.9881417998986598 32 | American philanthropists:0.98523266084785244 33 | American investors:0.97848404705248238 34 | Wired (magazine) people:0.97724596682076215 35 | American technology writers:0.97535802193346932 36 | American billionaires:0.97235563214779608 37 | American people of German descent:0.96328761519528672 38 | Microsoft employees:0.95371950767686642 39 | American software engineers:0.94485223971276167 40 | 21st-century American businesspeople:0.92661769628149537 41 | American computer programmers:0.92182201585776447 42 | Businesspeople from Seattle:0.91618030450886534 43 | Giving Pledgers:0.91256120026367471 44 | Living people:0.90302498020341537 45 | People from King County, Washington:0.89069611364742407 46 | -------------------------------------------------------------------------------- /templates/entity.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Automatic Trivia Fact Extraction from Wikipedia 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 25 | 35 |
    {{entity}}
    40 |
    41 | 42 | 43 |
    44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /wiki_trivia_metric_calculator.py: -------------------------------------------------------------------------------- 1 | # Since by default the encoding scheme is based on the operating system, we will enforce the encoding scheme to be utf-8 2 | 3 | import sys 4 | 5 | import gensim 6 | import heapq 7 | import math 8 | import Util as util 9 | import pdb 10 | # Class Def for the Calculation of various metrics 11 | 12 | class WikiTriviaMetricCalculator: 13 | def __init__(self): 14 | print("Inside the Initialization of the class: WikiTriviaExtractor") 15 | self.genism_model_filename = "GoogleNews-vectors-negative300.bin" 16 | self.model = gensim.models.KeyedVectors.load_word2vec_format(self.genism_model_filename, binary=True) 17 | self.global_idf = util.getglobalfreqdict("plainIdfIndex.txt") 18 | self.k_val = 10 19 | self.doc_size = 10000.0 #document size for the idf 20 | self.rare_term_freq = 10 #used for ignoring rarely occuring terms. 21 | print("Initialization Done") 22 | 23 | def GetModel(self): 24 | if self.model: 25 | return 26 | print('Generating the Model') 27 | self.model = gensim.models.KeyedVectors.load_word2vec_format(self.genism_model_filename, binary=True) 28 | print('Model Generated') 29 | 30 | # Get the top k tf idf tokens from the token freq map 31 | def getTopKTFIDFforEntity(self, token_frequency): 32 | entity_result = {} 33 | for token in token_frequency: 34 | if token not in self.model.vocab: 35 | continue 36 | tf = 1.0 + math.log10(token_frequency[token]) 37 | global_freq = self.global_idf[token] if token in self.global_idf else 1.5 38 | if global_freq < self.rare_term_freq: #ignoring very rare terms 39 | continue 40 | entity_result[token] = tf * math.log10(self.doc_size/float(global_freq)) 41 | return heapq.nlargest(self.k_val, entity_result, key=entity_result.get) 42 | 43 | 44 | 45 | def getEntitySimilarity(self,entity1, entity2): 46 | sim1 = self.getEntitySimilarityHelper(entity1, entity2) 47 | sim2 = self.getEntitySimilarityHelper(entity2, entity1) 48 | return ((sim1 + sim2) / 2.0) 49 | 50 | def getEntitySimilarityHelper(self, entity1, entity2): 51 | sim = 0.0 52 | if (len(entity1) < self.k_val or len(entity2) < self.k_val): 53 | return 0.0 54 | for i in range(0, self.k_val): 55 | current_max = self.model.similarity(entity1[i], entity2[0]) 56 | for j in range(1, self.k_val): 57 | current_val = self.model.similarity(entity1[i], entity2[j]) 58 | if current_val > current_max: 59 | current_max = current_val 60 | sim += (self.k_val - i) * (current_max) 61 | sim = sim / ((self.k_val+1.0) * (float(self.k_val))) 62 | sim = sim * 2.0 63 | return sim 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /wiki_parser.py: -------------------------------------------------------------------------------- 1 | import pywikibot 2 | import wiki2plain 3 | import re 4 | import random 5 | from nltk.stem.porter import * 6 | from nltk.corpus import stopwords 7 | 8 | class WikiParser: 9 | def __init__(self): 10 | print("Making the Instance of Wiki parser.") 11 | self.site = pywikibot.Site('en', 'wikipedia') 12 | self.cache_stem = {} 13 | self.stemmer = PorterStemmer() 14 | self.stop_words = set(stopwords.words('english')) 15 | self.k = 50 16 | 17 | def getEntityTokens(self, wiki_entity): 18 | site = pywikibot.Site('en', 'wikipedia') 19 | page = pywikibot.Page(site, wiki_entity) #here we just crawl for the new entry 20 | text = page.text 21 | wiki2plain_instance = wiki2plain.Wiki2Plain(text) #make the text to plain text 22 | text = wiki2plain_instance.text 23 | text = text.lower() #convert all the text to lower case. Case folding 24 | current_tokens = filter(None, re.split('\W+', text)) #get the tokens now 25 | current_tokens = [word for word in current_tokens if not word in self.stop_words] 26 | token_freq_map = {} 27 | for token in current_tokens: 28 | token = self.cacheInStem(token) 29 | if token not in token_freq_map: 30 | token_freq_map[token] = 1.0 31 | else: 32 | token_freq_map[token] += 1.0 33 | return token_freq_map 34 | 35 | def getCategoryForEntity(self, wiki_entity): 36 | site = pywikibot.Site('en', 'wikipedia') 37 | page = pywikibot.Page(site, wiki_entity) 38 | cat_values = page.categories() 39 | cat_list = list(cat_values) 40 | cat_names = [] 41 | for cat in cat_list: 42 | if not cat.isHiddenCategory(): 43 | cat_names.append(cat.title()) 44 | return cat_names 45 | 46 | 47 | 48 | def getEntityforCategory(self, category): 49 | site = pywikibot.Site('en', 'wikipedia') 50 | catdata = pywikibot.Category(site, title=category) 51 | entities = catdata.articles() 52 | return self.getRefinedEntity(entities) 53 | 54 | def cacheInStem(self, token): 55 | if token not in self.cache_stem: 56 | self.cache_stem[token] = self.stemmer.stem(token) 57 | return self.cache_stem[token] 58 | 59 | def getRefinedEntity(self, entities): 60 | refinedEntity = [] 61 | list_entities = list(entities) 62 | if len(list_entities) <= self.k: 63 | for entity in entities: 64 | refinedEntity.append(entity.title()) 65 | return refinedEntity 66 | else: 67 | range_entity = range(0, len(list_entities)) 68 | list_sample = random.sample(range_entity, self.k) 69 | for i in range(0, self.k): 70 | refinedEntity.append(list_entities[list_sample[i]].title()) 71 | return refinedEntity 72 | 73 | 74 | -------------------------------------------------------------------------------- /outputCache/Albert Einstein.txt: -------------------------------------------------------------------------------- 1 | American Zionists:1.2880604066342369 2 | 20th-century German writers:1.2422222293788865 3 | German socialists:1.2130500601371448 4 | Jewish socialists:1.1969124686836905 5 | People from Munich:1.1422315795855555 6 | German Nobel laureates:1.1290616017613102 7 | Members of the Bavarian Academy of Sciences:1.1205629466399671 8 | Charles University in Prague faculty:1.1196388018064509 9 | American socialists:1.1013732149148641 10 | German Jews:1.0976444739742253 11 | German inventors:1.0716844806948231 12 | ETH Zurich faculty:1.0715091555305121 13 | Anti-nationalists:1.0659025806103055 14 | Jewish philosophers:1.0654598056868838 15 | Nobel laureates in Physics:1.0620088082552301 16 | German people of Jewish descent:1.059932742840999 17 | Stateless people:1.059873963391043 18 | American inventors:1.0554512024052944 19 | People from Berlin:1.0358258249312957 20 | People from Zürich:1.032570923577546 21 | ETH Zurich alumni:1.031288486717258 22 | Swiss Jews:1.0214638334334358 23 | Leiden University faculty:1.0202120870889817 24 | Philosophers of science:1.003279854805041 25 | Members of the Royal Netherlands Academy of Arts and Sciences:0.98559269201577937 26 | Members of the American Philosophical Society:0.98258622542535412 27 | People from Bern:0.97250746797842447 28 | American pacifists:0.97176263661965734 29 | Ashkenazi Jews:0.96603750257562904 30 | Sigma Xi:0.95512749451095835 31 | Swiss emigrants to the United States:0.95416082044396122 32 | Recipients of the Pour le Mérite (civil class):0.949687777521112 33 | Institute for Advanced Study faculty:0.94638371609521355 34 | American people of German-Jewish descent:0.94030993123921069 35 | Jewish emigrants from Nazi Germany to the United States:0.93893433880778487 36 | 20th-century American writers:0.93888891571600541 37 | 20th-century American engineers:0.93886040528661052 38 | Swiss physicists:0.93340784259829468 39 | People with acquired American citizenship:0.9326494677170577 40 | Subjects of iconic photographs:0.93001242148513674 41 | Albert Einstein:0.92864971464350576 42 | 1879 births:0.92657740434363045 43 | German physicists:0.92056804993630048 44 | Jewish inventors:0.91862216656484619 45 | People from Princeton, New Jersey:0.91478744450232607 46 | 1955 deaths:0.91154643548947767 47 | American science writers:0.91035011681961808 48 | Foreign Fellows of the Indian National Science Academy:0.90619170106796409 49 | Corresponding Members of the Russian Academy of Sciences (1917–25):0.90562470207944434 50 | American engineers:0.90541974040151685 51 | Relativity theorists:0.90322336509362011 52 | Foreign Members of the Royal Society:0.90315878323391707 53 | 20th-century physicists:0.90286008856463285 54 | Jewish American scientists:0.89929446344701214 55 | American physicists:0.89920152320698188 56 | Cosmologists:0.89256960638741289 57 | Honorary Members of the USSR Academy of Sciences:0.88648177532833472 58 | Jewish physicists:0.881402921058003 59 | Theoretical physicists:0.87652781182339334 60 | People from Ulm:0.87052239726324798 61 | Jewish agnostics:0.83493116271333945 62 | American agnostics:0.82287453416520495 63 | -------------------------------------------------------------------------------- /app.py: -------------------------------------------------------------------------------- 1 | from flask import Flask 2 | from flask import Flask, render_template, json, jsonify 3 | from flask import Flask, request, send_from_directory 4 | import os 5 | import algorithm_wrapper 6 | import random 7 | from random import randint 8 | 9 | app = Flask(__name__,static_folder='templates') 10 | @app.route("/") 11 | def main(): 12 | print(os.getcwd()) 13 | return render_template('index.html') 14 | 15 | @app.route("/entity", methods=['POST']) 16 | def entity(): 17 | _entity = request.form['searchfield'] 18 | data = algorithm_wrapper.triviaAlgorithm(_entity) 19 | data = [element[0] for element in data] 20 | return render_template('entity.html',data = json.dumps(data),entity =_entity) 21 | 22 | @app.route("/questions") 23 | def questions(): 24 | dir_path = "outputCache/" 25 | output_dict = {} 26 | questions_array = [] 27 | max_count = 5 28 | entities = [] 29 | for (root, dirs, files) in os.walk(dir_path): 30 | for file in files: 31 | if len(questions_array) > 100: 32 | break 33 | if file.endswith('.txt'): 34 | current_file = open(os.path.join(root, file), "r") 35 | count = 0 36 | for line in current_file: 37 | inner_dict = {} 38 | question = file[:-4] + " is a member of " 39 | entities.append(file[:-4]) 40 | line = line.split(":")[0] 41 | random_number = randint(0,9) 42 | if random_number < 4: 43 | question = file[:-4] + " is not a member of " 44 | random_number_new = randint(0,8) 45 | if random_number_new < 6 and len(entities) > 6: 46 | while True: 47 | rand_size = randint(0, len(entities)-1) 48 | if entities[rand_size] != file[:-4]: 49 | question = entities[rand_size] + " is a member of " 50 | break 51 | else: 52 | question = file[:-4] + " is not a member of " 53 | question += line.replace('\n', '') 54 | inner_dict["question"] = question 55 | inner_dict["correct_answer"] = "False" 56 | inner_dict["incorrect_answers"] = ["True"] 57 | else: 58 | question += line.replace('\n', '') 59 | inner_dict["question"] = question 60 | inner_dict["correct_answer"] = "True" 61 | inner_dict["incorrect_answers"] = ["False"] 62 | questions_array.append(inner_dict) 63 | if count > max_count: 64 | break 65 | count += 1 66 | print(questions_array) 67 | output_dict["results"] = [questions_array[i] for i in sorted(random.sample(xrange(len(questions_array)), 5)) ] 68 | print(output_dict) 69 | return jsonify(output_dict) 70 | 71 | @app.route('/js/') 72 | def send_js(path): 73 | return send_from_directory('templates/js', path) 74 | 75 | @app.route('/') 76 | def send_static(path): 77 | return send_from_directory('templates', path) 78 | 79 | if __name__ == "__main__": 80 | app.run() 81 | -------------------------------------------------------------------------------- /templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Automatic Trivia Fact Extraction from Wikipedia 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 29 | 39 |
    40 |
    41 |
    42 |
    43 |
    44 |
    45 | 46 | Automatic Trivia Fact Extraction from Wikipedia 47 | 48 |
      49 |
    • 50 | A trivia search engine based on Surprise factor and Cohesiveness among different categories. 51 |
    • 52 |
    • 53 | Developed out of a course project on Natural Language Processing. 54 |
    • 55 |
    • 56 | Trivia Facts based on WikiPedia dataset. 57 |
    • 58 |
    59 |
    60 |
    61 |
    62 | 63 | 64 |
    65 |
    66 | 67 | -------------------------------------------------------------------------------- /templates/css/header-search.css: -------------------------------------------------------------------------------- 1 | /* We have used the template for header from this website and modified the code to suit our application 2 | // Source: http://tutorialzine.com/2015/02/freebie-7-responsive-header-templates/ (Quiz Template) */ 3 | .header-search{ 4 | background-color:#292c2f; 5 | box-shadow: 1px 2px 2px rgba(0, 0, 0, 0.15); 6 | padding: 20px 40px; 7 | height: 80px; 8 | /*height:15vh;*/ 9 | color: #ffffff; 10 | box-sizing: border-box; 11 | } 12 | 13 | .header-search .header-limiter { 14 | max-width: 1200px; 15 | text-align: center; 16 | margin: 0 auto; 17 | } 18 | 19 | /* Logo */ 20 | 21 | .header-search .header-limiter h1 { 22 | float: left; 23 | font: normal 28px Cookie, Arial, Helvetica, sans-serif; 24 | line-height: 40px; 25 | margin: 0; 26 | } 27 | 28 | .header-search .header-limiter h1 span { 29 | color: #5383d3; 30 | } 31 | 32 | /* The header links */ 33 | 34 | .header-search .header-limiter a { 35 | color: #ffffff; 36 | text-decoration: none; 37 | } 38 | 39 | .header-search .header-limiter nav { 40 | font:16px Arial, Helvetica, sans-serif; 41 | line-height: 40px; 42 | float: left; 43 | margin: 0 0 0 60px; 44 | padding: 0; 45 | } 46 | 47 | .header-search .header-limiter nav a { 48 | display: inline-block; 49 | padding: 0 5px; 50 | text-decoration:none; 51 | color: #ffffff; 52 | font-size: 16px; 53 | font-weight: normal; 54 | opacity: 0.9; 55 | } 56 | 57 | .header-search .header-limiter nav a:hover { 58 | opacity: 1; 59 | } 60 | 61 | .header-search .header-limiter nav a.selected { 62 | color: #608bd2; 63 | pointer-events: none; 64 | opacity: 1; 65 | } 66 | 67 | /* The search box */ 68 | 69 | .header-search .header-limiter form { 70 | float:right; 71 | position: relative; 72 | right: 30px; 73 | margin-left: 40px; 74 | border-radius: 3px; 75 | background-color: #3a3c3e; 76 | width: 44px; 77 | height: 39px; 78 | cursor: pointer; 79 | 80 | -ms-user-select: none; 81 | -moz-user-select: none; 82 | -webkit-user-select: none; 83 | user-select: none; 84 | } 85 | 86 | /* CSS search icon */ 87 | 88 | .header-search .header-limiter form:before { 89 | position: absolute; 90 | content: ''; 91 | border-radius: 50%; 92 | border: 2px solid #fff; 93 | width: 9px; 94 | height: 9px; 95 | top: 12px; 96 | left: 14px; 97 | } 98 | 99 | .header-search .header-limiter form:after { 100 | position: absolute; 101 | content: ''; 102 | background-color: #fff; 103 | width: 2px; 104 | height: 8px; 105 | top: 22px; 106 | left: 26px; 107 | -webkit-transform: rotate(-44deg); 108 | -moz-transform: rotate(-44deg); 109 | transform: rotate(-44deg); 110 | } 111 | 112 | /* The search box */ 113 | 114 | .header-search .header-limiter form input { 115 | display: none; 116 | position: absolute; 117 | right: 42px; 118 | padding: 11px 12px 9px; 119 | border: none; 120 | width: 210px; 121 | border-radius: 2px 0 0 2px; 122 | height: 39px; 123 | box-sizing: border-box; 124 | -webkit-appearance: none; 125 | -moz-appearance: none; 126 | appearance: none; 127 | } 128 | 129 | /* Making the header responsive. */ 130 | 131 | @media all and (max-width: 600px) { 132 | 133 | .header-search { 134 | height:18vh; 135 | padding: 15px; 136 | position: relative; 137 | } 138 | 139 | .header-search .header-limiter h1 { 140 | float:none; 141 | font-size: 24px; 142 | line-height: 1; 143 | } 144 | 145 | .header-search .header-limiter nav { 146 | text-align: center; 147 | float: none; 148 | margin: 0; 149 | } 150 | 151 | .header-search .header-limiter nav a { 152 | font-size: 13px; 153 | } 154 | 155 | .header-search .header-limiter form { 156 | position: absolute; 157 | top: 20px; 158 | right: 20px; 159 | } 160 | 161 | } 162 | -------------------------------------------------------------------------------- /wiki2plain.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # from http://stackoverflow.com/questions/4460921/extract-the-first-paragraph-from-a-wikipedia-article-python 4 | 5 | import re 6 | 7 | class Wiki2Plain: 8 | def __init__(self, wiki): 9 | self.wiki = wiki 10 | 11 | self.text = wiki 12 | self.text = self.unhtml(self.text) 13 | self.text = self.unwiki(self.text) 14 | self.text = self.punctuate(self.text) 15 | 16 | def __str__(self): 17 | return self.text 18 | 19 | def unwiki(self, wiki): 20 | """ 21 | Remove wiki markup from the text. 22 | """ 23 | wiki = re.sub(r'(?i)\{\{IPA(\-[^\|\{\}]+)*?\|([^\|\{\}]+)(\|[^\{\}]+)*?\}\}', lambda m: m.group(2), wiki) 24 | wiki = re.sub(r'(?i)\{\{Lang(\-[^\|\{\}]+)*?\|([^\|\{\}]+)(\|[^\{\}]+)*?\}\}', lambda m: m.group(2), wiki) 25 | wiki = re.sub(r'\{\{[^\{\}]+\}\}', '', wiki) 26 | wiki = re.sub(r'(?m)\{\{[^\{\}]+\}\}', '', wiki) 27 | wiki = re.sub(r'(?m)\{\|[^\{\}]*?\|\}', '', wiki) 28 | wiki = re.sub(r'(?i)\[\[Category:[^\[\]]*?\]\]', '', wiki) 29 | wiki = re.sub(r'(?i)\[\[Image:[^\[\]]*?\]\]', '', wiki) 30 | wiki = re.sub(r'(?i)\[\[File:[^\[\]]*?\]\]', '', wiki) 31 | wiki = re.sub(r'\[\[[^\[\]]*?\|([^\[\]]*?)\]\]', lambda m: m.group(1), wiki) 32 | wiki = re.sub(r'\[\[([^\[\]]+?)\]\]', lambda m: m.group(1), wiki) 33 | wiki = re.sub(r'\[\[([^\[\]]+?)\]\]', '', wiki) 34 | wiki = re.sub(r'(?i)File:[^\[\]]*?', '', wiki) 35 | wiki = re.sub(r'\[[^\[\]]*? ([^\[\]]*?)\]', lambda m: m.group(1), wiki) 36 | wiki = re.sub(r"''+", '', wiki) 37 | wiki = re.sub(r'(?m)^\*$', '', wiki) 38 | 39 | return wiki 40 | 41 | def unhtml(self, html): 42 | """ 43 | Remove HTML from the text. 44 | """ 45 | html = re.sub(r'(?i) ', ' ', html) 46 | html = re.sub(r'(?i)', '\n', html) 47 | html = re.sub(r'(?m))?\s*([^\\/:*?<>"|%]+\.[^\\/:*?<>"|%]{3,4})', self.wiki) 80 | match = re.search(r'(?i)([^\\/:*?<>"|% =]+)\.(gif|jpg|jpeg|png|bmp)', self.wiki) 81 | 82 | if match: 83 | return '%s.%s' % match.groups() 84 | 85 | return None 86 | 87 | if __name__ == '__main__': 88 | # @link http://simple.wikipedia.org/w/index.php?action=raw&title=Uruguay 89 | wiki = """[[File:LocationUruguay.png|right|]] 90 | '''Uruguay''' is a country in [[South America]]. The language spoken there is Spanish. Its [[capital (city)|capital]] and largest [[city]] is [[Montevideo]]. Uruguay is bordered by two large neighbors, [[Brazil]] and [[Argentina]]. The only country in South America that is smaller than Uruguay is [[Suriname]]. 91 | The land there is mostly flat and they have many farms there. 92 | {{geo-stub}} 93 | {{South America}} 94 | {{Link FA|af}} 95 | {{Link FA|ast}} 96 | {{Link FA|ca}} 97 | [[Category:Uruguay| ]]""" 98 | 99 | wiki2plain = Wiki2Plain(wiki) 100 | content = wiki2plain.text 101 | image = wiki2plain.image() 102 | 103 | print('---') 104 | print(content) 105 | print('---') 106 | print(image) 107 | print('---') 108 | -------------------------------------------------------------------------------- /templates/js/gameController.js: -------------------------------------------------------------------------------- 1 | // We have used the basic javascript model for quiz game from this website and modified it to fetch our own data. 2 | // http://www.flashbynight.com/tutes/mcqquiz/ (Quiz Template) 3 | 4 | 5 | $(document).ready(function () { 6 | $('#header').load('header.html'); 7 | var questionNumber=0; 8 | var questionBank=new Array(); 9 | var stage="#game1"; 10 | var stage2=new Object; 11 | var questionLock=false; 12 | var numberOfQuestions; 13 | var score=0; 14 | var difficulty="easy"; 15 | var diffSelected = false; 16 | var gameSelection=0; 17 | selectGame(); 18 | 19 | function fetchQuestion(){ 20 | if(gameSelection==1){ 21 | url = "https://opentdb.com/api.php?amount=5&difficulty="+difficulty 22 | }else{ 23 | url = "/questions" 24 | } 25 | $.get( url, function( data ) { 26 | var questions = data["results"]; 27 | for(i=0;i'+"Select Difficulty Level"+'
    '+"Easy"+'
    '+"Medium"+'
    '+"Hard"+'
    '); 42 | $('.option').click(function(){ 43 | difficulty = this.innerText; 44 | difficulty= difficulty.toLowerCase(); 45 | changeSlide(); 46 | fetchQuestion(); 47 | }) 48 | } 49 | 50 | function selectGame(){ 51 | $(stage).append('
    '+"Select Game Type"+'
    '+"Quiz"+'
    '+"Learning Game"+'
    '); 52 | $('.option').click(function(){ 53 | gameSelection = this.id; 54 | changeSlide(); 55 | if(gameSelection==1){ 56 | selectDifficulty(); 57 | }else{ 58 | fetchQuestion(); 59 | } 60 | }) 61 | } 62 | 63 | function displayQuestion(){ 64 | var numberOfoptions = questionBank[questionNumber].length-1; 65 | 66 | var rnd=Math.random()*numberOfoptions; 67 | rnd=Math.ceil(rnd); 68 | var optionHtml = ''; 69 | var optionList = []; 70 | var indexList = []; 71 | for(j=1; j<=numberOfoptions;j++){ 72 | optionList.push(j); 73 | indexList.push(j); 74 | } 75 | optionList.splice(optionList.indexOf(1),1); 76 | var i=0; 77 | for(j=0;j'+questionBank[questionNumber][indexList[i-1]]+''; 88 | } 89 | 90 | $(stage).append('
    '+questionBank[questionNumber][0]+'
    '+optionHtml); 91 | // alert(questionBank[questionNumber][1]); -- To check answer uncomment this. 92 | $('.option').click(function(){ 93 | if(questionLock==false){ 94 | questionLock=true; 95 | //correct answer 96 | if(this.id==rnd){ 97 | $(stage).append('
    CORRECT
    '); 98 | score++; 99 | } 100 | //wrong answer 101 | if(this.id!=rnd){ 102 | $(stage).append('
    WRONG
    '); 103 | } 104 | setTimeout(function(){changeQuestion()},1000); 105 | } 106 | }) 107 | } 108 | 109 | //Function to handle for change to next question. 110 | function changeQuestion(){ 111 | questionNumber++; 112 | if(stage=="#game1"){ 113 | stage2="#game1"; 114 | stage="#game2"; 115 | } 116 | else{ 117 | stage2="#game2"; 118 | stage="#game1"; 119 | } 120 | 121 | if(questionNumberYou have finished the quiz!

    Total questions: '+numberOfQuestions+'
    Correct answers: '+score+''); 159 | $(stage).append('
    ') 160 | } 161 | });//doc ready -------------------------------------------------------------------------------- /graphplot.py: -------------------------------------------------------------------------------- 1 | import matplotlib.pyplot as plt 2 | import wiki_parser 3 | import wiki_trivia_metric_calculator 4 | import os 5 | import textwrap 6 | import algorithm_wrapper 7 | 8 | category_entity_cache_dir = "catentcache/" 9 | output_cache_graph = "graphCache/" 10 | 11 | def drawSimPlot(entity, category): 12 | wiki_parser_instance = wiki_parser.WikiParser() 13 | wiki_trivia_metric_calculator_instance = wiki_trivia_metric_calculator.WikiTriviaMetricCalculator() 14 | tokens = wiki_parser_instance.getEntityTokens(entity) 15 | topk1 = wiki_trivia_metric_calculator_instance.getTopKTFIDFforEntity(tokens) 16 | full_path = category_entity_cache_dir + category + '/' 17 | outer_list = [] 18 | for (root, dirs, files) in os.walk(full_path): 19 | for file in files: 20 | if file.endswith('.txt'): 21 | inner_list = [] 22 | current_file = open(os.path.join(root, file), "r") 23 | for line in current_file: 24 | line = line.replace('\n', '') 25 | inner_list.append(line) 26 | outer_list.append(inner_list) 27 | size_new = len(outer_list) 28 | sim_list = [] 29 | for i in range(0, size_new): 30 | sim_list.append(wiki_trivia_metric_calculator_instance.getEntitySimilarity(topk1, outer_list[i])) 31 | tups = zip(*enumerate(sim_list)) 32 | plt.plot(tups[0], tups[1], label=str("10"), color="r") 33 | plt.ylim((0.0, 1.0)) 34 | plt.legend().draggable() 35 | plt.show() 36 | 37 | def drawSimPlotFixed(wiki_parser_instance, wiki_trivia_metric_calculator_instance): 38 | initial_list = ["Jimmy Carter", "Bill Clinton", "Hillary Clinton", "Elizabeth Warren", "Joe Biden", "Chuck Schumer"] 39 | grammy_winners = ["Paula Abdul", "50 Cent", "Adele", "Yolanda Adams", "Bryan Adams", "John Addison"] 40 | tokens = wiki_parser_instance.getEntityTokens("Barack Obama") 41 | topk_contenders = [5, 10, 20, 40, 50] 42 | colors = ["r", "g", "b", "y", "m"] 43 | plt.figure(2) 44 | size_new = len(topk_contenders) 45 | for i in range(0, size_new): 46 | wiki_trivia_metric_calculator_instance.k_val = topk_contenders[i] 47 | topk1 = wiki_trivia_metric_calculator_instance.getTopKTFIDFforEntity(tokens) 48 | graph_list = [] 49 | for val in initial_list: 50 | top_current = wiki_parser_instance.getEntityTokens(val) 51 | topk_current = wiki_trivia_metric_calculator_instance.getTopKTFIDFforEntity(top_current) 52 | graph_list.append(wiki_trivia_metric_calculator_instance.getEntitySimilarity(topk1, topk_current)) 53 | tups = zip(*enumerate(graph_list)) 54 | plt.subplot(211) 55 | plt.xticks(tups[0], [textwrap.fill(text, 10) for text in initial_list]) 56 | plt.ylim((0.0, 1.0)) 57 | plt.plot(tups[0], tups[1], label=str(topk_contenders[i]), color=colors[i]) 58 | 59 | graph_list_new = [] 60 | for val in grammy_winners: 61 | top_current = wiki_parser_instance.getEntityTokens(val) 62 | topk_current = wiki_trivia_metric_calculator_instance.getTopKTFIDFforEntity(top_current) 63 | graph_list_new.append(wiki_trivia_metric_calculator_instance.getEntitySimilarity(topk1, topk_current)) 64 | tups_new = zip(*enumerate(graph_list_new)) 65 | plt.subplot(212) 66 | plt.xticks(tups_new[0], [textwrap.fill(text, 10) for text in grammy_winners]) 67 | plt.ylim((0.0, 1.0)) 68 | plt.plot(tups_new[0], tups_new[1], label=str(topk_contenders[i]), color=colors[i]) 69 | plt.legend(title="Top k tokens").draggable() 70 | plt.show() 71 | 72 | 73 | def drawScatterPlot(entity): 74 | x = [] 75 | y = [] 76 | anno = [] 77 | cats = ["Category20thcenturyAmericanwriters", "CategoryAmericanNobellaureates", "CategoryGrammyAwardwinners" 78 | , "CategoryWashingtonDCDemocrats", "CategoryPunahouSchoolalumni", "Category1961births", "CategoryUnitedStatespresidentialcandidates2012", 79 | "CategoryPoliticiansfromChicago"] 80 | path = output_cache_graph 81 | max_count = 10 82 | for (root, dirs, files) in os.walk(path): 83 | count = 0 84 | for file in files: 85 | if file.endswith('.txt'): 86 | current_file = open(os.path.join(root, file), "r") 87 | odd = True 88 | anno.append(file[:-4]) 89 | for line in current_file: 90 | line = line.replace('\n', '') 91 | if odd: 92 | x.append(line) 93 | else: 94 | y.append(line) 95 | odd = False 96 | plt.figure(3) 97 | fig, ax = plt.subplots() 98 | plt.title("Barack Obama Cohesiveness vs Surprise") 99 | plt.xlabel("Surprise") 100 | plt.ylabel("Cohesiveness") 101 | ax.scatter(x, y) 102 | for i, txt in enumerate(anno): 103 | if txt in cats: 104 | ax.annotate(txt, (x[i], y[i])) 105 | print(len(anno)) 106 | plt.show() 107 | 108 | def graphCache(entity, wiki_parser_instance, wiki_trivia_metric_calculator_instance): 109 | entity_cats = wiki_parser_instance.getCategoryForEntity(entity) 110 | if not os.path.exists(output_cache_graph): 111 | os.makedirs(output_cache_graph) 112 | for entity_cat in entity_cats: 113 | full_path = output_cache_graph + algorithm_wrapper.cleanifyPath(entity_cat) + ".txt" 114 | surprise = algorithm_wrapper.surprise(entity, entity_cat, wiki_parser_instance,wiki_trivia_metric_calculator_instance) 115 | if surprise: 116 | cohes = algorithm_wrapper.cohesivness(entity_cat.split(":")[1], wiki_trivia_metric_calculator_instance) 117 | if cohes: 118 | target = open(full_path, "w") 119 | target.write('%s' % surprise) 120 | target.write("\n") 121 | target.write('%s' % cohes) 122 | target.write("\n") 123 | target.close() 124 | 125 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /algorithm_wrapper.py: -------------------------------------------------------------------------------- 1 | import wiki_parser 2 | import wiki_trivia_metric_calculator 3 | import Util as util 4 | import pdb 5 | import os 6 | import operator 7 | 8 | #globals 9 | category_entity_cache_dir = "catentcache/" 10 | output_cache_dir = "outputCache/" 11 | surprise_weight = 1.1 12 | 13 | wiki_parser_instance = None 14 | wiki_trivia_metric_calculator_instance = None 15 | 16 | 17 | def triviaAlgorithm(search_entity, wiki_parser_instance=None, wiki_trivia_metric_calculator_instance=None): 18 | entity = util.searchWiki(search_entity) 19 | if not entity: 20 | return 21 | print("Entity Found: " + entity) 22 | # Check for the Output Cache 23 | full_path = output_cache_dir + entity + ".txt" 24 | if not os.path.exists(output_cache_dir): 25 | os.makedirs(output_cache_dir) 26 | 27 | answer_mat = {} 28 | if os.path.isfile(full_path): 29 | open_output_file = open(full_path, "r") 30 | for line in open_output_file: 31 | trivia, score = line.split(":") 32 | answer_mat[trivia] = score 33 | open_output_file.close() 34 | answer_mat = sorted(answer_mat.items(), key=operator.itemgetter(1), reverse=True) 35 | return answer_mat 36 | 37 | 38 | # If the cache doesn't exist- Make the new one for the said entity 39 | entity_cats = wiki_parser_instance.getCategoryForEntity(entity) 40 | if not entity_cats: 41 | return 42 | if not os.path.exists(category_entity_cache_dir): 43 | os.makedirs(category_entity_cache_dir) 44 | for entity_cat in entity_cats: 45 | surprise_fact = surprise(entity, entity_cat, wiki_parser_instance, wiki_trivia_metric_calculator_instance) 46 | if surprise_fact: 47 | answer_mat[entity_cat.split(":")[1]] = surprise_fact 48 | cohes_score = cohesivness(entity_cat.split(":")[1], wiki_trivia_metric_calculator_instance) 49 | if cohes_score: 50 | answer_mat[entity_cat.split(":")[1]] *= cohes_score 51 | else: 52 | answer_mat[entity_cat.split(":")[1]] = 0.0 53 | print("<------------- ----------------->") 54 | print("Overall score for cat ", entity_cat, " is ", answer_mat[entity_cat.split(":")[1]]) 55 | print("Ending <------------- ----------------->") 56 | answer_mat = sorted(answer_mat.items(), key=operator.itemgetter(1), reverse=True) 57 | target = open(full_path, "w") 58 | for key in answer_mat: 59 | target.write(key[0] + ":" + repr(key[1])) 60 | target.write("\n") 61 | target.close() 62 | return answer_mat 63 | 64 | def surprise(entity_input, entity_cat, wiki_parser_instance, wiki_trivia_metric_calculator_instance): 65 | sum = 0.0 66 | count = 0.0 67 | entity_input_tokens = wiki_parser_instance.getEntityTokens(entity_input) 68 | entity_input_top = wiki_trivia_metric_calculator_instance.getTopKTFIDFforEntity(entity_input_tokens) 69 | ent_cat_path = entity_cat.split(":")[1] 70 | path = category_entity_cache_dir + cleanifyPath(ent_cat_path) + "/" 71 | if os.path.exists(path): 72 | print("Reading from file ") 73 | outer_list = [] 74 | for(root, dirs, files) in os.walk(path): 75 | for file in files: 76 | if file.endswith('.txt'): 77 | inner_list = [] 78 | current_file = open(os.path.join(root, file), "r") 79 | for line in current_file: 80 | line = line.replace('\n', '') 81 | inner_list.append(line) 82 | outer_list.append(inner_list) 83 | size_new = len(outer_list) 84 | for i in range(0, size_new): 85 | sum += wiki_trivia_metric_calculator_instance.getEntitySimilarity(entity_input_top, outer_list[i]) 86 | count += 1.0 87 | answer = sum / count 88 | print("surprise for ", entity_cat, " is ", (1.0 / answer)) 89 | return (1.0 / answer) 90 | 91 | new_entities = wiki_parser_instance.getEntityforCategory(entity_cat) 92 | if not new_entities: 93 | return 94 | 95 | for new_entity in new_entities: 96 | if new_entity != entity_input: 97 | new_entity_tokens = wiki_parser_instance.getEntityTokens(new_entity) 98 | new_entity_tokens_top = wiki_trivia_metric_calculator_instance.getTopKTFIDFforEntity(new_entity_tokens) 99 | new_entity_top_cache = category_entity_cache_dir + cleanifyPath(ent_cat_path) + "/" 100 | if not os.path.exists(new_entity_top_cache): 101 | os.makedirs(new_entity_top_cache) 102 | cache_file_name = new_entity_top_cache + cleanifyPath(new_entity) + ".txt" 103 | target = open(cache_file_name, "w") 104 | for top_token in new_entity_tokens_top: 105 | target.write(top_token) 106 | target.write("\n") 107 | target.close() 108 | sum += wiki_trivia_metric_calculator_instance.getEntitySimilarity(entity_input_top, new_entity_tokens_top) 109 | count += 1.0 110 | answer = sum / count 111 | print("surprise for " , entity_cat, " is ", (1.0/answer)) 112 | return (1.0 / answer) 113 | 114 | def cohesivness(entity_cat, wiki_trivia_metric_calculator_instance): 115 | sum = 0.0 116 | count = 0.0 117 | #answer = sum / count 118 | path = category_entity_cache_dir + cleanifyPath(entity_cat) + "/" 119 | outer_list = [] 120 | for(root, dirs, files) in os.walk(path): 121 | for file in files: 122 | if file.endswith('.txt'): 123 | inner_list = [] 124 | current_file = open(os.path.join(root, file), "r") 125 | for line in current_file: 126 | line = line.replace('\n', '') 127 | inner_list.append(line) 128 | outer_list.append(inner_list) 129 | size_new = len(outer_list) 130 | for i in range(0, size_new): 131 | for j in range(i+1, size_new): 132 | sum += wiki_trivia_metric_calculator_instance.getEntitySimilarity(outer_list[i], outer_list[j]) 133 | count += 1.0 134 | if count == 0.0: 135 | return 0.0 136 | answer = sum / count 137 | print("Cohes is for cat ", entity_cat, " is ", answer) 138 | return answer 139 | 140 | def cleanifyPath(path): 141 | path = ''.join(e for e in path if e.isalnum()) 142 | return path 143 | 144 | if __name__ == "__main__": 145 | cohesivness("Argentine Roman Catholics", wiki_trivia_metric_calculator.WikiTriviaMetricCalculator()) 146 | 147 | -------------------------------------------------------------------------------- /topEntityList.txt: -------------------------------------------------------------------------------- 1 | Charlie Murphy 2 | [[Sergio Garc��a]] 3 | Justin Rose 4 | Asia Carrera 5 | Katherine Langford 6 | Eddie Murphy 7 | Dylan Minnette 8 | Kendrick Lamar 9 | Bashar al-Assad 10 | Darth Vader 11 | [[Lali Esp��sito]] 12 | Paulo Dybala 13 | Sarah Rector 14 | Donald Trump 15 | Maundy Thursday 16 | Seve Ballesteros 17 | [[Par��cutin]] 18 | Kim Jong-un 19 | J. Geils 20 | Sean Spicer 21 | B. R. Ambedkar 22 | Vin Diesel 23 | Jamini Roy 24 | Dwayne Johnson 25 | Susanna M. Salter 26 | Kulbhushan Yadav 27 | Don Rickles 28 | USS Carl Vinson 29 | Aaron Hernandez 30 | Charlize Theron 31 | Vinod Khanna 32 | Cristiano Ronaldo 33 | Brandon Flynn 34 | Joan Crawford 35 | Battle of Vimy Ridge 36 | Paul Walker 37 | Elizabeth II 38 | Louis C.K. 39 | Miles Heizer 40 | The Chainsmokers 41 | Alisha Boe 42 | Jacqueline Kennedy Onassis 43 | Ross Butler (actor) 44 | Emma Watson 45 | Oscar Munoz (executive) 46 | Adolf Hitler 47 | Tiger Woods 48 | Cate Blanchett 49 | Rickie Fowler 50 | Ed Sheeran 51 | Wissam Al Mana 52 | Elon Musk 53 | Tsar Bomba 54 | Malala Yousafzai 55 | Mia Khalifa 56 | O. J. Simpson 57 | RMS Titanic 58 | Rick and Morty 59 | Scott Eastwood 60 | Neil Gorsuch 61 | Nikki Haley 62 | Jason Statham 63 | Robert J. Bentley 64 | Selena Gomez 65 | Heath Ledger 66 | Michelle Rodriguez 67 | Mary, Queen of Scots 68 | Albert Einstein 69 | Vladimir Putin 70 | Dan Rooney 71 | Tinsley Mortimer 72 | Janet Jackson 73 | Lionel Messi 74 | Luke Evans (actor) 75 | Anthony Johnson (fighter) 76 | Tupac Shakur 77 | Warren Beatty 78 | John Cena 79 | John F. Kennedy 80 | Scarlett Johansson 81 | Barack Obama 82 | Rex Tillerson 83 | Abraham Lincoln 84 | Wentworth Miller 85 | Christian Navarro 86 | Jennifer Aniston 87 | Tony Romo 88 | Efraim Diveroli 89 | Jesus 90 | Bette Davis 91 | Jordan Spieth 92 | Pablo Escobar 93 | Easter Bunny 94 | Stephen Hawking 95 | Dave Chappelle 96 | Eminem 97 | Clint Eastwood 98 | Michael Jackson 99 | Jared Kushner 100 | Ray Kroc 101 | Marty Akins 102 | Russell Westbrook 103 | Gegard Mousasi 104 | Daniel Cormier 105 | Kaatru Veliyidai 106 | Mr. T 107 | LeBron James 108 | Juventus F.C. 109 | [[Zlatan Ibrahimovi��]] 110 | Rashad Jennings 111 | Sheila Abdus-Salaam 112 | Michael Jordan 113 | Arnold Palmer 114 | Bruno Mars 115 | Persona 5 116 | Kim Il-sung 117 | Steve Jobs 118 | Kim Kardashian 119 | Nancy Kerrigan 120 | Kendall Jenner 121 | Erika Jayne 122 | Fritzl case 123 | Carrie Fisher 124 | Caitlyn Jenner 125 | [[Schr��dinger's cat]] 126 | Sandy Wexler 127 | Robert Kardashian 128 | Dan Stevens 129 | World War III 130 | Allen Gregory 131 | Gianluigi Buffon 132 | David Packouz 133 | Queen Victoria 134 | Rothschild family 135 | Elvis Presley 136 | Arnold Schwarzenegger 137 | Shakira 138 | Melania Trump 139 | Ted Kennedy 140 | Kim Jong-il 141 | Irina Shayk 142 | Tessa Thompson 143 | Passover Seder 144 | Elsa Pataky 145 | Easter egg 146 | Morgan Freeman 147 | Bill O'Reilly (political commentator) 148 | Bradley Cooper 149 | Harry Styles 150 | Chris Hemsworth 151 | Tom Cruise 152 | Mila Kunis 153 | Ivanka Trump 154 | John Clarke (satirist) 155 | Kate Walsh (actress) 156 | Kay Ivey 157 | Leonardo DiCaprio 158 | Bruce Lee 159 | J. K. Rowling 160 | Peter Wolf 161 | Woodrow Wilson 162 | Charles Manson 163 | [[Beyonc��]] 164 | Tom Hardy 165 | Vishu 166 | Barrel bomb 167 | Gordon Ramsay 168 | Nicole Kidman 169 | Doctor Who 170 | Sunny Leone 171 | Winston Churchill 172 | Bob Marley 173 | Mary Pickford 174 | Todd Heap 175 | Justin Bieber 176 | Nathalie Emmanuel 177 | Hugh Hefner 178 | Jack Nicklaus 179 | Olivia Munn 180 | Naam Shabana 181 | Adam Sandler 182 | Dean Ambrose 183 | Jackie Robinson 184 | Ludacris 185 | Akshay Kumar 186 | George VI 187 | Frank Sinatra 188 | Elizabeth I of England 189 | Mel B 190 | Grey's Anatomy 191 | Korean People's Army 192 | The Big Bang Theory 193 | [[Kylian Mbapp��]] 194 | Selena 195 | Kurt Russell 196 | Rooney Mara 197 | Martin Luther King Jr. 198 | Ariana Grande 199 | Justin Prentice 200 | Ronald Reagan 201 | Joseph Stalin 202 | Bill Paxton 203 | Alexander Hamilton 204 | Roman Reigns 205 | Yooka-Laylee 206 | Jehovah's Witnesses 207 | Johnny Depp 208 | Ashton Kutcher 209 | Prince (musician) 210 | Hugh Jackman 211 | Bill Gates 212 | Ryan Reynolds 213 | Steve Bannon 214 | Jimmy Carter 215 | John Calipari 216 | Asma al-Assad 217 | Zyklon B 218 | Felicity Jones 219 | Josh Brolin 220 | Oscar Robertson 221 | Simone Biles 222 | Mahatma Gandhi 223 | Harry Potter 224 | Stephen Curry 225 | Soviet Union 226 | Ross Barkley 227 | Jennifer Lawrence 228 | Franklin D. Roosevelt 229 | Gwen Stefani 230 | Johnny Cash 231 | Chris Pratt 232 | Invader (artist) 233 | The Weeknd 234 | Kris Jenner 235 | Alia Bhatt 236 | Rihanna 237 | Aditi Rao Hydari 238 | [[Alexander Skarsg��rd]] 239 | Alan Turing 240 | Sylvester Stallone 241 | Kylie Jenner 242 | Kristen Stewart 243 | Jennifer Lopez 244 | Robin Williams 245 | Park Hyung-sik 246 | Brad Pitt 247 | Angelina Jolie 248 | Drake (musician) 249 | Borussia Dortmund 250 | Nikki Bella 251 | Devin Druid 252 | BTS (band) 253 | Freddie Mercury 254 | Ottoman Empire 255 | Robert Downey Jr. 256 | Joan Bennett Kennedy 257 | Charles, Prince of Wales 258 | Anne Hathaway 259 | Prince Philip, Duke of Edinburgh 260 | Stranger Things 261 | Chris Andersen 262 | Marilyn Monroe 263 | Katherine Johnson 264 | Shinsuke Nakamura 265 | Keanu Reeves 266 | William Shakespeare 267 | Fallen Astronaut 268 | Aristotle Onassis 269 | Education 270 | Will Smith 271 | Edward Snowden 272 | Michael Caine 273 | Leonardo da Vinci 274 | Desmond Doss 275 | Conor McGregor 276 | James Franco 277 | Vasyl Lomachenko 278 | Betty White 279 | Shah Rukh Khan 280 | Jackie Chan 281 | Reese Witherspoon 282 | Wyatt Earp 283 | Kevin Hart 284 | Madonna (entertainer) 285 | Real Madrid C.F. 286 | Smokey Robinson 287 | Rick James 288 | Friends 289 | Taika Waititi 290 | Rashida Jones 291 | [[Battle of Mosul (2016���17)]] 292 | Brie Larson 293 | HP LoadRunner 294 | Mark Zuckerberg 295 | Sarah Michelle Gellar 296 | Dzhokhar Tsarnaev 297 | Stan Lee 298 | Lent 299 | Alec Baldwin 300 | Justin Trudeau 301 | Chris Weidman 302 | Tom Hanks 303 | Thomas Jefferson 304 | Emma Stone 305 | Bernard Madoff 306 | MS Dhoni 307 | The Beatles 308 | Kane (wrestler) 309 | Warren Buffett 310 | Justin Theroux 311 | Zayn Malik 312 | Princess Margaret, Countess of Snowdon 313 | Donald Glover 314 | Richard and Maurice McDonald 315 | Matt Kuchar 316 | Sian Gibson 317 | Sachin Tendulkar 318 | John F. Kennedy Jr. 319 | James McAvoy 320 | Edward VIII 321 | Ted Bundy 322 | Edward IV of England 323 | Jude Law 324 | Ben Affleck 325 | Priyanka Chopra 326 | Mark Wahlberg 327 | Henry VII of England 328 | Jeffrey Dahmer 329 | Taylor Swift 330 | Tom Hiddleston 331 | Phil Mickelson 332 | Jeff Hardy 333 | Jennifer Hudson 334 | Britney Spears 335 | Katy Perry 336 | Amy Hargreaves 337 | Shailene Woodley 338 | Diana, Princess of Wales 339 | Jason Momoa 340 | Charlie Chaplin 341 | Marc Bartra 342 | California 343 | Matthew McConaughey 344 | Derek Luke (actor) 345 | Jenna Elfman 346 | Tyrese Gibson 347 | Carter Page 348 | Rory McIlroy 349 | The Godfather 350 | [[Zo�� Kravitz]] 351 | Helen Mirren 352 | Virat Kohli 353 | Richard Nixon 354 | Saroo Brierley 355 | Kanye West 356 | Meghan Markle 357 | Idris Elba 358 | Jane Fonda 359 | Blake Lively 360 | Cameron Monaghan 361 | Chris Evans (actor) 362 | Miley Cyrus 363 | Lil Dicky 364 | Ryan Gosling 365 | Emilia Clarke 366 | Dev Patel 367 | Napoleon 368 | David Letterman 369 | Jeffrey Dean Morgan 370 | Elizabeth Woodville 371 | Cher 372 | Hannah Baker 373 | Marshawn Lynch 374 | George Washington 375 | Sonia Sotomayor 376 | Tommy Chong 377 | George W. Bush 378 | Nikola Tesla 379 | Pierce Brosnan 380 | Shaquille O'Neal 381 | Shia LaBeouf 382 | Gigi Hadid 383 | Ana de Armas 384 | Billie Lourd 385 | Dele Alli 386 | Daisy Ridley 387 | Rowan Atkinson 388 | Ku Klux Klan 389 | Paige (wrestler) 390 | Ariel Winter 391 | Muhammad 392 | Zac Efron 393 | Ewan McGregor 394 | Audrey Hepburn 395 | Deepika Padukone 396 | Brittany Murphy 397 | Salman Khan 398 | Dear Evan Hansen 399 | Walt Disney 400 | Nintendo Switch 401 | Keri Russell 402 | Standard deviation 403 | Richard Gere 404 | George H. W. Bush 405 | Brooklyn Nine-Nine 406 | Natalie Portman 407 | John Travolta 408 | Snoop Dogg 409 | Kourtney Kardashian 410 | Jon Jones 411 | Little Boy 412 | [[Bill Skarsg��rd]] 413 | Kate Mara 414 | John Lennon 415 | Hank Azaria 416 | Brock Lesnar 417 | Jennifer Love Hewitt 418 | Renee Young 419 | Bee Gees 420 | Harrison Ford 421 | Ramzan Kadyrov 422 | Samurai Jack 423 | Alicia Keys 424 | Taiwan 425 | Jordana Brewster 426 | Premier League 427 | Sia Furler 428 | Stephen King 429 | Alexander the Great 430 | Captain America: Civil War 431 | Giannis Antetokounmpo 432 | Julia Roberts 433 | Meryl Streep 434 | Henrietta Lacks 435 | Oskar Schindler 436 | Rob Lowe 437 | Margot Robbie 438 | Kate Beckinsale 439 | Elizabeth of York 440 | Howard Hughes 441 | Charlie Hunnam 442 | Saudi Arabia 443 | Mel Gibson 444 | Marlon Brando 445 | [[Jos�� Mar��a Olaz��bal]] 446 | Hayden Christensen 447 | M. Night Shyamalan 448 | Matt Hardy 449 | Lady Gaga 450 | Ellen DeGeneres 451 | Walter Tavares 452 | Dr. Dre 453 | Robert De Niro 454 | David Bowie 455 | Neymar 456 | Richard III of England 457 | Amy Adams 458 | Chrissy Teigen 459 | Dwight D. Eisenhower 460 | Genghis Khan 461 | Yogi Adityanath 462 | Alexandra Daddario 463 | John Mayer 464 | Wolverine (character) 465 | Jake Gyllenhaal 466 | Jim Carrey 467 | Judy Garland 468 | Bill Clinton 469 | James Mattis 470 | Olivia de Havilland 471 | Lana Del Rey 472 | Nicki Minaj 473 | S. S. Rajamouli 474 | Helen Keller 475 | Jennifer Garner 476 | Cameron Diaz 477 | A.C. Milan 478 | Kobe Bryant 479 | Triple H 480 | Rupert Friend 481 | Theodore Roosevelt 482 | Carl Vinson 483 | Bella Thorne 484 | Daniel Radcliffe 485 | Ruth Bader Ginsburg 486 | David Ross (baseball) 487 | Kurt Cobain 488 | Demi Moore 489 | Al Pacino 490 | Ernest Hemingway 491 | Yuri Gagarin 492 | Led Zeppelin 493 | Scott Adkins 494 | Benedict Cumberbatch 495 | Chernobyl disaster 496 | Anna Kendrick 497 | Lyndon B. Johnson 498 | Charlie Sheen 499 | Mark Hamill 500 | Cara Delevingne 501 | Adele 502 | Pink Floyd 503 | Pontius Pilate 504 | Moses 505 | Liam Hemsworth 506 | Demi Lovato 507 | Rosario Dawson 508 | Wayne Gretzky 509 | Bob Dylan 510 | Hedda Hopper 511 | Red panda 512 | The Founder 513 | Julius Caesar 514 | Nazi Germany 515 | Muhammad Ali 516 | Toby Smith 517 | Emma Roberts 518 | Pyongyang 519 | Disha Patani 520 | Tony Adams 521 | Emma Morano 522 | DJ Khaled 523 | Jon Ossoff 524 | Demetrious Johnson (fighter) 525 | Chuck Berry 526 | Goldie Hawn 527 | Michelle Williams (actress) 528 | Reinsurance 529 | Fred Couples 530 | The Pirate Bay 531 | Jamiroquai 532 | Jim Jones 533 | Harriet Tubman 534 | Kaley Cuoco 535 | Joey Badass 536 | Eva Mendes 537 | Lewis Hamilton 538 | Kirk Douglas 539 | Thandie Newton 540 | Dave Franco 541 | F. Scott Fitzgerald 542 | Al Capone 543 | Lizzie Borden 544 | Jordan Peele 545 | Jessica Henwick 546 | Andy Milonakis 547 | Robert F. Kennedy 548 | Romelu Lukaku 549 | Roman Empire 550 | Justin Timberlake 551 | Saddam Hussein 552 | Park Bo-young 553 | Pahela Baishakh 554 | Sean Connery 555 | Jack Nicholson -------------------------------------------------------------------------------- /templates/js/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.6 (http://getbootstrap.com) 3 | * Copyright 2011-2015 Twitter, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>2)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.6",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.6",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.6",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.6",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.6",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth
    ',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.6",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.6",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.6",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); -------------------------------------------------------------------------------- /templates/js/jquery-2.2.1.min.js: -------------------------------------------------------------------------------- 1 | /*! jQuery v2.2.1 | (c) jQuery Foundation | jquery.org/license */ 2 | !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="2.2.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!k.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=d.createElement("script"),b.text=a,d.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:h.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(d=e.call(arguments,2),f=function(){return a.apply(b||this,d.concat(e.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)},input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return h.call(b,a)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&f.parentNode&&(this.length=1,this[0]=f),this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?void 0!==c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?h.call(n(a),this[0]):h.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||n.uniqueSort(e),D.test(a)&&e.reverse()),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.removeEventListener("DOMContentLoaded",J),a.removeEventListener("load",J),n.ready()}n.ready.promise=function(b){return I||(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(n.ready):(d.addEventListener("DOMContentLoaded",J),a.addEventListener("load",J))),I.promise(b)},n.ready.promise();var K=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)K(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},L=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function M(){this.expando=n.expando+M.uid++}M.uid=1,M.prototype={register:function(a,b){var c=b||{};return a.nodeType?a[this.expando]=c:Object.defineProperty(a,this.expando,{value:c,writable:!0,configurable:!0}),a[this.expando]},cache:function(a){if(!L(a))return{};var b=a[this.expando];return b||(b={},L(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[b]=c;else for(d in b)e[d]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=a[this.expando];if(void 0!==f){if(void 0===b)this.register(a);else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in f?d=[b,e]:(d=e,d=d in f?[d]:d.match(G)||[])),c=d.length;while(c--)delete f[d[c]]}(void 0===b||n.isEmptyObject(f))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!n.isEmptyObject(b)}};var N=new M,O=new M,P=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Q=/[A-Z]/g;function R(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Q,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:P.test(c)?n.parseJSON(c):c}catch(e){}O.set(a,b,c); 3 | }else c=void 0;return c}n.extend({hasData:function(a){return O.hasData(a)||N.hasData(a)},data:function(a,b,c){return O.access(a,b,c)},removeData:function(a,b){O.remove(a,b)},_data:function(a,b,c){return N.access(a,b,c)},_removeData:function(a,b){N.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=O.get(f),1===f.nodeType&&!N.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),R(f,d,e[d])));N.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){O.set(this,a)}):K(this,function(b){var c,d;if(f&&void 0===b){if(c=O.get(f,a)||O.get(f,a.replace(Q,"-$&").toLowerCase()),void 0!==c)return c;if(d=n.camelCase(a),c=O.get(f,d),void 0!==c)return c;if(c=R(f,d,void 0),void 0!==c)return c}else d=n.camelCase(a),this.each(function(){var c=O.get(this,d);O.set(this,d,b),a.indexOf("-")>-1&&void 0!==c&&O.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){O.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=N.get(a,b),c&&(!d||n.isArray(c)?d=N.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return N.get(a,c)||N.access(a,c,{empty:n.Callbacks("once memory").add(function(){N.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length",""],thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};$.optgroup=$.option,$.tbody=$.tfoot=$.colgroup=$.caption=$.thead,$.th=$.td;function _(a,b){var c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function aa(a,b){for(var c=0,d=a.length;d>c;c++)N.set(a[c],"globalEval",!b||N.get(b[c],"globalEval"))}var ba=/<|&#?\w+;/;function ca(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],o=0,p=a.length;p>o;o++)if(f=a[o],f||0===f)if("object"===n.type(f))n.merge(m,f.nodeType?[f]:f);else if(ba.test(f)){g=g||l.appendChild(b.createElement("div")),h=(Y.exec(f)||["",""])[1].toLowerCase(),i=$[h]||$._default,g.innerHTML=i[1]+n.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;n.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",o=0;while(f=m[o++])if(d&&n.inArray(f,d)>-1)e&&e.push(f);else if(j=n.contains(f.ownerDocument,f),g=_(l.appendChild(f),"script"),j&&aa(g),c){k=0;while(f=g[k++])Z.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var da=/^key/,ea=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,fa=/^([^.]*)(?:\.(.+)|)/;function ga(){return!0}function ha(){return!1}function ia(){try{return d.activeElement}catch(a){}}function ja(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ja(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=ha;else if(!e)return a;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return"undefined"!=typeof n&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(G)||[""],j=b.length;while(j--)h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.hasData(a)&&N.get(a);if(r&&(i=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&N.remove(a,"handle events")}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(N.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.rnamespace||a.rnamespace.test(g.namespace))&&(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!==this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,la=/\s*$/g;function pa(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function qa(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function ra(a){var b=na.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function sa(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(N.hasData(a)&&(f=N.access(a),g=N.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}O.hasData(a)&&(h=O.access(a),i=n.extend({},h),O.set(b,i))}}function ta(a,b){var c=b.nodeName.toLowerCase();"input"===c&&X.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}function ua(a,b,c,d){b=f.apply([],b);var e,g,h,i,j,k,m=0,o=a.length,p=o-1,q=b[0],r=n.isFunction(q);if(r||o>1&&"string"==typeof q&&!l.checkClone&&ma.test(q))return a.each(function(e){var f=a.eq(e);r&&(b[0]=q.call(this,e,f.html())),ua(f,b,c,d)});if(o&&(e=ca(b,a[0].ownerDocument,!1,a,d),g=e.firstChild,1===e.childNodes.length&&(e=g),g||d)){for(h=n.map(_(e,"script"),qa),i=h.length;o>m;m++)j=e,m!==p&&(j=n.clone(j,!0,!0),i&&n.merge(h,_(j,"script"))),c.call(a[m],j,m);if(i)for(k=h[h.length-1].ownerDocument,n.map(h,ra),m=0;i>m;m++)j=h[m],Z.test(j.type||"")&&!N.access(j,"globalEval")&&n.contains(k,j)&&(j.src?n._evalUrl&&n._evalUrl(j.src):n.globalEval(j.textContent.replace(oa,"")))}return a}function va(a,b,c){for(var d,e=b?n.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||n.cleanData(_(d)),d.parentNode&&(c&&n.contains(d.ownerDocument,d)&&aa(_(d,"script")),d.parentNode.removeChild(d));return a}n.extend({htmlPrefilter:function(a){return a.replace(ka,"<$1>")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=_(h),f=_(a),d=0,e=f.length;e>d;d++)ta(f[d],g[d]);if(b)if(c)for(f=f||_(a),g=g||_(h),d=0,e=f.length;e>d;d++)sa(f[d],g[d]);else sa(a,h);return g=_(h,"script"),g.length>0&&aa(g,!i&&_(a,"script")),h},cleanData:function(a){for(var b,c,d,e=n.event.special,f=0;void 0!==(c=a[f]);f++)if(L(c)){if(b=c[N.expando]){if(b.events)for(d in b.events)e[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);c[N.expando]=void 0}c[O.expando]&&(c[O.expando]=void 0)}}}),n.fn.extend({domManip:ua,detach:function(a){return va(this,a,!0)},remove:function(a){return va(this,a)},text:function(a){return K(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return ua(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=pa(this,a);b.appendChild(a)}})},prepend:function(){return ua(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=pa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return ua(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return ua(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(_(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return K(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!la.test(a)&&!$[(Y.exec(a)||["",""])[1].toLowerCase()]){a=n.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(_(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return ua(this,arguments,function(b){var c=this.parentNode;n.inArray(this,a)<0&&(n.cleanData(_(this)),c&&c.replaceChild(b,this))},a)}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),f=e.length-1,h=0;f>=h;h++)c=h===f?this:this.clone(!0),n(e[h])[b](c),g.apply(d,c.get());return this.pushStack(d)}});var wa,xa={HTML:"block",BODY:"block"};function ya(a,b){var c=n(b.createElement(a)).appendTo(b.body),d=n.css(c[0],"display");return c.detach(),d}function za(a){var b=d,c=xa[a];return c||(c=ya(a,b),"none"!==c&&c||(wa=(wa||n("