quill.min.js 461 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793
  1. /*!
  2. * Quill Editor v1.3.6
  3. * https://quilljs.com/
  4. * Copyright (c) 2014, Jason Chen
  5. * Copyright (c) 2013, salesforce.com
  6. */
  7. !(function(t, e) {
  8. 'object' == typeof exports && 'object' == typeof module
  9. ? (module.exports = e())
  10. : 'function' == typeof define && define.amd
  11. ? define([], e)
  12. : 'object' == typeof exports
  13. ? (exports.Quill = e())
  14. : (t.Quill = e())
  15. })('undefined' != typeof self ? self : this, function() {
  16. return (function(t) {
  17. function e(r) {
  18. if (n[r]) return n[r].exports
  19. var o = (n[r] = { i: r, l: !1, exports: {} })
  20. return t[r].call(o.exports, o, o.exports, e), (o.l = !0), o.exports
  21. }
  22. var n = {}
  23. return (
  24. (e.m = t),
  25. (e.c = n),
  26. (e.d = function(t, n, r) {
  27. e.o(t, n) || Object.defineProperty(t, n, { configurable: !1, enumerable: !0, get: r })
  28. }),
  29. (e.n = function(t) {
  30. var n =
  31. t && t.__esModule
  32. ? function() {
  33. return t.default
  34. }
  35. : function() {
  36. return t
  37. }
  38. return e.d(n, 'a', n), n
  39. }),
  40. (e.o = function(t, e) {
  41. return Object.prototype.hasOwnProperty.call(t, e)
  42. }),
  43. (e.p = ''),
  44. e((e.s = 45))
  45. )
  46. })([
  47. function(t, e, n) {
  48. 'use strict'
  49. Object.defineProperty(e, '__esModule', { value: !0 })
  50. var r = n(17),
  51. o = n(18),
  52. i = n(19),
  53. l = n(48),
  54. a = n(49),
  55. s = n(50),
  56. u = n(51),
  57. c = n(52),
  58. f = n(11),
  59. h = n(29),
  60. p = n(30),
  61. d = n(28),
  62. y = n(1),
  63. v = {
  64. Scope: y.Scope,
  65. create: y.create,
  66. find: y.find,
  67. query: y.query,
  68. register: y.register,
  69. Container: r.default,
  70. Format: o.default,
  71. Leaf: i.default,
  72. Embed: u.default,
  73. Scroll: l.default,
  74. Block: s.default,
  75. Inline: a.default,
  76. Text: c.default,
  77. Attributor: { Attribute: f.default, Class: h.default, Style: p.default, Store: d.default }
  78. }
  79. e.default = v
  80. },
  81. function(t, e, n) {
  82. 'use strict'
  83. function r(t, e) {
  84. var n = i(t)
  85. if (null == n) throw new s('Unable to create ' + t + ' blot')
  86. var r = n
  87. return new r(t instanceof Node || t.nodeType === Node.TEXT_NODE ? t : r.create(e), e)
  88. }
  89. function o(t, n) {
  90. return void 0 === n && (n = !1), null == t ? null : null != t[e.DATA_KEY] ? t[e.DATA_KEY].blot : n ? o(t.parentNode, n) : null
  91. }
  92. function i(t, e) {
  93. void 0 === e && (e = p.ANY)
  94. var n
  95. if ('string' == typeof t) n = h[t] || u[t]
  96. else if (t instanceof Text || t.nodeType === Node.TEXT_NODE) n = h.text
  97. else if ('number' == typeof t) t & p.LEVEL & p.BLOCK ? (n = h.block) : t & p.LEVEL & p.INLINE && (n = h.inline)
  98. else if (t instanceof HTMLElement) {
  99. var r = (t.getAttribute('class') || '').split(/\s+/)
  100. for (var o in r) if ((n = c[r[o]])) break
  101. n = n || f[t.tagName]
  102. }
  103. return null == n ? null : e & p.LEVEL & n.scope && e & p.TYPE & n.scope ? n : null
  104. }
  105. function l() {
  106. for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e]
  107. if (t.length > 1)
  108. return t.map(function(t) {
  109. return l(t)
  110. })
  111. var n = t[0]
  112. if ('string' != typeof n.blotName && 'string' != typeof n.attrName) throw new s('Invalid definition')
  113. if ('abstract' === n.blotName) throw new s('Cannot register abstract class')
  114. if (((h[n.blotName || n.attrName] = n), 'string' == typeof n.keyName)) u[n.keyName] = n
  115. else if ((null != n.className && (c[n.className] = n), null != n.tagName)) {
  116. Array.isArray(n.tagName)
  117. ? (n.tagName = n.tagName.map(function(t) {
  118. return t.toUpperCase()
  119. }))
  120. : (n.tagName = n.tagName.toUpperCase())
  121. var r = Array.isArray(n.tagName) ? n.tagName : [n.tagName]
  122. r.forEach(function(t) {
  123. ;(null != f[t] && null != n.className) || (f[t] = n)
  124. })
  125. }
  126. return n
  127. }
  128. var a =
  129. (this && this.__extends) ||
  130. (function() {
  131. var t =
  132. Object.setPrototypeOf ||
  133. ({ __proto__: [] } instanceof Array &&
  134. function(t, e) {
  135. t.__proto__ = e
  136. }) ||
  137. function(t, e) {
  138. for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n])
  139. }
  140. return function(e, n) {
  141. function r() {
  142. this.constructor = e
  143. }
  144. t(e, n), (e.prototype = null === n ? Object.create(n) : ((r.prototype = n.prototype), new r()))
  145. }
  146. })()
  147. Object.defineProperty(e, '__esModule', { value: !0 })
  148. var s = (function(t) {
  149. function e(e) {
  150. var n = this
  151. return (e = '[Parchment] ' + e), (n = t.call(this, e) || this), (n.message = e), (n.name = n.constructor.name), n
  152. }
  153. return a(e, t), e
  154. })(Error)
  155. e.ParchmentError = s
  156. var u = {},
  157. c = {},
  158. f = {},
  159. h = {}
  160. e.DATA_KEY = '__blot'
  161. var p
  162. !(function(t) {
  163. ;(t[(t.TYPE = 3)] = 'TYPE'),
  164. (t[(t.LEVEL = 12)] = 'LEVEL'),
  165. (t[(t.ATTRIBUTE = 13)] = 'ATTRIBUTE'),
  166. (t[(t.BLOT = 14)] = 'BLOT'),
  167. (t[(t.INLINE = 7)] = 'INLINE'),
  168. (t[(t.BLOCK = 11)] = 'BLOCK'),
  169. (t[(t.BLOCK_BLOT = 10)] = 'BLOCK_BLOT'),
  170. (t[(t.INLINE_BLOT = 6)] = 'INLINE_BLOT'),
  171. (t[(t.BLOCK_ATTRIBUTE = 9)] = 'BLOCK_ATTRIBUTE'),
  172. (t[(t.INLINE_ATTRIBUTE = 5)] = 'INLINE_ATTRIBUTE'),
  173. (t[(t.ANY = 15)] = 'ANY')
  174. })((p = e.Scope || (e.Scope = {}))),
  175. (e.create = r),
  176. (e.find = o),
  177. (e.query = i),
  178. (e.register = l)
  179. },
  180. function(t, e) {
  181. 'use strict'
  182. var n = Object.prototype.hasOwnProperty,
  183. r = Object.prototype.toString,
  184. o = function(t) {
  185. return 'function' == typeof Array.isArray ? Array.isArray(t) : '[object Array]' === r.call(t)
  186. },
  187. i = function(t) {
  188. if (!t || '[object Object]' !== r.call(t)) return !1
  189. var e = n.call(t, 'constructor'),
  190. o = t.constructor && t.constructor.prototype && n.call(t.constructor.prototype, 'isPrototypeOf')
  191. if (t.constructor && !e && !o) return !1
  192. var i
  193. for (i in t);
  194. return void 0 === i || n.call(t, i)
  195. }
  196. t.exports = function t() {
  197. var e,
  198. n,
  199. r,
  200. l,
  201. a,
  202. s,
  203. u = arguments[0],
  204. c = 1,
  205. f = arguments.length,
  206. h = !1
  207. for ('boolean' == typeof u && ((h = u), (u = arguments[1] || {}), (c = 2)), (null == u || ('object' != typeof u && 'function' != typeof u)) && (u = {}); c < f; ++c)
  208. if (null != (e = arguments[c]))
  209. for (n in e)
  210. (r = u[n]),
  211. (l = e[n]),
  212. u !== l && (h && l && (i(l) || (a = o(l))) ? (a ? ((a = !1), (s = r && o(r) ? r : [])) : (s = r && i(r) ? r : {}), (u[n] = t(h, s, l))) : void 0 !== l && (u[n] = l))
  213. return u
  214. }
  215. },
  216. function(t, e, n) {
  217. 'use strict'
  218. function r(t) {
  219. return t && t.__esModule ? t : { default: t }
  220. }
  221. function o(t, e) {
  222. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  223. }
  224. function i(t, e) {
  225. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  226. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  227. }
  228. function l(t, e) {
  229. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  230. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  231. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  232. }
  233. function a(t) {
  234. var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}
  235. return null == t
  236. ? e
  237. : ('function' == typeof t.formats && (e = (0, f.default)(e, t.formats())),
  238. null == t.parent || 'scroll' == t.parent.blotName || t.parent.statics.scope !== t.statics.scope ? e : a(t.parent, e))
  239. }
  240. Object.defineProperty(e, '__esModule', { value: !0 }), (e.default = e.BlockEmbed = e.bubbleFormats = void 0)
  241. var s = (function() {
  242. function t(t, e) {
  243. for (var n = 0; n < e.length; n++) {
  244. var r = e[n]
  245. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  246. }
  247. }
  248. return function(e, n, r) {
  249. return n && t(e.prototype, n), r && t(e, r), e
  250. }
  251. })(),
  252. u = function t(e, n, r) {
  253. null === e && (e = Function.prototype)
  254. var o = Object.getOwnPropertyDescriptor(e, n)
  255. if (void 0 === o) {
  256. var i = Object.getPrototypeOf(e)
  257. return null === i ? void 0 : t(i, n, r)
  258. }
  259. if ('value' in o) return o.value
  260. var l = o.get
  261. if (void 0 !== l) return l.call(r)
  262. },
  263. c = n(2),
  264. f = r(c),
  265. h = n(4),
  266. p = r(h),
  267. d = n(0),
  268. y = r(d),
  269. v = n(14),
  270. b = r(v),
  271. g = n(5),
  272. m = r(g),
  273. _ = n(8),
  274. O = r(_),
  275. w = (function(t) {
  276. function e() {
  277. return o(this, e), i(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments))
  278. }
  279. return (
  280. l(e, t),
  281. s(e, [
  282. {
  283. key: 'attach',
  284. value: function() {
  285. u(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'attach', this).call(this), (this.attributes = new y.default.Attributor.Store(this.domNode))
  286. }
  287. },
  288. {
  289. key: 'delta',
  290. value: function() {
  291. return new p.default().insert(this.value(), (0, f.default)(this.formats(), this.attributes.values()))
  292. }
  293. },
  294. {
  295. key: 'format',
  296. value: function(t, e) {
  297. var n = y.default.query(t, y.default.Scope.BLOCK_ATTRIBUTE)
  298. null != n && this.attributes.attribute(n, e)
  299. }
  300. },
  301. {
  302. key: 'formatAt',
  303. value: function(t, e, n, r) {
  304. this.format(n, r)
  305. }
  306. },
  307. {
  308. key: 'insertAt',
  309. value: function(t, n, r) {
  310. if ('string' == typeof n && n.endsWith('\n')) {
  311. var o = y.default.create(x.blotName)
  312. this.parent.insertBefore(o, 0 === t ? this : this.next), o.insertAt(0, n.slice(0, -1))
  313. } else u(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'insertAt', this).call(this, t, n, r)
  314. }
  315. }
  316. ]),
  317. e
  318. )
  319. })(y.default.Embed)
  320. w.scope = y.default.Scope.BLOCK_BLOT
  321. var x = (function(t) {
  322. function e(t) {
  323. o(this, e)
  324. var n = i(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t))
  325. return (n.cache = {}), n
  326. }
  327. return (
  328. l(e, t),
  329. s(e, [
  330. {
  331. key: 'delta',
  332. value: function() {
  333. return (
  334. null == this.cache.delta &&
  335. (this.cache.delta = this.descendants(y.default.Leaf)
  336. .reduce(function(t, e) {
  337. return 0 === e.length() ? t : t.insert(e.value(), a(e))
  338. }, new p.default())
  339. .insert('\n', a(this))),
  340. this.cache.delta
  341. )
  342. }
  343. },
  344. {
  345. key: 'deleteAt',
  346. value: function(t, n) {
  347. u(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'deleteAt', this).call(this, t, n), (this.cache = {})
  348. }
  349. },
  350. {
  351. key: 'formatAt',
  352. value: function(t, n, r, o) {
  353. n <= 0 ||
  354. (y.default.query(r, y.default.Scope.BLOCK)
  355. ? t + n === this.length() && this.format(r, o)
  356. : u(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'formatAt', this).call(this, t, Math.min(n, this.length() - t - 1), r, o),
  357. (this.cache = {}))
  358. }
  359. },
  360. {
  361. key: 'insertAt',
  362. value: function(t, n, r) {
  363. if (null != r) return u(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'insertAt', this).call(this, t, n, r)
  364. if (0 !== n.length) {
  365. var o = n.split('\n'),
  366. i = o.shift()
  367. i.length > 0 &&
  368. (t < this.length() - 1 || null == this.children.tail
  369. ? u(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'insertAt', this).call(this, Math.min(t, this.length() - 1), i)
  370. : this.children.tail.insertAt(this.children.tail.length(), i),
  371. (this.cache = {}))
  372. var l = this
  373. o.reduce(function(t, e) {
  374. return (l = l.split(t, !0)), l.insertAt(0, e), e.length
  375. }, t + i.length)
  376. }
  377. }
  378. },
  379. {
  380. key: 'insertBefore',
  381. value: function(t, n) {
  382. var r = this.children.head
  383. u(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'insertBefore', this).call(this, t, n), r instanceof b.default && r.remove(), (this.cache = {})
  384. }
  385. },
  386. {
  387. key: 'length',
  388. value: function() {
  389. return (
  390. null == this.cache.length && (this.cache.length = u(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'length', this).call(this) + 1), this.cache.length
  391. )
  392. }
  393. },
  394. {
  395. key: 'moveChildren',
  396. value: function(t, n) {
  397. u(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'moveChildren', this).call(this, t, n), (this.cache = {})
  398. }
  399. },
  400. {
  401. key: 'optimize',
  402. value: function(t) {
  403. u(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'optimize', this).call(this, t), (this.cache = {})
  404. }
  405. },
  406. {
  407. key: 'path',
  408. value: function(t) {
  409. return u(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'path', this).call(this, t, !0)
  410. }
  411. },
  412. {
  413. key: 'removeChild',
  414. value: function(t) {
  415. u(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'removeChild', this).call(this, t), (this.cache = {})
  416. }
  417. },
  418. {
  419. key: 'split',
  420. value: function(t) {
  421. var n = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]
  422. if (n && (0 === t || t >= this.length() - 1)) {
  423. var r = this.clone()
  424. return 0 === t ? (this.parent.insertBefore(r, this), this) : (this.parent.insertBefore(r, this.next), r)
  425. }
  426. var o = u(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'split', this).call(this, t, n)
  427. return (this.cache = {}), o
  428. }
  429. }
  430. ]),
  431. e
  432. )
  433. })(y.default.Block)
  434. ;(x.blotName = 'block'),
  435. (x.tagName = 'P'),
  436. (x.defaultChild = 'break'),
  437. (x.allowedChildren = [m.default, y.default.Embed, O.default]),
  438. (e.bubbleFormats = a),
  439. (e.BlockEmbed = w),
  440. (e.default = x)
  441. },
  442. function(t, e, n) {
  443. var r = n(54),
  444. o = n(12),
  445. i = n(2),
  446. l = n(20),
  447. a = String.fromCharCode(0),
  448. s = function(t) {
  449. Array.isArray(t) ? (this.ops = t) : null != t && Array.isArray(t.ops) ? (this.ops = t.ops) : (this.ops = [])
  450. }
  451. ;(s.prototype.insert = function(t, e) {
  452. var n = {}
  453. return 0 === t.length ? this : ((n.insert = t), null != e && 'object' == typeof e && Object.keys(e).length > 0 && (n.attributes = e), this.push(n))
  454. }),
  455. (s.prototype.delete = function(t) {
  456. return t <= 0 ? this : this.push({ delete: t })
  457. }),
  458. (s.prototype.retain = function(t, e) {
  459. if (t <= 0) return this
  460. var n = { retain: t }
  461. return null != e && 'object' == typeof e && Object.keys(e).length > 0 && (n.attributes = e), this.push(n)
  462. }),
  463. (s.prototype.push = function(t) {
  464. var e = this.ops.length,
  465. n = this.ops[e - 1]
  466. if (((t = i(!0, {}, t)), 'object' == typeof n)) {
  467. if ('number' == typeof t.delete && 'number' == typeof n.delete) return (this.ops[e - 1] = { delete: n.delete + t.delete }), this
  468. if ('number' == typeof n.delete && null != t.insert && ((e -= 1), 'object' != typeof (n = this.ops[e - 1]))) return this.ops.unshift(t), this
  469. if (o(t.attributes, n.attributes)) {
  470. if ('string' == typeof t.insert && 'string' == typeof n.insert)
  471. return (this.ops[e - 1] = { insert: n.insert + t.insert }), 'object' == typeof t.attributes && (this.ops[e - 1].attributes = t.attributes), this
  472. if ('number' == typeof t.retain && 'number' == typeof n.retain)
  473. return (this.ops[e - 1] = { retain: n.retain + t.retain }), 'object' == typeof t.attributes && (this.ops[e - 1].attributes = t.attributes), this
  474. }
  475. }
  476. return e === this.ops.length ? this.ops.push(t) : this.ops.splice(e, 0, t), this
  477. }),
  478. (s.prototype.chop = function() {
  479. var t = this.ops[this.ops.length - 1]
  480. return t && t.retain && !t.attributes && this.ops.pop(), this
  481. }),
  482. (s.prototype.filter = function(t) {
  483. return this.ops.filter(t)
  484. }),
  485. (s.prototype.forEach = function(t) {
  486. this.ops.forEach(t)
  487. }),
  488. (s.prototype.map = function(t) {
  489. return this.ops.map(t)
  490. }),
  491. (s.prototype.partition = function(t) {
  492. var e = [],
  493. n = []
  494. return (
  495. this.forEach(function(r) {
  496. ;(t(r) ? e : n).push(r)
  497. }),
  498. [e, n]
  499. )
  500. }),
  501. (s.prototype.reduce = function(t, e) {
  502. return this.ops.reduce(t, e)
  503. }),
  504. (s.prototype.changeLength = function() {
  505. return this.reduce(function(t, e) {
  506. return e.insert ? t + l.length(e) : e.delete ? t - e.delete : t
  507. }, 0)
  508. }),
  509. (s.prototype.length = function() {
  510. return this.reduce(function(t, e) {
  511. return t + l.length(e)
  512. }, 0)
  513. }),
  514. (s.prototype.slice = function(t, e) {
  515. ;(t = t || 0), 'number' != typeof e && (e = 1 / 0)
  516. for (var n = [], r = l.iterator(this.ops), o = 0; o < e && r.hasNext(); ) {
  517. var i
  518. o < t ? (i = r.next(t - o)) : ((i = r.next(e - o)), n.push(i)), (o += l.length(i))
  519. }
  520. return new s(n)
  521. }),
  522. (s.prototype.compose = function(t) {
  523. for (var e = l.iterator(this.ops), n = l.iterator(t.ops), r = new s(); e.hasNext() || n.hasNext(); )
  524. if ('insert' === n.peekType()) r.push(n.next())
  525. else if ('delete' === e.peekType()) r.push(e.next())
  526. else {
  527. var o = Math.min(e.peekLength(), n.peekLength()),
  528. i = e.next(o),
  529. a = n.next(o)
  530. if ('number' == typeof a.retain) {
  531. var u = {}
  532. 'number' == typeof i.retain ? (u.retain = o) : (u.insert = i.insert)
  533. var c = l.attributes.compose(i.attributes, a.attributes, 'number' == typeof i.retain)
  534. c && (u.attributes = c), r.push(u)
  535. } else 'number' == typeof a.delete && 'number' == typeof i.retain && r.push(a)
  536. }
  537. return r.chop()
  538. }),
  539. (s.prototype.concat = function(t) {
  540. var e = new s(this.ops.slice())
  541. return t.ops.length > 0 && (e.push(t.ops[0]), (e.ops = e.ops.concat(t.ops.slice(1)))), e
  542. }),
  543. (s.prototype.diff = function(t, e) {
  544. if (this.ops === t.ops) return new s()
  545. var n = [this, t].map(function(e) {
  546. return e
  547. .map(function(n) {
  548. if (null != n.insert) return 'string' == typeof n.insert ? n.insert : a
  549. var r = e === t ? 'on' : 'with'
  550. throw new Error('diff() called ' + r + ' non-document')
  551. })
  552. .join('')
  553. }),
  554. i = new s(),
  555. u = r(n[0], n[1], e),
  556. c = l.iterator(this.ops),
  557. f = l.iterator(t.ops)
  558. return (
  559. u.forEach(function(t) {
  560. for (var e = t[1].length; e > 0; ) {
  561. var n = 0
  562. switch (t[0]) {
  563. case r.INSERT:
  564. ;(n = Math.min(f.peekLength(), e)), i.push(f.next(n))
  565. break
  566. case r.DELETE:
  567. ;(n = Math.min(e, c.peekLength())), c.next(n), i.delete(n)
  568. break
  569. case r.EQUAL:
  570. n = Math.min(c.peekLength(), f.peekLength(), e)
  571. var a = c.next(n),
  572. s = f.next(n)
  573. o(a.insert, s.insert) ? i.retain(n, l.attributes.diff(a.attributes, s.attributes)) : i.push(s).delete(n)
  574. }
  575. e -= n
  576. }
  577. }),
  578. i.chop()
  579. )
  580. }),
  581. (s.prototype.eachLine = function(t, e) {
  582. e = e || '\n'
  583. for (var n = l.iterator(this.ops), r = new s(), o = 0; n.hasNext(); ) {
  584. if ('insert' !== n.peekType()) return
  585. var i = n.peek(),
  586. a = l.length(i) - n.peekLength(),
  587. u = 'string' == typeof i.insert ? i.insert.indexOf(e, a) - a : -1
  588. if (u < 0) r.push(n.next())
  589. else if (u > 0) r.push(n.next(u))
  590. else {
  591. if (!1 === t(r, n.next(1).attributes || {}, o)) return
  592. ;(o += 1), (r = new s())
  593. }
  594. }
  595. r.length() > 0 && t(r, {}, o)
  596. }),
  597. (s.prototype.transform = function(t, e) {
  598. if (((e = !!e), 'number' == typeof t)) return this.transformPosition(t, e)
  599. for (var n = l.iterator(this.ops), r = l.iterator(t.ops), o = new s(); n.hasNext() || r.hasNext(); )
  600. if ('insert' !== n.peekType() || (!e && 'insert' === r.peekType()))
  601. if ('insert' === r.peekType()) o.push(r.next())
  602. else {
  603. var i = Math.min(n.peekLength(), r.peekLength()),
  604. a = n.next(i),
  605. u = r.next(i)
  606. if (a.delete) continue
  607. u.delete ? o.push(u) : o.retain(i, l.attributes.transform(a.attributes, u.attributes, e))
  608. }
  609. else o.retain(l.length(n.next()))
  610. return o.chop()
  611. }),
  612. (s.prototype.transformPosition = function(t, e) {
  613. e = !!e
  614. for (var n = l.iterator(this.ops), r = 0; n.hasNext() && r <= t; ) {
  615. var o = n.peekLength(),
  616. i = n.peekType()
  617. n.next(), 'delete' !== i ? ('insert' === i && (r < t || !e) && (t += o), (r += o)) : (t -= Math.min(o, t - r))
  618. }
  619. return t
  620. }),
  621. (t.exports = s)
  622. },
  623. function(t, e, n) {
  624. 'use strict'
  625. function r(t) {
  626. return t && t.__esModule ? t : { default: t }
  627. }
  628. function o(t, e) {
  629. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  630. }
  631. function i(t, e) {
  632. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  633. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  634. }
  635. function l(t, e) {
  636. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  637. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  638. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  639. }
  640. Object.defineProperty(e, '__esModule', { value: !0 })
  641. var a = (function() {
  642. function t(t, e) {
  643. for (var n = 0; n < e.length; n++) {
  644. var r = e[n]
  645. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  646. }
  647. }
  648. return function(e, n, r) {
  649. return n && t(e.prototype, n), r && t(e, r), e
  650. }
  651. })(),
  652. s = function t(e, n, r) {
  653. null === e && (e = Function.prototype)
  654. var o = Object.getOwnPropertyDescriptor(e, n)
  655. if (void 0 === o) {
  656. var i = Object.getPrototypeOf(e)
  657. return null === i ? void 0 : t(i, n, r)
  658. }
  659. if ('value' in o) return o.value
  660. var l = o.get
  661. if (void 0 !== l) return l.call(r)
  662. },
  663. u = n(8),
  664. c = r(u),
  665. f = n(0),
  666. h = r(f),
  667. p = (function(t) {
  668. function e() {
  669. return o(this, e), i(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments))
  670. }
  671. return (
  672. l(e, t),
  673. a(
  674. e,
  675. [
  676. {
  677. key: 'formatAt',
  678. value: function(t, n, r, o) {
  679. if (e.compare(this.statics.blotName, r) < 0 && h.default.query(r, h.default.Scope.BLOT)) {
  680. var i = this.isolate(t, n)
  681. o && i.wrap(r, o)
  682. } else s(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'formatAt', this).call(this, t, n, r, o)
  683. }
  684. },
  685. {
  686. key: 'optimize',
  687. value: function(t) {
  688. if (
  689. (s(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'optimize', this).call(this, t),
  690. this.parent instanceof e && e.compare(this.statics.blotName, this.parent.statics.blotName) > 0)
  691. ) {
  692. var n = this.parent.isolate(this.offset(), this.length())
  693. this.moveChildren(n), n.wrap(this)
  694. }
  695. }
  696. }
  697. ],
  698. [
  699. {
  700. key: 'compare',
  701. value: function(t, n) {
  702. var r = e.order.indexOf(t),
  703. o = e.order.indexOf(n)
  704. return r >= 0 || o >= 0 ? r - o : t === n ? 0 : t < n ? -1 : 1
  705. }
  706. }
  707. ]
  708. ),
  709. e
  710. )
  711. })(h.default.Inline)
  712. ;(p.allowedChildren = [p, h.default.Embed, c.default]), (p.order = ['cursor', 'inline', 'underline', 'strike', 'italic', 'bold', 'script', 'link', 'code']), (e.default = p)
  713. },
  714. function(t, e, n) {
  715. 'use strict'
  716. function r(t) {
  717. return t && t.__esModule ? t : { default: t }
  718. }
  719. function o(t, e, n) {
  720. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : (t[e] = n), t
  721. }
  722. function i(t, e) {
  723. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  724. }
  725. function l(t, e) {
  726. if (((e = (0, N.default)(!0, { container: t, modules: { clipboard: !0, keyboard: !0, history: !0 } }, e)), e.theme && e.theme !== S.DEFAULTS.theme)) {
  727. if (((e.theme = S.import('themes/' + e.theme)), null == e.theme)) throw new Error('Invalid theme ' + e.theme + '. Did you register it?')
  728. } else e.theme = T.default
  729. var n = (0, N.default)(!0, {}, e.theme.DEFAULTS)
  730. ;[n, e].forEach(function(t) {
  731. ;(t.modules = t.modules || {}),
  732. Object.keys(t.modules).forEach(function(e) {
  733. !0 === t.modules[e] && (t.modules[e] = {})
  734. })
  735. })
  736. var r = Object.keys(n.modules).concat(Object.keys(e.modules)),
  737. o = r.reduce(function(t, e) {
  738. var n = S.import('modules/' + e)
  739. return null == n ? P.error('Cannot load ' + e + ' module. Are you sure you registered it?') : (t[e] = n.DEFAULTS || {}), t
  740. }, {})
  741. return (
  742. null != e.modules && e.modules.toolbar && e.modules.toolbar.constructor !== Object && (e.modules.toolbar = { container: e.modules.toolbar }),
  743. (e = (0, N.default)(!0, {}, S.DEFAULTS, { modules: o }, n, e)),
  744. ['bounds', 'container', 'scrollingContainer'].forEach(function(t) {
  745. 'string' == typeof e[t] && (e[t] = document.querySelector(e[t]))
  746. }),
  747. (e.modules = Object.keys(e.modules).reduce(function(t, n) {
  748. return e.modules[n] && (t[n] = e.modules[n]), t
  749. }, {})),
  750. e
  751. )
  752. }
  753. function a(t, e, n, r) {
  754. if (this.options.strict && !this.isEnabled() && e === g.default.sources.USER) return new d.default()
  755. var o = null == n ? null : this.getSelection(),
  756. i = this.editor.delta,
  757. l = t()
  758. if ((null != o && (!0 === n && (n = o.index), null == r ? (o = u(o, l, e)) : 0 !== r && (o = u(o, n, r, e)), this.setSelection(o, g.default.sources.SILENT)), l.length() > 0)) {
  759. var a,
  760. s = [g.default.events.TEXT_CHANGE, l, i, e]
  761. if (((a = this.emitter).emit.apply(a, [g.default.events.EDITOR_CHANGE].concat(s)), e !== g.default.sources.SILENT)) {
  762. var c
  763. ;(c = this.emitter).emit.apply(c, s)
  764. }
  765. }
  766. return l
  767. }
  768. function s(t, e, n, r, o) {
  769. var i = {}
  770. return (
  771. 'number' == typeof t.index && 'number' == typeof t.length
  772. ? 'number' != typeof e
  773. ? ((o = r), (r = n), (n = e), (e = t.length), (t = t.index))
  774. : ((e = t.length), (t = t.index))
  775. : 'number' != typeof e && ((o = r), (r = n), (n = e), (e = 0)),
  776. 'object' === (void 0 === n ? 'undefined' : c(n)) ? ((i = n), (o = r)) : 'string' == typeof n && (null != r ? (i[n] = r) : (o = n)),
  777. (o = o || g.default.sources.API),
  778. [t, e, i, o]
  779. )
  780. }
  781. function u(t, e, n, r) {
  782. if (null == t) return null
  783. var o = void 0,
  784. i = void 0
  785. if (e instanceof d.default) {
  786. var l = [t.index, t.index + t.length].map(function(t) {
  787. return e.transformPosition(t, r !== g.default.sources.USER)
  788. }),
  789. a = f(l, 2)
  790. ;(o = a[0]), (i = a[1])
  791. } else {
  792. var s = [t.index, t.index + t.length].map(function(t) {
  793. return t < e || (t === e && r === g.default.sources.USER) ? t : n >= 0 ? t + n : Math.max(e, t + n)
  794. }),
  795. u = f(s, 2)
  796. ;(o = u[0]), (i = u[1])
  797. }
  798. return new x.Range(o, i - o)
  799. }
  800. Object.defineProperty(e, '__esModule', { value: !0 }), (e.default = e.overload = e.expandConfig = void 0)
  801. var c =
  802. 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator
  803. ? function(t) {
  804. return typeof t
  805. }
  806. : function(t) {
  807. return t && 'function' == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? 'symbol' : typeof t
  808. },
  809. f = (function() {
  810. function t(t, e) {
  811. var n = [],
  812. r = !0,
  813. o = !1,
  814. i = void 0
  815. try {
  816. for (var l, a = t[Symbol.iterator](); !(r = (l = a.next()).done) && (n.push(l.value), !e || n.length !== e); r = !0);
  817. } catch (t) {
  818. ;(o = !0), (i = t)
  819. } finally {
  820. try {
  821. !r && a.return && a.return()
  822. } finally {
  823. if (o) throw i
  824. }
  825. }
  826. return n
  827. }
  828. return function(e, n) {
  829. if (Array.isArray(e)) return e
  830. if (Symbol.iterator in Object(e)) return t(e, n)
  831. throw new TypeError('Invalid attempt to destructure non-iterable instance')
  832. }
  833. })(),
  834. h = (function() {
  835. function t(t, e) {
  836. for (var n = 0; n < e.length; n++) {
  837. var r = e[n]
  838. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  839. }
  840. }
  841. return function(e, n, r) {
  842. return n && t(e.prototype, n), r && t(e, r), e
  843. }
  844. })()
  845. n(53)
  846. var p = n(4),
  847. d = r(p),
  848. y = n(57),
  849. v = r(y),
  850. b = n(9),
  851. g = r(b),
  852. m = n(7),
  853. _ = r(m),
  854. O = n(0),
  855. w = r(O),
  856. x = n(22),
  857. k = r(x),
  858. E = n(2),
  859. N = r(E),
  860. j = n(10),
  861. A = r(j),
  862. q = n(32),
  863. T = r(q),
  864. P = (0, A.default)('quill'),
  865. S = (function() {
  866. function t(e) {
  867. var n = this,
  868. r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}
  869. if ((i(this, t), (this.options = l(e, r)), (this.container = this.options.container), null == this.container)) return P.error('Invalid Quill container', e)
  870. this.options.debug && t.debug(this.options.debug)
  871. var o = this.container.innerHTML.trim()
  872. this.container.classList.add('ql-container'),
  873. (this.container.innerHTML = ''),
  874. (this.container.__quill = this),
  875. (this.root = this.addContainer('ql-editor')),
  876. this.root.classList.add('ql-blank'),
  877. this.root.setAttribute('data-gramm', !1),
  878. (this.scrollingContainer = this.options.scrollingContainer || this.root),
  879. (this.emitter = new g.default()),
  880. (this.scroll = w.default.create(this.root, { emitter: this.emitter, whitelist: this.options.formats })),
  881. (this.editor = new v.default(this.scroll)),
  882. (this.selection = new k.default(this.scroll, this.emitter)),
  883. (this.theme = new this.options.theme(this, this.options)),
  884. (this.keyboard = this.theme.addModule('keyboard')),
  885. (this.clipboard = this.theme.addModule('clipboard')),
  886. (this.history = this.theme.addModule('history')),
  887. this.theme.init(),
  888. this.emitter.on(g.default.events.EDITOR_CHANGE, function(t) {
  889. t === g.default.events.TEXT_CHANGE && n.root.classList.toggle('ql-blank', n.editor.isBlank())
  890. }),
  891. this.emitter.on(g.default.events.SCROLL_UPDATE, function(t, e) {
  892. var r = n.selection.lastRange,
  893. o = r && 0 === r.length ? r.index : void 0
  894. a.call(
  895. n,
  896. function() {
  897. return n.editor.update(null, e, o)
  898. },
  899. t
  900. )
  901. })
  902. var s = this.clipboard.convert('<div class=\'ql-editor\' style="white-space: normal;">' + o + '<p><br></p></div>')
  903. this.setContents(s),
  904. this.history.clear(),
  905. this.options.placeholder && this.root.setAttribute('data-placeholder', this.options.placeholder),
  906. this.options.readOnly && this.disable()
  907. }
  908. return (
  909. h(t, null, [
  910. {
  911. key: 'debug',
  912. value: function(t) {
  913. !0 === t && (t = 'log'), A.default.level(t)
  914. }
  915. },
  916. {
  917. key: 'find',
  918. value: function(t) {
  919. return t.__quill || w.default.find(t)
  920. }
  921. },
  922. {
  923. key: 'import',
  924. value: function(t) {
  925. return null == this.imports[t] && P.error('Cannot import ' + t + '. Are you sure it was registered?'), this.imports[t]
  926. }
  927. },
  928. {
  929. key: 'register',
  930. value: function(t, e) {
  931. var n = this,
  932. r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]
  933. if ('string' != typeof t) {
  934. var o = t.attrName || t.blotName
  935. 'string' == typeof o
  936. ? this.register('formats/' + o, t, e)
  937. : Object.keys(t).forEach(function(r) {
  938. n.register(r, t[r], e)
  939. })
  940. } else
  941. null == this.imports[t] || r || P.warn('Overwriting ' + t + ' with', e),
  942. (this.imports[t] = e),
  943. (t.startsWith('blots/') || t.startsWith('formats/')) && 'abstract' !== e.blotName
  944. ? w.default.register(e)
  945. : t.startsWith('modules') && 'function' == typeof e.register && e.register()
  946. }
  947. }
  948. ]),
  949. h(t, [
  950. {
  951. key: 'addContainer',
  952. value: function(t) {
  953. var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null
  954. if ('string' == typeof t) {
  955. var n = t
  956. ;(t = document.createElement('div')), t.classList.add(n)
  957. }
  958. return this.container.insertBefore(t, e), t
  959. }
  960. },
  961. {
  962. key: 'blur',
  963. value: function() {
  964. this.selection.setRange(null)
  965. }
  966. },
  967. {
  968. key: 'deleteText',
  969. value: function(t, e, n) {
  970. var r = this,
  971. o = s(t, e, n),
  972. i = f(o, 4)
  973. return (
  974. (t = i[0]),
  975. (e = i[1]),
  976. (n = i[3]),
  977. a.call(
  978. this,
  979. function() {
  980. return r.editor.deleteText(t, e)
  981. },
  982. n,
  983. t,
  984. -1 * e
  985. )
  986. )
  987. }
  988. },
  989. {
  990. key: 'disable',
  991. value: function() {
  992. this.enable(!1)
  993. }
  994. },
  995. {
  996. key: 'enable',
  997. value: function() {
  998. var t = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0]
  999. this.scroll.enable(t), this.container.classList.toggle('ql-disabled', !t)
  1000. }
  1001. },
  1002. {
  1003. key: 'focus',
  1004. value: function() {
  1005. var t = this.scrollingContainer.scrollTop
  1006. this.selection.focus(), (this.scrollingContainer.scrollTop = t), this.scrollIntoView()
  1007. }
  1008. },
  1009. {
  1010. key: 'format',
  1011. value: function(t, e) {
  1012. var n = this,
  1013. r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : g.default.sources.API
  1014. return a.call(
  1015. this,
  1016. function() {
  1017. var r = n.getSelection(!0),
  1018. i = new d.default()
  1019. if (null == r) return i
  1020. if (w.default.query(t, w.default.Scope.BLOCK)) i = n.editor.formatLine(r.index, r.length, o({}, t, e))
  1021. else {
  1022. if (0 === r.length) return n.selection.format(t, e), i
  1023. i = n.editor.formatText(r.index, r.length, o({}, t, e))
  1024. }
  1025. return n.setSelection(r, g.default.sources.SILENT), i
  1026. },
  1027. r
  1028. )
  1029. }
  1030. },
  1031. {
  1032. key: 'formatLine',
  1033. value: function(t, e, n, r, o) {
  1034. var i = this,
  1035. l = void 0,
  1036. u = s(t, e, n, r, o),
  1037. c = f(u, 4)
  1038. return (
  1039. (t = c[0]),
  1040. (e = c[1]),
  1041. (l = c[2]),
  1042. (o = c[3]),
  1043. a.call(
  1044. this,
  1045. function() {
  1046. return i.editor.formatLine(t, e, l)
  1047. },
  1048. o,
  1049. t,
  1050. 0
  1051. )
  1052. )
  1053. }
  1054. },
  1055. {
  1056. key: 'formatText',
  1057. value: function(t, e, n, r, o) {
  1058. var i = this,
  1059. l = void 0,
  1060. u = s(t, e, n, r, o),
  1061. c = f(u, 4)
  1062. return (
  1063. (t = c[0]),
  1064. (e = c[1]),
  1065. (l = c[2]),
  1066. (o = c[3]),
  1067. a.call(
  1068. this,
  1069. function() {
  1070. return i.editor.formatText(t, e, l)
  1071. },
  1072. o,
  1073. t,
  1074. 0
  1075. )
  1076. )
  1077. }
  1078. },
  1079. {
  1080. key: 'getBounds',
  1081. value: function(t) {
  1082. var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0,
  1083. n = void 0
  1084. n = 'number' == typeof t ? this.selection.getBounds(t, e) : this.selection.getBounds(t.index, t.length)
  1085. var r = this.container.getBoundingClientRect()
  1086. return { bottom: n.bottom - r.top, height: n.height, left: n.left - r.left, right: n.right - r.left, top: n.top - r.top, width: n.width }
  1087. }
  1088. },
  1089. {
  1090. key: 'getContents',
  1091. value: function() {
  1092. var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0,
  1093. e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.getLength() - t,
  1094. n = s(t, e),
  1095. r = f(n, 2)
  1096. return (t = r[0]), (e = r[1]), this.editor.getContents(t, e)
  1097. }
  1098. },
  1099. {
  1100. key: 'getFormat',
  1101. value: function() {
  1102. var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.getSelection(!0),
  1103. e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0
  1104. return 'number' == typeof t ? this.editor.getFormat(t, e) : this.editor.getFormat(t.index, t.length)
  1105. }
  1106. },
  1107. {
  1108. key: 'getIndex',
  1109. value: function(t) {
  1110. return t.offset(this.scroll)
  1111. }
  1112. },
  1113. {
  1114. key: 'getLength',
  1115. value: function() {
  1116. return this.scroll.length()
  1117. }
  1118. },
  1119. {
  1120. key: 'getLeaf',
  1121. value: function(t) {
  1122. return this.scroll.leaf(t)
  1123. }
  1124. },
  1125. {
  1126. key: 'getLine',
  1127. value: function(t) {
  1128. return this.scroll.line(t)
  1129. }
  1130. },
  1131. {
  1132. key: 'getLines',
  1133. value: function() {
  1134. var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0,
  1135. e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : Number.MAX_VALUE
  1136. return 'number' != typeof t ? this.scroll.lines(t.index, t.length) : this.scroll.lines(t, e)
  1137. }
  1138. },
  1139. {
  1140. key: 'getModule',
  1141. value: function(t) {
  1142. return this.theme.modules[t]
  1143. }
  1144. },
  1145. {
  1146. key: 'getSelection',
  1147. value: function() {
  1148. return arguments.length > 0 && void 0 !== arguments[0] && arguments[0] && this.focus(), this.update(), this.selection.getRange()[0]
  1149. }
  1150. },
  1151. {
  1152. key: 'getText',
  1153. value: function() {
  1154. var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0,
  1155. e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.getLength() - t,
  1156. n = s(t, e),
  1157. r = f(n, 2)
  1158. return (t = r[0]), (e = r[1]), this.editor.getText(t, e)
  1159. }
  1160. },
  1161. {
  1162. key: 'hasFocus',
  1163. value: function() {
  1164. return this.selection.hasFocus()
  1165. }
  1166. },
  1167. {
  1168. key: 'insertEmbed',
  1169. value: function(e, n, r) {
  1170. var o = this,
  1171. i = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : t.sources.API
  1172. return a.call(
  1173. this,
  1174. function() {
  1175. return o.editor.insertEmbed(e, n, r)
  1176. },
  1177. i,
  1178. e
  1179. )
  1180. }
  1181. },
  1182. {
  1183. key: 'insertText',
  1184. value: function(t, e, n, r, o) {
  1185. var i = this,
  1186. l = void 0,
  1187. u = s(t, 0, n, r, o),
  1188. c = f(u, 4)
  1189. return (
  1190. (t = c[0]),
  1191. (l = c[2]),
  1192. (o = c[3]),
  1193. a.call(
  1194. this,
  1195. function() {
  1196. return i.editor.insertText(t, e, l)
  1197. },
  1198. o,
  1199. t,
  1200. e.length
  1201. )
  1202. )
  1203. }
  1204. },
  1205. {
  1206. key: 'isEnabled',
  1207. value: function() {
  1208. return !this.container.classList.contains('ql-disabled')
  1209. }
  1210. },
  1211. {
  1212. key: 'off',
  1213. value: function() {
  1214. return this.emitter.off.apply(this.emitter, arguments)
  1215. }
  1216. },
  1217. {
  1218. key: 'on',
  1219. value: function() {
  1220. return this.emitter.on.apply(this.emitter, arguments)
  1221. }
  1222. },
  1223. {
  1224. key: 'once',
  1225. value: function() {
  1226. return this.emitter.once.apply(this.emitter, arguments)
  1227. }
  1228. },
  1229. {
  1230. key: 'pasteHTML',
  1231. value: function(t, e, n) {
  1232. this.clipboard.dangerouslyPasteHTML(t, e, n)
  1233. }
  1234. },
  1235. {
  1236. key: 'removeFormat',
  1237. value: function(t, e, n) {
  1238. var r = this,
  1239. o = s(t, e, n),
  1240. i = f(o, 4)
  1241. return (
  1242. (t = i[0]),
  1243. (e = i[1]),
  1244. (n = i[3]),
  1245. a.call(
  1246. this,
  1247. function() {
  1248. return r.editor.removeFormat(t, e)
  1249. },
  1250. n,
  1251. t
  1252. )
  1253. )
  1254. }
  1255. },
  1256. {
  1257. key: 'scrollIntoView',
  1258. value: function() {
  1259. this.selection.scrollIntoView(this.scrollingContainer)
  1260. }
  1261. },
  1262. {
  1263. key: 'setContents',
  1264. value: function(t) {
  1265. var e = this,
  1266. n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : g.default.sources.API
  1267. return a.call(
  1268. this,
  1269. function() {
  1270. t = new d.default(t)
  1271. var n = e.getLength(),
  1272. r = e.editor.deleteText(0, n),
  1273. o = e.editor.applyDelta(t),
  1274. i = o.ops[o.ops.length - 1]
  1275. return (
  1276. null != i && 'string' == typeof i.insert && '\n' === i.insert[i.insert.length - 1] && (e.editor.deleteText(e.getLength() - 1, 1), o.delete(1)),
  1277. r.compose(o)
  1278. )
  1279. },
  1280. n
  1281. )
  1282. }
  1283. },
  1284. {
  1285. key: 'setSelection',
  1286. value: function(e, n, r) {
  1287. if (null == e) this.selection.setRange(null, n || t.sources.API)
  1288. else {
  1289. var o = s(e, n, r),
  1290. i = f(o, 4)
  1291. ;(e = i[0]),
  1292. (n = i[1]),
  1293. (r = i[3]),
  1294. this.selection.setRange(new x.Range(e, n), r),
  1295. r !== g.default.sources.SILENT && this.selection.scrollIntoView(this.scrollingContainer)
  1296. }
  1297. }
  1298. },
  1299. {
  1300. key: 'setText',
  1301. value: function(t) {
  1302. var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : g.default.sources.API,
  1303. n = new d.default().insert(t)
  1304. return this.setContents(n, e)
  1305. }
  1306. },
  1307. {
  1308. key: 'update',
  1309. value: function() {
  1310. var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : g.default.sources.USER,
  1311. e = this.scroll.update(t)
  1312. return this.selection.update(t), e
  1313. }
  1314. },
  1315. {
  1316. key: 'updateContents',
  1317. value: function(t) {
  1318. var e = this,
  1319. n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : g.default.sources.API
  1320. return a.call(
  1321. this,
  1322. function() {
  1323. return (t = new d.default(t)), e.editor.applyDelta(t, n)
  1324. },
  1325. n,
  1326. !0
  1327. )
  1328. }
  1329. }
  1330. ]),
  1331. t
  1332. )
  1333. })()
  1334. ;(S.DEFAULTS = { bounds: null, formats: null, modules: {}, placeholder: '', readOnly: !1, scrollingContainer: null, strict: !0, theme: 'default' }),
  1335. (S.events = g.default.events),
  1336. (S.sources = g.default.sources),
  1337. (S.version = '1.3.6'),
  1338. (S.imports = { delta: d.default, parchment: w.default, 'core/module': _.default, 'core/theme': T.default }),
  1339. (e.expandConfig = l),
  1340. (e.overload = s),
  1341. (e.default = S)
  1342. },
  1343. function(t, e, n) {
  1344. 'use strict'
  1345. function r(t, e) {
  1346. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  1347. }
  1348. Object.defineProperty(e, '__esModule', { value: !0 })
  1349. var o = function t(e) {
  1350. var n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}
  1351. r(this, t), (this.quill = e), (this.options = n)
  1352. }
  1353. ;(o.DEFAULTS = {}), (e.default = o)
  1354. },
  1355. function(t, e, n) {
  1356. 'use strict'
  1357. function r(t, e) {
  1358. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  1359. }
  1360. function o(t, e) {
  1361. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  1362. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  1363. }
  1364. function i(t, e) {
  1365. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  1366. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  1367. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  1368. }
  1369. Object.defineProperty(e, '__esModule', { value: !0 })
  1370. var l = n(0),
  1371. a = (function(t) {
  1372. return t && t.__esModule ? t : { default: t }
  1373. })(l),
  1374. s = (function(t) {
  1375. function e() {
  1376. return r(this, e), o(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments))
  1377. }
  1378. return i(e, t), e
  1379. })(a.default.Text)
  1380. e.default = s
  1381. },
  1382. function(t, e, n) {
  1383. 'use strict'
  1384. function r(t) {
  1385. return t && t.__esModule ? t : { default: t }
  1386. }
  1387. function o(t, e) {
  1388. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  1389. }
  1390. function i(t, e) {
  1391. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  1392. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  1393. }
  1394. function l(t, e) {
  1395. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  1396. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  1397. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  1398. }
  1399. Object.defineProperty(e, '__esModule', { value: !0 })
  1400. var a = (function() {
  1401. function t(t, e) {
  1402. for (var n = 0; n < e.length; n++) {
  1403. var r = e[n]
  1404. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  1405. }
  1406. }
  1407. return function(e, n, r) {
  1408. return n && t(e.prototype, n), r && t(e, r), e
  1409. }
  1410. })(),
  1411. s = function t(e, n, r) {
  1412. null === e && (e = Function.prototype)
  1413. var o = Object.getOwnPropertyDescriptor(e, n)
  1414. if (void 0 === o) {
  1415. var i = Object.getPrototypeOf(e)
  1416. return null === i ? void 0 : t(i, n, r)
  1417. }
  1418. if ('value' in o) return o.value
  1419. var l = o.get
  1420. if (void 0 !== l) return l.call(r)
  1421. },
  1422. u = n(58),
  1423. c = r(u),
  1424. f = n(10),
  1425. h = r(f),
  1426. p = (0, h.default)('quill:events')
  1427. ;['selectionchange', 'mousedown', 'mouseup', 'click'].forEach(function(t) {
  1428. document.addEventListener(t, function() {
  1429. for (var t = arguments.length, e = Array(t), n = 0; n < t; n++) e[n] = arguments[n]
  1430. ;[].slice.call(document.querySelectorAll('.ql-container')).forEach(function(t) {
  1431. if (t.__quill && t.__quill.emitter) {
  1432. var n
  1433. ;(n = t.__quill.emitter).handleDOM.apply(n, e)
  1434. }
  1435. })
  1436. })
  1437. })
  1438. var d = (function(t) {
  1439. function e() {
  1440. o(this, e)
  1441. var t = i(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this))
  1442. return (t.listeners = {}), t.on('error', p.error), t
  1443. }
  1444. return (
  1445. l(e, t),
  1446. a(e, [
  1447. {
  1448. key: 'emit',
  1449. value: function() {
  1450. p.log.apply(p, arguments), s(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'emit', this).apply(this, arguments)
  1451. }
  1452. },
  1453. {
  1454. key: 'handleDOM',
  1455. value: function(t) {
  1456. for (var e = arguments.length, n = Array(e > 1 ? e - 1 : 0), r = 1; r < e; r++) n[r - 1] = arguments[r]
  1457. ;(this.listeners[t.type] || []).forEach(function(e) {
  1458. var r = e.node,
  1459. o = e.handler
  1460. ;(t.target === r || r.contains(t.target)) && o.apply(void 0, [t].concat(n))
  1461. })
  1462. }
  1463. },
  1464. {
  1465. key: 'listenDOM',
  1466. value: function(t, e, n) {
  1467. this.listeners[t] || (this.listeners[t] = []), this.listeners[t].push({ node: e, handler: n })
  1468. }
  1469. }
  1470. ]),
  1471. e
  1472. )
  1473. })(c.default)
  1474. ;(d.events = {
  1475. EDITOR_CHANGE: 'editor-change',
  1476. SCROLL_BEFORE_UPDATE: 'scroll-before-update',
  1477. SCROLL_OPTIMIZE: 'scroll-optimize',
  1478. SCROLL_UPDATE: 'scroll-update',
  1479. SELECTION_CHANGE: 'selection-change',
  1480. TEXT_CHANGE: 'text-change'
  1481. }),
  1482. (d.sources = { API: 'api', SILENT: 'silent', USER: 'user' }),
  1483. (e.default = d)
  1484. },
  1485. function(t, e, n) {
  1486. 'use strict'
  1487. function r(t) {
  1488. if (i.indexOf(t) <= i.indexOf(l)) {
  1489. for (var e, n = arguments.length, r = Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++) r[o - 1] = arguments[o]
  1490. ;(e = console)[t].apply(e, r)
  1491. }
  1492. }
  1493. function o(t) {
  1494. return i.reduce(function(e, n) {
  1495. return (e[n] = r.bind(console, n, t)), e
  1496. }, {})
  1497. }
  1498. Object.defineProperty(e, '__esModule', { value: !0 })
  1499. var i = ['error', 'warn', 'log', 'info'],
  1500. l = 'warn'
  1501. ;(r.level = o.level = function(t) {
  1502. l = t
  1503. }),
  1504. (e.default = o)
  1505. },
  1506. function(t, e, n) {
  1507. 'use strict'
  1508. Object.defineProperty(e, '__esModule', { value: !0 })
  1509. var r = n(1),
  1510. o = (function() {
  1511. function t(t, e, n) {
  1512. void 0 === n && (n = {}), (this.attrName = t), (this.keyName = e)
  1513. var o = r.Scope.TYPE & r.Scope.ATTRIBUTE
  1514. null != n.scope ? (this.scope = (n.scope & r.Scope.LEVEL) | o) : (this.scope = r.Scope.ATTRIBUTE), null != n.whitelist && (this.whitelist = n.whitelist)
  1515. }
  1516. return (
  1517. (t.keys = function(t) {
  1518. return [].map.call(t.attributes, function(t) {
  1519. return t.name
  1520. })
  1521. }),
  1522. (t.prototype.add = function(t, e) {
  1523. return !!this.canAdd(t, e) && (t.setAttribute(this.keyName, e), !0)
  1524. }),
  1525. (t.prototype.canAdd = function(t, e) {
  1526. return (
  1527. null != r.query(t, r.Scope.BLOT & (this.scope | r.Scope.TYPE)) &&
  1528. (null == this.whitelist || ('string' == typeof e ? this.whitelist.indexOf(e.replace(/["']/g, '')) > -1 : this.whitelist.indexOf(e) > -1))
  1529. )
  1530. }),
  1531. (t.prototype.remove = function(t) {
  1532. t.removeAttribute(this.keyName)
  1533. }),
  1534. (t.prototype.value = function(t) {
  1535. var e = t.getAttribute(this.keyName)
  1536. return this.canAdd(t, e) && e ? e : ''
  1537. }),
  1538. t
  1539. )
  1540. })()
  1541. e.default = o
  1542. },
  1543. function(t, e, n) {
  1544. function r(t) {
  1545. return null === t || void 0 === t
  1546. }
  1547. function o(t) {
  1548. return !(!t || 'object' != typeof t || 'number' != typeof t.length) && 'function' == typeof t.copy && 'function' == typeof t.slice && !(t.length > 0 && 'number' != typeof t[0])
  1549. }
  1550. function i(t, e, n) {
  1551. var i, c
  1552. if (r(t) || r(e)) return !1
  1553. if (t.prototype !== e.prototype) return !1
  1554. if (s(t)) return !!s(e) && ((t = l.call(t)), (e = l.call(e)), u(t, e, n))
  1555. if (o(t)) {
  1556. if (!o(e)) return !1
  1557. if (t.length !== e.length) return !1
  1558. for (i = 0; i < t.length; i++) if (t[i] !== e[i]) return !1
  1559. return !0
  1560. }
  1561. try {
  1562. var f = a(t),
  1563. h = a(e)
  1564. } catch (t) {
  1565. return !1
  1566. }
  1567. if (f.length != h.length) return !1
  1568. for (f.sort(), h.sort(), i = f.length - 1; i >= 0; i--) if (f[i] != h[i]) return !1
  1569. for (i = f.length - 1; i >= 0; i--) if (((c = f[i]), !u(t[c], e[c], n))) return !1
  1570. return typeof t == typeof e
  1571. }
  1572. var l = Array.prototype.slice,
  1573. a = n(55),
  1574. s = n(56),
  1575. u = (t.exports = function(t, e, n) {
  1576. return (
  1577. n || (n = {}),
  1578. t === e ||
  1579. (t instanceof Date && e instanceof Date
  1580. ? t.getTime() === e.getTime()
  1581. : !t || !e || ('object' != typeof t && 'object' != typeof e)
  1582. ? n.strict
  1583. ? t === e
  1584. : t == e
  1585. : i(t, e, n))
  1586. )
  1587. })
  1588. },
  1589. function(t, e, n) {
  1590. 'use strict'
  1591. function r(t) {
  1592. return t && t.__esModule ? t : { default: t }
  1593. }
  1594. function o(t, e) {
  1595. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  1596. }
  1597. function i(t, e) {
  1598. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  1599. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  1600. }
  1601. function l(t, e) {
  1602. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  1603. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  1604. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  1605. }
  1606. Object.defineProperty(e, '__esModule', { value: !0 }), (e.default = e.Code = void 0)
  1607. var a = (function() {
  1608. function t(t, e) {
  1609. var n = [],
  1610. r = !0,
  1611. o = !1,
  1612. i = void 0
  1613. try {
  1614. for (var l, a = t[Symbol.iterator](); !(r = (l = a.next()).done) && (n.push(l.value), !e || n.length !== e); r = !0);
  1615. } catch (t) {
  1616. ;(o = !0), (i = t)
  1617. } finally {
  1618. try {
  1619. !r && a.return && a.return()
  1620. } finally {
  1621. if (o) throw i
  1622. }
  1623. }
  1624. return n
  1625. }
  1626. return function(e, n) {
  1627. if (Array.isArray(e)) return e
  1628. if (Symbol.iterator in Object(e)) return t(e, n)
  1629. throw new TypeError('Invalid attempt to destructure non-iterable instance')
  1630. }
  1631. })(),
  1632. s = (function() {
  1633. function t(t, e) {
  1634. for (var n = 0; n < e.length; n++) {
  1635. var r = e[n]
  1636. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  1637. }
  1638. }
  1639. return function(e, n, r) {
  1640. return n && t(e.prototype, n), r && t(e, r), e
  1641. }
  1642. })(),
  1643. u = function t(e, n, r) {
  1644. null === e && (e = Function.prototype)
  1645. var o = Object.getOwnPropertyDescriptor(e, n)
  1646. if (void 0 === o) {
  1647. var i = Object.getPrototypeOf(e)
  1648. return null === i ? void 0 : t(i, n, r)
  1649. }
  1650. if ('value' in o) return o.value
  1651. var l = o.get
  1652. if (void 0 !== l) return l.call(r)
  1653. },
  1654. c = n(4),
  1655. f = r(c),
  1656. h = n(0),
  1657. p = r(h),
  1658. d = n(3),
  1659. y = r(d),
  1660. v = n(5),
  1661. b = r(v),
  1662. g = n(8),
  1663. m = r(g),
  1664. _ = (function(t) {
  1665. function e() {
  1666. return o(this, e), i(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments))
  1667. }
  1668. return l(e, t), e
  1669. })(b.default)
  1670. ;(_.blotName = 'code'), (_.tagName = 'CODE')
  1671. var O = (function(t) {
  1672. function e() {
  1673. return o(this, e), i(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments))
  1674. }
  1675. return (
  1676. l(e, t),
  1677. s(
  1678. e,
  1679. [
  1680. {
  1681. key: 'delta',
  1682. value: function() {
  1683. var t = this,
  1684. e = this.domNode.textContent
  1685. return (
  1686. e.endsWith('\n') && (e = e.slice(0, -1)),
  1687. e.split('\n').reduce(function(e, n) {
  1688. return e.insert(n).insert('\n', t.formats())
  1689. }, new f.default())
  1690. )
  1691. }
  1692. },
  1693. {
  1694. key: 'format',
  1695. value: function(t, n) {
  1696. if (t !== this.statics.blotName || !n) {
  1697. var r = this.descendant(m.default, this.length() - 1),
  1698. o = a(r, 1),
  1699. i = o[0]
  1700. null != i && i.deleteAt(i.length() - 1, 1), u(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'format', this).call(this, t, n)
  1701. }
  1702. }
  1703. },
  1704. {
  1705. key: 'formatAt',
  1706. value: function(t, n, r, o) {
  1707. if (0 !== n && null != p.default.query(r, p.default.Scope.BLOCK) && (r !== this.statics.blotName || o !== this.statics.formats(this.domNode))) {
  1708. var i = this.newlineIndex(t)
  1709. if (!(i < 0 || i >= t + n)) {
  1710. var l = this.newlineIndex(t, !0) + 1,
  1711. a = i - l + 1,
  1712. s = this.isolate(l, a),
  1713. u = s.next
  1714. s.format(r, o), u instanceof e && u.formatAt(0, t - l + n - a, r, o)
  1715. }
  1716. }
  1717. }
  1718. },
  1719. {
  1720. key: 'insertAt',
  1721. value: function(t, e, n) {
  1722. if (null == n) {
  1723. var r = this.descendant(m.default, t),
  1724. o = a(r, 2),
  1725. i = o[0],
  1726. l = o[1]
  1727. i.insertAt(l, e)
  1728. }
  1729. }
  1730. },
  1731. {
  1732. key: 'length',
  1733. value: function() {
  1734. var t = this.domNode.textContent.length
  1735. return this.domNode.textContent.endsWith('\n') ? t : t + 1
  1736. }
  1737. },
  1738. {
  1739. key: 'newlineIndex',
  1740. value: function(t) {
  1741. if (arguments.length > 1 && void 0 !== arguments[1] && arguments[1]) return this.domNode.textContent.slice(0, t).lastIndexOf('\n')
  1742. var e = this.domNode.textContent.slice(t).indexOf('\n')
  1743. return e > -1 ? t + e : -1
  1744. }
  1745. },
  1746. {
  1747. key: 'optimize',
  1748. value: function(t) {
  1749. this.domNode.textContent.endsWith('\n') || this.appendChild(p.default.create('text', '\n')),
  1750. u(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'optimize', this).call(this, t)
  1751. var n = this.next
  1752. null != n &&
  1753. n.prev === this &&
  1754. n.statics.blotName === this.statics.blotName &&
  1755. this.statics.formats(this.domNode) === n.statics.formats(n.domNode) &&
  1756. (n.optimize(t), n.moveChildren(this), n.remove())
  1757. }
  1758. },
  1759. {
  1760. key: 'replace',
  1761. value: function(t) {
  1762. u(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'replace', this).call(this, t),
  1763. [].slice.call(this.domNode.querySelectorAll('*')).forEach(function(t) {
  1764. var e = p.default.find(t)
  1765. null == e ? t.parentNode.removeChild(t) : e instanceof p.default.Embed ? e.remove() : e.unwrap()
  1766. })
  1767. }
  1768. }
  1769. ],
  1770. [
  1771. {
  1772. key: 'create',
  1773. value: function(t) {
  1774. var n = u(e.__proto__ || Object.getPrototypeOf(e), 'create', this).call(this, t)
  1775. return n.setAttribute('spellcheck', !1), n
  1776. }
  1777. },
  1778. {
  1779. key: 'formats',
  1780. value: function() {
  1781. return !0
  1782. }
  1783. }
  1784. ]
  1785. ),
  1786. e
  1787. )
  1788. })(y.default)
  1789. ;(O.blotName = 'code-block'), (O.tagName = 'PRE'), (O.TAB = ' '), (e.Code = _), (e.default = O)
  1790. },
  1791. function(t, e, n) {
  1792. 'use strict'
  1793. function r(t, e) {
  1794. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  1795. }
  1796. function o(t, e) {
  1797. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  1798. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  1799. }
  1800. function i(t, e) {
  1801. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  1802. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  1803. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  1804. }
  1805. Object.defineProperty(e, '__esModule', { value: !0 })
  1806. var l = (function() {
  1807. function t(t, e) {
  1808. for (var n = 0; n < e.length; n++) {
  1809. var r = e[n]
  1810. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  1811. }
  1812. }
  1813. return function(e, n, r) {
  1814. return n && t(e.prototype, n), r && t(e, r), e
  1815. }
  1816. })(),
  1817. a = function t(e, n, r) {
  1818. null === e && (e = Function.prototype)
  1819. var o = Object.getOwnPropertyDescriptor(e, n)
  1820. if (void 0 === o) {
  1821. var i = Object.getPrototypeOf(e)
  1822. return null === i ? void 0 : t(i, n, r)
  1823. }
  1824. if ('value' in o) return o.value
  1825. var l = o.get
  1826. if (void 0 !== l) return l.call(r)
  1827. },
  1828. s = n(0),
  1829. u = (function(t) {
  1830. return t && t.__esModule ? t : { default: t }
  1831. })(s),
  1832. c = (function(t) {
  1833. function e() {
  1834. return r(this, e), o(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments))
  1835. }
  1836. return (
  1837. i(e, t),
  1838. l(
  1839. e,
  1840. [
  1841. {
  1842. key: 'insertInto',
  1843. value: function(t, n) {
  1844. 0 === t.children.length ? a(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'insertInto', this).call(this, t, n) : this.remove()
  1845. }
  1846. },
  1847. {
  1848. key: 'length',
  1849. value: function() {
  1850. return 0
  1851. }
  1852. },
  1853. {
  1854. key: 'value',
  1855. value: function() {
  1856. return ''
  1857. }
  1858. }
  1859. ],
  1860. [{ key: 'value', value: function() {} }]
  1861. ),
  1862. e
  1863. )
  1864. })(u.default.Embed)
  1865. ;(c.blotName = 'break'), (c.tagName = 'BR'), (e.default = c)
  1866. },
  1867. function(t, e, n) {
  1868. 'use strict'
  1869. function r(t, e) {
  1870. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  1871. }
  1872. function o(t, e) {
  1873. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  1874. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  1875. }
  1876. function i(t, e) {
  1877. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  1878. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  1879. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  1880. }
  1881. function l(t, e) {
  1882. var n = document.createElement('a')
  1883. n.href = t
  1884. var r = n.href.slice(0, n.href.indexOf(':'))
  1885. return e.indexOf(r) > -1
  1886. }
  1887. Object.defineProperty(e, '__esModule', { value: !0 }), (e.sanitize = e.default = void 0)
  1888. var a = (function() {
  1889. function t(t, e) {
  1890. for (var n = 0; n < e.length; n++) {
  1891. var r = e[n]
  1892. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  1893. }
  1894. }
  1895. return function(e, n, r) {
  1896. return n && t(e.prototype, n), r && t(e, r), e
  1897. }
  1898. })(),
  1899. s = function t(e, n, r) {
  1900. null === e && (e = Function.prototype)
  1901. var o = Object.getOwnPropertyDescriptor(e, n)
  1902. if (void 0 === o) {
  1903. var i = Object.getPrototypeOf(e)
  1904. return null === i ? void 0 : t(i, n, r)
  1905. }
  1906. if ('value' in o) return o.value
  1907. var l = o.get
  1908. if (void 0 !== l) return l.call(r)
  1909. },
  1910. u = n(5),
  1911. c = (function(t) {
  1912. return t && t.__esModule ? t : { default: t }
  1913. })(u),
  1914. f = (function(t) {
  1915. function e() {
  1916. return r(this, e), o(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments))
  1917. }
  1918. return (
  1919. i(e, t),
  1920. a(
  1921. e,
  1922. [
  1923. {
  1924. key: 'format',
  1925. value: function(t, n) {
  1926. if (t !== this.statics.blotName || !n) return s(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'format', this).call(this, t, n)
  1927. ;(n = this.constructor.sanitize(n)), this.domNode.setAttribute('href', n)
  1928. }
  1929. }
  1930. ],
  1931. [
  1932. {
  1933. key: 'create',
  1934. value: function(t) {
  1935. var n = s(e.__proto__ || Object.getPrototypeOf(e), 'create', this).call(this, t)
  1936. return (t = this.sanitize(t)), n.setAttribute('href', t), n.setAttribute('target', '_blank'), n
  1937. }
  1938. },
  1939. {
  1940. key: 'formats',
  1941. value: function(t) {
  1942. return t.getAttribute('href')
  1943. }
  1944. },
  1945. {
  1946. key: 'sanitize',
  1947. value: function(t) {
  1948. return l(t, this.PROTOCOL_WHITELIST) ? t : this.SANITIZED_URL
  1949. }
  1950. }
  1951. ]
  1952. ),
  1953. e
  1954. )
  1955. })(c.default)
  1956. ;(f.blotName = 'link'), (f.tagName = 'A'), (f.SANITIZED_URL = 'about:blank'), (f.PROTOCOL_WHITELIST = ['http', 'https', 'mailto', 'tel']), (e.default = f), (e.sanitize = l)
  1957. },
  1958. function(t, e, n) {
  1959. 'use strict'
  1960. function r(t) {
  1961. return t && t.__esModule ? t : { default: t }
  1962. }
  1963. function o(t, e) {
  1964. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  1965. }
  1966. function i(t, e) {
  1967. t.setAttribute(e, !('true' === t.getAttribute(e)))
  1968. }
  1969. Object.defineProperty(e, '__esModule', { value: !0 })
  1970. var l =
  1971. 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator
  1972. ? function(t) {
  1973. return typeof t
  1974. }
  1975. : function(t) {
  1976. return t && 'function' == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? 'symbol' : typeof t
  1977. },
  1978. a = (function() {
  1979. function t(t, e) {
  1980. for (var n = 0; n < e.length; n++) {
  1981. var r = e[n]
  1982. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  1983. }
  1984. }
  1985. return function(e, n, r) {
  1986. return n && t(e.prototype, n), r && t(e, r), e
  1987. }
  1988. })(),
  1989. s = n(25),
  1990. u = r(s),
  1991. c = n(106),
  1992. f = r(c),
  1993. h = 0,
  1994. p = (function() {
  1995. function t(e) {
  1996. var n = this
  1997. o(this, t),
  1998. (this.select = e),
  1999. (this.container = document.createElement('span')),
  2000. this.buildPicker(),
  2001. (this.select.style.display = 'none'),
  2002. this.select.parentNode.insertBefore(this.container, this.select),
  2003. this.label.addEventListener('mousedown', function() {
  2004. n.togglePicker()
  2005. }),
  2006. this.label.addEventListener('keydown', function(t) {
  2007. switch (t.keyCode) {
  2008. case u.default.keys.ENTER:
  2009. n.togglePicker()
  2010. break
  2011. case u.default.keys.ESCAPE:
  2012. n.escape(), t.preventDefault()
  2013. }
  2014. }),
  2015. this.select.addEventListener('change', this.update.bind(this))
  2016. }
  2017. return (
  2018. a(t, [
  2019. {
  2020. key: 'togglePicker',
  2021. value: function() {
  2022. this.container.classList.toggle('ql-expanded'), i(this.label, 'aria-expanded'), i(this.options, 'aria-hidden')
  2023. }
  2024. },
  2025. {
  2026. key: 'buildItem',
  2027. value: function(t) {
  2028. var e = this,
  2029. n = document.createElement('span')
  2030. return (
  2031. (n.tabIndex = '0'),
  2032. n.setAttribute('role', 'button'),
  2033. n.classList.add('ql-picker-item'),
  2034. t.hasAttribute('value') && n.setAttribute('data-value', t.getAttribute('value')),
  2035. t.textContent && n.setAttribute('data-label', t.textContent),
  2036. n.addEventListener('click', function() {
  2037. e.selectItem(n, !0)
  2038. }),
  2039. n.addEventListener('keydown', function(t) {
  2040. switch (t.keyCode) {
  2041. case u.default.keys.ENTER:
  2042. e.selectItem(n, !0), t.preventDefault()
  2043. break
  2044. case u.default.keys.ESCAPE:
  2045. e.escape(), t.preventDefault()
  2046. }
  2047. }),
  2048. n
  2049. )
  2050. }
  2051. },
  2052. {
  2053. key: 'buildLabel',
  2054. value: function() {
  2055. var t = document.createElement('span')
  2056. return (
  2057. t.classList.add('ql-picker-label'),
  2058. (t.innerHTML = f.default),
  2059. (t.tabIndex = '0'),
  2060. t.setAttribute('role', 'button'),
  2061. t.setAttribute('aria-expanded', 'false'),
  2062. this.container.appendChild(t),
  2063. t
  2064. )
  2065. }
  2066. },
  2067. {
  2068. key: 'buildOptions',
  2069. value: function() {
  2070. var t = this,
  2071. e = document.createElement('span')
  2072. e.classList.add('ql-picker-options'),
  2073. e.setAttribute('aria-hidden', 'true'),
  2074. (e.tabIndex = '-1'),
  2075. (e.id = 'ql-picker-options-' + h),
  2076. (h += 1),
  2077. this.label.setAttribute('aria-controls', e.id),
  2078. (this.options = e),
  2079. [].slice.call(this.select.options).forEach(function(n) {
  2080. var r = t.buildItem(n)
  2081. e.appendChild(r), !0 === n.selected && t.selectItem(r)
  2082. }),
  2083. this.container.appendChild(e)
  2084. }
  2085. },
  2086. {
  2087. key: 'buildPicker',
  2088. value: function() {
  2089. var t = this
  2090. ;[].slice.call(this.select.attributes).forEach(function(e) {
  2091. t.container.setAttribute(e.name, e.value)
  2092. }),
  2093. this.container.classList.add('ql-picker'),
  2094. (this.label = this.buildLabel()),
  2095. this.buildOptions()
  2096. }
  2097. },
  2098. {
  2099. key: 'escape',
  2100. value: function() {
  2101. var t = this
  2102. this.close(),
  2103. setTimeout(function() {
  2104. return t.label.focus()
  2105. }, 1)
  2106. }
  2107. },
  2108. {
  2109. key: 'close',
  2110. value: function() {
  2111. this.container.classList.remove('ql-expanded'), this.label.setAttribute('aria-expanded', 'false'), this.options.setAttribute('aria-hidden', 'true')
  2112. }
  2113. },
  2114. {
  2115. key: 'selectItem',
  2116. value: function(t) {
  2117. var e = arguments.length > 1 && void 0 !== arguments[1] && arguments[1],
  2118. n = this.container.querySelector('.ql-selected')
  2119. if (
  2120. t !== n &&
  2121. (null != n && n.classList.remove('ql-selected'),
  2122. null != t &&
  2123. (t.classList.add('ql-selected'),
  2124. (this.select.selectedIndex = [].indexOf.call(t.parentNode.children, t)),
  2125. t.hasAttribute('data-value') ? this.label.setAttribute('data-value', t.getAttribute('data-value')) : this.label.removeAttribute('data-value'),
  2126. t.hasAttribute('data-label') ? this.label.setAttribute('data-label', t.getAttribute('data-label')) : this.label.removeAttribute('data-label'),
  2127. e))
  2128. ) {
  2129. if ('function' == typeof Event) this.select.dispatchEvent(new Event('change'))
  2130. else if ('object' === ('undefined' == typeof Event ? 'undefined' : l(Event))) {
  2131. var r = document.createEvent('Event')
  2132. r.initEvent('change', !0, !0), this.select.dispatchEvent(r)
  2133. }
  2134. this.close()
  2135. }
  2136. }
  2137. },
  2138. {
  2139. key: 'update',
  2140. value: function() {
  2141. var t = void 0
  2142. if (this.select.selectedIndex > -1) {
  2143. var e = this.container.querySelector('.ql-picker-options').children[this.select.selectedIndex]
  2144. ;(t = this.select.options[this.select.selectedIndex]), this.selectItem(e)
  2145. } else this.selectItem(null)
  2146. var n = null != t && t !== this.select.querySelector('option[selected]')
  2147. this.label.classList.toggle('ql-active', n)
  2148. }
  2149. }
  2150. ]),
  2151. t
  2152. )
  2153. })()
  2154. e.default = p
  2155. },
  2156. function(t, e, n) {
  2157. 'use strict'
  2158. function r(t) {
  2159. var e = a.find(t)
  2160. if (null == e)
  2161. try {
  2162. e = a.create(t)
  2163. } catch (n) {
  2164. ;(e = a.create(a.Scope.INLINE)),
  2165. [].slice.call(t.childNodes).forEach(function(t) {
  2166. e.domNode.appendChild(t)
  2167. }),
  2168. t.parentNode && t.parentNode.replaceChild(e.domNode, t),
  2169. e.attach()
  2170. }
  2171. return e
  2172. }
  2173. var o =
  2174. (this && this.__extends) ||
  2175. (function() {
  2176. var t =
  2177. Object.setPrototypeOf ||
  2178. ({ __proto__: [] } instanceof Array &&
  2179. function(t, e) {
  2180. t.__proto__ = e
  2181. }) ||
  2182. function(t, e) {
  2183. for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n])
  2184. }
  2185. return function(e, n) {
  2186. function r() {
  2187. this.constructor = e
  2188. }
  2189. t(e, n), (e.prototype = null === n ? Object.create(n) : ((r.prototype = n.prototype), new r()))
  2190. }
  2191. })()
  2192. Object.defineProperty(e, '__esModule', { value: !0 })
  2193. var i = n(47),
  2194. l = n(27),
  2195. a = n(1),
  2196. s = (function(t) {
  2197. function e(e) {
  2198. var n = t.call(this, e) || this
  2199. return n.build(), n
  2200. }
  2201. return (
  2202. o(e, t),
  2203. (e.prototype.appendChild = function(t) {
  2204. this.insertBefore(t)
  2205. }),
  2206. (e.prototype.attach = function() {
  2207. t.prototype.attach.call(this),
  2208. this.children.forEach(function(t) {
  2209. t.attach()
  2210. })
  2211. }),
  2212. (e.prototype.build = function() {
  2213. var t = this
  2214. ;(this.children = new i.default()),
  2215. [].slice
  2216. .call(this.domNode.childNodes)
  2217. .reverse()
  2218. .forEach(function(e) {
  2219. try {
  2220. var n = r(e)
  2221. t.insertBefore(n, t.children.head || void 0)
  2222. } catch (t) {
  2223. if (t instanceof a.ParchmentError) return
  2224. throw t
  2225. }
  2226. })
  2227. }),
  2228. (e.prototype.deleteAt = function(t, e) {
  2229. if (0 === t && e === this.length()) return this.remove()
  2230. this.children.forEachAt(t, e, function(t, e, n) {
  2231. t.deleteAt(e, n)
  2232. })
  2233. }),
  2234. (e.prototype.descendant = function(t, n) {
  2235. var r = this.children.find(n),
  2236. o = r[0],
  2237. i = r[1]
  2238. return (null == t.blotName && t(o)) || (null != t.blotName && o instanceof t) ? [o, i] : o instanceof e ? o.descendant(t, i) : [null, -1]
  2239. }),
  2240. (e.prototype.descendants = function(t, n, r) {
  2241. void 0 === n && (n = 0), void 0 === r && (r = Number.MAX_VALUE)
  2242. var o = [],
  2243. i = r
  2244. return (
  2245. this.children.forEachAt(n, r, function(n, r, l) {
  2246. ;((null == t.blotName && t(n)) || (null != t.blotName && n instanceof t)) && o.push(n), n instanceof e && (o = o.concat(n.descendants(t, r, i))), (i -= l)
  2247. }),
  2248. o
  2249. )
  2250. }),
  2251. (e.prototype.detach = function() {
  2252. this.children.forEach(function(t) {
  2253. t.detach()
  2254. }),
  2255. t.prototype.detach.call(this)
  2256. }),
  2257. (e.prototype.formatAt = function(t, e, n, r) {
  2258. this.children.forEachAt(t, e, function(t, e, o) {
  2259. t.formatAt(e, o, n, r)
  2260. })
  2261. }),
  2262. (e.prototype.insertAt = function(t, e, n) {
  2263. var r = this.children.find(t),
  2264. o = r[0],
  2265. i = r[1]
  2266. if (o) o.insertAt(i, e, n)
  2267. else {
  2268. var l = null == n ? a.create('text', e) : a.create(e, n)
  2269. this.appendChild(l)
  2270. }
  2271. }),
  2272. (e.prototype.insertBefore = function(t, e) {
  2273. if (
  2274. null != this.statics.allowedChildren &&
  2275. !this.statics.allowedChildren.some(function(e) {
  2276. return t instanceof e
  2277. })
  2278. )
  2279. throw new a.ParchmentError('Cannot insert ' + t.statics.blotName + ' into ' + this.statics.blotName)
  2280. t.insertInto(this, e)
  2281. }),
  2282. (e.prototype.length = function() {
  2283. return this.children.reduce(function(t, e) {
  2284. return t + e.length()
  2285. }, 0)
  2286. }),
  2287. (e.prototype.moveChildren = function(t, e) {
  2288. this.children.forEach(function(n) {
  2289. t.insertBefore(n, e)
  2290. })
  2291. }),
  2292. (e.prototype.optimize = function(e) {
  2293. if ((t.prototype.optimize.call(this, e), 0 === this.children.length))
  2294. if (null != this.statics.defaultChild) {
  2295. var n = a.create(this.statics.defaultChild)
  2296. this.appendChild(n), n.optimize(e)
  2297. } else this.remove()
  2298. }),
  2299. (e.prototype.path = function(t, n) {
  2300. void 0 === n && (n = !1)
  2301. var r = this.children.find(t, n),
  2302. o = r[0],
  2303. i = r[1],
  2304. l = [[this, t]]
  2305. return o instanceof e ? l.concat(o.path(i, n)) : (null != o && l.push([o, i]), l)
  2306. }),
  2307. (e.prototype.removeChild = function(t) {
  2308. this.children.remove(t)
  2309. }),
  2310. (e.prototype.replace = function(n) {
  2311. n instanceof e && n.moveChildren(this), t.prototype.replace.call(this, n)
  2312. }),
  2313. (e.prototype.split = function(t, e) {
  2314. if ((void 0 === e && (e = !1), !e)) {
  2315. if (0 === t) return this
  2316. if (t === this.length()) return this.next
  2317. }
  2318. var n = this.clone()
  2319. return (
  2320. this.parent.insertBefore(n, this.next),
  2321. this.children.forEachAt(t, this.length(), function(t, r, o) {
  2322. ;(t = t.split(r, e)), n.appendChild(t)
  2323. }),
  2324. n
  2325. )
  2326. }),
  2327. (e.prototype.unwrap = function() {
  2328. this.moveChildren(this.parent, this.next), this.remove()
  2329. }),
  2330. (e.prototype.update = function(t, e) {
  2331. var n = this,
  2332. o = [],
  2333. i = []
  2334. t.forEach(function(t) {
  2335. t.target === n.domNode && 'childList' === t.type && (o.push.apply(o, t.addedNodes), i.push.apply(i, t.removedNodes))
  2336. }),
  2337. i.forEach(function(t) {
  2338. if (!(null != t.parentNode && 'IFRAME' !== t.tagName && document.body.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_CONTAINED_BY)) {
  2339. var e = a.find(t)
  2340. null != e && ((null != e.domNode.parentNode && e.domNode.parentNode !== n.domNode) || e.detach())
  2341. }
  2342. }),
  2343. o
  2344. .filter(function(t) {
  2345. return t.parentNode == n.domNode
  2346. })
  2347. .sort(function(t, e) {
  2348. return t === e ? 0 : t.compareDocumentPosition(e) & Node.DOCUMENT_POSITION_FOLLOWING ? 1 : -1
  2349. })
  2350. .forEach(function(t) {
  2351. var e = null
  2352. null != t.nextSibling && (e = a.find(t.nextSibling))
  2353. var o = r(t)
  2354. ;(o.next == e && null != o.next) || (null != o.parent && o.parent.removeChild(n), n.insertBefore(o, e || void 0))
  2355. })
  2356. }),
  2357. e
  2358. )
  2359. })(l.default)
  2360. e.default = s
  2361. },
  2362. function(t, e, n) {
  2363. 'use strict'
  2364. var r =
  2365. (this && this.__extends) ||
  2366. (function() {
  2367. var t =
  2368. Object.setPrototypeOf ||
  2369. ({ __proto__: [] } instanceof Array &&
  2370. function(t, e) {
  2371. t.__proto__ = e
  2372. }) ||
  2373. function(t, e) {
  2374. for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n])
  2375. }
  2376. return function(e, n) {
  2377. function r() {
  2378. this.constructor = e
  2379. }
  2380. t(e, n), (e.prototype = null === n ? Object.create(n) : ((r.prototype = n.prototype), new r()))
  2381. }
  2382. })()
  2383. Object.defineProperty(e, '__esModule', { value: !0 })
  2384. var o = n(11),
  2385. i = n(28),
  2386. l = n(17),
  2387. a = n(1),
  2388. s = (function(t) {
  2389. function e(e) {
  2390. var n = t.call(this, e) || this
  2391. return (n.attributes = new i.default(n.domNode)), n
  2392. }
  2393. return (
  2394. r(e, t),
  2395. (e.formats = function(t) {
  2396. return 'string' == typeof this.tagName || (Array.isArray(this.tagName) ? t.tagName.toLowerCase() : void 0)
  2397. }),
  2398. (e.prototype.format = function(t, e) {
  2399. var n = a.query(t)
  2400. n instanceof o.default ? this.attributes.attribute(n, e) : e && (null == n || (t === this.statics.blotName && this.formats()[t] === e) || this.replaceWith(t, e))
  2401. }),
  2402. (e.prototype.formats = function() {
  2403. var t = this.attributes.values(),
  2404. e = this.statics.formats(this.domNode)
  2405. return null != e && (t[this.statics.blotName] = e), t
  2406. }),
  2407. (e.prototype.replaceWith = function(e, n) {
  2408. var r = t.prototype.replaceWith.call(this, e, n)
  2409. return this.attributes.copy(r), r
  2410. }),
  2411. (e.prototype.update = function(e, n) {
  2412. var r = this
  2413. t.prototype.update.call(this, e, n),
  2414. e.some(function(t) {
  2415. return t.target === r.domNode && 'attributes' === t.type
  2416. }) && this.attributes.build()
  2417. }),
  2418. (e.prototype.wrap = function(n, r) {
  2419. var o = t.prototype.wrap.call(this, n, r)
  2420. return o instanceof e && o.statics.scope === this.statics.scope && this.attributes.move(o), o
  2421. }),
  2422. e
  2423. )
  2424. })(l.default)
  2425. e.default = s
  2426. },
  2427. function(t, e, n) {
  2428. 'use strict'
  2429. var r =
  2430. (this && this.__extends) ||
  2431. (function() {
  2432. var t =
  2433. Object.setPrototypeOf ||
  2434. ({ __proto__: [] } instanceof Array &&
  2435. function(t, e) {
  2436. t.__proto__ = e
  2437. }) ||
  2438. function(t, e) {
  2439. for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n])
  2440. }
  2441. return function(e, n) {
  2442. function r() {
  2443. this.constructor = e
  2444. }
  2445. t(e, n), (e.prototype = null === n ? Object.create(n) : ((r.prototype = n.prototype), new r()))
  2446. }
  2447. })()
  2448. Object.defineProperty(e, '__esModule', { value: !0 })
  2449. var o = n(27),
  2450. i = n(1),
  2451. l = (function(t) {
  2452. function e() {
  2453. return (null !== t && t.apply(this, arguments)) || this
  2454. }
  2455. return (
  2456. r(e, t),
  2457. (e.value = function(t) {
  2458. return !0
  2459. }),
  2460. (e.prototype.index = function(t, e) {
  2461. return this.domNode === t || this.domNode.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_CONTAINED_BY ? Math.min(e, 1) : -1
  2462. }),
  2463. (e.prototype.position = function(t, e) {
  2464. var n = [].indexOf.call(this.parent.domNode.childNodes, this.domNode)
  2465. return t > 0 && (n += 1), [this.parent.domNode, n]
  2466. }),
  2467. (e.prototype.value = function() {
  2468. return (t = {}), (t[this.statics.blotName] = this.statics.value(this.domNode) || !0), t
  2469. var t
  2470. }),
  2471. (e.scope = i.Scope.INLINE_BLOT),
  2472. e
  2473. )
  2474. })(o.default)
  2475. e.default = l
  2476. },
  2477. function(t, e, n) {
  2478. function r(t) {
  2479. ;(this.ops = t), (this.index = 0), (this.offset = 0)
  2480. }
  2481. var o = n(12),
  2482. i = n(2),
  2483. l = {
  2484. attributes: {
  2485. compose: function(t, e, n) {
  2486. 'object' != typeof t && (t = {}), 'object' != typeof e && (e = {})
  2487. var r = i(!0, {}, e)
  2488. n ||
  2489. (r = Object.keys(r).reduce(function(t, e) {
  2490. return null != r[e] && (t[e] = r[e]), t
  2491. }, {}))
  2492. for (var o in t) void 0 !== t[o] && void 0 === e[o] && (r[o] = t[o])
  2493. return Object.keys(r).length > 0 ? r : void 0
  2494. },
  2495. diff: function(t, e) {
  2496. 'object' != typeof t && (t = {}), 'object' != typeof e && (e = {})
  2497. var n = Object.keys(t)
  2498. .concat(Object.keys(e))
  2499. .reduce(function(n, r) {
  2500. return o(t[r], e[r]) || (n[r] = void 0 === e[r] ? null : e[r]), n
  2501. }, {})
  2502. return Object.keys(n).length > 0 ? n : void 0
  2503. },
  2504. transform: function(t, e, n) {
  2505. if ('object' != typeof t) return e
  2506. if ('object' == typeof e) {
  2507. if (!n) return e
  2508. var r = Object.keys(e).reduce(function(n, r) {
  2509. return void 0 === t[r] && (n[r] = e[r]), n
  2510. }, {})
  2511. return Object.keys(r).length > 0 ? r : void 0
  2512. }
  2513. }
  2514. },
  2515. iterator: function(t) {
  2516. return new r(t)
  2517. },
  2518. length: function(t) {
  2519. return 'number' == typeof t.delete ? t.delete : 'number' == typeof t.retain ? t.retain : 'string' == typeof t.insert ? t.insert.length : 1
  2520. }
  2521. }
  2522. ;(r.prototype.hasNext = function() {
  2523. return this.peekLength() < 1 / 0
  2524. }),
  2525. (r.prototype.next = function(t) {
  2526. t || (t = 1 / 0)
  2527. var e = this.ops[this.index]
  2528. if (e) {
  2529. var n = this.offset,
  2530. r = l.length(e)
  2531. if ((t >= r - n ? ((t = r - n), (this.index += 1), (this.offset = 0)) : (this.offset += t), 'number' == typeof e.delete)) return { delete: t }
  2532. var o = {}
  2533. return (
  2534. e.attributes && (o.attributes = e.attributes),
  2535. 'number' == typeof e.retain ? (o.retain = t) : 'string' == typeof e.insert ? (o.insert = e.insert.substr(n, t)) : (o.insert = e.insert),
  2536. o
  2537. )
  2538. }
  2539. return { retain: 1 / 0 }
  2540. }),
  2541. (r.prototype.peek = function() {
  2542. return this.ops[this.index]
  2543. }),
  2544. (r.prototype.peekLength = function() {
  2545. return this.ops[this.index] ? l.length(this.ops[this.index]) - this.offset : 1 / 0
  2546. }),
  2547. (r.prototype.peekType = function() {
  2548. return this.ops[this.index] ? ('number' == typeof this.ops[this.index].delete ? 'delete' : 'number' == typeof this.ops[this.index].retain ? 'retain' : 'insert') : 'retain'
  2549. }),
  2550. (t.exports = l)
  2551. },
  2552. function(t, e) {
  2553. var n = (function() {
  2554. 'use strict'
  2555. function t(t, e) {
  2556. return null != e && t instanceof e
  2557. }
  2558. function e(n, r, o, i, c) {
  2559. function f(n, o) {
  2560. if (null === n) return null
  2561. if (0 === o) return n
  2562. var y, v
  2563. if ('object' != typeof n) return n
  2564. if (t(n, a)) y = new a()
  2565. else if (t(n, s)) y = new s()
  2566. else if (t(n, u))
  2567. y = new u(function(t, e) {
  2568. n.then(
  2569. function(e) {
  2570. t(f(e, o - 1))
  2571. },
  2572. function(t) {
  2573. e(f(t, o - 1))
  2574. }
  2575. )
  2576. })
  2577. else if (e.__isArray(n)) y = []
  2578. else if (e.__isRegExp(n)) (y = new RegExp(n.source, l(n))), n.lastIndex && (y.lastIndex = n.lastIndex)
  2579. else if (e.__isDate(n)) y = new Date(n.getTime())
  2580. else {
  2581. if (d && Buffer.isBuffer(n)) return (y = new Buffer(n.length)), n.copy(y), y
  2582. t(n, Error) ? (y = Object.create(n)) : void 0 === i ? ((v = Object.getPrototypeOf(n)), (y = Object.create(v))) : ((y = Object.create(i)), (v = i))
  2583. }
  2584. if (r) {
  2585. var b = h.indexOf(n)
  2586. if (-1 != b) return p[b]
  2587. h.push(n), p.push(y)
  2588. }
  2589. t(n, a) &&
  2590. n.forEach(function(t, e) {
  2591. var n = f(e, o - 1),
  2592. r = f(t, o - 1)
  2593. y.set(n, r)
  2594. }),
  2595. t(n, s) &&
  2596. n.forEach(function(t) {
  2597. var e = f(t, o - 1)
  2598. y.add(e)
  2599. })
  2600. for (var g in n) {
  2601. var m
  2602. v && (m = Object.getOwnPropertyDescriptor(v, g)), (m && null == m.set) || (y[g] = f(n[g], o - 1))
  2603. }
  2604. if (Object.getOwnPropertySymbols)
  2605. for (var _ = Object.getOwnPropertySymbols(n), g = 0; g < _.length; g++) {
  2606. var O = _[g],
  2607. w = Object.getOwnPropertyDescriptor(n, O)
  2608. ;(!w || w.enumerable || c) && ((y[O] = f(n[O], o - 1)), w.enumerable || Object.defineProperty(y, O, { enumerable: !1 }))
  2609. }
  2610. if (c)
  2611. for (var x = Object.getOwnPropertyNames(n), g = 0; g < x.length; g++) {
  2612. var k = x[g],
  2613. w = Object.getOwnPropertyDescriptor(n, k)
  2614. ;(w && w.enumerable) || ((y[k] = f(n[k], o - 1)), Object.defineProperty(y, k, { enumerable: !1 }))
  2615. }
  2616. return y
  2617. }
  2618. 'object' == typeof r && ((o = r.depth), (i = r.prototype), (c = r.includeNonEnumerable), (r = r.circular))
  2619. var h = [],
  2620. p = [],
  2621. d = 'undefined' != typeof Buffer
  2622. return void 0 === r && (r = !0), void 0 === o && (o = 1 / 0), f(n, o)
  2623. }
  2624. function n(t) {
  2625. return Object.prototype.toString.call(t)
  2626. }
  2627. function r(t) {
  2628. return 'object' == typeof t && '[object Date]' === n(t)
  2629. }
  2630. function o(t) {
  2631. return 'object' == typeof t && '[object Array]' === n(t)
  2632. }
  2633. function i(t) {
  2634. return 'object' == typeof t && '[object RegExp]' === n(t)
  2635. }
  2636. function l(t) {
  2637. var e = ''
  2638. return t.global && (e += 'g'), t.ignoreCase && (e += 'i'), t.multiline && (e += 'm'), e
  2639. }
  2640. var a
  2641. try {
  2642. a = Map
  2643. } catch (t) {
  2644. a = function() {}
  2645. }
  2646. var s
  2647. try {
  2648. s = Set
  2649. } catch (t) {
  2650. s = function() {}
  2651. }
  2652. var u
  2653. try {
  2654. u = Promise
  2655. } catch (t) {
  2656. u = function() {}
  2657. }
  2658. return (
  2659. (e.clonePrototype = function(t) {
  2660. if (null === t) return null
  2661. var e = function() {}
  2662. return (e.prototype = t), new e()
  2663. }),
  2664. (e.__objToStr = n),
  2665. (e.__isDate = r),
  2666. (e.__isArray = o),
  2667. (e.__isRegExp = i),
  2668. (e.__getRegExpFlags = l),
  2669. e
  2670. )
  2671. })()
  2672. 'object' == typeof t && t.exports && (t.exports = n)
  2673. },
  2674. function(t, e, n) {
  2675. 'use strict'
  2676. function r(t) {
  2677. return t && t.__esModule ? t : { default: t }
  2678. }
  2679. function o(t) {
  2680. if (Array.isArray(t)) {
  2681. for (var e = 0, n = Array(t.length); e < t.length; e++) n[e] = t[e]
  2682. return n
  2683. }
  2684. return Array.from(t)
  2685. }
  2686. function i(t, e) {
  2687. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  2688. }
  2689. function l(t, e) {
  2690. try {
  2691. e.parentNode
  2692. } catch (t) {
  2693. return !1
  2694. }
  2695. return e instanceof Text && (e = e.parentNode), t.contains(e)
  2696. }
  2697. Object.defineProperty(e, '__esModule', { value: !0 }), (e.default = e.Range = void 0)
  2698. var a = (function() {
  2699. function t(t, e) {
  2700. var n = [],
  2701. r = !0,
  2702. o = !1,
  2703. i = void 0
  2704. try {
  2705. for (var l, a = t[Symbol.iterator](); !(r = (l = a.next()).done) && (n.push(l.value), !e || n.length !== e); r = !0);
  2706. } catch (t) {
  2707. ;(o = !0), (i = t)
  2708. } finally {
  2709. try {
  2710. !r && a.return && a.return()
  2711. } finally {
  2712. if (o) throw i
  2713. }
  2714. }
  2715. return n
  2716. }
  2717. return function(e, n) {
  2718. if (Array.isArray(e)) return e
  2719. if (Symbol.iterator in Object(e)) return t(e, n)
  2720. throw new TypeError('Invalid attempt to destructure non-iterable instance')
  2721. }
  2722. })(),
  2723. s = (function() {
  2724. function t(t, e) {
  2725. for (var n = 0; n < e.length; n++) {
  2726. var r = e[n]
  2727. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  2728. }
  2729. }
  2730. return function(e, n, r) {
  2731. return n && t(e.prototype, n), r && t(e, r), e
  2732. }
  2733. })(),
  2734. u = n(0),
  2735. c = r(u),
  2736. f = n(21),
  2737. h = r(f),
  2738. p = n(12),
  2739. d = r(p),
  2740. y = n(9),
  2741. v = r(y),
  2742. b = n(10),
  2743. g = r(b),
  2744. m = (0, g.default)('quill:selection'),
  2745. _ = function t(e) {
  2746. var n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0
  2747. i(this, t), (this.index = e), (this.length = n)
  2748. },
  2749. O = (function() {
  2750. function t(e, n) {
  2751. var r = this
  2752. i(this, t),
  2753. (this.emitter = n),
  2754. (this.scroll = e),
  2755. (this.composing = !1),
  2756. (this.mouseDown = !1),
  2757. (this.root = this.scroll.domNode),
  2758. (this.cursor = c.default.create('cursor', this)),
  2759. (this.lastRange = this.savedRange = new _(0, 0)),
  2760. this.handleComposition(),
  2761. this.handleDragging(),
  2762. this.emitter.listenDOM('selectionchange', document, function() {
  2763. r.mouseDown || setTimeout(r.update.bind(r, v.default.sources.USER), 1)
  2764. }),
  2765. this.emitter.on(v.default.events.EDITOR_CHANGE, function(t, e) {
  2766. t === v.default.events.TEXT_CHANGE && e.length() > 0 && r.update(v.default.sources.SILENT)
  2767. }),
  2768. this.emitter.on(v.default.events.SCROLL_BEFORE_UPDATE, function() {
  2769. if (r.hasFocus()) {
  2770. var t = r.getNativeRange()
  2771. null != t &&
  2772. t.start.node !== r.cursor.textNode &&
  2773. r.emitter.once(v.default.events.SCROLL_UPDATE, function() {
  2774. try {
  2775. r.setNativeRange(t.start.node, t.start.offset, t.end.node, t.end.offset)
  2776. } catch (t) {}
  2777. })
  2778. }
  2779. }),
  2780. this.emitter.on(v.default.events.SCROLL_OPTIMIZE, function(t, e) {
  2781. if (e.range) {
  2782. var n = e.range,
  2783. o = n.startNode,
  2784. i = n.startOffset,
  2785. l = n.endNode,
  2786. a = n.endOffset
  2787. r.setNativeRange(o, i, l, a)
  2788. }
  2789. }),
  2790. this.update(v.default.sources.SILENT)
  2791. }
  2792. return (
  2793. s(t, [
  2794. {
  2795. key: 'handleComposition',
  2796. value: function() {
  2797. var t = this
  2798. this.root.addEventListener('compositionstart', function() {
  2799. t.composing = !0
  2800. }),
  2801. this.root.addEventListener('compositionend', function() {
  2802. if (((t.composing = !1), t.cursor.parent)) {
  2803. var e = t.cursor.restore()
  2804. if (!e) return
  2805. setTimeout(function() {
  2806. t.setNativeRange(e.startNode, e.startOffset, e.endNode, e.endOffset)
  2807. }, 1)
  2808. }
  2809. })
  2810. }
  2811. },
  2812. {
  2813. key: 'handleDragging',
  2814. value: function() {
  2815. var t = this
  2816. this.emitter.listenDOM('mousedown', document.body, function() {
  2817. t.mouseDown = !0
  2818. }),
  2819. this.emitter.listenDOM('mouseup', document.body, function() {
  2820. ;(t.mouseDown = !1), t.update(v.default.sources.USER)
  2821. })
  2822. }
  2823. },
  2824. {
  2825. key: 'focus',
  2826. value: function() {
  2827. this.hasFocus() || (this.root.focus(), this.setRange(this.savedRange))
  2828. }
  2829. },
  2830. {
  2831. key: 'format',
  2832. value: function(t, e) {
  2833. if (null == this.scroll.whitelist || this.scroll.whitelist[t]) {
  2834. this.scroll.update()
  2835. var n = this.getNativeRange()
  2836. if (null != n && n.native.collapsed && !c.default.query(t, c.default.Scope.BLOCK)) {
  2837. if (n.start.node !== this.cursor.textNode) {
  2838. var r = c.default.find(n.start.node, !1)
  2839. if (null == r) return
  2840. if (r instanceof c.default.Leaf) {
  2841. var o = r.split(n.start.offset)
  2842. r.parent.insertBefore(this.cursor, o)
  2843. } else r.insertBefore(this.cursor, n.start.node)
  2844. this.cursor.attach()
  2845. }
  2846. this.cursor.format(t, e), this.scroll.optimize(), this.setNativeRange(this.cursor.textNode, this.cursor.textNode.data.length), this.update()
  2847. }
  2848. }
  2849. }
  2850. },
  2851. {
  2852. key: 'getBounds',
  2853. value: function(t) {
  2854. var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0,
  2855. n = this.scroll.length()
  2856. ;(t = Math.min(t, n - 1)), (e = Math.min(t + e, n - 1) - t)
  2857. var r = void 0,
  2858. o = this.scroll.leaf(t),
  2859. i = a(o, 2),
  2860. l = i[0],
  2861. s = i[1]
  2862. if (null == l) return null
  2863. var u = l.position(s, !0),
  2864. c = a(u, 2)
  2865. ;(r = c[0]), (s = c[1])
  2866. var f = document.createRange()
  2867. if (e > 0) {
  2868. f.setStart(r, s)
  2869. var h = this.scroll.leaf(t + e),
  2870. p = a(h, 2)
  2871. if (((l = p[0]), (s = p[1]), null == l)) return null
  2872. var d = l.position(s, !0),
  2873. y = a(d, 2)
  2874. return (r = y[0]), (s = y[1]), f.setEnd(r, s), f.getBoundingClientRect()
  2875. }
  2876. var v = 'left',
  2877. b = void 0
  2878. return (
  2879. r instanceof Text
  2880. ? (s < r.data.length ? (f.setStart(r, s), f.setEnd(r, s + 1)) : (f.setStart(r, s - 1), f.setEnd(r, s), (v = 'right')), (b = f.getBoundingClientRect()))
  2881. : ((b = l.domNode.getBoundingClientRect()), s > 0 && (v = 'right')),
  2882. { bottom: b.top + b.height, height: b.height, left: b[v], right: b[v], top: b.top, width: 0 }
  2883. )
  2884. }
  2885. },
  2886. {
  2887. key: 'getNativeRange',
  2888. value: function() {
  2889. var t = document.getSelection()
  2890. if (null == t || t.rangeCount <= 0) return null
  2891. var e = t.getRangeAt(0)
  2892. if (null == e) return null
  2893. var n = this.normalizeNative(e)
  2894. return m.info('getNativeRange', n), n
  2895. }
  2896. },
  2897. {
  2898. key: 'getRange',
  2899. value: function() {
  2900. var t = this.getNativeRange()
  2901. return null == t ? [null, null] : [this.normalizedToRange(t), t]
  2902. }
  2903. },
  2904. {
  2905. key: 'hasFocus',
  2906. value: function() {
  2907. return document.activeElement === this.root
  2908. }
  2909. },
  2910. {
  2911. key: 'normalizedToRange',
  2912. value: function(t) {
  2913. var e = this,
  2914. n = [[t.start.node, t.start.offset]]
  2915. t.native.collapsed || n.push([t.end.node, t.end.offset])
  2916. var r = n.map(function(t) {
  2917. var n = a(t, 2),
  2918. r = n[0],
  2919. o = n[1],
  2920. i = c.default.find(r, !0),
  2921. l = i.offset(e.scroll)
  2922. return 0 === o ? l : i instanceof c.default.Container ? l + i.length() : l + i.index(r, o)
  2923. }),
  2924. i = Math.min(Math.max.apply(Math, o(r)), this.scroll.length() - 1),
  2925. l = Math.min.apply(Math, [i].concat(o(r)))
  2926. return new _(l, i - l)
  2927. }
  2928. },
  2929. {
  2930. key: 'normalizeNative',
  2931. value: function(t) {
  2932. if (!l(this.root, t.startContainer) || (!t.collapsed && !l(this.root, t.endContainer))) return null
  2933. var e = { start: { node: t.startContainer, offset: t.startOffset }, end: { node: t.endContainer, offset: t.endOffset }, native: t }
  2934. return (
  2935. [e.start, e.end].forEach(function(t) {
  2936. for (var e = t.node, n = t.offset; !(e instanceof Text) && e.childNodes.length > 0; )
  2937. if (e.childNodes.length > n) (e = e.childNodes[n]), (n = 0)
  2938. else {
  2939. if (e.childNodes.length !== n) break
  2940. ;(e = e.lastChild), (n = e instanceof Text ? e.data.length : e.childNodes.length + 1)
  2941. }
  2942. ;(t.node = e), (t.offset = n)
  2943. }),
  2944. e
  2945. )
  2946. }
  2947. },
  2948. {
  2949. key: 'rangeToNative',
  2950. value: function(t) {
  2951. var e = this,
  2952. n = t.collapsed ? [t.index] : [t.index, t.index + t.length],
  2953. r = [],
  2954. o = this.scroll.length()
  2955. return (
  2956. n.forEach(function(t, n) {
  2957. t = Math.min(o - 1, t)
  2958. var i = void 0,
  2959. l = e.scroll.leaf(t),
  2960. s = a(l, 2),
  2961. u = s[0],
  2962. c = s[1],
  2963. f = u.position(c, 0 !== n),
  2964. h = a(f, 2)
  2965. ;(i = h[0]), (c = h[1]), r.push(i, c)
  2966. }),
  2967. r.length < 2 && (r = r.concat(r)),
  2968. r
  2969. )
  2970. }
  2971. },
  2972. {
  2973. key: 'scrollIntoView',
  2974. value: function(t) {
  2975. var e = this.lastRange
  2976. if (null != e) {
  2977. var n = this.getBounds(e.index, e.length)
  2978. if (null != n) {
  2979. var r = this.scroll.length() - 1,
  2980. o = this.scroll.line(Math.min(e.index, r)),
  2981. i = a(o, 1),
  2982. l = i[0],
  2983. s = l
  2984. if (e.length > 0) {
  2985. var u = this.scroll.line(Math.min(e.index + e.length, r))
  2986. s = a(u, 1)[0]
  2987. }
  2988. if (null != l && null != s) {
  2989. var c = t.getBoundingClientRect()
  2990. n.top < c.top ? (t.scrollTop -= c.top - n.top) : n.bottom > c.bottom && (t.scrollTop += n.bottom - c.bottom)
  2991. }
  2992. }
  2993. }
  2994. }
  2995. },
  2996. {
  2997. key: 'setNativeRange',
  2998. value: function(t, e) {
  2999. var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : t,
  3000. r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : e,
  3001. o = arguments.length > 4 && void 0 !== arguments[4] && arguments[4]
  3002. if ((m.info('setNativeRange', t, e, n, r), null == t || (null != this.root.parentNode && null != t.parentNode && null != n.parentNode))) {
  3003. var i = document.getSelection()
  3004. if (null != i)
  3005. if (null != t) {
  3006. this.hasFocus() || this.root.focus()
  3007. var l = (this.getNativeRange() || {}).native
  3008. if (null == l || o || t !== l.startContainer || e !== l.startOffset || n !== l.endContainer || r !== l.endOffset) {
  3009. 'BR' == t.tagName && ((e = [].indexOf.call(t.parentNode.childNodes, t)), (t = t.parentNode)),
  3010. 'BR' == n.tagName && ((r = [].indexOf.call(n.parentNode.childNodes, n)), (n = n.parentNode))
  3011. var a = document.createRange()
  3012. a.setStart(t, e), a.setEnd(n, r), i.removeAllRanges(), i.addRange(a)
  3013. }
  3014. } else i.removeAllRanges(), this.root.blur(), document.body.focus()
  3015. }
  3016. }
  3017. },
  3018. {
  3019. key: 'setRange',
  3020. value: function(t) {
  3021. var e = arguments.length > 1 && void 0 !== arguments[1] && arguments[1],
  3022. n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : v.default.sources.API
  3023. if (('string' == typeof e && ((n = e), (e = !1)), m.info('setRange', t), null != t)) {
  3024. var r = this.rangeToNative(t)
  3025. this.setNativeRange.apply(this, o(r).concat([e]))
  3026. } else this.setNativeRange(null)
  3027. this.update(n)
  3028. }
  3029. },
  3030. {
  3031. key: 'update',
  3032. value: function() {
  3033. var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : v.default.sources.USER,
  3034. e = this.lastRange,
  3035. n = this.getRange(),
  3036. r = a(n, 2),
  3037. o = r[0],
  3038. i = r[1]
  3039. if (((this.lastRange = o), null != this.lastRange && (this.savedRange = this.lastRange), !(0, d.default)(e, this.lastRange))) {
  3040. var l
  3041. !this.composing && null != i && i.native.collapsed && i.start.node !== this.cursor.textNode && this.cursor.restore()
  3042. var s = [v.default.events.SELECTION_CHANGE, (0, h.default)(this.lastRange), (0, h.default)(e), t]
  3043. if (((l = this.emitter).emit.apply(l, [v.default.events.EDITOR_CHANGE].concat(s)), t !== v.default.sources.SILENT)) {
  3044. var u
  3045. ;(u = this.emitter).emit.apply(u, s)
  3046. }
  3047. }
  3048. }
  3049. }
  3050. ]),
  3051. t
  3052. )
  3053. })()
  3054. ;(e.Range = _), (e.default = O)
  3055. },
  3056. function(t, e, n) {
  3057. 'use strict'
  3058. function r(t) {
  3059. return t && t.__esModule ? t : { default: t }
  3060. }
  3061. function o(t, e) {
  3062. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  3063. }
  3064. function i(t, e) {
  3065. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  3066. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  3067. }
  3068. function l(t, e) {
  3069. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  3070. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  3071. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  3072. }
  3073. Object.defineProperty(e, '__esModule', { value: !0 })
  3074. var a = n(0),
  3075. s = r(a),
  3076. u = n(3),
  3077. c = r(u),
  3078. f = (function(t) {
  3079. function e() {
  3080. return o(this, e), i(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments))
  3081. }
  3082. return l(e, t), e
  3083. })(s.default.Container)
  3084. ;(f.allowedChildren = [c.default, u.BlockEmbed, f]), (e.default = f)
  3085. },
  3086. function(t, e, n) {
  3087. 'use strict'
  3088. function r(t, e) {
  3089. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  3090. }
  3091. function o(t, e) {
  3092. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  3093. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  3094. }
  3095. function i(t, e) {
  3096. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  3097. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  3098. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  3099. }
  3100. Object.defineProperty(e, '__esModule', { value: !0 }), (e.ColorStyle = e.ColorClass = e.ColorAttributor = void 0)
  3101. var l = (function() {
  3102. function t(t, e) {
  3103. for (var n = 0; n < e.length; n++) {
  3104. var r = e[n]
  3105. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  3106. }
  3107. }
  3108. return function(e, n, r) {
  3109. return n && t(e.prototype, n), r && t(e, r), e
  3110. }
  3111. })(),
  3112. a = function t(e, n, r) {
  3113. null === e && (e = Function.prototype)
  3114. var o = Object.getOwnPropertyDescriptor(e, n)
  3115. if (void 0 === o) {
  3116. var i = Object.getPrototypeOf(e)
  3117. return null === i ? void 0 : t(i, n, r)
  3118. }
  3119. if ('value' in o) return o.value
  3120. var l = o.get
  3121. if (void 0 !== l) return l.call(r)
  3122. },
  3123. s = n(0),
  3124. u = (function(t) {
  3125. return t && t.__esModule ? t : { default: t }
  3126. })(s),
  3127. c = (function(t) {
  3128. function e() {
  3129. return r(this, e), o(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments))
  3130. }
  3131. return (
  3132. i(e, t),
  3133. l(e, [
  3134. {
  3135. key: 'value',
  3136. value: function(t) {
  3137. var n = a(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'value', this).call(this, t)
  3138. return n.startsWith('rgb(')
  3139. ? ((n = n.replace(/^[^\d]+/, '').replace(/[^\d]+$/, '')),
  3140. '#' +
  3141. n
  3142. .split(',')
  3143. .map(function(t) {
  3144. return ('00' + parseInt(t).toString(16)).slice(-2)
  3145. })
  3146. .join(''))
  3147. : n
  3148. }
  3149. }
  3150. ]),
  3151. e
  3152. )
  3153. })(u.default.Attributor.Style),
  3154. f = new u.default.Attributor.Class('color', 'ql-color', { scope: u.default.Scope.INLINE }),
  3155. h = new c('color', 'color', { scope: u.default.Scope.INLINE })
  3156. ;(e.ColorAttributor = c), (e.ColorClass = f), (e.ColorStyle = h)
  3157. },
  3158. function(t, e, n) {
  3159. 'use strict'
  3160. function r(t) {
  3161. return t && t.__esModule ? t : { default: t }
  3162. }
  3163. function o(t, e, n) {
  3164. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : (t[e] = n), t
  3165. }
  3166. function i(t, e) {
  3167. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  3168. }
  3169. function l(t, e) {
  3170. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  3171. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  3172. }
  3173. function a(t, e) {
  3174. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  3175. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  3176. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  3177. }
  3178. function s(t, e) {
  3179. var n,
  3180. r = t === D.keys.LEFT ? 'prefix' : 'suffix'
  3181. return (
  3182. (n = { key: t, shiftKey: e, altKey: null }),
  3183. o(n, r, /^$/),
  3184. o(n, 'handler', function(n) {
  3185. var r = n.index
  3186. t === D.keys.RIGHT && (r += n.length + 1)
  3187. var o = this.quill.getLeaf(r)
  3188. return (
  3189. !(b(o, 1)[0] instanceof T.default.Embed) ||
  3190. (t === D.keys.LEFT
  3191. ? e
  3192. ? this.quill.setSelection(n.index - 1, n.length + 1, S.default.sources.USER)
  3193. : this.quill.setSelection(n.index - 1, S.default.sources.USER)
  3194. : e
  3195. ? this.quill.setSelection(n.index, n.length + 1, S.default.sources.USER)
  3196. : this.quill.setSelection(n.index + n.length + 1, S.default.sources.USER),
  3197. !1)
  3198. )
  3199. }),
  3200. n
  3201. )
  3202. }
  3203. function u(t, e) {
  3204. if (!(0 === t.index || this.quill.getLength() <= 1)) {
  3205. var n = this.quill.getLine(t.index),
  3206. r = b(n, 1),
  3207. o = r[0],
  3208. i = {}
  3209. if (0 === e.offset) {
  3210. var l = this.quill.getLine(t.index - 1),
  3211. a = b(l, 1),
  3212. s = a[0]
  3213. if (null != s && s.length() > 1) {
  3214. var u = o.formats(),
  3215. c = this.quill.getFormat(t.index - 1, 1)
  3216. i = A.default.attributes.diff(u, c) || {}
  3217. }
  3218. }
  3219. var f = /[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix) ? 2 : 1
  3220. this.quill.deleteText(t.index - f, f, S.default.sources.USER), Object.keys(i).length > 0 && this.quill.formatLine(t.index - f, f, i, S.default.sources.USER), this.quill.focus()
  3221. }
  3222. }
  3223. function c(t, e) {
  3224. var n = /^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix) ? 2 : 1
  3225. if (!(t.index >= this.quill.getLength() - n)) {
  3226. var r = {},
  3227. o = 0,
  3228. i = this.quill.getLine(t.index),
  3229. l = b(i, 1),
  3230. a = l[0]
  3231. if (e.offset >= a.length() - 1) {
  3232. var s = this.quill.getLine(t.index + 1),
  3233. u = b(s, 1),
  3234. c = u[0]
  3235. if (c) {
  3236. var f = a.formats(),
  3237. h = this.quill.getFormat(t.index, 1)
  3238. ;(r = A.default.attributes.diff(f, h) || {}), (o = c.length())
  3239. }
  3240. }
  3241. this.quill.deleteText(t.index, n, S.default.sources.USER), Object.keys(r).length > 0 && this.quill.formatLine(t.index + o - 1, n, r, S.default.sources.USER)
  3242. }
  3243. }
  3244. function f(t) {
  3245. var e = this.quill.getLines(t),
  3246. n = {}
  3247. if (e.length > 1) {
  3248. var r = e[0].formats(),
  3249. o = e[e.length - 1].formats()
  3250. n = A.default.attributes.diff(o, r) || {}
  3251. }
  3252. this.quill.deleteText(t, S.default.sources.USER),
  3253. Object.keys(n).length > 0 && this.quill.formatLine(t.index, 1, n, S.default.sources.USER),
  3254. this.quill.setSelection(t.index, S.default.sources.SILENT),
  3255. this.quill.focus()
  3256. }
  3257. function h(t, e) {
  3258. var n = this
  3259. t.length > 0 && this.quill.scroll.deleteAt(t.index, t.length)
  3260. var r = Object.keys(e.format).reduce(function(t, n) {
  3261. return T.default.query(n, T.default.Scope.BLOCK) && !Array.isArray(e.format[n]) && (t[n] = e.format[n]), t
  3262. }, {})
  3263. this.quill.insertText(t.index, '\n', r, S.default.sources.USER),
  3264. this.quill.setSelection(t.index + 1, S.default.sources.SILENT),
  3265. this.quill.focus(),
  3266. Object.keys(e.format).forEach(function(t) {
  3267. null == r[t] && (Array.isArray(e.format[t]) || ('link' !== t && n.quill.format(t, e.format[t], S.default.sources.USER)))
  3268. })
  3269. }
  3270. function p(t) {
  3271. return {
  3272. key: D.keys.TAB,
  3273. shiftKey: !t,
  3274. format: { 'code-block': !0 },
  3275. handler: function(e) {
  3276. var n = T.default.query('code-block'),
  3277. r = e.index,
  3278. o = e.length,
  3279. i = this.quill.scroll.descendant(n, r),
  3280. l = b(i, 2),
  3281. a = l[0],
  3282. s = l[1]
  3283. if (null != a) {
  3284. var u = this.quill.getIndex(a),
  3285. c = a.newlineIndex(s, !0) + 1,
  3286. f = a.newlineIndex(u + s + o),
  3287. h = a.domNode.textContent.slice(c, f).split('\n')
  3288. ;(s = 0),
  3289. h.forEach(function(e, i) {
  3290. t
  3291. ? (a.insertAt(c + s, n.TAB), (s += n.TAB.length), 0 === i ? (r += n.TAB.length) : (o += n.TAB.length))
  3292. : e.startsWith(n.TAB) && (a.deleteAt(c + s, n.TAB.length), (s -= n.TAB.length), 0 === i ? (r -= n.TAB.length) : (o -= n.TAB.length)),
  3293. (s += e.length + 1)
  3294. }),
  3295. this.quill.update(S.default.sources.USER),
  3296. this.quill.setSelection(r, o, S.default.sources.SILENT)
  3297. }
  3298. }
  3299. }
  3300. }
  3301. function d(t) {
  3302. return {
  3303. key: t[0].toUpperCase(),
  3304. shortKey: !0,
  3305. handler: function(e, n) {
  3306. this.quill.format(t, !n.format[t], S.default.sources.USER)
  3307. }
  3308. }
  3309. }
  3310. function y(t) {
  3311. if ('string' == typeof t || 'number' == typeof t) return y({ key: t })
  3312. if (('object' === (void 0 === t ? 'undefined' : v(t)) && (t = (0, _.default)(t, !1)), 'string' == typeof t.key))
  3313. if (null != D.keys[t.key.toUpperCase()]) t.key = D.keys[t.key.toUpperCase()]
  3314. else {
  3315. if (1 !== t.key.length) return null
  3316. t.key = t.key.toUpperCase().charCodeAt(0)
  3317. }
  3318. return t.shortKey && ((t[B] = t.shortKey), delete t.shortKey), t
  3319. }
  3320. Object.defineProperty(e, '__esModule', { value: !0 }), (e.SHORTKEY = e.default = void 0)
  3321. var v =
  3322. 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator
  3323. ? function(t) {
  3324. return typeof t
  3325. }
  3326. : function(t) {
  3327. return t && 'function' == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? 'symbol' : typeof t
  3328. },
  3329. b = (function() {
  3330. function t(t, e) {
  3331. var n = [],
  3332. r = !0,
  3333. o = !1,
  3334. i = void 0
  3335. try {
  3336. for (var l, a = t[Symbol.iterator](); !(r = (l = a.next()).done) && (n.push(l.value), !e || n.length !== e); r = !0);
  3337. } catch (t) {
  3338. ;(o = !0), (i = t)
  3339. } finally {
  3340. try {
  3341. !r && a.return && a.return()
  3342. } finally {
  3343. if (o) throw i
  3344. }
  3345. }
  3346. return n
  3347. }
  3348. return function(e, n) {
  3349. if (Array.isArray(e)) return e
  3350. if (Symbol.iterator in Object(e)) return t(e, n)
  3351. throw new TypeError('Invalid attempt to destructure non-iterable instance')
  3352. }
  3353. })(),
  3354. g = (function() {
  3355. function t(t, e) {
  3356. for (var n = 0; n < e.length; n++) {
  3357. var r = e[n]
  3358. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  3359. }
  3360. }
  3361. return function(e, n, r) {
  3362. return n && t(e.prototype, n), r && t(e, r), e
  3363. }
  3364. })(),
  3365. m = n(21),
  3366. _ = r(m),
  3367. O = n(12),
  3368. w = r(O),
  3369. x = n(2),
  3370. k = r(x),
  3371. E = n(4),
  3372. N = r(E),
  3373. j = n(20),
  3374. A = r(j),
  3375. q = n(0),
  3376. T = r(q),
  3377. P = n(6),
  3378. S = r(P),
  3379. C = n(10),
  3380. L = r(C),
  3381. M = n(7),
  3382. R = r(M),
  3383. I = (0, L.default)('quill:keyboard'),
  3384. B = /Mac/i.test(navigator.platform) ? 'metaKey' : 'ctrlKey',
  3385. D = (function(t) {
  3386. function e(t, n) {
  3387. i(this, e)
  3388. var r = l(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, n))
  3389. return (
  3390. (r.bindings = {}),
  3391. Object.keys(r.options.bindings).forEach(function(e) {
  3392. ;('list autofill' !== e || null == t.scroll.whitelist || t.scroll.whitelist.list) && r.options.bindings[e] && r.addBinding(r.options.bindings[e])
  3393. }),
  3394. r.addBinding({ key: e.keys.ENTER, shiftKey: null }, h),
  3395. r.addBinding({ key: e.keys.ENTER, metaKey: null, ctrlKey: null, altKey: null }, function() {}),
  3396. /Firefox/i.test(navigator.userAgent)
  3397. ? (r.addBinding({ key: e.keys.BACKSPACE }, { collapsed: !0 }, u), r.addBinding({ key: e.keys.DELETE }, { collapsed: !0 }, c))
  3398. : (r.addBinding({ key: e.keys.BACKSPACE }, { collapsed: !0, prefix: /^.?$/ }, u), r.addBinding({ key: e.keys.DELETE }, { collapsed: !0, suffix: /^.?$/ }, c)),
  3399. r.addBinding({ key: e.keys.BACKSPACE }, { collapsed: !1 }, f),
  3400. r.addBinding({ key: e.keys.DELETE }, { collapsed: !1 }, f),
  3401. r.addBinding({ key: e.keys.BACKSPACE, altKey: null, ctrlKey: null, metaKey: null, shiftKey: null }, { collapsed: !0, offset: 0 }, u),
  3402. r.listen(),
  3403. r
  3404. )
  3405. }
  3406. return (
  3407. a(e, t),
  3408. g(e, null, [
  3409. {
  3410. key: 'match',
  3411. value: function(t, e) {
  3412. return (
  3413. (e = y(e)),
  3414. !['altKey', 'ctrlKey', 'metaKey', 'shiftKey'].some(function(n) {
  3415. return !!e[n] !== t[n] && null !== e[n]
  3416. }) && e.key === (t.which || t.keyCode)
  3417. )
  3418. }
  3419. }
  3420. ]),
  3421. g(e, [
  3422. {
  3423. key: 'addBinding',
  3424. value: function(t) {
  3425. var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},
  3426. n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {},
  3427. r = y(t)
  3428. if (null == r || null == r.key) return I.warn('Attempted to add invalid keyboard binding', r)
  3429. 'function' == typeof e && (e = { handler: e }),
  3430. 'function' == typeof n && (n = { handler: n }),
  3431. (r = (0, k.default)(r, e, n)),
  3432. (this.bindings[r.key] = this.bindings[r.key] || []),
  3433. this.bindings[r.key].push(r)
  3434. }
  3435. },
  3436. {
  3437. key: 'listen',
  3438. value: function() {
  3439. var t = this
  3440. this.quill.root.addEventListener('keydown', function(n) {
  3441. if (!n.defaultPrevented) {
  3442. var r = n.which || n.keyCode,
  3443. o = (t.bindings[r] || []).filter(function(t) {
  3444. return e.match(n, t)
  3445. })
  3446. if (0 !== o.length) {
  3447. var i = t.quill.getSelection()
  3448. if (null != i && t.quill.hasFocus()) {
  3449. var l = t.quill.getLine(i.index),
  3450. a = b(l, 2),
  3451. s = a[0],
  3452. u = a[1],
  3453. c = t.quill.getLeaf(i.index),
  3454. f = b(c, 2),
  3455. h = f[0],
  3456. p = f[1],
  3457. d = 0 === i.length ? [h, p] : t.quill.getLeaf(i.index + i.length),
  3458. y = b(d, 2),
  3459. g = y[0],
  3460. m = y[1],
  3461. _ = h instanceof T.default.Text ? h.value().slice(0, p) : '',
  3462. O = g instanceof T.default.Text ? g.value().slice(m) : '',
  3463. x = { collapsed: 0 === i.length, empty: 0 === i.length && s.length() <= 1, format: t.quill.getFormat(i), offset: u, prefix: _, suffix: O }
  3464. o.some(function(e) {
  3465. if (null != e.collapsed && e.collapsed !== x.collapsed) return !1
  3466. if (null != e.empty && e.empty !== x.empty) return !1
  3467. if (null != e.offset && e.offset !== x.offset) return !1
  3468. if (Array.isArray(e.format)) {
  3469. if (
  3470. e.format.every(function(t) {
  3471. return null == x.format[t]
  3472. })
  3473. )
  3474. return !1
  3475. } else if (
  3476. 'object' === v(e.format) &&
  3477. !Object.keys(e.format).every(function(t) {
  3478. return !0 === e.format[t] ? null != x.format[t] : !1 === e.format[t] ? null == x.format[t] : (0, w.default)(e.format[t], x.format[t])
  3479. })
  3480. )
  3481. return !1
  3482. return !(null != e.prefix && !e.prefix.test(x.prefix)) && !(null != e.suffix && !e.suffix.test(x.suffix)) && !0 !== e.handler.call(t, i, x)
  3483. }) && n.preventDefault()
  3484. }
  3485. }
  3486. }
  3487. })
  3488. }
  3489. }
  3490. ]),
  3491. e
  3492. )
  3493. })(R.default)
  3494. ;(D.keys = { BACKSPACE: 8, TAB: 9, ENTER: 13, ESCAPE: 27, LEFT: 37, UP: 38, RIGHT: 39, DOWN: 40, DELETE: 46 }),
  3495. (D.DEFAULTS = {
  3496. bindings: {
  3497. bold: d('bold'),
  3498. italic: d('italic'),
  3499. underline: d('underline'),
  3500. indent: {
  3501. key: D.keys.TAB,
  3502. format: ['blockquote', 'indent', 'list'],
  3503. handler: function(t, e) {
  3504. if (e.collapsed && 0 !== e.offset) return !0
  3505. this.quill.format('indent', '+1', S.default.sources.USER)
  3506. }
  3507. },
  3508. outdent: {
  3509. key: D.keys.TAB,
  3510. shiftKey: !0,
  3511. format: ['blockquote', 'indent', 'list'],
  3512. handler: function(t, e) {
  3513. if (e.collapsed && 0 !== e.offset) return !0
  3514. this.quill.format('indent', '-1', S.default.sources.USER)
  3515. }
  3516. },
  3517. 'outdent backspace': {
  3518. key: D.keys.BACKSPACE,
  3519. collapsed: !0,
  3520. shiftKey: null,
  3521. metaKey: null,
  3522. ctrlKey: null,
  3523. altKey: null,
  3524. format: ['indent', 'list'],
  3525. offset: 0,
  3526. handler: function(t, e) {
  3527. null != e.format.indent ? this.quill.format('indent', '-1', S.default.sources.USER) : null != e.format.list && this.quill.format('list', !1, S.default.sources.USER)
  3528. }
  3529. },
  3530. 'indent code-block': p(!0),
  3531. 'outdent code-block': p(!1),
  3532. 'remove tab': {
  3533. key: D.keys.TAB,
  3534. shiftKey: !0,
  3535. collapsed: !0,
  3536. prefix: /\t$/,
  3537. handler: function(t) {
  3538. this.quill.deleteText(t.index - 1, 1, S.default.sources.USER)
  3539. }
  3540. },
  3541. tab: {
  3542. key: D.keys.TAB,
  3543. handler: function(t) {
  3544. this.quill.history.cutoff()
  3545. var e = new N.default()
  3546. .retain(t.index)
  3547. .delete(t.length)
  3548. .insert('\t')
  3549. this.quill.updateContents(e, S.default.sources.USER), this.quill.history.cutoff(), this.quill.setSelection(t.index + 1, S.default.sources.SILENT)
  3550. }
  3551. },
  3552. 'list empty enter': {
  3553. key: D.keys.ENTER,
  3554. collapsed: !0,
  3555. format: ['list'],
  3556. empty: !0,
  3557. handler: function(t, e) {
  3558. this.quill.format('list', !1, S.default.sources.USER), e.format.indent && this.quill.format('indent', !1, S.default.sources.USER)
  3559. }
  3560. },
  3561. 'checklist enter': {
  3562. key: D.keys.ENTER,
  3563. collapsed: !0,
  3564. format: { list: 'checked' },
  3565. handler: function(t) {
  3566. var e = this.quill.getLine(t.index),
  3567. n = b(e, 2),
  3568. r = n[0],
  3569. o = n[1],
  3570. i = (0, k.default)({}, r.formats(), { list: 'checked' }),
  3571. l = new N.default()
  3572. .retain(t.index)
  3573. .insert('\n', i)
  3574. .retain(r.length() - o - 1)
  3575. .retain(1, { list: 'unchecked' })
  3576. this.quill.updateContents(l, S.default.sources.USER), this.quill.setSelection(t.index + 1, S.default.sources.SILENT), this.quill.scrollIntoView()
  3577. }
  3578. },
  3579. 'header enter': {
  3580. key: D.keys.ENTER,
  3581. collapsed: !0,
  3582. format: ['header'],
  3583. suffix: /^$/,
  3584. handler: function(t, e) {
  3585. var n = this.quill.getLine(t.index),
  3586. r = b(n, 2),
  3587. o = r[0],
  3588. i = r[1],
  3589. l = new N.default()
  3590. .retain(t.index)
  3591. .insert('\n', e.format)
  3592. .retain(o.length() - i - 1)
  3593. .retain(1, { header: null })
  3594. this.quill.updateContents(l, S.default.sources.USER), this.quill.setSelection(t.index + 1, S.default.sources.SILENT), this.quill.scrollIntoView()
  3595. }
  3596. },
  3597. 'list autofill': {
  3598. key: ' ',
  3599. collapsed: !0,
  3600. format: { list: !1 },
  3601. prefix: /^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,
  3602. handler: function(t, e) {
  3603. var n = e.prefix.length,
  3604. r = this.quill.getLine(t.index),
  3605. o = b(r, 2),
  3606. i = o[0],
  3607. l = o[1]
  3608. if (l > n) return !0
  3609. var a = void 0
  3610. switch (e.prefix.trim()) {
  3611. case '[]':
  3612. case '[ ]':
  3613. a = 'unchecked'
  3614. break
  3615. case '[x]':
  3616. a = 'checked'
  3617. break
  3618. case '-':
  3619. case '*':
  3620. a = 'bullet'
  3621. break
  3622. default:
  3623. a = 'ordered'
  3624. }
  3625. this.quill.insertText(t.index, ' ', S.default.sources.USER), this.quill.history.cutoff()
  3626. var s = new N.default()
  3627. .retain(t.index - l)
  3628. .delete(n + 1)
  3629. .retain(i.length() - 2 - l)
  3630. .retain(1, { list: a })
  3631. this.quill.updateContents(s, S.default.sources.USER), this.quill.history.cutoff(), this.quill.setSelection(t.index - n, S.default.sources.SILENT)
  3632. }
  3633. },
  3634. 'code exit': {
  3635. key: D.keys.ENTER,
  3636. collapsed: !0,
  3637. format: ['code-block'],
  3638. prefix: /\n\n$/,
  3639. suffix: /^\s+$/,
  3640. handler: function(t) {
  3641. var e = this.quill.getLine(t.index),
  3642. n = b(e, 2),
  3643. r = n[0],
  3644. o = n[1],
  3645. i = new N.default()
  3646. .retain(t.index + r.length() - o - 2)
  3647. .retain(1, { 'code-block': null })
  3648. .delete(1)
  3649. this.quill.updateContents(i, S.default.sources.USER)
  3650. }
  3651. },
  3652. 'embed left': s(D.keys.LEFT, !1),
  3653. 'embed left shift': s(D.keys.LEFT, !0),
  3654. 'embed right': s(D.keys.RIGHT, !1),
  3655. 'embed right shift': s(D.keys.RIGHT, !0)
  3656. }
  3657. }),
  3658. (e.default = D),
  3659. (e.SHORTKEY = B)
  3660. },
  3661. function(t, e, n) {
  3662. 'use strict'
  3663. t.exports = {
  3664. align: { '': n(75), center: n(76), right: n(77), justify: n(78) },
  3665. background: n(79),
  3666. blockquote: n(80),
  3667. bold: n(81),
  3668. clean: n(82),
  3669. code: n(40),
  3670. 'code-block': n(40),
  3671. color: n(83),
  3672. direction: { '': n(84), rtl: n(85) },
  3673. float: { center: n(86), full: n(87), left: n(88), right: n(89) },
  3674. formula: n(90),
  3675. header: { 1: n(91), 2: n(92) },
  3676. italic: n(93),
  3677. image: n(94),
  3678. indent: { '+1': n(95), '-1': n(96) },
  3679. link: n(97),
  3680. list: { ordered: n(98), bullet: n(99), check: n(100) },
  3681. script: { sub: n(101), super: n(102) },
  3682. strike: n(103),
  3683. underline: n(104),
  3684. video: n(105)
  3685. }
  3686. },
  3687. function(t, e, n) {
  3688. 'use strict'
  3689. Object.defineProperty(e, '__esModule', { value: !0 })
  3690. var r = n(1),
  3691. o = (function() {
  3692. function t(t) {
  3693. ;(this.domNode = t), (this.domNode[r.DATA_KEY] = { blot: this })
  3694. }
  3695. return (
  3696. Object.defineProperty(t.prototype, 'statics', {
  3697. get: function() {
  3698. return this.constructor
  3699. },
  3700. enumerable: !0,
  3701. configurable: !0
  3702. }),
  3703. (t.create = function(t) {
  3704. if (null == this.tagName) throw new r.ParchmentError('Blot definition missing tagName')
  3705. var e
  3706. return (
  3707. Array.isArray(this.tagName)
  3708. ? ('string' == typeof t && ((t = t.toUpperCase()), parseInt(t).toString() === t && (t = parseInt(t))),
  3709. (e =
  3710. 'number' == typeof t
  3711. ? document.createElement(this.tagName[t - 1])
  3712. : this.tagName.indexOf(t) > -1
  3713. ? document.createElement(t)
  3714. : document.createElement(this.tagName[0])))
  3715. : (e = document.createElement(this.tagName)),
  3716. this.className && e.classList.add(this.className),
  3717. e
  3718. )
  3719. }),
  3720. (t.prototype.attach = function() {
  3721. null != this.parent && (this.scroll = this.parent.scroll)
  3722. }),
  3723. (t.prototype.clone = function() {
  3724. var t = this.domNode.cloneNode(!1)
  3725. return r.create(t)
  3726. }),
  3727. (t.prototype.detach = function() {
  3728. null != this.parent && this.parent.removeChild(this), delete this.domNode[r.DATA_KEY]
  3729. }),
  3730. (t.prototype.deleteAt = function(t, e) {
  3731. this.isolate(t, e).remove()
  3732. }),
  3733. (t.prototype.formatAt = function(t, e, n, o) {
  3734. var i = this.isolate(t, e)
  3735. if (null != r.query(n, r.Scope.BLOT) && o) i.wrap(n, o)
  3736. else if (null != r.query(n, r.Scope.ATTRIBUTE)) {
  3737. var l = r.create(this.statics.scope)
  3738. i.wrap(l), l.format(n, o)
  3739. }
  3740. }),
  3741. (t.prototype.insertAt = function(t, e, n) {
  3742. var o = null == n ? r.create('text', e) : r.create(e, n),
  3743. i = this.split(t)
  3744. this.parent.insertBefore(o, i)
  3745. }),
  3746. (t.prototype.insertInto = function(t, e) {
  3747. void 0 === e && (e = null), null != this.parent && this.parent.children.remove(this)
  3748. var n = null
  3749. t.children.insertBefore(this, e),
  3750. null != e && (n = e.domNode),
  3751. (this.domNode.parentNode == t.domNode && this.domNode.nextSibling == n) || t.domNode.insertBefore(this.domNode, n),
  3752. (this.parent = t),
  3753. this.attach()
  3754. }),
  3755. (t.prototype.isolate = function(t, e) {
  3756. var n = this.split(t)
  3757. return n.split(e), n
  3758. }),
  3759. (t.prototype.length = function() {
  3760. return 1
  3761. }),
  3762. (t.prototype.offset = function(t) {
  3763. return void 0 === t && (t = this.parent), null == this.parent || this == t ? 0 : this.parent.children.offset(this) + this.parent.offset(t)
  3764. }),
  3765. (t.prototype.optimize = function(t) {
  3766. null != this.domNode[r.DATA_KEY] && delete this.domNode[r.DATA_KEY].mutations
  3767. }),
  3768. (t.prototype.remove = function() {
  3769. null != this.domNode.parentNode && this.domNode.parentNode.removeChild(this.domNode), this.detach()
  3770. }),
  3771. (t.prototype.replace = function(t) {
  3772. null != t.parent && (t.parent.insertBefore(this, t.next), t.remove())
  3773. }),
  3774. (t.prototype.replaceWith = function(t, e) {
  3775. var n = 'string' == typeof t ? r.create(t, e) : t
  3776. return n.replace(this), n
  3777. }),
  3778. (t.prototype.split = function(t, e) {
  3779. return 0 === t ? this : this.next
  3780. }),
  3781. (t.prototype.update = function(t, e) {}),
  3782. (t.prototype.wrap = function(t, e) {
  3783. var n = 'string' == typeof t ? r.create(t, e) : t
  3784. return null != this.parent && this.parent.insertBefore(n, this.next), n.appendChild(this), n
  3785. }),
  3786. (t.blotName = 'abstract'),
  3787. t
  3788. )
  3789. })()
  3790. e.default = o
  3791. },
  3792. function(t, e, n) {
  3793. 'use strict'
  3794. Object.defineProperty(e, '__esModule', { value: !0 })
  3795. var r = n(11),
  3796. o = n(29),
  3797. i = n(30),
  3798. l = n(1),
  3799. a = (function() {
  3800. function t(t) {
  3801. ;(this.attributes = {}), (this.domNode = t), this.build()
  3802. }
  3803. return (
  3804. (t.prototype.attribute = function(t, e) {
  3805. e
  3806. ? t.add(this.domNode, e) && (null != t.value(this.domNode) ? (this.attributes[t.attrName] = t) : delete this.attributes[t.attrName])
  3807. : (t.remove(this.domNode), delete this.attributes[t.attrName])
  3808. }),
  3809. (t.prototype.build = function() {
  3810. var t = this
  3811. this.attributes = {}
  3812. var e = r.default.keys(this.domNode),
  3813. n = o.default.keys(this.domNode),
  3814. a = i.default.keys(this.domNode)
  3815. e.concat(n)
  3816. .concat(a)
  3817. .forEach(function(e) {
  3818. var n = l.query(e, l.Scope.ATTRIBUTE)
  3819. n instanceof r.default && (t.attributes[n.attrName] = n)
  3820. })
  3821. }),
  3822. (t.prototype.copy = function(t) {
  3823. var e = this
  3824. Object.keys(this.attributes).forEach(function(n) {
  3825. var r = e.attributes[n].value(e.domNode)
  3826. t.format(n, r)
  3827. })
  3828. }),
  3829. (t.prototype.move = function(t) {
  3830. var e = this
  3831. this.copy(t),
  3832. Object.keys(this.attributes).forEach(function(t) {
  3833. e.attributes[t].remove(e.domNode)
  3834. }),
  3835. (this.attributes = {})
  3836. }),
  3837. (t.prototype.values = function() {
  3838. var t = this
  3839. return Object.keys(this.attributes).reduce(function(e, n) {
  3840. return (e[n] = t.attributes[n].value(t.domNode)), e
  3841. }, {})
  3842. }),
  3843. t
  3844. )
  3845. })()
  3846. e.default = a
  3847. },
  3848. function(t, e, n) {
  3849. 'use strict'
  3850. function r(t, e) {
  3851. return (t.getAttribute('class') || '').split(/\s+/).filter(function(t) {
  3852. return 0 === t.indexOf(e + '-')
  3853. })
  3854. }
  3855. var o =
  3856. (this && this.__extends) ||
  3857. (function() {
  3858. var t =
  3859. Object.setPrototypeOf ||
  3860. ({ __proto__: [] } instanceof Array &&
  3861. function(t, e) {
  3862. t.__proto__ = e
  3863. }) ||
  3864. function(t, e) {
  3865. for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n])
  3866. }
  3867. return function(e, n) {
  3868. function r() {
  3869. this.constructor = e
  3870. }
  3871. t(e, n), (e.prototype = null === n ? Object.create(n) : ((r.prototype = n.prototype), new r()))
  3872. }
  3873. })()
  3874. Object.defineProperty(e, '__esModule', { value: !0 })
  3875. var i = n(11),
  3876. l = (function(t) {
  3877. function e() {
  3878. return (null !== t && t.apply(this, arguments)) || this
  3879. }
  3880. return (
  3881. o(e, t),
  3882. (e.keys = function(t) {
  3883. return (t.getAttribute('class') || '').split(/\s+/).map(function(t) {
  3884. return t
  3885. .split('-')
  3886. .slice(0, -1)
  3887. .join('-')
  3888. })
  3889. }),
  3890. (e.prototype.add = function(t, e) {
  3891. return !!this.canAdd(t, e) && (this.remove(t), t.classList.add(this.keyName + '-' + e), !0)
  3892. }),
  3893. (e.prototype.remove = function(t) {
  3894. r(t, this.keyName).forEach(function(e) {
  3895. t.classList.remove(e)
  3896. }),
  3897. 0 === t.classList.length && t.removeAttribute('class')
  3898. }),
  3899. (e.prototype.value = function(t) {
  3900. var e = r(t, this.keyName)[0] || '',
  3901. n = e.slice(this.keyName.length + 1)
  3902. return this.canAdd(t, n) ? n : ''
  3903. }),
  3904. e
  3905. )
  3906. })(i.default)
  3907. e.default = l
  3908. },
  3909. function(t, e, n) {
  3910. 'use strict'
  3911. function r(t) {
  3912. var e = t.split('-'),
  3913. n = e
  3914. .slice(1)
  3915. .map(function(t) {
  3916. return t[0].toUpperCase() + t.slice(1)
  3917. })
  3918. .join('')
  3919. return e[0] + n
  3920. }
  3921. var o =
  3922. (this && this.__extends) ||
  3923. (function() {
  3924. var t =
  3925. Object.setPrototypeOf ||
  3926. ({ __proto__: [] } instanceof Array &&
  3927. function(t, e) {
  3928. t.__proto__ = e
  3929. }) ||
  3930. function(t, e) {
  3931. for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n])
  3932. }
  3933. return function(e, n) {
  3934. function r() {
  3935. this.constructor = e
  3936. }
  3937. t(e, n), (e.prototype = null === n ? Object.create(n) : ((r.prototype = n.prototype), new r()))
  3938. }
  3939. })()
  3940. Object.defineProperty(e, '__esModule', { value: !0 })
  3941. var i = n(11),
  3942. l = (function(t) {
  3943. function e() {
  3944. return (null !== t && t.apply(this, arguments)) || this
  3945. }
  3946. return (
  3947. o(e, t),
  3948. (e.keys = function(t) {
  3949. return (t.getAttribute('style') || '').split(';').map(function(t) {
  3950. return t.split(':')[0].trim()
  3951. })
  3952. }),
  3953. (e.prototype.add = function(t, e) {
  3954. return !!this.canAdd(t, e) && ((t.style[r(this.keyName)] = e), !0)
  3955. }),
  3956. (e.prototype.remove = function(t) {
  3957. ;(t.style[r(this.keyName)] = ''), t.getAttribute('style') || t.removeAttribute('style')
  3958. }),
  3959. (e.prototype.value = function(t) {
  3960. var e = t.style[r(this.keyName)]
  3961. return this.canAdd(t, e) ? e : ''
  3962. }),
  3963. e
  3964. )
  3965. })(i.default)
  3966. e.default = l
  3967. },
  3968. function(t, e, n) {
  3969. 'use strict'
  3970. function r(t) {
  3971. return t && t.__esModule ? t : { default: t }
  3972. }
  3973. function o(t, e) {
  3974. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  3975. }
  3976. function i(t, e) {
  3977. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  3978. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  3979. }
  3980. function l(t, e) {
  3981. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  3982. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  3983. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  3984. }
  3985. Object.defineProperty(e, '__esModule', { value: !0 })
  3986. var a = (function() {
  3987. function t(t, e) {
  3988. var n = [],
  3989. r = !0,
  3990. o = !1,
  3991. i = void 0
  3992. try {
  3993. for (var l, a = t[Symbol.iterator](); !(r = (l = a.next()).done) && (n.push(l.value), !e || n.length !== e); r = !0);
  3994. } catch (t) {
  3995. ;(o = !0), (i = t)
  3996. } finally {
  3997. try {
  3998. !r && a.return && a.return()
  3999. } finally {
  4000. if (o) throw i
  4001. }
  4002. }
  4003. return n
  4004. }
  4005. return function(e, n) {
  4006. if (Array.isArray(e)) return e
  4007. if (Symbol.iterator in Object(e)) return t(e, n)
  4008. throw new TypeError('Invalid attempt to destructure non-iterable instance')
  4009. }
  4010. })(),
  4011. s = function t(e, n, r) {
  4012. null === e && (e = Function.prototype)
  4013. var o = Object.getOwnPropertyDescriptor(e, n)
  4014. if (void 0 === o) {
  4015. var i = Object.getPrototypeOf(e)
  4016. return null === i ? void 0 : t(i, n, r)
  4017. }
  4018. if ('value' in o) return o.value
  4019. var l = o.get
  4020. if (void 0 !== l) return l.call(r)
  4021. },
  4022. u = (function() {
  4023. function t(t, e) {
  4024. for (var n = 0; n < e.length; n++) {
  4025. var r = e[n]
  4026. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  4027. }
  4028. }
  4029. return function(e, n, r) {
  4030. return n && t(e.prototype, n), r && t(e, r), e
  4031. }
  4032. })(),
  4033. c = n(0),
  4034. f = r(c),
  4035. h = n(8),
  4036. p = r(h),
  4037. d = (function(t) {
  4038. function e(t, n) {
  4039. o(this, e)
  4040. var r = i(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t))
  4041. return (r.selection = n), (r.textNode = document.createTextNode(e.CONTENTS)), r.domNode.appendChild(r.textNode), (r._length = 0), r
  4042. }
  4043. return (
  4044. l(e, t),
  4045. u(e, null, [{ key: 'value', value: function() {} }]),
  4046. u(e, [
  4047. {
  4048. key: 'detach',
  4049. value: function() {
  4050. null != this.parent && this.parent.removeChild(this)
  4051. }
  4052. },
  4053. {
  4054. key: 'format',
  4055. value: function(t, n) {
  4056. if (0 !== this._length) return s(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'format', this).call(this, t, n)
  4057. for (var r = this, o = 0; null != r && r.statics.scope !== f.default.Scope.BLOCK_BLOT; ) (o += r.offset(r.parent)), (r = r.parent)
  4058. null != r && ((this._length = e.CONTENTS.length), r.optimize(), r.formatAt(o, e.CONTENTS.length, t, n), (this._length = 0))
  4059. }
  4060. },
  4061. {
  4062. key: 'index',
  4063. value: function(t, n) {
  4064. return t === this.textNode ? 0 : s(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'index', this).call(this, t, n)
  4065. }
  4066. },
  4067. {
  4068. key: 'length',
  4069. value: function() {
  4070. return this._length
  4071. }
  4072. },
  4073. {
  4074. key: 'position',
  4075. value: function() {
  4076. return [this.textNode, this.textNode.data.length]
  4077. }
  4078. },
  4079. {
  4080. key: 'remove',
  4081. value: function() {
  4082. s(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'remove', this).call(this), (this.parent = null)
  4083. }
  4084. },
  4085. {
  4086. key: 'restore',
  4087. value: function() {
  4088. if (!this.selection.composing && null != this.parent) {
  4089. var t = this.textNode,
  4090. n = this.selection.getNativeRange(),
  4091. r = void 0,
  4092. o = void 0,
  4093. i = void 0
  4094. if (null != n && n.start.node === t && n.end.node === t) {
  4095. var l = [t, n.start.offset, n.end.offset]
  4096. ;(r = l[0]), (o = l[1]), (i = l[2])
  4097. }
  4098. for (; null != this.domNode.lastChild && this.domNode.lastChild !== this.textNode; ) this.domNode.parentNode.insertBefore(this.domNode.lastChild, this.domNode)
  4099. if (this.textNode.data !== e.CONTENTS) {
  4100. var s = this.textNode.data.split(e.CONTENTS).join('')
  4101. this.next instanceof p.default
  4102. ? ((r = this.next.domNode), this.next.insertAt(0, s), (this.textNode.data = e.CONTENTS))
  4103. : ((this.textNode.data = s),
  4104. this.parent.insertBefore(f.default.create(this.textNode), this),
  4105. (this.textNode = document.createTextNode(e.CONTENTS)),
  4106. this.domNode.appendChild(this.textNode))
  4107. }
  4108. if ((this.remove(), null != o)) {
  4109. var u = [o, i].map(function(t) {
  4110. return Math.max(0, Math.min(r.data.length, t - 1))
  4111. }),
  4112. c = a(u, 2)
  4113. return (o = c[0]), (i = c[1]), { startNode: r, startOffset: o, endNode: r, endOffset: i }
  4114. }
  4115. }
  4116. }
  4117. },
  4118. {
  4119. key: 'update',
  4120. value: function(t, e) {
  4121. var n = this
  4122. if (
  4123. t.some(function(t) {
  4124. return 'characterData' === t.type && t.target === n.textNode
  4125. })
  4126. ) {
  4127. var r = this.restore()
  4128. r && (e.range = r)
  4129. }
  4130. }
  4131. },
  4132. {
  4133. key: 'value',
  4134. value: function() {
  4135. return ''
  4136. }
  4137. }
  4138. ]),
  4139. e
  4140. )
  4141. })(f.default.Embed)
  4142. ;(d.blotName = 'cursor'), (d.className = 'ql-cursor'), (d.tagName = 'span'), (d.CONTENTS = '\ufeff'), (e.default = d)
  4143. },
  4144. function(t, e, n) {
  4145. 'use strict'
  4146. function r(t, e) {
  4147. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  4148. }
  4149. Object.defineProperty(e, '__esModule', { value: !0 })
  4150. var o = (function() {
  4151. function t(t, e) {
  4152. for (var n = 0; n < e.length; n++) {
  4153. var r = e[n]
  4154. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  4155. }
  4156. }
  4157. return function(e, n, r) {
  4158. return n && t(e.prototype, n), r && t(e, r), e
  4159. }
  4160. })(),
  4161. i = (function() {
  4162. function t(e, n) {
  4163. r(this, t), (this.quill = e), (this.options = n), (this.modules = {})
  4164. }
  4165. return (
  4166. o(t, [
  4167. {
  4168. key: 'init',
  4169. value: function() {
  4170. var t = this
  4171. Object.keys(this.options.modules).forEach(function(e) {
  4172. null == t.modules[e] && t.addModule(e)
  4173. })
  4174. }
  4175. },
  4176. {
  4177. key: 'addModule',
  4178. value: function(t) {
  4179. var e = this.quill.constructor.import('modules/' + t)
  4180. return (this.modules[t] = new e(this.quill, this.options.modules[t] || {})), this.modules[t]
  4181. }
  4182. }
  4183. ]),
  4184. t
  4185. )
  4186. })()
  4187. ;(i.DEFAULTS = { modules: {} }), (i.themes = { default: i }), (e.default = i)
  4188. },
  4189. function(t, e, n) {
  4190. 'use strict'
  4191. function r(t) {
  4192. return t && t.__esModule ? t : { default: t }
  4193. }
  4194. function o(t, e) {
  4195. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  4196. }
  4197. function i(t, e) {
  4198. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  4199. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  4200. }
  4201. function l(t, e) {
  4202. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  4203. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  4204. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  4205. }
  4206. Object.defineProperty(e, '__esModule', { value: !0 })
  4207. var a = (function() {
  4208. function t(t, e) {
  4209. for (var n = 0; n < e.length; n++) {
  4210. var r = e[n]
  4211. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  4212. }
  4213. }
  4214. return function(e, n, r) {
  4215. return n && t(e.prototype, n), r && t(e, r), e
  4216. }
  4217. })(),
  4218. s = function t(e, n, r) {
  4219. null === e && (e = Function.prototype)
  4220. var o = Object.getOwnPropertyDescriptor(e, n)
  4221. if (void 0 === o) {
  4222. var i = Object.getPrototypeOf(e)
  4223. return null === i ? void 0 : t(i, n, r)
  4224. }
  4225. if ('value' in o) return o.value
  4226. var l = o.get
  4227. if (void 0 !== l) return l.call(r)
  4228. },
  4229. u = n(0),
  4230. c = r(u),
  4231. f = n(8),
  4232. h = r(f),
  4233. p = '\ufeff',
  4234. d = (function(t) {
  4235. function e(t) {
  4236. o(this, e)
  4237. var n = i(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t))
  4238. return (
  4239. (n.contentNode = document.createElement('span')),
  4240. n.contentNode.setAttribute('contenteditable', !1),
  4241. [].slice.call(n.domNode.childNodes).forEach(function(t) {
  4242. n.contentNode.appendChild(t)
  4243. }),
  4244. (n.leftGuard = document.createTextNode(p)),
  4245. (n.rightGuard = document.createTextNode(p)),
  4246. n.domNode.appendChild(n.leftGuard),
  4247. n.domNode.appendChild(n.contentNode),
  4248. n.domNode.appendChild(n.rightGuard),
  4249. n
  4250. )
  4251. }
  4252. return (
  4253. l(e, t),
  4254. a(e, [
  4255. {
  4256. key: 'index',
  4257. value: function(t, n) {
  4258. return t === this.leftGuard ? 0 : t === this.rightGuard ? 1 : s(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'index', this).call(this, t, n)
  4259. }
  4260. },
  4261. {
  4262. key: 'restore',
  4263. value: function(t) {
  4264. var e = void 0,
  4265. n = void 0,
  4266. r = t.data.split(p).join('')
  4267. if (t === this.leftGuard)
  4268. if (this.prev instanceof h.default) {
  4269. var o = this.prev.length()
  4270. this.prev.insertAt(o, r), (e = { startNode: this.prev.domNode, startOffset: o + r.length })
  4271. } else (n = document.createTextNode(r)), this.parent.insertBefore(c.default.create(n), this), (e = { startNode: n, startOffset: r.length })
  4272. else
  4273. t === this.rightGuard &&
  4274. (this.next instanceof h.default
  4275. ? (this.next.insertAt(0, r), (e = { startNode: this.next.domNode, startOffset: r.length }))
  4276. : ((n = document.createTextNode(r)), this.parent.insertBefore(c.default.create(n), this.next), (e = { startNode: n, startOffset: r.length })))
  4277. return (t.data = p), e
  4278. }
  4279. },
  4280. {
  4281. key: 'update',
  4282. value: function(t, e) {
  4283. var n = this
  4284. t.forEach(function(t) {
  4285. if ('characterData' === t.type && (t.target === n.leftGuard || t.target === n.rightGuard)) {
  4286. var r = n.restore(t.target)
  4287. r && (e.range = r)
  4288. }
  4289. })
  4290. }
  4291. }
  4292. ]),
  4293. e
  4294. )
  4295. })(c.default.Embed)
  4296. e.default = d
  4297. },
  4298. function(t, e, n) {
  4299. 'use strict'
  4300. Object.defineProperty(e, '__esModule', { value: !0 }), (e.AlignStyle = e.AlignClass = e.AlignAttribute = void 0)
  4301. var r = n(0),
  4302. o = (function(t) {
  4303. return t && t.__esModule ? t : { default: t }
  4304. })(r),
  4305. i = { scope: o.default.Scope.BLOCK, whitelist: ['right', 'center', 'justify'] },
  4306. l = new o.default.Attributor.Attribute('align', 'align', i),
  4307. a = new o.default.Attributor.Class('align', 'ql-align', i),
  4308. s = new o.default.Attributor.Style('align', 'text-align', i)
  4309. ;(e.AlignAttribute = l), (e.AlignClass = a), (e.AlignStyle = s)
  4310. },
  4311. function(t, e, n) {
  4312. 'use strict'
  4313. Object.defineProperty(e, '__esModule', { value: !0 }), (e.BackgroundStyle = e.BackgroundClass = void 0)
  4314. var r = n(0),
  4315. o = (function(t) {
  4316. return t && t.__esModule ? t : { default: t }
  4317. })(r),
  4318. i = n(24),
  4319. l = new o.default.Attributor.Class('background', 'ql-bg', { scope: o.default.Scope.INLINE }),
  4320. a = new i.ColorAttributor('background', 'background-color', { scope: o.default.Scope.INLINE })
  4321. ;(e.BackgroundClass = l), (e.BackgroundStyle = a)
  4322. },
  4323. function(t, e, n) {
  4324. 'use strict'
  4325. Object.defineProperty(e, '__esModule', { value: !0 }), (e.DirectionStyle = e.DirectionClass = e.DirectionAttribute = void 0)
  4326. var r = n(0),
  4327. o = (function(t) {
  4328. return t && t.__esModule ? t : { default: t }
  4329. })(r),
  4330. i = { scope: o.default.Scope.BLOCK, whitelist: ['rtl'] },
  4331. l = new o.default.Attributor.Attribute('direction', 'dir', i),
  4332. a = new o.default.Attributor.Class('direction', 'ql-direction', i),
  4333. s = new o.default.Attributor.Style('direction', 'direction', i)
  4334. ;(e.DirectionAttribute = l), (e.DirectionClass = a), (e.DirectionStyle = s)
  4335. },
  4336. function(t, e, n) {
  4337. 'use strict'
  4338. function r(t, e) {
  4339. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  4340. }
  4341. function o(t, e) {
  4342. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  4343. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  4344. }
  4345. function i(t, e) {
  4346. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  4347. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  4348. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  4349. }
  4350. Object.defineProperty(e, '__esModule', { value: !0 }), (e.FontClass = e.FontStyle = void 0)
  4351. var l = (function() {
  4352. function t(t, e) {
  4353. for (var n = 0; n < e.length; n++) {
  4354. var r = e[n]
  4355. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  4356. }
  4357. }
  4358. return function(e, n, r) {
  4359. return n && t(e.prototype, n), r && t(e, r), e
  4360. }
  4361. })(),
  4362. a = function t(e, n, r) {
  4363. null === e && (e = Function.prototype)
  4364. var o = Object.getOwnPropertyDescriptor(e, n)
  4365. if (void 0 === o) {
  4366. var i = Object.getPrototypeOf(e)
  4367. return null === i ? void 0 : t(i, n, r)
  4368. }
  4369. if ('value' in o) return o.value
  4370. var l = o.get
  4371. if (void 0 !== l) return l.call(r)
  4372. },
  4373. s = n(0),
  4374. u = (function(t) {
  4375. return t && t.__esModule ? t : { default: t }
  4376. })(s),
  4377. c = { scope: u.default.Scope.INLINE, whitelist: ['serif', 'monospace'] },
  4378. f = new u.default.Attributor.Class('font', 'ql-font', c),
  4379. h = (function(t) {
  4380. function e() {
  4381. return r(this, e), o(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments))
  4382. }
  4383. return (
  4384. i(e, t),
  4385. l(e, [
  4386. {
  4387. key: 'value',
  4388. value: function(t) {
  4389. return a(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'value', this)
  4390. .call(this, t)
  4391. .replace(/["']/g, '')
  4392. }
  4393. }
  4394. ]),
  4395. e
  4396. )
  4397. })(u.default.Attributor.Style),
  4398. p = new h('font', 'font-family', c)
  4399. ;(e.FontStyle = p), (e.FontClass = f)
  4400. },
  4401. function(t, e, n) {
  4402. 'use strict'
  4403. Object.defineProperty(e, '__esModule', { value: !0 }), (e.SizeStyle = e.SizeClass = void 0)
  4404. var r = n(0),
  4405. o = (function(t) {
  4406. return t && t.__esModule ? t : { default: t }
  4407. })(r),
  4408. i = new o.default.Attributor.Class('size', 'ql-size', { scope: o.default.Scope.INLINE, whitelist: ['small', 'large', 'huge'] }),
  4409. l = new o.default.Attributor.Style('size', 'font-size', { scope: o.default.Scope.INLINE, whitelist: ['10px', '18px', '32px'] })
  4410. ;(e.SizeClass = i), (e.SizeStyle = l)
  4411. },
  4412. function(t, e, n) {
  4413. 'use strict'
  4414. function r(t, e) {
  4415. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  4416. }
  4417. function o(t, e) {
  4418. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  4419. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  4420. }
  4421. function i(t, e) {
  4422. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  4423. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  4424. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  4425. }
  4426. Object.defineProperty(e, '__esModule', { value: !0 })
  4427. var l = (function() {
  4428. function t(t, e) {
  4429. for (var n = 0; n < e.length; n++) {
  4430. var r = e[n]
  4431. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  4432. }
  4433. }
  4434. return function(e, n, r) {
  4435. return n && t(e.prototype, n), r && t(e, r), e
  4436. }
  4437. })(),
  4438. a = function t(e, n, r) {
  4439. null === e && (e = Function.prototype)
  4440. var o = Object.getOwnPropertyDescriptor(e, n)
  4441. if (void 0 === o) {
  4442. var i = Object.getPrototypeOf(e)
  4443. return null === i ? void 0 : t(i, n, r)
  4444. }
  4445. if ('value' in o) return o.value
  4446. var l = o.get
  4447. if (void 0 !== l) return l.call(r)
  4448. },
  4449. s = n(5),
  4450. u = (function(t) {
  4451. return t && t.__esModule ? t : { default: t }
  4452. })(s),
  4453. c = (function(t) {
  4454. function e() {
  4455. return r(this, e), o(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments))
  4456. }
  4457. return (
  4458. i(e, t),
  4459. l(
  4460. e,
  4461. [
  4462. {
  4463. key: 'optimize',
  4464. value: function(t) {
  4465. a(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'optimize', this).call(this, t),
  4466. this.domNode.tagName !== this.statics.tagName[0] && this.replaceWith(this.statics.blotName)
  4467. }
  4468. }
  4469. ],
  4470. [
  4471. {
  4472. key: 'create',
  4473. value: function() {
  4474. return a(e.__proto__ || Object.getPrototypeOf(e), 'create', this).call(this)
  4475. }
  4476. },
  4477. {
  4478. key: 'formats',
  4479. value: function() {
  4480. return !0
  4481. }
  4482. }
  4483. ]
  4484. ),
  4485. e
  4486. )
  4487. })(u.default)
  4488. ;(c.blotName = 'bold'), (c.tagName = ['STRONG', 'B']), (e.default = c)
  4489. },
  4490. function(t, e) {
  4491. t.exports =
  4492. '<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'
  4493. },
  4494. function(t, e, n) {
  4495. 'use strict'
  4496. function r(t, e) {
  4497. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  4498. }
  4499. function o(t, e) {
  4500. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  4501. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  4502. }
  4503. function i(t, e) {
  4504. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  4505. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  4506. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  4507. }
  4508. Object.defineProperty(e, '__esModule', { value: !0 })
  4509. var l = (function() {
  4510. function t(t, e) {
  4511. for (var n = 0; n < e.length; n++) {
  4512. var r = e[n]
  4513. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  4514. }
  4515. }
  4516. return function(e, n, r) {
  4517. return n && t(e.prototype, n), r && t(e, r), e
  4518. }
  4519. })(),
  4520. a = function t(e, n, r) {
  4521. null === e && (e = Function.prototype)
  4522. var o = Object.getOwnPropertyDescriptor(e, n)
  4523. if (void 0 === o) {
  4524. var i = Object.getPrototypeOf(e)
  4525. return null === i ? void 0 : t(i, n, r)
  4526. }
  4527. if ('value' in o) return o.value
  4528. var l = o.get
  4529. if (void 0 !== l) return l.call(r)
  4530. },
  4531. s = n(16),
  4532. u = (function(t) {
  4533. return t && t.__esModule ? t : { default: t }
  4534. })(s),
  4535. c = (function(t) {
  4536. function e(t, n) {
  4537. r(this, e)
  4538. var i = o(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t))
  4539. return (
  4540. (i.label.innerHTML = n),
  4541. i.container.classList.add('ql-color-picker'),
  4542. [].slice.call(i.container.querySelectorAll('.ql-picker-item'), 0, 7).forEach(function(t) {
  4543. t.classList.add('ql-primary')
  4544. }),
  4545. i
  4546. )
  4547. }
  4548. return (
  4549. i(e, t),
  4550. l(e, [
  4551. {
  4552. key: 'buildItem',
  4553. value: function(t) {
  4554. var n = a(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'buildItem', this).call(this, t)
  4555. return (n.style.backgroundColor = t.getAttribute('value') || ''), n
  4556. }
  4557. },
  4558. {
  4559. key: 'selectItem',
  4560. value: function(t, n) {
  4561. a(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'selectItem', this).call(this, t, n)
  4562. var r = this.label.querySelector('.ql-color-label'),
  4563. o = t ? t.getAttribute('data-value') || '' : ''
  4564. r && ('line' === r.tagName ? (r.style.stroke = o) : (r.style.fill = o))
  4565. }
  4566. }
  4567. ]),
  4568. e
  4569. )
  4570. })(u.default)
  4571. e.default = c
  4572. },
  4573. function(t, e, n) {
  4574. 'use strict'
  4575. function r(t, e) {
  4576. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  4577. }
  4578. function o(t, e) {
  4579. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  4580. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  4581. }
  4582. function i(t, e) {
  4583. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  4584. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  4585. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  4586. }
  4587. Object.defineProperty(e, '__esModule', { value: !0 })
  4588. var l = (function() {
  4589. function t(t, e) {
  4590. for (var n = 0; n < e.length; n++) {
  4591. var r = e[n]
  4592. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  4593. }
  4594. }
  4595. return function(e, n, r) {
  4596. return n && t(e.prototype, n), r && t(e, r), e
  4597. }
  4598. })(),
  4599. a = function t(e, n, r) {
  4600. null === e && (e = Function.prototype)
  4601. var o = Object.getOwnPropertyDescriptor(e, n)
  4602. if (void 0 === o) {
  4603. var i = Object.getPrototypeOf(e)
  4604. return null === i ? void 0 : t(i, n, r)
  4605. }
  4606. if ('value' in o) return o.value
  4607. var l = o.get
  4608. if (void 0 !== l) return l.call(r)
  4609. },
  4610. s = n(16),
  4611. u = (function(t) {
  4612. return t && t.__esModule ? t : { default: t }
  4613. })(s),
  4614. c = (function(t) {
  4615. function e(t, n) {
  4616. r(this, e)
  4617. var i = o(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t))
  4618. return (
  4619. i.container.classList.add('ql-icon-picker'),
  4620. [].forEach.call(i.container.querySelectorAll('.ql-picker-item'), function(t) {
  4621. t.innerHTML = n[t.getAttribute('data-value') || '']
  4622. }),
  4623. (i.defaultItem = i.container.querySelector('.ql-selected')),
  4624. i.selectItem(i.defaultItem),
  4625. i
  4626. )
  4627. }
  4628. return (
  4629. i(e, t),
  4630. l(e, [
  4631. {
  4632. key: 'selectItem',
  4633. value: function(t, n) {
  4634. a(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'selectItem', this).call(this, t, n),
  4635. (t = t || this.defaultItem),
  4636. (this.label.innerHTML = t.innerHTML)
  4637. }
  4638. }
  4639. ]),
  4640. e
  4641. )
  4642. })(u.default)
  4643. e.default = c
  4644. },
  4645. function(t, e, n) {
  4646. 'use strict'
  4647. function r(t, e) {
  4648. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  4649. }
  4650. Object.defineProperty(e, '__esModule', { value: !0 })
  4651. var o = (function() {
  4652. function t(t, e) {
  4653. for (var n = 0; n < e.length; n++) {
  4654. var r = e[n]
  4655. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  4656. }
  4657. }
  4658. return function(e, n, r) {
  4659. return n && t(e.prototype, n), r && t(e, r), e
  4660. }
  4661. })(),
  4662. i = (function() {
  4663. function t(e, n) {
  4664. var o = this
  4665. r(this, t),
  4666. (this.quill = e),
  4667. (this.boundsContainer = n || document.body),
  4668. (this.root = e.addContainer('ql-tooltip')),
  4669. (this.root.innerHTML = this.constructor.TEMPLATE),
  4670. this.quill.root === this.quill.scrollingContainer &&
  4671. this.quill.root.addEventListener('scroll', function() {
  4672. o.root.style.marginTop = -1 * o.quill.root.scrollTop + 'px'
  4673. }),
  4674. this.hide()
  4675. }
  4676. return (
  4677. o(t, [
  4678. {
  4679. key: 'hide',
  4680. value: function() {
  4681. this.root.classList.add('ql-hidden')
  4682. }
  4683. },
  4684. {
  4685. key: 'position',
  4686. value: function(t) {
  4687. var e = t.left + t.width / 2 - this.root.offsetWidth / 2,
  4688. n = t.bottom + this.quill.root.scrollTop
  4689. ;(this.root.style.left = e + 'px'), (this.root.style.top = n + 'px'), this.root.classList.remove('ql-flip')
  4690. var r = this.boundsContainer.getBoundingClientRect(),
  4691. o = this.root.getBoundingClientRect(),
  4692. i = 0
  4693. if (
  4694. (o.right > r.right && ((i = r.right - o.right), (this.root.style.left = e + i + 'px')),
  4695. o.left < r.left && ((i = r.left - o.left), (this.root.style.left = e + i + 'px')),
  4696. o.bottom > r.bottom)
  4697. ) {
  4698. var l = o.bottom - o.top,
  4699. a = t.bottom - t.top + l
  4700. ;(this.root.style.top = n - a + 'px'), this.root.classList.add('ql-flip')
  4701. }
  4702. return i
  4703. }
  4704. },
  4705. {
  4706. key: 'show',
  4707. value: function() {
  4708. this.root.classList.remove('ql-editing'), this.root.classList.remove('ql-hidden')
  4709. }
  4710. }
  4711. ]),
  4712. t
  4713. )
  4714. })()
  4715. e.default = i
  4716. },
  4717. function(t, e, n) {
  4718. 'use strict'
  4719. function r(t) {
  4720. return t && t.__esModule ? t : { default: t }
  4721. }
  4722. function o(t, e) {
  4723. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  4724. }
  4725. function i(t, e) {
  4726. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  4727. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  4728. }
  4729. function l(t, e) {
  4730. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  4731. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  4732. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  4733. }
  4734. function a(t) {
  4735. var e = t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/) || t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/)
  4736. return e
  4737. ? (e[1] || 'https') + '://www.youtube.com/embed/' + e[2] + '?showinfo=0'
  4738. : (e = t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))
  4739. ? (e[1] || 'https') + '://player.vimeo.com/video/' + e[2] + '/'
  4740. : t
  4741. }
  4742. function s(t, e) {
  4743. var n = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]
  4744. e.forEach(function(e) {
  4745. var r = document.createElement('option')
  4746. e === n ? r.setAttribute('selected', 'selected') : r.setAttribute('value', e), t.appendChild(r)
  4747. })
  4748. }
  4749. Object.defineProperty(e, '__esModule', { value: !0 }), (e.default = e.BaseTooltip = void 0)
  4750. var u = (function() {
  4751. function t(t, e) {
  4752. for (var n = 0; n < e.length; n++) {
  4753. var r = e[n]
  4754. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  4755. }
  4756. }
  4757. return function(e, n, r) {
  4758. return n && t(e.prototype, n), r && t(e, r), e
  4759. }
  4760. })(),
  4761. c = function t(e, n, r) {
  4762. null === e && (e = Function.prototype)
  4763. var o = Object.getOwnPropertyDescriptor(e, n)
  4764. if (void 0 === o) {
  4765. var i = Object.getPrototypeOf(e)
  4766. return null === i ? void 0 : t(i, n, r)
  4767. }
  4768. if ('value' in o) return o.value
  4769. var l = o.get
  4770. if (void 0 !== l) return l.call(r)
  4771. },
  4772. f = n(2),
  4773. h = r(f),
  4774. p = n(4),
  4775. d = r(p),
  4776. y = n(9),
  4777. v = r(y),
  4778. b = n(25),
  4779. g = r(b),
  4780. m = n(32),
  4781. _ = r(m),
  4782. O = n(41),
  4783. w = r(O),
  4784. x = n(42),
  4785. k = r(x),
  4786. E = n(16),
  4787. N = r(E),
  4788. j = n(43),
  4789. A = r(j),
  4790. q = [!1, 'center', 'right', 'justify'],
  4791. T = [
  4792. '#000000',
  4793. '#e60000',
  4794. '#ff9900',
  4795. '#ffff00',
  4796. '#008a00',
  4797. '#0066cc',
  4798. '#9933ff',
  4799. '#ffffff',
  4800. '#facccc',
  4801. '#ffebcc',
  4802. '#ffffcc',
  4803. '#cce8cc',
  4804. '#cce0f5',
  4805. '#ebd6ff',
  4806. '#bbbbbb',
  4807. '#f06666',
  4808. '#ffc266',
  4809. '#ffff66',
  4810. '#66b966',
  4811. '#66a3e0',
  4812. '#c285ff',
  4813. '#888888',
  4814. '#a10000',
  4815. '#b26b00',
  4816. '#b2b200',
  4817. '#006100',
  4818. '#0047b2',
  4819. '#6b24b2',
  4820. '#444444',
  4821. '#5c0000',
  4822. '#663d00',
  4823. '#666600',
  4824. '#003700',
  4825. '#002966',
  4826. '#3d1466'
  4827. ],
  4828. P = [!1, 'serif', 'monospace'],
  4829. S = ['1', '2', '3', !1],
  4830. C = ['small', !1, 'large', 'huge'],
  4831. L = (function(t) {
  4832. function e(t, n) {
  4833. o(this, e)
  4834. var r = i(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, n)),
  4835. l = function e(n) {
  4836. if (!document.body.contains(t.root)) return document.body.removeEventListener('click', e)
  4837. null == r.tooltip || r.tooltip.root.contains(n.target) || document.activeElement === r.tooltip.textbox || r.quill.hasFocus() || r.tooltip.hide(),
  4838. null != r.pickers &&
  4839. r.pickers.forEach(function(t) {
  4840. t.container.contains(n.target) || t.close()
  4841. })
  4842. }
  4843. return t.emitter.listenDOM('click', document.body, l), r
  4844. }
  4845. return (
  4846. l(e, t),
  4847. u(e, [
  4848. {
  4849. key: 'addModule',
  4850. value: function(t) {
  4851. var n = c(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'addModule', this).call(this, t)
  4852. return 'toolbar' === t && this.extendToolbar(n), n
  4853. }
  4854. },
  4855. {
  4856. key: 'buildButtons',
  4857. value: function(t, e) {
  4858. t.forEach(function(t) {
  4859. ;(t.getAttribute('class') || '').split(/\s+/).forEach(function(n) {
  4860. if (n.startsWith('ql-') && ((n = n.slice('ql-'.length)), null != e[n]))
  4861. if ('direction' === n) t.innerHTML = e[n][''] + e[n].rtl
  4862. else if ('string' == typeof e[n]) t.innerHTML = e[n]
  4863. else {
  4864. var r = t.value || ''
  4865. null != r && e[n][r] && (t.innerHTML = e[n][r])
  4866. }
  4867. })
  4868. })
  4869. }
  4870. },
  4871. {
  4872. key: 'buildPickers',
  4873. value: function(t, e) {
  4874. var n = this
  4875. this.pickers = t.map(function(t) {
  4876. if (t.classList.contains('ql-align')) return null == t.querySelector('option') && s(t, q), new k.default(t, e.align)
  4877. if (t.classList.contains('ql-background') || t.classList.contains('ql-color')) {
  4878. var n = t.classList.contains('ql-background') ? 'background' : 'color'
  4879. return null == t.querySelector('option') && s(t, T, 'background' === n ? '#ffffff' : '#000000'), new w.default(t, e[n])
  4880. }
  4881. return (
  4882. null == t.querySelector('option') &&
  4883. (t.classList.contains('ql-font') ? s(t, P) : t.classList.contains('ql-header') ? s(t, S) : t.classList.contains('ql-size') && s(t, C)),
  4884. new N.default(t)
  4885. )
  4886. })
  4887. var r = function() {
  4888. n.pickers.forEach(function(t) {
  4889. t.update()
  4890. })
  4891. }
  4892. this.quill.on(v.default.events.EDITOR_CHANGE, r)
  4893. }
  4894. }
  4895. ]),
  4896. e
  4897. )
  4898. })(_.default)
  4899. L.DEFAULTS = (0, h.default)(!0, {}, _.default.DEFAULTS, {
  4900. modules: {
  4901. toolbar: {
  4902. handlers: {
  4903. formula: function() {
  4904. this.quill.theme.tooltip.edit('formula')
  4905. },
  4906. image: function() {
  4907. var t = this,
  4908. e = this.container.querySelector('input.ql-image[type=file]')
  4909. null == e &&
  4910. ((e = document.createElement('input')),
  4911. e.setAttribute('type', 'file'),
  4912. e.setAttribute('accept', 'image/png, image/gif, image/jpeg, image/bmp, image/x-icon'),
  4913. e.classList.add('ql-image'),
  4914. e.addEventListener('change', function() {
  4915. if (null != e.files && null != e.files[0]) {
  4916. var n = new FileReader()
  4917. ;(n.onload = function(n) {
  4918. var r = t.quill.getSelection(!0)
  4919. t.quill.updateContents(
  4920. new d.default()
  4921. .retain(r.index)
  4922. .delete(r.length)
  4923. .insert({ image: n.target.result }),
  4924. v.default.sources.USER
  4925. ),
  4926. t.quill.setSelection(r.index + 1, v.default.sources.SILENT),
  4927. (e.value = '')
  4928. }),
  4929. n.readAsDataURL(e.files[0])
  4930. }
  4931. }),
  4932. this.container.appendChild(e)),
  4933. e.click()
  4934. },
  4935. video: function() {
  4936. this.quill.theme.tooltip.edit('video')
  4937. }
  4938. }
  4939. }
  4940. }
  4941. })
  4942. var M = (function(t) {
  4943. function e(t, n) {
  4944. o(this, e)
  4945. var r = i(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, n))
  4946. return (r.textbox = r.root.querySelector('input[type="text"]')), r.listen(), r
  4947. }
  4948. return (
  4949. l(e, t),
  4950. u(e, [
  4951. {
  4952. key: 'listen',
  4953. value: function() {
  4954. var t = this
  4955. this.textbox.addEventListener('keydown', function(e) {
  4956. g.default.match(e, 'enter') ? (t.save(), e.preventDefault()) : g.default.match(e, 'escape') && (t.cancel(), e.preventDefault())
  4957. })
  4958. }
  4959. },
  4960. {
  4961. key: 'cancel',
  4962. value: function() {
  4963. this.hide()
  4964. }
  4965. },
  4966. {
  4967. key: 'edit',
  4968. value: function() {
  4969. var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 'link',
  4970. e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null
  4971. this.root.classList.remove('ql-hidden'),
  4972. this.root.classList.add('ql-editing'),
  4973. null != e ? (this.textbox.value = e) : t !== this.root.getAttribute('data-mode') && (this.textbox.value = ''),
  4974. this.position(this.quill.getBounds(this.quill.selection.savedRange)),
  4975. this.textbox.select(),
  4976. this.textbox.setAttribute('placeholder', this.textbox.getAttribute('data-' + t) || ''),
  4977. this.root.setAttribute('data-mode', t)
  4978. }
  4979. },
  4980. {
  4981. key: 'restoreFocus',
  4982. value: function() {
  4983. var t = this.quill.scrollingContainer.scrollTop
  4984. this.quill.focus(), (this.quill.scrollingContainer.scrollTop = t)
  4985. }
  4986. },
  4987. {
  4988. key: 'save',
  4989. value: function() {
  4990. var t = this.textbox.value
  4991. switch (this.root.getAttribute('data-mode')) {
  4992. case 'link':
  4993. var e = this.quill.root.scrollTop
  4994. this.linkRange
  4995. ? (this.quill.formatText(this.linkRange, 'link', t, v.default.sources.USER), delete this.linkRange)
  4996. : (this.restoreFocus(), this.quill.format('link', t, v.default.sources.USER)),
  4997. (this.quill.root.scrollTop = e)
  4998. break
  4999. case 'video':
  5000. t = a(t)
  5001. case 'formula':
  5002. if (!t) break
  5003. var n = this.quill.getSelection(!0)
  5004. if (null != n) {
  5005. var r = n.index + n.length
  5006. this.quill.insertEmbed(r, this.root.getAttribute('data-mode'), t, v.default.sources.USER),
  5007. 'formula' === this.root.getAttribute('data-mode') && this.quill.insertText(r + 1, ' ', v.default.sources.USER),
  5008. this.quill.setSelection(r + 2, v.default.sources.USER)
  5009. }
  5010. }
  5011. ;(this.textbox.value = ''), this.hide()
  5012. }
  5013. }
  5014. ]),
  5015. e
  5016. )
  5017. })(A.default)
  5018. ;(e.BaseTooltip = M), (e.default = L)
  5019. },
  5020. function(t, e, n) {
  5021. 'use strict'
  5022. function r(t) {
  5023. return t && t.__esModule ? t : { default: t }
  5024. }
  5025. Object.defineProperty(e, '__esModule', { value: !0 })
  5026. var o = n(46),
  5027. i = r(o),
  5028. l = n(34),
  5029. a = n(36),
  5030. s = n(62),
  5031. u = n(63),
  5032. c = r(u),
  5033. f = n(64),
  5034. h = r(f),
  5035. p = n(65),
  5036. d = r(p),
  5037. y = n(35),
  5038. v = n(24),
  5039. b = n(37),
  5040. g = n(38),
  5041. m = n(39),
  5042. _ = r(m),
  5043. O = n(66),
  5044. w = r(O),
  5045. x = n(15),
  5046. k = r(x),
  5047. E = n(67),
  5048. N = r(E),
  5049. j = n(68),
  5050. A = r(j),
  5051. q = n(69),
  5052. T = r(q),
  5053. P = n(70),
  5054. S = r(P),
  5055. C = n(71),
  5056. L = r(C),
  5057. M = n(13),
  5058. R = r(M),
  5059. I = n(72),
  5060. B = r(I),
  5061. D = n(73),
  5062. U = r(D),
  5063. F = n(74),
  5064. H = r(F),
  5065. K = n(26),
  5066. z = r(K),
  5067. Z = n(16),
  5068. V = r(Z),
  5069. W = n(41),
  5070. G = r(W),
  5071. Y = n(42),
  5072. X = r(Y),
  5073. $ = n(43),
  5074. Q = r($),
  5075. J = n(107),
  5076. tt = r(J),
  5077. et = n(108),
  5078. nt = r(et)
  5079. i.default.register(
  5080. {
  5081. 'attributors/attribute/direction': a.DirectionAttribute,
  5082. 'attributors/class/align': l.AlignClass,
  5083. 'attributors/class/background': y.BackgroundClass,
  5084. 'attributors/class/color': v.ColorClass,
  5085. 'attributors/class/direction': a.DirectionClass,
  5086. 'attributors/class/font': b.FontClass,
  5087. 'attributors/class/size': g.SizeClass,
  5088. 'attributors/style/align': l.AlignStyle,
  5089. 'attributors/style/background': y.BackgroundStyle,
  5090. 'attributors/style/color': v.ColorStyle,
  5091. 'attributors/style/direction': a.DirectionStyle,
  5092. 'attributors/style/font': b.FontStyle,
  5093. 'attributors/style/size': g.SizeStyle
  5094. },
  5095. !0
  5096. ),
  5097. i.default.register(
  5098. {
  5099. 'formats/align': l.AlignClass,
  5100. 'formats/direction': a.DirectionClass,
  5101. 'formats/indent': s.IndentClass,
  5102. 'formats/background': y.BackgroundStyle,
  5103. 'formats/color': v.ColorStyle,
  5104. 'formats/font': b.FontClass,
  5105. 'formats/size': g.SizeClass,
  5106. 'formats/blockquote': c.default,
  5107. 'formats/code-block': R.default,
  5108. 'formats/header': h.default,
  5109. 'formats/list': d.default,
  5110. 'formats/bold': _.default,
  5111. 'formats/code': M.Code,
  5112. 'formats/italic': w.default,
  5113. 'formats/link': k.default,
  5114. 'formats/script': N.default,
  5115. 'formats/strike': A.default,
  5116. 'formats/underline': T.default,
  5117. 'formats/image': S.default,
  5118. 'formats/video': L.default,
  5119. 'formats/list/item': p.ListItem,
  5120. 'modules/formula': B.default,
  5121. 'modules/syntax': U.default,
  5122. 'modules/toolbar': H.default,
  5123. 'themes/bubble': tt.default,
  5124. 'themes/snow': nt.default,
  5125. 'ui/icons': z.default,
  5126. 'ui/picker': V.default,
  5127. 'ui/icon-picker': X.default,
  5128. 'ui/color-picker': G.default,
  5129. 'ui/tooltip': Q.default
  5130. },
  5131. !0
  5132. ),
  5133. (e.default = i.default)
  5134. },
  5135. function(t, e, n) {
  5136. 'use strict'
  5137. function r(t) {
  5138. return t && t.__esModule ? t : { default: t }
  5139. }
  5140. Object.defineProperty(e, '__esModule', { value: !0 })
  5141. var o = n(0),
  5142. i = r(o),
  5143. l = n(6),
  5144. a = r(l),
  5145. s = n(3),
  5146. u = r(s),
  5147. c = n(14),
  5148. f = r(c),
  5149. h = n(23),
  5150. p = r(h),
  5151. d = n(31),
  5152. y = r(d),
  5153. v = n(33),
  5154. b = r(v),
  5155. g = n(5),
  5156. m = r(g),
  5157. _ = n(59),
  5158. O = r(_),
  5159. w = n(8),
  5160. x = r(w),
  5161. k = n(60),
  5162. E = r(k),
  5163. N = n(61),
  5164. j = r(N),
  5165. A = n(25),
  5166. q = r(A)
  5167. a.default.register({
  5168. 'blots/block': u.default,
  5169. 'blots/block/embed': s.BlockEmbed,
  5170. 'blots/break': f.default,
  5171. 'blots/container': p.default,
  5172. 'blots/cursor': y.default,
  5173. 'blots/embed': b.default,
  5174. 'blots/inline': m.default,
  5175. 'blots/scroll': O.default,
  5176. 'blots/text': x.default,
  5177. 'modules/clipboard': E.default,
  5178. 'modules/history': j.default,
  5179. 'modules/keyboard': q.default
  5180. }),
  5181. i.default.register(u.default, f.default, y.default, m.default, O.default, x.default),
  5182. (e.default = a.default)
  5183. },
  5184. function(t, e, n) {
  5185. 'use strict'
  5186. Object.defineProperty(e, '__esModule', { value: !0 })
  5187. var r = (function() {
  5188. function t() {
  5189. ;(this.head = this.tail = null), (this.length = 0)
  5190. }
  5191. return (
  5192. (t.prototype.append = function() {
  5193. for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e]
  5194. this.insertBefore(t[0], null), t.length > 1 && this.append.apply(this, t.slice(1))
  5195. }),
  5196. (t.prototype.contains = function(t) {
  5197. for (var e, n = this.iterator(); (e = n()); ) if (e === t) return !0
  5198. return !1
  5199. }),
  5200. (t.prototype.insertBefore = function(t, e) {
  5201. t &&
  5202. ((t.next = e),
  5203. null != e
  5204. ? ((t.prev = e.prev), null != e.prev && (e.prev.next = t), (e.prev = t), e === this.head && (this.head = t))
  5205. : null != this.tail
  5206. ? ((this.tail.next = t), (t.prev = this.tail), (this.tail = t))
  5207. : ((t.prev = null), (this.head = this.tail = t)),
  5208. (this.length += 1))
  5209. }),
  5210. (t.prototype.offset = function(t) {
  5211. for (var e = 0, n = this.head; null != n; ) {
  5212. if (n === t) return e
  5213. ;(e += n.length()), (n = n.next)
  5214. }
  5215. return -1
  5216. }),
  5217. (t.prototype.remove = function(t) {
  5218. this.contains(t) &&
  5219. (null != t.prev && (t.prev.next = t.next),
  5220. null != t.next && (t.next.prev = t.prev),
  5221. t === this.head && (this.head = t.next),
  5222. t === this.tail && (this.tail = t.prev),
  5223. (this.length -= 1))
  5224. }),
  5225. (t.prototype.iterator = function(t) {
  5226. return (
  5227. void 0 === t && (t = this.head),
  5228. function() {
  5229. var e = t
  5230. return null != t && (t = t.next), e
  5231. }
  5232. )
  5233. }),
  5234. (t.prototype.find = function(t, e) {
  5235. void 0 === e && (e = !1)
  5236. for (var n, r = this.iterator(); (n = r()); ) {
  5237. var o = n.length()
  5238. if (t < o || (e && t === o && (null == n.next || 0 !== n.next.length()))) return [n, t]
  5239. t -= o
  5240. }
  5241. return [null, 0]
  5242. }),
  5243. (t.prototype.forEach = function(t) {
  5244. for (var e, n = this.iterator(); (e = n()); ) t(e)
  5245. }),
  5246. (t.prototype.forEachAt = function(t, e, n) {
  5247. if (!(e <= 0))
  5248. for (var r, o = this.find(t), i = o[0], l = o[1], a = t - l, s = this.iterator(i); (r = s()) && a < t + e; ) {
  5249. var u = r.length()
  5250. t > a ? n(r, t - a, Math.min(e, a + u - t)) : n(r, 0, Math.min(u, t + e - a)), (a += u)
  5251. }
  5252. }),
  5253. (t.prototype.map = function(t) {
  5254. return this.reduce(function(e, n) {
  5255. return e.push(t(n)), e
  5256. }, [])
  5257. }),
  5258. (t.prototype.reduce = function(t, e) {
  5259. for (var n, r = this.iterator(); (n = r()); ) e = t(e, n)
  5260. return e
  5261. }),
  5262. t
  5263. )
  5264. })()
  5265. e.default = r
  5266. },
  5267. function(t, e, n) {
  5268. 'use strict'
  5269. var r =
  5270. (this && this.__extends) ||
  5271. (function() {
  5272. var t =
  5273. Object.setPrototypeOf ||
  5274. ({ __proto__: [] } instanceof Array &&
  5275. function(t, e) {
  5276. t.__proto__ = e
  5277. }) ||
  5278. function(t, e) {
  5279. for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n])
  5280. }
  5281. return function(e, n) {
  5282. function r() {
  5283. this.constructor = e
  5284. }
  5285. t(e, n), (e.prototype = null === n ? Object.create(n) : ((r.prototype = n.prototype), new r()))
  5286. }
  5287. })()
  5288. Object.defineProperty(e, '__esModule', { value: !0 })
  5289. var o = n(17),
  5290. i = n(1),
  5291. l = { attributes: !0, characterData: !0, characterDataOldValue: !0, childList: !0, subtree: !0 },
  5292. a = (function(t) {
  5293. function e(e) {
  5294. var n = t.call(this, e) || this
  5295. return (
  5296. (n.scroll = n),
  5297. (n.observer = new MutationObserver(function(t) {
  5298. n.update(t)
  5299. })),
  5300. n.observer.observe(n.domNode, l),
  5301. n.attach(),
  5302. n
  5303. )
  5304. }
  5305. return (
  5306. r(e, t),
  5307. (e.prototype.detach = function() {
  5308. t.prototype.detach.call(this), this.observer.disconnect()
  5309. }),
  5310. (e.prototype.deleteAt = function(e, n) {
  5311. this.update(),
  5312. 0 === e && n === this.length()
  5313. ? this.children.forEach(function(t) {
  5314. t.remove()
  5315. })
  5316. : t.prototype.deleteAt.call(this, e, n)
  5317. }),
  5318. (e.prototype.formatAt = function(e, n, r, o) {
  5319. this.update(), t.prototype.formatAt.call(this, e, n, r, o)
  5320. }),
  5321. (e.prototype.insertAt = function(e, n, r) {
  5322. this.update(), t.prototype.insertAt.call(this, e, n, r)
  5323. }),
  5324. (e.prototype.optimize = function(e, n) {
  5325. var r = this
  5326. void 0 === e && (e = []), void 0 === n && (n = {}), t.prototype.optimize.call(this, n)
  5327. for (var l = [].slice.call(this.observer.takeRecords()); l.length > 0; ) e.push(l.pop())
  5328. for (
  5329. var a = function(t, e) {
  5330. void 0 === e && (e = !0),
  5331. null != t &&
  5332. t !== r &&
  5333. null != t.domNode.parentNode &&
  5334. (null == t.domNode[i.DATA_KEY].mutations && (t.domNode[i.DATA_KEY].mutations = []), e && a(t.parent))
  5335. },
  5336. s = function(t) {
  5337. null != t.domNode[i.DATA_KEY] && null != t.domNode[i.DATA_KEY].mutations && (t instanceof o.default && t.children.forEach(s), t.optimize(n))
  5338. },
  5339. u = e,
  5340. c = 0;
  5341. u.length > 0;
  5342. c += 1
  5343. ) {
  5344. if (c >= 100) throw new Error('[Parchment] Maximum optimize iterations reached')
  5345. for (
  5346. u.forEach(function(t) {
  5347. var e = i.find(t.target, !0)
  5348. null != e &&
  5349. (e.domNode === t.target &&
  5350. ('childList' === t.type
  5351. ? (a(i.find(t.previousSibling, !1)),
  5352. [].forEach.call(t.addedNodes, function(t) {
  5353. var e = i.find(t, !1)
  5354. a(e, !1),
  5355. e instanceof o.default &&
  5356. e.children.forEach(function(t) {
  5357. a(t, !1)
  5358. })
  5359. }))
  5360. : 'attributes' === t.type && a(e.prev)),
  5361. a(e))
  5362. }),
  5363. this.children.forEach(s),
  5364. u = [].slice.call(this.observer.takeRecords()),
  5365. l = u.slice();
  5366. l.length > 0;
  5367. )
  5368. e.push(l.pop())
  5369. }
  5370. }),
  5371. (e.prototype.update = function(e, n) {
  5372. var r = this
  5373. void 0 === n && (n = {}),
  5374. (e = e || this.observer.takeRecords()),
  5375. e
  5376. .map(function(t) {
  5377. var e = i.find(t.target, !0)
  5378. return null == e
  5379. ? null
  5380. : null == e.domNode[i.DATA_KEY].mutations
  5381. ? ((e.domNode[i.DATA_KEY].mutations = [t]), e)
  5382. : (e.domNode[i.DATA_KEY].mutations.push(t), null)
  5383. })
  5384. .forEach(function(t) {
  5385. null != t && t !== r && null != t.domNode[i.DATA_KEY] && t.update(t.domNode[i.DATA_KEY].mutations || [], n)
  5386. }),
  5387. null != this.domNode[i.DATA_KEY].mutations && t.prototype.update.call(this, this.domNode[i.DATA_KEY].mutations, n),
  5388. this.optimize(e, n)
  5389. }),
  5390. (e.blotName = 'scroll'),
  5391. (e.defaultChild = 'block'),
  5392. (e.scope = i.Scope.BLOCK_BLOT),
  5393. (e.tagName = 'DIV'),
  5394. e
  5395. )
  5396. })(o.default)
  5397. e.default = a
  5398. },
  5399. function(t, e, n) {
  5400. 'use strict'
  5401. function r(t, e) {
  5402. if (Object.keys(t).length !== Object.keys(e).length) return !1
  5403. for (var n in t) if (t[n] !== e[n]) return !1
  5404. return !0
  5405. }
  5406. var o =
  5407. (this && this.__extends) ||
  5408. (function() {
  5409. var t =
  5410. Object.setPrototypeOf ||
  5411. ({ __proto__: [] } instanceof Array &&
  5412. function(t, e) {
  5413. t.__proto__ = e
  5414. }) ||
  5415. function(t, e) {
  5416. for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n])
  5417. }
  5418. return function(e, n) {
  5419. function r() {
  5420. this.constructor = e
  5421. }
  5422. t(e, n), (e.prototype = null === n ? Object.create(n) : ((r.prototype = n.prototype), new r()))
  5423. }
  5424. })()
  5425. Object.defineProperty(e, '__esModule', { value: !0 })
  5426. var i = n(18),
  5427. l = n(1),
  5428. a = (function(t) {
  5429. function e() {
  5430. return (null !== t && t.apply(this, arguments)) || this
  5431. }
  5432. return (
  5433. o(e, t),
  5434. (e.formats = function(n) {
  5435. if (n.tagName !== e.tagName) return t.formats.call(this, n)
  5436. }),
  5437. (e.prototype.format = function(n, r) {
  5438. var o = this
  5439. n !== this.statics.blotName || r
  5440. ? t.prototype.format.call(this, n, r)
  5441. : (this.children.forEach(function(t) {
  5442. t instanceof i.default || (t = t.wrap(e.blotName, !0)), o.attributes.copy(t)
  5443. }),
  5444. this.unwrap())
  5445. }),
  5446. (e.prototype.formatAt = function(e, n, r, o) {
  5447. if (null != this.formats()[r] || l.query(r, l.Scope.ATTRIBUTE)) {
  5448. this.isolate(e, n).format(r, o)
  5449. } else t.prototype.formatAt.call(this, e, n, r, o)
  5450. }),
  5451. (e.prototype.optimize = function(n) {
  5452. t.prototype.optimize.call(this, n)
  5453. var o = this.formats()
  5454. if (0 === Object.keys(o).length) return this.unwrap()
  5455. var i = this.next
  5456. i instanceof e && i.prev === this && r(o, i.formats()) && (i.moveChildren(this), i.remove())
  5457. }),
  5458. (e.blotName = 'inline'),
  5459. (e.scope = l.Scope.INLINE_BLOT),
  5460. (e.tagName = 'SPAN'),
  5461. e
  5462. )
  5463. })(i.default)
  5464. e.default = a
  5465. },
  5466. function(t, e, n) {
  5467. 'use strict'
  5468. var r =
  5469. (this && this.__extends) ||
  5470. (function() {
  5471. var t =
  5472. Object.setPrototypeOf ||
  5473. ({ __proto__: [] } instanceof Array &&
  5474. function(t, e) {
  5475. t.__proto__ = e
  5476. }) ||
  5477. function(t, e) {
  5478. for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n])
  5479. }
  5480. return function(e, n) {
  5481. function r() {
  5482. this.constructor = e
  5483. }
  5484. t(e, n), (e.prototype = null === n ? Object.create(n) : ((r.prototype = n.prototype), new r()))
  5485. }
  5486. })()
  5487. Object.defineProperty(e, '__esModule', { value: !0 })
  5488. var o = n(18),
  5489. i = n(1),
  5490. l = (function(t) {
  5491. function e() {
  5492. return (null !== t && t.apply(this, arguments)) || this
  5493. }
  5494. return (
  5495. r(e, t),
  5496. (e.formats = function(n) {
  5497. var r = i.query(e.blotName).tagName
  5498. if (n.tagName !== r) return t.formats.call(this, n)
  5499. }),
  5500. (e.prototype.format = function(n, r) {
  5501. null != i.query(n, i.Scope.BLOCK) && (n !== this.statics.blotName || r ? t.prototype.format.call(this, n, r) : this.replaceWith(e.blotName))
  5502. }),
  5503. (e.prototype.formatAt = function(e, n, r, o) {
  5504. null != i.query(r, i.Scope.BLOCK) ? this.format(r, o) : t.prototype.formatAt.call(this, e, n, r, o)
  5505. }),
  5506. (e.prototype.insertAt = function(e, n, r) {
  5507. if (null == r || null != i.query(n, i.Scope.INLINE)) t.prototype.insertAt.call(this, e, n, r)
  5508. else {
  5509. var o = this.split(e),
  5510. l = i.create(n, r)
  5511. o.parent.insertBefore(l, o)
  5512. }
  5513. }),
  5514. (e.prototype.update = function(e, n) {
  5515. navigator.userAgent.match(/Trident/) ? this.build() : t.prototype.update.call(this, e, n)
  5516. }),
  5517. (e.blotName = 'block'),
  5518. (e.scope = i.Scope.BLOCK_BLOT),
  5519. (e.tagName = 'P'),
  5520. e
  5521. )
  5522. })(o.default)
  5523. e.default = l
  5524. },
  5525. function(t, e, n) {
  5526. 'use strict'
  5527. var r =
  5528. (this && this.__extends) ||
  5529. (function() {
  5530. var t =
  5531. Object.setPrototypeOf ||
  5532. ({ __proto__: [] } instanceof Array &&
  5533. function(t, e) {
  5534. t.__proto__ = e
  5535. }) ||
  5536. function(t, e) {
  5537. for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n])
  5538. }
  5539. return function(e, n) {
  5540. function r() {
  5541. this.constructor = e
  5542. }
  5543. t(e, n), (e.prototype = null === n ? Object.create(n) : ((r.prototype = n.prototype), new r()))
  5544. }
  5545. })()
  5546. Object.defineProperty(e, '__esModule', { value: !0 })
  5547. var o = n(19),
  5548. i = (function(t) {
  5549. function e() {
  5550. return (null !== t && t.apply(this, arguments)) || this
  5551. }
  5552. return (
  5553. r(e, t),
  5554. (e.formats = function(t) {}),
  5555. (e.prototype.format = function(e, n) {
  5556. t.prototype.formatAt.call(this, 0, this.length(), e, n)
  5557. }),
  5558. (e.prototype.formatAt = function(e, n, r, o) {
  5559. 0 === e && n === this.length() ? this.format(r, o) : t.prototype.formatAt.call(this, e, n, r, o)
  5560. }),
  5561. (e.prototype.formats = function() {
  5562. return this.statics.formats(this.domNode)
  5563. }),
  5564. e
  5565. )
  5566. })(o.default)
  5567. e.default = i
  5568. },
  5569. function(t, e, n) {
  5570. 'use strict'
  5571. var r =
  5572. (this && this.__extends) ||
  5573. (function() {
  5574. var t =
  5575. Object.setPrototypeOf ||
  5576. ({ __proto__: [] } instanceof Array &&
  5577. function(t, e) {
  5578. t.__proto__ = e
  5579. }) ||
  5580. function(t, e) {
  5581. for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n])
  5582. }
  5583. return function(e, n) {
  5584. function r() {
  5585. this.constructor = e
  5586. }
  5587. t(e, n), (e.prototype = null === n ? Object.create(n) : ((r.prototype = n.prototype), new r()))
  5588. }
  5589. })()
  5590. Object.defineProperty(e, '__esModule', { value: !0 })
  5591. var o = n(19),
  5592. i = n(1),
  5593. l = (function(t) {
  5594. function e(e) {
  5595. var n = t.call(this, e) || this
  5596. return (n.text = n.statics.value(n.domNode)), n
  5597. }
  5598. return (
  5599. r(e, t),
  5600. (e.create = function(t) {
  5601. return document.createTextNode(t)
  5602. }),
  5603. (e.value = function(t) {
  5604. var e = t.data
  5605. return e.normalize && (e = e.normalize()), e
  5606. }),
  5607. (e.prototype.deleteAt = function(t, e) {
  5608. this.domNode.data = this.text = this.text.slice(0, t) + this.text.slice(t + e)
  5609. }),
  5610. (e.prototype.index = function(t, e) {
  5611. return this.domNode === t ? e : -1
  5612. }),
  5613. (e.prototype.insertAt = function(e, n, r) {
  5614. null == r ? ((this.text = this.text.slice(0, e) + n + this.text.slice(e)), (this.domNode.data = this.text)) : t.prototype.insertAt.call(this, e, n, r)
  5615. }),
  5616. (e.prototype.length = function() {
  5617. return this.text.length
  5618. }),
  5619. (e.prototype.optimize = function(n) {
  5620. t.prototype.optimize.call(this, n),
  5621. (this.text = this.statics.value(this.domNode)),
  5622. 0 === this.text.length ? this.remove() : this.next instanceof e && this.next.prev === this && (this.insertAt(this.length(), this.next.value()), this.next.remove())
  5623. }),
  5624. (e.prototype.position = function(t, e) {
  5625. return void 0 === e && (e = !1), [this.domNode, t]
  5626. }),
  5627. (e.prototype.split = function(t, e) {
  5628. if ((void 0 === e && (e = !1), !e)) {
  5629. if (0 === t) return this
  5630. if (t === this.length()) return this.next
  5631. }
  5632. var n = i.create(this.domNode.splitText(t))
  5633. return this.parent.insertBefore(n, this.next), (this.text = this.statics.value(this.domNode)), n
  5634. }),
  5635. (e.prototype.update = function(t, e) {
  5636. var n = this
  5637. t.some(function(t) {
  5638. return 'characterData' === t.type && t.target === n.domNode
  5639. }) && (this.text = this.statics.value(this.domNode))
  5640. }),
  5641. (e.prototype.value = function() {
  5642. return this.text
  5643. }),
  5644. (e.blotName = 'text'),
  5645. (e.scope = i.Scope.INLINE_BLOT),
  5646. e
  5647. )
  5648. })(o.default)
  5649. e.default = l
  5650. },
  5651. function(t, e, n) {
  5652. 'use strict'
  5653. var r = document.createElement('div')
  5654. if ((r.classList.toggle('test-class', !1), r.classList.contains('test-class'))) {
  5655. var o = DOMTokenList.prototype.toggle
  5656. DOMTokenList.prototype.toggle = function(t, e) {
  5657. return arguments.length > 1 && !this.contains(t) == !e ? e : o.call(this, t)
  5658. }
  5659. }
  5660. String.prototype.startsWith ||
  5661. (String.prototype.startsWith = function(t, e) {
  5662. return (e = e || 0), this.substr(e, t.length) === t
  5663. }),
  5664. String.prototype.endsWith ||
  5665. (String.prototype.endsWith = function(t, e) {
  5666. var n = this.toString()
  5667. ;('number' != typeof e || !isFinite(e) || Math.floor(e) !== e || e > n.length) && (e = n.length), (e -= t.length)
  5668. var r = n.indexOf(t, e)
  5669. return -1 !== r && r === e
  5670. }),
  5671. Array.prototype.find ||
  5672. Object.defineProperty(Array.prototype, 'find', {
  5673. value: function(t) {
  5674. if (null === this) throw new TypeError('Array.prototype.find called on null or undefined')
  5675. if ('function' != typeof t) throw new TypeError('predicate must be a function')
  5676. for (var e, n = Object(this), r = n.length >>> 0, o = arguments[1], i = 0; i < r; i++) if (((e = n[i]), t.call(o, e, i, n))) return e
  5677. }
  5678. }),
  5679. document.addEventListener('DOMContentLoaded', function() {
  5680. document.execCommand('enableObjectResizing', !1, !1), document.execCommand('autoUrlDetect', !1, !1)
  5681. })
  5682. },
  5683. function(t, e) {
  5684. function n(t, e, n) {
  5685. if (t == e) return t ? [[v, t]] : []
  5686. ;(n < 0 || t.length < n) && (n = null)
  5687. var o = l(t, e),
  5688. i = t.substring(0, o)
  5689. ;(t = t.substring(o)), (e = e.substring(o)), (o = a(t, e))
  5690. var s = t.substring(t.length - o)
  5691. ;(t = t.substring(0, t.length - o)), (e = e.substring(0, e.length - o))
  5692. var c = r(t, e)
  5693. return i && c.unshift([v, i]), s && c.push([v, s]), u(c), null != n && (c = f(c, n)), (c = h(c))
  5694. }
  5695. function r(t, e) {
  5696. var r
  5697. if (!t) return [[y, e]]
  5698. if (!e) return [[d, t]]
  5699. var i = t.length > e.length ? t : e,
  5700. l = t.length > e.length ? e : t,
  5701. a = i.indexOf(l)
  5702. if (-1 != a)
  5703. return (
  5704. (r = [
  5705. [y, i.substring(0, a)],
  5706. [v, l],
  5707. [y, i.substring(a + l.length)]
  5708. ]),
  5709. t.length > e.length && (r[0][0] = r[2][0] = d),
  5710. r
  5711. )
  5712. if (1 == l.length)
  5713. return [
  5714. [d, t],
  5715. [y, e]
  5716. ]
  5717. var u = s(t, e)
  5718. if (u) {
  5719. var c = u[0],
  5720. f = u[1],
  5721. h = u[2],
  5722. p = u[3],
  5723. b = u[4],
  5724. g = n(c, h),
  5725. m = n(f, p)
  5726. return g.concat([[v, b]], m)
  5727. }
  5728. return o(t, e)
  5729. }
  5730. function o(t, e) {
  5731. for (var n = t.length, r = e.length, o = Math.ceil((n + r) / 2), l = o, a = 2 * o, s = new Array(a), u = new Array(a), c = 0; c < a; c++) (s[c] = -1), (u[c] = -1)
  5732. ;(s[l + 1] = 0), (u[l + 1] = 0)
  5733. for (var f = n - r, h = f % 2 != 0, p = 0, v = 0, b = 0, g = 0, m = 0; m < o; m++) {
  5734. for (var _ = -m + p; _ <= m - v; _ += 2) {
  5735. var O,
  5736. w = l + _
  5737. O = _ == -m || (_ != m && s[w - 1] < s[w + 1]) ? s[w + 1] : s[w - 1] + 1
  5738. for (var x = O - _; O < n && x < r && t.charAt(O) == e.charAt(x); ) O++, x++
  5739. if (((s[w] = O), O > n)) v += 2
  5740. else if (x > r) p += 2
  5741. else if (h) {
  5742. var k = l + f - _
  5743. if (k >= 0 && k < a && -1 != u[k]) {
  5744. var E = n - u[k]
  5745. if (O >= E) return i(t, e, O, x)
  5746. }
  5747. }
  5748. }
  5749. for (var N = -m + b; N <= m - g; N += 2) {
  5750. var E,
  5751. k = l + N
  5752. E = N == -m || (N != m && u[k - 1] < u[k + 1]) ? u[k + 1] : u[k - 1] + 1
  5753. for (var j = E - N; E < n && j < r && t.charAt(n - E - 1) == e.charAt(r - j - 1); ) E++, j++
  5754. if (((u[k] = E), E > n)) g += 2
  5755. else if (j > r) b += 2
  5756. else if (!h) {
  5757. var w = l + f - N
  5758. if (w >= 0 && w < a && -1 != s[w]) {
  5759. var O = s[w],
  5760. x = l + O - w
  5761. if (((E = n - E), O >= E)) return i(t, e, O, x)
  5762. }
  5763. }
  5764. }
  5765. }
  5766. return [
  5767. [d, t],
  5768. [y, e]
  5769. ]
  5770. }
  5771. function i(t, e, r, o) {
  5772. var i = t.substring(0, r),
  5773. l = e.substring(0, o),
  5774. a = t.substring(r),
  5775. s = e.substring(o),
  5776. u = n(i, l),
  5777. c = n(a, s)
  5778. return u.concat(c)
  5779. }
  5780. function l(t, e) {
  5781. if (!t || !e || t.charAt(0) != e.charAt(0)) return 0
  5782. for (var n = 0, r = Math.min(t.length, e.length), o = r, i = 0; n < o; ) t.substring(i, o) == e.substring(i, o) ? ((n = o), (i = n)) : (r = o), (o = Math.floor((r - n) / 2 + n))
  5783. return o
  5784. }
  5785. function a(t, e) {
  5786. if (!t || !e || t.charAt(t.length - 1) != e.charAt(e.length - 1)) return 0
  5787. for (var n = 0, r = Math.min(t.length, e.length), o = r, i = 0; n < o; )
  5788. t.substring(t.length - o, t.length - i) == e.substring(e.length - o, e.length - i) ? ((n = o), (i = n)) : (r = o), (o = Math.floor((r - n) / 2 + n))
  5789. return o
  5790. }
  5791. function s(t, e) {
  5792. function n(t, e, n) {
  5793. for (var r, o, i, s, u = t.substring(n, n + Math.floor(t.length / 4)), c = -1, f = ''; -1 != (c = e.indexOf(u, c + 1)); ) {
  5794. var h = l(t.substring(n), e.substring(c)),
  5795. p = a(t.substring(0, n), e.substring(0, c))
  5796. f.length < p + h &&
  5797. ((f = e.substring(c - p, c) + e.substring(c, c + h)), (r = t.substring(0, n - p)), (o = t.substring(n + h)), (i = e.substring(0, c - p)), (s = e.substring(c + h)))
  5798. }
  5799. return 2 * f.length >= t.length ? [r, o, i, s, f] : null
  5800. }
  5801. var r = t.length > e.length ? t : e,
  5802. o = t.length > e.length ? e : t
  5803. if (r.length < 4 || 2 * o.length < r.length) return null
  5804. var i,
  5805. s = n(r, o, Math.ceil(r.length / 4)),
  5806. u = n(r, o, Math.ceil(r.length / 2))
  5807. if (!s && !u) return null
  5808. i = u ? (s && s[4].length > u[4].length ? s : u) : s
  5809. var c, f, h, p
  5810. return t.length > e.length ? ((c = i[0]), (f = i[1]), (h = i[2]), (p = i[3])) : ((h = i[0]), (p = i[1]), (c = i[2]), (f = i[3])), [c, f, h, p, i[4]]
  5811. }
  5812. function u(t) {
  5813. t.push([v, ''])
  5814. for (var e, n = 0, r = 0, o = 0, i = '', s = ''; n < t.length; )
  5815. switch (t[n][0]) {
  5816. case y:
  5817. o++, (s += t[n][1]), n++
  5818. break
  5819. case d:
  5820. r++, (i += t[n][1]), n++
  5821. break
  5822. case v:
  5823. r + o > 1
  5824. ? (0 !== r &&
  5825. 0 !== o &&
  5826. ((e = l(s, i)),
  5827. 0 !== e &&
  5828. (n - r - o > 0 && t[n - r - o - 1][0] == v ? (t[n - r - o - 1][1] += s.substring(0, e)) : (t.splice(0, 0, [v, s.substring(0, e)]), n++),
  5829. (s = s.substring(e)),
  5830. (i = i.substring(e))),
  5831. 0 !== (e = a(s, i)) && ((t[n][1] = s.substring(s.length - e) + t[n][1]), (s = s.substring(0, s.length - e)), (i = i.substring(0, i.length - e)))),
  5832. 0 === r ? t.splice(n - o, r + o, [y, s]) : 0 === o ? t.splice(n - r, r + o, [d, i]) : t.splice(n - r - o, r + o, [d, i], [y, s]),
  5833. (n = n - r - o + (r ? 1 : 0) + (o ? 1 : 0) + 1))
  5834. : 0 !== n && t[n - 1][0] == v
  5835. ? ((t[n - 1][1] += t[n][1]), t.splice(n, 1))
  5836. : n++,
  5837. (o = 0),
  5838. (r = 0),
  5839. (i = ''),
  5840. (s = '')
  5841. }
  5842. '' === t[t.length - 1][1] && t.pop()
  5843. var c = !1
  5844. for (n = 1; n < t.length - 1; )
  5845. t[n - 1][0] == v &&
  5846. t[n + 1][0] == v &&
  5847. (t[n][1].substring(t[n][1].length - t[n - 1][1].length) == t[n - 1][1]
  5848. ? ((t[n][1] = t[n - 1][1] + t[n][1].substring(0, t[n][1].length - t[n - 1][1].length)), (t[n + 1][1] = t[n - 1][1] + t[n + 1][1]), t.splice(n - 1, 1), (c = !0))
  5849. : t[n][1].substring(0, t[n + 1][1].length) == t[n + 1][1] &&
  5850. ((t[n - 1][1] += t[n + 1][1]), (t[n][1] = t[n][1].substring(t[n + 1][1].length) + t[n + 1][1]), t.splice(n + 1, 1), (c = !0))),
  5851. n++
  5852. c && u(t)
  5853. }
  5854. function c(t, e) {
  5855. if (0 === e) return [v, t]
  5856. for (var n = 0, r = 0; r < t.length; r++) {
  5857. var o = t[r]
  5858. if (o[0] === d || o[0] === v) {
  5859. var i = n + o[1].length
  5860. if (e === i) return [r + 1, t]
  5861. if (e < i) {
  5862. t = t.slice()
  5863. var l = e - n,
  5864. a = [o[0], o[1].slice(0, l)],
  5865. s = [o[0], o[1].slice(l)]
  5866. return t.splice(r, 1, a, s), [r + 1, t]
  5867. }
  5868. n = i
  5869. }
  5870. }
  5871. throw new Error('cursor_pos is out of bounds!')
  5872. }
  5873. function f(t, e) {
  5874. var n = c(t, e),
  5875. r = n[1],
  5876. o = n[0],
  5877. i = r[o],
  5878. l = r[o + 1]
  5879. if (null == i) return t
  5880. if (i[0] !== v) return t
  5881. if (null != l && i[1] + l[1] === l[1] + i[1]) return r.splice(o, 2, l, i), p(r, o, 2)
  5882. if (null != l && 0 === l[1].indexOf(i[1])) {
  5883. r.splice(o, 2, [l[0], i[1]], [0, i[1]])
  5884. var a = l[1].slice(i[1].length)
  5885. return a.length > 0 && r.splice(o + 2, 0, [l[0], a]), p(r, o, 3)
  5886. }
  5887. return t
  5888. }
  5889. function h(t) {
  5890. for (
  5891. var e = !1,
  5892. n = function(t) {
  5893. return t.charCodeAt(0) >= 56320 && t.charCodeAt(0) <= 57343
  5894. },
  5895. r = 2;
  5896. r < t.length;
  5897. r += 1
  5898. )
  5899. t[r - 2][0] === v &&
  5900. (function(t) {
  5901. return t.charCodeAt(t.length - 1) >= 55296 && t.charCodeAt(t.length - 1) <= 56319
  5902. })(t[r - 2][1]) &&
  5903. t[r - 1][0] === d &&
  5904. n(t[r - 1][1]) &&
  5905. t[r][0] === y &&
  5906. n(t[r][1]) &&
  5907. ((e = !0), (t[r - 1][1] = t[r - 2][1].slice(-1) + t[r - 1][1]), (t[r][1] = t[r - 2][1].slice(-1) + t[r][1]), (t[r - 2][1] = t[r - 2][1].slice(0, -1)))
  5908. if (!e) return t
  5909. for (var o = [], r = 0; r < t.length; r += 1) t[r][1].length > 0 && o.push(t[r])
  5910. return o
  5911. }
  5912. function p(t, e, n) {
  5913. for (var r = e + n - 1; r >= 0 && r >= e - 1; r--)
  5914. if (r + 1 < t.length) {
  5915. var o = t[r],
  5916. i = t[r + 1]
  5917. o[0] === i[1] && t.splice(r, 2, [o[0], o[1] + i[1]])
  5918. }
  5919. return t
  5920. }
  5921. var d = -1,
  5922. y = 1,
  5923. v = 0,
  5924. b = n
  5925. ;(b.INSERT = y), (b.DELETE = d), (b.EQUAL = v), (t.exports = b)
  5926. },
  5927. function(t, e) {
  5928. function n(t) {
  5929. var e = []
  5930. for (var n in t) e.push(n)
  5931. return e
  5932. }
  5933. ;(e = t.exports = 'function' == typeof Object.keys ? Object.keys : n), (e.shim = n)
  5934. },
  5935. function(t, e) {
  5936. function n(t) {
  5937. return '[object Arguments]' == Object.prototype.toString.call(t)
  5938. }
  5939. function r(t) {
  5940. return (t && 'object' == typeof t && 'number' == typeof t.length && Object.prototype.hasOwnProperty.call(t, 'callee') && !Object.prototype.propertyIsEnumerable.call(t, 'callee')) || !1
  5941. }
  5942. var o =
  5943. '[object Arguments]' ==
  5944. (function() {
  5945. return Object.prototype.toString.call(arguments)
  5946. })()
  5947. ;(e = t.exports = o ? n : r), (e.supported = n), (e.unsupported = r)
  5948. },
  5949. function(t, e, n) {
  5950. 'use strict'
  5951. function r(t) {
  5952. return t && t.__esModule ? t : { default: t }
  5953. }
  5954. function o(t, e, n) {
  5955. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : (t[e] = n), t
  5956. }
  5957. function i(t, e) {
  5958. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  5959. }
  5960. function l(t, e) {
  5961. return Object.keys(e).reduce(function(n, r) {
  5962. return null == t[r] ? n : (e[r] === t[r] ? (n[r] = e[r]) : Array.isArray(e[r]) ? e[r].indexOf(t[r]) < 0 && (n[r] = e[r].concat([t[r]])) : (n[r] = [e[r], t[r]]), n)
  5963. }, {})
  5964. }
  5965. function a(t) {
  5966. return t.reduce(function(t, e) {
  5967. if (1 === e.insert) {
  5968. var n = (0, N.default)(e.attributes)
  5969. return delete n.image, t.insert({ image: e.attributes.image }, n)
  5970. }
  5971. if (
  5972. (null == e.attributes ||
  5973. (!0 !== e.attributes.list && !0 !== e.attributes.bullet) ||
  5974. ((e = (0, N.default)(e)), e.attributes.list ? (e.attributes.list = 'ordered') : ((e.attributes.list = 'bullet'), delete e.attributes.bullet)),
  5975. 'string' == typeof e.insert)
  5976. ) {
  5977. var r = e.insert.replace(/\r\n/g, '\n').replace(/\r/g, '\n')
  5978. return t.insert(r, e.attributes)
  5979. }
  5980. return t.push(e)
  5981. }, new h.default())
  5982. }
  5983. Object.defineProperty(e, '__esModule', { value: !0 })
  5984. var s =
  5985. 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator
  5986. ? function(t) {
  5987. return typeof t
  5988. }
  5989. : function(t) {
  5990. return t && 'function' == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? 'symbol' : typeof t
  5991. },
  5992. u = (function() {
  5993. function t(t, e) {
  5994. var n = [],
  5995. r = !0,
  5996. o = !1,
  5997. i = void 0
  5998. try {
  5999. for (var l, a = t[Symbol.iterator](); !(r = (l = a.next()).done) && (n.push(l.value), !e || n.length !== e); r = !0);
  6000. } catch (t) {
  6001. ;(o = !0), (i = t)
  6002. } finally {
  6003. try {
  6004. !r && a.return && a.return()
  6005. } finally {
  6006. if (o) throw i
  6007. }
  6008. }
  6009. return n
  6010. }
  6011. return function(e, n) {
  6012. if (Array.isArray(e)) return e
  6013. if (Symbol.iterator in Object(e)) return t(e, n)
  6014. throw new TypeError('Invalid attempt to destructure non-iterable instance')
  6015. }
  6016. })(),
  6017. c = (function() {
  6018. function t(t, e) {
  6019. for (var n = 0; n < e.length; n++) {
  6020. var r = e[n]
  6021. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  6022. }
  6023. }
  6024. return function(e, n, r) {
  6025. return n && t(e.prototype, n), r && t(e, r), e
  6026. }
  6027. })(),
  6028. f = n(4),
  6029. h = r(f),
  6030. p = n(20),
  6031. d = r(p),
  6032. y = n(0),
  6033. v = r(y),
  6034. b = n(13),
  6035. g = r(b),
  6036. m = n(31),
  6037. _ = r(m),
  6038. O = n(3),
  6039. w = r(O),
  6040. x = n(14),
  6041. k = r(x),
  6042. E = n(21),
  6043. N = r(E),
  6044. j = n(12),
  6045. A = r(j),
  6046. q = n(2),
  6047. T = r(q),
  6048. P = /^[ -~]*$/,
  6049. S = (function() {
  6050. function t(e) {
  6051. i(this, t), (this.scroll = e), (this.delta = this.getDelta())
  6052. }
  6053. return (
  6054. c(t, [
  6055. {
  6056. key: 'applyDelta',
  6057. value: function(t) {
  6058. var e = this,
  6059. n = !1
  6060. this.scroll.update()
  6061. var r = this.scroll.length()
  6062. return (
  6063. this.scroll.batchStart(),
  6064. (t = a(t)),
  6065. t.reduce(function(t, o) {
  6066. var i = o.retain || o.delete || o.insert.length || 1,
  6067. l = o.attributes || {}
  6068. if (null != o.insert) {
  6069. if ('string' == typeof o.insert) {
  6070. var a = o.insert
  6071. a.endsWith('\n') && n && ((n = !1), (a = a.slice(0, -1))), t >= r && !a.endsWith('\n') && (n = !0), e.scroll.insertAt(t, a)
  6072. var c = e.scroll.line(t),
  6073. f = u(c, 2),
  6074. h = f[0],
  6075. p = f[1],
  6076. y = (0, T.default)({}, (0, O.bubbleFormats)(h))
  6077. if (h instanceof w.default) {
  6078. var b = h.descendant(v.default.Leaf, p),
  6079. g = u(b, 1),
  6080. m = g[0]
  6081. y = (0, T.default)(y, (0, O.bubbleFormats)(m))
  6082. }
  6083. l = d.default.attributes.diff(y, l) || {}
  6084. } else if ('object' === s(o.insert)) {
  6085. var _ = Object.keys(o.insert)[0]
  6086. if (null == _) return t
  6087. e.scroll.insertAt(t, _, o.insert[_])
  6088. }
  6089. r += i
  6090. }
  6091. return (
  6092. Object.keys(l).forEach(function(n) {
  6093. e.scroll.formatAt(t, i, n, l[n])
  6094. }),
  6095. t + i
  6096. )
  6097. }, 0),
  6098. t.reduce(function(t, n) {
  6099. return 'number' == typeof n.delete ? (e.scroll.deleteAt(t, n.delete), t) : t + (n.retain || n.insert.length || 1)
  6100. }, 0),
  6101. this.scroll.batchEnd(),
  6102. this.update(t)
  6103. )
  6104. }
  6105. },
  6106. {
  6107. key: 'deleteText',
  6108. value: function(t, e) {
  6109. return this.scroll.deleteAt(t, e), this.update(new h.default().retain(t).delete(e))
  6110. }
  6111. },
  6112. {
  6113. key: 'formatLine',
  6114. value: function(t, e) {
  6115. var n = this,
  6116. r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}
  6117. return (
  6118. this.scroll.update(),
  6119. Object.keys(r).forEach(function(o) {
  6120. if (null == n.scroll.whitelist || n.scroll.whitelist[o]) {
  6121. var i = n.scroll.lines(t, Math.max(e, 1)),
  6122. l = e
  6123. i.forEach(function(e) {
  6124. var i = e.length()
  6125. if (e instanceof g.default) {
  6126. var a = t - e.offset(n.scroll),
  6127. s = e.newlineIndex(a + l) - a + 1
  6128. e.formatAt(a, s, o, r[o])
  6129. } else e.format(o, r[o])
  6130. l -= i
  6131. })
  6132. }
  6133. }),
  6134. this.scroll.optimize(),
  6135. this.update(new h.default().retain(t).retain(e, (0, N.default)(r)))
  6136. )
  6137. }
  6138. },
  6139. {
  6140. key: 'formatText',
  6141. value: function(t, e) {
  6142. var n = this,
  6143. r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}
  6144. return (
  6145. Object.keys(r).forEach(function(o) {
  6146. n.scroll.formatAt(t, e, o, r[o])
  6147. }),
  6148. this.update(new h.default().retain(t).retain(e, (0, N.default)(r)))
  6149. )
  6150. }
  6151. },
  6152. {
  6153. key: 'getContents',
  6154. value: function(t, e) {
  6155. return this.delta.slice(t, t + e)
  6156. }
  6157. },
  6158. {
  6159. key: 'getDelta',
  6160. value: function() {
  6161. return this.scroll.lines().reduce(function(t, e) {
  6162. return t.concat(e.delta())
  6163. }, new h.default())
  6164. }
  6165. },
  6166. {
  6167. key: 'getFormat',
  6168. value: function(t) {
  6169. var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0,
  6170. n = [],
  6171. r = []
  6172. 0 === e
  6173. ? this.scroll.path(t).forEach(function(t) {
  6174. var e = u(t, 1),
  6175. o = e[0]
  6176. o instanceof w.default ? n.push(o) : o instanceof v.default.Leaf && r.push(o)
  6177. })
  6178. : ((n = this.scroll.lines(t, e)), (r = this.scroll.descendants(v.default.Leaf, t, e)))
  6179. var o = [n, r].map(function(t) {
  6180. if (0 === t.length) return {}
  6181. for (var e = (0, O.bubbleFormats)(t.shift()); Object.keys(e).length > 0; ) {
  6182. var n = t.shift()
  6183. if (null == n) return e
  6184. e = l((0, O.bubbleFormats)(n), e)
  6185. }
  6186. return e
  6187. })
  6188. return T.default.apply(T.default, o)
  6189. }
  6190. },
  6191. {
  6192. key: 'getText',
  6193. value: function(t, e) {
  6194. return this.getContents(t, e)
  6195. .filter(function(t) {
  6196. return 'string' == typeof t.insert
  6197. })
  6198. .map(function(t) {
  6199. return t.insert
  6200. })
  6201. .join('')
  6202. }
  6203. },
  6204. {
  6205. key: 'insertEmbed',
  6206. value: function(t, e, n) {
  6207. return this.scroll.insertAt(t, e, n), this.update(new h.default().retain(t).insert(o({}, e, n)))
  6208. }
  6209. },
  6210. {
  6211. key: 'insertText',
  6212. value: function(t, e) {
  6213. var n = this,
  6214. r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}
  6215. return (
  6216. (e = e.replace(/\r\n/g, '\n').replace(/\r/g, '\n')),
  6217. this.scroll.insertAt(t, e),
  6218. Object.keys(r).forEach(function(o) {
  6219. n.scroll.formatAt(t, e.length, o, r[o])
  6220. }),
  6221. this.update(new h.default().retain(t).insert(e, (0, N.default)(r)))
  6222. )
  6223. }
  6224. },
  6225. {
  6226. key: 'isBlank',
  6227. value: function() {
  6228. if (0 == this.scroll.children.length) return !0
  6229. if (this.scroll.children.length > 1) return !1
  6230. var t = this.scroll.children.head
  6231. return t.statics.blotName === w.default.blotName && !(t.children.length > 1) && t.children.head instanceof k.default
  6232. }
  6233. },
  6234. {
  6235. key: 'removeFormat',
  6236. value: function(t, e) {
  6237. var n = this.getText(t, e),
  6238. r = this.scroll.line(t + e),
  6239. o = u(r, 2),
  6240. i = o[0],
  6241. l = o[1],
  6242. a = 0,
  6243. s = new h.default()
  6244. null != i &&
  6245. ((a = i instanceof g.default ? i.newlineIndex(l) - l + 1 : i.length() - l),
  6246. (s = i
  6247. .delta()
  6248. .slice(l, l + a - 1)
  6249. .insert('\n')))
  6250. var c = this.getContents(t, e + a),
  6251. f = c.diff(new h.default().insert(n).concat(s)),
  6252. p = new h.default().retain(t).concat(f)
  6253. return this.applyDelta(p)
  6254. }
  6255. },
  6256. {
  6257. key: 'update',
  6258. value: function(t) {
  6259. var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : [],
  6260. n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : void 0,
  6261. r = this.delta
  6262. if (1 === e.length && 'characterData' === e[0].type && e[0].target.data.match(P) && v.default.find(e[0].target)) {
  6263. var o = v.default.find(e[0].target),
  6264. i = (0, O.bubbleFormats)(o),
  6265. l = o.offset(this.scroll),
  6266. a = e[0].oldValue.replace(_.default.CONTENTS, ''),
  6267. s = new h.default().insert(a),
  6268. u = new h.default().insert(o.value())
  6269. ;(t = new h.default()
  6270. .retain(l)
  6271. .concat(s.diff(u, n))
  6272. .reduce(function(t, e) {
  6273. return e.insert ? t.insert(e.insert, i) : t.push(e)
  6274. }, new h.default())),
  6275. (this.delta = r.compose(t))
  6276. } else (this.delta = this.getDelta()), (t && (0, A.default)(r.compose(t), this.delta)) || (t = r.diff(this.delta, n))
  6277. return t
  6278. }
  6279. }
  6280. ]),
  6281. t
  6282. )
  6283. })()
  6284. e.default = S
  6285. },
  6286. function(t, e) {
  6287. 'use strict'
  6288. function n() {}
  6289. function r(t, e, n) {
  6290. ;(this.fn = t), (this.context = e), (this.once = n || !1)
  6291. }
  6292. function o() {
  6293. ;(this._events = new n()), (this._eventsCount = 0)
  6294. }
  6295. var i = Object.prototype.hasOwnProperty,
  6296. l = '~'
  6297. Object.create && ((n.prototype = Object.create(null)), new n().__proto__ || (l = !1)),
  6298. (o.prototype.eventNames = function() {
  6299. var t,
  6300. e,
  6301. n = []
  6302. if (0 === this._eventsCount) return n
  6303. for (e in (t = this._events)) i.call(t, e) && n.push(l ? e.slice(1) : e)
  6304. return Object.getOwnPropertySymbols ? n.concat(Object.getOwnPropertySymbols(t)) : n
  6305. }),
  6306. (o.prototype.listeners = function(t, e) {
  6307. var n = l ? l + t : t,
  6308. r = this._events[n]
  6309. if (e) return !!r
  6310. if (!r) return []
  6311. if (r.fn) return [r.fn]
  6312. for (var o = 0, i = r.length, a = new Array(i); o < i; o++) a[o] = r[o].fn
  6313. return a
  6314. }),
  6315. (o.prototype.emit = function(t, e, n, r, o, i) {
  6316. var a = l ? l + t : t
  6317. if (!this._events[a]) return !1
  6318. var s,
  6319. u,
  6320. c = this._events[a],
  6321. f = arguments.length
  6322. if (c.fn) {
  6323. switch ((c.once && this.removeListener(t, c.fn, void 0, !0), f)) {
  6324. case 1:
  6325. return c.fn.call(c.context), !0
  6326. case 2:
  6327. return c.fn.call(c.context, e), !0
  6328. case 3:
  6329. return c.fn.call(c.context, e, n), !0
  6330. case 4:
  6331. return c.fn.call(c.context, e, n, r), !0
  6332. case 5:
  6333. return c.fn.call(c.context, e, n, r, o), !0
  6334. case 6:
  6335. return c.fn.call(c.context, e, n, r, o, i), !0
  6336. }
  6337. for (u = 1, s = new Array(f - 1); u < f; u++) s[u - 1] = arguments[u]
  6338. c.fn.apply(c.context, s)
  6339. } else {
  6340. var h,
  6341. p = c.length
  6342. for (u = 0; u < p; u++)
  6343. switch ((c[u].once && this.removeListener(t, c[u].fn, void 0, !0), f)) {
  6344. case 1:
  6345. c[u].fn.call(c[u].context)
  6346. break
  6347. case 2:
  6348. c[u].fn.call(c[u].context, e)
  6349. break
  6350. case 3:
  6351. c[u].fn.call(c[u].context, e, n)
  6352. break
  6353. case 4:
  6354. c[u].fn.call(c[u].context, e, n, r)
  6355. break
  6356. default:
  6357. if (!s) for (h = 1, s = new Array(f - 1); h < f; h++) s[h - 1] = arguments[h]
  6358. c[u].fn.apply(c[u].context, s)
  6359. }
  6360. }
  6361. return !0
  6362. }),
  6363. (o.prototype.on = function(t, e, n) {
  6364. var o = new r(e, n || this),
  6365. i = l ? l + t : t
  6366. return this._events[i] ? (this._events[i].fn ? (this._events[i] = [this._events[i], o]) : this._events[i].push(o)) : ((this._events[i] = o), this._eventsCount++), this
  6367. }),
  6368. (o.prototype.once = function(t, e, n) {
  6369. var o = new r(e, n || this, !0),
  6370. i = l ? l + t : t
  6371. return this._events[i] ? (this._events[i].fn ? (this._events[i] = [this._events[i], o]) : this._events[i].push(o)) : ((this._events[i] = o), this._eventsCount++), this
  6372. }),
  6373. (o.prototype.removeListener = function(t, e, r, o) {
  6374. var i = l ? l + t : t
  6375. if (!this._events[i]) return this
  6376. if (!e) return 0 == --this._eventsCount ? (this._events = new n()) : delete this._events[i], this
  6377. var a = this._events[i]
  6378. if (a.fn) a.fn !== e || (o && !a.once) || (r && a.context !== r) || (0 == --this._eventsCount ? (this._events = new n()) : delete this._events[i])
  6379. else {
  6380. for (var s = 0, u = [], c = a.length; s < c; s++) (a[s].fn !== e || (o && !a[s].once) || (r && a[s].context !== r)) && u.push(a[s])
  6381. u.length ? (this._events[i] = 1 === u.length ? u[0] : u) : 0 == --this._eventsCount ? (this._events = new n()) : delete this._events[i]
  6382. }
  6383. return this
  6384. }),
  6385. (o.prototype.removeAllListeners = function(t) {
  6386. var e
  6387. return (
  6388. t
  6389. ? ((e = l ? l + t : t), this._events[e] && (0 == --this._eventsCount ? (this._events = new n()) : delete this._events[e]))
  6390. : ((this._events = new n()), (this._eventsCount = 0)),
  6391. this
  6392. )
  6393. }),
  6394. (o.prototype.off = o.prototype.removeListener),
  6395. (o.prototype.addListener = o.prototype.on),
  6396. (o.prototype.setMaxListeners = function() {
  6397. return this
  6398. }),
  6399. (o.prefixed = l),
  6400. (o.EventEmitter = o),
  6401. void 0 !== t && (t.exports = o)
  6402. },
  6403. function(t, e, n) {
  6404. 'use strict'
  6405. function r(t) {
  6406. return t && t.__esModule ? t : { default: t }
  6407. }
  6408. function o(t, e) {
  6409. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  6410. }
  6411. function i(t, e) {
  6412. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  6413. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  6414. }
  6415. function l(t, e) {
  6416. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  6417. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  6418. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  6419. }
  6420. function a(t) {
  6421. return t instanceof v.default || t instanceof y.BlockEmbed
  6422. }
  6423. Object.defineProperty(e, '__esModule', { value: !0 })
  6424. var s = (function() {
  6425. function t(t, e) {
  6426. var n = [],
  6427. r = !0,
  6428. o = !1,
  6429. i = void 0
  6430. try {
  6431. for (var l, a = t[Symbol.iterator](); !(r = (l = a.next()).done) && (n.push(l.value), !e || n.length !== e); r = !0);
  6432. } catch (t) {
  6433. ;(o = !0), (i = t)
  6434. } finally {
  6435. try {
  6436. !r && a.return && a.return()
  6437. } finally {
  6438. if (o) throw i
  6439. }
  6440. }
  6441. return n
  6442. }
  6443. return function(e, n) {
  6444. if (Array.isArray(e)) return e
  6445. if (Symbol.iterator in Object(e)) return t(e, n)
  6446. throw new TypeError('Invalid attempt to destructure non-iterable instance')
  6447. }
  6448. })(),
  6449. u = (function() {
  6450. function t(t, e) {
  6451. for (var n = 0; n < e.length; n++) {
  6452. var r = e[n]
  6453. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  6454. }
  6455. }
  6456. return function(e, n, r) {
  6457. return n && t(e.prototype, n), r && t(e, r), e
  6458. }
  6459. })(),
  6460. c = function t(e, n, r) {
  6461. null === e && (e = Function.prototype)
  6462. var o = Object.getOwnPropertyDescriptor(e, n)
  6463. if (void 0 === o) {
  6464. var i = Object.getPrototypeOf(e)
  6465. return null === i ? void 0 : t(i, n, r)
  6466. }
  6467. if ('value' in o) return o.value
  6468. var l = o.get
  6469. if (void 0 !== l) return l.call(r)
  6470. },
  6471. f = n(0),
  6472. h = r(f),
  6473. p = n(9),
  6474. d = r(p),
  6475. y = n(3),
  6476. v = r(y),
  6477. b = n(14),
  6478. g = r(b),
  6479. m = n(13),
  6480. _ = r(m),
  6481. O = n(23),
  6482. w = r(O),
  6483. x = (function(t) {
  6484. function e(t, n) {
  6485. o(this, e)
  6486. var r = i(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t))
  6487. return (
  6488. (r.emitter = n.emitter),
  6489. Array.isArray(n.whitelist) &&
  6490. (r.whitelist = n.whitelist.reduce(function(t, e) {
  6491. return (t[e] = !0), t
  6492. }, {})),
  6493. r.domNode.addEventListener('DOMNodeInserted', function() {}),
  6494. r.optimize(),
  6495. r.enable(),
  6496. r
  6497. )
  6498. }
  6499. return (
  6500. l(e, t),
  6501. u(e, [
  6502. {
  6503. key: 'batchStart',
  6504. value: function() {
  6505. this.batch = !0
  6506. }
  6507. },
  6508. {
  6509. key: 'batchEnd',
  6510. value: function() {
  6511. ;(this.batch = !1), this.optimize()
  6512. }
  6513. },
  6514. {
  6515. key: 'deleteAt',
  6516. value: function(t, n) {
  6517. var r = this.line(t),
  6518. o = s(r, 2),
  6519. i = o[0],
  6520. l = o[1],
  6521. a = this.line(t + n),
  6522. u = s(a, 1),
  6523. f = u[0]
  6524. if ((c(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'deleteAt', this).call(this, t, n), null != f && i !== f && l > 0)) {
  6525. if (i instanceof y.BlockEmbed || f instanceof y.BlockEmbed) return void this.optimize()
  6526. if (i instanceof _.default) {
  6527. var h = i.newlineIndex(i.length(), !0)
  6528. if (h > -1 && (i = i.split(h + 1)) === f) return void this.optimize()
  6529. } else if (f instanceof _.default) {
  6530. var p = f.newlineIndex(0)
  6531. p > -1 && f.split(p + 1)
  6532. }
  6533. var d = f.children.head instanceof g.default ? null : f.children.head
  6534. i.moveChildren(f, d), i.remove()
  6535. }
  6536. this.optimize()
  6537. }
  6538. },
  6539. {
  6540. key: 'enable',
  6541. value: function() {
  6542. var t = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0]
  6543. this.domNode.setAttribute('contenteditable', t)
  6544. }
  6545. },
  6546. {
  6547. key: 'formatAt',
  6548. value: function(t, n, r, o) {
  6549. ;(null == this.whitelist || this.whitelist[r]) &&
  6550. (c(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'formatAt', this).call(this, t, n, r, o), this.optimize())
  6551. }
  6552. },
  6553. {
  6554. key: 'insertAt',
  6555. value: function(t, n, r) {
  6556. if (null == r || null == this.whitelist || this.whitelist[n]) {
  6557. if (t >= this.length())
  6558. if (null == r || null == h.default.query(n, h.default.Scope.BLOCK)) {
  6559. var o = h.default.create(this.statics.defaultChild)
  6560. this.appendChild(o), null == r && n.endsWith('\n') && (n = n.slice(0, -1)), o.insertAt(0, n, r)
  6561. } else {
  6562. var i = h.default.create(n, r)
  6563. this.appendChild(i)
  6564. }
  6565. else c(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'insertAt', this).call(this, t, n, r)
  6566. this.optimize()
  6567. }
  6568. }
  6569. },
  6570. {
  6571. key: 'insertBefore',
  6572. value: function(t, n) {
  6573. if (t.statics.scope === h.default.Scope.INLINE_BLOT) {
  6574. var r = h.default.create(this.statics.defaultChild)
  6575. r.appendChild(t), (t = r)
  6576. }
  6577. c(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'insertBefore', this).call(this, t, n)
  6578. }
  6579. },
  6580. {
  6581. key: 'leaf',
  6582. value: function(t) {
  6583. return this.path(t).pop() || [null, -1]
  6584. }
  6585. },
  6586. {
  6587. key: 'line',
  6588. value: function(t) {
  6589. return t === this.length() ? this.line(t - 1) : this.descendant(a, t)
  6590. }
  6591. },
  6592. {
  6593. key: 'lines',
  6594. value: function() {
  6595. var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0,
  6596. e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : Number.MAX_VALUE
  6597. return (function t(e, n, r) {
  6598. var o = [],
  6599. i = r
  6600. return (
  6601. e.children.forEachAt(n, r, function(e, n, r) {
  6602. a(e) ? o.push(e) : e instanceof h.default.Container && (o = o.concat(t(e, n, i))), (i -= r)
  6603. }),
  6604. o
  6605. )
  6606. })(this, t, e)
  6607. }
  6608. },
  6609. {
  6610. key: 'optimize',
  6611. value: function() {
  6612. var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [],
  6613. n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}
  6614. !0 !== this.batch &&
  6615. (c(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'optimize', this).call(this, t, n),
  6616. t.length > 0 && this.emitter.emit(d.default.events.SCROLL_OPTIMIZE, t, n))
  6617. }
  6618. },
  6619. {
  6620. key: 'path',
  6621. value: function(t) {
  6622. return c(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'path', this)
  6623. .call(this, t)
  6624. .slice(1)
  6625. }
  6626. },
  6627. {
  6628. key: 'update',
  6629. value: function(t) {
  6630. if (!0 !== this.batch) {
  6631. var n = d.default.sources.USER
  6632. 'string' == typeof t && (n = t),
  6633. Array.isArray(t) || (t = this.observer.takeRecords()),
  6634. t.length > 0 && this.emitter.emit(d.default.events.SCROLL_BEFORE_UPDATE, n, t),
  6635. c(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'update', this).call(this, t.concat([])),
  6636. t.length > 0 && this.emitter.emit(d.default.events.SCROLL_UPDATE, n, t)
  6637. }
  6638. }
  6639. }
  6640. ]),
  6641. e
  6642. )
  6643. })(h.default.Scroll)
  6644. ;(x.blotName = 'scroll'), (x.className = 'ql-editor'), (x.tagName = 'DIV'), (x.defaultChild = 'block'), (x.allowedChildren = [v.default, y.BlockEmbed, w.default]), (e.default = x)
  6645. },
  6646. function(t, e, n) {
  6647. 'use strict'
  6648. function r(t) {
  6649. return t && t.__esModule ? t : { default: t }
  6650. }
  6651. function o(t, e, n) {
  6652. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : (t[e] = n), t
  6653. }
  6654. function i(t, e) {
  6655. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  6656. }
  6657. function l(t, e) {
  6658. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  6659. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  6660. }
  6661. function a(t, e) {
  6662. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  6663. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  6664. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  6665. }
  6666. function s(t, e, n) {
  6667. return 'object' === (void 0 === e ? 'undefined' : x(e))
  6668. ? Object.keys(e).reduce(function(t, n) {
  6669. return s(t, n, e[n])
  6670. }, t)
  6671. : t.reduce(function(t, r) {
  6672. return r.attributes && r.attributes[e] ? t.push(r) : t.insert(r.insert, (0, j.default)({}, o({}, e, n), r.attributes))
  6673. }, new q.default())
  6674. }
  6675. function u(t) {
  6676. if (t.nodeType !== Node.ELEMENT_NODE) return {}
  6677. return t['__ql-computed-style'] || (t['__ql-computed-style'] = window.getComputedStyle(t))
  6678. }
  6679. function c(t, e) {
  6680. for (var n = '', r = t.ops.length - 1; r >= 0 && n.length < e.length; --r) {
  6681. var o = t.ops[r]
  6682. if ('string' != typeof o.insert) break
  6683. n = o.insert + n
  6684. }
  6685. return n.slice(-1 * e.length) === e
  6686. }
  6687. function f(t) {
  6688. return 0 !== t.childNodes.length && ['block', 'list-item'].indexOf(u(t).display) > -1
  6689. }
  6690. function h(t, e, n) {
  6691. return t.nodeType === t.TEXT_NODE
  6692. ? n.reduce(function(e, n) {
  6693. return n(t, e)
  6694. }, new q.default())
  6695. : t.nodeType === t.ELEMENT_NODE
  6696. ? [].reduce.call(
  6697. t.childNodes || [],
  6698. function(r, o) {
  6699. var i = h(o, e, n)
  6700. return (
  6701. o.nodeType === t.ELEMENT_NODE &&
  6702. ((i = e.reduce(function(t, e) {
  6703. return e(o, t)
  6704. }, i)),
  6705. (i = (o[W] || []).reduce(function(t, e) {
  6706. return e(o, t)
  6707. }, i))),
  6708. r.concat(i)
  6709. )
  6710. },
  6711. new q.default()
  6712. )
  6713. : new q.default()
  6714. }
  6715. function p(t, e, n) {
  6716. return s(n, t, !0)
  6717. }
  6718. function d(t, e) {
  6719. var n = P.default.Attributor.Attribute.keys(t),
  6720. r = P.default.Attributor.Class.keys(t),
  6721. o = P.default.Attributor.Style.keys(t),
  6722. i = {}
  6723. return (
  6724. n
  6725. .concat(r)
  6726. .concat(o)
  6727. .forEach(function(e) {
  6728. var n = P.default.query(e, P.default.Scope.ATTRIBUTE)
  6729. ;(null != n && ((i[n.attrName] = n.value(t)), i[n.attrName])) ||
  6730. ((n = Y[e]),
  6731. null == n || (n.attrName !== e && n.keyName !== e) || (i[n.attrName] = n.value(t) || void 0),
  6732. null == (n = X[e]) || (n.attrName !== e && n.keyName !== e) || ((n = X[e]), (i[n.attrName] = n.value(t) || void 0)))
  6733. }),
  6734. Object.keys(i).length > 0 && (e = s(e, i)),
  6735. e
  6736. )
  6737. }
  6738. function y(t, e) {
  6739. var n = P.default.query(t)
  6740. if (null == n) return e
  6741. if (n.prototype instanceof P.default.Embed) {
  6742. var r = {},
  6743. o = n.value(t)
  6744. null != o && ((r[n.blotName] = o), (e = new q.default().insert(r, n.formats(t))))
  6745. } else 'function' == typeof n.formats && (e = s(e, n.blotName, n.formats(t)))
  6746. return e
  6747. }
  6748. function v(t, e) {
  6749. return c(e, '\n') || e.insert('\n'), e
  6750. }
  6751. function b() {
  6752. return new q.default()
  6753. }
  6754. function g(t, e) {
  6755. var n = P.default.query(t)
  6756. if (null == n || 'list-item' !== n.blotName || !c(e, '\n')) return e
  6757. for (var r = -1, o = t.parentNode; !o.classList.contains('ql-clipboard'); ) 'list' === (P.default.query(o) || {}).blotName && (r += 1), (o = o.parentNode)
  6758. return r <= 0 ? e : e.compose(new q.default().retain(e.length() - 1).retain(1, { indent: r }))
  6759. }
  6760. function m(t, e) {
  6761. return c(e, '\n') || ((f(t) || (e.length() > 0 && t.nextSibling && f(t.nextSibling))) && e.insert('\n')), e
  6762. }
  6763. function _(t, e) {
  6764. if (f(t) && null != t.nextElementSibling && !c(e, '\n\n')) {
  6765. var n = t.offsetHeight + parseFloat(u(t).marginTop) + parseFloat(u(t).marginBottom)
  6766. t.nextElementSibling.offsetTop > t.offsetTop + 1.5 * n && e.insert('\n')
  6767. }
  6768. return e
  6769. }
  6770. function O(t, e) {
  6771. var n = {},
  6772. r = t.style || {}
  6773. return (
  6774. r.fontStyle && 'italic' === u(t).fontStyle && (n.italic = !0),
  6775. r.fontWeight && (u(t).fontWeight.startsWith('bold') || parseInt(u(t).fontWeight) >= 700) && (n.bold = !0),
  6776. Object.keys(n).length > 0 && (e = s(e, n)),
  6777. parseFloat(r.textIndent || 0) > 0 && (e = new q.default().insert('\t').concat(e)),
  6778. e
  6779. )
  6780. }
  6781. function w(t, e) {
  6782. var n = t.data
  6783. if ('O:P' === t.parentNode.tagName) return e.insert(n.trim())
  6784. if (0 === n.trim().length && t.parentNode.classList.contains('ql-clipboard')) return e
  6785. if (!u(t.parentNode).whiteSpace.startsWith('pre')) {
  6786. var r = function(t, e) {
  6787. return (e = e.replace(/[^\u00a0]/g, '')), e.length < 1 && t ? ' ' : e
  6788. }
  6789. ;(n = n.replace(/\r\n/g, ' ').replace(/\n/g, ' ')),
  6790. (n = n.replace(/\s\s+/g, r.bind(r, !0))),
  6791. ((null == t.previousSibling && f(t.parentNode)) || (null != t.previousSibling && f(t.previousSibling))) && (n = n.replace(/^\s+/, r.bind(r, !1))),
  6792. ((null == t.nextSibling && f(t.parentNode)) || (null != t.nextSibling && f(t.nextSibling))) && (n = n.replace(/\s+$/, r.bind(r, !1)))
  6793. }
  6794. return e.insert(n)
  6795. }
  6796. Object.defineProperty(e, '__esModule', { value: !0 }), (e.matchText = e.matchSpacing = e.matchNewline = e.matchBlot = e.matchAttributor = e.default = void 0)
  6797. var x =
  6798. 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator
  6799. ? function(t) {
  6800. return typeof t
  6801. }
  6802. : function(t) {
  6803. return t && 'function' == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? 'symbol' : typeof t
  6804. },
  6805. k = (function() {
  6806. function t(t, e) {
  6807. var n = [],
  6808. r = !0,
  6809. o = !1,
  6810. i = void 0
  6811. try {
  6812. for (var l, a = t[Symbol.iterator](); !(r = (l = a.next()).done) && (n.push(l.value), !e || n.length !== e); r = !0);
  6813. } catch (t) {
  6814. ;(o = !0), (i = t)
  6815. } finally {
  6816. try {
  6817. !r && a.return && a.return()
  6818. } finally {
  6819. if (o) throw i
  6820. }
  6821. }
  6822. return n
  6823. }
  6824. return function(e, n) {
  6825. if (Array.isArray(e)) return e
  6826. if (Symbol.iterator in Object(e)) return t(e, n)
  6827. throw new TypeError('Invalid attempt to destructure non-iterable instance')
  6828. }
  6829. })(),
  6830. E = (function() {
  6831. function t(t, e) {
  6832. for (var n = 0; n < e.length; n++) {
  6833. var r = e[n]
  6834. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  6835. }
  6836. }
  6837. return function(e, n, r) {
  6838. return n && t(e.prototype, n), r && t(e, r), e
  6839. }
  6840. })(),
  6841. N = n(2),
  6842. j = r(N),
  6843. A = n(4),
  6844. q = r(A),
  6845. T = n(0),
  6846. P = r(T),
  6847. S = n(6),
  6848. C = r(S),
  6849. L = n(10),
  6850. M = r(L),
  6851. R = n(7),
  6852. I = r(R),
  6853. B = n(34),
  6854. D = n(35),
  6855. U = n(13),
  6856. F = r(U),
  6857. H = n(24),
  6858. K = n(36),
  6859. z = n(37),
  6860. Z = n(38),
  6861. V = (0, M.default)('quill:clipboard'),
  6862. W = '__ql-matcher',
  6863. G = [
  6864. [Node.TEXT_NODE, w],
  6865. [Node.TEXT_NODE, m],
  6866. ['br', v],
  6867. [Node.ELEMENT_NODE, m],
  6868. [Node.ELEMENT_NODE, y],
  6869. [Node.ELEMENT_NODE, _],
  6870. [Node.ELEMENT_NODE, d],
  6871. [Node.ELEMENT_NODE, O],
  6872. ['li', g],
  6873. ['b', p.bind(p, 'bold')],
  6874. ['i', p.bind(p, 'italic')],
  6875. ['style', b]
  6876. ],
  6877. Y = [B.AlignAttribute, K.DirectionAttribute].reduce(function(t, e) {
  6878. return (t[e.keyName] = e), t
  6879. }, {}),
  6880. X = [B.AlignStyle, D.BackgroundStyle, H.ColorStyle, K.DirectionStyle, z.FontStyle, Z.SizeStyle].reduce(function(t, e) {
  6881. return (t[e.keyName] = e), t
  6882. }, {}),
  6883. $ = (function(t) {
  6884. function e(t, n) {
  6885. i(this, e)
  6886. var r = l(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, n))
  6887. return (
  6888. r.quill.root.addEventListener('paste', r.onPaste.bind(r)),
  6889. (r.container = r.quill.addContainer('ql-clipboard')),
  6890. r.container.setAttribute('contenteditable', !0),
  6891. r.container.setAttribute('tabindex', -1),
  6892. (r.matchers = []),
  6893. G.concat(r.options.matchers).forEach(function(t) {
  6894. var e = k(t, 2),
  6895. o = e[0],
  6896. i = e[1]
  6897. ;(n.matchVisual || i !== _) && r.addMatcher(o, i)
  6898. }),
  6899. r
  6900. )
  6901. }
  6902. return (
  6903. a(e, t),
  6904. E(e, [
  6905. {
  6906. key: 'addMatcher',
  6907. value: function(t, e) {
  6908. this.matchers.push([t, e])
  6909. }
  6910. },
  6911. {
  6912. key: 'convert',
  6913. value: function(t) {
  6914. if ('string' == typeof t) return (this.container.innerHTML = t.replace(/\>\r?\n +\</g, '><')), this.convert()
  6915. var e = this.quill.getFormat(this.quill.selection.savedRange.index)
  6916. if (e[F.default.blotName]) {
  6917. var n = this.container.innerText
  6918. return (this.container.innerHTML = ''), new q.default().insert(n, o({}, F.default.blotName, e[F.default.blotName]))
  6919. }
  6920. var r = this.prepareMatching(),
  6921. i = k(r, 2),
  6922. l = i[0],
  6923. a = i[1],
  6924. s = h(this.container, l, a)
  6925. return (
  6926. c(s, '\n') && null == s.ops[s.ops.length - 1].attributes && (s = s.compose(new q.default().retain(s.length() - 1).delete(1))),
  6927. V.log('convert', this.container.innerHTML, s),
  6928. (this.container.innerHTML = ''),
  6929. s
  6930. )
  6931. }
  6932. },
  6933. {
  6934. key: 'dangerouslyPasteHTML',
  6935. value: function(t, e) {
  6936. var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : C.default.sources.API
  6937. if ('string' == typeof t) this.quill.setContents(this.convert(t), e), this.quill.setSelection(0, C.default.sources.SILENT)
  6938. else {
  6939. var r = this.convert(e)
  6940. this.quill.updateContents(new q.default().retain(t).concat(r), n), this.quill.setSelection(t + r.length(), C.default.sources.SILENT)
  6941. }
  6942. }
  6943. },
  6944. {
  6945. key: 'onPaste',
  6946. value: function(t) {
  6947. var e = this
  6948. if (!t.defaultPrevented && this.quill.isEnabled()) {
  6949. var n = this.quill.getSelection(),
  6950. r = new q.default().retain(n.index),
  6951. o = this.quill.scrollingContainer.scrollTop
  6952. this.container.focus(),
  6953. this.quill.selection.update(C.default.sources.SILENT),
  6954. setTimeout(function() {
  6955. ;(r = r.concat(e.convert()).delete(n.length)),
  6956. e.quill.updateContents(r, C.default.sources.USER),
  6957. e.quill.setSelection(r.length() - n.length, C.default.sources.SILENT),
  6958. (e.quill.scrollingContainer.scrollTop = o),
  6959. e.quill.focus()
  6960. }, 1)
  6961. }
  6962. }
  6963. },
  6964. {
  6965. key: 'prepareMatching',
  6966. value: function() {
  6967. var t = this,
  6968. e = [],
  6969. n = []
  6970. return (
  6971. this.matchers.forEach(function(r) {
  6972. var o = k(r, 2),
  6973. i = o[0],
  6974. l = o[1]
  6975. switch (i) {
  6976. case Node.TEXT_NODE:
  6977. n.push(l)
  6978. break
  6979. case Node.ELEMENT_NODE:
  6980. e.push(l)
  6981. break
  6982. default:
  6983. ;[].forEach.call(t.container.querySelectorAll(i), function(t) {
  6984. ;(t[W] = t[W] || []), t[W].push(l)
  6985. })
  6986. }
  6987. }),
  6988. [e, n]
  6989. )
  6990. }
  6991. }
  6992. ]),
  6993. e
  6994. )
  6995. })(I.default)
  6996. ;($.DEFAULTS = { matchers: [], matchVisual: !0 }), (e.default = $), (e.matchAttributor = d), (e.matchBlot = y), (e.matchNewline = m), (e.matchSpacing = _), (e.matchText = w)
  6997. },
  6998. function(t, e, n) {
  6999. 'use strict'
  7000. function r(t) {
  7001. return t && t.__esModule ? t : { default: t }
  7002. }
  7003. function o(t, e) {
  7004. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  7005. }
  7006. function i(t, e) {
  7007. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  7008. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  7009. }
  7010. function l(t, e) {
  7011. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  7012. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  7013. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  7014. }
  7015. function a(t) {
  7016. var e = t.ops[t.ops.length - 1]
  7017. return (
  7018. null != e &&
  7019. (null != e.insert
  7020. ? 'string' == typeof e.insert && e.insert.endsWith('\n')
  7021. : null != e.attributes &&
  7022. Object.keys(e.attributes).some(function(t) {
  7023. return null != f.default.query(t, f.default.Scope.BLOCK)
  7024. }))
  7025. )
  7026. }
  7027. function s(t) {
  7028. var e = t.reduce(function(t, e) {
  7029. return (t += e.delete || 0)
  7030. }, 0),
  7031. n = t.length() - e
  7032. return a(t) && (n -= 1), n
  7033. }
  7034. Object.defineProperty(e, '__esModule', { value: !0 }), (e.getLastChangeIndex = e.default = void 0)
  7035. var u = (function() {
  7036. function t(t, e) {
  7037. for (var n = 0; n < e.length; n++) {
  7038. var r = e[n]
  7039. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  7040. }
  7041. }
  7042. return function(e, n, r) {
  7043. return n && t(e.prototype, n), r && t(e, r), e
  7044. }
  7045. })(),
  7046. c = n(0),
  7047. f = r(c),
  7048. h = n(6),
  7049. p = r(h),
  7050. d = n(7),
  7051. y = r(d),
  7052. v = (function(t) {
  7053. function e(t, n) {
  7054. o(this, e)
  7055. var r = i(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, n))
  7056. return (
  7057. (r.lastRecorded = 0),
  7058. (r.ignoreChange = !1),
  7059. r.clear(),
  7060. r.quill.on(p.default.events.EDITOR_CHANGE, function(t, e, n, o) {
  7061. t !== p.default.events.TEXT_CHANGE || r.ignoreChange || (r.options.userOnly && o !== p.default.sources.USER ? r.transform(e) : r.record(e, n))
  7062. }),
  7063. r.quill.keyboard.addBinding({ key: 'Z', shortKey: !0 }, r.undo.bind(r)),
  7064. r.quill.keyboard.addBinding({ key: 'Z', shortKey: !0, shiftKey: !0 }, r.redo.bind(r)),
  7065. /Win/i.test(navigator.platform) && r.quill.keyboard.addBinding({ key: 'Y', shortKey: !0 }, r.redo.bind(r)),
  7066. r
  7067. )
  7068. }
  7069. return (
  7070. l(e, t),
  7071. u(e, [
  7072. {
  7073. key: 'change',
  7074. value: function(t, e) {
  7075. if (0 !== this.stack[t].length) {
  7076. var n = this.stack[t].pop()
  7077. this.stack[e].push(n), (this.lastRecorded = 0), (this.ignoreChange = !0), this.quill.updateContents(n[t], p.default.sources.USER), (this.ignoreChange = !1)
  7078. var r = s(n[t])
  7079. this.quill.setSelection(r)
  7080. }
  7081. }
  7082. },
  7083. {
  7084. key: 'clear',
  7085. value: function() {
  7086. this.stack = { undo: [], redo: [] }
  7087. }
  7088. },
  7089. {
  7090. key: 'cutoff',
  7091. value: function() {
  7092. this.lastRecorded = 0
  7093. }
  7094. },
  7095. {
  7096. key: 'record',
  7097. value: function(t, e) {
  7098. if (0 !== t.ops.length) {
  7099. this.stack.redo = []
  7100. var n = this.quill.getContents().diff(e),
  7101. r = Date.now()
  7102. if (this.lastRecorded + this.options.delay > r && this.stack.undo.length > 0) {
  7103. var o = this.stack.undo.pop()
  7104. ;(n = n.compose(o.undo)), (t = o.redo.compose(t))
  7105. } else this.lastRecorded = r
  7106. this.stack.undo.push({ redo: t, undo: n }), this.stack.undo.length > this.options.maxStack && this.stack.undo.shift()
  7107. }
  7108. }
  7109. },
  7110. {
  7111. key: 'redo',
  7112. value: function() {
  7113. this.change('redo', 'undo')
  7114. }
  7115. },
  7116. {
  7117. key: 'transform',
  7118. value: function(t) {
  7119. this.stack.undo.forEach(function(e) {
  7120. ;(e.undo = t.transform(e.undo, !0)), (e.redo = t.transform(e.redo, !0))
  7121. }),
  7122. this.stack.redo.forEach(function(e) {
  7123. ;(e.undo = t.transform(e.undo, !0)), (e.redo = t.transform(e.redo, !0))
  7124. })
  7125. }
  7126. },
  7127. {
  7128. key: 'undo',
  7129. value: function() {
  7130. this.change('undo', 'redo')
  7131. }
  7132. }
  7133. ]),
  7134. e
  7135. )
  7136. })(y.default)
  7137. ;(v.DEFAULTS = { delay: 1e3, maxStack: 100, userOnly: !1 }), (e.default = v), (e.getLastChangeIndex = s)
  7138. },
  7139. function(t, e, n) {
  7140. 'use strict'
  7141. function r(t, e) {
  7142. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  7143. }
  7144. function o(t, e) {
  7145. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  7146. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  7147. }
  7148. function i(t, e) {
  7149. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  7150. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  7151. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  7152. }
  7153. Object.defineProperty(e, '__esModule', { value: !0 }), (e.IndentClass = void 0)
  7154. var l = (function() {
  7155. function t(t, e) {
  7156. for (var n = 0; n < e.length; n++) {
  7157. var r = e[n]
  7158. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  7159. }
  7160. }
  7161. return function(e, n, r) {
  7162. return n && t(e.prototype, n), r && t(e, r), e
  7163. }
  7164. })(),
  7165. a = function t(e, n, r) {
  7166. null === e && (e = Function.prototype)
  7167. var o = Object.getOwnPropertyDescriptor(e, n)
  7168. if (void 0 === o) {
  7169. var i = Object.getPrototypeOf(e)
  7170. return null === i ? void 0 : t(i, n, r)
  7171. }
  7172. if ('value' in o) return o.value
  7173. var l = o.get
  7174. if (void 0 !== l) return l.call(r)
  7175. },
  7176. s = n(0),
  7177. u = (function(t) {
  7178. return t && t.__esModule ? t : { default: t }
  7179. })(s),
  7180. c = (function(t) {
  7181. function e() {
  7182. return r(this, e), o(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments))
  7183. }
  7184. return (
  7185. i(e, t),
  7186. l(e, [
  7187. {
  7188. key: 'add',
  7189. value: function(t, n) {
  7190. if ('+1' === n || '-1' === n) {
  7191. var r = this.value(t) || 0
  7192. n = '+1' === n ? r + 1 : r - 1
  7193. }
  7194. return 0 === n ? (this.remove(t), !0) : a(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'add', this).call(this, t, n)
  7195. }
  7196. },
  7197. {
  7198. key: 'canAdd',
  7199. value: function(t, n) {
  7200. return (
  7201. a(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'canAdd', this).call(this, t, n) ||
  7202. a(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'canAdd', this).call(this, t, parseInt(n))
  7203. )
  7204. }
  7205. },
  7206. {
  7207. key: 'value',
  7208. value: function(t) {
  7209. return parseInt(a(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'value', this).call(this, t)) || void 0
  7210. }
  7211. }
  7212. ]),
  7213. e
  7214. )
  7215. })(u.default.Attributor.Class),
  7216. f = new c('indent', 'ql-indent', { scope: u.default.Scope.BLOCK, whitelist: [1, 2, 3, 4, 5, 6, 7, 8] })
  7217. e.IndentClass = f
  7218. },
  7219. function(t, e, n) {
  7220. 'use strict'
  7221. function r(t, e) {
  7222. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  7223. }
  7224. function o(t, e) {
  7225. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  7226. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  7227. }
  7228. function i(t, e) {
  7229. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  7230. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  7231. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  7232. }
  7233. Object.defineProperty(e, '__esModule', { value: !0 })
  7234. var l = n(3),
  7235. a = (function(t) {
  7236. return t && t.__esModule ? t : { default: t }
  7237. })(l),
  7238. s = (function(t) {
  7239. function e() {
  7240. return r(this, e), o(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments))
  7241. }
  7242. return i(e, t), e
  7243. })(a.default)
  7244. ;(s.blotName = 'blockquote'), (s.tagName = 'blockquote'), (e.default = s)
  7245. },
  7246. function(t, e, n) {
  7247. 'use strict'
  7248. function r(t, e) {
  7249. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  7250. }
  7251. function o(t, e) {
  7252. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  7253. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  7254. }
  7255. function i(t, e) {
  7256. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  7257. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  7258. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  7259. }
  7260. Object.defineProperty(e, '__esModule', { value: !0 })
  7261. var l = (function() {
  7262. function t(t, e) {
  7263. for (var n = 0; n < e.length; n++) {
  7264. var r = e[n]
  7265. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  7266. }
  7267. }
  7268. return function(e, n, r) {
  7269. return n && t(e.prototype, n), r && t(e, r), e
  7270. }
  7271. })(),
  7272. a = n(3),
  7273. s = (function(t) {
  7274. return t && t.__esModule ? t : { default: t }
  7275. })(a),
  7276. u = (function(t) {
  7277. function e() {
  7278. return r(this, e), o(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments))
  7279. }
  7280. return (
  7281. i(e, t),
  7282. l(e, null, [
  7283. {
  7284. key: 'formats',
  7285. value: function(t) {
  7286. return this.tagName.indexOf(t.tagName) + 1
  7287. }
  7288. }
  7289. ]),
  7290. e
  7291. )
  7292. })(s.default)
  7293. ;(u.blotName = 'header'), (u.tagName = ['H1', 'H2', 'H3', 'H4', 'H5', 'H6']), (e.default = u)
  7294. },
  7295. function(t, e, n) {
  7296. 'use strict'
  7297. function r(t) {
  7298. return t && t.__esModule ? t : { default: t }
  7299. }
  7300. function o(t, e, n) {
  7301. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : (t[e] = n), t
  7302. }
  7303. function i(t, e) {
  7304. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  7305. }
  7306. function l(t, e) {
  7307. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  7308. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  7309. }
  7310. function a(t, e) {
  7311. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  7312. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  7313. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  7314. }
  7315. Object.defineProperty(e, '__esModule', { value: !0 }), (e.default = e.ListItem = void 0)
  7316. var s = (function() {
  7317. function t(t, e) {
  7318. for (var n = 0; n < e.length; n++) {
  7319. var r = e[n]
  7320. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  7321. }
  7322. }
  7323. return function(e, n, r) {
  7324. return n && t(e.prototype, n), r && t(e, r), e
  7325. }
  7326. })(),
  7327. u = function t(e, n, r) {
  7328. null === e && (e = Function.prototype)
  7329. var o = Object.getOwnPropertyDescriptor(e, n)
  7330. if (void 0 === o) {
  7331. var i = Object.getPrototypeOf(e)
  7332. return null === i ? void 0 : t(i, n, r)
  7333. }
  7334. if ('value' in o) return o.value
  7335. var l = o.get
  7336. if (void 0 !== l) return l.call(r)
  7337. },
  7338. c = n(0),
  7339. f = r(c),
  7340. h = n(3),
  7341. p = r(h),
  7342. d = n(23),
  7343. y = r(d),
  7344. v = (function(t) {
  7345. function e() {
  7346. return i(this, e), l(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments))
  7347. }
  7348. return (
  7349. a(e, t),
  7350. s(
  7351. e,
  7352. [
  7353. {
  7354. key: 'format',
  7355. value: function(t, n) {
  7356. t !== b.blotName || n
  7357. ? u(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'format', this).call(this, t, n)
  7358. : this.replaceWith(f.default.create(this.statics.scope))
  7359. }
  7360. },
  7361. {
  7362. key: 'remove',
  7363. value: function() {
  7364. null == this.prev && null == this.next ? this.parent.remove() : u(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'remove', this).call(this)
  7365. }
  7366. },
  7367. {
  7368. key: 'replaceWith',
  7369. value: function(t, n) {
  7370. return (
  7371. this.parent.isolate(this.offset(this.parent), this.length()),
  7372. t === this.parent.statics.blotName
  7373. ? (this.parent.replaceWith(t, n), this)
  7374. : (this.parent.unwrap(), u(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'replaceWith', this).call(this, t, n))
  7375. )
  7376. }
  7377. }
  7378. ],
  7379. [
  7380. {
  7381. key: 'formats',
  7382. value: function(t) {
  7383. return t.tagName === this.tagName ? void 0 : u(e.__proto__ || Object.getPrototypeOf(e), 'formats', this).call(this, t)
  7384. }
  7385. }
  7386. ]
  7387. ),
  7388. e
  7389. )
  7390. })(p.default)
  7391. ;(v.blotName = 'list-item'), (v.tagName = 'LI')
  7392. var b = (function(t) {
  7393. function e(t) {
  7394. i(this, e)
  7395. var n = l(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t)),
  7396. r = function(e) {
  7397. if (e.target.parentNode === t) {
  7398. var r = n.statics.formats(t),
  7399. o = f.default.find(e.target)
  7400. 'checked' === r ? o.format('list', 'unchecked') : 'unchecked' === r && o.format('list', 'checked')
  7401. }
  7402. }
  7403. return t.addEventListener('touchstart', r), t.addEventListener('mousedown', r), n
  7404. }
  7405. return (
  7406. a(e, t),
  7407. s(e, null, [
  7408. {
  7409. key: 'create',
  7410. value: function(t) {
  7411. var n = 'ordered' === t ? 'OL' : 'UL',
  7412. r = u(e.__proto__ || Object.getPrototypeOf(e), 'create', this).call(this, n)
  7413. return ('checked' !== t && 'unchecked' !== t) || r.setAttribute('data-checked', 'checked' === t), r
  7414. }
  7415. },
  7416. {
  7417. key: 'formats',
  7418. value: function(t) {
  7419. return 'OL' === t.tagName
  7420. ? 'ordered'
  7421. : 'UL' === t.tagName
  7422. ? t.hasAttribute('data-checked')
  7423. ? 'true' === t.getAttribute('data-checked')
  7424. ? 'checked'
  7425. : 'unchecked'
  7426. : 'bullet'
  7427. : void 0
  7428. }
  7429. }
  7430. ]),
  7431. s(e, [
  7432. {
  7433. key: 'format',
  7434. value: function(t, e) {
  7435. this.children.length > 0 && this.children.tail.format(t, e)
  7436. }
  7437. },
  7438. {
  7439. key: 'formats',
  7440. value: function() {
  7441. return o({}, this.statics.blotName, this.statics.formats(this.domNode))
  7442. }
  7443. },
  7444. {
  7445. key: 'insertBefore',
  7446. value: function(t, n) {
  7447. if (t instanceof v) u(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'insertBefore', this).call(this, t, n)
  7448. else {
  7449. var r = null == n ? this.length() : n.offset(this),
  7450. o = this.split(r)
  7451. o.parent.insertBefore(t, o)
  7452. }
  7453. }
  7454. },
  7455. {
  7456. key: 'optimize',
  7457. value: function(t) {
  7458. u(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'optimize', this).call(this, t)
  7459. var n = this.next
  7460. null != n &&
  7461. n.prev === this &&
  7462. n.statics.blotName === this.statics.blotName &&
  7463. n.domNode.tagName === this.domNode.tagName &&
  7464. n.domNode.getAttribute('data-checked') === this.domNode.getAttribute('data-checked') &&
  7465. (n.moveChildren(this), n.remove())
  7466. }
  7467. },
  7468. {
  7469. key: 'replace',
  7470. value: function(t) {
  7471. if (t.statics.blotName !== this.statics.blotName) {
  7472. var n = f.default.create(this.statics.defaultChild)
  7473. t.moveChildren(n), this.appendChild(n)
  7474. }
  7475. u(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'replace', this).call(this, t)
  7476. }
  7477. }
  7478. ]),
  7479. e
  7480. )
  7481. })(y.default)
  7482. ;(b.blotName = 'list'), (b.scope = f.default.Scope.BLOCK_BLOT), (b.tagName = ['OL', 'UL']), (b.defaultChild = 'list-item'), (b.allowedChildren = [v]), (e.ListItem = v), (e.default = b)
  7483. },
  7484. function(t, e, n) {
  7485. 'use strict'
  7486. function r(t, e) {
  7487. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  7488. }
  7489. function o(t, e) {
  7490. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  7491. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  7492. }
  7493. function i(t, e) {
  7494. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  7495. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  7496. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  7497. }
  7498. Object.defineProperty(e, '__esModule', { value: !0 })
  7499. var l = n(39),
  7500. a = (function(t) {
  7501. return t && t.__esModule ? t : { default: t }
  7502. })(l),
  7503. s = (function(t) {
  7504. function e() {
  7505. return r(this, e), o(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments))
  7506. }
  7507. return i(e, t), e
  7508. })(a.default)
  7509. ;(s.blotName = 'italic'), (s.tagName = ['EM', 'I']), (e.default = s)
  7510. },
  7511. function(t, e, n) {
  7512. 'use strict'
  7513. function r(t, e) {
  7514. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  7515. }
  7516. function o(t, e) {
  7517. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  7518. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  7519. }
  7520. function i(t, e) {
  7521. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  7522. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  7523. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  7524. }
  7525. Object.defineProperty(e, '__esModule', { value: !0 })
  7526. var l = (function() {
  7527. function t(t, e) {
  7528. for (var n = 0; n < e.length; n++) {
  7529. var r = e[n]
  7530. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  7531. }
  7532. }
  7533. return function(e, n, r) {
  7534. return n && t(e.prototype, n), r && t(e, r), e
  7535. }
  7536. })(),
  7537. a = function t(e, n, r) {
  7538. null === e && (e = Function.prototype)
  7539. var o = Object.getOwnPropertyDescriptor(e, n)
  7540. if (void 0 === o) {
  7541. var i = Object.getPrototypeOf(e)
  7542. return null === i ? void 0 : t(i, n, r)
  7543. }
  7544. if ('value' in o) return o.value
  7545. var l = o.get
  7546. if (void 0 !== l) return l.call(r)
  7547. },
  7548. s = n(5),
  7549. u = (function(t) {
  7550. return t && t.__esModule ? t : { default: t }
  7551. })(s),
  7552. c = (function(t) {
  7553. function e() {
  7554. return r(this, e), o(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments))
  7555. }
  7556. return (
  7557. i(e, t),
  7558. l(e, null, [
  7559. {
  7560. key: 'create',
  7561. value: function(t) {
  7562. return 'super' === t
  7563. ? document.createElement('sup')
  7564. : 'sub' === t
  7565. ? document.createElement('sub')
  7566. : a(e.__proto__ || Object.getPrototypeOf(e), 'create', this).call(this, t)
  7567. }
  7568. },
  7569. {
  7570. key: 'formats',
  7571. value: function(t) {
  7572. return 'SUB' === t.tagName ? 'sub' : 'SUP' === t.tagName ? 'super' : void 0
  7573. }
  7574. }
  7575. ]),
  7576. e
  7577. )
  7578. })(u.default)
  7579. ;(c.blotName = 'script'), (c.tagName = ['SUB', 'SUP']), (e.default = c)
  7580. },
  7581. function(t, e, n) {
  7582. 'use strict'
  7583. function r(t, e) {
  7584. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  7585. }
  7586. function o(t, e) {
  7587. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  7588. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  7589. }
  7590. function i(t, e) {
  7591. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  7592. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  7593. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  7594. }
  7595. Object.defineProperty(e, '__esModule', { value: !0 })
  7596. var l = n(5),
  7597. a = (function(t) {
  7598. return t && t.__esModule ? t : { default: t }
  7599. })(l),
  7600. s = (function(t) {
  7601. function e() {
  7602. return r(this, e), o(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments))
  7603. }
  7604. return i(e, t), e
  7605. })(a.default)
  7606. ;(s.blotName = 'strike'), (s.tagName = 'S'), (e.default = s)
  7607. },
  7608. function(t, e, n) {
  7609. 'use strict'
  7610. function r(t, e) {
  7611. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  7612. }
  7613. function o(t, e) {
  7614. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  7615. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  7616. }
  7617. function i(t, e) {
  7618. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  7619. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  7620. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  7621. }
  7622. Object.defineProperty(e, '__esModule', { value: !0 })
  7623. var l = n(5),
  7624. a = (function(t) {
  7625. return t && t.__esModule ? t : { default: t }
  7626. })(l),
  7627. s = (function(t) {
  7628. function e() {
  7629. return r(this, e), o(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments))
  7630. }
  7631. return i(e, t), e
  7632. })(a.default)
  7633. ;(s.blotName = 'underline'), (s.tagName = 'U'), (e.default = s)
  7634. },
  7635. function(t, e, n) {
  7636. 'use strict'
  7637. function r(t, e) {
  7638. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  7639. }
  7640. function o(t, e) {
  7641. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  7642. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  7643. }
  7644. function i(t, e) {
  7645. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  7646. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  7647. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  7648. }
  7649. Object.defineProperty(e, '__esModule', { value: !0 })
  7650. var l = (function() {
  7651. function t(t, e) {
  7652. for (var n = 0; n < e.length; n++) {
  7653. var r = e[n]
  7654. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  7655. }
  7656. }
  7657. return function(e, n, r) {
  7658. return n && t(e.prototype, n), r && t(e, r), e
  7659. }
  7660. })(),
  7661. a = function t(e, n, r) {
  7662. null === e && (e = Function.prototype)
  7663. var o = Object.getOwnPropertyDescriptor(e, n)
  7664. if (void 0 === o) {
  7665. var i = Object.getPrototypeOf(e)
  7666. return null === i ? void 0 : t(i, n, r)
  7667. }
  7668. if ('value' in o) return o.value
  7669. var l = o.get
  7670. if (void 0 !== l) return l.call(r)
  7671. },
  7672. s = n(0),
  7673. u = (function(t) {
  7674. return t && t.__esModule ? t : { default: t }
  7675. })(s),
  7676. c = n(15),
  7677. f = ['alt', 'height', 'width'],
  7678. h = (function(t) {
  7679. function e() {
  7680. return r(this, e), o(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments))
  7681. }
  7682. return (
  7683. i(e, t),
  7684. l(
  7685. e,
  7686. [
  7687. {
  7688. key: 'format',
  7689. value: function(t, n) {
  7690. f.indexOf(t) > -1
  7691. ? n
  7692. ? this.domNode.setAttribute(t, n)
  7693. : this.domNode.removeAttribute(t)
  7694. : a(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'format', this).call(this, t, n)
  7695. }
  7696. }
  7697. ],
  7698. [
  7699. {
  7700. key: 'create',
  7701. value: function(t) {
  7702. var n = a(e.__proto__ || Object.getPrototypeOf(e), 'create', this).call(this, t)
  7703. return 'string' == typeof t && n.setAttribute('src', this.sanitize(t)), n
  7704. }
  7705. },
  7706. {
  7707. key: 'formats',
  7708. value: function(t) {
  7709. return f.reduce(function(e, n) {
  7710. return t.hasAttribute(n) && (e[n] = t.getAttribute(n)), e
  7711. }, {})
  7712. }
  7713. },
  7714. {
  7715. key: 'match',
  7716. value: function(t) {
  7717. return /\.(jpe?g|gif|png)$/.test(t) || /^data:image\/.+;base64/.test(t)
  7718. }
  7719. },
  7720. {
  7721. key: 'sanitize',
  7722. value: function(t) {
  7723. return (0, c.sanitize)(t, ['http', 'https', 'data']) ? t : '//:0'
  7724. }
  7725. },
  7726. {
  7727. key: 'value',
  7728. value: function(t) {
  7729. return t.getAttribute('src')
  7730. }
  7731. }
  7732. ]
  7733. ),
  7734. e
  7735. )
  7736. })(u.default.Embed)
  7737. ;(h.blotName = 'image'), (h.tagName = 'IMG'), (e.default = h)
  7738. },
  7739. function(t, e, n) {
  7740. 'use strict'
  7741. function r(t, e) {
  7742. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  7743. }
  7744. function o(t, e) {
  7745. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  7746. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  7747. }
  7748. function i(t, e) {
  7749. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  7750. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  7751. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  7752. }
  7753. Object.defineProperty(e, '__esModule', { value: !0 })
  7754. var l = (function() {
  7755. function t(t, e) {
  7756. for (var n = 0; n < e.length; n++) {
  7757. var r = e[n]
  7758. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  7759. }
  7760. }
  7761. return function(e, n, r) {
  7762. return n && t(e.prototype, n), r && t(e, r), e
  7763. }
  7764. })(),
  7765. a = function t(e, n, r) {
  7766. null === e && (e = Function.prototype)
  7767. var o = Object.getOwnPropertyDescriptor(e, n)
  7768. if (void 0 === o) {
  7769. var i = Object.getPrototypeOf(e)
  7770. return null === i ? void 0 : t(i, n, r)
  7771. }
  7772. if ('value' in o) return o.value
  7773. var l = o.get
  7774. if (void 0 !== l) return l.call(r)
  7775. },
  7776. s = n(3),
  7777. u = n(15),
  7778. c = (function(t) {
  7779. return t && t.__esModule ? t : { default: t }
  7780. })(u),
  7781. f = ['height', 'width'],
  7782. h = (function(t) {
  7783. function e() {
  7784. return r(this, e), o(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments))
  7785. }
  7786. return (
  7787. i(e, t),
  7788. l(
  7789. e,
  7790. [
  7791. {
  7792. key: 'format',
  7793. value: function(t, n) {
  7794. f.indexOf(t) > -1
  7795. ? n
  7796. ? this.domNode.setAttribute(t, n)
  7797. : this.domNode.removeAttribute(t)
  7798. : a(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'format', this).call(this, t, n)
  7799. }
  7800. }
  7801. ],
  7802. [
  7803. {
  7804. key: 'create',
  7805. value: function(t) {
  7806. var n = a(e.__proto__ || Object.getPrototypeOf(e), 'create', this).call(this, t)
  7807. return n.setAttribute('frameborder', '0'), n.setAttribute('allowfullscreen', !0), n.setAttribute('src', this.sanitize(t)), n
  7808. }
  7809. },
  7810. {
  7811. key: 'formats',
  7812. value: function(t) {
  7813. return f.reduce(function(e, n) {
  7814. return t.hasAttribute(n) && (e[n] = t.getAttribute(n)), e
  7815. }, {})
  7816. }
  7817. },
  7818. {
  7819. key: 'sanitize',
  7820. value: function(t) {
  7821. return c.default.sanitize(t)
  7822. }
  7823. },
  7824. {
  7825. key: 'value',
  7826. value: function(t) {
  7827. return t.getAttribute('src')
  7828. }
  7829. }
  7830. ]
  7831. ),
  7832. e
  7833. )
  7834. })(s.BlockEmbed)
  7835. ;(h.blotName = 'video'), (h.className = 'ql-video'), (h.tagName = 'IFRAME'), (e.default = h)
  7836. },
  7837. function(t, e, n) {
  7838. 'use strict'
  7839. function r(t) {
  7840. return t && t.__esModule ? t : { default: t }
  7841. }
  7842. function o(t, e) {
  7843. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  7844. }
  7845. function i(t, e) {
  7846. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  7847. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  7848. }
  7849. function l(t, e) {
  7850. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  7851. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  7852. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  7853. }
  7854. Object.defineProperty(e, '__esModule', { value: !0 }), (e.default = e.FormulaBlot = void 0)
  7855. var a = (function() {
  7856. function t(t, e) {
  7857. for (var n = 0; n < e.length; n++) {
  7858. var r = e[n]
  7859. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  7860. }
  7861. }
  7862. return function(e, n, r) {
  7863. return n && t(e.prototype, n), r && t(e, r), e
  7864. }
  7865. })(),
  7866. s = function t(e, n, r) {
  7867. null === e && (e = Function.prototype)
  7868. var o = Object.getOwnPropertyDescriptor(e, n)
  7869. if (void 0 === o) {
  7870. var i = Object.getPrototypeOf(e)
  7871. return null === i ? void 0 : t(i, n, r)
  7872. }
  7873. if ('value' in o) return o.value
  7874. var l = o.get
  7875. if (void 0 !== l) return l.call(r)
  7876. },
  7877. u = n(33),
  7878. c = r(u),
  7879. f = n(6),
  7880. h = r(f),
  7881. p = n(7),
  7882. d = r(p),
  7883. y = (function(t) {
  7884. function e() {
  7885. return o(this, e), i(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments))
  7886. }
  7887. return (
  7888. l(e, t),
  7889. a(e, null, [
  7890. {
  7891. key: 'create',
  7892. value: function(t) {
  7893. var n = s(e.__proto__ || Object.getPrototypeOf(e), 'create', this).call(this, t)
  7894. return 'string' == typeof t && (window.katex.render(t, n, { throwOnError: !1, errorColor: '#f00' }), n.setAttribute('data-value', t)), n
  7895. }
  7896. },
  7897. {
  7898. key: 'value',
  7899. value: function(t) {
  7900. return t.getAttribute('data-value')
  7901. }
  7902. }
  7903. ]),
  7904. e
  7905. )
  7906. })(c.default)
  7907. ;(y.blotName = 'formula'), (y.className = 'ql-formula'), (y.tagName = 'SPAN')
  7908. var v = (function(t) {
  7909. function e() {
  7910. o(this, e)
  7911. var t = i(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this))
  7912. if (null == window.katex) throw new Error('Formula module requires KaTeX.')
  7913. return t
  7914. }
  7915. return (
  7916. l(e, t),
  7917. a(e, null, [
  7918. {
  7919. key: 'register',
  7920. value: function() {
  7921. h.default.register(y, !0)
  7922. }
  7923. }
  7924. ]),
  7925. e
  7926. )
  7927. })(d.default)
  7928. ;(e.FormulaBlot = y), (e.default = v)
  7929. },
  7930. function(t, e, n) {
  7931. 'use strict'
  7932. function r(t) {
  7933. return t && t.__esModule ? t : { default: t }
  7934. }
  7935. function o(t, e) {
  7936. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  7937. }
  7938. function i(t, e) {
  7939. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  7940. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  7941. }
  7942. function l(t, e) {
  7943. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  7944. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  7945. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  7946. }
  7947. Object.defineProperty(e, '__esModule', { value: !0 }), (e.default = e.CodeToken = e.CodeBlock = void 0)
  7948. var a = (function() {
  7949. function t(t, e) {
  7950. for (var n = 0; n < e.length; n++) {
  7951. var r = e[n]
  7952. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  7953. }
  7954. }
  7955. return function(e, n, r) {
  7956. return n && t(e.prototype, n), r && t(e, r), e
  7957. }
  7958. })(),
  7959. s = function t(e, n, r) {
  7960. null === e && (e = Function.prototype)
  7961. var o = Object.getOwnPropertyDescriptor(e, n)
  7962. if (void 0 === o) {
  7963. var i = Object.getPrototypeOf(e)
  7964. return null === i ? void 0 : t(i, n, r)
  7965. }
  7966. if ('value' in o) return o.value
  7967. var l = o.get
  7968. if (void 0 !== l) return l.call(r)
  7969. },
  7970. u = n(0),
  7971. c = r(u),
  7972. f = n(6),
  7973. h = r(f),
  7974. p = n(7),
  7975. d = r(p),
  7976. y = n(13),
  7977. v = r(y),
  7978. b = (function(t) {
  7979. function e() {
  7980. return o(this, e), i(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments))
  7981. }
  7982. return (
  7983. l(e, t),
  7984. a(e, [
  7985. {
  7986. key: 'replaceWith',
  7987. value: function(t) {
  7988. ;(this.domNode.textContent = this.domNode.textContent),
  7989. this.attach(),
  7990. s(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'replaceWith', this).call(this, t)
  7991. }
  7992. },
  7993. {
  7994. key: 'highlight',
  7995. value: function(t) {
  7996. var e = this.domNode.textContent
  7997. this.cachedText !== e &&
  7998. ((e.trim().length > 0 || null == this.cachedText) && ((this.domNode.innerHTML = t(e)), this.domNode.normalize(), this.attach()), (this.cachedText = e))
  7999. }
  8000. }
  8001. ]),
  8002. e
  8003. )
  8004. })(v.default)
  8005. b.className = 'ql-syntax'
  8006. var g = new c.default.Attributor.Class('token', 'hljs', { scope: c.default.Scope.INLINE }),
  8007. m = (function(t) {
  8008. function e(t, n) {
  8009. o(this, e)
  8010. var r = i(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, n))
  8011. if ('function' != typeof r.options.highlight) throw new Error('Syntax module requires highlight.js. Please include the library on the page before Quill.')
  8012. var l = null
  8013. return (
  8014. r.quill.on(h.default.events.SCROLL_OPTIMIZE, function() {
  8015. clearTimeout(l),
  8016. (l = setTimeout(function() {
  8017. r.highlight(), (l = null)
  8018. }, r.options.interval))
  8019. }),
  8020. r.highlight(),
  8021. r
  8022. )
  8023. }
  8024. return (
  8025. l(e, t),
  8026. a(e, null, [
  8027. {
  8028. key: 'register',
  8029. value: function() {
  8030. h.default.register(g, !0), h.default.register(b, !0)
  8031. }
  8032. }
  8033. ]),
  8034. a(e, [
  8035. {
  8036. key: 'highlight',
  8037. value: function() {
  8038. var t = this
  8039. if (!this.quill.selection.composing) {
  8040. this.quill.update(h.default.sources.USER)
  8041. var e = this.quill.getSelection()
  8042. this.quill.scroll.descendants(b).forEach(function(e) {
  8043. e.highlight(t.options.highlight)
  8044. }),
  8045. this.quill.update(h.default.sources.SILENT),
  8046. null != e && this.quill.setSelection(e, h.default.sources.SILENT)
  8047. }
  8048. }
  8049. }
  8050. ]),
  8051. e
  8052. )
  8053. })(d.default)
  8054. ;(m.DEFAULTS = {
  8055. highlight: (function() {
  8056. return null == window.hljs
  8057. ? null
  8058. : function(t) {
  8059. return window.hljs.highlightAuto(t).value
  8060. }
  8061. })(),
  8062. interval: 1e3
  8063. }),
  8064. (e.CodeBlock = b),
  8065. (e.CodeToken = g),
  8066. (e.default = m)
  8067. },
  8068. function(t, e, n) {
  8069. 'use strict'
  8070. function r(t) {
  8071. return t && t.__esModule ? t : { default: t }
  8072. }
  8073. function o(t, e, n) {
  8074. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : (t[e] = n), t
  8075. }
  8076. function i(t, e) {
  8077. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  8078. }
  8079. function l(t, e) {
  8080. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  8081. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  8082. }
  8083. function a(t, e) {
  8084. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  8085. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  8086. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  8087. }
  8088. function s(t, e, n) {
  8089. var r = document.createElement('button')
  8090. r.setAttribute('type', 'button'), r.classList.add('ql-' + e), null != n && (r.value = n), t.appendChild(r)
  8091. }
  8092. function u(t, e) {
  8093. Array.isArray(e[0]) || (e = [e]),
  8094. e.forEach(function(e) {
  8095. var n = document.createElement('span')
  8096. n.classList.add('ql-formats'),
  8097. e.forEach(function(t) {
  8098. if ('string' == typeof t) s(n, t)
  8099. else {
  8100. var e = Object.keys(t)[0],
  8101. r = t[e]
  8102. Array.isArray(r) ? c(n, e, r) : s(n, e, r)
  8103. }
  8104. }),
  8105. t.appendChild(n)
  8106. })
  8107. }
  8108. function c(t, e, n) {
  8109. var r = document.createElement('select')
  8110. r.classList.add('ql-' + e),
  8111. n.forEach(function(t) {
  8112. var e = document.createElement('option')
  8113. !1 !== t ? e.setAttribute('value', t) : e.setAttribute('selected', 'selected'), r.appendChild(e)
  8114. }),
  8115. t.appendChild(r)
  8116. }
  8117. Object.defineProperty(e, '__esModule', { value: !0 }), (e.addControls = e.default = void 0)
  8118. var f = (function() {
  8119. function t(t, e) {
  8120. var n = [],
  8121. r = !0,
  8122. o = !1,
  8123. i = void 0
  8124. try {
  8125. for (var l, a = t[Symbol.iterator](); !(r = (l = a.next()).done) && (n.push(l.value), !e || n.length !== e); r = !0);
  8126. } catch (t) {
  8127. ;(o = !0), (i = t)
  8128. } finally {
  8129. try {
  8130. !r && a.return && a.return()
  8131. } finally {
  8132. if (o) throw i
  8133. }
  8134. }
  8135. return n
  8136. }
  8137. return function(e, n) {
  8138. if (Array.isArray(e)) return e
  8139. if (Symbol.iterator in Object(e)) return t(e, n)
  8140. throw new TypeError('Invalid attempt to destructure non-iterable instance')
  8141. }
  8142. })(),
  8143. h = (function() {
  8144. function t(t, e) {
  8145. for (var n = 0; n < e.length; n++) {
  8146. var r = e[n]
  8147. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  8148. }
  8149. }
  8150. return function(e, n, r) {
  8151. return n && t(e.prototype, n), r && t(e, r), e
  8152. }
  8153. })(),
  8154. p = n(4),
  8155. d = r(p),
  8156. y = n(0),
  8157. v = r(y),
  8158. b = n(6),
  8159. g = r(b),
  8160. m = n(10),
  8161. _ = r(m),
  8162. O = n(7),
  8163. w = r(O),
  8164. x = (0, _.default)('quill:toolbar'),
  8165. k = (function(t) {
  8166. function e(t, n) {
  8167. i(this, e)
  8168. var r = l(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, n))
  8169. if (Array.isArray(r.options.container)) {
  8170. var o = document.createElement('div')
  8171. u(o, r.options.container), t.container.parentNode.insertBefore(o, t.container), (r.container = o)
  8172. } else 'string' == typeof r.options.container ? (r.container = document.querySelector(r.options.container)) : (r.container = r.options.container)
  8173. if (!(r.container instanceof HTMLElement)) {
  8174. var a
  8175. return (a = x.error('Container required for toolbar', r.options)), l(r, a)
  8176. }
  8177. return (
  8178. r.container.classList.add('ql-toolbar'),
  8179. (r.controls = []),
  8180. (r.handlers = {}),
  8181. Object.keys(r.options.handlers).forEach(function(t) {
  8182. r.addHandler(t, r.options.handlers[t])
  8183. }),
  8184. [].forEach.call(r.container.querySelectorAll('button, select'), function(t) {
  8185. r.attach(t)
  8186. }),
  8187. r.quill.on(g.default.events.EDITOR_CHANGE, function(t, e) {
  8188. t === g.default.events.SELECTION_CHANGE && r.update(e)
  8189. }),
  8190. r.quill.on(g.default.events.SCROLL_OPTIMIZE, function() {
  8191. var t = r.quill.selection.getRange(),
  8192. e = f(t, 1),
  8193. n = e[0]
  8194. r.update(n)
  8195. }),
  8196. r
  8197. )
  8198. }
  8199. return (
  8200. a(e, t),
  8201. h(e, [
  8202. {
  8203. key: 'addHandler',
  8204. value: function(t, e) {
  8205. this.handlers[t] = e
  8206. }
  8207. },
  8208. {
  8209. key: 'attach',
  8210. value: function(t) {
  8211. var e = this,
  8212. n = [].find.call(t.classList, function(t) {
  8213. return 0 === t.indexOf('ql-')
  8214. })
  8215. if (n) {
  8216. if (((n = n.slice('ql-'.length)), 'BUTTON' === t.tagName && t.setAttribute('type', 'button'), null == this.handlers[n])) {
  8217. if (null != this.quill.scroll.whitelist && null == this.quill.scroll.whitelist[n]) return void x.warn('ignoring attaching to disabled format', n, t)
  8218. if (null == v.default.query(n)) return void x.warn('ignoring attaching to nonexistent format', n, t)
  8219. }
  8220. var r = 'SELECT' === t.tagName ? 'change' : 'click'
  8221. t.addEventListener(r, function(r) {
  8222. var i = void 0
  8223. if ('SELECT' === t.tagName) {
  8224. if (t.selectedIndex < 0) return
  8225. var l = t.options[t.selectedIndex]
  8226. i = !l.hasAttribute('selected') && (l.value || !1)
  8227. } else (i = !t.classList.contains('ql-active') && (t.value || !t.hasAttribute('value'))), r.preventDefault()
  8228. e.quill.focus()
  8229. var a = e.quill.selection.getRange(),
  8230. s = f(a, 1),
  8231. u = s[0]
  8232. if (null != e.handlers[n]) e.handlers[n].call(e, i)
  8233. else if (v.default.query(n).prototype instanceof v.default.Embed) {
  8234. if (!(i = prompt('Enter ' + n))) return
  8235. e.quill.updateContents(
  8236. new d.default()
  8237. .retain(u.index)
  8238. .delete(u.length)
  8239. .insert(o({}, n, i)),
  8240. g.default.sources.USER
  8241. )
  8242. } else e.quill.format(n, i, g.default.sources.USER)
  8243. e.update(u)
  8244. }),
  8245. this.controls.push([n, t])
  8246. }
  8247. }
  8248. },
  8249. {
  8250. key: 'update',
  8251. value: function(t) {
  8252. var e = null == t ? {} : this.quill.getFormat(t)
  8253. this.controls.forEach(function(n) {
  8254. var r = f(n, 2),
  8255. o = r[0],
  8256. i = r[1]
  8257. if ('SELECT' === i.tagName) {
  8258. var l = void 0
  8259. if (null == t) l = null
  8260. else if (null == e[o]) l = i.querySelector('option[selected]')
  8261. else if (!Array.isArray(e[o])) {
  8262. var a = e[o]
  8263. 'string' == typeof a && (a = a.replace(/\"/g, '\\"')), (l = i.querySelector('option[value="' + a + '"]'))
  8264. }
  8265. null == l ? ((i.value = ''), (i.selectedIndex = -1)) : (l.selected = !0)
  8266. } else if (null == t) i.classList.remove('ql-active')
  8267. else if (i.hasAttribute('value')) {
  8268. var s = e[o] === i.getAttribute('value') || (null != e[o] && e[o].toString() === i.getAttribute('value')) || (null == e[o] && !i.getAttribute('value'))
  8269. i.classList.toggle('ql-active', s)
  8270. } else i.classList.toggle('ql-active', null != e[o])
  8271. })
  8272. }
  8273. }
  8274. ]),
  8275. e
  8276. )
  8277. })(w.default)
  8278. ;(k.DEFAULTS = {}),
  8279. (k.DEFAULTS = {
  8280. container: null,
  8281. handlers: {
  8282. clean: function() {
  8283. var t = this,
  8284. e = this.quill.getSelection()
  8285. if (null != e)
  8286. if (0 == e.length) {
  8287. var n = this.quill.getFormat()
  8288. Object.keys(n).forEach(function(e) {
  8289. null != v.default.query(e, v.default.Scope.INLINE) && t.quill.format(e, !1)
  8290. })
  8291. } else this.quill.removeFormat(e, g.default.sources.USER)
  8292. },
  8293. direction: function(t) {
  8294. var e = this.quill.getFormat().align
  8295. 'rtl' === t && null == e ? this.quill.format('align', 'right', g.default.sources.USER) : t || 'right' !== e || this.quill.format('align', !1, g.default.sources.USER),
  8296. this.quill.format('direction', t, g.default.sources.USER)
  8297. },
  8298. indent: function(t) {
  8299. var e = this.quill.getSelection(),
  8300. n = this.quill.getFormat(e),
  8301. r = parseInt(n.indent || 0)
  8302. if ('+1' === t || '-1' === t) {
  8303. var o = '+1' === t ? 1 : -1
  8304. 'rtl' === n.direction && (o *= -1), this.quill.format('indent', r + o, g.default.sources.USER)
  8305. }
  8306. },
  8307. link: function(t) {
  8308. !0 === t && (t = prompt('Enter link URL:')), this.quill.format('link', t, g.default.sources.USER)
  8309. },
  8310. list: function(t) {
  8311. var e = this.quill.getSelection(),
  8312. n = this.quill.getFormat(e)
  8313. 'check' === t
  8314. ? 'checked' === n.list || 'unchecked' === n.list
  8315. ? this.quill.format('list', !1, g.default.sources.USER)
  8316. : this.quill.format('list', 'unchecked', g.default.sources.USER)
  8317. : this.quill.format('list', t, g.default.sources.USER)
  8318. }
  8319. }
  8320. }),
  8321. (e.default = k),
  8322. (e.addControls = u)
  8323. },
  8324. function(t, e) {
  8325. t.exports =
  8326. '<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'
  8327. },
  8328. function(t, e) {
  8329. t.exports =
  8330. '<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'
  8331. },
  8332. function(t, e) {
  8333. t.exports =
  8334. '<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'
  8335. },
  8336. function(t, e) {
  8337. t.exports =
  8338. '<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'
  8339. },
  8340. function(t, e) {
  8341. t.exports =
  8342. '<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'
  8343. },
  8344. function(t, e) {
  8345. t.exports =
  8346. '<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'
  8347. },
  8348. function(t, e) {
  8349. t.exports =
  8350. '<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'
  8351. },
  8352. function(t, e) {
  8353. t.exports =
  8354. '<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'
  8355. },
  8356. function(t, e) {
  8357. t.exports =
  8358. '<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'
  8359. },
  8360. function(t, e) {
  8361. t.exports =
  8362. '<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'
  8363. },
  8364. function(t, e) {
  8365. t.exports =
  8366. '<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'
  8367. },
  8368. function(t, e) {
  8369. t.exports =
  8370. '<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'
  8371. },
  8372. function(t, e) {
  8373. t.exports =
  8374. '<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'
  8375. },
  8376. function(t, e) {
  8377. t.exports =
  8378. '<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'
  8379. },
  8380. function(t, e) {
  8381. t.exports =
  8382. '<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'
  8383. },
  8384. function(t, e) {
  8385. t.exports =
  8386. '<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'
  8387. },
  8388. function(t, e) {
  8389. t.exports =
  8390. '<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'
  8391. },
  8392. function(t, e) {
  8393. t.exports =
  8394. '<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'
  8395. },
  8396. function(t, e) {
  8397. t.exports =
  8398. '<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'
  8399. },
  8400. function(t, e) {
  8401. t.exports =
  8402. '<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'
  8403. },
  8404. function(t, e) {
  8405. t.exports =
  8406. '<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'
  8407. },
  8408. function(t, e) {
  8409. t.exports =
  8410. '<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'
  8411. },
  8412. function(t, e) {
  8413. t.exports =
  8414. '<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'
  8415. },
  8416. function(t, e) {
  8417. t.exports =
  8418. '<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'
  8419. },
  8420. function(t, e) {
  8421. t.exports =
  8422. '<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'
  8423. },
  8424. function(t, e) {
  8425. t.exports =
  8426. '<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'
  8427. },
  8428. function(t, e) {
  8429. t.exports =
  8430. '<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'
  8431. },
  8432. function(t, e) {
  8433. t.exports =
  8434. '<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'
  8435. },
  8436. function(t, e) {
  8437. t.exports =
  8438. '<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'
  8439. },
  8440. function(t, e) {
  8441. t.exports =
  8442. '<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'
  8443. },
  8444. function(t, e) {
  8445. t.exports =
  8446. '<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'
  8447. },
  8448. function(t, e) {
  8449. t.exports = '<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'
  8450. },
  8451. function(t, e, n) {
  8452. 'use strict'
  8453. function r(t) {
  8454. return t && t.__esModule ? t : { default: t }
  8455. }
  8456. function o(t, e) {
  8457. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  8458. }
  8459. function i(t, e) {
  8460. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  8461. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  8462. }
  8463. function l(t, e) {
  8464. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  8465. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  8466. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  8467. }
  8468. Object.defineProperty(e, '__esModule', { value: !0 }), (e.default = e.BubbleTooltip = void 0)
  8469. var a = function t(e, n, r) {
  8470. null === e && (e = Function.prototype)
  8471. var o = Object.getOwnPropertyDescriptor(e, n)
  8472. if (void 0 === o) {
  8473. var i = Object.getPrototypeOf(e)
  8474. return null === i ? void 0 : t(i, n, r)
  8475. }
  8476. if ('value' in o) return o.value
  8477. var l = o.get
  8478. if (void 0 !== l) return l.call(r)
  8479. },
  8480. s = (function() {
  8481. function t(t, e) {
  8482. for (var n = 0; n < e.length; n++) {
  8483. var r = e[n]
  8484. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  8485. }
  8486. }
  8487. return function(e, n, r) {
  8488. return n && t(e.prototype, n), r && t(e, r), e
  8489. }
  8490. })(),
  8491. u = n(2),
  8492. c = r(u),
  8493. f = n(9),
  8494. h = r(f),
  8495. p = n(44),
  8496. d = r(p),
  8497. y = n(22),
  8498. v = n(26),
  8499. b = r(v),
  8500. g = [
  8501. ['bold', 'italic', 'link'],
  8502. [{ header: 1 }, { header: 2 }, 'blockquote']
  8503. ],
  8504. m = (function(t) {
  8505. function e(t, n) {
  8506. o(this, e), null != n.modules.toolbar && null == n.modules.toolbar.container && (n.modules.toolbar.container = g)
  8507. var r = i(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, n))
  8508. return r.quill.container.classList.add('ql-bubble'), r
  8509. }
  8510. return (
  8511. l(e, t),
  8512. s(e, [
  8513. {
  8514. key: 'extendToolbar',
  8515. value: function(t) {
  8516. ;(this.tooltip = new _(this.quill, this.options.bounds)),
  8517. this.tooltip.root.appendChild(t.container),
  8518. this.buildButtons([].slice.call(t.container.querySelectorAll('button')), b.default),
  8519. this.buildPickers([].slice.call(t.container.querySelectorAll('select')), b.default)
  8520. }
  8521. }
  8522. ]),
  8523. e
  8524. )
  8525. })(d.default)
  8526. m.DEFAULTS = (0, c.default)(!0, {}, d.default.DEFAULTS, {
  8527. modules: {
  8528. toolbar: {
  8529. handlers: {
  8530. link: function(t) {
  8531. t ? this.quill.theme.tooltip.edit() : this.quill.format('link', !1)
  8532. }
  8533. }
  8534. }
  8535. }
  8536. })
  8537. var _ = (function(t) {
  8538. function e(t, n) {
  8539. o(this, e)
  8540. var r = i(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, n))
  8541. return (
  8542. r.quill.on(h.default.events.EDITOR_CHANGE, function(t, e, n, o) {
  8543. if (t === h.default.events.SELECTION_CHANGE)
  8544. if (null != e && e.length > 0 && o === h.default.sources.USER) {
  8545. r.show(), (r.root.style.left = '0px'), (r.root.style.width = ''), (r.root.style.width = r.root.offsetWidth + 'px')
  8546. var i = r.quill.getLines(e.index, e.length)
  8547. if (1 === i.length) r.position(r.quill.getBounds(e))
  8548. else {
  8549. var l = i[i.length - 1],
  8550. a = r.quill.getIndex(l),
  8551. s = Math.min(l.length() - 1, e.index + e.length - a),
  8552. u = r.quill.getBounds(new y.Range(a, s))
  8553. r.position(u)
  8554. }
  8555. } else document.activeElement !== r.textbox && r.quill.hasFocus() && r.hide()
  8556. }),
  8557. r
  8558. )
  8559. }
  8560. return (
  8561. l(e, t),
  8562. s(e, [
  8563. {
  8564. key: 'listen',
  8565. value: function() {
  8566. var t = this
  8567. a(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'listen', this).call(this),
  8568. this.root.querySelector('.ql-close').addEventListener('click', function() {
  8569. t.root.classList.remove('ql-editing')
  8570. }),
  8571. this.quill.on(h.default.events.SCROLL_OPTIMIZE, function() {
  8572. setTimeout(function() {
  8573. if (!t.root.classList.contains('ql-hidden')) {
  8574. var e = t.quill.getSelection()
  8575. null != e && t.position(t.quill.getBounds(e))
  8576. }
  8577. }, 1)
  8578. })
  8579. }
  8580. },
  8581. {
  8582. key: 'cancel',
  8583. value: function() {
  8584. this.show()
  8585. }
  8586. },
  8587. {
  8588. key: 'position',
  8589. value: function(t) {
  8590. var n = a(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'position', this).call(this, t),
  8591. r = this.root.querySelector('.ql-tooltip-arrow')
  8592. if (((r.style.marginLeft = ''), 0 === n)) return n
  8593. r.style.marginLeft = -1 * n - r.offsetWidth / 2 + 'px'
  8594. }
  8595. }
  8596. ]),
  8597. e
  8598. )
  8599. })(p.BaseTooltip)
  8600. ;(_.TEMPLATE = [
  8601. '<span class="ql-tooltip-arrow"></span>',
  8602. '<div class="ql-tooltip-editor">',
  8603. '<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">',
  8604. '<a class="ql-close"></a>',
  8605. '</div>'
  8606. ].join('')),
  8607. (e.BubbleTooltip = _),
  8608. (e.default = m)
  8609. },
  8610. function(t, e, n) {
  8611. 'use strict'
  8612. function r(t) {
  8613. return t && t.__esModule ? t : { default: t }
  8614. }
  8615. function o(t, e) {
  8616. if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
  8617. }
  8618. function i(t, e) {
  8619. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  8620. return !e || ('object' != typeof e && 'function' != typeof e) ? t : e
  8621. }
  8622. function l(t, e) {
  8623. if ('function' != typeof e && null !== e) throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
  8624. ;(t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })),
  8625. e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
  8626. }
  8627. Object.defineProperty(e, '__esModule', { value: !0 })
  8628. var a = (function() {
  8629. function t(t, e) {
  8630. var n = [],
  8631. r = !0,
  8632. o = !1,
  8633. i = void 0
  8634. try {
  8635. for (var l, a = t[Symbol.iterator](); !(r = (l = a.next()).done) && (n.push(l.value), !e || n.length !== e); r = !0);
  8636. } catch (t) {
  8637. ;(o = !0), (i = t)
  8638. } finally {
  8639. try {
  8640. !r && a.return && a.return()
  8641. } finally {
  8642. if (o) throw i
  8643. }
  8644. }
  8645. return n
  8646. }
  8647. return function(e, n) {
  8648. if (Array.isArray(e)) return e
  8649. if (Symbol.iterator in Object(e)) return t(e, n)
  8650. throw new TypeError('Invalid attempt to destructure non-iterable instance')
  8651. }
  8652. })(),
  8653. s = function t(e, n, r) {
  8654. null === e && (e = Function.prototype)
  8655. var o = Object.getOwnPropertyDescriptor(e, n)
  8656. if (void 0 === o) {
  8657. var i = Object.getPrototypeOf(e)
  8658. return null === i ? void 0 : t(i, n, r)
  8659. }
  8660. if ('value' in o) return o.value
  8661. var l = o.get
  8662. if (void 0 !== l) return l.call(r)
  8663. },
  8664. u = (function() {
  8665. function t(t, e) {
  8666. for (var n = 0; n < e.length; n++) {
  8667. var r = e[n]
  8668. ;(r.enumerable = r.enumerable || !1), (r.configurable = !0), 'value' in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
  8669. }
  8670. }
  8671. return function(e, n, r) {
  8672. return n && t(e.prototype, n), r && t(e, r), e
  8673. }
  8674. })(),
  8675. c = n(2),
  8676. f = r(c),
  8677. h = n(9),
  8678. p = r(h),
  8679. d = n(44),
  8680. y = r(d),
  8681. v = n(15),
  8682. b = r(v),
  8683. g = n(22),
  8684. m = n(26),
  8685. _ = r(m),
  8686. O = [[{ header: ['1', '2', '3', !1] }], ['bold', 'italic', 'underline', 'link'], [{ list: 'ordered' }, { list: 'bullet' }], ['clean']],
  8687. w = (function(t) {
  8688. function e(t, n) {
  8689. o(this, e), null != n.modules.toolbar && null == n.modules.toolbar.container && (n.modules.toolbar.container = O)
  8690. var r = i(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, n))
  8691. return r.quill.container.classList.add('ql-snow'), r
  8692. }
  8693. return (
  8694. l(e, t),
  8695. u(e, [
  8696. {
  8697. key: 'extendToolbar',
  8698. value: function(t) {
  8699. t.container.classList.add('ql-snow'),
  8700. this.buildButtons([].slice.call(t.container.querySelectorAll('button')), _.default),
  8701. this.buildPickers([].slice.call(t.container.querySelectorAll('select')), _.default),
  8702. (this.tooltip = new x(this.quill, this.options.bounds)),
  8703. t.container.querySelector('.ql-link') &&
  8704. this.quill.keyboard.addBinding({ key: 'K', shortKey: !0 }, function(e, n) {
  8705. t.handlers.link.call(t, !n.format.link)
  8706. })
  8707. }
  8708. }
  8709. ]),
  8710. e
  8711. )
  8712. })(y.default)
  8713. w.DEFAULTS = (0, f.default)(!0, {}, y.default.DEFAULTS, {
  8714. modules: {
  8715. toolbar: {
  8716. handlers: {
  8717. link: function(t) {
  8718. if (t) {
  8719. var e = this.quill.getSelection()
  8720. if (null == e || 0 == e.length) return
  8721. var n = this.quill.getText(e)
  8722. ;/^\S+@\S+\.\S+$/.test(n) && 0 !== n.indexOf('mailto:') && (n = 'mailto:' + n)
  8723. this.quill.theme.tooltip.edit('link', n)
  8724. } else this.quill.format('link', !1)
  8725. }
  8726. }
  8727. }
  8728. }
  8729. })
  8730. var x = (function(t) {
  8731. function e(t, n) {
  8732. o(this, e)
  8733. var r = i(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, n))
  8734. return (r.preview = r.root.querySelector('a.ql-preview')), r
  8735. }
  8736. return (
  8737. l(e, t),
  8738. u(e, [
  8739. {
  8740. key: 'listen',
  8741. value: function() {
  8742. var t = this
  8743. s(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'listen', this).call(this),
  8744. this.root.querySelector('a.ql-action').addEventListener('click', function(e) {
  8745. t.root.classList.contains('ql-editing') ? t.save() : t.edit('link', t.preview.textContent), e.preventDefault()
  8746. }),
  8747. this.root.querySelector('a.ql-remove').addEventListener('click', function(e) {
  8748. if (null != t.linkRange) {
  8749. var n = t.linkRange
  8750. t.restoreFocus(), t.quill.formatText(n, 'link', !1, p.default.sources.USER), delete t.linkRange
  8751. }
  8752. e.preventDefault(), t.hide()
  8753. }),
  8754. this.quill.on(p.default.events.SELECTION_CHANGE, function(e, n, r) {
  8755. if (null != e) {
  8756. if (0 === e.length && r === p.default.sources.USER) {
  8757. var o = t.quill.scroll.descendant(b.default, e.index),
  8758. i = a(o, 2),
  8759. l = i[0],
  8760. s = i[1]
  8761. if (null != l) {
  8762. t.linkRange = new g.Range(e.index - s, l.length())
  8763. var u = b.default.formats(l.domNode)
  8764. return (t.preview.textContent = u), t.preview.setAttribute('href', u), t.show(), void t.position(t.quill.getBounds(t.linkRange))
  8765. }
  8766. } else delete t.linkRange
  8767. t.hide()
  8768. }
  8769. })
  8770. }
  8771. },
  8772. {
  8773. key: 'show',
  8774. value: function() {
  8775. s(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), 'show', this).call(this), this.root.removeAttribute('data-mode')
  8776. }
  8777. }
  8778. ]),
  8779. e
  8780. )
  8781. })(d.BaseTooltip)
  8782. ;(x.TEMPLATE = [
  8783. '<a class="ql-preview" target="_blank" href="about:blank"></a>',
  8784. '<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">',
  8785. '<a class="ql-action"></a>',
  8786. '<a class="ql-remove"></a>'
  8787. ].join('')),
  8788. (e.default = w)
  8789. }
  8790. ]).default
  8791. })
  8792. //# sourceMappingURL=quill.min.js.map