quilljs-rails 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bd59f7dbba680f2b58a0d3191cac992604ffa37d
4
- data.tar.gz: d6c116dcc0c58665c81b5f5fd906e5687976b4f4
3
+ metadata.gz: d2fe686c94f80b04770c0c47a9b71115b59ab0ac
4
+ data.tar.gz: 1dc468014d32c360512e19a1e751755470fb85b7
5
5
  SHA512:
6
- metadata.gz: b803ad78ff47559900397b946ec213f53dae7993c87897eb9453a38400d6c16f5ab1f4571f0af08bbe71ba87d11dca624652d3511c709ecedc78659621d85833
7
- data.tar.gz: 7085cedca2899e3feff46f31f9591e3f304c9895ac7e3c898a8cd5a246a2ee2c666ceb524a2974b418fc143e4a441ec53a9666fc59f66015c87cbaf82b503a92
6
+ metadata.gz: 91d32eaa3eb180c413c79a8ad35de01c0b744988e34314e8ad7261dcf52a3d59893a0a81f6ceb673d44ad63e10516bf1d6ad906d265d9fd0d5ff11f37c56899e
7
+ data.tar.gz: 6462e437d1fce3f0aa0e760bfd3e067c36ca7eb3e0711747b1f8b6ddd62de4b1e1fae30367b5d8c3855b671b81a6363402e7b817d5bfcd0b37f662da0b470d35
@@ -1,10 +1,7 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <project version="4">
3
3
  <component name="ChangeListManager">
4
- <list default="true" id="f9fcd731-5b64-4fed-8dd4-b5dc13a62758" name="Default" comment="">
5
- <change type="DELETED" beforePath="$PROJECT_DIR$/quilljs-rails-0.1.0.gem" afterPath="" />
6
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
7
- </list>
4
+ <list default="true" id="f9fcd731-5b64-4fed-8dd4-b5dc13a62758" name="Default" comment="" />
8
5
  <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
9
6
  <option name="TRACKING_ENABLED" value="true" />
10
7
  <option name="SHOW_DIALOG" value="false" />
@@ -15,9 +12,10 @@
15
12
  <component name="CreatePatchCommitExecutor">
16
13
  <option name="PATCH_PATH" value="" />
17
14
  </component>
15
+ <component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
18
16
  <component name="FileEditorManager">
19
17
  <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
20
- <file leaf-file-name="quilljs-rails.gemspec" pinned="false" current-in-tab="true">
18
+ <file leaf-file-name="quilljs-rails.gemspec" pinned="false" current-in-tab="false">
21
19
  <entry file="file://$PROJECT_DIR$/quilljs-rails.gemspec">
22
20
  <provider selected="true" editor-type-id="text-editor">
23
21
  <state relative-caret-position="324">
@@ -27,6 +25,26 @@
27
25
  </provider>
28
26
  </entry>
29
27
  </file>
28
+ <file leaf-file-name="quill.min.js" pinned="false" current-in-tab="true">
29
+ <entry file="file://$PROJECT_DIR$/app/assets/javascripts/quill.min.js">
30
+ <provider selected="true" editor-type-id="text-editor">
31
+ <state relative-caret-position="72">
32
+ <caret line="4" column="37" lean-forward="false" selection-start-line="4" selection-start-column="37" selection-end-line="4" selection-end-column="37" />
33
+ <folding />
34
+ </state>
35
+ </provider>
36
+ </entry>
37
+ </file>
38
+ <file leaf-file-name="version.rb" pinned="false" current-in-tab="false">
39
+ <entry file="file://$PROJECT_DIR$/lib/quilljs/rails/version.rb">
40
+ <provider selected="true" editor-type-id="text-editor">
41
+ <state relative-caret-position="36">
42
+ <caret line="2" column="20" lean-forward="false" selection-start-line="2" selection-start-column="20" selection-end-line="2" selection-end-column="20" />
43
+ <folding />
44
+ </state>
45
+ </provider>
46
+ </entry>
47
+ </file>
30
48
  <file leaf-file-name="quill.global.js" pinned="false" current-in-tab="false">
31
49
  <entry file="file://$PROJECT_DIR$/app/assets/javascripts/quill.global.js">
32
50
  <provider selected="true" editor-type-id="text-editor">
@@ -57,9 +75,10 @@
57
75
  <option value="$PROJECT_DIR$/app/assets/stylesheets/quill.snow.css" />
58
76
  <option value="$PROJECT_DIR$/app/assets/stylesheets/quill.bubble.css" />
59
77
  <option value="$PROJECT_DIR$/app/assets/javascripts/quill.core.js" />
60
- <option value="$PROJECT_DIR$/app/assets/javascripts/quill.min.js" />
61
78
  <option value="$PROJECT_DIR$/app/assets/javascripts/quill.global.js" />
62
79
  <option value="$PROJECT_DIR$/quilljs-rails.gemspec" />
80
+ <option value="$PROJECT_DIR$/lib/quilljs/rails/version.rb" />
81
+ <option value="$PROJECT_DIR$/app/assets/javascripts/quill.min.js" />
63
82
  </list>
64
83
  </option>
65
84
  </component>
@@ -104,6 +123,46 @@
104
123
  <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
105
124
  </PATH_ELEMENT>
106
125
  </PATH>
126
+ <PATH>
127
+ <PATH_ELEMENT>
128
+ <option name="myItemId" value="quilljs-rails" />
129
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
130
+ </PATH_ELEMENT>
131
+ <PATH_ELEMENT>
132
+ <option name="myItemId" value="quilljs-rails" />
133
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
134
+ </PATH_ELEMENT>
135
+ <PATH_ELEMENT>
136
+ <option name="myItemId" value="lib" />
137
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
138
+ </PATH_ELEMENT>
139
+ <PATH_ELEMENT>
140
+ <option name="myItemId" value="quilljs" />
141
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
142
+ </PATH_ELEMENT>
143
+ </PATH>
144
+ <PATH>
145
+ <PATH_ELEMENT>
146
+ <option name="myItemId" value="quilljs-rails" />
147
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
148
+ </PATH_ELEMENT>
149
+ <PATH_ELEMENT>
150
+ <option name="myItemId" value="quilljs-rails" />
151
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
152
+ </PATH_ELEMENT>
153
+ <PATH_ELEMENT>
154
+ <option name="myItemId" value="lib" />
155
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
156
+ </PATH_ELEMENT>
157
+ <PATH_ELEMENT>
158
+ <option name="myItemId" value="quilljs" />
159
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
160
+ </PATH_ELEMENT>
161
+ <PATH_ELEMENT>
162
+ <option name="myItemId" value="rails" />
163
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
164
+ </PATH_ELEMENT>
165
+ </PATH>
107
166
  <PATH>
108
167
  <PATH_ELEMENT>
109
168
  <option name="myItemId" value="quilljs-rails" />
@@ -284,16 +343,16 @@
284
343
  <option name="presentableId" value="Default" />
285
344
  <updated>1487101611918</updated>
286
345
  <workItem from="1487101614672" duration="3887000" />
287
- <workItem from="1487284865720" duration="5818000" />
346
+ <workItem from="1487284865720" duration="6637000" />
288
347
  </task>
289
348
  <servers />
290
349
  </component>
291
350
  <component name="TimeTrackingManager">
292
- <option name="totallyTimeSpent" value="9705000" />
351
+ <option name="totallyTimeSpent" value="10524000" />
293
352
  </component>
294
353
  <component name="ToolWindowManager">
295
354
  <frame x="65" y="24" width="1535" height="876" extended-state="6" />
296
- <editor active="false" />
355
+ <editor active="true" />
297
356
  <layout>
298
357
  <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.25319007" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
299
358
  <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
@@ -369,14 +428,6 @@
369
428
  </state>
370
429
  </provider>
371
430
  </entry>
372
- <entry file="file://$PROJECT_DIR$/lib/quilljs/rails/version.rb">
373
- <provider selected="true" editor-type-id="text-editor">
374
- <state relative-caret-position="18">
375
- <caret line="1" column="9" lean-forward="false" selection-start-line="1" selection-start-column="9" selection-end-line="1" selection-end-column="9" />
376
- <folding />
377
- </state>
378
- </provider>
379
- </entry>
380
431
  <entry file="file://$PROJECT_DIR$/lib/quilljs/rails.rb">
381
432
  <provider selected="true" editor-type-id="text-editor">
382
433
  <state relative-caret-position="126">
@@ -394,10 +445,18 @@
394
445
  </state>
395
446
  </provider>
396
447
  </entry>
397
- <entry file="file://$PROJECT_DIR$/app/assets/javascripts/quill.min.js">
448
+ <entry file="file://$PROJECT_DIR$/quilljs-rails.gemspec">
398
449
  <provider selected="true" editor-type-id="text-editor">
399
- <state relative-caret-position="402">
400
- <caret line="4" column="1779" lean-forward="false" selection-start-line="4" selection-start-column="1779" selection-end-line="4" selection-end-column="1779" />
450
+ <state relative-caret-position="324">
451
+ <caret line="18" column="30" lean-forward="true" selection-start-line="18" selection-start-column="30" selection-end-line="18" selection-end-column="30" />
452
+ <folding />
453
+ </state>
454
+ </provider>
455
+ </entry>
456
+ <entry file="file://$PROJECT_DIR$/lib/quilljs/rails/version.rb">
457
+ <provider selected="true" editor-type-id="text-editor">
458
+ <state relative-caret-position="36">
459
+ <caret line="2" column="20" lean-forward="false" selection-start-line="2" selection-start-column="20" selection-end-line="2" selection-end-column="20" />
401
460
  <folding />
402
461
  </state>
403
462
  </provider>
@@ -410,10 +469,10 @@
410
469
  </state>
411
470
  </provider>
412
471
  </entry>
413
- <entry file="file://$PROJECT_DIR$/quilljs-rails.gemspec">
472
+ <entry file="file://$PROJECT_DIR$/app/assets/javascripts/quill.min.js">
414
473
  <provider selected="true" editor-type-id="text-editor">
415
- <state relative-caret-position="324">
416
- <caret line="18" column="30" lean-forward="true" selection-start-line="18" selection-start-column="30" selection-end-line="18" selection-end-column="30" />
474
+ <state relative-caret-position="72">
475
+ <caret line="4" column="37" lean-forward="false" selection-start-line="4" selection-start-column="37" selection-end-line="4" selection-end-column="37" />
417
476
  <folding />
418
477
  </state>
419
478
  </provider>
@@ -1,5 +1,14 @@
1
- !function(b,c){"object"==typeof exports&&"object"==typeof module?module.exports=c():"function"==typeof define&&define.amd?define([],c):"object"==typeof exports?exports.Quill=c():b.Quill=c()}(this,function(){return function(a){function c(d){if(b[d])return b[d].exports;var e=b[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,c),e.loaded=!0,e.exports}var b={};return c.m=a,c.c=b,c.p="",c(0)}([function(a,b,c){a.exports=c(1)},function(a,b,c){"use strict";function D(a){return a&&a.__esModule?a:{default:a}}var d=c(2),e=D(d),f=c(18),g=D(f),h=c(29),i=D(h),j=c(30),k=D(j),l=c(42),m=D(l),n=c(34),o=D(n),p=c(31),q=D(p),r=c(32),s=D(r),t=c(43),u=D(t),v=c(33),w=D(v),x=c(44),y=D(x),z=c(51),A=D(z),B=c(52),C=D(B);g.default.register({"blots/block":i.default,"blots/block/embed":h.BlockEmbed,"blots/break":k.default,"blots/container":m.default,"blots/cursor":o.default,"blots/embed":q.default,"blots/inline":s.default,"blots/scroll":u.default,"blots/text":w.default,"modules/clipboard":y.default,"modules/history":A.default,"modules/keyboard":C.default}),e.default.register(i.default,k.default,o.default,s.default,u.default,w.default),a.exports=g.default},function(a,b,c){"use strict";var d=c(3),e=c(7),f=c(12),g=c(13),h=c(14),i=c(15),j=c(16),k=c(17),l=c(8),m=c(10),n=c(11),o=c(9),p=c(6),q={Scope:p.Scope,create:p.create,find:p.find,query:p.query,register:p.register,Container:d.default,Format:e.default,Leaf:f.default,Embed:j.default,Scroll:g.default,Block:i.default,Inline:h.default,Text:k.default,Attributor:{Attribute:l.default,Class:m.default,Style:n.default,Store:o.default}};Object.defineProperty(b,"__esModule",{value:!0}),b.default=q},function(a,b,c){"use strict";function i(a){var b=g.find(a);if(null==b)try{b=g.create(a)}catch(c){b=g.create(g.Scope.INLINE),[].slice.call(a.childNodes).forEach(function(a){b.domNode.appendChild(a)}),a.parentNode.replaceChild(b.domNode,a),b.attach()}return b}var d=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)},e=c(4),f=c(5),g=c(6),h=function(a){function b(){return null!==a&&a.apply(this,arguments)||this}return d(b,a),b.prototype.appendChild=function(a){this.insertBefore(a)},b.prototype.attach=function(){var b=this;a.prototype.attach.call(this),this.children=new e.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(a){try{var c=i(a);b.insertBefore(c,b.children.head)}catch(a){if(a instanceof g.ParchmentError)return;throw a}})},b.prototype.deleteAt=function(a,b){return 0===a&&b===this.length()?this.remove():void this.children.forEachAt(a,b,function(a,b,c){a.deleteAt(b,c)})},b.prototype.descendant=function(a,c){var d=this.children.find(c),e=d[0],f=d[1];return null==a.blotName&&a(e)||null!=a.blotName&&e instanceof a?[e,f]:e instanceof b?e.descendant(a,f):[null,-1]},b.prototype.descendants=function(a,c,d){void 0===c&&(c=0),void 0===d&&(d=Number.MAX_VALUE);var e=[],f=d;return this.children.forEachAt(c,d,function(c,d,g){(null==a.blotName&&a(c)||null!=a.blotName&&c instanceof a)&&e.push(c),c instanceof b&&(e=e.concat(c.descendants(a,d,f))),f-=g}),e},b.prototype.detach=function(){this.children.forEach(function(a){a.detach()}),a.prototype.detach.call(this)},b.prototype.formatAt=function(a,b,c,d){this.children.forEachAt(a,b,function(a,b,e){a.formatAt(b,e,c,d)})},b.prototype.insertAt=function(a,b,c){var d=this.children.find(a),e=d[0],f=d[1];if(e)e.insertAt(f,b,c);else{var h=null==c?g.create("text",b):g.create(b,c);this.appendChild(h)}},b.prototype.insertBefore=function(a,b){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some(function(b){return a instanceof b}))throw new g.ParchmentError("Cannot insert "+a.statics.blotName+" into "+this.statics.blotName);a.insertInto(this,b)},b.prototype.length=function(){return this.children.reduce(function(a,b){return a+b.length()},0)},b.prototype.moveChildren=function(a,b){this.children.forEach(function(c){a.insertBefore(c,b)})},b.prototype.optimize=function(){if(a.prototype.optimize.call(this),0===this.children.length)if(null!=this.statics.defaultChild){var b=g.create(this.statics.defaultChild);this.appendChild(b),b.optimize()}else this.remove()},b.prototype.path=function(a,c){void 0===c&&(c=!1);var d=this.children.find(a,c),e=d[0],f=d[1],g=[[this,a]];return e instanceof b?g.concat(e.path(f,c)):(null!=e&&g.push([e,f]),g)},b.prototype.removeChild=function(a){this.children.remove(a)},b.prototype.replace=function(c){c instanceof b&&c.moveChildren(this),a.prototype.replace.call(this,c)},b.prototype.split=function(a,b){if(void 0===b&&(b=!1),!b){if(0===a)return this;if(a===this.length())return this.next}var c=this.clone();return this.parent.insertBefore(c,this.next),this.children.forEachAt(a,this.length(),function(a,d,e){a=a.split(d,b),c.appendChild(a)}),c},b.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},b.prototype.update=function(a){var b=this,c=[],d=[];a.forEach(function(a){a.target===b.domNode&&"childList"===a.type&&(c.push.apply(c,a.addedNodes),d.push.apply(d,a.removedNodes))}),d.forEach(function(a){if(!(null!=a.parentNode&&"IFRAME"!==a.tagName&&document.body.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var c=g.find(a);null!=c&&(null!=c.domNode.parentNode&&c.domNode.parentNode!==b.domNode||c.detach())}}),c.filter(function(a){return a.parentNode==b.domNode}).sort(function(a,b){return a===b?0:a.compareDocumentPosition(b)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(a){var c=null;null!=a.nextSibling&&(c=g.find(a.nextSibling));var d=i(a);d.next==c&&null!=d.next||(null!=d.parent&&d.parent.removeChild(b),b.insertBefore(d,c))})},b}(f.default);Object.defineProperty(b,"__esModule",{value:!0}),b.default=h},function(a,b){"use strict";var c=function(){function a(){this.head=this.tail=void 0,this.length=0}return a.prototype.append=function(){for(var a=[],b=0;b<arguments.length;b++)a[b]=arguments[b];this.insertBefore(a[0],void 0),a.length>1&&this.append.apply(this,a.slice(1))},a.prototype.contains=function(a){for(var b,c=this.iterator();b=c();)if(b===a)return!0;return!1},a.prototype.insertBefore=function(a,b){a.next=b,null!=b?(a.prev=b.prev,null!=b.prev&&(b.prev.next=a),b.prev=a,b===this.head&&(this.head=a)):null!=this.tail?(this.tail.next=a,a.prev=this.tail,this.tail=a):(a.prev=void 0,this.head=this.tail=a),this.length+=1},a.prototype.offset=function(a){for(var b=0,c=this.head;null!=c;){if(c===a)return b;b+=c.length(),c=c.next}return-1},a.prototype.remove=function(a){this.contains(a)&&(null!=a.prev&&(a.prev.next=a.next),null!=a.next&&(a.next.prev=a.prev),a===this.head&&(this.head=a.next),a===this.tail&&(this.tail=a.prev),this.length-=1)},a.prototype.iterator=function(a){return void 0===a&&(a=this.head),function(){var b=a;return null!=a&&(a=a.next),b}},a.prototype.find=function(a,b){void 0===b&&(b=!1);for(var c,d=this.iterator();c=d();){var e=c.length();if(a<e||b&&a===e&&(null==c.next||0!==c.next.length()))return[c,a];a-=e}return[null,0]},a.prototype.forEach=function(a){for(var b,c=this.iterator();b=c();)a(b)},a.prototype.forEachAt=function(a,b,c){if(!(b<=0))for(var g,d=this.find(a),e=d[0],f=d[1],h=a-f,i=this.iterator(e);(g=i())&&h<a+b;){var j=g.length();a>h?c(g,a-h,Math.min(b,h+j-a)):c(g,0,Math.min(j,a+b-h)),h+=j}},a.prototype.map=function(a){return this.reduce(function(b,c){return b.push(a(c)),b},[])},a.prototype.reduce=function(a,b){for(var c,d=this.iterator();c=d();)b=a(b,c);return b},a}();Object.defineProperty(b,"__esModule",{value:!0}),b.default=c},function(a,b,c){"use strict";var d=c(6),e=function(){function a(a){this.domNode=a,this.attach()}return Object.defineProperty(a.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),a.create=function(a){if(null==this.tagName)throw new d.ParchmentError("Blot definition missing tagName");var b;return Array.isArray(this.tagName)?("string"==typeof a&&(a=a.toUpperCase(),parseInt(a).toString()===a&&(a=parseInt(a))),b="number"==typeof a?document.createElement(this.tagName[a-1]):this.tagName.indexOf(a)>-1?document.createElement(a):document.createElement(this.tagName[0])):b=document.createElement(this.tagName),this.className&&b.classList.add(this.className),b},a.prototype.attach=function(){this.domNode[d.DATA_KEY]={blot:this}},a.prototype.clone=function(){var a=this.domNode.cloneNode();return d.create(a)},a.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[d.DATA_KEY]},a.prototype.deleteAt=function(a,b){var c=this.isolate(a,b);c.remove()},a.prototype.formatAt=function(a,b,c,e){var f=this.isolate(a,b);if(null!=d.query(c,d.Scope.BLOT)&&e)f.wrap(c,e);else if(null!=d.query(c,d.Scope.ATTRIBUTE)){var g=d.create(this.statics.scope);f.wrap(g),g.format(c,e)}},a.prototype.insertAt=function(a,b,c){var e=null==c?d.create("text",b):d.create(b,c),f=this.split(a);this.parent.insertBefore(e,f)},a.prototype.insertInto=function(a,b){if(null!=this.parent&&this.parent.children.remove(this),a.children.insertBefore(this,b),null!=b)var c=b.domNode;null!=this.next&&this.domNode.nextSibling==c||a.domNode.insertBefore(this.domNode,"undefined"!=typeof c?c:null),this.parent=a},a.prototype.isolate=function(a,b){var c=this.split(a);return c.split(b),c},a.prototype.length=function(){return 1},a.prototype.offset=function(a){return void 0===a&&(a=this.parent),null==this.parent||this==a?0:this.parent.children.offset(this)+this.parent.offset(a)},a.prototype.optimize=function(){null!=this.domNode[d.DATA_KEY]&&delete this.domNode[d.DATA_KEY].mutations},a.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},a.prototype.replace=function(a){null!=a.parent&&(a.parent.insertBefore(this,a.next),a.remove())},a.prototype.replaceWith=function(a,b){var c="string"==typeof a?d.create(a,b):a;return c.replace(this),c},a.prototype.split=function(a,b){return 0===a?this:this.next},a.prototype.update=function(a){void 0===a&&(a=[])},a.prototype.wrap=function(a,b){var c="string"==typeof a?d.create(a,b):a;return null!=this.parent&&this.parent.insertBefore(c,this.next),c.appendChild(this),c},a}();e.blotName="abstract",Object.defineProperty(b,"__esModule",{value:!0}),b.default=e},function(a,b){"use strict";function j(a,b){var c=l(a);if(null==c)throw new d("Unable to create "+a+" blot");var e=c,f=a instanceof Node?a:e.create(b);return new e(f,b)}function k(a,c){return void 0===c&&(c=!1),null==a?null:null!=a[b.DATA_KEY]?a[b.DATA_KEY].blot:c?k(a.parentNode,c):null}function l(a,b){void 0===b&&(b=i.ANY);var c;if("string"==typeof a)c=h[a]||e[a];else if(a instanceof Text)c=h.text;else if("number"==typeof a)a&i.LEVEL&i.BLOCK?c=h.block:a&i.LEVEL&i.INLINE&&(c=h.inline);else if(a instanceof HTMLElement){var d=(a.getAttribute("class")||"").split(/\s+/);for(var j in d)if(c=f[d[j]])break;c=c||g[a.tagName]}return null==c?null:b&i.LEVEL&c.scope&&b&i.TYPE&c.scope?c:null}function m(){for(var a=[],b=0;b<arguments.length;b++)a[b]=arguments[b];if(a.length>1)return a.map(function(a){return m(a)});var c=a[0];if("string"!=typeof c.blotName&&"string"!=typeof c.attrName)throw new d("Invalid definition");if("abstract"===c.blotName)throw new d("Cannot register abstract class");if(h[c.blotName||c.attrName]=c,"string"==typeof c.keyName)e[c.keyName]=c;else if(null!=c.className&&(f[c.className]=c),null!=c.tagName){Array.isArray(c.tagName)?c.tagName=c.tagName.map(function(a){return a.toUpperCase()}):c.tagName=c.tagName.toUpperCase();var i=Array.isArray(c.tagName)?c.tagName:[c.tagName];i.forEach(function(a){null!=g[a]&&null!=c.className||(g[a]=c)})}return c}var c=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)},d=function(a){function b(b){var c=this;return b="[Parchment] "+b,c=a.call(this,b)||this,c.message=b,c.name=c.constructor.name,c}return c(b,a),b}(Error);b.ParchmentError=d;var e={},f={},g={},h={};b.DATA_KEY="__blot";var i;!function(a){a[a.TYPE=3]="TYPE",a[a.LEVEL=12]="LEVEL",a[a.ATTRIBUTE=13]="ATTRIBUTE",a[a.BLOT=14]="BLOT",a[a.INLINE=7]="INLINE",a[a.BLOCK=11]="BLOCK",a[a.BLOCK_BLOT=10]="BLOCK_BLOT",a[a.INLINE_BLOT=6]="INLINE_BLOT",a[a.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",a[a.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",a[a.ANY=15]="ANY"}(i=b.Scope||(b.Scope={})),b.create=j,b.find=k,b.query=l,b.register=m},function(a,b,c){"use strict";var d=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)},e=c(8),f=c(9),g=c(3),h=c(6),i=function(a){function b(){return null!==a&&a.apply(this,arguments)||this}return d(b,a),b.formats=function(a){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?a.tagName.toLowerCase():void 0)},b.prototype.attach=function(){a.prototype.attach.call(this),this.attributes=new f.default(this.domNode)},b.prototype.format=function(a,b){var c=h.query(a);c instanceof e.default?this.attributes.attribute(c,b):b&&(null==c||a===this.statics.blotName&&this.formats()[a]===b||this.replaceWith(a,b))},b.prototype.formats=function(){var a=this.attributes.values(),b=this.statics.formats(this.domNode);return null!=b&&(a[this.statics.blotName]=b),a},b.prototype.replaceWith=function(b,c){var d=a.prototype.replaceWith.call(this,b,c);return this.attributes.copy(d),d},b.prototype.update=function(b){var c=this;a.prototype.update.call(this,b),b.some(function(a){return a.target===c.domNode&&"attributes"===a.type})&&this.attributes.build()},b.prototype.wrap=function(c,d){var e=a.prototype.wrap.call(this,c,d);return e instanceof b&&e.statics.scope===this.statics.scope&&this.attributes.move(e),e},b}(g.default);Object.defineProperty(b,"__esModule",{value:!0}),b.default=i},function(a,b,c){"use strict";var d=c(6),e=function(){function a(a,b,c){void 0===c&&(c={}),this.attrName=a,this.keyName=b;var e=d.Scope.TYPE&d.Scope.ATTRIBUTE;null!=c.scope?this.scope=c.scope&d.Scope.LEVEL|e:this.scope=d.Scope.ATTRIBUTE,null!=c.whitelist&&(this.whitelist=c.whitelist)}return a.keys=function(a){return[].map.call(a.attributes,function(a){return a.name})},a.prototype.add=function(a,b){return!!this.canAdd(a,b)&&(a.setAttribute(this.keyName,b),!0)},a.prototype.canAdd=function(a,b){var c=d.query(a,d.Scope.BLOT&(this.scope|d.Scope.TYPE));return null!=c&&(null==this.whitelist||this.whitelist.indexOf(b)>-1)},a.prototype.remove=function(a){a.removeAttribute(this.keyName)},a.prototype.value=function(a){var b=a.getAttribute(this.keyName);return this.canAdd(a,b)?b:""},a}();Object.defineProperty(b,"__esModule",{value:!0}),b.default=e},function(a,b,c){"use strict";var d=c(8),e=c(10),f=c(11),g=c(6),h=function(){function a(a){this.attributes={},this.domNode=a,this.build()}return a.prototype.attribute=function(a,b){b?a.add(this.domNode,b)&&(null!=a.value(this.domNode)?this.attributes[a.attrName]=a:delete this.attributes[a.attrName]):(a.remove(this.domNode),delete this.attributes[a.attrName])},a.prototype.build=function(){var a=this;this.attributes={};var b=d.default.keys(this.domNode),c=e.default.keys(this.domNode),h=f.default.keys(this.domNode);b.concat(c).concat(h).forEach(function(b){var c=g.query(b,g.Scope.ATTRIBUTE);c instanceof d.default&&(a.attributes[c.attrName]=c)})},a.prototype.copy=function(a){var b=this;Object.keys(this.attributes).forEach(function(c){var d=b.attributes[c].value(b.domNode);a.format(c,d)})},a.prototype.move=function(a){var b=this;this.copy(a),Object.keys(this.attributes).forEach(function(a){b.attributes[a].remove(b.domNode)}),this.attributes={}},a.prototype.values=function(){var a=this;return Object.keys(this.attributes).reduce(function(b,c){return b[c]=a.attributes[c].value(a.domNode),b},{})},a}();Object.defineProperty(b,"__esModule",{value:!0}),b.default=h},function(a,b,c){"use strict";function f(a,b){var c=a.getAttribute("class")||"";return c.split(/\s+/).filter(function(a){return 0===a.indexOf(b+"-")})}var d=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)},e=c(8),g=function(a){function b(){return null!==a&&a.apply(this,arguments)||this}return d(b,a),b.keys=function(a){return(a.getAttribute("class")||"").split(/\s+/).map(function(a){return a.split("-").slice(0,-1).join("-")})},b.prototype.add=function(a,b){return!!this.canAdd(a,b)&&(this.remove(a),a.classList.add(this.keyName+"-"+b),!0)},b.prototype.remove=function(a){var b=f(a,this.keyName);b.forEach(function(b){a.classList.remove(b)}),0===a.classList.length&&a.removeAttribute("class")},b.prototype.value=function(a){var b=f(a,this.keyName)[0]||"",c=b.slice(this.keyName.length+1);return this.canAdd(a,c)?c:""},b}(e.default);Object.defineProperty(b,"__esModule",{value:!0}),b.default=g},function(a,b,c){"use strict";function f(a){var b=a.split("-"),c=b.slice(1).map(function(a){return a[0].toUpperCase()+a.slice(1)}).join("");return b[0]+c}var d=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)},e=c(8),g=function(a){function b(){return null!==a&&a.apply(this,arguments)||this}return d(b,a),b.keys=function(a){return(a.getAttribute("style")||"").split(";").map(function(a){var b=a.split(":");return b[0].trim()})},b.prototype.add=function(a,b){return!!this.canAdd(a,b)&&(a.style[f(this.keyName)]=b,!0)},b.prototype.remove=function(a){a.style[f(this.keyName)]="",a.getAttribute("style")||a.removeAttribute("style")},b.prototype.value=function(a){var b=a.style[f(this.keyName)];return this.canAdd(a,b)?b:""},b}(e.default);Object.defineProperty(b,"__esModule",{value:!0}),b.default=g},function(a,b,c){"use strict";var d=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)},e=c(5),f=c(6),g=function(a){function b(){return null!==a&&a.apply(this,arguments)||this}return d(b,a),b.value=function(a){return!0},b.prototype.index=function(a,b){return a!==this.domNode?-1:Math.min(b,1)},b.prototype.position=function(a,b){var c=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return a>0&&(c+=1),[this.parent.domNode,c]},b.prototype.value=function(){return a={},a[this.statics.blotName]=this.statics.value(this.domNode)||!0,a;var a},b}(e.default);g.scope=f.Scope.INLINE_BLOT,Object.defineProperty(b,"__esModule",{value:!0}),b.default=g},function(a,b,c){"use strict";var d=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)},e=c(3),f=c(6),g={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},h=100,i=function(a){function b(b){var c=a.call(this,b)||this;return c.parent=null,c.observer=new MutationObserver(function(a){c.update(a)}),c.observer.observe(c.domNode,g),c}return d(b,a),b.prototype.detach=function(){a.prototype.detach.call(this),this.observer.disconnect()},b.prototype.deleteAt=function(b,c){this.update(),0===b&&c===this.length()?this.children.forEach(function(a){a.remove()}):a.prototype.deleteAt.call(this,b,c)},b.prototype.formatAt=function(b,c,d,e){this.update(),a.prototype.formatAt.call(this,b,c,d,e)},b.prototype.insertAt=function(b,c,d){this.update(),a.prototype.insertAt.call(this,b,c,d)},b.prototype.optimize=function(b){var c=this;void 0===b&&(b=[]),a.prototype.optimize.call(this);for(var d=[].slice.call(this.observer.takeRecords());d.length>0;)b.push(d.pop());for(var g=function(a,b){void 0===b&&(b=!0),null!=a&&a!==c&&null!=a.domNode.parentNode&&(null==a.domNode[f.DATA_KEY].mutations&&(a.domNode[f.DATA_KEY].mutations=[]),b&&g(a.parent))},i=function(a){null!=a.domNode[f.DATA_KEY]&&null!=a.domNode[f.DATA_KEY].mutations&&(a instanceof e.default&&a.children.forEach(i),a.optimize())},j=b,k=0;j.length>0;k+=1){if(k>=h)throw new Error("[Parchment] Maximum optimize iterations reached");for(j.forEach(function(a){var b=f.find(a.target,!0);null!=b&&(b.domNode===a.target&&("childList"===a.type?(g(f.find(a.previousSibling,!1)),[].forEach.call(a.addedNodes,function(a){var b=f.find(a,!1);g(b,!1),b instanceof e.default&&b.children.forEach(function(a){g(a,!1)})})):"attributes"===a.type&&g(b.prev)),g(b))}),this.children.forEach(i),j=[].slice.call(this.observer.takeRecords()),d=j.slice();d.length>0;)b.push(d.pop())}},b.prototype.update=function(b){var c=this;b=b||this.observer.takeRecords(),b.map(function(a){var b=f.find(a.target,!0);if(null!=b)return null==b.domNode[f.DATA_KEY].mutations?(b.domNode[f.DATA_KEY].mutations=[a],b):(b.domNode[f.DATA_KEY].mutations.push(a),null)}).forEach(function(a){null!=a&&a!==c&&null!=a.domNode[f.DATA_KEY]&&a.update(a.domNode[f.DATA_KEY].mutations||[])}),null!=this.domNode[f.DATA_KEY].mutations&&a.prototype.update.call(this,this.domNode[f.DATA_KEY].mutations),this.optimize(b)},b}(e.default);i.blotName="scroll",i.defaultChild="block",i.scope=f.Scope.BLOCK_BLOT,i.tagName="DIV",Object.defineProperty(b,"__esModule",{value:!0}),b.default=i},function(a,b,c){"use strict";function g(a,b){if(Object.keys(a).length!==Object.keys(b).length)return!1;for(var c in a)if(a[c]!==b[c])return!1;return!0}var d=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)},e=c(7),f=c(6),h=function(a){function b(){return null!==a&&a.apply(this,arguments)||this}return d(b,a),b.formats=function(c){if(c.tagName!==b.tagName)return a.formats.call(this,c)},b.prototype.format=function(c,d){var f=this;c!==this.statics.blotName||d?a.prototype.format.call(this,c,d):(this.children.forEach(function(a){a instanceof e.default||(a=a.wrap(b.blotName,!0)),f.attributes.copy(a)}),this.unwrap())},b.prototype.formatAt=function(b,c,d,e){if(null!=this.formats()[d]||f.query(d,f.Scope.ATTRIBUTE)){var g=this.isolate(b,c);g.format(d,e)}else a.prototype.formatAt.call(this,b,c,d,e)},b.prototype.optimize=function(){a.prototype.optimize.call(this);var c=this.formats();if(0===Object.keys(c).length)return this.unwrap();var d=this.next;d instanceof b&&d.prev===this&&g(c,d.formats())&&(d.moveChildren(this),d.remove())},b}(e.default);h.blotName="inline",h.scope=f.Scope.INLINE_BLOT,h.tagName="SPAN",Object.defineProperty(b,"__esModule",{value:!0}),b.default=h},function(a,b,c){"use strict";var d=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)},e=c(7),f=c(6),g=function(a){function b(){return null!==a&&a.apply(this,arguments)||this}return d(b,a),b.formats=function(c){var d=f.query(b.blotName).tagName;if(c.tagName!==d)return a.formats.call(this,c)},b.prototype.format=function(c,d){null!=f.query(c,f.Scope.BLOCK)&&(c!==this.statics.blotName||d?a.prototype.format.call(this,c,d):this.replaceWith(b.blotName))},b.prototype.formatAt=function(b,c,d,e){null!=f.query(d,f.Scope.BLOCK)?this.format(d,e):a.prototype.formatAt.call(this,b,c,d,e)},b.prototype.insertAt=function(b,c,d){if(null==d||null!=f.query(c,f.Scope.INLINE))a.prototype.insertAt.call(this,b,c,d);else{var e=this.split(b),g=f.create(c,d);e.parent.insertBefore(g,e)}},b.prototype.update=function(b){navigator.userAgent.match(/Trident/)?this.attach():a.prototype.update.call(this,b)},b}(e.default);g.blotName="block",g.scope=f.Scope.BLOCK_BLOT,g.tagName="P",Object.defineProperty(b,"__esModule",{value:!0}),b.default=g},function(a,b,c){"use strict";var d=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)},e=c(12),f=function(a){function b(){return null!==a&&a.apply(this,arguments)||this}return d(b,a),b.formats=function(a){},b.prototype.format=function(b,c){a.prototype.formatAt.call(this,0,this.length(),b,c)},b.prototype.formatAt=function(b,c,d,e){0===b&&c===this.length()?this.format(d,e):a.prototype.formatAt.call(this,b,c,d,e)},b.prototype.formats=function(){return this.statics.formats(this.domNode)},b}(e.default);Object.defineProperty(b,"__esModule",{value:!0}),b.default=f},function(a,b,c){"use strict";var d=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)},e=c(12),f=c(6),g=function(a){function b(b){var c=a.call(this,b)||this;return c.text=c.statics.value(c.domNode),c}return d(b,a),b.create=function(a){return document.createTextNode(a)},b.value=function(a){return a.data},b.prototype.deleteAt=function(a,b){this.domNode.data=this.text=this.text.slice(0,a)+this.text.slice(a+b)},b.prototype.index=function(a,b){return this.domNode===a?b:-1},b.prototype.insertAt=function(b,c,d){null==d?(this.text=this.text.slice(0,b)+c+this.text.slice(b),this.domNode.data=this.text):a.prototype.insertAt.call(this,b,c,d)},b.prototype.length=function(){return this.text.length},b.prototype.optimize=function(){a.prototype.optimize.call(this),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof b&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},b.prototype.position=function(a,b){return void 0===b&&(b=!1),[this.domNode,a]},b.prototype.split=function(a,b){if(void 0===b&&(b=!1),!b){if(0===a)return this;if(a===this.length())return this.next}var c=f.create(this.domNode.splitText(a));return this.parent.insertBefore(c,this.next),this.text=this.statics.value(this.domNode),c},b.prototype.update=function(a){var b=this;a.some(function(a){return"characterData"===a.type&&a.target===b.domNode})&&(this.text=this.statics.value(this.domNode))},b.prototype.value=function(){return this.text},b}(e.default);g.blotName="text",g.scope=f.Scope.INLINE_BLOT,Object.defineProperty(b,"__esModule",{value:!0}),b.default=g},function(a,b,c){"use strict";function y(a){return a&&a.__esModule?a:{default:a}}function z(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function A(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function D(a,b){if(b=(0,t.default)(!0,{container:a,modules:{clipboard:!0,keyboard:!0,history:!0}},b),b.theme&&b.theme!==C.DEFAULTS.theme){if(b.theme=C.import("themes/"+b.theme),null==b.theme)throw new Error("Invalid theme "+b.theme+". Did you register it?")}else b.theme=x.default;var c=(0,t.default)(!0,{},b.theme.DEFAULTS);[c,b].forEach(function(a){a.modules=a.modules||{},Object.keys(a.modules).forEach(function(b){a.modules[b]===!0&&(a.modules[b]={})})});var d=Object.keys(c.modules).concat(Object.keys(b.modules)),e=d.reduce(function(a,b){var c=C.import("modules/"+b);return null==c?B.error("Cannot load "+b+" module. Are you sure you registered it?"):a[b]=c.DEFAULTS||{},a},{});return null!=b.modules&&b.modules.toolbar&&b.modules.toolbar.constructor!==Object&&(b.modules.toolbar={container:b.modules.toolbar}),b=(0,t.default)(!0,{},C.DEFAULTS,{modules:e},c,b),["bounds","container","scrollingContainer"].forEach(function(a){"string"==typeof b[a]&&(b[a]=document.querySelector(b[a]))}),b.modules=Object.keys(b.modules).reduce(function(a,c){return b.modules[c]&&(a[c]=b.modules[c]),a},{}),b}function E(a,b,c,d){if(this.options.strict&&!this.isEnabled()&&b===l.default.sources.USER)return new h.default;var e=null==c?null:this.getSelection(),f=this.editor.delta,g=a();if(null!=e&&(c===!0&&(c=e.index),null==d?e=G(e,g,b):0!==d&&(e=G(e,c,d,b)),this.setSelection(e,l.default.sources.SILENT)),g.length()>0){var i,j=[l.default.events.TEXT_CHANGE,g,f,b];if((i=this.emitter).emit.apply(i,[l.default.events.EDITOR_CHANGE].concat(j)),b!==l.default.sources.SILENT){var k;(k=this.emitter).emit.apply(k,j)}}return g}function F(a,b,c,e,f){var g={};return"number"==typeof a.index&&"number"==typeof a.length?"number"!=typeof b?(f=e,e=c,c=b,b=a.length,a=a.index):(b=a.length,a=a.index):"number"!=typeof b&&(f=e,e=c,c=b,b=0),"object"===("undefined"==typeof c?"undefined":d(c))?(g=c,f=e):"string"==typeof c&&(null!=e?g[c]=e:f=c),f=f||l.default.sources.API,[a,b,g,f]}function G(a,b,c,d){if(null==a)return null;var f=void 0,g=void 0;if(b instanceof h.default){var i=[a.index,a.index+a.length].map(function(a){return b.transformPosition(a,d===l.default.sources.USER)}),j=e(i,2);f=j[0],g=j[1]}else{var k=[a.index,a.index+a.length].map(function(a){return a<b||a===b&&d!==l.default.sources.USER?a:c>=0?a+c:Math.max(b,a+c)}),m=e(k,2);f=m[0],g=m[1]}return new q.Range(f,g-f)}Object.defineProperty(b,"__esModule",{value:!0}),b.default=b.overload=b.expandConfig=void 0;var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var h,g=a[Symbol.iterator]();!(d=(h=g.next()).done)&&(c.push(h.value),!b||c.length!==b);d=!0);}catch(a){e=!0,f=a}finally{try{!d&&g.return&&g.return()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();c(19);var g=c(20),h=y(g),i=c(27),j=y(i),k=c(35),l=y(k),m=c(39),n=y(m),o=c(2),p=y(o),q=c(40),r=y(q),s=c(25),t=y(s),u=c(37),v=y(u),w=c(41),x=y(w),B=(0,v.default)("quill"),C=function(){function a(b){var c=this,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(A(this,a),this.options=D(b,d),this.container=this.options.container,this.scrollingContainer=this.options.scrollingContainer||document.body,null==this.container)return B.error("Invalid Quill container",b);this.options.debug&&a.debug(this.options.debug);var e=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new l.default,this.scroll=p.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new j.default(this.scroll),this.selection=new r.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(l.default.events.EDITOR_CHANGE,function(a){a===l.default.events.TEXT_CHANGE&&c.root.classList.toggle("ql-blank",c.editor.isBlank())}),this.emitter.on(l.default.events.SCROLL_UPDATE,function(a,b){var d=c.selection.lastRange,e=d&&0===d.length?d.index:void 0;E.call(c,function(){return c.editor.update(null,b,e)},a)});var f=this.clipboard.convert("<div class='ql-editor' style=\"white-space: normal;\">"+e+"<p><br></p></div>");this.setContents(f),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return f(a,null,[{key:"debug",value:function(b){b===!0&&(b="log"),v.default.level(b)}},{key:"find",value:function(b){return b.__quill||p.default.find(b)}},{key:"import",value:function(b){return null==this.imports[b]&&B.error("Cannot import "+b+". Are you sure it was registered?"),this.imports[b]}},{key:"register",value:function(b,c){var d=this,e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];
2
- if("string"!=typeof b){var f=b.attrName||b.blotName;"string"==typeof f?this.register("formats/"+f,b,c):Object.keys(b).forEach(function(a){d.register(a,b[a],c)})}else null==this.imports[b]||e||B.warn("Overwriting "+b+" with",c),this.imports[b]=c,(b.startsWith("blots/")||b.startsWith("formats/"))&&"abstract"!==c.blotName&&p.default.register(c)}}]),f(a,[{key:"addContainer",value:function(b){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof b){var d=b;b=document.createElement("div"),b.classList.add(d)}return this.container.insertBefore(b,c),b}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(b,c,d){var f=this,g=F(b,c,d),h=e(g,4);return b=h[0],c=h[1],d=h[3],E.call(this,function(){return f.editor.deleteText(b,c)},d,b,-1*c)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var b=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(b),this.container.classList.toggle("ql-disabled",!b),b||this.blur()}},{key:"focus",value:function(){var b=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=b,this.selection.scrollIntoView()}},{key:"format",value:function(b,c){var d=this,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;return E.call(this,function(){var a=d.getSelection(!0),e=new h.default;if(null==a)return e;if(p.default.query(b,p.default.Scope.BLOCK))e=d.editor.formatLine(a.index,a.length,z({},b,c));else{if(0===a.length)return d.selection.format(b,c),e;e=d.editor.formatText(a.index,a.length,z({},b,c))}return d.setSelection(a,l.default.sources.SILENT),e},e)}},{key:"formatLine",value:function(b,c,d,f,g){var h=this,i=void 0,j=F(b,c,d,f,g),k=e(j,4);return b=k[0],c=k[1],i=k[2],g=k[3],E.call(this,function(){return h.editor.formatLine(b,c,i)},g,b,0)}},{key:"formatText",value:function(b,c,d,f,g){var h=this,i=void 0,j=F(b,c,d,f,g),k=e(j,4);return b=k[0],c=k[1],i=k[2],g=k[3],E.call(this,function(){return h.editor.formatText(b,c,i)},g,b,0)}},{key:"getBounds",value:function(b){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof b?this.selection.getBounds(b,c):this.selection.getBounds(b.index,b.length)}},{key:"getContents",value:function(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-b,d=F(b,c),f=e(d,2);return b=f[0],c=f[1],this.editor.getContents(b,c)}},{key:"getFormat",value:function(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(),c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof b?this.editor.getFormat(b,c):this.editor.getFormat(b.index,b.length)}},{key:"getIndex",value:function(b){return b.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(b){return this.scroll.leaf(b)}},{key:"getLine",value:function(b){return this.scroll.line(b)}},{key:"getLines",value:function(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof b?this.scroll.lines(b.index,b.length):this.scroll.lines(b,c)}},{key:"getModule",value:function(b){return this.theme.modules[b]}},{key:"getSelection",value:function(){var b=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return b&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-b,d=F(b,c),f=e(d,2);return b=f[0],c=f[1],this.editor.getText(b,c)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(c,d,e){var f=this,g=arguments.length>3&&void 0!==arguments[3]?arguments[3]:a.sources.API;return E.call(this,function(){return f.editor.insertEmbed(c,d,e)},g,c)}},{key:"insertText",value:function(b,c,d,f,g){var h=this,i=void 0,j=F(b,0,d,f,g),k=e(j,4);return b=k[0],i=k[2],g=k[3],E.call(this,function(){return h.editor.insertText(b,c,i)},g,b,c.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(b,c,d){this.clipboard.dangerouslyPasteHTML(b,c,d)}},{key:"removeFormat",value:function(b,c,d){var f=this,g=F(b,c,d),h=e(g,4);return b=h[0],c=h[1],d=h[3],E.call(this,function(){return f.editor.removeFormat(b,c)},d,b)}},{key:"setContents",value:function(b){var c=this,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return E.call(this,function(){b=new h.default(b);var a=c.getLength(),d=c.editor.deleteText(0,a),e=c.editor.applyDelta(b),f=e.ops[e.ops.length-1];null!=f&&"string"==typeof f.insert&&"\n"===f.insert[f.insert.length-1]&&(c.editor.deleteText(c.getLength()-1,1),e.delete(1));var g=d.compose(e);return g},d)}},{key:"setSelection",value:function(c,d,f){if(null==c)this.selection.setRange(null,d||a.sources.API);else{var g=F(c,d,f),h=e(g,4);c=h[0],d=h[1],f=h[3],this.selection.setRange(new q.Range(c,d),f)}f!==l.default.sources.SILENT&&this.selection.scrollIntoView()}},{key:"setText",value:function(b){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API,d=(new h.default).insert(b);return this.setContents(d,c)}},{key:"update",value:function(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,c=this.scroll.update(b);return this.selection.update(b),c}},{key:"updateContents",value:function(b){var c=this,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return E.call(this,function(){return b=new h.default(b),c.editor.applyDelta(b,d)},d,!0)}}]),a}();C.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},C.events=l.default.events,C.sources=l.default.sources,C.version="1.2.0",C.imports={delta:h.default,parchment:p.default,"core/module":n.default,"core/theme":x.default},b.expandConfig=D,b.overload=F,b.default=C},function(a,b){"use strict";var c=document.createElement("div");c.classList.toggle("test-class",!1),c.classList.contains("test-class")&&!function(){var a=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(b,c){return arguments.length>1&&!this.contains(b)==!c?c:a.call(this,b)}}(),String.prototype.startsWith||(String.prototype.startsWith=function(a,b){return b=b||0,this.substr(b,a.length)===a}),String.prototype.endsWith||(String.prototype.endsWith=function(a,b){var c=this.toString();("number"!=typeof b||!isFinite(b)||Math.floor(b)!==b||b>c.length)&&(b=c.length),b-=a.length;var d=c.indexOf(a,b);return d!==-1&&d===b}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function a(b){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof b)throw new TypeError("predicate must be a function");for(var a,c=Object(this),d=c.length>>>0,e=arguments[1],f=0;f<d;f++)if(a=c[f],b.call(e,a,f,c))return a}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1)})},function(a,b,c){var d=c(21),e=c(22),f=c(25),g=c(26),h=String.fromCharCode(0),i=function(a){Array.isArray(a)?this.ops=a:null!=a&&Array.isArray(a.ops)?this.ops=a.ops:this.ops=[]};i.prototype.insert=function(a,b){var c={};return 0===a.length?this:(c.insert=a,null!=b&&"object"==typeof b&&Object.keys(b).length>0&&(c.attributes=b),this.push(c))},i.prototype.delete=function(a){return a<=0?this:this.push({delete:a})},i.prototype.retain=function(a,b){if(a<=0)return this;var c={retain:a};return null!=b&&"object"==typeof b&&Object.keys(b).length>0&&(c.attributes=b),this.push(c)},i.prototype.push=function(a){var b=this.ops.length,c=this.ops[b-1];if(a=f(!0,{},a),"object"==typeof c){if("number"==typeof a.delete&&"number"==typeof c.delete)return this.ops[b-1]={delete:c.delete+a.delete},this;if("number"==typeof c.delete&&null!=a.insert&&(b-=1,c=this.ops[b-1],"object"!=typeof c))return this.ops.unshift(a),this;if(e(a.attributes,c.attributes)){if("string"==typeof a.insert&&"string"==typeof c.insert)return this.ops[b-1]={insert:c.insert+a.insert},"object"==typeof a.attributes&&(this.ops[b-1].attributes=a.attributes),this;if("number"==typeof a.retain&&"number"==typeof c.retain)return this.ops[b-1]={retain:c.retain+a.retain},"object"==typeof a.attributes&&(this.ops[b-1].attributes=a.attributes),this}}return b===this.ops.length?this.ops.push(a):this.ops.splice(b,0,a),this},i.prototype.filter=function(a){return this.ops.filter(a)},i.prototype.forEach=function(a){this.ops.forEach(a)},i.prototype.map=function(a){return this.ops.map(a)},i.prototype.partition=function(a){var b=[],c=[];return this.forEach(function(d){var e=a(d)?b:c;e.push(d)}),[b,c]},i.prototype.reduce=function(a,b){return this.ops.reduce(a,b)},i.prototype.chop=function(){var a=this.ops[this.ops.length-1];return a&&a.retain&&!a.attributes&&this.ops.pop(),this},i.prototype.length=function(){return this.reduce(function(a,b){return a+g.length(b)},0)},i.prototype.slice=function(a,b){a=a||0,"number"!=typeof b&&(b=1/0);for(var c=[],d=g.iterator(this.ops),e=0;e<b&&d.hasNext();){var f;e<a?f=d.next(a-e):(f=d.next(b-e),c.push(f)),e+=g.length(f)}return new i(c)},i.prototype.compose=function(a){for(var b=g.iterator(this.ops),c=g.iterator(a.ops),d=new i;b.hasNext()||c.hasNext();)if("insert"===c.peekType())d.push(c.next());else if("delete"===b.peekType())d.push(b.next());else{var e=Math.min(b.peekLength(),c.peekLength()),f=b.next(e),h=c.next(e);if("number"==typeof h.retain){var j={};"number"==typeof f.retain?j.retain=e:j.insert=f.insert;var k=g.attributes.compose(f.attributes,h.attributes,"number"==typeof f.retain);k&&(j.attributes=k),d.push(j)}else"number"==typeof h.delete&&"number"==typeof f.retain&&d.push(h)}return d.chop()},i.prototype.concat=function(a){var b=new i(this.ops.slice());return a.ops.length>0&&(b.push(a.ops[0]),b.ops=b.ops.concat(a.ops.slice(1))),b},i.prototype.diff=function(a,b){if(this.ops===a.ops)return new i;var c=[this,a].map(function(b){return b.map(function(b){if(null!=b.insert)return"string"==typeof b.insert?b.insert:h;var c=ops===a.ops?"on":"with";throw new Error("diff() called "+c+" non-document")}).join("")}),f=new i,j=d(c[0],c[1],b),k=g.iterator(this.ops),l=g.iterator(a.ops);return j.forEach(function(a){for(var b=a[1].length;b>0;){var c=0;switch(a[0]){case d.INSERT:c=Math.min(l.peekLength(),b),f.push(l.next(c));break;case d.DELETE:c=Math.min(b,k.peekLength()),k.next(c),f.delete(c);break;case d.EQUAL:c=Math.min(k.peekLength(),l.peekLength(),b);var h=k.next(c),i=l.next(c);e(h.insert,i.insert)?f.retain(c,g.attributes.diff(h.attributes,i.attributes)):f.push(i).delete(c)}b-=c}}),f.chop()},i.prototype.eachLine=function(a,b){b=b||"\n";for(var c=g.iterator(this.ops),d=new i;c.hasNext();){if("insert"!==c.peekType())return;var e=c.peek(),f=g.length(e)-c.peekLength(),h="string"==typeof e.insert?e.insert.indexOf(b,f)-f:-1;h<0?d.push(c.next()):h>0?d.push(c.next(h)):(a(d,c.next(1).attributes||{}),d=new i)}d.length()>0&&a(d,{})},i.prototype.transform=function(a,b){if(b=!!b,"number"==typeof a)return this.transformPosition(a,b);for(var c=g.iterator(this.ops),d=g.iterator(a.ops),e=new i;c.hasNext()||d.hasNext();)if("insert"!==c.peekType()||!b&&"insert"===d.peekType())if("insert"===d.peekType())e.push(d.next());else{var f=Math.min(c.peekLength(),d.peekLength()),h=c.next(f),j=d.next(f);if(h.delete)continue;j.delete?e.push(j):e.retain(f,g.attributes.transform(h.attributes,j.attributes,b))}else e.retain(g.length(c.next()));return e.chop()},i.prototype.transformPosition=function(a,b){b=!!b;for(var c=g.iterator(this.ops),d=0;c.hasNext()&&d<=a;){var e=c.peekLength(),f=c.peekType();c.next(),"delete"!==f?("insert"===f&&(d<a||!b)&&(a+=e),d+=e):a-=Math.min(e,a-d)}return a},a.exports=i},function(a,b){function f(a,b,c){if(a==b)return a?[[e,a]]:[];(c<0||a.length<c)&&(c=null);var d=j(a,b),f=a.substring(0,d);a=a.substring(d),b=b.substring(d),d=k(a,b);var h=a.substring(a.length-d);a=a.substring(0,a.length-d),b=b.substring(0,b.length-d);var i=g(a,b);return f&&i.unshift([e,f]),h&&i.push([e,h]),m(i),null!=c&&(i=p(i,c)),i}function g(a,b){var g;if(!a)return[[d,b]];if(!b)return[[c,a]];var i=a.length>b.length?a:b,j=a.length>b.length?b:a,k=i.indexOf(j);if(k!=-1)return g=[[d,i.substring(0,k)],[e,j],[d,i.substring(k+j.length)]],a.length>b.length&&(g[0][0]=g[2][0]=c),g;if(1==j.length)return[[c,a],[d,b]];var m=l(a,b);if(m){var n=m[0],o=m[1],p=m[2],q=m[3],r=m[4],s=f(n,p),t=f(o,q);return s.concat([[e,r]],t)}return h(a,b)}function h(a,b){for(var e=a.length,f=b.length,g=Math.ceil((e+f)/2),h=g,j=2*g,k=new Array(j),l=new Array(j),m=0;m<j;m++)k[m]=-1,l[m]=-1;k[h+1]=0,l[h+1]=0;for(var n=e-f,o=n%2!=0,p=0,q=0,r=0,s=0,t=0;t<g;t++){for(var u=-t+p;u<=t-q;u+=2){var w,v=h+u;w=u==-t||u!=t&&k[v-1]<k[v+1]?k[v+1]:k[v-1]+1;for(var x=w-u;w<e&&x<f&&a.charAt(w)==b.charAt(x);)w++,x++;if(k[v]=w,w>e)q+=2;else if(x>f)p+=2;else if(o){var y=h+n-u;if(y>=0&&y<j&&l[y]!=-1){var z=e-l[y];if(w>=z)return i(a,b,w,x)}}}for(var A=-t+r;A<=t-s;A+=2){var z,y=h+A;z=A==-t||A!=t&&l[y-1]<l[y+1]?l[y+1]:l[y-1]+1;for(var B=z-A;z<e&&B<f&&a.charAt(e-z-1)==b.charAt(f-B-1);)z++,B++;if(l[y]=z,z>e)s+=2;else if(B>f)r+=2;else if(!o){var v=h+n-A;if(v>=0&&v<j&&k[v]!=-1){var w=k[v],x=h+w-v;if(z=e-z,w>=z)return i(a,b,w,x)}}}}return[[c,a],[d,b]]}function i(a,b,c,d){var e=a.substring(0,c),g=b.substring(0,d),h=a.substring(c),i=b.substring(d),j=f(e,g),k=f(h,i);return j.concat(k)}function j(a,b){if(!a||!b||a.charAt(0)!=b.charAt(0))return 0;for(var c=0,d=Math.min(a.length,b.length),e=d,f=0;c<e;)a.substring(f,e)==b.substring(f,e)?(c=e,f=c):d=e,e=Math.floor((d-c)/2+c);return e}function k(a,b){if(!a||!b||a.charAt(a.length-1)!=b.charAt(b.length-1))return 0;for(var c=0,d=Math.min(a.length,b.length),e=d,f=0;c<e;)a.substring(a.length-e,a.length-f)==b.substring(b.length-e,b.length-f)?(c=e,f=c):d=e,e=Math.floor((d-c)/2+c);return e}function l(a,b){function e(a,b,c){for(var g,h,i,l,d=a.substring(c,c+Math.floor(a.length/4)),e=-1,f="";(e=b.indexOf(d,e+1))!=-1;){var m=j(a.substring(c),b.substring(e)),n=k(a.substring(0,c),b.substring(0,e));f.length<n+m&&(f=b.substring(e-n,e)+b.substring(e,e+m),g=a.substring(0,c-n),h=a.substring(c+m),i=b.substring(0,e-n),l=b.substring(e+m))}return 2*f.length>=a.length?[g,h,i,l,f]:null}var c=a.length>b.length?a:b,d=a.length>b.length?b:a;if(c.length<4||2*d.length<c.length)return null;var h,f=e(c,d,Math.ceil(c.length/4)),g=e(c,d,Math.ceil(c.length/2));if(!f&&!g)return null;h=g?f&&f[4].length>g[4].length?f:g:f;var i,l,m,n;a.length>b.length?(i=h[0],l=h[1],m=h[2],n=h[3]):(m=h[0],n=h[1],i=h[2],l=h[3]);var o=h[4];return[i,l,m,n,o]}function m(a){a.push([e,""]);for(var l,b=0,f=0,g=0,h="",i="";b<a.length;)switch(a[b][0]){case d:g++,i+=a[b][1],b++;break;case c:f++,h+=a[b][1],b++;break;case e:f+g>1?(0!==f&&0!==g&&(l=j(i,h),0!==l&&(b-f-g>0&&a[b-f-g-1][0]==e?a[b-f-g-1][1]+=i.substring(0,l):(a.splice(0,0,[e,i.substring(0,l)]),b++),i=i.substring(l),h=h.substring(l)),l=k(i,h),0!==l&&(a[b][1]=i.substring(i.length-l)+a[b][1],i=i.substring(0,i.length-l),h=h.substring(0,h.length-l))),0===f?a.splice(b-g,f+g,[d,i]):0===g?a.splice(b-f,f+g,[c,h]):a.splice(b-f-g,f+g,[c,h],[d,i]),b=b-f-g+(f?1:0)+(g?1:0)+1):0!==b&&a[b-1][0]==e?(a[b-1][1]+=a[b][1],a.splice(b,1)):b++,g=0,f=0,h="",i=""}""===a[a.length-1][1]&&a.pop();var n=!1;for(b=1;b<a.length-1;)a[b-1][0]==e&&a[b+1][0]==e&&(a[b][1].substring(a[b][1].length-a[b-1][1].length)==a[b-1][1]?(a[b][1]=a[b-1][1]+a[b][1].substring(0,a[b][1].length-a[b-1][1].length),a[b+1][1]=a[b-1][1]+a[b+1][1],a.splice(b-1,1),n=!0):a[b][1].substring(0,a[b+1][1].length)==a[b+1][1]&&(a[b-1][1]+=a[b+1][1],a[b][1]=a[b][1].substring(a[b+1][1].length)+a[b+1][1],a.splice(b+1,1),n=!0)),b++;n&&m(a)}function o(a,b){if(0===b)return[e,a];for(var d=0,f=0;f<a.length;f++){var g=a[f];if(g[0]===c||g[0]===e){var h=d+g[1].length;if(b===h)return[f+1,a];if(b<h){a=a.slice();var i=b-d,j=[g[0],g[1].slice(0,i)],k=[g[0],g[1].slice(i)];return a.splice(f,1,j,k),[f+1,a]}d=h}}throw new Error("cursor_pos is out of bounds!")}function p(a,b){var c=o(a,b),d=c[1],f=c[0],g=d[f],h=d[f+1];if(null==g)return a;if(g[0]!==e)return a;if(null!=h&&g[1]+h[1]===h[1]+g[1])return d.splice(f,2,h,g),q(d,f,2);if(null!=h&&0===h[1].indexOf(g[1])){d.splice(f,2,[h[0],g[1]],[0,g[1]]);var i=h[1].slice(g[1].length);return i.length>0&&d.splice(f+2,0,[h[0],i]),q(d,f,3)}return a}function q(a,b,c){for(var d=b+c-1;d>=0&&d>=b-1;d--)if(d+1<a.length){var e=a[d],f=a[d+1];e[0]===f[1]&&a.splice(d,2,[e[0],e[1]+f[1]])}return a}var c=-1,d=1,e=0,n=f;n.INSERT=d,n.DELETE=c,n.EQUAL=e,a.exports=n},function(a,b,c){function h(a){return null===a||void 0===a}function i(a){return!(!a||"object"!=typeof a||"number"!=typeof a.length)&&("function"==typeof a.copy&&"function"==typeof a.slice&&!(a.length>0&&"number"!=typeof a[0]))}function j(a,b,c){var j,k;if(h(a)||h(b))return!1;if(a.prototype!==b.prototype)return!1;if(f(a))return!!f(b)&&(a=d.call(a),b=d.call(b),g(a,b,c));if(i(a)){if(!i(b))return!1;if(a.length!==b.length)return!1;for(j=0;j<a.length;j++)if(a[j]!==b[j])return!1;return!0}try{var l=e(a),m=e(b)}catch(a){return!1}if(l.length!=m.length)return!1;for(l.sort(),m.sort(),j=l.length-1;j>=0;j--)if(l[j]!=m[j])return!1;for(j=l.length-1;j>=0;j--)if(k=l[j],!g(a[k],b[k],c))return!1;return typeof a==typeof b}var d=Array.prototype.slice,e=c(23),f=c(24),g=a.exports=function(a,b,c){return c||(c={}),a===b||(a instanceof Date&&b instanceof Date?a.getTime()===b.getTime():!a||!b||"object"!=typeof a&&"object"!=typeof b?c.strict?a===b:a==b:j(a,b,c))}},function(a,b){function c(a){var b=[];for(var c in a)b.push(c);return b}b=a.exports="function"==typeof Object.keys?Object.keys:c,b.shim=c},function(a,b){function d(a){return"[object Arguments]"==Object.prototype.toString.call(a)}function e(a){return a&&"object"==typeof a&&"number"==typeof a.length&&Object.prototype.hasOwnProperty.call(a,"callee")&&!Object.prototype.propertyIsEnumerable.call(a,"callee")||!1}var c="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();b=a.exports=c?d:e,b.supported=d,b.unsupported=e},function(a,b){"use strict";var c=Object.prototype.hasOwnProperty,d=Object.prototype.toString,e=function(b){return"function"==typeof Array.isArray?Array.isArray(b):"[object Array]"===d.call(b)},f=function(b){if(!b||"[object Object]"!==d.call(b))return!1;var e=c.call(b,"constructor"),f=b.constructor&&b.constructor.prototype&&c.call(b.constructor.prototype,"isPrototypeOf");if(b.constructor&&!e&&!f)return!1;var g;for(g in b);return"undefined"==typeof g||c.call(b,g)};a.exports=function a(){var b,c,d,g,h,i,j=arguments[0],k=1,l=arguments.length,m=!1;for("boolean"==typeof j?(m=j,j=arguments[1]||{},k=2):("object"!=typeof j&&"function"!=typeof j||null==j)&&(j={});k<l;++k)if(b=arguments[k],null!=b)for(c in b)d=j[c],g=b[c],j!==g&&(m&&g&&(f(g)||(h=e(g)))?(h?(h=!1,i=d&&e(d)?d:[]):i=d&&f(d)?d:{},j[c]=a(m,i,g)):"undefined"!=typeof g&&(j[c]=g));return j}},function(a,b,c){function g(a){this.ops=a,this.index=0,this.offset=0}var d=c(22),e=c(25),f={attributes:{compose:function(a,b,c){"object"!=typeof a&&(a={}),"object"!=typeof b&&(b={});var d=e(!0,{},b);c||(d=Object.keys(d).reduce(function(a,b){return null!=d[b]&&(a[b]=d[b]),a},{}));for(var f in a)void 0!==a[f]&&void 0===b[f]&&(d[f]=a[f]);return Object.keys(d).length>0?d:void 0},diff:function(a,b){"object"!=typeof a&&(a={}),"object"!=typeof b&&(b={});var c=Object.keys(a).concat(Object.keys(b)).reduce(function(c,e){return d(a[e],b[e])||(c[e]=void 0===b[e]?null:b[e]),c},{});return Object.keys(c).length>0?c:void 0},transform:function(a,b,c){if("object"!=typeof a)return b;if("object"==typeof b){if(!c)return b;var d=Object.keys(b).reduce(function(c,d){return void 0===a[d]&&(c[d]=b[d]),c},{});return Object.keys(d).length>0?d:void 0}}},iterator:function(a){return new g(a)},length:function(a){return"number"==typeof a.delete?a.delete:"number"==typeof a.retain?a.retain:"string"==typeof a.insert?a.insert.length:1}};g.prototype.hasNext=function(){return this.peekLength()<1/0},g.prototype.next=function(a){a||(a=1/0);var b=this.ops[this.index];if(b){var c=this.offset,d=f.length(b);if(a>=d-c?(a=d-c,this.index+=1,this.offset=0):this.offset+=a,"number"==typeof b.delete)return{delete:a};var e={};return b.attributes&&(e.attributes=b.attributes),"number"==typeof b.retain?e.retain=a:"string"==typeof b.insert?e.insert=b.insert.substr(c,a):e.insert=b.insert,e}return{retain:1/0}},g.prototype.peek=function(){return this.ops[this.index]},g.prototype.peekLength=function(){return this.ops[this.index]?f.length(this.ops[this.index])-this.offset:1/0},g.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},a.exports=f},function(a,b,c){"use strict";function y(a){return a&&a.__esModule?a:{default:a}}function z(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function A(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function C(a,b){return Object.keys(b).reduce(function(c,d){return null==a[d]?c:(b[d]===a[d]?c[d]=b[d]:Array.isArray(b[d])?b[d].indexOf(a[d])<0&&(c[d]=b[d].concat([a[d]])):c[d]=[b[d],a[d]],c)},{})}function D(a){return a.reduce(function(a,b){if(1===b.insert){var c=(0,t.default)(b.attributes);return delete c.image,a.insert({image:b.attributes.image},c)}if(null==b.attributes||b.attributes.list!==!0&&b.attributes.bullet!==!0||(b=(0,t.default)(b),b.attributes.list?b.attributes.list="ordered":(b.attributes.list="bullet",delete b.attributes.bullet)),"string"==typeof b.insert){var d=b.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return a.insert(d,b.attributes)}return a.push(b)},new h.default)}Object.defineProperty(b,"__esModule",{value:!0});var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var h,g=a[Symbol.iterator]();!(d=(h=g.next()).done)&&(c.push(h.value),!b||c.length!==b);d=!0);}catch(a){e=!0,f=a}finally{try{!d&&g.return&&g.return()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=c(20),h=y(g),i=c(26),j=y(i),k=c(2),l=y(k),m=c(28),n=y(m),o=c(34),p=y(o),q=c(29),r=y(q),s=c(38),t=y(s),u=c(22),v=y(u),w=c(25),x=y(w),B=function(){function a(b){A(this,a),this.scroll=b,this.delta=this.getDelta()}return f(a,[{key:"applyDelta",value:function(b){var c=this,f=!1;this.scroll.update();var g=this.scroll.length();return this.scroll.batch=!0,b=D(b),b.reduce(function(a,b){var h=b.retain||b.delete||b.insert.length||1,i=b.attributes||{};if(null!=b.insert){if("string"==typeof b.insert){var k=b.insert;k.endsWith("\n")&&f&&(f=!1,k=k.slice(0,-1)),a>=g&&!k.endsWith("\n")&&(f=!0),c.scroll.insertAt(a,k);var m=c.scroll.line(a),n=e(m,2),o=n[0],p=n[1],s=(0,x.default)({},(0,q.bubbleFormats)(o));if(o instanceof r.default){var t=o.descendant(l.default.Leaf,p),u=e(t,1),v=u[0];s=(0,x.default)(s,(0,q.bubbleFormats)(v))}i=j.default.attributes.diff(s,i)||{}}else if("object"===d(b.insert)){var w=Object.keys(b.insert)[0];if(null==w)return a;c.scroll.insertAt(a,w,b.insert[w])}g+=h}return Object.keys(i).forEach(function(b){c.scroll.formatAt(a,h,b,i[b])}),a+h},0),b.reduce(function(a,b){return"number"==typeof b.delete?(c.scroll.deleteAt(a,b.delete),a):a+(b.retain||b.insert.length||1)},0),this.scroll.batch=!1,this.scroll.optimize(),this.update(b)}},{key:"deleteText",value:function(b,c){return this.scroll.deleteAt(b,c),this.update((new h.default).retain(b).delete(c))}},{key:"formatLine",value:function(b,c){var d=this,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(e).forEach(function(a){if(null==d.scroll.whitelist||d.scroll.whitelist[a]){var f=d.scroll.lines(b,Math.max(c,1)),g=c;f.forEach(function(c){var f=c.length();if(c instanceof n.default){var h=b-c.offset(d.scroll),i=c.newlineIndex(h+g)-h+1;c.formatAt(h,i,a,e[a])}else c.format(a,e[a]);g-=f})}}),this.scroll.optimize(),this.update((new h.default).retain(b).retain(c,(0,t.default)(e)))}},{key:"formatText",value:function(b,c){var d=this,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(e).forEach(function(a){d.scroll.formatAt(b,c,a,e[a])}),this.update((new h.default).retain(b).retain(c,(0,t.default)(e)))}},{key:"getContents",value:function(b,c){return this.delta.slice(b,b+c)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(a,b){return a.concat(b.delta())},new h.default)}},{key:"getFormat",value:function(b){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,d=[],f=[];0===c?this.scroll.path(b).forEach(function(a){var b=e(a,1),c=b[0];c instanceof r.default?d.push(c):c instanceof l.default.Leaf&&f.push(c)}):(d=this.scroll.lines(b,c),f=this.scroll.descendants(l.default.Leaf,b,c));var g=[d,f].map(function(a){if(0===a.length)return{};for(var b=(0,q.bubbleFormats)(a.shift());Object.keys(b).length>0;){var c=a.shift();if(null==c)return b;b=C((0,q.bubbleFormats)(c),b)}return b});return x.default.apply(x.default,g)}},{key:"getText",value:function(b,c){return this.getContents(b,c).filter(function(a){return"string"==typeof a.insert}).map(function(a){return a.insert}).join("")}},{key:"insertEmbed",value:function(b,c,d){return this.scroll.insertAt(b,c,d),this.update((new h.default).retain(b).insert(z({},c,d)))}},{key:"insertText",value:function(b,c){var d=this,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return c=c.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(b,c),Object.keys(e).forEach(function(a){d.scroll.formatAt(b,c.length,a,e[a])}),this.update((new h.default).retain(b).insert(c,(0,t.default)(e)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var b=this.scroll.children.head;return b.length()<=1&&0==Object.keys(b.formats()).length}},{key:"removeFormat",value:function(b,c){var d=this.getText(b,c),f=this.scroll.line(b+c),g=e(f,2),i=g[0],j=g[1],k=0,l=new h.default;null!=i&&(k=i instanceof n.default?i.newlineIndex(j)-j+1:i.length()-j,l=i.delta().slice(j,j+k-1).insert("\n"));var m=this.getContents(b,c+k),o=m.diff((new h.default).insert(d).concat(l)),p=(new h.default).retain(b).concat(o);return this.applyDelta(p)}},{key:"update",value:function(b){var c=this,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,f=this.delta;return 1===d.length&&"characterData"===d[0].type&&l.default.find(d[0].target)?!function(){var a=l.default.find(d[0].target),g=(0,q.bubbleFormats)(a),i=a.offset(c.scroll),j=d[0].oldValue.replace(p.default.CONTENTS,""),k=(new h.default).insert(j),m=(new h.default).insert(a.value()),n=(new h.default).retain(i).concat(k.diff(m,e));b=n.reduce(function(a,b){return b.insert?a.insert(b.insert,g):a.push(b)},new h.default),c.delta=f.compose(b)}():(this.delta=this.getDelta(),b&&(0,v.default)(f.compose(b),this.delta)||(b=f.diff(this.delta,e))),b}}]),a}();b.default=B},function(a,b,c){"use strict";function q(a){return a&&a.__esModule?a:{default:a}}function r(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function s(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function t(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.default=b.Code=void 0;var d=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var h,g=a[Symbol.iterator]();!(d=(h=g.next()).done)&&(c.push(h.value),!b||c.length!==b);d=!0);}catch(a){e=!0,f=a}finally{try{!d&&g.return&&g.return()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function a(b,c,d){null===b&&(b=Function.prototype);var e=Object.getOwnPropertyDescriptor(b,c);if(void 0===e){var f=Object.getPrototypeOf(b);return null===f?void 0:a(f,c,d)}if("value"in e)return e.value;var g=e.get;if(void 0!==g)return g.call(d)},g=c(20),h=q(g),i=c(2),j=q(i),k=c(29),l=q(k),m=c(32),n=q(m),o=c(33),p=q(o),u=function(a){function b(){return r(this,b),s(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return t(b,a),b}(n.default);u.blotName="code",u.tagName="CODE";var v=function(a){function b(){return r(this,b),s(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return t(b,a),e(b,[{key:"delta",value:function(){var b=this,c=this.domNode.textContent;return c.endsWith("\n")&&(c=c.slice(0,-1)),c.split("\n").reduce(function(a,c){return a.insert(c).insert("\n",b.formats())},new h.default)}},{key:"format",value:function(c,e){if(c!==this.statics.blotName||!e){var g=this.descendant(p.default,this.length()-1),h=d(g,1),i=h[0];null!=i&&i.deleteAt(i.length()-1,1),f(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"format",this).call(this,c,e)}}},{key:"formatAt",value:function(c,d,e,f){if(0!==d&&null!=j.default.query(e,j.default.Scope.BLOCK)&&(e!==this.statics.blotName||f!==this.statics.formats(this.domNode))){var g=this.newlineIndex(c);if(!(g<0||g>=c+d)){var h=this.newlineIndex(c,!0)+1,i=g-h+1,k=this.isolate(h,i),l=k.next;k.format(e,f),l instanceof b&&l.formatAt(0,c-h+d-i,e,f)}}}},{key:"insertAt",value:function(b,c,e){if(null==e){var f=this.descendant(p.default,b),g=d(f,2),h=g[0],i=g[1];h.insertAt(i,c)}}},{key:"length",value:function a(){var a=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?a:a+1}},{key:"newlineIndex",value:function(b){var c=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(c)return this.domNode.textContent.slice(0,b).lastIndexOf("\n");var d=this.domNode.textContent.slice(b).indexOf("\n");return d>-1?b+d:-1}},{key:"optimize",value:function(){this.domNode.textContent.endsWith("\n")||this.appendChild(j.default.create("text","\n")),f(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"optimize",this).call(this);var c=this.next;null!=c&&c.prev===this&&c.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===c.statics.formats(c.domNode)&&(c.optimize(),c.moveChildren(this),c.remove())}},{key:"replace",value:function(c){f(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"replace",this).call(this,c),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(a){var b=j.default.find(a);null==b?a.parentNode.removeChild(a):b instanceof j.default.Embed?b.remove():b.unwrap()})}}],[{key:"create",
3
- value:function(c){var d=f(b.__proto__||Object.getPrototypeOf(b),"create",this).call(this,c);return d.setAttribute("spellcheck",!1),d}},{key:"formats",value:function(){return!0}}]),b}(l.default);v.blotName="code-block",v.tagName="PRE",v.TAB=" ",b.Code=u,b.default=v},function(a,b,c){"use strict";function t(a){return a&&a.__esModule?a:{default:a}}function u(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function v(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function w(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function A(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==a?b:("function"==typeof a.formats&&(b=(0,g.default)(b,a.formats())),null==a.parent||"scroll"==a.parent.blotName||a.parent.statics.scope!==a.statics.scope?b:A(a.parent,b))}Object.defineProperty(b,"__esModule",{value:!0}),b.default=b.BlockEmbed=b.bubbleFormats=void 0;var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function a(b,c,d){null===b&&(b=Function.prototype);var e=Object.getOwnPropertyDescriptor(b,c);if(void 0===e){var f=Object.getPrototypeOf(b);return null===f?void 0:a(f,c,d)}if("value"in e)return e.value;var g=e.get;if(void 0!==g)return g.call(d)},f=c(25),g=t(f),h=c(20),i=t(h),j=c(2),k=t(j),l=c(30),m=t(l),n=c(31),o=t(n),p=c(32),q=t(p),r=c(33),s=t(r),x=1,y=function(a){function b(){return u(this,b),v(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return w(b,a),d(b,[{key:"attach",value:function(){e(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"attach",this).call(this),this.attributes=new k.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return(new i.default).insert(this.value(),(0,g.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(b,c){var d=k.default.query(b,k.default.Scope.BLOCK_ATTRIBUTE);null!=d&&this.attributes.attribute(d,c)}},{key:"formatAt",value:function(b,c,d,e){this.format(d,e)}},{key:"insertAt",value:function(c,d,f){if("string"==typeof d&&d.endsWith("\n")){var g=k.default.create(z.blotName);this.parent.insertBefore(g,0===c?this:this.next),g.insertAt(0,d.slice(0,-1))}else e(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"insertAt",this).call(this,c,d,f)}}]),b}(o.default);y.scope=k.default.Scope.BLOCK_BLOT;var z=function(a){function b(a){u(this,b);var c=v(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.cache={},c}return w(b,a),d(b,[{key:"delta",value:function(){return null==this.cache.delta&&(this.cache.delta=this.descendants(k.default.Leaf).reduce(function(a,b){return 0===b.length()?a:a.insert(b.value(),A(b))},new i.default).insert("\n",A(this))),this.cache.delta}},{key:"deleteAt",value:function(c,d){e(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"deleteAt",this).call(this,c,d),this.cache={}}},{key:"formatAt",value:function(c,d,f,g){d<=0||(k.default.query(f,k.default.Scope.BLOCK)?c+d===this.length()&&this.format(f,g):e(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"formatAt",this).call(this,c,Math.min(d,this.length()-c-1),f,g),this.cache={})}},{key:"insertAt",value:function(c,d,f){if(null!=f)return e(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"insertAt",this).call(this,c,d,f);if(0!==d.length){var g=d.split("\n"),h=g.shift();h.length>0&&(c<this.length()-1||null==this.children.tail?e(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"insertAt",this).call(this,Math.min(c,this.length()-1),h):this.children.tail.insertAt(this.children.tail.length(),h),this.cache={});var i=this;g.reduce(function(a,b){return i=i.split(a,!0),i.insertAt(0,b),b.length},c+h.length)}}},{key:"insertBefore",value:function(c,d){var f=this.children.head;e(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"insertBefore",this).call(this,c,d),f instanceof m.default&&f.remove(),this.cache={}}},{key:"length",value:function(){return null==this.cache.length&&(this.cache.length=e(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"length",this).call(this)+x),this.cache.length}},{key:"moveChildren",value:function(c,d){e(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"moveChildren",this).call(this,c,d),this.cache={}}},{key:"optimize",value:function(){e(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"optimize",this).call(this),this.cache={}}},{key:"path",value:function(c){return e(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"path",this).call(this,c,!0)}},{key:"removeChild",value:function(c){e(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"removeChild",this).call(this,c),this.cache={}}},{key:"split",value:function(c){var d=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(d&&(0===c||c>=this.length()-x)){var f=this.clone();return 0===c?(this.parent.insertBefore(f,this),this):(this.parent.insertBefore(f,this.next),f)}var g=e(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"split",this).call(this,c,d);return this.cache={},g}}]),b}(k.default.Block);z.blotName="block",z.tagName="P",z.defaultChild="break",z.allowedChildren=[q.default,o.default,s.default],b.bubbleFormats=A,b.BlockEmbed=y,b.default=z},function(a,b,c){"use strict";function h(a){return a&&a.__esModule?a:{default:a}}function i(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function j(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function k(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function a(b,c,d){null===b&&(b=Function.prototype);var e=Object.getOwnPropertyDescriptor(b,c);if(void 0===e){var f=Object.getPrototypeOf(b);return null===f?void 0:a(f,c,d)}if("value"in e)return e.value;var g=e.get;if(void 0!==g)return g.call(d)},f=c(31),g=h(f),l=function(a){function b(){return i(this,b),j(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return k(b,a),d(b,[{key:"insertInto",value:function(c,d){0===c.children.length?e(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"insertInto",this).call(this,c,d):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),b}(g.default);l.blotName="break",l.tagName="BR",b.default=l},function(a,b,c){"use strict";function f(a){return a&&a.__esModule?a:{default:a}}function g(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function h(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function i(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0});var d=c(2),e=f(d),j=function(a){function b(){return g(this,b),h(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return i(b,a),b}(e.default.Embed);b.default=j},function(a,b,c){"use strict";function l(a){return a&&a.__esModule?a:{default:a}}function m(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function n(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function o(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function a(b,c,d){null===b&&(b=Function.prototype);var e=Object.getOwnPropertyDescriptor(b,c);if(void 0===e){var f=Object.getPrototypeOf(b);return null===f?void 0:a(f,c,d)}if("value"in e)return e.value;var g=e.get;if(void 0!==g)return g.call(d)},f=c(31),g=l(f),h=c(33),i=l(h),j=c(2),k=l(j),p=function(a){function b(){return m(this,b),n(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return o(b,a),d(b,[{key:"formatAt",value:function(c,d,f,g){if(b.compare(this.statics.blotName,f)<0&&k.default.query(f,k.default.Scope.BLOT)){var h=this.isolate(c,d);g&&h.wrap(f,g)}else e(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"formatAt",this).call(this,c,d,f,g)}},{key:"optimize",value:function(){if(e(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"optimize",this).call(this),this.parent instanceof b&&b.compare(this.statics.blotName,this.parent.statics.blotName)>0){var c=this.parent.isolate(this.offset(),this.length());this.moveChildren(c),c.wrap(this)}}}],[{key:"compare",value:function(c,d){var e=b.order.indexOf(c),f=b.order.indexOf(d);return e>=0||f>=0?e-f:c===d?0:c<d?-1:1}}]),b}(k.default.Inline);p.allowedChildren=[p,g.default,i.default],p.order=["cursor","inline","code","underline","strike","italic","bold","script","link"],b.default=p},function(a,b,c){"use strict";function f(a){return a&&a.__esModule?a:{default:a}}function g(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function h(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function i(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0});var d=c(2),e=f(d),j=function(a){function b(){return g(this,b),h(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return i(b,a),b}(e.default.Text);b.default=j},function(a,b,c){"use strict";function o(a){return a&&a.__esModule?a:{default:a}}function p(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function q(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function r(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var h,g=a[Symbol.iterator]();!(d=(h=g.next()).done)&&(c.push(h.value),!b||c.length!==b);d=!0);}catch(a){e=!0,f=a}finally{try{!d&&g.return&&g.return()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),e=function a(b,c,d){null===b&&(b=Function.prototype);var e=Object.getOwnPropertyDescriptor(b,c);if(void 0===e){var f=Object.getPrototypeOf(b);return null===f?void 0:a(f,c,d)}if("value"in e)return e.value;var g=e.get;if(void 0!==g)return g.call(d)},f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=c(2),h=o(g),i=c(31),j=o(i),k=c(33),l=o(k),m=c(35),n=o(m),s=function(a){function b(a,c){p(this,b);var d=q(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return d.selection=c,d.textNode=document.createTextNode(b.CONTENTS),d.domNode.appendChild(d.textNode),d._length=0,d}return r(b,a),f(b,null,[{key:"value",value:function(){}}]),f(b,[{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this)}},{key:"format",value:function(c,d){if(0!==this._length)return e(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"format",this).call(this,c,d);for(var f=this,g=0;null!=f&&f.statics.scope!==h.default.Scope.BLOCK_BLOT;)g+=f.offset(f.parent),f=f.parent;null!=f&&(this._length=b.CONTENTS.length,f.optimize(),f.formatAt(g,b.CONTENTS.length,c,d),this._length=0)}},{key:"index",value:function(c,d){return c===this.textNode?0:e(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"index",this).call(this,c,d)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){e(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){var c=this;if(!this.selection.composing&&null!=this.parent){var e=this.textNode,f=this.selection.getNativeRange(),g=void 0,i=void 0,j=void 0;if(null!=f&&f.start.node===e&&f.end.node===e){var k=[e,f.start.offset,f.end.offset];g=k[0],i=k[1],j=k[2]}for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==b.CONTENTS){var m=this.textNode.data.split(b.CONTENTS).join("");this.next instanceof l.default?(g=this.next.domNode,this.next.insertAt(0,m),this.textNode.data=b.CONTENTS):(this.textNode.data=m,this.parent.insertBefore(h.default.create(this.textNode),this),this.textNode=document.createTextNode(b.CONTENTS),this.domNode.appendChild(this.textNode))}this.remove(),null!=i&&this.selection.emitter.once(n.default.events.SCROLL_OPTIMIZE,function(){var a=[i,j].map(function(a){return Math.max(0,Math.min(g.data.length,a-1))}),b=d(a,2);i=b[0],j=b[1],c.selection.setNativeRange(g,i,g,j)})}}},{key:"update",value:function(b){var c=this;b.forEach(function(a){"characterData"===a.type&&a.target===c.textNode&&c.restore()})}},{key:"value",value:function(){return""}}]),b}(j.default);s.blotName="cursor",s.className="ql-cursor",s.tagName="span",s.CONTENTS="\ufeff",b.default=s},function(a,b,c){"use strict";function j(a){return a&&a.__esModule?a:{default:a}}function k(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function l(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function m(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function a(b,c,d){null===b&&(b=Function.prototype);var e=Object.getOwnPropertyDescriptor(b,c);if(void 0===e){var f=Object.getPrototypeOf(b);return null===f?void 0:a(f,c,d)}if("value"in e)return e.value;var g=e.get;if(void 0!==g)return g.call(d)},f=c(36),g=j(f),h=c(37),i=j(h),n=(0,i.default)("quill:events"),o=function(a){function b(){k(this,b);var a=l(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return a.on("error",n.error),a}return m(b,a),d(b,[{key:"emit",value:function(){n.log.apply(n,arguments),e(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"emit",this).apply(this,arguments)}}]),b}(g.default);o.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},o.sources={API:"api",SILENT:"silent",USER:"user"},b.default=o},function(a,b){"use strict";function e(){}function f(a,b,c){this.fn=a,this.context=b,this.once=c||!1}function g(){this._events=new e,this._eventsCount=0}var c=Object.prototype.hasOwnProperty,d="~";Object.create&&(e.prototype=Object.create(null),(new e).__proto__||(d=!1)),g.prototype.eventNames=function(){var e,f,b=[];if(0===this._eventsCount)return b;for(f in e=this._events)c.call(e,f)&&b.push(d?f.slice(1):f);return Object.getOwnPropertySymbols?b.concat(Object.getOwnPropertySymbols(e)):b},g.prototype.listeners=function(b,c){var e=d?d+b:b,f=this._events[e];if(c)return!!f;if(!f)return[];if(f.fn)return[f.fn];for(var g=0,h=f.length,i=new Array(h);g<h;g++)i[g]=f[g].fn;return i},g.prototype.emit=function(b,c,e,f,g,h){var i=d?d+b:b;if(!this._events[i])return!1;var l,m,j=this._events[i],k=arguments.length;if(j.fn){switch(j.once&&this.removeListener(b,j.fn,void 0,!0),k){case 1:return j.fn.call(j.context),!0;case 2:return j.fn.call(j.context,c),!0;case 3:return j.fn.call(j.context,c,e),!0;case 4:return j.fn.call(j.context,c,e,f),!0;case 5:return j.fn.call(j.context,c,e,f,g),!0;case 6:return j.fn.call(j.context,c,e,f,g,h),!0}for(m=1,l=new Array(k-1);m<k;m++)l[m-1]=arguments[m];j.fn.apply(j.context,l)}else{var o,n=j.length;for(m=0;m<n;m++)switch(j[m].once&&this.removeListener(b,j[m].fn,void 0,!0),k){case 1:j[m].fn.call(j[m].context);break;case 2:j[m].fn.call(j[m].context,c);break;case 3:j[m].fn.call(j[m].context,c,e);break;case 4:j[m].fn.call(j[m].context,c,e,f);break;default:if(!l)for(o=1,l=new Array(k-1);o<k;o++)l[o-1]=arguments[o];j[m].fn.apply(j[m].context,l)}}return!0},g.prototype.on=function(b,c,e){var g=new f(c,e||this),h=d?d+b:b;return this._events[h]?this._events[h].fn?this._events[h]=[this._events[h],g]:this._events[h].push(g):(this._events[h]=g,this._eventsCount++),this},g.prototype.once=function(b,c,e){var g=new f(c,e||this,!0),h=d?d+b:b;return this._events[h]?this._events[h].fn?this._events[h]=[this._events[h],g]:this._events[h].push(g):(this._events[h]=g,this._eventsCount++),this},g.prototype.removeListener=function(b,c,f,g){var h=d?d+b:b;if(!this._events[h])return this;if(!c)return 0===--this._eventsCount?this._events=new e:delete this._events[h],this;var i=this._events[h];if(i.fn)i.fn!==c||g&&!i.once||f&&i.context!==f||(0===--this._eventsCount?this._events=new e:delete this._events[h]);else{for(var j=0,k=[],l=i.length;j<l;j++)(i[j].fn!==c||g&&!i[j].once||f&&i[j].context!==f)&&k.push(i[j]);k.length?this._events[h]=1===k.length?k[0]:k:0===--this._eventsCount?this._events=new e:delete this._events[h]}return this},g.prototype.removeAllListeners=function(b){var c;return b?(c=d?d+b:b,this._events[c]&&(0===--this._eventsCount?this._events=new e:delete this._events[c])):(this._events=new e,this._eventsCount=0),this},g.prototype.off=g.prototype.removeListener,g.prototype.addListener=g.prototype.on,g.prototype.setMaxListeners=function(){return this},g.prefixed=d,g.EventEmitter=g,"undefined"!=typeof a&&(a.exports=g)},function(a,b){"use strict";function e(a){if(c.indexOf(a)<=c.indexOf(d)){for(var b=arguments.length,e=Array(b>1?b-1:0),f=1;f<b;f++)e[f-1]=arguments[f];console[a].apply(console,e)}}function f(a){return c.reduce(function(b,c){return b[c]=e.bind(console,c,a),b},{})}Object.defineProperty(b,"__esModule",{value:!0});var c=["error","warn","log","info"],d="warn";e.level=f.level=function(a){d=a},b.default=f},function(a,b){var c=function(){"use strict";function d(e,f,g,h,j){function n(e,g){if(null===e)return null;if(0===g)return e;var o,p;if("object"!=typeof e)return e;if(e instanceof a)o=new a;else if(e instanceof b)o=new b;else if(e instanceof c)o=new c(function(a,b){e.then(function(b){a(n(b,g-1))},function(a){b(n(a,g-1))})});else if(d.__isArray(e))o=[];else if(d.__isRegExp(e))o=new RegExp(e.source,i(e)),e.lastIndex&&(o.lastIndex=e.lastIndex);else if(d.__isDate(e))o=new Date(e.getTime());else{if(m&&Buffer.isBuffer(e))return o=new Buffer(e.length),e.copy(o),o;e instanceof Error?o=Object.create(e):"undefined"==typeof h?(p=Object.getPrototypeOf(e),o=Object.create(p)):(o=Object.create(h),p=h)}if(f){var q=k.indexOf(e);if(q!=-1)return l[q];k.push(e),l.push(o)}if(e instanceof a)for(var r=e.keys();;){var s=r.next();if(s.done)break;var t=n(s.value,g-1),u=n(e.get(s.value),g-1);o.set(t,u)}if(e instanceof b)for(var v=e.keys();;){var s=v.next();if(s.done)break;var w=n(s.value,g-1);o.add(w)}for(var x in e){var y;p&&(y=Object.getOwnPropertyDescriptor(p,x)),y&&null==y.set||(o[x]=n(e[x],g-1))}if(Object.getOwnPropertySymbols)for(var z=Object.getOwnPropertySymbols(e),x=0;x<z.length;x++){var A=z[x],B=Object.getOwnPropertyDescriptor(e,A);(!B||B.enumerable||j)&&(o[A]=n(e[A],g-1),B.enumerable||Object.defineProperty(o,A,{enumerable:!1}))}if(j)for(var C=Object.getOwnPropertyNames(e),x=0;x<C.length;x++){var D=C[x],B=Object.getOwnPropertyDescriptor(e,D);B&&B.enumerable||(o[D]=n(e[D],g-1),Object.defineProperty(o,D,{enumerable:!1}))}return o}"object"==typeof f&&(g=f.depth,h=f.prototype,j=f.includeNonEnumerable,f=f.circular);var k=[],l=[],m="undefined"!=typeof Buffer;return"undefined"==typeof f&&(f=!0),"undefined"==typeof g&&(g=1/0),n(e,g)}function e(a){return Object.prototype.toString.call(a)}function f(a){return"object"==typeof a&&"[object Date]"===e(a)}function g(a){return"object"==typeof a&&"[object Array]"===e(a)}function h(a){return"object"==typeof a&&"[object RegExp]"===e(a)}function i(a){var b="";return a.global&&(b+="g"),a.ignoreCase&&(b+="i"),a.multiline&&(b+="m"),b}var a;try{a=Map}catch(b){a=function(){}}var b;try{b=Set}catch(a){b=function(){}}var c;try{c=Promise}catch(a){c=function(){}}return d.clonePrototype=function(b){if(null===b)return null;var c=function(){};return c.prototype=b,new c},d.__objToStr=e,d.__isDate=f,d.__isArray=g,d.__isRegExp=h,d.__getRegExpFlags=i,d}();"object"==typeof a&&a.exports&&(a.exports=c)},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function a(b){var d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c(this,a),this.quill=b,this.options=d};d.DEFAULTS={},b.default=d},function(a,b,c){"use strict";function p(a){return a&&a.__esModule?a:{default:a}}function q(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function r(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function v(a,b){try{b.parentNode}catch(a){return!1}return b instanceof Text&&(b=b.parentNode),a.contains(b)}Object.defineProperty(b,"__esModule",{value:!0}),b.default=b.Range=void 0;var d=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var h,g=a[Symbol.iterator]();!(d=(h=g.next()).done)&&(c.push(h.value),!b||c.length!==b);d=!0);}catch(a){e=!0,f=a}finally{try{!d&&g.return&&g.return()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(2),g=p(f),h=c(38),i=p(h),j=c(22),k=p(j),l=c(35),m=p(l),n=c(37),o=p(n),s=(0,o.default)("quill:selection"),t=function a(b){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;r(this,a),this.index=b,this.length=c},u=function(){function a(b,c){var d=this;r(this,a),this.emitter=c,this.scroll=b,this.composing=!1,this.root=this.scroll.domNode,this.root.addEventListener("compositionstart",function(){d.composing=!0}),this.root.addEventListener("compositionend",function(){d.composing=!1}),this.cursor=g.default.create("cursor",this),this.lastRange=this.savedRange=new t(0,0),["keyup","mouseup","mouseleave","touchend","touchleave","focus","blur"].forEach(function(a){d.root.addEventListener(a,function(){setTimeout(d.update.bind(d,m.default.sources.USER),100)})}),this.emitter.on(m.default.events.EDITOR_CHANGE,function(a,b){a===m.default.events.TEXT_CHANGE&&b.length()>0&&d.update(m.default.sources.SILENT)}),this.emitter.on(m.default.events.SCROLL_BEFORE_UPDATE,function(){var a=d.getNativeRange();null!=a&&a.start.node!==d.cursor.textNode&&d.emitter.once(m.default.events.SCROLL_UPDATE,function(){try{d.setNativeRange(a.start.node,a.start.offset,a.end.node,a.end.offset)}catch(a){}})}),this.update(m.default.sources.SILENT)}return e(a,[{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(b,c){if(null==this.scroll.whitelist||this.scroll.whitelist[b]){this.scroll.update();var d=this.getNativeRange();if(null!=d&&d.native.collapsed&&!g.default.query(b,g.default.Scope.BLOCK)){if(d.start.node!==this.cursor.textNode){var e=g.default.find(d.start.node,!1);if(null==e)return;if(e instanceof g.default.Leaf){var f=e.split(d.start.offset);e.parent.insertBefore(this.cursor,f)}else e.insertBefore(this.cursor,d.start.node);this.cursor.attach()}this.cursor.format(b,c),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(b){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,e=this.scroll.length();b=Math.min(b,e-1),c=Math.min(b+c,e-1)-b;var f=void 0,g=void 0,h=this.scroll.leaf(b),i=d(h,2),j=i[0],k=i[1];if(null==j)return null;var l=j.position(k,!0),m=d(l,2);g=m[0],k=m[1];var n=document.createRange();if(c>0){n.setStart(g,k);var o=this.scroll.leaf(b+c),p=d(o,2);if(j=p[0],k=p[1],null==j)return null;var q=j.position(k,!0),r=d(q,2);g=r[0],k=r[1],n.setEnd(g,k),f=n.getBoundingClientRect()}else{var s="left",t=void 0;g instanceof Text?(k<g.data.length?(n.setStart(g,k),n.setEnd(g,k+1)):(n.setStart(g,k-1),n.setEnd(g,k),s="right"),t=n.getBoundingClientRect()):(t=j.domNode.getBoundingClientRect(),k>0&&(s="right")),f={height:t.height,left:t[s],width:0,top:t.top}}var u=this.root.parentNode.getBoundingClientRect();return{left:f.left-u.left,right:f.left+f.width-u.left,top:f.top-u.top,bottom:f.top+f.height-u.top,height:f.height,width:f.width}}},{key:"getNativeRange",value:function(){var b=document.getSelection();if(null==b||b.rangeCount<=0)return null;var c=b.getRangeAt(0);if(null==c)return null;if(!v(this.root,c.startContainer)||!c.collapsed&&!v(this.root,c.endContainer))return null;var d={start:{node:c.startContainer,offset:c.startOffset},end:{node:c.endContainer,offset:c.endOffset},native:c};return[d.start,d.end].forEach(function(a){for(var b=a.node,c=a.offset;!(b instanceof Text)&&b.childNodes.length>0;)if(b.childNodes.length>c)b=b.childNodes[c],c=0;else{if(b.childNodes.length!==c)break;b=b.lastChild,c=b instanceof Text?b.data.length:b.childNodes.length+1}a.node=b,a.offset=c}),s.info("getNativeRange",d),d}},{key:"getRange",value:function(){var b=this,c=this.getNativeRange();if(null==c)return[null,null];var e=[[c.start.node,c.start.offset]];c.native.collapsed||e.push([c.end.node,c.end.offset]);var f=e.map(function(a){var c=d(a,2),e=c[0],f=c[1],h=g.default.find(e,!0),i=h.offset(b.scroll);return 0===f?i:h instanceof g.default.Container?i+h.length():i+h.index(e,f)}),h=Math.min.apply(Math,q(f)),i=Math.max.apply(Math,q(f));return i=Math.min(i,this.scroll.length()-1),[new t(h,i-h),c]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"scrollIntoView",value:function(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.lastRange;if(null!=b){var c=this.getBounds(b.index,b.length);if(null!=c)if(this.root.offsetHeight<c.bottom){var e=this.scroll.line(Math.min(b.index+b.length,this.scroll.length()-1)),f=d(e,1),g=f[0];this.root.scrollTop=g.domNode.offsetTop+g.domNode.offsetHeight-this.root.offsetHeight}else if(c.top<0){var h=this.scroll.line(Math.min(b.index,this.scroll.length()-1)),i=d(h,1),j=i[0];this.root.scrollTop=j.domNode.offsetTop}}}},{key:"setNativeRange",value:function(b,c){var d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:b,e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:c,f=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(s.info("setNativeRange",b,c,d,e),null==b||null!=this.root.parentNode&&null!=b.parentNode&&null!=d.parentNode){var g=document.getSelection();if(null!=g)if(null!=b){this.hasFocus()||this.root.focus();var h=(this.getNativeRange()||{}).native;if(null==h||f||b!==h.startContainer||c!==h.startOffset||d!==h.endContainer||e!==h.endOffset){"BR"==b.tagName&&(c=[].indexOf.call(b.parentNode.childNodes,b),b=b.parentNode),"BR"==d.tagName&&(e=[].indexOf.call(d.parentNode.childNodes,d),d=d.parentNode);var i=document.createRange();i.setStart(b,c),i.setEnd(d,e),g.removeAllRanges(),g.addRange(i)}}else g.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(b){var c=this,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:m.default.sources.API;"string"==typeof e&&(f=e,e=!1),s.info("setRange",b),null!=b?!function(){var a=b.collapsed?[b.index]:[b.index,b.index+b.length],f=[],g=c.scroll.length();a.forEach(function(a,b){a=Math.min(g-1,a);var e=void 0,h=c.scroll.leaf(a),i=d(h,2),j=i[0],k=i[1],l=j.position(k,0!==b),m=d(l,2);e=m[0],k=m[1],f.push(e,k)}),f.length<2&&(f=f.concat(f)),c.setNativeRange.apply(c,q(f).concat([e]))}():this.setNativeRange(null),this.update(f)}},{key:"update",value:function(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m.default.sources.USER,c=this.lastRange,e=this.getRange(),f=d(e,2),g=f[0],h=f[1];if(this.lastRange=g,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,k.default)(c,this.lastRange)){var j;!this.composing&&null!=h&&h.native.collapsed&&h.start.node!==this.cursor.textNode&&this.cursor.restore();var l=[m.default.events.SELECTION_CHANGE,(0,i.default)(this.lastRange),(0,i.default)(c),b];if((j=this.emitter).emit.apply(j,[m.default.events.EDITOR_CHANGE].concat(l)),b!==m.default.sources.SILENT){var n;(n=this.emitter).emit.apply(n,l)}}}}]),a}();b.Range=t,b.default=u},function(a,b){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var c=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(){function a(b,c){d(this,a),this.quill=b,this.options=c,
4
- this.modules={}}return c(a,[{key:"init",value:function(){var b=this;Object.keys(this.options.modules).forEach(function(a){null==b.modules[a]&&b.addModule(a)})}},{key:"addModule",value:function(b){var c=this.quill.constructor.import("modules/"+b);return this.modules[b]=new c(this.quill,this.options.modules[b]||{}),this.modules[b]}}]),a}();e.DEFAULTS={modules:{}},e.themes={default:e},b.default=e},function(a,b,c){"use strict";function h(a){return a&&a.__esModule?a:{default:a}}function i(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function j(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function k(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0});var d=c(2),e=h(d),f=c(29),g=h(f),l=function(a){function b(){return i(this,b),j(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return k(b,a),b}(e.default.Container);l.allowedChildren=[g.default,f.BlockEmbed,l],b.default=l},function(a,b,c){"use strict";function s(a){return a&&a.__esModule?a:{default:a}}function t(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function u(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function v(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function w(a){return a instanceof l.default||a instanceof k.BlockEmbed}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var h,g=a[Symbol.iterator]();!(d=(h=g.next()).done)&&(c.push(h.value),!b||c.length!==b);d=!0);}catch(a){e=!0,f=a}finally{try{!d&&g.return&&g.return()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function a(b,c,d){null===b&&(b=Function.prototype);var e=Object.getOwnPropertyDescriptor(b,c);if(void 0===e){var f=Object.getPrototypeOf(b);return null===f?void 0:a(f,c,d)}if("value"in e)return e.value;var g=e.get;if(void 0!==g)return g.call(d)},g=c(2),h=s(g),i=c(35),j=s(i),k=c(29),l=s(k),m=c(30),n=s(m),o=c(42),p=s(o),q=c(28),r=s(q),x=function(a){function b(a,c){t(this,b);var d=u(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return d.emitter=c.emitter,Array.isArray(c.whitelist)&&(d.whitelist=c.whitelist.reduce(function(a,b){return a[b]=!0,a},{})),d.optimize(),d.enable(),d}return v(b,a),e(b,[{key:"deleteAt",value:function(c,e){var g=this.line(c),h=d(g,2),i=h[0],j=h[1],l=this.line(c+e),m=d(l,1),o=m[0];if(f(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"deleteAt",this).call(this,c,e),null!=o&&i!==o&&j>0&&!(i instanceof k.BlockEmbed)&&!(o instanceof k.BlockEmbed)){o instanceof r.default&&o.deleteAt(o.length()-1,1);var p=o.children.head instanceof n.default?null:o.children.head;i.moveChildren(o,p),i.remove()}this.optimize()}},{key:"enable",value:function(){var b=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",b)}},{key:"formatAt",value:function(c,d,e,g){(null==this.whitelist||this.whitelist[e])&&(f(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"formatAt",this).call(this,c,d,e,g),this.optimize())}},{key:"insertAt",value:function(c,d,e){if(null==e||null==this.whitelist||this.whitelist[d]){if(c>=this.length())if(null==e||null==h.default.query(d,h.default.Scope.BLOCK)){var g=h.default.create(this.statics.defaultChild);this.appendChild(g),null==e&&d.endsWith("\n")&&(d=d.slice(0,-1)),g.insertAt(0,d,e)}else{var i=h.default.create(d,e);this.appendChild(i)}else f(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"insertAt",this).call(this,c,d,e);this.optimize()}}},{key:"insertBefore",value:function(c,d){if(c.statics.scope===h.default.Scope.INLINE_BLOT){var e=h.default.create(this.statics.defaultChild);e.appendChild(c),c=e}f(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"insertBefore",this).call(this,c,d)}},{key:"leaf",value:function(b){return this.path(b).pop()||[null,-1]}},{key:"line",value:function(b){return b===this.length()?this.line(b-1):this.descendant(w,b)}},{key:"lines",value:function(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,d=function a(b,c,d){var e=[],f=d;return b.children.forEachAt(c,d,function(b,c,d){w(b)?e.push(b):b instanceof h.default.Container&&(e=e.concat(a(b,c,f))),f-=d}),e};return d(this,b,c)}},{key:"optimize",value:function(){var c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.batch!==!0&&(f(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"optimize",this).call(this,c),c.length>0&&this.emitter.emit(j.default.events.SCROLL_OPTIMIZE,c))}},{key:"path",value:function(c){return f(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"path",this).call(this,c).slice(1)}},{key:"update",value:function(c){if(this.batch!==!0){var d=j.default.sources.USER;"string"==typeof c&&(d=c),Array.isArray(c)||(c=this.observer.takeRecords()),c.length>0&&this.emitter.emit(j.default.events.SCROLL_BEFORE_UPDATE,d,c),f(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"update",this).call(this,c.concat([])),c.length>0&&this.emitter.emit(j.default.events.SCROLL_UPDATE,d,c)}}}]),b}(h.default.Scroll);x.blotName="scroll",x.className="ql-editor",x.tagName="DIV",x.defaultChild="block",x.allowedChildren=[l.default,k.BlockEmbed,p.default],b.default=x},function(a,b,c){"use strict";function v(a){return a&&a.__esModule?a:{default:a}}function w(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function x(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function y(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function z(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function A(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function H(a){if(a.nodeType!==Node.ELEMENT_NODE)return{};var b="__ql-computed-style";return a[b]||(a[b]=window.getComputedStyle(a))}function I(a,b){for(var c="",d=a.ops.length-1;d>=0&&c.length<b.length;--d){var e=a.ops[d];if("string"!=typeof e.insert)break;c=e.insert+c}return c.slice(-1*b.length)===b}function J(a){if(0===a.childNodes.length)return!1;var b=H(a);return["block","list-item"].indexOf(b.display)>-1}function K(a,b,c){return a.nodeType===a.TEXT_NODE?c.reduce(function(b,c){return c(a,b)},new g.default):a.nodeType===a.ELEMENT_NODE?[].reduce.call(a.childNodes||[],function(d,e){var f=K(e,b,c);return e.nodeType===a.ELEMENT_NODE&&(f=b.reduce(function(a,b){return b(e,a)},f),f=(e[C]||[]).reduce(function(a,b){return b(e,a)},f)),d.concat(f)},new g.default):new g.default}function L(a,b,c){return c.compose((new g.default).retain(c.length(),w({},a,!0)))}function M(a,b){var c=i.default.Attributor.Attribute.keys(a),d=i.default.Attributor.Class.keys(a),e=i.default.Attributor.Style.keys(a),f={};return c.concat(d).concat(e).forEach(function(b){var c=i.default.query(b,i.default.Scope.ATTRIBUTE);null!=c&&(f[c.attrName]=c.value(a),f[c.attrName])||(null!=E[b]&&(c=E[b],f[c.attrName]=c.value(a)||void 0),null!=F[b]&&(c=F[b],f[c.attrName]=c.value(a)||void 0))}),Object.keys(f).length>0&&(b=b.compose((new g.default).retain(b.length(),f))),b}function N(a,b){var c=i.default.query(a);if(null==c)return b;if(c.prototype instanceof i.default.Embed){var d={},e=c.value(a);null!=e&&(d[c.blotName]=e,b=(new g.default).insert(d,c.formats(a)))}else if("function"==typeof c.formats){var f=w({},c.blotName,c.formats(a));b=b.compose((new g.default).retain(b.length(),f))}return b}function O(a,b){return I(b,"\n")||b.insert("\n"),b}function P(){return new g.default}function Q(a,b){return J(a)&&!I(b,"\n")&&b.insert("\n"),b}function R(a,b){if(J(a)&&null!=a.nextElementSibling&&!I(b,"\n\n")){var c=a.offsetHeight+parseFloat(H(a).marginTop)+parseFloat(H(a).marginBottom);a.nextElementSibling.offsetTop>a.offsetTop+1.5*c&&b.insert("\n")}return b}function S(a,b){var c={},d=a.style||{};return d.fontStyle&&"italic"===H(a).fontStyle&&(c.italic=!0),d.fontWeight&&"bold"===H(a).fontWeight&&(c.bold=!0),Object.keys(c).length>0&&(b=b.compose((new g.default).retain(b.length(),c))),parseFloat(d.textIndent||0)>0&&(b=(new g.default).insert("\t").concat(b)),b}function T(a,b){var c=a.data;if("O:P"===a.parentNode.tagName)return b.insert(c.trim());if(!H(a.parentNode).whiteSpace.startsWith("pre")){var d=function(b,c){return c=c.replace(/[^\u00a0]/g,""),c.length<1&&b?" ":c};c=c.replace(/\r\n/g," ").replace(/\n/g," "),c=c.replace(/\s\s+/g,d.bind(d,!0)),(null==a.previousSibling&&J(a.parentNode)||null!=a.previousSibling&&J(a.previousSibling))&&(c=c.replace(/^\s+/,d.bind(d,!1))),(null==a.nextSibling&&J(a.parentNode)||null!=a.nextSibling&&J(a.nextSibling))&&(c=c.replace(/\s+$/,d.bind(d,!1)))}return b.insert(c)}Object.defineProperty(b,"__esModule",{value:!0}),b.matchText=b.matchSpacing=b.matchNewline=b.matchBlot=b.matchAttributor=b.default=void 0;var d=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var h,g=a[Symbol.iterator]();!(d=(h=g.next()).done)&&(c.push(h.value),!b||c.length!==b);d=!0);}catch(a){e=!0,f=a}finally{try{!d&&g.return&&g.return()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(20),g=v(f),h=c(2),i=v(h),j=c(18),k=v(j),l=c(37),m=v(l),n=c(39),o=v(n),p=c(45),q=c(46),r=c(47),s=c(48),t=c(49),u=c(50),B=(0,m.default)("quill:clipboard"),C="__ql-matcher",D=[[Node.TEXT_NODE,T],["br",O],[Node.ELEMENT_NODE,Q],[Node.ELEMENT_NODE,N],[Node.ELEMENT_NODE,R],[Node.ELEMENT_NODE,M],[Node.ELEMENT_NODE,S],["b",L.bind(L,"bold")],["i",L.bind(L,"italic")],["style",P]],E=[p.AlignAttribute,s.DirectionAttribute].reduce(function(a,b){return a[b.keyName]=b,a},{}),F=[p.AlignStyle,q.BackgroundStyle,r.ColorStyle,s.DirectionStyle,t.FontStyle,u.SizeStyle].reduce(function(a,b){return a[b.keyName]=b,a},{}),G=function(a){function b(a,c){y(this,b);var d=z(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return d.quill.root.addEventListener("paste",d.onPaste.bind(d)),d.container=d.quill.addContainer("ql-clipboard"),d.container.setAttribute("contenteditable",!0),d.container.setAttribute("tabindex",-1),d.matchers=[],D.concat(d.options.matchers).forEach(function(a){d.addMatcher.apply(d,x(a))}),d}return A(b,a),e(b,[{key:"addMatcher",value:function(b,c){this.matchers.push([b,c])}},{key:"convert",value:function(b){"string"==typeof b&&(this.container.innerHTML=b);var c=this.prepareMatching(),e=d(c,2),f=e[0],h=e[1],i=K(this.container,f,h);return I(i,"\n")&&null==i.ops[i.ops.length-1].attributes&&(i=i.compose((new g.default).retain(i.length()-1).delete(1))),B.log("convert",this.container.innerHTML,i),this.container.innerHTML="",i}},{key:"dangerouslyPasteHTML",value:function(b,c){var d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:k.default.sources.API;if("string"==typeof b)return this.quill.setContents(this.convert(b),c);var e=this.convert(c);return this.quill.updateContents((new g.default).retain(b).concat(e),d)}},{key:"onPaste",value:function(b){var c=this;if(!b.defaultPrevented&&this.quill.isEnabled()){var d=this.quill.getSelection(),e=(new g.default).retain(d.index),f=this.quill.scrollingContainer.scrollTop;this.container.focus(),setTimeout(function(){c.quill.selection.update(k.default.sources.SILENT),e=e.concat(c.convert()).delete(d.length),c.quill.updateContents(e,k.default.sources.USER),c.quill.setSelection(e.length()-d.length,k.default.sources.SILENT),c.quill.scrollingContainer.scrollTop=f,c.quill.selection.scrollIntoView()},1)}}},{key:"prepareMatching",value:function(){var b=this,c=[],e=[];return this.matchers.forEach(function(a){var f=d(a,2),g=f[0],h=f[1];switch(g){case Node.TEXT_NODE:e.push(h);break;case Node.ELEMENT_NODE:c.push(h);break;default:[].forEach.call(b.container.querySelectorAll(g),function(a){a[C]=a[C]||[],a[C].push(h)})}}),[c,e]}}]),b}(o.default);G.DEFAULTS={matchers:[]},b.default=G,b.matchAttributor=M,b.matchBlot=N,b.matchNewline=Q,b.matchSpacing=R,b.matchText=T},function(a,b,c){"use strict";function f(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(b,"__esModule",{value:!0}),b.AlignStyle=b.AlignClass=b.AlignAttribute=void 0;var d=c(2),e=f(d),g={scope:e.default.Scope.BLOCK,whitelist:["right","center","justify"]},h=new e.default.Attributor.Attribute("align","align",g),i=new e.default.Attributor.Class("align","ql-align",g),j=new e.default.Attributor.Style("align","text-align",g);b.AlignAttribute=h,b.AlignClass=i,b.AlignStyle=j},function(a,b,c){"use strict";function g(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(b,"__esModule",{value:!0}),b.BackgroundStyle=b.BackgroundClass=void 0;var d=c(2),e=g(d),f=c(47),h=new e.default.Attributor.Class("background","ql-bg",{scope:e.default.Scope.INLINE}),i=new f.ColorAttributor("background","background-color",{scope:e.default.Scope.INLINE});b.BackgroundClass=h,b.BackgroundStyle=i},function(a,b,c){"use strict";function h(a){return a&&a.__esModule?a:{default:a}}function i(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function j(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function k(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ColorStyle=b.ColorClass=b.ColorAttributor=void 0;var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function a(b,c,d){null===b&&(b=Function.prototype);var e=Object.getOwnPropertyDescriptor(b,c);if(void 0===e){var f=Object.getPrototypeOf(b);return null===f?void 0:a(f,c,d)}if("value"in e)return e.value;var g=e.get;if(void 0!==g)return g.call(d)},f=c(2),g=h(f),l=function(a){function b(){return i(this,b),j(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return k(b,a),d(b,[{key:"value",value:function a(c){var a=e(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"value",this).call(this,c);return a.startsWith("rgb(")?(a=a.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+a.split(",").map(function(a){return("00"+parseInt(a).toString(16)).slice(-2)}).join("")):a}}]),b}(g.default.Attributor.Style),m=new g.default.Attributor.Class("color","ql-color",{scope:g.default.Scope.INLINE}),n=new l("color","color",{scope:g.default.Scope.INLINE});b.ColorAttributor=l,b.ColorClass=m,b.ColorStyle=n},function(a,b,c){"use strict";function f(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(b,"__esModule",{value:!0}),b.DirectionStyle=b.DirectionClass=b.DirectionAttribute=void 0;var d=c(2),e=f(d),g={scope:e.default.Scope.BLOCK,whitelist:["rtl"]},h=new e.default.Attributor.Attribute("direction","dir",g),i=new e.default.Attributor.Class("direction","ql-direction",g),j=new e.default.Attributor.Style("direction","direction",g);b.DirectionAttribute=h,b.DirectionClass=i,b.DirectionStyle=j},function(a,b,c){"use strict";function h(a){return a&&a.__esModule?a:{default:a}}function i(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function j(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function k(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.FontClass=b.FontStyle=void 0;var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function a(b,c,d){null===b&&(b=Function.prototype);var e=Object.getOwnPropertyDescriptor(b,c);if(void 0===e){var f=Object.getPrototypeOf(b);return null===f?void 0:a(f,c,d)}if("value"in e)return e.value;var g=e.get;if(void 0!==g)return g.call(d)},f=c(2),g=h(f),l={scope:g.default.Scope.INLINE,whitelist:["serif","monospace"]},m=new g.default.Attributor.Class("font","ql-font",l),n=function(a){function b(){return i(this,b),j(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return k(b,a),d(b,[{key:"value",value:function(c){return e(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"value",this).call(this,c).replace(/["']/g,"")}}]),b}(g.default.Attributor.Style),o=new n("font","font-family",l);b.FontStyle=o,b.FontClass=m},function(a,b,c){"use strict";function f(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(b,"__esModule",{value:!0}),b.SizeStyle=b.SizeClass=void 0;var d=c(2),e=f(d),g=new e.default.Attributor.Class("size","ql-size",{scope:e.default.Scope.INLINE,whitelist:["small","large","huge"]}),h=new e.default.Attributor.Style("size","font-size",{scope:e.default.Scope.INLINE,whitelist:["10px","18px","32px"]});b.SizeClass=g,b.SizeStyle=h},function(a,b,c){"use strict";function k(a){return a&&a.__esModule?a:{default:a}}function l(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function m(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function n(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function p(a){var b=a.ops[a.ops.length-1];return null!=b&&(null!=b.insert?"string"==typeof b.insert&&b.insert.endsWith("\n"):null!=b.attributes&&Object.keys(b.attributes).some(function(a){return null!=f.default.query(a,f.default.Scope.BLOCK)}))}function q(a){var b=a.reduce(function(a,b){return a+=b.delete||0},0),c=a.length()-b;return p(a)&&(c-=1),c}Object.defineProperty(b,"__esModule",{value:!0}),b.getLastChangeIndex=b.default=void 0;var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=c(2),f=k(e),g=c(18),h=k(g),i=c(39),j=k(i),o=function(a){function b(a,c){l(this,b);var d=m(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return d.lastRecorded=0,d.ignoreChange=!1,d.clear(),d.quill.on(h.default.events.EDITOR_CHANGE,function(a,b,c,e){a!==h.default.events.TEXT_CHANGE||d.ignoreChange||(d.options.userOnly&&e!==h.default.sources.USER?d.transform(b):d.record(b,c))}),d.quill.keyboard.addBinding({key:"Z",shortKey:!0},d.undo.bind(d)),d.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},d.redo.bind(d)),/Win/i.test(navigator.platform)&&d.quill.keyboard.addBinding({key:"Y",shortKey:!0},d.redo.bind(d)),d}return n(b,a),d(b,[{key:"change",value:function(b,c){if(0!==this.stack[b].length){var d=this.stack[b].pop();this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(d[b],h.default.sources.USER),this.ignoreChange=!1;var e=q(d[b]);this.quill.setSelection(e),this.quill.selection.scrollIntoView(),this.stack[c].push(d)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"record",value:function(b,c){if(0!==b.ops.length){this.stack.redo=[];var d=this.quill.getContents().diff(c),e=Date.now();if(this.lastRecorded+this.options.delay>e&&this.stack.undo.length>0){var f=this.stack.undo.pop();d=d.compose(f.undo),b=f.redo.compose(b)}else this.lastRecorded=e;this.stack.undo.push({redo:b,undo:d}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(b){this.stack.undo.forEach(function(a){a.undo=b.transform(a.undo,!0),a.redo=b.transform(a.redo,!0)}),this.stack.redo.forEach(function(a){a.undo=b.transform(a.undo,!0),a.redo=b.transform(a.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),b}(j.default);o.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},b.default=o,b.getLastChangeIndex=q},function(a,b,c){"use strict";function w(a){return a&&a.__esModule?a:{default:a}}function x(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function y(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function z(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function D(a,b){if(0!==a.index){var c=this.quill.getLine(a.index),d=e(c,1),f=d[0],g={};if(0===b.offset){var h=f.formats(),i=this.quill.getFormat(a.index-1,1);g=n.default.attributes.diff(h,i)||{}}var j=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(b.prefix)?2:1;this.quill.deleteText(a.index-j,j,r.default.sources.USER),Object.keys(g).length>0&&this.quill.formatLine(a.index-j,j,g,r.default.sources.USER),this.quill.selection.scrollIntoView()}}function E(a,b){var c=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(b.suffix)?2:1;a.index>=this.quill.getLength()-c||this.quill.deleteText(a.index,c,r.default.sources.USER)}function F(a){this.quill.deleteText(a,r.default.sources.USER),this.quill.setSelection(a.index,r.default.sources.SILENT),this.quill.selection.scrollIntoView()}function G(a,b){var c=this;a.length>0&&this.quill.scroll.deleteAt(a.index,a.length);var d=Object.keys(b.format).reduce(function(a,c){return p.default.query(c,p.default.Scope.BLOCK)&&!Array.isArray(b.format[c])&&(a[c]=b.format[c]),a},{});this.quill.insertText(a.index,"\n",d,r.default.sources.USER),this.quill.setSelection(a.index+1,r.default.sources.SILENT),this.quill.selection.scrollIntoView(),Object.keys(b.format).forEach(function(a){null==d[a]&&(Array.isArray(b.format[a])||"link"!==a&&c.quill.format(a,b.format[a],r.default.sources.USER))})}function H(a){return{key:C.keys.TAB,shiftKey:!a,format:{"code-block":!0},handler:function(c){var d=p.default.query("code-block"),f=c.index,g=c.length,h=this.quill.scroll.descendant(d,f),i=e(h,2),j=i[0],k=i[1];if(null!=j){var l=this.quill.getIndex(j),m=j.newlineIndex(k,!0)+1,n=j.newlineIndex(l+k+g),o=j.domNode.textContent.slice(m,n).split("\n");k=0,o.forEach(function(b,c){a?(j.insertAt(m+k,d.TAB),k+=d.TAB.length,0===c?f+=d.TAB.length:g+=d.TAB.length):b.startsWith(d.TAB)&&(j.deleteAt(m+k,d.TAB.length),k-=d.TAB.length,0===c?f-=d.TAB.length:g-=d.TAB.length),k+=b.length+1}),this.quill.update(r.default.sources.USER),this.quill.setSelection(f,g,r.default.sources.SILENT)}}}}function I(a){return{key:a[0].toUpperCase(),shortKey:!0,handler:function(c,d){this.quill.format(a,!d.format[a],r.default.sources.USER)}}}function J(a){if("string"==typeof a||"number"==typeof a)return J({key:a});if("object"===("undefined"==typeof a?"undefined":d(a))&&(a=(0,h.default)(a,!1)),"string"==typeof a.key)if(null!=C.keys[a.key.toUpperCase()])a.key=C.keys[a.key.toUpperCase()];else{if(1!==a.key.length)return null;a.key=a.key.toUpperCase().charCodeAt(0)}return a}Object.defineProperty(b,"__esModule",{value:!0});var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var h,g=a[Symbol.iterator]();!(d=(h=g.next()).done)&&(c.push(h.value),!b||c.length!==b);d=!0);}catch(a){e=!0,f=a}finally{try{!d&&g.return&&g.return()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=c(38),h=w(g),i=c(22),j=w(i),k=c(25),l=w(k),m=c(26),n=w(m),o=c(2),p=w(o),q=c(18),r=w(q),s=c(37),t=w(s),u=c(39),v=w(u),A=(0,t.default)("quill:keyboard"),B=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",C=function(a){function b(a,c){x(this,b);var d=y(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return d.bindings={},Object.keys(d.options.bindings).forEach(function(a){d.options.bindings[a]&&d.addBinding(d.options.bindings[a])}),d.addBinding({key:b.keys.ENTER,shiftKey:null},G),d.addBinding({key:b.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(d.addBinding({key:b.keys.BACKSPACE},{collapsed:!0},D),d.addBinding({key:b.keys.DELETE},{collapsed:!0},E)):(d.addBinding({key:b.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},D),d.addBinding({key:b.keys.DELETE},{collapsed:!0,suffix:/^.?$/},E)),d.addBinding({key:b.keys.BACKSPACE},{collapsed:!1},F),d.addBinding({key:b.keys.DELETE},{collapsed:!1},F),d.listen(),d}return z(b,a),f(b,null,[{key:"match",value:function(b,c){return c=J(c),(!!c.shortKey===b[B]||null===c.shortKey)&&(!["altKey","ctrlKey","metaKey","shiftKey"].some(function(a){return a!=B&&!!c[a]!==b[a]&&null!==c[a]})&&c.key===(b.which||b.keyCode))}}]),f(b,[{key:"addBinding",value:function(b){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},e=J(b);return null==e||null==e.key?A.warn("Attempted to add invalid keyboard binding",e):("function"==typeof c&&(c={handler:c}),"function"==typeof d&&(d={handler:d}),e=(0,l.default)(e,c,d),this.bindings[e.key]=this.bindings[e.key]||[],void this.bindings[e.key].push(e))}},{key:"listen",value:function(){var c=this;this.quill.root.addEventListener("keydown",function(a){if(!a.defaultPrevented){var f=a.which||a.keyCode,g=(c.bindings[f]||[]).filter(function(c){return b.match(a,c)});if(0!==g.length){var h=c.quill.getSelection();if(null!=h&&c.quill.hasFocus()){var i=c.quill.getLine(h.index),k=e(i,2),l=k[0],m=k[1],n=c.quill.getLeaf(h.index),o=e(n,2),q=o[0],r=o[1],s=0===h.length?[q,r]:c.quill.getLeaf(h.index+h.length),t=e(s,2),u=t[0],v=t[1],w=q instanceof p.default.Text?q.value().slice(0,r):"",x=u instanceof p.default.Text?u.value().slice(v):"",y={collapsed:0===h.length,empty:0===h.length&&l.length()<=1,format:c.quill.getFormat(h),offset:m,prefix:w,suffix:x},z=g.some(function(a){if(null!=a.collapsed&&a.collapsed!==y.collapsed)return!1;if(null!=a.empty&&a.empty!==y.empty)return!1;if(null!=a.offset&&a.offset!==y.offset)return!1;if(Array.isArray(a.format)){if(a.format.every(function(a){return null==y.format[a]}))return!1}else if("object"===d(a.format)&&!Object.keys(a.format).every(function(b){return a.format[b]===!0?null!=y.format[b]:a.format[b]===!1?null==y.format[b]:(0,j.default)(a.format[b],y.format[b])}))return!1;return!(null!=a.prefix&&!a.prefix.test(y.prefix))&&(!(null!=a.suffix&&!a.suffix.test(y.suffix))&&a.handler.call(c,h,y)!==!0)});z&&a.preventDefault()}}}})}}]),b}(v.default);C.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},C.DEFAULTS={bindings:{bold:I("bold"),italic:I("italic"),underline:I("underline"),indent:{key:C.keys.TAB,format:["blockquote","indent","list"],handler:function(b,c){return!(!c.collapsed||0===c.offset)||void this.quill.format("indent","+1",r.default.sources.USER)}},outdent:{key:C.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(b,c){return!(!c.collapsed||0===c.offset)||void this.quill.format("indent","-1",r.default.sources.USER)}},"outdent backspace":{key:C.keys.BACKSPACE,collapsed:!0,format:["blockquote","indent","list"],offset:0,handler:function(b,c){null!=c.format.indent?this.quill.format("indent","-1",r.default.sources.USER):null!=c.format.blockquote?this.quill.format("blockquote",!1,r.default.sources.USER):null!=c.format.list&&this.quill.format("list",!1,r.default.sources.USER)}},"indent code-block":H(!0),"outdent code-block":H(!1),"remove tab":{key:C.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(b){this.quill.deleteText(b.index-1,1,r.default.sources.USER)}},tab:{key:C.keys.TAB,handler:function(b,c){c.collapsed||this.quill.scroll.deleteAt(b.index,b.length),this.quill.insertText(b.index,"\t",r.default.sources.USER),this.quill.setSelection(b.index+1,r.default.sources.SILENT)}},"list empty enter":{key:C.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(b,c){this.quill.format("list",!1,r.default.sources.USER),c.format.indent&&this.quill.format("indent",!1,r.default.sources.USER)}},"checklist enter":{key:C.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(b){this.quill.scroll.insertAt(b.index,"\n");var c=this.quill.getLine(b.index+1),d=e(c,1),f=d[0];f.format("list","unchecked"),this.quill.update(r.default.sources.USER),this.quill.setSelection(b.index+1,r.default.sources.SILENT),this.quill.selection.scrollIntoView()}},"header enter":{key:C.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(b){this.quill.scroll.insertAt(b.index,"\n"),this.quill.formatText(b.index+1,1,"header",!1,r.default.sources.USER),this.quill.setSelection(b.index+1,r.default.sources.SILENT),this.quill.selection.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^(1\.|-)$/,handler:function(b,c){if(null!=this.quill.scroll.whitelist&&!this.quill.scroll.whitelist.list)return!0;var d=c.prefix.length;this.quill.scroll.deleteAt(b.index-d,d),this.quill.formatLine(b.index-d,1,"list",1===d?"bullet":"ordered",r.default.sources.USER),
5
- this.quill.setSelection(b.index-d,r.default.sources.SILENT)}},"code exit":{key:C.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(b){this.quill.format("code-block",!1,r.default.sources.USER),this.quill.deleteText(b.index-2,1,r.default.sources.USER)}}}},b.default=C}])}),function(){function b(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,c||a.apply(e,f)},h=c&&!d;clearTimeout(d),d=setTimeout(g,b),h&&a.apply(e,f)}}var a={theme:"snow",modules:{toolbar:[[{header:[1,2,3,!1]}],[{color:[]},{background:[]}],["bold","italic","underline","strike"],["blockquote","code-block"],[{list:"ordered"},{list:"bullet"}],[{indent:"-1"},{indent:"+1"}],["clean"]]}};window.Quilljs={setDefaults:function(b){a=$.extend(a,b),this.addQuillContainer(a)},loadDefaults:function(){this.addQuillContainer(a)},addQuillContainer:function(a){var c=function(b,c){var g=d(c,c.id+"-quill");$(c).attr("placeholder").length>0&&(a.placeholder=$(c).attr("placeholder")),window["quill-container-"+b]=new Quill(g,a),($(c).attr("maxlength")||$(c).attr("minlength"))&&e(c,g),window["quill-container-"+b].on("editor-change",function(){f(c,g)})},d=function(a,b){return $(a).hide().after('<div class="form-control '+b+'"></div>'),b="."+b,$(b).html($(a).val()),b},e=function(a,b){var c=b+" .ql-editor";$(a).attr("maxlength")&&$(c).attr("maxlength",$(a).attr("maxlength")),$(a).attr("minlength")&&$(c).attr("minlength",$(a).attr("minlength")),$(a).removeAttr("maxlength").removeAttr("minlength")},f=b(function(a,b){$(a).val($(b+" .ql-editor").html())},500),g=$(".rich_area");g.length>0&&g.each(function(a,b){return c(a,b)})}},$(document).on("ready page:change turbolinks:load",function(){$(".ql-editor").length<=0&&Quilljs.loadDefaults()})}(jQuery);
1
+ /*!
2
+ * Quill Editor v1.2.0
3
+ * https://quilljs.com/
4
+ * Copyright (c) 2014, Jason Chen
5
+ * Copyright (c) 2013, salesforce.com
6
+ */
7
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Quill=e():t.Quill=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var o=n(1),i=r(o),l=n(45),a=n(48),s=n(53),u=n(54),c=r(u),f=n(55),p=r(f),h=n(56),d=r(h),y=n(46),v=n(47),b=n(49),g=n(50),m=n(57),_=r(m),O=n(58),w=r(O),x=n(59),k=r(x),E=n(60),j=r(E),A=n(61),N=r(A),q=n(62),T=r(q),P=n(63),S=r(P),L=n(64),C=r(L),M=n(28),R=r(M),I=n(65),B=r(I),D=n(66),U=r(D),F=n(67),H=r(F),K=n(68),z=r(K),Z=n(101),V=r(Z),W=n(103),Y=r(W),G=n(104),X=r(G),$=n(105),Q=r($),J=n(106),tt=r(J),et=n(108),nt=r(et);i.default.register({"attributors/attribute/direction":a.DirectionAttribute,"attributors/class/align":l.AlignClass,"attributors/class/background":y.BackgroundClass,"attributors/class/color":v.ColorClass,"attributors/class/direction":a.DirectionClass,"attributors/class/font":b.FontClass,"attributors/class/size":g.SizeClass,"attributors/style/align":l.AlignStyle,"attributors/style/background":y.BackgroundStyle,"attributors/style/color":v.ColorStyle,"attributors/style/direction":a.DirectionStyle,"attributors/style/font":b.FontStyle,"attributors/style/size":g.SizeStyle},!0),i.default.register({"formats/align":l.AlignClass,"formats/direction":a.DirectionClass,"formats/indent":s.IndentClass,"formats/background":y.BackgroundStyle,"formats/color":v.ColorStyle,"formats/font":b.FontClass,"formats/size":g.SizeClass,"formats/blockquote":c.default,"formats/code-block":R.default,"formats/header":p.default,"formats/list":d.default,"formats/bold":_.default,"formats/code":M.Code,"formats/italic":w.default,"formats/link":k.default,"formats/script":j.default,"formats/strike":N.default,"formats/underline":T.default,"formats/image":S.default,"formats/video":C.default,"formats/list/item":h.ListItem,"modules/formula":B.default,"modules/syntax":U.default,"modules/toolbar":H.default,"themes/bubble":tt.default,"themes/snow":nt.default,"ui/icons":z.default,"ui/picker":V.default,"ui/icon-picker":X.default,"ui/color-picker":Y.default,"ui/tooltip":Q.default},!0),t.exports=i.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var o=n(2),i=r(o),l=n(18),a=r(l),s=n(29),u=r(s),c=n(30),f=r(c),p=n(42),h=r(p),d=n(34),y=r(d),v=n(31),b=r(v),g=n(32),m=r(g),_=n(43),O=r(_),w=n(33),x=r(w),k=n(44),E=r(k),j=n(51),A=r(j),N=n(52),q=r(N);a.default.register({"blots/block":u.default,"blots/block/embed":s.BlockEmbed,"blots/break":f.default,"blots/container":h.default,"blots/cursor":y.default,"blots/embed":b.default,"blots/inline":m.default,"blots/scroll":O.default,"blots/text":x.default,"modules/clipboard":E.default,"modules/history":A.default,"modules/keyboard":q.default}),i.default.register(u.default,f.default,y.default,m.default,O.default,x.default),t.exports=a.default},function(t,e,n){"use strict";var r=n(3),o=n(7),i=n(12),l=n(13),a=n(14),s=n(15),u=n(16),c=n(17),f=n(8),p=n(10),h=n(11),d=n(9),y=n(6),v={Scope:y.Scope,create:y.create,find:y.find,query:y.query,register:y.register,Container:r.default,Format:o.default,Leaf:i.default,Embed:u.default,Scroll:l.default,Block:s.default,Inline:a.default,Text:c.default,Attributor:{Attribute:f.default,Class:p.default,Style:h.default,Store:d.default}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=v},function(t,e,n){"use strict";function r(t){var e=a.find(t);if(null==e)try{e=a.create(t)}catch(n){e=a.create(a.Scope.INLINE),[].slice.call(t.childNodes).forEach(function(t){e.domNode.appendChild(t)}),t.parentNode.replaceChild(e.domNode,t),e.attach()}return e}var o=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=n(4),l=n(5),a=n(6),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.appendChild=function(t){this.insertBefore(t)},e.prototype.attach=function(){var e=this;t.prototype.attach.call(this),this.children=new i.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(t){try{var n=r(t);e.insertBefore(n,e.children.head)}catch(t){if(t instanceof a.ParchmentError)return;throw t}})},e.prototype.deleteAt=function(t,e){return 0===t&&e===this.length()?this.remove():void this.children.forEachAt(t,e,function(t,e,n){t.deleteAt(e,n)})},e.prototype.descendant=function(t,n){var r=this.children.find(n),o=r[0],i=r[1];return null==t.blotName&&t(o)||null!=t.blotName&&o instanceof t?[o,i]:o instanceof e?o.descendant(t,i):[null,-1]},e.prototype.descendants=function(t,n,r){void 0===n&&(n=0),void 0===r&&(r=Number.MAX_VALUE);var o=[],i=r;return this.children.forEachAt(n,r,function(n,r,l){(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}),o},e.prototype.detach=function(){this.children.forEach(function(t){t.detach()}),t.prototype.detach.call(this)},e.prototype.formatAt=function(t,e,n,r){this.children.forEachAt(t,e,function(t,e,o){t.formatAt(e,o,n,r)})},e.prototype.insertAt=function(t,e,n){var r=this.children.find(t),o=r[0],i=r[1];if(o)o.insertAt(i,e,n);else{var l=null==n?a.create("text",e):a.create(e,n);this.appendChild(l)}},e.prototype.insertBefore=function(t,e){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some(function(e){return t instanceof e}))throw new a.ParchmentError("Cannot insert "+t.statics.blotName+" into "+this.statics.blotName);t.insertInto(this,e)},e.prototype.length=function(){return this.children.reduce(function(t,e){return t+e.length()},0)},e.prototype.moveChildren=function(t,e){this.children.forEach(function(n){t.insertBefore(n,e)})},e.prototype.optimize=function(){if(t.prototype.optimize.call(this),0===this.children.length)if(null!=this.statics.defaultChild){var e=a.create(this.statics.defaultChild);this.appendChild(e),e.optimize()}else this.remove()},e.prototype.path=function(t,n){void 0===n&&(n=!1);var r=this.children.find(t,n),o=r[0],i=r[1],l=[[this,t]];return o instanceof e?l.concat(o.path(i,n)):(null!=o&&l.push([o,i]),l)},e.prototype.removeChild=function(t){this.children.remove(t)},e.prototype.replace=function(n){n instanceof e&&n.moveChildren(this),t.prototype.replace.call(this,n)},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(t,this.length(),function(t,r,o){t=t.split(r,e),n.appendChild(t)}),n},e.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},e.prototype.update=function(t){var e=this,n=[],o=[];t.forEach(function(t){t.target===e.domNode&&"childList"===t.type&&(n.push.apply(n,t.addedNodes),o.push.apply(o,t.removedNodes))}),o.forEach(function(t){if(!(null!=t.parentNode&&"IFRAME"!==t.tagName&&document.body.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var n=a.find(t);null!=n&&(null!=n.domNode.parentNode&&n.domNode.parentNode!==e.domNode||n.detach())}}),n.filter(function(t){return t.parentNode==e.domNode}).sort(function(t,e){return t===e?0:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(t){var n=null;null!=t.nextSibling&&(n=a.find(t.nextSibling));var o=r(t);o.next==n&&null!=o.next||(null!=o.parent&&o.parent.removeChild(e),e.insertBefore(o,n))})},e}(l.default);Object.defineProperty(e,"__esModule",{value:!0}),e.default=s},function(t,e){"use strict";var n=function(){function t(){this.head=this.tail=void 0,this.length=0}return t.prototype.append=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.insertBefore(t[0],void 0),t.length>1&&this.append.apply(this,t.slice(1))},t.prototype.contains=function(t){for(var e,n=this.iterator();e=n();)if(e===t)return!0;return!1},t.prototype.insertBefore=function(t,e){t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=void 0,this.head=this.tail=t),this.length+=1},t.prototype.offset=function(t){for(var e=0,n=this.head;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1},t.prototype.remove=function(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)},t.prototype.iterator=function(t){return void 0===t&&(t=this.head),function(){var e=t;return null!=t&&(t=t.next),e}},t.prototype.find=function(t,e){void 0===e&&(e=!1);for(var n,r=this.iterator();n=r();){var o=n.length();if(t<o||e&&t===o&&(null==n.next||0!==n.next.length()))return[n,t];t-=o}return[null,0]},t.prototype.forEach=function(t){for(var e,n=this.iterator();e=n();)t(e)},t.prototype.forEachAt=function(t,e,n){if(!(e<=0))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;){var u=r.length();t>a?n(r,t-a,Math.min(e,a+u-t)):n(r,0,Math.min(u,t+e-a)),a+=u}},t.prototype.map=function(t){return this.reduce(function(e,n){return e.push(t(n)),e},[])},t.prototype.reduce=function(t,e){for(var n,r=this.iterator();n=r();)e=t(e,n);return e},t}();Object.defineProperty(e,"__esModule",{value:!0}),e.default=n},function(t,e,n){"use strict";var r=n(6),o=function(){function t(t){this.domNode=t,this.attach()}return Object.defineProperty(t.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),t.create=function(t){if(null==this.tagName)throw new r.ParchmentError("Blot definition missing tagName");var e;return Array.isArray(this.tagName)?("string"==typeof t&&(t=t.toUpperCase(),parseInt(t).toString()===t&&(t=parseInt(t))),e="number"==typeof t?document.createElement(this.tagName[t-1]):this.tagName.indexOf(t)>-1?document.createElement(t):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e},t.prototype.attach=function(){this.domNode[r.DATA_KEY]={blot:this}},t.prototype.clone=function(){var t=this.domNode.cloneNode();return r.create(t)},t.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[r.DATA_KEY]},t.prototype.deleteAt=function(t,e){var n=this.isolate(t,e);n.remove()},t.prototype.formatAt=function(t,e,n,o){var i=this.isolate(t,e);if(null!=r.query(n,r.Scope.BLOT)&&o)i.wrap(n,o);else if(null!=r.query(n,r.Scope.ATTRIBUTE)){var l=r.create(this.statics.scope);i.wrap(l),l.format(n,o)}},t.prototype.insertAt=function(t,e,n){var o=null==n?r.create("text",e):r.create(e,n),i=this.split(t);this.parent.insertBefore(o,i)},t.prototype.insertInto=function(t,e){if(null!=this.parent&&this.parent.children.remove(this),t.children.insertBefore(this,e),null!=e)var n=e.domNode;null!=this.next&&this.domNode.nextSibling==n||t.domNode.insertBefore(this.domNode,"undefined"!=typeof n?n:null),this.parent=t},t.prototype.isolate=function(t,e){var n=this.split(t);return n.split(e),n},t.prototype.length=function(){return 1},t.prototype.offset=function(t){return void 0===t&&(t=this.parent),null==this.parent||this==t?0:this.parent.children.offset(this)+this.parent.offset(t)},t.prototype.optimize=function(){null!=this.domNode[r.DATA_KEY]&&delete this.domNode[r.DATA_KEY].mutations},t.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},t.prototype.replace=function(t){null!=t.parent&&(t.parent.insertBefore(this,t.next),t.remove())},t.prototype.replaceWith=function(t,e){var n="string"==typeof t?r.create(t,e):t;return n.replace(this),n},t.prototype.split=function(t,e){return 0===t?this:this.next},t.prototype.update=function(t){void 0===t&&(t=[])},t.prototype.wrap=function(t,e){var n="string"==typeof t?r.create(t,e):t;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},t}();o.blotName="abstract",Object.defineProperty(e,"__esModule",{value:!0}),e.default=o},function(t,e){"use strict";function n(t,e){var n=o(t);if(null==n)throw new a("Unable to create "+t+" blot");var r=n,i=t instanceof Node?t:r.create(e);return new r(i,e)}function r(t,n){return void 0===n&&(n=!1),null==t?null:null!=t[e.DATA_KEY]?t[e.DATA_KEY].blot:n?r(t.parentNode,n):null}function o(t,e){void 0===e&&(e=p.ANY);var n;if("string"==typeof t)n=f[t]||s[t];else if(t instanceof Text)n=f.text;else if("number"==typeof t)t&p.LEVEL&p.BLOCK?n=f.block:t&p.LEVEL&p.INLINE&&(n=f.inline);else if(t instanceof HTMLElement){var r=(t.getAttribute("class")||"").split(/\s+/);for(var o in r)if(n=u[r[o]])break;n=n||c[t.tagName]}return null==n?null:e&p.LEVEL&n.scope&&e&p.TYPE&n.scope?n:null}function i(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(t.length>1)return t.map(function(t){return i(t)});var n=t[0];if("string"!=typeof n.blotName&&"string"!=typeof n.attrName)throw new a("Invalid definition");if("abstract"===n.blotName)throw new a("Cannot register abstract class");if(f[n.blotName||n.attrName]=n,"string"==typeof n.keyName)s[n.keyName]=n;else if(null!=n.className&&(u[n.className]=n),null!=n.tagName){Array.isArray(n.tagName)?n.tagName=n.tagName.map(function(t){return t.toUpperCase()}):n.tagName=n.tagName.toUpperCase();var r=Array.isArray(n.tagName)?n.tagName:[n.tagName];r.forEach(function(t){null!=c[t]&&null!=n.className||(c[t]=n)})}return n}var l=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},a=function(t){function e(e){var n=this;return e="[Parchment] "+e,n=t.call(this,e)||this,n.message=e,n.name=n.constructor.name,n}return l(e,t),e}(Error);e.ParchmentError=a;var s={},u={},c={},f={};e.DATA_KEY="__blot";var p;!function(t){t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY"}(p=e.Scope||(e.Scope={})),e.create=n,e.find=r,e.query=o,e.register=i},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},o=n(8),i=n(9),l=n(3),a=n(6),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(t){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?t.tagName.toLowerCase():void 0)},e.prototype.attach=function(){t.prototype.attach.call(this),this.attributes=new i.default(this.domNode)},e.prototype.format=function(t,e){var n=a.query(t);n instanceof o.default?this.attributes.attribute(n,e):e&&(null==n||t===this.statics.blotName&&this.formats()[t]===e||this.replaceWith(t,e))},e.prototype.formats=function(){var t=this.attributes.values(),e=this.statics.formats(this.domNode);return null!=e&&(t[this.statics.blotName]=e),t},e.prototype.replaceWith=function(e,n){var r=t.prototype.replaceWith.call(this,e,n);return this.attributes.copy(r),r},e.prototype.update=function(e){var n=this;t.prototype.update.call(this,e),e.some(function(t){return t.target===n.domNode&&"attributes"===t.type})&&this.attributes.build()},e.prototype.wrap=function(n,r){var o=t.prototype.wrap.call(this,n,r);return o instanceof e&&o.statics.scope===this.statics.scope&&this.attributes.move(o),o},e}(l.default);Object.defineProperty(e,"__esModule",{value:!0}),e.default=s},function(t,e,n){"use strict";var r=n(6),o=function(){function t(t,e,n){void 0===n&&(n={}),this.attrName=t,this.keyName=e;var o=r.Scope.TYPE&r.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&r.Scope.LEVEL|o:this.scope=r.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return t.keys=function(t){return[].map.call(t.attributes,function(t){return t.name})},t.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)},t.prototype.canAdd=function(t,e){var n=r.query(t,r.Scope.BLOT&(this.scope|r.Scope.TYPE));return null!=n&&(null==this.whitelist||this.whitelist.indexOf(e)>-1)},t.prototype.remove=function(t){t.removeAttribute(this.keyName)},t.prototype.value=function(t){var e=t.getAttribute(this.keyName);return this.canAdd(t,e)?e:""},t}();Object.defineProperty(e,"__esModule",{value:!0}),e.default=o},function(t,e,n){"use strict";var r=n(8),o=n(10),i=n(11),l=n(6),a=function(){function t(t){this.attributes={},this.domNode=t,this.build()}return t.prototype.attribute=function(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])},t.prototype.build=function(){var t=this;this.attributes={};var e=r.default.keys(this.domNode),n=o.default.keys(this.domNode),a=i.default.keys(this.domNode);e.concat(n).concat(a).forEach(function(e){var n=l.query(e,l.Scope.ATTRIBUTE);n instanceof r.default&&(t.attributes[n.attrName]=n)})},t.prototype.copy=function(t){var e=this;Object.keys(this.attributes).forEach(function(n){var r=e.attributes[n].value(e.domNode);t.format(n,r)})},t.prototype.move=function(t){var e=this;this.copy(t),Object.keys(this.attributes).forEach(function(t){e.attributes[t].remove(e.domNode)}),this.attributes={}},t.prototype.values=function(){var t=this;return Object.keys(this.attributes).reduce(function(e,n){return e[n]=t.attributes[n].value(t.domNode),e},{})},t}();Object.defineProperty(e,"__esModule",{value:!0}),e.default=a},function(t,e,n){"use strict";function r(t,e){var n=t.getAttribute("class")||"";return n.split(/\s+/).filter(function(t){return 0===t.indexOf(e+"-")})}var o=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=n(8),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.keys=function(t){return(t.getAttribute("class")||"").split(/\s+/).map(function(t){return t.split("-").slice(0,-1).join("-")})},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(this.keyName+"-"+e),!0)},e.prototype.remove=function(t){var e=r(t,this.keyName);e.forEach(function(e){t.classList.remove(e)}),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){var e=r(t,this.keyName)[0]||"",n=e.slice(this.keyName.length+1);return this.canAdd(t,n)?n:""},e}(i.default);Object.defineProperty(e,"__esModule",{value:!0}),e.default=l},function(t,e,n){"use strict";function r(t){var e=t.split("-"),n=e.slice(1).map(function(t){return t[0].toUpperCase()+t.slice(1)}).join("");return e[0]+n}var o=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=n(8),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.keys=function(t){return(t.getAttribute("style")||"").split(";").map(function(t){var e=t.split(":");return e[0].trim()})},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.style[r(this.keyName)]=e,!0)},e.prototype.remove=function(t){t.style[r(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){var e=t.style[r(this.keyName)];return this.canAdd(t,e)?e:""},e}(i.default);Object.defineProperty(e,"__esModule",{value:!0}),e.default=l},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},o=n(5),i=n(6),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.value=function(t){return!0},e.prototype.index=function(t,e){return t!==this.domNode?-1:Math.min(e,1)},e.prototype.position=function(t,e){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return t>0&&(n+=1),[this.parent.domNode,n]},e.prototype.value=function(){return t={},t[this.statics.blotName]=this.statics.value(this.domNode)||!0,t;var t},e}(o.default);l.scope=i.Scope.INLINE_BLOT,Object.defineProperty(e,"__esModule",{value:!0}),e.default=l},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},o=n(3),i=n(6),l={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},a=100,s=function(t){function e(e){var n=t.call(this,e)||this;return n.parent=null,n.observer=new MutationObserver(function(t){n.update(t)}),n.observer.observe(n.domNode,l),n}return r(e,t),e.prototype.detach=function(){t.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(e,n){this.update(),0===e&&n===this.length()?this.children.forEach(function(t){t.remove()}):t.prototype.deleteAt.call(this,e,n)},e.prototype.formatAt=function(e,n,r,o){this.update(),t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.insertAt=function(e,n,r){this.update(),t.prototype.insertAt.call(this,e,n,r)},e.prototype.optimize=function(e){var n=this;void 0===e&&(e=[]),t.prototype.optimize.call(this);for(var r=[].slice.call(this.observer.takeRecords());r.length>0;)e.push(r.pop());for(var l=function(t,e){void 0===e&&(e=!0),null!=t&&t!==n&&null!=t.domNode.parentNode&&(null==t.domNode[i.DATA_KEY].mutations&&(t.domNode[i.DATA_KEY].mutations=[]),e&&l(t.parent))},s=function(t){null!=t.domNode[i.DATA_KEY]&&null!=t.domNode[i.DATA_KEY].mutations&&(t instanceof o.default&&t.children.forEach(s),t.optimize())},u=e,c=0;u.length>0;c+=1){if(c>=a)throw new Error("[Parchment] Maximum optimize iterations reached");for(u.forEach(function(t){var e=i.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(l(i.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,function(t){var e=i.find(t,!1);l(e,!1),e instanceof o.default&&e.children.forEach(function(t){l(t,!1)})})):"attributes"===t.type&&l(e.prev)),l(e))}),this.children.forEach(s),u=[].slice.call(this.observer.takeRecords()),r=u.slice();r.length>0;)e.push(r.pop())}},e.prototype.update=function(e){var n=this;e=e||this.observer.takeRecords(),e.map(function(t){var e=i.find(t.target,!0);if(null!=e)return null==e.domNode[i.DATA_KEY].mutations?(e.domNode[i.DATA_KEY].mutations=[t],e):(e.domNode[i.DATA_KEY].mutations.push(t),null)}).forEach(function(t){null!=t&&t!==n&&null!=t.domNode[i.DATA_KEY]&&t.update(t.domNode[i.DATA_KEY].mutations||[])}),null!=this.domNode[i.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[i.DATA_KEY].mutations),this.optimize(e)},e}(o.default);s.blotName="scroll",s.defaultChild="block",s.scope=i.Scope.BLOCK_BLOT,s.tagName="DIV",Object.defineProperty(e,"__esModule",{value:!0}),e.default=s},function(t,e,n){"use strict";function r(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}var o=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=n(7),l=n(6),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.formats=function(n){if(n.tagName!==e.tagName)return t.formats.call(this,n)},e.prototype.format=function(n,r){var o=this;n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):(this.children.forEach(function(t){t instanceof i.default||(t=t.wrap(e.blotName,!0)),o.attributes.copy(t)}),this.unwrap())},e.prototype.formatAt=function(e,n,r,o){if(null!=this.formats()[r]||l.query(r,l.Scope.ATTRIBUTE)){var i=this.isolate(e,n);i.format(r,o)}else t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.optimize=function(){t.prototype.optimize.call(this);var n=this.formats();if(0===Object.keys(n).length)return this.unwrap();var o=this.next;o instanceof e&&o.prev===this&&r(n,o.formats())&&(o.moveChildren(this),o.remove())},e}(i.default);a.blotName="inline",a.scope=l.Scope.INLINE_BLOT,a.tagName="SPAN",Object.defineProperty(e,"__esModule",{value:!0}),e.default=a},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},o=n(7),i=n(6),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(n){var r=i.query(e.blotName).tagName;if(n.tagName!==r)return t.formats.call(this,n)},e.prototype.format=function(n,r){null!=i.query(n,i.Scope.BLOCK)&&(n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):this.replaceWith(e.blotName))},e.prototype.formatAt=function(e,n,r,o){null!=i.query(r,i.Scope.BLOCK)?this.format(r,o):t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.insertAt=function(e,n,r){if(null==r||null!=i.query(n,i.Scope.INLINE))t.prototype.insertAt.call(this,e,n,r);else{var o=this.split(e),l=i.create(n,r);o.parent.insertBefore(l,o)}},e.prototype.update=function(e){navigator.userAgent.match(/Trident/)?this.attach():t.prototype.update.call(this,e)},e}(o.default);l.blotName="block",l.scope=i.Scope.BLOCK_BLOT,l.tagName="P",Object.defineProperty(e,"__esModule",{value:!0}),e.default=l},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},o=n(12),i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(t){},e.prototype.format=function(e,n){t.prototype.formatAt.call(this,0,this.length(),e,n)},e.prototype.formatAt=function(e,n,r,o){0===e&&n===this.length()?this.format(r,o):t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.formats=function(){return this.statics.formats(this.domNode)},e}(o.default);Object.defineProperty(e,"__esModule",{value:!0}),e.default=i},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},o=n(12),i=n(6),l=function(t){function e(e){var n=t.call(this,e)||this;return n.text=n.statics.value(n.domNode),n}return r(e,t),e.create=function(t){return document.createTextNode(t)},e.value=function(t){return t.data},e.prototype.deleteAt=function(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)},e.prototype.index=function(t,e){return this.domNode===t?e:-1},e.prototype.insertAt=function(e,n,r){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)},e.prototype.length=function(){return this.text.length},e.prototype.optimize=function(){t.prototype.optimize.call(this),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},e.prototype.position=function(t,e){return void 0===e&&(e=!1),[this.domNode,t]},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=i.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},e.prototype.update=function(t){var e=this;t.some(function(t){return"characterData"===t.type&&t.target===e.domNode})&&(this.text=this.statics.value(this.domNode))},e.prototype.value=function(){return this.text},e}(o.default);l.blotName="text",l.scope=i.Scope.INLINE_BLOT,Object.defineProperty(e,"__esModule",{value:!0}),e.default=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if(e=(0,j.default)(!0,{container:t,modules:{clipboard:!0,keyboard:!0,history:!0}},e),e.theme&&e.theme!==S.DEFAULTS.theme){if(e.theme=S.import("themes/"+e.theme),null==e.theme)throw new Error("Invalid theme "+e.theme+". Did you register it?")}else e.theme=T.default;var n=(0,j.default)(!0,{},e.theme.DEFAULTS);[n,e].forEach(function(t){t.modules=t.modules||{},Object.keys(t.modules).forEach(function(e){t.modules[e]===!0&&(t.modules[e]={})})});var r=Object.keys(n.modules).concat(Object.keys(e.modules)),o=r.reduce(function(t,e){var n=S.import("modules/"+e);return null==n?P.error("Cannot load "+e+" module. Are you sure you registered it?"):t[e]=n.DEFAULTS||{},t},{});return null!=e.modules&&e.modules.toolbar&&e.modules.toolbar.constructor!==Object&&(e.modules.toolbar={container:e.modules.toolbar}),e=(0,j.default)(!0,{},S.DEFAULTS,{modules:o},n,e),["bounds","container","scrollingContainer"].forEach(function(t){"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))}),e.modules=Object.keys(e.modules).reduce(function(t,n){return e.modules[n]&&(t[n]=e.modules[n]),t},{}),e}function a(t,e,n,r){if(this.options.strict&&!this.isEnabled()&&e===g.default.sources.USER)return new d.default;var o=null==n?null:this.getSelection(),i=this.editor.delta,l=t();if(null!=o&&(n===!0&&(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){var a,s=[g.default.events.TEXT_CHANGE,l,i,e];if((a=this.emitter).emit.apply(a,[g.default.events.EDITOR_CHANGE].concat(s)),e!==g.default.sources.SILENT){var c;(c=this.emitter).emit.apply(c,s)}}return l}function s(t,e,n,r,o){var i={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(o=r,r=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(o=r,r=n,n=e,e=0),"object"===("undefined"==typeof n?"undefined":c(n))?(i=n,o=r):"string"==typeof n&&(null!=r?i[n]=r:o=n),o=o||g.default.sources.API,[t,e,i,o]}function u(t,e,n,r){if(null==t)return null;var o=void 0,i=void 0;if(e instanceof d.default){var l=[t.index,t.index+t.length].map(function(t){return e.transformPosition(t,r===g.default.sources.USER)}),a=f(l,2);o=a[0],i=a[1]}else{var s=[t.index,t.index+t.length].map(function(t){return t<e||t===e&&r!==g.default.sources.USER?t:n>=0?t+n:Math.max(e,t+n)}),u=f(s,2);o=u[0],i=u[1]}return new x.Range(o,i-o)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.overload=e.expandConfig=void 0;var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();n(19);var h=n(20),d=r(h),y=n(27),v=r(y),b=n(35),g=r(b),m=n(39),_=r(m),O=n(2),w=r(O),x=n(40),k=r(x),E=n(25),j=r(E),A=n(37),N=r(A),q=n(41),T=r(q),P=(0,N.default)("quill"),S=function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};
8
+ if(i(this,t),this.options=l(e,r),this.container=this.options.container,this.scrollingContainer=this.options.scrollingContainer||document.body,null==this.container)return P.error("Invalid Quill container",e);this.options.debug&&t.debug(this.options.debug);var o=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new g.default,this.scroll=w.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new v.default(this.scroll),this.selection=new k.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(g.default.events.EDITOR_CHANGE,function(t){t===g.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())}),this.emitter.on(g.default.events.SCROLL_UPDATE,function(t,e){var r=n.selection.lastRange,o=r&&0===r.length?r.index:void 0;a.call(n,function(){return n.editor.update(null,e,o)},t)});var s=this.clipboard.convert("<div class='ql-editor' style=\"white-space: normal;\">"+o+"<p><br></p></div>");this.setContents(s),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return p(t,null,[{key:"debug",value:function(t){t===!0&&(t="log"),N.default.level(t)}},{key:"find",value:function(t){return t.__quill||w.default.find(t)}},{key:"import",value:function(t){return null==this.imports[t]&&P.error("Cannot import "+t+". Are you sure it was registered?"),this.imports[t]}},{key:"register",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof t){var o=t.attrName||t.blotName;"string"==typeof o?this.register("formats/"+o,t,e):Object.keys(t).forEach(function(r){n.register(r,t[r],e)})}else null==this.imports[t]||r||P.warn("Overwriting "+t+" with",e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&"abstract"!==e.blotName&&w.default.register(e)}}]),p(t,[{key:"addContainer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof t){var n=t;t=document.createElement("div"),t.classList.add(n)}return this.container.insertBefore(t,e),t}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(t,e,n){var r=this,o=s(t,e,n),i=f(o,4);return t=i[0],e=i[1],n=i[3],a.call(this,function(){return r.editor.deleteText(t,e)},n,t,-1*e)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t),t||this.blur()}},{key:"focus",value:function(){var t=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=t,this.selection.scrollIntoView()}},{key:"format",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g.default.sources.API;return a.call(this,function(){var r=n.getSelection(!0),i=new d.default;if(null==r)return i;if(w.default.query(t,w.default.Scope.BLOCK))i=n.editor.formatLine(r.index,r.length,o({},t,e));else{if(0===r.length)return n.selection.format(t,e),i;i=n.editor.formatText(r.index,r.length,o({},t,e))}return n.setSelection(r,g.default.sources.SILENT),i},r)}},{key:"formatLine",value:function(t,e,n,r,o){var i=this,l=void 0,u=s(t,e,n,r,o),c=f(u,4);return t=c[0],e=c[1],l=c[2],o=c[3],a.call(this,function(){return i.editor.formatLine(t,e,l)},o,t,0)}},{key:"formatText",value:function(t,e,n,r,o){var i=this,l=void 0,u=s(t,e,n,r,o),c=f(u,4);return t=c[0],e=c[1],l=c[2],o=c[3],a.call(this,function(){return i.editor.formatText(t,e,l)},o,t,0)}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof t?this.selection.getBounds(t,e):this.selection.getBounds(t.index,t.length)}},{key:"getContents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=s(t,e),r=f(n,2);return t=r[0],e=r[1],this.editor.getContents(t,e)}},{key:"getFormat",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}},{key:"getIndex",value:function(t){return t.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(t){return this.scroll.leaf(t)}},{key:"getLine",value:function(t){return this.scroll.line(t)}},{key:"getLines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}},{key:"getModule",value:function(t){return this.theme.modules[t]}},{key:"getSelection",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=s(t,e),r=f(n,2);return t=r[0],e=r[1],this.editor.getText(t,e)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(e,n,r){var o=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.sources.API;return a.call(this,function(){return o.editor.insertEmbed(e,n,r)},i,e)}},{key:"insertText",value:function(t,e,n,r,o){var i=this,l=void 0,u=s(t,0,n,r,o),c=f(u,4);return t=c[0],l=c[2],o=c[3],a.call(this,function(){return i.editor.insertText(t,e,l)},o,t,e.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(t,e,n){this.clipboard.dangerouslyPasteHTML(t,e,n)}},{key:"removeFormat",value:function(t,e,n){var r=this,o=s(t,e,n),i=f(o,4);return t=i[0],e=i[1],n=i[3],a.call(this,function(){return r.editor.removeFormat(t,e)},n,t)}},{key:"setContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g.default.sources.API;return a.call(this,function(){t=new d.default(t);var n=e.getLength(),r=e.editor.deleteText(0,n),o=e.editor.applyDelta(t),i=o.ops[o.ops.length-1];null!=i&&"string"==typeof i.insert&&"\n"===i.insert[i.insert.length-1]&&(e.editor.deleteText(e.getLength()-1,1),o.delete(1));var l=r.compose(o);return l},n)}},{key:"setSelection",value:function(e,n,r){if(null==e)this.selection.setRange(null,n||t.sources.API);else{var o=s(e,n,r),i=f(o,4);e=i[0],n=i[1],r=i[3],this.selection.setRange(new x.Range(e,n),r)}r!==g.default.sources.SILENT&&this.selection.scrollIntoView()}},{key:"setText",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g.default.sources.API,n=(new d.default).insert(t);return this.setContents(n,e)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g.default.sources.USER,e=this.scroll.update(t);return this.selection.update(t),e}},{key:"updateContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g.default.sources.API;return a.call(this,function(){return t=new d.default(t),e.editor.applyDelta(t,n)},n,!0)}}]),t}();S.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},S.events=g.default.events,S.sources=g.default.sources,S.version="1.2.0",S.imports={delta:d.default,parchment:w.default,"core/module":_.default,"core/theme":T.default},e.expandConfig=l,e.overload=s,e.default=S},function(t,e){"use strict";var n=document.createElement("div");n.classList.toggle("test-class",!1),n.classList.contains("test-class")&&!function(){var t=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,n){return arguments.length>1&&!this.contains(e)==!n?n:t.call(this,e)}}(),String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var r=n.indexOf(t,e);return r!==-1&&r===e}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function t(e){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var t,n=Object(this),r=n.length>>>0,o=arguments[1],i=0;i<r;i++)if(t=n[i],e.call(o,t,i,n))return t}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1)})},function(t,e,n){var r=n(21),o=n(22),i=n(25),l=n(26),a=String.fromCharCode(0),s=function(t){Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]};s.prototype.insert=function(t,e){var n={};return 0===t.length?this:(n.insert=t,null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n))},s.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},s.prototype.retain=function(t,e){if(t<=0)return this;var n={retain:t};return null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)},s.prototype.push=function(t){var e=this.ops.length,n=this.ops[e-1];if(t=i(!0,{},t),"object"==typeof n){if("number"==typeof t.delete&&"number"==typeof n.delete)return this.ops[e-1]={delete:n.delete+t.delete},this;if("number"==typeof n.delete&&null!=t.insert&&(e-=1,n=this.ops[e-1],"object"!=typeof n))return this.ops.unshift(t),this;if(o(t.attributes,n.attributes)){if("string"==typeof t.insert&&"string"==typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this},s.prototype.filter=function(t){return this.ops.filter(t)},s.prototype.forEach=function(t){this.ops.forEach(t)},s.prototype.map=function(t){return this.ops.map(t)},s.prototype.partition=function(t){var e=[],n=[];return this.forEach(function(r){var o=t(r)?e:n;o.push(r)}),[e,n]},s.prototype.reduce=function(t,e){return this.ops.reduce(t,e)},s.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},s.prototype.length=function(){return this.reduce(function(t,e){return t+l.length(e)},0)},s.prototype.slice=function(t,e){t=t||0,"number"!=typeof e&&(e=1/0);for(var n=[],r=l.iterator(this.ops),o=0;o<e&&r.hasNext();){var i;o<t?i=r.next(t-o):(i=r.next(e-o),n.push(i)),o+=l.length(i)}return new s(n)},s.prototype.compose=function(t){for(var e=l.iterator(this.ops),n=l.iterator(t.ops),r=new s;e.hasNext()||n.hasNext();)if("insert"===n.peekType())r.push(n.next());else if("delete"===e.peekType())r.push(e.next());else{var o=Math.min(e.peekLength(),n.peekLength()),i=e.next(o),a=n.next(o);if("number"==typeof a.retain){var u={};"number"==typeof i.retain?u.retain=o:u.insert=i.insert;var c=l.attributes.compose(i.attributes,a.attributes,"number"==typeof i.retain);c&&(u.attributes=c),r.push(u)}else"number"==typeof a.delete&&"number"==typeof i.retain&&r.push(a)}return r.chop()},s.prototype.concat=function(t){var e=new s(this.ops.slice());return t.ops.length>0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e},s.prototype.diff=function(t,e){if(this.ops===t.ops)return new s;var n=[this,t].map(function(e){return e.map(function(e){if(null!=e.insert)return"string"==typeof e.insert?e.insert:a;var n=ops===t.ops?"on":"with";throw new Error("diff() called "+n+" non-document")}).join("")}),i=new s,u=r(n[0],n[1],e),c=l.iterator(this.ops),f=l.iterator(t.ops);return u.forEach(function(t){for(var e=t[1].length;e>0;){var n=0;switch(t[0]){case r.INSERT:n=Math.min(f.peekLength(),e),i.push(f.next(n));break;case r.DELETE:n=Math.min(e,c.peekLength()),c.next(n),i.delete(n);break;case r.EQUAL:n=Math.min(c.peekLength(),f.peekLength(),e);var a=c.next(n),s=f.next(n);o(a.insert,s.insert)?i.retain(n,l.attributes.diff(a.attributes,s.attributes)):i.push(s).delete(n)}e-=n}}),i.chop()},s.prototype.eachLine=function(t,e){e=e||"\n";for(var n=l.iterator(this.ops),r=new s;n.hasNext();){if("insert"!==n.peekType())return;var o=n.peek(),i=l.length(o)-n.peekLength(),a="string"==typeof o.insert?o.insert.indexOf(e,i)-i:-1;a<0?r.push(n.next()):a>0?r.push(n.next(a)):(t(r,n.next(1).attributes||{}),r=new s)}r.length()>0&&t(r,{})},s.prototype.transform=function(t,e){if(e=!!e,"number"==typeof t)return this.transformPosition(t,e);for(var n=l.iterator(this.ops),r=l.iterator(t.ops),o=new s;n.hasNext()||r.hasNext();)if("insert"!==n.peekType()||!e&&"insert"===r.peekType())if("insert"===r.peekType())o.push(r.next());else{var i=Math.min(n.peekLength(),r.peekLength()),a=n.next(i),u=r.next(i);if(a.delete)continue;u.delete?o.push(u):o.retain(i,l.attributes.transform(a.attributes,u.attributes,e))}else o.retain(l.length(n.next()));return o.chop()},s.prototype.transformPosition=function(t,e){e=!!e;for(var n=l.iterator(this.ops),r=0;n.hasNext()&&r<=t;){var o=n.peekLength(),i=n.peekType();n.next(),"delete"!==i?("insert"===i&&(r<t||!e)&&(t+=o),r+=o):t-=Math.min(o,t-r)}return t},t.exports=s},function(t,e){function n(t,e,n){if(t==e)return t?[[y,t]]:[];(n<0||t.length<n)&&(n=null);var o=l(t,e),i=t.substring(0,o);t=t.substring(o),e=e.substring(o),o=a(t,e);var s=t.substring(t.length-o);t=t.substring(0,t.length-o),e=e.substring(0,e.length-o);var c=r(t,e);return i&&c.unshift([y,i]),s&&c.push([y,s]),u(c),null!=n&&(c=f(c,n)),c}function r(t,e){var r;if(!t)return[[d,e]];if(!e)return[[h,t]];var i=t.length>e.length?t:e,l=t.length>e.length?e:t,a=i.indexOf(l);if(a!=-1)return r=[[d,i.substring(0,a)],[y,l],[d,i.substring(a+l.length)]],t.length>e.length&&(r[0][0]=r[2][0]=h),r;if(1==l.length)return[[h,t],[d,e]];var u=s(t,e);if(u){var c=u[0],f=u[1],p=u[2],v=u[3],b=u[4],g=n(c,p),m=n(f,v);return g.concat([[y,b]],m)}return o(t,e)}function o(t,e){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;s[l+1]=0,u[l+1]=0;for(var f=n-r,p=f%2!=0,y=0,v=0,b=0,g=0,m=0;m<o;m++){for(var _=-m+y;_<=m-v;_+=2){var O,w=l+_;O=_==-m||_!=m&&s[w-1]<s[w+1]?s[w+1]:s[w-1]+1;for(var x=O-_;O<n&&x<r&&t.charAt(O)==e.charAt(x);)O++,x++;if(s[w]=O,O>n)v+=2;else if(x>r)y+=2;else if(p){var k=l+f-_;if(k>=0&&k<a&&u[k]!=-1){var E=n-u[k];if(O>=E)return i(t,e,O,x)}}}for(var j=-m+b;j<=m-g;j+=2){var E,k=l+j;E=j==-m||j!=m&&u[k-1]<u[k+1]?u[k+1]:u[k-1]+1;for(var A=E-j;E<n&&A<r&&t.charAt(n-E-1)==e.charAt(r-A-1);)E++,A++;if(u[k]=E,E>n)g+=2;else if(A>r)b+=2;else if(!p){var w=l+f-j;if(w>=0&&w<a&&s[w]!=-1){var O=s[w],x=l+O-w;if(E=n-E,O>=E)return i(t,e,O,x)}}}}return[[h,t],[d,e]]}function i(t,e,r,o){var i=t.substring(0,r),l=e.substring(0,o),a=t.substring(r),s=e.substring(o),u=n(i,l),c=n(a,s);return u.concat(c)}function l(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;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);return o}function a(t,e){if(!t||!e||t.charAt(t.length-1)!=e.charAt(e.length-1))return 0;for(var n=0,r=Math.min(t.length,e.length),o=r,i=0;n<o;)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);return o}function s(t,e){function n(t,e,n){for(var r,o,i,s,u=t.substring(n,n+Math.floor(t.length/4)),c=-1,f="";(c=e.indexOf(u,c+1))!=-1;){var p=l(t.substring(n),e.substring(c)),h=a(t.substring(0,n),e.substring(0,c));f.length<h+p&&(f=e.substring(c-h,c)+e.substring(c,c+p),r=t.substring(0,n-h),o=t.substring(n+p),i=e.substring(0,c-h),s=e.substring(c+p))}return 2*f.length>=t.length?[r,o,i,s,f]:null}var r=t.length>e.length?t:e,o=t.length>e.length?e:t;if(r.length<4||2*o.length<r.length)return null;var i,s=n(r,o,Math.ceil(r.length/4)),u=n(r,o,Math.ceil(r.length/2));if(!s&&!u)return null;i=u?s&&s[4].length>u[4].length?s:u:s;var c,f,p,h;t.length>e.length?(c=i[0],f=i[1],p=i[2],h=i[3]):(p=i[0],h=i[1],c=i[2],f=i[3]);var d=i[4];return[c,f,p,h,d]}function u(t){t.push([y,""]);for(var e,n=0,r=0,o=0,i="",s="";n<t.length;)switch(t[n][0]){case d:o++,s+=t[n][1],n++;break;case h:r++,i+=t[n][1],n++;break;case y:r+o>1?(0!==r&&0!==o&&(e=l(s,i),0!==e&&(n-r-o>0&&t[n-r-o-1][0]==y?t[n-r-o-1][1]+=s.substring(0,e):(t.splice(0,0,[y,s.substring(0,e)]),n++),s=s.substring(e),i=i.substring(e)),e=a(s,i),0!==e&&(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))),0===r?t.splice(n-o,r+o,[d,s]):0===o?t.splice(n-r,r+o,[h,i]):t.splice(n-r-o,r+o,[h,i],[d,s]),n=n-r-o+(r?1:0)+(o?1:0)+1):0!==n&&t[n-1][0]==y?(t[n-1][1]+=t[n][1],t.splice(n,1)):n++,o=0,r=0,i="",s=""}""===t[t.length-1][1]&&t.pop();var c=!1;for(n=1;n<t.length-1;)t[n-1][0]==y&&t[n+1][0]==y&&(t[n][1].substring(t[n][1].length-t[n-1][1].length)==t[n-1][1]?(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):t[n][1].substring(0,t[n+1][1].length)==t[n+1][1]&&(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)),n++;c&&u(t)}function c(t,e){if(0===e)return[y,t];for(var n=0,r=0;r<t.length;r++){var o=t[r];if(o[0]===h||o[0]===y){var i=n+o[1].length;if(e===i)return[r+1,t];if(e<i){t=t.slice();var l=e-n,a=[o[0],o[1].slice(0,l)],s=[o[0],o[1].slice(l)];return t.splice(r,1,a,s),[r+1,t]}n=i}}throw new Error("cursor_pos is out of bounds!")}function f(t,e){var n=c(t,e),r=n[1],o=n[0],i=r[o],l=r[o+1];if(null==i)return t;if(i[0]!==y)return t;if(null!=l&&i[1]+l[1]===l[1]+i[1])return r.splice(o,2,l,i),p(r,o,2);if(null!=l&&0===l[1].indexOf(i[1])){r.splice(o,2,[l[0],i[1]],[0,i[1]]);var a=l[1].slice(i[1].length);return a.length>0&&r.splice(o+2,0,[l[0],a]),p(r,o,3)}return t}function p(t,e,n){for(var r=e+n-1;r>=0&&r>=e-1;r--)if(r+1<t.length){var o=t[r],i=t[r+1];o[0]===i[1]&&t.splice(r,2,[o[0],o[1]+i[1]])}return t}var h=-1,d=1,y=0,v=n;v.INSERT=d,v.DELETE=h,v.EQUAL=y,t.exports=v},function(t,e,n){function r(t){return null===t||void 0===t}function o(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length)&&("function"==typeof t.copy&&"function"==typeof t.slice&&!(t.length>0&&"number"!=typeof t[0]))}function i(t,e,n){var i,c;if(r(t)||r(e))return!1;if(t.prototype!==e.prototype)return!1;if(s(t))return!!s(e)&&(t=l.call(t),e=l.call(e),u(t,e,n));if(o(t)){if(!o(e))return!1;if(t.length!==e.length)return!1;for(i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0}try{var f=a(t),p=a(e)}catch(t){return!1}if(f.length!=p.length)return!1;for(f.sort(),p.sort(),i=f.length-1;i>=0;i--)if(f[i]!=p[i])return!1;for(i=f.length-1;i>=0;i--)if(c=f[i],!u(t[c],e[c],n))return!1;return typeof t==typeof e}var l=Array.prototype.slice,a=n(23),s=n(24),u=t.exports=function(t,e,n){return n||(n={}),t===e||(t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():!t||!e||"object"!=typeof t&&"object"!=typeof e?n.strict?t===e:t==e:i(t,e,n))}},function(t,e){function n(t){var e=[];for(var n in t)e.push(n);return e}e=t.exports="function"==typeof Object.keys?Object.keys:n,e.shim=n},function(t,e){function n(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function r(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Object.prototype.hasOwnProperty.call(t,"callee")&&!Object.prototype.propertyIsEnumerable.call(t,"callee")||!1}var o="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();e=t.exports=o?n:r,e.supported=n,e.unsupported=r},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,o=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===r.call(t)},i=function(t){if(!t||"[object Object]"!==r.call(t))return!1;var e=n.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!e&&!o)return!1;var i;for(i in t);return"undefined"==typeof i||n.call(t,i)};t.exports=function t(){var e,n,r,l,a,s,u=arguments[0],c=1,f=arguments.length,p=!1;for("boolean"==typeof u?(p=u,u=arguments[1]||{},c=2):("object"!=typeof u&&"function"!=typeof u||null==u)&&(u={});c<f;++c)if(e=arguments[c],null!=e)for(n in e)r=u[n],l=e[n],u!==l&&(p&&l&&(i(l)||(a=o(l)))?(a?(a=!1,s=r&&o(r)?r:[]):s=r&&i(r)?r:{},u[n]=t(p,s,l)):"undefined"!=typeof l&&(u[n]=l));return u}},function(t,e,n){function r(t){this.ops=t,this.index=0,this.offset=0}var o=n(22),i=n(25),l={attributes:{compose:function(t,e,n){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var r=i(!0,{},e);n||(r=Object.keys(r).reduce(function(t,e){return null!=r[e]&&(t[e]=r[e]),t},{}));for(var o in t)void 0!==t[o]&&void 0===e[o]&&(r[o]=t[o]);return Object.keys(r).length>0?r:void 0},diff:function(t,e){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var n=Object.keys(t).concat(Object.keys(e)).reduce(function(n,r){return o(t[r],e[r])||(n[r]=void 0===e[r]?null:e[r]),n},{});return Object.keys(n).length>0?n:void 0},transform:function(t,e,n){if("object"!=typeof t)return e;if("object"==typeof e){if(!n)return e;var r=Object.keys(e).reduce(function(n,r){return void 0===t[r]&&(n[r]=e[r]),n},{});return Object.keys(r).length>0?r:void 0}}},iterator:function(t){return new r(t)},length:function(t){return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"string"==typeof t.insert?t.insert.length:1}};r.prototype.hasNext=function(){return this.peekLength()<1/0},r.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,r=l.length(e);if(t>=r-n?(t=r-n,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};var o={};return e.attributes&&(o.attributes=e.attributes),"number"==typeof e.retain?o.retain=t:"string"==typeof e.insert?o.insert=e.insert.substr(n,t):o.insert=e.insert,o}return{retain:1/0}},r.prototype.peek=function(){return this.ops[this.index]},r.prototype.peekLength=function(){return this.ops[this.index]?l.length(this.ops[this.index])-this.offset:1/0},r.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},t.exports=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){return Object.keys(e).reduce(function(n,r){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)},{})}function a(t){return t.reduce(function(t,e){if(1===e.insert){var n=(0,k.default)(e.attributes);return delete n.image,t.insert({image:e.attributes.image},n)}if(null==e.attributes||e.attributes.list!==!0&&e.attributes.bullet!==!0||(e=(0,k.default)(e),e.attributes.list?e.attributes.list="ordered":(e.attributes.list="bullet",delete e.attributes.bullet)),"string"==typeof e.insert){var r=e.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return t.insert(r,e.attributes)}return t.push(e)},new p.default)}Object.defineProperty(e,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),f=n(20),p=r(f),h=n(26),d=r(h),y=n(2),v=r(y),b=n(28),g=r(b),m=n(34),_=r(m),O=n(29),w=r(O),x=n(38),k=r(x),E=n(22),j=r(E),A=n(25),N=r(A),q=function(){function t(e){i(this,t),this.scroll=e,this.delta=this.getDelta()}return c(t,[{key:"applyDelta",value:function(t){var e=this,n=!1;this.scroll.update();var r=this.scroll.length();return this.scroll.batch=!0,t=a(t),t.reduce(function(t,o){var i=o.retain||o.delete||o.insert.length||1,l=o.attributes||{};if(null!=o.insert){if("string"==typeof o.insert){var a=o.insert;a.endsWith("\n")&&n&&(n=!1,a=a.slice(0,-1)),t>=r&&!a.endsWith("\n")&&(n=!0),e.scroll.insertAt(t,a);var c=e.scroll.line(t),f=u(c,2),p=f[0],h=f[1],y=(0,N.default)({},(0,O.bubbleFormats)(p));if(p instanceof w.default){var b=p.descendant(v.default.Leaf,h),g=u(b,1),m=g[0];y=(0,N.default)(y,(0,O.bubbleFormats)(m))}l=d.default.attributes.diff(y,l)||{}}else if("object"===s(o.insert)){var _=Object.keys(o.insert)[0];if(null==_)return t;e.scroll.insertAt(t,_,o.insert[_])}r+=i}return Object.keys(l).forEach(function(n){e.scroll.formatAt(t,i,n,l[n])}),t+i},0),t.reduce(function(t,n){return"number"==typeof n.delete?(e.scroll.deleteAt(t,n.delete),t):t+(n.retain||n.insert.length||1)},0),this.scroll.batch=!1,this.scroll.optimize(),this.update(t)}},{key:"deleteText",value:function(t,e){return this.scroll.deleteAt(t,e),this.update((new p.default).retain(t).delete(e))}},{key:"formatLine",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(r).forEach(function(o){if(null==n.scroll.whitelist||n.scroll.whitelist[o]){var i=n.scroll.lines(t,Math.max(e,1)),l=e;i.forEach(function(e){var i=e.length();if(e instanceof g.default){var a=t-e.offset(n.scroll),s=e.newlineIndex(a+l)-a+1;e.formatAt(a,s,o,r[o])}else e.format(o,r[o]);l-=i})}}),this.scroll.optimize(),this.update((new p.default).retain(t).retain(e,(0,k.default)(r)))}},{key:"formatText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(r).forEach(function(o){n.scroll.formatAt(t,e,o,r[o])}),this.update((new p.default).retain(t).retain(e,(0,k.default)(r)))}},{key:"getContents",value:function(t,e){return this.delta.slice(t,t+e)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(t,e){return t.concat(e.delta())},new p.default)}},{key:"getFormat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===e?this.scroll.path(t).forEach(function(t){var e=u(t,1),o=e[0];o instanceof w.default?n.push(o):o instanceof v.default.Leaf&&r.push(o)}):(n=this.scroll.lines(t,e),r=this.scroll.descendants(v.default.Leaf,t,e));var o=[n,r].map(function(t){if(0===t.length)return{};for(var e=(0,O.bubbleFormats)(t.shift());Object.keys(e).length>0;){var n=t.shift();if(null==n)return e;e=l((0,O.bubbleFormats)(n),e)}return e});return N.default.apply(N.default,o)}},{key:"getText",value:function(t,e){return this.getContents(t,e).filter(function(t){return"string"==typeof t.insert}).map(function(t){return t.insert}).join("")}},{key:"insertEmbed",value:function(t,e,n){return this.scroll.insertAt(t,e,n),this.update((new p.default).retain(t).insert(o({},e,n)))}},{key:"insertText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(r).forEach(function(o){n.scroll.formatAt(t,e.length,o,r[o])}),this.update((new p.default).retain(t).insert(e,(0,k.default)(r)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var t=this.scroll.children.head;return t.length()<=1&&0==Object.keys(t.formats()).length}},{key:"removeFormat",value:function(t,e){var n=this.getText(t,e),r=this.scroll.line(t+e),o=u(r,2),i=o[0],l=o[1],a=0,s=new p.default;null!=i&&(a=i instanceof g.default?i.newlineIndex(l)-l+1:i.length()-l,s=i.delta().slice(l,l+a-1).insert("\n"));var c=this.getContents(t,e+a),f=c.diff((new p.default).insert(n).concat(s)),h=(new p.default).retain(t).concat(f);return this.applyDelta(h)}},{key:"update",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,o=this.delta;return 1===n.length&&"characterData"===n[0].type&&v.default.find(n[0].target)?!function(){var i=v.default.find(n[0].target),l=(0,O.bubbleFormats)(i),a=i.offset(e.scroll),s=n[0].oldValue.replace(_.default.CONTENTS,""),u=(new p.default).insert(s),c=(new p.default).insert(i.value()),f=(new p.default).retain(a).concat(u.diff(c,r));t=f.reduce(function(t,e){return e.insert?t.insert(e.insert,l):t.push(e)},new p.default),e.delta=o.compose(t)}():(this.delta=this.getDelta(),t&&(0,j.default)(o.compose(t),this.delta)||(t=o.diff(this.delta,r))),t}}]),t}();e.default=q},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Code=void 0;var a=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;if(void 0!==l)return l.call(r)},c=n(20),f=r(c),p=n(2),h=r(p),d=n(29),y=r(d),v=n(32),b=r(v),g=n(33),m=r(g),_=function(t){function e(){return o(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return l(e,t),e}(b.default);_.blotName="code",_.tagName="CODE";var O=function(t){function e(){return o(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return l(e,t),s(e,[{key:"delta",value:function(){var t=this,e=this.domNode.textContent;return e.endsWith("\n")&&(e=e.slice(0,-1)),e.split("\n").reduce(function(e,n){
9
+ return e.insert(n).insert("\n",t.formats())},new f.default)}},{key:"format",value:function(t,n){if(t!==this.statics.blotName||!n){var r=this.descendant(m.default,this.length()-1),o=a(r,1),i=o[0];null!=i&&i.deleteAt(i.length()-1,1),u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}},{key:"formatAt",value:function(t,n,r,o){if(0!==n&&null!=h.default.query(r,h.default.Scope.BLOCK)&&(r!==this.statics.blotName||o!==this.statics.formats(this.domNode))){var i=this.newlineIndex(t);if(!(i<0||i>=t+n)){var l=this.newlineIndex(t,!0)+1,a=i-l+1,s=this.isolate(l,a),u=s.next;s.format(r,o),u instanceof e&&u.formatAt(0,t-l+n-a,r,o)}}}},{key:"insertAt",value:function(t,e,n){if(null==n){var r=this.descendant(m.default,t),o=a(r,2),i=o[0],l=o[1];i.insertAt(l,e)}}},{key:"length",value:function t(){var t=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?t:t+1}},{key:"newlineIndex",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e)return this.domNode.textContent.slice(0,t).lastIndexOf("\n");var n=this.domNode.textContent.slice(t).indexOf("\n");return n>-1?t+n:-1}},{key:"optimize",value:function(){this.domNode.textContent.endsWith("\n")||this.appendChild(h.default.create("text","\n")),u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this);var t=this.next;null!=t&&t.prev===this&&t.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===t.statics.formats(t.domNode)&&(t.optimize(),t.moveChildren(this),t.remove())}},{key:"replace",value:function(t){u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(t){var e=h.default.find(t);null==e?t.parentNode.removeChild(t):e instanceof h.default.Embed?e.remove():e.unwrap()})}}],[{key:"create",value:function(t){var n=u(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),e}(y.default);O.blotName="code-block",O.tagName="PRE",O.TAB=" ",e.Code=_,e.default=O},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==t?e:("function"==typeof t.formats&&(e=(0,f.default)(e,t.formats())),null==t.parent||"scroll"==t.parent.blotName||t.parent.statics.scope!==t.statics.scope?e:a(t.parent,e))}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BlockEmbed=e.bubbleFormats=void 0;var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;if(void 0!==l)return l.call(r)},c=n(25),f=r(c),p=n(20),h=r(p),d=n(2),y=r(d),v=n(30),b=r(v),g=n(31),m=r(g),_=n(32),O=r(_),w=n(33),x=r(w),k=1,E=function(t){function e(){return o(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return l(e,t),s(e,[{key:"attach",value:function(){u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"attach",this).call(this),this.attributes=new y.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return(new h.default).insert(this.value(),(0,f.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(t,e){var n=y.default.query(t,y.default.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,e)}},{key:"formatAt",value:function(t,e,n,r){this.format(n,r)}},{key:"insertAt",value:function(t,n,r){if("string"==typeof n&&n.endsWith("\n")){var o=y.default.create(j.blotName);this.parent.insertBefore(o,0===t?this:this.next),o.insertAt(0,n.slice(0,-1))}else u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,r)}}]),e}(m.default);E.scope=y.default.Scope.BLOCK_BLOT;var j=function(t){function e(t){o(this,e);var n=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.cache={},n}return l(e,t),s(e,[{key:"delta",value:function(){return null==this.cache.delta&&(this.cache.delta=this.descendants(y.default.Leaf).reduce(function(t,e){return 0===e.length()?t:t.insert(e.value(),a(e))},new h.default).insert("\n",a(this))),this.cache.delta}},{key:"deleteAt",value:function(t,n){u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"deleteAt",this).call(this,t,n),this.cache={}}},{key:"formatAt",value:function(t,n,r,o){n<=0||(y.default.query(r,y.default.Scope.BLOCK)?t+n===this.length()&&this.format(r,o):u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,Math.min(n,this.length()-t-1),r,o),this.cache={})}},{key:"insertAt",value:function(t,n,r){if(null!=r)return u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,r);if(0!==n.length){var o=n.split("\n"),i=o.shift();i.length>0&&(t<this.length()-1||null==this.children.tail?u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,Math.min(t,this.length()-1),i):this.children.tail.insertAt(this.children.tail.length(),i),this.cache={});var l=this;o.reduce(function(t,e){return l=l.split(t,!0),l.insertAt(0,e),e.length},t+i.length)}}},{key:"insertBefore",value:function(t,n){var r=this.children.head;u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n),r instanceof b.default&&r.remove(),this.cache={}}},{key:"length",value:function(){return null==this.cache.length&&(this.cache.length=u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"length",this).call(this)+k),this.cache.length}},{key:"moveChildren",value:function(t,n){u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"moveChildren",this).call(this,t,n),this.cache={}}},{key:"optimize",value:function(){u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this),this.cache={}}},{key:"path",value:function(t){return u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t,!0)}},{key:"removeChild",value:function(t){u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"removeChild",this).call(this,t),this.cache={}}},{key:"split",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===t||t>=this.length()-k)){var r=this.clone();return 0===t?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}var o=u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"split",this).call(this,t,n);return this.cache={},o}}]),e}(y.default.Block);j.blotName="block",j.tagName="P",j.defaultChild="break",j.allowedChildren=[O.default,m.default,x.default],e.bubbleFormats=a,e.BlockEmbed=E,e.default=j},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;if(void 0!==l)return l.call(r)},u=n(31),c=r(u),f=function(t){function e(){return o(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return l(e,t),a(e,[{key:"insertInto",value:function(t,n){0===t.children.length?s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertInto",this).call(this,t,n):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),e}(c.default);f.blotName="break",f.tagName="BR",e.default=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=n(2),s=r(a),u=function(t){function e(){return o(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return l(e,t),e}(s.default.Embed);e.default=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;if(void 0!==l)return l.call(r)},u=n(31),c=r(u),f=n(33),p=r(f),h=n(2),d=r(h),y=function(t){function e(){return o(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return l(e,t),a(e,[{key:"formatAt",value:function(t,n,r,o){if(e.compare(this.statics.blotName,r)<0&&d.default.query(r,d.default.Scope.BLOT)){var i=this.isolate(t,n);o&&i.wrap(r,o)}else s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,r,o)}},{key:"optimize",value:function(){if(s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this),this.parent instanceof e&&e.compare(this.statics.blotName,this.parent.statics.blotName)>0){var t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}}],[{key:"compare",value:function(t,n){var r=e.order.indexOf(t),o=e.order.indexOf(n);return r>=0||o>=0?r-o:t===n?0:t<n?-1:1}}]),e}(d.default.Inline);y.allowedChildren=[y,c.default,p.default],y.order=["cursor","inline","code","underline","strike","italic","bold","script","link"],e.default=y},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=n(2),s=r(a),u=function(t){function e(){return o(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return l(e,t),e}(s.default.Text);e.default=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;if(void 0!==l)return l.call(r)},u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=n(2),f=r(c),p=n(31),h=r(p),d=n(33),y=r(d),v=n(35),b=r(v),g=function(t){function e(t,n){o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.selection=n,r.textNode=document.createTextNode(e.CONTENTS),r.domNode.appendChild(r.textNode),r._length=0,r}return l(e,t),u(e,null,[{key:"value",value:function(){}}]),u(e,[{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this)}},{key:"format",value:function(t,n){if(0!==this._length)return s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n);for(var r=this,o=0;null!=r&&r.statics.scope!==f.default.Scope.BLOCK_BLOT;)o+=r.offset(r.parent),r=r.parent;null!=r&&(this._length=e.CONTENTS.length,r.optimize(),r.formatAt(o,e.CONTENTS.length,t,n),this._length=0)}},{key:"index",value:function(t,n){return t===this.textNode?0:s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"index",this).call(this,t,n)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){var t=this;if(!this.selection.composing&&null!=this.parent){var n=this.textNode,r=this.selection.getNativeRange(),o=void 0,i=void 0,l=void 0;if(null!=r&&r.start.node===n&&r.end.node===n){var s=[n,r.start.offset,r.end.offset];o=s[0],i=s[1],l=s[2]}for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==e.CONTENTS){var u=this.textNode.data.split(e.CONTENTS).join("");this.next instanceof y.default?(o=this.next.domNode,this.next.insertAt(0,u),this.textNode.data=e.CONTENTS):(this.textNode.data=u,this.parent.insertBefore(f.default.create(this.textNode),this),this.textNode=document.createTextNode(e.CONTENTS),this.domNode.appendChild(this.textNode))}this.remove(),null!=i&&this.selection.emitter.once(b.default.events.SCROLL_OPTIMIZE,function(){var e=[i,l].map(function(t){return Math.max(0,Math.min(o.data.length,t-1))}),n=a(e,2);i=n[0],l=n[1],t.selection.setNativeRange(o,i,o,l)})}}},{key:"update",value:function(t){var e=this;t.forEach(function(t){"characterData"===t.type&&t.target===e.textNode&&e.restore()})}},{key:"value",value:function(){return""}}]),e}(h.default);g.blotName="cursor",g.className="ql-cursor",g.tagName="span",g.CONTENTS="\ufeff",e.default=g},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;if(void 0!==l)return l.call(r)},u=n(36),c=r(u),f=n(37),p=r(f),h=(0,p.default)("quill:events"),d=function(t){function e(){o(this,e);var t=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.on("error",h.error),t}return l(e,t),a(e,[{key:"emit",value:function(){h.log.apply(h,arguments),s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"emit",this).apply(this,arguments)}}]),e}(c.default);d.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},d.sources={API:"api",SILENT:"silent",USER:"user"},e.default=d},function(t,e){"use strict";function n(){}function r(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function o(){this._events=new n,this._eventsCount=0}var i=Object.prototype.hasOwnProperty,l="~";Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(l=!1)),o.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)i.call(t,e)&&n.push(l?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},o.prototype.listeners=function(t,e){var n=l?l+t:t,r=this._events[n];if(e)return!!r;if(!r)return[];if(r.fn)return[r.fn];for(var o=0,i=r.length,a=new Array(i);o<i;o++)a[o]=r[o].fn;return a},o.prototype.emit=function(t,e,n,r,o,i){var a=l?l+t:t;if(!this._events[a])return!1;var s,u,c=this._events[a],f=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),f){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,n),!0;case 4:return c.fn.call(c.context,e,n,r),!0;case 5:return c.fn.call(c.context,e,n,r,o),!0;case 6:return c.fn.call(c.context,e,n,r,o,i),!0}for(u=1,s=new Array(f-1);u<f;u++)s[u-1]=arguments[u];c.fn.apply(c.context,s)}else{var p,h=c.length;for(u=0;u<h;u++)switch(c[u].once&&this.removeListener(t,c[u].fn,void 0,!0),f){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,e);break;case 3:c[u].fn.call(c[u].context,e,n);break;case 4:c[u].fn.call(c[u].context,e,n,r);break;default:if(!s)for(p=1,s=new Array(f-1);p<f;p++)s[p-1]=arguments[p];c[u].fn.apply(c[u].context,s)}}return!0},o.prototype.on=function(t,e,n){var o=new r(e,n||this),i=l?l+t:t;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},o.prototype.once=function(t,e,n){var o=new r(e,n||this,!0),i=l?l+t:t;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},o.prototype.removeListener=function(t,e,r,o){var i=l?l+t:t;if(!this._events[i])return this;if(!e)return 0===--this._eventsCount?this._events=new n:delete this._events[i],this;var a=this._events[i];if(a.fn)a.fn!==e||o&&!a.once||r&&a.context!==r||(0===--this._eventsCount?this._events=new n:delete this._events[i]);else{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]);u.length?this._events[i]=1===u.length?u[0]:u:0===--this._eventsCount?this._events=new n:delete this._events[i]}return this},o.prototype.removeAllListeners=function(t){var e;return t?(e=l?l+t:t,this._events[e]&&(0===--this._eventsCount?this._events=new n:delete this._events[e])):(this._events=new n,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prototype.setMaxListeners=function(){return this},o.prefixed=l,o.EventEmitter=o,"undefined"!=typeof t&&(t.exports=o)},function(t,e){"use strict";function n(t){if(o.indexOf(t)<=o.indexOf(i)){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];console[t].apply(console,n)}}function r(t){return o.reduce(function(e,r){return e[r]=n.bind(console,r,t),e},{})}Object.defineProperty(e,"__esModule",{value:!0});var o=["error","warn","log","info"],i="warn";n.level=r.level=function(t){i=t},e.default=r},function(t,e){var n=function(){"use strict";function t(e,n,r,o,u){function c(e,r){if(null===e)return null;if(0===r)return e;var d,y;if("object"!=typeof e)return e;if(e instanceof l)d=new l;else if(e instanceof a)d=new a;else if(e instanceof s)d=new s(function(t,n){e.then(function(e){t(c(e,r-1))},function(t){n(c(t,r-1))})});else if(t.__isArray(e))d=[];else if(t.__isRegExp(e))d=new RegExp(e.source,i(e)),e.lastIndex&&(d.lastIndex=e.lastIndex);else if(t.__isDate(e))d=new Date(e.getTime());else{if(h&&Buffer.isBuffer(e))return d=new Buffer(e.length),e.copy(d),d;e instanceof Error?d=Object.create(e):"undefined"==typeof o?(y=Object.getPrototypeOf(e),d=Object.create(y)):(d=Object.create(o),y=o)}if(n){var v=f.indexOf(e);if(v!=-1)return p[v];f.push(e),p.push(d)}if(e instanceof l)for(var b=e.keys();;){var g=b.next();if(g.done)break;var m=c(g.value,r-1),_=c(e.get(g.value),r-1);d.set(m,_)}if(e instanceof a)for(var O=e.keys();;){var g=O.next();if(g.done)break;var w=c(g.value,r-1);d.add(w)}for(var x in e){var k;y&&(k=Object.getOwnPropertyDescriptor(y,x)),k&&null==k.set||(d[x]=c(e[x],r-1))}if(Object.getOwnPropertySymbols)for(var E=Object.getOwnPropertySymbols(e),x=0;x<E.length;x++){var j=E[x],A=Object.getOwnPropertyDescriptor(e,j);(!A||A.enumerable||u)&&(d[j]=c(e[j],r-1),A.enumerable||Object.defineProperty(d,j,{enumerable:!1}))}if(u)for(var N=Object.getOwnPropertyNames(e),x=0;x<N.length;x++){var q=N[x],A=Object.getOwnPropertyDescriptor(e,q);A&&A.enumerable||(d[q]=c(e[q],r-1),Object.defineProperty(d,q,{enumerable:!1}))}return d}"object"==typeof n&&(r=n.depth,o=n.prototype,u=n.includeNonEnumerable,n=n.circular);var f=[],p=[],h="undefined"!=typeof Buffer;return"undefined"==typeof n&&(n=!0),"undefined"==typeof r&&(r=1/0),c(e,r)}function e(t){return Object.prototype.toString.call(t)}function n(t){return"object"==typeof t&&"[object Date]"===e(t)}function r(t){return"object"==typeof t&&"[object Array]"===e(t)}function o(t){return"object"==typeof t&&"[object RegExp]"===e(t)}function i(t){var e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),e}var l;try{l=Map}catch(t){l=function(){}}var a;try{a=Set}catch(t){a=function(){}}var s;try{s=Promise}catch(t){s=function(){}}return t.clonePrototype=function(t){if(null===t)return null;var e=function(){};return e.prototype=t,new e},t.__objToStr=e,t.__isDate=n,t.__isArray=r,t.__isRegExp=o,t.__getRegExpFlags=i,t}();"object"==typeof t&&t.exports&&(t.exports=n)},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n(this,t),this.quill=e,this.options=r};r.DEFAULTS={},e.default=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){try{e.parentNode}catch(t){return!1}return e instanceof Text&&(e=e.parentNode),t.contains(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Range=void 0;var a=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(2),c=r(u),f=n(38),p=r(f),h=n(22),d=r(h),y=n(35),v=r(y),b=n(37),g=r(b),m=(0,g.default)("quill:selection"),_=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;i(this,t),this.index=e,this.length=n},O=function(){function t(e,n){var r=this;i(this,t),this.emitter=n,this.scroll=e,this.composing=!1,this.root=this.scroll.domNode,this.root.addEventListener("compositionstart",function(){r.composing=!0}),this.root.addEventListener("compositionend",function(){r.composing=!1}),this.cursor=c.default.create("cursor",this),this.lastRange=this.savedRange=new _(0,0),["keyup","mouseup","mouseleave","touchend","touchleave","focus","blur"].forEach(function(t){r.root.addEventListener(t,function(){setTimeout(r.update.bind(r,v.default.sources.USER),100)})}),this.emitter.on(v.default.events.EDITOR_CHANGE,function(t,e){t===v.default.events.TEXT_CHANGE&&e.length()>0&&r.update(v.default.sources.SILENT)}),this.emitter.on(v.default.events.SCROLL_BEFORE_UPDATE,function(){var t=r.getNativeRange();null!=t&&t.start.node!==r.cursor.textNode&&r.emitter.once(v.default.events.SCROLL_UPDATE,function(){try{r.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset)}catch(t){}})}),this.update(v.default.sources.SILENT)}return s(t,[{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(t,e){if(null==this.scroll.whitelist||this.scroll.whitelist[t]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!c.default.query(t,c.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var r=c.default.find(n.start.node,!1);if(null==r)return;if(r instanceof c.default.Leaf){var o=r.split(n.start.offset);r.parent.insertBefore(this.cursor,o)}else r.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();t=Math.min(t,n-1),e=Math.min(t+e,n-1)-t;var r=void 0,o=void 0,i=this.scroll.leaf(t),l=a(i,2),s=l[0],u=l[1];if(null==s)return null;var c=s.position(u,!0),f=a(c,2);o=f[0],u=f[1];var p=document.createRange();if(e>0){p.setStart(o,u);var h=this.scroll.leaf(t+e),d=a(h,2);if(s=d[0],u=d[1],null==s)return null;var y=s.position(u,!0),v=a(y,2);o=v[0],u=v[1],p.setEnd(o,u),r=p.getBoundingClientRect()}else{var b="left",g=void 0;o instanceof Text?(u<o.data.length?(p.setStart(o,u),p.setEnd(o,u+1)):(p.setStart(o,u-1),p.setEnd(o,u),b="right"),g=p.getBoundingClientRect()):(g=s.domNode.getBoundingClientRect(),u>0&&(b="right")),r={height:g.height,left:g[b],width:0,top:g.top}}var m=this.root.parentNode.getBoundingClientRect();return{left:r.left-m.left,right:r.left+r.width-m.left,top:r.top-m.top,bottom:r.top+r.height-m.top,height:r.height,width:r.width}}},{key:"getNativeRange",value:function(){var t=document.getSelection();if(null==t||t.rangeCount<=0)return null;var e=t.getRangeAt(0);if(null==e)return null;if(!l(this.root,e.startContainer)||!e.collapsed&&!l(this.root,e.endContainer))return null;var n={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[n.start,n.end].forEach(function(t){for(var e=t.node,n=t.offset;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;e=e.lastChild,n=e instanceof Text?e.data.length:e.childNodes.length+1}t.node=e,t.offset=n}),m.info("getNativeRange",n),n}},{key:"getRange",value:function(){var t=this,e=this.getNativeRange();if(null==e)return[null,null];var n=[[e.start.node,e.start.offset]];e.native.collapsed||n.push([e.end.node,e.end.offset]);var r=n.map(function(e){var n=a(e,2),r=n[0],o=n[1],i=c.default.find(r,!0),l=i.offset(t.scroll);return 0===o?l:i instanceof c.default.Container?l+i.length():l+i.index(r,o)}),i=Math.min.apply(Math,o(r)),l=Math.max.apply(Math,o(r));return l=Math.min(l,this.scroll.length()-1),[new _(i,l-i),e]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"scrollIntoView",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.lastRange;if(null!=t){var e=this.getBounds(t.index,t.length);if(null!=e)if(this.root.offsetHeight<e.bottom){var n=this.scroll.line(Math.min(t.index+t.length,this.scroll.length()-1)),r=a(n,1),o=r[0];this.root.scrollTop=o.domNode.offsetTop+o.domNode.offsetHeight-this.root.offsetHeight}else if(e.top<0){var i=this.scroll.line(Math.min(t.index,this.scroll.length()-1)),l=a(i,1),s=l[0];this.root.scrollTop=s.domNode.offsetTop}}}},{key:"setNativeRange",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(m.info("setNativeRange",t,e,n,r),null==t||null!=this.root.parentNode&&null!=t.parentNode&&null!=n.parentNode){var i=document.getSelection();if(null!=i)if(null!=t){this.hasFocus()||this.root.focus();var l=(this.getNativeRange()||{}).native;if(null==l||o||t!==l.startContainer||e!==l.startOffset||n!==l.endContainer||r!==l.endOffset){"BR"==t.tagName&&(e=[].indexOf.call(t.parentNode.childNodes,t),t=t.parentNode),"BR"==n.tagName&&(r=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var a=document.createRange();
10
+ a.setStart(t,e),a.setEnd(n,r),i.removeAllRanges(),i.addRange(a)}}else i.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:v.default.sources.API;"string"==typeof n&&(r=n,n=!1),m.info("setRange",t),null!=t?!function(){var r=t.collapsed?[t.index]:[t.index,t.index+t.length],i=[],l=e.scroll.length();r.forEach(function(t,n){t=Math.min(l-1,t);var r=void 0,o=e.scroll.leaf(t),s=a(o,2),u=s[0],c=s[1],f=u.position(c,0!==n),p=a(f,2);r=p[0],c=p[1],i.push(r,c)}),i.length<2&&(i=i.concat(i)),e.setNativeRange.apply(e,o(i).concat([n]))}():this.setNativeRange(null),this.update(r)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v.default.sources.USER,e=this.lastRange,n=this.getRange(),r=a(n,2),o=r[0],i=r[1];if(this.lastRange=o,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,d.default)(e,this.lastRange)){var l;!this.composing&&null!=i&&i.native.collapsed&&i.start.node!==this.cursor.textNode&&this.cursor.restore();var s=[v.default.events.SELECTION_CHANGE,(0,p.default)(this.lastRange),(0,p.default)(e),t];if((l=this.emitter).emit.apply(l,[v.default.events.EDITOR_CHANGE].concat(s)),t!==v.default.sources.SILENT){var u;(u=this.emitter).emit.apply(u,s)}}}}]),t}();e.Range=_,e.default=O},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(e,r){n(this,t),this.quill=e,this.options=r,this.modules={}}return r(t,[{key:"init",value:function(){var t=this;Object.keys(this.options.modules).forEach(function(e){null==t.modules[e]&&t.addModule(e)})}},{key:"addModule",value:function(t){var e=this.quill.constructor.import("modules/"+t);return this.modules[t]=new e(this.quill,this.options.modules[t]||{}),this.modules[t]}}]),t}();o.DEFAULTS={modules:{}},o.themes={default:o},e.default=o},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=n(2),s=r(a),u=n(29),c=r(u),f=function(t){function e(){return o(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return l(e,t),e}(s.default.Container);f.allowedChildren=[c.default,u.BlockEmbed,f],e.default=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t){return t instanceof v.default||t instanceof y.BlockEmbed}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;if(void 0!==l)return l.call(r)},f=n(2),p=r(f),h=n(35),d=r(h),y=n(29),v=r(y),b=n(30),g=r(b),m=n(42),_=r(m),O=n(28),w=r(O),x=function(t){function e(t,n){o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.emitter=n.emitter,Array.isArray(n.whitelist)&&(r.whitelist=n.whitelist.reduce(function(t,e){return t[e]=!0,t},{})),r.optimize(),r.enable(),r}return l(e,t),u(e,[{key:"deleteAt",value:function(t,n){var r=this.line(t),o=s(r,2),i=o[0],l=o[1],a=this.line(t+n),u=s(a,1),f=u[0];if(c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"deleteAt",this).call(this,t,n),null!=f&&i!==f&&l>0&&!(i instanceof y.BlockEmbed)&&!(f instanceof y.BlockEmbed)){f instanceof w.default&&f.deleteAt(f.length()-1,1);var p=f.children.head instanceof g.default?null:f.children.head;i.moveChildren(f,p),i.remove()}this.optimize()}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",t)}},{key:"formatAt",value:function(t,n,r,o){(null==this.whitelist||this.whitelist[r])&&(c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,r,o),this.optimize())}},{key:"insertAt",value:function(t,n,r){if(null==r||null==this.whitelist||this.whitelist[n]){if(t>=this.length())if(null==r||null==p.default.query(n,p.default.Scope.BLOCK)){var o=p.default.create(this.statics.defaultChild);this.appendChild(o),null==r&&n.endsWith("\n")&&(n=n.slice(0,-1)),o.insertAt(0,n,r)}else{var i=p.default.create(n,r);this.appendChild(i)}else c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,r);this.optimize()}}},{key:"insertBefore",value:function(t,n){if(t.statics.scope===p.default.Scope.INLINE_BLOT){var r=p.default.create(this.statics.defaultChild);r.appendChild(t),t=r}c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n)}},{key:"leaf",value:function(t){return this.path(t).pop()||[null,-1]}},{key:"line",value:function(t){return t===this.length()?this.line(t-1):this.descendant(a,t)}},{key:"lines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,n=function t(e,n,r){var o=[],i=r;return e.children.forEachAt(n,r,function(e,n,r){a(e)?o.push(e):e instanceof p.default.Container&&(o=o.concat(t(e,n,i))),i-=r}),o};return n(this,t,e)}},{key:"optimize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.batch!==!0&&(c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),t.length>0&&this.emitter.emit(d.default.events.SCROLL_OPTIMIZE,t))}},{key:"path",value:function(t){return c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t).slice(1)}},{key:"update",value:function(t){if(this.batch!==!0){var n=d.default.sources.USER;"string"==typeof t&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t.length>0&&this.emitter.emit(d.default.events.SCROLL_BEFORE_UPDATE,n,t),c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"update",this).call(this,t.concat([])),t.length>0&&this.emitter.emit(d.default.events.SCROLL_UPDATE,n,t)}}}]),e}(p.default.Scroll);x.blotName="scroll",x.className="ql-editor",x.tagName="DIV",x.defaultChild="block",x.allowedChildren=[v.default,y.BlockEmbed,_.default],e.default=x},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function u(t){if(t.nodeType!==Node.ELEMENT_NODE)return{};var e="__ql-computed-style";return t[e]||(t[e]=window.getComputedStyle(t))}function c(t,e){for(var n="",r=t.ops.length-1;r>=0&&n.length<e.length;--r){var o=t.ops[r];if("string"!=typeof o.insert)break;n=o.insert+n}return n.slice(-1*e.length)===e}function f(t){if(0===t.childNodes.length)return!1;var e=u(t);return["block","list-item"].indexOf(e.display)>-1}function p(t,e,n){return t.nodeType===t.TEXT_NODE?n.reduce(function(e,n){return n(t,e)},new E.default):t.nodeType===t.ELEMENT_NODE?[].reduce.call(t.childNodes||[],function(r,o){var i=p(o,e,n);return o.nodeType===t.ELEMENT_NODE&&(i=e.reduce(function(t,e){return e(o,t)},i),i=(o[F]||[]).reduce(function(t,e){return e(o,t)},i)),r.concat(i)},new E.default):new E.default}function h(t,e,n){return n.compose((new E.default).retain(n.length(),o({},t,!0)))}function d(t,e){var n=A.default.Attributor.Attribute.keys(t),r=A.default.Attributor.Class.keys(t),o=A.default.Attributor.Style.keys(t),i={};return n.concat(r).concat(o).forEach(function(e){var n=A.default.query(e,A.default.Scope.ATTRIBUTE);null!=n&&(i[n.attrName]=n.value(t),i[n.attrName])||(null!=K[e]&&(n=K[e],i[n.attrName]=n.value(t)||void 0),null!=z[e]&&(n=z[e],i[n.attrName]=n.value(t)||void 0))}),Object.keys(i).length>0&&(e=e.compose((new E.default).retain(e.length(),i))),e}function y(t,e){var n=A.default.query(t);if(null==n)return e;if(n.prototype instanceof A.default.Embed){var r={},i=n.value(t);null!=i&&(r[n.blotName]=i,e=(new E.default).insert(r,n.formats(t)))}else if("function"==typeof n.formats){var l=o({},n.blotName,n.formats(t));e=e.compose((new E.default).retain(e.length(),l))}return e}function v(t,e){return c(e,"\n")||e.insert("\n"),e}function b(){return new E.default}function g(t,e){return f(t)&&!c(e,"\n")&&e.insert("\n"),e}function m(t,e){if(f(t)&&null!=t.nextElementSibling&&!c(e,"\n\n")){var n=t.offsetHeight+parseFloat(u(t).marginTop)+parseFloat(u(t).marginBottom);t.nextElementSibling.offsetTop>t.offsetTop+1.5*n&&e.insert("\n")}return e}function _(t,e){var n={},r=t.style||{};return r.fontStyle&&"italic"===u(t).fontStyle&&(n.italic=!0),r.fontWeight&&"bold"===u(t).fontWeight&&(n.bold=!0),Object.keys(n).length>0&&(e=e.compose((new E.default).retain(e.length(),n))),parseFloat(r.textIndent||0)>0&&(e=(new E.default).insert("\t").concat(e)),e}function O(t,e){var n=t.data;if("O:P"===t.parentNode.tagName)return e.insert(n.trim());if(!u(t.parentNode).whiteSpace.startsWith("pre")){var r=function(t,e){return e=e.replace(/[^\u00a0]/g,""),e.length<1&&t?" ":e};n=n.replace(/\r\n/g," ").replace(/\n/g," "),n=n.replace(/\s\s+/g,r.bind(r,!0)),(null==t.previousSibling&&f(t.parentNode)||null!=t.previousSibling&&f(t.previousSibling))&&(n=n.replace(/^\s+/,r.bind(r,!1))),(null==t.nextSibling&&f(t.parentNode)||null!=t.nextSibling&&f(t.nextSibling))&&(n=n.replace(/\s+$/,r.bind(r,!1)))}return e.insert(n)}Object.defineProperty(e,"__esModule",{value:!0}),e.matchText=e.matchSpacing=e.matchNewline=e.matchBlot=e.matchAttributor=e.default=void 0;var w=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),x=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),k=n(20),E=r(k),j=n(2),A=r(j),N=n(18),q=r(N),T=n(37),P=r(T),S=n(39),L=r(S),C=n(45),M=n(46),R=n(47),I=n(48),B=n(49),D=n(50),U=(0,P.default)("quill:clipboard"),F="__ql-matcher",H=[[Node.TEXT_NODE,O],["br",v],[Node.ELEMENT_NODE,g],[Node.ELEMENT_NODE,y],[Node.ELEMENT_NODE,m],[Node.ELEMENT_NODE,d],[Node.ELEMENT_NODE,_],["b",h.bind(h,"bold")],["i",h.bind(h,"italic")],["style",b]],K=[C.AlignAttribute,I.DirectionAttribute].reduce(function(t,e){return t[e.keyName]=e,t},{}),z=[C.AlignStyle,M.BackgroundStyle,R.ColorStyle,I.DirectionStyle,B.FontStyle,D.SizeStyle].reduce(function(t,e){return t[e.keyName]=e,t},{}),Z=function(t){function e(t,n){l(this,e);var r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.quill.root.addEventListener("paste",r.onPaste.bind(r)),r.container=r.quill.addContainer("ql-clipboard"),r.container.setAttribute("contenteditable",!0),r.container.setAttribute("tabindex",-1),r.matchers=[],H.concat(r.options.matchers).forEach(function(t){r.addMatcher.apply(r,i(t))}),r}return s(e,t),x(e,[{key:"addMatcher",value:function(t,e){this.matchers.push([t,e])}},{key:"convert",value:function(t){"string"==typeof t&&(this.container.innerHTML=t);var e=this.prepareMatching(),n=w(e,2),r=n[0],o=n[1],i=p(this.container,r,o);return c(i,"\n")&&null==i.ops[i.ops.length-1].attributes&&(i=i.compose((new E.default).retain(i.length()-1).delete(1))),U.log("convert",this.container.innerHTML,i),this.container.innerHTML="",i}},{key:"dangerouslyPasteHTML",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:q.default.sources.API;if("string"==typeof t)return this.quill.setContents(this.convert(t),e);var r=this.convert(e);return this.quill.updateContents((new E.default).retain(t).concat(r),n)}},{key:"onPaste",value:function(t){var e=this;if(!t.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),r=(new E.default).retain(n.index),o=this.quill.scrollingContainer.scrollTop;this.container.focus(),setTimeout(function(){e.quill.selection.update(q.default.sources.SILENT),r=r.concat(e.convert()).delete(n.length),e.quill.updateContents(r,q.default.sources.USER),e.quill.setSelection(r.length()-n.length,q.default.sources.SILENT),e.quill.scrollingContainer.scrollTop=o,e.quill.selection.scrollIntoView()},1)}}},{key:"prepareMatching",value:function(){var t=this,e=[],n=[];return this.matchers.forEach(function(r){var o=w(r,2),i=o[0],l=o[1];switch(i){case Node.TEXT_NODE:n.push(l);break;case Node.ELEMENT_NODE:e.push(l);break;default:[].forEach.call(t.container.querySelectorAll(i),function(t){t[F]=t[F]||[],t[F].push(l)})}}),[e,n]}}]),e}(L.default);Z.DEFAULTS={matchers:[]},e.default=Z,e.matchAttributor=d,e.matchBlot=y,e.matchNewline=g,e.matchSpacing=m,e.matchText=O},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.AlignStyle=e.AlignClass=e.AlignAttribute=void 0;var o=n(2),i=r(o),l={scope:i.default.Scope.BLOCK,whitelist:["right","center","justify"]},a=new i.default.Attributor.Attribute("align","align",l),s=new i.default.Attributor.Class("align","ql-align",l),u=new i.default.Attributor.Style("align","text-align",l);e.AlignAttribute=a,e.AlignClass=s,e.AlignStyle=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.BackgroundStyle=e.BackgroundClass=void 0;var o=n(2),i=r(o),l=n(47),a=new i.default.Attributor.Class("background","ql-bg",{scope:i.default.Scope.INLINE}),s=new l.ColorAttributor("background","background-color",{scope:i.default.Scope.INLINE});e.BackgroundClass=a,e.BackgroundStyle=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.ColorStyle=e.ColorClass=e.ColorAttributor=void 0;var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;if(void 0!==l)return l.call(r)},u=n(2),c=r(u),f=function(t){function e(){return o(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return l(e,t),a(e,[{key:"value",value:function t(n){var t=s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,n);return t.startsWith("rgb(")?(t=t.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+t.split(",").map(function(t){return("00"+parseInt(t).toString(16)).slice(-2)}).join("")):t}}]),e}(c.default.Attributor.Style),p=new c.default.Attributor.Class("color","ql-color",{scope:c.default.Scope.INLINE}),h=new f("color","color",{scope:c.default.Scope.INLINE});e.ColorAttributor=f,e.ColorClass=p,e.ColorStyle=h},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.DirectionStyle=e.DirectionClass=e.DirectionAttribute=void 0;var o=n(2),i=r(o),l={scope:i.default.Scope.BLOCK,whitelist:["rtl"]},a=new i.default.Attributor.Attribute("direction","dir",l),s=new i.default.Attributor.Class("direction","ql-direction",l),u=new i.default.Attributor.Style("direction","direction",l);e.DirectionAttribute=a,e.DirectionClass=s,e.DirectionStyle=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.FontClass=e.FontStyle=void 0;var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;if(void 0!==l)return l.call(r)},u=n(2),c=r(u),f={scope:c.default.Scope.INLINE,whitelist:["serif","monospace"]},p=new c.default.Attributor.Class("font","ql-font",f),h=function(t){function e(){return o(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return l(e,t),a(e,[{key:"value",value:function(t){return s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t).replace(/["']/g,"")}}]),e}(c.default.Attributor.Style),d=new h("font","font-family",f);e.FontStyle=d,e.FontClass=p},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.SizeStyle=e.SizeClass=void 0;var o=n(2),i=r(o),l=new i.default.Attributor.Class("size","ql-size",{scope:i.default.Scope.INLINE,whitelist:["small","large","huge"]}),a=new i.default.Attributor.Style("size","font-size",{scope:i.default.Scope.INLINE,whitelist:["10px","18px","32px"]});e.SizeClass=l,e.SizeStyle=a},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t){var e=t.ops[t.ops.length-1];return null!=e&&(null!=e.insert?"string"==typeof e.insert&&e.insert.endsWith("\n"):null!=e.attributes&&Object.keys(e.attributes).some(function(t){return null!=f.default.query(t,f.default.Scope.BLOCK)}))}function s(t){var e=t.reduce(function(t,e){return t+=e.delete||0},0),n=t.length()-e;return a(t)&&(n-=1),n}Object.defineProperty(e,"__esModule",{value:!0}),e.getLastChangeIndex=e.default=void 0;var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=n(2),f=r(c),p=n(18),h=r(p),d=n(39),y=r(d),v=function(t){function e(t,n){o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.lastRecorded=0,r.ignoreChange=!1,r.clear(),r.quill.on(h.default.events.EDITOR_CHANGE,function(t,e,n,o){t!==h.default.events.TEXT_CHANGE||r.ignoreChange||(r.options.userOnly&&o!==h.default.sources.USER?r.transform(e):r.record(e,n))}),r.quill.keyboard.addBinding({key:"Z",shortKey:!0},r.undo.bind(r)),r.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},r.redo.bind(r)),/Win/i.test(navigator.platform)&&r.quill.keyboard.addBinding({key:"Y",shortKey:!0},r.redo.bind(r)),r}return l(e,t),u(e,[{key:"change",value:function(t,e){if(0!==this.stack[t].length){var n=this.stack[t].pop();this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n[t],h.default.sources.USER),this.ignoreChange=!1;var r=s(n[t]);this.quill.setSelection(r),this.quill.selection.scrollIntoView(),this.stack[e].push(n)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"record",value:function(t,e){if(0!==t.ops.length){this.stack.redo=[];var n=this.quill.getContents().diff(e),r=Date.now();if(this.lastRecorded+this.options.delay>r&&this.stack.undo.length>0){var o=this.stack.undo.pop();n=n.compose(o.undo),t=o.redo.compose(t)}else this.lastRecorded=r;this.stack.undo.push({redo:t,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(t){this.stack.undo.forEach(function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)}),this.stack.redo.forEach(function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),e}(y.default);v.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},e.default=v,e.getLastChangeIndex=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){if(0!==t.index){var n=this.quill.getLine(t.index),r=y(n,1),o=r[0],i={};if(0===e.offset){var l=o.formats(),a=this.quill.getFormat(t.index-1,1);i=k.default.attributes.diff(l,a)||{}}var s=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;this.quill.deleteText(t.index-s,s,N.default.sources.USER),Object.keys(i).length>0&&this.quill.formatLine(t.index-s,s,i,N.default.sources.USER),this.quill.selection.scrollIntoView()}}function s(t,e){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;t.index>=this.quill.getLength()-n||this.quill.deleteText(t.index,n,N.default.sources.USER)}function u(t){this.quill.deleteText(t,N.default.sources.USER),this.quill.setSelection(t.index,N.default.sources.SILENT),this.quill.selection.scrollIntoView()}function c(t,e){var n=this;t.length>0&&this.quill.scroll.deleteAt(t.index,t.length);var r=Object.keys(e.format).reduce(function(t,n){return j.default.query(n,j.default.Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t},{});this.quill.insertText(t.index,"\n",r,N.default.sources.USER),this.quill.setSelection(t.index+1,N.default.sources.SILENT),this.quill.selection.scrollIntoView(),Object.keys(e.format).forEach(function(t){null==r[t]&&(Array.isArray(e.format[t])||"link"!==t&&n.quill.format(t,e.format[t],N.default.sources.USER))})}function f(t){return{key:M.keys.TAB,shiftKey:!t,format:{"code-block":!0},handler:function(e){var n=j.default.query("code-block"),r=e.index,o=e.length,i=this.quill.scroll.descendant(n,r),l=y(i,2),a=l[0],s=l[1];if(null!=a){var u=this.quill.getIndex(a),c=a.newlineIndex(s,!0)+1,f=a.newlineIndex(u+s+o),p=a.domNode.textContent.slice(c,f).split("\n");s=0,p.forEach(function(e,i){t?(a.insertAt(c+s,n.TAB),s+=n.TAB.length,0===i?r+=n.TAB.length:o+=n.TAB.length):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),s+=e.length+1}),this.quill.update(N.default.sources.USER),this.quill.setSelection(r,o,N.default.sources.SILENT)}}}}function p(t){return{key:t[0].toUpperCase(),shortKey:!0,handler:function(e,n){this.quill.format(t,!n.format[t],N.default.sources.USER)}}}function h(t){if("string"==typeof t||"number"==typeof t)return h({key:t});if("object"===("undefined"==typeof t?"undefined":d(t))&&(t=(0,g.default)(t,!1)),"string"==typeof t.key)if(null!=M.keys[t.key.toUpperCase()])t.key=M.keys[t.key.toUpperCase()];else{if(1!==t.key.length)return null;t.key=t.key.toUpperCase().charCodeAt(0)}return t}Object.defineProperty(e,"__esModule",{value:!0});var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},y=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),v=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),b=n(38),g=r(b),m=n(22),_=r(m),O=n(25),w=r(O),x=n(26),k=r(x),E=n(2),j=r(E),A=n(18),N=r(A),q=n(37),T=r(q),P=n(39),S=r(P),L=(0,T.default)("quill:keyboard"),C=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",M=function(t){function e(t,n){o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.bindings={},Object.keys(r.options.bindings).forEach(function(t){r.options.bindings[t]&&r.addBinding(r.options.bindings[t])}),r.addBinding({key:e.keys.ENTER,shiftKey:null},c),r.addBinding({key:e.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(r.addBinding({key:e.keys.BACKSPACE},{collapsed:!0},a),r.addBinding({key:e.keys.DELETE},{collapsed:!0},s)):(r.addBinding({key:e.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},a),r.addBinding({key:e.keys.DELETE},{collapsed:!0,suffix:/^.?$/},s)),r.addBinding({key:e.keys.BACKSPACE},{collapsed:!1},u),r.addBinding({key:e.keys.DELETE},{collapsed:!1},u),r.listen(),r}return l(e,t),v(e,null,[{key:"match",value:function(t,e){return e=h(e),(!!e.shortKey===t[C]||null===e.shortKey)&&(!["altKey","ctrlKey","metaKey","shiftKey"].some(function(n){return n!=C&&!!e[n]!==t[n]&&null!==e[n]})&&e.key===(t.which||t.keyCode))}}]),v(e,[{key:"addBinding",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=h(t);return null==r||null==r.key?L.warn("Attempted to add invalid keyboard binding",r):("function"==typeof e&&(e={handler:e}),"function"==typeof n&&(n={handler:n}),r=(0,w.default)(r,e,n),this.bindings[r.key]=this.bindings[r.key]||[],void this.bindings[r.key].push(r))}},{key:"listen",value:function(){var t=this;this.quill.root.addEventListener("keydown",function(n){if(!n.defaultPrevented){var r=n.which||n.keyCode,o=(t.bindings[r]||[]).filter(function(t){return e.match(n,t)});if(0!==o.length){var i=t.quill.getSelection();if(null!=i&&t.quill.hasFocus()){var l=t.quill.getLine(i.index),a=y(l,2),s=a[0],u=a[1],c=t.quill.getLeaf(i.index),f=y(c,2),p=f[0],h=f[1],v=0===i.length?[p,h]:t.quill.getLeaf(i.index+i.length),b=y(v,2),g=b[0],m=b[1],O=p instanceof j.default.Text?p.value().slice(0,h):"",w=g instanceof j.default.Text?g.value().slice(m):"",x={collapsed:0===i.length,empty:0===i.length&&s.length()<=1,format:t.quill.getFormat(i),offset:u,prefix:O,suffix:w},k=o.some(function(e){if(null!=e.collapsed&&e.collapsed!==x.collapsed)return!1;if(null!=e.empty&&e.empty!==x.empty)return!1;if(null!=e.offset&&e.offset!==x.offset)return!1;if(Array.isArray(e.format)){if(e.format.every(function(t){return null==x.format[t]}))return!1}else if("object"===d(e.format)&&!Object.keys(e.format).every(function(t){return e.format[t]===!0?null!=x.format[t]:e.format[t]===!1?null==x.format[t]:(0,_.default)(e.format[t],x.format[t])}))return!1;return!(null!=e.prefix&&!e.prefix.test(x.prefix))&&(!(null!=e.suffix&&!e.suffix.test(x.suffix))&&e.handler.call(t,i,x)!==!0)});k&&n.preventDefault()}}}})}}]),e}(S.default);M.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},M.DEFAULTS={bindings:{bold:p("bold"),italic:p("italic"),underline:p("underline"),indent:{key:M.keys.TAB,format:["blockquote","indent","list"],handler:function(t,e){return!(!e.collapsed||0===e.offset)||void this.quill.format("indent","+1",N.default.sources.USER)}},outdent:{key:M.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(t,e){return!(!e.collapsed||0===e.offset)||void this.quill.format("indent","-1",N.default.sources.USER)}},"outdent backspace":{key:M.keys.BACKSPACE,collapsed:!0,format:["blockquote","indent","list"],
11
+ offset:0,handler:function(t,e){null!=e.format.indent?this.quill.format("indent","-1",N.default.sources.USER):null!=e.format.blockquote?this.quill.format("blockquote",!1,N.default.sources.USER):null!=e.format.list&&this.quill.format("list",!1,N.default.sources.USER)}},"indent code-block":f(!0),"outdent code-block":f(!1),"remove tab":{key:M.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t){this.quill.deleteText(t.index-1,1,N.default.sources.USER)}},tab:{key:M.keys.TAB,handler:function(t,e){e.collapsed||this.quill.scroll.deleteAt(t.index,t.length),this.quill.insertText(t.index,"\t",N.default.sources.USER),this.quill.setSelection(t.index+1,N.default.sources.SILENT)}},"list empty enter":{key:M.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(t,e){this.quill.format("list",!1,N.default.sources.USER),e.format.indent&&this.quill.format("indent",!1,N.default.sources.USER)}},"checklist enter":{key:M.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(t){this.quill.scroll.insertAt(t.index,"\n");var e=this.quill.getLine(t.index+1),n=y(e,1),r=n[0];r.format("list","unchecked"),this.quill.update(N.default.sources.USER),this.quill.setSelection(t.index+1,N.default.sources.SILENT),this.quill.selection.scrollIntoView()}},"header enter":{key:M.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(t){this.quill.scroll.insertAt(t.index,"\n"),this.quill.formatText(t.index+1,1,"header",!1,N.default.sources.USER),this.quill.setSelection(t.index+1,N.default.sources.SILENT),this.quill.selection.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^(1\.|-)$/,handler:function(t,e){if(null!=this.quill.scroll.whitelist&&!this.quill.scroll.whitelist.list)return!0;var n=e.prefix.length;this.quill.scroll.deleteAt(t.index-n,n),this.quill.formatLine(t.index-n,1,"list",1===n?"bullet":"ordered",N.default.sources.USER),this.quill.setSelection(t.index-n,N.default.sources.SILENT)}},"code exit":{key:M.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(t){this.quill.format("code-block",!1,N.default.sources.USER),this.quill.deleteText(t.index-2,1,N.default.sources.USER)}}}},e.default=M},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.IndentClass=void 0;var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;if(void 0!==l)return l.call(r)},u=n(2),c=r(u),f=function(t){function e(){return o(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return l(e,t),a(e,[{key:"add",value:function(t,n){if("+1"===n||"-1"===n){var r=this.value(t)||0;n="+1"===n?r+1:r-1}return 0===n?(this.remove(t),!0):s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"add",this).call(this,t,n)}},{key:"canAdd",value:function(t,n){return s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"canAdd",this).call(this,t,n)||s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"canAdd",this).call(this,t,parseInt(n))}},{key:"value",value:function(t){return parseInt(s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t))||void 0}}]),e}(c.default.Attributor.Class),p=new f("indent","ql-indent",{scope:c.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});e.IndentClass=p},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=n(29),s=r(a),u=function(t){function e(){return o(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return l(e,t),e}(s.default);u.blotName="blockquote",u.tagName="blockquote",e.default=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=n(29),u=r(s),c=function(t){function e(){return o(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return l(e,t),a(e,null,[{key:"formats",value:function(t){return this.tagName.indexOf(t.tagName)+1}}]),e}(u.default);c.blotName="header",c.tagName=["H1","H2","H3","H4","H5","H6"],e.default=c},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.ListItem=void 0;var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;if(void 0!==l)return l.call(r)},c=n(2),f=r(c),p=n(29),h=r(p),d=n(42),y=r(d),v=function(t){function e(){return i(this,e),l(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return a(e,t),s(e,[{key:"format",value:function(t,n){t!==b.blotName||n?u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n):this.replaceWith(f.default.create(this.statics.scope))}},{key:"remove",value:function(){null==this.prev&&null==this.next?this.parent.remove():u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(t,n){return this.parent.isolate(this.offset(this.parent),this.length()),t===this.parent.statics.blotName?(this.parent.replaceWith(t,n),this):(this.parent.unwrap(),u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replaceWith",this).call(this,t,n))}}],[{key:"formats",value:function(t){return t.tagName===this.tagName?void 0:u(e.__proto__||Object.getPrototypeOf(e),"formats",this).call(this,t)}}]),e}(h.default);v.blotName="list-item",v.tagName="LI";var b=function(t){function e(t){i(this,e);var n=l(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return t.addEventListener("click",function(e){if(e.target.parentNode===t){var r=n.statics.formats(t),o=f.default.find(e.target);"checked"===r?o.format("list","unchecked"):"unchecked"===r&&o.format("list","checked")}}),n}return a(e,t),s(e,null,[{key:"create",value:function(t){var n="ordered"===t?"OL":"UL",r=u(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,n);return"checked"!==t&&"unchecked"!==t||r.setAttribute("data-checked","checked"===t),r}},{key:"formats",value:function(t){return"OL"===t.tagName?"ordered":"UL"===t.tagName?t.hasAttribute("data-checked")?"true"===t.getAttribute("data-checked")?"checked":"unchecked":"bullet":void 0}}]),s(e,[{key:"format",value:function(t,e){this.children.length>0&&this.children.tail.format(t,e)}},{key:"formats",value:function(){return o({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(t,n){if(t instanceof v)u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n);else{var r=null==n?this.length():n.offset(this),o=this.split(r);o.parent.insertBefore(t,o)}}},{key:"optimize",value:function(){u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this);var t=this.next;null!=t&&t.prev===this&&t.statics.blotName===this.statics.blotName&&t.domNode.tagName===this.domNode.tagName&&t.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(t.moveChildren(this),t.remove())}},{key:"replace",value:function(t){if(t.statics.blotName!==this.statics.blotName){var n=f.default.create(this.statics.defaultChild);t.moveChildren(n),this.appendChild(n)}u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t)}}]),e}(y.default);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},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;if(void 0!==l)return l.call(r)},u=n(32),c=r(u),f=function(t){function e(){return o(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return l(e,t),a(e,[{key:"optimize",value:function(){s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return s(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),e}(c.default);f.blotName="bold",f.tagName=["STRONG","B"],e.default=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=n(57),s=r(a),u=function(t){function e(){return o(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return l(e,t),e}(s.default);u.blotName="italic",u.tagName=["EM","I"],e.default=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){var n=document.createElement("a");n.href=t;var r=n.href.slice(0,n.href.indexOf(":"));return e.indexOf(r)>-1}Object.defineProperty(e,"__esModule",{value:!0}),e.sanitize=e.default=void 0;var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;if(void 0!==l)return l.call(r)},c=n(32),f=r(c),p=function(t){function e(){return o(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return l(e,t),s(e,[{key:"format",value:function(t,n){return t===this.statics.blotName&&n?(n=this.constructor.sanitize(n),void this.domNode.setAttribute("href",n)):u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=u(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return t=this.sanitize(t),n.setAttribute("href",t),n.setAttribute("target","_blank"),n}},{key:"formats",value:function(t){return t.getAttribute("href")}},{key:"sanitize",value:function(t){return a(t,["http","https","mailto"])?t:this.SANITIZED_URL}}]),e}(f.default);p.blotName="link",p.tagName="A",p.SANITIZED_URL="about:blank",e.default=p,e.sanitize=a},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;if(void 0!==l)return l.call(r)},u=n(32),c=r(u),f=function(t){function e(){return o(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return l(e,t),a(e,null,[{key:"create",value:function(t){return"super"===t?document.createElement("sup"):"sub"===t?document.createElement("sub"):s(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t)}},{key:"formats",value:function(t){return"SUB"===t.tagName?"sub":"SUP"===t.tagName?"super":void 0}}]),e}(c.default);f.blotName="script",f.tagName=["SUB","SUP"],e.default=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=n(32),s=r(a),u=function(t){function e(){return o(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return l(e,t),e}(s.default);u.blotName="strike",u.tagName="S",e.default=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=n(32),s=r(a),u=function(t){function e(){return o(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return l(e,t),e}(s.default);u.blotName="underline",u.tagName="U",e.default=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;if(void 0!==l)return l.call(r)},u=n(31),c=r(u),f=n(59),p=["alt","height","width"],h=function(t){function e(){return o(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return l(e,t),a(e,[{key:"format",value:function(t,n){p.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=s(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"==typeof t&&n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return p.reduce(function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e},{})}},{key:"match",value:function(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}},{key:"sanitize",value:function(t){return(0,f.sanitize)(t,["http","https","data"])?t:"//:0"}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(c.default);h.blotName="image",h.tagName="IMG",e.default=h},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;if(void 0!==l)return l.call(r)},u=n(29),c=n(59),f=r(c),p=["height","width"],h=function(t){function e(){return o(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return l(e,t),a(e,[{key:"format",value:function(t,n){p.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=s(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return p.reduce(function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e},{})}},{key:"sanitize",value:function(t){return f.default.sanitize(t)}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(u.BlockEmbed);h.blotName="video",h.className="ql-video",h.tagName="IFRAME",e.default=h},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(){if(null==window.katex)throw new Error("Formula module requires KaTeX.");h.default.register(d,!0)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.FormulaBlot=void 0;var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;if(void 0!==l)return l.call(r)},c=n(31),f=r(c),p=n(18),h=r(p),d=function(t){function e(){return o(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return l(e,t),s(e,[{key:"index",value:function(){return 1}}],[{key:"create",value:function(t){var n=u(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"==typeof t&&(window.katex.render(t,n),n.setAttribute("data-value",t)),n.setAttribute("contenteditable",!1),n}},{key:"value",value:function(t){return t.getAttribute("data-value")}}]),e}(f.default);d.blotName="formula",d.className="ql-formula",d.tagName="SPAN",e.FormulaBlot=d,e.default=a},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CodeToken=e.CodeBlock=void 0;var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;if(void 0!==l)return l.call(r)},u=n(2),c=r(u),f=n(18),p=r(f),h=n(39),d=r(h),y=n(28),v=r(y),b=function(t){function e(){return o(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return l(e,t),a(e,[{key:"replaceWith",value:function(t){this.domNode.textContent=this.domNode.textContent,this.attach(),s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replaceWith",this).call(this,t)}},{key:"highlight",value:function(t){if(this.cachedHTML!==this.domNode.innerHTML){var e=this.domNode.textContent;(e.trim().length>0||null==this.cachedHTML)&&(this.domNode.innerHTML=t(e),this.attach()),this.cachedHTML=this.domNode.innerHTML}}}]),e}(v.default);b.className="ql-syntax";var g=new c.default.Attributor.Class("token","hljs",{scope:c.default.Scope.INLINE}),m=function(t){function e(t,n){o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if("function"!=typeof r.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");p.default.register(g,!0),p.default.register(b,!0);var l=null;return r.quill.on(p.default.events.SCROLL_OPTIMIZE,function(){null==l&&(l=setTimeout(function(){r.highlight(),l=null},100))}),r.highlight(),r}return l(e,t),a(e,[{key:"highlight",value:function(){var t=this;if(!this.quill.selection.composing){var e=this.quill.getSelection();this.quill.scroll.descendants(b).forEach(function(e){e.highlight(t.options.highlight)}),this.quill.update(p.default.sources.SILENT),null!=e&&this.quill.setSelection(e,p.default.sources.SILENT)}}}]),e}(d.default);m.DEFAULTS={highlight:function(){return null==window.hljs?null:function(t){var e=window.hljs.highlightAuto(t);return e.value}}()},e.CodeBlock=b,e.CodeToken=g,e.default=m},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t,e,n){var r=document.createElement("button");r.setAttribute("type","button"),r.classList.add("ql-"+e),null!=n&&(r.value=n),t.appendChild(r)}function u(t,e){Array.isArray(e[0])||(e=[e]),e.forEach(function(e){var n=document.createElement("span");n.classList.add("ql-formats"),e.forEach(function(t){if("string"==typeof t)s(n,t);else{var e=Object.keys(t)[0],r=t[e];Array.isArray(r)?c(n,e,r):s(n,e,r)}}),t.appendChild(n)})}function c(t,e,n){var r=document.createElement("select");r.classList.add("ql-"+e),n.forEach(function(t){var e=document.createElement("option");t!==!1?e.setAttribute("value",t):e.setAttribute("selected","selected"),r.appendChild(e)}),t.appendChild(r)}Object.defineProperty(e,"__esModule",{value:!0}),e.addControls=e.default=void 0;var f=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),h=n(20),d=r(h),y=n(2),v=r(y),b=n(18),g=r(b),m=n(37),_=r(m),O=n(39),w=r(O),x=(0,_.default)("quill:toolbar"),k=function(t){function e(t,n){i(this,e);var r=l(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if(Array.isArray(r.options.container)){var o=document.createElement("div");u(o,r.options.container),t.container.parentNode.insertBefore(o,t.container),r.container=o}else"string"==typeof r.options.container?r.container=document.querySelector(r.options.container):r.container=r.options.container;if(!(r.container instanceof HTMLElement)){var a;return a=x.error("Container required for toolbar",r.options),l(r,a)}return r.container.classList.add("ql-toolbar"),r.controls=[],r.handlers={},Object.keys(r.options.handlers).forEach(function(t){r.addHandler(t,r.options.handlers[t])}),[].forEach.call(r.container.querySelectorAll("button, select"),function(t){r.attach(t)}),r.quill.on(g.default.events.EDITOR_CHANGE,function(t,e){t===g.default.events.SELECTION_CHANGE&&r.update(e)}),r.quill.on(g.default.events.SCROLL_OPTIMIZE,function(){var t=r.quill.selection.getRange(),e=f(t,1),n=e[0];r.update(n)}),r}return a(e,t),p(e,[{key:"addHandler",value:function(t,e){this.handlers[t]=e;
12
+ }},{key:"attach",value:function(t){var e=this,n=[].find.call(t.classList,function(t){return 0===t.indexOf("ql-")});if(n){if(n=n.slice("ql-".length),"BUTTON"===t.tagName&&t.setAttribute("type","button"),null==this.handlers[n]){if(null!=this.quill.scroll.whitelist&&null==this.quill.scroll.whitelist[n])return void x.warn("ignoring attaching to disabled format",n,t);if(null==v.default.query(n))return void x.warn("ignoring attaching to nonexistent format",n,t)}var r="SELECT"===t.tagName?"change":"click";t.addEventListener(r,function(r){var i=void 0;if("SELECT"===t.tagName){if(t.selectedIndex<0)return;var l=t.options[t.selectedIndex];i=!l.hasAttribute("selected")&&(l.value||!1)}else i=!t.classList.contains("ql-active")&&(t.value||!t.hasAttribute("value")),r.preventDefault();e.quill.focus();var a=e.quill.selection.getRange(),s=f(a,1),u=s[0];if(null!=e.handlers[n])e.handlers[n].call(e,i);else if(v.default.query(n).prototype instanceof v.default.Embed){if(i=prompt("Enter "+n),!i)return;e.quill.updateContents((new d.default).retain(u.index).delete(u.length).insert(o({},n,i)),g.default.sources.USER)}else e.quill.format(n,i,g.default.sources.USER);e.update(u)}),this.controls.push([n,t])}}},{key:"update",value:function(t){var e=null==t?{}:this.quill.getFormat(t);this.controls.forEach(function(n){var r=f(n,2),o=r[0],i=r[1];if("SELECT"===i.tagName){var l=void 0;if(null==t)l=null;else if(null==e[o])l=i.querySelector("option[selected]");else if(!Array.isArray(e[o])){var a=e[o];"string"==typeof a&&(a=a.replace(/\"/g,'\\"')),l=i.querySelector('option[value="'+a+'"]')}null==l?(i.value="",i.selectedIndex=-1):l.selected=!0}else if(null==t)i.classList.remove("ql-active");else if(i.hasAttribute("value")){var s=e[o]===i.getAttribute("value")||null!=e[o]&&e[o].toString()===i.getAttribute("value")||null==e[o]&&!i.getAttribute("value");i.classList.toggle("ql-active",s)}else i.classList.toggle("ql-active",null!=e[o])})}}]),e}(w.default);k.DEFAULTS={},k.DEFAULTS={container:null,handlers:{clean:function(){var t=this,e=this.quill.getSelection();if(null!=e)if(0==e.length){var n=this.quill.getFormat();Object.keys(n).forEach(function(e){null!=v.default.query(e,v.default.Scope.INLINE)&&t.quill.format(e,!1)})}else this.quill.removeFormat(e,g.default.sources.USER)},direction:function(t){var e=this.quill.getFormat().align;"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),this.quill.format("direction",t,g.default.sources.USER)},indent:function t(e){var n=this.quill.getSelection(),r=this.quill.getFormat(n),t=parseInt(r.indent||0);if("+1"===e||"-1"===e){var o="+1"===e?1:-1;"rtl"===r.direction&&(o*=-1),this.quill.format("indent",t+o,g.default.sources.USER)}},link:function(t){t===!0&&(t=prompt("Enter link URL:")),this.quill.format("link",t,g.default.sources.USER)},list:function(t){var e=this.quill.getSelection(),n=this.quill.getFormat(e);"check"===t?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,g.default.sources.USER):this.quill.format("list","unchecked",g.default.sources.USER):this.quill.format("list",t,g.default.sources.USER)}}},e.default=k,e.addControls=u},function(t,e,n){"use strict";t.exports={align:{"":n(69),center:n(70),right:n(71),justify:n(72)},background:n(73),blockquote:n(74),bold:n(75),clean:n(76),code:n(77),"code-block":n(77),color:n(78),direction:{"":n(79),rtl:n(80)},float:{center:n(81),full:n(82),left:n(83),right:n(84)},formula:n(85),header:{1:n(86),2:n(87)},italic:n(88),image:n(89),indent:{"+1":n(90),"-1":n(91)},link:n(92),list:{ordered:n(93),bullet:n(94),check:n(95)},script:{sub:n(96),super:n(97)},strike:n(98),underline:n(99),video:n(100)}},function(t,e){t.exports='<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>'},function(t,e){t.exports='<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>'},function(t,e){t.exports='<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>'},function(t,e){t.exports='<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>'},function(t,e){t.exports='<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>'},function(t,e){t.exports='<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>'},function(t,e){t.exports='<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>'},function(t,e){t.exports='<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>'},function(t,e){t.exports='<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>'},function(t,e){t.exports='<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>'},function(t,e){t.exports='<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>'},function(t,e){t.exports='<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>'},function(t,e){t.exports='<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>'},function(t,e){t.exports='<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>'},function(t,e){t.exports='<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>'},function(t,e){t.exports='<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>'},function(t,e){t.exports='<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>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=3 y1=4 y2=14></line> <line class=ql-stroke x1=11 x2=11 y1=4 y2=14></line> <line class=ql-stroke x1=11 x2=3 y1=9 y2=9></line> <line class="ql-stroke ql-thin" x1=13.5 x2=15.5 y1=14.5 y2=14.5></line> <path class=ql-fill d=M14.5,15a0.5,0.5,0,0,1-.5-0.5V12.085l-0.276.138A0.5,0.5,0,0,1,13.053,12c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,15,11.5v3A0.5,0.5,0,0,1,14.5,15Z></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=3 y1=4 y2=14></line> <line class=ql-stroke x1=11 x2=11 y1=4 y2=14></line> <line class=ql-stroke x1=11 x2=3 y1=9 y2=9></line> <path class="ql-stroke ql-thin" d=M15.5,14.5h-2c0-.234,1.85-1.076,1.85-2.234a0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(t,e){t.exports='<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>'},function(t,e){t.exports='<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>'},function(t,e){t.exports='<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>'},function(t,e){t.exports='<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>'},function(t,e){t.exports='<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>'},function(t,e){t.exports='<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>'},function(t,e){t.exports='<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>'},function(t,e){t.exports='<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>'},function(t,e){t.exports='<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>'},function(t,e){t.exports='<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>'},function(t,e){t.exports='<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>'},function(t,e){t.exports='<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>'},function(t,e){t.exports='<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>'},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(102),s=r(a),u=function(){function t(e){var n=this;o(this,t),this.select=e,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){n.container.classList.toggle("ql-expanded")}),this.select.addEventListener("change",this.update.bind(this))}return l(t,[{key:"buildItem",value:function(t){var e=this,n=document.createElement("span");return n.classList.add("ql-picker-item"),t.hasAttribute("value")&&n.setAttribute("data-value",t.getAttribute("value")),t.textContent&&n.setAttribute("data-label",t.textContent),n.addEventListener("click",function(){e.selectItem(n,!0)}),n}},{key:"buildLabel",value:function(){var t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML=s.default,this.container.appendChild(t),t}},{key:"buildOptions",value:function(){var t=this,e=document.createElement("span");e.classList.add("ql-picker-options"),[].slice.call(this.select.options).forEach(function(n){var r=t.buildItem(n);e.appendChild(r),n.hasAttribute("selected")&&t.selectItem(r)}),this.container.appendChild(e)}},{key:"buildPicker",value:function(){var t=this;[].slice.call(this.select.attributes).forEach(function(e){t.container.setAttribute(e.name,e.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"close",value:function(){this.container.classList.remove("ql-expanded")}},{key:"selectItem",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(t!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=t&&(t.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(t.parentNode.children,t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),e))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"==typeof Event?"undefined":i(Event))){var r=document.createEvent("Event");r.initEvent("change",!0,!0),this.select.dispatchEvent(r)}this.close()}}},{key:"update",value:function(){var t=void 0;if(this.select.selectedIndex>-1){var e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(e)}else this.selectItem(null);var n=null!=t&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),t}();e.default=u},function(t,e){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>'},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;if(void 0!==l)return l.call(r)},u=n(101),c=r(u),f=function(t){function e(t,n){o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.label.innerHTML=n,r.container.classList.add("ql-color-picker"),[].slice.call(r.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(t){t.classList.add("ql-primary")}),r}return l(e,t),a(e,[{key:"buildItem",value:function(t){var n=s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"buildItem",this).call(this,t);return n.style.backgroundColor=t.getAttribute("value")||"",n}},{key:"selectItem",value:function(t,n){s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"selectItem",this).call(this,t,n);var r=this.label.querySelector(".ql-color-label"),o=t?t.getAttribute("data-value")||"":"";r&&("line"===r.tagName?r.style.stroke=o:r.style.fill=o)}}]),e}(c.default);e.default=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;if(void 0!==l)return l.call(r)},u=n(101),c=r(u),f=function(t){function e(t,n){o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.container.classList.add("ql-icon-picker"),[].forEach.call(r.container.querySelectorAll(".ql-picker-item"),function(t){t.innerHTML=n[t.getAttribute("data-value")||""]}),r.defaultItem=r.container.querySelector(".ql-selected"),r.selectItem(r.defaultItem),r}return l(e,t),a(e,[{key:"selectItem",value:function(t,n){s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"selectItem",this).call(this,t,n),t=t||this.defaultItem,this.label.innerHTML=t.innerHTML}}]),e}(c.default);e.default=f},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(e,r){var o=this;n(this,t),this.quill=e,this.boundsContainer=r||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root.addEventListener("scroll",function(){o.root.style.marginTop=-1*o.quill.root.scrollTop+"px"}),this.hide()}return r(t,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(t){var e=t.left+t.width/2-this.root.offsetWidth/2,n=t.bottom+this.quill.root.scrollTop;this.root.style.left=e+"px",this.root.style.top=n+"px",this.root.classList.remove("ql-flip");var r=this.boundsContainer.getBoundingClientRect(),o=this.root.getBoundingClientRect(),i=0;if(o.right>r.right&&(i=r.right-o.right,this.root.style.left=e+i+"px"),o.left<r.left&&(i=r.left-o.left,this.root.style.left=e+i+"px"),o.bottom>r.bottom){var l=o.bottom-o.top,a=r.bottom-o.bottom-l;this.root.style.top=n+a+"px",this.root.classList.add("ql-flip")}return i}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),t}();e.default=o},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BubbleTooltip=void 0;var a=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;if(void 0!==l)return l.call(r)},s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(25),c=r(u),f=n(35),p=r(f),h=n(107),d=r(h),y=n(40),v=n(68),b=r(v),g=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],m=function(t){function e(t,n){o(this,e),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=g);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.quill.container.classList.add("ql-bubble"),r}return l(e,t),s(e,[{key:"extendToolbar",value:function(t){this.tooltip=new _(this.quill,this.options.bounds),this.tooltip.root.appendChild(t.container),this.buildButtons([].slice.call(t.container.querySelectorAll("button")),b.default),this.buildPickers([].slice.call(t.container.querySelectorAll("select")),b.default)}}]),e}(d.default);m.DEFAULTS=(0,c.default)(!0,{},d.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(t){t?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var _=function(t){function e(t,n){o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.quill.on(p.default.events.EDITOR_CHANGE,function(t,e,n,o){if(t===p.default.events.SELECTION_CHANGE)if(null!=e&&e.length>0&&o===p.default.sources.USER){r.show(),r.root.style.left="0px",r.root.style.width="",r.root.style.width=r.root.offsetWidth+"px";var i=r.quill.getLines(e.index,e.length);if(1===i.length)r.position(r.quill.getBounds(e));else{var l=i[i.length-1],a=r.quill.getIndex(l),s=Math.min(l.length()-1,e.index+e.length-a),u=r.quill.getBounds(new y.Range(a,s));r.position(u)}}else document.activeElement!==r.textbox&&r.quill.hasFocus()&&r.hide()}),r}return l(e,t),s(e,[{key:"listen",value:function(){var t=this;a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){t.root.classList.remove("ql-editing")}),this.quill.on(p.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!t.root.classList.contains("ql-hidden")){var e=t.quill.getSelection();null!=e&&t.position(t.quill.getBounds(e))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(t){var n=a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"position",this).call(this,t),r=this.root.querySelector(".ql-tooltip-arrow");return r.style.marginLeft="",0===n?n:void(r.style.marginLeft=-1*n-r.offsetWidth/2+"px")}}]),e}(h.BaseTooltip);_.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),e.BubbleTooltip=_,e.default=m},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e);
13
+ }function a(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.forEach(function(e){var r=document.createElement("option");e===n?r.setAttribute("selected","selected"):r.setAttribute("value",e),t.appendChild(r)})}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BaseTooltip=void 0;var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;if(void 0!==l)return l.call(r)},c=n(25),f=r(c),p=n(20),h=r(p),d=n(35),y=r(d),v=n(52),b=r(v),g=n(41),m=r(g),_=n(103),O=r(_),w=n(104),x=r(w),k=n(101),E=r(k),j=n(105),A=r(j),N=[!1,"center","right","justify"],q=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],T=[!1,"serif","monospace"],P=["1","2","3",!1],S=["small",!1,"large","huge"],L=function(t){function e(t,n){o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n)),l=function e(n){return document.body.contains(t.root)?(null==r.tooltip||r.tooltip.root.contains(n.target)||document.activeElement===r.tooltip.textbox||r.quill.hasFocus()||r.tooltip.hide(),void(null!=r.pickers&&r.pickers.forEach(function(t){t.container.contains(n.target)||t.close()}))):document.body.removeEventListener("click",e)};return document.body.addEventListener("click",l),r}return l(e,t),s(e,[{key:"addModule",value:function(t){var n=u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"addModule",this).call(this,t);return"toolbar"===t&&this.extendToolbar(n),n}},{key:"buildButtons",value:function(t,e){t.forEach(function(t){var n=t.getAttribute("class")||"";n.split(/\s+/).forEach(function(n){if(n.startsWith("ql-")&&(n=n.slice("ql-".length),null!=e[n]))if("direction"===n)t.innerHTML=e[n][""]+e[n].rtl;else if("string"==typeof e[n])t.innerHTML=e[n];else{var r=t.value||"";null!=r&&e[n][r]&&(t.innerHTML=e[n][r])}})})}},{key:"buildPickers",value:function(t,e){var n=this;this.pickers=t.map(function(t){if(t.classList.contains("ql-align"))return null==t.querySelector("option")&&a(t,N),new x.default(t,e.align);if(t.classList.contains("ql-background")||t.classList.contains("ql-color")){var n=t.classList.contains("ql-background")?"background":"color";return null==t.querySelector("option")&&a(t,q,"background"===n?"#ffffff":"#000000"),new O.default(t,e[n])}return null==t.querySelector("option")&&(t.classList.contains("ql-font")?a(t,T):t.classList.contains("ql-header")?a(t,P):t.classList.contains("ql-size")&&a(t,S)),new E.default(t)});var r=function(){n.pickers.forEach(function(t){t.update()})};this.quill.on(y.default.events.SELECTION_CHANGE,r).on(y.default.events.SCROLL_OPTIMIZE,r)}}]),e}(m.default);L.DEFAULTS=(0,f.default)(!0,{},m.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var t=this,e=this.container.querySelector("input.ql-image[type=file]");null==e&&(e=document.createElement("input"),e.setAttribute("type","file"),e.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon, image/svg+xml"),e.classList.add("ql-image"),e.addEventListener("change",function(){if(null!=e.files&&null!=e.files[0]){var n=new FileReader;n.onload=function(n){var r=t.quill.getSelection(!0);t.quill.updateContents((new h.default).retain(r.index).delete(r.length).insert({image:n.target.result}),y.default.sources.USER),e.value=""},n.readAsDataURL(e.files[0])}}),this.container.appendChild(e)),e.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var C=function(t){function e(t,n){o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.textbox=r.root.querySelector('input[type="text"]'),r.listen(),r}return l(e,t),s(e,[{key:"listen",value:function(){var t=this;this.textbox.addEventListener("keydown",function(e){b.default.match(e,"enter")?(t.save(),e.preventDefault()):b.default.match(e,"escape")&&(t.cancel(),e.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=e?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+t)||""),this.root.setAttribute("data-mode",t)}},{key:"restoreFocus",value:function(){var t=this.quill.root.scrollTop;this.quill.focus(),this.quill.root.scrollTop=t}},{key:"save",value:function(){var t=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var e=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",t,y.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,y.default.sources.USER)),this.quill.root.scrollTop=e;break;case"video":var n=t.match(/^(https?):\/\/(www\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(https?):\/\/(www\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);n?t=n[1]+"://www.youtube.com/embed/"+n[3]+"?showinfo=0":(n=t.match(/^(https?):\/\/(www\.)?vimeo\.com\/(\d+)/))&&(t=n[1]+"://player.vimeo.com/video/"+n[3]+"/");case"formula":var r=this.quill.getSelection(!0),o=r.index+r.length;null!=r&&(this.quill.insertEmbed(o,this.root.getAttribute("data-mode"),t,y.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(o+1," ",y.default.sources.USER),this.quill.setSelection(o+2,y.default.sources.USER))}this.textbox.value="",this.hide()}}]),e}(A.default);e.BaseTooltip=C,e.default=L},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;if(void 0!==l)return l.call(r)},u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=n(25),f=r(c),p=n(35),h=r(p),d=n(107),y=r(d),v=n(59),b=r(v),g=n(40),m=n(68),_=r(m),O=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],w=function(t){function e(t,n){o(this,e),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=O);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.quill.container.classList.add("ql-snow"),r}return l(e,t),u(e,[{key:"extendToolbar",value:function(t){t.container.classList.add("ql-snow"),this.buildButtons([].slice.call(t.container.querySelectorAll("button")),_.default),this.buildPickers([].slice.call(t.container.querySelectorAll("select")),_.default),this.tooltip=new x(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(e,n){t.handlers.link.call(t,!n.format.link)})}}]),e}(y.default);w.DEFAULTS=(0,f.default)(!0,{},y.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(t){if(t){var e=this.quill.getSelection();if(null==e||0==e.length)return;var n=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(n)&&0!==n.indexOf("mailto:")&&(n="mailto:"+n);var r=this.quill.theme.tooltip;r.edit("link",n)}else this.quill.format("link",!1)}}}}});var x=function(t){function e(t,n){o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.preview=r.root.querySelector("a.ql-preview"),r}return l(e,t),u(e,[{key:"listen",value:function(){var t=this;s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(e){t.root.classList.contains("ql-editing")?t.save():t.edit("link",t.preview.textContent),e.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(e){null!=t.linkRange&&(t.restoreFocus(),t.quill.formatText(t.linkRange,"link",!1,h.default.sources.USER),delete t.linkRange),e.preventDefault(),t.hide()}),this.quill.on(h.default.events.SELECTION_CHANGE,function(e,n,r){if(null!=e){if(0===e.length&&r===h.default.sources.USER){var o=t.quill.scroll.descendant(b.default,e.index),i=a(o,2),l=i[0],s=i[1];if(null!=l){t.linkRange=new g.Range(e.index-s,l.length());var u=b.default.formats(l.domNode);return t.preview.textContent=u,t.preview.setAttribute("href",u),t.show(),void t.position(t.quill.getBounds(t.linkRange))}}else delete t.linkRange;t.hide()}})}},{key:"show",value:function(){s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),e}(d.BaseTooltip);x.TEMPLATE=['<a class="ql-preview" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),e.default=w}])});
14
+ //# sourceMappingURL=quill.min.js.map
@@ -1,5 +1,5 @@
1
1
  module Quilljs
2
2
  module Rails
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quilljs-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abhinav Mathur
@@ -81,6 +81,7 @@ files:
81
81
  - bin/setup
82
82
  - lib/quilljs/rails.rb
83
83
  - lib/quilljs/rails/version.rb
84
+ - quilljs-rails-0.0.1.gem
84
85
  - quilljs-rails.gemspec
85
86
  - test/quilljs/rails_test.rb
86
87
  - test/test_helper.rb