14.js 174 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864
  1. webpackJsonp([14],{
  2. /***/ 320:
  3. /***/ (function(module, exports) {
  4. module.exports = "/fonts/pages/main/components/MDEditor/assets/font/iconfont.eot?5cb756e5";
  5. /***/ }),
  6. /***/ 405:
  7. /***/ (function(module, exports, __webpack_require__) {
  8. var escape = __webpack_require__(287);
  9. exports = module.exports = __webpack_require__(0)(false);
  10. // imports
  11. // module
  12. exports.push([module.i, "@font-face {font-family: \"iconfont\";\r\n src: url(" + escape(__webpack_require__(320)) + "); /* IE9 */\r\n src: url(" + escape(__webpack_require__(320)) + "#iefix) format('embedded-opentype'), \r\n url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAABBoAAsAAAAAH4gAABAXAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCHNAqrGKENATYCJAOBAAtCAAQgBYRtB4I0G3MZM6M2lLTSTfZfJ3BzyOqYZkDBRZ2HprCitPZ3M8J36RIFoV+G+/sYnCYldv0I8xP3uCYjaM7/PYldjAhiEUzzMA2QIPZTSUVTap7SplSDVS1QFajwRBw61IQgv72KhZq8zPfO2kzlgJkk7T4iPTP9Ao/snqj1ZwI+AR+pnFgdsb1FKrikLeIB0AABBLNBwG3sJrh0YieT5piEFlvapTXhESZVxn7z1XMwlGSPvV8g5XsAQOD//62ldqfIqjJ5W5yyMH0RqkLWyJ0JDl3vH2ZCvMHdEpDKq5AV6vZCeyUCDyhMhanQFUJUSF+D5awMrAmEpUSMBqL+u96FgQDAQCUGYXgvHww+aDBOYL4ZcfI48GNh0DlDCfADXM0JaRCbioNPrl47gI3q6xMPkBAfIMGhwC7KNMk4AXqWejiMsp9gM2WP1KcBvJwIoADEAGiA1GkriShQPotRgtEV0vgv/nw0aIhYmpWyISIlSpGpmC1lR7A2toZtsMlp11jXnb47j+64Hg5zn6UsUfjoZBmKutd1v9rr4fphDQRixHGUMDpJirTuWd1zkP6/4AFKBLx5ISGFJwr+FLjwIISKCGIwCCRHgwMJBOCBjwA+fPmRUQPBBeYVAQDRQBvVwFICgxJYGgMBsFIM3sCGYPACNhwDCbARHF8yEhg8gU3EQAFsMgZ/YFMwKIDNwMAF2EwMHsAWAYSQxQCoIEsBEEGOAEAMaQOAgawBIBCyDgA5ZD0ANGQDABzITQBIIE8DIIC8CgAP8hoAfEgXMATAnT6Aj5IPAfCFfASAH6QLGGTwcNgSUAMAjTyBHsAsgPtJgC8GU++pILhNgQSfWmA0EEeRuu4EY14UN4/qGZcT5UhhGA+RzF1SKhUR4hBC68GmUDSfJxZ70tpH5uMJtAFv8k3IHkwQsbghCBGyO1rAEch8KV/ADNGEcnmltkOGKDqMSyXPTB0/f1gqqQ2GOhqiJgftys1wX+tg4SHhrzbqdj3PXQi/2m47jteF30zc/s3hA4btyn6r4/K6TDjNfkX8BZ51Du7ZDf/91en8caT7+06wdx/477cLWrE5JJ5vTUwUGoNjmfpWYWpMj3EjIa2djJquyNcCw/FkoZLVDe/crk7HlF2v3TZYaEO48Z1w1PX2/IHu2BudBRCCYtWvBRVSHgdpaN+n+n7rv7jBDQ41V3FSplXfmsIQFb4MONEnSxwYa4X9U0G67cNIpow0Wh0SzdewKnxLu1VOxbIVnAhqMHornbxVT0WyjfE9pdbQaK7Z+5oiSasw6tdwT1ABCOUhgLAB18k2I80+hAGCwnOPrbkI9MCNCKLYKXcZ/TjoQr+DKJrnBcZTsnHIVYM2IKHdls8KKdCbGp/gempUeVCNKPsiarRXiao7c1VaTpGsEWMZkK0EtaF+zozL/C5XUN1mc6qluTG8qp3ZRtDym7Tu9lABY77EyYCDOGGbSaX751iDcb86IXmrDLwE0OIqWKdHSLsjDVHThTg6e4hoZ0W1836P0nv3Sb9K9d17BS0TY89uRiqBtW8PD2r+uXx1QRH6ltVfNulEDoj+Tjm1OVOZHyxye8FtRMNx4u4SAx8MTWuMkQ4+KV/0Fm8XcxAikH13HgPEKC3sOv3jJfQPSis/NF8bGI8jOIpL/ZXB2cGcB5Z1ZUiOX1iO6uuYrghzg0A0c+naMI6D9DpkvdhphTJ9kdKwGkirDAkBUR5wsCOzDBCmo0JKjNunC1wOIoTbEZD+VCiMAURVWa4nDe1Uln4k54baR4hyhhCcUo33BZUwOqTO9uGIEu3sckJb9ZOAtBpUQIyUJ2wTFL+KLQjgHRCBXRiiowDDHW0vkLDrou0JF3AhCp2uQNv7oSZ/Zq8HJE+5VVSctLt8fbKj7qvd2K24Qljenm39DVKnTb/V54W3JQ4A16ajoC9ROEBhrRiupOO7TmnIt97OMqPbDs+Wd9Bq3vJckauVDIeTrXR126kpctY2WSpk9c2MHRO6XQ9XNLsrPWmuiIwVEqcdeCff1qG2zYzl3PJa3eWNcJmju/52k6wPlzQPrZSiQcZqLufWSkeANGW5t5zLe9SIPBNL1x4h9GWuIMQC46ZamifvFawQbH8TO9I0rWsNNjFoVxBYXmmJLzzjwApSTHhfP6YHrnT8ys8LlM0drRhLRqdJw6g4b54gcvmn+YmBX04ilmmEBR3wyJmoOKTz/7x2u72tOTTFq0y9YyvkJUtybl4LBb35iRHt5/TO+DOA/KGyNL40uZIiKaYvcjlOuvqIwScG1qSjFgfIfbLP6jMG8vOVPAijNL4AiM50bvAUmVSewIpmDqY1Wgcx0sAJqIgdRzrDwEEq9Ju9VwQ9uMGVQNYXahAuP79e5t78jSnVz8fdegMM8RyCb4a6viUlDgoko9Oi2TvWJofjwsQrQLviVhXtZw2YRlAB6J0fh8Wmho2cPr1dBSM3lCjc80GaD03EtTI11wPiQgXYsgRhNYuWASCFtPZOvTBqoNYTaO53H3b2Pdh5VsbHPrh06uYJD41afQ2dV1Ox53dGN6P3433qG3c4d93jvbLy4orHh6+df55b8kmvfHzFxbpnQKQHfUt5p1ImhA00zzRHfBFBLeQs4K1jFm7S5kVGDh0dNpRzCknDOjKzMjPPMVSR8n9r2tpnHEdHqOcoUjLUuUxWntVRyE92lLRftK3NINwmNLSpJfx/lbqsLqlV/p6q99SoaurrHSJ5YM2MGS5Xdr9M5CiwMO5fmMVsaY6LExZNNJvZtleQvnnPbCGYI7YnO58kSaS3nyzqAk6aunXdMQiaQJ1VPXNKS318EJljpwvbcyZxP/Jv0Rr4FOrVA/O4TJenp8KY3yDiW32/CpT5O37iS7orQBHVrJikbKa+wc0qr6jUKoH+W04U/Z3n357tnitXIiN/Q7Fdxj/Ml9kdl+An30RfEVVTAFNdmYZL2bHO9hmKfVZc6tf3L+8P6r/8ImBfnft2F7nL3MMDLo7qH32ueDL2GHUa2aRRJQNKhxQP9ZPJkM8xKUeYiysMlfqBkp/ph/pRy+0jRhoGjTQpq4hZ44bO3F69flKagSubojZwoN20wblhcHB18Kvjzg3O5OP+L1ofcTviOriSK1+8/OKK5PV60MpWzqjxrNn016KlnTs6ly66lb7Gc1H5VCYxhbvP1I/ireJ9J7JVB8mtyhbdKF2L8jvnaeBIyan0U7fDY5/dzB9VUTl8YMkgS7JbT8fei73VnWtfPndj2ewwaomyxJhzU08hxVQZzxpbVENU33jDJqlaRrSqJj73b1RmFWSnihoHU1Kaigw2kCrfQvKZP1fmGnSnqNpStG3+MwkvOlFHaH2N5LNonqTPzClC0rjV69oe+zxuk2/q2SlVKRGdwivDr3Dzfq+V8Hz69UaykNT1+vA8TprylNt/P/DHqs5x6uHq2Z2r/9z0W6NyK5NXfyAjtTChQd7W0NNW9lPPvJ95TH31jq3zhTSytHavdq9QIWKQFL4XuFKmXeAhtqmUIfXmZL/edJN5/RrdFH4tSuZ9R9n+mKud+WZTu1KKTiubkaps4mydXiG1JEXyOlVO0X5Ml/XXwZpCaadNLBW0byIxTWj2HK+/3it87M0vACmTm4KDSdEzLM2vOmLmOKzRu0UszatqHbUZmmB+rbZF49C2uhjVCfXewBMqZ5bT4VTCcdOhgH9lkX9v79pevmM6JoNaQMMIQ7dyq3Obc3vqX45upCDy6GZ6Ig6QXdu6nm4zu6+YP1OZpvzv0pMnhkC7bN+BIGXS8OHruLxgRZz36JKSRB5x+zYIbLuvd5dwO1jXu4upURy4O30Gb6IUC0Nsiij5ypBVMmWUxvY7RBPlgVYWKmyh2oShK6FuFq50tq/yW/XndFgI3qo/vuDzruKSn3DFJK3mERZHrt9KSxVnwOHtZU/GZQ5b2Jh580+7h2x2UMG86mNW6sZZyrra909Ktg0qqJ6Xk38qJy8/91Re7qsjKfk6kZ/zFM2pzvnEaoeVevADZa2pNg0GzvXCfX1xersSyI88TkzTtyh0ZkrRQtcnPt6wYfDgdqPxbppzrA0bHifW04oWyqxrUejT9K2NRrrCguZml9wbQmq8Ipbt59QVdG1Y/9w3wlRmpPl9twpTRNIjA95esJ+z4Ai04c61zLT1XQV1nHhDFHZWtFTogXRTxQzRtz9NkFyLzs4Jcpt8hkLklSit2CNK5Yv3iPV3tOSnbxMrsnu+XPfVLZvS1v7/Jcd7cjzyCrsH7zeXFzWdQq3gW4x6p7Y447os0tkV5/QyqL0jYac3CGhaWPL+FbdW+v1UNdnsTZHB30c2xBy6utz/Q6tU2Lt/LhtWJgr2rFt2FvvztIxn2/dvIgyhg7T1yrkBOiZtGZgJq0S8pdbfOwN++vWKmnF69YmCJU1Nk7Z8+pM9TuLtsds8fq75P44PWfCzq2O9XYHU8d6P/BL9a/wT/eS5zzoJcbqYlJyRkOJdOd8CRj3aLGcwZNgq3yCfJvmvYqIN0l/NTT6xu9/cX3TiWOjg1cd3nwvkBJsCxf8s0EocXp/zRWrfvk+k8cLJy5t9muvr5swGGRmYkrza/kabNJrZ83aYVu3eNZW/CvhooMuPeEn4WRK5kdxES5RK/TZtmU02Xx4lny97/pdilUIpDMXD00iX8hJNuZZE3lKpZpXikimatkqsFcGXSCuWIuFwdW7uyK1D4kODLl38t+n8gn+x3M0Wcb9U2FOkX2cdhXVfPtNzzxCNB1AXqLQZesgNc7j/U+QZFxm29kHKSY0h6KmQYPiI4auhc4ePG14spLhlhu8c8Qt/JT7rQyHFEG0efoOGNz6kBLRwLbka/jP5YHgXeX64HXHwwuHrvtp9dghG+i2fSCj+nE/bqJ+5y+Q8rGwPN2zq51+V9cLh/2m2uu6bRVW4D9IYRzX4IB9MSDyIFHSrG9HfOSyi2ecGFjuAKIMwBzTWItJAAmDCWW6Uyjn7rDytsx7ZKs/QJMFDoEmBjxBE94wxORAiyeSCj1yTQbSikwuhYAUFghYAiNLomAQ8nDFJSPAjo3Q9OxiNnl0mB14e5XExMIr+Y6cUOEMhwjbXv3wR6AKr2qeKhpNzY2Xpzf8JX0kLyXnq7BeSIyd13B1+mz+QIHWkyDd/KsUpJ9ypd8cHRKx64QtM2QU09ef93r1dxc5w1yybF4EusEr7lNNGw8kdvixTX/4TvpKWnNV+TfsLyfHolaOdgwX6EMlqtX1ZNN/8SSHaKbGscKe8Ew3iDaz0+rYuMGUnlLD7sz3ZnLMVu/ZVd2QUNuIa2EerSSBRaAwWhycQSWRKKmoaWjp6BkYmZhZWNnYOTi5unmLY2bHA8rgmyzMTYK6wG3WXt05TxqwX3CLuQ04jdm5u+Z6ItR23THbihWs/ip1flj53yJZiwsQQZ0xj0RTNnG8QzRTLwBL/OSWalIAOk7/KRVYU3ZK5J7QMK40NW4zfPK9LV4myESBZoZjMapY6ZFrWvnG2bXGOcdY3LPo627blR9MAAAAA') format('woff2'),\r\n url(" + escape(__webpack_require__(406)) + ") format('woff'),\r\n url(" + escape(__webpack_require__(407)) + ") format('truetype'), \r\n url(" + escape(__webpack_require__(408)) + "#iconfont) format('svg'); /* iOS 4.1- */\r\n}\r\n\r\n.iconfont {\r\n font-family: \"iconfont\" !important;\r\n font-size: 16px;\r\n font-style: normal;\r\n -webkit-font-smoothing: antialiased;\r\n -moz-osx-font-smoothing: grayscale;\r\n}\r\n\r\n.icon-md:before {\r\n content: \"\\E604\";\r\n}\r\n\r\n.icon-redo:before {\r\n content: \"\\E627\";\r\n}\r\n\r\n.icon-undo:before {\r\n content: \"\\E633\";\r\n}\r\n\r\n.icon-checked:before {\r\n content: \"\\E683\";\r\n}\r\n\r\n.icon-checked-false:before {\r\n content: \"\\E684\";\r\n}\r\n\r\n.icon-preview:before {\r\n content: \"\\E63A\";\r\n}\r\n\r\n.icon-on:before {\r\n content: \"\\E6D8\";\r\n}\r\n\r\n.icon-off:before {\r\n content: \"\\E6D9\";\r\n}\r\n\r\n.icon-download:before {\r\n content: \"\\E6AE\";\r\n}\r\n\r\n.icon-bold:before {\r\n content: \"\\E677\";\r\n}\r\n\r\n.icon-group:before {\r\n content: \"\\E647\";\r\n}\r\n\r\n.icon-img:before {\r\n content: \"\\E64A\";\r\n}\r\n\r\n.icon-under-line:before {\r\n content: \"\\E65A\";\r\n}\r\n\r\n.icon-close:before {\r\n content: \"\\E690\";\r\n}\r\n\r\n.icon-italic:before {\r\n content: \"\\E628\";\r\n}\r\n\r\n.icon-overline:before {\r\n content: \"\\E63B\";\r\n}\r\n\r\n.icon-horizontal:before {\r\n content: \"\\E7F0\";\r\n}\r\n\r\n.icon-theme:before {\r\n content: \"\\E682\";\r\n}\r\n\r\n.icon-quote:before {\r\n content: \"\\E636\";\r\n}\r\n\r\n.icon-table:before {\r\n content: \"\\E603\";\r\n}\r\n\r\n.icon-clear:before {\r\n content: \"\\E629\";\r\n}\r\n\r\n.icon-ul:before {\r\n content: \"\\E624\";\r\n}\r\n\r\n.icon-code:before {\r\n content: \"\\E60F\";\r\n}\r\n\r\n.icon-link:before {\r\n content: \"\\E7E2\";\r\n}\r\n\r\n.icon-fullscreen:before {\r\n content: \"\\E7EC\";\r\n}\r\n\r\n.icon-quite:before {\r\n content: \"\\E7ED\";\r\n}\r\n\r\n.icon-daoru:before {\r\n content: \"\\E635\";\r\n}\r\n\r\n.icon-ol:before {\r\n content: \"\\E6F0\";\r\n}\r\n\r\n.icon-upload-img:before {\r\n content: \"\\E679\";\r\n}\r\n\r\n.icon-save:before {\r\n content: \"\\E648\";\r\n}\r\n\r\n.icon-check-box:before {\r\n content: \"\\EC58\";\r\n}\r\n\r\n", ""]);
  13. // exports
  14. /***/ }),
  15. /***/ 406:
  16. /***/ (function(module, exports) {
  17. module.exports = "/fonts/pages/main/components/MDEditor/assets/font/iconfont.woff?70e0362d";
  18. /***/ }),
  19. /***/ 407:
  20. /***/ (function(module, exports) {
  21. module.exports = "/fonts/pages/main/components/MDEditor/assets/font/iconfont.ttf?b5f4d512";
  22. /***/ }),
  23. /***/ 408:
  24. /***/ (function(module, exports) {
  25. module.exports = "/fonts/pages/main/components/MDEditor/assets/font/iconfont.svg?3a9bde8a";
  26. /***/ }),
  27. /***/ 409:
  28. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  29. "use strict";
  30. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assets_js_hightlight__ = __webpack_require__(410);
  31. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__assets_js_marked__ = __webpack_require__(424);
  32. __WEBPACK_IMPORTED_MODULE_0__assets_js_hightlight__["a" /* default */].initHighlightingOnLoad();
  33. var renderer = new __WEBPACK_IMPORTED_MODULE_1__assets_js_marked__["a" /* default */].Renderer();
  34. /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_1__assets_js_marked__["a" /* default */].setOptions({
  35. renderer: renderer,
  36. gfm: true,
  37. tables: true,
  38. breaks: false,
  39. pedantic: false,
  40. sanitize: false,
  41. smartLists: true,
  42. highlight: function highlight(code) {
  43. return __WEBPACK_IMPORTED_MODULE_0__assets_js_hightlight__["a" /* default */].highlightAuto(code).value;
  44. }
  45. }));
  46. /***/ }),
  47. /***/ 410:
  48. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  49. "use strict";
  50. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__highlight__ = __webpack_require__(411);
  51. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__languages_javascript__ = __webpack_require__(412);
  52. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__languages_javascript___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__languages_javascript__);
  53. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__languages_java__ = __webpack_require__(413);
  54. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__languages_java___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__languages_java__);
  55. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__languages_css__ = __webpack_require__(414);
  56. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__languages_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__languages_css__);
  57. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__languages_less__ = __webpack_require__(415);
  58. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__languages_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__languages_less__);
  59. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__languages_go__ = __webpack_require__(416);
  60. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__languages_go___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__languages_go__);
  61. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__languages_markdown__ = __webpack_require__(417);
  62. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__languages_markdown___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__languages_markdown__);
  63. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__languages_php__ = __webpack_require__(418);
  64. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__languages_php___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__languages_php__);
  65. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__languages_python__ = __webpack_require__(419);
  66. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__languages_python___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8__languages_python__);
  67. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__languages_typescript__ = __webpack_require__(420);
  68. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__languages_typescript___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9__languages_typescript__);
  69. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__languages_xml__ = __webpack_require__(421);
  70. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__languages_xml___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10__languages_xml__);
  71. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__languages_autohotkey__ = __webpack_require__(422);
  72. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__languages_autohotkey___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11__languages_autohotkey__);
  73. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__languages_autoit__ = __webpack_require__(423);
  74. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__languages_autoit___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12__languages_autoit__);
  75. //hljs体积过大,多数为解决代码高亮显示的问题,所以只引入部分语言,如果需要可自行加载
  76. var languages = {
  77. javascript: __WEBPACK_IMPORTED_MODULE_1__languages_javascript___default.a,
  78. java: __WEBPACK_IMPORTED_MODULE_2__languages_java___default.a,
  79. css: __WEBPACK_IMPORTED_MODULE_3__languages_css___default.a,
  80. less: __WEBPACK_IMPORTED_MODULE_4__languages_less___default.a,
  81. markdown: __WEBPACK_IMPORTED_MODULE_6__languages_markdown___default.a,
  82. go: __WEBPACK_IMPORTED_MODULE_5__languages_go___default.a,
  83. php: __WEBPACK_IMPORTED_MODULE_7__languages_php___default.a,
  84. python: __WEBPACK_IMPORTED_MODULE_8__languages_python___default.a,
  85. typescript: __WEBPACK_IMPORTED_MODULE_9__languages_typescript___default.a,
  86. xml: __WEBPACK_IMPORTED_MODULE_10__languages_xml___default.a,
  87. autohotkey: __WEBPACK_IMPORTED_MODULE_11__languages_autohotkey___default.a,
  88. auto: __WEBPACK_IMPORTED_MODULE_12__languages_autoit___default.a
  89. };
  90. Object.keys(languages).forEach(function (key) {
  91. __WEBPACK_IMPORTED_MODULE_0__highlight__["a" /* default */].registerLanguage(key, languages[key]);
  92. });
  93. /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0__highlight__["a" /* default */]);
  94. /***/ }),
  95. /***/ 411:
  96. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  97. "use strict";
  98. var hljs = {};
  99. // Convenience variables for build-in objects
  100. var ArrayProto = [],
  101. objectKeys = Object.keys;
  102. // Global internal variables used within the highlight.js library.
  103. var languages = {},
  104. aliases = {};
  105. // Regular expressions used throughout the highlight.js library.
  106. var noHighlightRe = /^(no-?highlight|plain|text)$/i,
  107. languagePrefixRe = /\blang(?:uage)?-([\w-]+)\b/i,
  108. fixMarkupRe = /((^(<[^>]+>|\t|)+|(?:\n)))/gm;
  109. // The object will be assigned by the build tool. It used to synchronize API
  110. // of external language files with minified version of the highlight.js library.
  111. var API_REPLACES;
  112. var spanEndTag = '</span>';
  113. // Global options used when within external APIs. This is modified when
  114. // calling the `hljs.configure` function.
  115. var options = {
  116. classPrefix: 'hljs-',
  117. tabReplace: null,
  118. useBR: false,
  119. languages: undefined
  120. };
  121. /* Utility functions */
  122. function escape(value) {
  123. return value.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
  124. }
  125. function tag(node) {
  126. return node.nodeName.toLowerCase();
  127. }
  128. function testRe(re, lexeme) {
  129. var match = re && re.exec(lexeme);
  130. return match && match.index === 0;
  131. }
  132. function isNotHighlighted(language) {
  133. return noHighlightRe.test(language);
  134. }
  135. function blockLanguage(block) {
  136. var i, match, length, _class;
  137. var classes = block.className + ' ';
  138. classes += block.parentNode ? block.parentNode.className : '';
  139. // language-* takes precedence over non-prefixed class names.
  140. match = languagePrefixRe.exec(classes);
  141. if (match) {
  142. return getLanguage(match[1]) ? match[1] : 'no-highlight';
  143. }
  144. classes = classes.split(/\s+/);
  145. for (i = 0, length = classes.length; i < length; i++) {
  146. _class = classes[i];
  147. if (isNotHighlighted(_class) || getLanguage(_class)) {
  148. return _class;
  149. }
  150. }
  151. }
  152. function inherit(parent) {
  153. // inherit(parent, override_obj, override_obj, ...)
  154. var key;
  155. var result = {};
  156. var objects = Array.prototype.slice.call(arguments, 1);
  157. for (key in parent) {
  158. result[key] = parent[key];
  159. }objects.forEach(function (obj) {
  160. for (key in obj) {
  161. result[key] = obj[key];
  162. }
  163. });
  164. return result;
  165. }
  166. /* Stream merging */
  167. function nodeStream(node) {
  168. var result = [];
  169. (function _nodeStream(node, offset) {
  170. for (var child = node.firstChild; child; child = child.nextSibling) {
  171. if (child.nodeType === 3) offset += child.nodeValue.length;else if (child.nodeType === 1) {
  172. result.push({
  173. event: 'start',
  174. offset: offset,
  175. node: child
  176. });
  177. offset = _nodeStream(child, offset);
  178. // Prevent void elements from having an end tag that would actually
  179. // double them in the output. There are more void elements in HTML
  180. // but we list only those realistically expected in code display.
  181. if (!tag(child).match(/br|hr|img|input/)) {
  182. result.push({
  183. event: 'stop',
  184. offset: offset,
  185. node: child
  186. });
  187. }
  188. }
  189. }
  190. return offset;
  191. })(node, 0);
  192. return result;
  193. }
  194. function mergeStreams(original, highlighted, value) {
  195. var processed = 0;
  196. var result = '';
  197. var nodeStack = [];
  198. function selectStream() {
  199. if (!original.length || !highlighted.length) {
  200. return original.length ? original : highlighted;
  201. }
  202. if (original[0].offset !== highlighted[0].offset) {
  203. return original[0].offset < highlighted[0].offset ? original : highlighted;
  204. }
  205. /*
  206. To avoid starting the stream just before it should stop the order is
  207. ensured that original always starts first and closes last:
  208. if (event1 == 'start' && event2 == 'start')
  209. return original;
  210. if (event1 == 'start' && event2 == 'stop')
  211. return highlighted;
  212. if (event1 == 'stop' && event2 == 'start')
  213. return original;
  214. if (event1 == 'stop' && event2 == 'stop')
  215. return highlighted;
  216. ... which is collapsed to:
  217. */
  218. return highlighted[0].event === 'start' ? original : highlighted;
  219. }
  220. function open(node) {
  221. function attr_str(a) {
  222. return ' ' + a.nodeName + '="' + escape(a.value).replace('"', '&quot;') + '"';
  223. }
  224. result += '<' + tag(node) + ArrayProto.map.call(node.attributes, attr_str).join('') + '>';
  225. }
  226. function close(node) {
  227. result += '</' + tag(node) + '>';
  228. }
  229. function render(event) {
  230. (event.event === 'start' ? open : close)(event.node);
  231. }
  232. while (original.length || highlighted.length) {
  233. var stream = selectStream();
  234. result += escape(value.substring(processed, stream[0].offset));
  235. processed = stream[0].offset;
  236. if (stream === original) {
  237. /*
  238. On any opening or closing tag of the original markup we first close
  239. the entire highlighted node stack, then render the original tag along
  240. with all the following original tags at the same offset and then
  241. reopen all the tags on the highlighted stack.
  242. */
  243. nodeStack.reverse().forEach(close);
  244. do {
  245. render(stream.splice(0, 1)[0]);
  246. stream = selectStream();
  247. } while (stream === original && stream.length && stream[0].offset === processed);
  248. nodeStack.reverse().forEach(open);
  249. } else {
  250. if (stream[0].event === 'start') {
  251. nodeStack.push(stream[0].node);
  252. } else {
  253. nodeStack.pop();
  254. }
  255. render(stream.splice(0, 1)[0]);
  256. }
  257. }
  258. return result + escape(value.substr(processed));
  259. }
  260. /* Initialization */
  261. function expand_mode(mode) {
  262. if (mode.variants && !mode.cached_variants) {
  263. mode.cached_variants = mode.variants.map(function (variant) {
  264. return inherit(mode, { variants: null }, variant);
  265. });
  266. }
  267. return mode.cached_variants || mode.endsWithParent && [inherit(mode)] || [mode];
  268. }
  269. function restoreLanguageApi(obj) {
  270. if (API_REPLACES && !obj.langApiRestored) {
  271. obj.langApiRestored = true;
  272. for (var key in API_REPLACES) {
  273. obj[key] && (obj[API_REPLACES[key]] = obj[key]);
  274. }(obj.contains || []).concat(obj.variants || []).forEach(restoreLanguageApi);
  275. }
  276. }
  277. function compileLanguage(language) {
  278. function reStr(re) {
  279. return re && re.source || re;
  280. }
  281. function langRe(value, global) {
  282. return new RegExp(reStr(value), 'm' + (language.case_insensitive ? 'i' : '') + (global ? 'g' : ''));
  283. }
  284. // joinRe logically computes regexps.join(separator), but fixes the
  285. // backreferences so they continue to match.
  286. function joinRe(regexps, separator) {
  287. // backreferenceRe matches an open parenthesis or backreference. To avoid
  288. // an incorrect parse, it additionally matches the following:
  289. // - [...] elements, where the meaning of parentheses and escapes change
  290. // - other escape sequences, so we do not misparse escape sequences as
  291. // interesting elements
  292. // - non-matching or lookahead parentheses, which do not capture. These
  293. // follow the '(' with a '?'.
  294. var backreferenceRe = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
  295. var numCaptures = 0;
  296. var ret = '';
  297. for (var i = 0; i < regexps.length; i++) {
  298. var offset = numCaptures;
  299. var re = reStr(regexps[i]);
  300. if (i > 0) {
  301. ret += separator;
  302. }
  303. while (re.length > 0) {
  304. var match = backreferenceRe.exec(re);
  305. if (match == null) {
  306. ret += re;
  307. break;
  308. }
  309. ret += re.substring(0, match.index);
  310. re = re.substring(match.index + match[0].length);
  311. if (match[0][0] == '\\' && match[1]) {
  312. // Adjust the backreference.
  313. ret += '\\' + String(Number(match[1]) + offset);
  314. } else {
  315. ret += match[0];
  316. if (match[0] == '(') {
  317. numCaptures++;
  318. }
  319. }
  320. }
  321. }
  322. return ret;
  323. }
  324. function compileMode(mode, parent) {
  325. if (mode.compiled) return;
  326. mode.compiled = true;
  327. mode.keywords = mode.keywords || mode.beginKeywords;
  328. if (mode.keywords) {
  329. var compiled_keywords = {};
  330. var flatten = function flatten(className, str) {
  331. if (language.case_insensitive) {
  332. str = str.toLowerCase();
  333. }
  334. str.split(' ').forEach(function (kw) {
  335. var pair = kw.split('|');
  336. compiled_keywords[pair[0]] = [className, pair[1] ? Number(pair[1]) : 1];
  337. });
  338. };
  339. if (typeof mode.keywords === 'string') {
  340. // string
  341. flatten('keyword', mode.keywords);
  342. } else {
  343. objectKeys(mode.keywords).forEach(function (className) {
  344. flatten(className, mode.keywords[className]);
  345. });
  346. }
  347. mode.keywords = compiled_keywords;
  348. }
  349. mode.lexemesRe = langRe(mode.lexemes || /\w+/, true);
  350. if (parent) {
  351. if (mode.beginKeywords) {
  352. mode.begin = '\\b(' + mode.beginKeywords.split(' ').join('|') + ')\\b';
  353. }
  354. if (!mode.begin) mode.begin = /\B|\b/;
  355. mode.beginRe = langRe(mode.begin);
  356. if (mode.endSameAsBegin) mode.end = mode.begin;
  357. if (!mode.end && !mode.endsWithParent) mode.end = /\B|\b/;
  358. if (mode.end) mode.endRe = langRe(mode.end);
  359. mode.terminator_end = reStr(mode.end) || '';
  360. if (mode.endsWithParent && parent.terminator_end) mode.terminator_end += (mode.end ? '|' : '') + parent.terminator_end;
  361. }
  362. if (mode.illegal) mode.illegalRe = langRe(mode.illegal);
  363. if (mode.relevance == null) mode.relevance = 1;
  364. if (!mode.contains) {
  365. mode.contains = [];
  366. }
  367. mode.contains = Array.prototype.concat.apply([], mode.contains.map(function (c) {
  368. return expand_mode(c === 'self' ? mode : c);
  369. }));
  370. mode.contains.forEach(function (c) {
  371. compileMode(c, mode);
  372. });
  373. if (mode.starts) {
  374. compileMode(mode.starts, parent);
  375. }
  376. var terminators = mode.contains.map(function (c) {
  377. return c.beginKeywords ? '\\.?(?:' + c.begin + ')\\.?' : c.begin;
  378. }).concat([mode.terminator_end, mode.illegal]).map(reStr).filter(Boolean);
  379. mode.terminators = terminators.length ? langRe(joinRe(terminators, '|'), true) : {
  380. exec: function exec() /*s*/{
  381. return null;
  382. }
  383. };
  384. }
  385. compileMode(language);
  386. }
  387. /*
  388. Core highlighting function. Accepts a language name, or an alias, and a
  389. string with the code to highlight. Returns an object with the following
  390. properties:
  391. - relevance (int)
  392. - value (an HTML string with highlighting markup)
  393. */
  394. function highlight(name, value, ignore_illegals, continuation) {
  395. function escapeRe(value) {
  396. return new RegExp(value.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'), 'm');
  397. }
  398. function subMode(lexeme, mode) {
  399. var i, length;
  400. for (i = 0, length = mode.contains.length; i < length; i++) {
  401. if (testRe(mode.contains[i].beginRe, lexeme)) {
  402. if (mode.contains[i].endSameAsBegin) {
  403. mode.contains[i].endRe = escapeRe(mode.contains[i].beginRe.exec(lexeme)[0]);
  404. }
  405. return mode.contains[i];
  406. }
  407. }
  408. }
  409. function endOfMode(mode, lexeme) {
  410. if (testRe(mode.endRe, lexeme)) {
  411. while (mode.endsParent && mode.parent) {
  412. mode = mode.parent;
  413. }
  414. return mode;
  415. }
  416. if (mode.endsWithParent) {
  417. return endOfMode(mode.parent, lexeme);
  418. }
  419. }
  420. function isIllegal(lexeme, mode) {
  421. return !ignore_illegals && testRe(mode.illegalRe, lexeme);
  422. }
  423. function keywordMatch(mode, match) {
  424. var match_str = language.case_insensitive ? match[0].toLowerCase() : match[0];
  425. return mode.keywords.hasOwnProperty(match_str) && mode.keywords[match_str];
  426. }
  427. function buildSpan(classname, insideSpan, leaveOpen, noPrefix) {
  428. var classPrefix = noPrefix ? '' : options.classPrefix,
  429. openSpan = '<span class="' + classPrefix,
  430. closeSpan = leaveOpen ? '' : spanEndTag;
  431. openSpan += classname + '">';
  432. if (!classname) return insideSpan;
  433. return openSpan + insideSpan + closeSpan;
  434. }
  435. function processKeywords() {
  436. var keyword_match, last_index, match, result;
  437. if (!top.keywords) return escape(mode_buffer);
  438. result = '';
  439. last_index = 0;
  440. top.lexemesRe.lastIndex = 0;
  441. match = top.lexemesRe.exec(mode_buffer);
  442. while (match) {
  443. result += escape(mode_buffer.substring(last_index, match.index));
  444. keyword_match = keywordMatch(top, match);
  445. if (keyword_match) {
  446. relevance += keyword_match[1];
  447. result += buildSpan(keyword_match[0], escape(match[0]));
  448. } else {
  449. result += escape(match[0]);
  450. }
  451. last_index = top.lexemesRe.lastIndex;
  452. match = top.lexemesRe.exec(mode_buffer);
  453. }
  454. return result + escape(mode_buffer.substr(last_index));
  455. }
  456. function processSubLanguage() {
  457. var explicit = typeof top.subLanguage === 'string';
  458. if (explicit && !languages[top.subLanguage]) {
  459. return escape(mode_buffer);
  460. }
  461. var result = explicit ? highlight(top.subLanguage, mode_buffer, true, continuations[top.subLanguage]) : highlightAuto(mode_buffer, top.subLanguage.length ? top.subLanguage : undefined);
  462. // Counting embedded language score towards the host language may be disabled
  463. // with zeroing the containing mode relevance. Usecase in point is Markdown that
  464. // allows XML everywhere and makes every XML snippet to have a much larger Markdown
  465. // score.
  466. if (top.relevance > 0) {
  467. relevance += result.relevance;
  468. }
  469. if (explicit) {
  470. continuations[top.subLanguage] = result.top;
  471. }
  472. return buildSpan(result.language, result.value, false, true);
  473. }
  474. function processBuffer() {
  475. result += top.subLanguage != null ? processSubLanguage() : processKeywords();
  476. mode_buffer = '';
  477. }
  478. function startNewMode(mode) {
  479. result += mode.className ? buildSpan(mode.className, '', true) : '';
  480. top = Object.create(mode, { parent: { value: top } });
  481. }
  482. function processLexeme(buffer, lexeme) {
  483. mode_buffer += buffer;
  484. if (lexeme == null) {
  485. processBuffer();
  486. return 0;
  487. }
  488. var new_mode = subMode(lexeme, top);
  489. if (new_mode) {
  490. if (new_mode.skip) {
  491. mode_buffer += lexeme;
  492. } else {
  493. if (new_mode.excludeBegin) {
  494. mode_buffer += lexeme;
  495. }
  496. processBuffer();
  497. if (!new_mode.returnBegin && !new_mode.excludeBegin) {
  498. mode_buffer = lexeme;
  499. }
  500. }
  501. startNewMode(new_mode, lexeme);
  502. return new_mode.returnBegin ? 0 : lexeme.length;
  503. }
  504. var end_mode = endOfMode(top, lexeme);
  505. if (end_mode) {
  506. var origin = top;
  507. if (origin.skip) {
  508. mode_buffer += lexeme;
  509. } else {
  510. if (!(origin.returnEnd || origin.excludeEnd)) {
  511. mode_buffer += lexeme;
  512. }
  513. processBuffer();
  514. if (origin.excludeEnd) {
  515. mode_buffer = lexeme;
  516. }
  517. }
  518. do {
  519. if (top.className) {
  520. result += spanEndTag;
  521. }
  522. if (!top.skip && !top.subLanguage) {
  523. relevance += top.relevance;
  524. }
  525. top = top.parent;
  526. } while (top !== end_mode.parent);
  527. if (end_mode.starts) {
  528. if (end_mode.endSameAsBegin) {
  529. end_mode.starts.endRe = end_mode.endRe;
  530. }
  531. startNewMode(end_mode.starts, '');
  532. }
  533. return origin.returnEnd ? 0 : lexeme.length;
  534. }
  535. if (isIllegal(lexeme, top)) throw new Error('Illegal lexeme "' + lexeme + '" for mode "' + (top.className || '<unnamed>') + '"');
  536. /*
  537. Parser should not reach this point as all types of lexemes should be caught
  538. earlier, but if it does due to some bug make sure it advances at least one
  539. character forward to prevent infinite looping.
  540. */
  541. mode_buffer += lexeme;
  542. return lexeme.length || 1;
  543. }
  544. var language = getLanguage(name);
  545. if (!language) {
  546. throw new Error('Unknown language: "' + name + '"');
  547. }
  548. compileLanguage(language);
  549. var top = continuation || language;
  550. var continuations = {}; // keep continuations for sub-languages
  551. var result = '',
  552. current;
  553. for (current = top; current !== language; current = current.parent) {
  554. if (current.className) {
  555. result = buildSpan(current.className, '', true) + result;
  556. }
  557. }
  558. var mode_buffer = '';
  559. var relevance = 0;
  560. try {
  561. var match,
  562. count,
  563. index = 0;
  564. while (true) {
  565. top.terminators.lastIndex = index;
  566. match = top.terminators.exec(value);
  567. if (!match) break;
  568. count = processLexeme(value.substring(index, match.index), match[0]);
  569. index = match.index + count;
  570. }
  571. processLexeme(value.substr(index));
  572. for (current = top; current.parent; current = current.parent) {
  573. // close dangling modes
  574. if (current.className) {
  575. result += spanEndTag;
  576. }
  577. }
  578. return {
  579. relevance: relevance,
  580. value: result,
  581. language: name,
  582. top: top
  583. };
  584. } catch (e) {
  585. if (e.message && e.message.indexOf('Illegal') !== -1) {
  586. return {
  587. relevance: 0,
  588. value: escape(value)
  589. };
  590. } else {
  591. throw e;
  592. }
  593. }
  594. }
  595. /*
  596. Highlighting with language detection. Accepts a string with the code to
  597. highlight. Returns an object with the following properties:
  598. - language (detected language)
  599. - relevance (int)
  600. - value (an HTML string with highlighting markup)
  601. - second_best (object with the same structure for second-best heuristically
  602. detected language, may be absent)
  603. */
  604. function highlightAuto(text, languageSubset) {
  605. languageSubset = languageSubset || options.languages || objectKeys(languages);
  606. var result = {
  607. relevance: 0,
  608. value: escape(text)
  609. };
  610. var second_best = result;
  611. languageSubset.filter(getLanguage).filter(autoDetection).forEach(function (name) {
  612. var current = highlight(name, text, false);
  613. current.language = name;
  614. if (current.relevance > second_best.relevance) {
  615. second_best = current;
  616. }
  617. if (current.relevance > result.relevance) {
  618. second_best = result;
  619. result = current;
  620. }
  621. });
  622. if (second_best.language) {
  623. result.second_best = second_best;
  624. }
  625. return result;
  626. }
  627. /*
  628. Post-processing of the highlighted markup:
  629. - replace TABs with something more useful
  630. - replace real line-breaks with '<br>' for non-pre containers
  631. */
  632. function fixMarkup(value) {
  633. return !(options.tabReplace || options.useBR) ? value : value.replace(fixMarkupRe, function (match, p1) {
  634. if (options.useBR && match === '\n') {
  635. return '<br>';
  636. } else if (options.tabReplace) {
  637. return p1.replace(/\t/g, options.tabReplace);
  638. }
  639. return '';
  640. });
  641. }
  642. function buildClassName(prevClassName, currentLang, resultLang) {
  643. var language = currentLang ? aliases[currentLang] : resultLang,
  644. result = [prevClassName.trim()];
  645. if (!prevClassName.match(/\bhljs\b/)) {
  646. result.push('hljs');
  647. }
  648. if (prevClassName.indexOf(language) === -1) {
  649. result.push(language);
  650. }
  651. return result.join(' ').trim();
  652. }
  653. /*
  654. Applies highlighting to a DOM node containing code. Accepts a DOM node and
  655. two optional parameters for fixMarkup.
  656. */
  657. function highlightBlock(block) {
  658. var node, originalStream, result, resultNode, text;
  659. var language = blockLanguage(block);
  660. if (isNotHighlighted(language)) return;
  661. if (options.useBR) {
  662. node = document.createElementNS('http://www.w3.org/1999/xhtml', 'div');
  663. node.innerHTML = block.innerHTML.replace(/\n/g, '').replace(/<br[ \/]*>/g, '\n');
  664. } else {
  665. node = block;
  666. }
  667. text = node.textContent;
  668. result = language ? highlight(language, text, true) : highlightAuto(text);
  669. originalStream = nodeStream(node);
  670. if (originalStream.length) {
  671. resultNode = document.createElementNS('http://www.w3.org/1999/xhtml', 'div');
  672. resultNode.innerHTML = result.value;
  673. result.value = mergeStreams(originalStream, nodeStream(resultNode), text);
  674. }
  675. result.value = fixMarkup(result.value);
  676. block.innerHTML = result.value;
  677. block.className = buildClassName(block.className, language, result.language);
  678. block.result = {
  679. language: result.language,
  680. re: result.relevance
  681. };
  682. if (result.second_best) {
  683. block.second_best = {
  684. language: result.second_best.language,
  685. re: result.second_best.relevance
  686. };
  687. }
  688. }
  689. /*
  690. Updates highlight.js global options with values passed in the form of an object.
  691. */
  692. function configure(user_options) {
  693. options = inherit(options, user_options);
  694. }
  695. /*
  696. Applies highlighting to all <pre><code>..</code></pre> blocks on a page.
  697. */
  698. function initHighlighting() {
  699. if (initHighlighting.called) return;
  700. initHighlighting.called = true;
  701. var blocks = document.querySelectorAll('pre code');
  702. ArrayProto.forEach.call(blocks, highlightBlock);
  703. }
  704. /*
  705. Attaches highlighting to the page load event.
  706. */
  707. function initHighlightingOnLoad() {
  708. addEventListener('DOMContentLoaded', initHighlighting, false);
  709. addEventListener('load', initHighlighting, false);
  710. }
  711. function registerLanguage(name, language) {
  712. var lang = languages[name] = language(hljs);
  713. restoreLanguageApi(lang);
  714. if (lang.aliases) {
  715. lang.aliases.forEach(function (alias) {
  716. aliases[alias] = name;
  717. });
  718. }
  719. }
  720. function listLanguages() {
  721. return objectKeys(languages);
  722. }
  723. function getLanguage(name) {
  724. name = (name || '').toLowerCase();
  725. return languages[name] || languages[aliases[name]];
  726. }
  727. function autoDetection(name) {
  728. var lang = getLanguage(name);
  729. return lang && !lang.disableAutodetect;
  730. }
  731. /* Interface definition */
  732. hljs.highlight = highlight;
  733. hljs.highlightAuto = highlightAuto;
  734. hljs.fixMarkup = fixMarkup;
  735. hljs.highlightBlock = highlightBlock;
  736. hljs.configure = configure;
  737. hljs.initHighlighting = initHighlighting;
  738. hljs.initHighlightingOnLoad = initHighlightingOnLoad;
  739. hljs.registerLanguage = registerLanguage;
  740. hljs.listLanguages = listLanguages;
  741. hljs.getLanguage = getLanguage;
  742. hljs.autoDetection = autoDetection;
  743. hljs.inherit = inherit;
  744. // Common regexps
  745. hljs.IDENT_RE = '[a-zA-Z]\\w*';
  746. hljs.UNDERSCORE_IDENT_RE = '[a-zA-Z_]\\w*';
  747. hljs.NUMBER_RE = '\\b\\d+(\\.\\d+)?';
  748. hljs.C_NUMBER_RE = '(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)'; // 0x..., 0..., decimal, float
  749. hljs.BINARY_NUMBER_RE = '\\b(0b[01]+)'; // 0b...
  750. hljs.RE_STARTERS_RE = '!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~';
  751. // Common modes
  752. hljs.BACKSLASH_ESCAPE = {
  753. begin: '\\\\[\\s\\S]', relevance: 0
  754. };
  755. hljs.APOS_STRING_MODE = {
  756. className: 'string',
  757. begin: '\'', end: '\'',
  758. illegal: '\\n',
  759. contains: [hljs.BACKSLASH_ESCAPE]
  760. };
  761. hljs.QUOTE_STRING_MODE = {
  762. className: 'string',
  763. begin: '"', end: '"',
  764. illegal: '\\n',
  765. contains: [hljs.BACKSLASH_ESCAPE]
  766. };
  767. hljs.PHRASAL_WORDS_MODE = {
  768. begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
  769. };
  770. hljs.COMMENT = function (begin, end, inherits) {
  771. var mode = hljs.inherit({
  772. className: 'comment',
  773. begin: begin, end: end,
  774. contains: []
  775. }, inherits || {});
  776. mode.contains.push(hljs.PHRASAL_WORDS_MODE);
  777. mode.contains.push({
  778. className: 'doctag',
  779. begin: '(?:TODO|FIXME|NOTE|BUG|XXX):',
  780. relevance: 0
  781. });
  782. return mode;
  783. };
  784. hljs.C_LINE_COMMENT_MODE = hljs.COMMENT('//', '$');
  785. hljs.C_BLOCK_COMMENT_MODE = hljs.COMMENT('/\\*', '\\*/');
  786. hljs.HASH_COMMENT_MODE = hljs.COMMENT('#', '$');
  787. hljs.NUMBER_MODE = {
  788. className: 'number',
  789. begin: hljs.NUMBER_RE,
  790. relevance: 0
  791. };
  792. hljs.C_NUMBER_MODE = {
  793. className: 'number',
  794. begin: hljs.C_NUMBER_RE,
  795. relevance: 0
  796. };
  797. hljs.BINARY_NUMBER_MODE = {
  798. className: 'number',
  799. begin: hljs.BINARY_NUMBER_RE,
  800. relevance: 0
  801. };
  802. hljs.CSS_NUMBER_MODE = {
  803. className: 'number',
  804. begin: hljs.NUMBER_RE + '(' + '%|em|ex|ch|rem' + '|vw|vh|vmin|vmax' + '|cm|mm|in|pt|pc|px' + '|deg|grad|rad|turn' + '|s|ms' + '|Hz|kHz' + '|dpi|dpcm|dppx' + ')?',
  805. relevance: 0
  806. };
  807. hljs.REGEXP_MODE = {
  808. className: 'regexp',
  809. begin: /\//, end: /\/[gimuy]*/,
  810. illegal: /\n/,
  811. contains: [hljs.BACKSLASH_ESCAPE, {
  812. begin: /\[/, end: /\]/,
  813. relevance: 0,
  814. contains: [hljs.BACKSLASH_ESCAPE]
  815. }]
  816. };
  817. hljs.TITLE_MODE = {
  818. className: 'title',
  819. begin: hljs.IDENT_RE,
  820. relevance: 0
  821. };
  822. hljs.UNDERSCORE_TITLE_MODE = {
  823. className: 'title',
  824. begin: hljs.UNDERSCORE_IDENT_RE,
  825. relevance: 0
  826. };
  827. hljs.METHOD_GUARD = {
  828. // excludes method names from keyword processing
  829. begin: '\\.\\s*' + hljs.UNDERSCORE_IDENT_RE,
  830. relevance: 0
  831. };
  832. /* harmony default export */ __webpack_exports__["a"] = (hljs);
  833. /***/ }),
  834. /***/ 412:
  835. /***/ (function(module, exports) {
  836. module.exports = function (hljs) {
  837. var IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*';
  838. var KEYWORDS = {
  839. keyword: 'in of if for while finally var new function do return void else break catch ' + 'instanceof with throw case default try this switch continue typeof delete ' + 'let yield const export super debugger as async await static ' +
  840. // ECMAScript 6 modules import
  841. 'import from as',
  842. literal: 'true false null undefined NaN Infinity',
  843. built_in: 'eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent ' + 'encodeURI encodeURIComponent escape unescape Object Function Boolean Error ' + 'EvalError InternalError RangeError ReferenceError StopIteration SyntaxError ' + 'TypeError URIError Number Math Date String RegExp Array Float32Array ' + 'Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array ' + 'Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require ' + 'module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect ' + 'Promise'
  844. };
  845. var NUMBER = {
  846. className: 'number',
  847. variants: [{ begin: '\\b(0[bB][01]+)' }, { begin: '\\b(0[oO][0-7]+)' }, { begin: hljs.C_NUMBER_RE }],
  848. relevance: 0
  849. };
  850. var SUBST = {
  851. className: 'subst',
  852. begin: '\\$\\{', end: '\\}',
  853. keywords: KEYWORDS,
  854. contains: [] // defined later
  855. };
  856. var HTML_TEMPLATE = {
  857. begin: 'html`', end: '',
  858. starts: {
  859. end: '`', returnEnd: false,
  860. contains: [hljs.BACKSLASH_ESCAPE, SUBST],
  861. subLanguage: 'xml'
  862. }
  863. };
  864. var CSS_TEMPLATE = {
  865. begin: 'css`', end: '',
  866. starts: {
  867. end: '`', returnEnd: false,
  868. contains: [hljs.BACKSLASH_ESCAPE, SUBST],
  869. subLanguage: 'css'
  870. }
  871. };
  872. var TEMPLATE_STRING = {
  873. className: 'string',
  874. begin: '`', end: '`',
  875. contains: [hljs.BACKSLASH_ESCAPE, SUBST]
  876. };
  877. SUBST.contains = [hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE, HTML_TEMPLATE, CSS_TEMPLATE, TEMPLATE_STRING, NUMBER, hljs.REGEXP_MODE];
  878. var PARAMS_CONTAINS = SUBST.contains.concat([hljs.C_BLOCK_COMMENT_MODE, hljs.C_LINE_COMMENT_MODE]);
  879. return {
  880. aliases: ['js', 'jsx'],
  881. keywords: KEYWORDS,
  882. contains: [{
  883. className: 'meta',
  884. relevance: 10,
  885. begin: /^\s*['"]use (strict|asm)['"]/
  886. }, {
  887. className: 'meta',
  888. begin: /^#!/, end: /$/
  889. }, hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE, HTML_TEMPLATE, CSS_TEMPLATE, TEMPLATE_STRING, hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE, NUMBER, { // object attr container
  890. begin: /[{,]\s*/, relevance: 0,
  891. contains: [{
  892. begin: IDENT_RE + '\\s*:', returnBegin: true,
  893. relevance: 0,
  894. contains: [{ className: 'attr', begin: IDENT_RE, relevance: 0 }]
  895. }]
  896. }, { // "value" container
  897. begin: '(' + hljs.RE_STARTERS_RE + '|\\b(case|return|throw)\\b)\\s*',
  898. keywords: 'return throw case',
  899. contains: [hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE, hljs.REGEXP_MODE, {
  900. className: 'function',
  901. begin: '(\\(.*?\\)|' + IDENT_RE + ')\\s*=>', returnBegin: true,
  902. end: '\\s*=>',
  903. contains: [{
  904. className: 'params',
  905. variants: [{
  906. begin: IDENT_RE
  907. }, {
  908. begin: /\(\s*\)/
  909. }, {
  910. begin: /\(/, end: /\)/,
  911. excludeBegin: true, excludeEnd: true,
  912. keywords: KEYWORDS,
  913. contains: PARAMS_CONTAINS
  914. }]
  915. }]
  916. }, {
  917. className: '',
  918. begin: /\s/,
  919. end: /\s*/,
  920. skip: true
  921. }, { // E4X / JSX
  922. begin: /</, end: /(\/[A-Za-z0-9\\._:-]+|[A-Za-z0-9\\._:-]+\/)>/,
  923. subLanguage: 'xml',
  924. contains: [{ begin: /<[A-Za-z0-9\\._:-]+\s*\/>/, skip: true }, {
  925. begin: /<[A-Za-z0-9\\._:-]+/, end: /(\/[A-Za-z0-9\\._:-]+|[A-Za-z0-9\\._:-]+\/)>/, skip: true,
  926. contains: [{ begin: /<[A-Za-z0-9\\._:-]+\s*\/>/, skip: true }, 'self']
  927. }]
  928. }],
  929. relevance: 0
  930. }, {
  931. className: 'function',
  932. beginKeywords: 'function', end: /\{/, excludeEnd: true,
  933. contains: [hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE }), {
  934. className: 'params',
  935. begin: /\(/, end: /\)/,
  936. excludeBegin: true,
  937. excludeEnd: true,
  938. contains: PARAMS_CONTAINS
  939. }],
  940. illegal: /\[|%/
  941. }, {
  942. begin: /\$[(.]/ // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`
  943. }, hljs.METHOD_GUARD, { // ES6 class
  944. className: 'class',
  945. beginKeywords: 'class', end: /[{;=]/, excludeEnd: true,
  946. illegal: /[:"\[\]]/,
  947. contains: [{ beginKeywords: 'extends' }, hljs.UNDERSCORE_TITLE_MODE]
  948. }, {
  949. beginKeywords: 'constructor get set', end: /\{/, excludeEnd: true
  950. }],
  951. illegal: /#(?!!)/
  952. };
  953. };
  954. /***/ }),
  955. /***/ 413:
  956. /***/ (function(module, exports) {
  957. module.exports = function (hljs) {
  958. var JAVA_IDENT_RE = '[\xC0-\u02B8a-zA-Z_$][\xC0-\u02B8a-zA-Z_$0-9]*';
  959. var GENERIC_IDENT_RE = JAVA_IDENT_RE + '(<' + JAVA_IDENT_RE + '(\\s*,\\s*' + JAVA_IDENT_RE + ')*>)?';
  960. var KEYWORDS = 'false synchronized int abstract float private char boolean var static null if const ' + 'for true while long strictfp finally protected import native final void ' + 'enum else break transient catch instanceof byte super volatile case assert short ' + 'package default double public try this switch continue throws protected public private ' + 'module requires exports do';
  961. // https://docs.oracle.com/javase/7/docs/technotes/guides/language/underscores-literals.html
  962. var JAVA_NUMBER_RE = '\\b' + '(' + '0[bB]([01]+[01_]+[01]+|[01]+)' + // 0b...
  963. '|' + '0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)' + // 0x...
  964. '|' + '(' + '([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?' + '|' + '\\.([\\d]+[\\d_]+[\\d]+|[\\d]+)' + ')' + '([eE][-+]?\\d+)?' + // octal, decimal, float
  965. ')' + '[lLfF]?';
  966. var JAVA_NUMBER_MODE = {
  967. className: 'number',
  968. begin: JAVA_NUMBER_RE,
  969. relevance: 0
  970. };
  971. return {
  972. aliases: ['jsp'],
  973. keywords: KEYWORDS,
  974. illegal: /<\/|#/,
  975. contains: [hljs.COMMENT('/\\*\\*', '\\*/', {
  976. relevance: 0,
  977. contains: [{
  978. // eat up @'s in emails to prevent them to be recognized as doctags
  979. begin: /\w+@/, relevance: 0
  980. }, {
  981. className: 'doctag',
  982. begin: '@[A-Za-z]+'
  983. }]
  984. }), hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE, hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE, {
  985. className: 'class',
  986. beginKeywords: 'class interface', end: /[{;=]/, excludeEnd: true,
  987. keywords: 'class interface',
  988. illegal: /[:"\[\]]/,
  989. contains: [{ beginKeywords: 'extends implements' }, hljs.UNDERSCORE_TITLE_MODE]
  990. }, {
  991. // Expression keywords prevent 'keyword Name(...)' from being
  992. // recognized as a function definition
  993. beginKeywords: 'new throw return else',
  994. relevance: 0
  995. }, {
  996. className: 'function',
  997. begin: '(' + GENERIC_IDENT_RE + '\\s+)+' + hljs.UNDERSCORE_IDENT_RE + '\\s*\\(', returnBegin: true, end: /[{;=]/,
  998. excludeEnd: true,
  999. keywords: KEYWORDS,
  1000. contains: [{
  1001. begin: hljs.UNDERSCORE_IDENT_RE + '\\s*\\(', returnBegin: true,
  1002. relevance: 0,
  1003. contains: [hljs.UNDERSCORE_TITLE_MODE]
  1004. }, {
  1005. className: 'params',
  1006. begin: /\(/, end: /\)/,
  1007. keywords: KEYWORDS,
  1008. relevance: 0,
  1009. contains: [hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE, hljs.C_NUMBER_MODE, hljs.C_BLOCK_COMMENT_MODE]
  1010. }, hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE]
  1011. }, JAVA_NUMBER_MODE, {
  1012. className: 'meta', begin: '@[A-Za-z]+'
  1013. }]
  1014. };
  1015. };
  1016. /***/ }),
  1017. /***/ 414:
  1018. /***/ (function(module, exports) {
  1019. module.exports = function (hljs) {
  1020. var IDENT_RE = '[a-zA-Z-][a-zA-Z0-9_-]*';
  1021. var RULE = {
  1022. begin: /(?:[A-Z\_\.\-]+|--[a-zA-Z0-9_-]+)\s*:/, returnBegin: true, end: ';', endsWithParent: true,
  1023. contains: [{
  1024. className: 'attribute',
  1025. begin: /\S/, end: ':', excludeEnd: true,
  1026. starts: {
  1027. endsWithParent: true, excludeEnd: true,
  1028. contains: [{
  1029. begin: /[\w-]+\(/, returnBegin: true,
  1030. contains: [{
  1031. className: 'built_in',
  1032. begin: /[\w-]+/
  1033. }, {
  1034. begin: /\(/, end: /\)/,
  1035. contains: [hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE]
  1036. }]
  1037. }, hljs.CSS_NUMBER_MODE, hljs.QUOTE_STRING_MODE, hljs.APOS_STRING_MODE, hljs.C_BLOCK_COMMENT_MODE, {
  1038. className: 'number', begin: '#[0-9A-Fa-f]+'
  1039. }, {
  1040. className: 'meta', begin: '!important'
  1041. }]
  1042. }
  1043. }]
  1044. };
  1045. return {
  1046. case_insensitive: true,
  1047. illegal: /[=\/|'\$]/,
  1048. contains: [hljs.C_BLOCK_COMMENT_MODE, {
  1049. className: 'selector-id', begin: /#[A-Za-z0-9_-]+/
  1050. }, {
  1051. className: 'selector-class', begin: /\.[A-Za-z0-9_-]+/
  1052. }, {
  1053. className: 'selector-attr',
  1054. begin: /\[/, end: /\]/,
  1055. illegal: '$'
  1056. }, {
  1057. className: 'selector-pseudo',
  1058. begin: /:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/
  1059. }, {
  1060. begin: '@(font-face|page)',
  1061. lexemes: '[a-z-]+',
  1062. keywords: 'font-face page'
  1063. }, {
  1064. begin: '@', end: '[{;]', // at_rule eating first "{" is a good thing
  1065. // because it doesn’t let it to be parsed as
  1066. // a rule set but instead drops parser into
  1067. // the default mode which is how it should be.
  1068. illegal: /:/, // break on Less variables @var: ...
  1069. contains: [{
  1070. className: 'keyword',
  1071. begin: /\w+/
  1072. }, {
  1073. begin: /\s/, endsWithParent: true, excludeEnd: true,
  1074. relevance: 0,
  1075. contains: [hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE, hljs.CSS_NUMBER_MODE]
  1076. }]
  1077. }, {
  1078. className: 'selector-tag', begin: IDENT_RE,
  1079. relevance: 0
  1080. }, {
  1081. begin: '{', end: '}',
  1082. illegal: /\S/,
  1083. contains: [hljs.C_BLOCK_COMMENT_MODE, RULE]
  1084. }]
  1085. };
  1086. };
  1087. /***/ }),
  1088. /***/ 415:
  1089. /***/ (function(module, exports) {
  1090. module.exports = function (hljs) {
  1091. var IDENT_RE = '[\\w-]+'; // yes, Less identifiers may begin with a digit
  1092. var INTERP_IDENT_RE = '(' + IDENT_RE + '|@{' + IDENT_RE + '})';
  1093. /* Generic Modes */
  1094. var RULES = [],
  1095. VALUE = []; // forward def. for recursive modes
  1096. var STRING_MODE = function STRING_MODE(c) {
  1097. return {
  1098. // Less strings are not multiline (also include '~' for more consistent coloring of "escaped" strings)
  1099. className: 'string', begin: '~?' + c + '.*?' + c
  1100. };
  1101. };
  1102. var IDENT_MODE = function IDENT_MODE(name, begin, relevance) {
  1103. return {
  1104. className: name, begin: begin, relevance: relevance
  1105. };
  1106. };
  1107. var PARENS_MODE = {
  1108. // used only to properly balance nested parens inside mixin call, def. arg list
  1109. begin: '\\(', end: '\\)', contains: VALUE, relevance: 0
  1110. };
  1111. // generic Less highlighter (used almost everywhere except selectors):
  1112. VALUE.push(hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE, STRING_MODE("'"), STRING_MODE('"'), hljs.CSS_NUMBER_MODE, // fixme: it does not include dot for numbers like .5em :(
  1113. {
  1114. begin: '(url|data-uri)\\(',
  1115. starts: { className: 'string', end: '[\\)\\n]', excludeEnd: true }
  1116. }, IDENT_MODE('number', '#[0-9A-Fa-f]+\\b'), PARENS_MODE, IDENT_MODE('variable', '@@?' + IDENT_RE, 10), IDENT_MODE('variable', '@{' + IDENT_RE + '}'), IDENT_MODE('built_in', '~?`[^`]*?`'), // inline javascript (or whatever host language) *multiline* string
  1117. { // @media features (it’s here to not duplicate things in AT_RULE_MODE with extra PARENS_MODE overriding):
  1118. className: 'attribute', begin: IDENT_RE + '\\s*:', end: ':', returnBegin: true, excludeEnd: true
  1119. }, {
  1120. className: 'meta',
  1121. begin: '!important'
  1122. });
  1123. var VALUE_WITH_RULESETS = VALUE.concat({
  1124. begin: '{', end: '}', contains: RULES
  1125. });
  1126. var MIXIN_GUARD_MODE = {
  1127. beginKeywords: 'when', endsWithParent: true,
  1128. contains: [{ beginKeywords: 'and not' }].concat(VALUE) // using this form to override VALUE’s 'function' match
  1129. };
  1130. /* Rule-Level Modes */
  1131. var RULE_MODE = {
  1132. begin: INTERP_IDENT_RE + '\\s*:', returnBegin: true, end: '[;}]',
  1133. relevance: 0,
  1134. contains: [{
  1135. className: 'attribute',
  1136. begin: INTERP_IDENT_RE, end: ':', excludeEnd: true,
  1137. starts: {
  1138. endsWithParent: true, illegal: '[<=$]',
  1139. relevance: 0,
  1140. contains: VALUE
  1141. }
  1142. }]
  1143. };
  1144. var AT_RULE_MODE = {
  1145. className: 'keyword',
  1146. begin: '@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b',
  1147. starts: { end: '[;{}]', returnEnd: true, contains: VALUE, relevance: 0 }
  1148. };
  1149. // variable definitions and calls
  1150. var VAR_RULE_MODE = {
  1151. className: 'variable',
  1152. variants: [
  1153. // using more strict pattern for higher relevance to increase chances of Less detection.
  1154. // this is *the only* Less specific statement used in most of the sources, so...
  1155. // (we’ll still often loose to the css-parser unless there's '//' comment,
  1156. // simply because 1 variable just can't beat 99 properties :)
  1157. { begin: '@' + IDENT_RE + '\\s*:', relevance: 15 }, { begin: '@' + IDENT_RE }],
  1158. starts: { end: '[;}]', returnEnd: true, contains: VALUE_WITH_RULESETS }
  1159. };
  1160. var SELECTOR_MODE = {
  1161. // first parse unambiguous selectors (i.e. those not starting with tag)
  1162. // then fall into the scary lookahead-discriminator variant.
  1163. // this mode also handles mixin definitions and calls
  1164. variants: [{
  1165. begin: '[\\.#:&\\[>]', end: '[;{}]' // mixin calls end with ';'
  1166. }, {
  1167. begin: INTERP_IDENT_RE, end: '{'
  1168. }],
  1169. returnBegin: true,
  1170. returnEnd: true,
  1171. illegal: '[<=\'$"]',
  1172. relevance: 0,
  1173. contains: [hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE, MIXIN_GUARD_MODE, IDENT_MODE('keyword', 'all\\b'), IDENT_MODE('variable', '@{' + IDENT_RE + '}'), // otherwise it’s identified as tag
  1174. IDENT_MODE('selector-tag', INTERP_IDENT_RE + '%?', 0), // '%' for more consistent coloring of @keyframes "tags"
  1175. IDENT_MODE('selector-id', '#' + INTERP_IDENT_RE), IDENT_MODE('selector-class', '\\.' + INTERP_IDENT_RE, 0), IDENT_MODE('selector-tag', '&', 0), { className: 'selector-attr', begin: '\\[', end: '\\]' }, { className: 'selector-pseudo', begin: /:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/ }, { begin: '\\(', end: '\\)', contains: VALUE_WITH_RULESETS }, // argument list of parametric mixins
  1176. { begin: '!important' // eat !important after mixin call or it will be colored as tag
  1177. }]
  1178. };
  1179. RULES.push(hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE, AT_RULE_MODE, VAR_RULE_MODE, RULE_MODE, SELECTOR_MODE);
  1180. return {
  1181. case_insensitive: true,
  1182. illegal: '[=>\'/<($"]',
  1183. contains: RULES
  1184. };
  1185. };
  1186. /***/ }),
  1187. /***/ 416:
  1188. /***/ (function(module, exports) {
  1189. module.exports = function (hljs) {
  1190. var GO_KEYWORDS = {
  1191. keyword: 'break default func interface select case map struct chan else goto package switch ' + 'const fallthrough if range type continue for import return var go defer ' + 'bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 ' + 'uint16 uint32 uint64 int uint uintptr rune',
  1192. literal: 'true false iota nil',
  1193. built_in: 'append cap close complex copy imag len make new panic print println real recover delete'
  1194. };
  1195. return {
  1196. aliases: ['golang'],
  1197. keywords: GO_KEYWORDS,
  1198. illegal: '</',
  1199. contains: [hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE, {
  1200. className: 'string',
  1201. variants: [hljs.QUOTE_STRING_MODE, { begin: '\'', end: '[^\\\\]\'' }, { begin: '`', end: '`' }]
  1202. }, {
  1203. className: 'number',
  1204. variants: [{ begin: hljs.C_NUMBER_RE + '[i]', relevance: 1 }, hljs.C_NUMBER_MODE]
  1205. }, {
  1206. begin: /:=/ // relevance booster
  1207. }, {
  1208. className: 'function',
  1209. beginKeywords: 'func', end: /\s*\{/, excludeEnd: true,
  1210. contains: [hljs.TITLE_MODE, {
  1211. className: 'params',
  1212. begin: /\(/, end: /\)/,
  1213. keywords: GO_KEYWORDS,
  1214. illegal: /["']/
  1215. }]
  1216. }]
  1217. };
  1218. };
  1219. /***/ }),
  1220. /***/ 417:
  1221. /***/ (function(module, exports) {
  1222. module.exports = function (hljs) {
  1223. return {
  1224. aliases: ['md', 'mkdown', 'mkd'],
  1225. contains: [
  1226. // highlight headers
  1227. {
  1228. className: 'section',
  1229. variants: [{ begin: '^#{1,6}', end: '$' }, { begin: '^.+?\\n[=-]{2,}$' }]
  1230. },
  1231. // inline html
  1232. {
  1233. begin: '<', end: '>',
  1234. subLanguage: 'xml',
  1235. relevance: 0
  1236. },
  1237. // lists (indicators only)
  1238. {
  1239. className: 'bullet',
  1240. begin: '^\\s*([*+-]|(\\d+\\.))\\s+'
  1241. },
  1242. // strong segments
  1243. {
  1244. className: 'strong',
  1245. begin: '[*_]{2}.+?[*_]{2}'
  1246. },
  1247. // emphasis segments
  1248. {
  1249. className: 'emphasis',
  1250. variants: [{ begin: '\\*.+?\\*' }, { begin: '_.+?_',
  1251. relevance: 0
  1252. }]
  1253. },
  1254. // blockquotes
  1255. {
  1256. className: 'quote',
  1257. begin: '^>\\s+', end: '$'
  1258. },
  1259. // code snippets
  1260. {
  1261. className: 'code',
  1262. variants: [{
  1263. begin: '^```\w*\s*$', end: '^```\s*$'
  1264. }, {
  1265. begin: '`.+?`'
  1266. }, {
  1267. begin: '^( {4}|\t)', end: '$',
  1268. relevance: 0
  1269. }]
  1270. },
  1271. // horizontal rules
  1272. {
  1273. begin: '^[-\\*]{3,}', end: '$'
  1274. },
  1275. // using links - title and link
  1276. {
  1277. begin: '\\[.+?\\][\\(\\[].*?[\\)\\]]',
  1278. returnBegin: true,
  1279. contains: [{
  1280. className: 'string',
  1281. begin: '\\[', end: '\\]',
  1282. excludeBegin: true,
  1283. returnEnd: true,
  1284. relevance: 0
  1285. }, {
  1286. className: 'link',
  1287. begin: '\\]\\(', end: '\\)',
  1288. excludeBegin: true, excludeEnd: true
  1289. }, {
  1290. className: 'symbol',
  1291. begin: '\\]\\[', end: '\\]',
  1292. excludeBegin: true, excludeEnd: true
  1293. }],
  1294. relevance: 10
  1295. }, {
  1296. begin: /^\[[^\n]+\]:/,
  1297. returnBegin: true,
  1298. contains: [{
  1299. className: 'symbol',
  1300. begin: /\[/, end: /\]/,
  1301. excludeBegin: true, excludeEnd: true
  1302. }, {
  1303. className: 'link',
  1304. begin: /:\s*/, end: /$/,
  1305. excludeBegin: true
  1306. }]
  1307. }]
  1308. };
  1309. };
  1310. /***/ }),
  1311. /***/ 418:
  1312. /***/ (function(module, exports) {
  1313. module.exports = function (hljs) {
  1314. var VARIABLE = {
  1315. begin: '\\$+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'
  1316. };
  1317. var PREPROCESSOR = {
  1318. className: 'meta', begin: /<\?(php)?|\?>/
  1319. };
  1320. var STRING = {
  1321. className: 'string',
  1322. contains: [hljs.BACKSLASH_ESCAPE, PREPROCESSOR],
  1323. variants: [{
  1324. begin: 'b"', end: '"'
  1325. }, {
  1326. begin: 'b\'', end: '\''
  1327. }, hljs.inherit(hljs.APOS_STRING_MODE, { illegal: null }), hljs.inherit(hljs.QUOTE_STRING_MODE, { illegal: null })]
  1328. };
  1329. var NUMBER = { variants: [hljs.BINARY_NUMBER_MODE, hljs.C_NUMBER_MODE] };
  1330. return {
  1331. aliases: ['php', 'php3', 'php4', 'php5', 'php6', 'php7'],
  1332. case_insensitive: true,
  1333. keywords: 'and include_once list abstract global private echo interface as static endswitch ' + 'array null if endwhile or const for endforeach self var while isset public ' + 'protected exit foreach throw elseif include __FILE__ empty require_once do xor ' + 'return parent clone use __CLASS__ __LINE__ else break print eval new ' + 'catch __METHOD__ case exception default die require __FUNCTION__ ' + 'enddeclare final try switch continue endfor endif declare unset true false ' + 'trait goto instanceof insteadof __DIR__ __NAMESPACE__ ' + 'yield finally',
  1334. contains: [hljs.HASH_COMMENT_MODE, hljs.COMMENT('//', '$', { contains: [PREPROCESSOR] }), hljs.COMMENT('/\\*', '\\*/', {
  1335. contains: [{
  1336. className: 'doctag',
  1337. begin: '@[A-Za-z]+'
  1338. }]
  1339. }), hljs.COMMENT('__halt_compiler.+?;', false, {
  1340. endsWithParent: true,
  1341. keywords: '__halt_compiler',
  1342. lexemes: hljs.UNDERSCORE_IDENT_RE
  1343. }), {
  1344. className: 'string',
  1345. begin: /<<<['"]?\w+['"]?$/, end: /^\w+;?$/,
  1346. contains: [hljs.BACKSLASH_ESCAPE, {
  1347. className: 'subst',
  1348. variants: [{ begin: /\$\w+/ }, { begin: /\{\$/, end: /\}/ }]
  1349. }]
  1350. }, PREPROCESSOR, {
  1351. className: 'keyword', begin: /\$this\b/
  1352. }, VARIABLE, {
  1353. // swallow composed identifiers to avoid parsing them as keywords
  1354. begin: /(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/
  1355. }, {
  1356. className: 'function',
  1357. beginKeywords: 'function', end: /[;{]/, excludeEnd: true,
  1358. illegal: '\\$|\\[|%',
  1359. contains: [hljs.UNDERSCORE_TITLE_MODE, {
  1360. className: 'params',
  1361. begin: '\\(', end: '\\)',
  1362. contains: ['self', VARIABLE, hljs.C_BLOCK_COMMENT_MODE, STRING, NUMBER]
  1363. }]
  1364. }, {
  1365. className: 'class',
  1366. beginKeywords: 'class interface', end: '{', excludeEnd: true,
  1367. illegal: /[:\(\$"]/,
  1368. contains: [{ beginKeywords: 'extends implements' }, hljs.UNDERSCORE_TITLE_MODE]
  1369. }, {
  1370. beginKeywords: 'namespace', end: ';',
  1371. illegal: /[\.']/,
  1372. contains: [hljs.UNDERSCORE_TITLE_MODE]
  1373. }, {
  1374. beginKeywords: 'use', end: ';',
  1375. contains: [hljs.UNDERSCORE_TITLE_MODE]
  1376. }, {
  1377. begin: '=>' // No markup, just a relevance booster
  1378. }, STRING, NUMBER]
  1379. };
  1380. };
  1381. /***/ }),
  1382. /***/ 419:
  1383. /***/ (function(module, exports) {
  1384. module.exports = function (hljs) {
  1385. var KEYWORDS = {
  1386. keyword: 'and elif is global as in if from raise for except finally print import pass return ' + 'exec else break not with class assert yield try while continue del or def lambda ' + 'async await nonlocal|10',
  1387. built_in: 'Ellipsis NotImplemented',
  1388. literal: 'False None True'
  1389. };
  1390. var PROMPT = {
  1391. className: 'meta', begin: /^(>>>|\.\.\.) /
  1392. };
  1393. var SUBST = {
  1394. className: 'subst',
  1395. begin: /\{/, end: /\}/,
  1396. keywords: KEYWORDS,
  1397. illegal: /#/
  1398. };
  1399. var STRING = {
  1400. className: 'string',
  1401. contains: [hljs.BACKSLASH_ESCAPE],
  1402. variants: [{
  1403. begin: /(u|b)?r?'''/, end: /'''/,
  1404. contains: [hljs.BACKSLASH_ESCAPE, PROMPT],
  1405. relevance: 10
  1406. }, {
  1407. begin: /(u|b)?r?"""/, end: /"""/,
  1408. contains: [hljs.BACKSLASH_ESCAPE, PROMPT],
  1409. relevance: 10
  1410. }, {
  1411. begin: /(fr|rf|f)'''/, end: /'''/,
  1412. contains: [hljs.BACKSLASH_ESCAPE, PROMPT, SUBST]
  1413. }, {
  1414. begin: /(fr|rf|f)"""/, end: /"""/,
  1415. contains: [hljs.BACKSLASH_ESCAPE, PROMPT, SUBST]
  1416. }, {
  1417. begin: /(u|r|ur)'/, end: /'/,
  1418. relevance: 10
  1419. }, {
  1420. begin: /(u|r|ur)"/, end: /"/,
  1421. relevance: 10
  1422. }, {
  1423. begin: /(b|br)'/, end: /'/
  1424. }, {
  1425. begin: /(b|br)"/, end: /"/
  1426. }, {
  1427. begin: /(fr|rf|f)'/, end: /'/,
  1428. contains: [hljs.BACKSLASH_ESCAPE, SUBST]
  1429. }, {
  1430. begin: /(fr|rf|f)"/, end: /"/,
  1431. contains: [hljs.BACKSLASH_ESCAPE, SUBST]
  1432. }, hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE]
  1433. };
  1434. var NUMBER = {
  1435. className: 'number', relevance: 0,
  1436. variants: [{ begin: hljs.BINARY_NUMBER_RE + '[lLjJ]?' }, { begin: '\\b(0o[0-7]+)[lLjJ]?' }, { begin: hljs.C_NUMBER_RE + '[lLjJ]?' }]
  1437. };
  1438. var PARAMS = {
  1439. className: 'params',
  1440. begin: /\(/, end: /\)/,
  1441. contains: ['self', PROMPT, NUMBER, STRING]
  1442. };
  1443. SUBST.contains = [STRING, NUMBER, PROMPT];
  1444. return {
  1445. aliases: ['py', 'gyp', 'ipython'],
  1446. keywords: KEYWORDS,
  1447. illegal: /(<\/|->|\?)|=>/,
  1448. contains: [PROMPT, NUMBER, STRING, hljs.HASH_COMMENT_MODE, {
  1449. variants: [{ className: 'function', beginKeywords: 'def' }, { className: 'class', beginKeywords: 'class' }],
  1450. end: /:/,
  1451. illegal: /[${=;\n,]/,
  1452. contains: [hljs.UNDERSCORE_TITLE_MODE, PARAMS, {
  1453. begin: /->/, endsWithParent: true,
  1454. keywords: 'None'
  1455. }]
  1456. }, {
  1457. className: 'meta',
  1458. begin: /^[\t ]*@/, end: /$/
  1459. }, {
  1460. begin: /\b(print|exec)\(/ // don’t highlight keywords-turned-functions in Python 3
  1461. }]
  1462. };
  1463. };
  1464. /***/ }),
  1465. /***/ 420:
  1466. /***/ (function(module, exports) {
  1467. module.exports = function (hljs) {
  1468. var JS_IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*';
  1469. var KEYWORDS = {
  1470. keyword: 'in if for while finally var new function do return void else break catch ' + 'instanceof with throw case default try this switch continue typeof delete ' + 'let yield const class public private protected get set super ' + 'static implements enum export import declare type namespace abstract ' + 'as from extends async await',
  1471. literal: 'true false null undefined NaN Infinity',
  1472. built_in: 'eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent ' + 'encodeURI encodeURIComponent escape unescape Object Function Boolean Error ' + 'EvalError InternalError RangeError ReferenceError StopIteration SyntaxError ' + 'TypeError URIError Number Math Date String RegExp Array Float32Array ' + 'Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array ' + 'Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require ' + 'module console window document any number boolean string void Promise'
  1473. };
  1474. var DECORATOR = {
  1475. className: 'meta',
  1476. begin: '@' + JS_IDENT_RE
  1477. };
  1478. var ARGS = {
  1479. begin: '\\(',
  1480. end: /\)/,
  1481. keywords: KEYWORDS,
  1482. contains: ['self', hljs.QUOTE_STRING_MODE, hljs.APOS_STRING_MODE, hljs.NUMBER_MODE]
  1483. };
  1484. var PARAMS = {
  1485. className: 'params',
  1486. begin: /\(/, end: /\)/,
  1487. excludeBegin: true,
  1488. excludeEnd: true,
  1489. keywords: KEYWORDS,
  1490. contains: [hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE, DECORATOR, ARGS]
  1491. };
  1492. var NUMBER = {
  1493. className: 'number',
  1494. variants: [{ begin: '\\b(0[bB][01]+)' }, { begin: '\\b(0[oO][0-7]+)' }, { begin: hljs.C_NUMBER_RE }],
  1495. relevance: 0
  1496. };
  1497. var SUBST = {
  1498. className: 'subst',
  1499. begin: '\\$\\{', end: '\\}',
  1500. keywords: KEYWORDS,
  1501. contains: [] // defined later
  1502. };
  1503. var HTML_TEMPLATE = {
  1504. begin: 'html`', end: '',
  1505. starts: {
  1506. end: '`', returnEnd: false,
  1507. contains: [hljs.BACKSLASH_ESCAPE, SUBST],
  1508. subLanguage: 'xml'
  1509. }
  1510. };
  1511. var CSS_TEMPLATE = {
  1512. begin: 'css`', end: '',
  1513. starts: {
  1514. end: '`', returnEnd: false,
  1515. contains: [hljs.BACKSLASH_ESCAPE, SUBST],
  1516. subLanguage: 'css'
  1517. }
  1518. };
  1519. var TEMPLATE_STRING = {
  1520. className: 'string',
  1521. begin: '`', end: '`',
  1522. contains: [hljs.BACKSLASH_ESCAPE, SUBST]
  1523. };
  1524. SUBST.contains = [hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE, HTML_TEMPLATE, CSS_TEMPLATE, TEMPLATE_STRING, NUMBER, hljs.REGEXP_MODE];
  1525. return {
  1526. aliases: ['ts'],
  1527. keywords: KEYWORDS,
  1528. contains: [{
  1529. className: 'meta',
  1530. begin: /^\s*['"]use strict['"]/
  1531. }, hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE, HTML_TEMPLATE, CSS_TEMPLATE, TEMPLATE_STRING, hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE, NUMBER, { // "value" container
  1532. begin: '(' + hljs.RE_STARTERS_RE + '|\\b(case|return|throw)\\b)\\s*',
  1533. keywords: 'return throw case',
  1534. contains: [hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE, hljs.REGEXP_MODE, {
  1535. className: 'function',
  1536. begin: '(\\(.*?\\)|' + hljs.IDENT_RE + ')\\s*=>', returnBegin: true,
  1537. end: '\\s*=>',
  1538. contains: [{
  1539. className: 'params',
  1540. variants: [{
  1541. begin: hljs.IDENT_RE
  1542. }, {
  1543. begin: /\(\s*\)/
  1544. }, {
  1545. begin: /\(/, end: /\)/,
  1546. excludeBegin: true, excludeEnd: true,
  1547. keywords: KEYWORDS,
  1548. contains: ['self', hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE]
  1549. }]
  1550. }]
  1551. }],
  1552. relevance: 0
  1553. }, {
  1554. className: 'function',
  1555. begin: 'function', end: /[\{;]/, excludeEnd: true,
  1556. keywords: KEYWORDS,
  1557. contains: ['self', hljs.inherit(hljs.TITLE_MODE, { begin: JS_IDENT_RE }), PARAMS],
  1558. illegal: /%/,
  1559. relevance: 0 // () => {} is more typical in TypeScript
  1560. }, {
  1561. beginKeywords: 'constructor', end: /\{/, excludeEnd: true,
  1562. contains: ['self', PARAMS]
  1563. }, { // prevent references like module.id from being higlighted as module definitions
  1564. begin: /module\./,
  1565. keywords: { built_in: 'module' },
  1566. relevance: 0
  1567. }, {
  1568. beginKeywords: 'module', end: /\{/, excludeEnd: true
  1569. }, {
  1570. beginKeywords: 'interface', end: /\{/, excludeEnd: true,
  1571. keywords: 'interface extends'
  1572. }, {
  1573. begin: /\$[(.]/ // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`
  1574. }, {
  1575. begin: '\\.' + hljs.IDENT_RE, relevance: 0 // hack: prevents detection of keywords after dots
  1576. }, DECORATOR, ARGS]
  1577. };
  1578. };
  1579. /***/ }),
  1580. /***/ 421:
  1581. /***/ (function(module, exports) {
  1582. module.exports = function (hljs) {
  1583. var XML_IDENT_RE = '[A-Za-z0-9\\._:-]+';
  1584. var TAG_INTERNALS = {
  1585. endsWithParent: true,
  1586. illegal: /</,
  1587. relevance: 0,
  1588. contains: [{
  1589. className: 'attr',
  1590. begin: XML_IDENT_RE,
  1591. relevance: 0
  1592. }, {
  1593. begin: /=\s*/,
  1594. relevance: 0,
  1595. contains: [{
  1596. className: 'string',
  1597. endsParent: true,
  1598. variants: [{ begin: /"/, end: /"/ }, { begin: /'/, end: /'/ }, { begin: /[^\s"'=<>`]+/ }]
  1599. }]
  1600. }]
  1601. };
  1602. return {
  1603. aliases: ['html', 'xhtml', 'rss', 'atom', 'xjb', 'xsd', 'xsl', 'plist', 'wsf'],
  1604. case_insensitive: true,
  1605. contains: [{
  1606. className: 'meta',
  1607. begin: '<!DOCTYPE', end: '>',
  1608. relevance: 10,
  1609. contains: [{ begin: '\\[', end: '\\]' }]
  1610. }, hljs.COMMENT('<!--', '-->', {
  1611. relevance: 10
  1612. }), {
  1613. begin: '<\\!\\[CDATA\\[', end: '\\]\\]>',
  1614. relevance: 10
  1615. }, {
  1616. className: 'meta',
  1617. begin: /<\?xml/, end: /\?>/, relevance: 10
  1618. }, {
  1619. begin: /<\?(php)?/, end: /\?>/,
  1620. subLanguage: 'php',
  1621. contains: [
  1622. // We don't want the php closing tag ?> to close the PHP block when
  1623. // inside any of the following blocks:
  1624. { begin: '/\\*', end: '\\*/', skip: true }, { begin: 'b"', end: '"', skip: true }, { begin: 'b\'', end: '\'', skip: true }, hljs.inherit(hljs.APOS_STRING_MODE, { illegal: null, className: null, contains: null, skip: true }), hljs.inherit(hljs.QUOTE_STRING_MODE, { illegal: null, className: null, contains: null, skip: true })]
  1625. }, {
  1626. className: 'tag',
  1627. /*
  1628. The lookahead pattern (?=...) ensures that 'begin' only matches
  1629. '<style' as a single word, followed by a whitespace or an
  1630. ending braket. The '$' is needed for the lexeme to be recognized
  1631. by hljs.subMode() that tests lexemes outside the stream.
  1632. */
  1633. begin: '<style(?=\\s|>|$)', end: '>',
  1634. keywords: { name: 'style' },
  1635. contains: [TAG_INTERNALS],
  1636. starts: {
  1637. end: '</style>', returnEnd: true,
  1638. subLanguage: ['css', 'xml']
  1639. }
  1640. }, {
  1641. className: 'tag',
  1642. // See the comment in the <style tag about the lookahead pattern
  1643. begin: '<script(?=\\s|>|$)', end: '>',
  1644. keywords: { name: 'script' },
  1645. contains: [TAG_INTERNALS],
  1646. starts: {
  1647. end: '\<\/script\>', returnEnd: true,
  1648. subLanguage: ['actionscript', 'javascript', 'handlebars', 'xml', 'vbscript']
  1649. }
  1650. }, {
  1651. className: 'tag',
  1652. begin: '</?', end: '/?>',
  1653. contains: [{
  1654. className: 'name', begin: /[^\/><\s]+/, relevance: 0
  1655. }, TAG_INTERNALS]
  1656. }]
  1657. };
  1658. };
  1659. /***/ }),
  1660. /***/ 422:
  1661. /***/ (function(module, exports) {
  1662. module.exports = function (hljs) {
  1663. var BACKTICK_ESCAPE = {
  1664. begin: '`[\\s\\S]'
  1665. };
  1666. return {
  1667. case_insensitive: true,
  1668. aliases: ['ahk'],
  1669. keywords: {
  1670. keyword: 'Break Continue Critical Exit ExitApp Gosub Goto New OnExit Pause return SetBatchLines SetTimer Suspend Thread Throw Until ahk_id ahk_class ahk_pid ahk_exe ahk_group',
  1671. literal: 'true false NOT AND OR',
  1672. built_in: 'ComSpec Clipboard ClipboardAll ErrorLevel'
  1673. },
  1674. contains: [BACKTICK_ESCAPE, hljs.inherit(hljs.QUOTE_STRING_MODE, { contains: [BACKTICK_ESCAPE] }), hljs.COMMENT(';', '$', { relevance: 0 }), hljs.C_BLOCK_COMMENT_MODE, {
  1675. className: 'number',
  1676. begin: hljs.NUMBER_RE,
  1677. relevance: 0
  1678. }, {
  1679. className: 'variable', //subst would be the most accurate however fails the point of highlighting. variable is comparably the most accurate that actually has some effect
  1680. begin: '%[a-zA-Z0-9#_$@]+%'
  1681. }, {
  1682. className: 'built_in',
  1683. begin: '^\\s*\\w+\\s*(,|%)'
  1684. //I don't really know if this is totally relevant
  1685. }, {
  1686. className: 'title', //symbol would be most accurate however is higlighted just like built_in and that makes up a lot of AutoHotkey code
  1687. //meaning that it would fail to highlight anything
  1688. variants: [{ begin: '^[^\\n";]+::(?!=)' }, { begin: '^[^\\n";]+:(?!=)', relevance: 0 // zero relevance as it catches a lot of things
  1689. // followed by a single ':' in many languages
  1690. }]
  1691. }, {
  1692. className: 'meta',
  1693. begin: '^\\s*#\\w+', end: '$',
  1694. relevance: 0
  1695. }, {
  1696. className: 'built_in',
  1697. begin: 'A_[a-zA-Z0-9]+'
  1698. }, {
  1699. // consecutive commas, not for highlighting but just for relevance
  1700. begin: ',\\s*,'
  1701. }]
  1702. };
  1703. };
  1704. /***/ }),
  1705. /***/ 423:
  1706. /***/ (function(module, exports) {
  1707. module.exports = function (hljs) {
  1708. var KEYWORDS = 'ByRef Case Const ContinueCase ContinueLoop ' + 'Default Dim Do Else ElseIf EndFunc EndIf EndSelect ' + 'EndSwitch EndWith Enum Exit ExitLoop For Func ' + 'Global If In Local Next ReDim Return Select Static ' + 'Step Switch Then To Until Volatile WEnd While With',
  1709. LITERAL = 'True False And Null Not Or',
  1710. BUILT_IN = 'Abs ACos AdlibRegister AdlibUnRegister Asc AscW ASin Assign ATan AutoItSetOption AutoItWinGetTitle AutoItWinSetTitle Beep Binary BinaryLen BinaryMid BinaryToString BitAND BitNOT BitOR BitRotate BitShift BitXOR BlockInput Break Call CDTray Ceiling Chr ChrW ClipGet ClipPut ConsoleRead ConsoleWrite ConsoleWriteError ControlClick ControlCommand ControlDisable ControlEnable ControlFocus ControlGetFocus ControlGetHandle ControlGetPos ControlGetText ControlHide ControlListView ControlMove ControlSend ControlSetText ControlShow ControlTreeView Cos Dec DirCopy DirCreate DirGetSize DirMove DirRemove DllCall DllCallAddress DllCallbackFree DllCallbackGetPtr DllCallbackRegister DllClose DllOpen DllStructCreate DllStructGetData DllStructGetPtr DllStructGetSize DllStructSetData DriveGetDrive DriveGetFileSystem DriveGetLabel DriveGetSerial DriveGetType DriveMapAdd DriveMapDel DriveMapGet DriveSetLabel DriveSpaceFree DriveSpaceTotal DriveStatus EnvGet EnvSet EnvUpdate Eval Execute Exp FileChangeDir FileClose FileCopy FileCreateNTFSLink FileCreateShortcut FileDelete FileExists FileFindFirstFile FileFindNextFile FileFlush FileGetAttrib FileGetEncoding FileGetLongName FileGetPos FileGetShortcut FileGetShortName FileGetSize FileGetTime FileGetVersion FileInstall FileMove FileOpen FileOpenDialog FileRead FileReadLine FileReadToArray FileRecycle FileRecycleEmpty FileSaveDialog FileSelectFolder FileSetAttrib FileSetEnd FileSetPos FileSetTime FileWrite FileWriteLine Floor FtpSetProxy FuncName GUICreate GUICtrlCreateAvi GUICtrlCreateButton GUICtrlCreateCheckbox GUICtrlCreateCombo GUICtrlCreateContextMenu GUICtrlCreateDate GUICtrlCreateDummy GUICtrlCreateEdit GUICtrlCreateGraphic GUICtrlCreateGroup GUICtrlCreateIcon GUICtrlCreateInput GUICtrlCreateLabel GUICtrlCreateList GUICtrlCreateListView GUICtrlCreateListViewItem GUICtrlCreateMenu GUICtrlCreateMenuItem GUICtrlCreateMonthCal GUICtrlCreateObj GUICtrlCreatePic GUICtrlCreateProgress GUICtrlCreateRadio GUICtrlCreateSlider GUICtrlCreateTab GUICtrlCreateTabItem GUICtrlCreateTreeView GUICtrlCreateTreeViewItem GUICtrlCreateUpdown GUICtrlDelete GUICtrlGetHandle GUICtrlGetState GUICtrlRead GUICtrlRecvMsg GUICtrlRegisterListViewSort GUICtrlSendMsg GUICtrlSendToDummy GUICtrlSetBkColor GUICtrlSetColor GUICtrlSetCursor GUICtrlSetData GUICtrlSetDefBkColor GUICtrlSetDefColor GUICtrlSetFont GUICtrlSetGraphic GUICtrlSetImage GUICtrlSetLimit GUICtrlSetOnEvent GUICtrlSetPos GUICtrlSetResizing GUICtrlSetState GUICtrlSetStyle GUICtrlSetTip GUIDelete GUIGetCursorInfo GUIGetMsg GUIGetStyle GUIRegisterMsg GUISetAccelerators GUISetBkColor GUISetCoord GUISetCursor GUISetFont GUISetHelp GUISetIcon GUISetOnEvent GUISetState GUISetStyle GUIStartGroup GUISwitch Hex HotKeySet HttpSetProxy HttpSetUserAgent HWnd InetClose InetGet InetGetInfo InetGetSize InetRead IniDelete IniRead IniReadSection IniReadSectionNames IniRenameSection IniWrite IniWriteSection InputBox Int IsAdmin IsArray IsBinary IsBool IsDeclared IsDllStruct IsFloat IsFunc IsHWnd IsInt IsKeyword IsNumber IsObj IsPtr IsString Log MemGetStats Mod MouseClick MouseClickDrag MouseDown MouseGetCursor MouseGetPos MouseMove MouseUp MouseWheel MsgBox Number ObjCreate ObjCreateInterface ObjEvent ObjGet ObjName OnAutoItExitRegister OnAutoItExitUnRegister Ping PixelChecksum PixelGetColor PixelSearch ProcessClose ProcessExists ProcessGetStats ProcessList ProcessSetPriority ProcessWait ProcessWaitClose ProgressOff ProgressOn ProgressSet Ptr Random RegDelete RegEnumKey RegEnumVal RegRead RegWrite Round Run RunAs RunAsWait RunWait Send SendKeepActive SetError SetExtended ShellExecute ShellExecuteWait Shutdown Sin Sleep SoundPlay SoundSetWaveVolume SplashImageOn SplashOff SplashTextOn Sqrt SRandom StatusbarGetText StderrRead StdinWrite StdioClose StdoutRead String StringAddCR StringCompare StringFormat StringFromASCIIArray StringInStr StringIsAlNum StringIsAlpha StringIsASCII StringIsDigit StringIsFloat StringIsInt StringIsLower StringIsSpace StringIsUpper StringIsXDigit StringLeft StringLen StringLower StringMid StringRegExp StringRegExpReplace StringReplace StringReverse StringRight StringSplit StringStripCR StringStripWS StringToASCIIArray StringToBinary StringTrimLeft StringTrimRight StringUpper Tan TCPAccept TCPCloseSocket TCPConnect TCPListen TCPNameToIP TCPRecv TCPSend TCPShutdown, UDPShutdown TCPStartup, UDPStartup TimerDiff TimerInit ToolTip TrayCreateItem TrayCreateMenu TrayGetMsg TrayItemDelete TrayItemGetHandle TrayItemGetState TrayItemGetText TrayItemSetOnEvent TrayItemSetState TrayItemSetText TraySetClick TraySetIcon TraySetOnEvent TraySetPauseIcon TraySetState TraySetToolTip TrayTip UBound UDPBind UDPCloseSocket UDPOpen UDPRecv UDPSend VarGetType WinActivate WinActive WinClose WinExists WinFlash WinGetCaretPos WinGetClassList WinGetClientSize WinGetHandle WinGetPos WinGetProcess WinGetState WinGetText WinGetTitle WinKill WinList WinMenuSelectItem WinMinimizeAll WinMinimizeAllUndo WinMove WinSetOnTop WinSetState WinSetTitle WinSetTrans WinWait',
  1711. COMMENT = {
  1712. variants: [hljs.COMMENT(';', '$', { relevance: 0 }), hljs.COMMENT('#cs', '#ce'), hljs.COMMENT('#comments-start', '#comments-end')]
  1713. },
  1714. VARIABLE = {
  1715. begin: '\\$[A-z0-9_]+'
  1716. },
  1717. STRING = {
  1718. className: 'string',
  1719. variants: [{
  1720. begin: /"/,
  1721. end: /"/,
  1722. contains: [{
  1723. begin: /""/,
  1724. relevance: 0
  1725. }]
  1726. }, {
  1727. begin: /'/,
  1728. end: /'/,
  1729. contains: [{
  1730. begin: /''/,
  1731. relevance: 0
  1732. }]
  1733. }]
  1734. },
  1735. NUMBER = {
  1736. variants: [hljs.BINARY_NUMBER_MODE, hljs.C_NUMBER_MODE]
  1737. },
  1738. PREPROCESSOR = {
  1739. className: 'meta',
  1740. begin: '#',
  1741. end: '$',
  1742. keywords: { 'meta-keyword': 'comments include include-once NoTrayIcon OnAutoItStartRegister pragma compile RequireAdmin' },
  1743. contains: [{
  1744. begin: /\\\n/,
  1745. relevance: 0
  1746. }, {
  1747. beginKeywords: 'include',
  1748. keywords: { 'meta-keyword': 'include' },
  1749. end: '$',
  1750. contains: [STRING, {
  1751. className: 'meta-string',
  1752. variants: [{
  1753. begin: '<',
  1754. end: '>'
  1755. }, {
  1756. begin: /"/,
  1757. end: /"/,
  1758. contains: [{
  1759. begin: /""/,
  1760. relevance: 0
  1761. }]
  1762. }, {
  1763. begin: /'/,
  1764. end: /'/,
  1765. contains: [{
  1766. begin: /''/,
  1767. relevance: 0
  1768. }]
  1769. }]
  1770. }]
  1771. }, STRING, COMMENT]
  1772. },
  1773. CONSTANT = {
  1774. className: 'symbol',
  1775. // begin: '@',
  1776. // end: '$',
  1777. // keywords: 'AppDataCommonDir AppDataDir AutoItExe AutoItPID AutoItVersion AutoItX64 COM_EventObj CommonFilesDir Compiled ComputerName ComSpec CPUArch CR CRLF DesktopCommonDir DesktopDepth DesktopDir DesktopHeight DesktopRefresh DesktopWidth DocumentsCommonDir error exitCode exitMethod extended FavoritesCommonDir FavoritesDir GUI_CtrlHandle GUI_CtrlId GUI_DragFile GUI_DragId GUI_DropId GUI_WinHandle HomeDrive HomePath HomeShare HotKeyPressed HOUR IPAddress1 IPAddress2 IPAddress3 IPAddress4 KBLayout LF LocalAppDataDir LogonDNSDomain LogonDomain LogonServer MDAY MIN MON MSEC MUILang MyDocumentsDir NumParams OSArch OSBuild OSLang OSServicePack OSType OSVersion ProgramFilesDir ProgramsCommonDir ProgramsDir ScriptDir ScriptFullPath ScriptLineNumber ScriptName SEC StartMenuCommonDir StartMenuDir StartupCommonDir StartupDir SW_DISABLE SW_ENABLE SW_HIDE SW_LOCK SW_MAXIMIZE SW_MINIMIZE SW_RESTORE SW_SHOW SW_SHOWDEFAULT SW_SHOWMAXIMIZED SW_SHOWMINIMIZED SW_SHOWMINNOACTIVE SW_SHOWNA SW_SHOWNOACTIVATE SW_SHOWNORMAL SW_UNLOCK SystemDir TAB TempDir TRAY_ID TrayIconFlashing TrayIconVisible UserName UserProfileDir WDAY WindowsDir WorkingDir YDAY YEAR',
  1778. // relevance: 5
  1779. begin: '@[A-z0-9_]+'
  1780. },
  1781. FUNCTION = {
  1782. className: 'function',
  1783. beginKeywords: 'Func',
  1784. end: '$',
  1785. illegal: '\\$|\\[|%',
  1786. contains: [hljs.UNDERSCORE_TITLE_MODE, {
  1787. className: 'params',
  1788. begin: '\\(',
  1789. end: '\\)',
  1790. contains: [VARIABLE, STRING, NUMBER]
  1791. }]
  1792. };
  1793. return {
  1794. case_insensitive: true,
  1795. illegal: /\/\*/,
  1796. keywords: {
  1797. keyword: KEYWORDS,
  1798. built_in: BUILT_IN,
  1799. literal: LITERAL
  1800. },
  1801. contains: [COMMENT, VARIABLE, STRING, NUMBER, PREPROCESSOR, CONSTANT, FUNCTION]
  1802. };
  1803. };
  1804. /***/ }),
  1805. /***/ 424:
  1806. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1807. "use strict";
  1808. var block = {
  1809. newline: /^\n+/,
  1810. code: /^( {4}[^\n]+\n*)+/,
  1811. fences: /^ {0,3}(`{3,}|~{3,})([^`~\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,
  1812. hr: /^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,
  1813. heading: /^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,
  1814. blockquote: /^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,
  1815. list: /^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,
  1816. html: '^ {0,3}(?:' // optional indentation
  1817. + '<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)' // (1)
  1818. + '|comment[^\\n]*(\\n+|$)' // (2)
  1819. + '|<\\?[\\s\\S]*?\\?>\\n*' // (3)
  1820. + '|<![A-Z][\\s\\S]*?>\\n*' // (4)
  1821. + '|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*' // (5)
  1822. + '|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)' // (6)
  1823. + '|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)' // (7) open tag
  1824. + '|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)' // (7) closing tag
  1825. + ')',
  1826. def: /^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,
  1827. nptable: noop,
  1828. table: noop,
  1829. lheading: /^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,
  1830. // regex template, placeholders will be replaced according to different paragraph
  1831. // interruption rules of commonmark and the original src spec:
  1832. _paragraph: /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,
  1833. text: /^[^\n]+/
  1834. };
  1835. block._label = /(?!\s*\])(?:\\[\[\]]|[^\[\]])+/;
  1836. block._title = /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;
  1837. block.def = edit(block.def).replace('label', block._label).replace('title', block._title).getRegex();
  1838. block.bullet = /(?:[*+-]|\d{1,9}\.)/;
  1839. block.item = /^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/;
  1840. block.item = edit(block.item, 'gm').replace(/bull/g, block.bullet).getRegex();
  1841. block.list = edit(block.list).replace(/bull/g, block.bullet).replace('hr', '\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))').replace('def', '\\n+(?=' + block.def.source + ')').getRegex();
  1842. block._tag = 'address|article|aside|base|basefont|blockquote|body|caption' + '|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption' + '|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe' + '|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option' + '|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr' + '|track|ul';
  1843. block._comment = /<!--(?!-?>)[\s\S]*?-->/;
  1844. block.html = edit(block.html, 'i').replace('comment', block._comment).replace('tag', block._tag).replace('attribute', / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
  1845. block.paragraph = edit(block._paragraph).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} +').replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs
  1846. .replace('blockquote', ' {0,3}>').replace('fences', ' {0,3}(?:`{3,}|~{3,})[^`\\n]*\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt
  1847. .replace('html', '</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)').replace('tag', block._tag) // pars can be interrupted by type (6) html blocks
  1848. .getRegex();
  1849. block.blockquote = edit(block.blockquote).replace('paragraph', block.paragraph).getRegex();
  1850. /**
  1851. * Normal Block Grammar
  1852. */
  1853. block.normal = merge({}, block);
  1854. /**
  1855. * GFM Block Grammar
  1856. */
  1857. block.gfm = merge({}, block.normal, {
  1858. nptable: /^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,
  1859. table: /^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/
  1860. });
  1861. /**
  1862. * Pedantic grammar (original John Gruber's loose src specification)
  1863. */
  1864. block.pedantic = merge({}, block.normal, {
  1865. html: edit('^ *(?:comment *(?:\\n|\\s*$)' + '|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)' // closed tag
  1866. + '|<tag(?:"[^"]*"|\'[^\']*\'|\\s[^\'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))').replace('comment', block._comment).replace(/tag/g, '(?!(?:' + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub' + '|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)' + '\\b)\\w+(?!:|[^\\w\\s@]*@)\\b').getRegex(),
  1867. def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
  1868. heading: /^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,
  1869. fences: noop, // fences not supported
  1870. paragraph: edit(block.normal._paragraph).replace('hr', block.hr).replace('heading', ' *#{1,6} *[^\n]').replace('lheading', block.lheading).replace('blockquote', ' {0,3}>').replace('|fences', '').replace('|list', '').replace('|html', '').getRegex()
  1871. });
  1872. /**
  1873. * Block Lexer
  1874. */
  1875. function Lexer(options) {
  1876. this.tokens = [];
  1877. this.tokens.links = Object.create(null);
  1878. this.options = options || index.defaults;
  1879. this.rules = block.normal;
  1880. if (this.options.pedantic) {
  1881. this.rules = block.pedantic;
  1882. } else if (this.options.gfm) {
  1883. this.rules = block.gfm;
  1884. }
  1885. }
  1886. /**
  1887. * Expose Block Rules
  1888. */
  1889. Lexer.rules = block;
  1890. /**
  1891. * Static Lex Method
  1892. */
  1893. Lexer.lex = function (src, options) {
  1894. var lexer = new Lexer(options);
  1895. return lexer.lex(src);
  1896. };
  1897. /**
  1898. * Preprocessing
  1899. */
  1900. Lexer.prototype.lex = function (src) {
  1901. src = src.replace(/\r\n|\r/g, '\n').replace(/\t/g, ' ').replace(/\u00a0/g, ' ').replace(/\u2424/g, '\n');
  1902. return this.token(src, true);
  1903. };
  1904. /**
  1905. * Lexing
  1906. */
  1907. Lexer.prototype.token = function (src, top) {
  1908. src = src.replace(/^ +$/gm, '');
  1909. var next, loose, cap, bull, b, item, listStart, listItems, t, space, i, tag, l, isordered, istask, ischecked;
  1910. while (src) {
  1911. // newline
  1912. if (cap = this.rules.newline.exec(src)) {
  1913. src = src.substring(cap[0].length);
  1914. if (cap[0].length > 1) {
  1915. this.tokens.push({
  1916. type: 'space'
  1917. });
  1918. }
  1919. }
  1920. // code
  1921. if (cap = this.rules.code.exec(src)) {
  1922. var lastToken = this.tokens[this.tokens.length - 1];
  1923. src = src.substring(cap[0].length);
  1924. // An indented code block cannot interrupt a paragraph.
  1925. if (lastToken && lastToken.type === 'paragraph') {
  1926. lastToken.text += '\n' + cap[0].trimRight();
  1927. } else {
  1928. cap = cap[0].replace(/^ {4}/gm, '');
  1929. this.tokens.push({
  1930. type: 'code',
  1931. codeBlockStyle: 'indented',
  1932. text: !this.options.pedantic ? rtrim(cap, '\n') : cap
  1933. });
  1934. }
  1935. continue;
  1936. }
  1937. // fences
  1938. if (cap = this.rules.fences.exec(src)) {
  1939. src = src.substring(cap[0].length);
  1940. this.tokens.push({
  1941. type: 'code',
  1942. lang: cap[2] ? cap[2].trim() : cap[2],
  1943. text: cap[3] || ''
  1944. });
  1945. continue;
  1946. }
  1947. // heading
  1948. if (cap = this.rules.heading.exec(src)) {
  1949. src = src.substring(cap[0].length);
  1950. this.tokens.push({
  1951. type: 'heading',
  1952. depth: cap[1].length,
  1953. text: cap[2]
  1954. });
  1955. continue;
  1956. }
  1957. // table no leading pipe (gfm)
  1958. if (cap = this.rules.nptable.exec(src)) {
  1959. item = {
  1960. type: 'table',
  1961. header: splitCells(cap[1].replace(/^ *| *\| *$/g, '')),
  1962. align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */),
  1963. cells: cap[3] ? cap[3].replace(/\n$/, '').split('\n') : []
  1964. };
  1965. if (item.header.length === item.align.length) {
  1966. src = src.substring(cap[0].length);
  1967. for (i = 0; i < item.align.length; i++) {
  1968. if (/^ *-+: *$/.test(item.align[i])) {
  1969. item.align[i] = 'right';
  1970. } else if (/^ *:-+: *$/.test(item.align[i])) {
  1971. item.align[i] = 'center';
  1972. } else if (/^ *:-+ *$/.test(item.align[i])) {
  1973. item.align[i] = 'left';
  1974. } else {
  1975. item.align[i] = null;
  1976. }
  1977. }
  1978. for (i = 0; i < item.cells.length; i++) {
  1979. item.cells[i] = splitCells(item.cells[i], item.header.length);
  1980. }
  1981. this.tokens.push(item);
  1982. continue;
  1983. }
  1984. }
  1985. // hr
  1986. if (cap = this.rules.hr.exec(src)) {
  1987. src = src.substring(cap[0].length);
  1988. this.tokens.push({
  1989. type: 'hr'
  1990. });
  1991. continue;
  1992. }
  1993. // blockquote
  1994. if (cap = this.rules.blockquote.exec(src)) {
  1995. src = src.substring(cap[0].length);
  1996. this.tokens.push({
  1997. type: 'blockquote_start'
  1998. });
  1999. cap = cap[0].replace(/^ *> ?/gm, '');
  2000. // Pass `top` to keep the current
  2001. // "toplevel" state. This is exactly
  2002. // how src.pl works.
  2003. this.token(cap, top);
  2004. this.tokens.push({
  2005. type: 'blockquote_end'
  2006. });
  2007. continue;
  2008. }
  2009. // list
  2010. if (cap = this.rules.list.exec(src)) {
  2011. src = src.substring(cap[0].length);
  2012. bull = cap[2];
  2013. isordered = bull.length > 1;
  2014. listStart = {
  2015. type: 'list_start',
  2016. ordered: isordered,
  2017. start: isordered ? +bull : '',
  2018. loose: false
  2019. };
  2020. this.tokens.push(listStart);
  2021. // Get each top-level item.
  2022. cap = cap[0].match(this.rules.item);
  2023. listItems = [];
  2024. next = false;
  2025. l = cap.length;
  2026. i = 0;
  2027. for (; i < l; i++) {
  2028. item = cap[i];
  2029. // Remove the list item's bullet
  2030. // so it is seen as the next token.
  2031. space = item.length;
  2032. item = item.replace(/^ *([*+-]|\d+\.) */, '');
  2033. // Outdent whatever the
  2034. // list item contains. Hacky.
  2035. if (~item.indexOf('\n ')) {
  2036. space -= item.length;
  2037. item = !this.options.pedantic ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '') : item.replace(/^ {1,4}/gm, '');
  2038. }
  2039. // Determine whether the next list item belongs here.
  2040. // Backpedal if it does not belong in this list.
  2041. if (i !== l - 1) {
  2042. b = block.bullet.exec(cap[i + 1])[0];
  2043. if (bull.length > 1 ? b.length === 1 : b.length > 1 || this.options.smartLists && b !== bull) {
  2044. src = cap.slice(i + 1).join('\n') + src;
  2045. i = l - 1;
  2046. }
  2047. }
  2048. // Determine whether item is loose or not.
  2049. // Use: /(^|\n)(?! )[^\n]+\n\n(?!\s*$)/
  2050. // for discount behavior.
  2051. loose = next || /\n\n(?!\s*$)/.test(item);
  2052. if (i !== l - 1) {
  2053. next = item.charAt(item.length - 1) === '\n';
  2054. if (!loose) loose = next;
  2055. }
  2056. if (loose) {
  2057. listStart.loose = true;
  2058. }
  2059. // Check for task list items
  2060. istask = /^\[[ xX]\] /.test(item);
  2061. ischecked = undefined;
  2062. if (istask) {
  2063. ischecked = item[1] !== ' ';
  2064. item = item.replace(/^\[[ xX]\] +/, '');
  2065. }
  2066. t = {
  2067. type: 'list_item_start',
  2068. task: istask,
  2069. checked: ischecked,
  2070. loose: loose
  2071. };
  2072. listItems.push(t);
  2073. this.tokens.push(t);
  2074. // Recurse.
  2075. this.token(item, false);
  2076. this.tokens.push({
  2077. type: 'list_item_end'
  2078. });
  2079. }
  2080. if (listStart.loose) {
  2081. l = listItems.length;
  2082. i = 0;
  2083. for (; i < l; i++) {
  2084. listItems[i].loose = true;
  2085. }
  2086. }
  2087. this.tokens.push({
  2088. type: 'list_end'
  2089. });
  2090. continue;
  2091. }
  2092. // html
  2093. if (cap = this.rules.html.exec(src)) {
  2094. src = src.substring(cap[0].length);
  2095. this.tokens.push({
  2096. type: this.options.sanitize ? 'paragraph' : 'html',
  2097. pre: !this.options.sanitizer && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'),
  2098. text: this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape(cap[0]) : cap[0]
  2099. });
  2100. continue;
  2101. }
  2102. // def
  2103. if (top && (cap = this.rules.def.exec(src))) {
  2104. src = src.substring(cap[0].length);
  2105. if (cap[3]) cap[3] = cap[3].substring(1, cap[3].length - 1);
  2106. tag = cap[1].toLowerCase().replace(/\s+/g, ' ');
  2107. if (!this.tokens.links[tag]) {
  2108. this.tokens.links[tag] = {
  2109. href: cap[2],
  2110. title: cap[3]
  2111. };
  2112. }
  2113. continue;
  2114. }
  2115. // table (gfm)
  2116. if (cap = this.rules.table.exec(src)) {
  2117. item = {
  2118. type: 'table',
  2119. header: splitCells(cap[1].replace(/^ *| *\| *$/g, '')),
  2120. align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */),
  2121. cells: cap[3] ? cap[3].replace(/\n$/, '').split('\n') : []
  2122. };
  2123. if (item.header.length === item.align.length) {
  2124. src = src.substring(cap[0].length);
  2125. for (i = 0; i < item.align.length; i++) {
  2126. if (/^ *-+: *$/.test(item.align[i])) {
  2127. item.align[i] = 'right';
  2128. } else if (/^ *:-+: *$/.test(item.align[i])) {
  2129. item.align[i] = 'center';
  2130. } else if (/^ *:-+ *$/.test(item.align[i])) {
  2131. item.align[i] = 'left';
  2132. } else {
  2133. item.align[i] = null;
  2134. }
  2135. }
  2136. for (i = 0; i < item.cells.length; i++) {
  2137. item.cells[i] = splitCells(item.cells[i].replace(/^ *\| *| *\| *$/g, ''), item.header.length);
  2138. }
  2139. this.tokens.push(item);
  2140. continue;
  2141. }
  2142. }
  2143. // lheading
  2144. if (cap = this.rules.lheading.exec(src)) {
  2145. src = src.substring(cap[0].length);
  2146. this.tokens.push({
  2147. type: 'heading',
  2148. depth: cap[2].charAt(0) === '=' ? 1 : 2,
  2149. text: cap[1]
  2150. });
  2151. continue;
  2152. }
  2153. // top-level paragraph
  2154. if (top && (cap = this.rules.paragraph.exec(src))) {
  2155. src = src.substring(cap[0].length);
  2156. this.tokens.push({
  2157. type: 'paragraph',
  2158. text: cap[1].charAt(cap[1].length - 1) === '\n' ? cap[1].slice(0, -1) : cap[1]
  2159. });
  2160. continue;
  2161. }
  2162. if (cap = this.rules.text.exec(src)) {
  2163. src = src.substring(cap[0].length);
  2164. this.tokens.push({
  2165. type: 'text',
  2166. text: cap[0]
  2167. });
  2168. continue;
  2169. }
  2170. if (src) {
  2171. throw new Error('Infinite loop on byte: ' + src.charCodeAt(0));
  2172. }
  2173. }
  2174. return this.tokens;
  2175. };
  2176. /**
  2177. * Inline-Level Grammar
  2178. */
  2179. var inline = {
  2180. escape: /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,
  2181. autolink: /^<(scheme:[^\s\x00-\x1f<>]*|email)>/,
  2182. url: noop,
  2183. tag: '^comment' + '|^</[a-zA-Z][\\w:-]*\\s*>' // self-closing tag
  2184. + '|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>' // open tag
  2185. + '|^<\\?[\\s\\S]*?\\?>' // processing instruction, e.g. <?php ?>
  2186. + '|^<![a-zA-Z]+\\s[\\s\\S]*?>' // declaration, e.g. <!DOCTYPE html>
  2187. + '|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>', // CDATA section
  2188. link: /^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,
  2189. reflink: /^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,
  2190. nolink: /^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,
  2191. strong: /^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,
  2192. em: /^_([^\s_])_(?!_)|^\*([^\s*<\[])\*(?!\*)|^_([^\s<][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_<][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s<"][\s\S]*?[^\s\*])\*(?!\*|[^\spunctuation])|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,
  2193. code: /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,
  2194. br: /^( {2,}|\\)\n(?!\s*$)/,
  2195. del: noop,
  2196. text: /^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/
  2197. };
  2198. // list of punctuation marks from common mark spec
  2199. // without ` and ] to workaround Rule 17 (inline code blocks/links)
  2200. inline._punctuation = '!"#$%&\'()*+,\\-./:;<=>?@\\[^_{|}~';
  2201. inline.em = edit(inline.em).replace(/punctuation/g, inline._punctuation).getRegex();
  2202. inline._escapes = /\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;
  2203. inline._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;
  2204. inline._email = /[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])?)+(?![-_])/;
  2205. inline.autolink = edit(inline.autolink).replace('scheme', inline._scheme).replace('email', inline._email).getRegex();
  2206. inline._attribute = /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;
  2207. inline.tag = edit(inline.tag).replace('comment', block._comment).replace('attribute', inline._attribute).getRegex();
  2208. inline._label = /(?:\[[^\[\]]*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;
  2209. inline._href = /<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/;
  2210. inline._title = /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;
  2211. inline.link = edit(inline.link).replace('label', inline._label).replace('href', inline._href).replace('title', inline._title).getRegex();
  2212. inline.reflink = edit(inline.reflink).replace('label', inline._label).getRegex();
  2213. /**
  2214. * Normal Inline Grammar
  2215. */
  2216. inline.normal = merge({}, inline);
  2217. /**
  2218. * Pedantic Inline Grammar
  2219. */
  2220. inline.pedantic = merge({}, inline.normal, {
  2221. strong: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,
  2222. em: /^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,
  2223. link: edit(/^!?\[(label)\]\((.*?)\)/).replace('label', inline._label).getRegex(),
  2224. reflink: edit(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace('label', inline._label).getRegex()
  2225. });
  2226. /**
  2227. * GFM Inline Grammar
  2228. */
  2229. inline.gfm = merge({}, inline.normal, {
  2230. escape: edit(inline.escape).replace('])', '~|])').getRegex(),
  2231. _extended_email: /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,
  2232. url: /^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,
  2233. _backpedal: /(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,
  2234. del: /^~+(?=\S)([\s\S]*?\S)~+/,
  2235. text: /^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/
  2236. });
  2237. inline.gfm.url = edit(inline.gfm.url, 'i').replace('email', inline.gfm._extended_email).getRegex();
  2238. /**
  2239. * GFM + Line Breaks Inline Grammar
  2240. */
  2241. inline.breaks = merge({}, inline.gfm, {
  2242. br: edit(inline.br).replace('{2,}', '*').getRegex(),
  2243. text: edit(inline.gfm.text).replace('\\b_', '\\b_| {2,}\\n').replace(/\{2,\}/g, '*').getRegex()
  2244. });
  2245. /**
  2246. * Inline Lexer & Compiler
  2247. */
  2248. function InlineLexer(links, options) {
  2249. this.options = options || index.defaults;
  2250. this.links = links;
  2251. this.rules = inline.normal;
  2252. this.renderer = this.options.renderer || new Renderer();
  2253. this.renderer.options = this.options;
  2254. if (!this.links) {
  2255. throw new Error('Tokens array requires a `links` property.');
  2256. }
  2257. if (this.options.pedantic) {
  2258. this.rules = inline.pedantic;
  2259. } else if (this.options.gfm) {
  2260. if (this.options.breaks) {
  2261. this.rules = inline.breaks;
  2262. } else {
  2263. this.rules = inline.gfm;
  2264. }
  2265. }
  2266. }
  2267. /**
  2268. * Expose Inline Rules
  2269. */
  2270. InlineLexer.rules = inline;
  2271. /**
  2272. * Static Lexing/Compiling Method
  2273. */
  2274. InlineLexer.output = function (src, links, options) {
  2275. var inline = new InlineLexer(links, options);
  2276. return inline.output(src);
  2277. };
  2278. /**
  2279. * Lexing/Compiling
  2280. */
  2281. InlineLexer.prototype.output = function (src) {
  2282. var out = '',
  2283. link,
  2284. text,
  2285. href,
  2286. title,
  2287. cap,
  2288. prevCapZero;
  2289. while (src) {
  2290. // escape
  2291. if (cap = this.rules.escape.exec(src)) {
  2292. src = src.substring(cap[0].length);
  2293. out += escape(cap[1]);
  2294. continue;
  2295. }
  2296. // tag
  2297. if (cap = this.rules.tag.exec(src)) {
  2298. if (!this.inLink && /^<a /i.test(cap[0])) {
  2299. this.inLink = true;
  2300. } else if (this.inLink && /^<\/a>/i.test(cap[0])) {
  2301. this.inLink = false;
  2302. }
  2303. if (!this.inRawBlock && /^<(pre|code|kbd|script)(\s|>)/i.test(cap[0])) {
  2304. this.inRawBlock = true;
  2305. } else if (this.inRawBlock && /^<\/(pre|code|kbd|script)(\s|>)/i.test(cap[0])) {
  2306. this.inRawBlock = false;
  2307. }
  2308. src = src.substring(cap[0].length);
  2309. out += this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape(cap[0]) : cap[0];
  2310. continue;
  2311. }
  2312. // link
  2313. if (cap = this.rules.link.exec(src)) {
  2314. var lastParenIndex = findClosingBracket(cap[2], '()');
  2315. if (lastParenIndex > -1) {
  2316. var linkLen = 4 + cap[1].length + lastParenIndex;
  2317. cap[2] = cap[2].substring(0, lastParenIndex);
  2318. cap[0] = cap[0].substring(0, linkLen).trim();
  2319. cap[3] = '';
  2320. }
  2321. src = src.substring(cap[0].length);
  2322. this.inLink = true;
  2323. href = cap[2];
  2324. if (this.options.pedantic) {
  2325. link = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(href);
  2326. if (link) {
  2327. href = link[1];
  2328. title = link[3];
  2329. } else {
  2330. title = '';
  2331. }
  2332. } else {
  2333. title = cap[3] ? cap[3].slice(1, -1) : '';
  2334. }
  2335. href = href.trim().replace(/^<([\s\S]*)>$/, '$1');
  2336. out += this.outputLink(cap, {
  2337. href: InlineLexer.escapes(href),
  2338. title: InlineLexer.escapes(title)
  2339. });
  2340. this.inLink = false;
  2341. continue;
  2342. }
  2343. // reflink, nolink
  2344. if ((cap = this.rules.reflink.exec(src)) || (cap = this.rules.nolink.exec(src))) {
  2345. src = src.substring(cap[0].length);
  2346. link = (cap[2] || cap[1]).replace(/\s+/g, ' ');
  2347. link = this.links[link.toLowerCase()];
  2348. if (!link || !link.href) {
  2349. out += cap[0].charAt(0);
  2350. src = cap[0].substring(1) + src;
  2351. continue;
  2352. }
  2353. this.inLink = true;
  2354. out += this.outputLink(cap, link);
  2355. this.inLink = false;
  2356. continue;
  2357. }
  2358. // strong
  2359. if (cap = this.rules.strong.exec(src)) {
  2360. src = src.substring(cap[0].length);
  2361. out += this.renderer.strong(this.output(cap[4] || cap[3] || cap[2] || cap[1]));
  2362. continue;
  2363. }
  2364. // em
  2365. if (cap = this.rules.em.exec(src)) {
  2366. src = src.substring(cap[0].length);
  2367. out += this.renderer.em(this.output(cap[6] || cap[5] || cap[4] || cap[3] || cap[2] || cap[1]));
  2368. continue;
  2369. }
  2370. // code
  2371. if (cap = this.rules.code.exec(src)) {
  2372. src = src.substring(cap[0].length);
  2373. out += this.renderer.codespan(escape(cap[2].trim(), true));
  2374. continue;
  2375. }
  2376. // br
  2377. if (cap = this.rules.br.exec(src)) {
  2378. src = src.substring(cap[0].length);
  2379. out += this.renderer.br();
  2380. continue;
  2381. }
  2382. // del (gfm)
  2383. if (cap = this.rules.del.exec(src)) {
  2384. src = src.substring(cap[0].length);
  2385. out += this.renderer.del(this.output(cap[1]));
  2386. continue;
  2387. }
  2388. // autolink
  2389. if (cap = this.rules.autolink.exec(src)) {
  2390. src = src.substring(cap[0].length);
  2391. if (cap[2] === '@') {
  2392. text = escape(this.mangle(cap[1]));
  2393. href = 'mailto:' + text;
  2394. } else {
  2395. text = escape(cap[1]);
  2396. href = text;
  2397. }
  2398. out += this.renderer.link(href, null, text);
  2399. continue;
  2400. }
  2401. // url (gfm)
  2402. if (!this.inLink && (cap = this.rules.url.exec(src))) {
  2403. if (cap[2] === '@') {
  2404. text = escape(cap[0]);
  2405. href = 'mailto:' + text;
  2406. } else {
  2407. // do extended autolink path validation
  2408. do {
  2409. prevCapZero = cap[0];
  2410. cap[0] = this.rules._backpedal.exec(cap[0])[0];
  2411. } while (prevCapZero !== cap[0]);
  2412. text = escape(cap[0]);
  2413. if (cap[1] === 'www.') {
  2414. href = 'http://' + text;
  2415. } else {
  2416. href = text;
  2417. }
  2418. }
  2419. src = src.substring(cap[0].length);
  2420. out += this.renderer.link(href, null, text);
  2421. continue;
  2422. }
  2423. // text
  2424. if (cap = this.rules.text.exec(src)) {
  2425. src = src.substring(cap[0].length);
  2426. if (this.inRawBlock) {
  2427. out += this.renderer.text(this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape(cap[0]) : cap[0]);
  2428. } else {
  2429. out += this.renderer.text(escape(this.smartypants(cap[0])));
  2430. }
  2431. continue;
  2432. }
  2433. if (src) {
  2434. throw new Error('Infinite loop on byte: ' + src.charCodeAt(0));
  2435. }
  2436. }
  2437. return out;
  2438. };
  2439. InlineLexer.escapes = function (text) {
  2440. return text ? text.replace(InlineLexer.rules._escapes, '$1') : text;
  2441. };
  2442. /**
  2443. * Compile Link
  2444. */
  2445. InlineLexer.prototype.outputLink = function (cap, link) {
  2446. var href = link.href,
  2447. title = link.title ? escape(link.title) : null;
  2448. return cap[0].charAt(0) !== '!' ? this.renderer.link(href, title, this.output(cap[1])) : this.renderer.image(href, title, escape(cap[1]));
  2449. };
  2450. /**
  2451. * Smartypants Transformations
  2452. */
  2453. InlineLexer.prototype.smartypants = function (text) {
  2454. if (!this.options.smartypants) return text;
  2455. return text
  2456. // em-dashes
  2457. .replace(/---/g, '\u2014')
  2458. // en-dashes
  2459. .replace(/--/g, '\u2013')
  2460. // opening singles
  2461. .replace(/(^|[-\u2014/(\[{"\s])'/g, '$1\u2018')
  2462. // closing singles & apostrophes
  2463. .replace(/'/g, '\u2019')
  2464. // opening doubles
  2465. .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, '$1\u201C')
  2466. // closing doubles
  2467. .replace(/"/g, '\u201D')
  2468. // ellipses
  2469. .replace(/\.{3}/g, '\u2026');
  2470. };
  2471. /**
  2472. * Mangle Links
  2473. */
  2474. InlineLexer.prototype.mangle = function (text) {
  2475. if (!this.options.mangle) return text;
  2476. var out = '',
  2477. l = text.length,
  2478. i = 0,
  2479. ch;
  2480. for (; i < l; i++) {
  2481. ch = text.charCodeAt(i);
  2482. if (Math.random() > 0.5) {
  2483. ch = 'x' + ch.toString(16);
  2484. }
  2485. out += '&#' + ch + ';';
  2486. }
  2487. return out;
  2488. };
  2489. /**
  2490. * Renderer
  2491. */
  2492. function Renderer(options) {
  2493. this.options = options || index.defaults;
  2494. }
  2495. Renderer.prototype.code = function (code, infostring, escaped) {
  2496. var lang = (infostring || '').match(/\S*/)[0];
  2497. if (this.options.highlight) {
  2498. var out = this.options.highlight(code, lang);
  2499. if (out != null && out !== code) {
  2500. escaped = true;
  2501. code = out;
  2502. }
  2503. }
  2504. if (!lang) {
  2505. return '<pre><code>' + (escaped ? code : escape(code, true)) + '</code></pre>';
  2506. }
  2507. return '<pre><code class="' + this.options.langPrefix + escape(lang, true) + '">' + (escaped ? code : escape(code, true)) + '</code></pre>\n';
  2508. };
  2509. Renderer.prototype.blockquote = function (quote) {
  2510. return '<blockquote>\n' + quote + '</blockquote>\n';
  2511. };
  2512. Renderer.prototype.html = function (html) {
  2513. return html;
  2514. };
  2515. Renderer.prototype.heading = function (text, level, raw, slugger) {
  2516. if (this.options.headerIds) {
  2517. return '<h' + level + ' id="' + this.options.headerPrefix + slugger.slug(raw) + '">' + text + '</h' + level + '>\n';
  2518. }
  2519. // ignore IDs
  2520. return '<h' + level + '>' + text + '</h' + level + '>\n';
  2521. };
  2522. Renderer.prototype.hr = function () {
  2523. return this.options.xhtml ? '<hr/>\n' : '<hr>\n';
  2524. };
  2525. Renderer.prototype.list = function (body, ordered, start) {
  2526. var type = ordered ? 'ol' : 'ul',
  2527. startatt = ordered && start !== 1 ? ' start="' + start + '"' : '';
  2528. return '<' + type + startatt + '>\n' + body + '</' + type + '>\n';
  2529. };
  2530. Renderer.prototype.listitem = function (text) {
  2531. var reg = /\<input.+\>/;
  2532. var className = '';
  2533. if (reg.test(text)) {
  2534. className = 'list-item-checkbox';
  2535. if (/checked/.test(text)) {
  2536. className += ' list-item-checkbox-checked';
  2537. }
  2538. }
  2539. return '<li class="' + className + ' ">' + text + '</li>\n';
  2540. };
  2541. Renderer.prototype.checkbox = function (checked) {
  2542. return '<input ' + (checked ? 'checked ' : '') + 'disabled type="checkbox"' + (this.options.xhtml ? ' /' : '') + '> ';
  2543. };
  2544. Renderer.prototype.paragraph = function (text) {
  2545. return '<p>' + text + '</p>\n';
  2546. };
  2547. Renderer.prototype.table = function (header, body) {
  2548. if (body) body = '<tbody>' + body + '</tbody>';
  2549. return '<table>\n' + '<thead>\n' + header + '</thead>\n' + body + '</table>\n';
  2550. };
  2551. Renderer.prototype.tablerow = function (content) {
  2552. return '<tr>\n' + content + '</tr>\n';
  2553. };
  2554. Renderer.prototype.tablecell = function (content, flags) {
  2555. var type = flags.header ? 'th' : 'td';
  2556. var tag = flags.align ? '<' + type + ' align="' + flags.align + '">' : '<' + type + '>';
  2557. return tag + content + '</' + type + '>\n';
  2558. };
  2559. // span level renderer
  2560. Renderer.prototype.strong = function (text) {
  2561. return '<strong>' + text + '</strong>';
  2562. };
  2563. Renderer.prototype.em = function (text) {
  2564. return '<em>' + text + '</em>';
  2565. };
  2566. Renderer.prototype.codespan = function (text) {
  2567. return '<code>' + text + '</code>';
  2568. };
  2569. Renderer.prototype.br = function () {
  2570. return this.options.xhtml ? '<br/>' : '<br>';
  2571. };
  2572. Renderer.prototype.del = function (text) {
  2573. return '<del>' + text + '</del>';
  2574. };
  2575. Renderer.prototype.link = function (href, title, text) {
  2576. href = cleanUrl(this.options.sanitize, this.options.baseUrl, href);
  2577. if (href === null) {
  2578. return text;
  2579. }
  2580. var out = '<a href="' + escape(href) + '"';
  2581. if (title) {
  2582. out += ' title="' + title + '"';
  2583. }
  2584. out += '>' + text + '</a>';
  2585. return out;
  2586. };
  2587. Renderer.prototype.image = function (href, title, text) {
  2588. href = cleanUrl(this.options.sanitize, this.options.baseUrl, href);
  2589. if (href === null) {
  2590. return text;
  2591. }
  2592. var out = '<img src="' + href + '" alt="' + text + '"';
  2593. if (title) {
  2594. out += ' title="' + title + '"';
  2595. }
  2596. out += this.options.xhtml ? '/>' : '>';
  2597. return out;
  2598. };
  2599. Renderer.prototype.text = function (text) {
  2600. return text;
  2601. };
  2602. /**
  2603. * TextRenderer
  2604. * returns only the textual part of the token
  2605. */
  2606. function TextRenderer() {}
  2607. // no need for block level renderers
  2608. TextRenderer.prototype.strong = TextRenderer.prototype.em = TextRenderer.prototype.codespan = TextRenderer.prototype.del = TextRenderer.prototype.text = function (text) {
  2609. return text;
  2610. };
  2611. TextRenderer.prototype.link = TextRenderer.prototype.image = function (href, title, text) {
  2612. return '' + text;
  2613. };
  2614. TextRenderer.prototype.br = function () {
  2615. return '';
  2616. };
  2617. /**
  2618. * Parsing & Compiling
  2619. */
  2620. function Parser(options) {
  2621. this.tokens = [];
  2622. this.token = null;
  2623. this.options = options || index.defaults;
  2624. this.options.renderer = this.options.renderer || new Renderer();
  2625. this.renderer = this.options.renderer;
  2626. this.renderer.options = this.options;
  2627. this.slugger = new Slugger();
  2628. }
  2629. /**
  2630. * Static Parse Method
  2631. */
  2632. Parser.parse = function (src, options) {
  2633. var parser = new Parser(options);
  2634. return parser.parse(src);
  2635. };
  2636. /**
  2637. * Parse Loop
  2638. */
  2639. Parser.prototype.parse = function (src) {
  2640. this.inline = new InlineLexer(src.links, this.options);
  2641. // use an InlineLexer with a TextRenderer to extract pure text
  2642. this.inlineText = new InlineLexer(src.links, merge({}, this.options, { renderer: new TextRenderer() }));
  2643. this.tokens = src.reverse();
  2644. var out = '';
  2645. while (this.next()) {
  2646. out += this.tok();
  2647. }
  2648. return out;
  2649. };
  2650. /**
  2651. * Next Token
  2652. */
  2653. Parser.prototype.next = function () {
  2654. this.token = this.tokens.pop();
  2655. return this.token;
  2656. };
  2657. /**
  2658. * Preview Next Token
  2659. */
  2660. Parser.prototype.peek = function () {
  2661. return this.tokens[this.tokens.length - 1] || 0;
  2662. };
  2663. /**
  2664. * Parse Text Tokens
  2665. */
  2666. Parser.prototype.parseText = function () {
  2667. var body = this.token.text;
  2668. while (this.peek().type === 'text') {
  2669. body += '\n' + this.next().text;
  2670. }
  2671. return this.inline.output(body);
  2672. };
  2673. /**
  2674. * Parse Current Token
  2675. */
  2676. Parser.prototype.tok = function () {
  2677. switch (this.token.type) {
  2678. case 'space':
  2679. {
  2680. return '';
  2681. }
  2682. case 'hr':
  2683. {
  2684. return this.renderer.hr();
  2685. }
  2686. case 'heading':
  2687. {
  2688. return this.renderer.heading(this.inline.output(this.token.text), this.token.depth, unescape(this.inlineText.output(this.token.text)), this.slugger);
  2689. }
  2690. case 'code':
  2691. {
  2692. return this.renderer.code(this.token.text, this.token.lang, this.token.escaped);
  2693. }
  2694. case 'table':
  2695. {
  2696. var header = '',
  2697. body = '',
  2698. i,
  2699. row,
  2700. cell,
  2701. j;
  2702. // header
  2703. cell = '';
  2704. for (i = 0; i < this.token.header.length; i++) {
  2705. cell += this.renderer.tablecell(this.inline.output(this.token.header[i]), { header: true, align: this.token.align[i] });
  2706. }
  2707. header += this.renderer.tablerow(cell);
  2708. for (i = 0; i < this.token.cells.length; i++) {
  2709. row = this.token.cells[i];
  2710. cell = '';
  2711. for (j = 0; j < row.length; j++) {
  2712. cell += this.renderer.tablecell(this.inline.output(row[j]), { header: false, align: this.token.align[j] });
  2713. }
  2714. body += this.renderer.tablerow(cell);
  2715. }
  2716. return this.renderer.table(header, body);
  2717. }
  2718. case 'blockquote_start':
  2719. {
  2720. body = '';
  2721. while (this.next().type !== 'blockquote_end') {
  2722. body += this.tok();
  2723. }
  2724. return this.renderer.blockquote(body);
  2725. }
  2726. case 'list_start':
  2727. {
  2728. body = '';
  2729. var ordered = this.token.ordered,
  2730. start = this.token.start;
  2731. while (this.next().type !== 'list_end') {
  2732. body += this.tok();
  2733. }
  2734. return this.renderer.list(body, ordered, start);
  2735. }
  2736. case 'list_item_start':
  2737. {
  2738. body = '';
  2739. var loose = this.token.loose;
  2740. var checked = this.token.checked;
  2741. var task = this.token.task;
  2742. if (this.token.task) {
  2743. body += this.renderer.checkbox(checked);
  2744. }
  2745. while (this.next().type !== 'list_item_end') {
  2746. body += !loose && this.token.type === 'text' ? this.parseText() : this.tok();
  2747. }
  2748. return this.renderer.listitem(body, task, checked);
  2749. }
  2750. case 'html':
  2751. {
  2752. // TODO parse inline content if parameter src=1
  2753. return this.renderer.html(this.token.text);
  2754. }
  2755. case 'paragraph':
  2756. {
  2757. return this.renderer.paragraph(this.inline.output(this.token.text));
  2758. }
  2759. case 'text':
  2760. {
  2761. return this.renderer.paragraph(this.parseText());
  2762. }
  2763. default:
  2764. {
  2765. var errMsg = 'Token with "' + this.token.type + '" type was not found.';
  2766. if (this.options.silent) {
  2767. console.log(errMsg);
  2768. } else {
  2769. throw new Error(errMsg);
  2770. }
  2771. }
  2772. }
  2773. };
  2774. /**
  2775. * Slugger generates header id
  2776. */
  2777. function Slugger() {
  2778. this.seen = {};
  2779. }
  2780. /**
  2781. * Convert string to unique id
  2782. */
  2783. Slugger.prototype.slug = function (value) {
  2784. var slug = value.toLowerCase().trim().replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g, '').replace(/\s/g, '-');
  2785. if (this.seen.hasOwnProperty(slug)) {
  2786. var originalSlug = slug;
  2787. do {
  2788. this.seen[originalSlug]++;
  2789. slug = originalSlug + '-' + this.seen[originalSlug];
  2790. } while (this.seen.hasOwnProperty(slug));
  2791. }
  2792. this.seen[slug] = 0;
  2793. return slug;
  2794. };
  2795. /**
  2796. * Helpers
  2797. */
  2798. function escape(html, encode) {
  2799. if (encode) {
  2800. if (escape.escapeTest.test(html)) {
  2801. return html.replace(escape.escapeReplace, function (ch) {
  2802. return escape.replacements[ch];
  2803. });
  2804. }
  2805. } else {
  2806. if (escape.escapeTestNoEncode.test(html)) {
  2807. return html.replace(escape.escapeReplaceNoEncode, function (ch) {
  2808. return escape.replacements[ch];
  2809. });
  2810. }
  2811. }
  2812. return html;
  2813. }
  2814. escape.escapeTest = /[&<>"']/;
  2815. escape.escapeReplace = /[&<>"']/g;
  2816. escape.replacements = {
  2817. '&': '&amp;',
  2818. '<': '&lt;',
  2819. '>': '&gt;',
  2820. '"': '&quot;',
  2821. "'": '&#39;'
  2822. };
  2823. escape.escapeTestNoEncode = /[<>"']|&(?!#?\w+;)/;
  2824. escape.escapeReplaceNoEncode = /[<>"']|&(?!#?\w+;)/g;
  2825. function unescape(html) {
  2826. // explicitly match decimal, hex, and named HTML entities
  2827. return html.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, function (_, n) {
  2828. n = n.toLowerCase();
  2829. if (n === 'colon') return ':';
  2830. if (n.charAt(0) === '#') {
  2831. return n.charAt(1) === 'x' ? String.fromCharCode(parseInt(n.substring(2), 16)) : String.fromCharCode(+n.substring(1));
  2832. }
  2833. return '';
  2834. });
  2835. }
  2836. function edit(regex, opt) {
  2837. regex = regex.source || regex;
  2838. opt = opt || '';
  2839. return {
  2840. replace: function replace(name, val) {
  2841. val = val.source || val;
  2842. val = val.replace(/(^|[^\[])\^/g, '$1');
  2843. regex = regex.replace(name, val);
  2844. return this;
  2845. },
  2846. getRegex: function getRegex() {
  2847. return new RegExp(regex, opt);
  2848. }
  2849. };
  2850. }
  2851. function cleanUrl(sanitize, base, href) {
  2852. if (sanitize) {
  2853. try {
  2854. var prot = decodeURIComponent(unescape(href)).replace(/[^\w:]/g, '').toLowerCase();
  2855. } catch (e) {
  2856. return null;
  2857. }
  2858. if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0 || prot.indexOf('data:') === 0) {
  2859. return null;
  2860. }
  2861. }
  2862. if (base && !originIndependentUrl.test(href)) {
  2863. href = resolveUrl(base, href);
  2864. }
  2865. try {
  2866. href = encodeURI(href).replace(/%25/g, '%');
  2867. } catch (e) {
  2868. return null;
  2869. }
  2870. return href;
  2871. }
  2872. function resolveUrl(base, href) {
  2873. if (!baseUrls[' ' + base]) {
  2874. // we can ignore everything in base after the last slash of its path component,
  2875. // but we might need to add _that_
  2876. // https://tools.ietf.org/html/rfc3986#section-3
  2877. if (/^[^:]+:\/*[^/]*$/.test(base)) {
  2878. baseUrls[' ' + base] = base + '/';
  2879. } else {
  2880. baseUrls[' ' + base] = rtrim(base, '/', true);
  2881. }
  2882. }
  2883. base = baseUrls[' ' + base];
  2884. if (href.slice(0, 2) === '//') {
  2885. return base.replace(/:[\s\S]*/, ':') + href;
  2886. } else if (href.charAt(0) === '/') {
  2887. return base.replace(/(:\/*[^/]*)[\s\S]*/, '$1') + href;
  2888. } else {
  2889. return base + href;
  2890. }
  2891. }
  2892. var baseUrls = {};
  2893. var originIndependentUrl = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;
  2894. function noop() {}
  2895. noop.exec = noop;
  2896. function merge(obj) {
  2897. var i = 1,
  2898. target,
  2899. key;
  2900. for (; i < arguments.length; i++) {
  2901. target = arguments[i];
  2902. for (key in target) {
  2903. if (Object.prototype.hasOwnProperty.call(target, key)) {
  2904. obj[key] = target[key];
  2905. }
  2906. }
  2907. }
  2908. return obj;
  2909. }
  2910. function splitCells(tableRow, count) {
  2911. // ensure that every cell-delimiting pipe has a space
  2912. // before it to distinguish it from an escaped pipe
  2913. var row = tableRow.replace(/\|/g, function (match, offset, str) {
  2914. var escaped = false,
  2915. curr = offset;
  2916. while (--curr >= 0 && str[curr] === '\\') {
  2917. escaped = !escaped;
  2918. }if (escaped) {
  2919. // odd number of slashes means | is escaped
  2920. // so we leave it alone
  2921. return '|';
  2922. } else {
  2923. // add space before unescaped |
  2924. return ' |';
  2925. }
  2926. }),
  2927. cells = row.split(/ \|/),
  2928. i = 0;
  2929. if (cells.length > count) {
  2930. cells.splice(count);
  2931. } else {
  2932. while (cells.length < count) {
  2933. cells.push('');
  2934. }
  2935. }
  2936. for (; i < cells.length; i++) {
  2937. // leading or trailing whitespace is ignored per the gfm spec
  2938. cells[i] = cells[i].trim().replace(/\\\|/g, '|');
  2939. }
  2940. return cells;
  2941. }
  2942. // Remove trailing 'c's. Equivalent to str.replace(/c*$/, '').
  2943. // /c*$/ is vulnerable to REDOS.
  2944. // invert: Remove suffix of non-c chars instead. Default falsey.
  2945. function rtrim(str, c, invert) {
  2946. if (str.length === 0) {
  2947. return '';
  2948. }
  2949. // Length of suffix matching the invert condition.
  2950. var suffLen = 0;
  2951. // Step left until we fail to match the invert condition.
  2952. while (suffLen < str.length) {
  2953. var currChar = str.charAt(str.length - suffLen - 1);
  2954. if (currChar === c && !invert) {
  2955. suffLen++;
  2956. } else if (currChar !== c && invert) {
  2957. suffLen++;
  2958. } else {
  2959. break;
  2960. }
  2961. }
  2962. return str.substr(0, str.length - suffLen);
  2963. }
  2964. function findClosingBracket(str, b) {
  2965. if (str.indexOf(b[1]) === -1) {
  2966. return -1;
  2967. }
  2968. var level = 0;
  2969. for (var i = 0; i < str.length; i++) {
  2970. if (str[i] === '\\') {
  2971. i++;
  2972. } else if (str[i] === b[0]) {
  2973. level++;
  2974. } else if (str[i] === b[1]) {
  2975. level--;
  2976. if (level < 0) {
  2977. return i;
  2978. }
  2979. }
  2980. }
  2981. return -1;
  2982. }
  2983. function checkSanitizeDeprecation(opt) {
  2984. if (opt && opt.sanitize && !opt.silent) {
  2985. console.warn('index(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options');
  2986. }
  2987. }
  2988. /**
  2989. * Marked
  2990. */
  2991. function index(src, opt, callback) {
  2992. // throw error in case of non string input
  2993. if (typeof src === 'undefined' || src === null) {
  2994. throw new Error('index(): input parameter is undefined or null');
  2995. }
  2996. if (typeof src !== 'string') {
  2997. throw new Error('index(): input parameter is of type ' + Object.prototype.toString.call(src) + ', string expected');
  2998. }
  2999. if (callback || typeof opt === 'function') {
  3000. if (!callback) {
  3001. callback = opt;
  3002. opt = null;
  3003. }
  3004. opt = merge({}, index.defaults, opt || {});
  3005. checkSanitizeDeprecation(opt);
  3006. var highlight = opt.highlight,
  3007. tokens,
  3008. pending,
  3009. i = 0;
  3010. try {
  3011. tokens = Lexer.lex(src, opt);
  3012. } catch (e) {
  3013. return callback(e);
  3014. }
  3015. pending = tokens.length;
  3016. var done = function done(err) {
  3017. if (err) {
  3018. opt.highlight = highlight;
  3019. return callback(err);
  3020. }
  3021. var out;
  3022. try {
  3023. out = Parser.parse(tokens, opt);
  3024. } catch (e) {
  3025. err = e;
  3026. }
  3027. opt.highlight = highlight;
  3028. return err ? callback(err) : callback(null, out);
  3029. };
  3030. if (!highlight || highlight.length < 3) {
  3031. return done();
  3032. }
  3033. delete opt.highlight;
  3034. if (!pending) return done();
  3035. for (; i < tokens.length; i++) {
  3036. (function (token) {
  3037. if (token.type !== 'code') {
  3038. return --pending || done();
  3039. }
  3040. return highlight(token.text, token.lang, function (err, code) {
  3041. if (err) return done(err);
  3042. if (code == null || code === token.text) {
  3043. return --pending || done();
  3044. }
  3045. token.text = code;
  3046. token.escaped = true;
  3047. --pending || done();
  3048. });
  3049. })(tokens[i]);
  3050. }
  3051. return;
  3052. }
  3053. try {
  3054. if (opt) opt = merge({}, index.defaults, opt);
  3055. checkSanitizeDeprecation(opt);
  3056. return Parser.parse(Lexer.lex(src, opt), opt);
  3057. } catch (e) {
  3058. e.message += '\nPlease report this to https://github.com/markedjs/marked.';
  3059. if ((opt || index.defaults).silent) {
  3060. return '<p>An error occurred:</p><pre>' + escape(e.message + '', true) + '</pre>';
  3061. }
  3062. throw e;
  3063. }
  3064. }
  3065. /**
  3066. * Options
  3067. */
  3068. index.options = index.setOptions = function (opt) {
  3069. merge(index.defaults, opt);
  3070. return index;
  3071. };
  3072. index.getDefaults = function () {
  3073. return {
  3074. baseUrl: null,
  3075. breaks: false,
  3076. gfm: true,
  3077. headerIds: true,
  3078. headerPrefix: '',
  3079. highlight: null,
  3080. langPrefix: 'language-',
  3081. mangle: true,
  3082. pedantic: false,
  3083. renderer: new Renderer(),
  3084. sanitize: false,
  3085. sanitizer: null,
  3086. silent: false,
  3087. smartLists: false,
  3088. smartypants: false,
  3089. xhtml: false
  3090. };
  3091. };
  3092. index.defaults = index.getDefaults();
  3093. /**
  3094. * Expose
  3095. */
  3096. index.Parser = Parser;
  3097. index.parser = Parser.parse;
  3098. index.Renderer = Renderer;
  3099. index.TextRenderer = TextRenderer;
  3100. index.Lexer = Lexer;
  3101. index.lexer = Lexer.lex;
  3102. index.InlineLexer = InlineLexer;
  3103. index.inlineLexer = InlineLexer.output;
  3104. index.Slugger = Slugger;
  3105. index.parse = index;
  3106. /* harmony default export */ __webpack_exports__["a"] = (index);
  3107. /***/ }),
  3108. /***/ 975:
  3109. /***/ (function(module, exports, __webpack_require__) {
  3110. var disposed = false
  3111. function injectStyle (ssrContext) {
  3112. if (disposed) return
  3113. __webpack_require__(976)
  3114. }
  3115. var normalizeComponent = __webpack_require__(2)
  3116. /* script */
  3117. var __vue_script__ = __webpack_require__(978)
  3118. /* template */
  3119. var __vue_template__ = __webpack_require__(979)
  3120. /* template functional */
  3121. var __vue_template_functional__ = false
  3122. /* styles */
  3123. var __vue_styles__ = injectStyle
  3124. /* scopeId */
  3125. var __vue_scopeId__ = "data-v-ebc40510"
  3126. /* moduleIdentifier (server only) */
  3127. var __vue_module_identifier__ = null
  3128. var Component = normalizeComponent(
  3129. __vue_script__,
  3130. __vue_template__,
  3131. __vue_template_functional__,
  3132. __vue_styles__,
  3133. __vue_scopeId__,
  3134. __vue_module_identifier__
  3135. )
  3136. Component.options.__file = "resources/assets/js/main/components/MDEditor/components/preview/index.vue"
  3137. /* hot reload */
  3138. if (false) {(function () {
  3139. var hotAPI = require("vue-hot-reload-api")
  3140. hotAPI.install(require("vue"), false)
  3141. if (!hotAPI.compatible) return
  3142. module.hot.accept()
  3143. if (!module.hot.data) {
  3144. hotAPI.createRecord("data-v-ebc40510", Component.options)
  3145. } else {
  3146. hotAPI.reload("data-v-ebc40510", Component.options)
  3147. }
  3148. module.hot.dispose(function (data) {
  3149. disposed = true
  3150. })
  3151. })()}
  3152. module.exports = Component.exports
  3153. /***/ }),
  3154. /***/ 976:
  3155. /***/ (function(module, exports, __webpack_require__) {
  3156. // style-loader: Adds some css to the DOM by adding a <style> tag
  3157. // load the styles
  3158. var content = __webpack_require__(977);
  3159. if(typeof content === 'string') content = [[module.i, content, '']];
  3160. if(content.locals) module.exports = content.locals;
  3161. // add the styles to the DOM
  3162. var update = __webpack_require__(1)("500dfe1b", content, false, {});
  3163. // Hot Module Replacement
  3164. if(false) {
  3165. // When the styles change, update the <style> tags
  3166. if(!content.locals) {
  3167. module.hot.accept("!!../../../../../../../../node_modules/css-loader/index.js!../../../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-ebc40510\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../../../../node_modules/less-loader/dist/cjs.js!../../../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./index.vue", function() {
  3168. var newContent = require("!!../../../../../../../../node_modules/css-loader/index.js!../../../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-ebc40510\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../../../../node_modules/less-loader/dist/cjs.js!../../../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./index.vue");
  3169. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  3170. update(newContent);
  3171. });
  3172. }
  3173. // When the module is disposed, remove the <style> tags
  3174. module.hot.dispose(function() { update(); });
  3175. }
  3176. /***/ }),
  3177. /***/ 977:
  3178. /***/ (function(module, exports, __webpack_require__) {
  3179. exports = module.exports = __webpack_require__(0)(false);
  3180. // imports
  3181. exports.i(__webpack_require__(405), "");
  3182. // module
  3183. exports.push([module.i, "\n@charset \"utf-8\";\n/*\n*Author zhaoxuhui\n*/\n.markdown[data-v-ebc40510] {\n overflow: hidden;\n position: relative;\n margin: 0;\n padding: 0;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n background: #f7f7f7;\n}\n.markdown.border[data-v-ebc40510] {\n border: 1px solid #d9d9d9;\n}\n.markdown *[data-v-ebc40510] {\n margin: 0;\n padding: 0;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.markdown.fullscreen[data-v-ebc40510] {\n position: fixed;\n z-index: 999999;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n height: 100% !important;\n width: 100%;\n border: none;\n}\n.markdown.fullscreen .markdown-content[data-v-ebc40510] {\n padding: 0;\n padding-top: 10px;\n}\n.markdown .markdown-toolbars[data-v-ebc40510] {\n width: 100%;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n list-style: none;\n background: #fff;\n color: #6a6f7b;\n height: 40px;\n cursor: pointer;\n padding-left: 4px;\n border-bottom: 1px solid #d9d9d9;\n}\n.markdown .markdown-toolbars > li[data-v-ebc40510] {\n position: relative;\n cursor: pointer;\n margin: 0;\n line-height: normal;\n min-height: auto;\n}\n.markdown .markdown-toolbars > li[data-v-ebc40510]:after {\n display: block;\n content: attr(name);\n position: absolute;\n z-index: 999999999999;\n top: 32px;\n left: 20px;\n background: #000;\n color: #fff;\n white-space: nowrap;\n font-size: 12px;\n line-height: 28px;\n padding: 0 6px;\n -webkit-transition: all 0.3s 0.1s;\n transition: all 0.3s 0.1s;\n -webkit-transform: scale(0);\n transform: scale(0);\n opacity: 0;\n -webkit-transform-origin: top;\n transform-origin: top;\n border-radius: 2px;\n}\n.markdown .markdown-toolbars > li[data-v-ebc40510]:hover:after {\n -webkit-transform: scale(1);\n transform: scale(1);\n opacity: 1;\n}\n.markdown .markdown-toolbars > li[data-v-ebc40510]:last-child:after {\n right: 20%;\n left: auto;\n}\n.markdown .markdown-toolbars > li .title[data-v-ebc40510] {\n font-size: 16px !important;\n}\n.markdown .markdown-toolbars > li .icon-svg[data-v-ebc40510] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.markdown .markdown-toolbars .empty[data-v-ebc40510] {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n width: 12px;\n}\n.markdown .markdown-toolbars span[data-v-ebc40510] {\n font-size: 18px;\n color: #999;\n cursor: pointer;\n display: block;\n width: 30px;\n height: 30px;\n border-radius: 3px;\n line-height: 30px;\n text-align: center;\n}\n.markdown .markdown-toolbars span[data-v-ebc40510]:hover {\n background: #f7f7f7;\n color: #1890ff;\n}\n.markdown .markdown-toolbars .title[data-v-ebc40510] {\n padding-left: 4px;\n padding-right: 10px;\n}\n.markdown .markdown-toolbars li:last-child span[data-v-ebc40510] {\n font-size: 20px !important;\n margin-right: 4px;\n}\n.markdown .markdown-toolbars .shift-theme[data-v-ebc40510],\n.markdown .markdown-toolbars .export-file[data-v-ebc40510] {\n height: 46px;\n position: relative;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.markdown .markdown-toolbars .shift-theme span[data-v-ebc40510],\n.markdown .markdown-toolbars .export-file span[data-v-ebc40510] {\n padding: 0 8px;\n -webkit-transition: all 0.3s;\n transition: all 0.3s;\n font-size: 18px;\n display: inline-block;\n line-height: 32px;\n}\n.markdown .markdown-toolbars .shift-theme span[data-v-ebc40510]:hover,\n.markdown .markdown-toolbars .export-file span[data-v-ebc40510]:hover {\n color: #0084ff;\n background: #f7f7f7;\n border-radius: 3px;\n}\n.markdown .markdown-toolbars .shift-theme ul[data-v-ebc40510],\n.markdown .markdown-toolbars .export-file ul[data-v-ebc40510] {\n -webkit-transform: scale(0);\n transform: scale(0);\n -webkit-transition: all 0.3s;\n transition: all 0.3s;\n left: -50%;\n top: 40px;\n width: 160px;\n -webkit-transform-origin: top center;\n transform-origin: top center;\n list-style: none;\n margin: 0;\n padding: 6px 0;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid #d9d9d9;\n background: #fff;\n border-radius: 4px;\n position: absolute;\n z-index: 9999999;\n -webkit-box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.1);\n box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.1);\n}\n.markdown .markdown-toolbars .shift-theme ul.active[data-v-ebc40510],\n.markdown .markdown-toolbars .export-file ul.active[data-v-ebc40510] {\n opacity: 1;\n -webkit-transform: scaleY(1);\n transform: scaleY(1);\n}\n.markdown .markdown-toolbars .shift-theme ul li[data-v-ebc40510],\n.markdown .markdown-toolbars .export-file ul li[data-v-ebc40510] {\n line-height: 30px;\n padding: 0 12px;\n padding-left: 12px;\n font-size: 13px;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n color: #262626;\n}\n.markdown .markdown-toolbars .shift-theme ul li .iconfont[data-v-ebc40510],\n.markdown .markdown-toolbars .export-file ul li .iconfont[data-v-ebc40510] {\n font-size: 14px;\n display: block;\n height: 30px;\n width: 30px;\n line-height: 30px;\n overflow: hidden;\n}\n.markdown .markdown-toolbars .shift-theme ul li .iconfont[data-v-ebc40510]:hover,\n.markdown .markdown-toolbars .export-file ul li .iconfont[data-v-ebc40510]:hover {\n color: #262626;\n}\n.markdown .markdown-toolbars .shift-theme ul li i[data-v-ebc40510],\n.markdown .markdown-toolbars .export-file ul li i[data-v-ebc40510] {\n font-size: 13px;\n display: block;\n font-style: normal;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n white-space: normal;\n}\n.markdown .markdown-toolbars .shift-theme ul li[data-v-ebc40510]:last-child,\n.markdown .markdown-toolbars .export-file ul li[data-v-ebc40510]:last-child {\n border-bottom: 0;\n}\n.markdown .markdown-toolbars .shift-theme ul li:last-child .iconfont[data-v-ebc40510],\n.markdown .markdown-toolbars .export-file ul li:last-child .iconfont[data-v-ebc40510] {\n font-size: 14px !important;\n margin: 0 !important;\n}\n.markdown .markdown-toolbars .shift-theme ul li[data-v-ebc40510]:hover,\n.markdown .markdown-toolbars .export-file ul li[data-v-ebc40510]:hover {\n background: #f7f7f7;\n}\n.markdown .markdown-toolbars .shift-theme ul li.disabled[data-v-ebc40510],\n.markdown .markdown-toolbars .export-file ul li.disabled[data-v-ebc40510] {\n cursor: not-allowed;\n color: #bbbec4;\n}\n.markdown .markdown-toolbars .shift-theme ul li.disabled[data-v-ebc40510]:hover,\n.markdown .markdown-toolbars .export-file ul li.disabled[data-v-ebc40510]:hover {\n background: transparent;\n}\n.markdown .markdown-toolbars .import-file[data-v-ebc40510] {\n position: relative;\n}\n.markdown .markdown-toolbars .import-file input[data-v-ebc40510] {\n position: absolute;\n z-index: 9999;\n left: 0;\n top: 0;\n display: block;\n width: 100%;\n height: 100%;\n opacity: 0;\n cursor: pointer;\n font-size: 0;\n}\n.markdown .markdown-toolbars .import-file:hover span[data-v-ebc40510] {\n background: #f7f7f7;\n color: #1890ff;\n}\n.markdown .markdown-toolbars .import-file[data-v-ebc40510]:hover:after {\n -webkit-transform: scale(1);\n transform: scale(1);\n opacity: 1;\n}\n.markdown .close-preview[data-v-ebc40510] {\n position: absolute;\n z-index: 999;\n right: 0;\n top: 0;\n height: 40px;\n width: 40px;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n cursor: pointer;\n color: #262626;\n}\n.markdown .close-preview span[data-v-ebc40510] {\n font-size: 22px;\n}\n.markdown .close-preview span[data-v-ebc40510]:hover {\n color: #262626;\n}\n.markdown .markdown-content[data-v-ebc40510] {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n width: 100%;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n position: relative;\n overflow: hidden;\n padding-bottom: 0;\n}\n.markdown .markdown-content .markdown-editor[data-v-ebc40510] {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n height: 100%;\n position: relative;\n margin: 0 !important;\n overflow: hidden;\n overflow-y: scroll;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n background: #2d2d2d;\n}\n.markdown .markdown-content .markdown-editor[data-v-ebc40510]::-webkit-scrollbar {\n display: none;\n}\n.markdown .markdown-content .markdown-editor .index[data-v-ebc40510] {\n background: #272727;\n min-height: 100%;\n width: 36px;\n line-height: 22px;\n padding: 12px 0;\n}\n.markdown .markdown-content .markdown-editor .index li[data-v-ebc40510] {\n background: #272727;\n color: #ccc;\n font-size: 14px;\n text-align: center;\n font-family: Consolas;\n}\n.markdown .markdown-content .markdown-editor textarea[data-v-ebc40510] {\n width: 100%;\n min-height: 100%;\n outline: none;\n border: 0;\n background: #2d2d2d;\n line-height: 22px;\n caret-color: #ccc;\n color: #669acc;\n font-size: 14px;\n font-family: Consolas;\n resize: none;\n padding: 12px 8px;\n overflow: hidden;\n white-space: nowrap;\n overflow-x: auto;\n}\n.markdown .markdown-content .markdown-editor textarea[data-v-ebc40510]::-moz-selection {\n background: #999;\n color: #0084ff;\n}\n.markdown .markdown-content .markdown-editor textarea[data-v-ebc40510]::selection {\n background: #999;\n color: #0084ff;\n}\n.markdown .markdown-content .codemirror[data-v-ebc40510] {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n width: 0;\n height: 100%;\n overflow: auto;\n}\n.markdown .markdown-content .markdown-preview[data-v-ebc40510] {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n width: 0;\n height: 100%;\n}\n.insert-img-model[data-v-ebc40510] {\n position: fixed;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n z-index: 99999;\n background: rgba(0, 0, 0, 0.3);\n padding-top: 12%;\n -webkit-transition: all 0.3s;\n transition: all 0.3s;\n opacity: 0;\n display: none;\n}\n.insert-img-model .model-container[data-v-ebc40510] {\n background: #fff;\n width: 480px;\n margin: 0 auto;\n border-radius: 4px;\n -webkit-transition: all 0.3s;\n transition: all 0.3s;\n -webkit-transform: scale(0);\n transform: scale(0);\n -webkit-transform-origin: center;\n transform-origin: center;\n}\n.insert-img-model .model-container .model-head[data-v-ebc40510] {\n line-height: 32px;\n padding: 0 12px;\n background: #f7f7f7;\n border-radius: 4px 4px 0 0;\n -webkit-box-shadow: 0 1px 2px #d9d9d9;\n box-shadow: 0 1px 2px #d9d9d9;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n}\n.insert-img-model .model-container .model-head span[data-v-ebc40510]:nth-of-type(2) {\n font-size: 14px;\n padding-left: 12px;\n cursor: pointer;\n}\n.insert-img-model .model-container .model-head span[data-v-ebc40510]:nth-of-type(2):hover {\n color: #ed3f14;\n}\n.insert-img-model .model-container .model-content[data-v-ebc40510] {\n padding: 20px 12px;\n padding-top: 0;\n min-height: 180px;\n}\n.insert-img-model .model-container .model-content .insert-url[data-v-ebc40510] {\n padding: 42px 0;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.insert-img-model .model-container .model-content .insert-url input[data-v-ebc40510] {\n display: block;\n border: 1px solid #ccc;\n font-size: 14px;\n padding: 4px 8px;\n line-height: 24px;\n color: #333;\n background: #fff;\n border-radius: 4px;\n -webkit-writing-mode: horizontal-tb;\n -ms-writing-mode: lr-tb;\n writing-mode: horizontal-tb;\n text-rendering: auto;\n -webkit-transition: -webkit-box-shadow 2s;\n transition: -webkit-box-shadow 2s;\n transition: box-shadow 2s;\n transition: box-shadow 2s, -webkit-box-shadow 2s;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n}\n.insert-img-model .model-container .model-content .insert-url input[data-v-ebc40510]:focus {\n border-color: #1890ff;\n}\n.insert-img-model .model-container .model-content .insert-url input[data-v-ebc40510]::-webkit-input-placeholder {\n color: #c1c1c1;\n}\n.insert-img-model .model-container .model-content .insert-url input[data-v-ebc40510]::-moz-placeholder {\n color: #c1c1c1;\n}\n.insert-img-model .model-container .model-content .insert-url input[data-v-ebc40510]::-ms-input-placeholder {\n color: #c1c1c1;\n}\n.insert-img-model .model-container .model-content .insert-url input[data-v-ebc40510]::placeholder {\n color: #c1c1c1;\n}\n.insert-img-model .model-container .model-content .insert-url a[data-v-ebc40510] {\n display: block;\n background: #1890ff;\n color: #fff;\n line-height: 32px;\n height: 32px;\n font-size: 13px;\n padding: 0 12px;\n border-radius: 3px;\n margin-left: 20px;\n border: 1px solid #d9d9d9;\n -webkit-transition: all 0.3s;\n transition: all 0.3s;\n}\n.insert-img-model .model-container .model-content .insert-url a[data-v-ebc40510]:hover {\n background: #0169af;\n}\n.insert-img-model .model-container .model-content .insert-local[data-v-ebc40510] {\n height: 120px;\n border: 1px dashed #d9d9d9;\n border-radius: 4px;\n -webkit-transition: all 0.3s;\n transition: all 0.3s;\n position: relative;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n cursor: pointer;\n}\n.insert-img-model .model-container .model-content .insert-local span[data-v-ebc40510] {\n font-size: 40px;\n color: #d9d9d9;\n line-height: 50px;\n -webkit-transition: all 0.3s;\n transition: all 0.3s;\n}\n.insert-img-model .model-container .model-content .insert-local p[data-v-ebc40510] {\n font-size: 14px;\n color: #262626;\n -webkit-transition: all 0.3s;\n transition: all 0.3s;\n}\n.insert-img-model .model-container .model-content .insert-local[data-v-ebc40510]:hover {\n border-color: #1890ff;\n}\n.insert-img-model .model-container .model-content .insert-local:hover span[data-v-ebc40510],\n.insert-img-model .model-container .model-content .insert-local:hover p[data-v-ebc40510] {\n color: #1890ff;\n}\n.insert-img-model .model-container .model-content .insert-local input[data-v-ebc40510] {\n display: block;\n position: absolute;\n width: 100%;\n height: 100%;\n opacity: 0;\n}\n.insert-img-model .model-container .model-foot[data-v-ebc40510] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n padding: 10px 12px;\n display: none;\n}\n.insert-img-model .model-container .model-foot a[data-v-ebc40510] {\n display: block;\n background: #f7f7f7;\n color: #262626;\n line-height: 26px;\n height: 26px;\n font-size: 13px;\n padding: 0 12px;\n border-radius: 3px;\n margin-left: 12px;\n border: 1px solid #d9d9d9;\n -webkit-transition: all 0.3s;\n transition: all 0.3s;\n}\n.insert-img-model .model-container .model-foot a[data-v-ebc40510]:hover {\n background: #d9d9d9;\n}\n.insert-img-model .model-container .model-foot a.ok[data-v-ebc40510] {\n background: #1890ff;\n color: #fff;\n border-color: #1890ff;\n}\n.insert-img-model .model-container .model-foot a.ok[data-v-ebc40510]:hover {\n background: #0169af;\n}\n.insert-img-model.active[data-v-ebc40510] {\n opacity: 1;\n display: block;\n}\n.insert-img-model.active .model-container[data-v-ebc40510] {\n -webkit-transform: scale(1);\n transform: scale(1);\n}\nul.shift[data-v-ebc40510] {\n padding: 6px 12px;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\nul.shift span[data-v-ebc40510] {\n font-size: 12px;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\nul.shift span.iconfont[data-v-ebc40510] {\n font-size: 14px;\n}\nul.shift label[data-v-ebc40510] {\n font-size: 12px;\n padding-right: 10px;\n position: relative;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\nul.shift input[type='radio'][data-v-ebc40510],\nul.shift label[data-v-ebc40510] {\n -webkit-transition: all 0.6s ease;\n transition: all 0.6s ease;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\nul.shift input[type=\"radio\"] + label[data-v-ebc40510]::before {\n content: \"\\A0\";\n display: inline-block;\n vertical-align: middle;\n margin-right: 4px;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n border: 1px solid #292d35;\n padding: 2px;\n}\nul.shift input[type=\"radio\"]:checked + label[data-v-ebc40510]::before {\n background-color: #292d35;\n background-clip: content-box;\n padding: 2px;\n}\nul.shift input[type=\"radio\"][data-v-ebc40510] {\n position: absolute;\n clip: rect(0, 0, 0, 0);\n}\nul.shift input[type=\"radio\"]:checked + label[data-v-ebc40510] {\n color: #292d35;\n}\n[data-v-ebc40510] .markdown-preview {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n overflow: hidden;\n overflow-y: scroll;\n background: #fff;\n padding: 20px 12px !important;\n font-family: 'Tahoma For Number', 'Chinese Quote', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;\n /*基本样式*/\n}\n[data-v-ebc40510] .markdown-preview * {\n margin: 0;\n padding: 0;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n[data-v-ebc40510] .markdown-preview > div {\n padding: 10px 12px !important;\n background: #fff;\n}\n[data-v-ebc40510] .markdown-preview > div::-webkit-scrollbar {\n display: none;\n}\n[data-v-ebc40510] .markdown-preview::-webkit-scrollbar {\n display: none;\n}\n[data-v-ebc40510] .markdown-preview em {\n font-style: oblique;\n}\n[data-v-ebc40510] .markdown-preview ul {\n list-style: none;\n padding: 0 20px;\n}\n[data-v-ebc40510] .markdown-preview ul li {\n position: relative;\n}\n[data-v-ebc40510] .markdown-preview ul li:after {\n display: block;\n content: \"\";\n width: 8px;\n height: 8px;\n border-radius: 50%;\n position: absolute;\n z-index: 99;\n top: 12px;\n left: -16px;\n background: #262626;\n}\n[data-v-ebc40510] .markdown-preview ol,[data-v-ebc40510] .markdown-preview ul {\n margin: 10px 0;\n}\n[data-v-ebc40510] .markdown-preview ol li,[data-v-ebc40510] .markdown-preview ul li {\n font-size: 14px !important;\n color: #262626;\n line-height: 22px !important;\n padding: 4px 0;\n padding-left: 6px;\n min-height: 28px;\n}\n[data-v-ebc40510] .markdown-preview ol li input[type=\"checkbox\"],[data-v-ebc40510] .markdown-preview ul li input[type=\"checkbox\"] {\n position: relative;\n cursor: pointer;\n overflow: visible;\n position: absolute;\n left: -14px;\n top: 5px;\n}\n[data-v-ebc40510] .markdown-preview ol li input[type=\"checkbox\"]:before,[data-v-ebc40510] .markdown-preview ul li input[type=\"checkbox\"]:before {\n font-family: \"iconfont\" !important;\n color: #999;\n display: block;\n width: 18px;\n height: 18px;\n position: absolute;\n content: \"\\E684\";\n top: 0px;\n left: -4px;\n z-index: 999999;\n background-position: center;\n background: #fff;\n font-size: 18px;\n text-align: center;\n line-height: 18px;\n}\n[data-v-ebc40510] .markdown-preview ol li input[type=\"checkbox\"]:checked:before,[data-v-ebc40510] .markdown-preview ul li input[type=\"checkbox\"]:checked:before {\n content: \"\\E683\";\n}\n[data-v-ebc40510] .markdown-preview ol {\n list-style-type: decimal;\n padding-left: 20px;\n}\n[data-v-ebc40510] .markdown-preview ol li {\n list-style: decimal;\n}\n[data-v-ebc40510] .markdown-preview hr {\n color: #d9d9d9;\n height: 1px;\n border: 0;\n border-top: 1px solid #d9d9d9;\n margin: 20px 0;\n padding: 0;\n}\n[data-v-ebc40510] .markdown-preview del,[data-v-ebc40510] .markdown-preview em,[data-v-ebc40510] .markdown-preview strong {\n display: inline-block;\n}\n[data-v-ebc40510] .markdown-preview blockquote {\n position: relative;\n background: #f7f7f7;\n padding: 6px 12px;\n border-left: 5px solid #d9d9d9;\n border-radius: 2px;\n margin: 8px 0;\n}\n[data-v-ebc40510] .markdown-preview h1,[data-v-ebc40510] .markdown-preview h2,[data-v-ebc40510] .markdown-preview h3,[data-v-ebc40510] .markdown-preview h4,[data-v-ebc40510] .markdown-preview h5,[data-v-ebc40510] .markdown-preview h6 {\n color: #262626;\n}\n[data-v-ebc40510] .markdown-preview h1 {\n font-size: 28px;\n border-bottom: 1px solid #d9d9d9;\n}\n[data-v-ebc40510] .markdown-preview h2 {\n font-size: 24px;\n}\n[data-v-ebc40510] .markdown-preview h3 {\n font-size: 18px;\n}\n[data-v-ebc40510] .markdown-preview h4 {\n font-size: 16px;\n}\n[data-v-ebc40510] .markdown-preview h5 {\n font-size: 14px;\n}\n[data-v-ebc40510] .markdown-preview h6 {\n font-size: 12px;\n}\n[data-v-ebc40510] .markdown-preview h1,[data-v-ebc40510] .markdown-preview h2,[data-v-ebc40510] .markdown-preview h3,[data-v-ebc40510] .markdown-preview h4,[data-v-ebc40510] .markdown-preview h5,[data-v-ebc40510] .markdown-preview h6 {\n padding: 8px 0;\n font-weight: 600;\n}\n[data-v-ebc40510] .markdown-preview p {\n font-size: 14px !important;\n color: #262626;\n margin-bottom: 8px;\n line-height: 22px;\n}\n[data-v-ebc40510] .markdown-preview img {\n display: block;\n max-width: 100%;\n margin: 20px 0;\n cursor: pointer;\n}\n[data-v-ebc40510] .markdown-preview table {\n width: 100%;\n border: 1px solid #d9d9d9;\n border-bottom: 0;\n background: #fff;\n border-spacing: 0;\n border-collapse: collapse;\n margin: 20px 0;\n}\n[data-v-ebc40510] .markdown-preview table tr {\n -webkit-transition: background 0.1s;\n transition: background 0.1s;\n}\n[data-v-ebc40510] .markdown-preview table tr td,[data-v-ebc40510] .markdown-preview table tr th {\n padding: 4px 8px;\n font-size: 14px;\n line-height: 24px;\n color: #333;\n border-bottom: 1px solid #d9d9d9;\n cursor: pointer;\n}\n[data-v-ebc40510] .markdown-preview table th {\n background: #f8f8f9;\n text-align: left;\n font-weight: bold;\n}\n[data-v-ebc40510] .markdown-preview table tr:nth-of-type(even) td {\n background: #fafafa;\n}\n[data-v-ebc40510] .markdown-preview table tr:hover td {\n background: #f5f5f5;\n}\n[data-v-ebc40510] .markdown-preview table td,[data-v-ebc40510] .markdown-preview table th {\n border: 1px solid #d9d9d9;\n word-break: break-all;\n}\n[data-v-ebc40510] .markdown-preview input[type=\"checkbox\"] {\n display: inline-block;\n border-radius: 0;\n margin-right: 8px;\n}\n[data-v-ebc40510] .markdown-preview a {\n text-decoration: none;\n color: #1890ff;\n font-size: 14px;\n line-height: 22px;\n}\n[data-v-ebc40510] .markdown-preview .code-block {\n position: relative;\n padding: 0 !important;\n}\n[data-v-ebc40510] .markdown-preview .code-block .copy-code {\n position: absolute;\n z-index: 999;\n top: 5px;\n right: 10px;\n font-size: 12px;\n color: #d9d9d9;\n line-height: 20px;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-transition: all 0.3s;\n transition: all 0.3s;\n opacity: 0;\n}\n[data-v-ebc40510] .markdown-preview .code-block .copy-code:hover {\n color: #1890ff;\n}\n[data-v-ebc40510] .markdown-preview .code-block:hover .copy-code {\n opacity: 1;\n}\n.preview-img[data-v-ebc40510] {\n position: fixed;\n width: 100vw;\n height: 100vh;\n z-index: 99999999;\n left: 0;\n top: 0;\n background: rgba(0, 0, 0, 0.5);\n display: none;\n opacity: 0;\n -webkit-transition: opacity 0.3s 0.1s;\n transition: opacity 0.3s 0.1s;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.preview-img .close[data-v-ebc40510] {\n position: absolute;\n right: 0;\n top: 0;\n color: #fff;\n padding: 10px;\n font-size: 20px;\n cursor: pointer;\n}\n.preview-img img[data-v-ebc40510] {\n display: block;\n}\n.preview-img img.vertical[data-v-ebc40510] {\n height: 80%;\n width: auto;\n}\n.preview-img img.horizontal[data-v-ebc40510] {\n width: 80%;\n height: auto;\n}\n.preview-img.active[data-v-ebc40510] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n opacity: 1;\n}\n/*\n*Author zhaoxuhui\n*/\n[data-v-ebc40510] .markdown-theme-light pre {\n font-size: 14px !important;\n line-height: 1.6 !important;\n word-break: break-all;\n word-wrap: break-word;\n border: 0 !important;\n border-radius: 0 !important;\n background: #f7f8fb !important;\n padding: 20px 10px!important;\n border-radius: 4px !important;\n overflow-y: hidden !important;\n overflow-x: auto !important;\n margin: 10px 0 !important;\n}\n[data-v-ebc40510] .markdown-theme-light pre code {\n font-family: Consolas !important;\n font-size: 13px;\n line-height: 22px !important;\n color: #444;\n}\n[data-v-ebc40510] .markdown-theme-light .hljs {\n display: block;\n overflow-x: auto;\n color: #525252;\n padding: 15px;\n -webkit-text-size-adjust: none;\n}\n[data-v-ebc40510] .markdown-theme-light .hljs-doctype {\n color: #999;\n}\n[data-v-ebc40510] .markdown-theme-light .hljs-tag {\n color: #3e76f6;\n}\n[data-v-ebc40510] .markdown-theme-light .hljs-attribute {\n color: #e96900;\n}\n[data-v-ebc40510] .markdown-theme-light .hljs-value {\n color: #42b983;\n}\n[data-v-ebc40510] .markdown-theme-light .hljs-keyword {\n color: #e96900;\n}\n[data-v-ebc40510] .markdown-theme-light .hljs-string {\n color: #42b983;\n}\n[data-v-ebc40510] .markdown-theme-light .hljs-comment {\n color: #b3b3b3;\n}\n[data-v-ebc40510] .markdown-theme-light .hljs-operator .hljs-comment {\n color: #525252;\n}\n[data-v-ebc40510] .markdown-theme-light .hljs-regexp {\n color: #af7dff;\n}\n[data-v-ebc40510] .markdown-theme-light .hljs-built_in {\n color: #2db7f5;\n}\n[data-v-ebc40510] .markdown-theme-light .css .hljs-class {\n color: #e96900;\n}\n[data-v-ebc40510] .markdown-theme-light .css .hljs-number,[data-v-ebc40510] .markdown-theme-light .javascript .hljs-number {\n color: #fc1e70;\n}\n[data-v-ebc40510] .markdown-theme-light .css .hljs-attribute {\n color: #af7dff;\n}\n[data-v-ebc40510] .markdown-theme-light .css .hljs-important {\n color: red;\n}\n[data-v-ebc40510] .markdown-theme-light .actionscript .hljs-literal,[data-v-ebc40510] .markdown-theme-light .javascript .hljs-literal {\n color: #fc1e70;\n}\n[data-v-ebc40510] .markdown-theme-light pre {\n padding: 0;\n margin: 0;\n background: #f7f7f7 !important;\n}\n[data-v-ebc40510] .markdown-theme-light code {\n display: inline-block;\n background: #f7f7f7;\n font-family: Consolas, Monaco, Andale Mono, Ubuntu Mono, monospace;\n margin: 0 3px;\n padding: 1px 5px;\n border-radius: 3px;\n color: #666;\n border: 1px solid #eee;\n}\n[data-v-ebc40510] .markdown-theme-light pre code {\n display: inline;\n margin: 0;\n padding: 0;\n border: none;\n background: transparent;\n}\n[data-v-ebc40510] .markdown-theme-light pre.bg code {\n background: #f7f7f7;\n}\n/*\n*Author zhaoxuhui\n*/\n[data-v-ebc40510] .markdown-theme-dark pre {\n display: block;\n padding: 20px 10px!important;\n border-radius: 4px;\n margin: 20px 0 !important;\n background: #1e1e1e;\n color: #DCDCDC;\n overflow-y: hidden !important;\n overflow-x: auto !important;\n font-family: Menlo, Consolas, \"Courier New\", Courier, FreeMono, monospace !important;\n}\n[data-v-ebc40510] .markdown-theme-dark pre * {\n line-height: 1.6 !important;\n font-size: 14px;\n font-family: Menlo, Consolas, \"Courier New\", Courier, FreeMono, monospace !important;\n}\n[data-v-ebc40510] .markdown-theme-dark code {\n padding: 0 !important;\n margin: 0 !important;\n}\n[data-v-ebc40510] .markdown-theme-dark .hljs-literal,[data-v-ebc40510] .markdown-theme-dark .hljs-name,[data-v-ebc40510] .markdown-theme-dark .hljs-symbol {\n color: #659bd1;\n}\n[data-v-ebc40510] .markdown-theme-dark .hljs-keyword {\n color: #bc89bd;\n}\n[data-v-ebc40510] .markdown-theme-dark .hljs-link {\n color: #569CD6;\n text-decoration: underline;\n}\n[data-v-ebc40510] .markdown-theme-dark .hljs-built_in,[data-v-ebc40510] .markdown-theme-dark .hljs-type {\n color: #4EC9B0;\n}\n[data-v-ebc40510] .markdown-theme-dark .hljs-class,[data-v-ebc40510] .markdown-theme-dark .hljs-number {\n color: #B8D7A3;\n}\n[data-v-ebc40510] .markdown-theme-dark .hljs-meta-string,[data-v-ebc40510] .markdown-theme-dark .hljs-string {\n color: #D69D85;\n}\n[data-v-ebc40510] .markdown-theme-dark .hljs-regexp,[data-v-ebc40510] .markdown-theme-dark .hljs-template-tag {\n color: #9A5334;\n}\n[data-v-ebc40510] .markdown-theme-dark .hljs-formula,[data-v-ebc40510] .markdown-theme-dark .hljs-function,[data-v-ebc40510] .markdown-theme-dark .hljs-params,[data-v-ebc40510] .markdown-theme-dark .hljs-subst,[data-v-ebc40510] .markdown-theme-dark .hljs-title {\n color: #DCDCDC;\n}\n[data-v-ebc40510] .markdown-theme-dark .hljs-comment,[data-v-ebc40510] .markdown-theme-dark .hljs-quote {\n color: #57A64A;\n font-style: italic;\n}\n[data-v-ebc40510] .markdown-theme-dark .hljs-doctag {\n color: #608B4E;\n}\n[data-v-ebc40510] .markdown-theme-dark .hljs-meta,[data-v-ebc40510] .markdown-theme-dark .hljs-meta-keyword,[data-v-ebc40510] .markdown-theme-dark .hljs-tag {\n color: #9B9B9B;\n}\n[data-v-ebc40510] .markdown-theme-dark .hljs-template-variable,[data-v-ebc40510] .markdown-theme-dark .hljs-variable {\n color: #BD63C5;\n}\n[data-v-ebc40510] .markdown-theme-dark .hljs-attr,[data-v-ebc40510] .markdown-theme-dark .hljs-attribute,[data-v-ebc40510] .markdown-theme-dark .hljs-builtin-name {\n color: #9CDCFE;\n}\n[data-v-ebc40510] .markdown-theme-dark .hljs-section {\n color: gold;\n}\n[data-v-ebc40510] .markdown-theme-dark .hljs-emphasis {\n font-style: italic;\n}\n[data-v-ebc40510] .markdown-theme-dark .hljs-strong {\n font-weight: bold;\n}\n[data-v-ebc40510] .markdown-theme-dark .hljs-bullet,[data-v-ebc40510] .markdown-theme-dark .hljs-selector-attr,[data-v-ebc40510] .markdown-theme-dark .hljs-selector-class,[data-v-ebc40510] .markdown-theme-dark .hljs-selector-id,[data-v-ebc40510] .markdown-theme-dark .hljs-selector-pseudo,[data-v-ebc40510] .markdown-theme-dark .hljs-selector-tag {\n color: #D7BA7D;\n}\n[data-v-ebc40510] .markdown-theme-dark .hljs-addition {\n background-color: #144212;\n display: inline-block;\n width: 100%;\n}\n[data-v-ebc40510] .markdown-theme-dark .hljs-deletion {\n background-color: #600;\n display: inline-block;\n width: 100%;\n}\n[data-v-ebc40510] .markdown-theme-dark .hljs-comment {\n font-style: normal;\n}\n/*\n*Author zhaoxuhui\n*/\n[data-v-ebc40510] .markdown-theme-oneDark pre {\n padding: 20px 10px!important;\n display: block;\n color: #abb2bf;\n font-family: Menlo, Consolas, \"Courier New\", Courier, FreeMono, monospace;\n background: #292c34;\n border-radius: 4px;\n overflow-y: hidden !important;\n overflow-x: auto !important;\n margin: 10px 0 !important;\n}\n[data-v-ebc40510] .markdown-theme-oneDark pre * {\n line-height: 1.6 !important;\n font-size: 14px;\n font-family: Menlo, Consolas, \"Courier New\", Courier, FreeMono, monospace;\n}\n[data-v-ebc40510] .markdown-theme-oneDark .hljs-comment,[data-v-ebc40510] .markdown-theme-oneDark .hljs-quote {\n color: #5c6370;\n font-style: italic;\n}\n[data-v-ebc40510] .markdown-theme-oneDark .hljs-doctag,[data-v-ebc40510] .markdown-theme-oneDark .hljs-formula,[data-v-ebc40510] .markdown-theme-oneDark .hljs-keyword {\n color: #c678dd;\n}\n[data-v-ebc40510] .markdown-theme-oneDark .hljs-deletion,[data-v-ebc40510] .markdown-theme-oneDark .hljs-name,[data-v-ebc40510] .markdown-theme-oneDark .hljs-section,[data-v-ebc40510] .markdown-theme-oneDark .hljs-selector-tag,[data-v-ebc40510] .markdown-theme-oneDark .hljs-subst {\n color: #e06c75;\n}\n[data-v-ebc40510] .markdown-theme-oneDark .hljs-literal {\n color: #56b6c2;\n}\n[data-v-ebc40510] .markdown-theme-oneDark .hljs-addition,[data-v-ebc40510] .markdown-theme-oneDark .hljs-attribute,[data-v-ebc40510] .markdown-theme-oneDark .hljs-meta-string,[data-v-ebc40510] .markdown-theme-oneDark .hljs-regexp,[data-v-ebc40510] .markdown-theme-oneDark .hljs-string {\n color: #98c379;\n}\n[data-v-ebc40510] .markdown-theme-oneDark .hljs-built_in,[data-v-ebc40510] .markdown-theme-oneDark .hljs-class .hljs-title {\n color: #e6c07b;\n}\n[data-v-ebc40510] .markdown-theme-oneDark .hljs-attr,[data-v-ebc40510] .markdown-theme-oneDark .hljs-number,[data-v-ebc40510] .markdown-theme-oneDark .hljs-selector-attr,[data-v-ebc40510] .markdown-theme-oneDark .hljs-selector-class,[data-v-ebc40510] .markdown-theme-oneDark .hljs-selector-pseudo,[data-v-ebc40510] .markdown-theme-oneDark .hljs-template-variable,[data-v-ebc40510] .markdown-theme-oneDark .hljs-type,[data-v-ebc40510] .markdown-theme-oneDark .hljs-variable {\n color: #d19a66;\n}\n[data-v-ebc40510] .markdown-theme-oneDark .hljs-bullet,[data-v-ebc40510] .markdown-theme-oneDark .hljs-link,[data-v-ebc40510] .markdown-theme-oneDark .hljs-meta,[data-v-ebc40510] .markdown-theme-oneDark .hljs-selector-id,[data-v-ebc40510] .markdown-theme-oneDark .hljs-symbol,[data-v-ebc40510] .markdown-theme-oneDark .hljs-title {\n color: #61aeee;\n}\n[data-v-ebc40510] .markdown-theme-oneDark .hljs-emphasis {\n font-style: italic;\n}\n[data-v-ebc40510] .markdown-theme-oneDark .hljs-strong {\n font-weight: bold;\n}\n[data-v-ebc40510] .markdown-theme-oneDark .hljs-link {\n text-decoration: underline;\n}\n/*\n*Author zhaoxuhui\n*/\n[data-v-ebc40510] .markdown-theme-gitHub pre {\n padding: 20px 10px!important;\n display: block;\n overflow-x: auto;\n color: #333;\n background: #f7f8fa !important;\n font-size: 13px;\n line-height: 20px;\n border-radius: 4px;\n margin: 10px 0 !important;\n overflow-x: auto !important;\n}\n[data-v-ebc40510] .markdown-theme-gitHub pre * {\n font-family: Consolas !important;\n}\n[data-v-ebc40510] .markdown-theme-gitHub .hljs-comment,[data-v-ebc40510] .markdown-theme-gitHub .hljs-quote {\n color: #998;\n font-style: italic;\n}\n[data-v-ebc40510] .markdown-theme-gitHub .hljs-selector-tag,[data-v-ebc40510] .markdown-theme-gitHub .hljs-subst {\n color: #333;\n font-weight: bold;\n}\n[data-v-ebc40510] .markdown-theme-gitHub .hljs-keyword {\n color: #d73a49;\n}\n[data-v-ebc40510] .markdown-theme-gitHub .hljs-literal,[data-v-ebc40510] .markdown-theme-gitHub .hljs-number,[data-v-ebc40510] .markdown-theme-gitHub .hljs-tag .hljs-attr,[data-v-ebc40510] .markdown-theme-gitHub .hljs-template-variable,[data-v-ebc40510] .markdown-theme-gitHub .hljs-variable {\n color: #008080;\n}\n[data-v-ebc40510] .markdown-theme-gitHub .hljs-doctag,[data-v-ebc40510] .markdown-theme-gitHub .hljs-string {\n color: #d73a49;\n}\n[data-v-ebc40510] .markdown-theme-gitHub .hljs-section,[data-v-ebc40510] .markdown-theme-gitHub .hljs-selector-id,[data-v-ebc40510] .markdown-theme-gitHub .hljs-title {\n color: #900;\n font-weight: bold;\n}\n[data-v-ebc40510] .markdown-theme-gitHub .hljs-subst {\n font-weight: normal;\n}\n[data-v-ebc40510] .markdown-theme-gitHub .hljs-class .hljs-title,[data-v-ebc40510] .markdown-theme-gitHub .hljs-type {\n color: #458;\n font-weight: bold;\n}\n[data-v-ebc40510] .markdown-theme-gitHub .hljs-attribute,[data-v-ebc40510] .markdown-theme-gitHub .hljs-name,[data-v-ebc40510] .markdown-theme-gitHub .hljs-tag {\n color: #000080;\n font-weight: normal;\n}\n[data-v-ebc40510] .markdown-theme-gitHub .hljs-link,[data-v-ebc40510] .markdown-theme-gitHub .hljs-regexp {\n color: #009926;\n}\n[data-v-ebc40510] .markdown-theme-gitHub .hljs-bullet,[data-v-ebc40510] .markdown-theme-gitHub .hljs-symbol {\n color: #990073;\n}\n[data-v-ebc40510] .markdown-theme-gitHub .hljs-built_in,[data-v-ebc40510] .markdown-theme-gitHub .hljs-builtin-name {\n color: #0086b3;\n}\n[data-v-ebc40510] .markdown-theme-gitHub .hljs-meta {\n color: #999;\n font-weight: bold;\n}\n[data-v-ebc40510] .markdown-theme-gitHub .hljs-deletion {\n background: #fdd;\n}\n[data-v-ebc40510] .markdown-theme-gitHub .hljs-addition {\n background: #dfd;\n}\n[data-v-ebc40510] .markdown-theme-gitHub .hljs-emphasis {\n font-style: italic;\n}\n[data-v-ebc40510] .markdown-theme-gitHub .hljs-strong {\n font-weight: bold;\n}\n", ""]);
  3184. // exports
  3185. /***/ }),
  3186. /***/ 978:
  3187. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3188. "use strict";
  3189. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  3190. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__config_marked__ = __webpack_require__(409);
  3191. var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
  3192. //
  3193. //
  3194. //
  3195. //
  3196. //
  3197. //
  3198. //
  3199. //
  3200. //
  3201. //
  3202. //
  3203. //
  3204. //
  3205. //
  3206. //
  3207. //
  3208. //
  3209. /* harmony default export */ __webpack_exports__["default"] = ({
  3210. name: 'markdown-preview',
  3211. props: {
  3212. initialValue: {
  3213. // 初始化内容
  3214. type: String,
  3215. default: ''
  3216. },
  3217. markedOptions: {
  3218. type: Object,
  3219. default: function _default() {
  3220. return {};
  3221. }
  3222. },
  3223. theme: {
  3224. type: String,
  3225. default: 'light'
  3226. },
  3227. copyCode: { // 复制代码
  3228. type: Boolean,
  3229. default: true
  3230. },
  3231. copyBtnText: { // 复制代码按钮文字
  3232. type: String,
  3233. default: '复制代码'
  3234. }
  3235. },
  3236. data: function data() {
  3237. return {
  3238. html: '',
  3239. previewImgModal: false,
  3240. previewImgSrc: '',
  3241. previewImgMode: ''
  3242. };
  3243. },
  3244. mounted: function mounted() {
  3245. this.translateMarkdown();
  3246. },
  3247. methods: {
  3248. translateMarkdown: function translateMarkdown() {
  3249. var html = Object(__WEBPACK_IMPORTED_MODULE_0__config_marked__["a" /* default */])(this.initialValue, _extends({
  3250. sanitize: false
  3251. }, this.markedOptions)).replace(/href="/gi, 'target="_blank" href="');
  3252. if (this.copyCode) {
  3253. html = html.replace(/<pre>/g, '<div class="code-block"><span class="copy-code">' + this.copyBtnText + '</span><pre>').replace(/<\/pre>/g, '</pre></div>');
  3254. }
  3255. this.html = html;
  3256. this.addCopyListener();
  3257. this.addImageClickListener();
  3258. },
  3259. addCopyListener: function addCopyListener() {
  3260. var _this = this;
  3261. // 监听复制操作
  3262. setTimeout(function () {
  3263. var btns = document.querySelectorAll('.code-block .copy-code');
  3264. _this.btns = btns;
  3265. var _loop = function _loop(i, len) {
  3266. btns[i].onclick = function () {
  3267. var code = btns[i].parentNode.querySelectorAll('pre')[0].innerText;
  3268. var aux = document.createElement('input');
  3269. aux.setAttribute('value', code);
  3270. document.body.appendChild(aux);
  3271. aux.select();
  3272. document.execCommand('copy');
  3273. document.body.removeChild(aux);
  3274. _this.$emit('on-copy', code);
  3275. };
  3276. };
  3277. for (var i = 0, len = btns.length; i < len; i++) {
  3278. _loop(i, len);
  3279. }
  3280. }, 600);
  3281. },
  3282. addImageClickListener: function addImageClickListener() {
  3283. var _this2 = this;
  3284. // 监听查看大图
  3285. var _imgs = this.imgs,
  3286. imgs = _imgs === undefined ? [] : _imgs;
  3287. if (imgs.length > 0) {
  3288. for (var i = 0, len = imgs.length; i < len; i++) {
  3289. imgs[i].onclick = null;
  3290. }
  3291. }
  3292. setTimeout(function () {
  3293. _this2.imgs = _this2.$refs.preview.querySelectorAll('img');
  3294. var _loop2 = function _loop2(_i, _len) {
  3295. _this2.imgs[_i].onclick = function () {
  3296. var src = _this2.imgs[_i].getAttribute('src');
  3297. _this2.previewImage(src);
  3298. };
  3299. };
  3300. for (var _i = 0, _len = _this2.imgs.length; _i < _len; _i++) {
  3301. _loop2(_i, _len);
  3302. }
  3303. }, 600);
  3304. },
  3305. previewImage: function previewImage(src) {
  3306. var _this3 = this;
  3307. // 预览图片
  3308. var img = new Image();
  3309. img.src = src;
  3310. img.onload = function () {
  3311. var width = img.naturalWidth;
  3312. var height = img.naturalHeight;
  3313. if (height / width > 1.4) {
  3314. _this3.previewImgMode = 'horizontal';
  3315. } else {
  3316. _this3.previewImgMode = 'vertical';
  3317. }
  3318. _this3.previewImgSrc = src;
  3319. _this3.previewImgModal = true;
  3320. };
  3321. }
  3322. },
  3323. watch: {
  3324. initialValue: function initialValue() {
  3325. this.translateMarkdown();
  3326. }
  3327. }
  3328. });
  3329. /***/ }),
  3330. /***/ 979:
  3331. /***/ (function(module, exports, __webpack_require__) {
  3332. var render = function() {
  3333. var _vm = this
  3334. var _h = _vm.$createElement
  3335. var _c = _vm._self._c || _h
  3336. return _c("div", { ref: "preview" }, [
  3337. _c("div", {
  3338. class: "markdown-preview " + ("markdown-theme-" + _vm.theme),
  3339. domProps: { innerHTML: _vm._s(_vm.html) }
  3340. }),
  3341. _vm._v(" "),
  3342. _c("div", { class: ["preview-img", _vm.previewImgModal ? "active" : ""] }, [
  3343. _c("span", {
  3344. staticClass: "close icon-close iconfont",
  3345. on: {
  3346. click: function($event) {
  3347. _vm.previewImgModal = false
  3348. }
  3349. }
  3350. }),
  3351. _vm._v(" "),
  3352. _c("img", {
  3353. class: [_vm.previewImgMode],
  3354. attrs: { src: _vm.previewImgSrc, alt: "" }
  3355. })
  3356. ])
  3357. ])
  3358. }
  3359. var staticRenderFns = []
  3360. render._withStripped = true
  3361. module.exports = { render: render, staticRenderFns: staticRenderFns }
  3362. if (false) {
  3363. module.hot.accept()
  3364. if (module.hot.data) {
  3365. require("vue-hot-reload-api") .rerender("data-v-ebc40510", module.exports)
  3366. }
  3367. }
  3368. /***/ })
  3369. });