main.js 348 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574
  1. /******/ (function(modules) { // webpackBootstrap
  2. /******/ // The module cache
  3. /******/ var installedModules = {};
  4. /******/
  5. /******/ // The require function
  6. /******/ function __webpack_require__(moduleId) {
  7. /******/
  8. /******/ // Check if module is in cache
  9. /******/ if(installedModules[moduleId])
  10. /******/ return installedModules[moduleId].exports;
  11. /******/
  12. /******/ // Create a new module (and put it into the cache)
  13. /******/ var module = installedModules[moduleId] = {
  14. /******/ i: moduleId,
  15. /******/ l: false,
  16. /******/ exports: {}
  17. /******/ };
  18. /******/
  19. /******/ // Execute the module function
  20. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  21. /******/
  22. /******/ // Flag the module as loaded
  23. /******/ module.l = true;
  24. /******/
  25. /******/ // Return the exports of the module
  26. /******/ return module.exports;
  27. /******/ }
  28. /******/
  29. /******/
  30. /******/ // expose the modules object (__webpack_modules__)
  31. /******/ __webpack_require__.m = modules;
  32. /******/
  33. /******/ // expose the module cache
  34. /******/ __webpack_require__.c = installedModules;
  35. /******/
  36. /******/ // identity function for calling harmony imports with the correct context
  37. /******/ __webpack_require__.i = function(value) { return value; };
  38. /******/
  39. /******/ // define getter function for harmony exports
  40. /******/ __webpack_require__.d = function(exports, name, getter) {
  41. /******/ if(!__webpack_require__.o(exports, name)) {
  42. /******/ Object.defineProperty(exports, name, {
  43. /******/ configurable: false,
  44. /******/ enumerable: true,
  45. /******/ get: getter
  46. /******/ });
  47. /******/ }
  48. /******/ };
  49. /******/
  50. /******/ // getDefaultExport function for compatibility with non-harmony modules
  51. /******/ __webpack_require__.n = function(module) {
  52. /******/ var getter = module && module.__esModule ?
  53. /******/ function getDefault() { return module['default']; } :
  54. /******/ function getModuleExports() { return module; };
  55. /******/ __webpack_require__.d(getter, 'a', getter);
  56. /******/ return getter;
  57. /******/ };
  58. /******/
  59. /******/ // Object.prototype.hasOwnProperty.call
  60. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  61. /******/
  62. /******/ // __webpack_public_path__
  63. /******/ __webpack_require__.p = "";
  64. /******/
  65. /******/ // Load entry module and return exports
  66. /******/ return __webpack_require__(__webpack_require__.s = 85);
  67. /******/ })
  68. /************************************************************************/
  69. /******/ ([
  70. /* 0 */
  71. /***/ (function(module, exports, __webpack_require__) {
  72. "use strict";
  73. // Utilities
  74. //
  75. function _class(obj) { return Object.prototype.toString.call(obj); }
  76. function isString(obj) { return _class(obj) === '[object String]'; }
  77. var _hasOwnProperty = Object.prototype.hasOwnProperty;
  78. function has(object, key) {
  79. return _hasOwnProperty.call(object, key);
  80. }
  81. // Merge objects
  82. //
  83. function assign(obj /*from1, from2, from3, ...*/) {
  84. var sources = Array.prototype.slice.call(arguments, 1);
  85. sources.forEach(function (source) {
  86. if (!source) { return; }
  87. if (typeof source !== 'object') {
  88. throw new TypeError(source + 'must be object');
  89. }
  90. Object.keys(source).forEach(function (key) {
  91. obj[key] = source[key];
  92. });
  93. });
  94. return obj;
  95. }
  96. // Remove element from array and put another array at those position.
  97. // Useful for some operations with tokens
  98. function arrayReplaceAt(src, pos, newElements) {
  99. return [].concat(src.slice(0, pos), newElements, src.slice(pos + 1));
  100. }
  101. ////////////////////////////////////////////////////////////////////////////////
  102. function isValidEntityCode(c) {
  103. /*eslint no-bitwise:0*/
  104. // broken sequence
  105. if (c >= 0xD800 && c <= 0xDFFF) { return false; }
  106. // never used
  107. if (c >= 0xFDD0 && c <= 0xFDEF) { return false; }
  108. if ((c & 0xFFFF) === 0xFFFF || (c & 0xFFFF) === 0xFFFE) { return false; }
  109. // control codes
  110. if (c >= 0x00 && c <= 0x08) { return false; }
  111. if (c === 0x0B) { return false; }
  112. if (c >= 0x0E && c <= 0x1F) { return false; }
  113. if (c >= 0x7F && c <= 0x9F) { return false; }
  114. // out of range
  115. if (c > 0x10FFFF) { return false; }
  116. return true;
  117. }
  118. function fromCodePoint(c) {
  119. /*eslint no-bitwise:0*/
  120. if (c > 0xffff) {
  121. c -= 0x10000;
  122. var surrogate1 = 0xd800 + (c >> 10),
  123. surrogate2 = 0xdc00 + (c & 0x3ff);
  124. return String.fromCharCode(surrogate1, surrogate2);
  125. }
  126. return String.fromCharCode(c);
  127. }
  128. var UNESCAPE_MD_RE = /\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g;
  129. var ENTITY_RE = /&([a-z#][a-z0-9]{1,31});/gi;
  130. var UNESCAPE_ALL_RE = new RegExp(UNESCAPE_MD_RE.source + '|' + ENTITY_RE.source, 'gi');
  131. var DIGITAL_ENTITY_TEST_RE = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i;
  132. var entities = __webpack_require__(11);
  133. function replaceEntityPattern(match, name) {
  134. var code = 0;
  135. if (has(entities, name)) {
  136. return entities[name];
  137. }
  138. if (name.charCodeAt(0) === 0x23/* # */ && DIGITAL_ENTITY_TEST_RE.test(name)) {
  139. code = name[1].toLowerCase() === 'x' ?
  140. parseInt(name.slice(2), 16)
  141. :
  142. parseInt(name.slice(1), 10);
  143. if (isValidEntityCode(code)) {
  144. return fromCodePoint(code);
  145. }
  146. }
  147. return match;
  148. }
  149. /*function replaceEntities(str) {
  150. if (str.indexOf('&') < 0) { return str; }
  151. return str.replace(ENTITY_RE, replaceEntityPattern);
  152. }*/
  153. function unescapeMd(str) {
  154. if (str.indexOf('\\') < 0) { return str; }
  155. return str.replace(UNESCAPE_MD_RE, '$1');
  156. }
  157. function unescapeAll(str) {
  158. if (str.indexOf('\\') < 0 && str.indexOf('&') < 0) { return str; }
  159. return str.replace(UNESCAPE_ALL_RE, function (match, escaped, entity) {
  160. if (escaped) { return escaped; }
  161. return replaceEntityPattern(match, entity);
  162. });
  163. }
  164. ////////////////////////////////////////////////////////////////////////////////
  165. var HTML_ESCAPE_TEST_RE = /[&<>"]/;
  166. var HTML_ESCAPE_REPLACE_RE = /[&<>"]/g;
  167. var HTML_REPLACEMENTS = {
  168. '&': '&amp;',
  169. '<': '&lt;',
  170. '>': '&gt;',
  171. '"': '&quot;'
  172. };
  173. function replaceUnsafeChar(ch) {
  174. return HTML_REPLACEMENTS[ch];
  175. }
  176. function escapeHtml(str) {
  177. if (HTML_ESCAPE_TEST_RE.test(str)) {
  178. return str.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar);
  179. }
  180. return str;
  181. }
  182. ////////////////////////////////////////////////////////////////////////////////
  183. var REGEXP_ESCAPE_RE = /[.?*+^$[\]\\(){}|-]/g;
  184. function escapeRE(str) {
  185. return str.replace(REGEXP_ESCAPE_RE, '\\$&');
  186. }
  187. ////////////////////////////////////////////////////////////////////////////////
  188. function isSpace(code) {
  189. switch (code) {
  190. case 0x09:
  191. case 0x20:
  192. return true;
  193. }
  194. return false;
  195. }
  196. // Zs (unicode class) || [\t\f\v\r\n]
  197. function isWhiteSpace(code) {
  198. if (code >= 0x2000 && code <= 0x200A) { return true; }
  199. switch (code) {
  200. case 0x09: // \t
  201. case 0x0A: // \n
  202. case 0x0B: // \v
  203. case 0x0C: // \f
  204. case 0x0D: // \r
  205. case 0x20:
  206. case 0xA0:
  207. case 0x1680:
  208. case 0x202F:
  209. case 0x205F:
  210. case 0x3000:
  211. return true;
  212. }
  213. return false;
  214. }
  215. ////////////////////////////////////////////////////////////////////////////////
  216. /*eslint-disable max-len*/
  217. var UNICODE_PUNCT_RE = __webpack_require__(5);
  218. // Currently without astral characters support.
  219. function isPunctChar(ch) {
  220. return UNICODE_PUNCT_RE.test(ch);
  221. }
  222. // Markdown ASCII punctuation characters.
  223. //
  224. // !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \, ], ^, _, `, {, |, }, or ~
  225. // http://spec.commonmark.org/0.15/#ascii-punctuation-character
  226. //
  227. // Don't confuse with unicode punctuation !!! It lacks some chars in ascii range.
  228. //
  229. function isMdAsciiPunct(ch) {
  230. switch (ch) {
  231. case 0x21/* ! */:
  232. case 0x22/* " */:
  233. case 0x23/* # */:
  234. case 0x24/* $ */:
  235. case 0x25/* % */:
  236. case 0x26/* & */:
  237. case 0x27/* ' */:
  238. case 0x28/* ( */:
  239. case 0x29/* ) */:
  240. case 0x2A/* * */:
  241. case 0x2B/* + */:
  242. case 0x2C/* , */:
  243. case 0x2D/* - */:
  244. case 0x2E/* . */:
  245. case 0x2F/* / */:
  246. case 0x3A/* : */:
  247. case 0x3B/* ; */:
  248. case 0x3C/* < */:
  249. case 0x3D/* = */:
  250. case 0x3E/* > */:
  251. case 0x3F/* ? */:
  252. case 0x40/* @ */:
  253. case 0x5B/* [ */:
  254. case 0x5C/* \ */:
  255. case 0x5D/* ] */:
  256. case 0x5E/* ^ */:
  257. case 0x5F/* _ */:
  258. case 0x60/* ` */:
  259. case 0x7B/* { */:
  260. case 0x7C/* | */:
  261. case 0x7D/* } */:
  262. case 0x7E/* ~ */:
  263. return true;
  264. default:
  265. return false;
  266. }
  267. }
  268. // Hepler to unify [reference labels].
  269. //
  270. function normalizeReference(str) {
  271. // use .toUpperCase() instead of .toLowerCase()
  272. // here to avoid a conflict with Object.prototype
  273. // members (most notably, `__proto__`)
  274. return str.trim().replace(/\s+/g, ' ').toUpperCase();
  275. }
  276. ////////////////////////////////////////////////////////////////////////////////
  277. // Re-export libraries commonly used in both markdown-it and its plugins,
  278. // so plugins won't have to depend on them explicitly, which reduces their
  279. // bundled size (e.g. a browser build).
  280. //
  281. exports.lib = {};
  282. exports.lib.mdurl = __webpack_require__(15);
  283. exports.lib.ucmicro = __webpack_require__(83);
  284. exports.assign = assign;
  285. exports.isString = isString;
  286. exports.has = has;
  287. exports.unescapeMd = unescapeMd;
  288. exports.unescapeAll = unescapeAll;
  289. exports.isValidEntityCode = isValidEntityCode;
  290. exports.fromCodePoint = fromCodePoint;
  291. // exports.replaceEntities = replaceEntities;
  292. exports.escapeHtml = escapeHtml;
  293. exports.arrayReplaceAt = arrayReplaceAt;
  294. exports.isSpace = isSpace;
  295. exports.isWhiteSpace = isWhiteSpace;
  296. exports.isMdAsciiPunct = isMdAsciiPunct;
  297. exports.isPunctChar = isPunctChar;
  298. exports.escapeRE = escapeRE;
  299. exports.normalizeReference = normalizeReference;
  300. /***/ }),
  301. /* 1 */
  302. /***/ (function(module, exports, __webpack_require__) {
  303. /* WEBPACK VAR INJECTION */(function(setImmediate, global) {;(function() {
  304. "use strict"
  305. function Vnode(tag, key, attrs0, children, text, dom) {
  306. return {tag: tag, key: key, attrs: attrs0, children: children, text: text, dom: dom, domSize: undefined, state: undefined, _state: undefined, events: undefined, instance: undefined, skip: false}
  307. }
  308. Vnode.normalize = function(node) {
  309. if (Array.isArray(node)) return Vnode("[", undefined, undefined, Vnode.normalizeChildren(node), undefined, undefined)
  310. if (node != null && typeof node !== "object") return Vnode("#", undefined, undefined, node === false ? "" : node, undefined, undefined)
  311. return node
  312. }
  313. Vnode.normalizeChildren = function normalizeChildren(children) {
  314. for (var i = 0; i < children.length; i++) {
  315. children[i] = Vnode.normalize(children[i])
  316. }
  317. return children
  318. }
  319. var selectorParser = /(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g
  320. var selectorCache = {}
  321. var hasOwn = {}.hasOwnProperty
  322. function compileSelector(selector) {
  323. var match, tag = "div", classes = [], attrs = {}
  324. while (match = selectorParser.exec(selector)) {
  325. var type = match[1], value = match[2]
  326. if (type === "" && value !== "") tag = value
  327. else if (type === "#") attrs.id = value
  328. else if (type === ".") classes.push(value)
  329. else if (match[3][0] === "[") {
  330. var attrValue = match[6]
  331. if (attrValue) attrValue = attrValue.replace(/\\(["'])/g, "$1").replace(/\\\\/g, "\\")
  332. if (match[4] === "class") classes.push(attrValue)
  333. else attrs[match[4]] = attrValue || true
  334. }
  335. }
  336. if (classes.length > 0) attrs.className = classes.join(" ")
  337. return selectorCache[selector] = {tag: tag, attrs: attrs}
  338. }
  339. function execSelector(state, attrs, children) {
  340. var hasAttrs = false, childList, text
  341. var className = attrs.className || attrs.class
  342. for (var key in state.attrs) {
  343. if (hasOwn.call(state.attrs, key)) {
  344. attrs[key] = state.attrs[key]
  345. }
  346. }
  347. if (className !== undefined) {
  348. if (attrs.class !== undefined) {
  349. attrs.class = undefined
  350. attrs.className = className
  351. }
  352. if (state.attrs.className != null) {
  353. attrs.className = state.attrs.className + " " + className
  354. }
  355. }
  356. for (var key in attrs) {
  357. if (hasOwn.call(attrs, key) && key !== "key") {
  358. hasAttrs = true
  359. break
  360. }
  361. }
  362. if (Array.isArray(children) && children.length === 1 && children[0] != null && children[0].tag === "#") {
  363. text = children[0].children
  364. } else {
  365. childList = children
  366. }
  367. return Vnode(state.tag, attrs.key, hasAttrs ? attrs : undefined, childList, text)
  368. }
  369. function hyperscript(selector) {
  370. // Because sloppy mode sucks
  371. var attrs = arguments[1], start = 2, children
  372. if (selector == null || typeof selector !== "string" && typeof selector !== "function" && typeof selector.view !== "function") {
  373. throw Error("The selector must be either a string or a component.");
  374. }
  375. if (typeof selector === "string") {
  376. var cached = selectorCache[selector] || compileSelector(selector)
  377. }
  378. if (attrs == null) {
  379. attrs = {}
  380. } else if (typeof attrs !== "object" || attrs.tag != null || Array.isArray(attrs)) {
  381. attrs = {}
  382. start = 1
  383. }
  384. if (arguments.length === start + 1) {
  385. children = arguments[start]
  386. if (!Array.isArray(children)) children = [children]
  387. } else {
  388. children = []
  389. while (start < arguments.length) children.push(arguments[start++])
  390. }
  391. var normalized = Vnode.normalizeChildren(children)
  392. if (typeof selector === "string") {
  393. return execSelector(cached, attrs, normalized)
  394. } else {
  395. return Vnode(selector, attrs.key, attrs, normalized)
  396. }
  397. }
  398. hyperscript.trust = function(html) {
  399. if (html == null) html = ""
  400. return Vnode("<", undefined, undefined, html, undefined, undefined)
  401. }
  402. hyperscript.fragment = function(attrs1, children) {
  403. return Vnode("[", attrs1.key, attrs1, Vnode.normalizeChildren(children), undefined, undefined)
  404. }
  405. var m = hyperscript
  406. /** @constructor */
  407. var PromisePolyfill = function(executor) {
  408. if (!(this instanceof PromisePolyfill)) throw new Error("Promise must be called with `new`")
  409. if (typeof executor !== "function") throw new TypeError("executor must be a function")
  410. var self = this, resolvers = [], rejectors = [], resolveCurrent = handler(resolvers, true), rejectCurrent = handler(rejectors, false)
  411. var instance = self._instance = {resolvers: resolvers, rejectors: rejectors}
  412. var callAsync = typeof setImmediate === "function" ? setImmediate : setTimeout
  413. function handler(list, shouldAbsorb) {
  414. return function execute(value) {
  415. var then
  416. try {
  417. if (shouldAbsorb && value != null && (typeof value === "object" || typeof value === "function") && typeof (then = value.then) === "function") {
  418. if (value === self) throw new TypeError("Promise can't be resolved w/ itself")
  419. executeOnce(then.bind(value))
  420. }
  421. else {
  422. callAsync(function() {
  423. if (!shouldAbsorb && list.length === 0) console.error("Possible unhandled promise rejection:", value)
  424. for (var i = 0; i < list.length; i++) list[i](value)
  425. resolvers.length = 0, rejectors.length = 0
  426. instance.state = shouldAbsorb
  427. instance.retry = function() {execute(value)}
  428. })
  429. }
  430. }
  431. catch (e) {
  432. rejectCurrent(e)
  433. }
  434. }
  435. }
  436. function executeOnce(then) {
  437. var runs = 0
  438. function run(fn) {
  439. return function(value) {
  440. if (runs++ > 0) return
  441. fn(value)
  442. }
  443. }
  444. var onerror = run(rejectCurrent)
  445. try {then(run(resolveCurrent), onerror)} catch (e) {onerror(e)}
  446. }
  447. executeOnce(executor)
  448. }
  449. PromisePolyfill.prototype.then = function(onFulfilled, onRejection) {
  450. var self = this, instance = self._instance
  451. function handle(callback, list, next, state) {
  452. list.push(function(value) {
  453. if (typeof callback !== "function") next(value)
  454. else try {resolveNext(callback(value))} catch (e) {if (rejectNext) rejectNext(e)}
  455. })
  456. if (typeof instance.retry === "function" && state === instance.state) instance.retry()
  457. }
  458. var resolveNext, rejectNext
  459. var promise = new PromisePolyfill(function(resolve, reject) {resolveNext = resolve, rejectNext = reject})
  460. handle(onFulfilled, instance.resolvers, resolveNext, true), handle(onRejection, instance.rejectors, rejectNext, false)
  461. return promise
  462. }
  463. PromisePolyfill.prototype.catch = function(onRejection) {
  464. return this.then(null, onRejection)
  465. }
  466. PromisePolyfill.resolve = function(value) {
  467. if (value instanceof PromisePolyfill) return value
  468. return new PromisePolyfill(function(resolve) {resolve(value)})
  469. }
  470. PromisePolyfill.reject = function(value) {
  471. return new PromisePolyfill(function(resolve, reject) {reject(value)})
  472. }
  473. PromisePolyfill.all = function(list) {
  474. return new PromisePolyfill(function(resolve, reject) {
  475. var total = list.length, count = 0, values = []
  476. if (list.length === 0) resolve([])
  477. else for (var i = 0; i < list.length; i++) {
  478. (function(i) {
  479. function consume(value) {
  480. count++
  481. values[i] = value
  482. if (count === total) resolve(values)
  483. }
  484. if (list[i] != null && (typeof list[i] === "object" || typeof list[i] === "function") && typeof list[i].then === "function") {
  485. list[i].then(consume, reject)
  486. }
  487. else consume(list[i])
  488. })(i)
  489. }
  490. })
  491. }
  492. PromisePolyfill.race = function(list) {
  493. return new PromisePolyfill(function(resolve, reject) {
  494. for (var i = 0; i < list.length; i++) {
  495. list[i].then(resolve, reject)
  496. }
  497. })
  498. }
  499. if (typeof window !== "undefined") {
  500. if (typeof window.Promise === "undefined") window.Promise = PromisePolyfill
  501. var PromisePolyfill = window.Promise
  502. } else if (typeof global !== "undefined") {
  503. if (typeof global.Promise === "undefined") global.Promise = PromisePolyfill
  504. var PromisePolyfill = global.Promise
  505. } else {
  506. }
  507. var buildQueryString = function(object) {
  508. if (Object.prototype.toString.call(object) !== "[object Object]") return ""
  509. var args = []
  510. for (var key0 in object) {
  511. destructure(key0, object[key0])
  512. }
  513. return args.join("&")
  514. function destructure(key0, value) {
  515. if (Array.isArray(value)) {
  516. for (var i = 0; i < value.length; i++) {
  517. destructure(key0 + "[" + i + "]", value[i])
  518. }
  519. }
  520. else if (Object.prototype.toString.call(value) === "[object Object]") {
  521. for (var i in value) {
  522. destructure(key0 + "[" + i + "]", value[i])
  523. }
  524. }
  525. else args.push(encodeURIComponent(key0) + (value != null && value !== "" ? "=" + encodeURIComponent(value) : ""))
  526. }
  527. }
  528. var FILE_PROTOCOL_REGEX = new RegExp("^file://", "i")
  529. var _8 = function($window, Promise) {
  530. var callbackCount = 0
  531. var oncompletion
  532. function setCompletionCallback(callback) {oncompletion = callback}
  533. function finalizer() {
  534. var count = 0
  535. function complete() {if (--count === 0 && typeof oncompletion === "function") oncompletion()}
  536. return function finalize(promise0) {
  537. var then0 = promise0.then
  538. promise0.then = function() {
  539. count++
  540. var next = then0.apply(promise0, arguments)
  541. next.then(complete, function(e) {
  542. complete()
  543. if (count === 0) throw e
  544. })
  545. return finalize(next)
  546. }
  547. return promise0
  548. }
  549. }
  550. function normalize(args, extra) {
  551. if (typeof args === "string") {
  552. var url = args
  553. args = extra || {}
  554. if (args.url == null) args.url = url
  555. }
  556. return args
  557. }
  558. function request(args, extra) {
  559. var finalize = finalizer()
  560. args = normalize(args, extra)
  561. var promise0 = new Promise(function(resolve, reject) {
  562. if (args.method == null) args.method = "GET"
  563. args.method = args.method.toUpperCase()
  564. var useBody = (args.method === "GET" || args.method === "TRACE") ? false : (typeof args.useBody === "boolean" ? args.useBody : true)
  565. if (typeof args.serialize !== "function") args.serialize = typeof FormData !== "undefined" && args.data instanceof FormData ? function(value) {return value} : JSON.stringify
  566. if (typeof args.deserialize !== "function") args.deserialize = deserialize
  567. if (typeof args.extract !== "function") args.extract = extract
  568. args.url = interpolate(args.url, args.data)
  569. if (useBody) args.data = args.serialize(args.data)
  570. else args.url = assemble(args.url, args.data)
  571. var xhr = new $window.XMLHttpRequest(),
  572. aborted = false,
  573. _abort = xhr.abort
  574. xhr.abort = function abort() {
  575. aborted = true
  576. _abort.call(xhr)
  577. }
  578. xhr.open(args.method, args.url, typeof args.async === "boolean" ? args.async : true, typeof args.user === "string" ? args.user : undefined, typeof args.password === "string" ? args.password : undefined)
  579. if (args.serialize === JSON.stringify && useBody) {
  580. xhr.setRequestHeader("Content-Type", "application/json; charset=utf-8")
  581. }
  582. if (args.deserialize === deserialize) {
  583. xhr.setRequestHeader("Accept", "application/json, text/*")
  584. }
  585. if (args.withCredentials) xhr.withCredentials = args.withCredentials
  586. for (var key in args.headers) if ({}.hasOwnProperty.call(args.headers, key)) {
  587. xhr.setRequestHeader(key, args.headers[key])
  588. }
  589. if (typeof args.config === "function") xhr = args.config(xhr, args) || xhr
  590. xhr.onreadystatechange = function() {
  591. // Don't throw errors on xhr.abort().
  592. if(aborted) return
  593. if (xhr.readyState === 4) {
  594. try {
  595. var response = (args.extract !== extract) ? args.extract(xhr, args) : args.deserialize(args.extract(xhr, args))
  596. if ((xhr.status >= 200 && xhr.status < 300) || xhr.status === 304 || FILE_PROTOCOL_REGEX.test(args.url)) {
  597. resolve(cast(args.type, response))
  598. }
  599. else {
  600. var error = new Error(xhr.responseText)
  601. for (var key in response) error[key] = response[key]
  602. reject(error)
  603. }
  604. }
  605. catch (e) {
  606. reject(e)
  607. }
  608. }
  609. }
  610. if (useBody && (args.data != null)) xhr.send(args.data)
  611. else xhr.send()
  612. })
  613. return args.background === true ? promise0 : finalize(promise0)
  614. }
  615. function jsonp(args, extra) {
  616. var finalize = finalizer()
  617. args = normalize(args, extra)
  618. var promise0 = new Promise(function(resolve, reject) {
  619. var callbackName = args.callbackName || "_mithril_" + Math.round(Math.random() * 1e16) + "_" + callbackCount++
  620. var script = $window.document.createElement("script")
  621. $window[callbackName] = function(data) {
  622. script.parentNode.removeChild(script)
  623. resolve(cast(args.type, data))
  624. delete $window[callbackName]
  625. }
  626. script.onerror = function() {
  627. script.parentNode.removeChild(script)
  628. reject(new Error("JSONP request failed"))
  629. delete $window[callbackName]
  630. }
  631. if (args.data == null) args.data = {}
  632. args.url = interpolate(args.url, args.data)
  633. args.data[args.callbackKey || "callback"] = callbackName
  634. script.src = assemble(args.url, args.data)
  635. $window.document.documentElement.appendChild(script)
  636. })
  637. return args.background === true? promise0 : finalize(promise0)
  638. }
  639. function interpolate(url, data) {
  640. if (data == null) return url
  641. var tokens = url.match(/:[^\/]+/gi) || []
  642. for (var i = 0; i < tokens.length; i++) {
  643. var key = tokens[i].slice(1)
  644. if (data[key] != null) {
  645. url = url.replace(tokens[i], data[key])
  646. }
  647. }
  648. return url
  649. }
  650. function assemble(url, data) {
  651. var querystring = buildQueryString(data)
  652. if (querystring !== "") {
  653. var prefix = url.indexOf("?") < 0 ? "?" : "&"
  654. url += prefix + querystring
  655. }
  656. return url
  657. }
  658. function deserialize(data) {
  659. try {return data !== "" ? JSON.parse(data) : null}
  660. catch (e) {throw new Error(data)}
  661. }
  662. function extract(xhr) {return xhr.responseText}
  663. function cast(type0, data) {
  664. if (typeof type0 === "function") {
  665. if (Array.isArray(data)) {
  666. for (var i = 0; i < data.length; i++) {
  667. data[i] = new type0(data[i])
  668. }
  669. }
  670. else return new type0(data)
  671. }
  672. return data
  673. }
  674. return {request: request, jsonp: jsonp, setCompletionCallback: setCompletionCallback}
  675. }
  676. var requestService = _8(window, PromisePolyfill)
  677. var coreRenderer = function($window) {
  678. var $doc = $window.document
  679. var $emptyFragment = $doc.createDocumentFragment()
  680. var onevent
  681. function setEventCallback(callback) {return onevent = callback}
  682. //create
  683. function createNodes(parent, vnodes, start, end, hooks, nextSibling, ns) {
  684. for (var i = start; i < end; i++) {
  685. var vnode = vnodes[i]
  686. if (vnode != null) {
  687. createNode(parent, vnode, hooks, ns, nextSibling)
  688. }
  689. }
  690. }
  691. function createNode(parent, vnode, hooks, ns, nextSibling) {
  692. var tag = vnode.tag
  693. if (typeof tag === "string") {
  694. vnode.state = {}
  695. if (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks)
  696. switch (tag) {
  697. case "#": return createText(parent, vnode, nextSibling)
  698. case "<": return createHTML(parent, vnode, nextSibling)
  699. case "[": return createFragment(parent, vnode, hooks, ns, nextSibling)
  700. default: return createElement(parent, vnode, hooks, ns, nextSibling)
  701. }
  702. }
  703. else return createComponent(parent, vnode, hooks, ns, nextSibling)
  704. }
  705. function createText(parent, vnode, nextSibling) {
  706. vnode.dom = $doc.createTextNode(vnode.children)
  707. insertNode(parent, vnode.dom, nextSibling)
  708. return vnode.dom
  709. }
  710. function createHTML(parent, vnode, nextSibling) {
  711. var match1 = vnode.children.match(/^\s*?<(\w+)/im) || []
  712. var parent1 = {caption: "table", thead: "table", tbody: "table", tfoot: "table", tr: "tbody", th: "tr", td: "tr", colgroup: "table", col: "colgroup"}[match1[1]] || "div"
  713. var temp = $doc.createElement(parent1)
  714. temp.innerHTML = vnode.children
  715. vnode.dom = temp.firstChild
  716. vnode.domSize = temp.childNodes.length
  717. var fragment = $doc.createDocumentFragment()
  718. var child
  719. while (child = temp.firstChild) {
  720. fragment.appendChild(child)
  721. }
  722. insertNode(parent, fragment, nextSibling)
  723. return fragment
  724. }
  725. function createFragment(parent, vnode, hooks, ns, nextSibling) {
  726. var fragment = $doc.createDocumentFragment()
  727. if (vnode.children != null) {
  728. var children = vnode.children
  729. createNodes(fragment, children, 0, children.length, hooks, null, ns)
  730. }
  731. vnode.dom = fragment.firstChild
  732. vnode.domSize = fragment.childNodes.length
  733. insertNode(parent, fragment, nextSibling)
  734. return fragment
  735. }
  736. function createElement(parent, vnode, hooks, ns, nextSibling) {
  737. var tag = vnode.tag
  738. switch (vnode.tag) {
  739. case "svg": ns = "http://www.w3.org/2000/svg"; break
  740. case "math": ns = "http://www.w3.org/1998/Math/MathML"; break
  741. }
  742. var attrs2 = vnode.attrs
  743. var is = attrs2 && attrs2.is
  744. var element = ns ?
  745. is ? $doc.createElementNS(ns, tag, {is: is}) : $doc.createElementNS(ns, tag) :
  746. is ? $doc.createElement(tag, {is: is}) : $doc.createElement(tag)
  747. vnode.dom = element
  748. if (attrs2 != null) {
  749. setAttrs(vnode, attrs2, ns)
  750. }
  751. insertNode(parent, element, nextSibling)
  752. if (vnode.attrs != null && vnode.attrs.contenteditable != null) {
  753. setContentEditable(vnode)
  754. }
  755. else {
  756. if (vnode.text != null) {
  757. if (vnode.text !== "") element.textContent = vnode.text
  758. else vnode.children = [Vnode("#", undefined, undefined, vnode.text, undefined, undefined)]
  759. }
  760. if (vnode.children != null) {
  761. var children = vnode.children
  762. createNodes(element, children, 0, children.length, hooks, null, ns)
  763. setLateAttrs(vnode)
  764. }
  765. }
  766. return element
  767. }
  768. function initComponent(vnode, hooks) {
  769. var sentinel
  770. if (typeof vnode.tag.view === "function") {
  771. vnode.state = Object.create(vnode.tag)
  772. sentinel = vnode.state.view
  773. if (sentinel.$$reentrantLock$$ != null) return $emptyFragment
  774. sentinel.$$reentrantLock$$ = true
  775. } else {
  776. vnode.state = void 0
  777. sentinel = vnode.tag
  778. if (sentinel.$$reentrantLock$$ != null) return $emptyFragment
  779. sentinel.$$reentrantLock$$ = true
  780. vnode.state = (vnode.tag.prototype != null && typeof vnode.tag.prototype.view === "function") ? new vnode.tag(vnode) : vnode.tag(vnode)
  781. }
  782. vnode._state = vnode.state
  783. if (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks)
  784. initLifecycle(vnode._state, vnode, hooks)
  785. vnode.instance = Vnode.normalize(vnode._state.view.call(vnode.state, vnode))
  786. if (vnode.instance === vnode) throw Error("A view cannot return the vnode it received as argument")
  787. sentinel.$$reentrantLock$$ = null
  788. }
  789. function createComponent(parent, vnode, hooks, ns, nextSibling) {
  790. initComponent(vnode, hooks)
  791. if (vnode.instance != null) {
  792. var element = createNode(parent, vnode.instance, hooks, ns, nextSibling)
  793. vnode.dom = vnode.instance.dom
  794. vnode.domSize = vnode.dom != null ? vnode.instance.domSize : 0
  795. insertNode(parent, element, nextSibling)
  796. return element
  797. }
  798. else {
  799. vnode.domSize = 0
  800. return $emptyFragment
  801. }
  802. }
  803. //update
  804. function updateNodes(parent, old, vnodes, recycling, hooks, nextSibling, ns) {
  805. if (old === vnodes || old == null && vnodes == null) return
  806. else if (old == null) createNodes(parent, vnodes, 0, vnodes.length, hooks, nextSibling, undefined)
  807. else if (vnodes == null) removeNodes(old, 0, old.length, vnodes)
  808. else {
  809. if (old.length === vnodes.length) {
  810. var isUnkeyed = false
  811. for (var i = 0; i < vnodes.length; i++) {
  812. if (vnodes[i] != null && old[i] != null) {
  813. isUnkeyed = vnodes[i].key == null && old[i].key == null
  814. break
  815. }
  816. }
  817. if (isUnkeyed) {
  818. for (var i = 0; i < old.length; i++) {
  819. if (old[i] === vnodes[i]) continue
  820. else if (old[i] == null && vnodes[i] != null) createNode(parent, vnodes[i], hooks, ns, getNextSibling(old, i + 1, nextSibling))
  821. else if (vnodes[i] == null) removeNodes(old, i, i + 1, vnodes)
  822. else updateNode(parent, old[i], vnodes[i], hooks, getNextSibling(old, i + 1, nextSibling), recycling, ns)
  823. }
  824. return
  825. }
  826. }
  827. recycling = recycling || isRecyclable(old, vnodes)
  828. if (recycling) {
  829. var pool = old.pool
  830. old = old.concat(old.pool)
  831. }
  832. var oldStart = 0, start = 0, oldEnd = old.length - 1, end = vnodes.length - 1, map
  833. while (oldEnd >= oldStart && end >= start) {
  834. var o = old[oldStart], v = vnodes[start]
  835. if (o === v && !recycling) oldStart++, start++
  836. else if (o == null) oldStart++
  837. else if (v == null) start++
  838. else if (o.key === v.key) {
  839. var shouldRecycle = (pool != null && oldStart >= old.length - pool.length) || ((pool == null) && recycling)
  840. oldStart++, start++
  841. updateNode(parent, o, v, hooks, getNextSibling(old, oldStart, nextSibling), shouldRecycle, ns)
  842. if (recycling && o.tag === v.tag) insertNode(parent, toFragment(o), nextSibling)
  843. }
  844. else {
  845. var o = old[oldEnd]
  846. if (o === v && !recycling) oldEnd--, start++
  847. else if (o == null) oldEnd--
  848. else if (v == null) start++
  849. else if (o.key === v.key) {
  850. var shouldRecycle = (pool != null && oldEnd >= old.length - pool.length) || ((pool == null) && recycling)
  851. updateNode(parent, o, v, hooks, getNextSibling(old, oldEnd + 1, nextSibling), shouldRecycle, ns)
  852. if (recycling || start < end) insertNode(parent, toFragment(o), getNextSibling(old, oldStart, nextSibling))
  853. oldEnd--, start++
  854. }
  855. else break
  856. }
  857. }
  858. while (oldEnd >= oldStart && end >= start) {
  859. var o = old[oldEnd], v = vnodes[end]
  860. if (o === v && !recycling) oldEnd--, end--
  861. else if (o == null) oldEnd--
  862. else if (v == null) end--
  863. else if (o.key === v.key) {
  864. var shouldRecycle = (pool != null && oldEnd >= old.length - pool.length) || ((pool == null) && recycling)
  865. updateNode(parent, o, v, hooks, getNextSibling(old, oldEnd + 1, nextSibling), shouldRecycle, ns)
  866. if (recycling && o.tag === v.tag) insertNode(parent, toFragment(o), nextSibling)
  867. if (o.dom != null) nextSibling = o.dom
  868. oldEnd--, end--
  869. }
  870. else {
  871. if (!map) map = getKeyMap(old, oldEnd)
  872. if (v != null) {
  873. var oldIndex = map[v.key]
  874. if (oldIndex != null) {
  875. var movable = old[oldIndex]
  876. var shouldRecycle = (pool != null && oldIndex >= old.length - pool.length) || ((pool == null) && recycling)
  877. updateNode(parent, movable, v, hooks, getNextSibling(old, oldEnd + 1, nextSibling), recycling, ns)
  878. insertNode(parent, toFragment(movable), nextSibling)
  879. old[oldIndex].skip = true
  880. if (movable.dom != null) nextSibling = movable.dom
  881. }
  882. else {
  883. var dom = createNode(parent, v, hooks, undefined, nextSibling)
  884. nextSibling = dom
  885. }
  886. }
  887. end--
  888. }
  889. if (end < start) break
  890. }
  891. createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns)
  892. removeNodes(old, oldStart, oldEnd + 1, vnodes)
  893. }
  894. }
  895. function updateNode(parent, old, vnode, hooks, nextSibling, recycling, ns) {
  896. var oldTag = old.tag, tag = vnode.tag
  897. if (oldTag === tag) {
  898. vnode.state = old.state
  899. vnode._state = old._state
  900. vnode.events = old.events
  901. if (!recycling && shouldNotUpdate(vnode, old)) return
  902. if (typeof oldTag === "string") {
  903. if (vnode.attrs != null) {
  904. if (recycling) {
  905. vnode.state = {}
  906. initLifecycle(vnode.attrs, vnode, hooks)
  907. }
  908. else updateLifecycle(vnode.attrs, vnode, hooks)
  909. }
  910. switch (oldTag) {
  911. case "#": updateText(old, vnode); break
  912. case "<": updateHTML(parent, old, vnode, nextSibling); break
  913. case "[": updateFragment(parent, old, vnode, recycling, hooks, nextSibling, ns); break
  914. default: updateElement(old, vnode, recycling, hooks, ns)
  915. }
  916. }
  917. else updateComponent(parent, old, vnode, hooks, nextSibling, recycling, ns)
  918. }
  919. else {
  920. removeNode(old, null)
  921. createNode(parent, vnode, hooks, ns, nextSibling)
  922. }
  923. }
  924. function updateText(old, vnode) {
  925. if (old.children.toString() !== vnode.children.toString()) {
  926. old.dom.nodeValue = vnode.children
  927. }
  928. vnode.dom = old.dom
  929. }
  930. function updateHTML(parent, old, vnode, nextSibling) {
  931. if (old.children !== vnode.children) {
  932. toFragment(old)
  933. createHTML(parent, vnode, nextSibling)
  934. }
  935. else vnode.dom = old.dom, vnode.domSize = old.domSize
  936. }
  937. function updateFragment(parent, old, vnode, recycling, hooks, nextSibling, ns) {
  938. updateNodes(parent, old.children, vnode.children, recycling, hooks, nextSibling, ns)
  939. var domSize = 0, children = vnode.children
  940. vnode.dom = null
  941. if (children != null) {
  942. for (var i = 0; i < children.length; i++) {
  943. var child = children[i]
  944. if (child != null && child.dom != null) {
  945. if (vnode.dom == null) vnode.dom = child.dom
  946. domSize += child.domSize || 1
  947. }
  948. }
  949. if (domSize !== 1) vnode.domSize = domSize
  950. }
  951. }
  952. function updateElement(old, vnode, recycling, hooks, ns) {
  953. var element = vnode.dom = old.dom
  954. switch (vnode.tag) {
  955. case "svg": ns = "http://www.w3.org/2000/svg"; break
  956. case "math": ns = "http://www.w3.org/1998/Math/MathML"; break
  957. }
  958. if (vnode.tag === "textarea") {
  959. if (vnode.attrs == null) vnode.attrs = {}
  960. if (vnode.text != null) {
  961. vnode.attrs.value = vnode.text //FIXME handle0 multiple children
  962. vnode.text = undefined
  963. }
  964. }
  965. updateAttrs(vnode, old.attrs, vnode.attrs, ns)
  966. if (vnode.attrs != null && vnode.attrs.contenteditable != null) {
  967. setContentEditable(vnode)
  968. }
  969. else if (old.text != null && vnode.text != null && vnode.text !== "") {
  970. if (old.text.toString() !== vnode.text.toString()) old.dom.firstChild.nodeValue = vnode.text
  971. }
  972. else {
  973. if (old.text != null) old.children = [Vnode("#", undefined, undefined, old.text, undefined, old.dom.firstChild)]
  974. if (vnode.text != null) vnode.children = [Vnode("#", undefined, undefined, vnode.text, undefined, undefined)]
  975. updateNodes(element, old.children, vnode.children, recycling, hooks, null, ns)
  976. }
  977. }
  978. function updateComponent(parent, old, vnode, hooks, nextSibling, recycling, ns) {
  979. if (recycling) {
  980. initComponent(vnode, hooks)
  981. } else {
  982. vnode.instance = Vnode.normalize(vnode._state.view.call(vnode.state, vnode))
  983. if (vnode.instance === vnode) throw Error("A view cannot return the vnode it received as argument")
  984. if (vnode.attrs != null) updateLifecycle(vnode.attrs, vnode, hooks)
  985. updateLifecycle(vnode._state, vnode, hooks)
  986. }
  987. if (vnode.instance != null) {
  988. if (old.instance == null) createNode(parent, vnode.instance, hooks, ns, nextSibling)
  989. else updateNode(parent, old.instance, vnode.instance, hooks, nextSibling, recycling, ns)
  990. vnode.dom = vnode.instance.dom
  991. vnode.domSize = vnode.instance.domSize
  992. }
  993. else if (old.instance != null) {
  994. removeNode(old.instance, null)
  995. vnode.dom = undefined
  996. vnode.domSize = 0
  997. }
  998. else {
  999. vnode.dom = old.dom
  1000. vnode.domSize = old.domSize
  1001. }
  1002. }
  1003. function isRecyclable(old, vnodes) {
  1004. if (old.pool != null && Math.abs(old.pool.length - vnodes.length) <= Math.abs(old.length - vnodes.length)) {
  1005. var oldChildrenLength = old[0] && old[0].children && old[0].children.length || 0
  1006. var poolChildrenLength = old.pool[0] && old.pool[0].children && old.pool[0].children.length || 0
  1007. var vnodesChildrenLength = vnodes[0] && vnodes[0].children && vnodes[0].children.length || 0
  1008. if (Math.abs(poolChildrenLength - vnodesChildrenLength) <= Math.abs(oldChildrenLength - vnodesChildrenLength)) {
  1009. return true
  1010. }
  1011. }
  1012. return false
  1013. }
  1014. function getKeyMap(vnodes, end) {
  1015. var map = {}, i = 0
  1016. for (var i = 0; i < end; i++) {
  1017. var vnode = vnodes[i]
  1018. if (vnode != null) {
  1019. var key2 = vnode.key
  1020. if (key2 != null) map[key2] = i
  1021. }
  1022. }
  1023. return map
  1024. }
  1025. function toFragment(vnode) {
  1026. var count0 = vnode.domSize
  1027. if (count0 != null || vnode.dom == null) {
  1028. var fragment = $doc.createDocumentFragment()
  1029. if (count0 > 0) {
  1030. var dom = vnode.dom
  1031. while (--count0) fragment.appendChild(dom.nextSibling)
  1032. fragment.insertBefore(dom, fragment.firstChild)
  1033. }
  1034. return fragment
  1035. }
  1036. else return vnode.dom
  1037. }
  1038. function getNextSibling(vnodes, i, nextSibling) {
  1039. for (; i < vnodes.length; i++) {
  1040. if (vnodes[i] != null && vnodes[i].dom != null) return vnodes[i].dom
  1041. }
  1042. return nextSibling
  1043. }
  1044. function insertNode(parent, dom, nextSibling) {
  1045. if (nextSibling && nextSibling.parentNode) parent.insertBefore(dom, nextSibling)
  1046. else parent.appendChild(dom)
  1047. }
  1048. function setContentEditable(vnode) {
  1049. var children = vnode.children
  1050. if (children != null && children.length === 1 && children[0].tag === "<") {
  1051. var content = children[0].children
  1052. if (vnode.dom.innerHTML !== content) vnode.dom.innerHTML = content
  1053. }
  1054. else if (vnode.text != null || children != null && children.length !== 0) throw new Error("Child node of a contenteditable must be trusted")
  1055. }
  1056. //remove
  1057. function removeNodes(vnodes, start, end, context) {
  1058. for (var i = start; i < end; i++) {
  1059. var vnode = vnodes[i]
  1060. if (vnode != null) {
  1061. if (vnode.skip) vnode.skip = false
  1062. else removeNode(vnode, context)
  1063. }
  1064. }
  1065. }
  1066. function removeNode(vnode, context) {
  1067. var expected = 1, called = 0
  1068. if (vnode.attrs && typeof vnode.attrs.onbeforeremove === "function") {
  1069. var result = vnode.attrs.onbeforeremove.call(vnode.state, vnode)
  1070. if (result != null && typeof result.then === "function") {
  1071. expected++
  1072. result.then(continuation, continuation)
  1073. }
  1074. }
  1075. if (typeof vnode.tag !== "string" && typeof vnode._state.onbeforeremove === "function") {
  1076. var result = vnode._state.onbeforeremove.call(vnode.state, vnode)
  1077. if (result != null && typeof result.then === "function") {
  1078. expected++
  1079. result.then(continuation, continuation)
  1080. }
  1081. }
  1082. continuation()
  1083. function continuation() {
  1084. if (++called === expected) {
  1085. onremove(vnode)
  1086. if (vnode.dom) {
  1087. var count0 = vnode.domSize || 1
  1088. if (count0 > 1) {
  1089. var dom = vnode.dom
  1090. while (--count0) {
  1091. removeNodeFromDOM(dom.nextSibling)
  1092. }
  1093. }
  1094. removeNodeFromDOM(vnode.dom)
  1095. if (context != null && vnode.domSize == null && !hasIntegrationMethods(vnode.attrs) && typeof vnode.tag === "string") { //TODO test custom elements
  1096. if (!context.pool) context.pool = [vnode]
  1097. else context.pool.push(vnode)
  1098. }
  1099. }
  1100. }
  1101. }
  1102. }
  1103. function removeNodeFromDOM(node) {
  1104. var parent = node.parentNode
  1105. if (parent != null) parent.removeChild(node)
  1106. }
  1107. function onremove(vnode) {
  1108. if (vnode.attrs && typeof vnode.attrs.onremove === "function") vnode.attrs.onremove.call(vnode.state, vnode)
  1109. if (typeof vnode.tag !== "string" && typeof vnode._state.onremove === "function") vnode._state.onremove.call(vnode.state, vnode)
  1110. if (vnode.instance != null) onremove(vnode.instance)
  1111. else {
  1112. var children = vnode.children
  1113. if (Array.isArray(children)) {
  1114. for (var i = 0; i < children.length; i++) {
  1115. var child = children[i]
  1116. if (child != null) onremove(child)
  1117. }
  1118. }
  1119. }
  1120. }
  1121. //attrs2
  1122. function setAttrs(vnode, attrs2, ns) {
  1123. for (var key2 in attrs2) {
  1124. setAttr(vnode, key2, null, attrs2[key2], ns)
  1125. }
  1126. }
  1127. function setAttr(vnode, key2, old, value, ns) {
  1128. var element = vnode.dom
  1129. if (key2 === "key" || key2 === "is" || (old === value && !isFormAttribute(vnode, key2)) && typeof value !== "object" || typeof value === "undefined" || isLifecycleMethod(key2)) return
  1130. var nsLastIndex = key2.indexOf(":")
  1131. if (nsLastIndex > -1 && key2.substr(0, nsLastIndex) === "xlink") {
  1132. element.setAttributeNS("http://www.w3.org/1999/xlink", key2.slice(nsLastIndex + 1), value)
  1133. }
  1134. else if (key2[0] === "o" && key2[1] === "n" && typeof value === "function") updateEvent(vnode, key2, value)
  1135. else if (key2 === "style") updateStyle(element, old, value)
  1136. else if (key2 in element && !isAttribute(key2) && ns === undefined && !isCustomElement(vnode)) {
  1137. //setting input[value] to same value by typing on focused element moves cursor to end in Chrome
  1138. if (vnode.tag === "input" && key2 === "value" && vnode.dom.value == value && vnode.dom === $doc.activeElement) return
  1139. //setting select[value] to same value while having select open blinks select dropdown in Chrome
  1140. if (vnode.tag === "select" && key2 === "value" && vnode.dom.value == value && vnode.dom === $doc.activeElement) return
  1141. //setting option[value] to same value while having select open blinks select dropdown in Chrome
  1142. if (vnode.tag === "option" && key2 === "value" && vnode.dom.value == value) return
  1143. // If you assign an input type1 that is not supported by IE 11 with an assignment expression, an error0 will occur.
  1144. if (vnode.tag === "input" && key2 === "type") {
  1145. element.setAttribute(key2, value)
  1146. return
  1147. }
  1148. element[key2] = value
  1149. }
  1150. else {
  1151. if (typeof value === "boolean") {
  1152. if (value) element.setAttribute(key2, "")
  1153. else element.removeAttribute(key2)
  1154. }
  1155. else element.setAttribute(key2 === "className" ? "class" : key2, value)
  1156. }
  1157. }
  1158. function setLateAttrs(vnode) {
  1159. var attrs2 = vnode.attrs
  1160. if (vnode.tag === "select" && attrs2 != null) {
  1161. if ("value" in attrs2) setAttr(vnode, "value", null, attrs2.value, undefined)
  1162. if ("selectedIndex" in attrs2) setAttr(vnode, "selectedIndex", null, attrs2.selectedIndex, undefined)
  1163. }
  1164. }
  1165. function updateAttrs(vnode, old, attrs2, ns) {
  1166. if (attrs2 != null) {
  1167. for (var key2 in attrs2) {
  1168. setAttr(vnode, key2, old && old[key2], attrs2[key2], ns)
  1169. }
  1170. }
  1171. if (old != null) {
  1172. for (var key2 in old) {
  1173. if (attrs2 == null || !(key2 in attrs2)) {
  1174. if (key2 === "className") key2 = "class"
  1175. if (key2[0] === "o" && key2[1] === "n" && !isLifecycleMethod(key2)) updateEvent(vnode, key2, undefined)
  1176. else if (key2 !== "key") vnode.dom.removeAttribute(key2)
  1177. }
  1178. }
  1179. }
  1180. }
  1181. function isFormAttribute(vnode, attr) {
  1182. return attr === "value" || attr === "checked" || attr === "selectedIndex" || attr === "selected" && vnode.dom === $doc.activeElement
  1183. }
  1184. function isLifecycleMethod(attr) {
  1185. return attr === "oninit" || attr === "oncreate" || attr === "onupdate" || attr === "onremove" || attr === "onbeforeremove" || attr === "onbeforeupdate"
  1186. }
  1187. function isAttribute(attr) {
  1188. return attr === "href" || attr === "list" || attr === "form" || attr === "width" || attr === "height"// || attr === "type"
  1189. }
  1190. function isCustomElement(vnode){
  1191. return vnode.attrs.is || vnode.tag.indexOf("-") > -1
  1192. }
  1193. function hasIntegrationMethods(source) {
  1194. return source != null && (source.oncreate || source.onupdate || source.onbeforeremove || source.onremove)
  1195. }
  1196. //style
  1197. function updateStyle(element, old, style) {
  1198. if (old === style) element.style.cssText = "", old = null
  1199. if (style == null) element.style.cssText = ""
  1200. else if (typeof style === "string") element.style.cssText = style
  1201. else {
  1202. if (typeof old === "string") element.style.cssText = ""
  1203. for (var key2 in style) {
  1204. element.style[key2] = style[key2]
  1205. }
  1206. if (old != null && typeof old !== "string") {
  1207. for (var key2 in old) {
  1208. if (!(key2 in style)) element.style[key2] = ""
  1209. }
  1210. }
  1211. }
  1212. }
  1213. //event
  1214. function updateEvent(vnode, key2, value) {
  1215. var element = vnode.dom
  1216. var callback = typeof onevent !== "function" ? value : function(e) {
  1217. var result = value.call(element, e)
  1218. onevent.call(element, e)
  1219. return result
  1220. }
  1221. if (key2 in element) element[key2] = typeof value === "function" ? callback : null
  1222. else {
  1223. var eventName = key2.slice(2)
  1224. if (vnode.events === undefined) vnode.events = {}
  1225. if (vnode.events[key2] === callback) return
  1226. if (vnode.events[key2] != null) element.removeEventListener(eventName, vnode.events[key2], false)
  1227. if (typeof value === "function") {
  1228. vnode.events[key2] = callback
  1229. element.addEventListener(eventName, vnode.events[key2], false)
  1230. }
  1231. }
  1232. }
  1233. //lifecycle
  1234. function initLifecycle(source, vnode, hooks) {
  1235. if (typeof source.oninit === "function") source.oninit.call(vnode.state, vnode)
  1236. if (typeof source.oncreate === "function") hooks.push(source.oncreate.bind(vnode.state, vnode))
  1237. }
  1238. function updateLifecycle(source, vnode, hooks) {
  1239. if (typeof source.onupdate === "function") hooks.push(source.onupdate.bind(vnode.state, vnode))
  1240. }
  1241. function shouldNotUpdate(vnode, old) {
  1242. var forceVnodeUpdate, forceComponentUpdate
  1243. if (vnode.attrs != null && typeof vnode.attrs.onbeforeupdate === "function") forceVnodeUpdate = vnode.attrs.onbeforeupdate.call(vnode.state, vnode, old)
  1244. if (typeof vnode.tag !== "string" && typeof vnode._state.onbeforeupdate === "function") forceComponentUpdate = vnode._state.onbeforeupdate.call(vnode.state, vnode, old)
  1245. if (!(forceVnodeUpdate === undefined && forceComponentUpdate === undefined) && !forceVnodeUpdate && !forceComponentUpdate) {
  1246. vnode.dom = old.dom
  1247. vnode.domSize = old.domSize
  1248. vnode.instance = old.instance
  1249. return true
  1250. }
  1251. return false
  1252. }
  1253. function render(dom, vnodes) {
  1254. if (!dom) throw new Error("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.")
  1255. var hooks = []
  1256. var active = $doc.activeElement
  1257. // First time0 rendering into a node clears it out
  1258. if (dom.vnodes == null) dom.textContent = ""
  1259. if (!Array.isArray(vnodes)) vnodes = [vnodes]
  1260. updateNodes(dom, dom.vnodes, Vnode.normalizeChildren(vnodes), false, hooks, null, undefined)
  1261. dom.vnodes = vnodes
  1262. for (var i = 0; i < hooks.length; i++) hooks[i]()
  1263. if ($doc.activeElement !== active) active.focus()
  1264. }
  1265. return {render: render, setEventCallback: setEventCallback}
  1266. }
  1267. function throttle(callback) {
  1268. //60fps translates to 16.6ms, round it down since setTimeout requires int
  1269. var time = 16
  1270. var last = 0, pending = null
  1271. var timeout = typeof requestAnimationFrame === "function" ? requestAnimationFrame : setTimeout
  1272. return function() {
  1273. var now = Date.now()
  1274. if (last === 0 || now - last >= time) {
  1275. last = now
  1276. callback()
  1277. }
  1278. else if (pending === null) {
  1279. pending = timeout(function() {
  1280. pending = null
  1281. callback()
  1282. last = Date.now()
  1283. }, time - (now - last))
  1284. }
  1285. }
  1286. }
  1287. var _11 = function($window) {
  1288. var renderService = coreRenderer($window)
  1289. renderService.setEventCallback(function(e) {
  1290. if (e.redraw !== false) redraw()
  1291. })
  1292. var callbacks = []
  1293. function subscribe(key1, callback) {
  1294. unsubscribe(key1)
  1295. callbacks.push(key1, throttle(callback))
  1296. }
  1297. function unsubscribe(key1) {
  1298. var index = callbacks.indexOf(key1)
  1299. if (index > -1) callbacks.splice(index, 2)
  1300. }
  1301. function redraw() {
  1302. for (var i = 1; i < callbacks.length; i += 2) {
  1303. callbacks[i]()
  1304. }
  1305. }
  1306. return {subscribe: subscribe, unsubscribe: unsubscribe, redraw: redraw, render: renderService.render}
  1307. }
  1308. var redrawService = _11(window)
  1309. requestService.setCompletionCallback(redrawService.redraw)
  1310. var _16 = function(redrawService0) {
  1311. return function(root, component) {
  1312. if (component === null) {
  1313. redrawService0.render(root, [])
  1314. redrawService0.unsubscribe(root)
  1315. return
  1316. }
  1317. if (component.view == null && typeof component !== "function") throw new Error("m.mount(element, component) expects a component, not a vnode")
  1318. var run0 = function() {
  1319. redrawService0.render(root, Vnode(component))
  1320. }
  1321. redrawService0.subscribe(root, run0)
  1322. redrawService0.redraw()
  1323. }
  1324. }
  1325. m.mount = _16(redrawService)
  1326. var Promise = PromisePolyfill
  1327. var parseQueryString = function(string) {
  1328. if (string === "" || string == null) return {}
  1329. if (string.charAt(0) === "?") string = string.slice(1)
  1330. var entries = string.split("&"), data0 = {}, counters = {}
  1331. for (var i = 0; i < entries.length; i++) {
  1332. var entry = entries[i].split("=")
  1333. var key5 = decodeURIComponent(entry[0])
  1334. var value = entry.length === 2 ? decodeURIComponent(entry[1]) : ""
  1335. if (value === "true") value = true
  1336. else if (value === "false") value = false
  1337. var levels = key5.split(/\]\[?|\[/)
  1338. var cursor = data0
  1339. if (key5.indexOf("[") > -1) levels.pop()
  1340. for (var j = 0; j < levels.length; j++) {
  1341. var level = levels[j], nextLevel = levels[j + 1]
  1342. var isNumber = nextLevel == "" || !isNaN(parseInt(nextLevel, 10))
  1343. var isValue = j === levels.length - 1
  1344. if (level === "") {
  1345. var key5 = levels.slice(0, j).join()
  1346. if (counters[key5] == null) counters[key5] = 0
  1347. level = counters[key5]++
  1348. }
  1349. if (cursor[level] == null) {
  1350. cursor[level] = isValue ? value : isNumber ? [] : {}
  1351. }
  1352. cursor = cursor[level]
  1353. }
  1354. }
  1355. return data0
  1356. }
  1357. var coreRouter = function($window) {
  1358. var supportsPushState = typeof $window.history.pushState === "function"
  1359. var callAsync0 = typeof setImmediate === "function" ? setImmediate : setTimeout
  1360. function normalize1(fragment0) {
  1361. var data = $window.location[fragment0].replace(/(?:%[a-f89][a-f0-9])+/gim, decodeURIComponent)
  1362. if (fragment0 === "pathname" && data[0] !== "/") data = "/" + data
  1363. return data
  1364. }
  1365. var asyncId
  1366. function debounceAsync(callback0) {
  1367. return function() {
  1368. if (asyncId != null) return
  1369. asyncId = callAsync0(function() {
  1370. asyncId = null
  1371. callback0()
  1372. })
  1373. }
  1374. }
  1375. function parsePath(path, queryData, hashData) {
  1376. var queryIndex = path.indexOf("?")
  1377. var hashIndex = path.indexOf("#")
  1378. var pathEnd = queryIndex > -1 ? queryIndex : hashIndex > -1 ? hashIndex : path.length
  1379. if (queryIndex > -1) {
  1380. var queryEnd = hashIndex > -1 ? hashIndex : path.length
  1381. var queryParams = parseQueryString(path.slice(queryIndex + 1, queryEnd))
  1382. for (var key4 in queryParams) queryData[key4] = queryParams[key4]
  1383. }
  1384. if (hashIndex > -1) {
  1385. var hashParams = parseQueryString(path.slice(hashIndex + 1))
  1386. for (var key4 in hashParams) hashData[key4] = hashParams[key4]
  1387. }
  1388. return path.slice(0, pathEnd)
  1389. }
  1390. var router = {prefix: "#!"}
  1391. router.getPath = function() {
  1392. var type2 = router.prefix.charAt(0)
  1393. switch (type2) {
  1394. case "#": return normalize1("hash").slice(router.prefix.length)
  1395. case "?": return normalize1("search").slice(router.prefix.length) + normalize1("hash")
  1396. default: return normalize1("pathname").slice(router.prefix.length) + normalize1("search") + normalize1("hash")
  1397. }
  1398. }
  1399. router.setPath = function(path, data, options) {
  1400. var queryData = {}, hashData = {}
  1401. path = parsePath(path, queryData, hashData)
  1402. if (data != null) {
  1403. for (var key4 in data) queryData[key4] = data[key4]
  1404. path = path.replace(/:([^\/]+)/g, function(match2, token) {
  1405. delete queryData[token]
  1406. return data[token]
  1407. })
  1408. }
  1409. var query = buildQueryString(queryData)
  1410. if (query) path += "?" + query
  1411. var hash = buildQueryString(hashData)
  1412. if (hash) path += "#" + hash
  1413. if (supportsPushState) {
  1414. var state = options ? options.state : null
  1415. var title = options ? options.title : null
  1416. $window.onpopstate()
  1417. if (options && options.replace) $window.history.replaceState(state, title, router.prefix + path)
  1418. else $window.history.pushState(state, title, router.prefix + path)
  1419. }
  1420. else $window.location.href = router.prefix + path
  1421. }
  1422. router.defineRoutes = function(routes, resolve, reject) {
  1423. function resolveRoute() {
  1424. var path = router.getPath()
  1425. var params = {}
  1426. var pathname = parsePath(path, params, params)
  1427. var state = $window.history.state
  1428. if (state != null) {
  1429. for (var k in state) params[k] = state[k]
  1430. }
  1431. for (var route0 in routes) {
  1432. var matcher = new RegExp("^" + route0.replace(/:[^\/]+?\.{3}/g, "(.*?)").replace(/:[^\/]+/g, "([^\\/]+)") + "\/?$")
  1433. if (matcher.test(pathname)) {
  1434. pathname.replace(matcher, function() {
  1435. var keys = route0.match(/:[^\/]+/g) || []
  1436. var values = [].slice.call(arguments, 1, -2)
  1437. for (var i = 0; i < keys.length; i++) {
  1438. params[keys[i].replace(/:|\./g, "")] = decodeURIComponent(values[i])
  1439. }
  1440. resolve(routes[route0], params, path, route0)
  1441. })
  1442. return
  1443. }
  1444. }
  1445. reject(path, params)
  1446. }
  1447. if (supportsPushState) $window.onpopstate = debounceAsync(resolveRoute)
  1448. else if (router.prefix.charAt(0) === "#") $window.onhashchange = resolveRoute
  1449. resolveRoute()
  1450. }
  1451. return router
  1452. }
  1453. var _20 = function($window, redrawService0) {
  1454. var routeService = coreRouter($window)
  1455. var identity = function(v) {return v}
  1456. var render1, component, attrs3, currentPath, lastUpdate
  1457. var route = function(root, defaultRoute, routes) {
  1458. if (root == null) throw new Error("Ensure the DOM element that was passed to `m.route` is not undefined")
  1459. var run1 = function() {
  1460. if (render1 != null) redrawService0.render(root, render1(Vnode(component, attrs3.key, attrs3)))
  1461. }
  1462. var bail = function(path) {
  1463. if (path !== defaultRoute) routeService.setPath(defaultRoute, null, {replace: true})
  1464. else throw new Error("Could not resolve default route " + defaultRoute)
  1465. }
  1466. routeService.defineRoutes(routes, function(payload, params, path) {
  1467. var update = lastUpdate = function(routeResolver, comp) {
  1468. if (update !== lastUpdate) return
  1469. component = comp != null && (typeof comp.view === "function" || typeof comp === "function")? comp : "div"
  1470. attrs3 = params, currentPath = path, lastUpdate = null
  1471. render1 = (routeResolver.render || identity).bind(routeResolver)
  1472. run1()
  1473. }
  1474. if (payload.view || typeof payload === "function") update({}, payload)
  1475. else {
  1476. if (payload.onmatch) {
  1477. Promise.resolve(payload.onmatch(params, path)).then(function(resolved) {
  1478. update(payload, resolved)
  1479. }, bail)
  1480. }
  1481. else update(payload, "div")
  1482. }
  1483. }, bail)
  1484. redrawService0.subscribe(root, run1)
  1485. }
  1486. route.set = function(path, data, options) {
  1487. if (lastUpdate != null) options = {replace: true}
  1488. lastUpdate = null
  1489. routeService.setPath(path, data, options)
  1490. }
  1491. route.get = function() {return currentPath}
  1492. route.prefix = function(prefix0) {routeService.prefix = prefix0}
  1493. route.link = function(vnode1) {
  1494. vnode1.dom.setAttribute("href", routeService.prefix + vnode1.attrs.href)
  1495. vnode1.dom.onclick = function(e) {
  1496. if (e.ctrlKey || e.metaKey || e.shiftKey || e.which === 2) return
  1497. e.preventDefault()
  1498. e.redraw = false
  1499. var href = this.getAttribute("href")
  1500. if (href.indexOf(routeService.prefix) === 0) href = href.slice(routeService.prefix.length)
  1501. route.set(href, undefined, undefined)
  1502. }
  1503. }
  1504. route.param = function(key3) {
  1505. if(typeof attrs3 !== "undefined" && typeof key3 !== "undefined") return attrs3[key3]
  1506. return attrs3
  1507. }
  1508. return route
  1509. }
  1510. m.route = _20(window, redrawService)
  1511. m.withAttr = function(attrName, callback1, context) {
  1512. return function(e) {
  1513. callback1.call(context || this, attrName in e.currentTarget ? e.currentTarget[attrName] : e.currentTarget.getAttribute(attrName))
  1514. }
  1515. }
  1516. var _28 = coreRenderer(window)
  1517. m.render = _28.render
  1518. m.redraw = redrawService.redraw
  1519. m.request = requestService.request
  1520. m.jsonp = requestService.jsonp
  1521. m.parseQueryString = parseQueryString
  1522. m.buildQueryString = buildQueryString
  1523. m.version = "1.1.1"
  1524. m.vnode = Vnode
  1525. if (true) module["exports"] = m
  1526. else window.m = m
  1527. }());
  1528. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(81).setImmediate, __webpack_require__(6)))
  1529. /***/ }),
  1530. /* 2 */
  1531. /***/ (function(module, exports) {
  1532. // _
  1533. // (_)________ ____
  1534. // / / ___/ __ \/ __ \
  1535. // / (__ ) /_/ / / / /
  1536. // __/ /____/\____/_/ /_/
  1537. // /___/
  1538. module.exports = {
  1539. lang:'fr',
  1540. langs:[
  1541. {'lc':'fr', 'label':'fr', 'db':'2-Appuhn-FR-ethicadb.json'},
  1542. {'lc':'bra', 'label':'bra', 'db':'ethica-bresilen.json'}
  1543. ],
  1544. data:[],
  1545. loaded_dbs:0,
  1546. data_byid:[],
  1547. data_strct:{},
  1548. load: function(callback) {
  1549. // load all dbs, when all loaded call main app callback function
  1550. for (var i = 0; i < this.langs.length; i++) {
  1551. this.loadJSON(this.langs[i].lc, 'assets/jsondb/'+this.langs[i].db, callback)
  1552. }
  1553. },
  1554. loadJSON: function(lc, file, callback){
  1555. var xobj = new XMLHttpRequest();
  1556. xobj.overrideMimeType("application/json");
  1557. // TODO: load and unzip gziped json
  1558. // xobj.setRequestHeader('Accept-Encoding', 'gzip');
  1559. xobj.onreadystatechange = function () {
  1560. // console.log('onreadystatechange', xobj.readyState);
  1561. switch(xobj.readyState){
  1562. case 3:
  1563. console.log('loading');
  1564. break;
  1565. case 4:
  1566. if (xobj.status === 200) {
  1567. this.onJSONLoaded(lc, xobj.responseText, callback);
  1568. } else {
  1569. console.log("Status de la réponse: %d (%s)", xobj.status, xobj.statusText);
  1570. }
  1571. break;
  1572. }
  1573. }.bind(this);
  1574. xobj.open('GET', file, true);
  1575. xobj.send(null);
  1576. },
  1577. onJSONLoaded: function(lc, json, callback){
  1578. console.log('onDBLoaded');
  1579. this.data[lc] = JSON.parse(json);
  1580. this.loaded_dbs ++;
  1581. //
  1582. if (this.loaded_dbs == this.langs.length) {
  1583. this.parseByID(callback);
  1584. }
  1585. },
  1586. parseByID: function(callback){
  1587. for(l in this.data){
  1588. // console.log('l', l);
  1589. this.data_byid[l] = {};
  1590. for (p in this.data[l]) {
  1591. // console.log(this.data[l][p]);
  1592. for (e in this.data[l][p].enonces) {
  1593. // console.log('e',e);
  1594. this.data_byid[l][this.data[l][p].enonces[e].id] = this.data[l][p].enonces[e];
  1595. for (c in this.data[l][p].enonces[e].childs){
  1596. // console.log(_db[p][e][c]);
  1597. this.data_byid[l][this.data[l][p].enonces[e].childs[c].id] = this.data[l][p].enonces[e].childs[c];
  1598. }
  1599. }
  1600. }
  1601. }
  1602. // console.log('this.data_byid', this.data_byid);
  1603. this.parseStrct(callback);
  1604. },
  1605. parseStrct: function(callback){
  1606. var id, item, obj, links_match, link, tid;
  1607. for (id in this.data_byid[this.langs[0].lc]) {
  1608. item = this.data_byid[this.langs[0].lc][id];
  1609. // console.log(item);
  1610. obj = {
  1611. 'to':[],
  1612. 'from':[],
  1613. };
  1614. // get links
  1615. links_match = item.text.match(/\[[^\]]+\]\([^\)]+\)/g);
  1616. // console.log(links_match);
  1617. // if links exist on text
  1618. if(links_match){
  1619. for(link of links_match){
  1620. // console.log(link);
  1621. // get the target id
  1622. tid = link.match(/\((.+)\)/)[1];
  1623. // avoid duplicates
  1624. if (obj.to.indexOf(tid) == -1)
  1625. obj.to.push(tid);
  1626. // add id to "from" links in target
  1627. // if target exists
  1628. if(typeof this.data_strct[tid] !== 'undefined'){
  1629. // avoid duplicates
  1630. if (this.data_strct[tid].from.indexOf(tid) == -1)
  1631. this.data_strct[tid].from.push(id);
  1632. }else{
  1633. // if targets does not exists, the db has an issue, warn about that
  1634. console.log('!! warning : '+tid+' target id does not exists');
  1635. }
  1636. }
  1637. }
  1638. // add the item links to the main links listings
  1639. this.data_strct[id] = obj;
  1640. }
  1641. // console.log('data_strct',this.data_strct);
  1642. callback();
  1643. }
  1644. }
  1645. /***/ }),
  1646. /* 3 */
  1647. /***/ (function(module, exports, __webpack_require__) {
  1648. "use strict";
  1649. /**
  1650. * class Ruler
  1651. *
  1652. * Helper class, used by [[MarkdownIt#core]], [[MarkdownIt#block]] and
  1653. * [[MarkdownIt#inline]] to manage sequences of functions (rules):
  1654. *
  1655. * - keep rules in defined order
  1656. * - assign the name to each rule
  1657. * - enable/disable rules
  1658. * - add/replace rules
  1659. * - allow assign rules to additional named chains (in the same)
  1660. * - cacheing lists of active rules
  1661. *
  1662. * You will not need use this class directly until write plugins. For simple
  1663. * rules control use [[MarkdownIt.disable]], [[MarkdownIt.enable]] and
  1664. * [[MarkdownIt.use]].
  1665. **/
  1666. /**
  1667. * new Ruler()
  1668. **/
  1669. function Ruler() {
  1670. // List of added rules. Each element is:
  1671. //
  1672. // {
  1673. // name: XXX,
  1674. // enabled: Boolean,
  1675. // fn: Function(),
  1676. // alt: [ name2, name3 ]
  1677. // }
  1678. //
  1679. this.__rules__ = [];
  1680. // Cached rule chains.
  1681. //
  1682. // First level - chain name, '' for default.
  1683. // Second level - diginal anchor for fast filtering by charcodes.
  1684. //
  1685. this.__cache__ = null;
  1686. }
  1687. ////////////////////////////////////////////////////////////////////////////////
  1688. // Helper methods, should not be used directly
  1689. // Find rule index by name
  1690. //
  1691. Ruler.prototype.__find__ = function (name) {
  1692. for (var i = 0; i < this.__rules__.length; i++) {
  1693. if (this.__rules__[i].name === name) {
  1694. return i;
  1695. }
  1696. }
  1697. return -1;
  1698. };
  1699. // Build rules lookup cache
  1700. //
  1701. Ruler.prototype.__compile__ = function () {
  1702. var self = this;
  1703. var chains = [ '' ];
  1704. // collect unique names
  1705. self.__rules__.forEach(function (rule) {
  1706. if (!rule.enabled) { return; }
  1707. rule.alt.forEach(function (altName) {
  1708. if (chains.indexOf(altName) < 0) {
  1709. chains.push(altName);
  1710. }
  1711. });
  1712. });
  1713. self.__cache__ = {};
  1714. chains.forEach(function (chain) {
  1715. self.__cache__[chain] = [];
  1716. self.__rules__.forEach(function (rule) {
  1717. if (!rule.enabled) { return; }
  1718. if (chain && rule.alt.indexOf(chain) < 0) { return; }
  1719. self.__cache__[chain].push(rule.fn);
  1720. });
  1721. });
  1722. };
  1723. /**
  1724. * Ruler.at(name, fn [, options])
  1725. * - name (String): rule name to replace.
  1726. * - fn (Function): new rule function.
  1727. * - options (Object): new rule options (not mandatory).
  1728. *
  1729. * Replace rule by name with new function & options. Throws error if name not
  1730. * found.
  1731. *
  1732. * ##### Options:
  1733. *
  1734. * - __alt__ - array with names of "alternate" chains.
  1735. *
  1736. * ##### Example
  1737. *
  1738. * Replace existing typorgapher replacement rule with new one:
  1739. *
  1740. * ```javascript
  1741. * var md = require('markdown-it')();
  1742. *
  1743. * md.core.ruler.at('replacements', function replace(state) {
  1744. * //...
  1745. * });
  1746. * ```
  1747. **/
  1748. Ruler.prototype.at = function (name, fn, options) {
  1749. var index = this.__find__(name);
  1750. var opt = options || {};
  1751. if (index === -1) { throw new Error('Parser rule not found: ' + name); }
  1752. this.__rules__[index].fn = fn;
  1753. this.__rules__[index].alt = opt.alt || [];
  1754. this.__cache__ = null;
  1755. };
  1756. /**
  1757. * Ruler.before(beforeName, ruleName, fn [, options])
  1758. * - beforeName (String): new rule will be added before this one.
  1759. * - ruleName (String): name of added rule.
  1760. * - fn (Function): rule function.
  1761. * - options (Object): rule options (not mandatory).
  1762. *
  1763. * Add new rule to chain before one with given name. See also
  1764. * [[Ruler.after]], [[Ruler.push]].
  1765. *
  1766. * ##### Options:
  1767. *
  1768. * - __alt__ - array with names of "alternate" chains.
  1769. *
  1770. * ##### Example
  1771. *
  1772. * ```javascript
  1773. * var md = require('markdown-it')();
  1774. *
  1775. * md.block.ruler.before('paragraph', 'my_rule', function replace(state) {
  1776. * //...
  1777. * });
  1778. * ```
  1779. **/
  1780. Ruler.prototype.before = function (beforeName, ruleName, fn, options) {
  1781. var index = this.__find__(beforeName);
  1782. var opt = options || {};
  1783. if (index === -1) { throw new Error('Parser rule not found: ' + beforeName); }
  1784. this.__rules__.splice(index, 0, {
  1785. name: ruleName,
  1786. enabled: true,
  1787. fn: fn,
  1788. alt: opt.alt || []
  1789. });
  1790. this.__cache__ = null;
  1791. };
  1792. /**
  1793. * Ruler.after(afterName, ruleName, fn [, options])
  1794. * - afterName (String): new rule will be added after this one.
  1795. * - ruleName (String): name of added rule.
  1796. * - fn (Function): rule function.
  1797. * - options (Object): rule options (not mandatory).
  1798. *
  1799. * Add new rule to chain after one with given name. See also
  1800. * [[Ruler.before]], [[Ruler.push]].
  1801. *
  1802. * ##### Options:
  1803. *
  1804. * - __alt__ - array with names of "alternate" chains.
  1805. *
  1806. * ##### Example
  1807. *
  1808. * ```javascript
  1809. * var md = require('markdown-it')();
  1810. *
  1811. * md.inline.ruler.after('text', 'my_rule', function replace(state) {
  1812. * //...
  1813. * });
  1814. * ```
  1815. **/
  1816. Ruler.prototype.after = function (afterName, ruleName, fn, options) {
  1817. var index = this.__find__(afterName);
  1818. var opt = options || {};
  1819. if (index === -1) { throw new Error('Parser rule not found: ' + afterName); }
  1820. this.__rules__.splice(index + 1, 0, {
  1821. name: ruleName,
  1822. enabled: true,
  1823. fn: fn,
  1824. alt: opt.alt || []
  1825. });
  1826. this.__cache__ = null;
  1827. };
  1828. /**
  1829. * Ruler.push(ruleName, fn [, options])
  1830. * - ruleName (String): name of added rule.
  1831. * - fn (Function): rule function.
  1832. * - options (Object): rule options (not mandatory).
  1833. *
  1834. * Push new rule to the end of chain. See also
  1835. * [[Ruler.before]], [[Ruler.after]].
  1836. *
  1837. * ##### Options:
  1838. *
  1839. * - __alt__ - array with names of "alternate" chains.
  1840. *
  1841. * ##### Example
  1842. *
  1843. * ```javascript
  1844. * var md = require('markdown-it')();
  1845. *
  1846. * md.core.ruler.push('my_rule', function replace(state) {
  1847. * //...
  1848. * });
  1849. * ```
  1850. **/
  1851. Ruler.prototype.push = function (ruleName, fn, options) {
  1852. var opt = options || {};
  1853. this.__rules__.push({
  1854. name: ruleName,
  1855. enabled: true,
  1856. fn: fn,
  1857. alt: opt.alt || []
  1858. });
  1859. this.__cache__ = null;
  1860. };
  1861. /**
  1862. * Ruler.enable(list [, ignoreInvalid]) -> Array
  1863. * - list (String|Array): list of rule names to enable.
  1864. * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
  1865. *
  1866. * Enable rules with given names. If any rule name not found - throw Error.
  1867. * Errors can be disabled by second param.
  1868. *
  1869. * Returns list of found rule names (if no exception happened).
  1870. *
  1871. * See also [[Ruler.disable]], [[Ruler.enableOnly]].
  1872. **/
  1873. Ruler.prototype.enable = function (list, ignoreInvalid) {
  1874. if (!Array.isArray(list)) { list = [ list ]; }
  1875. var result = [];
  1876. // Search by name and enable
  1877. list.forEach(function (name) {
  1878. var idx = this.__find__(name);
  1879. if (idx < 0) {
  1880. if (ignoreInvalid) { return; }
  1881. throw new Error('Rules manager: invalid rule name ' + name);
  1882. }
  1883. this.__rules__[idx].enabled = true;
  1884. result.push(name);
  1885. }, this);
  1886. this.__cache__ = null;
  1887. return result;
  1888. };
  1889. /**
  1890. * Ruler.enableOnly(list [, ignoreInvalid])
  1891. * - list (String|Array): list of rule names to enable (whitelist).
  1892. * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
  1893. *
  1894. * Enable rules with given names, and disable everything else. If any rule name
  1895. * not found - throw Error. Errors can be disabled by second param.
  1896. *
  1897. * See also [[Ruler.disable]], [[Ruler.enable]].
  1898. **/
  1899. Ruler.prototype.enableOnly = function (list, ignoreInvalid) {
  1900. if (!Array.isArray(list)) { list = [ list ]; }
  1901. this.__rules__.forEach(function (rule) { rule.enabled = false; });
  1902. this.enable(list, ignoreInvalid);
  1903. };
  1904. /**
  1905. * Ruler.disable(list [, ignoreInvalid]) -> Array
  1906. * - list (String|Array): list of rule names to disable.
  1907. * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
  1908. *
  1909. * Disable rules with given names. If any rule name not found - throw Error.
  1910. * Errors can be disabled by second param.
  1911. *
  1912. * Returns list of found rule names (if no exception happened).
  1913. *
  1914. * See also [[Ruler.enable]], [[Ruler.enableOnly]].
  1915. **/
  1916. Ruler.prototype.disable = function (list, ignoreInvalid) {
  1917. if (!Array.isArray(list)) { list = [ list ]; }
  1918. var result = [];
  1919. // Search by name and disable
  1920. list.forEach(function (name) {
  1921. var idx = this.__find__(name);
  1922. if (idx < 0) {
  1923. if (ignoreInvalid) { return; }
  1924. throw new Error('Rules manager: invalid rule name ' + name);
  1925. }
  1926. this.__rules__[idx].enabled = false;
  1927. result.push(name);
  1928. }, this);
  1929. this.__cache__ = null;
  1930. return result;
  1931. };
  1932. /**
  1933. * Ruler.getRules(chainName) -> Array
  1934. *
  1935. * Return array of active functions (rules) for given chain name. It analyzes
  1936. * rules configuration, compiles caches if not exists and returns result.
  1937. *
  1938. * Default chain name is `''` (empty string). It can't be skipped. That's
  1939. * done intentionally, to keep signature monomorphic for high speed.
  1940. **/
  1941. Ruler.prototype.getRules = function (chainName) {
  1942. if (this.__cache__ === null) {
  1943. this.__compile__();
  1944. }
  1945. // Chain can be empty, if rules disabled. But we still have to return Array.
  1946. return this.__cache__[chainName] || [];
  1947. };
  1948. module.exports = Ruler;
  1949. /***/ }),
  1950. /* 4 */
  1951. /***/ (function(module, exports, __webpack_require__) {
  1952. "use strict";
  1953. // Token class
  1954. /**
  1955. * class Token
  1956. **/
  1957. /**
  1958. * new Token(type, tag, nesting)
  1959. *
  1960. * Create new token and fill passed properties.
  1961. **/
  1962. function Token(type, tag, nesting) {
  1963. /**
  1964. * Token#type -> String
  1965. *
  1966. * Type of the token (string, e.g. "paragraph_open")
  1967. **/
  1968. this.type = type;
  1969. /**
  1970. * Token#tag -> String
  1971. *
  1972. * html tag name, e.g. "p"
  1973. **/
  1974. this.tag = tag;
  1975. /**
  1976. * Token#attrs -> Array
  1977. *
  1978. * Html attributes. Format: `[ [ name1, value1 ], [ name2, value2 ] ]`
  1979. **/
  1980. this.attrs = null;
  1981. /**
  1982. * Token#map -> Array
  1983. *
  1984. * Source map info. Format: `[ line_begin, line_end ]`
  1985. **/
  1986. this.map = null;
  1987. /**
  1988. * Token#nesting -> Number
  1989. *
  1990. * Level change (number in {-1, 0, 1} set), where:
  1991. *
  1992. * - `1` means the tag is opening
  1993. * - `0` means the tag is self-closing
  1994. * - `-1` means the tag is closing
  1995. **/
  1996. this.nesting = nesting;
  1997. /**
  1998. * Token#level -> Number
  1999. *
  2000. * nesting level, the same as `state.level`
  2001. **/
  2002. this.level = 0;
  2003. /**
  2004. * Token#children -> Array
  2005. *
  2006. * An array of child nodes (inline and img tokens)
  2007. **/
  2008. this.children = null;
  2009. /**
  2010. * Token#content -> String
  2011. *
  2012. * In a case of self-closing tag (code, html, fence, etc.),
  2013. * it has contents of this tag.
  2014. **/
  2015. this.content = '';
  2016. /**
  2017. * Token#markup -> String
  2018. *
  2019. * '*' or '_' for emphasis, fence string for fence, etc.
  2020. **/
  2021. this.markup = '';
  2022. /**
  2023. * Token#info -> String
  2024. *
  2025. * fence infostring
  2026. **/
  2027. this.info = '';
  2028. /**
  2029. * Token#meta -> Object
  2030. *
  2031. * A place for plugins to store an arbitrary data
  2032. **/
  2033. this.meta = null;
  2034. /**
  2035. * Token#block -> Boolean
  2036. *
  2037. * True for block-level tokens, false for inline tokens.
  2038. * Used in renderer to calculate line breaks
  2039. **/
  2040. this.block = false;
  2041. /**
  2042. * Token#hidden -> Boolean
  2043. *
  2044. * If it's true, ignore this element when rendering. Used for tight lists
  2045. * to hide paragraphs.
  2046. **/
  2047. this.hidden = false;
  2048. }
  2049. /**
  2050. * Token.attrIndex(name) -> Number
  2051. *
  2052. * Search attribute index by name.
  2053. **/
  2054. Token.prototype.attrIndex = function attrIndex(name) {
  2055. var attrs, i, len;
  2056. if (!this.attrs) { return -1; }
  2057. attrs = this.attrs;
  2058. for (i = 0, len = attrs.length; i < len; i++) {
  2059. if (attrs[i][0] === name) { return i; }
  2060. }
  2061. return -1;
  2062. };
  2063. /**
  2064. * Token.attrPush(attrData)
  2065. *
  2066. * Add `[ name, value ]` attribute to list. Init attrs if necessary
  2067. **/
  2068. Token.prototype.attrPush = function attrPush(attrData) {
  2069. if (this.attrs) {
  2070. this.attrs.push(attrData);
  2071. } else {
  2072. this.attrs = [ attrData ];
  2073. }
  2074. };
  2075. /**
  2076. * Token.attrSet(name, value)
  2077. *
  2078. * Set `name` attribute to `value`. Override old value if exists.
  2079. **/
  2080. Token.prototype.attrSet = function attrSet(name, value) {
  2081. var idx = this.attrIndex(name),
  2082. attrData = [ name, value ];
  2083. if (idx < 0) {
  2084. this.attrPush(attrData);
  2085. } else {
  2086. this.attrs[idx] = attrData;
  2087. }
  2088. };
  2089. /**
  2090. * Token.attrGet(name)
  2091. *
  2092. * Get the value of attribute `name`, or null if it does not exist.
  2093. **/
  2094. Token.prototype.attrGet = function attrGet(name) {
  2095. var idx = this.attrIndex(name), value = null;
  2096. if (idx >= 0) {
  2097. value = this.attrs[idx][1];
  2098. }
  2099. return value;
  2100. };
  2101. /**
  2102. * Token.attrJoin(name, value)
  2103. *
  2104. * Join value to existing attribute via space. Or create new attribute if not
  2105. * exists. Useful to operate with token classes.
  2106. **/
  2107. Token.prototype.attrJoin = function attrJoin(name, value) {
  2108. var idx = this.attrIndex(name);
  2109. if (idx < 0) {
  2110. this.attrPush([ name, value ]);
  2111. } else {
  2112. this.attrs[idx][1] = this.attrs[idx][1] + ' ' + value;
  2113. }
  2114. };
  2115. module.exports = Token;
  2116. /***/ }),
  2117. /* 5 */
  2118. /***/ (function(module, exports) {
  2119. module.exports=/[!-#%-\*,-/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E44\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD807[\uDC41-\uDC45\uDC70\uDC71]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/
  2120. /***/ }),
  2121. /* 6 */
  2122. /***/ (function(module, exports) {
  2123. var g;
  2124. // This works in non-strict mode
  2125. g = (function() {
  2126. return this;
  2127. })();
  2128. try {
  2129. // This works if eval is allowed (see CSP)
  2130. g = g || Function("return this")() || (1,eval)("this");
  2131. } catch(e) {
  2132. // This works if the window reference is available
  2133. if(typeof window === "object")
  2134. g = window;
  2135. }
  2136. // g can still be undefined, but nothing to do about it...
  2137. // We return undefined, instead of nothing here, so it's
  2138. // easier to handle this case. if(!global) { ...}
  2139. module.exports = g;
  2140. /***/ }),
  2141. /* 7 */
  2142. /***/ (function(module, exports, __webpack_require__) {
  2143. var m = __webpack_require__(1);
  2144. // ____ __
  2145. // / __/___ ____ / /____ _____
  2146. // / /_/ __ \/ __ \/ __/ _ \/ ___/
  2147. // / __/ /_/ / /_/ / /_/ __/ /
  2148. // /_/ \____/\____/\__/\___/_/
  2149. module.exports = {
  2150. view: function(vn){
  2151. return m('footer', [
  2152. m('p', m.trust('© 2017 <a href="./">Ethica Spinoza</a>'))
  2153. ]);
  2154. }
  2155. }
  2156. /***/ }),
  2157. /* 8 */
  2158. /***/ (function(module, exports, __webpack_require__) {
  2159. var m = __webpack_require__(1);
  2160. var _dbs = __webpack_require__(2);
  2161. // __ __ __
  2162. // / / / /__ ____ _____/ /__ _____
  2163. // / /_/ / _ \/ __ `/ __ / _ \/ ___/
  2164. // / __ / __/ /_/ / /_/ / __/ /
  2165. // /_/ /_/\___/\__,_/\__,_/\___/_/
  2166. module.exports = {
  2167. view: function(vn){
  2168. return m('header', [
  2169. m('h1', 'Ethica'),
  2170. m('nav', {'id':"menus"}, [
  2171. m(_RouteMenu),
  2172. m(_LangMenu)
  2173. ])
  2174. ]);
  2175. }
  2176. }
  2177. var _RouteMenu = {
  2178. view: function(){
  2179. // create ul dom
  2180. return m('ul', {id:"routes"}, [
  2181. m('li', m('a', {'href':'#!/tree'}, "tree")),
  2182. m('li', m('a', {'href':'#!/dots'}, "dots")),
  2183. ]
  2184. );
  2185. }
  2186. }
  2187. // __ __ ___
  2188. // / / ____ _____ ____ _/ |/ /__ ____ __ __
  2189. // / / / __ `/ __ \/ __ `/ /|_/ / _ \/ __ \/ / / /
  2190. // / /___/ /_/ / / / / /_/ / / / / __/ / / / /_/ /
  2191. // /_____/\__,_/_/ /_/\__, /_/ /_/\___/_/ /_/\__,_/
  2192. // /____/
  2193. var _LangMenu = {
  2194. view: function(){
  2195. // create ul dom
  2196. return m('ul', {id:"languages"}, _dbs.langs.map(function(lang){
  2197. // create li dom for each lank link
  2198. return m('li',
  2199. // create a dom
  2200. m('a', {
  2201. 'lang':lang.lc,
  2202. 'href':'/?lang='+lang.lc,
  2203. onclick:function(e){
  2204. e.preventDefault();
  2205. // console.log('click lang', e);
  2206. var lang = e.target.getAttribute('lang');
  2207. console.log(lang);
  2208. if(lang != _dbs.lang){
  2209. // change url variable
  2210. // change db
  2211. _dbs.lang = lang;
  2212. // redraw UI
  2213. // m.redraw();
  2214. }
  2215. return false;
  2216. }
  2217. }, lang.label)
  2218. );
  2219. })
  2220. );
  2221. }
  2222. }
  2223. /***/ }),
  2224. /* 9 */
  2225. /***/ (function(module, exports, __webpack_require__) {
  2226. "use strict";
  2227. // Process footnotes
  2228. //
  2229. ////////////////////////////////////////////////////////////////////////////////
  2230. // Renderer partials
  2231. function render_footnote_anchor_name(tokens, idx, options, env/*, slf*/) {
  2232. var n = Number(tokens[idx].meta.id + 1).toString();
  2233. var prefix = '';
  2234. if (typeof env.docId === 'string') {
  2235. prefix = '-' + env.docId + '-';
  2236. }
  2237. return prefix + n;
  2238. }
  2239. function render_footnote_caption(tokens, idx/*, options, env, slf*/) {
  2240. var n = Number(tokens[idx].meta.id + 1).toString();
  2241. if (tokens[idx].meta.subId > 0) {
  2242. n += ':' + tokens[idx].meta.subId;
  2243. }
  2244. return '[' + n + ']';
  2245. }
  2246. function render_footnote_ref(tokens, idx, options, env, slf) {
  2247. var id = slf.rules.footnote_anchor_name(tokens, idx, options, env, slf);
  2248. var caption = slf.rules.footnote_caption(tokens, idx, options, env, slf);
  2249. var refid = id;
  2250. if (tokens[idx].meta.subId > 0) {
  2251. refid += ':' + tokens[idx].meta.subId;
  2252. }
  2253. return '<sup class="footnote-ref"><a href="#fn' + id + '" id="fnref' + refid + '">' + caption + '</a></sup>';
  2254. }
  2255. function render_footnote_block_open(tokens, idx, options) {
  2256. return (options.xhtmlOut ? '<hr class="footnotes-sep" />\n' : '<hr class="footnotes-sep">\n') +
  2257. '<section class="footnotes">\n' +
  2258. '<ol class="footnotes-list">\n';
  2259. }
  2260. function render_footnote_block_close() {
  2261. return '</ol>\n</section>\n';
  2262. }
  2263. function render_footnote_open(tokens, idx, options, env, slf) {
  2264. var id = slf.rules.footnote_anchor_name(tokens, idx, options, env, slf);
  2265. if (tokens[idx].meta.subId > 0) {
  2266. id += ':' + tokens[idx].meta.subId;
  2267. }
  2268. return '<li id="fn' + id + '" class="footnote-item">';
  2269. }
  2270. function render_footnote_close() {
  2271. return '</li>\n';
  2272. }
  2273. function render_footnote_anchor(tokens, idx, options, env, slf) {
  2274. var id = slf.rules.footnote_anchor_name(tokens, idx, options, env, slf);
  2275. if (tokens[idx].meta.subId > 0) {
  2276. id += ':' + tokens[idx].meta.subId;
  2277. }
  2278. /* ↩ with escape code to prevent display as Apple Emoji on iOS */
  2279. return ' <a href="#fnref' + id + '" class="footnote-backref">\u21a9\uFE0E</a>';
  2280. }
  2281. module.exports = function footnote_plugin(md) {
  2282. var parseLinkLabel = md.helpers.parseLinkLabel,
  2283. isSpace = md.utils.isSpace;
  2284. md.renderer.rules.footnote_ref = render_footnote_ref;
  2285. md.renderer.rules.footnote_block_open = render_footnote_block_open;
  2286. md.renderer.rules.footnote_block_close = render_footnote_block_close;
  2287. md.renderer.rules.footnote_open = render_footnote_open;
  2288. md.renderer.rules.footnote_close = render_footnote_close;
  2289. md.renderer.rules.footnote_anchor = render_footnote_anchor;
  2290. // helpers (only used in other rules, no tokens are attached to those)
  2291. md.renderer.rules.footnote_caption = render_footnote_caption;
  2292. md.renderer.rules.footnote_anchor_name = render_footnote_anchor_name;
  2293. // Process footnote block definition
  2294. function footnote_def(state, startLine, endLine, silent) {
  2295. var oldBMark, oldTShift, oldSCount, oldParentType, pos, label, token,
  2296. initial, offset, ch, posAfterColon,
  2297. start = state.bMarks[startLine] + state.tShift[startLine],
  2298. max = state.eMarks[startLine];
  2299. // line should be at least 5 chars - "[^x]:"
  2300. if (start + 4 > max) { return false; }
  2301. if (state.src.charCodeAt(start) !== 0x5B/* [ */) { return false; }
  2302. if (state.src.charCodeAt(start + 1) !== 0x5E/* ^ */) { return false; }
  2303. for (pos = start + 2; pos < max; pos++) {
  2304. if (state.src.charCodeAt(pos) === 0x20) { return false; }
  2305. if (state.src.charCodeAt(pos) === 0x5D /* ] */) {
  2306. break;
  2307. }
  2308. }
  2309. if (pos === start + 2) { return false; } // no empty footnote labels
  2310. if (pos + 1 >= max || state.src.charCodeAt(++pos) !== 0x3A /* : */) { return false; }
  2311. if (silent) { return true; }
  2312. pos++;
  2313. if (!state.env.footnotes) { state.env.footnotes = {}; }
  2314. if (!state.env.footnotes.refs) { state.env.footnotes.refs = {}; }
  2315. label = state.src.slice(start + 2, pos - 2);
  2316. state.env.footnotes.refs[':' + label] = -1;
  2317. token = new state.Token('footnote_reference_open', '', 1);
  2318. token.meta = { label: label };
  2319. token.level = state.level++;
  2320. state.tokens.push(token);
  2321. oldBMark = state.bMarks[startLine];
  2322. oldTShift = state.tShift[startLine];
  2323. oldSCount = state.sCount[startLine];
  2324. oldParentType = state.parentType;
  2325. posAfterColon = pos;
  2326. initial = offset = state.sCount[startLine] + pos - (state.bMarks[startLine] + state.tShift[startLine]);
  2327. while (pos < max) {
  2328. ch = state.src.charCodeAt(pos);
  2329. if (isSpace(ch)) {
  2330. if (ch === 0x09) {
  2331. offset += 4 - offset % 4;
  2332. } else {
  2333. offset++;
  2334. }
  2335. } else {
  2336. break;
  2337. }
  2338. pos++;
  2339. }
  2340. state.tShift[startLine] = pos - posAfterColon;
  2341. state.sCount[startLine] = offset - initial;
  2342. state.bMarks[startLine] = posAfterColon;
  2343. state.blkIndent += 4;
  2344. state.parentType = 'footnote';
  2345. if (state.sCount[startLine] < state.blkIndent) {
  2346. state.sCount[startLine] += state.blkIndent;
  2347. }
  2348. state.md.block.tokenize(state, startLine, endLine, true);
  2349. state.parentType = oldParentType;
  2350. state.blkIndent -= 4;
  2351. state.tShift[startLine] = oldTShift;
  2352. state.sCount[startLine] = oldSCount;
  2353. state.bMarks[startLine] = oldBMark;
  2354. token = new state.Token('footnote_reference_close', '', -1);
  2355. token.level = --state.level;
  2356. state.tokens.push(token);
  2357. return true;
  2358. }
  2359. // Process inline footnotes (^[...])
  2360. function footnote_inline(state, silent) {
  2361. var labelStart,
  2362. labelEnd,
  2363. footnoteId,
  2364. token,
  2365. tokens,
  2366. max = state.posMax,
  2367. start = state.pos;
  2368. if (start + 2 >= max) { return false; }
  2369. if (state.src.charCodeAt(start) !== 0x5E/* ^ */) { return false; }
  2370. if (state.src.charCodeAt(start + 1) !== 0x5B/* [ */) { return false; }
  2371. labelStart = start + 2;
  2372. labelEnd = parseLinkLabel(state, start + 1);
  2373. // parser failed to find ']', so it's not a valid note
  2374. if (labelEnd < 0) { return false; }
  2375. // We found the end of the link, and know for a fact it's a valid link;
  2376. // so all that's left to do is to call tokenizer.
  2377. //
  2378. if (!silent) {
  2379. if (!state.env.footnotes) { state.env.footnotes = {}; }
  2380. if (!state.env.footnotes.list) { state.env.footnotes.list = []; }
  2381. footnoteId = state.env.footnotes.list.length;
  2382. state.md.inline.parse(
  2383. state.src.slice(labelStart, labelEnd),
  2384. state.md,
  2385. state.env,
  2386. tokens = []
  2387. );
  2388. token = state.push('footnote_ref', '', 0);
  2389. token.meta = { id: footnoteId };
  2390. state.env.footnotes.list[footnoteId] = { tokens: tokens };
  2391. }
  2392. state.pos = labelEnd + 1;
  2393. state.posMax = max;
  2394. return true;
  2395. }
  2396. // Process footnote references ([^...])
  2397. function footnote_ref(state, silent) {
  2398. var label,
  2399. pos,
  2400. footnoteId,
  2401. footnoteSubId,
  2402. token,
  2403. max = state.posMax,
  2404. start = state.pos;
  2405. // should be at least 4 chars - "[^x]"
  2406. if (start + 3 > max) { return false; }
  2407. if (!state.env.footnotes || !state.env.footnotes.refs) { return false; }
  2408. if (state.src.charCodeAt(start) !== 0x5B/* [ */) { return false; }
  2409. if (state.src.charCodeAt(start + 1) !== 0x5E/* ^ */) { return false; }
  2410. for (pos = start + 2; pos < max; pos++) {
  2411. if (state.src.charCodeAt(pos) === 0x20) { return false; }
  2412. if (state.src.charCodeAt(pos) === 0x0A) { return false; }
  2413. if (state.src.charCodeAt(pos) === 0x5D /* ] */) {
  2414. break;
  2415. }
  2416. }
  2417. if (pos === start + 2) { return false; } // no empty footnote labels
  2418. if (pos >= max) { return false; }
  2419. pos++;
  2420. label = state.src.slice(start + 2, pos - 1);
  2421. if (typeof state.env.footnotes.refs[':' + label] === 'undefined') { return false; }
  2422. if (!silent) {
  2423. if (!state.env.footnotes.list) { state.env.footnotes.list = []; }
  2424. if (state.env.footnotes.refs[':' + label] < 0) {
  2425. footnoteId = state.env.footnotes.list.length;
  2426. state.env.footnotes.list[footnoteId] = { label: label, count: 0 };
  2427. state.env.footnotes.refs[':' + label] = footnoteId;
  2428. } else {
  2429. footnoteId = state.env.footnotes.refs[':' + label];
  2430. }
  2431. footnoteSubId = state.env.footnotes.list[footnoteId].count;
  2432. state.env.footnotes.list[footnoteId].count++;
  2433. token = state.push('footnote_ref', '', 0);
  2434. token.meta = { id: footnoteId, subId: footnoteSubId, label: label };
  2435. }
  2436. state.pos = pos;
  2437. state.posMax = max;
  2438. return true;
  2439. }
  2440. // Glue footnote tokens to end of token stream
  2441. function footnote_tail(state) {
  2442. var i, l, j, t, lastParagraph, list, token, tokens, current, currentLabel,
  2443. insideRef = false,
  2444. refTokens = {};
  2445. if (!state.env.footnotes) { return; }
  2446. state.tokens = state.tokens.filter(function (tok) {
  2447. if (tok.type === 'footnote_reference_open') {
  2448. insideRef = true;
  2449. current = [];
  2450. currentLabel = tok.meta.label;
  2451. return false;
  2452. }
  2453. if (tok.type === 'footnote_reference_close') {
  2454. insideRef = false;
  2455. // prepend ':' to avoid conflict with Object.prototype members
  2456. refTokens[':' + currentLabel] = current;
  2457. return false;
  2458. }
  2459. if (insideRef) { current.push(tok); }
  2460. return !insideRef;
  2461. });
  2462. if (!state.env.footnotes.list) { return; }
  2463. list = state.env.footnotes.list;
  2464. token = new state.Token('footnote_block_open', '', 1);
  2465. state.tokens.push(token);
  2466. for (i = 0, l = list.length; i < l; i++) {
  2467. token = new state.Token('footnote_open', '', 1);
  2468. token.meta = { id: i, label: list[i].label };
  2469. state.tokens.push(token);
  2470. if (list[i].tokens) {
  2471. tokens = [];
  2472. token = new state.Token('paragraph_open', 'p', 1);
  2473. token.block = true;
  2474. tokens.push(token);
  2475. token = new state.Token('inline', '', 0);
  2476. token.children = list[i].tokens;
  2477. token.content = '';
  2478. tokens.push(token);
  2479. token = new state.Token('paragraph_close', 'p', -1);
  2480. token.block = true;
  2481. tokens.push(token);
  2482. } else if (list[i].label) {
  2483. tokens = refTokens[':' + list[i].label];
  2484. }
  2485. state.tokens = state.tokens.concat(tokens);
  2486. if (state.tokens[state.tokens.length - 1].type === 'paragraph_close') {
  2487. lastParagraph = state.tokens.pop();
  2488. } else {
  2489. lastParagraph = null;
  2490. }
  2491. t = list[i].count > 0 ? list[i].count : 1;
  2492. for (j = 0; j < t; j++) {
  2493. token = new state.Token('footnote_anchor', '', 0);
  2494. token.meta = { id: i, subId: j, label: list[i].label };
  2495. state.tokens.push(token);
  2496. }
  2497. if (lastParagraph) {
  2498. state.tokens.push(lastParagraph);
  2499. }
  2500. token = new state.Token('footnote_close', '', -1);
  2501. state.tokens.push(token);
  2502. }
  2503. token = new state.Token('footnote_block_close', '', -1);
  2504. state.tokens.push(token);
  2505. }
  2506. md.block.ruler.before('reference', 'footnote_def', footnote_def, { alt: [ 'paragraph', 'reference' ] });
  2507. md.inline.ruler.after('image', 'footnote_inline', footnote_inline);
  2508. md.inline.ruler.after('footnote_inline', 'footnote_ref', footnote_ref);
  2509. md.core.ruler.after('inline', 'footnote_tail', footnote_tail);
  2510. };
  2511. /***/ }),
  2512. /* 10 */
  2513. /***/ (function(module, exports, __webpack_require__) {
  2514. "use strict";
  2515. module.exports = __webpack_require__(35);
  2516. /***/ }),
  2517. /* 11 */
  2518. /***/ (function(module, exports, __webpack_require__) {
  2519. "use strict";
  2520. // HTML5 entities map: { name -> utf16string }
  2521. //
  2522. /*eslint quotes:0*/
  2523. module.exports = __webpack_require__(23);
  2524. /***/ }),
  2525. /* 12 */
  2526. /***/ (function(module, exports, __webpack_require__) {
  2527. "use strict";
  2528. // Regexps to match html elements
  2529. var attr_name = '[a-zA-Z_:][a-zA-Z0-9:._-]*';
  2530. var unquoted = '[^"\'=<>`\\x00-\\x20]+';
  2531. var single_quoted = "'[^']*'";
  2532. var double_quoted = '"[^"]*"';
  2533. var attr_value = '(?:' + unquoted + '|' + single_quoted + '|' + double_quoted + ')';
  2534. var attribute = '(?:\\s+' + attr_name + '(?:\\s*=\\s*' + attr_value + ')?)';
  2535. var open_tag = '<[A-Za-z][A-Za-z0-9\\-]*' + attribute + '*\\s*\\/?>';
  2536. var close_tag = '<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>';
  2537. var comment = '<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->';
  2538. var processing = '<[?].*?[?]>';
  2539. var declaration = '<![A-Z]+\\s+[^>]*>';
  2540. var cdata = '<!\\[CDATA\\[[\\s\\S]*?\\]\\]>';
  2541. var HTML_TAG_RE = new RegExp('^(?:' + open_tag + '|' + close_tag + '|' + comment +
  2542. '|' + processing + '|' + declaration + '|' + cdata + ')');
  2543. var HTML_OPEN_CLOSE_TAG_RE = new RegExp('^(?:' + open_tag + '|' + close_tag + ')');
  2544. module.exports.HTML_TAG_RE = HTML_TAG_RE;
  2545. module.exports.HTML_OPEN_CLOSE_TAG_RE = HTML_OPEN_CLOSE_TAG_RE;
  2546. /***/ }),
  2547. /* 13 */
  2548. /***/ (function(module, exports, __webpack_require__) {
  2549. "use strict";
  2550. // Process *this* and _that_
  2551. //
  2552. // Insert each marker as a separate text token, and add it to delimiter list
  2553. //
  2554. module.exports.tokenize = function emphasis(state, silent) {
  2555. var i, scanned, token,
  2556. start = state.pos,
  2557. marker = state.src.charCodeAt(start);
  2558. if (silent) { return false; }
  2559. if (marker !== 0x5F /* _ */ && marker !== 0x2A /* * */) { return false; }
  2560. scanned = state.scanDelims(state.pos, marker === 0x2A);
  2561. for (i = 0; i < scanned.length; i++) {
  2562. token = state.push('text', '', 0);
  2563. token.content = String.fromCharCode(marker);
  2564. state.delimiters.push({
  2565. // Char code of the starting marker (number).
  2566. //
  2567. marker: marker,
  2568. // Total length of these series of delimiters.
  2569. //
  2570. length: scanned.length,
  2571. // An amount of characters before this one that's equivalent to
  2572. // current one. In plain English: if this delimiter does not open
  2573. // an emphasis, neither do previous `jump` characters.
  2574. //
  2575. // Used to skip sequences like "*****" in one step, for 1st asterisk
  2576. // value will be 0, for 2nd it's 1 and so on.
  2577. //
  2578. jump: i,
  2579. // A position of the token this delimiter corresponds to.
  2580. //
  2581. token: state.tokens.length - 1,
  2582. // Token level.
  2583. //
  2584. level: state.level,
  2585. // If this delimiter is matched as a valid opener, `end` will be
  2586. // equal to its position, otherwise it's `-1`.
  2587. //
  2588. end: -1,
  2589. // Boolean flags that determine if this delimiter could open or close
  2590. // an emphasis.
  2591. //
  2592. open: scanned.can_open,
  2593. close: scanned.can_close
  2594. });
  2595. }
  2596. state.pos += scanned.length;
  2597. return true;
  2598. };
  2599. // Walk through delimiter list and replace text tokens with tags
  2600. //
  2601. module.exports.postProcess = function emphasis(state) {
  2602. var i,
  2603. startDelim,
  2604. endDelim,
  2605. token,
  2606. ch,
  2607. isStrong,
  2608. delimiters = state.delimiters,
  2609. max = state.delimiters.length;
  2610. for (i = 0; i < max; i++) {
  2611. startDelim = delimiters[i];
  2612. if (startDelim.marker !== 0x5F/* _ */ && startDelim.marker !== 0x2A/* * */) {
  2613. continue;
  2614. }
  2615. // Process only opening markers
  2616. if (startDelim.end === -1) {
  2617. continue;
  2618. }
  2619. endDelim = delimiters[startDelim.end];
  2620. // If the next delimiter has the same marker and is adjacent to this one,
  2621. // merge those into one strong delimiter.
  2622. //
  2623. // `<em><em>whatever</em></em>` -> `<strong>whatever</strong>`
  2624. //
  2625. isStrong = i + 1 < max &&
  2626. delimiters[i + 1].end === startDelim.end - 1 &&
  2627. delimiters[i + 1].token === startDelim.token + 1 &&
  2628. delimiters[startDelim.end - 1].token === endDelim.token - 1 &&
  2629. delimiters[i + 1].marker === startDelim.marker;
  2630. ch = String.fromCharCode(startDelim.marker);
  2631. token = state.tokens[startDelim.token];
  2632. token.type = isStrong ? 'strong_open' : 'em_open';
  2633. token.tag = isStrong ? 'strong' : 'em';
  2634. token.nesting = 1;
  2635. token.markup = isStrong ? ch + ch : ch;
  2636. token.content = '';
  2637. token = state.tokens[endDelim.token];
  2638. token.type = isStrong ? 'strong_close' : 'em_close';
  2639. token.tag = isStrong ? 'strong' : 'em';
  2640. token.nesting = -1;
  2641. token.markup = isStrong ? ch + ch : ch;
  2642. token.content = '';
  2643. if (isStrong) {
  2644. state.tokens[delimiters[i + 1].token].content = '';
  2645. state.tokens[delimiters[startDelim.end - 1].token].content = '';
  2646. i++;
  2647. }
  2648. }
  2649. };
  2650. /***/ }),
  2651. /* 14 */
  2652. /***/ (function(module, exports, __webpack_require__) {
  2653. "use strict";
  2654. // ~~strike through~~
  2655. //
  2656. // Insert each marker as a separate text token, and add it to delimiter list
  2657. //
  2658. module.exports.tokenize = function strikethrough(state, silent) {
  2659. var i, scanned, token, len, ch,
  2660. start = state.pos,
  2661. marker = state.src.charCodeAt(start);
  2662. if (silent) { return false; }
  2663. if (marker !== 0x7E/* ~ */) { return false; }
  2664. scanned = state.scanDelims(state.pos, true);
  2665. len = scanned.length;
  2666. ch = String.fromCharCode(marker);
  2667. if (len < 2) { return false; }
  2668. if (len % 2) {
  2669. token = state.push('text', '', 0);
  2670. token.content = ch;
  2671. len--;
  2672. }
  2673. for (i = 0; i < len; i += 2) {
  2674. token = state.push('text', '', 0);
  2675. token.content = ch + ch;
  2676. state.delimiters.push({
  2677. marker: marker,
  2678. jump: i,
  2679. token: state.tokens.length - 1,
  2680. level: state.level,
  2681. end: -1,
  2682. open: scanned.can_open,
  2683. close: scanned.can_close
  2684. });
  2685. }
  2686. state.pos += scanned.length;
  2687. return true;
  2688. };
  2689. // Walk through delimiter list and replace text tokens with tags
  2690. //
  2691. module.exports.postProcess = function strikethrough(state) {
  2692. var i, j,
  2693. startDelim,
  2694. endDelim,
  2695. token,
  2696. loneMarkers = [],
  2697. delimiters = state.delimiters,
  2698. max = state.delimiters.length;
  2699. for (i = 0; i < max; i++) {
  2700. startDelim = delimiters[i];
  2701. if (startDelim.marker !== 0x7E/* ~ */) {
  2702. continue;
  2703. }
  2704. if (startDelim.end === -1) {
  2705. continue;
  2706. }
  2707. endDelim = delimiters[startDelim.end];
  2708. token = state.tokens[startDelim.token];
  2709. token.type = 's_open';
  2710. token.tag = 's';
  2711. token.nesting = 1;
  2712. token.markup = '~~';
  2713. token.content = '';
  2714. token = state.tokens[endDelim.token];
  2715. token.type = 's_close';
  2716. token.tag = 's';
  2717. token.nesting = -1;
  2718. token.markup = '~~';
  2719. token.content = '';
  2720. if (state.tokens[endDelim.token - 1].type === 'text' &&
  2721. state.tokens[endDelim.token - 1].content === '~') {
  2722. loneMarkers.push(endDelim.token - 1);
  2723. }
  2724. }
  2725. // If a marker sequence has an odd number of characters, it's splitted
  2726. // like this: `~~~~~` -> `~` + `~~` + `~~`, leaving one marker at the
  2727. // start of the sequence.
  2728. //
  2729. // So, we have to move all those markers after subsequent s_close tags.
  2730. //
  2731. while (loneMarkers.length) {
  2732. i = loneMarkers.pop();
  2733. j = i + 1;
  2734. while (j < state.tokens.length && state.tokens[j].type === 's_close') {
  2735. j++;
  2736. }
  2737. j--;
  2738. if (i !== j) {
  2739. token = state.tokens[j];
  2740. state.tokens[j] = state.tokens[i];
  2741. state.tokens[i] = token;
  2742. }
  2743. }
  2744. };
  2745. /***/ }),
  2746. /* 15 */
  2747. /***/ (function(module, exports, __webpack_require__) {
  2748. "use strict";
  2749. module.exports.encode = __webpack_require__(75);
  2750. module.exports.decode = __webpack_require__(74);
  2751. module.exports.format = __webpack_require__(76);
  2752. module.exports.parse = __webpack_require__(77);
  2753. /***/ }),
  2754. /* 16 */
  2755. /***/ (function(module, exports) {
  2756. module.exports=/[\0-\x1F\x7F-\x9F]/
  2757. /***/ }),
  2758. /* 17 */
  2759. /***/ (function(module, exports) {
  2760. module.exports=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/
  2761. /***/ }),
  2762. /* 18 */
  2763. /***/ (function(module, exports) {
  2764. module.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/
  2765. /***/ }),
  2766. /* 19 */
  2767. /***/ (function(module, exports, __webpack_require__) {
  2768. /**
  2769. * @Author: Bachir Soussi Chiadmi <bach>
  2770. * @Date: 16-04-2017
  2771. * @Email: bachir@figureslibres.io
  2772. * @Last modified by: bach
  2773. * @Last modified time: 18-04-2017
  2774. * @License: GPL-V3
  2775. */
  2776. __webpack_require__(27);
  2777. __webpack_require__(24);
  2778. __webpack_require__(25);
  2779. __webpack_require__(26);
  2780. var m = __webpack_require__(1);
  2781. // var marked = require('marked');
  2782. // var _helpers = require('modules/helpers');
  2783. var _dbs = __webpack_require__(2);
  2784. var _Tree = __webpack_require__(22);
  2785. var _Dots = __webpack_require__(21);
  2786. function init(){
  2787. _dbs.load(function(){
  2788. console.log("Init _dbs.data", _dbs.data);
  2789. console.log("Init _dbs.data_byid", _dbs.data_byid);
  2790. console.log("Init _dbs.data_strct", _dbs.data_strct);
  2791. m.route(document.body, "/tree", {
  2792. "/tree": _Tree,
  2793. "/dots": _Dots,
  2794. });
  2795. });
  2796. };
  2797. // ___
  2798. // / | ____ ____
  2799. // / /| | / __ \/ __ \
  2800. // / ___ |/ /_/ / /_/ /
  2801. // /_/ |_/ .___/ .___/
  2802. // /_/ /_/
  2803. // var _App = {
  2804. // view: function(){
  2805. // console.log('_App view', _lang);
  2806. // return [
  2807. // m('header', [
  2808. // m('h1', 'Ethica'),
  2809. // m('aside', {'id':"menus"}, m(_LangMenu) )
  2810. // ]),
  2811. // m(_Tree),
  2812. // m('footer', [
  2813. // m('p', m.trust('© 2017 <a href="./">Ethica Spinoza</a>'))
  2814. // ])
  2815. // ]
  2816. // }
  2817. // }
  2818. // _ _ __
  2819. // (_)___ (_) /_
  2820. // / / __ \/ / __/
  2821. // / / / / / / /_
  2822. // /_/_/ /_/_/\__/
  2823. init()
  2824. /***/ }),
  2825. /* 20 */
  2826. /***/ (function(module, exports) {
  2827. // removed by extract-text-webpack-plugin
  2828. /***/ }),
  2829. /* 21 */
  2830. /***/ (function(module, exports, __webpack_require__) {
  2831. var m = __webpack_require__(1);
  2832. // https://github.com/markdown-it/markdown-it
  2833. var markdown = __webpack_require__(10)()
  2834. .use(__webpack_require__(9));
  2835. var _dbs = __webpack_require__(2);
  2836. var _Header = __webpack_require__(8);
  2837. var _Footer = __webpack_require__(7);
  2838. // var _lang = require('../main.js')._langs;
  2839. // ____ __
  2840. // / __ \____ / /_
  2841. // / / / / __ \/ __/
  2842. // / /_/ / /_/ / /_
  2843. // /_____/\____/\__/
  2844. var _Dot = {
  2845. id:null,
  2846. type:'',
  2847. text:'',
  2848. summary:'',
  2849. active:true,
  2850. opened:false,
  2851. links:null,
  2852. parents:[],
  2853. lang:_dbs.lang,
  2854. setuptext:function(vn){
  2855. // console.log('setuptext', vn);
  2856. // construct text
  2857. this.text = markdown.render(vn.attrs.text);
  2858. // construct summary
  2859. // TODO: summary needs more work (strip tags, markdown render)
  2860. this.summary = vn.attrs.text.match('([^ ]*[ ]{0,1}){1,6}')[0];
  2861. this.summary = this.summary.trim().replace(/_([^_]+)$/g, "_$1_");
  2862. this.summary = this.summary.replace(/\[([^\]]+)$/g, "$1");
  2863. this.summary = markdown.renderInline(this.summary) + "&nbsp;…";
  2864. },
  2865. oninit: function(vn){
  2866. this.id = vn.attrs.id;
  2867. this.type = vn.attrs.type;
  2868. this.setuptext(vn);
  2869. if(typeof vn.attrs.active !== 'undefined')
  2870. this.active = vn.attrs.active;
  2871. // links
  2872. this.links = _dbs.data_strct[this.id];
  2873. // console.log(this.links);
  2874. // parents memorize where do we come from to avoid duplicates and looping nav
  2875. if(vn.attrs.parents){
  2876. this.parents = this.parents.concat(vn.attrs.parents);
  2877. // console.log('_Dot init '+this.id+' parents :',this.parents);
  2878. }
  2879. },
  2880. oncreate: function(vn){
  2881. if(this.active){
  2882. vn.dom.classList.remove('disabled');
  2883. }else{
  2884. vn.dom.classList.add('disabled');
  2885. }
  2886. },
  2887. onbeforeupdate: function(vn){
  2888. // console.log('onbeforeupdate');
  2889. if(this.lang != _dbs.lang){
  2890. this.lang = _dbs.lang;
  2891. this.setuptext(vn);
  2892. }
  2893. },
  2894. view: function(vn){
  2895. if (this.active && this.opened) {
  2896. // full view of dot with linked dots
  2897. // console.log('_Dot view '+this.id+' parents :',this.parents);
  2898. var dot_content = [
  2899. // links to
  2900. this.links.to.length
  2901. ? m('nav', {'class':'links to'}, this.links.to.map(function(id){
  2902. // console.log(id);
  2903. if(typeof _dbs.data_byid[_dbs.lang][id] !== 'undefined'){
  2904. return m(_Dot, {
  2905. "id":id,
  2906. 'text':_dbs.data_byid[_dbs.lang][id].text,
  2907. 'type':'',
  2908. // passe the memory of crossed dots plus the current one
  2909. 'parents':vn.state.parents.concat([vn.state.id]),
  2910. // activate link only if not in parents (already went through it)
  2911. 'active':vn.state.parents.indexOf(id) == -1 ? true:false
  2912. });
  2913. }
  2914. })
  2915. )
  2916. : null,
  2917. // id
  2918. m('span', {'class':'id'}, this.id), // this.type+' '+
  2919. // bullet
  2920. m('span', {'class':'bullet'}, m.trust('&#9899;')),
  2921. // full text
  2922. m('section', {
  2923. 'class':'text',
  2924. onmouseover: function(e){
  2925. e.preventDefault();
  2926. if(e.target.nodeName == "A" ){
  2927. // console.log("over e.target", e.target);
  2928. // console.log('over vn', vn);
  2929. var id = e.target.getAttribute("href");
  2930. // add highlight class
  2931. vn.dom.querySelector('nav.links>div[uid="'+id+'"]').classList.add('highlight');
  2932. }else{
  2933. // remove all hilight class
  2934. for (link of vn.dom.querySelectorAll('nav.links>div.dot')) {
  2935. link.classList.remove('highlight');
  2936. }
  2937. }
  2938. },
  2939. onclick:function(e){
  2940. e.preventDefault();
  2941. if(e.target.nodeName == "A" ){
  2942. // console.log("over e.target", e.target);
  2943. // console.log('over vn', vn);
  2944. var id = e.target.getAttribute("href");
  2945. // add highlight class
  2946. vn.dom.querySelector('nav.links>div[uid="'+id+'"]>.summary').click();
  2947. }
  2948. }
  2949. }, m.trust(this.text)),
  2950. // links from
  2951. this.links.from.length
  2952. ? m('nav', {'class':'links from'}, this.links.from.map(function(id){
  2953. // retrun a dot
  2954. return m(_Dot, {
  2955. "id":id,
  2956. 'text':_dbs.data_byid[_dbs.lang][id].text,
  2957. 'type':'',
  2958. // passe the memory of crossed dots plus the current one
  2959. 'parents':vn.state.parents.concat([vn.state.id]),
  2960. // activate link only if not in parents (already went through it)
  2961. 'active':vn.state.parents.indexOf(id) == -1 ? true:false
  2962. });
  2963. })
  2964. )
  2965. : null
  2966. ];
  2967. }else{
  2968. // preview dot
  2969. var dot_content = [
  2970. m('span', {'class':'id'}, this.id), // this.type+' '+
  2971. m('span', {'class':'bullet'}, m.trust('&#8226;')),
  2972. m('p', {
  2973. 'class':'summary',
  2974. onclick:function(e){
  2975. // TODO: animate openening (text and links separatly)
  2976. vn.state.opened = true;
  2977. }
  2978. }, m.trust(this.summary))
  2979. ];
  2980. }
  2981. return m('div',{
  2982. 'uid':this.id,
  2983. 'class':'dot'
  2984. },
  2985. dot_content
  2986. );
  2987. },
  2988. onupdate: function(vn){
  2989. // console.log('_Dot : onupdate', vn);
  2990. if(this.active){
  2991. if (this.opened){
  2992. vn.dom.classList.add('opened');
  2993. if(this.links.to.length)
  2994. vn.dom.classList.add('to-links');
  2995. if(this.links.from.length)
  2996. vn.dom.classList.add('from-links');
  2997. }else{
  2998. vn.dom.classList.remove('opened');
  2999. }
  3000. }
  3001. }
  3002. }
  3003. /*
  3004. down vote
  3005. Here's full list of black dotlikes from unicode
  3006. ● - &#9679; - Black Circle
  3007. ⏺ - &#9210; - Black Circle for Record
  3008. ⚫ - &#9899; - Medium Black Circle
  3009. ⬤ - &#11044; - Black Large Circle
  3010. ⧭ - &#10733; - Black Circle with Down Arrow
  3011. 🞄 - &#128900; - Black Slightly Small Circle
  3012. • - &#8226; - Bullet
  3013. ∙ - &#8729; - Bullet Operator
  3014. ⋅ - &#8901; - Dot Operator
  3015. 🌑 - &#127761; - New Moon Symbol
  3016. */
  3017. // _______ _ __ __
  3018. // / ___/ / (_) /__/ /
  3019. // / /__/ _ \/ / / _ /
  3020. // \___/_//_/_/_/\_,_/
  3021. var _Child = {
  3022. id:null,
  3023. part:null,
  3024. type:null,
  3025. // nested:false,
  3026. text:'',
  3027. oninit: function(vn){
  3028. // console.log('vn.attrs', vn.attrs);
  3029. this.id = vn.attrs.id;
  3030. this.type = vn.attrs.type;
  3031. // vn.state.part = vn.state.slug.match(/^(\d)(.+)/)[1];
  3032. this.text = vn.attrs.text;
  3033. // this.nested = vn.attrs.nested || false;
  3034. },
  3035. onbeforeupdate: function(vn, old){
  3036. // this.nested = vn.attrs.nested || false;
  3037. this.type = vn.attrs.type;
  3038. this.text = vn.attrs.text;
  3039. },
  3040. view: function(vn){
  3041. return m(_Dot, {"id":this.id, 'text':this.text, 'type':this.type});
  3042. }
  3043. };
  3044. // ______
  3045. // / ____/___ ____ ____ ________
  3046. // / __/ / __ \/ __ \/ __ \/ ___/ _ \
  3047. // / /___/ / / / /_/ / / / / /__/ __/
  3048. // /_____/_/ /_/\____/_/ /_/\___/\___/
  3049. var _Enonce = {
  3050. partid:null,
  3051. id:null,
  3052. title:null,
  3053. text:null,
  3054. // nested:false,
  3055. childs:[],
  3056. oninit:function(vn){
  3057. // // console.log('Enonce on init', vn);
  3058. this.partid = vn.attrs.partid;
  3059. this.id = vn.attrs.id;
  3060. this.title = vn.attrs.title;
  3061. this.text = vn.attrs.text;
  3062. this.childs = vn.attrs.childs;
  3063. // this.nested = vn.attrs.nested || false;
  3064. },
  3065. onbeforeupdate:function(vn, old) {
  3066. // console.log(vn.attrs.childs);
  3067. this.title = vn.attrs.title;
  3068. this.text = vn.attrs.text;
  3069. this.childs = vn.attrs.childs;
  3070. // this.nested = vn.attrs.nested || false;
  3071. // if(vn.attrs.id == '1d1') console.log('_Enonce UPDATE, text :', vn.attrs.text);
  3072. },
  3073. view: function(vn){
  3074. // if(vn.attrs.id == '1d1') console.log('_Enonce VIEW, text :', vn.attrs.text);
  3075. return [
  3076. // create dot
  3077. m(_Dot, {"id":this.id, 'text':this.text,'type':this.title}),
  3078. // addd children
  3079. this.childs.map(function(c){
  3080. return m(_Child, c);
  3081. })
  3082. ]
  3083. }
  3084. }
  3085. // ____ __
  3086. // / __ \____ ______/ /_
  3087. // / /_/ / __ `/ ___/ __/
  3088. // / ____/ /_/ / / / /_
  3089. // /_/ \__,_/_/ \__/
  3090. var _Part = {
  3091. oninit: function(vn){
  3092. this.id = vn.attrs.id;
  3093. this.title = vn.attrs.title;
  3094. this.enonces = vn.attrs.enonces;
  3095. },
  3096. onbeforeupdate: function(vn, old){
  3097. // console.log('_Part, onbeforeupdate old',old);
  3098. this.title = vn.attrs.title;
  3099. this.enonces = vn.attrs.enonces;
  3100. },
  3101. view: function(vn){
  3102. // console.log(vn.attrs.enonces);
  3103. return m("section", {
  3104. 'id' :this.id,
  3105. 'class' :'part'
  3106. },
  3107. [
  3108. // create title node
  3109. m("h1", {'class':'part'}, m.trust(markdown.renderInline(this.title))),
  3110. // create text node
  3111. this.enonces.map(function(e){
  3112. // console.log(e.text);
  3113. return m(_Enonce, Object.assign({"partid":this.id},e))
  3114. })
  3115. ]
  3116. )
  3117. }
  3118. }
  3119. // ____ __
  3120. // / __ \____ / /______
  3121. // / / / / __ \/ __/ ___/
  3122. // / /_/ / /_/ / /_(__ )
  3123. // /_____/\____/\__/____/
  3124. module.exports = {
  3125. view: function(){
  3126. // console.log('_Dots view', _dbs.lang);
  3127. return [
  3128. m(_Header),
  3129. m('main', {id:"content", 'class':'dots'}, _dbs.data[_dbs.lang].map(function(p){
  3130. return m(_Part,p);
  3131. })
  3132. ),
  3133. m(_Footer)
  3134. ];
  3135. }
  3136. }
  3137. // function(){
  3138. // switch(_dbs.lang){
  3139. // case 'fr':
  3140. // return "Hello dots !";
  3141. // break;
  3142. // case 'bra':
  3143. // return '"Hola dots !"'
  3144. // break;
  3145. // }
  3146. // }
  3147. /***/ }),
  3148. /* 22 */
  3149. /***/ (function(module, exports, __webpack_require__) {
  3150. var m = __webpack_require__(1);
  3151. // https://github.com/markdown-it/markdown-it
  3152. var markdown = __webpack_require__(10)()
  3153. .use(__webpack_require__(9));
  3154. var _dbs = __webpack_require__(2);
  3155. var _Header = __webpack_require__(8);
  3156. var _Footer = __webpack_require__(7);
  3157. // __ _ __
  3158. // / / (_)___ / /__
  3159. // / / / / __ \/ //_/
  3160. // / /___/ / / / / ,<
  3161. // /_____/_/_/ /_/_/|_|
  3162. var _Link = {
  3163. tid:"",
  3164. opened:false,
  3165. oninit: function(vn){
  3166. // console.log("INIT LINK : vn", vn);
  3167. // define target id
  3168. this.tid = vn.attrs.href;
  3169. },
  3170. onbeforeupdate: function(vn){
  3171. this.tid = vn.attrs.href;
  3172. },
  3173. view: function(vn){
  3174. this.tid_known = typeof _dbs.data_byid[_dbs.lang][this.tid] === 'undefined' ? false : true;
  3175. if (!this.tid_known) {
  3176. console.log('!! target id '+this.tid+' unkonwn !!');
  3177. }
  3178. if(this.opened && this.tid_known){
  3179. // console.log('this.tid', vn.state);
  3180. return m('div', {'class':'opened-link'},
  3181. [
  3182. m('span', {'class':"link text"}, vn.children),
  3183. typeof _dbs.data_byid[_dbs.lang][this.tid].childs != "undefined"
  3184. ? m(_Enonce, _dbs.data_byid[_dbs.lang][this.tid])
  3185. : m(_Item, _dbs.data_byid[_dbs.lang][this.tid])
  3186. ]
  3187. );
  3188. }else{
  3189. // console.log(vn);
  3190. return m('a', {
  3191. 'class':'link',
  3192. 'href':'#'+this.tid,
  3193. 'rel':this.tid,
  3194. onclick:function(e){
  3195. e.preventDefault();
  3196. console.log('click', this);
  3197. vn.state.opened = true;
  3198. return false;
  3199. }
  3200. }, vn.children); // c'est quoi ce vn.children ?
  3201. }
  3202. }
  3203. }
  3204. // ______ __
  3205. // /_ __/__ _ __/ /_
  3206. // / / / _ \| |/_/ __/
  3207. // / / / __/> </ /_
  3208. // /_/ \___/_/|_|\__/
  3209. // recusive function to record information of all subnodes
  3210. function parseTextDom(nodes){
  3211. var list = [];
  3212. // loop through childNodes
  3213. for (var i = 0; i < nodes.length; i++) {
  3214. var n = {};
  3215. if(typeof nodes[i].localName != "undefined"){
  3216. n.tag=nodes[i].localName;
  3217. if (n.tag == 'p') {
  3218. // replace p by div as we will insert other div in them
  3219. n.tag = 'div';
  3220. n.attrs = {'class':'paragraph'};
  3221. }
  3222. if (n.tag == 'a') {
  3223. // record the href attribute for cross reference
  3224. n.attrs = {'href':nodes[i].attributes.href.value};
  3225. }
  3226. if(nodes[i].childNodes.length){
  3227. // again parse node's childs
  3228. n.childs = parseTextDom(nodes[i].childNodes);
  3229. }
  3230. }else if (nodes[i].textContent.length > 1){
  3231. // if node has no localName it is probably a #text node
  3232. // we record it if it's not empty
  3233. n.tag='#text';
  3234. n.text=nodes[i].textContent;
  3235. }
  3236. // add the node to the list if it has a tag
  3237. if(typeof n.tag != "undefined")
  3238. list.push(n);
  3239. }
  3240. return list;
  3241. }
  3242. // recusive fucntion to generate mithril object from information recorded with parseTextDom()
  3243. function populateTextDom(n,i){
  3244. // console.log('populateTextDom : '+i,n);
  3245. return n.tag == "#text"
  3246. ? m.trust(n.text)
  3247. : m(
  3248. n.tag != 'a' ? n.tag : _Link,
  3249. typeof n.attrs != "undefined" ? n.attrs : {},
  3250. typeof n.childs != "undefined"
  3251. ? n.childs.map(populateTextDom)
  3252. : typeof n.text != "undefined"
  3253. ? m.trust(n.text)
  3254. : null
  3255. );
  3256. }
  3257. var _Text = {
  3258. id:null,
  3259. text:"",
  3260. texthtml:"",
  3261. textdom:null,
  3262. textchilds:[],
  3263. parsetext: function(){
  3264. // console.log('parsetext', this);
  3265. // !! we need to convert markdown to html here because parseTextDom() is recursive through nodes tree
  3266. // convert markdown to html
  3267. this.texthtml = markdown.render(this.text)
  3268. // TODO: fixe number link text disapear [3](1d3) ( in 104d )
  3269. // TODO: fixe parenthèse disparait _(par les Défin. [test 3](1d3) et [test 5](1d5))_ ( in 104d )
  3270. // parse html string to virtual dom
  3271. this.textdom = new DOMParser().parseFromString(this.texthtml, "text/html");
  3272. // get the text nodes (avoid html document extra)
  3273. this.textchilds = parseTextDom(this.textdom.getElementsByTagName('body')[0].childNodes);
  3274. },
  3275. oninit: function(vn){
  3276. this.id = vn.attrs.id;
  3277. this.text = vn.attrs.text;
  3278. this.parsetext();
  3279. },
  3280. onbeforeupdate: function(vn,old){
  3281. this.text = vn.attrs.text;
  3282. this.parsetext();
  3283. },
  3284. view: function(vn){
  3285. // console.log('_Text :: view : '+vn.attrs.slug, vn);
  3286. return m('div',
  3287. {'class':'text'},
  3288. // loop through childNodes list generated by parseTextDom() in init
  3289. this.textchilds.map(populateTextDom)
  3290. ); // /m.div.text
  3291. } // view:
  3292. }
  3293. // ______
  3294. // / _/ /____ ____ ___
  3295. // / // __/ _ \/ __ `__ \
  3296. // _/ // /_/ __/ / / / / /
  3297. // /___/\__/\___/_/ /_/ /_/
  3298. var _Item = {
  3299. id:null,
  3300. part:null,
  3301. type:null,
  3302. nested:false,
  3303. oninit: function(vn){
  3304. // console.log('vn.attrs', vn.attrs);
  3305. this.id = vn.attrs.id;
  3306. this.type = vn.attrs.type;
  3307. // vn.state.part = vn.state.slug.match(/^(\d)(.+)/)[1];
  3308. this.text = vn.attrs.text;
  3309. this.nested = vn.attrs.nested || false;
  3310. },
  3311. onbeforeupdate: function(vn, old){
  3312. this.nested = vn.attrs.nested || false;
  3313. this.type = vn.attrs.type;
  3314. this.text = vn.attrs.text;
  3315. },
  3316. view: function(vn){
  3317. return m("section", {
  3318. 'id':this.id,
  3319. 'class':'item'+(this.nested ? ' nested':'')
  3320. },
  3321. [
  3322. // create title node
  3323. m("h3", {
  3324. // 'ref':vn.attrs.href,
  3325. onclick: function(e){
  3326. vn.state.active = vn.state.active ? 0 : 1;
  3327. }
  3328. }, this.type),
  3329. // create text node
  3330. m(_Text, {'text':this.text, 'id':this.id})
  3331. ]
  3332. )
  3333. }
  3334. };
  3335. // ______
  3336. // / ____/___ ____ ____ ________
  3337. // / __/ / __ \/ __ \/ __ \/ ___/ _ \
  3338. // / /___/ / / / /_/ / / / / /__/ __/
  3339. // /_____/_/ /_/\____/_/ /_/\___/\___/
  3340. var _Enonce = {
  3341. partid:null,
  3342. id:null,
  3343. title:null,
  3344. text:null,
  3345. nested:false,
  3346. childs:[],
  3347. oninit:function(vn){
  3348. // // console.log('Enonce on init', vn);
  3349. this.partid = vn.attrs.partid;
  3350. this.id = vn.attrs.id;
  3351. this.title = vn.attrs.title;
  3352. this.text = vn.attrs.text;
  3353. this.childs = vn.attrs.childs;
  3354. this.nested = vn.attrs.nested || false;
  3355. },
  3356. onbeforeupdate:function(vn, old) {
  3357. // console.log(vn.attrs.childs);
  3358. this.title = vn.attrs.title;
  3359. this.text = vn.attrs.text;
  3360. this.childs = vn.attrs.childs;
  3361. this.nested = vn.attrs.nested || false;
  3362. // if(vn.attrs.id == '1d1') console.log('_Enonce UPDATE, text :', vn.attrs.text);
  3363. },
  3364. view: function(vn){
  3365. // if(vn.attrs.id == '1d1') console.log('_Enonce VIEW, text :', vn.attrs.text);
  3366. return m("section", {
  3367. 'id' :this.id,
  3368. 'class' :'enonce'+(this.nested ? ' nested':'')
  3369. },
  3370. [
  3371. // create title node
  3372. m("h2", {}, this.title),
  3373. // create text node
  3374. m(_Text, {'text':this.text, 'id':this.id}),
  3375. // addd children
  3376. this.childs.map(function(c){
  3377. return m(_Item, c)
  3378. })
  3379. ])
  3380. }
  3381. }
  3382. // ____ __
  3383. // / __ \____ ______/ /_
  3384. // / /_/ / __ `/ ___/ __/
  3385. // / ____/ /_/ / / / /_
  3386. // /_/ \__,_/_/ \__/
  3387. var _Part = {
  3388. oninit: function(vn){
  3389. this.id = vn.attrs.id;
  3390. this.title = vn.attrs.title;
  3391. this.enonces = vn.attrs.enonces;
  3392. },
  3393. onbeforeupdate: function(vn, old){
  3394. // console.log('_Part, onbeforeupdate old',old);
  3395. this.title = vn.attrs.title;
  3396. this.enonces = vn.attrs.enonces;
  3397. },
  3398. view: function(vn){
  3399. // console.log(vn.attrs.enonces);
  3400. return m("section", {
  3401. 'id' :this.id,
  3402. 'class' :'part'
  3403. },
  3404. [
  3405. // create title node
  3406. m("h1", {'class':'part'}, m.trust(markdown.renderInline(this.title))),
  3407. // create text node
  3408. this.enonces.map(function(e){
  3409. // console.log(e.text);
  3410. return m(_Enonce, Object.assign({"partid":this.id},e))
  3411. })
  3412. ]
  3413. )
  3414. }
  3415. }
  3416. // ______
  3417. // /_ __/_______ ___
  3418. // / / / ___/ _ \/ _ \
  3419. // / / / / / __/ __/
  3420. // /_/ /_/ \___/\___/
  3421. module.exports = {
  3422. view: function(){
  3423. console.log('_Tree view', _dbs.lang);
  3424. return [
  3425. m(_Header),
  3426. m('main', {id:"content", 'class':'tree'}, _dbs.data[_dbs.lang].map(function(p){
  3427. // console.log("MAP _dbs", p);
  3428. return m(_Part,p);
  3429. })
  3430. ),
  3431. m(_Footer)
  3432. ]
  3433. }
  3434. }
  3435. /***/ }),
  3436. /* 23 */
  3437. /***/ (function(module, exports) {
  3438. module.exports = {
  3439. "Aacute": "Á",
  3440. "aacute": "á",
  3441. "Abreve": "Ă",
  3442. "abreve": "ă",
  3443. "ac": "∾",
  3444. "acd": "∿",
  3445. "acE": "∾̳",
  3446. "Acirc": "Â",
  3447. "acirc": "â",
  3448. "acute": "´",
  3449. "Acy": "А",
  3450. "acy": "а",
  3451. "AElig": "Æ",
  3452. "aelig": "æ",
  3453. "af": "⁡",
  3454. "Afr": "𝔄",
  3455. "afr": "𝔞",
  3456. "Agrave": "À",
  3457. "agrave": "à",
  3458. "alefsym": "ℵ",
  3459. "aleph": "ℵ",
  3460. "Alpha": "Α",
  3461. "alpha": "α",
  3462. "Amacr": "Ā",
  3463. "amacr": "ā",
  3464. "amalg": "⨿",
  3465. "amp": "&",
  3466. "AMP": "&",
  3467. "andand": "⩕",
  3468. "And": "⩓",
  3469. "and": "∧",
  3470. "andd": "⩜",
  3471. "andslope": "⩘",
  3472. "andv": "⩚",
  3473. "ang": "∠",
  3474. "ange": "⦤",
  3475. "angle": "∠",
  3476. "angmsdaa": "⦨",
  3477. "angmsdab": "⦩",
  3478. "angmsdac": "⦪",
  3479. "angmsdad": "⦫",
  3480. "angmsdae": "⦬",
  3481. "angmsdaf": "⦭",
  3482. "angmsdag": "⦮",
  3483. "angmsdah": "⦯",
  3484. "angmsd": "∡",
  3485. "angrt": "∟",
  3486. "angrtvb": "⊾",
  3487. "angrtvbd": "⦝",
  3488. "angsph": "∢",
  3489. "angst": "Å",
  3490. "angzarr": "⍼",
  3491. "Aogon": "Ą",
  3492. "aogon": "ą",
  3493. "Aopf": "𝔸",
  3494. "aopf": "𝕒",
  3495. "apacir": "⩯",
  3496. "ap": "≈",
  3497. "apE": "⩰",
  3498. "ape": "≊",
  3499. "apid": "≋",
  3500. "apos": "'",
  3501. "ApplyFunction": "⁡",
  3502. "approx": "≈",
  3503. "approxeq": "≊",
  3504. "Aring": "Å",
  3505. "aring": "å",
  3506. "Ascr": "𝒜",
  3507. "ascr": "𝒶",
  3508. "Assign": "≔",
  3509. "ast": "*",
  3510. "asymp": "≈",
  3511. "asympeq": "≍",
  3512. "Atilde": "Ã",
  3513. "atilde": "ã",
  3514. "Auml": "Ä",
  3515. "auml": "ä",
  3516. "awconint": "∳",
  3517. "awint": "⨑",
  3518. "backcong": "≌",
  3519. "backepsilon": "϶",
  3520. "backprime": "‵",
  3521. "backsim": "∽",
  3522. "backsimeq": "⋍",
  3523. "Backslash": "∖",
  3524. "Barv": "⫧",
  3525. "barvee": "⊽",
  3526. "barwed": "⌅",
  3527. "Barwed": "⌆",
  3528. "barwedge": "⌅",
  3529. "bbrk": "⎵",
  3530. "bbrktbrk": "⎶",
  3531. "bcong": "≌",
  3532. "Bcy": "Б",
  3533. "bcy": "б",
  3534. "bdquo": "„",
  3535. "becaus": "∵",
  3536. "because": "∵",
  3537. "Because": "∵",
  3538. "bemptyv": "⦰",
  3539. "bepsi": "϶",
  3540. "bernou": "ℬ",
  3541. "Bernoullis": "ℬ",
  3542. "Beta": "Β",
  3543. "beta": "β",
  3544. "beth": "ℶ",
  3545. "between": "≬",
  3546. "Bfr": "𝔅",
  3547. "bfr": "𝔟",
  3548. "bigcap": "⋂",
  3549. "bigcirc": "◯",
  3550. "bigcup": "⋃",
  3551. "bigodot": "⨀",
  3552. "bigoplus": "⨁",
  3553. "bigotimes": "⨂",
  3554. "bigsqcup": "⨆",
  3555. "bigstar": "★",
  3556. "bigtriangledown": "▽",
  3557. "bigtriangleup": "△",
  3558. "biguplus": "⨄",
  3559. "bigvee": "⋁",
  3560. "bigwedge": "⋀",
  3561. "bkarow": "⤍",
  3562. "blacklozenge": "⧫",
  3563. "blacksquare": "▪",
  3564. "blacktriangle": "▴",
  3565. "blacktriangledown": "▾",
  3566. "blacktriangleleft": "◂",
  3567. "blacktriangleright": "▸",
  3568. "blank": "␣",
  3569. "blk12": "▒",
  3570. "blk14": "░",
  3571. "blk34": "▓",
  3572. "block": "█",
  3573. "bne": "=⃥",
  3574. "bnequiv": "≡⃥",
  3575. "bNot": "⫭",
  3576. "bnot": "⌐",
  3577. "Bopf": "𝔹",
  3578. "bopf": "𝕓",
  3579. "bot": "⊥",
  3580. "bottom": "⊥",
  3581. "bowtie": "⋈",
  3582. "boxbox": "⧉",
  3583. "boxdl": "┐",
  3584. "boxdL": "╕",
  3585. "boxDl": "╖",
  3586. "boxDL": "╗",
  3587. "boxdr": "┌",
  3588. "boxdR": "╒",
  3589. "boxDr": "╓",
  3590. "boxDR": "╔",
  3591. "boxh": "─",
  3592. "boxH": "═",
  3593. "boxhd": "┬",
  3594. "boxHd": "╤",
  3595. "boxhD": "╥",
  3596. "boxHD": "╦",
  3597. "boxhu": "┴",
  3598. "boxHu": "╧",
  3599. "boxhU": "╨",
  3600. "boxHU": "╩",
  3601. "boxminus": "⊟",
  3602. "boxplus": "⊞",
  3603. "boxtimes": "⊠",
  3604. "boxul": "┘",
  3605. "boxuL": "╛",
  3606. "boxUl": "╜",
  3607. "boxUL": "╝",
  3608. "boxur": "└",
  3609. "boxuR": "╘",
  3610. "boxUr": "╙",
  3611. "boxUR": "╚",
  3612. "boxv": "│",
  3613. "boxV": "║",
  3614. "boxvh": "┼",
  3615. "boxvH": "╪",
  3616. "boxVh": "╫",
  3617. "boxVH": "╬",
  3618. "boxvl": "┤",
  3619. "boxvL": "╡",
  3620. "boxVl": "╢",
  3621. "boxVL": "╣",
  3622. "boxvr": "├",
  3623. "boxvR": "╞",
  3624. "boxVr": "╟",
  3625. "boxVR": "╠",
  3626. "bprime": "‵",
  3627. "breve": "˘",
  3628. "Breve": "˘",
  3629. "brvbar": "¦",
  3630. "bscr": "𝒷",
  3631. "Bscr": "ℬ",
  3632. "bsemi": "⁏",
  3633. "bsim": "∽",
  3634. "bsime": "⋍",
  3635. "bsolb": "⧅",
  3636. "bsol": "\\",
  3637. "bsolhsub": "⟈",
  3638. "bull": "•",
  3639. "bullet": "•",
  3640. "bump": "≎",
  3641. "bumpE": "⪮",
  3642. "bumpe": "≏",
  3643. "Bumpeq": "≎",
  3644. "bumpeq": "≏",
  3645. "Cacute": "Ć",
  3646. "cacute": "ć",
  3647. "capand": "⩄",
  3648. "capbrcup": "⩉",
  3649. "capcap": "⩋",
  3650. "cap": "∩",
  3651. "Cap": "⋒",
  3652. "capcup": "⩇",
  3653. "capdot": "⩀",
  3654. "CapitalDifferentialD": "ⅅ",
  3655. "caps": "∩︀",
  3656. "caret": "⁁",
  3657. "caron": "ˇ",
  3658. "Cayleys": "ℭ",
  3659. "ccaps": "⩍",
  3660. "Ccaron": "Č",
  3661. "ccaron": "č",
  3662. "Ccedil": "Ç",
  3663. "ccedil": "ç",
  3664. "Ccirc": "Ĉ",
  3665. "ccirc": "ĉ",
  3666. "Cconint": "∰",
  3667. "ccups": "⩌",
  3668. "ccupssm": "⩐",
  3669. "Cdot": "Ċ",
  3670. "cdot": "ċ",
  3671. "cedil": "¸",
  3672. "Cedilla": "¸",
  3673. "cemptyv": "⦲",
  3674. "cent": "¢",
  3675. "centerdot": "·",
  3676. "CenterDot": "·",
  3677. "cfr": "𝔠",
  3678. "Cfr": "ℭ",
  3679. "CHcy": "Ч",
  3680. "chcy": "ч",
  3681. "check": "✓",
  3682. "checkmark": "✓",
  3683. "Chi": "Χ",
  3684. "chi": "χ",
  3685. "circ": "ˆ",
  3686. "circeq": "≗",
  3687. "circlearrowleft": "↺",
  3688. "circlearrowright": "↻",
  3689. "circledast": "⊛",
  3690. "circledcirc": "⊚",
  3691. "circleddash": "⊝",
  3692. "CircleDot": "⊙",
  3693. "circledR": "®",
  3694. "circledS": "Ⓢ",
  3695. "CircleMinus": "⊖",
  3696. "CirclePlus": "⊕",
  3697. "CircleTimes": "⊗",
  3698. "cir": "○",
  3699. "cirE": "⧃",
  3700. "cire": "≗",
  3701. "cirfnint": "⨐",
  3702. "cirmid": "⫯",
  3703. "cirscir": "⧂",
  3704. "ClockwiseContourIntegral": "∲",
  3705. "CloseCurlyDoubleQuote": "”",
  3706. "CloseCurlyQuote": "’",
  3707. "clubs": "♣",
  3708. "clubsuit": "♣",
  3709. "colon": ":",
  3710. "Colon": "∷",
  3711. "Colone": "⩴",
  3712. "colone": "≔",
  3713. "coloneq": "≔",
  3714. "comma": ",",
  3715. "commat": "@",
  3716. "comp": "∁",
  3717. "compfn": "∘",
  3718. "complement": "∁",
  3719. "complexes": "ℂ",
  3720. "cong": "≅",
  3721. "congdot": "⩭",
  3722. "Congruent": "≡",
  3723. "conint": "∮",
  3724. "Conint": "∯",
  3725. "ContourIntegral": "∮",
  3726. "copf": "𝕔",
  3727. "Copf": "ℂ",
  3728. "coprod": "∐",
  3729. "Coproduct": "∐",
  3730. "copy": "©",
  3731. "COPY": "©",
  3732. "copysr": "℗",
  3733. "CounterClockwiseContourIntegral": "∳",
  3734. "crarr": "↵",
  3735. "cross": "✗",
  3736. "Cross": "⨯",
  3737. "Cscr": "𝒞",
  3738. "cscr": "𝒸",
  3739. "csub": "⫏",
  3740. "csube": "⫑",
  3741. "csup": "⫐",
  3742. "csupe": "⫒",
  3743. "ctdot": "⋯",
  3744. "cudarrl": "⤸",
  3745. "cudarrr": "⤵",
  3746. "cuepr": "⋞",
  3747. "cuesc": "⋟",
  3748. "cularr": "↶",
  3749. "cularrp": "⤽",
  3750. "cupbrcap": "⩈",
  3751. "cupcap": "⩆",
  3752. "CupCap": "≍",
  3753. "cup": "∪",
  3754. "Cup": "⋓",
  3755. "cupcup": "⩊",
  3756. "cupdot": "⊍",
  3757. "cupor": "⩅",
  3758. "cups": "∪︀",
  3759. "curarr": "↷",
  3760. "curarrm": "⤼",
  3761. "curlyeqprec": "⋞",
  3762. "curlyeqsucc": "⋟",
  3763. "curlyvee": "⋎",
  3764. "curlywedge": "⋏",
  3765. "curren": "¤",
  3766. "curvearrowleft": "↶",
  3767. "curvearrowright": "↷",
  3768. "cuvee": "⋎",
  3769. "cuwed": "⋏",
  3770. "cwconint": "∲",
  3771. "cwint": "∱",
  3772. "cylcty": "⌭",
  3773. "dagger": "†",
  3774. "Dagger": "‡",
  3775. "daleth": "ℸ",
  3776. "darr": "↓",
  3777. "Darr": "↡",
  3778. "dArr": "⇓",
  3779. "dash": "‐",
  3780. "Dashv": "⫤",
  3781. "dashv": "⊣",
  3782. "dbkarow": "⤏",
  3783. "dblac": "˝",
  3784. "Dcaron": "Ď",
  3785. "dcaron": "ď",
  3786. "Dcy": "Д",
  3787. "dcy": "д",
  3788. "ddagger": "‡",
  3789. "ddarr": "⇊",
  3790. "DD": "ⅅ",
  3791. "dd": "ⅆ",
  3792. "DDotrahd": "⤑",
  3793. "ddotseq": "⩷",
  3794. "deg": "°",
  3795. "Del": "∇",
  3796. "Delta": "Δ",
  3797. "delta": "δ",
  3798. "demptyv": "⦱",
  3799. "dfisht": "⥿",
  3800. "Dfr": "𝔇",
  3801. "dfr": "𝔡",
  3802. "dHar": "⥥",
  3803. "dharl": "⇃",
  3804. "dharr": "⇂",
  3805. "DiacriticalAcute": "´",
  3806. "DiacriticalDot": "˙",
  3807. "DiacriticalDoubleAcute": "˝",
  3808. "DiacriticalGrave": "`",
  3809. "DiacriticalTilde": "˜",
  3810. "diam": "⋄",
  3811. "diamond": "⋄",
  3812. "Diamond": "⋄",
  3813. "diamondsuit": "♦",
  3814. "diams": "♦",
  3815. "die": "¨",
  3816. "DifferentialD": "ⅆ",
  3817. "digamma": "ϝ",
  3818. "disin": "⋲",
  3819. "div": "÷",
  3820. "divide": "÷",
  3821. "divideontimes": "⋇",
  3822. "divonx": "⋇",
  3823. "DJcy": "Ђ",
  3824. "djcy": "ђ",
  3825. "dlcorn": "⌞",
  3826. "dlcrop": "⌍",
  3827. "dollar": "$",
  3828. "Dopf": "𝔻",
  3829. "dopf": "𝕕",
  3830. "Dot": "¨",
  3831. "dot": "˙",
  3832. "DotDot": "⃜",
  3833. "doteq": "≐",
  3834. "doteqdot": "≑",
  3835. "DotEqual": "≐",
  3836. "dotminus": "∸",
  3837. "dotplus": "∔",
  3838. "dotsquare": "⊡",
  3839. "doublebarwedge": "⌆",
  3840. "DoubleContourIntegral": "∯",
  3841. "DoubleDot": "¨",
  3842. "DoubleDownArrow": "⇓",
  3843. "DoubleLeftArrow": "⇐",
  3844. "DoubleLeftRightArrow": "⇔",
  3845. "DoubleLeftTee": "⫤",
  3846. "DoubleLongLeftArrow": "⟸",
  3847. "DoubleLongLeftRightArrow": "⟺",
  3848. "DoubleLongRightArrow": "⟹",
  3849. "DoubleRightArrow": "⇒",
  3850. "DoubleRightTee": "⊨",
  3851. "DoubleUpArrow": "⇑",
  3852. "DoubleUpDownArrow": "⇕",
  3853. "DoubleVerticalBar": "∥",
  3854. "DownArrowBar": "⤓",
  3855. "downarrow": "↓",
  3856. "DownArrow": "↓",
  3857. "Downarrow": "⇓",
  3858. "DownArrowUpArrow": "⇵",
  3859. "DownBreve": "̑",
  3860. "downdownarrows": "⇊",
  3861. "downharpoonleft": "⇃",
  3862. "downharpoonright": "⇂",
  3863. "DownLeftRightVector": "⥐",
  3864. "DownLeftTeeVector": "⥞",
  3865. "DownLeftVectorBar": "⥖",
  3866. "DownLeftVector": "↽",
  3867. "DownRightTeeVector": "⥟",
  3868. "DownRightVectorBar": "⥗",
  3869. "DownRightVector": "⇁",
  3870. "DownTeeArrow": "↧",
  3871. "DownTee": "⊤",
  3872. "drbkarow": "⤐",
  3873. "drcorn": "⌟",
  3874. "drcrop": "⌌",
  3875. "Dscr": "𝒟",
  3876. "dscr": "𝒹",
  3877. "DScy": "Ѕ",
  3878. "dscy": "ѕ",
  3879. "dsol": "⧶",
  3880. "Dstrok": "Đ",
  3881. "dstrok": "đ",
  3882. "dtdot": "⋱",
  3883. "dtri": "▿",
  3884. "dtrif": "▾",
  3885. "duarr": "⇵",
  3886. "duhar": "⥯",
  3887. "dwangle": "⦦",
  3888. "DZcy": "Џ",
  3889. "dzcy": "џ",
  3890. "dzigrarr": "⟿",
  3891. "Eacute": "É",
  3892. "eacute": "é",
  3893. "easter": "⩮",
  3894. "Ecaron": "Ě",
  3895. "ecaron": "ě",
  3896. "Ecirc": "Ê",
  3897. "ecirc": "ê",
  3898. "ecir": "≖",
  3899. "ecolon": "≕",
  3900. "Ecy": "Э",
  3901. "ecy": "э",
  3902. "eDDot": "⩷",
  3903. "Edot": "Ė",
  3904. "edot": "ė",
  3905. "eDot": "≑",
  3906. "ee": "ⅇ",
  3907. "efDot": "≒",
  3908. "Efr": "𝔈",
  3909. "efr": "𝔢",
  3910. "eg": "⪚",
  3911. "Egrave": "È",
  3912. "egrave": "è",
  3913. "egs": "⪖",
  3914. "egsdot": "⪘",
  3915. "el": "⪙",
  3916. "Element": "∈",
  3917. "elinters": "⏧",
  3918. "ell": "ℓ",
  3919. "els": "⪕",
  3920. "elsdot": "⪗",
  3921. "Emacr": "Ē",
  3922. "emacr": "ē",
  3923. "empty": "∅",
  3924. "emptyset": "∅",
  3925. "EmptySmallSquare": "◻",
  3926. "emptyv": "∅",
  3927. "EmptyVerySmallSquare": "▫",
  3928. "emsp13": " ",
  3929. "emsp14": " ",
  3930. "emsp": " ",
  3931. "ENG": "Ŋ",
  3932. "eng": "ŋ",
  3933. "ensp": " ",
  3934. "Eogon": "Ę",
  3935. "eogon": "ę",
  3936. "Eopf": "𝔼",
  3937. "eopf": "𝕖",
  3938. "epar": "⋕",
  3939. "eparsl": "⧣",
  3940. "eplus": "⩱",
  3941. "epsi": "ε",
  3942. "Epsilon": "Ε",
  3943. "epsilon": "ε",
  3944. "epsiv": "ϵ",
  3945. "eqcirc": "≖",
  3946. "eqcolon": "≕",
  3947. "eqsim": "≂",
  3948. "eqslantgtr": "⪖",
  3949. "eqslantless": "⪕",
  3950. "Equal": "⩵",
  3951. "equals": "=",
  3952. "EqualTilde": "≂",
  3953. "equest": "≟",
  3954. "Equilibrium": "⇌",
  3955. "equiv": "≡",
  3956. "equivDD": "⩸",
  3957. "eqvparsl": "⧥",
  3958. "erarr": "⥱",
  3959. "erDot": "≓",
  3960. "escr": "ℯ",
  3961. "Escr": "ℰ",
  3962. "esdot": "≐",
  3963. "Esim": "⩳",
  3964. "esim": "≂",
  3965. "Eta": "Η",
  3966. "eta": "η",
  3967. "ETH": "Ð",
  3968. "eth": "ð",
  3969. "Euml": "Ë",
  3970. "euml": "ë",
  3971. "euro": "€",
  3972. "excl": "!",
  3973. "exist": "∃",
  3974. "Exists": "∃",
  3975. "expectation": "ℰ",
  3976. "exponentiale": "ⅇ",
  3977. "ExponentialE": "ⅇ",
  3978. "fallingdotseq": "≒",
  3979. "Fcy": "Ф",
  3980. "fcy": "ф",
  3981. "female": "♀",
  3982. "ffilig": "ffi",
  3983. "fflig": "ff",
  3984. "ffllig": "ffl",
  3985. "Ffr": "𝔉",
  3986. "ffr": "𝔣",
  3987. "filig": "fi",
  3988. "FilledSmallSquare": "◼",
  3989. "FilledVerySmallSquare": "▪",
  3990. "fjlig": "fj",
  3991. "flat": "♭",
  3992. "fllig": "fl",
  3993. "fltns": "▱",
  3994. "fnof": "ƒ",
  3995. "Fopf": "𝔽",
  3996. "fopf": "𝕗",
  3997. "forall": "∀",
  3998. "ForAll": "∀",
  3999. "fork": "⋔",
  4000. "forkv": "⫙",
  4001. "Fouriertrf": "ℱ",
  4002. "fpartint": "⨍",
  4003. "frac12": "½",
  4004. "frac13": "⅓",
  4005. "frac14": "¼",
  4006. "frac15": "⅕",
  4007. "frac16": "⅙",
  4008. "frac18": "⅛",
  4009. "frac23": "⅔",
  4010. "frac25": "⅖",
  4011. "frac34": "¾",
  4012. "frac35": "⅗",
  4013. "frac38": "⅜",
  4014. "frac45": "⅘",
  4015. "frac56": "⅚",
  4016. "frac58": "⅝",
  4017. "frac78": "⅞",
  4018. "frasl": "⁄",
  4019. "frown": "⌢",
  4020. "fscr": "𝒻",
  4021. "Fscr": "ℱ",
  4022. "gacute": "ǵ",
  4023. "Gamma": "Γ",
  4024. "gamma": "γ",
  4025. "Gammad": "Ϝ",
  4026. "gammad": "ϝ",
  4027. "gap": "⪆",
  4028. "Gbreve": "Ğ",
  4029. "gbreve": "ğ",
  4030. "Gcedil": "Ģ",
  4031. "Gcirc": "Ĝ",
  4032. "gcirc": "ĝ",
  4033. "Gcy": "Г",
  4034. "gcy": "г",
  4035. "Gdot": "Ġ",
  4036. "gdot": "ġ",
  4037. "ge": "≥",
  4038. "gE": "≧",
  4039. "gEl": "⪌",
  4040. "gel": "⋛",
  4041. "geq": "≥",
  4042. "geqq": "≧",
  4043. "geqslant": "⩾",
  4044. "gescc": "⪩",
  4045. "ges": "⩾",
  4046. "gesdot": "⪀",
  4047. "gesdoto": "⪂",
  4048. "gesdotol": "⪄",
  4049. "gesl": "⋛︀",
  4050. "gesles": "⪔",
  4051. "Gfr": "𝔊",
  4052. "gfr": "𝔤",
  4053. "gg": "≫",
  4054. "Gg": "⋙",
  4055. "ggg": "⋙",
  4056. "gimel": "ℷ",
  4057. "GJcy": "Ѓ",
  4058. "gjcy": "ѓ",
  4059. "gla": "⪥",
  4060. "gl": "≷",
  4061. "glE": "⪒",
  4062. "glj": "⪤",
  4063. "gnap": "⪊",
  4064. "gnapprox": "⪊",
  4065. "gne": "⪈",
  4066. "gnE": "≩",
  4067. "gneq": "⪈",
  4068. "gneqq": "≩",
  4069. "gnsim": "⋧",
  4070. "Gopf": "𝔾",
  4071. "gopf": "𝕘",
  4072. "grave": "`",
  4073. "GreaterEqual": "≥",
  4074. "GreaterEqualLess": "⋛",
  4075. "GreaterFullEqual": "≧",
  4076. "GreaterGreater": "⪢",
  4077. "GreaterLess": "≷",
  4078. "GreaterSlantEqual": "⩾",
  4079. "GreaterTilde": "≳",
  4080. "Gscr": "𝒢",
  4081. "gscr": "ℊ",
  4082. "gsim": "≳",
  4083. "gsime": "⪎",
  4084. "gsiml": "⪐",
  4085. "gtcc": "⪧",
  4086. "gtcir": "⩺",
  4087. "gt": ">",
  4088. "GT": ">",
  4089. "Gt": "≫",
  4090. "gtdot": "⋗",
  4091. "gtlPar": "⦕",
  4092. "gtquest": "⩼",
  4093. "gtrapprox": "⪆",
  4094. "gtrarr": "⥸",
  4095. "gtrdot": "⋗",
  4096. "gtreqless": "⋛",
  4097. "gtreqqless": "⪌",
  4098. "gtrless": "≷",
  4099. "gtrsim": "≳",
  4100. "gvertneqq": "≩︀",
  4101. "gvnE": "≩︀",
  4102. "Hacek": "ˇ",
  4103. "hairsp": " ",
  4104. "half": "½",
  4105. "hamilt": "ℋ",
  4106. "HARDcy": "Ъ",
  4107. "hardcy": "ъ",
  4108. "harrcir": "⥈",
  4109. "harr": "↔",
  4110. "hArr": "⇔",
  4111. "harrw": "↭",
  4112. "Hat": "^",
  4113. "hbar": "ℏ",
  4114. "Hcirc": "Ĥ",
  4115. "hcirc": "ĥ",
  4116. "hearts": "♥",
  4117. "heartsuit": "♥",
  4118. "hellip": "…",
  4119. "hercon": "⊹",
  4120. "hfr": "𝔥",
  4121. "Hfr": "ℌ",
  4122. "HilbertSpace": "ℋ",
  4123. "hksearow": "⤥",
  4124. "hkswarow": "⤦",
  4125. "hoarr": "⇿",
  4126. "homtht": "∻",
  4127. "hookleftarrow": "↩",
  4128. "hookrightarrow": "↪",
  4129. "hopf": "𝕙",
  4130. "Hopf": "ℍ",
  4131. "horbar": "―",
  4132. "HorizontalLine": "─",
  4133. "hscr": "𝒽",
  4134. "Hscr": "ℋ",
  4135. "hslash": "ℏ",
  4136. "Hstrok": "Ħ",
  4137. "hstrok": "ħ",
  4138. "HumpDownHump": "≎",
  4139. "HumpEqual": "≏",
  4140. "hybull": "⁃",
  4141. "hyphen": "‐",
  4142. "Iacute": "Í",
  4143. "iacute": "í",
  4144. "ic": "⁣",
  4145. "Icirc": "Î",
  4146. "icirc": "î",
  4147. "Icy": "И",
  4148. "icy": "и",
  4149. "Idot": "İ",
  4150. "IEcy": "Е",
  4151. "iecy": "е",
  4152. "iexcl": "¡",
  4153. "iff": "⇔",
  4154. "ifr": "𝔦",
  4155. "Ifr": "ℑ",
  4156. "Igrave": "Ì",
  4157. "igrave": "ì",
  4158. "ii": "ⅈ",
  4159. "iiiint": "⨌",
  4160. "iiint": "∭",
  4161. "iinfin": "⧜",
  4162. "iiota": "℩",
  4163. "IJlig": "IJ",
  4164. "ijlig": "ij",
  4165. "Imacr": "Ī",
  4166. "imacr": "ī",
  4167. "image": "ℑ",
  4168. "ImaginaryI": "ⅈ",
  4169. "imagline": "ℐ",
  4170. "imagpart": "ℑ",
  4171. "imath": "ı",
  4172. "Im": "ℑ",
  4173. "imof": "⊷",
  4174. "imped": "Ƶ",
  4175. "Implies": "⇒",
  4176. "incare": "℅",
  4177. "in": "∈",
  4178. "infin": "∞",
  4179. "infintie": "⧝",
  4180. "inodot": "ı",
  4181. "intcal": "⊺",
  4182. "int": "∫",
  4183. "Int": "∬",
  4184. "integers": "ℤ",
  4185. "Integral": "∫",
  4186. "intercal": "⊺",
  4187. "Intersection": "⋂",
  4188. "intlarhk": "⨗",
  4189. "intprod": "⨼",
  4190. "InvisibleComma": "⁣",
  4191. "InvisibleTimes": "⁢",
  4192. "IOcy": "Ё",
  4193. "iocy": "ё",
  4194. "Iogon": "Į",
  4195. "iogon": "į",
  4196. "Iopf": "𝕀",
  4197. "iopf": "𝕚",
  4198. "Iota": "Ι",
  4199. "iota": "ι",
  4200. "iprod": "⨼",
  4201. "iquest": "¿",
  4202. "iscr": "𝒾",
  4203. "Iscr": "ℐ",
  4204. "isin": "∈",
  4205. "isindot": "⋵",
  4206. "isinE": "⋹",
  4207. "isins": "⋴",
  4208. "isinsv": "⋳",
  4209. "isinv": "∈",
  4210. "it": "⁢",
  4211. "Itilde": "Ĩ",
  4212. "itilde": "ĩ",
  4213. "Iukcy": "І",
  4214. "iukcy": "і",
  4215. "Iuml": "Ï",
  4216. "iuml": "ï",
  4217. "Jcirc": "Ĵ",
  4218. "jcirc": "ĵ",
  4219. "Jcy": "Й",
  4220. "jcy": "й",
  4221. "Jfr": "𝔍",
  4222. "jfr": "𝔧",
  4223. "jmath": "ȷ",
  4224. "Jopf": "𝕁",
  4225. "jopf": "𝕛",
  4226. "Jscr": "𝒥",
  4227. "jscr": "𝒿",
  4228. "Jsercy": "Ј",
  4229. "jsercy": "ј",
  4230. "Jukcy": "Є",
  4231. "jukcy": "є",
  4232. "Kappa": "Κ",
  4233. "kappa": "κ",
  4234. "kappav": "ϰ",
  4235. "Kcedil": "Ķ",
  4236. "kcedil": "ķ",
  4237. "Kcy": "К",
  4238. "kcy": "к",
  4239. "Kfr": "𝔎",
  4240. "kfr": "𝔨",
  4241. "kgreen": "ĸ",
  4242. "KHcy": "Х",
  4243. "khcy": "х",
  4244. "KJcy": "Ќ",
  4245. "kjcy": "ќ",
  4246. "Kopf": "𝕂",
  4247. "kopf": "𝕜",
  4248. "Kscr": "𝒦",
  4249. "kscr": "𝓀",
  4250. "lAarr": "⇚",
  4251. "Lacute": "Ĺ",
  4252. "lacute": "ĺ",
  4253. "laemptyv": "⦴",
  4254. "lagran": "ℒ",
  4255. "Lambda": "Λ",
  4256. "lambda": "λ",
  4257. "lang": "⟨",
  4258. "Lang": "⟪",
  4259. "langd": "⦑",
  4260. "langle": "⟨",
  4261. "lap": "⪅",
  4262. "Laplacetrf": "ℒ",
  4263. "laquo": "«",
  4264. "larrb": "⇤",
  4265. "larrbfs": "⤟",
  4266. "larr": "←",
  4267. "Larr": "↞",
  4268. "lArr": "⇐",
  4269. "larrfs": "⤝",
  4270. "larrhk": "↩",
  4271. "larrlp": "↫",
  4272. "larrpl": "⤹",
  4273. "larrsim": "⥳",
  4274. "larrtl": "↢",
  4275. "latail": "⤙",
  4276. "lAtail": "⤛",
  4277. "lat": "⪫",
  4278. "late": "⪭",
  4279. "lates": "⪭︀",
  4280. "lbarr": "⤌",
  4281. "lBarr": "⤎",
  4282. "lbbrk": "❲",
  4283. "lbrace": "{",
  4284. "lbrack": "[",
  4285. "lbrke": "⦋",
  4286. "lbrksld": "⦏",
  4287. "lbrkslu": "⦍",
  4288. "Lcaron": "Ľ",
  4289. "lcaron": "ľ",
  4290. "Lcedil": "Ļ",
  4291. "lcedil": "ļ",
  4292. "lceil": "⌈",
  4293. "lcub": "{",
  4294. "Lcy": "Л",
  4295. "lcy": "л",
  4296. "ldca": "⤶",
  4297. "ldquo": "“",
  4298. "ldquor": "„",
  4299. "ldrdhar": "⥧",
  4300. "ldrushar": "⥋",
  4301. "ldsh": "↲",
  4302. "le": "≤",
  4303. "lE": "≦",
  4304. "LeftAngleBracket": "⟨",
  4305. "LeftArrowBar": "⇤",
  4306. "leftarrow": "←",
  4307. "LeftArrow": "←",
  4308. "Leftarrow": "⇐",
  4309. "LeftArrowRightArrow": "⇆",
  4310. "leftarrowtail": "↢",
  4311. "LeftCeiling": "⌈",
  4312. "LeftDoubleBracket": "⟦",
  4313. "LeftDownTeeVector": "⥡",
  4314. "LeftDownVectorBar": "⥙",
  4315. "LeftDownVector": "⇃",
  4316. "LeftFloor": "⌊",
  4317. "leftharpoondown": "↽",
  4318. "leftharpoonup": "↼",
  4319. "leftleftarrows": "⇇",
  4320. "leftrightarrow": "↔",
  4321. "LeftRightArrow": "↔",
  4322. "Leftrightarrow": "⇔",
  4323. "leftrightarrows": "⇆",
  4324. "leftrightharpoons": "⇋",
  4325. "leftrightsquigarrow": "↭",
  4326. "LeftRightVector": "⥎",
  4327. "LeftTeeArrow": "↤",
  4328. "LeftTee": "⊣",
  4329. "LeftTeeVector": "⥚",
  4330. "leftthreetimes": "⋋",
  4331. "LeftTriangleBar": "⧏",
  4332. "LeftTriangle": "⊲",
  4333. "LeftTriangleEqual": "⊴",
  4334. "LeftUpDownVector": "⥑",
  4335. "LeftUpTeeVector": "⥠",
  4336. "LeftUpVectorBar": "⥘",
  4337. "LeftUpVector": "↿",
  4338. "LeftVectorBar": "⥒",
  4339. "LeftVector": "↼",
  4340. "lEg": "⪋",
  4341. "leg": "⋚",
  4342. "leq": "≤",
  4343. "leqq": "≦",
  4344. "leqslant": "⩽",
  4345. "lescc": "⪨",
  4346. "les": "⩽",
  4347. "lesdot": "⩿",
  4348. "lesdoto": "⪁",
  4349. "lesdotor": "⪃",
  4350. "lesg": "⋚︀",
  4351. "lesges": "⪓",
  4352. "lessapprox": "⪅",
  4353. "lessdot": "⋖",
  4354. "lesseqgtr": "⋚",
  4355. "lesseqqgtr": "⪋",
  4356. "LessEqualGreater": "⋚",
  4357. "LessFullEqual": "≦",
  4358. "LessGreater": "≶",
  4359. "lessgtr": "≶",
  4360. "LessLess": "⪡",
  4361. "lesssim": "≲",
  4362. "LessSlantEqual": "⩽",
  4363. "LessTilde": "≲",
  4364. "lfisht": "⥼",
  4365. "lfloor": "⌊",
  4366. "Lfr": "𝔏",
  4367. "lfr": "𝔩",
  4368. "lg": "≶",
  4369. "lgE": "⪑",
  4370. "lHar": "⥢",
  4371. "lhard": "↽",
  4372. "lharu": "↼",
  4373. "lharul": "⥪",
  4374. "lhblk": "▄",
  4375. "LJcy": "Љ",
  4376. "ljcy": "љ",
  4377. "llarr": "⇇",
  4378. "ll": "≪",
  4379. "Ll": "⋘",
  4380. "llcorner": "⌞",
  4381. "Lleftarrow": "⇚",
  4382. "llhard": "⥫",
  4383. "lltri": "◺",
  4384. "Lmidot": "Ŀ",
  4385. "lmidot": "ŀ",
  4386. "lmoustache": "⎰",
  4387. "lmoust": "⎰",
  4388. "lnap": "⪉",
  4389. "lnapprox": "⪉",
  4390. "lne": "⪇",
  4391. "lnE": "≨",
  4392. "lneq": "⪇",
  4393. "lneqq": "≨",
  4394. "lnsim": "⋦",
  4395. "loang": "⟬",
  4396. "loarr": "⇽",
  4397. "lobrk": "⟦",
  4398. "longleftarrow": "⟵",
  4399. "LongLeftArrow": "⟵",
  4400. "Longleftarrow": "⟸",
  4401. "longleftrightarrow": "⟷",
  4402. "LongLeftRightArrow": "⟷",
  4403. "Longleftrightarrow": "⟺",
  4404. "longmapsto": "⟼",
  4405. "longrightarrow": "⟶",
  4406. "LongRightArrow": "⟶",
  4407. "Longrightarrow": "⟹",
  4408. "looparrowleft": "↫",
  4409. "looparrowright": "↬",
  4410. "lopar": "⦅",
  4411. "Lopf": "𝕃",
  4412. "lopf": "𝕝",
  4413. "loplus": "⨭",
  4414. "lotimes": "⨴",
  4415. "lowast": "∗",
  4416. "lowbar": "_",
  4417. "LowerLeftArrow": "↙",
  4418. "LowerRightArrow": "↘",
  4419. "loz": "◊",
  4420. "lozenge": "◊",
  4421. "lozf": "⧫",
  4422. "lpar": "(",
  4423. "lparlt": "⦓",
  4424. "lrarr": "⇆",
  4425. "lrcorner": "⌟",
  4426. "lrhar": "⇋",
  4427. "lrhard": "⥭",
  4428. "lrm": "‎",
  4429. "lrtri": "⊿",
  4430. "lsaquo": "‹",
  4431. "lscr": "𝓁",
  4432. "Lscr": "ℒ",
  4433. "lsh": "↰",
  4434. "Lsh": "↰",
  4435. "lsim": "≲",
  4436. "lsime": "⪍",
  4437. "lsimg": "⪏",
  4438. "lsqb": "[",
  4439. "lsquo": "‘",
  4440. "lsquor": "‚",
  4441. "Lstrok": "Ł",
  4442. "lstrok": "ł",
  4443. "ltcc": "⪦",
  4444. "ltcir": "⩹",
  4445. "lt": "<",
  4446. "LT": "<",
  4447. "Lt": "≪",
  4448. "ltdot": "⋖",
  4449. "lthree": "⋋",
  4450. "ltimes": "⋉",
  4451. "ltlarr": "⥶",
  4452. "ltquest": "⩻",
  4453. "ltri": "◃",
  4454. "ltrie": "⊴",
  4455. "ltrif": "◂",
  4456. "ltrPar": "⦖",
  4457. "lurdshar": "⥊",
  4458. "luruhar": "⥦",
  4459. "lvertneqq": "≨︀",
  4460. "lvnE": "≨︀",
  4461. "macr": "¯",
  4462. "male": "♂",
  4463. "malt": "✠",
  4464. "maltese": "✠",
  4465. "Map": "⤅",
  4466. "map": "↦",
  4467. "mapsto": "↦",
  4468. "mapstodown": "↧",
  4469. "mapstoleft": "↤",
  4470. "mapstoup": "↥",
  4471. "marker": "▮",
  4472. "mcomma": "⨩",
  4473. "Mcy": "М",
  4474. "mcy": "м",
  4475. "mdash": "—",
  4476. "mDDot": "∺",
  4477. "measuredangle": "∡",
  4478. "MediumSpace": " ",
  4479. "Mellintrf": "ℳ",
  4480. "Mfr": "𝔐",
  4481. "mfr": "𝔪",
  4482. "mho": "℧",
  4483. "micro": "µ",
  4484. "midast": "*",
  4485. "midcir": "⫰",
  4486. "mid": "∣",
  4487. "middot": "·",
  4488. "minusb": "⊟",
  4489. "minus": "−",
  4490. "minusd": "∸",
  4491. "minusdu": "⨪",
  4492. "MinusPlus": "∓",
  4493. "mlcp": "⫛",
  4494. "mldr": "…",
  4495. "mnplus": "∓",
  4496. "models": "⊧",
  4497. "Mopf": "𝕄",
  4498. "mopf": "𝕞",
  4499. "mp": "∓",
  4500. "mscr": "𝓂",
  4501. "Mscr": "ℳ",
  4502. "mstpos": "∾",
  4503. "Mu": "Μ",
  4504. "mu": "μ",
  4505. "multimap": "⊸",
  4506. "mumap": "⊸",
  4507. "nabla": "∇",
  4508. "Nacute": "Ń",
  4509. "nacute": "ń",
  4510. "nang": "∠⃒",
  4511. "nap": "≉",
  4512. "napE": "⩰̸",
  4513. "napid": "≋̸",
  4514. "napos": "ʼn",
  4515. "napprox": "≉",
  4516. "natural": "♮",
  4517. "naturals": "ℕ",
  4518. "natur": "♮",
  4519. "nbsp": " ",
  4520. "nbump": "≎̸",
  4521. "nbumpe": "≏̸",
  4522. "ncap": "⩃",
  4523. "Ncaron": "Ň",
  4524. "ncaron": "ň",
  4525. "Ncedil": "Ņ",
  4526. "ncedil": "ņ",
  4527. "ncong": "≇",
  4528. "ncongdot": "⩭̸",
  4529. "ncup": "⩂",
  4530. "Ncy": "Н",
  4531. "ncy": "н",
  4532. "ndash": "–",
  4533. "nearhk": "⤤",
  4534. "nearr": "↗",
  4535. "neArr": "⇗",
  4536. "nearrow": "↗",
  4537. "ne": "≠",
  4538. "nedot": "≐̸",
  4539. "NegativeMediumSpace": "​",
  4540. "NegativeThickSpace": "​",
  4541. "NegativeThinSpace": "​",
  4542. "NegativeVeryThinSpace": "​",
  4543. "nequiv": "≢",
  4544. "nesear": "⤨",
  4545. "nesim": "≂̸",
  4546. "NestedGreaterGreater": "≫",
  4547. "NestedLessLess": "≪",
  4548. "NewLine": "\n",
  4549. "nexist": "∄",
  4550. "nexists": "∄",
  4551. "Nfr": "𝔑",
  4552. "nfr": "𝔫",
  4553. "ngE": "≧̸",
  4554. "nge": "≱",
  4555. "ngeq": "≱",
  4556. "ngeqq": "≧̸",
  4557. "ngeqslant": "⩾̸",
  4558. "nges": "⩾̸",
  4559. "nGg": "⋙̸",
  4560. "ngsim": "≵",
  4561. "nGt": "≫⃒",
  4562. "ngt": "≯",
  4563. "ngtr": "≯",
  4564. "nGtv": "≫̸",
  4565. "nharr": "↮",
  4566. "nhArr": "⇎",
  4567. "nhpar": "⫲",
  4568. "ni": "∋",
  4569. "nis": "⋼",
  4570. "nisd": "⋺",
  4571. "niv": "∋",
  4572. "NJcy": "Њ",
  4573. "njcy": "њ",
  4574. "nlarr": "↚",
  4575. "nlArr": "⇍",
  4576. "nldr": "‥",
  4577. "nlE": "≦̸",
  4578. "nle": "≰",
  4579. "nleftarrow": "↚",
  4580. "nLeftarrow": "⇍",
  4581. "nleftrightarrow": "↮",
  4582. "nLeftrightarrow": "⇎",
  4583. "nleq": "≰",
  4584. "nleqq": "≦̸",
  4585. "nleqslant": "⩽̸",
  4586. "nles": "⩽̸",
  4587. "nless": "≮",
  4588. "nLl": "⋘̸",
  4589. "nlsim": "≴",
  4590. "nLt": "≪⃒",
  4591. "nlt": "≮",
  4592. "nltri": "⋪",
  4593. "nltrie": "⋬",
  4594. "nLtv": "≪̸",
  4595. "nmid": "∤",
  4596. "NoBreak": "⁠",
  4597. "NonBreakingSpace": " ",
  4598. "nopf": "𝕟",
  4599. "Nopf": "ℕ",
  4600. "Not": "⫬",
  4601. "not": "¬",
  4602. "NotCongruent": "≢",
  4603. "NotCupCap": "≭",
  4604. "NotDoubleVerticalBar": "∦",
  4605. "NotElement": "∉",
  4606. "NotEqual": "≠",
  4607. "NotEqualTilde": "≂̸",
  4608. "NotExists": "∄",
  4609. "NotGreater": "≯",
  4610. "NotGreaterEqual": "≱",
  4611. "NotGreaterFullEqual": "≧̸",
  4612. "NotGreaterGreater": "≫̸",
  4613. "NotGreaterLess": "≹",
  4614. "NotGreaterSlantEqual": "⩾̸",
  4615. "NotGreaterTilde": "≵",
  4616. "NotHumpDownHump": "≎̸",
  4617. "NotHumpEqual": "≏̸",
  4618. "notin": "∉",
  4619. "notindot": "⋵̸",
  4620. "notinE": "⋹̸",
  4621. "notinva": "∉",
  4622. "notinvb": "⋷",
  4623. "notinvc": "⋶",
  4624. "NotLeftTriangleBar": "⧏̸",
  4625. "NotLeftTriangle": "⋪",
  4626. "NotLeftTriangleEqual": "⋬",
  4627. "NotLess": "≮",
  4628. "NotLessEqual": "≰",
  4629. "NotLessGreater": "≸",
  4630. "NotLessLess": "≪̸",
  4631. "NotLessSlantEqual": "⩽̸",
  4632. "NotLessTilde": "≴",
  4633. "NotNestedGreaterGreater": "⪢̸",
  4634. "NotNestedLessLess": "⪡̸",
  4635. "notni": "∌",
  4636. "notniva": "∌",
  4637. "notnivb": "⋾",
  4638. "notnivc": "⋽",
  4639. "NotPrecedes": "⊀",
  4640. "NotPrecedesEqual": "⪯̸",
  4641. "NotPrecedesSlantEqual": "⋠",
  4642. "NotReverseElement": "∌",
  4643. "NotRightTriangleBar": "⧐̸",
  4644. "NotRightTriangle": "⋫",
  4645. "NotRightTriangleEqual": "⋭",
  4646. "NotSquareSubset": "⊏̸",
  4647. "NotSquareSubsetEqual": "⋢",
  4648. "NotSquareSuperset": "⊐̸",
  4649. "NotSquareSupersetEqual": "⋣",
  4650. "NotSubset": "⊂⃒",
  4651. "NotSubsetEqual": "⊈",
  4652. "NotSucceeds": "⊁",
  4653. "NotSucceedsEqual": "⪰̸",
  4654. "NotSucceedsSlantEqual": "⋡",
  4655. "NotSucceedsTilde": "≿̸",
  4656. "NotSuperset": "⊃⃒",
  4657. "NotSupersetEqual": "⊉",
  4658. "NotTilde": "≁",
  4659. "NotTildeEqual": "≄",
  4660. "NotTildeFullEqual": "≇",
  4661. "NotTildeTilde": "≉",
  4662. "NotVerticalBar": "∤",
  4663. "nparallel": "∦",
  4664. "npar": "∦",
  4665. "nparsl": "⫽⃥",
  4666. "npart": "∂̸",
  4667. "npolint": "⨔",
  4668. "npr": "⊀",
  4669. "nprcue": "⋠",
  4670. "nprec": "⊀",
  4671. "npreceq": "⪯̸",
  4672. "npre": "⪯̸",
  4673. "nrarrc": "⤳̸",
  4674. "nrarr": "↛",
  4675. "nrArr": "⇏",
  4676. "nrarrw": "↝̸",
  4677. "nrightarrow": "↛",
  4678. "nRightarrow": "⇏",
  4679. "nrtri": "⋫",
  4680. "nrtrie": "⋭",
  4681. "nsc": "⊁",
  4682. "nsccue": "⋡",
  4683. "nsce": "⪰̸",
  4684. "Nscr": "𝒩",
  4685. "nscr": "𝓃",
  4686. "nshortmid": "∤",
  4687. "nshortparallel": "∦",
  4688. "nsim": "≁",
  4689. "nsime": "≄",
  4690. "nsimeq": "≄",
  4691. "nsmid": "∤",
  4692. "nspar": "∦",
  4693. "nsqsube": "⋢",
  4694. "nsqsupe": "⋣",
  4695. "nsub": "⊄",
  4696. "nsubE": "⫅̸",
  4697. "nsube": "⊈",
  4698. "nsubset": "⊂⃒",
  4699. "nsubseteq": "⊈",
  4700. "nsubseteqq": "⫅̸",
  4701. "nsucc": "⊁",
  4702. "nsucceq": "⪰̸",
  4703. "nsup": "⊅",
  4704. "nsupE": "⫆̸",
  4705. "nsupe": "⊉",
  4706. "nsupset": "⊃⃒",
  4707. "nsupseteq": "⊉",
  4708. "nsupseteqq": "⫆̸",
  4709. "ntgl": "≹",
  4710. "Ntilde": "Ñ",
  4711. "ntilde": "ñ",
  4712. "ntlg": "≸",
  4713. "ntriangleleft": "⋪",
  4714. "ntrianglelefteq": "⋬",
  4715. "ntriangleright": "⋫",
  4716. "ntrianglerighteq": "⋭",
  4717. "Nu": "Ν",
  4718. "nu": "ν",
  4719. "num": "#",
  4720. "numero": "№",
  4721. "numsp": " ",
  4722. "nvap": "≍⃒",
  4723. "nvdash": "⊬",
  4724. "nvDash": "⊭",
  4725. "nVdash": "⊮",
  4726. "nVDash": "⊯",
  4727. "nvge": "≥⃒",
  4728. "nvgt": ">⃒",
  4729. "nvHarr": "⤄",
  4730. "nvinfin": "⧞",
  4731. "nvlArr": "⤂",
  4732. "nvle": "≤⃒",
  4733. "nvlt": "<⃒",
  4734. "nvltrie": "⊴⃒",
  4735. "nvrArr": "⤃",
  4736. "nvrtrie": "⊵⃒",
  4737. "nvsim": "∼⃒",
  4738. "nwarhk": "⤣",
  4739. "nwarr": "↖",
  4740. "nwArr": "⇖",
  4741. "nwarrow": "↖",
  4742. "nwnear": "⤧",
  4743. "Oacute": "Ó",
  4744. "oacute": "ó",
  4745. "oast": "⊛",
  4746. "Ocirc": "Ô",
  4747. "ocirc": "ô",
  4748. "ocir": "⊚",
  4749. "Ocy": "О",
  4750. "ocy": "о",
  4751. "odash": "⊝",
  4752. "Odblac": "Ő",
  4753. "odblac": "ő",
  4754. "odiv": "⨸",
  4755. "odot": "⊙",
  4756. "odsold": "⦼",
  4757. "OElig": "Œ",
  4758. "oelig": "œ",
  4759. "ofcir": "⦿",
  4760. "Ofr": "𝔒",
  4761. "ofr": "𝔬",
  4762. "ogon": "˛",
  4763. "Ograve": "Ò",
  4764. "ograve": "ò",
  4765. "ogt": "⧁",
  4766. "ohbar": "⦵",
  4767. "ohm": "Ω",
  4768. "oint": "∮",
  4769. "olarr": "↺",
  4770. "olcir": "⦾",
  4771. "olcross": "⦻",
  4772. "oline": "‾",
  4773. "olt": "⧀",
  4774. "Omacr": "Ō",
  4775. "omacr": "ō",
  4776. "Omega": "Ω",
  4777. "omega": "ω",
  4778. "Omicron": "Ο",
  4779. "omicron": "ο",
  4780. "omid": "⦶",
  4781. "ominus": "⊖",
  4782. "Oopf": "𝕆",
  4783. "oopf": "𝕠",
  4784. "opar": "⦷",
  4785. "OpenCurlyDoubleQuote": "“",
  4786. "OpenCurlyQuote": "‘",
  4787. "operp": "⦹",
  4788. "oplus": "⊕",
  4789. "orarr": "↻",
  4790. "Or": "⩔",
  4791. "or": "∨",
  4792. "ord": "⩝",
  4793. "order": "ℴ",
  4794. "orderof": "ℴ",
  4795. "ordf": "ª",
  4796. "ordm": "º",
  4797. "origof": "⊶",
  4798. "oror": "⩖",
  4799. "orslope": "⩗",
  4800. "orv": "⩛",
  4801. "oS": "Ⓢ",
  4802. "Oscr": "𝒪",
  4803. "oscr": "ℴ",
  4804. "Oslash": "Ø",
  4805. "oslash": "ø",
  4806. "osol": "⊘",
  4807. "Otilde": "Õ",
  4808. "otilde": "õ",
  4809. "otimesas": "⨶",
  4810. "Otimes": "⨷",
  4811. "otimes": "⊗",
  4812. "Ouml": "Ö",
  4813. "ouml": "ö",
  4814. "ovbar": "⌽",
  4815. "OverBar": "‾",
  4816. "OverBrace": "⏞",
  4817. "OverBracket": "⎴",
  4818. "OverParenthesis": "⏜",
  4819. "para": "¶",
  4820. "parallel": "∥",
  4821. "par": "∥",
  4822. "parsim": "⫳",
  4823. "parsl": "⫽",
  4824. "part": "∂",
  4825. "PartialD": "∂",
  4826. "Pcy": "П",
  4827. "pcy": "п",
  4828. "percnt": "%",
  4829. "period": ".",
  4830. "permil": "‰",
  4831. "perp": "⊥",
  4832. "pertenk": "‱",
  4833. "Pfr": "𝔓",
  4834. "pfr": "𝔭",
  4835. "Phi": "Φ",
  4836. "phi": "φ",
  4837. "phiv": "ϕ",
  4838. "phmmat": "ℳ",
  4839. "phone": "☎",
  4840. "Pi": "Π",
  4841. "pi": "π",
  4842. "pitchfork": "⋔",
  4843. "piv": "ϖ",
  4844. "planck": "ℏ",
  4845. "planckh": "ℎ",
  4846. "plankv": "ℏ",
  4847. "plusacir": "⨣",
  4848. "plusb": "⊞",
  4849. "pluscir": "⨢",
  4850. "plus": "+",
  4851. "plusdo": "∔",
  4852. "plusdu": "⨥",
  4853. "pluse": "⩲",
  4854. "PlusMinus": "±",
  4855. "plusmn": "±",
  4856. "plussim": "⨦",
  4857. "plustwo": "⨧",
  4858. "pm": "±",
  4859. "Poincareplane": "ℌ",
  4860. "pointint": "⨕",
  4861. "popf": "𝕡",
  4862. "Popf": "ℙ",
  4863. "pound": "£",
  4864. "prap": "⪷",
  4865. "Pr": "⪻",
  4866. "pr": "≺",
  4867. "prcue": "≼",
  4868. "precapprox": "⪷",
  4869. "prec": "≺",
  4870. "preccurlyeq": "≼",
  4871. "Precedes": "≺",
  4872. "PrecedesEqual": "⪯",
  4873. "PrecedesSlantEqual": "≼",
  4874. "PrecedesTilde": "≾",
  4875. "preceq": "⪯",
  4876. "precnapprox": "⪹",
  4877. "precneqq": "⪵",
  4878. "precnsim": "⋨",
  4879. "pre": "⪯",
  4880. "prE": "⪳",
  4881. "precsim": "≾",
  4882. "prime": "′",
  4883. "Prime": "″",
  4884. "primes": "ℙ",
  4885. "prnap": "⪹",
  4886. "prnE": "⪵",
  4887. "prnsim": "⋨",
  4888. "prod": "∏",
  4889. "Product": "∏",
  4890. "profalar": "⌮",
  4891. "profline": "⌒",
  4892. "profsurf": "⌓",
  4893. "prop": "∝",
  4894. "Proportional": "∝",
  4895. "Proportion": "∷",
  4896. "propto": "∝",
  4897. "prsim": "≾",
  4898. "prurel": "⊰",
  4899. "Pscr": "𝒫",
  4900. "pscr": "𝓅",
  4901. "Psi": "Ψ",
  4902. "psi": "ψ",
  4903. "puncsp": " ",
  4904. "Qfr": "𝔔",
  4905. "qfr": "𝔮",
  4906. "qint": "⨌",
  4907. "qopf": "𝕢",
  4908. "Qopf": "ℚ",
  4909. "qprime": "⁗",
  4910. "Qscr": "𝒬",
  4911. "qscr": "𝓆",
  4912. "quaternions": "ℍ",
  4913. "quatint": "⨖",
  4914. "quest": "?",
  4915. "questeq": "≟",
  4916. "quot": "\"",
  4917. "QUOT": "\"",
  4918. "rAarr": "⇛",
  4919. "race": "∽̱",
  4920. "Racute": "Ŕ",
  4921. "racute": "ŕ",
  4922. "radic": "√",
  4923. "raemptyv": "⦳",
  4924. "rang": "⟩",
  4925. "Rang": "⟫",
  4926. "rangd": "⦒",
  4927. "range": "⦥",
  4928. "rangle": "⟩",
  4929. "raquo": "»",
  4930. "rarrap": "⥵",
  4931. "rarrb": "⇥",
  4932. "rarrbfs": "⤠",
  4933. "rarrc": "⤳",
  4934. "rarr": "→",
  4935. "Rarr": "↠",
  4936. "rArr": "⇒",
  4937. "rarrfs": "⤞",
  4938. "rarrhk": "↪",
  4939. "rarrlp": "↬",
  4940. "rarrpl": "⥅",
  4941. "rarrsim": "⥴",
  4942. "Rarrtl": "⤖",
  4943. "rarrtl": "↣",
  4944. "rarrw": "↝",
  4945. "ratail": "⤚",
  4946. "rAtail": "⤜",
  4947. "ratio": "∶",
  4948. "rationals": "ℚ",
  4949. "rbarr": "⤍",
  4950. "rBarr": "⤏",
  4951. "RBarr": "⤐",
  4952. "rbbrk": "❳",
  4953. "rbrace": "}",
  4954. "rbrack": "]",
  4955. "rbrke": "⦌",
  4956. "rbrksld": "⦎",
  4957. "rbrkslu": "⦐",
  4958. "Rcaron": "Ř",
  4959. "rcaron": "ř",
  4960. "Rcedil": "Ŗ",
  4961. "rcedil": "ŗ",
  4962. "rceil": "⌉",
  4963. "rcub": "}",
  4964. "Rcy": "Р",
  4965. "rcy": "р",
  4966. "rdca": "⤷",
  4967. "rdldhar": "⥩",
  4968. "rdquo": "”",
  4969. "rdquor": "”",
  4970. "rdsh": "↳",
  4971. "real": "ℜ",
  4972. "realine": "ℛ",
  4973. "realpart": "ℜ",
  4974. "reals": "ℝ",
  4975. "Re": "ℜ",
  4976. "rect": "▭",
  4977. "reg": "®",
  4978. "REG": "®",
  4979. "ReverseElement": "∋",
  4980. "ReverseEquilibrium": "⇋",
  4981. "ReverseUpEquilibrium": "⥯",
  4982. "rfisht": "⥽",
  4983. "rfloor": "⌋",
  4984. "rfr": "𝔯",
  4985. "Rfr": "ℜ",
  4986. "rHar": "⥤",
  4987. "rhard": "⇁",
  4988. "rharu": "⇀",
  4989. "rharul": "⥬",
  4990. "Rho": "Ρ",
  4991. "rho": "ρ",
  4992. "rhov": "ϱ",
  4993. "RightAngleBracket": "⟩",
  4994. "RightArrowBar": "⇥",
  4995. "rightarrow": "→",
  4996. "RightArrow": "→",
  4997. "Rightarrow": "⇒",
  4998. "RightArrowLeftArrow": "⇄",
  4999. "rightarrowtail": "↣",
  5000. "RightCeiling": "⌉",
  5001. "RightDoubleBracket": "⟧",
  5002. "RightDownTeeVector": "⥝",
  5003. "RightDownVectorBar": "⥕",
  5004. "RightDownVector": "⇂",
  5005. "RightFloor": "⌋",
  5006. "rightharpoondown": "⇁",
  5007. "rightharpoonup": "⇀",
  5008. "rightleftarrows": "⇄",
  5009. "rightleftharpoons": "⇌",
  5010. "rightrightarrows": "⇉",
  5011. "rightsquigarrow": "↝",
  5012. "RightTeeArrow": "↦",
  5013. "RightTee": "⊢",
  5014. "RightTeeVector": "⥛",
  5015. "rightthreetimes": "⋌",
  5016. "RightTriangleBar": "⧐",
  5017. "RightTriangle": "⊳",
  5018. "RightTriangleEqual": "⊵",
  5019. "RightUpDownVector": "⥏",
  5020. "RightUpTeeVector": "⥜",
  5021. "RightUpVectorBar": "⥔",
  5022. "RightUpVector": "↾",
  5023. "RightVectorBar": "⥓",
  5024. "RightVector": "⇀",
  5025. "ring": "˚",
  5026. "risingdotseq": "≓",
  5027. "rlarr": "⇄",
  5028. "rlhar": "⇌",
  5029. "rlm": "‏",
  5030. "rmoustache": "⎱",
  5031. "rmoust": "⎱",
  5032. "rnmid": "⫮",
  5033. "roang": "⟭",
  5034. "roarr": "⇾",
  5035. "robrk": "⟧",
  5036. "ropar": "⦆",
  5037. "ropf": "𝕣",
  5038. "Ropf": "ℝ",
  5039. "roplus": "⨮",
  5040. "rotimes": "⨵",
  5041. "RoundImplies": "⥰",
  5042. "rpar": ")",
  5043. "rpargt": "⦔",
  5044. "rppolint": "⨒",
  5045. "rrarr": "⇉",
  5046. "Rrightarrow": "⇛",
  5047. "rsaquo": "›",
  5048. "rscr": "𝓇",
  5049. "Rscr": "ℛ",
  5050. "rsh": "↱",
  5051. "Rsh": "↱",
  5052. "rsqb": "]",
  5053. "rsquo": "’",
  5054. "rsquor": "’",
  5055. "rthree": "⋌",
  5056. "rtimes": "⋊",
  5057. "rtri": "▹",
  5058. "rtrie": "⊵",
  5059. "rtrif": "▸",
  5060. "rtriltri": "⧎",
  5061. "RuleDelayed": "⧴",
  5062. "ruluhar": "⥨",
  5063. "rx": "℞",
  5064. "Sacute": "Ś",
  5065. "sacute": "ś",
  5066. "sbquo": "‚",
  5067. "scap": "⪸",
  5068. "Scaron": "Š",
  5069. "scaron": "š",
  5070. "Sc": "⪼",
  5071. "sc": "≻",
  5072. "sccue": "≽",
  5073. "sce": "⪰",
  5074. "scE": "⪴",
  5075. "Scedil": "Ş",
  5076. "scedil": "ş",
  5077. "Scirc": "Ŝ",
  5078. "scirc": "ŝ",
  5079. "scnap": "⪺",
  5080. "scnE": "⪶",
  5081. "scnsim": "⋩",
  5082. "scpolint": "⨓",
  5083. "scsim": "≿",
  5084. "Scy": "С",
  5085. "scy": "с",
  5086. "sdotb": "⊡",
  5087. "sdot": "⋅",
  5088. "sdote": "⩦",
  5089. "searhk": "⤥",
  5090. "searr": "↘",
  5091. "seArr": "⇘",
  5092. "searrow": "↘",
  5093. "sect": "§",
  5094. "semi": ";",
  5095. "seswar": "⤩",
  5096. "setminus": "∖",
  5097. "setmn": "∖",
  5098. "sext": "✶",
  5099. "Sfr": "𝔖",
  5100. "sfr": "𝔰",
  5101. "sfrown": "⌢",
  5102. "sharp": "♯",
  5103. "SHCHcy": "Щ",
  5104. "shchcy": "щ",
  5105. "SHcy": "Ш",
  5106. "shcy": "ш",
  5107. "ShortDownArrow": "↓",
  5108. "ShortLeftArrow": "←",
  5109. "shortmid": "∣",
  5110. "shortparallel": "∥",
  5111. "ShortRightArrow": "→",
  5112. "ShortUpArrow": "↑",
  5113. "shy": "­",
  5114. "Sigma": "Σ",
  5115. "sigma": "σ",
  5116. "sigmaf": "ς",
  5117. "sigmav": "ς",
  5118. "sim": "∼",
  5119. "simdot": "⩪",
  5120. "sime": "≃",
  5121. "simeq": "≃",
  5122. "simg": "⪞",
  5123. "simgE": "⪠",
  5124. "siml": "⪝",
  5125. "simlE": "⪟",
  5126. "simne": "≆",
  5127. "simplus": "⨤",
  5128. "simrarr": "⥲",
  5129. "slarr": "←",
  5130. "SmallCircle": "∘",
  5131. "smallsetminus": "∖",
  5132. "smashp": "⨳",
  5133. "smeparsl": "⧤",
  5134. "smid": "∣",
  5135. "smile": "⌣",
  5136. "smt": "⪪",
  5137. "smte": "⪬",
  5138. "smtes": "⪬︀",
  5139. "SOFTcy": "Ь",
  5140. "softcy": "ь",
  5141. "solbar": "⌿",
  5142. "solb": "⧄",
  5143. "sol": "/",
  5144. "Sopf": "𝕊",
  5145. "sopf": "𝕤",
  5146. "spades": "♠",
  5147. "spadesuit": "♠",
  5148. "spar": "∥",
  5149. "sqcap": "⊓",
  5150. "sqcaps": "⊓︀",
  5151. "sqcup": "⊔",
  5152. "sqcups": "⊔︀",
  5153. "Sqrt": "√",
  5154. "sqsub": "⊏",
  5155. "sqsube": "⊑",
  5156. "sqsubset": "⊏",
  5157. "sqsubseteq": "⊑",
  5158. "sqsup": "⊐",
  5159. "sqsupe": "⊒",
  5160. "sqsupset": "⊐",
  5161. "sqsupseteq": "⊒",
  5162. "square": "□",
  5163. "Square": "□",
  5164. "SquareIntersection": "⊓",
  5165. "SquareSubset": "⊏",
  5166. "SquareSubsetEqual": "⊑",
  5167. "SquareSuperset": "⊐",
  5168. "SquareSupersetEqual": "⊒",
  5169. "SquareUnion": "⊔",
  5170. "squarf": "▪",
  5171. "squ": "□",
  5172. "squf": "▪",
  5173. "srarr": "→",
  5174. "Sscr": "𝒮",
  5175. "sscr": "𝓈",
  5176. "ssetmn": "∖",
  5177. "ssmile": "⌣",
  5178. "sstarf": "⋆",
  5179. "Star": "⋆",
  5180. "star": "☆",
  5181. "starf": "★",
  5182. "straightepsilon": "ϵ",
  5183. "straightphi": "ϕ",
  5184. "strns": "¯",
  5185. "sub": "⊂",
  5186. "Sub": "⋐",
  5187. "subdot": "⪽",
  5188. "subE": "⫅",
  5189. "sube": "⊆",
  5190. "subedot": "⫃",
  5191. "submult": "⫁",
  5192. "subnE": "⫋",
  5193. "subne": "⊊",
  5194. "subplus": "⪿",
  5195. "subrarr": "⥹",
  5196. "subset": "⊂",
  5197. "Subset": "⋐",
  5198. "subseteq": "⊆",
  5199. "subseteqq": "⫅",
  5200. "SubsetEqual": "⊆",
  5201. "subsetneq": "⊊",
  5202. "subsetneqq": "⫋",
  5203. "subsim": "⫇",
  5204. "subsub": "⫕",
  5205. "subsup": "⫓",
  5206. "succapprox": "⪸",
  5207. "succ": "≻",
  5208. "succcurlyeq": "≽",
  5209. "Succeeds": "≻",
  5210. "SucceedsEqual": "⪰",
  5211. "SucceedsSlantEqual": "≽",
  5212. "SucceedsTilde": "≿",
  5213. "succeq": "⪰",
  5214. "succnapprox": "⪺",
  5215. "succneqq": "⪶",
  5216. "succnsim": "⋩",
  5217. "succsim": "≿",
  5218. "SuchThat": "∋",
  5219. "sum": "∑",
  5220. "Sum": "∑",
  5221. "sung": "♪",
  5222. "sup1": "¹",
  5223. "sup2": "²",
  5224. "sup3": "³",
  5225. "sup": "⊃",
  5226. "Sup": "⋑",
  5227. "supdot": "⪾",
  5228. "supdsub": "⫘",
  5229. "supE": "⫆",
  5230. "supe": "⊇",
  5231. "supedot": "⫄",
  5232. "Superset": "⊃",
  5233. "SupersetEqual": "⊇",
  5234. "suphsol": "⟉",
  5235. "suphsub": "⫗",
  5236. "suplarr": "⥻",
  5237. "supmult": "⫂",
  5238. "supnE": "⫌",
  5239. "supne": "⊋",
  5240. "supplus": "⫀",
  5241. "supset": "⊃",
  5242. "Supset": "⋑",
  5243. "supseteq": "⊇",
  5244. "supseteqq": "⫆",
  5245. "supsetneq": "⊋",
  5246. "supsetneqq": "⫌",
  5247. "supsim": "⫈",
  5248. "supsub": "⫔",
  5249. "supsup": "⫖",
  5250. "swarhk": "⤦",
  5251. "swarr": "↙",
  5252. "swArr": "⇙",
  5253. "swarrow": "↙",
  5254. "swnwar": "⤪",
  5255. "szlig": "ß",
  5256. "Tab": "\t",
  5257. "target": "⌖",
  5258. "Tau": "Τ",
  5259. "tau": "τ",
  5260. "tbrk": "⎴",
  5261. "Tcaron": "Ť",
  5262. "tcaron": "ť",
  5263. "Tcedil": "Ţ",
  5264. "tcedil": "ţ",
  5265. "Tcy": "Т",
  5266. "tcy": "т",
  5267. "tdot": "⃛",
  5268. "telrec": "⌕",
  5269. "Tfr": "𝔗",
  5270. "tfr": "𝔱",
  5271. "there4": "∴",
  5272. "therefore": "∴",
  5273. "Therefore": "∴",
  5274. "Theta": "Θ",
  5275. "theta": "θ",
  5276. "thetasym": "ϑ",
  5277. "thetav": "ϑ",
  5278. "thickapprox": "≈",
  5279. "thicksim": "∼",
  5280. "ThickSpace": "  ",
  5281. "ThinSpace": " ",
  5282. "thinsp": " ",
  5283. "thkap": "≈",
  5284. "thksim": "∼",
  5285. "THORN": "Þ",
  5286. "thorn": "þ",
  5287. "tilde": "˜",
  5288. "Tilde": "∼",
  5289. "TildeEqual": "≃",
  5290. "TildeFullEqual": "≅",
  5291. "TildeTilde": "≈",
  5292. "timesbar": "⨱",
  5293. "timesb": "⊠",
  5294. "times": "×",
  5295. "timesd": "⨰",
  5296. "tint": "∭",
  5297. "toea": "⤨",
  5298. "topbot": "⌶",
  5299. "topcir": "⫱",
  5300. "top": "⊤",
  5301. "Topf": "𝕋",
  5302. "topf": "𝕥",
  5303. "topfork": "⫚",
  5304. "tosa": "⤩",
  5305. "tprime": "‴",
  5306. "trade": "™",
  5307. "TRADE": "™",
  5308. "triangle": "▵",
  5309. "triangledown": "▿",
  5310. "triangleleft": "◃",
  5311. "trianglelefteq": "⊴",
  5312. "triangleq": "≜",
  5313. "triangleright": "▹",
  5314. "trianglerighteq": "⊵",
  5315. "tridot": "◬",
  5316. "trie": "≜",
  5317. "triminus": "⨺",
  5318. "TripleDot": "⃛",
  5319. "triplus": "⨹",
  5320. "trisb": "⧍",
  5321. "tritime": "⨻",
  5322. "trpezium": "⏢",
  5323. "Tscr": "𝒯",
  5324. "tscr": "𝓉",
  5325. "TScy": "Ц",
  5326. "tscy": "ц",
  5327. "TSHcy": "Ћ",
  5328. "tshcy": "ћ",
  5329. "Tstrok": "Ŧ",
  5330. "tstrok": "ŧ",
  5331. "twixt": "≬",
  5332. "twoheadleftarrow": "↞",
  5333. "twoheadrightarrow": "↠",
  5334. "Uacute": "Ú",
  5335. "uacute": "ú",
  5336. "uarr": "↑",
  5337. "Uarr": "↟",
  5338. "uArr": "⇑",
  5339. "Uarrocir": "⥉",
  5340. "Ubrcy": "Ў",
  5341. "ubrcy": "ў",
  5342. "Ubreve": "Ŭ",
  5343. "ubreve": "ŭ",
  5344. "Ucirc": "Û",
  5345. "ucirc": "û",
  5346. "Ucy": "У",
  5347. "ucy": "у",
  5348. "udarr": "⇅",
  5349. "Udblac": "Ű",
  5350. "udblac": "ű",
  5351. "udhar": "⥮",
  5352. "ufisht": "⥾",
  5353. "Ufr": "𝔘",
  5354. "ufr": "𝔲",
  5355. "Ugrave": "Ù",
  5356. "ugrave": "ù",
  5357. "uHar": "⥣",
  5358. "uharl": "↿",
  5359. "uharr": "↾",
  5360. "uhblk": "▀",
  5361. "ulcorn": "⌜",
  5362. "ulcorner": "⌜",
  5363. "ulcrop": "⌏",
  5364. "ultri": "◸",
  5365. "Umacr": "Ū",
  5366. "umacr": "ū",
  5367. "uml": "¨",
  5368. "UnderBar": "_",
  5369. "UnderBrace": "⏟",
  5370. "UnderBracket": "⎵",
  5371. "UnderParenthesis": "⏝",
  5372. "Union": "⋃",
  5373. "UnionPlus": "⊎",
  5374. "Uogon": "Ų",
  5375. "uogon": "ų",
  5376. "Uopf": "𝕌",
  5377. "uopf": "𝕦",
  5378. "UpArrowBar": "⤒",
  5379. "uparrow": "↑",
  5380. "UpArrow": "↑",
  5381. "Uparrow": "⇑",
  5382. "UpArrowDownArrow": "⇅",
  5383. "updownarrow": "↕",
  5384. "UpDownArrow": "↕",
  5385. "Updownarrow": "⇕",
  5386. "UpEquilibrium": "⥮",
  5387. "upharpoonleft": "↿",
  5388. "upharpoonright": "↾",
  5389. "uplus": "⊎",
  5390. "UpperLeftArrow": "↖",
  5391. "UpperRightArrow": "↗",
  5392. "upsi": "υ",
  5393. "Upsi": "ϒ",
  5394. "upsih": "ϒ",
  5395. "Upsilon": "Υ",
  5396. "upsilon": "υ",
  5397. "UpTeeArrow": "↥",
  5398. "UpTee": "⊥",
  5399. "upuparrows": "⇈",
  5400. "urcorn": "⌝",
  5401. "urcorner": "⌝",
  5402. "urcrop": "⌎",
  5403. "Uring": "Ů",
  5404. "uring": "ů",
  5405. "urtri": "◹",
  5406. "Uscr": "𝒰",
  5407. "uscr": "𝓊",
  5408. "utdot": "⋰",
  5409. "Utilde": "Ũ",
  5410. "utilde": "ũ",
  5411. "utri": "▵",
  5412. "utrif": "▴",
  5413. "uuarr": "⇈",
  5414. "Uuml": "Ü",
  5415. "uuml": "ü",
  5416. "uwangle": "⦧",
  5417. "vangrt": "⦜",
  5418. "varepsilon": "ϵ",
  5419. "varkappa": "ϰ",
  5420. "varnothing": "∅",
  5421. "varphi": "ϕ",
  5422. "varpi": "ϖ",
  5423. "varpropto": "∝",
  5424. "varr": "↕",
  5425. "vArr": "⇕",
  5426. "varrho": "ϱ",
  5427. "varsigma": "ς",
  5428. "varsubsetneq": "⊊︀",
  5429. "varsubsetneqq": "⫋︀",
  5430. "varsupsetneq": "⊋︀",
  5431. "varsupsetneqq": "⫌︀",
  5432. "vartheta": "ϑ",
  5433. "vartriangleleft": "⊲",
  5434. "vartriangleright": "⊳",
  5435. "vBar": "⫨",
  5436. "Vbar": "⫫",
  5437. "vBarv": "⫩",
  5438. "Vcy": "В",
  5439. "vcy": "в",
  5440. "vdash": "⊢",
  5441. "vDash": "⊨",
  5442. "Vdash": "⊩",
  5443. "VDash": "⊫",
  5444. "Vdashl": "⫦",
  5445. "veebar": "⊻",
  5446. "vee": "∨",
  5447. "Vee": "⋁",
  5448. "veeeq": "≚",
  5449. "vellip": "⋮",
  5450. "verbar": "|",
  5451. "Verbar": "‖",
  5452. "vert": "|",
  5453. "Vert": "‖",
  5454. "VerticalBar": "∣",
  5455. "VerticalLine": "|",
  5456. "VerticalSeparator": "❘",
  5457. "VerticalTilde": "≀",
  5458. "VeryThinSpace": " ",
  5459. "Vfr": "𝔙",
  5460. "vfr": "𝔳",
  5461. "vltri": "⊲",
  5462. "vnsub": "⊂⃒",
  5463. "vnsup": "⊃⃒",
  5464. "Vopf": "𝕍",
  5465. "vopf": "𝕧",
  5466. "vprop": "∝",
  5467. "vrtri": "⊳",
  5468. "Vscr": "𝒱",
  5469. "vscr": "𝓋",
  5470. "vsubnE": "⫋︀",
  5471. "vsubne": "⊊︀",
  5472. "vsupnE": "⫌︀",
  5473. "vsupne": "⊋︀",
  5474. "Vvdash": "⊪",
  5475. "vzigzag": "⦚",
  5476. "Wcirc": "Ŵ",
  5477. "wcirc": "ŵ",
  5478. "wedbar": "⩟",
  5479. "wedge": "∧",
  5480. "Wedge": "⋀",
  5481. "wedgeq": "≙",
  5482. "weierp": "℘",
  5483. "Wfr": "𝔚",
  5484. "wfr": "𝔴",
  5485. "Wopf": "𝕎",
  5486. "wopf": "𝕨",
  5487. "wp": "℘",
  5488. "wr": "≀",
  5489. "wreath": "≀",
  5490. "Wscr": "𝒲",
  5491. "wscr": "𝓌",
  5492. "xcap": "⋂",
  5493. "xcirc": "◯",
  5494. "xcup": "⋃",
  5495. "xdtri": "▽",
  5496. "Xfr": "𝔛",
  5497. "xfr": "𝔵",
  5498. "xharr": "⟷",
  5499. "xhArr": "⟺",
  5500. "Xi": "Ξ",
  5501. "xi": "ξ",
  5502. "xlarr": "⟵",
  5503. "xlArr": "⟸",
  5504. "xmap": "⟼",
  5505. "xnis": "⋻",
  5506. "xodot": "⨀",
  5507. "Xopf": "𝕏",
  5508. "xopf": "𝕩",
  5509. "xoplus": "⨁",
  5510. "xotime": "⨂",
  5511. "xrarr": "⟶",
  5512. "xrArr": "⟹",
  5513. "Xscr": "𝒳",
  5514. "xscr": "𝓍",
  5515. "xsqcup": "⨆",
  5516. "xuplus": "⨄",
  5517. "xutri": "△",
  5518. "xvee": "⋁",
  5519. "xwedge": "⋀",
  5520. "Yacute": "Ý",
  5521. "yacute": "ý",
  5522. "YAcy": "Я",
  5523. "yacy": "я",
  5524. "Ycirc": "Ŷ",
  5525. "ycirc": "ŷ",
  5526. "Ycy": "Ы",
  5527. "ycy": "ы",
  5528. "yen": "¥",
  5529. "Yfr": "𝔜",
  5530. "yfr": "𝔶",
  5531. "YIcy": "Ї",
  5532. "yicy": "ї",
  5533. "Yopf": "𝕐",
  5534. "yopf": "𝕪",
  5535. "Yscr": "𝒴",
  5536. "yscr": "𝓎",
  5537. "YUcy": "Ю",
  5538. "yucy": "ю",
  5539. "yuml": "ÿ",
  5540. "Yuml": "Ÿ",
  5541. "Zacute": "Ź",
  5542. "zacute": "ź",
  5543. "Zcaron": "Ž",
  5544. "zcaron": "ž",
  5545. "Zcy": "З",
  5546. "zcy": "з",
  5547. "Zdot": "Ż",
  5548. "zdot": "ż",
  5549. "zeetrf": "ℨ",
  5550. "ZeroWidthSpace": "​",
  5551. "Zeta": "Ζ",
  5552. "zeta": "ζ",
  5553. "zfr": "𝔷",
  5554. "Zfr": "ℨ",
  5555. "ZHcy": "Ж",
  5556. "zhcy": "ж",
  5557. "zigrarr": "⇝",
  5558. "zopf": "𝕫",
  5559. "Zopf": "ℤ",
  5560. "Zscr": "𝒵",
  5561. "zscr": "𝓏",
  5562. "zwj": "‍",
  5563. "zwnj": "‌"
  5564. };
  5565. /***/ }),
  5566. /* 24 */
  5567. /***/ (function(module, exports) {
  5568. // removed by extract-text-webpack-plugin
  5569. /***/ }),
  5570. /* 25 */
  5571. /***/ (function(module, exports) {
  5572. // removed by extract-text-webpack-plugin
  5573. /***/ }),
  5574. /* 26 */
  5575. /***/ (function(module, exports) {
  5576. // removed by extract-text-webpack-plugin
  5577. /***/ }),
  5578. /* 27 */
  5579. /***/ (function(module, exports) {
  5580. // removed by extract-text-webpack-plugin
  5581. /***/ }),
  5582. /* 28 */
  5583. /***/ (function(module, exports, __webpack_require__) {
  5584. "use strict";
  5585. ////////////////////////////////////////////////////////////////////////////////
  5586. // Helpers
  5587. // Merge objects
  5588. //
  5589. function assign(obj /*from1, from2, from3, ...*/) {
  5590. var sources = Array.prototype.slice.call(arguments, 1);
  5591. sources.forEach(function (source) {
  5592. if (!source) { return; }
  5593. Object.keys(source).forEach(function (key) {
  5594. obj[key] = source[key];
  5595. });
  5596. });
  5597. return obj;
  5598. }
  5599. function _class(obj) { return Object.prototype.toString.call(obj); }
  5600. function isString(obj) { return _class(obj) === '[object String]'; }
  5601. function isObject(obj) { return _class(obj) === '[object Object]'; }
  5602. function isRegExp(obj) { return _class(obj) === '[object RegExp]'; }
  5603. function isFunction(obj) { return _class(obj) === '[object Function]'; }
  5604. function escapeRE(str) { return str.replace(/[.?*+^$[\]\\(){}|-]/g, '\\$&'); }
  5605. ////////////////////////////////////////////////////////////////////////////////
  5606. var defaultOptions = {
  5607. fuzzyLink: true,
  5608. fuzzyEmail: true,
  5609. fuzzyIP: false
  5610. };
  5611. function isOptionsObj(obj) {
  5612. return Object.keys(obj || {}).reduce(function (acc, k) {
  5613. return acc || defaultOptions.hasOwnProperty(k);
  5614. }, false);
  5615. }
  5616. var defaultSchemas = {
  5617. 'http:': {
  5618. validate: function (text, pos, self) {
  5619. var tail = text.slice(pos);
  5620. if (!self.re.http) {
  5621. // compile lazily, because "host"-containing variables can change on tlds update.
  5622. self.re.http = new RegExp(
  5623. '^\\/\\/' + self.re.src_auth + self.re.src_host_port_strict + self.re.src_path, 'i'
  5624. );
  5625. }
  5626. if (self.re.http.test(tail)) {
  5627. return tail.match(self.re.http)[0].length;
  5628. }
  5629. return 0;
  5630. }
  5631. },
  5632. 'https:': 'http:',
  5633. 'ftp:': 'http:',
  5634. '//': {
  5635. validate: function (text, pos, self) {
  5636. var tail = text.slice(pos);
  5637. if (!self.re.no_http) {
  5638. // compile lazily, because "host"-containing variables can change on tlds update.
  5639. self.re.no_http = new RegExp(
  5640. '^' +
  5641. self.re.src_auth +
  5642. // Don't allow single-level domains, because of false positives like '//test'
  5643. // with code comments
  5644. '(?:localhost|(?:(?:' + self.re.src_domain + ')\\.)+' + self.re.src_domain_root + ')' +
  5645. self.re.src_port +
  5646. self.re.src_host_terminator +
  5647. self.re.src_path,
  5648. 'i'
  5649. );
  5650. }
  5651. if (self.re.no_http.test(tail)) {
  5652. // should not be `://` & `///`, that protects from errors in protocol name
  5653. if (pos >= 3 && text[pos - 3] === ':') { return 0; }
  5654. if (pos >= 3 && text[pos - 3] === '/') { return 0; }
  5655. return tail.match(self.re.no_http)[0].length;
  5656. }
  5657. return 0;
  5658. }
  5659. },
  5660. 'mailto:': {
  5661. validate: function (text, pos, self) {
  5662. var tail = text.slice(pos);
  5663. if (!self.re.mailto) {
  5664. self.re.mailto = new RegExp(
  5665. '^' + self.re.src_email_name + '@' + self.re.src_host_strict, 'i'
  5666. );
  5667. }
  5668. if (self.re.mailto.test(tail)) {
  5669. return tail.match(self.re.mailto)[0].length;
  5670. }
  5671. return 0;
  5672. }
  5673. }
  5674. };
  5675. /*eslint-disable max-len*/
  5676. // RE pattern for 2-character tlds (autogenerated by ./support/tlds_2char_gen.js)
  5677. var tlds_2ch_src_re = 'a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]';
  5678. // DON'T try to make PRs with changes. Extend TLDs with LinkifyIt.tlds() instead
  5679. var tlds_default = 'biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф'.split('|');
  5680. /*eslint-enable max-len*/
  5681. ////////////////////////////////////////////////////////////////////////////////
  5682. function resetScanCache(self) {
  5683. self.__index__ = -1;
  5684. self.__text_cache__ = '';
  5685. }
  5686. function createValidator(re) {
  5687. return function (text, pos) {
  5688. var tail = text.slice(pos);
  5689. if (re.test(tail)) {
  5690. return tail.match(re)[0].length;
  5691. }
  5692. return 0;
  5693. };
  5694. }
  5695. function createNormalizer() {
  5696. return function (match, self) {
  5697. self.normalize(match);
  5698. };
  5699. }
  5700. // Schemas compiler. Build regexps.
  5701. //
  5702. function compile(self) {
  5703. // Load & clone RE patterns.
  5704. var re = self.re = __webpack_require__(29)(self.__opts__);
  5705. // Define dynamic patterns
  5706. var tlds = self.__tlds__.slice();
  5707. self.onCompile();
  5708. if (!self.__tlds_replaced__) {
  5709. tlds.push(tlds_2ch_src_re);
  5710. }
  5711. tlds.push(re.src_xn);
  5712. re.src_tlds = tlds.join('|');
  5713. function untpl(tpl) { return tpl.replace('%TLDS%', re.src_tlds); }
  5714. re.email_fuzzy = RegExp(untpl(re.tpl_email_fuzzy), 'i');
  5715. re.link_fuzzy = RegExp(untpl(re.tpl_link_fuzzy), 'i');
  5716. re.link_no_ip_fuzzy = RegExp(untpl(re.tpl_link_no_ip_fuzzy), 'i');
  5717. re.host_fuzzy_test = RegExp(untpl(re.tpl_host_fuzzy_test), 'i');
  5718. //
  5719. // Compile each schema
  5720. //
  5721. var aliases = [];
  5722. self.__compiled__ = {}; // Reset compiled data
  5723. function schemaError(name, val) {
  5724. throw new Error('(LinkifyIt) Invalid schema "' + name + '": ' + val);
  5725. }
  5726. Object.keys(self.__schemas__).forEach(function (name) {
  5727. var val = self.__schemas__[name];
  5728. // skip disabled methods
  5729. if (val === null) { return; }
  5730. var compiled = { validate: null, link: null };
  5731. self.__compiled__[name] = compiled;
  5732. if (isObject(val)) {
  5733. if (isRegExp(val.validate)) {
  5734. compiled.validate = createValidator(val.validate);
  5735. } else if (isFunction(val.validate)) {
  5736. compiled.validate = val.validate;
  5737. } else {
  5738. schemaError(name, val);
  5739. }
  5740. if (isFunction(val.normalize)) {
  5741. compiled.normalize = val.normalize;
  5742. } else if (!val.normalize) {
  5743. compiled.normalize = createNormalizer();
  5744. } else {
  5745. schemaError(name, val);
  5746. }
  5747. return;
  5748. }
  5749. if (isString(val)) {
  5750. aliases.push(name);
  5751. return;
  5752. }
  5753. schemaError(name, val);
  5754. });
  5755. //
  5756. // Compile postponed aliases
  5757. //
  5758. aliases.forEach(function (alias) {
  5759. if (!self.__compiled__[self.__schemas__[alias]]) {
  5760. // Silently fail on missed schemas to avoid errons on disable.
  5761. // schemaError(alias, self.__schemas__[alias]);
  5762. return;
  5763. }
  5764. self.__compiled__[alias].validate =
  5765. self.__compiled__[self.__schemas__[alias]].validate;
  5766. self.__compiled__[alias].normalize =
  5767. self.__compiled__[self.__schemas__[alias]].normalize;
  5768. });
  5769. //
  5770. // Fake record for guessed links
  5771. //
  5772. self.__compiled__[''] = { validate: null, normalize: createNormalizer() };
  5773. //
  5774. // Build schema condition
  5775. //
  5776. var slist = Object.keys(self.__compiled__)
  5777. .filter(function (name) {
  5778. // Filter disabled & fake schemas
  5779. return name.length > 0 && self.__compiled__[name];
  5780. })
  5781. .map(escapeRE)
  5782. .join('|');
  5783. // (?!_) cause 1.5x slowdown
  5784. self.re.schema_test = RegExp('(^|(?!_)(?:[><\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'i');
  5785. self.re.schema_search = RegExp('(^|(?!_)(?:[><\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'ig');
  5786. self.re.pretest = RegExp(
  5787. '(' + self.re.schema_test.source + ')|' +
  5788. '(' + self.re.host_fuzzy_test.source + ')|' +
  5789. '@',
  5790. 'i');
  5791. //
  5792. // Cleanup
  5793. //
  5794. resetScanCache(self);
  5795. }
  5796. /**
  5797. * class Match
  5798. *
  5799. * Match result. Single element of array, returned by [[LinkifyIt#match]]
  5800. **/
  5801. function Match(self, shift) {
  5802. var start = self.__index__,
  5803. end = self.__last_index__,
  5804. text = self.__text_cache__.slice(start, end);
  5805. /**
  5806. * Match#schema -> String
  5807. *
  5808. * Prefix (protocol) for matched string.
  5809. **/
  5810. this.schema = self.__schema__.toLowerCase();
  5811. /**
  5812. * Match#index -> Number
  5813. *
  5814. * First position of matched string.
  5815. **/
  5816. this.index = start + shift;
  5817. /**
  5818. * Match#lastIndex -> Number
  5819. *
  5820. * Next position after matched string.
  5821. **/
  5822. this.lastIndex = end + shift;
  5823. /**
  5824. * Match#raw -> String
  5825. *
  5826. * Matched string.
  5827. **/
  5828. this.raw = text;
  5829. /**
  5830. * Match#text -> String
  5831. *
  5832. * Notmalized text of matched string.
  5833. **/
  5834. this.text = text;
  5835. /**
  5836. * Match#url -> String
  5837. *
  5838. * Normalized url of matched string.
  5839. **/
  5840. this.url = text;
  5841. }
  5842. function createMatch(self, shift) {
  5843. var match = new Match(self, shift);
  5844. self.__compiled__[match.schema].normalize(match, self);
  5845. return match;
  5846. }
  5847. /**
  5848. * class LinkifyIt
  5849. **/
  5850. /**
  5851. * new LinkifyIt(schemas, options)
  5852. * - schemas (Object): Optional. Additional schemas to validate (prefix/validator)
  5853. * - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false }
  5854. *
  5855. * Creates new linkifier instance with optional additional schemas.
  5856. * Can be called without `new` keyword for convenience.
  5857. *
  5858. * By default understands:
  5859. *
  5860. * - `http(s)://...` , `ftp://...`, `mailto:...` & `//...` links
  5861. * - "fuzzy" links and emails (example.com, foo@bar.com).
  5862. *
  5863. * `schemas` is an object, where each key/value describes protocol/rule:
  5864. *
  5865. * - __key__ - link prefix (usually, protocol name with `:` at the end, `skype:`
  5866. * for example). `linkify-it` makes shure that prefix is not preceeded with
  5867. * alphanumeric char and symbols. Only whitespaces and punctuation allowed.
  5868. * - __value__ - rule to check tail after link prefix
  5869. * - _String_ - just alias to existing rule
  5870. * - _Object_
  5871. * - _validate_ - validator function (should return matched length on success),
  5872. * or `RegExp`.
  5873. * - _normalize_ - optional function to normalize text & url of matched result
  5874. * (for example, for @twitter mentions).
  5875. *
  5876. * `options`:
  5877. *
  5878. * - __fuzzyLink__ - recognige URL-s without `http(s):` prefix. Default `true`.
  5879. * - __fuzzyIP__ - allow IPs in fuzzy links above. Can conflict with some texts
  5880. * like version numbers. Default `false`.
  5881. * - __fuzzyEmail__ - recognize emails without `mailto:` prefix.
  5882. *
  5883. **/
  5884. function LinkifyIt(schemas, options) {
  5885. if (!(this instanceof LinkifyIt)) {
  5886. return new LinkifyIt(schemas, options);
  5887. }
  5888. if (!options) {
  5889. if (isOptionsObj(schemas)) {
  5890. options = schemas;
  5891. schemas = {};
  5892. }
  5893. }
  5894. this.__opts__ = assign({}, defaultOptions, options);
  5895. // Cache last tested result. Used to skip repeating steps on next `match` call.
  5896. this.__index__ = -1;
  5897. this.__last_index__ = -1; // Next scan position
  5898. this.__schema__ = '';
  5899. this.__text_cache__ = '';
  5900. this.__schemas__ = assign({}, defaultSchemas, schemas);
  5901. this.__compiled__ = {};
  5902. this.__tlds__ = tlds_default;
  5903. this.__tlds_replaced__ = false;
  5904. this.re = {};
  5905. compile(this);
  5906. }
  5907. /** chainable
  5908. * LinkifyIt#add(schema, definition)
  5909. * - schema (String): rule name (fixed pattern prefix)
  5910. * - definition (String|RegExp|Object): schema definition
  5911. *
  5912. * Add new rule definition. See constructor description for details.
  5913. **/
  5914. LinkifyIt.prototype.add = function add(schema, definition) {
  5915. this.__schemas__[schema] = definition;
  5916. compile(this);
  5917. return this;
  5918. };
  5919. /** chainable
  5920. * LinkifyIt#set(options)
  5921. * - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false }
  5922. *
  5923. * Set recognition options for links without schema.
  5924. **/
  5925. LinkifyIt.prototype.set = function set(options) {
  5926. this.__opts__ = assign(this.__opts__, options);
  5927. return this;
  5928. };
  5929. /**
  5930. * LinkifyIt#test(text) -> Boolean
  5931. *
  5932. * Searches linkifiable pattern and returns `true` on success or `false` on fail.
  5933. **/
  5934. LinkifyIt.prototype.test = function test(text) {
  5935. // Reset scan cache
  5936. this.__text_cache__ = text;
  5937. this.__index__ = -1;
  5938. if (!text.length) { return false; }
  5939. var m, ml, me, len, shift, next, re, tld_pos, at_pos;
  5940. // try to scan for link with schema - that's the most simple rule
  5941. if (this.re.schema_test.test(text)) {
  5942. re = this.re.schema_search;
  5943. re.lastIndex = 0;
  5944. while ((m = re.exec(text)) !== null) {
  5945. len = this.testSchemaAt(text, m[2], re.lastIndex);
  5946. if (len) {
  5947. this.__schema__ = m[2];
  5948. this.__index__ = m.index + m[1].length;
  5949. this.__last_index__ = m.index + m[0].length + len;
  5950. break;
  5951. }
  5952. }
  5953. }
  5954. if (this.__opts__.fuzzyLink && this.__compiled__['http:']) {
  5955. // guess schemaless links
  5956. tld_pos = text.search(this.re.host_fuzzy_test);
  5957. if (tld_pos >= 0) {
  5958. // if tld is located after found link - no need to check fuzzy pattern
  5959. if (this.__index__ < 0 || tld_pos < this.__index__) {
  5960. if ((ml = text.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null) {
  5961. shift = ml.index + ml[1].length;
  5962. if (this.__index__ < 0 || shift < this.__index__) {
  5963. this.__schema__ = '';
  5964. this.__index__ = shift;
  5965. this.__last_index__ = ml.index + ml[0].length;
  5966. }
  5967. }
  5968. }
  5969. }
  5970. }
  5971. if (this.__opts__.fuzzyEmail && this.__compiled__['mailto:']) {
  5972. // guess schemaless emails
  5973. at_pos = text.indexOf('@');
  5974. if (at_pos >= 0) {
  5975. // We can't skip this check, because this cases are possible:
  5976. // 192.168.1.1@gmail.com, my.in@example.com
  5977. if ((me = text.match(this.re.email_fuzzy)) !== null) {
  5978. shift = me.index + me[1].length;
  5979. next = me.index + me[0].length;
  5980. if (this.__index__ < 0 || shift < this.__index__ ||
  5981. (shift === this.__index__ && next > this.__last_index__)) {
  5982. this.__schema__ = 'mailto:';
  5983. this.__index__ = shift;
  5984. this.__last_index__ = next;
  5985. }
  5986. }
  5987. }
  5988. }
  5989. return this.__index__ >= 0;
  5990. };
  5991. /**
  5992. * LinkifyIt#pretest(text) -> Boolean
  5993. *
  5994. * Very quick check, that can give false positives. Returns true if link MAY BE
  5995. * can exists. Can be used for speed optimization, when you need to check that
  5996. * link NOT exists.
  5997. **/
  5998. LinkifyIt.prototype.pretest = function pretest(text) {
  5999. return this.re.pretest.test(text);
  6000. };
  6001. /**
  6002. * LinkifyIt#testSchemaAt(text, name, position) -> Number
  6003. * - text (String): text to scan
  6004. * - name (String): rule (schema) name
  6005. * - position (Number): text offset to check from
  6006. *
  6007. * Similar to [[LinkifyIt#test]] but checks only specific protocol tail exactly
  6008. * at given position. Returns length of found pattern (0 on fail).
  6009. **/
  6010. LinkifyIt.prototype.testSchemaAt = function testSchemaAt(text, schema, pos) {
  6011. // If not supported schema check requested - terminate
  6012. if (!this.__compiled__[schema.toLowerCase()]) {
  6013. return 0;
  6014. }
  6015. return this.__compiled__[schema.toLowerCase()].validate(text, pos, this);
  6016. };
  6017. /**
  6018. * LinkifyIt#match(text) -> Array|null
  6019. *
  6020. * Returns array of found link descriptions or `null` on fail. We strongly
  6021. * recommend to use [[LinkifyIt#test]] first, for best speed.
  6022. *
  6023. * ##### Result match description
  6024. *
  6025. * - __schema__ - link schema, can be empty for fuzzy links, or `//` for
  6026. * protocol-neutral links.
  6027. * - __index__ - offset of matched text
  6028. * - __lastIndex__ - index of next char after mathch end
  6029. * - __raw__ - matched text
  6030. * - __text__ - normalized text
  6031. * - __url__ - link, generated from matched text
  6032. **/
  6033. LinkifyIt.prototype.match = function match(text) {
  6034. var shift = 0, result = [];
  6035. // Try to take previous element from cache, if .test() called before
  6036. if (this.__index__ >= 0 && this.__text_cache__ === text) {
  6037. result.push(createMatch(this, shift));
  6038. shift = this.__last_index__;
  6039. }
  6040. // Cut head if cache was used
  6041. var tail = shift ? text.slice(shift) : text;
  6042. // Scan string until end reached
  6043. while (this.test(tail)) {
  6044. result.push(createMatch(this, shift));
  6045. tail = tail.slice(this.__last_index__);
  6046. shift += this.__last_index__;
  6047. }
  6048. if (result.length) {
  6049. return result;
  6050. }
  6051. return null;
  6052. };
  6053. /** chainable
  6054. * LinkifyIt#tlds(list [, keepOld]) -> this
  6055. * - list (Array): list of tlds
  6056. * - keepOld (Boolean): merge with current list if `true` (`false` by default)
  6057. *
  6058. * Load (or merge) new tlds list. Those are user for fuzzy links (without prefix)
  6059. * to avoid false positives. By default this algorythm used:
  6060. *
  6061. * - hostname with any 2-letter root zones are ok.
  6062. * - biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф
  6063. * are ok.
  6064. * - encoded (`xn--...`) root zones are ok.
  6065. *
  6066. * If list is replaced, then exact match for 2-chars root zones will be checked.
  6067. **/
  6068. LinkifyIt.prototype.tlds = function tlds(list, keepOld) {
  6069. list = Array.isArray(list) ? list : [ list ];
  6070. if (!keepOld) {
  6071. this.__tlds__ = list.slice();
  6072. this.__tlds_replaced__ = true;
  6073. compile(this);
  6074. return this;
  6075. }
  6076. this.__tlds__ = this.__tlds__.concat(list)
  6077. .sort()
  6078. .filter(function (el, idx, arr) {
  6079. return el !== arr[idx - 1];
  6080. })
  6081. .reverse();
  6082. compile(this);
  6083. return this;
  6084. };
  6085. /**
  6086. * LinkifyIt#normalize(match)
  6087. *
  6088. * Default normalizer (if schema does not define it's own).
  6089. **/
  6090. LinkifyIt.prototype.normalize = function normalize(match) {
  6091. // Do minimal possible changes by default. Need to collect feedback prior
  6092. // to move forward https://github.com/markdown-it/linkify-it/issues/1
  6093. if (!match.schema) { match.url = 'http://' + match.url; }
  6094. if (match.schema === 'mailto:' && !/^mailto:/i.test(match.url)) {
  6095. match.url = 'mailto:' + match.url;
  6096. }
  6097. };
  6098. /**
  6099. * LinkifyIt#onCompile()
  6100. *
  6101. * Override to modify basic RegExp-s.
  6102. **/
  6103. LinkifyIt.prototype.onCompile = function onCompile() {
  6104. };
  6105. module.exports = LinkifyIt;
  6106. /***/ }),
  6107. /* 29 */
  6108. /***/ (function(module, exports, __webpack_require__) {
  6109. "use strict";
  6110. module.exports = function (opts) {
  6111. var re = {};
  6112. // Use direct extract instead of `regenerate` to reduse browserified size
  6113. re.src_Any = __webpack_require__(18).source;
  6114. re.src_Cc = __webpack_require__(16).source;
  6115. re.src_Z = __webpack_require__(17).source;
  6116. re.src_P = __webpack_require__(5).source;
  6117. // \p{\Z\P\Cc\CF} (white spaces + control + format + punctuation)
  6118. re.src_ZPCc = [ re.src_Z, re.src_P, re.src_Cc ].join('|');
  6119. // \p{\Z\Cc} (white spaces + control)
  6120. re.src_ZCc = [ re.src_Z, re.src_Cc ].join('|');
  6121. // Experimental. List of chars, completely prohibited in links
  6122. // because can separate it from other part of text
  6123. var text_separators = '[><\uff5c]';
  6124. // All possible word characters (everything without punctuation, spaces & controls)
  6125. // Defined via punctuation & spaces to save space
  6126. // Should be something like \p{\L\N\S\M} (\w but without `_`)
  6127. re.src_pseudo_letter = '(?:(?!' + text_separators + '|' + re.src_ZPCc + ')' + re.src_Any + ')';
  6128. // The same as abothe but without [0-9]
  6129. // var src_pseudo_letter_non_d = '(?:(?![0-9]|' + src_ZPCc + ')' + src_Any + ')';
  6130. ////////////////////////////////////////////////////////////////////////////////
  6131. re.src_ip4 =
  6132. '(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)';
  6133. // Prohibit any of "@/[]()" in user/pass to avoid wrong domain fetch.
  6134. re.src_auth = '(?:(?:(?!' + re.src_ZCc + '|[@/\\[\\]()]).)+@)?';
  6135. re.src_port =
  6136. '(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?';
  6137. re.src_host_terminator =
  6138. '(?=$|' + text_separators + '|' + re.src_ZPCc + ')(?!-|_|:\\d|\\.-|\\.(?!$|' + re.src_ZPCc + '))';
  6139. re.src_path =
  6140. '(?:' +
  6141. '[/?#]' +
  6142. '(?:' +
  6143. '(?!' + re.src_ZCc + '|' + text_separators + '|[()[\\]{}.,"\'?!\\-]).|' +
  6144. '\\[(?:(?!' + re.src_ZCc + '|\\]).)*\\]|' +
  6145. '\\((?:(?!' + re.src_ZCc + '|[)]).)*\\)|' +
  6146. '\\{(?:(?!' + re.src_ZCc + '|[}]).)*\\}|' +
  6147. '\\"(?:(?!' + re.src_ZCc + '|["]).)+\\"|' +
  6148. "\\'(?:(?!" + re.src_ZCc + "|[']).)+\\'|" +
  6149. "\\'(?=" + re.src_pseudo_letter + '|[-]).|' + // allow `I'm_king` if no pair found
  6150. '\\.{2,3}[a-zA-Z0-9%/]|' + // github has ... in commit range links. Restrict to
  6151. // - english
  6152. // - percent-encoded
  6153. // - parts of file path
  6154. // until more examples found.
  6155. '\\.(?!' + re.src_ZCc + '|[.]).|' +
  6156. (opts && opts['---'] ?
  6157. '\\-(?!--(?:[^-]|$))(?:-*)|' // `---` => long dash, terminate
  6158. :
  6159. '\\-+|'
  6160. ) +
  6161. '\\,(?!' + re.src_ZCc + ').|' + // allow `,,,` in paths
  6162. '\\!(?!' + re.src_ZCc + '|[!]).|' +
  6163. '\\?(?!' + re.src_ZCc + '|[?]).' +
  6164. ')+' +
  6165. '|\\/' +
  6166. ')?';
  6167. re.src_email_name =
  6168. '[\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]+';
  6169. re.src_xn =
  6170. 'xn--[a-z0-9\\-]{1,59}';
  6171. // More to read about domain names
  6172. // http://serverfault.com/questions/638260/
  6173. re.src_domain_root =
  6174. // Allow letters & digits (http://test1)
  6175. '(?:' +
  6176. re.src_xn +
  6177. '|' +
  6178. re.src_pseudo_letter + '{1,63}' +
  6179. ')';
  6180. re.src_domain =
  6181. '(?:' +
  6182. re.src_xn +
  6183. '|' +
  6184. '(?:' + re.src_pseudo_letter + ')' +
  6185. '|' +
  6186. // don't allow `--` in domain names, because:
  6187. // - that can conflict with markdown &mdash; / &ndash;
  6188. // - nobody use those anyway
  6189. '(?:' + re.src_pseudo_letter + '(?:-(?!-)|' + re.src_pseudo_letter + '){0,61}' + re.src_pseudo_letter + ')' +
  6190. ')';
  6191. re.src_host =
  6192. '(?:' +
  6193. // Don't need IP check, because digits are already allowed in normal domain names
  6194. // src_ip4 +
  6195. // '|' +
  6196. '(?:(?:(?:' + re.src_domain + ')\\.)*' + re.src_domain/*_root*/ + ')' +
  6197. ')';
  6198. re.tpl_host_fuzzy =
  6199. '(?:' +
  6200. re.src_ip4 +
  6201. '|' +
  6202. '(?:(?:(?:' + re.src_domain + ')\\.)+(?:%TLDS%))' +
  6203. ')';
  6204. re.tpl_host_no_ip_fuzzy =
  6205. '(?:(?:(?:' + re.src_domain + ')\\.)+(?:%TLDS%))';
  6206. re.src_host_strict =
  6207. re.src_host + re.src_host_terminator;
  6208. re.tpl_host_fuzzy_strict =
  6209. re.tpl_host_fuzzy + re.src_host_terminator;
  6210. re.src_host_port_strict =
  6211. re.src_host + re.src_port + re.src_host_terminator;
  6212. re.tpl_host_port_fuzzy_strict =
  6213. re.tpl_host_fuzzy + re.src_port + re.src_host_terminator;
  6214. re.tpl_host_port_no_ip_fuzzy_strict =
  6215. re.tpl_host_no_ip_fuzzy + re.src_port + re.src_host_terminator;
  6216. ////////////////////////////////////////////////////////////////////////////////
  6217. // Main rules
  6218. // Rude test fuzzy links by host, for quick deny
  6219. re.tpl_host_fuzzy_test =
  6220. 'localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:' + re.src_ZPCc + '|>|$))';
  6221. re.tpl_email_fuzzy =
  6222. '(^|' + text_separators + '|\\(|' + re.src_ZCc + ')(' + re.src_email_name + '@' + re.tpl_host_fuzzy_strict + ')';
  6223. re.tpl_link_fuzzy =
  6224. // Fuzzy link can't be prepended with .:/\- and non punctuation.
  6225. // but can start with > (markdown blockquote)
  6226. '(^|(?![.:/\\-_@])(?:[$+<=>^`|\uff5c]|' + re.src_ZPCc + '))' +
  6227. '((?![$+<=>^`|\uff5c])' + re.tpl_host_port_fuzzy_strict + re.src_path + ')';
  6228. re.tpl_link_no_ip_fuzzy =
  6229. // Fuzzy link can't be prepended with .:/\- and non punctuation.
  6230. // but can start with > (markdown blockquote)
  6231. '(^|(?![.:/\\-_@])(?:[$+<=>^`|\uff5c]|' + re.src_ZPCc + '))' +
  6232. '((?![$+<=>^`|\uff5c])' + re.tpl_host_port_no_ip_fuzzy_strict + re.src_path + ')';
  6233. return re;
  6234. };
  6235. /***/ }),
  6236. /* 30 */
  6237. /***/ (function(module, exports, __webpack_require__) {
  6238. "use strict";
  6239. // List of valid html blocks names, accorting to commonmark spec
  6240. // http://jgm.github.io/CommonMark/spec.html#html-blocks
  6241. module.exports = [
  6242. 'address',
  6243. 'article',
  6244. 'aside',
  6245. 'base',
  6246. 'basefont',
  6247. 'blockquote',
  6248. 'body',
  6249. 'caption',
  6250. 'center',
  6251. 'col',
  6252. 'colgroup',
  6253. 'dd',
  6254. 'details',
  6255. 'dialog',
  6256. 'dir',
  6257. 'div',
  6258. 'dl',
  6259. 'dt',
  6260. 'fieldset',
  6261. 'figcaption',
  6262. 'figure',
  6263. 'footer',
  6264. 'form',
  6265. 'frame',
  6266. 'frameset',
  6267. 'h1',
  6268. 'h2',
  6269. 'h3',
  6270. 'h4',
  6271. 'h5',
  6272. 'h6',
  6273. 'head',
  6274. 'header',
  6275. 'hr',
  6276. 'html',
  6277. 'iframe',
  6278. 'legend',
  6279. 'li',
  6280. 'link',
  6281. 'main',
  6282. 'menu',
  6283. 'menuitem',
  6284. 'meta',
  6285. 'nav',
  6286. 'noframes',
  6287. 'ol',
  6288. 'optgroup',
  6289. 'option',
  6290. 'p',
  6291. 'param',
  6292. 'pre',
  6293. 'section',
  6294. 'source',
  6295. 'title',
  6296. 'summary',
  6297. 'table',
  6298. 'tbody',
  6299. 'td',
  6300. 'tfoot',
  6301. 'th',
  6302. 'thead',
  6303. 'title',
  6304. 'tr',
  6305. 'track',
  6306. 'ul'
  6307. ];
  6308. /***/ }),
  6309. /* 31 */
  6310. /***/ (function(module, exports, __webpack_require__) {
  6311. "use strict";
  6312. // Just a shortcut for bulk export
  6313. exports.parseLinkLabel = __webpack_require__(33);
  6314. exports.parseLinkDestination = __webpack_require__(32);
  6315. exports.parseLinkTitle = __webpack_require__(34);
  6316. /***/ }),
  6317. /* 32 */
  6318. /***/ (function(module, exports, __webpack_require__) {
  6319. "use strict";
  6320. // Parse link destination
  6321. //
  6322. var isSpace = __webpack_require__(0).isSpace;
  6323. var unescapeAll = __webpack_require__(0).unescapeAll;
  6324. module.exports = function parseLinkDestination(str, pos, max) {
  6325. var code, level,
  6326. lines = 0,
  6327. start = pos,
  6328. result = {
  6329. ok: false,
  6330. pos: 0,
  6331. lines: 0,
  6332. str: ''
  6333. };
  6334. if (str.charCodeAt(pos) === 0x3C /* < */) {
  6335. pos++;
  6336. while (pos < max) {
  6337. code = str.charCodeAt(pos);
  6338. if (code === 0x0A /* \n */ || isSpace(code)) { return result; }
  6339. if (code === 0x3E /* > */) {
  6340. result.pos = pos + 1;
  6341. result.str = unescapeAll(str.slice(start + 1, pos));
  6342. result.ok = true;
  6343. return result;
  6344. }
  6345. if (code === 0x5C /* \ */ && pos + 1 < max) {
  6346. pos += 2;
  6347. continue;
  6348. }
  6349. pos++;
  6350. }
  6351. // no closing '>'
  6352. return result;
  6353. }
  6354. // this should be ... } else { ... branch
  6355. level = 0;
  6356. while (pos < max) {
  6357. code = str.charCodeAt(pos);
  6358. if (code === 0x20) { break; }
  6359. // ascii control characters
  6360. if (code < 0x20 || code === 0x7F) { break; }
  6361. if (code === 0x5C /* \ */ && pos + 1 < max) {
  6362. pos += 2;
  6363. continue;
  6364. }
  6365. if (code === 0x28 /* ( */) {
  6366. level++;
  6367. if (level > 1) { break; }
  6368. }
  6369. if (code === 0x29 /* ) */) {
  6370. level--;
  6371. if (level < 0) { break; }
  6372. }
  6373. pos++;
  6374. }
  6375. if (start === pos) { return result; }
  6376. result.str = unescapeAll(str.slice(start, pos));
  6377. result.lines = lines;
  6378. result.pos = pos;
  6379. result.ok = true;
  6380. return result;
  6381. };
  6382. /***/ }),
  6383. /* 33 */
  6384. /***/ (function(module, exports, __webpack_require__) {
  6385. "use strict";
  6386. // Parse link label
  6387. //
  6388. // this function assumes that first character ("[") already matches;
  6389. // returns the end of the label
  6390. //
  6391. module.exports = function parseLinkLabel(state, start, disableNested) {
  6392. var level, found, marker, prevPos,
  6393. labelEnd = -1,
  6394. max = state.posMax,
  6395. oldPos = state.pos;
  6396. state.pos = start + 1;
  6397. level = 1;
  6398. while (state.pos < max) {
  6399. marker = state.src.charCodeAt(state.pos);
  6400. if (marker === 0x5D /* ] */) {
  6401. level--;
  6402. if (level === 0) {
  6403. found = true;
  6404. break;
  6405. }
  6406. }
  6407. prevPos = state.pos;
  6408. state.md.inline.skipToken(state);
  6409. if (marker === 0x5B /* [ */) {
  6410. if (prevPos === state.pos - 1) {
  6411. // increase level if we find text `[`, which is not a part of any token
  6412. level++;
  6413. } else if (disableNested) {
  6414. state.pos = oldPos;
  6415. return -1;
  6416. }
  6417. }
  6418. }
  6419. if (found) {
  6420. labelEnd = state.pos;
  6421. }
  6422. // restore old state
  6423. state.pos = oldPos;
  6424. return labelEnd;
  6425. };
  6426. /***/ }),
  6427. /* 34 */
  6428. /***/ (function(module, exports, __webpack_require__) {
  6429. "use strict";
  6430. // Parse link title
  6431. //
  6432. var unescapeAll = __webpack_require__(0).unescapeAll;
  6433. module.exports = function parseLinkTitle(str, pos, max) {
  6434. var code,
  6435. marker,
  6436. lines = 0,
  6437. start = pos,
  6438. result = {
  6439. ok: false,
  6440. pos: 0,
  6441. lines: 0,
  6442. str: ''
  6443. };
  6444. if (pos >= max) { return result; }
  6445. marker = str.charCodeAt(pos);
  6446. if (marker !== 0x22 /* " */ && marker !== 0x27 /* ' */ && marker !== 0x28 /* ( */) { return result; }
  6447. pos++;
  6448. // if opening marker is "(", switch it to closing marker ")"
  6449. if (marker === 0x28) { marker = 0x29; }
  6450. while (pos < max) {
  6451. code = str.charCodeAt(pos);
  6452. if (code === marker) {
  6453. result.pos = pos + 1;
  6454. result.lines = lines;
  6455. result.str = unescapeAll(str.slice(start + 1, pos));
  6456. result.ok = true;
  6457. return result;
  6458. } else if (code === 0x0A) {
  6459. lines++;
  6460. } else if (code === 0x5C /* \ */ && pos + 1 < max) {
  6461. pos++;
  6462. if (str.charCodeAt(pos) === 0x0A) {
  6463. lines++;
  6464. }
  6465. }
  6466. pos++;
  6467. }
  6468. return result;
  6469. };
  6470. /***/ }),
  6471. /* 35 */
  6472. /***/ (function(module, exports, __webpack_require__) {
  6473. "use strict";
  6474. // Main parser class
  6475. var utils = __webpack_require__(0);
  6476. var helpers = __webpack_require__(31);
  6477. var Renderer = __webpack_require__(42);
  6478. var ParserCore = __webpack_require__(37);
  6479. var ParserBlock = __webpack_require__(36);
  6480. var ParserInline = __webpack_require__(38);
  6481. var LinkifyIt = __webpack_require__(28);
  6482. var mdurl = __webpack_require__(15);
  6483. var punycode = __webpack_require__(79);
  6484. var config = {
  6485. 'default': __webpack_require__(40),
  6486. zero: __webpack_require__(41),
  6487. commonmark: __webpack_require__(39)
  6488. };
  6489. ////////////////////////////////////////////////////////////////////////////////
  6490. //
  6491. // This validator can prohibit more than really needed to prevent XSS. It's a
  6492. // tradeoff to keep code simple and to be secure by default.
  6493. //
  6494. // If you need different setup - override validator method as you wish. Or
  6495. // replace it with dummy function and use external sanitizer.
  6496. //
  6497. var BAD_PROTO_RE = /^(vbscript|javascript|file|data):/;
  6498. var GOOD_DATA_RE = /^data:image\/(gif|png|jpeg|webp);/;
  6499. function validateLink(url) {
  6500. // url should be normalized at this point, and existing entities are decoded
  6501. var str = url.trim().toLowerCase();
  6502. return BAD_PROTO_RE.test(str) ? (GOOD_DATA_RE.test(str) ? true : false) : true;
  6503. }
  6504. ////////////////////////////////////////////////////////////////////////////////
  6505. var RECODE_HOSTNAME_FOR = [ 'http:', 'https:', 'mailto:' ];
  6506. function normalizeLink(url) {
  6507. var parsed = mdurl.parse(url, true);
  6508. if (parsed.hostname) {
  6509. // Encode hostnames in urls like:
  6510. // `http://host/`, `https://host/`, `mailto:user@host`, `//host/`
  6511. //
  6512. // We don't encode unknown schemas, because it's likely that we encode
  6513. // something we shouldn't (e.g. `skype:name` treated as `skype:host`)
  6514. //
  6515. if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) {
  6516. try {
  6517. parsed.hostname = punycode.toASCII(parsed.hostname);
  6518. } catch (er) { /**/ }
  6519. }
  6520. }
  6521. return mdurl.encode(mdurl.format(parsed));
  6522. }
  6523. function normalizeLinkText(url) {
  6524. var parsed = mdurl.parse(url, true);
  6525. if (parsed.hostname) {
  6526. // Encode hostnames in urls like:
  6527. // `http://host/`, `https://host/`, `mailto:user@host`, `//host/`
  6528. //
  6529. // We don't encode unknown schemas, because it's likely that we encode
  6530. // something we shouldn't (e.g. `skype:name` treated as `skype:host`)
  6531. //
  6532. if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) {
  6533. try {
  6534. parsed.hostname = punycode.toUnicode(parsed.hostname);
  6535. } catch (er) { /**/ }
  6536. }
  6537. }
  6538. return mdurl.decode(mdurl.format(parsed));
  6539. }
  6540. /**
  6541. * class MarkdownIt
  6542. *
  6543. * Main parser/renderer class.
  6544. *
  6545. * ##### Usage
  6546. *
  6547. * ```javascript
  6548. * // node.js, "classic" way:
  6549. * var MarkdownIt = require('markdown-it'),
  6550. * md = new MarkdownIt();
  6551. * var result = md.render('# markdown-it rulezz!');
  6552. *
  6553. * // node.js, the same, but with sugar:
  6554. * var md = require('markdown-it')();
  6555. * var result = md.render('# markdown-it rulezz!');
  6556. *
  6557. * // browser without AMD, added to "window" on script load
  6558. * // Note, there are no dash.
  6559. * var md = window.markdownit();
  6560. * var result = md.render('# markdown-it rulezz!');
  6561. * ```
  6562. *
  6563. * Single line rendering, without paragraph wrap:
  6564. *
  6565. * ```javascript
  6566. * var md = require('markdown-it')();
  6567. * var result = md.renderInline('__markdown-it__ rulezz!');
  6568. * ```
  6569. **/
  6570. /**
  6571. * new MarkdownIt([presetName, options])
  6572. * - presetName (String): optional, `commonmark` / `zero`
  6573. * - options (Object)
  6574. *
  6575. * Creates parser instanse with given config. Can be called without `new`.
  6576. *
  6577. * ##### presetName
  6578. *
  6579. * MarkdownIt provides named presets as a convenience to quickly
  6580. * enable/disable active syntax rules and options for common use cases.
  6581. *
  6582. * - ["commonmark"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/commonmark.js) -
  6583. * configures parser to strict [CommonMark](http://commonmark.org/) mode.
  6584. * - [default](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/default.js) -
  6585. * similar to GFM, used when no preset name given. Enables all available rules,
  6586. * but still without html, typographer & autolinker.
  6587. * - ["zero"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/zero.js) -
  6588. * all rules disabled. Useful to quickly setup your config via `.enable()`.
  6589. * For example, when you need only `bold` and `italic` markup and nothing else.
  6590. *
  6591. * ##### options:
  6592. *
  6593. * - __html__ - `false`. Set `true` to enable HTML tags in source. Be careful!
  6594. * That's not safe! You may need external sanitizer to protect output from XSS.
  6595. * It's better to extend features via plugins, instead of enabling HTML.
  6596. * - __xhtmlOut__ - `false`. Set `true` to add '/' when closing single tags
  6597. * (`<br />`). This is needed only for full CommonMark compatibility. In real
  6598. * world you will need HTML output.
  6599. * - __breaks__ - `false`. Set `true` to convert `\n` in paragraphs into `<br>`.
  6600. * - __langPrefix__ - `language-`. CSS language class prefix for fenced blocks.
  6601. * Can be useful for external highlighters.
  6602. * - __linkify__ - `false`. Set `true` to autoconvert URL-like text to links.
  6603. * - __typographer__ - `false`. Set `true` to enable [some language-neutral
  6604. * replacement](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/replacements.js) +
  6605. * quotes beautification (smartquotes).
  6606. * - __quotes__ - `“”‘’`, String or Array. Double + single quotes replacement
  6607. * pairs, when typographer enabled and smartquotes on. For example, you can
  6608. * use `'«»„“'` for Russian, `'„“‚‘'` for German, and
  6609. * `['«\xA0', '\xA0»', '‹\xA0', '\xA0›']` for French (including nbsp).
  6610. * - __highlight__ - `null`. Highlighter function for fenced code blocks.
  6611. * Highlighter `function (str, lang)` should return escaped HTML. It can also
  6612. * return empty string if the source was not changed and should be escaped
  6613. * externaly. If result starts with <pre... internal wrapper is skipped.
  6614. *
  6615. * ##### Example
  6616. *
  6617. * ```javascript
  6618. * // commonmark mode
  6619. * var md = require('markdown-it')('commonmark');
  6620. *
  6621. * // default mode
  6622. * var md = require('markdown-it')();
  6623. *
  6624. * // enable everything
  6625. * var md = require('markdown-it')({
  6626. * html: true,
  6627. * linkify: true,
  6628. * typographer: true
  6629. * });
  6630. * ```
  6631. *
  6632. * ##### Syntax highlighting
  6633. *
  6634. * ```js
  6635. * var hljs = require('highlight.js') // https://highlightjs.org/
  6636. *
  6637. * var md = require('markdown-it')({
  6638. * highlight: function (str, lang) {
  6639. * if (lang && hljs.getLanguage(lang)) {
  6640. * try {
  6641. * return hljs.highlight(lang, str, true).value;
  6642. * } catch (__) {}
  6643. * }
  6644. *
  6645. * return ''; // use external default escaping
  6646. * }
  6647. * });
  6648. * ```
  6649. *
  6650. * Or with full wrapper override (if you need assign class to `<pre>`):
  6651. *
  6652. * ```javascript
  6653. * var hljs = require('highlight.js') // https://highlightjs.org/
  6654. *
  6655. * // Actual default values
  6656. * var md = require('markdown-it')({
  6657. * highlight: function (str, lang) {
  6658. * if (lang && hljs.getLanguage(lang)) {
  6659. * try {
  6660. * return '<pre class="hljs"><code>' +
  6661. * hljs.highlight(lang, str, true).value +
  6662. * '</code></pre>';
  6663. * } catch (__) {}
  6664. * }
  6665. *
  6666. * return '<pre class="hljs"><code>' + md.utils.escapeHtml(str) + '</code></pre>';
  6667. * }
  6668. * });
  6669. * ```
  6670. *
  6671. **/
  6672. function MarkdownIt(presetName, options) {
  6673. if (!(this instanceof MarkdownIt)) {
  6674. return new MarkdownIt(presetName, options);
  6675. }
  6676. if (!options) {
  6677. if (!utils.isString(presetName)) {
  6678. options = presetName || {};
  6679. presetName = 'default';
  6680. }
  6681. }
  6682. /**
  6683. * MarkdownIt#inline -> ParserInline
  6684. *
  6685. * Instance of [[ParserInline]]. You may need it to add new rules when
  6686. * writing plugins. For simple rules control use [[MarkdownIt.disable]] and
  6687. * [[MarkdownIt.enable]].
  6688. **/
  6689. this.inline = new ParserInline();
  6690. /**
  6691. * MarkdownIt#block -> ParserBlock
  6692. *
  6693. * Instance of [[ParserBlock]]. You may need it to add new rules when
  6694. * writing plugins. For simple rules control use [[MarkdownIt.disable]] and
  6695. * [[MarkdownIt.enable]].
  6696. **/
  6697. this.block = new ParserBlock();
  6698. /**
  6699. * MarkdownIt#core -> Core
  6700. *
  6701. * Instance of [[Core]] chain executor. You may need it to add new rules when
  6702. * writing plugins. For simple rules control use [[MarkdownIt.disable]] and
  6703. * [[MarkdownIt.enable]].
  6704. **/
  6705. this.core = new ParserCore();
  6706. /**
  6707. * MarkdownIt#renderer -> Renderer
  6708. *
  6709. * Instance of [[Renderer]]. Use it to modify output look. Or to add rendering
  6710. * rules for new token types, generated by plugins.
  6711. *
  6712. * ##### Example
  6713. *
  6714. * ```javascript
  6715. * var md = require('markdown-it')();
  6716. *
  6717. * function myToken(tokens, idx, options, env, self) {
  6718. * //...
  6719. * return result;
  6720. * };
  6721. *
  6722. * md.renderer.rules['my_token'] = myToken
  6723. * ```
  6724. *
  6725. * See [[Renderer]] docs and [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.js).
  6726. **/
  6727. this.renderer = new Renderer();
  6728. /**
  6729. * MarkdownIt#linkify -> LinkifyIt
  6730. *
  6731. * [linkify-it](https://github.com/markdown-it/linkify-it) instance.
  6732. * Used by [linkify](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/linkify.js)
  6733. * rule.
  6734. **/
  6735. this.linkify = new LinkifyIt();
  6736. /**
  6737. * MarkdownIt#validateLink(url) -> Boolean
  6738. *
  6739. * Link validation function. CommonMark allows too much in links. By default
  6740. * we disable `javascript:`, `vbscript:`, `file:` schemas, and almost all `data:...` schemas
  6741. * except some embedded image types.
  6742. *
  6743. * You can change this behaviour:
  6744. *
  6745. * ```javascript
  6746. * var md = require('markdown-it')();
  6747. * // enable everything
  6748. * md.validateLink = function () { return true; }
  6749. * ```
  6750. **/
  6751. this.validateLink = validateLink;
  6752. /**
  6753. * MarkdownIt#normalizeLink(url) -> String
  6754. *
  6755. * Function used to encode link url to a machine-readable format,
  6756. * which includes url-encoding, punycode, etc.
  6757. **/
  6758. this.normalizeLink = normalizeLink;
  6759. /**
  6760. * MarkdownIt#normalizeLinkText(url) -> String
  6761. *
  6762. * Function used to decode link url to a human-readable format`
  6763. **/
  6764. this.normalizeLinkText = normalizeLinkText;
  6765. // Expose utils & helpers for easy acces from plugins
  6766. /**
  6767. * MarkdownIt#utils -> utils
  6768. *
  6769. * Assorted utility functions, useful to write plugins. See details
  6770. * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/common/utils.js).
  6771. **/
  6772. this.utils = utils;
  6773. /**
  6774. * MarkdownIt#helpers -> helpers
  6775. *
  6776. * Link components parser functions, useful to write plugins. See details
  6777. * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/helpers).
  6778. **/
  6779. this.helpers = utils.assign({}, helpers);
  6780. this.options = {};
  6781. this.configure(presetName);
  6782. if (options) { this.set(options); }
  6783. }
  6784. /** chainable
  6785. * MarkdownIt.set(options)
  6786. *
  6787. * Set parser options (in the same format as in constructor). Probably, you
  6788. * will never need it, but you can change options after constructor call.
  6789. *
  6790. * ##### Example
  6791. *
  6792. * ```javascript
  6793. * var md = require('markdown-it')()
  6794. * .set({ html: true, breaks: true })
  6795. * .set({ typographer, true });
  6796. * ```
  6797. *
  6798. * __Note:__ To achieve the best possible performance, don't modify a
  6799. * `markdown-it` instance options on the fly. If you need multiple configurations
  6800. * it's best to create multiple instances and initialize each with separate
  6801. * config.
  6802. **/
  6803. MarkdownIt.prototype.set = function (options) {
  6804. utils.assign(this.options, options);
  6805. return this;
  6806. };
  6807. /** chainable, internal
  6808. * MarkdownIt.configure(presets)
  6809. *
  6810. * Batch load of all options and compenent settings. This is internal method,
  6811. * and you probably will not need it. But if you with - see available presets
  6812. * and data structure [here](https://github.com/markdown-it/markdown-it/tree/master/lib/presets)
  6813. *
  6814. * We strongly recommend to use presets instead of direct config loads. That
  6815. * will give better compatibility with next versions.
  6816. **/
  6817. MarkdownIt.prototype.configure = function (presets) {
  6818. var self = this, presetName;
  6819. if (utils.isString(presets)) {
  6820. presetName = presets;
  6821. presets = config[presetName];
  6822. if (!presets) { throw new Error('Wrong `markdown-it` preset "' + presetName + '", check name'); }
  6823. }
  6824. if (!presets) { throw new Error('Wrong `markdown-it` preset, can\'t be empty'); }
  6825. if (presets.options) { self.set(presets.options); }
  6826. if (presets.components) {
  6827. Object.keys(presets.components).forEach(function (name) {
  6828. if (presets.components[name].rules) {
  6829. self[name].ruler.enableOnly(presets.components[name].rules);
  6830. }
  6831. if (presets.components[name].rules2) {
  6832. self[name].ruler2.enableOnly(presets.components[name].rules2);
  6833. }
  6834. });
  6835. }
  6836. return this;
  6837. };
  6838. /** chainable
  6839. * MarkdownIt.enable(list, ignoreInvalid)
  6840. * - list (String|Array): rule name or list of rule names to enable
  6841. * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
  6842. *
  6843. * Enable list or rules. It will automatically find appropriate components,
  6844. * containing rules with given names. If rule not found, and `ignoreInvalid`
  6845. * not set - throws exception.
  6846. *
  6847. * ##### Example
  6848. *
  6849. * ```javascript
  6850. * var md = require('markdown-it')()
  6851. * .enable(['sub', 'sup'])
  6852. * .disable('smartquotes');
  6853. * ```
  6854. **/
  6855. MarkdownIt.prototype.enable = function (list, ignoreInvalid) {
  6856. var result = [];
  6857. if (!Array.isArray(list)) { list = [ list ]; }
  6858. [ 'core', 'block', 'inline' ].forEach(function (chain) {
  6859. result = result.concat(this[chain].ruler.enable(list, true));
  6860. }, this);
  6861. result = result.concat(this.inline.ruler2.enable(list, true));
  6862. var missed = list.filter(function (name) { return result.indexOf(name) < 0; });
  6863. if (missed.length && !ignoreInvalid) {
  6864. throw new Error('MarkdownIt. Failed to enable unknown rule(s): ' + missed);
  6865. }
  6866. return this;
  6867. };
  6868. /** chainable
  6869. * MarkdownIt.disable(list, ignoreInvalid)
  6870. * - list (String|Array): rule name or list of rule names to disable.
  6871. * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
  6872. *
  6873. * The same as [[MarkdownIt.enable]], but turn specified rules off.
  6874. **/
  6875. MarkdownIt.prototype.disable = function (list, ignoreInvalid) {
  6876. var result = [];
  6877. if (!Array.isArray(list)) { list = [ list ]; }
  6878. [ 'core', 'block', 'inline' ].forEach(function (chain) {
  6879. result = result.concat(this[chain].ruler.disable(list, true));
  6880. }, this);
  6881. result = result.concat(this.inline.ruler2.disable(list, true));
  6882. var missed = list.filter(function (name) { return result.indexOf(name) < 0; });
  6883. if (missed.length && !ignoreInvalid) {
  6884. throw new Error('MarkdownIt. Failed to disable unknown rule(s): ' + missed);
  6885. }
  6886. return this;
  6887. };
  6888. /** chainable
  6889. * MarkdownIt.use(plugin, params)
  6890. *
  6891. * Load specified plugin with given params into current parser instance.
  6892. * It's just a sugar to call `plugin(md, params)` with curring.
  6893. *
  6894. * ##### Example
  6895. *
  6896. * ```javascript
  6897. * var iterator = require('markdown-it-for-inline');
  6898. * var md = require('markdown-it')()
  6899. * .use(iterator, 'foo_replace', 'text', function (tokens, idx) {
  6900. * tokens[idx].content = tokens[idx].content.replace(/foo/g, 'bar');
  6901. * });
  6902. * ```
  6903. **/
  6904. MarkdownIt.prototype.use = function (plugin /*, params, ... */) {
  6905. var args = [ this ].concat(Array.prototype.slice.call(arguments, 1));
  6906. plugin.apply(plugin, args);
  6907. return this;
  6908. };
  6909. /** internal
  6910. * MarkdownIt.parse(src, env) -> Array
  6911. * - src (String): source string
  6912. * - env (Object): environment sandbox
  6913. *
  6914. * Parse input string and returns list of block tokens (special token type
  6915. * "inline" will contain list of inline tokens). You should not call this
  6916. * method directly, until you write custom renderer (for example, to produce
  6917. * AST).
  6918. *
  6919. * `env` is used to pass data between "distributed" rules and return additional
  6920. * metadata like reference info, needed for the renderer. It also can be used to
  6921. * inject data in specific cases. Usually, you will be ok to pass `{}`,
  6922. * and then pass updated object to renderer.
  6923. **/
  6924. MarkdownIt.prototype.parse = function (src, env) {
  6925. if (typeof src !== 'string') {
  6926. throw new Error('Input data should be a String');
  6927. }
  6928. var state = new this.core.State(src, this, env);
  6929. this.core.process(state);
  6930. return state.tokens;
  6931. };
  6932. /**
  6933. * MarkdownIt.render(src [, env]) -> String
  6934. * - src (String): source string
  6935. * - env (Object): environment sandbox
  6936. *
  6937. * Render markdown string into html. It does all magic for you :).
  6938. *
  6939. * `env` can be used to inject additional metadata (`{}` by default).
  6940. * But you will not need it with high probability. See also comment
  6941. * in [[MarkdownIt.parse]].
  6942. **/
  6943. MarkdownIt.prototype.render = function (src, env) {
  6944. env = env || {};
  6945. return this.renderer.render(this.parse(src, env), this.options, env);
  6946. };
  6947. /** internal
  6948. * MarkdownIt.parseInline(src, env) -> Array
  6949. * - src (String): source string
  6950. * - env (Object): environment sandbox
  6951. *
  6952. * The same as [[MarkdownIt.parse]] but skip all block rules. It returns the
  6953. * block tokens list with the single `inline` element, containing parsed inline
  6954. * tokens in `children` property. Also updates `env` object.
  6955. **/
  6956. MarkdownIt.prototype.parseInline = function (src, env) {
  6957. var state = new this.core.State(src, this, env);
  6958. state.inlineMode = true;
  6959. this.core.process(state);
  6960. return state.tokens;
  6961. };
  6962. /**
  6963. * MarkdownIt.renderInline(src [, env]) -> String
  6964. * - src (String): source string
  6965. * - env (Object): environment sandbox
  6966. *
  6967. * Similar to [[MarkdownIt.render]] but for single paragraph content. Result
  6968. * will NOT be wrapped into `<p>` tags.
  6969. **/
  6970. MarkdownIt.prototype.renderInline = function (src, env) {
  6971. env = env || {};
  6972. return this.renderer.render(this.parseInline(src, env), this.options, env);
  6973. };
  6974. module.exports = MarkdownIt;
  6975. /***/ }),
  6976. /* 36 */
  6977. /***/ (function(module, exports, __webpack_require__) {
  6978. "use strict";
  6979. /** internal
  6980. * class ParserBlock
  6981. *
  6982. * Block-level tokenizer.
  6983. **/
  6984. var Ruler = __webpack_require__(3);
  6985. var _rules = [
  6986. // First 2 params - rule name & source. Secondary array - list of rules,
  6987. // which can be terminated by this one.
  6988. [ 'table', __webpack_require__(54), [ 'paragraph', 'reference' ] ],
  6989. [ 'code', __webpack_require__(44) ],
  6990. [ 'fence', __webpack_require__(45), [ 'paragraph', 'reference', 'blockquote', 'list' ] ],
  6991. [ 'blockquote', __webpack_require__(43), [ 'paragraph', 'reference', 'list' ] ],
  6992. [ 'hr', __webpack_require__(47), [ 'paragraph', 'reference', 'blockquote', 'list' ] ],
  6993. [ 'list', __webpack_require__(50), [ 'paragraph', 'reference', 'blockquote' ] ],
  6994. [ 'reference', __webpack_require__(52) ],
  6995. [ 'heading', __webpack_require__(46), [ 'paragraph', 'reference', 'blockquote' ] ],
  6996. [ 'lheading', __webpack_require__(49) ],
  6997. [ 'html_block', __webpack_require__(48), [ 'paragraph', 'reference', 'blockquote' ] ],
  6998. [ 'paragraph', __webpack_require__(51) ]
  6999. ];
  7000. /**
  7001. * new ParserBlock()
  7002. **/
  7003. function ParserBlock() {
  7004. /**
  7005. * ParserBlock#ruler -> Ruler
  7006. *
  7007. * [[Ruler]] instance. Keep configuration of block rules.
  7008. **/
  7009. this.ruler = new Ruler();
  7010. for (var i = 0; i < _rules.length; i++) {
  7011. this.ruler.push(_rules[i][0], _rules[i][1], { alt: (_rules[i][2] || []).slice() });
  7012. }
  7013. }
  7014. // Generate tokens for input range
  7015. //
  7016. ParserBlock.prototype.tokenize = function (state, startLine, endLine) {
  7017. var ok, i,
  7018. rules = this.ruler.getRules(''),
  7019. len = rules.length,
  7020. line = startLine,
  7021. hasEmptyLines = false,
  7022. maxNesting = state.md.options.maxNesting;
  7023. while (line < endLine) {
  7024. state.line = line = state.skipEmptyLines(line);
  7025. if (line >= endLine) { break; }
  7026. // Termination condition for nested calls.
  7027. // Nested calls currently used for blockquotes & lists
  7028. if (state.sCount[line] < state.blkIndent) { break; }
  7029. // If nesting level exceeded - skip tail to the end. That's not ordinary
  7030. // situation and we should not care about content.
  7031. if (state.level >= maxNesting) {
  7032. state.line = endLine;
  7033. break;
  7034. }
  7035. // Try all possible rules.
  7036. // On success, rule should:
  7037. //
  7038. // - update `state.line`
  7039. // - update `state.tokens`
  7040. // - return true
  7041. for (i = 0; i < len; i++) {
  7042. ok = rules[i](state, line, endLine, false);
  7043. if (ok) { break; }
  7044. }
  7045. // set state.tight iff we had an empty line before current tag
  7046. // i.e. latest empty line should not count
  7047. state.tight = !hasEmptyLines;
  7048. // paragraph might "eat" one newline after it in nested lists
  7049. if (state.isEmpty(state.line - 1)) {
  7050. hasEmptyLines = true;
  7051. }
  7052. line = state.line;
  7053. if (line < endLine && state.isEmpty(line)) {
  7054. hasEmptyLines = true;
  7055. line++;
  7056. state.line = line;
  7057. }
  7058. }
  7059. };
  7060. /**
  7061. * ParserBlock.parse(str, md, env, outTokens)
  7062. *
  7063. * Process input string and push block tokens into `outTokens`
  7064. **/
  7065. ParserBlock.prototype.parse = function (src, md, env, outTokens) {
  7066. var state;
  7067. if (!src) { return; }
  7068. state = new this.State(src, md, env, outTokens);
  7069. this.tokenize(state, state.line, state.lineMax);
  7070. };
  7071. ParserBlock.prototype.State = __webpack_require__(53);
  7072. module.exports = ParserBlock;
  7073. /***/ }),
  7074. /* 37 */
  7075. /***/ (function(module, exports, __webpack_require__) {
  7076. "use strict";
  7077. /** internal
  7078. * class Core
  7079. *
  7080. * Top-level rules executor. Glues block/inline parsers and does intermediate
  7081. * transformations.
  7082. **/
  7083. var Ruler = __webpack_require__(3);
  7084. var _rules = [
  7085. [ 'normalize', __webpack_require__(58) ],
  7086. [ 'block', __webpack_require__(55) ],
  7087. [ 'inline', __webpack_require__(56) ],
  7088. [ 'linkify', __webpack_require__(57) ],
  7089. [ 'replacements', __webpack_require__(59) ],
  7090. [ 'smartquotes', __webpack_require__(60) ]
  7091. ];
  7092. /**
  7093. * new Core()
  7094. **/
  7095. function Core() {
  7096. /**
  7097. * Core#ruler -> Ruler
  7098. *
  7099. * [[Ruler]] instance. Keep configuration of core rules.
  7100. **/
  7101. this.ruler = new Ruler();
  7102. for (var i = 0; i < _rules.length; i++) {
  7103. this.ruler.push(_rules[i][0], _rules[i][1]);
  7104. }
  7105. }
  7106. /**
  7107. * Core.process(state)
  7108. *
  7109. * Executes core chain rules.
  7110. **/
  7111. Core.prototype.process = function (state) {
  7112. var i, l, rules;
  7113. rules = this.ruler.getRules('');
  7114. for (i = 0, l = rules.length; i < l; i++) {
  7115. rules[i](state);
  7116. }
  7117. };
  7118. Core.prototype.State = __webpack_require__(61);
  7119. module.exports = Core;
  7120. /***/ }),
  7121. /* 38 */
  7122. /***/ (function(module, exports, __webpack_require__) {
  7123. "use strict";
  7124. /** internal
  7125. * class ParserInline
  7126. *
  7127. * Tokenizes paragraph content.
  7128. **/
  7129. var Ruler = __webpack_require__(3);
  7130. ////////////////////////////////////////////////////////////////////////////////
  7131. // Parser rules
  7132. var _rules = [
  7133. [ 'text', __webpack_require__(72) ],
  7134. [ 'newline', __webpack_require__(70) ],
  7135. [ 'escape', __webpack_require__(66) ],
  7136. [ 'backticks', __webpack_require__(63) ],
  7137. [ 'strikethrough', __webpack_require__(14).tokenize ],
  7138. [ 'emphasis', __webpack_require__(13).tokenize ],
  7139. [ 'link', __webpack_require__(69) ],
  7140. [ 'image', __webpack_require__(68) ],
  7141. [ 'autolink', __webpack_require__(62) ],
  7142. [ 'html_inline', __webpack_require__(67) ],
  7143. [ 'entity', __webpack_require__(65) ]
  7144. ];
  7145. var _rules2 = [
  7146. [ 'balance_pairs', __webpack_require__(64) ],
  7147. [ 'strikethrough', __webpack_require__(14).postProcess ],
  7148. [ 'emphasis', __webpack_require__(13).postProcess ],
  7149. [ 'text_collapse', __webpack_require__(73) ]
  7150. ];
  7151. /**
  7152. * new ParserInline()
  7153. **/
  7154. function ParserInline() {
  7155. var i;
  7156. /**
  7157. * ParserInline#ruler -> Ruler
  7158. *
  7159. * [[Ruler]] instance. Keep configuration of inline rules.
  7160. **/
  7161. this.ruler = new Ruler();
  7162. for (i = 0; i < _rules.length; i++) {
  7163. this.ruler.push(_rules[i][0], _rules[i][1]);
  7164. }
  7165. /**
  7166. * ParserInline#ruler2 -> Ruler
  7167. *
  7168. * [[Ruler]] instance. Second ruler used for post-processing
  7169. * (e.g. in emphasis-like rules).
  7170. **/
  7171. this.ruler2 = new Ruler();
  7172. for (i = 0; i < _rules2.length; i++) {
  7173. this.ruler2.push(_rules2[i][0], _rules2[i][1]);
  7174. }
  7175. }
  7176. // Skip single token by running all rules in validation mode;
  7177. // returns `true` if any rule reported success
  7178. //
  7179. ParserInline.prototype.skipToken = function (state) {
  7180. var ok, i, pos = state.pos,
  7181. rules = this.ruler.getRules(''),
  7182. len = rules.length,
  7183. maxNesting = state.md.options.maxNesting,
  7184. cache = state.cache;
  7185. if (typeof cache[pos] !== 'undefined') {
  7186. state.pos = cache[pos];
  7187. return;
  7188. }
  7189. if (state.level < maxNesting) {
  7190. for (i = 0; i < len; i++) {
  7191. // Increment state.level and decrement it later to limit recursion.
  7192. // It's harmless to do here, because no tokens are created. But ideally,
  7193. // we'd need a separate private state variable for this purpose.
  7194. //
  7195. state.level++;
  7196. ok = rules[i](state, true);
  7197. state.level--;
  7198. if (ok) { break; }
  7199. }
  7200. } else {
  7201. // Too much nesting, just skip until the end of the paragraph.
  7202. //
  7203. // NOTE: this will cause links to behave incorrectly in the following case,
  7204. // when an amount of `[` is exactly equal to `maxNesting + 1`:
  7205. //
  7206. // [[[[[[[[[[[[[[[[[[[[[foo]()
  7207. //
  7208. // TODO: remove this workaround when CM standard will allow nested links
  7209. // (we can replace it by preventing links from being parsed in
  7210. // validation mode)
  7211. //
  7212. state.pos = state.posMax;
  7213. }
  7214. if (!ok) { state.pos++; }
  7215. cache[pos] = state.pos;
  7216. };
  7217. // Generate tokens for input range
  7218. //
  7219. ParserInline.prototype.tokenize = function (state) {
  7220. var ok, i,
  7221. rules = this.ruler.getRules(''),
  7222. len = rules.length,
  7223. end = state.posMax,
  7224. maxNesting = state.md.options.maxNesting;
  7225. while (state.pos < end) {
  7226. // Try all possible rules.
  7227. // On success, rule should:
  7228. //
  7229. // - update `state.pos`
  7230. // - update `state.tokens`
  7231. // - return true
  7232. if (state.level < maxNesting) {
  7233. for (i = 0; i < len; i++) {
  7234. ok = rules[i](state, false);
  7235. if (ok) { break; }
  7236. }
  7237. }
  7238. if (ok) {
  7239. if (state.pos >= end) { break; }
  7240. continue;
  7241. }
  7242. state.pending += state.src[state.pos++];
  7243. }
  7244. if (state.pending) {
  7245. state.pushPending();
  7246. }
  7247. };
  7248. /**
  7249. * ParserInline.parse(str, md, env, outTokens)
  7250. *
  7251. * Process input string and push inline tokens into `outTokens`
  7252. **/
  7253. ParserInline.prototype.parse = function (str, md, env, outTokens) {
  7254. var i, rules, len;
  7255. var state = new this.State(str, md, env, outTokens);
  7256. this.tokenize(state);
  7257. rules = this.ruler2.getRules('');
  7258. len = rules.length;
  7259. for (i = 0; i < len; i++) {
  7260. rules[i](state);
  7261. }
  7262. };
  7263. ParserInline.prototype.State = __webpack_require__(71);
  7264. module.exports = ParserInline;
  7265. /***/ }),
  7266. /* 39 */
  7267. /***/ (function(module, exports, __webpack_require__) {
  7268. "use strict";
  7269. // Commonmark default options
  7270. module.exports = {
  7271. options: {
  7272. html: true, // Enable HTML tags in source
  7273. xhtmlOut: true, // Use '/' to close single tags (<br />)
  7274. breaks: false, // Convert '\n' in paragraphs into <br>
  7275. langPrefix: 'language-', // CSS language prefix for fenced blocks
  7276. linkify: false, // autoconvert URL-like texts to links
  7277. // Enable some language-neutral replacements + quotes beautification
  7278. typographer: false,
  7279. // Double + single quotes replacement pairs, when typographer enabled,
  7280. // and smartquotes on. Could be either a String or an Array.
  7281. //
  7282. // For example, you can use '«»„“' for Russian, '„“‚‘' for German,
  7283. // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
  7284. quotes: '\u201c\u201d\u2018\u2019', /* “”‘’ */
  7285. // Highlighter function. Should return escaped HTML,
  7286. // or '' if the source string is not changed and should be escaped externaly.
  7287. // If result starts with <pre... internal wrapper is skipped.
  7288. //
  7289. // function (/*str, lang*/) { return ''; }
  7290. //
  7291. highlight: null,
  7292. maxNesting: 20 // Internal protection, recursion limit
  7293. },
  7294. components: {
  7295. core: {
  7296. rules: [
  7297. 'normalize',
  7298. 'block',
  7299. 'inline'
  7300. ]
  7301. },
  7302. block: {
  7303. rules: [
  7304. 'blockquote',
  7305. 'code',
  7306. 'fence',
  7307. 'heading',
  7308. 'hr',
  7309. 'html_block',
  7310. 'lheading',
  7311. 'list',
  7312. 'reference',
  7313. 'paragraph'
  7314. ]
  7315. },
  7316. inline: {
  7317. rules: [
  7318. 'autolink',
  7319. 'backticks',
  7320. 'emphasis',
  7321. 'entity',
  7322. 'escape',
  7323. 'html_inline',
  7324. 'image',
  7325. 'link',
  7326. 'newline',
  7327. 'text'
  7328. ],
  7329. rules2: [
  7330. 'balance_pairs',
  7331. 'emphasis',
  7332. 'text_collapse'
  7333. ]
  7334. }
  7335. }
  7336. };
  7337. /***/ }),
  7338. /* 40 */
  7339. /***/ (function(module, exports, __webpack_require__) {
  7340. "use strict";
  7341. // markdown-it default options
  7342. module.exports = {
  7343. options: {
  7344. html: false, // Enable HTML tags in source
  7345. xhtmlOut: false, // Use '/' to close single tags (<br />)
  7346. breaks: false, // Convert '\n' in paragraphs into <br>
  7347. langPrefix: 'language-', // CSS language prefix for fenced blocks
  7348. linkify: false, // autoconvert URL-like texts to links
  7349. // Enable some language-neutral replacements + quotes beautification
  7350. typographer: false,
  7351. // Double + single quotes replacement pairs, when typographer enabled,
  7352. // and smartquotes on. Could be either a String or an Array.
  7353. //
  7354. // For example, you can use '«»„“' for Russian, '„“‚‘' for German,
  7355. // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
  7356. quotes: '\u201c\u201d\u2018\u2019', /* “”‘’ */
  7357. // Highlighter function. Should return escaped HTML,
  7358. // or '' if the source string is not changed and should be escaped externaly.
  7359. // If result starts with <pre... internal wrapper is skipped.
  7360. //
  7361. // function (/*str, lang*/) { return ''; }
  7362. //
  7363. highlight: null,
  7364. maxNesting: 100 // Internal protection, recursion limit
  7365. },
  7366. components: {
  7367. core: {},
  7368. block: {},
  7369. inline: {}
  7370. }
  7371. };
  7372. /***/ }),
  7373. /* 41 */
  7374. /***/ (function(module, exports, __webpack_require__) {
  7375. "use strict";
  7376. // "Zero" preset, with nothing enabled. Useful for manual configuring of simple
  7377. // modes. For example, to parse bold/italic only.
  7378. module.exports = {
  7379. options: {
  7380. html: false, // Enable HTML tags in source
  7381. xhtmlOut: false, // Use '/' to close single tags (<br />)
  7382. breaks: false, // Convert '\n' in paragraphs into <br>
  7383. langPrefix: 'language-', // CSS language prefix for fenced blocks
  7384. linkify: false, // autoconvert URL-like texts to links
  7385. // Enable some language-neutral replacements + quotes beautification
  7386. typographer: false,
  7387. // Double + single quotes replacement pairs, when typographer enabled,
  7388. // and smartquotes on. Could be either a String or an Array.
  7389. //
  7390. // For example, you can use '«»„“' for Russian, '„“‚‘' for German,
  7391. // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
  7392. quotes: '\u201c\u201d\u2018\u2019', /* “”‘’ */
  7393. // Highlighter function. Should return escaped HTML,
  7394. // or '' if the source string is not changed and should be escaped externaly.
  7395. // If result starts with <pre... internal wrapper is skipped.
  7396. //
  7397. // function (/*str, lang*/) { return ''; }
  7398. //
  7399. highlight: null,
  7400. maxNesting: 20 // Internal protection, recursion limit
  7401. },
  7402. components: {
  7403. core: {
  7404. rules: [
  7405. 'normalize',
  7406. 'block',
  7407. 'inline'
  7408. ]
  7409. },
  7410. block: {
  7411. rules: [
  7412. 'paragraph'
  7413. ]
  7414. },
  7415. inline: {
  7416. rules: [
  7417. 'text'
  7418. ],
  7419. rules2: [
  7420. 'balance_pairs',
  7421. 'text_collapse'
  7422. ]
  7423. }
  7424. }
  7425. };
  7426. /***/ }),
  7427. /* 42 */
  7428. /***/ (function(module, exports, __webpack_require__) {
  7429. "use strict";
  7430. /**
  7431. * class Renderer
  7432. *
  7433. * Generates HTML from parsed token stream. Each instance has independent
  7434. * copy of rules. Those can be rewritten with ease. Also, you can add new
  7435. * rules if you create plugin and adds new token types.
  7436. **/
  7437. var assign = __webpack_require__(0).assign;
  7438. var unescapeAll = __webpack_require__(0).unescapeAll;
  7439. var escapeHtml = __webpack_require__(0).escapeHtml;
  7440. ////////////////////////////////////////////////////////////////////////////////
  7441. var default_rules = {};
  7442. default_rules.code_inline = function (tokens, idx, options, env, slf) {
  7443. var token = tokens[idx];
  7444. return '<code' + slf.renderAttrs(token) + '>' +
  7445. escapeHtml(tokens[idx].content) +
  7446. '</code>';
  7447. };
  7448. default_rules.code_block = function (tokens, idx, options, env, slf) {
  7449. var token = tokens[idx];
  7450. return '<pre' + slf.renderAttrs(token) + '><code>' +
  7451. escapeHtml(tokens[idx].content) +
  7452. '</code></pre>\n';
  7453. };
  7454. default_rules.fence = function (tokens, idx, options, env, slf) {
  7455. var token = tokens[idx],
  7456. info = token.info ? unescapeAll(token.info).trim() : '',
  7457. langName = '',
  7458. highlighted, i, tmpAttrs, tmpToken;
  7459. if (info) {
  7460. langName = info.split(/\s+/g)[0];
  7461. }
  7462. if (options.highlight) {
  7463. highlighted = options.highlight(token.content, langName) || escapeHtml(token.content);
  7464. } else {
  7465. highlighted = escapeHtml(token.content);
  7466. }
  7467. if (highlighted.indexOf('<pre') === 0) {
  7468. return highlighted + '\n';
  7469. }
  7470. // If language exists, inject class gently, without mudofying original token.
  7471. // May be, one day we will add .clone() for token and simplify this part, but
  7472. // now we prefer to keep things local.
  7473. if (info) {
  7474. i = token.attrIndex('class');
  7475. tmpAttrs = token.attrs ? token.attrs.slice() : [];
  7476. if (i < 0) {
  7477. tmpAttrs.push([ 'class', options.langPrefix + langName ]);
  7478. } else {
  7479. tmpAttrs[i][1] += ' ' + options.langPrefix + langName;
  7480. }
  7481. // Fake token just to render attributes
  7482. tmpToken = {
  7483. attrs: tmpAttrs
  7484. };
  7485. return '<pre><code' + slf.renderAttrs(tmpToken) + '>'
  7486. + highlighted
  7487. + '</code></pre>\n';
  7488. }
  7489. return '<pre><code' + slf.renderAttrs(token) + '>'
  7490. + highlighted
  7491. + '</code></pre>\n';
  7492. };
  7493. default_rules.image = function (tokens, idx, options, env, slf) {
  7494. var token = tokens[idx];
  7495. // "alt" attr MUST be set, even if empty. Because it's mandatory and
  7496. // should be placed on proper position for tests.
  7497. //
  7498. // Replace content with actual value
  7499. token.attrs[token.attrIndex('alt')][1] =
  7500. slf.renderInlineAsText(token.children, options, env);
  7501. return slf.renderToken(tokens, idx, options);
  7502. };
  7503. default_rules.hardbreak = function (tokens, idx, options /*, env */) {
  7504. return options.xhtmlOut ? '<br />\n' : '<br>\n';
  7505. };
  7506. default_rules.softbreak = function (tokens, idx, options /*, env */) {
  7507. return options.breaks ? (options.xhtmlOut ? '<br />\n' : '<br>\n') : '\n';
  7508. };
  7509. default_rules.text = function (tokens, idx /*, options, env */) {
  7510. return escapeHtml(tokens[idx].content);
  7511. };
  7512. default_rules.html_block = function (tokens, idx /*, options, env */) {
  7513. return tokens[idx].content;
  7514. };
  7515. default_rules.html_inline = function (tokens, idx /*, options, env */) {
  7516. return tokens[idx].content;
  7517. };
  7518. /**
  7519. * new Renderer()
  7520. *
  7521. * Creates new [[Renderer]] instance and fill [[Renderer#rules]] with defaults.
  7522. **/
  7523. function Renderer() {
  7524. /**
  7525. * Renderer#rules -> Object
  7526. *
  7527. * Contains render rules for tokens. Can be updated and extended.
  7528. *
  7529. * ##### Example
  7530. *
  7531. * ```javascript
  7532. * var md = require('markdown-it')();
  7533. *
  7534. * md.renderer.rules.strong_open = function () { return '<b>'; };
  7535. * md.renderer.rules.strong_close = function () { return '</b>'; };
  7536. *
  7537. * var result = md.renderInline(...);
  7538. * ```
  7539. *
  7540. * Each rule is called as independed static function with fixed signature:
  7541. *
  7542. * ```javascript
  7543. * function my_token_render(tokens, idx, options, env, renderer) {
  7544. * // ...
  7545. * return renderedHTML;
  7546. * }
  7547. * ```
  7548. *
  7549. * See [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.js)
  7550. * for more details and examples.
  7551. **/
  7552. this.rules = assign({}, default_rules);
  7553. }
  7554. /**
  7555. * Renderer.renderAttrs(token) -> String
  7556. *
  7557. * Render token attributes to string.
  7558. **/
  7559. Renderer.prototype.renderAttrs = function renderAttrs(token) {
  7560. var i, l, result;
  7561. if (!token.attrs) { return ''; }
  7562. result = '';
  7563. for (i = 0, l = token.attrs.length; i < l; i++) {
  7564. result += ' ' + escapeHtml(token.attrs[i][0]) + '="' + escapeHtml(token.attrs[i][1]) + '"';
  7565. }
  7566. return result;
  7567. };
  7568. /**
  7569. * Renderer.renderToken(tokens, idx, options) -> String
  7570. * - tokens (Array): list of tokens
  7571. * - idx (Numbed): token index to render
  7572. * - options (Object): params of parser instance
  7573. *
  7574. * Default token renderer. Can be overriden by custom function
  7575. * in [[Renderer#rules]].
  7576. **/
  7577. Renderer.prototype.renderToken = function renderToken(tokens, idx, options) {
  7578. var nextToken,
  7579. result = '',
  7580. needLf = false,
  7581. token = tokens[idx];
  7582. // Tight list paragraphs
  7583. if (token.hidden) {
  7584. return '';
  7585. }
  7586. // Insert a newline between hidden paragraph and subsequent opening
  7587. // block-level tag.
  7588. //
  7589. // For example, here we should insert a newline before blockquote:
  7590. // - a
  7591. // >
  7592. //
  7593. if (token.block && token.nesting !== -1 && idx && tokens[idx - 1].hidden) {
  7594. result += '\n';
  7595. }
  7596. // Add token name, e.g. `<img`
  7597. result += (token.nesting === -1 ? '</' : '<') + token.tag;
  7598. // Encode attributes, e.g. `<img src="foo"`
  7599. result += this.renderAttrs(token);
  7600. // Add a slash for self-closing tags, e.g. `<img src="foo" /`
  7601. if (token.nesting === 0 && options.xhtmlOut) {
  7602. result += ' /';
  7603. }
  7604. // Check if we need to add a newline after this tag
  7605. if (token.block) {
  7606. needLf = true;
  7607. if (token.nesting === 1) {
  7608. if (idx + 1 < tokens.length) {
  7609. nextToken = tokens[idx + 1];
  7610. if (nextToken.type === 'inline' || nextToken.hidden) {
  7611. // Block-level tag containing an inline tag.
  7612. //
  7613. needLf = false;
  7614. } else if (nextToken.nesting === -1 && nextToken.tag === token.tag) {
  7615. // Opening tag + closing tag of the same type. E.g. `<li></li>`.
  7616. //
  7617. needLf = false;
  7618. }
  7619. }
  7620. }
  7621. }
  7622. result += needLf ? '>\n' : '>';
  7623. return result;
  7624. };
  7625. /**
  7626. * Renderer.renderInline(tokens, options, env) -> String
  7627. * - tokens (Array): list on block tokens to renter
  7628. * - options (Object): params of parser instance
  7629. * - env (Object): additional data from parsed input (references, for example)
  7630. *
  7631. * The same as [[Renderer.render]], but for single token of `inline` type.
  7632. **/
  7633. Renderer.prototype.renderInline = function (tokens, options, env) {
  7634. var type,
  7635. result = '',
  7636. rules = this.rules;
  7637. for (var i = 0, len = tokens.length; i < len; i++) {
  7638. type = tokens[i].type;
  7639. if (typeof rules[type] !== 'undefined') {
  7640. result += rules[type](tokens, i, options, env, this);
  7641. } else {
  7642. result += this.renderToken(tokens, i, options);
  7643. }
  7644. }
  7645. return result;
  7646. };
  7647. /** internal
  7648. * Renderer.renderInlineAsText(tokens, options, env) -> String
  7649. * - tokens (Array): list on block tokens to renter
  7650. * - options (Object): params of parser instance
  7651. * - env (Object): additional data from parsed input (references, for example)
  7652. *
  7653. * Special kludge for image `alt` attributes to conform CommonMark spec.
  7654. * Don't try to use it! Spec requires to show `alt` content with stripped markup,
  7655. * instead of simple escaping.
  7656. **/
  7657. Renderer.prototype.renderInlineAsText = function (tokens, options, env) {
  7658. var result = '';
  7659. for (var i = 0, len = tokens.length; i < len; i++) {
  7660. if (tokens[i].type === 'text') {
  7661. result += tokens[i].content;
  7662. } else if (tokens[i].type === 'image') {
  7663. result += this.renderInlineAsText(tokens[i].children, options, env);
  7664. }
  7665. }
  7666. return result;
  7667. };
  7668. /**
  7669. * Renderer.render(tokens, options, env) -> String
  7670. * - tokens (Array): list on block tokens to renter
  7671. * - options (Object): params of parser instance
  7672. * - env (Object): additional data from parsed input (references, for example)
  7673. *
  7674. * Takes token stream and generates HTML. Probably, you will never need to call
  7675. * this method directly.
  7676. **/
  7677. Renderer.prototype.render = function (tokens, options, env) {
  7678. var i, len, type,
  7679. result = '',
  7680. rules = this.rules;
  7681. for (i = 0, len = tokens.length; i < len; i++) {
  7682. type = tokens[i].type;
  7683. if (type === 'inline') {
  7684. result += this.renderInline(tokens[i].children, options, env);
  7685. } else if (typeof rules[type] !== 'undefined') {
  7686. result += rules[tokens[i].type](tokens, i, options, env, this);
  7687. } else {
  7688. result += this.renderToken(tokens, i, options, env);
  7689. }
  7690. }
  7691. return result;
  7692. };
  7693. module.exports = Renderer;
  7694. /***/ }),
  7695. /* 43 */
  7696. /***/ (function(module, exports, __webpack_require__) {
  7697. "use strict";
  7698. // Block quotes
  7699. var isSpace = __webpack_require__(0).isSpace;
  7700. module.exports = function blockquote(state, startLine, endLine, silent) {
  7701. var adjustTab,
  7702. ch,
  7703. i,
  7704. initial,
  7705. isOutdented,
  7706. l,
  7707. lastLineEmpty,
  7708. lines,
  7709. nextLine,
  7710. offset,
  7711. oldBMarks,
  7712. oldBSCount,
  7713. oldIndent,
  7714. oldParentType,
  7715. oldSCount,
  7716. oldTShift,
  7717. spaceAfterMarker,
  7718. terminate,
  7719. terminatorRules,
  7720. token,
  7721. oldLineMax = state.lineMax,
  7722. pos = state.bMarks[startLine] + state.tShift[startLine],
  7723. max = state.eMarks[startLine];
  7724. // if it's indented more than 3 spaces, it should be a code block
  7725. if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
  7726. // check the block quote marker
  7727. if (state.src.charCodeAt(pos++) !== 0x3E/* > */) { return false; }
  7728. // we know that it's going to be a valid blockquote,
  7729. // so no point trying to find the end of it in silent mode
  7730. if (silent) { return true; }
  7731. // skip spaces after ">" and re-calculate offset
  7732. initial = offset = state.sCount[startLine] + pos - (state.bMarks[startLine] + state.tShift[startLine]);
  7733. // skip one optional space after '>'
  7734. if (state.src.charCodeAt(pos) === 0x20 /* space */) {
  7735. // ' > test '
  7736. // ^ -- position start of line here:
  7737. pos++;
  7738. initial++;
  7739. offset++;
  7740. adjustTab = false;
  7741. spaceAfterMarker = true;
  7742. } else if (state.src.charCodeAt(pos) === 0x09 /* tab */) {
  7743. spaceAfterMarker = true;
  7744. if ((state.bsCount[startLine] + offset) % 4 === 3) {
  7745. // ' >\t test '
  7746. // ^ -- position start of line here (tab has width===1)
  7747. pos++;
  7748. initial++;
  7749. offset++;
  7750. adjustTab = false;
  7751. } else {
  7752. // ' >\t test '
  7753. // ^ -- position start of line here + shift bsCount slightly
  7754. // to make extra space appear
  7755. adjustTab = true;
  7756. }
  7757. } else {
  7758. spaceAfterMarker = false;
  7759. }
  7760. oldBMarks = [ state.bMarks[startLine] ];
  7761. state.bMarks[startLine] = pos;
  7762. while (pos < max) {
  7763. ch = state.src.charCodeAt(pos);
  7764. if (isSpace(ch)) {
  7765. if (ch === 0x09) {
  7766. offset += 4 - (offset + state.bsCount[startLine] + (adjustTab ? 1 : 0)) % 4;
  7767. } else {
  7768. offset++;
  7769. }
  7770. } else {
  7771. break;
  7772. }
  7773. pos++;
  7774. }
  7775. oldBSCount = [ state.bsCount[startLine] ];
  7776. state.bsCount[startLine] = state.sCount[startLine] + 1 + (spaceAfterMarker ? 1 : 0);
  7777. lastLineEmpty = pos >= max;
  7778. oldSCount = [ state.sCount[startLine] ];
  7779. state.sCount[startLine] = offset - initial;
  7780. oldTShift = [ state.tShift[startLine] ];
  7781. state.tShift[startLine] = pos - state.bMarks[startLine];
  7782. terminatorRules = state.md.block.ruler.getRules('blockquote');
  7783. oldParentType = state.parentType;
  7784. state.parentType = 'blockquote';
  7785. // Search the end of the block
  7786. //
  7787. // Block ends with either:
  7788. // 1. an empty line outside:
  7789. // ```
  7790. // > test
  7791. //
  7792. // ```
  7793. // 2. an empty line inside:
  7794. // ```
  7795. // >
  7796. // test
  7797. // ```
  7798. // 3. another tag:
  7799. // ```
  7800. // > test
  7801. // - - -
  7802. // ```
  7803. for (nextLine = startLine + 1; nextLine < endLine; nextLine++) {
  7804. // check if it's outdented, i.e. it's inside list item and indented
  7805. // less than said list item:
  7806. //
  7807. // ```
  7808. // 1. anything
  7809. // > current blockquote
  7810. // 2. checking this line
  7811. // ```
  7812. isOutdented = state.sCount[nextLine] < state.blkIndent;
  7813. pos = state.bMarks[nextLine] + state.tShift[nextLine];
  7814. max = state.eMarks[nextLine];
  7815. if (pos >= max) {
  7816. // Case 1: line is not inside the blockquote, and this line is empty.
  7817. break;
  7818. }
  7819. if (state.src.charCodeAt(pos++) === 0x3E/* > */ && !isOutdented) {
  7820. // This line is inside the blockquote.
  7821. // skip spaces after ">" and re-calculate offset
  7822. initial = offset = state.sCount[nextLine] + pos - (state.bMarks[nextLine] + state.tShift[nextLine]);
  7823. // skip one optional space after '>'
  7824. if (state.src.charCodeAt(pos) === 0x20 /* space */) {
  7825. // ' > test '
  7826. // ^ -- position start of line here:
  7827. pos++;
  7828. initial++;
  7829. offset++;
  7830. adjustTab = false;
  7831. spaceAfterMarker = true;
  7832. } else if (state.src.charCodeAt(pos) === 0x09 /* tab */) {
  7833. spaceAfterMarker = true;
  7834. if ((state.bsCount[nextLine] + offset) % 4 === 3) {
  7835. // ' >\t test '
  7836. // ^ -- position start of line here (tab has width===1)
  7837. pos++;
  7838. initial++;
  7839. offset++;
  7840. adjustTab = false;
  7841. } else {
  7842. // ' >\t test '
  7843. // ^ -- position start of line here + shift bsCount slightly
  7844. // to make extra space appear
  7845. adjustTab = true;
  7846. }
  7847. } else {
  7848. spaceAfterMarker = false;
  7849. }
  7850. oldBMarks.push(state.bMarks[nextLine]);
  7851. state.bMarks[nextLine] = pos;
  7852. while (pos < max) {
  7853. ch = state.src.charCodeAt(pos);
  7854. if (isSpace(ch)) {
  7855. if (ch === 0x09) {
  7856. offset += 4 - (offset + state.bsCount[nextLine] + (adjustTab ? 1 : 0)) % 4;
  7857. } else {
  7858. offset++;
  7859. }
  7860. } else {
  7861. break;
  7862. }
  7863. pos++;
  7864. }
  7865. lastLineEmpty = pos >= max;
  7866. oldBSCount.push(state.bsCount[nextLine]);
  7867. state.bsCount[nextLine] = state.sCount[nextLine] + 1 + (spaceAfterMarker ? 1 : 0);
  7868. oldSCount.push(state.sCount[nextLine]);
  7869. state.sCount[nextLine] = offset - initial;
  7870. oldTShift.push(state.tShift[nextLine]);
  7871. state.tShift[nextLine] = pos - state.bMarks[nextLine];
  7872. continue;
  7873. }
  7874. // Case 2: line is not inside the blockquote, and the last line was empty.
  7875. if (lastLineEmpty) { break; }
  7876. // Case 3: another tag found.
  7877. terminate = false;
  7878. for (i = 0, l = terminatorRules.length; i < l; i++) {
  7879. if (terminatorRules[i](state, nextLine, endLine, true)) {
  7880. terminate = true;
  7881. break;
  7882. }
  7883. }
  7884. if (terminate) {
  7885. // Quirk to enforce "hard termination mode" for paragraphs;
  7886. // normally if you call `tokenize(state, startLine, nextLine)`,
  7887. // paragraphs will look below nextLine for paragraph continuation,
  7888. // but if blockquote is terminated by another tag, they shouldn't
  7889. state.lineMax = nextLine;
  7890. if (state.blkIndent !== 0) {
  7891. // state.blkIndent was non-zero, we now set it to zero,
  7892. // so we need to re-calculate all offsets to appear as
  7893. // if indent wasn't changed
  7894. oldBMarks.push(state.bMarks[nextLine]);
  7895. oldBSCount.push(state.bsCount[nextLine]);
  7896. oldTShift.push(state.tShift[nextLine]);
  7897. oldSCount.push(state.sCount[nextLine]);
  7898. state.sCount[nextLine] -= state.blkIndent;
  7899. }
  7900. break;
  7901. }
  7902. if (isOutdented) break;
  7903. oldBMarks.push(state.bMarks[nextLine]);
  7904. oldBSCount.push(state.bsCount[nextLine]);
  7905. oldTShift.push(state.tShift[nextLine]);
  7906. oldSCount.push(state.sCount[nextLine]);
  7907. // A negative indentation means that this is a paragraph continuation
  7908. //
  7909. state.sCount[nextLine] = -1;
  7910. }
  7911. oldIndent = state.blkIndent;
  7912. state.blkIndent = 0;
  7913. token = state.push('blockquote_open', 'blockquote', 1);
  7914. token.markup = '>';
  7915. token.map = lines = [ startLine, 0 ];
  7916. state.md.block.tokenize(state, startLine, nextLine);
  7917. token = state.push('blockquote_close', 'blockquote', -1);
  7918. token.markup = '>';
  7919. state.lineMax = oldLineMax;
  7920. state.parentType = oldParentType;
  7921. lines[1] = state.line;
  7922. // Restore original tShift; this might not be necessary since the parser
  7923. // has already been here, but just to make sure we can do that.
  7924. for (i = 0; i < oldTShift.length; i++) {
  7925. state.bMarks[i + startLine] = oldBMarks[i];
  7926. state.tShift[i + startLine] = oldTShift[i];
  7927. state.sCount[i + startLine] = oldSCount[i];
  7928. state.bsCount[i + startLine] = oldBSCount[i];
  7929. }
  7930. state.blkIndent = oldIndent;
  7931. return true;
  7932. };
  7933. /***/ }),
  7934. /* 44 */
  7935. /***/ (function(module, exports, __webpack_require__) {
  7936. "use strict";
  7937. // Code block (4 spaces padded)
  7938. module.exports = function code(state, startLine, endLine/*, silent*/) {
  7939. var nextLine, last, token;
  7940. if (state.sCount[startLine] - state.blkIndent < 4) { return false; }
  7941. last = nextLine = startLine + 1;
  7942. while (nextLine < endLine) {
  7943. if (state.isEmpty(nextLine)) {
  7944. nextLine++;
  7945. continue;
  7946. }
  7947. if (state.sCount[nextLine] - state.blkIndent >= 4) {
  7948. nextLine++;
  7949. last = nextLine;
  7950. continue;
  7951. }
  7952. break;
  7953. }
  7954. state.line = last;
  7955. token = state.push('code_block', 'code', 0);
  7956. token.content = state.getLines(startLine, last, 4 + state.blkIndent, true);
  7957. token.map = [ startLine, state.line ];
  7958. return true;
  7959. };
  7960. /***/ }),
  7961. /* 45 */
  7962. /***/ (function(module, exports, __webpack_require__) {
  7963. "use strict";
  7964. // fences (``` lang, ~~~ lang)
  7965. module.exports = function fence(state, startLine, endLine, silent) {
  7966. var marker, len, params, nextLine, mem, token, markup,
  7967. haveEndMarker = false,
  7968. pos = state.bMarks[startLine] + state.tShift[startLine],
  7969. max = state.eMarks[startLine];
  7970. // if it's indented more than 3 spaces, it should be a code block
  7971. if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
  7972. if (pos + 3 > max) { return false; }
  7973. marker = state.src.charCodeAt(pos);
  7974. if (marker !== 0x7E/* ~ */ && marker !== 0x60 /* ` */) {
  7975. return false;
  7976. }
  7977. // scan marker length
  7978. mem = pos;
  7979. pos = state.skipChars(pos, marker);
  7980. len = pos - mem;
  7981. if (len < 3) { return false; }
  7982. markup = state.src.slice(mem, pos);
  7983. params = state.src.slice(pos, max);
  7984. if (params.indexOf(String.fromCharCode(marker)) >= 0) { return false; }
  7985. // Since start is found, we can report success here in validation mode
  7986. if (silent) { return true; }
  7987. // search end of block
  7988. nextLine = startLine;
  7989. for (;;) {
  7990. nextLine++;
  7991. if (nextLine >= endLine) {
  7992. // unclosed block should be autoclosed by end of document.
  7993. // also block seems to be autoclosed by end of parent
  7994. break;
  7995. }
  7996. pos = mem = state.bMarks[nextLine] + state.tShift[nextLine];
  7997. max = state.eMarks[nextLine];
  7998. if (pos < max && state.sCount[nextLine] < state.blkIndent) {
  7999. // non-empty line with negative indent should stop the list:
  8000. // - ```
  8001. // test
  8002. break;
  8003. }
  8004. if (state.src.charCodeAt(pos) !== marker) { continue; }
  8005. if (state.sCount[nextLine] - state.blkIndent >= 4) {
  8006. // closing fence should be indented less than 4 spaces
  8007. continue;
  8008. }
  8009. pos = state.skipChars(pos, marker);
  8010. // closing code fence must be at least as long as the opening one
  8011. if (pos - mem < len) { continue; }
  8012. // make sure tail has spaces only
  8013. pos = state.skipSpaces(pos);
  8014. if (pos < max) { continue; }
  8015. haveEndMarker = true;
  8016. // found!
  8017. break;
  8018. }
  8019. // If a fence has heading spaces, they should be removed from its inner block
  8020. len = state.sCount[startLine];
  8021. state.line = nextLine + (haveEndMarker ? 1 : 0);
  8022. token = state.push('fence', 'code', 0);
  8023. token.info = params;
  8024. token.content = state.getLines(startLine + 1, nextLine, len, true);
  8025. token.markup = markup;
  8026. token.map = [ startLine, state.line ];
  8027. return true;
  8028. };
  8029. /***/ }),
  8030. /* 46 */
  8031. /***/ (function(module, exports, __webpack_require__) {
  8032. "use strict";
  8033. // heading (#, ##, ...)
  8034. var isSpace = __webpack_require__(0).isSpace;
  8035. module.exports = function heading(state, startLine, endLine, silent) {
  8036. var ch, level, tmp, token,
  8037. pos = state.bMarks[startLine] + state.tShift[startLine],
  8038. max = state.eMarks[startLine];
  8039. // if it's indented more than 3 spaces, it should be a code block
  8040. if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
  8041. ch = state.src.charCodeAt(pos);
  8042. if (ch !== 0x23/* # */ || pos >= max) { return false; }
  8043. // count heading level
  8044. level = 1;
  8045. ch = state.src.charCodeAt(++pos);
  8046. while (ch === 0x23/* # */ && pos < max && level <= 6) {
  8047. level++;
  8048. ch = state.src.charCodeAt(++pos);
  8049. }
  8050. if (level > 6 || (pos < max && !isSpace(ch))) { return false; }
  8051. if (silent) { return true; }
  8052. // Let's cut tails like ' ### ' from the end of string
  8053. max = state.skipSpacesBack(max, pos);
  8054. tmp = state.skipCharsBack(max, 0x23, pos); // #
  8055. if (tmp > pos && isSpace(state.src.charCodeAt(tmp - 1))) {
  8056. max = tmp;
  8057. }
  8058. state.line = startLine + 1;
  8059. token = state.push('heading_open', 'h' + String(level), 1);
  8060. token.markup = '########'.slice(0, level);
  8061. token.map = [ startLine, state.line ];
  8062. token = state.push('inline', '', 0);
  8063. token.content = state.src.slice(pos, max).trim();
  8064. token.map = [ startLine, state.line ];
  8065. token.children = [];
  8066. token = state.push('heading_close', 'h' + String(level), -1);
  8067. token.markup = '########'.slice(0, level);
  8068. return true;
  8069. };
  8070. /***/ }),
  8071. /* 47 */
  8072. /***/ (function(module, exports, __webpack_require__) {
  8073. "use strict";
  8074. // Horizontal rule
  8075. var isSpace = __webpack_require__(0).isSpace;
  8076. module.exports = function hr(state, startLine, endLine, silent) {
  8077. var marker, cnt, ch, token,
  8078. pos = state.bMarks[startLine] + state.tShift[startLine],
  8079. max = state.eMarks[startLine];
  8080. // if it's indented more than 3 spaces, it should be a code block
  8081. if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
  8082. marker = state.src.charCodeAt(pos++);
  8083. // Check hr marker
  8084. if (marker !== 0x2A/* * */ &&
  8085. marker !== 0x2D/* - */ &&
  8086. marker !== 0x5F/* _ */) {
  8087. return false;
  8088. }
  8089. // markers can be mixed with spaces, but there should be at least 3 of them
  8090. cnt = 1;
  8091. while (pos < max) {
  8092. ch = state.src.charCodeAt(pos++);
  8093. if (ch !== marker && !isSpace(ch)) { return false; }
  8094. if (ch === marker) { cnt++; }
  8095. }
  8096. if (cnt < 3) { return false; }
  8097. if (silent) { return true; }
  8098. state.line = startLine + 1;
  8099. token = state.push('hr', 'hr', 0);
  8100. token.map = [ startLine, state.line ];
  8101. token.markup = Array(cnt + 1).join(String.fromCharCode(marker));
  8102. return true;
  8103. };
  8104. /***/ }),
  8105. /* 48 */
  8106. /***/ (function(module, exports, __webpack_require__) {
  8107. "use strict";
  8108. // HTML block
  8109. var block_names = __webpack_require__(30);
  8110. var HTML_OPEN_CLOSE_TAG_RE = __webpack_require__(12).HTML_OPEN_CLOSE_TAG_RE;
  8111. // An array of opening and corresponding closing sequences for html tags,
  8112. // last argument defines whether it can terminate a paragraph or not
  8113. //
  8114. var HTML_SEQUENCES = [
  8115. [ /^<(script|pre|style)(?=(\s|>|$))/i, /<\/(script|pre|style)>/i, true ],
  8116. [ /^<!--/, /-->/, true ],
  8117. [ /^<\?/, /\?>/, true ],
  8118. [ /^<![A-Z]/, />/, true ],
  8119. [ /^<!\[CDATA\[/, /\]\]>/, true ],
  8120. [ new RegExp('^</?(' + block_names.join('|') + ')(?=(\\s|/?>|$))', 'i'), /^$/, true ],
  8121. [ new RegExp(HTML_OPEN_CLOSE_TAG_RE.source + '\\s*$'), /^$/, false ]
  8122. ];
  8123. module.exports = function html_block(state, startLine, endLine, silent) {
  8124. var i, nextLine, token, lineText,
  8125. pos = state.bMarks[startLine] + state.tShift[startLine],
  8126. max = state.eMarks[startLine];
  8127. // if it's indented more than 3 spaces, it should be a code block
  8128. if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
  8129. if (!state.md.options.html) { return false; }
  8130. if (state.src.charCodeAt(pos) !== 0x3C/* < */) { return false; }
  8131. lineText = state.src.slice(pos, max);
  8132. for (i = 0; i < HTML_SEQUENCES.length; i++) {
  8133. if (HTML_SEQUENCES[i][0].test(lineText)) { break; }
  8134. }
  8135. if (i === HTML_SEQUENCES.length) { return false; }
  8136. if (silent) {
  8137. // true if this sequence can be a terminator, false otherwise
  8138. return HTML_SEQUENCES[i][2];
  8139. }
  8140. nextLine = startLine + 1;
  8141. // If we are here - we detected HTML block.
  8142. // Let's roll down till block end.
  8143. if (!HTML_SEQUENCES[i][1].test(lineText)) {
  8144. for (; nextLine < endLine; nextLine++) {
  8145. if (state.sCount[nextLine] < state.blkIndent) { break; }
  8146. pos = state.bMarks[nextLine] + state.tShift[nextLine];
  8147. max = state.eMarks[nextLine];
  8148. lineText = state.src.slice(pos, max);
  8149. if (HTML_SEQUENCES[i][1].test(lineText)) {
  8150. if (lineText.length !== 0) { nextLine++; }
  8151. break;
  8152. }
  8153. }
  8154. }
  8155. state.line = nextLine;
  8156. token = state.push('html_block', '', 0);
  8157. token.map = [ startLine, nextLine ];
  8158. token.content = state.getLines(startLine, nextLine, state.blkIndent, true);
  8159. return true;
  8160. };
  8161. /***/ }),
  8162. /* 49 */
  8163. /***/ (function(module, exports, __webpack_require__) {
  8164. "use strict";
  8165. // lheading (---, ===)
  8166. module.exports = function lheading(state, startLine, endLine/*, silent*/) {
  8167. var content, terminate, i, l, token, pos, max, level, marker,
  8168. nextLine = startLine + 1, oldParentType,
  8169. terminatorRules = state.md.block.ruler.getRules('paragraph');
  8170. // if it's indented more than 3 spaces, it should be a code block
  8171. if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
  8172. oldParentType = state.parentType;
  8173. state.parentType = 'paragraph'; // use paragraph to match terminatorRules
  8174. // jump line-by-line until empty one or EOF
  8175. for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {
  8176. // this would be a code block normally, but after paragraph
  8177. // it's considered a lazy continuation regardless of what's there
  8178. if (state.sCount[nextLine] - state.blkIndent > 3) { continue; }
  8179. //
  8180. // Check for underline in setext header
  8181. //
  8182. if (state.sCount[nextLine] >= state.blkIndent) {
  8183. pos = state.bMarks[nextLine] + state.tShift[nextLine];
  8184. max = state.eMarks[nextLine];
  8185. if (pos < max) {
  8186. marker = state.src.charCodeAt(pos);
  8187. if (marker === 0x2D/* - */ || marker === 0x3D/* = */) {
  8188. pos = state.skipChars(pos, marker);
  8189. pos = state.skipSpaces(pos);
  8190. if (pos >= max) {
  8191. level = (marker === 0x3D/* = */ ? 1 : 2);
  8192. break;
  8193. }
  8194. }
  8195. }
  8196. }
  8197. // quirk for blockquotes, this line should already be checked by that rule
  8198. if (state.sCount[nextLine] < 0) { continue; }
  8199. // Some tags can terminate paragraph without empty line.
  8200. terminate = false;
  8201. for (i = 0, l = terminatorRules.length; i < l; i++) {
  8202. if (terminatorRules[i](state, nextLine, endLine, true)) {
  8203. terminate = true;
  8204. break;
  8205. }
  8206. }
  8207. if (terminate) { break; }
  8208. }
  8209. if (!level) {
  8210. // Didn't find valid underline
  8211. return false;
  8212. }
  8213. content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();
  8214. state.line = nextLine + 1;
  8215. token = state.push('heading_open', 'h' + String(level), 1);
  8216. token.markup = String.fromCharCode(marker);
  8217. token.map = [ startLine, state.line ];
  8218. token = state.push('inline', '', 0);
  8219. token.content = content;
  8220. token.map = [ startLine, state.line - 1 ];
  8221. token.children = [];
  8222. token = state.push('heading_close', 'h' + String(level), -1);
  8223. token.markup = String.fromCharCode(marker);
  8224. state.parentType = oldParentType;
  8225. return true;
  8226. };
  8227. /***/ }),
  8228. /* 50 */
  8229. /***/ (function(module, exports, __webpack_require__) {
  8230. "use strict";
  8231. // Lists
  8232. var isSpace = __webpack_require__(0).isSpace;
  8233. // Search `[-+*][\n ]`, returns next pos arter marker on success
  8234. // or -1 on fail.
  8235. function skipBulletListMarker(state, startLine) {
  8236. var marker, pos, max, ch;
  8237. pos = state.bMarks[startLine] + state.tShift[startLine];
  8238. max = state.eMarks[startLine];
  8239. marker = state.src.charCodeAt(pos++);
  8240. // Check bullet
  8241. if (marker !== 0x2A/* * */ &&
  8242. marker !== 0x2D/* - */ &&
  8243. marker !== 0x2B/* + */) {
  8244. return -1;
  8245. }
  8246. if (pos < max) {
  8247. ch = state.src.charCodeAt(pos);
  8248. if (!isSpace(ch)) {
  8249. // " -test " - is not a list item
  8250. return -1;
  8251. }
  8252. }
  8253. return pos;
  8254. }
  8255. // Search `\d+[.)][\n ]`, returns next pos arter marker on success
  8256. // or -1 on fail.
  8257. function skipOrderedListMarker(state, startLine) {
  8258. var ch,
  8259. start = state.bMarks[startLine] + state.tShift[startLine],
  8260. pos = start,
  8261. max = state.eMarks[startLine];
  8262. // List marker should have at least 2 chars (digit + dot)
  8263. if (pos + 1 >= max) { return -1; }
  8264. ch = state.src.charCodeAt(pos++);
  8265. if (ch < 0x30/* 0 */ || ch > 0x39/* 9 */) { return -1; }
  8266. for (;;) {
  8267. // EOL -> fail
  8268. if (pos >= max) { return -1; }
  8269. ch = state.src.charCodeAt(pos++);
  8270. if (ch >= 0x30/* 0 */ && ch <= 0x39/* 9 */) {
  8271. // List marker should have no more than 9 digits
  8272. // (prevents integer overflow in browsers)
  8273. if (pos - start >= 10) { return -1; }
  8274. continue;
  8275. }
  8276. // found valid marker
  8277. if (ch === 0x29/* ) */ || ch === 0x2e/* . */) {
  8278. break;
  8279. }
  8280. return -1;
  8281. }
  8282. if (pos < max) {
  8283. ch = state.src.charCodeAt(pos);
  8284. if (!isSpace(ch)) {
  8285. // " 1.test " - is not a list item
  8286. return -1;
  8287. }
  8288. }
  8289. return pos;
  8290. }
  8291. function markTightParagraphs(state, idx) {
  8292. var i, l,
  8293. level = state.level + 2;
  8294. for (i = idx + 2, l = state.tokens.length - 2; i < l; i++) {
  8295. if (state.tokens[i].level === level && state.tokens[i].type === 'paragraph_open') {
  8296. state.tokens[i + 2].hidden = true;
  8297. state.tokens[i].hidden = true;
  8298. i += 2;
  8299. }
  8300. }
  8301. }
  8302. module.exports = function list(state, startLine, endLine, silent) {
  8303. var ch,
  8304. contentStart,
  8305. i,
  8306. indent,
  8307. indentAfterMarker,
  8308. initial,
  8309. isOrdered,
  8310. itemLines,
  8311. l,
  8312. listLines,
  8313. listTokIdx,
  8314. markerCharCode,
  8315. markerValue,
  8316. max,
  8317. nextLine,
  8318. offset,
  8319. oldIndent,
  8320. oldLIndent,
  8321. oldParentType,
  8322. oldTShift,
  8323. oldTight,
  8324. pos,
  8325. posAfterMarker,
  8326. prevEmptyEnd,
  8327. start,
  8328. terminate,
  8329. terminatorRules,
  8330. token,
  8331. isTerminatingParagraph = false,
  8332. tight = true;
  8333. // if it's indented more than 3 spaces, it should be a code block
  8334. if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
  8335. // limit conditions when list can interrupt
  8336. // a paragraph (validation mode only)
  8337. if (silent && state.parentType === 'paragraph') {
  8338. // Next list item should still terminate previous list item;
  8339. //
  8340. // This code can fail if plugins use blkIndent as well as lists,
  8341. // but I hope the spec gets fixed long before that happens.
  8342. //
  8343. if (state.tShift[startLine] >= state.blkIndent) {
  8344. isTerminatingParagraph = true;
  8345. }
  8346. }
  8347. // Detect list type and position after marker
  8348. if ((posAfterMarker = skipOrderedListMarker(state, startLine)) >= 0) {
  8349. isOrdered = true;
  8350. start = state.bMarks[startLine] + state.tShift[startLine];
  8351. markerValue = Number(state.src.substr(start, posAfterMarker - start - 1));
  8352. // If we're starting a new ordered list right after
  8353. // a paragraph, it should start with 1.
  8354. if (isTerminatingParagraph && markerValue !== 1) return false;
  8355. } else if ((posAfterMarker = skipBulletListMarker(state, startLine)) >= 0) {
  8356. isOrdered = false;
  8357. } else {
  8358. return false;
  8359. }
  8360. // If we're starting a new unordered list right after
  8361. // a paragraph, first line should not be empty.
  8362. if (isTerminatingParagraph) {
  8363. if (state.skipSpaces(posAfterMarker) >= state.eMarks[startLine]) return false;
  8364. }
  8365. // We should terminate list on style change. Remember first one to compare.
  8366. markerCharCode = state.src.charCodeAt(posAfterMarker - 1);
  8367. // For validation mode we can terminate immediately
  8368. if (silent) { return true; }
  8369. // Start list
  8370. listTokIdx = state.tokens.length;
  8371. if (isOrdered) {
  8372. token = state.push('ordered_list_open', 'ol', 1);
  8373. if (markerValue !== 1) {
  8374. token.attrs = [ [ 'start', markerValue ] ];
  8375. }
  8376. } else {
  8377. token = state.push('bullet_list_open', 'ul', 1);
  8378. }
  8379. token.map = listLines = [ startLine, 0 ];
  8380. token.markup = String.fromCharCode(markerCharCode);
  8381. //
  8382. // Iterate list items
  8383. //
  8384. nextLine = startLine;
  8385. prevEmptyEnd = false;
  8386. terminatorRules = state.md.block.ruler.getRules('list');
  8387. oldParentType = state.parentType;
  8388. state.parentType = 'list';
  8389. while (nextLine < endLine) {
  8390. pos = posAfterMarker;
  8391. max = state.eMarks[nextLine];
  8392. initial = offset = state.sCount[nextLine] + posAfterMarker - (state.bMarks[startLine] + state.tShift[startLine]);
  8393. while (pos < max) {
  8394. ch = state.src.charCodeAt(pos);
  8395. if (isSpace(ch)) {
  8396. if (ch === 0x09) {
  8397. offset += 4 - (offset + state.bsCount[nextLine]) % 4;
  8398. } else {
  8399. offset++;
  8400. }
  8401. } else {
  8402. break;
  8403. }
  8404. pos++;
  8405. }
  8406. contentStart = pos;
  8407. if (contentStart >= max) {
  8408. // trimming space in "- \n 3" case, indent is 1 here
  8409. indentAfterMarker = 1;
  8410. } else {
  8411. indentAfterMarker = offset - initial;
  8412. }
  8413. // If we have more than 4 spaces, the indent is 1
  8414. // (the rest is just indented code block)
  8415. if (indentAfterMarker > 4) { indentAfterMarker = 1; }
  8416. // " - test"
  8417. // ^^^^^ - calculating total length of this thing
  8418. indent = initial + indentAfterMarker;
  8419. // Run subparser & write tokens
  8420. token = state.push('list_item_open', 'li', 1);
  8421. token.markup = String.fromCharCode(markerCharCode);
  8422. token.map = itemLines = [ startLine, 0 ];
  8423. oldIndent = state.blkIndent;
  8424. oldTight = state.tight;
  8425. oldTShift = state.tShift[startLine];
  8426. oldLIndent = state.sCount[startLine];
  8427. state.blkIndent = indent;
  8428. state.tight = true;
  8429. state.tShift[startLine] = contentStart - state.bMarks[startLine];
  8430. state.sCount[startLine] = offset;
  8431. if (contentStart >= max && state.isEmpty(startLine + 1)) {
  8432. // workaround for this case
  8433. // (list item is empty, list terminates before "foo"):
  8434. // ~~~~~~~~
  8435. // -
  8436. //
  8437. // foo
  8438. // ~~~~~~~~
  8439. state.line = Math.min(state.line + 2, endLine);
  8440. } else {
  8441. state.md.block.tokenize(state, startLine, endLine, true);
  8442. }
  8443. // If any of list item is tight, mark list as tight
  8444. if (!state.tight || prevEmptyEnd) {
  8445. tight = false;
  8446. }
  8447. // Item become loose if finish with empty line,
  8448. // but we should filter last element, because it means list finish
  8449. prevEmptyEnd = (state.line - startLine) > 1 && state.isEmpty(state.line - 1);
  8450. state.blkIndent = oldIndent;
  8451. state.tShift[startLine] = oldTShift;
  8452. state.sCount[startLine] = oldLIndent;
  8453. state.tight = oldTight;
  8454. token = state.push('list_item_close', 'li', -1);
  8455. token.markup = String.fromCharCode(markerCharCode);
  8456. nextLine = startLine = state.line;
  8457. itemLines[1] = nextLine;
  8458. contentStart = state.bMarks[startLine];
  8459. if (nextLine >= endLine) { break; }
  8460. //
  8461. // Try to check if list is terminated or continued.
  8462. //
  8463. if (state.sCount[nextLine] < state.blkIndent) { break; }
  8464. // fail if terminating block found
  8465. terminate = false;
  8466. for (i = 0, l = terminatorRules.length; i < l; i++) {
  8467. if (terminatorRules[i](state, nextLine, endLine, true)) {
  8468. terminate = true;
  8469. break;
  8470. }
  8471. }
  8472. if (terminate) { break; }
  8473. // fail if list has another type
  8474. if (isOrdered) {
  8475. posAfterMarker = skipOrderedListMarker(state, nextLine);
  8476. if (posAfterMarker < 0) { break; }
  8477. } else {
  8478. posAfterMarker = skipBulletListMarker(state, nextLine);
  8479. if (posAfterMarker < 0) { break; }
  8480. }
  8481. if (markerCharCode !== state.src.charCodeAt(posAfterMarker - 1)) { break; }
  8482. }
  8483. // Finilize list
  8484. if (isOrdered) {
  8485. token = state.push('ordered_list_close', 'ol', -1);
  8486. } else {
  8487. token = state.push('bullet_list_close', 'ul', -1);
  8488. }
  8489. token.markup = String.fromCharCode(markerCharCode);
  8490. listLines[1] = nextLine;
  8491. state.line = nextLine;
  8492. state.parentType = oldParentType;
  8493. // mark paragraphs tight if needed
  8494. if (tight) {
  8495. markTightParagraphs(state, listTokIdx);
  8496. }
  8497. return true;
  8498. };
  8499. /***/ }),
  8500. /* 51 */
  8501. /***/ (function(module, exports, __webpack_require__) {
  8502. "use strict";
  8503. // Paragraph
  8504. module.exports = function paragraph(state, startLine/*, endLine*/) {
  8505. var content, terminate, i, l, token, oldParentType,
  8506. nextLine = startLine + 1,
  8507. terminatorRules = state.md.block.ruler.getRules('paragraph'),
  8508. endLine = state.lineMax;
  8509. oldParentType = state.parentType;
  8510. state.parentType = 'paragraph';
  8511. // jump line-by-line until empty one or EOF
  8512. for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {
  8513. // this would be a code block normally, but after paragraph
  8514. // it's considered a lazy continuation regardless of what's there
  8515. if (state.sCount[nextLine] - state.blkIndent > 3) { continue; }
  8516. // quirk for blockquotes, this line should already be checked by that rule
  8517. if (state.sCount[nextLine] < 0) { continue; }
  8518. // Some tags can terminate paragraph without empty line.
  8519. terminate = false;
  8520. for (i = 0, l = terminatorRules.length; i < l; i++) {
  8521. if (terminatorRules[i](state, nextLine, endLine, true)) {
  8522. terminate = true;
  8523. break;
  8524. }
  8525. }
  8526. if (terminate) { break; }
  8527. }
  8528. content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();
  8529. state.line = nextLine;
  8530. token = state.push('paragraph_open', 'p', 1);
  8531. token.map = [ startLine, state.line ];
  8532. token = state.push('inline', '', 0);
  8533. token.content = content;
  8534. token.map = [ startLine, state.line ];
  8535. token.children = [];
  8536. token = state.push('paragraph_close', 'p', -1);
  8537. state.parentType = oldParentType;
  8538. return true;
  8539. };
  8540. /***/ }),
  8541. /* 52 */
  8542. /***/ (function(module, exports, __webpack_require__) {
  8543. "use strict";
  8544. var normalizeReference = __webpack_require__(0).normalizeReference;
  8545. var isSpace = __webpack_require__(0).isSpace;
  8546. module.exports = function reference(state, startLine, _endLine, silent) {
  8547. var ch,
  8548. destEndPos,
  8549. destEndLineNo,
  8550. endLine,
  8551. href,
  8552. i,
  8553. l,
  8554. label,
  8555. labelEnd,
  8556. oldParentType,
  8557. res,
  8558. start,
  8559. str,
  8560. terminate,
  8561. terminatorRules,
  8562. title,
  8563. lines = 0,
  8564. pos = state.bMarks[startLine] + state.tShift[startLine],
  8565. max = state.eMarks[startLine],
  8566. nextLine = startLine + 1;
  8567. // if it's indented more than 3 spaces, it should be a code block
  8568. if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
  8569. if (state.src.charCodeAt(pos) !== 0x5B/* [ */) { return false; }
  8570. // Simple check to quickly interrupt scan on [link](url) at the start of line.
  8571. // Can be useful on practice: https://github.com/markdown-it/markdown-it/issues/54
  8572. while (++pos < max) {
  8573. if (state.src.charCodeAt(pos) === 0x5D /* ] */ &&
  8574. state.src.charCodeAt(pos - 1) !== 0x5C/* \ */) {
  8575. if (pos + 1 === max) { return false; }
  8576. if (state.src.charCodeAt(pos + 1) !== 0x3A/* : */) { return false; }
  8577. break;
  8578. }
  8579. }
  8580. endLine = state.lineMax;
  8581. // jump line-by-line until empty one or EOF
  8582. terminatorRules = state.md.block.ruler.getRules('reference');
  8583. oldParentType = state.parentType;
  8584. state.parentType = 'reference';
  8585. for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {
  8586. // this would be a code block normally, but after paragraph
  8587. // it's considered a lazy continuation regardless of what's there
  8588. if (state.sCount[nextLine] - state.blkIndent > 3) { continue; }
  8589. // quirk for blockquotes, this line should already be checked by that rule
  8590. if (state.sCount[nextLine] < 0) { continue; }
  8591. // Some tags can terminate paragraph without empty line.
  8592. terminate = false;
  8593. for (i = 0, l = terminatorRules.length; i < l; i++) {
  8594. if (terminatorRules[i](state, nextLine, endLine, true)) {
  8595. terminate = true;
  8596. break;
  8597. }
  8598. }
  8599. if (terminate) { break; }
  8600. }
  8601. str = state.getLines(startLine, nextLine, state.blkIndent, false).trim();
  8602. max = str.length;
  8603. for (pos = 1; pos < max; pos++) {
  8604. ch = str.charCodeAt(pos);
  8605. if (ch === 0x5B /* [ */) {
  8606. return false;
  8607. } else if (ch === 0x5D /* ] */) {
  8608. labelEnd = pos;
  8609. break;
  8610. } else if (ch === 0x0A /* \n */) {
  8611. lines++;
  8612. } else if (ch === 0x5C /* \ */) {
  8613. pos++;
  8614. if (pos < max && str.charCodeAt(pos) === 0x0A) {
  8615. lines++;
  8616. }
  8617. }
  8618. }
  8619. if (labelEnd < 0 || str.charCodeAt(labelEnd + 1) !== 0x3A/* : */) { return false; }
  8620. // [label]: destination 'title'
  8621. // ^^^ skip optional whitespace here
  8622. for (pos = labelEnd + 2; pos < max; pos++) {
  8623. ch = str.charCodeAt(pos);
  8624. if (ch === 0x0A) {
  8625. lines++;
  8626. } else if (isSpace(ch)) {
  8627. /*eslint no-empty:0*/
  8628. } else {
  8629. break;
  8630. }
  8631. }
  8632. // [label]: destination 'title'
  8633. // ^^^^^^^^^^^ parse this
  8634. res = state.md.helpers.parseLinkDestination(str, pos, max);
  8635. if (!res.ok) { return false; }
  8636. href = state.md.normalizeLink(res.str);
  8637. if (!state.md.validateLink(href)) { return false; }
  8638. pos = res.pos;
  8639. lines += res.lines;
  8640. // save cursor state, we could require to rollback later
  8641. destEndPos = pos;
  8642. destEndLineNo = lines;
  8643. // [label]: destination 'title'
  8644. // ^^^ skipping those spaces
  8645. start = pos;
  8646. for (; pos < max; pos++) {
  8647. ch = str.charCodeAt(pos);
  8648. if (ch === 0x0A) {
  8649. lines++;
  8650. } else if (isSpace(ch)) {
  8651. /*eslint no-empty:0*/
  8652. } else {
  8653. break;
  8654. }
  8655. }
  8656. // [label]: destination 'title'
  8657. // ^^^^^^^ parse this
  8658. res = state.md.helpers.parseLinkTitle(str, pos, max);
  8659. if (pos < max && start !== pos && res.ok) {
  8660. title = res.str;
  8661. pos = res.pos;
  8662. lines += res.lines;
  8663. } else {
  8664. title = '';
  8665. pos = destEndPos;
  8666. lines = destEndLineNo;
  8667. }
  8668. // skip trailing spaces until the rest of the line
  8669. while (pos < max) {
  8670. ch = str.charCodeAt(pos);
  8671. if (!isSpace(ch)) { break; }
  8672. pos++;
  8673. }
  8674. if (pos < max && str.charCodeAt(pos) !== 0x0A) {
  8675. if (title) {
  8676. // garbage at the end of the line after title,
  8677. // but it could still be a valid reference if we roll back
  8678. title = '';
  8679. pos = destEndPos;
  8680. lines = destEndLineNo;
  8681. while (pos < max) {
  8682. ch = str.charCodeAt(pos);
  8683. if (!isSpace(ch)) { break; }
  8684. pos++;
  8685. }
  8686. }
  8687. }
  8688. if (pos < max && str.charCodeAt(pos) !== 0x0A) {
  8689. // garbage at the end of the line
  8690. return false;
  8691. }
  8692. label = normalizeReference(str.slice(1, labelEnd));
  8693. if (!label) {
  8694. // CommonMark 0.20 disallows empty labels
  8695. return false;
  8696. }
  8697. // Reference can not terminate anything. This check is for safety only.
  8698. /*istanbul ignore if*/
  8699. if (silent) { return true; }
  8700. if (typeof state.env.references === 'undefined') {
  8701. state.env.references = {};
  8702. }
  8703. if (typeof state.env.references[label] === 'undefined') {
  8704. state.env.references[label] = { title: title, href: href };
  8705. }
  8706. state.parentType = oldParentType;
  8707. state.line = startLine + lines + 1;
  8708. return true;
  8709. };
  8710. /***/ }),
  8711. /* 53 */
  8712. /***/ (function(module, exports, __webpack_require__) {
  8713. "use strict";
  8714. // Parser state class
  8715. var Token = __webpack_require__(4);
  8716. var isSpace = __webpack_require__(0).isSpace;
  8717. function StateBlock(src, md, env, tokens) {
  8718. var ch, s, start, pos, len, indent, offset, indent_found;
  8719. this.src = src;
  8720. // link to parser instance
  8721. this.md = md;
  8722. this.env = env;
  8723. //
  8724. // Internal state vartiables
  8725. //
  8726. this.tokens = tokens;
  8727. this.bMarks = []; // line begin offsets for fast jumps
  8728. this.eMarks = []; // line end offsets for fast jumps
  8729. this.tShift = []; // offsets of the first non-space characters (tabs not expanded)
  8730. this.sCount = []; // indents for each line (tabs expanded)
  8731. // An amount of virtual spaces (tabs expanded) between beginning
  8732. // of each line (bMarks) and real beginning of that line.
  8733. //
  8734. // It exists only as a hack because blockquotes override bMarks
  8735. // losing information in the process.
  8736. //
  8737. // It's used only when expanding tabs, you can think about it as
  8738. // an initial tab length, e.g. bsCount=21 applied to string `\t123`
  8739. // means first tab should be expanded to 4-21%4 === 3 spaces.
  8740. //
  8741. this.bsCount = [];
  8742. // block parser variables
  8743. this.blkIndent = 0; // required block content indent
  8744. // (for example, if we are in list)
  8745. this.line = 0; // line index in src
  8746. this.lineMax = 0; // lines count
  8747. this.tight = false; // loose/tight mode for lists
  8748. this.ddIndent = -1; // indent of the current dd block (-1 if there isn't any)
  8749. // can be 'blockquote', 'list', 'root', 'paragraph' or 'reference'
  8750. // used in lists to determine if they interrupt a paragraph
  8751. this.parentType = 'root';
  8752. this.level = 0;
  8753. // renderer
  8754. this.result = '';
  8755. // Create caches
  8756. // Generate markers.
  8757. s = this.src;
  8758. indent_found = false;
  8759. for (start = pos = indent = offset = 0, len = s.length; pos < len; pos++) {
  8760. ch = s.charCodeAt(pos);
  8761. if (!indent_found) {
  8762. if (isSpace(ch)) {
  8763. indent++;
  8764. if (ch === 0x09) {
  8765. offset += 4 - offset % 4;
  8766. } else {
  8767. offset++;
  8768. }
  8769. continue;
  8770. } else {
  8771. indent_found = true;
  8772. }
  8773. }
  8774. if (ch === 0x0A || pos === len - 1) {
  8775. if (ch !== 0x0A) { pos++; }
  8776. this.bMarks.push(start);
  8777. this.eMarks.push(pos);
  8778. this.tShift.push(indent);
  8779. this.sCount.push(offset);
  8780. this.bsCount.push(0);
  8781. indent_found = false;
  8782. indent = 0;
  8783. offset = 0;
  8784. start = pos + 1;
  8785. }
  8786. }
  8787. // Push fake entry to simplify cache bounds checks
  8788. this.bMarks.push(s.length);
  8789. this.eMarks.push(s.length);
  8790. this.tShift.push(0);
  8791. this.sCount.push(0);
  8792. this.bsCount.push(0);
  8793. this.lineMax = this.bMarks.length - 1; // don't count last fake line
  8794. }
  8795. // Push new token to "stream".
  8796. //
  8797. StateBlock.prototype.push = function (type, tag, nesting) {
  8798. var token = new Token(type, tag, nesting);
  8799. token.block = true;
  8800. if (nesting < 0) { this.level--; }
  8801. token.level = this.level;
  8802. if (nesting > 0) { this.level++; }
  8803. this.tokens.push(token);
  8804. return token;
  8805. };
  8806. StateBlock.prototype.isEmpty = function isEmpty(line) {
  8807. return this.bMarks[line] + this.tShift[line] >= this.eMarks[line];
  8808. };
  8809. StateBlock.prototype.skipEmptyLines = function skipEmptyLines(from) {
  8810. for (var max = this.lineMax; from < max; from++) {
  8811. if (this.bMarks[from] + this.tShift[from] < this.eMarks[from]) {
  8812. break;
  8813. }
  8814. }
  8815. return from;
  8816. };
  8817. // Skip spaces from given position.
  8818. StateBlock.prototype.skipSpaces = function skipSpaces(pos) {
  8819. var ch;
  8820. for (var max = this.src.length; pos < max; pos++) {
  8821. ch = this.src.charCodeAt(pos);
  8822. if (!isSpace(ch)) { break; }
  8823. }
  8824. return pos;
  8825. };
  8826. // Skip spaces from given position in reverse.
  8827. StateBlock.prototype.skipSpacesBack = function skipSpacesBack(pos, min) {
  8828. if (pos <= min) { return pos; }
  8829. while (pos > min) {
  8830. if (!isSpace(this.src.charCodeAt(--pos))) { return pos + 1; }
  8831. }
  8832. return pos;
  8833. };
  8834. // Skip char codes from given position
  8835. StateBlock.prototype.skipChars = function skipChars(pos, code) {
  8836. for (var max = this.src.length; pos < max; pos++) {
  8837. if (this.src.charCodeAt(pos) !== code) { break; }
  8838. }
  8839. return pos;
  8840. };
  8841. // Skip char codes reverse from given position - 1
  8842. StateBlock.prototype.skipCharsBack = function skipCharsBack(pos, code, min) {
  8843. if (pos <= min) { return pos; }
  8844. while (pos > min) {
  8845. if (code !== this.src.charCodeAt(--pos)) { return pos + 1; }
  8846. }
  8847. return pos;
  8848. };
  8849. // cut lines range from source.
  8850. StateBlock.prototype.getLines = function getLines(begin, end, indent, keepLastLF) {
  8851. var i, lineIndent, ch, first, last, queue, lineStart,
  8852. line = begin;
  8853. if (begin >= end) {
  8854. return '';
  8855. }
  8856. queue = new Array(end - begin);
  8857. for (i = 0; line < end; line++, i++) {
  8858. lineIndent = 0;
  8859. lineStart = first = this.bMarks[line];
  8860. if (line + 1 < end || keepLastLF) {
  8861. // No need for bounds check because we have fake entry on tail.
  8862. last = this.eMarks[line] + 1;
  8863. } else {
  8864. last = this.eMarks[line];
  8865. }
  8866. while (first < last && lineIndent < indent) {
  8867. ch = this.src.charCodeAt(first);
  8868. if (isSpace(ch)) {
  8869. if (ch === 0x09) {
  8870. lineIndent += 4 - (lineIndent + this.bsCount[line]) % 4;
  8871. } else {
  8872. lineIndent++;
  8873. }
  8874. } else if (first - lineStart < this.tShift[line]) {
  8875. // patched tShift masked characters to look like spaces (blockquotes, list markers)
  8876. lineIndent++;
  8877. } else {
  8878. break;
  8879. }
  8880. first++;
  8881. }
  8882. if (lineIndent > indent) {
  8883. // partially expanding tabs in code blocks, e.g '\t\tfoobar'
  8884. // with indent=2 becomes ' \tfoobar'
  8885. queue[i] = new Array(lineIndent - indent + 1).join(' ') + this.src.slice(first, last);
  8886. } else {
  8887. queue[i] = this.src.slice(first, last);
  8888. }
  8889. }
  8890. return queue.join('');
  8891. };
  8892. // re-export Token class to use in block rules
  8893. StateBlock.prototype.Token = Token;
  8894. module.exports = StateBlock;
  8895. /***/ }),
  8896. /* 54 */
  8897. /***/ (function(module, exports, __webpack_require__) {
  8898. "use strict";
  8899. // GFM table, non-standard
  8900. var isSpace = __webpack_require__(0).isSpace;
  8901. function getLine(state, line) {
  8902. var pos = state.bMarks[line] + state.blkIndent,
  8903. max = state.eMarks[line];
  8904. return state.src.substr(pos, max - pos);
  8905. }
  8906. function escapedSplit(str) {
  8907. var result = [],
  8908. pos = 0,
  8909. max = str.length,
  8910. ch,
  8911. escapes = 0,
  8912. lastPos = 0,
  8913. backTicked = false,
  8914. lastBackTick = 0;
  8915. ch = str.charCodeAt(pos);
  8916. while (pos < max) {
  8917. if (ch === 0x60/* ` */) {
  8918. if (backTicked) {
  8919. // make \` close code sequence, but not open it;
  8920. // the reason is: `\` is correct code block
  8921. backTicked = false;
  8922. lastBackTick = pos;
  8923. } else if (escapes % 2 === 0) {
  8924. backTicked = true;
  8925. lastBackTick = pos;
  8926. }
  8927. } else if (ch === 0x7c/* | */ && (escapes % 2 === 0) && !backTicked) {
  8928. result.push(str.substring(lastPos, pos));
  8929. lastPos = pos + 1;
  8930. }
  8931. if (ch === 0x5c/* \ */) {
  8932. escapes++;
  8933. } else {
  8934. escapes = 0;
  8935. }
  8936. pos++;
  8937. // If there was an un-closed backtick, go back to just after
  8938. // the last backtick, but as if it was a normal character
  8939. if (pos === max && backTicked) {
  8940. backTicked = false;
  8941. pos = lastBackTick + 1;
  8942. }
  8943. ch = str.charCodeAt(pos);
  8944. }
  8945. result.push(str.substring(lastPos));
  8946. return result;
  8947. }
  8948. module.exports = function table(state, startLine, endLine, silent) {
  8949. var ch, lineText, pos, i, nextLine, columns, columnCount, token,
  8950. aligns, t, tableLines, tbodyLines;
  8951. // should have at least two lines
  8952. if (startLine + 2 > endLine) { return false; }
  8953. nextLine = startLine + 1;
  8954. if (state.sCount[nextLine] < state.blkIndent) { return false; }
  8955. // if it's indented more than 3 spaces, it should be a code block
  8956. if (state.sCount[nextLine] - state.blkIndent >= 4) { return false; }
  8957. // first character of the second line should be '|', '-', ':',
  8958. // and no other characters are allowed but spaces;
  8959. // basically, this is the equivalent of /^[-:|][-:|\s]*$/ regexp
  8960. pos = state.bMarks[nextLine] + state.tShift[nextLine];
  8961. if (pos >= state.eMarks[nextLine]) { return false; }
  8962. ch = state.src.charCodeAt(pos++);
  8963. if (ch !== 0x7C/* | */ && ch !== 0x2D/* - */ && ch !== 0x3A/* : */) { return false; }
  8964. while (pos < state.eMarks[nextLine]) {
  8965. ch = state.src.charCodeAt(pos);
  8966. if (ch !== 0x7C/* | */ && ch !== 0x2D/* - */ && ch !== 0x3A/* : */ && !isSpace(ch)) { return false; }
  8967. pos++;
  8968. }
  8969. lineText = getLine(state, startLine + 1);
  8970. columns = lineText.split('|');
  8971. aligns = [];
  8972. for (i = 0; i < columns.length; i++) {
  8973. t = columns[i].trim();
  8974. if (!t) {
  8975. // allow empty columns before and after table, but not in between columns;
  8976. // e.g. allow ` |---| `, disallow ` ---||--- `
  8977. if (i === 0 || i === columns.length - 1) {
  8978. continue;
  8979. } else {
  8980. return false;
  8981. }
  8982. }
  8983. if (!/^:?-+:?$/.test(t)) { return false; }
  8984. if (t.charCodeAt(t.length - 1) === 0x3A/* : */) {
  8985. aligns.push(t.charCodeAt(0) === 0x3A/* : */ ? 'center' : 'right');
  8986. } else if (t.charCodeAt(0) === 0x3A/* : */) {
  8987. aligns.push('left');
  8988. } else {
  8989. aligns.push('');
  8990. }
  8991. }
  8992. lineText = getLine(state, startLine).trim();
  8993. if (lineText.indexOf('|') === -1) { return false; }
  8994. if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
  8995. columns = escapedSplit(lineText.replace(/^\||\|$/g, ''));
  8996. // header row will define an amount of columns in the entire table,
  8997. // and align row shouldn't be smaller than that (the rest of the rows can)
  8998. columnCount = columns.length;
  8999. if (columnCount > aligns.length) { return false; }
  9000. if (silent) { return true; }
  9001. token = state.push('table_open', 'table', 1);
  9002. token.map = tableLines = [ startLine, 0 ];
  9003. token = state.push('thead_open', 'thead', 1);
  9004. token.map = [ startLine, startLine + 1 ];
  9005. token = state.push('tr_open', 'tr', 1);
  9006. token.map = [ startLine, startLine + 1 ];
  9007. for (i = 0; i < columns.length; i++) {
  9008. token = state.push('th_open', 'th', 1);
  9009. token.map = [ startLine, startLine + 1 ];
  9010. if (aligns[i]) {
  9011. token.attrs = [ [ 'style', 'text-align:' + aligns[i] ] ];
  9012. }
  9013. token = state.push('inline', '', 0);
  9014. token.content = columns[i].trim();
  9015. token.map = [ startLine, startLine + 1 ];
  9016. token.children = [];
  9017. token = state.push('th_close', 'th', -1);
  9018. }
  9019. token = state.push('tr_close', 'tr', -1);
  9020. token = state.push('thead_close', 'thead', -1);
  9021. token = state.push('tbody_open', 'tbody', 1);
  9022. token.map = tbodyLines = [ startLine + 2, 0 ];
  9023. for (nextLine = startLine + 2; nextLine < endLine; nextLine++) {
  9024. if (state.sCount[nextLine] < state.blkIndent) { break; }
  9025. lineText = getLine(state, nextLine).trim();
  9026. if (lineText.indexOf('|') === -1) { break; }
  9027. if (state.sCount[nextLine] - state.blkIndent >= 4) { break; }
  9028. columns = escapedSplit(lineText.replace(/^\||\|$/g, ''));
  9029. token = state.push('tr_open', 'tr', 1);
  9030. for (i = 0; i < columnCount; i++) {
  9031. token = state.push('td_open', 'td', 1);
  9032. if (aligns[i]) {
  9033. token.attrs = [ [ 'style', 'text-align:' + aligns[i] ] ];
  9034. }
  9035. token = state.push('inline', '', 0);
  9036. token.content = columns[i] ? columns[i].trim() : '';
  9037. token.children = [];
  9038. token = state.push('td_close', 'td', -1);
  9039. }
  9040. token = state.push('tr_close', 'tr', -1);
  9041. }
  9042. token = state.push('tbody_close', 'tbody', -1);
  9043. token = state.push('table_close', 'table', -1);
  9044. tableLines[1] = tbodyLines[1] = nextLine;
  9045. state.line = nextLine;
  9046. return true;
  9047. };
  9048. /***/ }),
  9049. /* 55 */
  9050. /***/ (function(module, exports, __webpack_require__) {
  9051. "use strict";
  9052. module.exports = function block(state) {
  9053. var token;
  9054. if (state.inlineMode) {
  9055. token = new state.Token('inline', '', 0);
  9056. token.content = state.src;
  9057. token.map = [ 0, 1 ];
  9058. token.children = [];
  9059. state.tokens.push(token);
  9060. } else {
  9061. state.md.block.parse(state.src, state.md, state.env, state.tokens);
  9062. }
  9063. };
  9064. /***/ }),
  9065. /* 56 */
  9066. /***/ (function(module, exports, __webpack_require__) {
  9067. "use strict";
  9068. module.exports = function inline(state) {
  9069. var tokens = state.tokens, tok, i, l;
  9070. // Parse inlines
  9071. for (i = 0, l = tokens.length; i < l; i++) {
  9072. tok = tokens[i];
  9073. if (tok.type === 'inline') {
  9074. state.md.inline.parse(tok.content, state.md, state.env, tok.children);
  9075. }
  9076. }
  9077. };
  9078. /***/ }),
  9079. /* 57 */
  9080. /***/ (function(module, exports, __webpack_require__) {
  9081. "use strict";
  9082. // Replace link-like texts with link nodes.
  9083. //
  9084. // Currently restricted by `md.validateLink()` to http/https/ftp
  9085. //
  9086. var arrayReplaceAt = __webpack_require__(0).arrayReplaceAt;
  9087. function isLinkOpen(str) {
  9088. return /^<a[>\s]/i.test(str);
  9089. }
  9090. function isLinkClose(str) {
  9091. return /^<\/a\s*>/i.test(str);
  9092. }
  9093. module.exports = function linkify(state) {
  9094. var i, j, l, tokens, token, currentToken, nodes, ln, text, pos, lastPos,
  9095. level, htmlLinkLevel, url, fullUrl, urlText,
  9096. blockTokens = state.tokens,
  9097. links;
  9098. if (!state.md.options.linkify) { return; }
  9099. for (j = 0, l = blockTokens.length; j < l; j++) {
  9100. if (blockTokens[j].type !== 'inline' ||
  9101. !state.md.linkify.pretest(blockTokens[j].content)) {
  9102. continue;
  9103. }
  9104. tokens = blockTokens[j].children;
  9105. htmlLinkLevel = 0;
  9106. // We scan from the end, to keep position when new tags added.
  9107. // Use reversed logic in links start/end match
  9108. for (i = tokens.length - 1; i >= 0; i--) {
  9109. currentToken = tokens[i];
  9110. // Skip content of markdown links
  9111. if (currentToken.type === 'link_close') {
  9112. i--;
  9113. while (tokens[i].level !== currentToken.level && tokens[i].type !== 'link_open') {
  9114. i--;
  9115. }
  9116. continue;
  9117. }
  9118. // Skip content of html tag links
  9119. if (currentToken.type === 'html_inline') {
  9120. if (isLinkOpen(currentToken.content) && htmlLinkLevel > 0) {
  9121. htmlLinkLevel--;
  9122. }
  9123. if (isLinkClose(currentToken.content)) {
  9124. htmlLinkLevel++;
  9125. }
  9126. }
  9127. if (htmlLinkLevel > 0) { continue; }
  9128. if (currentToken.type === 'text' && state.md.linkify.test(currentToken.content)) {
  9129. text = currentToken.content;
  9130. links = state.md.linkify.match(text);
  9131. // Now split string to nodes
  9132. nodes = [];
  9133. level = currentToken.level;
  9134. lastPos = 0;
  9135. for (ln = 0; ln < links.length; ln++) {
  9136. url = links[ln].url;
  9137. fullUrl = state.md.normalizeLink(url);
  9138. if (!state.md.validateLink(fullUrl)) { continue; }
  9139. urlText = links[ln].text;
  9140. // Linkifier might send raw hostnames like "example.com", where url
  9141. // starts with domain name. So we prepend http:// in those cases,
  9142. // and remove it afterwards.
  9143. //
  9144. if (!links[ln].schema) {
  9145. urlText = state.md.normalizeLinkText('http://' + urlText).replace(/^http:\/\//, '');
  9146. } else if (links[ln].schema === 'mailto:' && !/^mailto:/i.test(urlText)) {
  9147. urlText = state.md.normalizeLinkText('mailto:' + urlText).replace(/^mailto:/, '');
  9148. } else {
  9149. urlText = state.md.normalizeLinkText(urlText);
  9150. }
  9151. pos = links[ln].index;
  9152. if (pos > lastPos) {
  9153. token = new state.Token('text', '', 0);
  9154. token.content = text.slice(lastPos, pos);
  9155. token.level = level;
  9156. nodes.push(token);
  9157. }
  9158. token = new state.Token('link_open', 'a', 1);
  9159. token.attrs = [ [ 'href', fullUrl ] ];
  9160. token.level = level++;
  9161. token.markup = 'linkify';
  9162. token.info = 'auto';
  9163. nodes.push(token);
  9164. token = new state.Token('text', '', 0);
  9165. token.content = urlText;
  9166. token.level = level;
  9167. nodes.push(token);
  9168. token = new state.Token('link_close', 'a', -1);
  9169. token.level = --level;
  9170. token.markup = 'linkify';
  9171. token.info = 'auto';
  9172. nodes.push(token);
  9173. lastPos = links[ln].lastIndex;
  9174. }
  9175. if (lastPos < text.length) {
  9176. token = new state.Token('text', '', 0);
  9177. token.content = text.slice(lastPos);
  9178. token.level = level;
  9179. nodes.push(token);
  9180. }
  9181. // replace current node
  9182. blockTokens[j].children = tokens = arrayReplaceAt(tokens, i, nodes);
  9183. }
  9184. }
  9185. }
  9186. };
  9187. /***/ }),
  9188. /* 58 */
  9189. /***/ (function(module, exports, __webpack_require__) {
  9190. "use strict";
  9191. // Normalize input string
  9192. var NEWLINES_RE = /\r[\n\u0085]?|[\u2424\u2028\u0085]/g;
  9193. var NULL_RE = /\u0000/g;
  9194. module.exports = function inline(state) {
  9195. var str;
  9196. // Normalize newlines
  9197. str = state.src.replace(NEWLINES_RE, '\n');
  9198. // Replace NULL characters
  9199. str = str.replace(NULL_RE, '\uFFFD');
  9200. state.src = str;
  9201. };
  9202. /***/ }),
  9203. /* 59 */
  9204. /***/ (function(module, exports, __webpack_require__) {
  9205. "use strict";
  9206. // Simple typographyc replacements
  9207. //
  9208. // (c) (C) → ©
  9209. // (tm) (TM) → ™
  9210. // (r) (R) → ®
  9211. // +- → ±
  9212. // (p) (P) -> §
  9213. // ... → … (also ?.... → ?.., !.... → !..)
  9214. // ???????? → ???, !!!!! → !!!, `,,` → `,`
  9215. // -- → &ndash;, --- → &mdash;
  9216. //
  9217. // TODO:
  9218. // - fractionals 1/2, 1/4, 3/4 -> ½, ¼, ¾
  9219. // - miltiplication 2 x 4 -> 2 × 4
  9220. var RARE_RE = /\+-|\.\.|\?\?\?\?|!!!!|,,|--/;
  9221. // Workaround for phantomjs - need regex without /g flag,
  9222. // or root check will fail every second time
  9223. var SCOPED_ABBR_TEST_RE = /\((c|tm|r|p)\)/i;
  9224. var SCOPED_ABBR_RE = /\((c|tm|r|p)\)/ig;
  9225. var SCOPED_ABBR = {
  9226. c: '©',
  9227. r: '®',
  9228. p: '§',
  9229. tm: '™'
  9230. };
  9231. function replaceFn(match, name) {
  9232. return SCOPED_ABBR[name.toLowerCase()];
  9233. }
  9234. function replace_scoped(inlineTokens) {
  9235. var i, token, inside_autolink = 0;
  9236. for (i = inlineTokens.length - 1; i >= 0; i--) {
  9237. token = inlineTokens[i];
  9238. if (token.type === 'text' && !inside_autolink) {
  9239. token.content = token.content.replace(SCOPED_ABBR_RE, replaceFn);
  9240. }
  9241. if (token.type === 'link_open' && token.info === 'auto') {
  9242. inside_autolink--;
  9243. }
  9244. if (token.type === 'link_close' && token.info === 'auto') {
  9245. inside_autolink++;
  9246. }
  9247. }
  9248. }
  9249. function replace_rare(inlineTokens) {
  9250. var i, token, inside_autolink = 0;
  9251. for (i = inlineTokens.length - 1; i >= 0; i--) {
  9252. token = inlineTokens[i];
  9253. if (token.type === 'text' && !inside_autolink) {
  9254. if (RARE_RE.test(token.content)) {
  9255. token.content = token.content
  9256. .replace(/\+-/g, '±')
  9257. // .., ..., ....... -> …
  9258. // but ?..... & !..... -> ?.. & !..
  9259. .replace(/\.{2,}/g, '…').replace(/([?!])…/g, '$1..')
  9260. .replace(/([?!]){4,}/g, '$1$1$1').replace(/,{2,}/g, ',')
  9261. // em-dash
  9262. .replace(/(^|[^-])---([^-]|$)/mg, '$1\u2014$2')
  9263. // en-dash
  9264. .replace(/(^|\s)--(\s|$)/mg, '$1\u2013$2')
  9265. .replace(/(^|[^-\s])--([^-\s]|$)/mg, '$1\u2013$2');
  9266. }
  9267. }
  9268. if (token.type === 'link_open' && token.info === 'auto') {
  9269. inside_autolink--;
  9270. }
  9271. if (token.type === 'link_close' && token.info === 'auto') {
  9272. inside_autolink++;
  9273. }
  9274. }
  9275. }
  9276. module.exports = function replace(state) {
  9277. var blkIdx;
  9278. if (!state.md.options.typographer) { return; }
  9279. for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {
  9280. if (state.tokens[blkIdx].type !== 'inline') { continue; }
  9281. if (SCOPED_ABBR_TEST_RE.test(state.tokens[blkIdx].content)) {
  9282. replace_scoped(state.tokens[blkIdx].children);
  9283. }
  9284. if (RARE_RE.test(state.tokens[blkIdx].content)) {
  9285. replace_rare(state.tokens[blkIdx].children);
  9286. }
  9287. }
  9288. };
  9289. /***/ }),
  9290. /* 60 */
  9291. /***/ (function(module, exports, __webpack_require__) {
  9292. "use strict";
  9293. // Convert straight quotation marks to typographic ones
  9294. //
  9295. var isWhiteSpace = __webpack_require__(0).isWhiteSpace;
  9296. var isPunctChar = __webpack_require__(0).isPunctChar;
  9297. var isMdAsciiPunct = __webpack_require__(0).isMdAsciiPunct;
  9298. var QUOTE_TEST_RE = /['"]/;
  9299. var QUOTE_RE = /['"]/g;
  9300. var APOSTROPHE = '\u2019'; /* ’ */
  9301. function replaceAt(str, index, ch) {
  9302. return str.substr(0, index) + ch + str.substr(index + 1);
  9303. }
  9304. function process_inlines(tokens, state) {
  9305. var i, token, text, t, pos, max, thisLevel, item, lastChar, nextChar,
  9306. isLastPunctChar, isNextPunctChar, isLastWhiteSpace, isNextWhiteSpace,
  9307. canOpen, canClose, j, isSingle, stack, openQuote, closeQuote;
  9308. stack = [];
  9309. for (i = 0; i < tokens.length; i++) {
  9310. token = tokens[i];
  9311. thisLevel = tokens[i].level;
  9312. for (j = stack.length - 1; j >= 0; j--) {
  9313. if (stack[j].level <= thisLevel) { break; }
  9314. }
  9315. stack.length = j + 1;
  9316. if (token.type !== 'text') { continue; }
  9317. text = token.content;
  9318. pos = 0;
  9319. max = text.length;
  9320. /*eslint no-labels:0,block-scoped-var:0*/
  9321. OUTER:
  9322. while (pos < max) {
  9323. QUOTE_RE.lastIndex = pos;
  9324. t = QUOTE_RE.exec(text);
  9325. if (!t) { break; }
  9326. canOpen = canClose = true;
  9327. pos = t.index + 1;
  9328. isSingle = (t[0] === "'");
  9329. // Find previous character,
  9330. // default to space if it's the beginning of the line
  9331. //
  9332. lastChar = 0x20;
  9333. if (t.index - 1 >= 0) {
  9334. lastChar = text.charCodeAt(t.index - 1);
  9335. } else {
  9336. for (j = i - 1; j >= 0; j--) {
  9337. if (tokens[j].type !== 'text') { continue; }
  9338. lastChar = tokens[j].content.charCodeAt(tokens[j].content.length - 1);
  9339. break;
  9340. }
  9341. }
  9342. // Find next character,
  9343. // default to space if it's the end of the line
  9344. //
  9345. nextChar = 0x20;
  9346. if (pos < max) {
  9347. nextChar = text.charCodeAt(pos);
  9348. } else {
  9349. for (j = i + 1; j < tokens.length; j++) {
  9350. if (tokens[j].type !== 'text') { continue; }
  9351. nextChar = tokens[j].content.charCodeAt(0);
  9352. break;
  9353. }
  9354. }
  9355. isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar));
  9356. isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));
  9357. isLastWhiteSpace = isWhiteSpace(lastChar);
  9358. isNextWhiteSpace = isWhiteSpace(nextChar);
  9359. if (isNextWhiteSpace) {
  9360. canOpen = false;
  9361. } else if (isNextPunctChar) {
  9362. if (!(isLastWhiteSpace || isLastPunctChar)) {
  9363. canOpen = false;
  9364. }
  9365. }
  9366. if (isLastWhiteSpace) {
  9367. canClose = false;
  9368. } else if (isLastPunctChar) {
  9369. if (!(isNextWhiteSpace || isNextPunctChar)) {
  9370. canClose = false;
  9371. }
  9372. }
  9373. if (nextChar === 0x22 /* " */ && t[0] === '"') {
  9374. if (lastChar >= 0x30 /* 0 */ && lastChar <= 0x39 /* 9 */) {
  9375. // special case: 1"" - count first quote as an inch
  9376. canClose = canOpen = false;
  9377. }
  9378. }
  9379. if (canOpen && canClose) {
  9380. // treat this as the middle of the word
  9381. canOpen = false;
  9382. canClose = isNextPunctChar;
  9383. }
  9384. if (!canOpen && !canClose) {
  9385. // middle of word
  9386. if (isSingle) {
  9387. token.content = replaceAt(token.content, t.index, APOSTROPHE);
  9388. }
  9389. continue;
  9390. }
  9391. if (canClose) {
  9392. // this could be a closing quote, rewind the stack to get a match
  9393. for (j = stack.length - 1; j >= 0; j--) {
  9394. item = stack[j];
  9395. if (stack[j].level < thisLevel) { break; }
  9396. if (item.single === isSingle && stack[j].level === thisLevel) {
  9397. item = stack[j];
  9398. if (isSingle) {
  9399. openQuote = state.md.options.quotes[2];
  9400. closeQuote = state.md.options.quotes[3];
  9401. } else {
  9402. openQuote = state.md.options.quotes[0];
  9403. closeQuote = state.md.options.quotes[1];
  9404. }
  9405. // replace token.content *before* tokens[item.token].content,
  9406. // because, if they are pointing at the same token, replaceAt
  9407. // could mess up indices when quote length != 1
  9408. token.content = replaceAt(token.content, t.index, closeQuote);
  9409. tokens[item.token].content = replaceAt(
  9410. tokens[item.token].content, item.pos, openQuote);
  9411. pos += closeQuote.length - 1;
  9412. if (item.token === i) { pos += openQuote.length - 1; }
  9413. text = token.content;
  9414. max = text.length;
  9415. stack.length = j;
  9416. continue OUTER;
  9417. }
  9418. }
  9419. }
  9420. if (canOpen) {
  9421. stack.push({
  9422. token: i,
  9423. pos: t.index,
  9424. single: isSingle,
  9425. level: thisLevel
  9426. });
  9427. } else if (canClose && isSingle) {
  9428. token.content = replaceAt(token.content, t.index, APOSTROPHE);
  9429. }
  9430. }
  9431. }
  9432. }
  9433. module.exports = function smartquotes(state) {
  9434. /*eslint max-depth:0*/
  9435. var blkIdx;
  9436. if (!state.md.options.typographer) { return; }
  9437. for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {
  9438. if (state.tokens[blkIdx].type !== 'inline' ||
  9439. !QUOTE_TEST_RE.test(state.tokens[blkIdx].content)) {
  9440. continue;
  9441. }
  9442. process_inlines(state.tokens[blkIdx].children, state);
  9443. }
  9444. };
  9445. /***/ }),
  9446. /* 61 */
  9447. /***/ (function(module, exports, __webpack_require__) {
  9448. "use strict";
  9449. // Core state object
  9450. //
  9451. var Token = __webpack_require__(4);
  9452. function StateCore(src, md, env) {
  9453. this.src = src;
  9454. this.env = env;
  9455. this.tokens = [];
  9456. this.inlineMode = false;
  9457. this.md = md; // link to parser instance
  9458. }
  9459. // re-export Token class to use in core rules
  9460. StateCore.prototype.Token = Token;
  9461. module.exports = StateCore;
  9462. /***/ }),
  9463. /* 62 */
  9464. /***/ (function(module, exports, __webpack_require__) {
  9465. "use strict";
  9466. // Process autolinks '<protocol:...>'
  9467. /*eslint max-len:0*/
  9468. var EMAIL_RE = /^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/;
  9469. var AUTOLINK_RE = /^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;
  9470. module.exports = function autolink(state, silent) {
  9471. var tail, linkMatch, emailMatch, url, fullUrl, token,
  9472. pos = state.pos;
  9473. if (state.src.charCodeAt(pos) !== 0x3C/* < */) { return false; }
  9474. tail = state.src.slice(pos);
  9475. if (tail.indexOf('>') < 0) { return false; }
  9476. if (AUTOLINK_RE.test(tail)) {
  9477. linkMatch = tail.match(AUTOLINK_RE);
  9478. url = linkMatch[0].slice(1, -1);
  9479. fullUrl = state.md.normalizeLink(url);
  9480. if (!state.md.validateLink(fullUrl)) { return false; }
  9481. if (!silent) {
  9482. token = state.push('link_open', 'a', 1);
  9483. token.attrs = [ [ 'href', fullUrl ] ];
  9484. token.markup = 'autolink';
  9485. token.info = 'auto';
  9486. token = state.push('text', '', 0);
  9487. token.content = state.md.normalizeLinkText(url);
  9488. token = state.push('link_close', 'a', -1);
  9489. token.markup = 'autolink';
  9490. token.info = 'auto';
  9491. }
  9492. state.pos += linkMatch[0].length;
  9493. return true;
  9494. }
  9495. if (EMAIL_RE.test(tail)) {
  9496. emailMatch = tail.match(EMAIL_RE);
  9497. url = emailMatch[0].slice(1, -1);
  9498. fullUrl = state.md.normalizeLink('mailto:' + url);
  9499. if (!state.md.validateLink(fullUrl)) { return false; }
  9500. if (!silent) {
  9501. token = state.push('link_open', 'a', 1);
  9502. token.attrs = [ [ 'href', fullUrl ] ];
  9503. token.markup = 'autolink';
  9504. token.info = 'auto';
  9505. token = state.push('text', '', 0);
  9506. token.content = state.md.normalizeLinkText(url);
  9507. token = state.push('link_close', 'a', -1);
  9508. token.markup = 'autolink';
  9509. token.info = 'auto';
  9510. }
  9511. state.pos += emailMatch[0].length;
  9512. return true;
  9513. }
  9514. return false;
  9515. };
  9516. /***/ }),
  9517. /* 63 */
  9518. /***/ (function(module, exports, __webpack_require__) {
  9519. "use strict";
  9520. // Parse backticks
  9521. module.exports = function backtick(state, silent) {
  9522. var start, max, marker, matchStart, matchEnd, token,
  9523. pos = state.pos,
  9524. ch = state.src.charCodeAt(pos);
  9525. if (ch !== 0x60/* ` */) { return false; }
  9526. start = pos;
  9527. pos++;
  9528. max = state.posMax;
  9529. while (pos < max && state.src.charCodeAt(pos) === 0x60/* ` */) { pos++; }
  9530. marker = state.src.slice(start, pos);
  9531. matchStart = matchEnd = pos;
  9532. while ((matchStart = state.src.indexOf('`', matchEnd)) !== -1) {
  9533. matchEnd = matchStart + 1;
  9534. while (matchEnd < max && state.src.charCodeAt(matchEnd) === 0x60/* ` */) { matchEnd++; }
  9535. if (matchEnd - matchStart === marker.length) {
  9536. if (!silent) {
  9537. token = state.push('code_inline', 'code', 0);
  9538. token.markup = marker;
  9539. token.content = state.src.slice(pos, matchStart)
  9540. .replace(/[ \n]+/g, ' ')
  9541. .trim();
  9542. }
  9543. state.pos = matchEnd;
  9544. return true;
  9545. }
  9546. }
  9547. if (!silent) { state.pending += marker; }
  9548. state.pos += marker.length;
  9549. return true;
  9550. };
  9551. /***/ }),
  9552. /* 64 */
  9553. /***/ (function(module, exports, __webpack_require__) {
  9554. "use strict";
  9555. // For each opening emphasis-like marker find a matching closing one
  9556. //
  9557. module.exports = function link_pairs(state) {
  9558. var i, j, lastDelim, currDelim,
  9559. delimiters = state.delimiters,
  9560. max = state.delimiters.length;
  9561. for (i = 0; i < max; i++) {
  9562. lastDelim = delimiters[i];
  9563. if (!lastDelim.close) { continue; }
  9564. j = i - lastDelim.jump - 1;
  9565. while (j >= 0) {
  9566. currDelim = delimiters[j];
  9567. if (currDelim.open &&
  9568. currDelim.marker === lastDelim.marker &&
  9569. currDelim.end < 0 &&
  9570. currDelim.level === lastDelim.level) {
  9571. // typeofs are for backward compatibility with plugins
  9572. var odd_match = (currDelim.close || lastDelim.open) &&
  9573. typeof currDelim.length !== 'undefined' &&
  9574. typeof lastDelim.length !== 'undefined' &&
  9575. (currDelim.length + lastDelim.length) % 3 === 0;
  9576. if (!odd_match) {
  9577. lastDelim.jump = i - j;
  9578. lastDelim.open = false;
  9579. currDelim.end = i;
  9580. currDelim.jump = 0;
  9581. break;
  9582. }
  9583. }
  9584. j -= currDelim.jump + 1;
  9585. }
  9586. }
  9587. };
  9588. /***/ }),
  9589. /* 65 */
  9590. /***/ (function(module, exports, __webpack_require__) {
  9591. "use strict";
  9592. // Process html entity - &#123;, &#xAF;, &quot;, ...
  9593. var entities = __webpack_require__(11);
  9594. var has = __webpack_require__(0).has;
  9595. var isValidEntityCode = __webpack_require__(0).isValidEntityCode;
  9596. var fromCodePoint = __webpack_require__(0).fromCodePoint;
  9597. var DIGITAL_RE = /^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i;
  9598. var NAMED_RE = /^&([a-z][a-z0-9]{1,31});/i;
  9599. module.exports = function entity(state, silent) {
  9600. var ch, code, match, pos = state.pos, max = state.posMax;
  9601. if (state.src.charCodeAt(pos) !== 0x26/* & */) { return false; }
  9602. if (pos + 1 < max) {
  9603. ch = state.src.charCodeAt(pos + 1);
  9604. if (ch === 0x23 /* # */) {
  9605. match = state.src.slice(pos).match(DIGITAL_RE);
  9606. if (match) {
  9607. if (!silent) {
  9608. code = match[1][0].toLowerCase() === 'x' ? parseInt(match[1].slice(1), 16) : parseInt(match[1], 10);
  9609. state.pending += isValidEntityCode(code) ? fromCodePoint(code) : fromCodePoint(0xFFFD);
  9610. }
  9611. state.pos += match[0].length;
  9612. return true;
  9613. }
  9614. } else {
  9615. match = state.src.slice(pos).match(NAMED_RE);
  9616. if (match) {
  9617. if (has(entities, match[1])) {
  9618. if (!silent) { state.pending += entities[match[1]]; }
  9619. state.pos += match[0].length;
  9620. return true;
  9621. }
  9622. }
  9623. }
  9624. }
  9625. if (!silent) { state.pending += '&'; }
  9626. state.pos++;
  9627. return true;
  9628. };
  9629. /***/ }),
  9630. /* 66 */
  9631. /***/ (function(module, exports, __webpack_require__) {
  9632. "use strict";
  9633. // Proceess escaped chars and hardbreaks
  9634. var isSpace = __webpack_require__(0).isSpace;
  9635. var ESCAPED = [];
  9636. for (var i = 0; i < 256; i++) { ESCAPED.push(0); }
  9637. '\\!"#$%&\'()*+,./:;<=>?@[]^_`{|}~-'
  9638. .split('').forEach(function (ch) { ESCAPED[ch.charCodeAt(0)] = 1; });
  9639. module.exports = function escape(state, silent) {
  9640. var ch, pos = state.pos, max = state.posMax;
  9641. if (state.src.charCodeAt(pos) !== 0x5C/* \ */) { return false; }
  9642. pos++;
  9643. if (pos < max) {
  9644. ch = state.src.charCodeAt(pos);
  9645. if (ch < 256 && ESCAPED[ch] !== 0) {
  9646. if (!silent) { state.pending += state.src[pos]; }
  9647. state.pos += 2;
  9648. return true;
  9649. }
  9650. if (ch === 0x0A) {
  9651. if (!silent) {
  9652. state.push('hardbreak', 'br', 0);
  9653. }
  9654. pos++;
  9655. // skip leading whitespaces from next line
  9656. while (pos < max) {
  9657. ch = state.src.charCodeAt(pos);
  9658. if (!isSpace(ch)) { break; }
  9659. pos++;
  9660. }
  9661. state.pos = pos;
  9662. return true;
  9663. }
  9664. }
  9665. if (!silent) { state.pending += '\\'; }
  9666. state.pos++;
  9667. return true;
  9668. };
  9669. /***/ }),
  9670. /* 67 */
  9671. /***/ (function(module, exports, __webpack_require__) {
  9672. "use strict";
  9673. // Process html tags
  9674. var HTML_TAG_RE = __webpack_require__(12).HTML_TAG_RE;
  9675. function isLetter(ch) {
  9676. /*eslint no-bitwise:0*/
  9677. var lc = ch | 0x20; // to lower case
  9678. return (lc >= 0x61/* a */) && (lc <= 0x7a/* z */);
  9679. }
  9680. module.exports = function html_inline(state, silent) {
  9681. var ch, match, max, token,
  9682. pos = state.pos;
  9683. if (!state.md.options.html) { return false; }
  9684. // Check start
  9685. max = state.posMax;
  9686. if (state.src.charCodeAt(pos) !== 0x3C/* < */ ||
  9687. pos + 2 >= max) {
  9688. return false;
  9689. }
  9690. // Quick fail on second char
  9691. ch = state.src.charCodeAt(pos + 1);
  9692. if (ch !== 0x21/* ! */ &&
  9693. ch !== 0x3F/* ? */ &&
  9694. ch !== 0x2F/* / */ &&
  9695. !isLetter(ch)) {
  9696. return false;
  9697. }
  9698. match = state.src.slice(pos).match(HTML_TAG_RE);
  9699. if (!match) { return false; }
  9700. if (!silent) {
  9701. token = state.push('html_inline', '', 0);
  9702. token.content = state.src.slice(pos, pos + match[0].length);
  9703. }
  9704. state.pos += match[0].length;
  9705. return true;
  9706. };
  9707. /***/ }),
  9708. /* 68 */
  9709. /***/ (function(module, exports, __webpack_require__) {
  9710. "use strict";
  9711. // Process ![image](<src> "title")
  9712. var normalizeReference = __webpack_require__(0).normalizeReference;
  9713. var isSpace = __webpack_require__(0).isSpace;
  9714. module.exports = function image(state, silent) {
  9715. var attrs,
  9716. code,
  9717. content,
  9718. label,
  9719. labelEnd,
  9720. labelStart,
  9721. pos,
  9722. ref,
  9723. res,
  9724. title,
  9725. token,
  9726. tokens,
  9727. start,
  9728. href = '',
  9729. oldPos = state.pos,
  9730. max = state.posMax;
  9731. if (state.src.charCodeAt(state.pos) !== 0x21/* ! */) { return false; }
  9732. if (state.src.charCodeAt(state.pos + 1) !== 0x5B/* [ */) { return false; }
  9733. labelStart = state.pos + 2;
  9734. labelEnd = state.md.helpers.parseLinkLabel(state, state.pos + 1, false);
  9735. // parser failed to find ']', so it's not a valid link
  9736. if (labelEnd < 0) { return false; }
  9737. pos = labelEnd + 1;
  9738. if (pos < max && state.src.charCodeAt(pos) === 0x28/* ( */) {
  9739. //
  9740. // Inline link
  9741. //
  9742. // [link]( <href> "title" )
  9743. // ^^ skipping these spaces
  9744. pos++;
  9745. for (; pos < max; pos++) {
  9746. code = state.src.charCodeAt(pos);
  9747. if (!isSpace(code) && code !== 0x0A) { break; }
  9748. }
  9749. if (pos >= max) { return false; }
  9750. // [link]( <href> "title" )
  9751. // ^^^^^^ parsing link destination
  9752. start = pos;
  9753. res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax);
  9754. if (res.ok) {
  9755. href = state.md.normalizeLink(res.str);
  9756. if (state.md.validateLink(href)) {
  9757. pos = res.pos;
  9758. } else {
  9759. href = '';
  9760. }
  9761. }
  9762. // [link]( <href> "title" )
  9763. // ^^ skipping these spaces
  9764. start = pos;
  9765. for (; pos < max; pos++) {
  9766. code = state.src.charCodeAt(pos);
  9767. if (!isSpace(code) && code !== 0x0A) { break; }
  9768. }
  9769. // [link]( <href> "title" )
  9770. // ^^^^^^^ parsing link title
  9771. res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax);
  9772. if (pos < max && start !== pos && res.ok) {
  9773. title = res.str;
  9774. pos = res.pos;
  9775. // [link]( <href> "title" )
  9776. // ^^ skipping these spaces
  9777. for (; pos < max; pos++) {
  9778. code = state.src.charCodeAt(pos);
  9779. if (!isSpace(code) && code !== 0x0A) { break; }
  9780. }
  9781. } else {
  9782. title = '';
  9783. }
  9784. if (pos >= max || state.src.charCodeAt(pos) !== 0x29/* ) */) {
  9785. state.pos = oldPos;
  9786. return false;
  9787. }
  9788. pos++;
  9789. } else {
  9790. //
  9791. // Link reference
  9792. //
  9793. if (typeof state.env.references === 'undefined') { return false; }
  9794. if (pos < max && state.src.charCodeAt(pos) === 0x5B/* [ */) {
  9795. start = pos + 1;
  9796. pos = state.md.helpers.parseLinkLabel(state, pos);
  9797. if (pos >= 0) {
  9798. label = state.src.slice(start, pos++);
  9799. } else {
  9800. pos = labelEnd + 1;
  9801. }
  9802. } else {
  9803. pos = labelEnd + 1;
  9804. }
  9805. // covers label === '' and label === undefined
  9806. // (collapsed reference link and shortcut reference link respectively)
  9807. if (!label) { label = state.src.slice(labelStart, labelEnd); }
  9808. ref = state.env.references[normalizeReference(label)];
  9809. if (!ref) {
  9810. state.pos = oldPos;
  9811. return false;
  9812. }
  9813. href = ref.href;
  9814. title = ref.title;
  9815. }
  9816. //
  9817. // We found the end of the link, and know for a fact it's a valid link;
  9818. // so all that's left to do is to call tokenizer.
  9819. //
  9820. if (!silent) {
  9821. content = state.src.slice(labelStart, labelEnd);
  9822. state.md.inline.parse(
  9823. content,
  9824. state.md,
  9825. state.env,
  9826. tokens = []
  9827. );
  9828. token = state.push('image', 'img', 0);
  9829. token.attrs = attrs = [ [ 'src', href ], [ 'alt', '' ] ];
  9830. token.children = tokens;
  9831. token.content = content;
  9832. if (title) {
  9833. attrs.push([ 'title', title ]);
  9834. }
  9835. }
  9836. state.pos = pos;
  9837. state.posMax = max;
  9838. return true;
  9839. };
  9840. /***/ }),
  9841. /* 69 */
  9842. /***/ (function(module, exports, __webpack_require__) {
  9843. "use strict";
  9844. // Process [link](<to> "stuff")
  9845. var normalizeReference = __webpack_require__(0).normalizeReference;
  9846. var isSpace = __webpack_require__(0).isSpace;
  9847. module.exports = function link(state, silent) {
  9848. var attrs,
  9849. code,
  9850. label,
  9851. labelEnd,
  9852. labelStart,
  9853. pos,
  9854. res,
  9855. ref,
  9856. title,
  9857. token,
  9858. href = '',
  9859. oldPos = state.pos,
  9860. max = state.posMax,
  9861. start = state.pos,
  9862. parseReference = true;
  9863. if (state.src.charCodeAt(state.pos) !== 0x5B/* [ */) { return false; }
  9864. labelStart = state.pos + 1;
  9865. labelEnd = state.md.helpers.parseLinkLabel(state, state.pos, true);
  9866. // parser failed to find ']', so it's not a valid link
  9867. if (labelEnd < 0) { return false; }
  9868. pos = labelEnd + 1;
  9869. if (pos < max && state.src.charCodeAt(pos) === 0x28/* ( */) {
  9870. //
  9871. // Inline link
  9872. //
  9873. // might have found a valid shortcut link, disable reference parsing
  9874. parseReference = false;
  9875. // [link]( <href> "title" )
  9876. // ^^ skipping these spaces
  9877. pos++;
  9878. for (; pos < max; pos++) {
  9879. code = state.src.charCodeAt(pos);
  9880. if (!isSpace(code) && code !== 0x0A) { break; }
  9881. }
  9882. if (pos >= max) { return false; }
  9883. // [link]( <href> "title" )
  9884. // ^^^^^^ parsing link destination
  9885. start = pos;
  9886. res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax);
  9887. if (res.ok) {
  9888. href = state.md.normalizeLink(res.str);
  9889. if (state.md.validateLink(href)) {
  9890. pos = res.pos;
  9891. } else {
  9892. href = '';
  9893. }
  9894. }
  9895. // [link]( <href> "title" )
  9896. // ^^ skipping these spaces
  9897. start = pos;
  9898. for (; pos < max; pos++) {
  9899. code = state.src.charCodeAt(pos);
  9900. if (!isSpace(code) && code !== 0x0A) { break; }
  9901. }
  9902. // [link]( <href> "title" )
  9903. // ^^^^^^^ parsing link title
  9904. res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax);
  9905. if (pos < max && start !== pos && res.ok) {
  9906. title = res.str;
  9907. pos = res.pos;
  9908. // [link]( <href> "title" )
  9909. // ^^ skipping these spaces
  9910. for (; pos < max; pos++) {
  9911. code = state.src.charCodeAt(pos);
  9912. if (!isSpace(code) && code !== 0x0A) { break; }
  9913. }
  9914. } else {
  9915. title = '';
  9916. }
  9917. if (pos >= max || state.src.charCodeAt(pos) !== 0x29/* ) */) {
  9918. // parsing a valid shortcut link failed, fallback to reference
  9919. parseReference = true;
  9920. }
  9921. pos++;
  9922. }
  9923. if (parseReference) {
  9924. //
  9925. // Link reference
  9926. //
  9927. if (typeof state.env.references === 'undefined') { return false; }
  9928. if (pos < max && state.src.charCodeAt(pos) === 0x5B/* [ */) {
  9929. start = pos + 1;
  9930. pos = state.md.helpers.parseLinkLabel(state, pos);
  9931. if (pos >= 0) {
  9932. label = state.src.slice(start, pos++);
  9933. } else {
  9934. pos = labelEnd + 1;
  9935. }
  9936. } else {
  9937. pos = labelEnd + 1;
  9938. }
  9939. // covers label === '' and label === undefined
  9940. // (collapsed reference link and shortcut reference link respectively)
  9941. if (!label) { label = state.src.slice(labelStart, labelEnd); }
  9942. ref = state.env.references[normalizeReference(label)];
  9943. if (!ref) {
  9944. state.pos = oldPos;
  9945. return false;
  9946. }
  9947. href = ref.href;
  9948. title = ref.title;
  9949. }
  9950. //
  9951. // We found the end of the link, and know for a fact it's a valid link;
  9952. // so all that's left to do is to call tokenizer.
  9953. //
  9954. if (!silent) {
  9955. state.pos = labelStart;
  9956. state.posMax = labelEnd;
  9957. token = state.push('link_open', 'a', 1);
  9958. token.attrs = attrs = [ [ 'href', href ] ];
  9959. if (title) {
  9960. attrs.push([ 'title', title ]);
  9961. }
  9962. state.md.inline.tokenize(state);
  9963. token = state.push('link_close', 'a', -1);
  9964. }
  9965. state.pos = pos;
  9966. state.posMax = max;
  9967. return true;
  9968. };
  9969. /***/ }),
  9970. /* 70 */
  9971. /***/ (function(module, exports, __webpack_require__) {
  9972. "use strict";
  9973. // Proceess '\n'
  9974. var isSpace = __webpack_require__(0).isSpace;
  9975. module.exports = function newline(state, silent) {
  9976. var pmax, max, pos = state.pos;
  9977. if (state.src.charCodeAt(pos) !== 0x0A/* \n */) { return false; }
  9978. pmax = state.pending.length - 1;
  9979. max = state.posMax;
  9980. // ' \n' -> hardbreak
  9981. // Lookup in pending chars is bad practice! Don't copy to other rules!
  9982. // Pending string is stored in concat mode, indexed lookups will cause
  9983. // convertion to flat mode.
  9984. if (!silent) {
  9985. if (pmax >= 0 && state.pending.charCodeAt(pmax) === 0x20) {
  9986. if (pmax >= 1 && state.pending.charCodeAt(pmax - 1) === 0x20) {
  9987. state.pending = state.pending.replace(/ +$/, '');
  9988. state.push('hardbreak', 'br', 0);
  9989. } else {
  9990. state.pending = state.pending.slice(0, -1);
  9991. state.push('softbreak', 'br', 0);
  9992. }
  9993. } else {
  9994. state.push('softbreak', 'br', 0);
  9995. }
  9996. }
  9997. pos++;
  9998. // skip heading spaces for next line
  9999. while (pos < max && isSpace(state.src.charCodeAt(pos))) { pos++; }
  10000. state.pos = pos;
  10001. return true;
  10002. };
  10003. /***/ }),
  10004. /* 71 */
  10005. /***/ (function(module, exports, __webpack_require__) {
  10006. "use strict";
  10007. // Inline parser state
  10008. var Token = __webpack_require__(4);
  10009. var isWhiteSpace = __webpack_require__(0).isWhiteSpace;
  10010. var isPunctChar = __webpack_require__(0).isPunctChar;
  10011. var isMdAsciiPunct = __webpack_require__(0).isMdAsciiPunct;
  10012. function StateInline(src, md, env, outTokens) {
  10013. this.src = src;
  10014. this.env = env;
  10015. this.md = md;
  10016. this.tokens = outTokens;
  10017. this.pos = 0;
  10018. this.posMax = this.src.length;
  10019. this.level = 0;
  10020. this.pending = '';
  10021. this.pendingLevel = 0;
  10022. this.cache = {}; // Stores { start: end } pairs. Useful for backtrack
  10023. // optimization of pairs parse (emphasis, strikes).
  10024. this.delimiters = []; // Emphasis-like delimiters
  10025. }
  10026. // Flush pending text
  10027. //
  10028. StateInline.prototype.pushPending = function () {
  10029. var token = new Token('text', '', 0);
  10030. token.content = this.pending;
  10031. token.level = this.pendingLevel;
  10032. this.tokens.push(token);
  10033. this.pending = '';
  10034. return token;
  10035. };
  10036. // Push new token to "stream".
  10037. // If pending text exists - flush it as text token
  10038. //
  10039. StateInline.prototype.push = function (type, tag, nesting) {
  10040. if (this.pending) {
  10041. this.pushPending();
  10042. }
  10043. var token = new Token(type, tag, nesting);
  10044. if (nesting < 0) { this.level--; }
  10045. token.level = this.level;
  10046. if (nesting > 0) { this.level++; }
  10047. this.pendingLevel = this.level;
  10048. this.tokens.push(token);
  10049. return token;
  10050. };
  10051. // Scan a sequence of emphasis-like markers, and determine whether
  10052. // it can start an emphasis sequence or end an emphasis sequence.
  10053. //
  10054. // - start - position to scan from (it should point at a valid marker);
  10055. // - canSplitWord - determine if these markers can be found inside a word
  10056. //
  10057. StateInline.prototype.scanDelims = function (start, canSplitWord) {
  10058. var pos = start, lastChar, nextChar, count, can_open, can_close,
  10059. isLastWhiteSpace, isLastPunctChar,
  10060. isNextWhiteSpace, isNextPunctChar,
  10061. left_flanking = true,
  10062. right_flanking = true,
  10063. max = this.posMax,
  10064. marker = this.src.charCodeAt(start);
  10065. // treat beginning of the line as a whitespace
  10066. lastChar = start > 0 ? this.src.charCodeAt(start - 1) : 0x20;
  10067. while (pos < max && this.src.charCodeAt(pos) === marker) { pos++; }
  10068. count = pos - start;
  10069. // treat end of the line as a whitespace
  10070. nextChar = pos < max ? this.src.charCodeAt(pos) : 0x20;
  10071. isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar));
  10072. isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));
  10073. isLastWhiteSpace = isWhiteSpace(lastChar);
  10074. isNextWhiteSpace = isWhiteSpace(nextChar);
  10075. if (isNextWhiteSpace) {
  10076. left_flanking = false;
  10077. } else if (isNextPunctChar) {
  10078. if (!(isLastWhiteSpace || isLastPunctChar)) {
  10079. left_flanking = false;
  10080. }
  10081. }
  10082. if (isLastWhiteSpace) {
  10083. right_flanking = false;
  10084. } else if (isLastPunctChar) {
  10085. if (!(isNextWhiteSpace || isNextPunctChar)) {
  10086. right_flanking = false;
  10087. }
  10088. }
  10089. if (!canSplitWord) {
  10090. can_open = left_flanking && (!right_flanking || isLastPunctChar);
  10091. can_close = right_flanking && (!left_flanking || isNextPunctChar);
  10092. } else {
  10093. can_open = left_flanking;
  10094. can_close = right_flanking;
  10095. }
  10096. return {
  10097. can_open: can_open,
  10098. can_close: can_close,
  10099. length: count
  10100. };
  10101. };
  10102. // re-export Token class to use in block rules
  10103. StateInline.prototype.Token = Token;
  10104. module.exports = StateInline;
  10105. /***/ }),
  10106. /* 72 */
  10107. /***/ (function(module, exports, __webpack_require__) {
  10108. "use strict";
  10109. // Skip text characters for text token, place those to pending buffer
  10110. // and increment current pos
  10111. // Rule to skip pure text
  10112. // '{}$%@~+=:' reserved for extentions
  10113. // !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \, ], ^, _, `, {, |, }, or ~
  10114. // !!!! Don't confuse with "Markdown ASCII Punctuation" chars
  10115. // http://spec.commonmark.org/0.15/#ascii-punctuation-character
  10116. function isTerminatorChar(ch) {
  10117. switch (ch) {
  10118. case 0x0A/* \n */:
  10119. case 0x21/* ! */:
  10120. case 0x23/* # */:
  10121. case 0x24/* $ */:
  10122. case 0x25/* % */:
  10123. case 0x26/* & */:
  10124. case 0x2A/* * */:
  10125. case 0x2B/* + */:
  10126. case 0x2D/* - */:
  10127. case 0x3A/* : */:
  10128. case 0x3C/* < */:
  10129. case 0x3D/* = */:
  10130. case 0x3E/* > */:
  10131. case 0x40/* @ */:
  10132. case 0x5B/* [ */:
  10133. case 0x5C/* \ */:
  10134. case 0x5D/* ] */:
  10135. case 0x5E/* ^ */:
  10136. case 0x5F/* _ */:
  10137. case 0x60/* ` */:
  10138. case 0x7B/* { */:
  10139. case 0x7D/* } */:
  10140. case 0x7E/* ~ */:
  10141. return true;
  10142. default:
  10143. return false;
  10144. }
  10145. }
  10146. module.exports = function text(state, silent) {
  10147. var pos = state.pos;
  10148. while (pos < state.posMax && !isTerminatorChar(state.src.charCodeAt(pos))) {
  10149. pos++;
  10150. }
  10151. if (pos === state.pos) { return false; }
  10152. if (!silent) { state.pending += state.src.slice(state.pos, pos); }
  10153. state.pos = pos;
  10154. return true;
  10155. };
  10156. // Alternative implementation, for memory.
  10157. //
  10158. // It costs 10% of performance, but allows extend terminators list, if place it
  10159. // to `ParcerInline` property. Probably, will switch to it sometime, such
  10160. // flexibility required.
  10161. /*
  10162. var TERMINATOR_RE = /[\n!#$%&*+\-:<=>@[\\\]^_`{}~]/;
  10163. module.exports = function text(state, silent) {
  10164. var pos = state.pos,
  10165. idx = state.src.slice(pos).search(TERMINATOR_RE);
  10166. // first char is terminator -> empty text
  10167. if (idx === 0) { return false; }
  10168. // no terminator -> text till end of string
  10169. if (idx < 0) {
  10170. if (!silent) { state.pending += state.src.slice(pos); }
  10171. state.pos = state.src.length;
  10172. return true;
  10173. }
  10174. if (!silent) { state.pending += state.src.slice(pos, pos + idx); }
  10175. state.pos += idx;
  10176. return true;
  10177. };*/
  10178. /***/ }),
  10179. /* 73 */
  10180. /***/ (function(module, exports, __webpack_require__) {
  10181. "use strict";
  10182. // Merge adjacent text nodes into one, and re-calculate all token levels
  10183. //
  10184. module.exports = function text_collapse(state) {
  10185. var curr, last,
  10186. level = 0,
  10187. tokens = state.tokens,
  10188. max = state.tokens.length;
  10189. for (curr = last = 0; curr < max; curr++) {
  10190. // re-calculate levels
  10191. level += tokens[curr].nesting;
  10192. tokens[curr].level = level;
  10193. if (tokens[curr].type === 'text' &&
  10194. curr + 1 < max &&
  10195. tokens[curr + 1].type === 'text') {
  10196. // collapse two adjacent text nodes
  10197. tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content;
  10198. } else {
  10199. if (curr !== last) { tokens[last] = tokens[curr]; }
  10200. last++;
  10201. }
  10202. }
  10203. if (curr !== last) {
  10204. tokens.length = last;
  10205. }
  10206. };
  10207. /***/ }),
  10208. /* 74 */
  10209. /***/ (function(module, exports, __webpack_require__) {
  10210. "use strict";
  10211. /* eslint-disable no-bitwise */
  10212. var decodeCache = {};
  10213. function getDecodeCache(exclude) {
  10214. var i, ch, cache = decodeCache[exclude];
  10215. if (cache) { return cache; }
  10216. cache = decodeCache[exclude] = [];
  10217. for (i = 0; i < 128; i++) {
  10218. ch = String.fromCharCode(i);
  10219. cache.push(ch);
  10220. }
  10221. for (i = 0; i < exclude.length; i++) {
  10222. ch = exclude.charCodeAt(i);
  10223. cache[ch] = '%' + ('0' + ch.toString(16).toUpperCase()).slice(-2);
  10224. }
  10225. return cache;
  10226. }
  10227. // Decode percent-encoded string.
  10228. //
  10229. function decode(string, exclude) {
  10230. var cache;
  10231. if (typeof exclude !== 'string') {
  10232. exclude = decode.defaultChars;
  10233. }
  10234. cache = getDecodeCache(exclude);
  10235. return string.replace(/(%[a-f0-9]{2})+/gi, function(seq) {
  10236. var i, l, b1, b2, b3, b4, chr,
  10237. result = '';
  10238. for (i = 0, l = seq.length; i < l; i += 3) {
  10239. b1 = parseInt(seq.slice(i + 1, i + 3), 16);
  10240. if (b1 < 0x80) {
  10241. result += cache[b1];
  10242. continue;
  10243. }
  10244. if ((b1 & 0xE0) === 0xC0 && (i + 3 < l)) {
  10245. // 110xxxxx 10xxxxxx
  10246. b2 = parseInt(seq.slice(i + 4, i + 6), 16);
  10247. if ((b2 & 0xC0) === 0x80) {
  10248. chr = ((b1 << 6) & 0x7C0) | (b2 & 0x3F);
  10249. if (chr < 0x80) {
  10250. result += '\ufffd\ufffd';
  10251. } else {
  10252. result += String.fromCharCode(chr);
  10253. }
  10254. i += 3;
  10255. continue;
  10256. }
  10257. }
  10258. if ((b1 & 0xF0) === 0xE0 && (i + 6 < l)) {
  10259. // 1110xxxx 10xxxxxx 10xxxxxx
  10260. b2 = parseInt(seq.slice(i + 4, i + 6), 16);
  10261. b3 = parseInt(seq.slice(i + 7, i + 9), 16);
  10262. if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80) {
  10263. chr = ((b1 << 12) & 0xF000) | ((b2 << 6) & 0xFC0) | (b3 & 0x3F);
  10264. if (chr < 0x800 || (chr >= 0xD800 && chr <= 0xDFFF)) {
  10265. result += '\ufffd\ufffd\ufffd';
  10266. } else {
  10267. result += String.fromCharCode(chr);
  10268. }
  10269. i += 6;
  10270. continue;
  10271. }
  10272. }
  10273. if ((b1 & 0xF8) === 0xF0 && (i + 9 < l)) {
  10274. // 111110xx 10xxxxxx 10xxxxxx 10xxxxxx
  10275. b2 = parseInt(seq.slice(i + 4, i + 6), 16);
  10276. b3 = parseInt(seq.slice(i + 7, i + 9), 16);
  10277. b4 = parseInt(seq.slice(i + 10, i + 12), 16);
  10278. if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80 && (b4 & 0xC0) === 0x80) {
  10279. chr = ((b1 << 18) & 0x1C0000) | ((b2 << 12) & 0x3F000) | ((b3 << 6) & 0xFC0) | (b4 & 0x3F);
  10280. if (chr < 0x10000 || chr > 0x10FFFF) {
  10281. result += '\ufffd\ufffd\ufffd\ufffd';
  10282. } else {
  10283. chr -= 0x10000;
  10284. result += String.fromCharCode(0xD800 + (chr >> 10), 0xDC00 + (chr & 0x3FF));
  10285. }
  10286. i += 9;
  10287. continue;
  10288. }
  10289. }
  10290. result += '\ufffd';
  10291. }
  10292. return result;
  10293. });
  10294. }
  10295. decode.defaultChars = ';/?:@&=+$,#';
  10296. decode.componentChars = '';
  10297. module.exports = decode;
  10298. /***/ }),
  10299. /* 75 */
  10300. /***/ (function(module, exports, __webpack_require__) {
  10301. "use strict";
  10302. var encodeCache = {};
  10303. // Create a lookup array where anything but characters in `chars` string
  10304. // and alphanumeric chars is percent-encoded.
  10305. //
  10306. function getEncodeCache(exclude) {
  10307. var i, ch, cache = encodeCache[exclude];
  10308. if (cache) { return cache; }
  10309. cache = encodeCache[exclude] = [];
  10310. for (i = 0; i < 128; i++) {
  10311. ch = String.fromCharCode(i);
  10312. if (/^[0-9a-z]$/i.test(ch)) {
  10313. // always allow unencoded alphanumeric characters
  10314. cache.push(ch);
  10315. } else {
  10316. cache.push('%' + ('0' + i.toString(16).toUpperCase()).slice(-2));
  10317. }
  10318. }
  10319. for (i = 0; i < exclude.length; i++) {
  10320. cache[exclude.charCodeAt(i)] = exclude[i];
  10321. }
  10322. return cache;
  10323. }
  10324. // Encode unsafe characters with percent-encoding, skipping already
  10325. // encoded sequences.
  10326. //
  10327. // - string - string to encode
  10328. // - exclude - list of characters to ignore (in addition to a-zA-Z0-9)
  10329. // - keepEscaped - don't encode '%' in a correct escape sequence (default: true)
  10330. //
  10331. function encode(string, exclude, keepEscaped) {
  10332. var i, l, code, nextCode, cache,
  10333. result = '';
  10334. if (typeof exclude !== 'string') {
  10335. // encode(string, keepEscaped)
  10336. keepEscaped = exclude;
  10337. exclude = encode.defaultChars;
  10338. }
  10339. if (typeof keepEscaped === 'undefined') {
  10340. keepEscaped = true;
  10341. }
  10342. cache = getEncodeCache(exclude);
  10343. for (i = 0, l = string.length; i < l; i++) {
  10344. code = string.charCodeAt(i);
  10345. if (keepEscaped && code === 0x25 /* % */ && i + 2 < l) {
  10346. if (/^[0-9a-f]{2}$/i.test(string.slice(i + 1, i + 3))) {
  10347. result += string.slice(i, i + 3);
  10348. i += 2;
  10349. continue;
  10350. }
  10351. }
  10352. if (code < 128) {
  10353. result += cache[code];
  10354. continue;
  10355. }
  10356. if (code >= 0xD800 && code <= 0xDFFF) {
  10357. if (code >= 0xD800 && code <= 0xDBFF && i + 1 < l) {
  10358. nextCode = string.charCodeAt(i + 1);
  10359. if (nextCode >= 0xDC00 && nextCode <= 0xDFFF) {
  10360. result += encodeURIComponent(string[i] + string[i + 1]);
  10361. i++;
  10362. continue;
  10363. }
  10364. }
  10365. result += '%EF%BF%BD';
  10366. continue;
  10367. }
  10368. result += encodeURIComponent(string[i]);
  10369. }
  10370. return result;
  10371. }
  10372. encode.defaultChars = ";/?:@&=+$,-_.!~*'()#";
  10373. encode.componentChars = "-_.!~*'()";
  10374. module.exports = encode;
  10375. /***/ }),
  10376. /* 76 */
  10377. /***/ (function(module, exports, __webpack_require__) {
  10378. "use strict";
  10379. module.exports = function format(url) {
  10380. var result = '';
  10381. result += url.protocol || '';
  10382. result += url.slashes ? '//' : '';
  10383. result += url.auth ? url.auth + '@' : '';
  10384. if (url.hostname && url.hostname.indexOf(':') !== -1) {
  10385. // ipv6 address
  10386. result += '[' + url.hostname + ']';
  10387. } else {
  10388. result += url.hostname || '';
  10389. }
  10390. result += url.port ? ':' + url.port : '';
  10391. result += url.pathname || '';
  10392. result += url.search || '';
  10393. result += url.hash || '';
  10394. return result;
  10395. };
  10396. /***/ }),
  10397. /* 77 */
  10398. /***/ (function(module, exports, __webpack_require__) {
  10399. "use strict";
  10400. // Copyright Joyent, Inc. and other Node contributors.
  10401. //
  10402. // Permission is hereby granted, free of charge, to any person obtaining a
  10403. // copy of this software and associated documentation files (the
  10404. // "Software"), to deal in the Software without restriction, including
  10405. // without limitation the rights to use, copy, modify, merge, publish,
  10406. // distribute, sublicense, and/or sell copies of the Software, and to permit
  10407. // persons to whom the Software is furnished to do so, subject to the
  10408. // following conditions:
  10409. //
  10410. // The above copyright notice and this permission notice shall be included
  10411. // in all copies or substantial portions of the Software.
  10412. //
  10413. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  10414. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  10415. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  10416. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  10417. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  10418. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  10419. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  10420. //
  10421. // Changes from joyent/node:
  10422. //
  10423. // 1. No leading slash in paths,
  10424. // e.g. in `url.parse('http://foo?bar')` pathname is ``, not `/`
  10425. //
  10426. // 2. Backslashes are not replaced with slashes,
  10427. // so `http:\\example.org\` is treated like a relative path
  10428. //
  10429. // 3. Trailing colon is treated like a part of the path,
  10430. // i.e. in `http://example.org:foo` pathname is `:foo`
  10431. //
  10432. // 4. Nothing is URL-encoded in the resulting object,
  10433. // (in joyent/node some chars in auth and paths are encoded)
  10434. //
  10435. // 5. `url.parse()` does not have `parseQueryString` argument
  10436. //
  10437. // 6. Removed extraneous result properties: `host`, `path`, `query`, etc.,
  10438. // which can be constructed using other parts of the url.
  10439. //
  10440. function Url() {
  10441. this.protocol = null;
  10442. this.slashes = null;
  10443. this.auth = null;
  10444. this.port = null;
  10445. this.hostname = null;
  10446. this.hash = null;
  10447. this.search = null;
  10448. this.pathname = null;
  10449. }
  10450. // Reference: RFC 3986, RFC 1808, RFC 2396
  10451. // define these here so at least they only have to be
  10452. // compiled once on the first module load.
  10453. var protocolPattern = /^([a-z0-9.+-]+:)/i,
  10454. portPattern = /:[0-9]*$/,
  10455. // Special case for a simple path URL
  10456. simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,
  10457. // RFC 2396: characters reserved for delimiting URLs.
  10458. // We actually just auto-escape these.
  10459. delims = [ '<', '>', '"', '`', ' ', '\r', '\n', '\t' ],
  10460. // RFC 2396: characters not allowed for various reasons.
  10461. unwise = [ '{', '}', '|', '\\', '^', '`' ].concat(delims),
  10462. // Allowed by RFCs, but cause of XSS attacks. Always escape these.
  10463. autoEscape = [ '\'' ].concat(unwise),
  10464. // Characters that are never ever allowed in a hostname.
  10465. // Note that any invalid chars are also handled, but these
  10466. // are the ones that are *expected* to be seen, so we fast-path
  10467. // them.
  10468. nonHostChars = [ '%', '/', '?', ';', '#' ].concat(autoEscape),
  10469. hostEndingChars = [ '/', '?', '#' ],
  10470. hostnameMaxLen = 255,
  10471. hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,
  10472. hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,
  10473. // protocols that can allow "unsafe" and "unwise" chars.
  10474. /* eslint-disable no-script-url */
  10475. // protocols that never have a hostname.
  10476. hostlessProtocol = {
  10477. 'javascript': true,
  10478. 'javascript:': true
  10479. },
  10480. // protocols that always contain a // bit.
  10481. slashedProtocol = {
  10482. 'http': true,
  10483. 'https': true,
  10484. 'ftp': true,
  10485. 'gopher': true,
  10486. 'file': true,
  10487. 'http:': true,
  10488. 'https:': true,
  10489. 'ftp:': true,
  10490. 'gopher:': true,
  10491. 'file:': true
  10492. };
  10493. /* eslint-enable no-script-url */
  10494. function urlParse(url, slashesDenoteHost) {
  10495. if (url && url instanceof Url) { return url; }
  10496. var u = new Url();
  10497. u.parse(url, slashesDenoteHost);
  10498. return u;
  10499. }
  10500. Url.prototype.parse = function(url, slashesDenoteHost) {
  10501. var i, l, lowerProto, hec, slashes,
  10502. rest = url;
  10503. // trim before proceeding.
  10504. // This is to support parse stuff like " http://foo.com \n"
  10505. rest = rest.trim();
  10506. if (!slashesDenoteHost && url.split('#').length === 1) {
  10507. // Try fast path regexp
  10508. var simplePath = simplePathPattern.exec(rest);
  10509. if (simplePath) {
  10510. this.pathname = simplePath[1];
  10511. if (simplePath[2]) {
  10512. this.search = simplePath[2];
  10513. }
  10514. return this;
  10515. }
  10516. }
  10517. var proto = protocolPattern.exec(rest);
  10518. if (proto) {
  10519. proto = proto[0];
  10520. lowerProto = proto.toLowerCase();
  10521. this.protocol = proto;
  10522. rest = rest.substr(proto.length);
  10523. }
  10524. // figure out if it's got a host
  10525. // user@server is *always* interpreted as a hostname, and url
  10526. // resolution will treat //foo/bar as host=foo,path=bar because that's
  10527. // how the browser resolves relative URLs.
  10528. if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) {
  10529. slashes = rest.substr(0, 2) === '//';
  10530. if (slashes && !(proto && hostlessProtocol[proto])) {
  10531. rest = rest.substr(2);
  10532. this.slashes = true;
  10533. }
  10534. }
  10535. if (!hostlessProtocol[proto] &&
  10536. (slashes || (proto && !slashedProtocol[proto]))) {
  10537. // there's a hostname.
  10538. // the first instance of /, ?, ;, or # ends the host.
  10539. //
  10540. // If there is an @ in the hostname, then non-host chars *are* allowed
  10541. // to the left of the last @ sign, unless some host-ending character
  10542. // comes *before* the @-sign.
  10543. // URLs are obnoxious.
  10544. //
  10545. // ex:
  10546. // http://a@b@c/ => user:a@b host:c
  10547. // http://a@b?@c => user:a host:c path:/?@c
  10548. // v0.12 TODO(isaacs): This is not quite how Chrome does things.
  10549. // Review our test case against browsers more comprehensively.
  10550. // find the first instance of any hostEndingChars
  10551. var hostEnd = -1;
  10552. for (i = 0; i < hostEndingChars.length; i++) {
  10553. hec = rest.indexOf(hostEndingChars[i]);
  10554. if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {
  10555. hostEnd = hec;
  10556. }
  10557. }
  10558. // at this point, either we have an explicit point where the
  10559. // auth portion cannot go past, or the last @ char is the decider.
  10560. var auth, atSign;
  10561. if (hostEnd === -1) {
  10562. // atSign can be anywhere.
  10563. atSign = rest.lastIndexOf('@');
  10564. } else {
  10565. // atSign must be in auth portion.
  10566. // http://a@b/c@d => host:b auth:a path:/c@d
  10567. atSign = rest.lastIndexOf('@', hostEnd);
  10568. }
  10569. // Now we have a portion which is definitely the auth.
  10570. // Pull that off.
  10571. if (atSign !== -1) {
  10572. auth = rest.slice(0, atSign);
  10573. rest = rest.slice(atSign + 1);
  10574. this.auth = auth;
  10575. }
  10576. // the host is the remaining to the left of the first non-host char
  10577. hostEnd = -1;
  10578. for (i = 0; i < nonHostChars.length; i++) {
  10579. hec = rest.indexOf(nonHostChars[i]);
  10580. if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {
  10581. hostEnd = hec;
  10582. }
  10583. }
  10584. // if we still have not hit it, then the entire thing is a host.
  10585. if (hostEnd === -1) {
  10586. hostEnd = rest.length;
  10587. }
  10588. if (rest[hostEnd - 1] === ':') { hostEnd--; }
  10589. var host = rest.slice(0, hostEnd);
  10590. rest = rest.slice(hostEnd);
  10591. // pull out port.
  10592. this.parseHost(host);
  10593. // we've indicated that there is a hostname,
  10594. // so even if it's empty, it has to be present.
  10595. this.hostname = this.hostname || '';
  10596. // if hostname begins with [ and ends with ]
  10597. // assume that it's an IPv6 address.
  10598. var ipv6Hostname = this.hostname[0] === '[' &&
  10599. this.hostname[this.hostname.length - 1] === ']';
  10600. // validate a little.
  10601. if (!ipv6Hostname) {
  10602. var hostparts = this.hostname.split(/\./);
  10603. for (i = 0, l = hostparts.length; i < l; i++) {
  10604. var part = hostparts[i];
  10605. if (!part) { continue; }
  10606. if (!part.match(hostnamePartPattern)) {
  10607. var newpart = '';
  10608. for (var j = 0, k = part.length; j < k; j++) {
  10609. if (part.charCodeAt(j) > 127) {
  10610. // we replace non-ASCII char with a temporary placeholder
  10611. // we need this to make sure size of hostname is not
  10612. // broken by replacing non-ASCII by nothing
  10613. newpart += 'x';
  10614. } else {
  10615. newpart += part[j];
  10616. }
  10617. }
  10618. // we test again with ASCII char only
  10619. if (!newpart.match(hostnamePartPattern)) {
  10620. var validParts = hostparts.slice(0, i);
  10621. var notHost = hostparts.slice(i + 1);
  10622. var bit = part.match(hostnamePartStart);
  10623. if (bit) {
  10624. validParts.push(bit[1]);
  10625. notHost.unshift(bit[2]);
  10626. }
  10627. if (notHost.length) {
  10628. rest = notHost.join('.') + rest;
  10629. }
  10630. this.hostname = validParts.join('.');
  10631. break;
  10632. }
  10633. }
  10634. }
  10635. }
  10636. if (this.hostname.length > hostnameMaxLen) {
  10637. this.hostname = '';
  10638. }
  10639. // strip [ and ] from the hostname
  10640. // the host field still retains them, though
  10641. if (ipv6Hostname) {
  10642. this.hostname = this.hostname.substr(1, this.hostname.length - 2);
  10643. }
  10644. }
  10645. // chop off from the tail first.
  10646. var hash = rest.indexOf('#');
  10647. if (hash !== -1) {
  10648. // got a fragment string.
  10649. this.hash = rest.substr(hash);
  10650. rest = rest.slice(0, hash);
  10651. }
  10652. var qm = rest.indexOf('?');
  10653. if (qm !== -1) {
  10654. this.search = rest.substr(qm);
  10655. rest = rest.slice(0, qm);
  10656. }
  10657. if (rest) { this.pathname = rest; }
  10658. if (slashedProtocol[lowerProto] &&
  10659. this.hostname && !this.pathname) {
  10660. this.pathname = '';
  10661. }
  10662. return this;
  10663. };
  10664. Url.prototype.parseHost = function(host) {
  10665. var port = portPattern.exec(host);
  10666. if (port) {
  10667. port = port[0];
  10668. if (port !== ':') {
  10669. this.port = port.substr(1);
  10670. }
  10671. host = host.substr(0, host.length - port.length);
  10672. }
  10673. if (host) { this.hostname = host; }
  10674. };
  10675. module.exports = urlParse;
  10676. /***/ }),
  10677. /* 78 */
  10678. /***/ (function(module, exports) {
  10679. // shim for using process in browser
  10680. var process = module.exports = {};
  10681. // cached from whatever global is present so that test runners that stub it
  10682. // don't break things. But we need to wrap it in a try catch in case it is
  10683. // wrapped in strict mode code which doesn't define any globals. It's inside a
  10684. // function because try/catches deoptimize in certain engines.
  10685. var cachedSetTimeout;
  10686. var cachedClearTimeout;
  10687. function defaultSetTimout() {
  10688. throw new Error('setTimeout has not been defined');
  10689. }
  10690. function defaultClearTimeout () {
  10691. throw new Error('clearTimeout has not been defined');
  10692. }
  10693. (function () {
  10694. try {
  10695. if (typeof setTimeout === 'function') {
  10696. cachedSetTimeout = setTimeout;
  10697. } else {
  10698. cachedSetTimeout = defaultSetTimout;
  10699. }
  10700. } catch (e) {
  10701. cachedSetTimeout = defaultSetTimout;
  10702. }
  10703. try {
  10704. if (typeof clearTimeout === 'function') {
  10705. cachedClearTimeout = clearTimeout;
  10706. } else {
  10707. cachedClearTimeout = defaultClearTimeout;
  10708. }
  10709. } catch (e) {
  10710. cachedClearTimeout = defaultClearTimeout;
  10711. }
  10712. } ())
  10713. function runTimeout(fun) {
  10714. if (cachedSetTimeout === setTimeout) {
  10715. //normal enviroments in sane situations
  10716. return setTimeout(fun, 0);
  10717. }
  10718. // if setTimeout wasn't available but was latter defined
  10719. if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
  10720. cachedSetTimeout = setTimeout;
  10721. return setTimeout(fun, 0);
  10722. }
  10723. try {
  10724. // when when somebody has screwed with setTimeout but no I.E. maddness
  10725. return cachedSetTimeout(fun, 0);
  10726. } catch(e){
  10727. try {
  10728. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  10729. return cachedSetTimeout.call(null, fun, 0);
  10730. } catch(e){
  10731. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
  10732. return cachedSetTimeout.call(this, fun, 0);
  10733. }
  10734. }
  10735. }
  10736. function runClearTimeout(marker) {
  10737. if (cachedClearTimeout === clearTimeout) {
  10738. //normal enviroments in sane situations
  10739. return clearTimeout(marker);
  10740. }
  10741. // if clearTimeout wasn't available but was latter defined
  10742. if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
  10743. cachedClearTimeout = clearTimeout;
  10744. return clearTimeout(marker);
  10745. }
  10746. try {
  10747. // when when somebody has screwed with setTimeout but no I.E. maddness
  10748. return cachedClearTimeout(marker);
  10749. } catch (e){
  10750. try {
  10751. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  10752. return cachedClearTimeout.call(null, marker);
  10753. } catch (e){
  10754. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
  10755. // Some versions of I.E. have different rules for clearTimeout vs setTimeout
  10756. return cachedClearTimeout.call(this, marker);
  10757. }
  10758. }
  10759. }
  10760. var queue = [];
  10761. var draining = false;
  10762. var currentQueue;
  10763. var queueIndex = -1;
  10764. function cleanUpNextTick() {
  10765. if (!draining || !currentQueue) {
  10766. return;
  10767. }
  10768. draining = false;
  10769. if (currentQueue.length) {
  10770. queue = currentQueue.concat(queue);
  10771. } else {
  10772. queueIndex = -1;
  10773. }
  10774. if (queue.length) {
  10775. drainQueue();
  10776. }
  10777. }
  10778. function drainQueue() {
  10779. if (draining) {
  10780. return;
  10781. }
  10782. var timeout = runTimeout(cleanUpNextTick);
  10783. draining = true;
  10784. var len = queue.length;
  10785. while(len) {
  10786. currentQueue = queue;
  10787. queue = [];
  10788. while (++queueIndex < len) {
  10789. if (currentQueue) {
  10790. currentQueue[queueIndex].run();
  10791. }
  10792. }
  10793. queueIndex = -1;
  10794. len = queue.length;
  10795. }
  10796. currentQueue = null;
  10797. draining = false;
  10798. runClearTimeout(timeout);
  10799. }
  10800. process.nextTick = function (fun) {
  10801. var args = new Array(arguments.length - 1);
  10802. if (arguments.length > 1) {
  10803. for (var i = 1; i < arguments.length; i++) {
  10804. args[i - 1] = arguments[i];
  10805. }
  10806. }
  10807. queue.push(new Item(fun, args));
  10808. if (queue.length === 1 && !draining) {
  10809. runTimeout(drainQueue);
  10810. }
  10811. };
  10812. // v8 likes predictible objects
  10813. function Item(fun, array) {
  10814. this.fun = fun;
  10815. this.array = array;
  10816. }
  10817. Item.prototype.run = function () {
  10818. this.fun.apply(null, this.array);
  10819. };
  10820. process.title = 'browser';
  10821. process.browser = true;
  10822. process.env = {};
  10823. process.argv = [];
  10824. process.version = ''; // empty string to avoid regexp issues
  10825. process.versions = {};
  10826. function noop() {}
  10827. process.on = noop;
  10828. process.addListener = noop;
  10829. process.once = noop;
  10830. process.off = noop;
  10831. process.removeListener = noop;
  10832. process.removeAllListeners = noop;
  10833. process.emit = noop;
  10834. process.binding = function (name) {
  10835. throw new Error('process.binding is not supported');
  10836. };
  10837. process.cwd = function () { return '/' };
  10838. process.chdir = function (dir) {
  10839. throw new Error('process.chdir is not supported');
  10840. };
  10841. process.umask = function() { return 0; };
  10842. /***/ }),
  10843. /* 79 */
  10844. /***/ (function(module, exports, __webpack_require__) {
  10845. /* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/*! https://mths.be/punycode v1.4.1 by @mathias */
  10846. ;(function(root) {
  10847. /** Detect free variables */
  10848. var freeExports = typeof exports == 'object' && exports &&
  10849. !exports.nodeType && exports;
  10850. var freeModule = typeof module == 'object' && module &&
  10851. !module.nodeType && module;
  10852. var freeGlobal = typeof global == 'object' && global;
  10853. if (
  10854. freeGlobal.global === freeGlobal ||
  10855. freeGlobal.window === freeGlobal ||
  10856. freeGlobal.self === freeGlobal
  10857. ) {
  10858. root = freeGlobal;
  10859. }
  10860. /**
  10861. * The `punycode` object.
  10862. * @name punycode
  10863. * @type Object
  10864. */
  10865. var punycode,
  10866. /** Highest positive signed 32-bit float value */
  10867. maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
  10868. /** Bootstring parameters */
  10869. base = 36,
  10870. tMin = 1,
  10871. tMax = 26,
  10872. skew = 38,
  10873. damp = 700,
  10874. initialBias = 72,
  10875. initialN = 128, // 0x80
  10876. delimiter = '-', // '\x2D'
  10877. /** Regular expressions */
  10878. regexPunycode = /^xn--/,
  10879. regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars
  10880. regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators
  10881. /** Error messages */
  10882. errors = {
  10883. 'overflow': 'Overflow: input needs wider integers to process',
  10884. 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
  10885. 'invalid-input': 'Invalid input'
  10886. },
  10887. /** Convenience shortcuts */
  10888. baseMinusTMin = base - tMin,
  10889. floor = Math.floor,
  10890. stringFromCharCode = String.fromCharCode,
  10891. /** Temporary variable */
  10892. key;
  10893. /*--------------------------------------------------------------------------*/
  10894. /**
  10895. * A generic error utility function.
  10896. * @private
  10897. * @param {String} type The error type.
  10898. * @returns {Error} Throws a `RangeError` with the applicable error message.
  10899. */
  10900. function error(type) {
  10901. throw new RangeError(errors[type]);
  10902. }
  10903. /**
  10904. * A generic `Array#map` utility function.
  10905. * @private
  10906. * @param {Array} array The array to iterate over.
  10907. * @param {Function} callback The function that gets called for every array
  10908. * item.
  10909. * @returns {Array} A new array of values returned by the callback function.
  10910. */
  10911. function map(array, fn) {
  10912. var length = array.length;
  10913. var result = [];
  10914. while (length--) {
  10915. result[length] = fn(array[length]);
  10916. }
  10917. return result;
  10918. }
  10919. /**
  10920. * A simple `Array#map`-like wrapper to work with domain name strings or email
  10921. * addresses.
  10922. * @private
  10923. * @param {String} domain The domain name or email address.
  10924. * @param {Function} callback The function that gets called for every
  10925. * character.
  10926. * @returns {Array} A new string of characters returned by the callback
  10927. * function.
  10928. */
  10929. function mapDomain(string, fn) {
  10930. var parts = string.split('@');
  10931. var result = '';
  10932. if (parts.length > 1) {
  10933. // In email addresses, only the domain name should be punycoded. Leave
  10934. // the local part (i.e. everything up to `@`) intact.
  10935. result = parts[0] + '@';
  10936. string = parts[1];
  10937. }
  10938. // Avoid `split(regex)` for IE8 compatibility. See #17.
  10939. string = string.replace(regexSeparators, '\x2E');
  10940. var labels = string.split('.');
  10941. var encoded = map(labels, fn).join('.');
  10942. return result + encoded;
  10943. }
  10944. /**
  10945. * Creates an array containing the numeric code points of each Unicode
  10946. * character in the string. While JavaScript uses UCS-2 internally,
  10947. * this function will convert a pair of surrogate halves (each of which
  10948. * UCS-2 exposes as separate characters) into a single code point,
  10949. * matching UTF-16.
  10950. * @see `punycode.ucs2.encode`
  10951. * @see <https://mathiasbynens.be/notes/javascript-encoding>
  10952. * @memberOf punycode.ucs2
  10953. * @name decode
  10954. * @param {String} string The Unicode input string (UCS-2).
  10955. * @returns {Array} The new array of code points.
  10956. */
  10957. function ucs2decode(string) {
  10958. var output = [],
  10959. counter = 0,
  10960. length = string.length,
  10961. value,
  10962. extra;
  10963. while (counter < length) {
  10964. value = string.charCodeAt(counter++);
  10965. if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
  10966. // high surrogate, and there is a next character
  10967. extra = string.charCodeAt(counter++);
  10968. if ((extra & 0xFC00) == 0xDC00) { // low surrogate
  10969. output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
  10970. } else {
  10971. // unmatched surrogate; only append this code unit, in case the next
  10972. // code unit is the high surrogate of a surrogate pair
  10973. output.push(value);
  10974. counter--;
  10975. }
  10976. } else {
  10977. output.push(value);
  10978. }
  10979. }
  10980. return output;
  10981. }
  10982. /**
  10983. * Creates a string based on an array of numeric code points.
  10984. * @see `punycode.ucs2.decode`
  10985. * @memberOf punycode.ucs2
  10986. * @name encode
  10987. * @param {Array} codePoints The array of numeric code points.
  10988. * @returns {String} The new Unicode string (UCS-2).
  10989. */
  10990. function ucs2encode(array) {
  10991. return map(array, function(value) {
  10992. var output = '';
  10993. if (value > 0xFFFF) {
  10994. value -= 0x10000;
  10995. output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
  10996. value = 0xDC00 | value & 0x3FF;
  10997. }
  10998. output += stringFromCharCode(value);
  10999. return output;
  11000. }).join('');
  11001. }
  11002. /**
  11003. * Converts a basic code point into a digit/integer.
  11004. * @see `digitToBasic()`
  11005. * @private
  11006. * @param {Number} codePoint The basic numeric code point value.
  11007. * @returns {Number} The numeric value of a basic code point (for use in
  11008. * representing integers) in the range `0` to `base - 1`, or `base` if
  11009. * the code point does not represent a value.
  11010. */
  11011. function basicToDigit(codePoint) {
  11012. if (codePoint - 48 < 10) {
  11013. return codePoint - 22;
  11014. }
  11015. if (codePoint - 65 < 26) {
  11016. return codePoint - 65;
  11017. }
  11018. if (codePoint - 97 < 26) {
  11019. return codePoint - 97;
  11020. }
  11021. return base;
  11022. }
  11023. /**
  11024. * Converts a digit/integer into a basic code point.
  11025. * @see `basicToDigit()`
  11026. * @private
  11027. * @param {Number} digit The numeric value of a basic code point.
  11028. * @returns {Number} The basic code point whose value (when used for
  11029. * representing integers) is `digit`, which needs to be in the range
  11030. * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
  11031. * used; else, the lowercase form is used. The behavior is undefined
  11032. * if `flag` is non-zero and `digit` has no uppercase form.
  11033. */
  11034. function digitToBasic(digit, flag) {
  11035. // 0..25 map to ASCII a..z or A..Z
  11036. // 26..35 map to ASCII 0..9
  11037. return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
  11038. }
  11039. /**
  11040. * Bias adaptation function as per section 3.4 of RFC 3492.
  11041. * https://tools.ietf.org/html/rfc3492#section-3.4
  11042. * @private
  11043. */
  11044. function adapt(delta, numPoints, firstTime) {
  11045. var k = 0;
  11046. delta = firstTime ? floor(delta / damp) : delta >> 1;
  11047. delta += floor(delta / numPoints);
  11048. for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
  11049. delta = floor(delta / baseMinusTMin);
  11050. }
  11051. return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
  11052. }
  11053. /**
  11054. * Converts a Punycode string of ASCII-only symbols to a string of Unicode
  11055. * symbols.
  11056. * @memberOf punycode
  11057. * @param {String} input The Punycode string of ASCII-only symbols.
  11058. * @returns {String} The resulting string of Unicode symbols.
  11059. */
  11060. function decode(input) {
  11061. // Don't use UCS-2
  11062. var output = [],
  11063. inputLength = input.length,
  11064. out,
  11065. i = 0,
  11066. n = initialN,
  11067. bias = initialBias,
  11068. basic,
  11069. j,
  11070. index,
  11071. oldi,
  11072. w,
  11073. k,
  11074. digit,
  11075. t,
  11076. /** Cached calculation results */
  11077. baseMinusT;
  11078. // Handle the basic code points: let `basic` be the number of input code
  11079. // points before the last delimiter, or `0` if there is none, then copy
  11080. // the first basic code points to the output.
  11081. basic = input.lastIndexOf(delimiter);
  11082. if (basic < 0) {
  11083. basic = 0;
  11084. }
  11085. for (j = 0; j < basic; ++j) {
  11086. // if it's not a basic code point
  11087. if (input.charCodeAt(j) >= 0x80) {
  11088. error('not-basic');
  11089. }
  11090. output.push(input.charCodeAt(j));
  11091. }
  11092. // Main decoding loop: start just after the last delimiter if any basic code
  11093. // points were copied; start at the beginning otherwise.
  11094. for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
  11095. // `index` is the index of the next character to be consumed.
  11096. // Decode a generalized variable-length integer into `delta`,
  11097. // which gets added to `i`. The overflow checking is easier
  11098. // if we increase `i` as we go, then subtract off its starting
  11099. // value at the end to obtain `delta`.
  11100. for (oldi = i, w = 1, k = base; /* no condition */; k += base) {
  11101. if (index >= inputLength) {
  11102. error('invalid-input');
  11103. }
  11104. digit = basicToDigit(input.charCodeAt(index++));
  11105. if (digit >= base || digit > floor((maxInt - i) / w)) {
  11106. error('overflow');
  11107. }
  11108. i += digit * w;
  11109. t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
  11110. if (digit < t) {
  11111. break;
  11112. }
  11113. baseMinusT = base - t;
  11114. if (w > floor(maxInt / baseMinusT)) {
  11115. error('overflow');
  11116. }
  11117. w *= baseMinusT;
  11118. }
  11119. out = output.length + 1;
  11120. bias = adapt(i - oldi, out, oldi == 0);
  11121. // `i` was supposed to wrap around from `out` to `0`,
  11122. // incrementing `n` each time, so we'll fix that now:
  11123. if (floor(i / out) > maxInt - n) {
  11124. error('overflow');
  11125. }
  11126. n += floor(i / out);
  11127. i %= out;
  11128. // Insert `n` at position `i` of the output
  11129. output.splice(i++, 0, n);
  11130. }
  11131. return ucs2encode(output);
  11132. }
  11133. /**
  11134. * Converts a string of Unicode symbols (e.g. a domain name label) to a
  11135. * Punycode string of ASCII-only symbols.
  11136. * @memberOf punycode
  11137. * @param {String} input The string of Unicode symbols.
  11138. * @returns {String} The resulting Punycode string of ASCII-only symbols.
  11139. */
  11140. function encode(input) {
  11141. var n,
  11142. delta,
  11143. handledCPCount,
  11144. basicLength,
  11145. bias,
  11146. j,
  11147. m,
  11148. q,
  11149. k,
  11150. t,
  11151. currentValue,
  11152. output = [],
  11153. /** `inputLength` will hold the number of code points in `input`. */
  11154. inputLength,
  11155. /** Cached calculation results */
  11156. handledCPCountPlusOne,
  11157. baseMinusT,
  11158. qMinusT;
  11159. // Convert the input in UCS-2 to Unicode
  11160. input = ucs2decode(input);
  11161. // Cache the length
  11162. inputLength = input.length;
  11163. // Initialize the state
  11164. n = initialN;
  11165. delta = 0;
  11166. bias = initialBias;
  11167. // Handle the basic code points
  11168. for (j = 0; j < inputLength; ++j) {
  11169. currentValue = input[j];
  11170. if (currentValue < 0x80) {
  11171. output.push(stringFromCharCode(currentValue));
  11172. }
  11173. }
  11174. handledCPCount = basicLength = output.length;
  11175. // `handledCPCount` is the number of code points that have been handled;
  11176. // `basicLength` is the number of basic code points.
  11177. // Finish the basic string - if it is not empty - with a delimiter
  11178. if (basicLength) {
  11179. output.push(delimiter);
  11180. }
  11181. // Main encoding loop:
  11182. while (handledCPCount < inputLength) {
  11183. // All non-basic code points < n have been handled already. Find the next
  11184. // larger one:
  11185. for (m = maxInt, j = 0; j < inputLength; ++j) {
  11186. currentValue = input[j];
  11187. if (currentValue >= n && currentValue < m) {
  11188. m = currentValue;
  11189. }
  11190. }
  11191. // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
  11192. // but guard against overflow
  11193. handledCPCountPlusOne = handledCPCount + 1;
  11194. if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
  11195. error('overflow');
  11196. }
  11197. delta += (m - n) * handledCPCountPlusOne;
  11198. n = m;
  11199. for (j = 0; j < inputLength; ++j) {
  11200. currentValue = input[j];
  11201. if (currentValue < n && ++delta > maxInt) {
  11202. error('overflow');
  11203. }
  11204. if (currentValue == n) {
  11205. // Represent delta as a generalized variable-length integer
  11206. for (q = delta, k = base; /* no condition */; k += base) {
  11207. t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
  11208. if (q < t) {
  11209. break;
  11210. }
  11211. qMinusT = q - t;
  11212. baseMinusT = base - t;
  11213. output.push(
  11214. stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
  11215. );
  11216. q = floor(qMinusT / baseMinusT);
  11217. }
  11218. output.push(stringFromCharCode(digitToBasic(q, 0)));
  11219. bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
  11220. delta = 0;
  11221. ++handledCPCount;
  11222. }
  11223. }
  11224. ++delta;
  11225. ++n;
  11226. }
  11227. return output.join('');
  11228. }
  11229. /**
  11230. * Converts a Punycode string representing a domain name or an email address
  11231. * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
  11232. * it doesn't matter if you call it on a string that has already been
  11233. * converted to Unicode.
  11234. * @memberOf punycode
  11235. * @param {String} input The Punycoded domain name or email address to
  11236. * convert to Unicode.
  11237. * @returns {String} The Unicode representation of the given Punycode
  11238. * string.
  11239. */
  11240. function toUnicode(input) {
  11241. return mapDomain(input, function(string) {
  11242. return regexPunycode.test(string)
  11243. ? decode(string.slice(4).toLowerCase())
  11244. : string;
  11245. });
  11246. }
  11247. /**
  11248. * Converts a Unicode string representing a domain name or an email address to
  11249. * Punycode. Only the non-ASCII parts of the domain name will be converted,
  11250. * i.e. it doesn't matter if you call it with a domain that's already in
  11251. * ASCII.
  11252. * @memberOf punycode
  11253. * @param {String} input The domain name or email address to convert, as a
  11254. * Unicode string.
  11255. * @returns {String} The Punycode representation of the given domain name or
  11256. * email address.
  11257. */
  11258. function toASCII(input) {
  11259. return mapDomain(input, function(string) {
  11260. return regexNonASCII.test(string)
  11261. ? 'xn--' + encode(string)
  11262. : string;
  11263. });
  11264. }
  11265. /*--------------------------------------------------------------------------*/
  11266. /** Define the public API */
  11267. punycode = {
  11268. /**
  11269. * A string representing the current Punycode.js version number.
  11270. * @memberOf punycode
  11271. * @type String
  11272. */
  11273. 'version': '1.4.1',
  11274. /**
  11275. * An object of methods to convert from JavaScript's internal character
  11276. * representation (UCS-2) to Unicode code points, and back.
  11277. * @see <https://mathiasbynens.be/notes/javascript-encoding>
  11278. * @memberOf punycode
  11279. * @type Object
  11280. */
  11281. 'ucs2': {
  11282. 'decode': ucs2decode,
  11283. 'encode': ucs2encode
  11284. },
  11285. 'decode': decode,
  11286. 'encode': encode,
  11287. 'toASCII': toASCII,
  11288. 'toUnicode': toUnicode
  11289. };
  11290. /** Expose `punycode` */
  11291. // Some AMD build optimizers, like r.js, check for specific condition patterns
  11292. // like the following:
  11293. if (
  11294. true
  11295. ) {
  11296. !(__WEBPACK_AMD_DEFINE_RESULT__ = function() {
  11297. return punycode;
  11298. }.call(exports, __webpack_require__, exports, module),
  11299. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  11300. } else if (freeExports && freeModule) {
  11301. if (module.exports == freeExports) {
  11302. // in Node.js, io.js, or RingoJS v0.8.0+
  11303. freeModule.exports = punycode;
  11304. } else {
  11305. // in Narwhal or RingoJS v0.7.0-
  11306. for (key in punycode) {
  11307. punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);
  11308. }
  11309. }
  11310. } else {
  11311. // in Rhino or a web browser
  11312. root.punycode = punycode;
  11313. }
  11314. }(this));
  11315. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(84)(module), __webpack_require__(6)))
  11316. /***/ }),
  11317. /* 80 */
  11318. /***/ (function(module, exports, __webpack_require__) {
  11319. /* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {
  11320. "use strict";
  11321. if (global.setImmediate) {
  11322. return;
  11323. }
  11324. var nextHandle = 1; // Spec says greater than zero
  11325. var tasksByHandle = {};
  11326. var currentlyRunningATask = false;
  11327. var doc = global.document;
  11328. var registerImmediate;
  11329. function setImmediate(callback) {
  11330. // Callback can either be a function or a string
  11331. if (typeof callback !== "function") {
  11332. callback = new Function("" + callback);
  11333. }
  11334. // Copy function arguments
  11335. var args = new Array(arguments.length - 1);
  11336. for (var i = 0; i < args.length; i++) {
  11337. args[i] = arguments[i + 1];
  11338. }
  11339. // Store and register the task
  11340. var task = { callback: callback, args: args };
  11341. tasksByHandle[nextHandle] = task;
  11342. registerImmediate(nextHandle);
  11343. return nextHandle++;
  11344. }
  11345. function clearImmediate(handle) {
  11346. delete tasksByHandle[handle];
  11347. }
  11348. function run(task) {
  11349. var callback = task.callback;
  11350. var args = task.args;
  11351. switch (args.length) {
  11352. case 0:
  11353. callback();
  11354. break;
  11355. case 1:
  11356. callback(args[0]);
  11357. break;
  11358. case 2:
  11359. callback(args[0], args[1]);
  11360. break;
  11361. case 3:
  11362. callback(args[0], args[1], args[2]);
  11363. break;
  11364. default:
  11365. callback.apply(undefined, args);
  11366. break;
  11367. }
  11368. }
  11369. function runIfPresent(handle) {
  11370. // From the spec: "Wait until any invocations of this algorithm started before this one have completed."
  11371. // So if we're currently running a task, we'll need to delay this invocation.
  11372. if (currentlyRunningATask) {
  11373. // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a
  11374. // "too much recursion" error.
  11375. setTimeout(runIfPresent, 0, handle);
  11376. } else {
  11377. var task = tasksByHandle[handle];
  11378. if (task) {
  11379. currentlyRunningATask = true;
  11380. try {
  11381. run(task);
  11382. } finally {
  11383. clearImmediate(handle);
  11384. currentlyRunningATask = false;
  11385. }
  11386. }
  11387. }
  11388. }
  11389. function installNextTickImplementation() {
  11390. registerImmediate = function(handle) {
  11391. process.nextTick(function () { runIfPresent(handle); });
  11392. };
  11393. }
  11394. function canUsePostMessage() {
  11395. // The test against `importScripts` prevents this implementation from being installed inside a web worker,
  11396. // where `global.postMessage` means something completely different and can't be used for this purpose.
  11397. if (global.postMessage && !global.importScripts) {
  11398. var postMessageIsAsynchronous = true;
  11399. var oldOnMessage = global.onmessage;
  11400. global.onmessage = function() {
  11401. postMessageIsAsynchronous = false;
  11402. };
  11403. global.postMessage("", "*");
  11404. global.onmessage = oldOnMessage;
  11405. return postMessageIsAsynchronous;
  11406. }
  11407. }
  11408. function installPostMessageImplementation() {
  11409. // Installs an event handler on `global` for the `message` event: see
  11410. // * https://developer.mozilla.org/en/DOM/window.postMessage
  11411. // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages
  11412. var messagePrefix = "setImmediate$" + Math.random() + "$";
  11413. var onGlobalMessage = function(event) {
  11414. if (event.source === global &&
  11415. typeof event.data === "string" &&
  11416. event.data.indexOf(messagePrefix) === 0) {
  11417. runIfPresent(+event.data.slice(messagePrefix.length));
  11418. }
  11419. };
  11420. if (global.addEventListener) {
  11421. global.addEventListener("message", onGlobalMessage, false);
  11422. } else {
  11423. global.attachEvent("onmessage", onGlobalMessage);
  11424. }
  11425. registerImmediate = function(handle) {
  11426. global.postMessage(messagePrefix + handle, "*");
  11427. };
  11428. }
  11429. function installMessageChannelImplementation() {
  11430. var channel = new MessageChannel();
  11431. channel.port1.onmessage = function(event) {
  11432. var handle = event.data;
  11433. runIfPresent(handle);
  11434. };
  11435. registerImmediate = function(handle) {
  11436. channel.port2.postMessage(handle);
  11437. };
  11438. }
  11439. function installReadyStateChangeImplementation() {
  11440. var html = doc.documentElement;
  11441. registerImmediate = function(handle) {
  11442. // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted
  11443. // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.
  11444. var script = doc.createElement("script");
  11445. script.onreadystatechange = function () {
  11446. runIfPresent(handle);
  11447. script.onreadystatechange = null;
  11448. html.removeChild(script);
  11449. script = null;
  11450. };
  11451. html.appendChild(script);
  11452. };
  11453. }
  11454. function installSetTimeoutImplementation() {
  11455. registerImmediate = function(handle) {
  11456. setTimeout(runIfPresent, 0, handle);
  11457. };
  11458. }
  11459. // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.
  11460. var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);
  11461. attachTo = attachTo && attachTo.setTimeout ? attachTo : global;
  11462. // Don't get fooled by e.g. browserify environments.
  11463. if ({}.toString.call(global.process) === "[object process]") {
  11464. // For Node.js before 0.9
  11465. installNextTickImplementation();
  11466. } else if (canUsePostMessage()) {
  11467. // For non-IE10 modern browsers
  11468. installPostMessageImplementation();
  11469. } else if (global.MessageChannel) {
  11470. // For web workers, where supported
  11471. installMessageChannelImplementation();
  11472. } else if (doc && "onreadystatechange" in doc.createElement("script")) {
  11473. // For IE 6–8
  11474. installReadyStateChangeImplementation();
  11475. } else {
  11476. // For older browsers
  11477. installSetTimeoutImplementation();
  11478. }
  11479. attachTo.setImmediate = setImmediate;
  11480. attachTo.clearImmediate = clearImmediate;
  11481. }(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self));
  11482. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6), __webpack_require__(78)))
  11483. /***/ }),
  11484. /* 81 */
  11485. /***/ (function(module, exports, __webpack_require__) {
  11486. var apply = Function.prototype.apply;
  11487. // DOM APIs, for completeness
  11488. exports.setTimeout = function() {
  11489. return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout);
  11490. };
  11491. exports.setInterval = function() {
  11492. return new Timeout(apply.call(setInterval, window, arguments), clearInterval);
  11493. };
  11494. exports.clearTimeout =
  11495. exports.clearInterval = function(timeout) {
  11496. if (timeout) {
  11497. timeout.close();
  11498. }
  11499. };
  11500. function Timeout(id, clearFn) {
  11501. this._id = id;
  11502. this._clearFn = clearFn;
  11503. }
  11504. Timeout.prototype.unref = Timeout.prototype.ref = function() {};
  11505. Timeout.prototype.close = function() {
  11506. this._clearFn.call(window, this._id);
  11507. };
  11508. // Does not start the time, just sets up the members needed.
  11509. exports.enroll = function(item, msecs) {
  11510. clearTimeout(item._idleTimeoutId);
  11511. item._idleTimeout = msecs;
  11512. };
  11513. exports.unenroll = function(item) {
  11514. clearTimeout(item._idleTimeoutId);
  11515. item._idleTimeout = -1;
  11516. };
  11517. exports._unrefActive = exports.active = function(item) {
  11518. clearTimeout(item._idleTimeoutId);
  11519. var msecs = item._idleTimeout;
  11520. if (msecs >= 0) {
  11521. item._idleTimeoutId = setTimeout(function onTimeout() {
  11522. if (item._onTimeout)
  11523. item._onTimeout();
  11524. }, msecs);
  11525. }
  11526. };
  11527. // setimmediate attaches itself to the global object
  11528. __webpack_require__(80);
  11529. exports.setImmediate = setImmediate;
  11530. exports.clearImmediate = clearImmediate;
  11531. /***/ }),
  11532. /* 82 */
  11533. /***/ (function(module, exports) {
  11534. module.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804\uDCBD|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/
  11535. /***/ }),
  11536. /* 83 */
  11537. /***/ (function(module, exports, __webpack_require__) {
  11538. "use strict";
  11539. exports.Any = __webpack_require__(18);
  11540. exports.Cc = __webpack_require__(16);
  11541. exports.Cf = __webpack_require__(82);
  11542. exports.P = __webpack_require__(5);
  11543. exports.Z = __webpack_require__(17);
  11544. /***/ }),
  11545. /* 84 */
  11546. /***/ (function(module, exports) {
  11547. module.exports = function(module) {
  11548. if(!module.webpackPolyfill) {
  11549. module.deprecate = function() {};
  11550. module.paths = [];
  11551. // module.parent = undefined by default
  11552. if(!module.children) module.children = [];
  11553. Object.defineProperty(module, "loaded", {
  11554. enumerable: true,
  11555. get: function() {
  11556. return module.l;
  11557. }
  11558. });
  11559. Object.defineProperty(module, "id", {
  11560. enumerable: true,
  11561. get: function() {
  11562. return module.i;
  11563. }
  11564. });
  11565. module.webpackPolyfill = 1;
  11566. }
  11567. return module;
  11568. };
  11569. /***/ }),
  11570. /* 85 */
  11571. /***/ (function(module, exports, __webpack_require__) {
  11572. __webpack_require__(19);
  11573. module.exports = __webpack_require__(20);
  11574. /***/ })
  11575. /******/ ]);
  11576. //# sourceMappingURL=main.js.map