freemium-ui 2.0.91 → 2.1.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Accordion-Ccv-p2G6.js +134 -0
- package/lib/Accordion.d.ts +56 -0
- package/lib/Accordion.js +7 -0
- package/lib/Alert-BtEbkVK1.js +52 -0
- package/lib/Alert.d.ts +66 -0
- package/lib/Alert.js +6 -0
- package/lib/AutoComplete-DF33_uur.js +608 -0
- package/lib/AutoComplete.d.ts +105 -0
- package/lib/AutoComplete.js +14 -0
- package/lib/BoxedRadio-D5Kiintm.js +75 -0
- package/lib/BoxedRadio.d.ts +61 -0
- package/lib/BoxedRadio.js +10 -0
- package/lib/Button-Bd1O8_k7.js +34 -0
- package/lib/Button.d.ts +34 -0
- package/lib/Button.js +2 -0
- package/lib/ButtonDropdown-BZvCwUDe.js +37 -0
- package/lib/ButtonDropdown.d.ts +82 -0
- package/lib/ButtonDropdown.js +11 -0
- package/lib/Calendar-C0xW_pPO.js +32 -0
- package/lib/Calendar.d.ts +25 -0
- package/lib/Calendar.js +2 -0
- package/lib/Checkbox-By1CgFUJ.js +66 -0
- package/lib/Checkbox.d.ts +28 -0
- package/lib/Checkbox.js +7 -0
- package/lib/ChevronUp-BWiG3XYd.js +7 -0
- package/lib/Combination-AmN1Cqrf.js +210 -0
- package/lib/Confirmation-49GhlyzQ.js +66 -0
- package/lib/Confirmation.d.ts +72 -0
- package/lib/Confirmation.js +8 -0
- package/lib/Cross-CIeKwtq6.js +7 -0
- package/lib/CustomizeColumns-BSF8e_we.js +865 -0
- package/lib/Drawer-CnmXL5_B.js +33 -0
- package/lib/Drawer.d.ts +50 -0
- package/lib/Drawer.js +8 -0
- package/lib/Dropdown-D59u6zOt.js +89 -0
- package/lib/Dropdown.d.ts +162 -0
- package/lib/Dropdown.js +15 -0
- package/lib/ErrorText-Uvye7uop.js +8 -0
- package/lib/Info-BsILbpCG.js +9 -0
- package/lib/Input.d.ts +66 -0
- package/lib/Input.js +5 -0
- package/lib/Loader-b8lHCp4N.js +13 -0
- package/lib/Loader.d.ts +21 -0
- package/lib/Loader.js +3 -0
- package/lib/Menu-DoE00Mg-.js +19 -0
- package/lib/Menu.d.ts +80 -0
- package/lib/Menu.js +11 -0
- package/lib/Modal-D5RJHnbn.js +51 -0
- package/lib/Modal.d.ts +51 -0
- package/lib/Modal.js +7 -0
- package/lib/MultiSelectDropdown-DblSkVpv.js +84 -0
- package/lib/MultiSelectDropdown.d.ts +116 -0
- package/lib/MultiSelectDropdown.js +14 -0
- package/lib/Pickers.d.ts +94 -0
- package/lib/Pickers.js +16 -0
- package/lib/Popover-BU73-g73.js +90 -0
- package/lib/Popover.d.ts +94 -0
- package/lib/Popover.js +8 -0
- package/lib/QuillEditor.d.ts +29 -0
- package/lib/QuillEditor.js +3369 -0
- package/lib/Radio.d.ts +69 -0
- package/lib/Radio.js +10 -0
- package/lib/RadioGroup-DM_Y48_b.js +42 -0
- package/lib/Reorder-DUSHsq7i.js +697 -0
- package/lib/Reorder.d.ts +36 -0
- package/lib/Reorder.js +5 -0
- package/lib/SortDropdown-B0SSCJX6.js +17 -0
- package/lib/SortDropdown.d.ts +47 -0
- package/lib/SortDropdown.js +10 -0
- package/lib/Table-cidceyn5.js +117 -0
- package/lib/Table.d.ts +95 -0
- package/lib/Table.js +18 -0
- package/lib/Tabs-j1c7ybY-.js +50 -0
- package/lib/Tabs.d.ts +68 -0
- package/lib/Tabs.js +6 -0
- package/lib/Tag-Cu75ReQP.js +49 -0
- package/lib/Tag.d.ts +50 -0
- package/lib/Tag.js +4 -0
- package/lib/TextArea--fiwZ_QM.js +98 -0
- package/lib/ThemeProvider-bWL8hyYA.js +7 -0
- package/lib/ThemeProvider.d.ts +158 -0
- package/lib/ThemeProvider.js +9 -0
- package/lib/TickIcon-BJqSAG4_.js +7 -0
- package/lib/TimePicker-7Uqb3xJn.js +6598 -0
- package/lib/Toast.d.ts +61 -0
- package/lib/Toast.js +10 -0
- package/lib/ToastProvider-CMk1PSzB.js +264 -0
- package/lib/Toggle-BGV7Nc6t.js +59 -0
- package/lib/Toggle.d.ts +35 -0
- package/lib/Toggle.js +6 -0
- package/lib/Tooltip-DU_ATFRB.js +127 -0
- package/lib/Tooltip.d.ts +53 -0
- package/lib/Tooltip.js +8 -0
- package/lib/Typography-BcAppjDF.js +11 -0
- package/lib/Typography.d.ts +20 -0
- package/lib/Typography.js +2 -0
- package/lib/WorkspaceTable-BV5zccyt.js +100 -0
- package/lib/WorkspaceTable.d.ts +85 -0
- package/lib/WorkspaceTable.js +18 -0
- package/lib/_commonjsHelpers-fGXyuM93.js +4 -0
- package/lib/allPaths-DKtiSqHL.js +19 -0
- package/lib/allPathsLoader-Drb6xO2O.js +5 -0
- package/lib/index-B9EcTy5B.js +46 -0
- package/lib/index-BPxkexqj.js +60 -0
- package/lib/index-BROhcSiX.js +8 -0
- package/lib/index-BT1o947S.js +8 -0
- package/lib/index-BY9lf-do.js +2 -0
- package/lib/index-BdTXfGkV.js +24 -0
- package/lib/index-BnDw8kbT.js +135 -0
- package/lib/index-BrF1HKA1.js +338 -0
- package/lib/index-BxNZ3C71.js +4 -0
- package/lib/index-ByHJlnsx.js +26 -0
- package/lib/index-COoRg_pp.js +55 -0
- package/lib/index-CeIB4COQ.js +10 -0
- package/lib/index-Cjkk7z9c.js +19 -0
- package/lib/index-D6iTv28r.js +607 -0
- package/lib/index-D8E8s0tV.js +60 -0
- package/lib/index-DtILdK5l.js +48 -0
- package/lib/index-DtzckyT3.js +4 -0
- package/lib/index-Dy5ztCxm.js +27 -0
- package/lib/index-KMLwCm58.js +607 -0
- package/lib/index-_WvIFKTM.js +6 -0
- package/lib/index.d.ts +1826 -1842
- package/lib/index.js +54 -17049
- package/lib/isTypedArray-DN-UDJh5.js +89 -0
- package/lib/keyframes-PnzFl0I5.js +20 -0
- package/lib/package.json +133 -3
- package/lib/rollup.config.d.ts.map +1 -0
- package/lib/splitPathsBySizeLoader-Cm_vHo5k.js +23 -0
- package/lib/styled-components.browser.esm-Bq2p-e5F.js +479 -0
- package/lib/styles-BbwNLGy3.js +177 -0
- package/lib/styles-BlCCKAZq.js +1192 -0
- package/lib/use-toasts-GqvPVmSy.js +5 -0
- package/package.json +148 -12
- package/buildspec.yml +0 -22
- package/freemium-ui-2.0.91.tgz +0 -0
- package/lib/index.cjs.js +0 -17225
|
@@ -0,0 +1,3369 @@
|
|
|
1
|
+
import t,{useState as e,useEffect as n}from"react"
|
|
2
|
+
;import{c as r,g as o}from"./_commonjsHelpers-fGXyuM93.js"
|
|
3
|
+
;import i from"react-dom"
|
|
4
|
+
;import{_ as l,a,b as s,c as u,d as c,e as f,i as p,f as d,g as h,h as y,j as v,k as b,l as g,m}from"./isTypedArray-DN-UDJh5.js"
|
|
5
|
+
|
|
6
|
+
;import{f as _,_ as O,u as x,b as w}from"./styled-components.browser.esm-Bq2p-e5F.js"
|
|
7
|
+
;import{E}from"./ErrorText-Uvye7uop.js"
|
|
8
|
+
;import{A as k}from"./Accordion-Ccv-p2G6.js"
|
|
9
|
+
;import{P as N}from"./Popover-BU73-g73.js";import{T as j}from"./Tag-Cu75ReQP.js"
|
|
10
|
+
;import"./index-ByHJlnsx.js";import"./index-BdTXfGkV.js"
|
|
11
|
+
;import"./index-Cjkk7z9c.js";import"./index-CeIB4COQ.js"
|
|
12
|
+
;import"./index-Dy5ztCxm.js";import"./index-BxNZ3C71.js"
|
|
13
|
+
;import"./index-BY9lf-do.js";import"./keyframes-PnzFl0I5.js"
|
|
14
|
+
;import"./ChevronUp-BWiG3XYd.js";import"./index-D8E8s0tV.js"
|
|
15
|
+
;import"./index-BnDw8kbT.js";import"./index-COoRg_pp.js"
|
|
16
|
+
;import"./Combination-AmN1Cqrf.js";import"./index-BrF1HKA1.js"
|
|
17
|
+
;import"./index-BROhcSiX.js";import"./Cross-CIeKwtq6.js";var A=l;var q=l,T=a,S=s
|
|
18
|
+
;var P=l,C=function(){this.__data__=new A,this.size=0},L=function(t){
|
|
19
|
+
var e=this.__data__,n=e.delete(t);return this.size=e.size,n},M=function(t){
|
|
20
|
+
return this.__data__.get(t)},R=function(t){return this.__data__.has(t)
|
|
21
|
+
},I=function(t,e){var n=this.__data__;if(n instanceof q){var r=n.__data__
|
|
22
|
+
;if(!T||r.length<199)return r.push([t,e]),this.size=++n.size,this
|
|
23
|
+
;n=this.__data__=new S(r)}return n.set(t,e),this.size=n.size,this}
|
|
24
|
+
;function B(t){var e=this.__data__=new P(t);this.size=e.size}
|
|
25
|
+
B.prototype.clear=C,
|
|
26
|
+
B.prototype.delete=L,B.prototype.get=M,B.prototype.has=R,B.prototype.set=I
|
|
27
|
+
;var D=B;var U=s,F=function(t){
|
|
28
|
+
return this.__data__.set(t,"__lodash_hash_undefined__"),this},H=function(t){
|
|
29
|
+
return this.__data__.has(t)};function z(t){var e=-1,n=null==t?0:t.length
|
|
30
|
+
;for(this.__data__=new U;++e<n;)this.add(t[e])}
|
|
31
|
+
z.prototype.add=z.prototype.push=F,z.prototype.has=H;var K=z,V=function(t,e){
|
|
32
|
+
for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1
|
|
33
|
+
},Z=function(t,e){return t.has(e)};var W=function(t,e,n,r,o,i){
|
|
34
|
+
var l=1&n,a=t.length,s=e.length;if(a!=s&&!(l&&s>a))return!1
|
|
35
|
+
;var u=i.get(t),c=i.get(e);if(u&&c)return u==e&&c==t
|
|
36
|
+
;var f=-1,p=!0,d=2&n?new K:void 0;for(i.set(t,e),i.set(e,t);++f<a;){
|
|
37
|
+
var h=t[f],y=e[f];if(r)var v=l?r(y,h,f,e,t,i):r(h,y,f,t,e,i);if(void 0!==v){
|
|
38
|
+
if(v)continue;p=!1;break}if(d){if(!V(e,(function(t,e){
|
|
39
|
+
if(!Z(d,e)&&(h===t||o(h,t,n,r,i)))return d.push(e)}))){p=!1;break}
|
|
40
|
+
}else if(h!==y&&!o(h,y,n,r,i)){p=!1;break}}return i.delete(t),i.delete(e),p}
|
|
41
|
+
;var Y=u.Uint8Array,G=f,$=W,X=function(t){var e=-1,n=Array(t.size)
|
|
42
|
+
;return t.forEach((function(t,r){n[++e]=[r,t]})),n},Q=function(t){
|
|
43
|
+
var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n
|
|
44
|
+
},J=c?c.prototype:void 0,tt=J?J.valueOf:void 0;var et=function(t,e,n,r,o,i,l){
|
|
45
|
+
switch(n){case"[object DataView]":
|
|
46
|
+
if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1
|
|
47
|
+
;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":
|
|
48
|
+
return!(t.byteLength!=e.byteLength||!i(new Y(t),new Y(e)))
|
|
49
|
+
;case"[object Boolean]":case"[object Date]":case"[object Number]":
|
|
50
|
+
return G(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message
|
|
51
|
+
;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":
|
|
52
|
+
var a=X;case"[object Set]":var s=1&r;if(a||(a=Q),t.size!=e.size&&!s)return!1
|
|
53
|
+
;var u=l.get(t);if(u)return u==e;r|=2,l.set(t,e);var c=$(a(t),a(e),r,o,i,l)
|
|
54
|
+
;return l.delete(t),c;case"[object Symbol]":if(tt)return tt.call(t)==tt.call(e)}
|
|
55
|
+
return!1};var nt=function(t,e){
|
|
56
|
+
for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t},rt=p
|
|
57
|
+
;var ot=function(t,e,n){var r=e(t);return rt(t)?r:nt(r,n(t))}
|
|
58
|
+
;var it=function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){
|
|
59
|
+
var l=t[n];e(l,n,t)&&(i[o++]=l)}return i},lt=function(){return[]
|
|
60
|
+
},at=Object.prototype.propertyIsEnumerable,st=Object.getOwnPropertySymbols,ut=st?function(t){
|
|
61
|
+
return null==t?[]:(t=Object(t),it(st(t),(function(e){return at.call(t,e)})))}:lt
|
|
62
|
+
;var ct=/^(?:0|[1-9]\d*)$/;var ft=function(t,e){
|
|
63
|
+
for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r
|
|
64
|
+
},pt=d,dt=p,ht=h,yt=function(t,e){var n=typeof t
|
|
65
|
+
;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&ct.test(t))&&t>-1&&t%1==0&&t<e
|
|
66
|
+
},vt=y,bt=Object.prototype.hasOwnProperty;var gt=function(t,e){
|
|
67
|
+
var n=dt(t),r=!n&&pt(t),o=!n&&!r&&ht(t),i=!n&&!r&&!o&&vt(t),l=n||r||o||i,a=l?ft(t.length,String):[],s=a.length
|
|
68
|
+
;for(var u in t)!e&&!bt.call(t,u)||l&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||yt(u,s))||a.push(u)
|
|
69
|
+
;return a},mt=v,_t=b;var Ot=ot,xt=ut,wt=function(t){return _t(t)?gt(t):mt(t)}
|
|
70
|
+
;var Et=function(t){return Ot(t,wt,xt)},kt=Object.prototype.hasOwnProperty
|
|
71
|
+
;var Nt=D,jt=W,At=et,qt=function(t,e,n,r,o,i){var l=1&n,a=Et(t),s=a.length
|
|
72
|
+
;if(s!=Et(e).length&&!l)return!1;for(var u=s;u--;){var c=a[u]
|
|
73
|
+
;if(!(l?c in e:kt.call(e,c)))return!1}var f=i.get(t),p=i.get(e)
|
|
74
|
+
;if(f&&p)return f==e&&p==t;var d=!0;i.set(t,e),i.set(e,t);for(var h=l;++u<s;){
|
|
75
|
+
var y=t[c=a[u]],v=e[c];if(r)var b=l?r(v,y,c,e,t,i):r(y,v,c,t,e,i)
|
|
76
|
+
;if(!(void 0===b?y===v||o(y,v,n,r,i):b)){d=!1;break}h||(h="constructor"==c)}
|
|
77
|
+
if(d&&!h){var g=t.constructor,m=e.constructor
|
|
78
|
+
;g==m||!("constructor"in t)||!("constructor"in e)||"function"==typeof g&&g instanceof g&&"function"==typeof m&&m instanceof m||(d=!1)
|
|
79
|
+
}return i.delete(t),i.delete(e),d
|
|
80
|
+
},Tt=g,St=p,Pt=h,Ct=y,Lt="[object Arguments]",Mt="[object Array]",Rt="[object Object]",It=Object.prototype.hasOwnProperty
|
|
81
|
+
;var Bt=function(t,e,n,r,o,i){
|
|
82
|
+
var l=St(t),a=St(e),s=l?Mt:Tt(t),u=a?Mt:Tt(e),c=(s=s==Lt?Rt:s)==Rt,f=(u=u==Lt?Rt:u)==Rt,p=s==u
|
|
83
|
+
;if(p&&Pt(t)){if(!Pt(e))return!1;l=!0,c=!1}
|
|
84
|
+
if(p&&!c)return i||(i=new Nt),l||Ct(t)?jt(t,e,n,r,o,i):At(t,e,s,n,r,o,i)
|
|
85
|
+
;if(!(1&n)){var d=c&&It.call(t,"__wrapped__"),h=f&&It.call(e,"__wrapped__")
|
|
86
|
+
;if(d||h){var y=d?t.value():t,v=h?e.value():e;return i||(i=new Nt),o(y,v,n,r,i)}
|
|
87
|
+
}return!!p&&(i||(i=new Nt),qt(t,e,n,r,o,i))},Dt=m;var Ut=function t(e,n,r,o,i){
|
|
88
|
+
return e===n||(null==e||null==n||!Dt(e)&&!Dt(n)?e!=e&&n!=n:Bt(e,n,r,o,t,i))
|
|
89
|
+
},Ft=Ut;var Ht,zt=function(t,e){return Ft(t,e)},Kt={exports:{}}
|
|
90
|
+
;"undefined"!=typeof self&&self,Ht=function(){return function(t){var e={}
|
|
91
|
+
;function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}}
|
|
92
|
+
;return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}
|
|
93
|
+
return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{
|
|
94
|
+
configurable:!1,enumerable:!0,get:r})},n.n=function(t){
|
|
95
|
+
var e=t&&t.__esModule?function(){return t.default}:function(){return t}
|
|
96
|
+
;return n.d(e,"a",e),e},n.o=function(t,e){
|
|
97
|
+
return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=109)
|
|
98
|
+
}([function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0})
|
|
99
|
+
;var r=n(17),o=n(18),i=n(19),l=n(45),a=n(46),s=n(47),u=n(48),c=n(49),f=n(12),p=n(32),d=n(33),h=n(31),y=n(1),v={
|
|
100
|
+
Scope:y.Scope,create:y.create,find:y.find,query:y.query,register:y.register,
|
|
101
|
+
Container:r.default,Format:o.default,Leaf:i.default,Embed:u.default,
|
|
102
|
+
Scroll:l.default,Block:s.default,Inline:a.default,Text:c.default,Attributor:{
|
|
103
|
+
Attribute:f.default,Class:p.default,Style:d.default,Store:h.default}}
|
|
104
|
+
;e.default=v},function(t,e,n){
|
|
105
|
+
var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]
|
|
106
|
+
}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){
|
|
107
|
+
for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){
|
|
108
|
+
this.constructor=t}
|
|
109
|
+
r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)})
|
|
110
|
+
;Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){
|
|
111
|
+
function e(e){var n=this
|
|
112
|
+
;return e="[Parchment] "+e,(n=t.call(this,e)||this).message=e,
|
|
113
|
+
n.name=n.constructor.name,n}return o(e,t),e}(Error);e.ParchmentError=i
|
|
114
|
+
;var l,a={},s={},u={},c={};function f(t,e){var n
|
|
115
|
+
;if(void 0===e&&(e=l.ANY),"string"==typeof t)n=c[t]||a[t];else if(t instanceof Text||t.nodeType===Node.TEXT_NODE)n=c.text;else if("number"==typeof t)t&l.LEVEL&l.BLOCK?n=c.block:t&l.LEVEL&l.INLINE&&(n=c.inline);else if(t instanceof HTMLElement){
|
|
116
|
+
var r=(t.getAttribute("class")||"").split(/\s+/)
|
|
117
|
+
;for(var o in r)if(n=s[r[o]])break;n=n||u[t.tagName]}
|
|
118
|
+
return null==n?null:e&l.LEVEL&n.scope&&e&l.TYPE&n.scope?n:null}
|
|
119
|
+
e.DATA_KEY="__blot",function(t){
|
|
120
|
+
t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",
|
|
121
|
+
t[t.BLOT=14]="BLOT",
|
|
122
|
+
t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",
|
|
123
|
+
t[t.INLINE_BLOT=6]="INLINE_BLOT",
|
|
124
|
+
t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",
|
|
125
|
+
t[t.ANY=15]="ANY"}(l=e.Scope||(e.Scope={})),e.create=function(t,e){var n=f(t)
|
|
126
|
+
;if(null==n)throw new i("Unable to create "+t+" blot")
|
|
127
|
+
;var r=n,o=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:r.create(e)
|
|
128
|
+
;return new r(o,e)},e.find=function t(n,r){
|
|
129
|
+
return void 0===r&&(r=!1),null==n?null:null!=n[e.DATA_KEY]?n[e.DATA_KEY].blot:r?t(n.parentNode,r):null
|
|
130
|
+
},e.query=f,e.register=function t(){
|
|
131
|
+
for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n]
|
|
132
|
+
;if(e.length>1)return e.map((function(e){return t(e)}));var r=e[0]
|
|
133
|
+
;if("string"!=typeof r.blotName&&"string"!=typeof r.attrName)throw new i("Invalid definition")
|
|
134
|
+
;if("abstract"===r.blotName)throw new i("Cannot register abstract class")
|
|
135
|
+
;return c[r.blotName||r.attrName]=r,
|
|
136
|
+
"string"==typeof r.keyName?a[r.keyName]=r:(null!=r.className&&(s[r.className]=r),
|
|
137
|
+
null!=r.tagName&&(Array.isArray(r.tagName)?r.tagName=r.tagName.map((function(t){
|
|
138
|
+
return t.toUpperCase()
|
|
139
|
+
})):r.tagName=r.tagName.toUpperCase(),(Array.isArray(r.tagName)?r.tagName:[r.tagName]).forEach((function(t){
|
|
140
|
+
null!=u[t]&&null!=r.className||(u[t]=r)})))),r}},function(t,e,n){
|
|
141
|
+
var r=n(51),o=n(11),i=n(3),l=n(20),a=String.fromCharCode(0),s=function(t){
|
|
142
|
+
Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]
|
|
143
|
+
};s.prototype.insert=function(t,e){var n={}
|
|
144
|
+
;return 0===t.length?this:(n.insert=t,
|
|
145
|
+
null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),
|
|
146
|
+
this.push(n))},s.prototype.delete=function(t){return t<=0?this:this.push({
|
|
147
|
+
delete:t})},s.prototype.retain=function(t,e){if(t<=0)return this;var n={retain:t
|
|
148
|
+
};return null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),
|
|
149
|
+
this.push(n)},s.prototype.push=function(t){var e=this.ops.length,n=this.ops[e-1]
|
|
150
|
+
;if(t=i(!0,{},t),"object"==typeof n){
|
|
151
|
+
if("number"==typeof t.delete&&"number"==typeof n.delete)return this.ops[e-1]={
|
|
152
|
+
delete:n.delete+t.delete},this
|
|
153
|
+
;if("number"==typeof n.delete&&null!=t.insert&&(e-=1,
|
|
154
|
+
"object"!=typeof(n=this.ops[e-1])))return this.ops.unshift(t),this
|
|
155
|
+
;if(o(t.attributes,n.attributes)){
|
|
156
|
+
if("string"==typeof t.insert&&"string"==typeof n.insert)return this.ops[e-1]={
|
|
157
|
+
insert:n.insert+t.insert
|
|
158
|
+
},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this
|
|
159
|
+
;if("number"==typeof t.retain&&"number"==typeof n.retain)return this.ops[e-1]={
|
|
160
|
+
retain:n.retain+t.retain
|
|
161
|
+
},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}
|
|
162
|
+
return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this
|
|
163
|
+
},s.prototype.chop=function(){var t=this.ops[this.ops.length-1]
|
|
164
|
+
;return t&&t.retain&&!t.attributes&&this.ops.pop(),this
|
|
165
|
+
},s.prototype.filter=function(t){return this.ops.filter(t)
|
|
166
|
+
},s.prototype.forEach=function(t){this.ops.forEach(t)
|
|
167
|
+
},s.prototype.map=function(t){return this.ops.map(t)
|
|
168
|
+
},s.prototype.partition=function(t){var e=[],n=[]
|
|
169
|
+
;return this.forEach((function(r){(t(r)?e:n).push(r)})),[e,n]
|
|
170
|
+
},s.prototype.reduce=function(t,e){return this.ops.reduce(t,e)
|
|
171
|
+
},s.prototype.changeLength=function(){return this.reduce((function(t,e){
|
|
172
|
+
return e.insert?t+l.length(e):e.delete?t-e.delete:t}),0)
|
|
173
|
+
},s.prototype.length=function(){return this.reduce((function(t,e){
|
|
174
|
+
return t+l.length(e)}),0)},s.prototype.slice=function(t,e){
|
|
175
|
+
t=t||0,"number"!=typeof e&&(e=1/0)
|
|
176
|
+
;for(var n=[],r=l.iterator(this.ops),o=0;o<e&&r.hasNext();){var i
|
|
177
|
+
;o<t?i=r.next(t-o):(i=r.next(e-o),n.push(i)),o+=l.length(i)}return new s(n)
|
|
178
|
+
},s.prototype.compose=function(t){
|
|
179
|
+
var e=l.iterator(this.ops),n=l.iterator(t.ops),r=[],i=n.peek()
|
|
180
|
+
;if(null!=i&&"number"==typeof i.retain&&null==i.attributes){
|
|
181
|
+
for(var a=i.retain;"insert"===e.peekType()&&e.peekLength()<=a;)a-=e.peekLength(),
|
|
182
|
+
r.push(e.next());i.retain-a>0&&n.next(i.retain-a)}
|
|
183
|
+
for(var u=new s(r);e.hasNext()||n.hasNext();)if("insert"===n.peekType())u.push(n.next());else if("delete"===e.peekType())u.push(e.next());else{
|
|
184
|
+
var c=Math.min(e.peekLength(),n.peekLength()),f=e.next(c),p=n.next(c)
|
|
185
|
+
;if("number"==typeof p.retain){var d={}
|
|
186
|
+
;"number"==typeof f.retain?d.retain=c:d.insert=f.insert
|
|
187
|
+
;var h=l.attributes.compose(f.attributes,p.attributes,"number"==typeof f.retain)
|
|
188
|
+
;if(h&&(d.attributes=h),u.push(d),!n.hasNext()&&o(u.ops[u.ops.length-1],d)){
|
|
189
|
+
var y=new s(e.rest());return u.concat(y).chop()}
|
|
190
|
+
}else"number"==typeof p.delete&&"number"==typeof f.retain&&u.push(p)}
|
|
191
|
+
return u.chop()},s.prototype.concat=function(t){var e=new s(this.ops.slice())
|
|
192
|
+
;return t.ops.length>0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e
|
|
193
|
+
},s.prototype.diff=function(t,e){if(this.ops===t.ops)return new s
|
|
194
|
+
;var n=[this,t].map((function(e){return e.map((function(n){
|
|
195
|
+
if(null!=n.insert)return"string"==typeof n.insert?n.insert:a
|
|
196
|
+
;throw new Error("diff() called "+(e===t?"on":"with")+" non-document")
|
|
197
|
+
})).join("")
|
|
198
|
+
})),i=new s,u=r(n[0],n[1],e),c=l.iterator(this.ops),f=l.iterator(t.ops)
|
|
199
|
+
;return u.forEach((function(t){for(var e=t[1].length;e>0;){var n=0;switch(t[0]){
|
|
200
|
+
case r.INSERT:n=Math.min(f.peekLength(),e),i.push(f.next(n));break
|
|
201
|
+
;case r.DELETE:n=Math.min(e,c.peekLength()),c.next(n),i.delete(n);break
|
|
202
|
+
;case r.EQUAL:n=Math.min(c.peekLength(),f.peekLength(),e)
|
|
203
|
+
;var a=c.next(n),s=f.next(n)
|
|
204
|
+
;o(a.insert,s.insert)?i.retain(n,l.attributes.diff(a.attributes,s.attributes)):i.push(s).delete(n)
|
|
205
|
+
}e-=n}})),i.chop()},s.prototype.eachLine=function(t,e){e=e||"\n"
|
|
206
|
+
;for(var n=l.iterator(this.ops),r=new s,o=0;n.hasNext();){
|
|
207
|
+
if("insert"!==n.peekType())return
|
|
208
|
+
;var i=n.peek(),a=l.length(i)-n.peekLength(),u="string"==typeof i.insert?i.insert.indexOf(e,a)-a:-1
|
|
209
|
+
;if(u<0)r.push(n.next());else if(u>0)r.push(n.next(u));else{
|
|
210
|
+
if(!1===t(r,n.next(1).attributes||{},o))return;o+=1,r=new s}}
|
|
211
|
+
r.length()>0&&t(r,{},o)},s.prototype.transform=function(t,e){
|
|
212
|
+
if(e=!!e,"number"==typeof t)return this.transformPosition(t,e)
|
|
213
|
+
;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{
|
|
214
|
+
var i=Math.min(n.peekLength(),r.peekLength()),a=n.next(i),u=r.next(i)
|
|
215
|
+
;if(a.delete)continue
|
|
216
|
+
;u.delete?o.push(u):o.retain(i,l.attributes.transform(a.attributes,u.attributes,e))
|
|
217
|
+
}else o.retain(l.length(n.next()));return o.chop()
|
|
218
|
+
},s.prototype.transformPosition=function(t,e){e=!!e
|
|
219
|
+
;for(var n=l.iterator(this.ops),r=0;n.hasNext()&&r<=t;){
|
|
220
|
+
var o=n.peekLength(),i=n.peekType()
|
|
221
|
+
;n.next(),"delete"!==i?("insert"===i&&(r<t||!e)&&(t+=o),r+=o):t-=Math.min(o,t-r)
|
|
222
|
+
}return t},t.exports=s},function(t,e){
|
|
223
|
+
var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,o=Object.defineProperty,i=Object.getOwnPropertyDescriptor,l=function(t){
|
|
224
|
+
return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===r.call(t)
|
|
225
|
+
},a=function(t){if(!t||"[object Object]"!==r.call(t))return!1
|
|
226
|
+
;var e,o=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf")
|
|
227
|
+
;if(t.constructor&&!o&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)
|
|
228
|
+
},s=function(t,e){o&&"__proto__"===e.name?o(t,e.name,{enumerable:!0,
|
|
229
|
+
configurable:!0,value:e.newValue,writable:!0}):t[e.name]=e.newValue
|
|
230
|
+
},u=function(t,e){if("__proto__"===e){if(!n.call(t,e))return
|
|
231
|
+
;if(i)return i(t,e).value}return t[e]};t.exports=function t(){
|
|
232
|
+
var e,n,r,o,i,c,f=arguments[0],p=1,d=arguments.length,h=!1
|
|
233
|
+
;for("boolean"==typeof f&&(h=f,
|
|
234
|
+
f=arguments[1]||{},p=2),(null==f||"object"!=typeof f&&"function"!=typeof f)&&(f={});p<d;++p)if(null!=(e=arguments[p]))for(n in e)r=u(f,n),
|
|
235
|
+
f!==(o=u(e,n))&&(h&&o&&(a(o)||(i=l(o)))?(i?(i=!1,c=r&&l(r)?r:[]):c=r&&a(r)?r:{},
|
|
236
|
+
s(f,{name:n,newValue:t(h,c,o)})):void 0!==o&&s(f,{name:n,newValue:o}));return f}
|
|
237
|
+
},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0
|
|
238
|
+
}),e.default=e.BlockEmbed=e.bubbleFormats=void 0;var r=function(){
|
|
239
|
+
function t(t,e){for(var n=0;n<e.length;n++){var r=e[n]
|
|
240
|
+
;r.enumerable=r.enumerable||!1,
|
|
241
|
+
r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}
|
|
242
|
+
}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}
|
|
243
|
+
}(),o=function t(e,n,r){null===e&&(e=Function.prototype)
|
|
244
|
+
;var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){
|
|
245
|
+
var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}
|
|
246
|
+
if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0
|
|
247
|
+
},i=f(n(3)),l=f(n(2)),a=f(n(0)),s=f(n(16)),u=f(n(6)),c=f(n(7));function f(t){
|
|
248
|
+
return t&&t.__esModule?t:{default:t}}function p(t,e){
|
|
249
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}
|
|
250
|
+
function d(t,e){
|
|
251
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
252
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function h(t,e){
|
|
253
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
254
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
255
|
+
writable:!0,configurable:!0}
|
|
256
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}
|
|
257
|
+
var y=function(t){function e(){
|
|
258
|
+
return p(this,e),d(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))
|
|
259
|
+
}return h(e,t),r(e,[{key:"attach",value:function(){
|
|
260
|
+
o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"attach",this).call(this),
|
|
261
|
+
this.attributes=new a.default.Attributor.Store(this.domNode)}},{key:"delta",
|
|
262
|
+
value:function(){
|
|
263
|
+
return(new l.default).insert(this.value(),(0,i.default)(this.formats(),this.attributes.values()))
|
|
264
|
+
}},{key:"format",value:function(t,e){
|
|
265
|
+
var n=a.default.query(t,a.default.Scope.BLOCK_ATTRIBUTE)
|
|
266
|
+
;null!=n&&this.attributes.attribute(n,e)}},{key:"formatAt",
|
|
267
|
+
value:function(t,e,n,r){this.format(n,r)}},{key:"insertAt",
|
|
268
|
+
value:function(t,n,r){if("string"==typeof n&&n.endsWith("\n")){
|
|
269
|
+
var i=a.default.create(v.blotName)
|
|
270
|
+
;this.parent.insertBefore(i,0===t?this:this.next),i.insertAt(0,n.slice(0,-1))
|
|
271
|
+
}else o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,r)
|
|
272
|
+
}}]),e}(a.default.Embed);y.scope=a.default.Scope.BLOCK_BLOT;var v=function(t){
|
|
273
|
+
function e(t){p(this,e)
|
|
274
|
+
;var n=d(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))
|
|
275
|
+
;return n.cache={},n}return h(e,t),r(e,[{key:"delta",value:function(){
|
|
276
|
+
return null==this.cache.delta&&(this.cache.delta=this.descendants(a.default.Leaf).reduce((function(t,e){
|
|
277
|
+
return 0===e.length()?t:t.insert(e.value(),b(e))
|
|
278
|
+
}),new l.default).insert("\n",b(this))),this.cache.delta}},{key:"deleteAt",
|
|
279
|
+
value:function(t,n){
|
|
280
|
+
o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"deleteAt",this).call(this,t,n),
|
|
281
|
+
this.cache={}}},{key:"formatAt",value:function(t,n,r,i){
|
|
282
|
+
n<=0||(a.default.query(r,a.default.Scope.BLOCK)?t+n===this.length()&&this.format(r,i):o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,Math.min(n,this.length()-t-1),r,i),
|
|
283
|
+
this.cache={})}},{key:"insertAt",value:function(t,n,r){
|
|
284
|
+
if(null!=r)return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,r)
|
|
285
|
+
;if(0!==n.length){var i=n.split("\n"),l=i.shift()
|
|
286
|
+
;l.length>0&&(t<this.length()-1||null==this.children.tail?o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,Math.min(t,this.length()-1),l):this.children.tail.insertAt(this.children.tail.length(),l),
|
|
287
|
+
this.cache={});var a=this;i.reduce((function(t,e){
|
|
288
|
+
return(a=a.split(t,!0)).insertAt(0,e),e.length}),t+l.length)}}},{
|
|
289
|
+
key:"insertBefore",value:function(t,n){var r=this.children.head
|
|
290
|
+
;o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n),
|
|
291
|
+
r instanceof s.default&&r.remove(),this.cache={}}},{key:"length",
|
|
292
|
+
value:function(){
|
|
293
|
+
return null==this.cache.length&&(this.cache.length=o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"length",this).call(this)+1),
|
|
294
|
+
this.cache.length}},{key:"moveChildren",value:function(t,n){
|
|
295
|
+
o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"moveChildren",this).call(this,t,n),
|
|
296
|
+
this.cache={}}},{key:"optimize",value:function(t){
|
|
297
|
+
o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),
|
|
298
|
+
this.cache={}}},{key:"path",value:function(t){
|
|
299
|
+
return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t,!0)
|
|
300
|
+
}},{key:"removeChild",value:function(t){
|
|
301
|
+
o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"removeChild",this).call(this,t),
|
|
302
|
+
this.cache={}}},{key:"split",value:function(t){
|
|
303
|
+
var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1]
|
|
304
|
+
;if(n&&(0===t||t>=this.length()-1)){var r=this.clone()
|
|
305
|
+
;return 0===t?(this.parent.insertBefore(r,this),
|
|
306
|
+
this):(this.parent.insertBefore(r,this.next),r)}
|
|
307
|
+
var i=o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"split",this).call(this,t,n)
|
|
308
|
+
;return this.cache={},i}}]),e}(a.default.Block);function b(t){
|
|
309
|
+
var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}
|
|
310
|
+
;return null==t?e:("function"==typeof t.formats&&(e=(0,
|
|
311
|
+
i.default)(e,t.formats())),
|
|
312
|
+
null==t.parent||"scroll"==t.parent.blotName||t.parent.statics.scope!==t.statics.scope?e:b(t.parent,e))
|
|
313
|
+
}
|
|
314
|
+
v.blotName="block",v.tagName="P",v.defaultChild="break",v.allowedChildren=[u.default,a.default.Embed,c.default],
|
|
315
|
+
e.bubbleFormats=b,e.BlockEmbed=y,e.default=v},function(t,e,n){
|
|
316
|
+
Object.defineProperty(e,"__esModule",{value:!0
|
|
317
|
+
}),e.default=e.overload=e.expandConfig=void 0
|
|
318
|
+
;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){
|
|
319
|
+
return typeof t}:function(t){
|
|
320
|
+
return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t
|
|
321
|
+
},o=function(t,e){if(Array.isArray(t))return t
|
|
322
|
+
;if(Symbol.iterator in Object(t))return function(t,e){
|
|
323
|
+
var n=[],r=!0,o=!1,i=void 0;try{
|
|
324
|
+
for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),
|
|
325
|
+
!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()
|
|
326
|
+
}finally{if(o)throw i}}return n}(t,e)
|
|
327
|
+
;throw new TypeError("Invalid attempt to destructure non-iterable instance")
|
|
328
|
+
},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n]
|
|
329
|
+
;r.enumerable=r.enumerable||!1,
|
|
330
|
+
r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}
|
|
331
|
+
}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();n(50)
|
|
332
|
+
;var l=v(n(2)),a=v(n(14)),s=v(n(8)),u=v(n(9)),c=v(n(0)),f=n(15),p=v(f),d=v(n(3)),h=v(n(10)),y=v(n(34))
|
|
333
|
+
;function v(t){return t&&t.__esModule?t:{default:t}}function b(t,e,n){
|
|
334
|
+
return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,
|
|
335
|
+
writable:!0}):t[e]=n,t}var g=(0,h.default)("quill"),m=function(){function t(e){
|
|
336
|
+
var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}
|
|
337
|
+
;if(function(t,e){
|
|
338
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")
|
|
339
|
+
}(this,t),
|
|
340
|
+
this.options=_(e,r),this.container=this.options.container,null==this.container)return g.error("Invalid Quill container",e)
|
|
341
|
+
;this.options.debug&&t.debug(this.options.debug)
|
|
342
|
+
;var o=this.container.innerHTML.trim()
|
|
343
|
+
;this.container.classList.add("ql-container"),
|
|
344
|
+
this.container.innerHTML="",this.container.__quill=this,
|
|
345
|
+
this.root=this.addContainer("ql-editor"),
|
|
346
|
+
this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),
|
|
347
|
+
this.scrollingContainer=this.options.scrollingContainer||this.root,
|
|
348
|
+
this.emitter=new s.default,this.scroll=c.default.create(this.root,{
|
|
349
|
+
emitter:this.emitter,whitelist:this.options.formats
|
|
350
|
+
}),this.editor=new a.default(this.scroll),
|
|
351
|
+
this.selection=new p.default(this.scroll,this.emitter),
|
|
352
|
+
this.theme=new this.options.theme(this,this.options),
|
|
353
|
+
this.keyboard=this.theme.addModule("keyboard"),
|
|
354
|
+
this.clipboard=this.theme.addModule("clipboard"),
|
|
355
|
+
this.history=this.theme.addModule("history"),
|
|
356
|
+
this.theme.init(),this.emitter.on(s.default.events.EDITOR_CHANGE,(function(t){
|
|
357
|
+
t===s.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())
|
|
358
|
+
})),this.emitter.on(s.default.events.SCROLL_UPDATE,(function(t,e){
|
|
359
|
+
var r=n.selection.lastRange,o=r&&0===r.length?r.index:void 0
|
|
360
|
+
;O.call(n,(function(){return n.editor.update(null,e,o)}),t)}))
|
|
361
|
+
;var i=this.clipboard.convert("<div class='ql-editor' style=\"white-space: normal;\">"+o+"<p><br></p></div>")
|
|
362
|
+
;this.setContents(i),
|
|
363
|
+
this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),
|
|
364
|
+
this.options.readOnly&&this.disable()}return i(t,null,[{key:"debug",
|
|
365
|
+
value:function(t){!0===t&&(t="log"),h.default.level(t)}},{key:"find",
|
|
366
|
+
value:function(t){return t.__quill||c.default.find(t)}},{key:"import",
|
|
367
|
+
value:function(t){
|
|
368
|
+
return null==this.imports[t]&&g.error("Cannot import "+t+". Are you sure it was registered?"),
|
|
369
|
+
this.imports[t]}},{key:"register",value:function(t,e){
|
|
370
|
+
var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2]
|
|
371
|
+
;if("string"!=typeof t){var o=t.attrName||t.blotName
|
|
372
|
+
;"string"==typeof o?this.register("formats/"+o,t,e):Object.keys(t).forEach((function(r){
|
|
373
|
+
n.register(r,t[r],e)}))
|
|
374
|
+
}else null==this.imports[t]||r||g.warn("Overwriting "+t+" with",e),
|
|
375
|
+
this.imports[t]=e,
|
|
376
|
+
(t.startsWith("blots/")||t.startsWith("formats/"))&&"abstract"!==e.blotName?c.default.register(e):t.startsWith("modules")&&"function"==typeof e.register&&e.register()
|
|
377
|
+
}}]),i(t,[{key:"addContainer",value:function(t){
|
|
378
|
+
var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null
|
|
379
|
+
;if("string"==typeof t){var n=t
|
|
380
|
+
;(t=document.createElement("div")).classList.add(n)}
|
|
381
|
+
return this.container.insertBefore(t,e),t}},{key:"blur",value:function(){
|
|
382
|
+
this.selection.setRange(null)}},{key:"deleteText",value:function(t,e,n){
|
|
383
|
+
var r=this,i=x(t,e,n),l=o(i,4)
|
|
384
|
+
;return t=l[0],e=l[1],n=l[3],O.call(this,(function(){
|
|
385
|
+
return r.editor.deleteText(t,e)}),n,t,-1*e)}},{key:"disable",value:function(){
|
|
386
|
+
this.enable(!1)}},{key:"enable",value:function(){
|
|
387
|
+
var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0]
|
|
388
|
+
;this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}},{
|
|
389
|
+
key:"focus",value:function(){var t=this.scrollingContainer.scrollTop
|
|
390
|
+
;this.selection.focus(),
|
|
391
|
+
this.scrollingContainer.scrollTop=t,this.scrollIntoView()}},{key:"format",
|
|
392
|
+
value:function(t,e){
|
|
393
|
+
var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.default.sources.API
|
|
394
|
+
;return O.call(this,(function(){var r=n.getSelection(!0),o=new l.default
|
|
395
|
+
;if(null==r)return o
|
|
396
|
+
;if(c.default.query(t,c.default.Scope.BLOCK))o=n.editor.formatLine(r.index,r.length,b({},t,e));else{
|
|
397
|
+
if(0===r.length)return n.selection.format(t,e),o
|
|
398
|
+
;o=n.editor.formatText(r.index,r.length,b({},t,e))}
|
|
399
|
+
return n.setSelection(r,s.default.sources.SILENT),o}),r)}},{key:"formatLine",
|
|
400
|
+
value:function(t,e,n,r,i){var l,a=this,s=x(t,e,n,r,i),u=o(s,4)
|
|
401
|
+
;return t=u[0],e=u[1],l=u[2],i=u[3],O.call(this,(function(){
|
|
402
|
+
return a.editor.formatLine(t,e,l)}),i,t,0)}},{key:"formatText",
|
|
403
|
+
value:function(t,e,n,r,i){var l,a=this,s=x(t,e,n,r,i),u=o(s,4)
|
|
404
|
+
;return t=u[0],e=u[1],l=u[2],i=u[3],O.call(this,(function(){
|
|
405
|
+
return a.editor.formatText(t,e,l)}),i,t,0)}},{key:"getBounds",value:function(t){
|
|
406
|
+
var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0
|
|
407
|
+
;n="number"==typeof t?this.selection.getBounds(t,e):this.selection.getBounds(t.index,t.length)
|
|
408
|
+
;var r=this.container.getBoundingClientRect();return{bottom:n.bottom-r.top,
|
|
409
|
+
height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.top,
|
|
410
|
+
width:n.width}}},{key:"getContents",value:function(){
|
|
411
|
+
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=x(t,e),r=o(n,2)
|
|
412
|
+
;return t=r[0],e=r[1],this.editor.getContents(t,e)}},{key:"getFormat",
|
|
413
|
+
value:function(){
|
|
414
|
+
var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0
|
|
415
|
+
;return"number"==typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)
|
|
416
|
+
}},{key:"getIndex",value:function(t){return t.offset(this.scroll)}},{
|
|
417
|
+
key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",
|
|
418
|
+
value:function(t){return this.scroll.leaf(t)}},{key:"getLine",value:function(t){
|
|
419
|
+
return this.scroll.line(t)}},{key:"getLines",value:function(){
|
|
420
|
+
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
|
|
421
|
+
;return"number"!=typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)
|
|
422
|
+
}},{key:"getModule",value:function(t){return this.theme.modules[t]}},{
|
|
423
|
+
key:"getSelection",value:function(){
|
|
424
|
+
return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),
|
|
425
|
+
this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){
|
|
426
|
+
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=x(t,e),r=o(n,2)
|
|
427
|
+
;return t=r[0],e=r[1],this.editor.getText(t,e)}},{key:"hasFocus",
|
|
428
|
+
value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",
|
|
429
|
+
value:function(e,n,r){
|
|
430
|
+
var o=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.sources.API
|
|
431
|
+
;return O.call(this,(function(){return o.editor.insertEmbed(e,n,r)}),i,e)}},{
|
|
432
|
+
key:"insertText",value:function(t,e,n,r,i){var l,a=this,s=x(t,0,n,r,i),u=o(s,4)
|
|
433
|
+
;return t=u[0],l=u[2],i=u[3],O.call(this,(function(){
|
|
434
|
+
return a.editor.insertText(t,e,l)}),i,t,e.length)}},{key:"isEnabled",
|
|
435
|
+
value:function(){return!this.container.classList.contains("ql-disabled")}},{
|
|
436
|
+
key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)
|
|
437
|
+
}},{key:"on",value:function(){
|
|
438
|
+
return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",
|
|
439
|
+
value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{
|
|
440
|
+
key:"pasteHTML",value:function(t,e,n){this.clipboard.dangerouslyPasteHTML(t,e,n)
|
|
441
|
+
}},{key:"removeFormat",value:function(t,e,n){var r=this,i=x(t,e,n),l=o(i,4)
|
|
442
|
+
;return t=l[0],e=l[1],n=l[3],O.call(this,(function(){
|
|
443
|
+
return r.editor.removeFormat(t,e)}),n,t)}},{key:"scrollIntoView",
|
|
444
|
+
value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{
|
|
445
|
+
key:"setContents",value:function(t){
|
|
446
|
+
var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.sources.API
|
|
447
|
+
;return O.call(this,(function(){t=new l.default(t)
|
|
448
|
+
;var n=e.getLength(),r=e.editor.deleteText(0,n),o=e.editor.applyDelta(t),i=o.ops[o.ops.length-1]
|
|
449
|
+
;return null!=i&&"string"==typeof i.insert&&"\n"===i.insert[i.insert.length-1]&&(e.editor.deleteText(e.getLength()-1,1),
|
|
450
|
+
o.delete(1)),r.compose(o)}),n)}},{key:"setSelection",value:function(e,n,r){
|
|
451
|
+
if(null==e)this.selection.setRange(null,n||t.sources.API);else{
|
|
452
|
+
var i=x(e,n,r),l=o(i,4)
|
|
453
|
+
;e=l[0],n=l[1],r=l[3],this.selection.setRange(new f.Range(e,n),r),
|
|
454
|
+
r!==s.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)
|
|
455
|
+
}}},{key:"setText",value:function(t){
|
|
456
|
+
var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.sources.API,n=(new l.default).insert(t)
|
|
457
|
+
;return this.setContents(n,e)}},{key:"update",value:function(){
|
|
458
|
+
var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.default.sources.USER,e=this.scroll.update(t)
|
|
459
|
+
;return this.selection.update(t),e}},{key:"updateContents",value:function(t){
|
|
460
|
+
var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.sources.API
|
|
461
|
+
;return O.call(this,(function(){
|
|
462
|
+
return t=new l.default(t),e.editor.applyDelta(t,n)}),n,!0)}}]),t}()
|
|
463
|
+
;function _(t,e){if((e=(0,d.default)(!0,{container:t,modules:{clipboard:!0,
|
|
464
|
+
keyboard:!0,history:!0}},e)).theme&&e.theme!==m.DEFAULTS.theme){
|
|
465
|
+
if(e.theme=m.import("themes/"+e.theme),
|
|
466
|
+
null==e.theme)throw new Error("Invalid theme "+e.theme+". Did you register it?")
|
|
467
|
+
}else e.theme=y.default;var n=(0,d.default)(!0,{},e.theme.DEFAULTS)
|
|
468
|
+
;[n,e].forEach((function(t){
|
|
469
|
+
t.modules=t.modules||{},Object.keys(t.modules).forEach((function(e){
|
|
470
|
+
!0===t.modules[e]&&(t.modules[e]={})}))}))
|
|
471
|
+
;var r=Object.keys(n.modules).concat(Object.keys(e.modules)).reduce((function(t,e){
|
|
472
|
+
var n=m.import("modules/"+e)
|
|
473
|
+
;return null==n?g.error("Cannot load "+e+" module. Are you sure you registered it?"):t[e]=n.DEFAULTS||{},
|
|
474
|
+
t}),{})
|
|
475
|
+
;return null!=e.modules&&e.modules.toolbar&&e.modules.toolbar.constructor!==Object&&(e.modules.toolbar={
|
|
476
|
+
container:e.modules.toolbar}),e=(0,d.default)(!0,{},m.DEFAULTS,{modules:r},n,e),
|
|
477
|
+
["bounds","container","scrollingContainer"].forEach((function(t){
|
|
478
|
+
"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))
|
|
479
|
+
})),e.modules=Object.keys(e.modules).reduce((function(t,n){
|
|
480
|
+
return e.modules[n]&&(t[n]=e.modules[n]),t}),{}),e}function O(t,e,n,r){
|
|
481
|
+
if(this.options.strict&&!this.isEnabled()&&e===s.default.sources.USER)return new l.default
|
|
482
|
+
;var o=null==n?null:this.getSelection(),i=this.editor.delta,a=t()
|
|
483
|
+
;if(null!=o&&(!0===n&&(n=o.index),
|
|
484
|
+
null==r?o=w(o,a,e):0!==r&&(o=w(o,n,r,e)),this.setSelection(o,s.default.sources.SILENT)),
|
|
485
|
+
a.length()>0){var u,c,f=[s.default.events.TEXT_CHANGE,a,i,e]
|
|
486
|
+
;(u=this.emitter).emit.apply(u,[s.default.events.EDITOR_CHANGE].concat(f)),
|
|
487
|
+
e!==s.default.sources.SILENT&&(c=this.emitter).emit.apply(c,f)}return a}
|
|
488
|
+
function x(t,e,n,o,i){var l={}
|
|
489
|
+
;return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(i=o,
|
|
490
|
+
o=n,
|
|
491
|
+
n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(i=o,o=n,
|
|
492
|
+
n=e,
|
|
493
|
+
e=0),"object"===(void 0===n?"undefined":r(n))?(l=n,i=o):"string"==typeof n&&(null!=o?l[n]=o:i=n),
|
|
494
|
+
[t,e,l,i=i||s.default.sources.API]}function w(t,e,n,r){if(null==t)return null
|
|
495
|
+
;var i=void 0,a=void 0;if(e instanceof l.default){
|
|
496
|
+
var u=[t.index,t.index+t.length].map((function(t){
|
|
497
|
+
return e.transformPosition(t,r!==s.default.sources.USER)})),c=o(u,2)
|
|
498
|
+
;i=c[0],a=c[1]}else{var p=[t.index,t.index+t.length].map((function(t){
|
|
499
|
+
return t<e||t===e&&r===s.default.sources.USER?t:n>=0?t+n:Math.max(e,t+n)
|
|
500
|
+
})),d=o(p,2);i=d[0],a=d[1]}return new f.Range(i,a-i)}m.DEFAULTS={bounds:null,
|
|
501
|
+
formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,
|
|
502
|
+
strict:!0,theme:"default"
|
|
503
|
+
},m.events=s.default.events,m.sources=s.default.sources,
|
|
504
|
+
m.version="1.3.7",m.imports={delta:l.default,parchment:c.default,
|
|
505
|
+
"core/module":u.default,"core/theme":y.default
|
|
506
|
+
},e.expandConfig=_,e.overload=x,e.default=m},function(t,e,n){
|
|
507
|
+
Object.defineProperty(e,"__esModule",{value:!0});var r=function(){
|
|
508
|
+
function t(t,e){for(var n=0;n<e.length;n++){var r=e[n]
|
|
509
|
+
;r.enumerable=r.enumerable||!1,
|
|
510
|
+
r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}
|
|
511
|
+
}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}
|
|
512
|
+
}(),o=function t(e,n,r){null===e&&(e=Function.prototype)
|
|
513
|
+
;var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){
|
|
514
|
+
var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}
|
|
515
|
+
if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0
|
|
516
|
+
},i=a(n(7)),l=a(n(0));function a(t){return t&&t.__esModule?t:{default:t}}
|
|
517
|
+
var s=function(t){function e(){return function(t,e){
|
|
518
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")
|
|
519
|
+
}(this,e),function(t,e){
|
|
520
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
521
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e
|
|
522
|
+
}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}
|
|
523
|
+
return function(t,e){
|
|
524
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
525
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
526
|
+
writable:!0,configurable:!0}
|
|
527
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)
|
|
528
|
+
}(e,t),r(e,[{key:"formatAt",value:function(t,n,r,i){
|
|
529
|
+
if(e.compare(this.statics.blotName,r)<0&&l.default.query(r,l.default.Scope.BLOT)){
|
|
530
|
+
var a=this.isolate(t,n);i&&a.wrap(r,i)
|
|
531
|
+
}else o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,r,i)
|
|
532
|
+
}},{key:"optimize",value:function(t){
|
|
533
|
+
if(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),
|
|
534
|
+
this.parent instanceof e&&e.compare(this.statics.blotName,this.parent.statics.blotName)>0){
|
|
535
|
+
var n=this.parent.isolate(this.offset(),this.length())
|
|
536
|
+
;this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(t,n){
|
|
537
|
+
var r=e.order.indexOf(t),o=e.order.indexOf(n)
|
|
538
|
+
;return r>=0||o>=0?r-o:t===n?0:t<n?-1:1}}]),e}(l.default.Inline)
|
|
539
|
+
;s.allowedChildren=[s,l.default.Embed,i.default],
|
|
540
|
+
s.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],
|
|
541
|
+
e.default=s},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0})
|
|
542
|
+
;var r,o=n(0),i=function(t){function e(){return function(t,e){
|
|
543
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")
|
|
544
|
+
}(this,e),function(t,e){
|
|
545
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
546
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e
|
|
547
|
+
}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}
|
|
548
|
+
return function(t,e){
|
|
549
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
550
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
551
|
+
writable:!0,configurable:!0}
|
|
552
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e
|
|
553
|
+
}(((r=o)&&r.__esModule?r:{default:r}).default.Text);e.default=i
|
|
554
|
+
},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0})
|
|
555
|
+
;var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n]
|
|
556
|
+
;r.enumerable=r.enumerable||!1,
|
|
557
|
+
r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}
|
|
558
|
+
}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}
|
|
559
|
+
}(),o=function t(e,n,r){null===e&&(e=Function.prototype)
|
|
560
|
+
;var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){
|
|
561
|
+
var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}
|
|
562
|
+
if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0
|
|
563
|
+
},i=l(n(54));function l(t){return t&&t.__esModule?t:{default:t}}
|
|
564
|
+
var a=(0,l(n(10)).default)("quill:events")
|
|
565
|
+
;["selectionchange","mousedown","mouseup","click"].forEach((function(t){
|
|
566
|
+
document.addEventListener(t,(function(){
|
|
567
|
+
for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n]
|
|
568
|
+
;[].slice.call(document.querySelectorAll(".ql-container")).forEach((function(t){
|
|
569
|
+
var n;t.__quill&&t.__quill.emitter&&(n=t.__quill.emitter).handleDOM.apply(n,e)
|
|
570
|
+
}))}))}));var s=function(t){function e(){!function(t,e){
|
|
571
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")
|
|
572
|
+
}(this,e);var t=function(t,e){
|
|
573
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
574
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e
|
|
575
|
+
}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this))
|
|
576
|
+
;return t.listeners={},t.on("error",a.error),t}return function(t,e){
|
|
577
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
578
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
579
|
+
writable:!0,configurable:!0}
|
|
580
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)
|
|
581
|
+
}(e,t),r(e,[{key:"emit",value:function(){
|
|
582
|
+
a.log.apply(a,arguments),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"emit",this).apply(this,arguments)
|
|
583
|
+
}},{key:"handleDOM",value:function(t){
|
|
584
|
+
for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r]
|
|
585
|
+
;(this.listeners[t.type]||[]).forEach((function(e){var r=e.node,o=e.handler
|
|
586
|
+
;(t.target===r||r.contains(t.target))&&o.apply(void 0,[t].concat(n))}))}},{
|
|
587
|
+
key:"listenDOM",value:function(t,e,n){this.listeners[t]||(this.listeners[t]=[]),
|
|
588
|
+
this.listeners[t].push({node:e,handler:n})}}]),e}(i.default);s.events={
|
|
589
|
+
EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",
|
|
590
|
+
SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",
|
|
591
|
+
SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},s.sources={
|
|
592
|
+
API:"api",SILENT:"silent",USER:"user"},e.default=s},function(t,e,n){
|
|
593
|
+
Object.defineProperty(e,"__esModule",{value:!0});var r=function t(e){
|
|
594
|
+
var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){
|
|
595
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")
|
|
596
|
+
}(this,t),this.quill=e,this.options=n};r.DEFAULTS={},e.default=r
|
|
597
|
+
},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0})
|
|
598
|
+
;var r=["error","warn","log","info"],o="warn";function i(t){
|
|
599
|
+
if(r.indexOf(t)<=r.indexOf(o)){
|
|
600
|
+
for(var e,n=arguments.length,i=Array(n>1?n-1:0),l=1;l<n;l++)i[l-1]=arguments[l]
|
|
601
|
+
;(e=console)[t].apply(e,i)}}function l(t){return r.reduce((function(e,n){
|
|
602
|
+
return e[n]=i.bind(console,n,t),e}),{})}i.level=l.level=function(t){o=t
|
|
603
|
+
},e.default=l},function(t,e,n){
|
|
604
|
+
var r=Array.prototype.slice,o=n(52),i=n(53),l=t.exports=function(t,e,n){
|
|
605
|
+
return n||(n={}),
|
|
606
|
+
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:function(t,e,n){
|
|
607
|
+
var u,c;if(a(t)||a(e))return!1;if(t.prototype!==e.prototype)return!1
|
|
608
|
+
;if(i(t))return!!i(e)&&(t=r.call(t),e=r.call(e),l(t,e,n));if(s(t)){
|
|
609
|
+
if(!s(e))return!1;if(t.length!==e.length)return!1
|
|
610
|
+
;for(u=0;u<t.length;u++)if(t[u]!==e[u])return!1;return!0}try{var f=o(t),p=o(e)
|
|
611
|
+
}catch(t){return!1}if(f.length!=p.length)return!1
|
|
612
|
+
;for(f.sort(),p.sort(),u=f.length-1;u>=0;u--)if(f[u]!=p[u])return!1
|
|
613
|
+
;for(u=f.length-1;u>=0;u--)if(c=f[u],!l(t[c],e[c],n))return!1
|
|
614
|
+
;return typeof t==typeof e}(t,e,n))};function a(t){return null==t}function s(t){
|
|
615
|
+
return!(!t||"object"!=typeof t||"number"!=typeof t.length||"function"!=typeof t.copy||"function"!=typeof t.slice||t.length>0&&"number"!=typeof t[0])
|
|
616
|
+
}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0})
|
|
617
|
+
;var r=n(1),o=function(){function t(t,e,n){
|
|
618
|
+
void 0===n&&(n={}),this.attrName=t,this.keyName=e
|
|
619
|
+
;var o=r.Scope.TYPE&r.Scope.ATTRIBUTE
|
|
620
|
+
;null!=n.scope?this.scope=n.scope&r.Scope.LEVEL|o:this.scope=r.Scope.ATTRIBUTE,
|
|
621
|
+
null!=n.whitelist&&(this.whitelist=n.whitelist)}return t.keys=function(t){
|
|
622
|
+
return[].map.call(t.attributes,(function(t){return t.name}))
|
|
623
|
+
},t.prototype.add=function(t,e){
|
|
624
|
+
return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)
|
|
625
|
+
},t.prototype.canAdd=function(t,e){
|
|
626
|
+
return null!=r.query(t,r.Scope.BLOT&(this.scope|r.Scope.TYPE))&&(null==this.whitelist||("string"==typeof e?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1))
|
|
627
|
+
},t.prototype.remove=function(t){t.removeAttribute(this.keyName)
|
|
628
|
+
},t.prototype.value=function(t){var e=t.getAttribute(this.keyName)
|
|
629
|
+
;return this.canAdd(t,e)&&e?e:""},t}();e.default=o},function(t,e,n){
|
|
630
|
+
Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Code=void 0
|
|
631
|
+
;var r=function(t,e){if(Array.isArray(t))return t
|
|
632
|
+
;if(Symbol.iterator in Object(t))return function(t,e){
|
|
633
|
+
var n=[],r=!0,o=!1,i=void 0;try{
|
|
634
|
+
for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),
|
|
635
|
+
!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()
|
|
636
|
+
}finally{if(o)throw i}}return n}(t,e)
|
|
637
|
+
;throw new TypeError("Invalid attempt to destructure non-iterable instance")
|
|
638
|
+
},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n]
|
|
639
|
+
;r.enumerable=r.enumerable||!1,
|
|
640
|
+
r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}
|
|
641
|
+
}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}
|
|
642
|
+
}(),i=function t(e,n,r){null===e&&(e=Function.prototype)
|
|
643
|
+
;var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){
|
|
644
|
+
var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}
|
|
645
|
+
if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0
|
|
646
|
+
},l=f(n(2)),a=f(n(0)),s=f(n(4)),u=f(n(6)),c=f(n(7));function f(t){
|
|
647
|
+
return t&&t.__esModule?t:{default:t}}function p(t,e){
|
|
648
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}
|
|
649
|
+
function d(t,e){
|
|
650
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
651
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function h(t,e){
|
|
652
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
653
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
654
|
+
writable:!0,configurable:!0}
|
|
655
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}
|
|
656
|
+
var y=function(t){function e(){
|
|
657
|
+
return p(this,e),d(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))
|
|
658
|
+
}return h(e,t),e}(u.default);y.blotName="code",y.tagName="CODE"
|
|
659
|
+
;var v=function(t){function e(){
|
|
660
|
+
return p(this,e),d(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))
|
|
661
|
+
}return h(e,t),o(e,[{key:"delta",value:function(){
|
|
662
|
+
var t=this,e=this.domNode.textContent
|
|
663
|
+
;return e.endsWith("\n")&&(e=e.slice(0,-1)),e.split("\n").reduce((function(e,n){
|
|
664
|
+
return e.insert(n).insert("\n",t.formats())}),new l.default)}},{key:"format",
|
|
665
|
+
value:function(t,n){if(t!==this.statics.blotName||!n){
|
|
666
|
+
var o=this.descendant(c.default,this.length()-1),l=r(o,1)[0]
|
|
667
|
+
;null!=l&&l.deleteAt(l.length()-1,1),
|
|
668
|
+
i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)
|
|
669
|
+
}}},{key:"formatAt",value:function(t,n,r,o){
|
|
670
|
+
if(0!==n&&null!=a.default.query(r,a.default.Scope.BLOCK)&&(r!==this.statics.blotName||o!==this.statics.formats(this.domNode))){
|
|
671
|
+
var i=this.newlineIndex(t);if(!(i<0||i>=t+n)){
|
|
672
|
+
var l=this.newlineIndex(t,!0)+1,s=i-l+1,u=this.isolate(l,s),c=u.next
|
|
673
|
+
;u.format(r,o),c instanceof e&&c.formatAt(0,t-l+n-s,r,o)}}}},{key:"insertAt",
|
|
674
|
+
value:function(t,e,n){if(null==n){
|
|
675
|
+
var o=this.descendant(c.default,t),i=r(o,2),l=i[0],a=i[1];l.insertAt(a,e)}}},{
|
|
676
|
+
key:"length",value:function(){var t=this.domNode.textContent.length
|
|
677
|
+
;return this.domNode.textContent.endsWith("\n")?t:t+1}},{key:"newlineIndex",
|
|
678
|
+
value:function(t){
|
|
679
|
+
if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])return this.domNode.textContent.slice(0,t).lastIndexOf("\n")
|
|
680
|
+
;var e=this.domNode.textContent.slice(t).indexOf("\n");return e>-1?t+e:-1}},{
|
|
681
|
+
key:"optimize",value:function(t){
|
|
682
|
+
this.domNode.textContent.endsWith("\n")||this.appendChild(a.default.create("text","\n")),
|
|
683
|
+
i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t)
|
|
684
|
+
;var n=this.next
|
|
685
|
+
;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(t),
|
|
686
|
+
n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){
|
|
687
|
+
i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t),
|
|
688
|
+
[].slice.call(this.domNode.querySelectorAll("*")).forEach((function(t){
|
|
689
|
+
var e=a.default.find(t)
|
|
690
|
+
;null==e?t.parentNode.removeChild(t):e instanceof a.default.Embed?e.remove():e.unwrap()
|
|
691
|
+
}))}}],[{key:"create",value:function(t){
|
|
692
|
+
var n=i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t)
|
|
693
|
+
;return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){
|
|
694
|
+
return!0}}]),e}(s.default)
|
|
695
|
+
;v.blotName="code-block",v.tagName="PRE",v.TAB=" ",e.Code=y,e.default=v
|
|
696
|
+
},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0})
|
|
697
|
+
;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){
|
|
698
|
+
return typeof t}:function(t){
|
|
699
|
+
return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t
|
|
700
|
+
},o=function(t,e){if(Array.isArray(t))return t
|
|
701
|
+
;if(Symbol.iterator in Object(t))return function(t,e){
|
|
702
|
+
var n=[],r=!0,o=!1,i=void 0;try{
|
|
703
|
+
for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),
|
|
704
|
+
!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()
|
|
705
|
+
}finally{if(o)throw i}}return n}(t,e)
|
|
706
|
+
;throw new TypeError("Invalid attempt to destructure non-iterable instance")
|
|
707
|
+
},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n]
|
|
708
|
+
;r.enumerable=r.enumerable||!1,
|
|
709
|
+
r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}
|
|
710
|
+
}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}
|
|
711
|
+
}(),l=b(n(2)),a=b(n(20)),s=b(n(0)),u=b(n(13)),c=b(n(24)),f=n(4),p=b(f),d=b(n(16)),h=b(n(21)),y=b(n(11)),v=b(n(3))
|
|
712
|
+
;function b(t){return t&&t.__esModule?t:{default:t}}
|
|
713
|
+
var g=/^[ -~]*$/,m=function(){function t(e){!function(t,e){
|
|
714
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")
|
|
715
|
+
}(this,t),this.scroll=e,this.delta=this.getDelta()}return i(t,[{
|
|
716
|
+
key:"applyDelta",value:function(t){var e=this,n=!1;this.scroll.update()
|
|
717
|
+
;var i=this.scroll.length();return this.scroll.batchStart(),(t=function(t){
|
|
718
|
+
return t.reduce((function(t,e){if(1===e.insert){
|
|
719
|
+
var n=(0,h.default)(e.attributes);return delete n.image,t.insert({
|
|
720
|
+
image:e.attributes.image},n)}
|
|
721
|
+
if(null==e.attributes||!0!==e.attributes.list&&!0!==e.attributes.bullet||((e=(0,
|
|
722
|
+
h.default)(e)).attributes.list?e.attributes.list="ordered":(e.attributes.list="bullet",
|
|
723
|
+
delete e.attributes.bullet)),"string"==typeof e.insert){
|
|
724
|
+
var r=e.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n")
|
|
725
|
+
;return t.insert(r,e.attributes)}return t.push(e)}),new l.default)
|
|
726
|
+
}(t)).reduce((function(t,l){
|
|
727
|
+
var u=l.retain||l.delete||l.insert.length||1,c=l.attributes||{}
|
|
728
|
+
;if(null!=l.insert){if("string"==typeof l.insert){var d=l.insert
|
|
729
|
+
;d.endsWith("\n")&&n&&(n=!1,
|
|
730
|
+
d=d.slice(0,-1)),t>=i&&!d.endsWith("\n")&&(n=!0),e.scroll.insertAt(t,d)
|
|
731
|
+
;var h=e.scroll.line(t),y=o(h,2),b=y[0],g=y[1],m=(0,
|
|
732
|
+
v.default)({},(0,f.bubbleFormats)(b));if(b instanceof p.default){
|
|
733
|
+
var _=b.descendant(s.default.Leaf,g),O=o(_,1)[0]
|
|
734
|
+
;m=(0,v.default)(m,(0,f.bubbleFormats)(O))}c=a.default.attributes.diff(m,c)||{}
|
|
735
|
+
}else if("object"===r(l.insert)){var x=Object.keys(l.insert)[0]
|
|
736
|
+
;if(null==x)return t;e.scroll.insertAt(t,x,l.insert[x])}i+=u}
|
|
737
|
+
return Object.keys(c).forEach((function(n){e.scroll.formatAt(t,u,n,c[n])})),t+u
|
|
738
|
+
}),0),t.reduce((function(t,n){
|
|
739
|
+
return"number"==typeof n.delete?(e.scroll.deleteAt(t,n.delete),
|
|
740
|
+
t):t+(n.retain||n.insert.length||1)}),0),this.scroll.batchEnd(),this.update(t)}
|
|
741
|
+
},{key:"deleteText",value:function(t,e){
|
|
742
|
+
return this.scroll.deleteAt(t,e),this.update((new l.default).retain(t).delete(e))
|
|
743
|
+
}},{key:"formatLine",value:function(t,e){
|
|
744
|
+
var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}
|
|
745
|
+
;return this.scroll.update(),Object.keys(r).forEach((function(o){
|
|
746
|
+
if(null==n.scroll.whitelist||n.scroll.whitelist[o]){
|
|
747
|
+
var i=n.scroll.lines(t,Math.max(e,1)),l=e;i.forEach((function(e){
|
|
748
|
+
var i=e.length();if(e instanceof u.default){
|
|
749
|
+
var a=t-e.offset(n.scroll),s=e.newlineIndex(a+l)-a+1;e.formatAt(a,s,o,r[o])
|
|
750
|
+
}else e.format(o,r[o]);l-=i}))}
|
|
751
|
+
})),this.scroll.optimize(),this.update((new l.default).retain(t).retain(e,(0,
|
|
752
|
+
h.default)(r)))}},{key:"formatText",value:function(t,e){
|
|
753
|
+
var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}
|
|
754
|
+
;return Object.keys(r).forEach((function(o){n.scroll.formatAt(t,e,o,r[o])
|
|
755
|
+
})),this.update((new l.default).retain(t).retain(e,(0,h.default)(r)))}},{
|
|
756
|
+
key:"getContents",value:function(t,e){return this.delta.slice(t,t+e)}},{
|
|
757
|
+
key:"getDelta",value:function(){
|
|
758
|
+
return this.scroll.lines().reduce((function(t,e){return t.concat(e.delta())
|
|
759
|
+
}),new l.default)}},{key:"getFormat",value:function(t){
|
|
760
|
+
var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[]
|
|
761
|
+
;0===e?this.scroll.path(t).forEach((function(t){var e=o(t,1)[0]
|
|
762
|
+
;e instanceof p.default?n.push(e):e instanceof s.default.Leaf&&r.push(e)
|
|
763
|
+
})):(n=this.scroll.lines(t,e),r=this.scroll.descendants(s.default.Leaf,t,e))
|
|
764
|
+
;var i=[n,r].map((function(t){if(0===t.length)return{}
|
|
765
|
+
;for(var e=(0,f.bubbleFormats)(t.shift());Object.keys(e).length>0;){
|
|
766
|
+
var n=t.shift();if(null==n)return e;e=_((0,f.bubbleFormats)(n),e)}return e}))
|
|
767
|
+
;return v.default.apply(v.default,i)}},{key:"getText",value:function(t,e){
|
|
768
|
+
return this.getContents(t,e).filter((function(t){return"string"==typeof t.insert
|
|
769
|
+
})).map((function(t){return t.insert})).join("")}},{key:"insertEmbed",
|
|
770
|
+
value:function(t,e,n){
|
|
771
|
+
return this.scroll.insertAt(t,e,n),this.update((new l.default).retain(t).insert(function(t,e,n){
|
|
772
|
+
return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,
|
|
773
|
+
writable:!0}):t[e]=n,t}({},e,n)))}},{key:"insertText",value:function(t,e){
|
|
774
|
+
var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}
|
|
775
|
+
;return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),
|
|
776
|
+
Object.keys(r).forEach((function(o){n.scroll.formatAt(t,e.length,o,r[o])
|
|
777
|
+
})),this.update((new l.default).retain(t).insert(e,(0,h.default)(r)))}},{
|
|
778
|
+
key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0
|
|
779
|
+
;if(this.scroll.children.length>1)return!1;var t=this.scroll.children.head
|
|
780
|
+
;return t.statics.blotName===p.default.blotName&&!(t.children.length>1)&&t.children.head instanceof d.default
|
|
781
|
+
}},{key:"removeFormat",value:function(t,e){
|
|
782
|
+
var n=this.getText(t,e),r=this.scroll.line(t+e),i=o(r,2),a=i[0],s=i[1],c=0,f=new l.default
|
|
783
|
+
;null!=a&&(c=a instanceof u.default?a.newlineIndex(s)-s+1:a.length()-s,
|
|
784
|
+
f=a.delta().slice(s,s+c-1).insert("\n"))
|
|
785
|
+
;var p=this.getContents(t,e+c).diff((new l.default).insert(n).concat(f)),d=(new l.default).retain(t).concat(p)
|
|
786
|
+
;return this.applyDelta(d)}},{key:"update",value:function(t){
|
|
787
|
+
var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this.delta
|
|
788
|
+
;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match(g)&&s.default.find(e[0].target)){
|
|
789
|
+
var o=s.default.find(e[0].target),i=(0,
|
|
790
|
+
f.bubbleFormats)(o),a=o.offset(this.scroll),u=e[0].oldValue.replace(c.default.CONTENTS,""),p=(new l.default).insert(u),d=(new l.default).insert(o.value())
|
|
791
|
+
;t=(new l.default).retain(a).concat(p.diff(d,n)).reduce((function(t,e){
|
|
792
|
+
return e.insert?t.insert(e.insert,i):t.push(e)
|
|
793
|
+
}),new l.default),this.delta=r.compose(t)}else this.delta=this.getDelta(),t&&(0,
|
|
794
|
+
y.default)(r.compose(t),this.delta)||(t=r.diff(this.delta,n));return t}}]),t}()
|
|
795
|
+
;function _(t,e){return Object.keys(e).reduce((function(n,r){
|
|
796
|
+
return null==t[r]||(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]]),
|
|
797
|
+
n}),{})}e.default=m},function(t,e,n){Object.defineProperty(e,"__esModule",{
|
|
798
|
+
value:!0}),e.default=e.Range=void 0;var r=function(t,e){
|
|
799
|
+
if(Array.isArray(t))return t
|
|
800
|
+
;if(Symbol.iterator in Object(t))return function(t,e){
|
|
801
|
+
var n=[],r=!0,o=!1,i=void 0;try{
|
|
802
|
+
for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),
|
|
803
|
+
!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()
|
|
804
|
+
}finally{if(o)throw i}}return n}(t,e)
|
|
805
|
+
;throw new TypeError("Invalid attempt to destructure non-iterable instance")
|
|
806
|
+
},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n]
|
|
807
|
+
;r.enumerable=r.enumerable||!1,
|
|
808
|
+
r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}
|
|
809
|
+
}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}
|
|
810
|
+
}(),i=u(n(0)),l=u(n(21)),a=u(n(11)),s=u(n(8));function u(t){
|
|
811
|
+
return t&&t.__esModule?t:{default:t}}function c(t){if(Array.isArray(t)){
|
|
812
|
+
for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}
|
|
813
|
+
return Array.from(t)}function f(t,e){
|
|
814
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}
|
|
815
|
+
var p=(0,u(n(10)).default)("quill:selection"),d=function t(e){
|
|
816
|
+
var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0
|
|
817
|
+
;f(this,t),this.index=e,this.length=n},h=function(){function t(e,n){var r=this
|
|
818
|
+
;f(this,t),
|
|
819
|
+
this.emitter=n,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,
|
|
820
|
+
this.cursor=i.default.create("cursor",this),
|
|
821
|
+
this.lastRange=this.savedRange=new d(0,0),
|
|
822
|
+
this.handleComposition(),this.handleDragging(),
|
|
823
|
+
this.emitter.listenDOM("selectionchange",document,(function(){
|
|
824
|
+
r.mouseDown||setTimeout(r.update.bind(r,s.default.sources.USER),1)
|
|
825
|
+
})),this.emitter.on(s.default.events.EDITOR_CHANGE,(function(t,e){
|
|
826
|
+
t===s.default.events.TEXT_CHANGE&&e.length()>0&&r.update(s.default.sources.SILENT)
|
|
827
|
+
})),this.emitter.on(s.default.events.SCROLL_BEFORE_UPDATE,(function(){
|
|
828
|
+
if(r.hasFocus()){var t=r.getNativeRange()
|
|
829
|
+
;null!=t&&t.start.node!==r.cursor.textNode&&r.emitter.once(s.default.events.SCROLL_UPDATE,(function(){
|
|
830
|
+
try{r.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset)
|
|
831
|
+
}catch(t){}}))}
|
|
832
|
+
})),this.emitter.on(s.default.events.SCROLL_OPTIMIZE,(function(t,e){if(e.range){
|
|
833
|
+
var n=e.range,o=n.startNode,i=n.startOffset,l=n.endNode,a=n.endOffset
|
|
834
|
+
;r.setNativeRange(o,i,l,a)}})),this.update(s.default.sources.SILENT)}
|
|
835
|
+
return o(t,[{key:"handleComposition",value:function(){var t=this
|
|
836
|
+
;this.root.addEventListener("compositionstart",(function(){t.composing=!0
|
|
837
|
+
})),this.root.addEventListener("compositionend",(function(){
|
|
838
|
+
if(t.composing=!1,t.cursor.parent){var e=t.cursor.restore();if(!e)return
|
|
839
|
+
;setTimeout((function(){
|
|
840
|
+
t.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)}),1)}}))}},{
|
|
841
|
+
key:"handleDragging",value:function(){var t=this
|
|
842
|
+
;this.emitter.listenDOM("mousedown",document.body,(function(){t.mouseDown=!0})),
|
|
843
|
+
this.emitter.listenDOM("mouseup",document.body,(function(){
|
|
844
|
+
t.mouseDown=!1,t.update(s.default.sources.USER)}))}},{key:"focus",
|
|
845
|
+
value:function(){
|
|
846
|
+
this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{
|
|
847
|
+
key:"format",value:function(t,e){
|
|
848
|
+
if(null==this.scroll.whitelist||this.scroll.whitelist[t]){this.scroll.update()
|
|
849
|
+
;var n=this.getNativeRange()
|
|
850
|
+
;if(null!=n&&n.native.collapsed&&!i.default.query(t,i.default.Scope.BLOCK)){
|
|
851
|
+
if(n.start.node!==this.cursor.textNode){var r=i.default.find(n.start.node,!1)
|
|
852
|
+
;if(null==r)return;if(r instanceof i.default.Leaf){var o=r.split(n.start.offset)
|
|
853
|
+
;r.parent.insertBefore(this.cursor,o)
|
|
854
|
+
}else r.insertBefore(this.cursor,n.start.node);this.cursor.attach()}
|
|
855
|
+
this.cursor.format(t,e),
|
|
856
|
+
this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),
|
|
857
|
+
this.update()}}}},{key:"getBounds",value:function(t){
|
|
858
|
+
var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length()
|
|
859
|
+
;t=Math.min(t,n-1),e=Math.min(t+e,n-1)-t
|
|
860
|
+
;var o=void 0,i=this.scroll.leaf(t),l=r(i,2),a=l[0],s=l[1]
|
|
861
|
+
;if(null==a)return null;var u=a.position(s,!0),c=r(u,2);o=c[0],s=c[1]
|
|
862
|
+
;var f=document.createRange();if(e>0){f.setStart(o,s)
|
|
863
|
+
;var p=this.scroll.leaf(t+e),d=r(p,2);if(a=d[0],s=d[1],null==a)return null
|
|
864
|
+
;var h=a.position(s,!0),y=r(h,2)
|
|
865
|
+
;return o=y[0],s=y[1],f.setEnd(o,s),f.getBoundingClientRect()}
|
|
866
|
+
var v="left",b=void 0
|
|
867
|
+
;return o instanceof Text?(s<o.data.length?(f.setStart(o,s),
|
|
868
|
+
f.setEnd(o,s+1)):(f.setStart(o,s-1),
|
|
869
|
+
f.setEnd(o,s),v="right"),b=f.getBoundingClientRect()):(b=a.domNode.getBoundingClientRect(),
|
|
870
|
+
s>0&&(v="right")),{bottom:b.top+b.height,height:b.height,left:b[v],right:b[v],
|
|
871
|
+
top:b.top,width:0}}},{key:"getNativeRange",value:function(){
|
|
872
|
+
var t=document.getSelection();if(null==t||t.rangeCount<=0)return null
|
|
873
|
+
;var e=t.getRangeAt(0);if(null==e)return null;var n=this.normalizeNative(e)
|
|
874
|
+
;return p.info("getNativeRange",n),n}},{key:"getRange",value:function(){
|
|
875
|
+
var t=this.getNativeRange()
|
|
876
|
+
;return null==t?[null,null]:[this.normalizedToRange(t),t]}},{key:"hasFocus",
|
|
877
|
+
value:function(){return document.activeElement===this.root}},{
|
|
878
|
+
key:"normalizedToRange",value:function(t){
|
|
879
|
+
var e=this,n=[[t.start.node,t.start.offset]]
|
|
880
|
+
;t.native.collapsed||n.push([t.end.node,t.end.offset]);var o=n.map((function(t){
|
|
881
|
+
var n=r(t,2),o=n[0],l=n[1],a=i.default.find(o,!0),s=a.offset(e.scroll)
|
|
882
|
+
;return 0===l?s:a instanceof i.default.Container?s+a.length():s+a.index(o,l)
|
|
883
|
+
})),l=Math.min(Math.max.apply(Math,c(o)),this.scroll.length()-1),a=Math.min.apply(Math,[l].concat(c(o)))
|
|
884
|
+
;return new d(a,l-a)}},{key:"normalizeNative",value:function(t){
|
|
885
|
+
if(!y(this.root,t.startContainer)||!t.collapsed&&!y(this.root,t.endContainer))return null
|
|
886
|
+
;var e={start:{node:t.startContainer,offset:t.startOffset},end:{
|
|
887
|
+
node:t.endContainer,offset:t.endOffset},native:t}
|
|
888
|
+
;return[e.start,e.end].forEach((function(t){
|
|
889
|
+
for(var e=t.node,n=t.offset;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>n)e=e.childNodes[n],
|
|
890
|
+
n=0;else{if(e.childNodes.length!==n)break
|
|
891
|
+
;n=(e=e.lastChild)instanceof Text?e.data.length:e.childNodes.length+1}
|
|
892
|
+
t.node=e,t.offset=n})),e}},{key:"rangeToNative",value:function(t){
|
|
893
|
+
var e=this,n=t.collapsed?[t.index]:[t.index,t.index+t.length],o=[],i=this.scroll.length()
|
|
894
|
+
;return n.forEach((function(t,n){t=Math.min(i-1,t)
|
|
895
|
+
;var l,a=e.scroll.leaf(t),s=r(a,2),u=s[0],c=s[1],f=u.position(c,0!==n),p=r(f,2)
|
|
896
|
+
;l=p[0],c=p[1],o.push(l,c)})),o.length<2&&(o=o.concat(o)),o}},{
|
|
897
|
+
key:"scrollIntoView",value:function(t){var e=this.lastRange;if(null!=e){
|
|
898
|
+
var n=this.getBounds(e.index,e.length);if(null!=n){
|
|
899
|
+
var o=this.scroll.length()-1,i=this.scroll.line(Math.min(e.index,o)),l=r(i,1)[0],a=l
|
|
900
|
+
;if(e.length>0){var s=this.scroll.line(Math.min(e.index+e.length,o));a=r(s,1)[0]
|
|
901
|
+
}if(null!=l&&null!=a){var u=t.getBoundingClientRect()
|
|
902
|
+
;n.top<u.top?t.scrollTop-=u.top-n.top:n.bottom>u.bottom&&(t.scrollTop+=n.bottom-u.bottom)
|
|
903
|
+
}}}}},{key:"setNativeRange",value:function(t,e){
|
|
904
|
+
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]
|
|
905
|
+
;if(p.info("setNativeRange",t,e,n,r),
|
|
906
|
+
null==t||null!=this.root.parentNode&&null!=t.parentNode&&null!=n.parentNode){
|
|
907
|
+
var i=document.getSelection();if(null!=i)if(null!=t){
|
|
908
|
+
this.hasFocus()||this.root.focus();var l=(this.getNativeRange()||{}).native
|
|
909
|
+
;if(null==l||o||t!==l.startContainer||e!==l.startOffset||n!==l.endContainer||r!==l.endOffset){
|
|
910
|
+
"BR"==t.tagName&&(e=[].indexOf.call(t.parentNode.childNodes,t),
|
|
911
|
+
t=t.parentNode),"BR"==n.tagName&&(r=[].indexOf.call(n.parentNode.childNodes,n),
|
|
912
|
+
n=n.parentNode);var a=document.createRange()
|
|
913
|
+
;a.setStart(t,e),a.setEnd(n,r),i.removeAllRanges(),i.addRange(a)}
|
|
914
|
+
}else i.removeAllRanges(),this.root.blur(),document.body.focus()}}},{
|
|
915
|
+
key:"setRange",value:function(t){
|
|
916
|
+
var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.default.sources.API
|
|
917
|
+
;if("string"==typeof e&&(n=e,e=!1),p.info("setRange",t),null!=t){
|
|
918
|
+
var r=this.rangeToNative(t);this.setNativeRange.apply(this,c(r).concat([e]))
|
|
919
|
+
}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){
|
|
920
|
+
var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.default.sources.USER,e=this.lastRange,n=this.getRange(),o=r(n,2),i=o[0],u=o[1]
|
|
921
|
+
;if(this.lastRange=i,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,
|
|
922
|
+
a.default)(e,this.lastRange)){var c
|
|
923
|
+
;!this.composing&&null!=u&&u.native.collapsed&&u.start.node!==this.cursor.textNode&&this.cursor.restore()
|
|
924
|
+
;var f,p=[s.default.events.SELECTION_CHANGE,(0,
|
|
925
|
+
l.default)(this.lastRange),(0,l.default)(e),t]
|
|
926
|
+
;(c=this.emitter).emit.apply(c,[s.default.events.EDITOR_CHANGE].concat(p)),
|
|
927
|
+
t!==s.default.sources.SILENT&&(f=this.emitter).emit.apply(f,p)}}}]),t}()
|
|
928
|
+
;function y(t,e){try{e.parentNode}catch(t){return!1}
|
|
929
|
+
return e instanceof Text&&(e=e.parentNode),t.contains(e)}e.Range=d,e.default=h
|
|
930
|
+
},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0})
|
|
931
|
+
;var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n]
|
|
932
|
+
;r.enumerable=r.enumerable||!1,
|
|
933
|
+
r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}
|
|
934
|
+
}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}
|
|
935
|
+
}(),i=function t(e,n,r){null===e&&(e=Function.prototype)
|
|
936
|
+
;var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){
|
|
937
|
+
var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}
|
|
938
|
+
if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0
|
|
939
|
+
},l=n(0),a=function(t){function e(){return function(t,e){
|
|
940
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")
|
|
941
|
+
}(this,e),function(t,e){
|
|
942
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
943
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e
|
|
944
|
+
}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}
|
|
945
|
+
return function(t,e){
|
|
946
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
947
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
948
|
+
writable:!0,configurable:!0}
|
|
949
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)
|
|
950
|
+
}(e,t),o(e,[{key:"insertInto",value:function(t,n){
|
|
951
|
+
0===t.children.length?i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertInto",this).call(this,t,n):this.remove()
|
|
952
|
+
}},{key:"length",value:function(){return 0}},{key:"value",value:function(){
|
|
953
|
+
return""}}],[{key:"value",value:function(){}}]),e}(((r=l)&&r.__esModule?r:{
|
|
954
|
+
default:r}).default.Embed);a.blotName="break",a.tagName="BR",e.default=a
|
|
955
|
+
},function(t,e,n){var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{
|
|
956
|
+
__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){
|
|
957
|
+
for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){
|
|
958
|
+
this.constructor=t}
|
|
959
|
+
r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)})
|
|
960
|
+
;Object.defineProperty(e,"__esModule",{value:!0})
|
|
961
|
+
;var i=n(44),l=n(30),a=n(1),s=function(t){function e(e){
|
|
962
|
+
var n=t.call(this,e)||this;return n.build(),n}
|
|
963
|
+
return o(e,t),e.prototype.appendChild=function(t){this.insertBefore(t)
|
|
964
|
+
},e.prototype.attach=function(){
|
|
965
|
+
t.prototype.attach.call(this),this.children.forEach((function(t){t.attach()}))},
|
|
966
|
+
e.prototype.build=function(){var t=this
|
|
967
|
+
;this.children=new i.default,[].slice.call(this.domNode.childNodes).reverse().forEach((function(e){
|
|
968
|
+
try{var n=u(e);t.insertBefore(n,t.children.head||void 0)}catch(t){
|
|
969
|
+
if(t instanceof a.ParchmentError)return;throw t}}))
|
|
970
|
+
},e.prototype.deleteAt=function(t,e){
|
|
971
|
+
if(0===t&&e===this.length())return this.remove()
|
|
972
|
+
;this.children.forEachAt(t,e,(function(t,e,n){t.deleteAt(e,n)}))
|
|
973
|
+
},e.prototype.descendant=function(t,n){var r=this.children.find(n),o=r[0],i=r[1]
|
|
974
|
+
;return null==t.blotName&&t(o)||null!=t.blotName&&o instanceof t?[o,i]:o instanceof e?o.descendant(t,i):[null,-1]
|
|
975
|
+
},e.prototype.descendants=function(t,n,r){
|
|
976
|
+
void 0===n&&(n=0),void 0===r&&(r=Number.MAX_VALUE);var o=[],i=r
|
|
977
|
+
;return this.children.forEachAt(n,r,(function(n,r,l){
|
|
978
|
+
(null==t.blotName&&t(n)||null!=t.blotName&&n instanceof t)&&o.push(n),
|
|
979
|
+
n instanceof e&&(o=o.concat(n.descendants(t,r,i))),i-=l})),o
|
|
980
|
+
},e.prototype.detach=function(){this.children.forEach((function(t){t.detach()
|
|
981
|
+
})),t.prototype.detach.call(this)},e.prototype.formatAt=function(t,e,n,r){
|
|
982
|
+
this.children.forEachAt(t,e,(function(t,e,o){t.formatAt(e,o,n,r)}))
|
|
983
|
+
},e.prototype.insertAt=function(t,e,n){var r=this.children.find(t),o=r[0],i=r[1]
|
|
984
|
+
;if(o)o.insertAt(i,e,n);else{var l=null==n?a.create("text",e):a.create(e,n)
|
|
985
|
+
;this.appendChild(l)}},e.prototype.insertBefore=function(t,e){
|
|
986
|
+
if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some((function(e){
|
|
987
|
+
return t instanceof e
|
|
988
|
+
})))throw new a.ParchmentError("Cannot insert "+t.statics.blotName+" into "+this.statics.blotName)
|
|
989
|
+
;t.insertInto(this,e)},e.prototype.length=function(){
|
|
990
|
+
return this.children.reduce((function(t,e){return t+e.length()}),0)
|
|
991
|
+
},e.prototype.moveChildren=function(t,e){this.children.forEach((function(n){
|
|
992
|
+
t.insertBefore(n,e)}))},e.prototype.optimize=function(e){
|
|
993
|
+
if(t.prototype.optimize.call(this,e),
|
|
994
|
+
0===this.children.length)if(null!=this.statics.defaultChild){
|
|
995
|
+
var n=a.create(this.statics.defaultChild);this.appendChild(n),n.optimize(e)
|
|
996
|
+
}else this.remove()},e.prototype.path=function(t,n){void 0===n&&(n=!1)
|
|
997
|
+
;var r=this.children.find(t,n),o=r[0],i=r[1],l=[[this,t]]
|
|
998
|
+
;return o instanceof e?l.concat(o.path(i,n)):(null!=o&&l.push([o,i]),l)
|
|
999
|
+
},e.prototype.removeChild=function(t){this.children.remove(t)
|
|
1000
|
+
},e.prototype.replace=function(n){
|
|
1001
|
+
n instanceof e&&n.moveChildren(this),t.prototype.replace.call(this,n)
|
|
1002
|
+
},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this
|
|
1003
|
+
;if(t===this.length())return this.next}var n=this.clone()
|
|
1004
|
+
;return this.parent.insertBefore(n,this.next),
|
|
1005
|
+
this.children.forEachAt(t,this.length(),(function(t,r,o){
|
|
1006
|
+
t=t.split(r,e),n.appendChild(t)})),n},e.prototype.unwrap=function(){
|
|
1007
|
+
this.moveChildren(this.parent,this.next),this.remove()
|
|
1008
|
+
},e.prototype.update=function(t,e){var n=this,r=[],o=[];t.forEach((function(t){
|
|
1009
|
+
t.target===n.domNode&&"childList"===t.type&&(r.push.apply(r,t.addedNodes),
|
|
1010
|
+
o.push.apply(o,t.removedNodes))})),o.forEach((function(t){
|
|
1011
|
+
if(!(null!=t.parentNode&&"IFRAME"!==t.tagName&&document.body.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)){
|
|
1012
|
+
var e=a.find(t)
|
|
1013
|
+
;null!=e&&(null!=e.domNode.parentNode&&e.domNode.parentNode!==n.domNode||e.detach())
|
|
1014
|
+
}})),r.filter((function(t){return t.parentNode==n.domNode
|
|
1015
|
+
})).sort((function(t,e){
|
|
1016
|
+
return t===e?0:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1
|
|
1017
|
+
})).forEach((function(t){var e=null
|
|
1018
|
+
;null!=t.nextSibling&&(e=a.find(t.nextSibling));var r=u(t)
|
|
1019
|
+
;r.next==e&&null!=r.next||(null!=r.parent&&r.parent.removeChild(n),
|
|
1020
|
+
n.insertBefore(r,e||void 0))}))},e}(l.default);function u(t){var e=a.find(t)
|
|
1021
|
+
;if(null==e)try{e=a.create(t)}catch(n){
|
|
1022
|
+
e=a.create(a.Scope.INLINE),[].slice.call(t.childNodes).forEach((function(t){
|
|
1023
|
+
e.domNode.appendChild(t)
|
|
1024
|
+
})),t.parentNode&&t.parentNode.replaceChild(e.domNode,t),e.attach()}return e}
|
|
1025
|
+
e.default=s},function(t,e,n){
|
|
1026
|
+
var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]
|
|
1027
|
+
}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){
|
|
1028
|
+
for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){
|
|
1029
|
+
this.constructor=t}
|
|
1030
|
+
r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)})
|
|
1031
|
+
;Object.defineProperty(e,"__esModule",{value:!0})
|
|
1032
|
+
;var i=n(12),l=n(31),a=n(17),s=n(1),u=function(t){function e(e){
|
|
1033
|
+
var n=t.call(this,e)||this;return n.attributes=new l.default(n.domNode),n}
|
|
1034
|
+
return o(e,t),e.formats=function(t){
|
|
1035
|
+
return"string"==typeof this.tagName||(Array.isArray(this.tagName)?t.tagName.toLowerCase():void 0)
|
|
1036
|
+
},e.prototype.format=function(t,e){var n=s.query(t)
|
|
1037
|
+
;n instanceof i.default?this.attributes.attribute(n,e):e&&(null==n||t===this.statics.blotName&&this.formats()[t]===e||this.replaceWith(t,e))
|
|
1038
|
+
},e.prototype.formats=function(){
|
|
1039
|
+
var t=this.attributes.values(),e=this.statics.formats(this.domNode)
|
|
1040
|
+
;return null!=e&&(t[this.statics.blotName]=e),t
|
|
1041
|
+
},e.prototype.replaceWith=function(e,n){
|
|
1042
|
+
var r=t.prototype.replaceWith.call(this,e,n);return this.attributes.copy(r),r
|
|
1043
|
+
},e.prototype.update=function(e,n){var r=this;t.prototype.update.call(this,e,n),
|
|
1044
|
+
e.some((function(t){return t.target===r.domNode&&"attributes"===t.type
|
|
1045
|
+
}))&&this.attributes.build()},e.prototype.wrap=function(n,r){
|
|
1046
|
+
var o=t.prototype.wrap.call(this,n,r)
|
|
1047
|
+
;return o instanceof e&&o.statics.scope===this.statics.scope&&this.attributes.move(o),
|
|
1048
|
+
o},e}(a.default);e.default=u},function(t,e,n){
|
|
1049
|
+
var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]
|
|
1050
|
+
}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){
|
|
1051
|
+
for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){
|
|
1052
|
+
this.constructor=t}
|
|
1053
|
+
r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)})
|
|
1054
|
+
;Object.defineProperty(e,"__esModule",{value:!0})
|
|
1055
|
+
;var i=n(30),l=n(1),a=function(t){function e(){
|
|
1056
|
+
return null!==t&&t.apply(this,arguments)||this}
|
|
1057
|
+
return o(e,t),e.value=function(t){return!0},e.prototype.index=function(t,e){
|
|
1058
|
+
return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(e,1):-1
|
|
1059
|
+
},e.prototype.position=function(t,e){
|
|
1060
|
+
var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode)
|
|
1061
|
+
;return t>0&&(n+=1),[this.parent.domNode,n]},e.prototype.value=function(){var t
|
|
1062
|
+
;return(t={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,t
|
|
1063
|
+
},e.scope=l.Scope.INLINE_BLOT,e}(i.default);e.default=a},function(t,e,n){
|
|
1064
|
+
var r=n(11),o=n(3),i={attributes:{compose:function(t,e,n){
|
|
1065
|
+
"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var r=o(!0,{},e)
|
|
1066
|
+
;for(var i in n||(r=Object.keys(r).reduce((function(t,e){
|
|
1067
|
+
return null!=r[e]&&(t[e]=r[e]),t
|
|
1068
|
+
}),{})),t)void 0!==t[i]&&void 0===e[i]&&(r[i]=t[i])
|
|
1069
|
+
;return Object.keys(r).length>0?r:void 0},diff:function(t,e){
|
|
1070
|
+
"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={})
|
|
1071
|
+
;var n=Object.keys(t).concat(Object.keys(e)).reduce((function(n,o){
|
|
1072
|
+
return r(t[o],e[o])||(n[o]=void 0===e[o]?null:e[o]),n}),{})
|
|
1073
|
+
;return Object.keys(n).length>0?n:void 0},transform:function(t,e,n){
|
|
1074
|
+
if("object"!=typeof t)return e;if("object"==typeof e){if(!n)return e
|
|
1075
|
+
;var r=Object.keys(e).reduce((function(n,r){return void 0===t[r]&&(n[r]=e[r]),n
|
|
1076
|
+
}),{});return Object.keys(r).length>0?r:void 0}}},iterator:function(t){
|
|
1077
|
+
return new l(t)},length:function(t){
|
|
1078
|
+
return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"string"==typeof t.insert?t.insert.length:1
|
|
1079
|
+
}};function l(t){this.ops=t,this.index=0,this.offset=0}
|
|
1080
|
+
l.prototype.hasNext=function(){return this.peekLength()<1/0
|
|
1081
|
+
},l.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){
|
|
1082
|
+
var n=this.offset,r=i.length(e)
|
|
1083
|
+
;if(t>=r-n?(t=r-n,this.index+=1,this.offset=0):this.offset+=t,
|
|
1084
|
+
"number"==typeof e.delete)return{delete:t};var o={}
|
|
1085
|
+
;return e.attributes&&(o.attributes=e.attributes),
|
|
1086
|
+
"number"==typeof e.retain?o.retain=t:"string"==typeof e.insert?o.insert=e.insert.substr(n,t):o.insert=e.insert,
|
|
1087
|
+
o}return{retain:1/0}},l.prototype.peek=function(){return this.ops[this.index]
|
|
1088
|
+
},l.prototype.peekLength=function(){
|
|
1089
|
+
return this.ops[this.index]?i.length(this.ops[this.index])-this.offset:1/0
|
|
1090
|
+
},l.prototype.peekType=function(){
|
|
1091
|
+
return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"
|
|
1092
|
+
},l.prototype.rest=function(){if(this.hasNext()){
|
|
1093
|
+
if(0===this.offset)return this.ops.slice(this.index)
|
|
1094
|
+
;var t=this.offset,e=this.index,n=this.next(),r=this.ops.slice(this.index)
|
|
1095
|
+
;return this.offset=t,this.index=e,[n].concat(r)}return[]},t.exports=i
|
|
1096
|
+
},function(t,e){var n=function(){function t(t,e){return null!=e&&t instanceof e}
|
|
1097
|
+
var e,n,r;try{e=Map}catch(t){e=function(){}}try{n=Set}catch(t){n=function(){}}
|
|
1098
|
+
try{r=Promise}catch(t){r=function(){}}function o(i,a,s,u,c){
|
|
1099
|
+
"object"==typeof a&&(s=a.depth,
|
|
1100
|
+
u=a.prototype,c=a.includeNonEnumerable,a=a.circular)
|
|
1101
|
+
;var f=[],p=[],d="undefined"!=typeof Buffer
|
|
1102
|
+
;return void 0===a&&(a=!0),void 0===s&&(s=1/0),function i(s,h){
|
|
1103
|
+
if(null===s)return null;if(0===h)return s;var y,v;if("object"!=typeof s)return s
|
|
1104
|
+
;if(t(s,e))y=new e;else if(t(s,n))y=new n;else if(t(s,r))y=new r((function(t,e){
|
|
1105
|
+
s.then((function(e){t(i(e,h-1))}),(function(t){e(i(t,h-1))}))
|
|
1106
|
+
}));else if(o.__isArray(s))y=[];else if(o.__isRegExp(s))y=new RegExp(s.source,l(s)),
|
|
1107
|
+
s.lastIndex&&(y.lastIndex=s.lastIndex);else if(o.__isDate(s))y=new Date(s.getTime());else{
|
|
1108
|
+
if(d&&Buffer.isBuffer(s))return y=Buffer.allocUnsafe?Buffer.allocUnsafe(s.length):new Buffer(s.length),
|
|
1109
|
+
s.copy(y),y
|
|
1110
|
+
;t(s,Error)?y=Object.create(s):void 0===u?(v=Object.getPrototypeOf(s),
|
|
1111
|
+
y=Object.create(v)):(y=Object.create(u),v=u)}if(a){var b=f.indexOf(s)
|
|
1112
|
+
;if(-1!=b)return p[b];f.push(s),p.push(y)}
|
|
1113
|
+
for(var g in t(s,e)&&s.forEach((function(t,e){var n=i(e,h-1),r=i(t,h-1)
|
|
1114
|
+
;y.set(n,r)})),t(s,n)&&s.forEach((function(t){var e=i(t,h-1);y.add(e)})),s){
|
|
1115
|
+
var m
|
|
1116
|
+
;v&&(m=Object.getOwnPropertyDescriptor(v,g)),m&&null==m.set||(y[g]=i(s[g],h-1))}
|
|
1117
|
+
if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(s)
|
|
1118
|
+
;for(g=0;g<_.length;g++){var O=_[g]
|
|
1119
|
+
;(!(w=Object.getOwnPropertyDescriptor(s,O))||w.enumerable||c)&&(y[O]=i(s[O],h-1),
|
|
1120
|
+
w.enumerable||Object.defineProperty(y,O,{enumerable:!1}))}}if(c){
|
|
1121
|
+
var x=Object.getOwnPropertyNames(s);for(g=0;g<x.length;g++){var w,E=x[g]
|
|
1122
|
+
;(w=Object.getOwnPropertyDescriptor(s,E))&&w.enumerable||(y[E]=i(s[E],h-1),
|
|
1123
|
+
Object.defineProperty(y,E,{enumerable:!1}))}}return y}(i,s)}function i(t){
|
|
1124
|
+
return Object.prototype.toString.call(t)}function l(t){var e=""
|
|
1125
|
+
;return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),e}
|
|
1126
|
+
return o.clonePrototype=function(t){if(null===t)return null;var e=function(){}
|
|
1127
|
+
;return e.prototype=t,new e},o.__objToStr=i,o.__isDate=function(t){
|
|
1128
|
+
return"object"==typeof t&&"[object Date]"===i(t)},o.__isArray=function(t){
|
|
1129
|
+
return"object"==typeof t&&"[object Array]"===i(t)},o.__isRegExp=function(t){
|
|
1130
|
+
return"object"==typeof t&&"[object RegExp]"===i(t)},o.__getRegExpFlags=l,o}()
|
|
1131
|
+
;"object"==typeof t&&t.exports&&(t.exports=n)},function(t,e,n){
|
|
1132
|
+
Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e){
|
|
1133
|
+
if(Array.isArray(t))return t
|
|
1134
|
+
;if(Symbol.iterator in Object(t))return function(t,e){
|
|
1135
|
+
var n=[],r=!0,o=!1,i=void 0;try{
|
|
1136
|
+
for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),
|
|
1137
|
+
!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()
|
|
1138
|
+
}finally{if(o)throw i}}return n}(t,e)
|
|
1139
|
+
;throw new TypeError("Invalid attempt to destructure non-iterable instance")
|
|
1140
|
+
},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n]
|
|
1141
|
+
;r.enumerable=r.enumerable||!1,
|
|
1142
|
+
r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}
|
|
1143
|
+
}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}
|
|
1144
|
+
}(),i=function t(e,n,r){null===e&&(e=Function.prototype)
|
|
1145
|
+
;var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){
|
|
1146
|
+
var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}
|
|
1147
|
+
if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0
|
|
1148
|
+
},l=d(n(0)),a=d(n(8)),s=n(4),u=d(s),c=d(n(16)),f=d(n(13)),p=d(n(25))
|
|
1149
|
+
;function d(t){return t&&t.__esModule?t:{default:t}}function h(t){
|
|
1150
|
+
return t instanceof u.default||t instanceof s.BlockEmbed}var y=function(t){
|
|
1151
|
+
function e(t,n){!function(t,e){
|
|
1152
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")
|
|
1153
|
+
}(this,e);var r=function(t,e){
|
|
1154
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
1155
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e
|
|
1156
|
+
}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))
|
|
1157
|
+
;return r.emitter=n.emitter,
|
|
1158
|
+
Array.isArray(n.whitelist)&&(r.whitelist=n.whitelist.reduce((function(t,e){
|
|
1159
|
+
return t[e]=!0,t
|
|
1160
|
+
}),{})),r.domNode.addEventListener("DOMNodeInserted",(function(){})),
|
|
1161
|
+
r.optimize(),r.enable(),r}return function(t,e){
|
|
1162
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
1163
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
1164
|
+
writable:!0,configurable:!0}
|
|
1165
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)
|
|
1166
|
+
}(e,t),o(e,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",
|
|
1167
|
+
value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",
|
|
1168
|
+
value:function(t,n){
|
|
1169
|
+
var o=this.line(t),l=r(o,2),a=l[0],u=l[1],p=this.line(t+n),d=r(p,1)[0]
|
|
1170
|
+
;if(i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"deleteAt",this).call(this,t,n),
|
|
1171
|
+
null!=d&&a!==d&&u>0){
|
|
1172
|
+
if(a instanceof s.BlockEmbed||d instanceof s.BlockEmbed)return void this.optimize()
|
|
1173
|
+
;if(a instanceof f.default){var h=a.newlineIndex(a.length(),!0)
|
|
1174
|
+
;if(h>-1&&(a=a.split(h+1))===d)return void this.optimize()
|
|
1175
|
+
}else if(d instanceof f.default){var y=d.newlineIndex(0);y>-1&&d.split(y+1)}
|
|
1176
|
+
var v=d.children.head instanceof c.default?null:d.children.head
|
|
1177
|
+
;a.moveChildren(d,v),a.remove()}this.optimize()}},{key:"enable",
|
|
1178
|
+
value:function(){
|
|
1179
|
+
var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0]
|
|
1180
|
+
;this.domNode.setAttribute("contenteditable",t)}},{key:"formatAt",
|
|
1181
|
+
value:function(t,n,r,o){
|
|
1182
|
+
(null==this.whitelist||this.whitelist[r])&&(i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,r,o),
|
|
1183
|
+
this.optimize())}},{key:"insertAt",value:function(t,n,r){
|
|
1184
|
+
if(null==r||null==this.whitelist||this.whitelist[n]){
|
|
1185
|
+
if(t>=this.length())if(null==r||null==l.default.query(n,l.default.Scope.BLOCK)){
|
|
1186
|
+
var o=l.default.create(this.statics.defaultChild)
|
|
1187
|
+
;this.appendChild(o),null==r&&n.endsWith("\n")&&(n=n.slice(0,-1)),
|
|
1188
|
+
o.insertAt(0,n,r)}else{var a=l.default.create(n,r);this.appendChild(a)
|
|
1189
|
+
}else i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,r)
|
|
1190
|
+
;this.optimize()}}},{key:"insertBefore",value:function(t,n){
|
|
1191
|
+
if(t.statics.scope===l.default.Scope.INLINE_BLOT){
|
|
1192
|
+
var r=l.default.create(this.statics.defaultChild);r.appendChild(t),t=r}
|
|
1193
|
+
i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n)
|
|
1194
|
+
}},{key:"leaf",value:function(t){return this.path(t).pop()||[null,-1]}},{
|
|
1195
|
+
key:"line",value:function(t){
|
|
1196
|
+
return t===this.length()?this.line(t-1):this.descendant(h,t)}},{key:"lines",
|
|
1197
|
+
value:function(){return function t(e,n,r){var o=[],i=r
|
|
1198
|
+
;return e.children.forEachAt(n,r,(function(e,n,r){
|
|
1199
|
+
h(e)?o.push(e):e instanceof l.default.Container&&(o=o.concat(t(e,n,i))),i-=r})),
|
|
1200
|
+
o
|
|
1201
|
+
}(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE)
|
|
1202
|
+
}},{key:"optimize",value:function(){
|
|
1203
|
+
var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}
|
|
1204
|
+
;!0!==this.batch&&(i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t,n),
|
|
1205
|
+
t.length>0&&this.emitter.emit(a.default.events.SCROLL_OPTIMIZE,t,n))}},{
|
|
1206
|
+
key:"path",value:function(t){
|
|
1207
|
+
return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t).slice(1)
|
|
1208
|
+
}},{key:"update",value:function(t){if(!0!==this.batch){
|
|
1209
|
+
var n=a.default.sources.USER
|
|
1210
|
+
;"string"==typeof t&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),
|
|
1211
|
+
t.length>0&&this.emitter.emit(a.default.events.SCROLL_BEFORE_UPDATE,n,t),
|
|
1212
|
+
i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"update",this).call(this,t.concat([])),
|
|
1213
|
+
t.length>0&&this.emitter.emit(a.default.events.SCROLL_UPDATE,n,t)}}}]),e
|
|
1214
|
+
}(l.default.Scroll);y.blotName="scroll",y.className="ql-editor",y.tagName="DIV",
|
|
1215
|
+
y.defaultChild="block",
|
|
1216
|
+
y.allowedChildren=[u.default,s.BlockEmbed,p.default],e.default=y
|
|
1217
|
+
},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0
|
|
1218
|
+
}),e.SHORTKEY=e.default=void 0
|
|
1219
|
+
;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){
|
|
1220
|
+
return typeof t}:function(t){
|
|
1221
|
+
return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t
|
|
1222
|
+
},o=function(t,e){if(Array.isArray(t))return t
|
|
1223
|
+
;if(Symbol.iterator in Object(t))return function(t,e){
|
|
1224
|
+
var n=[],r=!0,o=!1,i=void 0;try{
|
|
1225
|
+
for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),
|
|
1226
|
+
!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()
|
|
1227
|
+
}finally{if(o)throw i}}return n}(t,e)
|
|
1228
|
+
;throw new TypeError("Invalid attempt to destructure non-iterable instance")
|
|
1229
|
+
},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n]
|
|
1230
|
+
;r.enumerable=r.enumerable||!1,
|
|
1231
|
+
r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}
|
|
1232
|
+
}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}
|
|
1233
|
+
}(),l=y(n(21)),a=y(n(11)),s=y(n(3)),u=y(n(2)),c=y(n(20)),f=y(n(0)),p=y(n(5)),d=y(n(10)),h=y(n(9))
|
|
1234
|
+
;function y(t){return t&&t.__esModule?t:{default:t}}function v(t,e,n){
|
|
1235
|
+
return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,
|
|
1236
|
+
writable:!0}):t[e]=n,t}
|
|
1237
|
+
var b=(0,d.default)("quill:keyboard"),g=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",m=function(t){
|
|
1238
|
+
function e(t,n){!function(t,e){
|
|
1239
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")
|
|
1240
|
+
}(this,e);var r=function(t,e){
|
|
1241
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
1242
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e
|
|
1243
|
+
}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))
|
|
1244
|
+
;return r.bindings={},Object.keys(r.options.bindings).forEach((function(e){
|
|
1245
|
+
("list autofill"!==e||null==t.scroll.whitelist||t.scroll.whitelist.list)&&r.options.bindings[e]&&r.addBinding(r.options.bindings[e])
|
|
1246
|
+
})),r.addBinding({key:e.keys.ENTER,shiftKey:null},E),r.addBinding({
|
|
1247
|
+
key:e.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null
|
|
1248
|
+
},(function(){})),/Firefox/i.test(navigator.userAgent)?(r.addBinding({
|
|
1249
|
+
key:e.keys.BACKSPACE},{collapsed:!0},O),r.addBinding({key:e.keys.DELETE},{
|
|
1250
|
+
collapsed:!0},x)):(r.addBinding({key:e.keys.BACKSPACE},{collapsed:!0,
|
|
1251
|
+
prefix:/^.?$/},O),r.addBinding({key:e.keys.DELETE},{collapsed:!0,suffix:/^.?$/
|
|
1252
|
+
},x)),r.addBinding({key:e.keys.BACKSPACE},{collapsed:!1},w),r.addBinding({
|
|
1253
|
+
key:e.keys.DELETE},{collapsed:!1},w),r.addBinding({key:e.keys.BACKSPACE,
|
|
1254
|
+
altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},O),
|
|
1255
|
+
r.listen(),r}return function(t,e){
|
|
1256
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
1257
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
1258
|
+
writable:!0,configurable:!0}
|
|
1259
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)
|
|
1260
|
+
}(e,t),i(e,null,[{key:"match",value:function(t,e){
|
|
1261
|
+
return e=j(e),!["altKey","ctrlKey","metaKey","shiftKey"].some((function(n){
|
|
1262
|
+
return!!e[n]!==t[n]&&null!==e[n]}))&&e.key===(t.which||t.keyCode)}}]),i(e,[{
|
|
1263
|
+
key:"addBinding",value:function(t){
|
|
1264
|
+
var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=j(t)
|
|
1265
|
+
;if(null==r||null==r.key)return b.warn("Attempted to add invalid keyboard binding",r)
|
|
1266
|
+
;"function"==typeof e&&(e={handler:e}),"function"==typeof n&&(n={handler:n
|
|
1267
|
+
}),r=(0,
|
|
1268
|
+
s.default)(r,e,n),this.bindings[r.key]=this.bindings[r.key]||[],this.bindings[r.key].push(r)
|
|
1269
|
+
}},{key:"listen",value:function(){var t=this
|
|
1270
|
+
;this.quill.root.addEventListener("keydown",(function(n){
|
|
1271
|
+
if(!n.defaultPrevented){
|
|
1272
|
+
var i=n.which||n.keyCode,l=(t.bindings[i]||[]).filter((function(t){
|
|
1273
|
+
return e.match(n,t)}));if(0!==l.length){var s=t.quill.getSelection()
|
|
1274
|
+
;if(null!=s&&t.quill.hasFocus()){
|
|
1275
|
+
var u=t.quill.getLine(s.index),c=o(u,2),p=c[0],d=c[1],h=t.quill.getLeaf(s.index),y=o(h,2),v=y[0],b=y[1],g=0===s.length?[v,b]:t.quill.getLeaf(s.index+s.length),m=o(g,2),_=m[0],O=m[1],x=v instanceof f.default.Text?v.value().slice(0,b):"",w=_ instanceof f.default.Text?_.value().slice(O):"",E={
|
|
1276
|
+
collapsed:0===s.length,empty:0===s.length&&p.length()<=1,
|
|
1277
|
+
format:t.quill.getFormat(s),offset:d,prefix:x,suffix:w};l.some((function(e){
|
|
1278
|
+
if(null!=e.collapsed&&e.collapsed!==E.collapsed)return!1
|
|
1279
|
+
;if(null!=e.empty&&e.empty!==E.empty)return!1
|
|
1280
|
+
;if(null!=e.offset&&e.offset!==E.offset)return!1;if(Array.isArray(e.format)){
|
|
1281
|
+
if(e.format.every((function(t){return null==E.format[t]})))return!1
|
|
1282
|
+
}else if("object"===r(e.format)&&!Object.keys(e.format).every((function(t){
|
|
1283
|
+
return!0===e.format[t]?null!=E.format[t]:!1===e.format[t]?null==E.format[t]:(0,
|
|
1284
|
+
a.default)(e.format[t],E.format[t])})))return!1
|
|
1285
|
+
;return!(null!=e.prefix&&!e.prefix.test(E.prefix)||null!=e.suffix&&!e.suffix.test(E.suffix)||!0===e.handler.call(t,s,E))
|
|
1286
|
+
}))&&n.preventDefault()}}}}))}}]),e}(h.default);function _(t,e){
|
|
1287
|
+
var n,r=t===m.keys.LEFT?"prefix":"suffix";return v(n={key:t,shiftKey:e,
|
|
1288
|
+
altKey:null},r,/^$/),v(n,"handler",(function(n){var r=n.index
|
|
1289
|
+
;t===m.keys.RIGHT&&(r+=n.length+1);var i=this.quill.getLeaf(r)
|
|
1290
|
+
;return!(o(i,1)[0]instanceof f.default.Embed&&(t===m.keys.LEFT?e?this.quill.setSelection(n.index-1,n.length+1,p.default.sources.USER):this.quill.setSelection(n.index-1,p.default.sources.USER):e?this.quill.setSelection(n.index,n.length+1,p.default.sources.USER):this.quill.setSelection(n.index+n.length+1,p.default.sources.USER),
|
|
1291
|
+
1))})),n}function O(t,e){if(!(0===t.index||this.quill.getLength()<=1)){
|
|
1292
|
+
var n=this.quill.getLine(t.index),r=o(n,1)[0],i={};if(0===e.offset){
|
|
1293
|
+
var l=this.quill.getLine(t.index-1),a=o(l,1)[0];if(null!=a&&a.length()>1){
|
|
1294
|
+
var s=r.formats(),u=this.quill.getFormat(t.index-1,1)
|
|
1295
|
+
;i=c.default.attributes.diff(s,u)||{}}}
|
|
1296
|
+
var f=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1
|
|
1297
|
+
;this.quill.deleteText(t.index-f,f,p.default.sources.USER),
|
|
1298
|
+
Object.keys(i).length>0&&this.quill.formatLine(t.index-f,f,i,p.default.sources.USER),
|
|
1299
|
+
this.quill.focus()}}function x(t,e){
|
|
1300
|
+
var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1
|
|
1301
|
+
;if(!(t.index>=this.quill.getLength()-n)){
|
|
1302
|
+
var r={},i=0,l=this.quill.getLine(t.index),a=o(l,1)[0]
|
|
1303
|
+
;if(e.offset>=a.length()-1){var s=this.quill.getLine(t.index+1),u=o(s,1)[0]
|
|
1304
|
+
;if(u){var f=a.formats(),d=this.quill.getFormat(t.index,1)
|
|
1305
|
+
;r=c.default.attributes.diff(f,d)||{},i=u.length()}}
|
|
1306
|
+
this.quill.deleteText(t.index,n,p.default.sources.USER),
|
|
1307
|
+
Object.keys(r).length>0&&this.quill.formatLine(t.index+i-1,n,r,p.default.sources.USER)
|
|
1308
|
+
}}function w(t){var e=this.quill.getLines(t),n={};if(e.length>1){
|
|
1309
|
+
var r=e[0].formats(),o=e[e.length-1].formats()
|
|
1310
|
+
;n=c.default.attributes.diff(o,r)||{}}
|
|
1311
|
+
this.quill.deleteText(t,p.default.sources.USER),
|
|
1312
|
+
Object.keys(n).length>0&&this.quill.formatLine(t.index,1,n,p.default.sources.USER),
|
|
1313
|
+
this.quill.setSelection(t.index,p.default.sources.SILENT),this.quill.focus()}
|
|
1314
|
+
function E(t,e){var n=this
|
|
1315
|
+
;t.length>0&&this.quill.scroll.deleteAt(t.index,t.length)
|
|
1316
|
+
;var r=Object.keys(e.format).reduce((function(t,n){
|
|
1317
|
+
return f.default.query(n,f.default.Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),
|
|
1318
|
+
t}),{})
|
|
1319
|
+
;this.quill.insertText(t.index,"\n",r,p.default.sources.USER),this.quill.setSelection(t.index+1,p.default.sources.SILENT),
|
|
1320
|
+
this.quill.focus(),Object.keys(e.format).forEach((function(t){
|
|
1321
|
+
null==r[t]&&(Array.isArray(e.format[t])||"link"!==t&&n.quill.format(t,e.format[t],p.default.sources.USER))
|
|
1322
|
+
}))}function k(t){return{key:m.keys.TAB,shiftKey:!t,format:{"code-block":!0},
|
|
1323
|
+
handler:function(e){
|
|
1324
|
+
var n=f.default.query("code-block"),r=e.index,i=e.length,l=this.quill.scroll.descendant(n,r),a=o(l,2),s=a[0],u=a[1]
|
|
1325
|
+
;if(null!=s){
|
|
1326
|
+
var c=this.quill.getIndex(s),d=s.newlineIndex(u,!0)+1,h=s.newlineIndex(c+u+i),y=s.domNode.textContent.slice(d,h).split("\n")
|
|
1327
|
+
;u=0,y.forEach((function(e,o){
|
|
1328
|
+
t?(s.insertAt(d+u,n.TAB),u+=n.TAB.length,0===o?r+=n.TAB.length:i+=n.TAB.length):e.startsWith(n.TAB)&&(s.deleteAt(d+u,n.TAB.length),
|
|
1329
|
+
u-=n.TAB.length,0===o?r-=n.TAB.length:i-=n.TAB.length),u+=e.length+1
|
|
1330
|
+
})),this.quill.update(p.default.sources.USER),
|
|
1331
|
+
this.quill.setSelection(r,i,p.default.sources.SILENT)}}}}function N(t){return{
|
|
1332
|
+
key:t[0].toUpperCase(),shortKey:!0,handler:function(e,n){
|
|
1333
|
+
this.quill.format(t,!n.format[t],p.default.sources.USER)}}}function j(t){
|
|
1334
|
+
if("string"==typeof t||"number"==typeof t)return j({key:t})
|
|
1335
|
+
;if("object"===(void 0===t?"undefined":r(t))&&(t=(0,
|
|
1336
|
+
l.default)(t,!1)),"string"==typeof t.key)if(null!=m.keys[t.key.toUpperCase()])t.key=m.keys[t.key.toUpperCase()];else{
|
|
1337
|
+
if(1!==t.key.length)return null;t.key=t.key.toUpperCase().charCodeAt(0)}
|
|
1338
|
+
return t.shortKey&&(t[g]=t.shortKey,delete t.shortKey),t}m.keys={BACKSPACE:8,
|
|
1339
|
+
TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},m.DEFAULTS={
|
|
1340
|
+
bindings:{bold:N("bold"),italic:N("italic"),underline:N("underline"),indent:{
|
|
1341
|
+
key:m.keys.TAB,format:["blockquote","indent","list"],handler:function(t,e){
|
|
1342
|
+
if(e.collapsed&&0!==e.offset)return!0
|
|
1343
|
+
;this.quill.format("indent","+1",p.default.sources.USER)}},outdent:{
|
|
1344
|
+
key:m.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],
|
|
1345
|
+
handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0
|
|
1346
|
+
;this.quill.format("indent","-1",p.default.sources.USER)}},"outdent backspace":{
|
|
1347
|
+
key:m.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,
|
|
1348
|
+
altKey:null,format:["indent","list"],offset:0,handler:function(t,e){
|
|
1349
|
+
null!=e.format.indent?this.quill.format("indent","-1",p.default.sources.USER):null!=e.format.list&&this.quill.format("list",!1,p.default.sources.USER)
|
|
1350
|
+
}},"indent code-block":k(!0),"outdent code-block":k(!1),"remove tab":{
|
|
1351
|
+
key:m.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t){
|
|
1352
|
+
this.quill.deleteText(t.index-1,1,p.default.sources.USER)}},tab:{key:m.keys.TAB,
|
|
1353
|
+
handler:function(t){this.quill.history.cutoff()
|
|
1354
|
+
;var e=(new u.default).retain(t.index).delete(t.length).insert("\t")
|
|
1355
|
+
;this.quill.updateContents(e,p.default.sources.USER),
|
|
1356
|
+
this.quill.history.cutoff(),
|
|
1357
|
+
this.quill.setSelection(t.index+1,p.default.sources.SILENT)}},
|
|
1358
|
+
"list empty enter":{key:m.keys.ENTER,collapsed:!0,format:["list"],empty:!0,
|
|
1359
|
+
handler:function(t,e){
|
|
1360
|
+
this.quill.format("list",!1,p.default.sources.USER),e.format.indent&&this.quill.format("indent",!1,p.default.sources.USER)
|
|
1361
|
+
}},"checklist enter":{key:m.keys.ENTER,collapsed:!0,format:{list:"checked"},
|
|
1362
|
+
handler:function(t){
|
|
1363
|
+
var e=this.quill.getLine(t.index),n=o(e,2),r=n[0],i=n[1],l=(0,
|
|
1364
|
+
s.default)({},r.formats(),{list:"checked"
|
|
1365
|
+
}),a=(new u.default).retain(t.index).insert("\n",l).retain(r.length()-i-1).retain(1,{
|
|
1366
|
+
list:"unchecked"})
|
|
1367
|
+
;this.quill.updateContents(a,p.default.sources.USER),this.quill.setSelection(t.index+1,p.default.sources.SILENT),
|
|
1368
|
+
this.quill.scrollIntoView()}},"header enter":{key:m.keys.ENTER,collapsed:!0,
|
|
1369
|
+
format:["header"],suffix:/^$/,handler:function(t,e){
|
|
1370
|
+
var n=this.quill.getLine(t.index),r=o(n,2),i=r[0],l=r[1],a=(new u.default).retain(t.index).insert("\n",e.format).retain(i.length()-l-1).retain(1,{
|
|
1371
|
+
header:null})
|
|
1372
|
+
;this.quill.updateContents(a,p.default.sources.USER),this.quill.setSelection(t.index+1,p.default.sources.SILENT),
|
|
1373
|
+
this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{
|
|
1374
|
+
list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(t,e){
|
|
1375
|
+
var n=e.prefix.length,r=this.quill.getLine(t.index),i=o(r,2),l=i[0],a=i[1]
|
|
1376
|
+
;if(a>n)return!0;var s=void 0;switch(e.prefix.trim()){case"[]":case"[ ]":
|
|
1377
|
+
s="unchecked";break;case"[x]":s="checked";break;case"-":case"*":s="bullet";break
|
|
1378
|
+
;default:s="ordered"}
|
|
1379
|
+
this.quill.insertText(t.index," ",p.default.sources.USER),this.quill.history.cutoff()
|
|
1380
|
+
;var c=(new u.default).retain(t.index-a).delete(n+1).retain(l.length()-2-a).retain(1,{
|
|
1381
|
+
list:s})
|
|
1382
|
+
;this.quill.updateContents(c,p.default.sources.USER),this.quill.history.cutoff(),
|
|
1383
|
+
this.quill.setSelection(t.index-n,p.default.sources.SILENT)}},"code exit":{
|
|
1384
|
+
key:m.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,
|
|
1385
|
+
suffix:/^\s+$/,handler:function(t){
|
|
1386
|
+
var e=this.quill.getLine(t.index),n=o(e,2),r=n[0],i=n[1],l=(new u.default).retain(t.index+r.length()-i-2).retain(1,{
|
|
1387
|
+
"code-block":null}).delete(1)
|
|
1388
|
+
;this.quill.updateContents(l,p.default.sources.USER)}},
|
|
1389
|
+
"embed left":_(m.keys.LEFT,!1),"embed left shift":_(m.keys.LEFT,!0),
|
|
1390
|
+
"embed right":_(m.keys.RIGHT,!1),"embed right shift":_(m.keys.RIGHT,!0)}
|
|
1391
|
+
},e.default=m,e.SHORTKEY=g},function(t,e,n){
|
|
1392
|
+
Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e){
|
|
1393
|
+
if(Array.isArray(t))return t
|
|
1394
|
+
;if(Symbol.iterator in Object(t))return function(t,e){
|
|
1395
|
+
var n=[],r=!0,o=!1,i=void 0;try{
|
|
1396
|
+
for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),
|
|
1397
|
+
!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()
|
|
1398
|
+
}finally{if(o)throw i}}return n}(t,e)
|
|
1399
|
+
;throw new TypeError("Invalid attempt to destructure non-iterable instance")
|
|
1400
|
+
},o=function t(e,n,r){null===e&&(e=Function.prototype)
|
|
1401
|
+
;var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){
|
|
1402
|
+
var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}
|
|
1403
|
+
if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0
|
|
1404
|
+
},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n]
|
|
1405
|
+
;r.enumerable=r.enumerable||!1,
|
|
1406
|
+
r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}
|
|
1407
|
+
}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}
|
|
1408
|
+
}(),l=s(n(0)),a=s(n(7));function s(t){return t&&t.__esModule?t:{default:t}}
|
|
1409
|
+
var u=function(t){function e(t,n){!function(t,e){
|
|
1410
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")
|
|
1411
|
+
}(this,e);var r=function(t,e){
|
|
1412
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
1413
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e
|
|
1414
|
+
}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))
|
|
1415
|
+
;return r.selection=n,
|
|
1416
|
+
r.textNode=document.createTextNode(e.CONTENTS),r.domNode.appendChild(r.textNode),
|
|
1417
|
+
r._length=0,r}return function(t,e){
|
|
1418
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
1419
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
1420
|
+
writable:!0,configurable:!0}
|
|
1421
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)
|
|
1422
|
+
}(e,t),i(e,null,[{key:"value",value:function(){}}]),i(e,[{key:"detach",
|
|
1423
|
+
value:function(){null!=this.parent&&this.parent.removeChild(this)}},{
|
|
1424
|
+
key:"format",value:function(t,n){
|
|
1425
|
+
if(0!==this._length)return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)
|
|
1426
|
+
;for(var r=this,i=0;null!=r&&r.statics.scope!==l.default.Scope.BLOCK_BLOT;)i+=r.offset(r.parent),
|
|
1427
|
+
r=r.parent
|
|
1428
|
+
;null!=r&&(this._length=e.CONTENTS.length,r.optimize(),r.formatAt(i,e.CONTENTS.length,t,n),
|
|
1429
|
+
this._length=0)}},{key:"index",value:function(t,n){
|
|
1430
|
+
return t===this.textNode?0:o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"index",this).call(this,t,n)
|
|
1431
|
+
}},{key:"length",value:function(){return this._length}},{key:"position",
|
|
1432
|
+
value:function(){return[this.textNode,this.textNode.data.length]}},{
|
|
1433
|
+
key:"remove",value:function(){
|
|
1434
|
+
o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"remove",this).call(this),
|
|
1435
|
+
this.parent=null}},{key:"restore",value:function(){
|
|
1436
|
+
if(!this.selection.composing&&null!=this.parent){
|
|
1437
|
+
var t=this.textNode,n=this.selection.getNativeRange(),o=void 0,i=void 0,s=void 0
|
|
1438
|
+
;if(null!=n&&n.start.node===t&&n.end.node===t){
|
|
1439
|
+
var u=[t,n.start.offset,n.end.offset];o=u[0],i=u[1],s=u[2]}
|
|
1440
|
+
for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode)
|
|
1441
|
+
;if(this.textNode.data!==e.CONTENTS){
|
|
1442
|
+
var c=this.textNode.data.split(e.CONTENTS).join("")
|
|
1443
|
+
;this.next instanceof a.default?(o=this.next.domNode,
|
|
1444
|
+
this.next.insertAt(0,c),this.textNode.data=e.CONTENTS):(this.textNode.data=c,
|
|
1445
|
+
this.parent.insertBefore(l.default.create(this.textNode),this),
|
|
1446
|
+
this.textNode=document.createTextNode(e.CONTENTS),
|
|
1447
|
+
this.domNode.appendChild(this.textNode))}if(this.remove(),null!=i){
|
|
1448
|
+
var f=[i,s].map((function(t){return Math.max(0,Math.min(o.data.length,t-1))
|
|
1449
|
+
})),p=r(f,2);return i=p[0],s=p[1],{startNode:o,startOffset:i,endNode:o,
|
|
1450
|
+
endOffset:s}}}}},{key:"update",value:function(t,e){var n=this
|
|
1451
|
+
;if(t.some((function(t){return"characterData"===t.type&&t.target===n.textNode
|
|
1452
|
+
}))){var r=this.restore();r&&(e.range=r)}}},{key:"value",value:function(){
|
|
1453
|
+
return""}}]),e}(l.default.Embed)
|
|
1454
|
+
;u.blotName="cursor",u.className="ql-cursor",u.tagName="span",
|
|
1455
|
+
u.CONTENTS="\ufeff",e.default=u},function(t,e,n){
|
|
1456
|
+
Object.defineProperty(e,"__esModule",{value:!0});var r=l(n(0)),o=n(4),i=l(o)
|
|
1457
|
+
;function l(t){return t&&t.__esModule?t:{default:t}}var a=function(t){
|
|
1458
|
+
function e(){return function(t,e){
|
|
1459
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")
|
|
1460
|
+
}(this,e),function(t,e){
|
|
1461
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
1462
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e
|
|
1463
|
+
}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}
|
|
1464
|
+
return function(t,e){
|
|
1465
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
1466
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
1467
|
+
writable:!0,configurable:!0}
|
|
1468
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e
|
|
1469
|
+
}(r.default.Container);a.allowedChildren=[i.default,o.BlockEmbed,a],e.default=a
|
|
1470
|
+
},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0
|
|
1471
|
+
}),e.ColorStyle=e.ColorClass=e.ColorAttributor=void 0;var r,o=function(){
|
|
1472
|
+
function t(t,e){for(var n=0;n<e.length;n++){var r=e[n]
|
|
1473
|
+
;r.enumerable=r.enumerable||!1,
|
|
1474
|
+
r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}
|
|
1475
|
+
}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}
|
|
1476
|
+
}(),i=function t(e,n,r){null===e&&(e=Function.prototype)
|
|
1477
|
+
;var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){
|
|
1478
|
+
var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}
|
|
1479
|
+
if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0
|
|
1480
|
+
},l=n(0),a=(r=l)&&r.__esModule?r:{default:r},s=function(t){function e(){
|
|
1481
|
+
return function(t,e){
|
|
1482
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")
|
|
1483
|
+
}(this,e),function(t,e){
|
|
1484
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
1485
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e
|
|
1486
|
+
}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}
|
|
1487
|
+
return function(t,e){
|
|
1488
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
1489
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
1490
|
+
writable:!0,configurable:!0}
|
|
1491
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)
|
|
1492
|
+
}(e,t),o(e,[{key:"value",value:function(t){
|
|
1493
|
+
var n=i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t)
|
|
1494
|
+
;return n.startsWith("rgb(")?(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),
|
|
1495
|
+
"#"+n.split(",").map((function(t){
|
|
1496
|
+
return("00"+parseInt(t).toString(16)).slice(-2)})).join("")):n}}]),e
|
|
1497
|
+
}(a.default.Attributor.Style),u=new a.default.Attributor.Class("color","ql-color",{
|
|
1498
|
+
scope:a.default.Scope.INLINE}),c=new s("color","color",{
|
|
1499
|
+
scope:a.default.Scope.INLINE});e.ColorAttributor=s,e.ColorClass=u,e.ColorStyle=c
|
|
1500
|
+
},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0
|
|
1501
|
+
}),e.sanitize=e.default=void 0;var r,o=function(){function t(t,e){
|
|
1502
|
+
for(var n=0;n<e.length;n++){var r=e[n]
|
|
1503
|
+
;r.enumerable=r.enumerable||!1,r.configurable=!0,
|
|
1504
|
+
"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}
|
|
1505
|
+
return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}
|
|
1506
|
+
}(),i=function t(e,n,r){null===e&&(e=Function.prototype)
|
|
1507
|
+
;var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){
|
|
1508
|
+
var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}
|
|
1509
|
+
if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0
|
|
1510
|
+
},l=n(6),a=function(t){function e(){return function(t,e){
|
|
1511
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")
|
|
1512
|
+
}(this,e),function(t,e){
|
|
1513
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
1514
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e
|
|
1515
|
+
}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}
|
|
1516
|
+
return function(t,e){
|
|
1517
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
1518
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
1519
|
+
writable:!0,configurable:!0}
|
|
1520
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)
|
|
1521
|
+
}(e,t),o(e,[{key:"format",value:function(t,n){
|
|
1522
|
+
if(t!==this.statics.blotName||!n)return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)
|
|
1523
|
+
;n=this.constructor.sanitize(n),this.domNode.setAttribute("href",n)}}],[{
|
|
1524
|
+
key:"create",value:function(t){
|
|
1525
|
+
var n=i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t)
|
|
1526
|
+
;return t=this.sanitize(t),
|
|
1527
|
+
n.setAttribute("href",t),n.setAttribute("rel","noopener noreferrer"),
|
|
1528
|
+
n.setAttribute("target","_blank"),n}},{key:"formats",value:function(t){
|
|
1529
|
+
return t.getAttribute("href")}},{key:"sanitize",value:function(t){
|
|
1530
|
+
return s(t,this.PROTOCOL_WHITELIST)?t:this.SANITIZED_URL}}]),e
|
|
1531
|
+
}(((r=l)&&r.__esModule?r:{default:r}).default);function s(t,e){
|
|
1532
|
+
var n=document.createElement("a");n.href=t
|
|
1533
|
+
;var r=n.href.slice(0,n.href.indexOf(":"));return e.indexOf(r)>-1}
|
|
1534
|
+
a.blotName="link",
|
|
1535
|
+
a.tagName="A",a.SANITIZED_URL="about:blank",a.PROTOCOL_WHITELIST=["http","https","mailto","tel"],
|
|
1536
|
+
e.default=a,e.sanitize=s},function(t,e,n){Object.defineProperty(e,"__esModule",{
|
|
1537
|
+
value:!0})
|
|
1538
|
+
;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){
|
|
1539
|
+
return typeof t}:function(t){
|
|
1540
|
+
return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t
|
|
1541
|
+
},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n]
|
|
1542
|
+
;r.enumerable=r.enumerable||!1,
|
|
1543
|
+
r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}
|
|
1544
|
+
}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}
|
|
1545
|
+
}(),i=a(n(23)),l=a(n(107));function a(t){return t&&t.__esModule?t:{default:t}}
|
|
1546
|
+
var s=0;function u(t,e){t.setAttribute(e,!("true"===t.getAttribute(e)))}
|
|
1547
|
+
var c=function(){function t(e){var n=this;!function(t,e){
|
|
1548
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")
|
|
1549
|
+
}(this,t),
|
|
1550
|
+
this.select=e,this.container=document.createElement("span"),this.buildPicker(),
|
|
1551
|
+
this.select.style.display="none",
|
|
1552
|
+
this.select.parentNode.insertBefore(this.container,this.select),
|
|
1553
|
+
this.label.addEventListener("mousedown",(function(){n.togglePicker()
|
|
1554
|
+
})),this.label.addEventListener("keydown",(function(t){switch(t.keyCode){
|
|
1555
|
+
case i.default.keys.ENTER:n.togglePicker();break;case i.default.keys.ESCAPE:
|
|
1556
|
+
n.escape(),t.preventDefault()}
|
|
1557
|
+
})),this.select.addEventListener("change",this.update.bind(this))}return o(t,[{
|
|
1558
|
+
key:"togglePicker",value:function(){
|
|
1559
|
+
this.container.classList.toggle("ql-expanded"),
|
|
1560
|
+
u(this.label,"aria-expanded"),u(this.options,"aria-hidden")}},{key:"buildItem",
|
|
1561
|
+
value:function(t){var e=this,n=document.createElement("span")
|
|
1562
|
+
;return n.tabIndex="0",
|
|
1563
|
+
n.setAttribute("role","button"),n.classList.add("ql-picker-item"),
|
|
1564
|
+
t.hasAttribute("value")&&n.setAttribute("data-value",t.getAttribute("value")),
|
|
1565
|
+
t.textContent&&n.setAttribute("data-label",t.textContent),
|
|
1566
|
+
n.addEventListener("click",(function(){e.selectItem(n,!0)
|
|
1567
|
+
})),n.addEventListener("keydown",(function(t){switch(t.keyCode){
|
|
1568
|
+
case i.default.keys.ENTER:e.selectItem(n,!0),t.preventDefault();break
|
|
1569
|
+
;case i.default.keys.ESCAPE:e.escape(),t.preventDefault()}})),n}},{
|
|
1570
|
+
key:"buildLabel",value:function(){var t=document.createElement("span")
|
|
1571
|
+
;return t.classList.add("ql-picker-label"),t.innerHTML=l.default,t.tabIndex="0",
|
|
1572
|
+
t.setAttribute("role","button"),
|
|
1573
|
+
t.setAttribute("aria-expanded","false"),this.container.appendChild(t),t}},{
|
|
1574
|
+
key:"buildOptions",value:function(){var t=this,e=document.createElement("span")
|
|
1575
|
+
;e.classList.add("ql-picker-options"),
|
|
1576
|
+
e.setAttribute("aria-hidden","true"),e.tabIndex="-1",
|
|
1577
|
+
e.id="ql-picker-options-"+s,
|
|
1578
|
+
s+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,
|
|
1579
|
+
[].slice.call(this.select.options).forEach((function(n){var r=t.buildItem(n)
|
|
1580
|
+
;e.appendChild(r),!0===n.selected&&t.selectItem(r)
|
|
1581
|
+
})),this.container.appendChild(e)}},{key:"buildPicker",value:function(){
|
|
1582
|
+
var t=this;[].slice.call(this.select.attributes).forEach((function(e){
|
|
1583
|
+
t.container.setAttribute(e.name,e.value)
|
|
1584
|
+
})),this.container.classList.add("ql-picker"),
|
|
1585
|
+
this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",
|
|
1586
|
+
value:function(){var t=this;this.close(),setTimeout((function(){
|
|
1587
|
+
return t.label.focus()}),1)}},{key:"close",value:function(){
|
|
1588
|
+
this.container.classList.remove("ql-expanded"),
|
|
1589
|
+
this.label.setAttribute("aria-expanded","false"),
|
|
1590
|
+
this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",
|
|
1591
|
+
value:function(t){
|
|
1592
|
+
var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected")
|
|
1593
|
+
;if(t!==n&&(null!=n&&n.classList.remove("ql-selected"),
|
|
1594
|
+
null!=t&&(t.classList.add("ql-selected"),
|
|
1595
|
+
this.select.selectedIndex=[].indexOf.call(t.parentNode.children,t),
|
|
1596
|
+
t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),
|
|
1597
|
+
t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),
|
|
1598
|
+
e))){
|
|
1599
|
+
if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"==typeof Event?"undefined":r(Event))){
|
|
1600
|
+
var o=document.createEvent("Event")
|
|
1601
|
+
;o.initEvent("change",!0,!0),this.select.dispatchEvent(o)}this.close()}}},{
|
|
1602
|
+
key:"update",value:function(){var t=void 0;if(this.select.selectedIndex>-1){
|
|
1603
|
+
var e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex]
|
|
1604
|
+
;t=this.select.options[this.select.selectedIndex],this.selectItem(e)
|
|
1605
|
+
}else this.selectItem(null)
|
|
1606
|
+
;var n=null!=t&&t!==this.select.querySelector("option[selected]")
|
|
1607
|
+
;this.label.classList.toggle("ql-active",n)}}]),t}();e.default=c
|
|
1608
|
+
},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0})
|
|
1609
|
+
;var r=b(n(0)),o=b(n(5)),i=n(4),l=b(i),a=b(n(16)),s=b(n(25)),u=b(n(24)),c=b(n(35)),f=b(n(6)),p=b(n(22)),d=b(n(7)),h=b(n(55)),y=b(n(42)),v=b(n(23))
|
|
1610
|
+
;function b(t){return t&&t.__esModule?t:{default:t}}o.default.register({
|
|
1611
|
+
"blots/block":l.default,"blots/block/embed":i.BlockEmbed,
|
|
1612
|
+
"blots/break":a.default,"blots/container":s.default,"blots/cursor":u.default,
|
|
1613
|
+
"blots/embed":c.default,"blots/inline":f.default,"blots/scroll":p.default,
|
|
1614
|
+
"blots/text":d.default,"modules/clipboard":h.default,
|
|
1615
|
+
"modules/history":y.default,"modules/keyboard":v.default
|
|
1616
|
+
}),r.default.register(l.default,a.default,u.default,f.default,p.default,d.default),
|
|
1617
|
+
e.default=o.default},function(t,e,n){Object.defineProperty(e,"__esModule",{
|
|
1618
|
+
value:!0});var r=n(1),o=function(){function t(t){
|
|
1619
|
+
this.domNode=t,this.domNode[r.DATA_KEY]={blot:this}}
|
|
1620
|
+
return Object.defineProperty(t.prototype,"statics",{get:function(){
|
|
1621
|
+
return this.constructor},enumerable:!0,configurable:!0}),t.create=function(t){
|
|
1622
|
+
if(null==this.tagName)throw new r.ParchmentError("Blot definition missing tagName")
|
|
1623
|
+
;var e
|
|
1624
|
+
;return Array.isArray(this.tagName)?("string"==typeof t&&(t=t.toUpperCase(),
|
|
1625
|
+
parseInt(t).toString()===t&&(t=parseInt(t))),
|
|
1626
|
+
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),
|
|
1627
|
+
this.className&&e.classList.add(this.className),e
|
|
1628
|
+
},t.prototype.attach=function(){
|
|
1629
|
+
null!=this.parent&&(this.scroll=this.parent.scroll)
|
|
1630
|
+
},t.prototype.clone=function(){var t=this.domNode.cloneNode(!1)
|
|
1631
|
+
;return r.create(t)},t.prototype.detach=function(){
|
|
1632
|
+
null!=this.parent&&this.parent.removeChild(this),delete this.domNode[r.DATA_KEY]
|
|
1633
|
+
},t.prototype.deleteAt=function(t,e){this.isolate(t,e).remove()
|
|
1634
|
+
},t.prototype.formatAt=function(t,e,n,o){var i=this.isolate(t,e)
|
|
1635
|
+
;if(null!=r.query(n,r.Scope.BLOT)&&o)i.wrap(n,o);else if(null!=r.query(n,r.Scope.ATTRIBUTE)){
|
|
1636
|
+
var l=r.create(this.statics.scope);i.wrap(l),l.format(n,o)}
|
|
1637
|
+
},t.prototype.insertAt=function(t,e,n){
|
|
1638
|
+
var o=null==n?r.create("text",e):r.create(e,n),i=this.split(t)
|
|
1639
|
+
;this.parent.insertBefore(o,i)},t.prototype.insertInto=function(t,e){
|
|
1640
|
+
void 0===e&&(e=null),null!=this.parent&&this.parent.children.remove(this)
|
|
1641
|
+
;var n=null
|
|
1642
|
+
;t.children.insertBefore(this,e),null!=e&&(n=e.domNode),this.domNode.parentNode==t.domNode&&this.domNode.nextSibling==n||t.domNode.insertBefore(this.domNode,n),
|
|
1643
|
+
this.parent=t,this.attach()},t.prototype.isolate=function(t,e){
|
|
1644
|
+
var n=this.split(t);return n.split(e),n},t.prototype.length=function(){return 1
|
|
1645
|
+
},t.prototype.offset=function(t){
|
|
1646
|
+
return void 0===t&&(t=this.parent),null==this.parent||this==t?0:this.parent.children.offset(this)+this.parent.offset(t)
|
|
1647
|
+
},t.prototype.optimize=function(t){
|
|
1648
|
+
null!=this.domNode[r.DATA_KEY]&&delete this.domNode[r.DATA_KEY].mutations
|
|
1649
|
+
},t.prototype.remove=function(){
|
|
1650
|
+
null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),
|
|
1651
|
+
this.detach()},t.prototype.replace=function(t){
|
|
1652
|
+
null!=t.parent&&(t.parent.insertBefore(this,t.next),t.remove())
|
|
1653
|
+
},t.prototype.replaceWith=function(t,e){var n="string"==typeof t?r.create(t,e):t
|
|
1654
|
+
;return n.replace(this),n},t.prototype.split=function(t,e){
|
|
1655
|
+
return 0===t?this:this.next
|
|
1656
|
+
},t.prototype.update=function(t,e){},t.prototype.wrap=function(t,e){
|
|
1657
|
+
var n="string"==typeof t?r.create(t,e):t
|
|
1658
|
+
;return null!=this.parent&&this.parent.insertBefore(n,this.next),
|
|
1659
|
+
n.appendChild(this),n},t.blotName="abstract",t}();e.default=o},function(t,e,n){
|
|
1660
|
+
Object.defineProperty(e,"__esModule",{value:!0})
|
|
1661
|
+
;var r=n(12),o=n(32),i=n(33),l=n(1),a=function(){function t(t){
|
|
1662
|
+
this.attributes={},this.domNode=t,this.build()}
|
|
1663
|
+
return t.prototype.attribute=function(t,e){
|
|
1664
|
+
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),
|
|
1665
|
+
delete this.attributes[t.attrName])},t.prototype.build=function(){var t=this
|
|
1666
|
+
;this.attributes={}
|
|
1667
|
+
;var e=r.default.keys(this.domNode),n=o.default.keys(this.domNode),a=i.default.keys(this.domNode)
|
|
1668
|
+
;e.concat(n).concat(a).forEach((function(e){var n=l.query(e,l.Scope.ATTRIBUTE)
|
|
1669
|
+
;n instanceof r.default&&(t.attributes[n.attrName]=n)}))
|
|
1670
|
+
},t.prototype.copy=function(t){var e=this
|
|
1671
|
+
;Object.keys(this.attributes).forEach((function(n){
|
|
1672
|
+
var r=e.attributes[n].value(e.domNode);t.format(n,r)}))
|
|
1673
|
+
},t.prototype.move=function(t){var e=this
|
|
1674
|
+
;this.copy(t),Object.keys(this.attributes).forEach((function(t){
|
|
1675
|
+
e.attributes[t].remove(e.domNode)})),this.attributes={}
|
|
1676
|
+
},t.prototype.values=function(){var t=this
|
|
1677
|
+
;return Object.keys(this.attributes).reduce((function(e,n){
|
|
1678
|
+
return e[n]=t.attributes[n].value(t.domNode),e}),{})},t}();e.default=a
|
|
1679
|
+
},function(t,e,n){var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{
|
|
1680
|
+
__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){
|
|
1681
|
+
for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){
|
|
1682
|
+
this.constructor=t}
|
|
1683
|
+
r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)})
|
|
1684
|
+
;function i(t,e){
|
|
1685
|
+
return(t.getAttribute("class")||"").split(/\s+/).filter((function(t){
|
|
1686
|
+
return 0===t.indexOf(e+"-")}))}Object.defineProperty(e,"__esModule",{value:!0})
|
|
1687
|
+
;var l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}
|
|
1688
|
+
return o(e,t),e.keys=function(t){
|
|
1689
|
+
return(t.getAttribute("class")||"").split(/\s+/).map((function(t){
|
|
1690
|
+
return t.split("-").slice(0,-1).join("-")}))},e.prototype.add=function(t,e){
|
|
1691
|
+
return!!this.canAdd(t,e)&&(this.remove(t),
|
|
1692
|
+
t.classList.add(this.keyName+"-"+e),!0)},e.prototype.remove=function(t){
|
|
1693
|
+
i(t,this.keyName).forEach((function(e){t.classList.remove(e)
|
|
1694
|
+
})),0===t.classList.length&&t.removeAttribute("class")
|
|
1695
|
+
},e.prototype.value=function(t){
|
|
1696
|
+
var e=(i(t,this.keyName)[0]||"").slice(this.keyName.length+1)
|
|
1697
|
+
;return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=l},function(t,e,n){
|
|
1698
|
+
var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]
|
|
1699
|
+
}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){
|
|
1700
|
+
for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){
|
|
1701
|
+
this.constructor=t}
|
|
1702
|
+
r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)})
|
|
1703
|
+
;function i(t){var e=t.split("-"),n=e.slice(1).map((function(t){
|
|
1704
|
+
return t[0].toUpperCase()+t.slice(1)})).join("");return e[0]+n}
|
|
1705
|
+
Object.defineProperty(e,"__esModule",{value:!0});var l=function(t){function e(){
|
|
1706
|
+
return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.keys=function(t){
|
|
1707
|
+
return(t.getAttribute("style")||"").split(";").map((function(t){
|
|
1708
|
+
return t.split(":")[0].trim()}))},e.prototype.add=function(t,e){
|
|
1709
|
+
return!!this.canAdd(t,e)&&(t.style[i(this.keyName)]=e,!0)
|
|
1710
|
+
},e.prototype.remove=function(t){
|
|
1711
|
+
t.style[i(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")
|
|
1712
|
+
},e.prototype.value=function(t){var e=t.style[i(this.keyName)]
|
|
1713
|
+
;return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=l},function(t,e,n){
|
|
1714
|
+
Object.defineProperty(e,"__esModule",{value:!0});var r=function(){
|
|
1715
|
+
function t(t,e){for(var n=0;n<e.length;n++){var r=e[n]
|
|
1716
|
+
;r.enumerable=r.enumerable||!1,
|
|
1717
|
+
r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}
|
|
1718
|
+
}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){
|
|
1719
|
+
function t(e,n){!function(t,e){
|
|
1720
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")
|
|
1721
|
+
}(this,t),this.quill=e,this.options=n,this.modules={}}return r(t,[{key:"init",
|
|
1722
|
+
value:function(){var t=this
|
|
1723
|
+
;Object.keys(this.options.modules).forEach((function(e){
|
|
1724
|
+
null==t.modules[e]&&t.addModule(e)}))}},{key:"addModule",value:function(t){
|
|
1725
|
+
var e=this.quill.constructor.import("modules/"+t)
|
|
1726
|
+
;return this.modules[t]=new e(this.quill,this.options.modules[t]||{}),
|
|
1727
|
+
this.modules[t]}}]),t}();o.DEFAULTS={modules:{}},o.themes={default:o
|
|
1728
|
+
},e.default=o},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0})
|
|
1729
|
+
;var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n]
|
|
1730
|
+
;r.enumerable=r.enumerable||!1,
|
|
1731
|
+
r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}
|
|
1732
|
+
}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}
|
|
1733
|
+
}(),o=function t(e,n,r){null===e&&(e=Function.prototype)
|
|
1734
|
+
;var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){
|
|
1735
|
+
var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}
|
|
1736
|
+
if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0
|
|
1737
|
+
},i=a(n(0)),l=a(n(7));function a(t){return t&&t.__esModule?t:{default:t}}
|
|
1738
|
+
var s="\ufeff",u=function(t){function e(t){!function(t,e){
|
|
1739
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")
|
|
1740
|
+
}(this,e);var n=function(t,e){
|
|
1741
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
1742
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e
|
|
1743
|
+
}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))
|
|
1744
|
+
;return n.contentNode=document.createElement("span"),
|
|
1745
|
+
n.contentNode.setAttribute("contenteditable",!1),
|
|
1746
|
+
[].slice.call(n.domNode.childNodes).forEach((function(t){
|
|
1747
|
+
n.contentNode.appendChild(t)
|
|
1748
|
+
})),n.leftGuard=document.createTextNode(s),n.rightGuard=document.createTextNode(s),
|
|
1749
|
+
n.domNode.appendChild(n.leftGuard),
|
|
1750
|
+
n.domNode.appendChild(n.contentNode),n.domNode.appendChild(n.rightGuard),n}
|
|
1751
|
+
return function(t,e){
|
|
1752
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
1753
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
1754
|
+
writable:!0,configurable:!0}
|
|
1755
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)
|
|
1756
|
+
}(e,t),r(e,[{key:"index",value:function(t,n){
|
|
1757
|
+
return t===this.leftGuard?0:t===this.rightGuard?1:o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"index",this).call(this,t,n)
|
|
1758
|
+
}},{key:"restore",value:function(t){
|
|
1759
|
+
var e=void 0,n=void 0,r=t.data.split(s).join("")
|
|
1760
|
+
;if(t===this.leftGuard)if(this.prev instanceof l.default){
|
|
1761
|
+
var o=this.prev.length();this.prev.insertAt(o,r),e={startNode:this.prev.domNode,
|
|
1762
|
+
startOffset:o+r.length}
|
|
1763
|
+
}else n=document.createTextNode(r),this.parent.insertBefore(i.default.create(n),this),
|
|
1764
|
+
e={startNode:n,startOffset:r.length
|
|
1765
|
+
};else t===this.rightGuard&&(this.next instanceof l.default?(this.next.insertAt(0,r),
|
|
1766
|
+
e={startNode:this.next.domNode,startOffset:r.length
|
|
1767
|
+
}):(n=document.createTextNode(r),
|
|
1768
|
+
this.parent.insertBefore(i.default.create(n),this.next),e={startNode:n,
|
|
1769
|
+
startOffset:r.length}));return t.data=s,e}},{key:"update",value:function(t,e){
|
|
1770
|
+
var n=this;t.forEach((function(t){
|
|
1771
|
+
if("characterData"===t.type&&(t.target===n.leftGuard||t.target===n.rightGuard)){
|
|
1772
|
+
var r=n.restore(t.target);r&&(e.range=r)}}))}}]),e}(i.default.Embed);e.default=u
|
|
1773
|
+
},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0
|
|
1774
|
+
}),e.AlignStyle=e.AlignClass=e.AlignAttribute=void 0
|
|
1775
|
+
;var r,o=n(0),i=(r=o)&&r.__esModule?r:{default:r},l={
|
|
1776
|
+
scope:i.default.Scope.BLOCK,whitelist:["right","center","justify"]
|
|
1777
|
+
},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)
|
|
1778
|
+
;e.AlignAttribute=a,e.AlignClass=s,e.AlignStyle=u},function(t,e,n){
|
|
1779
|
+
Object.defineProperty(e,"__esModule",{value:!0
|
|
1780
|
+
}),e.BackgroundStyle=e.BackgroundClass=void 0
|
|
1781
|
+
;var r,o=n(0),i=(r=o)&&r.__esModule?r:{default:r
|
|
1782
|
+
},l=n(26),a=new i.default.Attributor.Class("background","ql-bg",{
|
|
1783
|
+
scope:i.default.Scope.INLINE
|
|
1784
|
+
}),s=new l.ColorAttributor("background","background-color",{
|
|
1785
|
+
scope:i.default.Scope.INLINE});e.BackgroundClass=a,e.BackgroundStyle=s
|
|
1786
|
+
},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0
|
|
1787
|
+
}),e.DirectionStyle=e.DirectionClass=e.DirectionAttribute=void 0
|
|
1788
|
+
;var r,o=n(0),i=(r=o)&&r.__esModule?r:{default:r},l={
|
|
1789
|
+
scope:i.default.Scope.BLOCK,whitelist:["rtl"]
|
|
1790
|
+
},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)
|
|
1791
|
+
;e.DirectionAttribute=a,e.DirectionClass=s,e.DirectionStyle=u},function(t,e,n){
|
|
1792
|
+
Object.defineProperty(e,"__esModule",{value:!0}),e.FontClass=e.FontStyle=void 0
|
|
1793
|
+
;var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n]
|
|
1794
|
+
;r.enumerable=r.enumerable||!1,
|
|
1795
|
+
r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}
|
|
1796
|
+
}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}
|
|
1797
|
+
}(),i=function t(e,n,r){null===e&&(e=Function.prototype)
|
|
1798
|
+
;var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){
|
|
1799
|
+
var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}
|
|
1800
|
+
if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0
|
|
1801
|
+
},l=n(0),a=(r=l)&&r.__esModule?r:{default:r},s={scope:a.default.Scope.INLINE,
|
|
1802
|
+
whitelist:["serif","monospace"]
|
|
1803
|
+
},u=new a.default.Attributor.Class("font","ql-font",s),c=function(t){
|
|
1804
|
+
function e(){return function(t,e){
|
|
1805
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")
|
|
1806
|
+
}(this,e),function(t,e){
|
|
1807
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
1808
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e
|
|
1809
|
+
}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}
|
|
1810
|
+
return function(t,e){
|
|
1811
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
1812
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
1813
|
+
writable:!0,configurable:!0}
|
|
1814
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)
|
|
1815
|
+
}(e,t),o(e,[{key:"value",value:function(t){
|
|
1816
|
+
return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t).replace(/["']/g,"")
|
|
1817
|
+
}}]),e}(a.default.Attributor.Style),f=new c("font","font-family",s)
|
|
1818
|
+
;e.FontStyle=f,e.FontClass=u},function(t,e,n){
|
|
1819
|
+
Object.defineProperty(e,"__esModule",{value:!0}),e.SizeStyle=e.SizeClass=void 0
|
|
1820
|
+
;var r,o=n(0),i=(r=o)&&r.__esModule?r:{default:r
|
|
1821
|
+
},l=new i.default.Attributor.Class("size","ql-size",{
|
|
1822
|
+
scope:i.default.Scope.INLINE,whitelist:["small","large","huge"]
|
|
1823
|
+
}),a=new i.default.Attributor.Style("size","font-size",{
|
|
1824
|
+
scope:i.default.Scope.INLINE,whitelist:["10px","18px","32px"]})
|
|
1825
|
+
;e.SizeClass=l,e.SizeStyle=a},function(t,e,n){t.exports={align:{"":n(76),
|
|
1826
|
+
center:n(77),right:n(78),justify:n(79)},background:n(80),blockquote:n(81),
|
|
1827
|
+
bold:n(82),clean:n(83),code:n(58),"code-block":n(58),color:n(84),direction:{
|
|
1828
|
+
"":n(85),rtl:n(86)},float:{center:n(87),full:n(88),left:n(89),right:n(90)},
|
|
1829
|
+
formula:n(91),header:{1:n(92),2:n(93)},italic:n(94),image:n(95),indent:{
|
|
1830
|
+
"+1":n(96),"-1":n(97)},link:n(98),list:{ordered:n(99),bullet:n(100),check:n(101)
|
|
1831
|
+
},script:{sub:n(102),super:n(103)},strike:n(104),underline:n(105),video:n(106)}
|
|
1832
|
+
},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0
|
|
1833
|
+
}),e.getLastChangeIndex=e.default=void 0;var r=function(){function t(t,e){
|
|
1834
|
+
for(var n=0;n<e.length;n++){var r=e[n]
|
|
1835
|
+
;r.enumerable=r.enumerable||!1,r.configurable=!0,
|
|
1836
|
+
"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}
|
|
1837
|
+
return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}
|
|
1838
|
+
}(),o=l(n(0)),i=l(n(5));function l(t){return t&&t.__esModule?t:{default:t}}
|
|
1839
|
+
var a=function(t){function e(t,n){!function(t,e){
|
|
1840
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")
|
|
1841
|
+
}(this,e);var r=function(t,e){
|
|
1842
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
1843
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e
|
|
1844
|
+
}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))
|
|
1845
|
+
;return r.lastRecorded=0,
|
|
1846
|
+
r.ignoreChange=!1,r.clear(),r.quill.on(i.default.events.EDITOR_CHANGE,(function(t,e,n,o){
|
|
1847
|
+
t!==i.default.events.TEXT_CHANGE||r.ignoreChange||(r.options.userOnly&&o!==i.default.sources.USER?r.transform(e):r.record(e,n))
|
|
1848
|
+
})),r.quill.keyboard.addBinding({key:"Z",shortKey:!0
|
|
1849
|
+
},r.undo.bind(r)),r.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0
|
|
1850
|
+
},r.redo.bind(r)),/Win/i.test(navigator.platform)&&r.quill.keyboard.addBinding({
|
|
1851
|
+
key:"Y",shortKey:!0},r.redo.bind(r)),r}return function(t,e){
|
|
1852
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
1853
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
1854
|
+
writable:!0,configurable:!0}
|
|
1855
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)
|
|
1856
|
+
}(e,t),r(e,[{key:"change",value:function(t,e){if(0!==this.stack[t].length){
|
|
1857
|
+
var n=this.stack[t].pop()
|
|
1858
|
+
;this.stack[e].push(n),this.lastRecorded=0,this.ignoreChange=!0,
|
|
1859
|
+
this.quill.updateContents(n[t],i.default.sources.USER),this.ignoreChange=!1
|
|
1860
|
+
;var r=s(n[t]);this.quill.setSelection(r)}}},{key:"clear",value:function(){
|
|
1861
|
+
this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){
|
|
1862
|
+
this.lastRecorded=0}},{key:"record",value:function(t,e){if(0!==t.ops.length){
|
|
1863
|
+
this.stack.redo=[];var n=this.quill.getContents().diff(e),r=Date.now()
|
|
1864
|
+
;if(this.lastRecorded+this.options.delay>r&&this.stack.undo.length>0){
|
|
1865
|
+
var o=this.stack.undo.pop();n=n.compose(o.undo),t=o.redo.compose(t)
|
|
1866
|
+
}else this.lastRecorded=r;this.stack.undo.push({redo:t,undo:n
|
|
1867
|
+
}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{
|
|
1868
|
+
key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",
|
|
1869
|
+
value:function(t){this.stack.undo.forEach((function(e){
|
|
1870
|
+
e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)
|
|
1871
|
+
})),this.stack.redo.forEach((function(e){
|
|
1872
|
+
e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)}))}},{key:"undo",
|
|
1873
|
+
value:function(){this.change("undo","redo")}}]),e}(l(n(9)).default)
|
|
1874
|
+
;function s(t){var e=t.reduce((function(t,e){return t+=e.delete||0
|
|
1875
|
+
}),0),n=t.length()-e;return function(t){var e=t.ops[t.ops.length-1]
|
|
1876
|
+
;return null!=e&&(null!=e.insert?"string"==typeof e.insert&&e.insert.endsWith("\n"):null!=e.attributes&&Object.keys(e.attributes).some((function(t){
|
|
1877
|
+
return null!=o.default.query(t,o.default.Scope.BLOCK)})))}(t)&&(n-=1),n}
|
|
1878
|
+
a.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1
|
|
1879
|
+
},e.default=a,e.getLastChangeIndex=s},function(t,e,n){
|
|
1880
|
+
Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BaseTooltip=void 0
|
|
1881
|
+
;var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n]
|
|
1882
|
+
;r.enumerable=r.enumerable||!1,
|
|
1883
|
+
r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}
|
|
1884
|
+
}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}
|
|
1885
|
+
}(),o=function t(e,n,r){null===e&&(e=Function.prototype)
|
|
1886
|
+
;var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){
|
|
1887
|
+
var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}
|
|
1888
|
+
if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0
|
|
1889
|
+
},i=h(n(3)),l=h(n(2)),a=h(n(8)),s=h(n(23)),u=h(n(34)),c=h(n(59)),f=h(n(60)),p=h(n(28)),d=h(n(61))
|
|
1890
|
+
;function h(t){return t&&t.__esModule?t:{default:t}}function y(t,e){
|
|
1891
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}
|
|
1892
|
+
function v(t,e){
|
|
1893
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
1894
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function b(t,e){
|
|
1895
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
1896
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
1897
|
+
writable:!0,configurable:!0}
|
|
1898
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}
|
|
1899
|
+
var g=[!1,"center","right","justify"],m=["#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"],_=[!1,"serif","monospace"],O=["1","2","3",!1],x=["small",!1,"large","huge"],w=function(t){
|
|
1900
|
+
function e(t,n){y(this,e)
|
|
1901
|
+
;var r=v(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))
|
|
1902
|
+
;return t.emitter.listenDOM("click",document.body,(function e(n){
|
|
1903
|
+
if(!document.body.contains(t.root))return document.body.removeEventListener("click",e)
|
|
1904
|
+
;null==r.tooltip||r.tooltip.root.contains(n.target)||document.activeElement===r.tooltip.textbox||r.quill.hasFocus()||r.tooltip.hide(),
|
|
1905
|
+
null!=r.pickers&&r.pickers.forEach((function(t){
|
|
1906
|
+
t.container.contains(n.target)||t.close()}))})),r}return b(e,t),r(e,[{
|
|
1907
|
+
key:"addModule",value:function(t){
|
|
1908
|
+
var n=o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"addModule",this).call(this,t)
|
|
1909
|
+
;return"toolbar"===t&&this.extendToolbar(n),n}},{key:"buildButtons",
|
|
1910
|
+
value:function(t,e){t.forEach((function(t){
|
|
1911
|
+
(t.getAttribute("class")||"").split(/\s+/).forEach((function(n){
|
|
1912
|
+
if(n.startsWith("ql-")&&(n=n.slice(3),
|
|
1913
|
+
null!=e[n]))if("direction"===n)t.innerHTML=e[n][""]+e[n].rtl;else if("string"==typeof e[n])t.innerHTML=e[n];else{
|
|
1914
|
+
var r=t.value||"";null!=r&&e[n][r]&&(t.innerHTML=e[n][r])}}))}))}},{
|
|
1915
|
+
key:"buildPickers",value:function(t,e){var n=this
|
|
1916
|
+
;this.pickers=t.map((function(t){
|
|
1917
|
+
if(t.classList.contains("ql-align"))return null==t.querySelector("option")&&k(t,g),
|
|
1918
|
+
new f.default(t,e.align)
|
|
1919
|
+
;if(t.classList.contains("ql-background")||t.classList.contains("ql-color")){
|
|
1920
|
+
var n=t.classList.contains("ql-background")?"background":"color"
|
|
1921
|
+
;return null==t.querySelector("option")&&k(t,m,"background"===n?"#ffffff":"#000000"),
|
|
1922
|
+
new c.default(t,e[n])}
|
|
1923
|
+
return null==t.querySelector("option")&&(t.classList.contains("ql-font")?k(t,_):t.classList.contains("ql-header")?k(t,O):t.classList.contains("ql-size")&&k(t,x)),
|
|
1924
|
+
new p.default(t)})),this.quill.on(a.default.events.EDITOR_CHANGE,(function(){
|
|
1925
|
+
n.pickers.forEach((function(t){t.update()}))}))}}]),e}(u.default);w.DEFAULTS=(0,
|
|
1926
|
+
i.default)(!0,{},u.default.DEFAULTS,{modules:{toolbar:{handlers:{
|
|
1927
|
+
formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){
|
|
1928
|
+
var t=this,e=this.container.querySelector("input.ql-image[type=file]")
|
|
1929
|
+
;null==e&&((e=document.createElement("input")).setAttribute("type","file"),
|
|
1930
|
+
e.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),
|
|
1931
|
+
e.classList.add("ql-image"),e.addEventListener("change",(function(){
|
|
1932
|
+
if(null!=e.files&&null!=e.files[0]){var n=new FileReader;n.onload=function(n){
|
|
1933
|
+
var r=t.quill.getSelection(!0)
|
|
1934
|
+
;t.quill.updateContents((new l.default).retain(r.index).delete(r.length).insert({
|
|
1935
|
+
image:n.target.result
|
|
1936
|
+
}),a.default.sources.USER),t.quill.setSelection(r.index+1,a.default.sources.SILENT),
|
|
1937
|
+
e.value=""},n.readAsDataURL(e.files[0])}
|
|
1938
|
+
})),this.container.appendChild(e)),e.click()},video:function(){
|
|
1939
|
+
this.quill.theme.tooltip.edit("video")}}}}});var E=function(t){function e(t,n){
|
|
1940
|
+
y(this,e);var r=v(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))
|
|
1941
|
+
;return r.textbox=r.root.querySelector('input[type="text"]'),r.listen(),r}
|
|
1942
|
+
return b(e,t),r(e,[{key:"listen",value:function(){var t=this
|
|
1943
|
+
;this.textbox.addEventListener("keydown",(function(e){
|
|
1944
|
+
s.default.match(e,"enter")?(t.save(),
|
|
1945
|
+
e.preventDefault()):s.default.match(e,"escape")&&(t.cancel(),e.preventDefault())
|
|
1946
|
+
}))}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){
|
|
1947
|
+
var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null
|
|
1948
|
+
;this.root.classList.remove("ql-hidden"),
|
|
1949
|
+
this.root.classList.add("ql-editing"),null!=e?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),
|
|
1950
|
+
this.position(this.quill.getBounds(this.quill.selection.savedRange)),
|
|
1951
|
+
this.textbox.select(),
|
|
1952
|
+
this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+t)||""),
|
|
1953
|
+
this.root.setAttribute("data-mode",t)}},{key:"restoreFocus",value:function(){
|
|
1954
|
+
var t=this.quill.scrollingContainer.scrollTop
|
|
1955
|
+
;this.quill.focus(),this.quill.scrollingContainer.scrollTop=t}},{key:"save",
|
|
1956
|
+
value:function(){var t,e,n=this.textbox.value
|
|
1957
|
+
;switch(this.root.getAttribute("data-mode")){case"link":
|
|
1958
|
+
var r=this.quill.root.scrollTop
|
|
1959
|
+
;this.linkRange?(this.quill.formatText(this.linkRange,"link",n,a.default.sources.USER),
|
|
1960
|
+
delete this.linkRange):(this.restoreFocus(),
|
|
1961
|
+
this.quill.format("link",n,a.default.sources.USER)),this.quill.root.scrollTop=r
|
|
1962
|
+
;break;case"video":
|
|
1963
|
+
n=(e=(t=n).match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/))?(e[1]||"https")+"://www.youtube.com/embed/"+e[2]+"?showinfo=0":(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(e[1]||"https")+"://player.vimeo.com/video/"+e[2]+"/":t
|
|
1964
|
+
;case"formula":if(!n)break;var o=this.quill.getSelection(!0);if(null!=o){
|
|
1965
|
+
var i=o.index+o.length
|
|
1966
|
+
;this.quill.insertEmbed(i,this.root.getAttribute("data-mode"),n,a.default.sources.USER),
|
|
1967
|
+
"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(i+1," ",a.default.sources.USER),
|
|
1968
|
+
this.quill.setSelection(i+2,a.default.sources.USER)}}
|
|
1969
|
+
this.textbox.value="",this.hide()}}]),e}(d.default);function k(t,e){
|
|
1970
|
+
var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2]
|
|
1971
|
+
;e.forEach((function(e){var r=document.createElement("option")
|
|
1972
|
+
;e===n?r.setAttribute("selected","selected"):r.setAttribute("value",e),
|
|
1973
|
+
t.appendChild(r)}))}e.BaseTooltip=E,e.default=w},function(t,e,n){
|
|
1974
|
+
Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){
|
|
1975
|
+
this.head=this.tail=null,this.length=0}return t.prototype.append=function(){
|
|
1976
|
+
for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]
|
|
1977
|
+
;this.insertBefore(t[0],null),t.length>1&&this.append.apply(this,t.slice(1))
|
|
1978
|
+
},t.prototype.contains=function(t){
|
|
1979
|
+
for(var e,n=this.iterator();e=n();)if(e===t)return!0;return!1
|
|
1980
|
+
},t.prototype.insertBefore=function(t,e){
|
|
1981
|
+
t&&(t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),
|
|
1982
|
+
e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,
|
|
1983
|
+
t.prev=this.tail,
|
|
1984
|
+
this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)
|
|
1985
|
+
},t.prototype.offset=function(t){for(var e=0,n=this.head;null!=n;){
|
|
1986
|
+
if(n===t)return e;e+=n.length(),n=n.next}return-1
|
|
1987
|
+
},t.prototype.remove=function(t){
|
|
1988
|
+
this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),
|
|
1989
|
+
null!=t.next&&(t.next.prev=t.prev),
|
|
1990
|
+
t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),
|
|
1991
|
+
this.length-=1)},t.prototype.iterator=function(t){
|
|
1992
|
+
return void 0===t&&(t=this.head),function(){var e=t;return null!=t&&(t=t.next),e
|
|
1993
|
+
}},t.prototype.find=function(t,e){void 0===e&&(e=!1)
|
|
1994
|
+
;for(var n,r=this.iterator();n=r();){var o=n.length()
|
|
1995
|
+
;if(t<o||e&&t===o&&(null==n.next||0!==n.next.length()))return[n,t];t-=o}
|
|
1996
|
+
return[null,0]},t.prototype.forEach=function(t){
|
|
1997
|
+
for(var e,n=this.iterator();e=n();)t(e)},t.prototype.forEachAt=function(t,e,n){
|
|
1998
|
+
if(!(e<=0))for(var r,o=this.find(t),i=o[0],l=t-o[1],a=this.iterator(i);(r=a())&&l<t+e;){
|
|
1999
|
+
var s=r.length();t>l?n(r,t-l,Math.min(e,l+s-t)):n(r,0,Math.min(s,t+e-l)),l+=s}},
|
|
2000
|
+
t.prototype.map=function(t){return this.reduce((function(e,n){
|
|
2001
|
+
return e.push(t(n)),e}),[])},t.prototype.reduce=function(t,e){
|
|
2002
|
+
for(var n,r=this.iterator();n=r();)e=t(e,n);return e},t}();e.default=r
|
|
2003
|
+
},function(t,e,n){var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{
|
|
2004
|
+
__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){
|
|
2005
|
+
for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){
|
|
2006
|
+
this.constructor=t}
|
|
2007
|
+
r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)})
|
|
2008
|
+
;Object.defineProperty(e,"__esModule",{value:!0});var i=n(17),l=n(1),a={
|
|
2009
|
+
attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0
|
|
2010
|
+
},s=function(t){function e(e){var n=t.call(this,e)||this
|
|
2011
|
+
;return n.scroll=n,n.observer=new MutationObserver((function(t){n.update(t)
|
|
2012
|
+
})),n.observer.observe(n.domNode,a),n.attach(),n}
|
|
2013
|
+
return o(e,t),e.prototype.detach=function(){
|
|
2014
|
+
t.prototype.detach.call(this),this.observer.disconnect()
|
|
2015
|
+
},e.prototype.deleteAt=function(e,n){
|
|
2016
|
+
this.update(),0===e&&n===this.length()?this.children.forEach((function(t){
|
|
2017
|
+
t.remove()})):t.prototype.deleteAt.call(this,e,n)
|
|
2018
|
+
},e.prototype.formatAt=function(e,n,r,o){
|
|
2019
|
+
this.update(),t.prototype.formatAt.call(this,e,n,r,o)
|
|
2020
|
+
},e.prototype.insertAt=function(e,n,r){
|
|
2021
|
+
this.update(),t.prototype.insertAt.call(this,e,n,r)
|
|
2022
|
+
},e.prototype.optimize=function(e,n){var r=this
|
|
2023
|
+
;void 0===e&&(e=[]),void 0===n&&(n={}),t.prototype.optimize.call(this,n)
|
|
2024
|
+
;for(var o=[].slice.call(this.observer.takeRecords());o.length>0;)e.push(o.pop())
|
|
2025
|
+
;for(var a=function(t,e){
|
|
2026
|
+
void 0===e&&(e=!0),null!=t&&t!==r&&null!=t.domNode.parentNode&&(null==t.domNode[l.DATA_KEY].mutations&&(t.domNode[l.DATA_KEY].mutations=[]),
|
|
2027
|
+
e&&a(t.parent))},s=function(t){
|
|
2028
|
+
null!=t.domNode[l.DATA_KEY]&&null!=t.domNode[l.DATA_KEY].mutations&&(t instanceof i.default&&t.children.forEach(s),
|
|
2029
|
+
t.optimize(n))},u=e,c=0;u.length>0;c+=1){
|
|
2030
|
+
if(c>=100)throw new Error("[Parchment] Maximum optimize iterations reached")
|
|
2031
|
+
;for(u.forEach((function(t){var e=l.find(t.target,!0)
|
|
2032
|
+
;null!=e&&(e.domNode===t.target&&("childList"===t.type?(a(l.find(t.previousSibling,!1)),
|
|
2033
|
+
[].forEach.call(t.addedNodes,(function(t){var e=l.find(t,!1)
|
|
2034
|
+
;a(e,!1),e instanceof i.default&&e.children.forEach((function(t){a(t,!1)}))
|
|
2035
|
+
}))):"attributes"===t.type&&a(e.prev)),a(e))
|
|
2036
|
+
})),this.children.forEach(s),o=(u=[].slice.call(this.observer.takeRecords())).slice();o.length>0;)e.push(o.pop())
|
|
2037
|
+
}},e.prototype.update=function(e,n){var r=this
|
|
2038
|
+
;void 0===n&&(n={}),(e=e||this.observer.takeRecords()).map((function(t){
|
|
2039
|
+
var e=l.find(t.target,!0)
|
|
2040
|
+
;return null==e?null:null==e.domNode[l.DATA_KEY].mutations?(e.domNode[l.DATA_KEY].mutations=[t],
|
|
2041
|
+
e):(e.domNode[l.DATA_KEY].mutations.push(t),null)})).forEach((function(t){
|
|
2042
|
+
null!=t&&t!==r&&null!=t.domNode[l.DATA_KEY]&&t.update(t.domNode[l.DATA_KEY].mutations||[],n)
|
|
2043
|
+
})),
|
|
2044
|
+
null!=this.domNode[l.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[l.DATA_KEY].mutations,n),
|
|
2045
|
+
this.optimize(e,n)
|
|
2046
|
+
},e.blotName="scroll",e.defaultChild="block",e.scope=l.Scope.BLOCK_BLOT,
|
|
2047
|
+
e.tagName="DIV",e}(i.default);e.default=s},function(t,e,n){
|
|
2048
|
+
var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]
|
|
2049
|
+
}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){
|
|
2050
|
+
for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){
|
|
2051
|
+
this.constructor=t}
|
|
2052
|
+
r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)})
|
|
2053
|
+
;Object.defineProperty(e,"__esModule",{value:!0})
|
|
2054
|
+
;var i=n(18),l=n(1),a=function(t){function e(){
|
|
2055
|
+
return null!==t&&t.apply(this,arguments)||this}
|
|
2056
|
+
return o(e,t),e.formats=function(n){
|
|
2057
|
+
if(n.tagName!==e.tagName)return t.formats.call(this,n)
|
|
2058
|
+
},e.prototype.format=function(n,r){var o=this
|
|
2059
|
+
;n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):(this.children.forEach((function(t){
|
|
2060
|
+
t instanceof i.default||(t=t.wrap(e.blotName,!0)),o.attributes.copy(t)
|
|
2061
|
+
})),this.unwrap())},e.prototype.formatAt=function(e,n,r,o){
|
|
2062
|
+
null!=this.formats()[r]||l.query(r,l.Scope.ATTRIBUTE)?this.isolate(e,n).format(r,o):t.prototype.formatAt.call(this,e,n,r,o)
|
|
2063
|
+
},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n)
|
|
2064
|
+
;var r=this.formats();if(0===Object.keys(r).length)return this.unwrap()
|
|
2065
|
+
;var o=this.next;o instanceof e&&o.prev===this&&function(t,e){
|
|
2066
|
+
if(Object.keys(t).length!==Object.keys(e).length)return!1
|
|
2067
|
+
;for(var n in t)if(t[n]!==e[n])return!1;return!0
|
|
2068
|
+
}(r,o.formats())&&(o.moveChildren(this),o.remove())
|
|
2069
|
+
},e.blotName="inline",e.scope=l.Scope.INLINE_BLOT,e.tagName="SPAN",e}(i.default)
|
|
2070
|
+
;e.default=a},function(t,e,n){
|
|
2071
|
+
var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]
|
|
2072
|
+
}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){
|
|
2073
|
+
for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){
|
|
2074
|
+
this.constructor=t}
|
|
2075
|
+
r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)})
|
|
2076
|
+
;Object.defineProperty(e,"__esModule",{value:!0})
|
|
2077
|
+
;var i=n(18),l=n(1),a=function(t){function e(){
|
|
2078
|
+
return null!==t&&t.apply(this,arguments)||this}
|
|
2079
|
+
return o(e,t),e.formats=function(n){var r=l.query(e.blotName).tagName
|
|
2080
|
+
;if(n.tagName!==r)return t.formats.call(this,n)
|
|
2081
|
+
},e.prototype.format=function(n,r){
|
|
2082
|
+
null!=l.query(n,l.Scope.BLOCK)&&(n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):this.replaceWith(e.blotName))
|
|
2083
|
+
},e.prototype.formatAt=function(e,n,r,o){
|
|
2084
|
+
null!=l.query(r,l.Scope.BLOCK)?this.format(r,o):t.prototype.formatAt.call(this,e,n,r,o)
|
|
2085
|
+
},e.prototype.insertAt=function(e,n,r){
|
|
2086
|
+
if(null==r||null!=l.query(n,l.Scope.INLINE))t.prototype.insertAt.call(this,e,n,r);else{
|
|
2087
|
+
var o=this.split(e),i=l.create(n,r);o.parent.insertBefore(i,o)}
|
|
2088
|
+
},e.prototype.update=function(e,n){
|
|
2089
|
+
navigator.userAgent.match(/Trident/)?this.build():t.prototype.update.call(this,e,n)
|
|
2090
|
+
},e.blotName="block",e.scope=l.Scope.BLOCK_BLOT,e.tagName="P",e}(i.default)
|
|
2091
|
+
;e.default=a},function(t,e,n){
|
|
2092
|
+
var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]
|
|
2093
|
+
}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){
|
|
2094
|
+
for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){
|
|
2095
|
+
this.constructor=t}
|
|
2096
|
+
r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)})
|
|
2097
|
+
;Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){
|
|
2098
|
+
function e(){return null!==t&&t.apply(this,arguments)||this}
|
|
2099
|
+
return o(e,t),e.formats=function(t){},e.prototype.format=function(e,n){
|
|
2100
|
+
t.prototype.formatAt.call(this,0,this.length(),e,n)
|
|
2101
|
+
},e.prototype.formatAt=function(e,n,r,o){
|
|
2102
|
+
0===e&&n===this.length()?this.format(r,o):t.prototype.formatAt.call(this,e,n,r,o)
|
|
2103
|
+
},e.prototype.formats=function(){return this.statics.formats(this.domNode)},e
|
|
2104
|
+
}(n(19).default);e.default=i},function(t,e,n){
|
|
2105
|
+
var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]
|
|
2106
|
+
}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){
|
|
2107
|
+
for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){
|
|
2108
|
+
this.constructor=t}
|
|
2109
|
+
r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)})
|
|
2110
|
+
;Object.defineProperty(e,"__esModule",{value:!0})
|
|
2111
|
+
;var i=n(19),l=n(1),a=function(t){function e(e){var n=t.call(this,e)||this
|
|
2112
|
+
;return n.text=n.statics.value(n.domNode),n}return o(e,t),e.create=function(t){
|
|
2113
|
+
return document.createTextNode(t)},e.value=function(t){var e=t.data
|
|
2114
|
+
;return e.normalize&&(e=e.normalize()),e},e.prototype.deleteAt=function(t,e){
|
|
2115
|
+
this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)
|
|
2116
|
+
},e.prototype.index=function(t,e){return this.domNode===t?e:-1
|
|
2117
|
+
},e.prototype.insertAt=function(e,n,r){
|
|
2118
|
+
null==r?(this.text=this.text.slice(0,e)+n+this.text.slice(e),
|
|
2119
|
+
this.domNode.data=this.text):t.prototype.insertAt.call(this,e,n,r)
|
|
2120
|
+
},e.prototype.length=function(){return this.text.length
|
|
2121
|
+
},e.prototype.optimize=function(n){
|
|
2122
|
+
t.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),
|
|
2123
|
+
0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),
|
|
2124
|
+
this.next.remove())},e.prototype.position=function(t,e){return[this.domNode,t]},
|
|
2125
|
+
e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this
|
|
2126
|
+
;if(t===this.length())return this.next}var n=l.create(this.domNode.splitText(t))
|
|
2127
|
+
;return this.parent.insertBefore(n,this.next),
|
|
2128
|
+
this.text=this.statics.value(this.domNode),n},e.prototype.update=function(t,e){
|
|
2129
|
+
var n=this;t.some((function(t){
|
|
2130
|
+
return"characterData"===t.type&&t.target===n.domNode
|
|
2131
|
+
}))&&(this.text=this.statics.value(this.domNode))},e.prototype.value=function(){
|
|
2132
|
+
return this.text},e.blotName="text",e.scope=l.Scope.INLINE_BLOT,e}(i.default)
|
|
2133
|
+
;e.default=a},function(t,e,n){var r=document.createElement("div")
|
|
2134
|
+
;if(r.classList.toggle("test-class",!1),r.classList.contains("test-class")){
|
|
2135
|
+
var o=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){
|
|
2136
|
+
return arguments.length>1&&!this.contains(t)==!e?e:o.call(this,t)}}
|
|
2137
|
+
String.prototype.startsWith||(String.prototype.startsWith=function(t,e){
|
|
2138
|
+
return e=e||0,this.substr(e,t.length)===t
|
|
2139
|
+
}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){
|
|
2140
|
+
var n=this.toString()
|
|
2141
|
+
;("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),
|
|
2142
|
+
e-=t.length;var r=n.indexOf(t,e);return-1!==r&&r===e
|
|
2143
|
+
}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{
|
|
2144
|
+
value:function(t){
|
|
2145
|
+
if(null===this)throw new TypeError("Array.prototype.find called on null or undefined")
|
|
2146
|
+
;if("function"!=typeof t)throw new TypeError("predicate must be a function")
|
|
2147
|
+
;for(var e,n=Object(this),r=n.length>>>0,o=arguments[1],i=0;i<r;i++)if(e=n[i],
|
|
2148
|
+
t.call(o,e,i,n))return e}
|
|
2149
|
+
}),document.addEventListener("DOMContentLoaded",(function(){
|
|
2150
|
+
document.execCommand("enableObjectResizing",!1,!1),
|
|
2151
|
+
document.execCommand("autoUrlDetect",!1,!1)}))},function(t,e){var n=-1,r=1,o=0
|
|
2152
|
+
;function i(t,e,c){if(t==e)return t?[[o,t]]:[];(c<0||t.length<c)&&(c=null)
|
|
2153
|
+
;var p=a(t,e),d=t.substring(0,p);p=s(t=t.substring(p),e=e.substring(p))
|
|
2154
|
+
;var h=t.substring(t.length-p),y=function(t,e){var u;if(!t)return[[r,e]]
|
|
2155
|
+
;if(!e)return[[n,t]]
|
|
2156
|
+
;var c=t.length>e.length?t:e,f=t.length>e.length?e:t,p=c.indexOf(f)
|
|
2157
|
+
;if(-1!=p)return u=[[r,c.substring(0,p)],[o,f],[r,c.substring(p+f.length)]],
|
|
2158
|
+
t.length>e.length&&(u[0][0]=u[2][0]=n),u;if(1==f.length)return[[n,t],[r,e]]
|
|
2159
|
+
;var d=function(t,e){var n=t.length>e.length?t:e,r=t.length>e.length?e:t
|
|
2160
|
+
;if(n.length<4||2*r.length<n.length)return null;function o(t,e,n){
|
|
2161
|
+
for(var r,o,i,l,u=t.substring(n,n+Math.floor(t.length/4)),c=-1,f="";-1!=(c=e.indexOf(u,c+1));){
|
|
2162
|
+
var p=a(t.substring(n),e.substring(c)),d=s(t.substring(0,n),e.substring(0,c))
|
|
2163
|
+
;f.length<d+p&&(f=e.substring(c-d,c)+e.substring(c,c+p),
|
|
2164
|
+
r=t.substring(0,n-d),o=t.substring(n+p),i=e.substring(0,c-d),l=e.substring(c+p))
|
|
2165
|
+
}return 2*f.length>=t.length?[r,o,i,l,f]:null}
|
|
2166
|
+
var i,l,u,c,f,p=o(n,r,Math.ceil(n.length/4)),d=o(n,r,Math.ceil(n.length/2))
|
|
2167
|
+
;if(!p&&!d)return null
|
|
2168
|
+
;i=d?p&&p[4].length>d[4].length?p:d:p,t.length>e.length?(l=i[0],
|
|
2169
|
+
u=i[1],c=i[2],f=i[3]):(c=i[0],f=i[1],l=i[2],u=i[3]);var h=i[4];return[l,u,c,f,h]
|
|
2170
|
+
}(t,e);if(d){var h=d[0],y=d[1],v=d[2],b=d[3],g=d[4],m=i(h,v),_=i(y,b)
|
|
2171
|
+
;return m.concat([[o,g]],_)}return function(t,e){
|
|
2172
|
+
for(var o=t.length,i=e.length,a=Math.ceil((o+i)/2),s=a,u=2*a,c=new Array(u),f=new Array(u),p=0;p<u;p++)c[p]=-1,
|
|
2173
|
+
f[p]=-1;c[s+1]=0,f[s+1]=0;for(var d=o-i,h=d%2!=0,y=0,v=0,b=0,g=0,m=0;m<a;m++){
|
|
2174
|
+
for(var _=-m+y;_<=m-v;_+=2){
|
|
2175
|
+
for(var O=s+_,x=(j=_==-m||_!=m&&c[O-1]<c[O+1]?c[O+1]:c[O-1]+1)-_;j<o&&x<i&&t.charAt(j)==e.charAt(x);)j++,
|
|
2176
|
+
x++
|
|
2177
|
+
;if(c[O]=j,j>o)v+=2;else if(x>i)y+=2;else if(h&&(k=s+d-_)>=0&&k<u&&-1!=f[k]&&j>=(E=o-f[k]))return l(t,e,j,x)
|
|
2178
|
+
}for(var w=-m+b;w<=m-g;w+=2){
|
|
2179
|
+
for(var E,k=s+w,N=(E=w==-m||w!=m&&f[k-1]<f[k+1]?f[k+1]:f[k-1]+1)-w;E<o&&N<i&&t.charAt(o-E-1)==e.charAt(i-N-1);)E++,
|
|
2180
|
+
N++;if(f[k]=E,E>o)g+=2;else if(N>i)b+=2;else if(!h){var j
|
|
2181
|
+
;if((O=s+d-w)>=0&&O<u&&-1!=c[O]&&(x=s+(j=c[O])-O,j>=(E=o-E)))return l(t,e,j,x)}}
|
|
2182
|
+
}return[[n,t],[r,e]]}(t,e)
|
|
2183
|
+
}(t=t.substring(0,t.length-p),e=e.substring(0,e.length-p))
|
|
2184
|
+
;return d&&y.unshift([o,d]),h&&y.push([o,h]),u(y),null!=c&&(y=function(t,e){
|
|
2185
|
+
var r=function(t,e){if(0===e)return[o,t];for(var r=0,i=0;i<t.length;i++){
|
|
2186
|
+
var l=t[i];if(l[0]===n||l[0]===o){var a=r+l[1].length;if(e===a)return[i+1,t]
|
|
2187
|
+
;if(e<a){t=t.slice();var s=e-r,u=[l[0],l[1].slice(0,s)],c=[l[0],l[1].slice(s)]
|
|
2188
|
+
;return t.splice(i,1,u,c),[i+1,t]}r=a}}
|
|
2189
|
+
throw new Error("cursor_pos is out of bounds!")
|
|
2190
|
+
}(t,e),i=r[1],l=r[0],a=i[l],s=i[l+1];if(null==a)return t;if(a[0]!==o)return t
|
|
2191
|
+
;if(null!=s&&a[1]+s[1]===s[1]+a[1])return i.splice(l,2,s,a),f(i,l,2)
|
|
2192
|
+
;if(null!=s&&0===s[1].indexOf(a[1])){i.splice(l,2,[s[0],a[1]],[0,a[1]])
|
|
2193
|
+
;var u=s[1].slice(a[1].length)
|
|
2194
|
+
;return u.length>0&&i.splice(l+2,0,[s[0],u]),f(i,l,3)}return t
|
|
2195
|
+
}(y,c)),y=function(t){for(var e=!1,i=function(t){
|
|
2196
|
+
return t.charCodeAt(0)>=56320&&t.charCodeAt(0)<=57343},l=function(t){
|
|
2197
|
+
return t.charCodeAt(t.length-1)>=55296&&t.charCodeAt(t.length-1)<=56319
|
|
2198
|
+
},a=2;a<t.length;a+=1)t[a-2][0]===o&&l(t[a-2][1])&&t[a-1][0]===n&&i(t[a-1][1])&&t[a][0]===r&&i(t[a][1])&&(e=!0,
|
|
2199
|
+
t[a-1][1]=t[a-2][1].slice(-1)+t[a-1][1],
|
|
2200
|
+
t[a][1]=t[a-2][1].slice(-1)+t[a][1],t[a-2][1]=t[a-2][1].slice(0,-1))
|
|
2201
|
+
;if(!e)return t;var s=[];for(a=0;a<t.length;a+=1)t[a][1].length>0&&s.push(t[a])
|
|
2202
|
+
;return s}(y)}function l(t,e,n,r){
|
|
2203
|
+
var o=t.substring(0,n),l=e.substring(0,r),a=t.substring(n),s=e.substring(r),u=i(o,l),c=i(a,s)
|
|
2204
|
+
;return u.concat(c)}function a(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0
|
|
2205
|
+
;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)?i=n=o:r=o,
|
|
2206
|
+
o=Math.floor((r-n)/2+n);return o}function s(t,e){
|
|
2207
|
+
if(!t||!e||t.charAt(t.length-1)!=e.charAt(e.length-1))return 0
|
|
2208
|
+
;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)?i=n=o:r=o,
|
|
2209
|
+
o=Math.floor((r-n)/2+n);return o}function u(t){t.push([o,""])
|
|
2210
|
+
;for(var e,i=0,l=0,c=0,f="",p="";i<t.length;)switch(t[i][0]){case r:
|
|
2211
|
+
c++,p+=t[i][1],i++;break;case n:l++,f+=t[i][1],i++;break;case o:
|
|
2212
|
+
l+c>1?(0!==l&&0!==c&&(0!==(e=a(p,f))&&(i-l-c>0&&t[i-l-c-1][0]==o?t[i-l-c-1][1]+=p.substring(0,e):(t.splice(0,0,[o,p.substring(0,e)]),
|
|
2213
|
+
i++),
|
|
2214
|
+
p=p.substring(e),f=f.substring(e)),0!==(e=s(p,f))&&(t[i][1]=p.substring(p.length-e)+t[i][1],
|
|
2215
|
+
p=p.substring(0,p.length-e),
|
|
2216
|
+
f=f.substring(0,f.length-e))),0===l?t.splice(i-c,l+c,[r,p]):0===c?t.splice(i-l,l+c,[n,f]):t.splice(i-l-c,l+c,[n,f],[r,p]),
|
|
2217
|
+
i=i-l-c+(l?1:0)+(c?1:0)+1):0!==i&&t[i-1][0]==o?(t[i-1][1]+=t[i][1],
|
|
2218
|
+
t.splice(i,1)):i++,c=0,l=0,f="",p=""}""===t[t.length-1][1]&&t.pop();var d=!1
|
|
2219
|
+
;for(i=1;i<t.length-1;)t[i-1][0]==o&&t[i+1][0]==o&&(t[i][1].substring(t[i][1].length-t[i-1][1].length)==t[i-1][1]?(t[i][1]=t[i-1][1]+t[i][1].substring(0,t[i][1].length-t[i-1][1].length),
|
|
2220
|
+
t[i+1][1]=t[i-1][1]+t[i+1][1],
|
|
2221
|
+
t.splice(i-1,1),d=!0):t[i][1].substring(0,t[i+1][1].length)==t[i+1][1]&&(t[i-1][1]+=t[i+1][1],
|
|
2222
|
+
t[i][1]=t[i][1].substring(t[i+1][1].length)+t[i+1][1],t.splice(i+1,1),d=!0)),i++
|
|
2223
|
+
;d&&u(t)}var c=i;function f(t,e,n){
|
|
2224
|
+
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]
|
|
2225
|
+
;o[0]===i[1]&&t.splice(r,2,[o[0],o[1]+i[1]])}return t}
|
|
2226
|
+
c.INSERT=r,c.DELETE=n,c.EQUAL=o,t.exports=c},function(t,e){function n(t){
|
|
2227
|
+
var e=[];for(var n in t)e.push(n);return e}
|
|
2228
|
+
(t.exports="function"==typeof Object.keys?Object.keys:n).shim=n},function(t,e){
|
|
2229
|
+
var n="[object Arguments]"==function(){
|
|
2230
|
+
return Object.prototype.toString.call(arguments)}();function r(t){
|
|
2231
|
+
return"[object Arguments]"==Object.prototype.toString.call(t)}function o(t){
|
|
2232
|
+
return t&&"object"==typeof t&&"number"==typeof t.length&&Object.prototype.hasOwnProperty.call(t,"callee")&&!Object.prototype.propertyIsEnumerable.call(t,"callee")||!1
|
|
2233
|
+
}(e=t.exports=n?r:o).supported=r,e.unsupported=o},function(t,e){
|
|
2234
|
+
var n=Object.prototype.hasOwnProperty,r="~";function o(){}function i(t,e,n){
|
|
2235
|
+
this.fn=t,this.context=e,this.once=n||!1}function l(){
|
|
2236
|
+
this._events=new o,this._eventsCount=0}
|
|
2237
|
+
Object.create&&(o.prototype=Object.create(null),
|
|
2238
|
+
(new o).__proto__||(r=!1)),l.prototype.eventNames=function(){var t,e,o=[]
|
|
2239
|
+
;if(0===this._eventsCount)return o
|
|
2240
|
+
;for(e in t=this._events)n.call(t,e)&&o.push(r?e.slice(1):e)
|
|
2241
|
+
;return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(t)):o
|
|
2242
|
+
},l.prototype.listeners=function(t,e){var n=r?r+t:t,o=this._events[n]
|
|
2243
|
+
;if(e)return!!o;if(!o)return[];if(o.fn)return[o.fn]
|
|
2244
|
+
;for(var i=0,l=o.length,a=new Array(l);i<l;i++)a[i]=o[i].fn;return a
|
|
2245
|
+
},l.prototype.emit=function(t,e,n,o,i,l){var a=r?r+t:t
|
|
2246
|
+
;if(!this._events[a])return!1;var s,u,c=this._events[a],f=arguments.length
|
|
2247
|
+
;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),f){case 1:
|
|
2248
|
+
return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:
|
|
2249
|
+
return c.fn.call(c.context,e,n),!0;case 4:return c.fn.call(c.context,e,n,o),!0
|
|
2250
|
+
;case 5:return c.fn.call(c.context,e,n,o,i),!0;case 6:
|
|
2251
|
+
return c.fn.call(c.context,e,n,o,i,l),!0}
|
|
2252
|
+
for(u=1,s=new Array(f-1);u<f;u++)s[u-1]=arguments[u];c.fn.apply(c.context,s)
|
|
2253
|
+
}else{var p,d=c.length
|
|
2254
|
+
;for(u=0;u<d;u++)switch(c[u].once&&this.removeListener(t,c[u].fn,void 0,!0),f){
|
|
2255
|
+
case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,e)
|
|
2256
|
+
;break;case 3:c[u].fn.call(c[u].context,e,n);break;case 4:
|
|
2257
|
+
c[u].fn.call(c[u].context,e,n,o);break;default:
|
|
2258
|
+
if(!s)for(p=1,s=new Array(f-1);p<f;p++)s[p-1]=arguments[p]
|
|
2259
|
+
;c[u].fn.apply(c[u].context,s)}}return!0},l.prototype.on=function(t,e,n){
|
|
2260
|
+
var o=new i(e,n||this),l=r?r+t:t
|
|
2261
|
+
;return this._events[l]?this._events[l].fn?this._events[l]=[this._events[l],o]:this._events[l].push(o):(this._events[l]=o,
|
|
2262
|
+
this._eventsCount++),this},l.prototype.once=function(t,e,n){
|
|
2263
|
+
var o=new i(e,n||this,!0),l=r?r+t:t
|
|
2264
|
+
;return this._events[l]?this._events[l].fn?this._events[l]=[this._events[l],o]:this._events[l].push(o):(this._events[l]=o,
|
|
2265
|
+
this._eventsCount++),this},l.prototype.removeListener=function(t,e,n,i){
|
|
2266
|
+
var l=r?r+t:t;if(!this._events[l])return this
|
|
2267
|
+
;if(!e)return 0==--this._eventsCount?this._events=new o:delete this._events[l],
|
|
2268
|
+
this;var a=this._events[l]
|
|
2269
|
+
;if(a.fn)a.fn!==e||i&&!a.once||n&&a.context!==n||(0==--this._eventsCount?this._events=new o:delete this._events[l]);else{
|
|
2270
|
+
for(var s=0,u=[],c=a.length;s<c;s++)(a[s].fn!==e||i&&!a[s].once||n&&a[s].context!==n)&&u.push(a[s])
|
|
2271
|
+
;u.length?this._events[l]=1===u.length?u[0]:u:0==--this._eventsCount?this._events=new o:delete this._events[l]
|
|
2272
|
+
}return this},l.prototype.removeAllListeners=function(t){var e
|
|
2273
|
+
;return t?(e=r?r+t:t,
|
|
2274
|
+
this._events[e]&&(0==--this._eventsCount?this._events=new o:delete this._events[e])):(this._events=new o,
|
|
2275
|
+
this._eventsCount=0),this
|
|
2276
|
+
},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,
|
|
2277
|
+
l.prototype.setMaxListeners=function(){return this
|
|
2278
|
+
},l.prefixed=r,l.EventEmitter=l,void 0!==t&&(t.exports=l)},function(t,e,n){
|
|
2279
|
+
Object.defineProperty(e,"__esModule",{value:!0
|
|
2280
|
+
}),e.matchText=e.matchSpacing=e.matchNewline=e.matchBlot=e.matchAttributor=e.default=void 0
|
|
2281
|
+
;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){
|
|
2282
|
+
return typeof t}:function(t){
|
|
2283
|
+
return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t
|
|
2284
|
+
},o=function(t,e){if(Array.isArray(t))return t
|
|
2285
|
+
;if(Symbol.iterator in Object(t))return function(t,e){
|
|
2286
|
+
var n=[],r=!0,o=!1,i=void 0;try{
|
|
2287
|
+
for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),
|
|
2288
|
+
!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()
|
|
2289
|
+
}finally{if(o)throw i}}return n}(t,e)
|
|
2290
|
+
;throw new TypeError("Invalid attempt to destructure non-iterable instance")
|
|
2291
|
+
},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n]
|
|
2292
|
+
;r.enumerable=r.enumerable||!1,
|
|
2293
|
+
r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}
|
|
2294
|
+
}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}
|
|
2295
|
+
}(),l=m(n(3)),a=m(n(2)),s=m(n(0)),u=m(n(5)),c=m(n(10)),f=m(n(9)),p=n(36),d=n(37),h=m(n(13)),y=n(26),v=n(38),b=n(39),g=n(40)
|
|
2296
|
+
;function m(t){return t&&t.__esModule?t:{default:t}}function _(t,e,n){
|
|
2297
|
+
return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,
|
|
2298
|
+
writable:!0}):t[e]=n,t}
|
|
2299
|
+
var O=(0,c.default)("quill:clipboard"),x="__ql-matcher",w=[[Node.TEXT_NODE,I],[Node.TEXT_NODE,M],["br",function(t,e){
|
|
2300
|
+
return q(e,"\n")||e.insert("\n"),e
|
|
2301
|
+
}],[Node.ELEMENT_NODE,M],[Node.ELEMENT_NODE,L],[Node.ELEMENT_NODE,R],[Node.ELEMENT_NODE,C],[Node.ELEMENT_NODE,function(t,e){
|
|
2302
|
+
var n={},r=t.style||{}
|
|
2303
|
+
;return r.fontStyle&&"italic"===A(t).fontStyle&&(n.italic=!0),
|
|
2304
|
+
r.fontWeight&&(A(t).fontWeight.startsWith("bold")||parseInt(A(t).fontWeight)>=700)&&(n.bold=!0),
|
|
2305
|
+
Object.keys(n).length>0&&(e=j(e,n)),
|
|
2306
|
+
parseFloat(r.textIndent||0)>0&&(e=(new a.default).insert("\t").concat(e)),e
|
|
2307
|
+
}],["li",function(t,e){var n=s.default.query(t)
|
|
2308
|
+
;if(null==n||"list-item"!==n.blotName||!q(e,"\n"))return e
|
|
2309
|
+
;for(var r=-1,o=t.parentNode;!o.classList.contains("ql-clipboard");)"list"===(s.default.query(o)||{}).blotName&&(r+=1),
|
|
2310
|
+
o=o.parentNode
|
|
2311
|
+
;return r<=0?e:e.compose((new a.default).retain(e.length()-1).retain(1,{indent:r
|
|
2312
|
+
}))}],["b",P.bind(P,"bold")],["i",P.bind(P,"italic")],["style",function(){
|
|
2313
|
+
return new a.default
|
|
2314
|
+
}]],E=[p.AlignAttribute,v.DirectionAttribute].reduce((function(t,e){
|
|
2315
|
+
return t[e.keyName]=e,t
|
|
2316
|
+
}),{}),k=[p.AlignStyle,d.BackgroundStyle,y.ColorStyle,v.DirectionStyle,b.FontStyle,g.SizeStyle].reduce((function(t,e){
|
|
2317
|
+
return t[e.keyName]=e,t}),{}),N=function(t){function e(t,n){!function(t,e){
|
|
2318
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")
|
|
2319
|
+
}(this,e);var r=function(t,e){
|
|
2320
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
2321
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e
|
|
2322
|
+
}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))
|
|
2323
|
+
;return r.quill.root.addEventListener("paste",r.onPaste.bind(r)),
|
|
2324
|
+
r.container=r.quill.addContainer("ql-clipboard"),
|
|
2325
|
+
r.container.setAttribute("contenteditable",!0),
|
|
2326
|
+
r.container.setAttribute("tabindex",-1),
|
|
2327
|
+
r.matchers=[],w.concat(r.options.matchers).forEach((function(t){
|
|
2328
|
+
var e=o(t,2),i=e[0],l=e[1];(n.matchVisual||l!==R)&&r.addMatcher(i,l)})),r}
|
|
2329
|
+
return function(t,e){
|
|
2330
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
2331
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
2332
|
+
writable:!0,configurable:!0}
|
|
2333
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)
|
|
2334
|
+
}(e,t),i(e,[{key:"addMatcher",value:function(t,e){this.matchers.push([t,e])}},{
|
|
2335
|
+
key:"convert",value:function(t){
|
|
2336
|
+
if("string"==typeof t)return this.container.innerHTML=t.replace(/\>\r?\n +\</g,"><"),
|
|
2337
|
+
this.convert();var e=this.quill.getFormat(this.quill.selection.savedRange.index)
|
|
2338
|
+
;if(e[h.default.blotName]){var n=this.container.innerText
|
|
2339
|
+
;return this.container.innerHTML="",
|
|
2340
|
+
(new a.default).insert(n,_({},h.default.blotName,e[h.default.blotName]))}
|
|
2341
|
+
var r=this.prepareMatching(),i=o(r,2),l=i[0],s=i[1],u=S(this.container,l,s)
|
|
2342
|
+
;return q(u,"\n")&&null==u.ops[u.ops.length-1].attributes&&(u=u.compose((new a.default).retain(u.length()-1).delete(1))),
|
|
2343
|
+
O.log("convert",this.container.innerHTML,u),this.container.innerHTML="",u}},{
|
|
2344
|
+
key:"dangerouslyPasteHTML",value:function(t,e){
|
|
2345
|
+
var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.default.sources.API
|
|
2346
|
+
;if("string"==typeof t)this.quill.setContents(this.convert(t),e),
|
|
2347
|
+
this.quill.setSelection(0,u.default.sources.SILENT);else{var r=this.convert(e)
|
|
2348
|
+
;this.quill.updateContents((new a.default).retain(t).concat(r),n),
|
|
2349
|
+
this.quill.setSelection(t+r.length(),u.default.sources.SILENT)}}},{
|
|
2350
|
+
key:"onPaste",value:function(t){var e=this
|
|
2351
|
+
;if(!t.defaultPrevented&&this.quill.isEnabled()){
|
|
2352
|
+
var n=this.quill.getSelection(),r=(new a.default).retain(n.index),o=this.quill.scrollingContainer.scrollTop
|
|
2353
|
+
;this.container.focus(),
|
|
2354
|
+
this.quill.selection.update(u.default.sources.SILENT),setTimeout((function(){
|
|
2355
|
+
r=r.concat(e.convert()).delete(n.length),
|
|
2356
|
+
e.quill.updateContents(r,u.default.sources.USER),
|
|
2357
|
+
e.quill.setSelection(r.length()-n.length,u.default.sources.SILENT),
|
|
2358
|
+
e.quill.scrollingContainer.scrollTop=o,e.quill.focus()}),1)}}},{
|
|
2359
|
+
key:"prepareMatching",value:function(){var t=this,e=[],n=[]
|
|
2360
|
+
;return this.matchers.forEach((function(r){var i=o(r,2),l=i[0],a=i[1];switch(l){
|
|
2361
|
+
case Node.TEXT_NODE:n.push(a);break;case Node.ELEMENT_NODE:e.push(a);break
|
|
2362
|
+
;default:[].forEach.call(t.container.querySelectorAll(l),(function(t){
|
|
2363
|
+
t[x]=t[x]||[],t[x].push(a)}))}})),[e,n]}}]),e}(f.default);function j(t,e,n){
|
|
2364
|
+
return"object"===(void 0===e?"undefined":r(e))?Object.keys(e).reduce((function(t,n){
|
|
2365
|
+
return j(t,n,e[n])}),t):t.reduce((function(t,r){
|
|
2366
|
+
return r.attributes&&r.attributes[e]?t.push(r):t.insert(r.insert,(0,
|
|
2367
|
+
l.default)({},_({},e,n),r.attributes))}),new a.default)}function A(t){
|
|
2368
|
+
if(t.nodeType!==Node.ELEMENT_NODE)return{};var e="__ql-computed-style"
|
|
2369
|
+
;return t[e]||(t[e]=window.getComputedStyle(t))}function q(t,e){
|
|
2370
|
+
for(var n="",r=t.ops.length-1;r>=0&&n.length<e.length;--r){var o=t.ops[r]
|
|
2371
|
+
;if("string"!=typeof o.insert)break;n=o.insert+n}return n.slice(-1*e.length)===e
|
|
2372
|
+
}function T(t){if(0===t.childNodes.length)return!1;var e=A(t)
|
|
2373
|
+
;return["block","list-item"].indexOf(e.display)>-1}function S(t,e,n){
|
|
2374
|
+
return t.nodeType===t.TEXT_NODE?n.reduce((function(e,n){return n(t,e)
|
|
2375
|
+
}),new a.default):t.nodeType===t.ELEMENT_NODE?[].reduce.call(t.childNodes||[],(function(r,o){
|
|
2376
|
+
var i=S(o,e,n);return o.nodeType===t.ELEMENT_NODE&&(i=e.reduce((function(t,e){
|
|
2377
|
+
return e(o,t)}),i),i=(o[x]||[]).reduce((function(t,e){return e(o,t)
|
|
2378
|
+
}),i)),r.concat(i)}),new a.default):new a.default}function P(t,e,n){
|
|
2379
|
+
return j(n,t,!0)}function C(t,e){
|
|
2380
|
+
var n=s.default.Attributor.Attribute.keys(t),r=s.default.Attributor.Class.keys(t),o=s.default.Attributor.Style.keys(t),i={}
|
|
2381
|
+
;return n.concat(r).concat(o).forEach((function(e){
|
|
2382
|
+
var n=s.default.query(e,s.default.Scope.ATTRIBUTE)
|
|
2383
|
+
;null!=n&&(i[n.attrName]=n.value(t),
|
|
2384
|
+
i[n.attrName])||(null==(n=E[e])||n.attrName!==e&&n.keyName!==e||(i[n.attrName]=n.value(t)||void 0),
|
|
2385
|
+
null==(n=k[e])||n.attrName!==e&&n.keyName!==e||(n=k[e],
|
|
2386
|
+
i[n.attrName]=n.value(t)||void 0))})),Object.keys(i).length>0&&(e=j(e,i)),e}
|
|
2387
|
+
function L(t,e){var n=s.default.query(t);if(null==n)return e
|
|
2388
|
+
;if(n.prototype instanceof s.default.Embed){var r={},o=n.value(t)
|
|
2389
|
+
;null!=o&&(r[n.blotName]=o,e=(new a.default).insert(r,n.formats(t)))
|
|
2390
|
+
}else"function"==typeof n.formats&&(e=j(e,n.blotName,n.formats(t)));return e}
|
|
2391
|
+
function M(t,e){
|
|
2392
|
+
return q(e,"\n")||(T(t)||e.length()>0&&t.nextSibling&&T(t.nextSibling))&&e.insert("\n"),
|
|
2393
|
+
e}function R(t,e){if(T(t)&&null!=t.nextElementSibling&&!q(e,"\n\n")){
|
|
2394
|
+
var n=t.offsetHeight+parseFloat(A(t).marginTop)+parseFloat(A(t).marginBottom)
|
|
2395
|
+
;t.nextElementSibling.offsetTop>t.offsetTop+1.5*n&&e.insert("\n")}return e}
|
|
2396
|
+
function I(t,e){var n=t.data
|
|
2397
|
+
;if("O:P"===t.parentNode.tagName)return e.insert(n.trim())
|
|
2398
|
+
;if(0===n.trim().length&&t.parentNode.classList.contains("ql-clipboard"))return e
|
|
2399
|
+
;if(!A(t.parentNode).whiteSpace.startsWith("pre")){var r=function(t,e){
|
|
2400
|
+
return(e=e.replace(/[^\u00a0]/g,"")).length<1&&t?" ":e}
|
|
2401
|
+
;n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,r.bind(r,!0)),
|
|
2402
|
+
(null==t.previousSibling&&T(t.parentNode)||null!=t.previousSibling&&T(t.previousSibling))&&(n=n.replace(/^\s+/,r.bind(r,!1))),
|
|
2403
|
+
(null==t.nextSibling&&T(t.parentNode)||null!=t.nextSibling&&T(t.nextSibling))&&(n=n.replace(/\s+$/,r.bind(r,!1)))
|
|
2404
|
+
}return e.insert(n)}N.DEFAULTS={matchers:[],matchVisual:!0
|
|
2405
|
+
},e.default=N,e.matchAttributor=C,
|
|
2406
|
+
e.matchBlot=L,e.matchNewline=M,e.matchSpacing=R,e.matchText=I},function(t,e,n){
|
|
2407
|
+
Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){
|
|
2408
|
+
function t(t,e){for(var n=0;n<e.length;n++){var r=e[n]
|
|
2409
|
+
;r.enumerable=r.enumerable||!1,
|
|
2410
|
+
r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}
|
|
2411
|
+
}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}
|
|
2412
|
+
}(),i=function t(e,n,r){null===e&&(e=Function.prototype)
|
|
2413
|
+
;var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){
|
|
2414
|
+
var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}
|
|
2415
|
+
if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0
|
|
2416
|
+
},l=n(6),a=function(t){function e(){return function(t,e){
|
|
2417
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")
|
|
2418
|
+
}(this,e),function(t,e){
|
|
2419
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
2420
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e
|
|
2421
|
+
}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}
|
|
2422
|
+
return function(t,e){
|
|
2423
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
2424
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
2425
|
+
writable:!0,configurable:!0}
|
|
2426
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)
|
|
2427
|
+
}(e,t),o(e,[{key:"optimize",value:function(t){
|
|
2428
|
+
i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),
|
|
2429
|
+
this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)
|
|
2430
|
+
}}],[{key:"create",value:function(){
|
|
2431
|
+
return i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this)}},{
|
|
2432
|
+
key:"formats",value:function(){return!0}}]),e}(((r=l)&&r.__esModule?r:{default:r
|
|
2433
|
+
}).default);a.blotName="bold",a.tagName=["STRONG","B"],e.default=a
|
|
2434
|
+
},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0
|
|
2435
|
+
}),e.addControls=e.default=void 0;var r=function(t,e){
|
|
2436
|
+
if(Array.isArray(t))return t
|
|
2437
|
+
;if(Symbol.iterator in Object(t))return function(t,e){
|
|
2438
|
+
var n=[],r=!0,o=!1,i=void 0;try{
|
|
2439
|
+
for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),
|
|
2440
|
+
!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()
|
|
2441
|
+
}finally{if(o)throw i}}return n}(t,e)
|
|
2442
|
+
;throw new TypeError("Invalid attempt to destructure non-iterable instance")
|
|
2443
|
+
},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n]
|
|
2444
|
+
;r.enumerable=r.enumerable||!1,
|
|
2445
|
+
r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}
|
|
2446
|
+
}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}
|
|
2447
|
+
}(),i=c(n(2)),l=c(n(0)),a=c(n(5)),s=c(n(10)),u=c(n(9));function c(t){
|
|
2448
|
+
return t&&t.__esModule?t:{default:t}}function f(t,e){
|
|
2449
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
2450
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e}
|
|
2451
|
+
var p=(0,s.default)("quill:toolbar"),d=function(t){function e(t,n){
|
|
2452
|
+
!function(t,e){
|
|
2453
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")
|
|
2454
|
+
}(this,e);var o,i=f(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))
|
|
2455
|
+
;if(Array.isArray(i.options.container)){var l=document.createElement("div")
|
|
2456
|
+
;y(l,i.options.container),
|
|
2457
|
+
t.container.parentNode.insertBefore(l,t.container),i.container=l
|
|
2458
|
+
}else"string"==typeof i.options.container?i.container=document.querySelector(i.options.container):i.container=i.options.container
|
|
2459
|
+
;return i.container instanceof HTMLElement?(i.container.classList.add("ql-toolbar"),
|
|
2460
|
+
i.controls=[],
|
|
2461
|
+
i.handlers={},Object.keys(i.options.handlers).forEach((function(t){
|
|
2462
|
+
i.addHandler(t,i.options.handlers[t])
|
|
2463
|
+
})),[].forEach.call(i.container.querySelectorAll("button, select"),(function(t){
|
|
2464
|
+
i.attach(t)})),i.quill.on(a.default.events.EDITOR_CHANGE,(function(t,e){
|
|
2465
|
+
t===a.default.events.SELECTION_CHANGE&&i.update(e)
|
|
2466
|
+
})),i.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){
|
|
2467
|
+
var t=i.quill.selection.getRange(),e=r(t,1)[0];i.update(e)
|
|
2468
|
+
})),i):(o=p.error("Container required for toolbar",i.options),f(i,o))}
|
|
2469
|
+
return function(t,e){
|
|
2470
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
2471
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
2472
|
+
writable:!0,configurable:!0}
|
|
2473
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)
|
|
2474
|
+
}(e,t),o(e,[{key:"addHandler",value:function(t,e){this.handlers[t]=e}},{
|
|
2475
|
+
key:"attach",value:function(t){
|
|
2476
|
+
var e=this,n=[].find.call(t.classList,(function(t){return 0===t.indexOf("ql-")
|
|
2477
|
+
}));if(n){if(n=n.slice(3),"BUTTON"===t.tagName&&t.setAttribute("type","button"),
|
|
2478
|
+
null==this.handlers[n]){
|
|
2479
|
+
if(null!=this.quill.scroll.whitelist&&null==this.quill.scroll.whitelist[n])return void p.warn("ignoring attaching to disabled format",n,t)
|
|
2480
|
+
;if(null==l.default.query(n))return void p.warn("ignoring attaching to nonexistent format",n,t)
|
|
2481
|
+
}var o="SELECT"===t.tagName?"change":"click";t.addEventListener(o,(function(o){
|
|
2482
|
+
var s=void 0;if("SELECT"===t.tagName){if(t.selectedIndex<0)return
|
|
2483
|
+
;var u=t.options[t.selectedIndex];s=!u.hasAttribute("selected")&&(u.value||!1)
|
|
2484
|
+
}else s=!t.classList.contains("ql-active")&&(t.value||!t.hasAttribute("value")),
|
|
2485
|
+
o.preventDefault();e.quill.focus()
|
|
2486
|
+
;var c=e.quill.selection.getRange(),f=r(c,1)[0]
|
|
2487
|
+
;if(null!=e.handlers[n])e.handlers[n].call(e,s);else if(l.default.query(n).prototype instanceof l.default.Embed){
|
|
2488
|
+
if(!(s=prompt("Enter "+n)))return
|
|
2489
|
+
;e.quill.updateContents((new i.default).retain(f.index).delete(f.length).insert(function(t,e,n){
|
|
2490
|
+
return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,
|
|
2491
|
+
writable:!0}):t[e]=n,t}({},n,s)),a.default.sources.USER)
|
|
2492
|
+
}else e.quill.format(n,s,a.default.sources.USER);e.update(f)
|
|
2493
|
+
})),this.controls.push([n,t])}}},{key:"update",value:function(t){
|
|
2494
|
+
var e=null==t?{}:this.quill.getFormat(t);this.controls.forEach((function(n){
|
|
2495
|
+
var o=r(n,2),i=o[0],l=o[1];if("SELECT"===l.tagName){var a=void 0
|
|
2496
|
+
;if(null==t)a=null;else if(null==e[i])a=l.querySelector("option[selected]");else if(!Array.isArray(e[i])){
|
|
2497
|
+
var s=e[i]
|
|
2498
|
+
;"string"==typeof s&&(s=s.replace(/\"/g,'\\"')),a=l.querySelector('option[value="'+s+'"]')
|
|
2499
|
+
}null==a?(l.value="",l.selectedIndex=-1):a.selected=!0
|
|
2500
|
+
}else if(null==t)l.classList.remove("ql-active");else if(l.hasAttribute("value")){
|
|
2501
|
+
var u=e[i]===l.getAttribute("value")||null!=e[i]&&e[i].toString()===l.getAttribute("value")||null==e[i]&&!l.getAttribute("value")
|
|
2502
|
+
;l.classList.toggle("ql-active",u)
|
|
2503
|
+
}else l.classList.toggle("ql-active",null!=e[i])}))}}]),e}(u.default)
|
|
2504
|
+
;function h(t,e,n){var r=document.createElement("button")
|
|
2505
|
+
;r.setAttribute("type","button"),
|
|
2506
|
+
r.classList.add("ql-"+e),null!=n&&(r.value=n),t.appendChild(r)}function y(t,e){
|
|
2507
|
+
Array.isArray(e[0])||(e=[e]),e.forEach((function(e){
|
|
2508
|
+
var n=document.createElement("span")
|
|
2509
|
+
;n.classList.add("ql-formats"),e.forEach((function(t){
|
|
2510
|
+
if("string"==typeof t)h(n,t);else{var e=Object.keys(t)[0],r=t[e]
|
|
2511
|
+
;Array.isArray(r)?function(t,e,n){var r=document.createElement("select")
|
|
2512
|
+
;r.classList.add("ql-"+e),n.forEach((function(t){
|
|
2513
|
+
var e=document.createElement("option")
|
|
2514
|
+
;!1!==t?e.setAttribute("value",t):e.setAttribute("selected","selected"),
|
|
2515
|
+
r.appendChild(e)})),t.appendChild(r)}(n,e,r):h(n,e,r)}})),t.appendChild(n)}))}
|
|
2516
|
+
d.DEFAULTS={},d.DEFAULTS={container:null,handlers:{clean:function(){
|
|
2517
|
+
var t=this,e=this.quill.getSelection();if(null!=e)if(0==e.length){
|
|
2518
|
+
var n=this.quill.getFormat();Object.keys(n).forEach((function(e){
|
|
2519
|
+
null!=l.default.query(e,l.default.Scope.INLINE)&&t.quill.format(e,!1)}))
|
|
2520
|
+
}else this.quill.removeFormat(e,a.default.sources.USER)},direction:function(t){
|
|
2521
|
+
var e=this.quill.getFormat().align
|
|
2522
|
+
;"rtl"===t&&null==e?this.quill.format("align","right",a.default.sources.USER):t||"right"!==e||this.quill.format("align",!1,a.default.sources.USER),
|
|
2523
|
+
this.quill.format("direction",t,a.default.sources.USER)},indent:function(t){
|
|
2524
|
+
var e=this.quill.getSelection(),n=this.quill.getFormat(e),r=parseInt(n.indent||0)
|
|
2525
|
+
;if("+1"===t||"-1"===t){var o="+1"===t?1:-1
|
|
2526
|
+
;"rtl"===n.direction&&(o*=-1),this.quill.format("indent",r+o,a.default.sources.USER)
|
|
2527
|
+
}},link:function(t){
|
|
2528
|
+
!0===t&&(t=prompt("Enter link URL:")),this.quill.format("link",t,a.default.sources.USER)
|
|
2529
|
+
},list:function(t){var e=this.quill.getSelection(),n=this.quill.getFormat(e)
|
|
2530
|
+
;"check"===t?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,a.default.sources.USER):this.quill.format("list","unchecked",a.default.sources.USER):this.quill.format("list",t,a.default.sources.USER)
|
|
2531
|
+
}}},e.default=d,e.addControls=y},function(t,e){
|
|
2532
|
+
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>'
|
|
2533
|
+
},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0})
|
|
2534
|
+
;var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n]
|
|
2535
|
+
;r.enumerable=r.enumerable||!1,
|
|
2536
|
+
r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}
|
|
2537
|
+
}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}
|
|
2538
|
+
}(),i=function t(e,n,r){null===e&&(e=Function.prototype)
|
|
2539
|
+
;var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){
|
|
2540
|
+
var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}
|
|
2541
|
+
if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0
|
|
2542
|
+
},l=n(28),a=function(t){function e(t,n){!function(t,e){
|
|
2543
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")
|
|
2544
|
+
}(this,e);var r=function(t,e){
|
|
2545
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
2546
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e
|
|
2547
|
+
}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))
|
|
2548
|
+
;return r.label.innerHTML=n,
|
|
2549
|
+
r.container.classList.add("ql-color-picker"),[].slice.call(r.container.querySelectorAll(".ql-picker-item"),0,7).forEach((function(t){
|
|
2550
|
+
t.classList.add("ql-primary")})),r}return function(t,e){
|
|
2551
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
2552
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
2553
|
+
writable:!0,configurable:!0}
|
|
2554
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)
|
|
2555
|
+
}(e,t),o(e,[{key:"buildItem",value:function(t){
|
|
2556
|
+
var n=i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"buildItem",this).call(this,t)
|
|
2557
|
+
;return n.style.backgroundColor=t.getAttribute("value")||"",n}},{
|
|
2558
|
+
key:"selectItem",value:function(t,n){
|
|
2559
|
+
i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"selectItem",this).call(this,t,n)
|
|
2560
|
+
;var r=this.label.querySelector(".ql-color-label"),o=t&&t.getAttribute("data-value")||""
|
|
2561
|
+
;r&&("line"===r.tagName?r.style.stroke=o:r.style.fill=o)}}]),e
|
|
2562
|
+
}(((r=l)&&r.__esModule?r:{default:r}).default);e.default=a},function(t,e,n){
|
|
2563
|
+
Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){
|
|
2564
|
+
function t(t,e){for(var n=0;n<e.length;n++){var r=e[n]
|
|
2565
|
+
;r.enumerable=r.enumerable||!1,
|
|
2566
|
+
r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}
|
|
2567
|
+
}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}
|
|
2568
|
+
}(),i=function t(e,n,r){null===e&&(e=Function.prototype)
|
|
2569
|
+
;var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){
|
|
2570
|
+
var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}
|
|
2571
|
+
if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0
|
|
2572
|
+
},l=n(28),a=function(t){function e(t,n){!function(t,e){
|
|
2573
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")
|
|
2574
|
+
}(this,e);var r=function(t,e){
|
|
2575
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
2576
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e
|
|
2577
|
+
}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))
|
|
2578
|
+
;return r.container.classList.add("ql-icon-picker"),
|
|
2579
|
+
[].forEach.call(r.container.querySelectorAll(".ql-picker-item"),(function(t){
|
|
2580
|
+
t.innerHTML=n[t.getAttribute("data-value")||""]
|
|
2581
|
+
})),r.defaultItem=r.container.querySelector(".ql-selected"),
|
|
2582
|
+
r.selectItem(r.defaultItem),r}return function(t,e){
|
|
2583
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
2584
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
2585
|
+
writable:!0,configurable:!0}
|
|
2586
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)
|
|
2587
|
+
}(e,t),o(e,[{key:"selectItem",value:function(t,n){
|
|
2588
|
+
i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"selectItem",this).call(this,t,n),
|
|
2589
|
+
t=t||this.defaultItem,this.label.innerHTML=t.innerHTML}}]),e
|
|
2590
|
+
}(((r=l)&&r.__esModule?r:{default:r}).default);e.default=a},function(t,e,n){
|
|
2591
|
+
Object.defineProperty(e,"__esModule",{value:!0});var r=function(){
|
|
2592
|
+
function t(t,e){for(var n=0;n<e.length;n++){var r=e[n]
|
|
2593
|
+
;r.enumerable=r.enumerable||!1,
|
|
2594
|
+
r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}
|
|
2595
|
+
}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){
|
|
2596
|
+
function t(e,n){var r=this;!function(t,e){
|
|
2597
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")
|
|
2598
|
+
}(this,t),
|
|
2599
|
+
this.quill=e,this.boundsContainer=n||document.body,this.root=e.addContainer("ql-tooltip"),
|
|
2600
|
+
this.root.innerHTML=this.constructor.TEMPLATE,
|
|
2601
|
+
this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",(function(){
|
|
2602
|
+
r.root.style.marginTop=-1*r.quill.root.scrollTop+"px"})),this.hide()}
|
|
2603
|
+
return r(t,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}
|
|
2604
|
+
},{key:"position",value:function(t){
|
|
2605
|
+
var e=t.left+t.width/2-this.root.offsetWidth/2,n=t.bottom+this.quill.root.scrollTop
|
|
2606
|
+
;this.root.style.left=e+"px",
|
|
2607
|
+
this.root.style.top=n+"px",this.root.classList.remove("ql-flip")
|
|
2608
|
+
;var r=this.boundsContainer.getBoundingClientRect(),o=this.root.getBoundingClientRect(),i=0
|
|
2609
|
+
;if(o.right>r.right&&(i=r.right-o.right,
|
|
2610
|
+
this.root.style.left=e+i+"px"),o.left<r.left&&(i=r.left-o.left,
|
|
2611
|
+
this.root.style.left=e+i+"px"),o.bottom>r.bottom){
|
|
2612
|
+
var l=o.bottom-o.top,a=t.bottom-t.top+l
|
|
2613
|
+
;this.root.style.top=n-a+"px",this.root.classList.add("ql-flip")}return i}},{
|
|
2614
|
+
key:"show",value:function(){
|
|
2615
|
+
this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")
|
|
2616
|
+
}}]),t}();e.default=o},function(t,e,n){Object.defineProperty(e,"__esModule",{
|
|
2617
|
+
value:!0});var r=function(t,e){if(Array.isArray(t))return t
|
|
2618
|
+
;if(Symbol.iterator in Object(t))return function(t,e){
|
|
2619
|
+
var n=[],r=!0,o=!1,i=void 0;try{
|
|
2620
|
+
for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),
|
|
2621
|
+
!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()
|
|
2622
|
+
}finally{if(o)throw i}}return n}(t,e)
|
|
2623
|
+
;throw new TypeError("Invalid attempt to destructure non-iterable instance")
|
|
2624
|
+
},o=function t(e,n,r){null===e&&(e=Function.prototype)
|
|
2625
|
+
;var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){
|
|
2626
|
+
var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}
|
|
2627
|
+
if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0
|
|
2628
|
+
},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n]
|
|
2629
|
+
;r.enumerable=r.enumerable||!1,
|
|
2630
|
+
r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}
|
|
2631
|
+
}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}
|
|
2632
|
+
}(),l=d(n(3)),a=d(n(8)),s=n(43),u=d(s),c=d(n(27)),f=n(15),p=d(n(41))
|
|
2633
|
+
;function d(t){return t&&t.__esModule?t:{default:t}}function h(t,e){
|
|
2634
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}
|
|
2635
|
+
function y(t,e){
|
|
2636
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
2637
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function v(t,e){
|
|
2638
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
2639
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
2640
|
+
writable:!0,configurable:!0}
|
|
2641
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var b=[[{
|
|
2642
|
+
header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"
|
|
2643
|
+
},{list:"bullet"}],["clean"]],g=function(t){function e(t,n){
|
|
2644
|
+
h(this,e),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=b)
|
|
2645
|
+
;var r=y(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))
|
|
2646
|
+
;return r.quill.container.classList.add("ql-snow"),r}return v(e,t),i(e,[{
|
|
2647
|
+
key:"extendToolbar",value:function(t){
|
|
2648
|
+
t.container.classList.add("ql-snow"),this.buildButtons([].slice.call(t.container.querySelectorAll("button")),p.default),
|
|
2649
|
+
this.buildPickers([].slice.call(t.container.querySelectorAll("select")),p.default),
|
|
2650
|
+
this.tooltip=new m(this.quill,this.options.bounds),
|
|
2651
|
+
t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",
|
|
2652
|
+
shortKey:!0},(function(e,n){t.handlers.link.call(t,!n.format.link)}))}}]),e
|
|
2653
|
+
}(u.default);g.DEFAULTS=(0,l.default)(!0,{},u.default.DEFAULTS,{modules:{
|
|
2654
|
+
toolbar:{handlers:{link:function(t){if(t){var e=this.quill.getSelection()
|
|
2655
|
+
;if(null==e||0==e.length)return;var n=this.quill.getText(e)
|
|
2656
|
+
;/^\S+@\S+\.\S+$/.test(n)&&0!==n.indexOf("mailto:")&&(n="mailto:"+n),
|
|
2657
|
+
this.quill.theme.tooltip.edit("link",n)}else this.quill.format("link",!1)}}}}})
|
|
2658
|
+
;var m=function(t){function e(t,n){h(this,e)
|
|
2659
|
+
;var r=y(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))
|
|
2660
|
+
;return r.preview=r.root.querySelector("a.ql-preview"),r}return v(e,t),i(e,[{
|
|
2661
|
+
key:"listen",value:function(){var t=this
|
|
2662
|
+
;o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),
|
|
2663
|
+
this.root.querySelector("a.ql-action").addEventListener("click",(function(e){
|
|
2664
|
+
t.root.classList.contains("ql-editing")?t.save():t.edit("link",t.preview.textContent),
|
|
2665
|
+
e.preventDefault()
|
|
2666
|
+
})),this.root.querySelector("a.ql-remove").addEventListener("click",(function(e){
|
|
2667
|
+
if(null!=t.linkRange){var n=t.linkRange
|
|
2668
|
+
;t.restoreFocus(),t.quill.formatText(n,"link",!1,a.default.sources.USER),
|
|
2669
|
+
delete t.linkRange}e.preventDefault(),t.hide()
|
|
2670
|
+
})),this.quill.on(a.default.events.SELECTION_CHANGE,(function(e,n,o){
|
|
2671
|
+
if(null!=e){if(0===e.length&&o===a.default.sources.USER){
|
|
2672
|
+
var i=t.quill.scroll.descendant(c.default,e.index),l=r(i,2),s=l[0],u=l[1]
|
|
2673
|
+
;if(null!=s){t.linkRange=new f.Range(e.index-u,s.length())
|
|
2674
|
+
;var p=c.default.formats(s.domNode)
|
|
2675
|
+
;return t.preview.textContent=p,t.preview.setAttribute("href",p),
|
|
2676
|
+
t.show(),void t.position(t.quill.getBounds(t.linkRange))}
|
|
2677
|
+
}else delete t.linkRange;t.hide()}}))}},{key:"show",value:function(){
|
|
2678
|
+
o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"show",this).call(this),
|
|
2679
|
+
this.root.removeAttribute("data-mode")}}]),e}(s.BaseTooltip)
|
|
2680
|
+
;m.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),
|
|
2681
|
+
e.default=g},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0})
|
|
2682
|
+
;var r=M(n(29)),o=n(36),i=n(38),l=n(64),a=M(n(65)),s=M(n(66)),u=n(67),c=M(u),f=n(37),p=n(26),d=n(39),h=n(40),y=M(n(56)),v=M(n(68)),b=M(n(27)),g=M(n(69)),m=M(n(70)),_=M(n(71)),O=M(n(72)),x=M(n(73)),w=n(13),E=M(w),k=M(n(74)),N=M(n(75)),j=M(n(57)),A=M(n(41)),q=M(n(28)),T=M(n(59)),S=M(n(60)),P=M(n(61)),C=M(n(108)),L=M(n(62))
|
|
2683
|
+
;function M(t){return t&&t.__esModule?t:{default:t}}r.default.register({
|
|
2684
|
+
"attributors/attribute/direction":i.DirectionAttribute,
|
|
2685
|
+
"attributors/class/align":o.AlignClass,
|
|
2686
|
+
"attributors/class/background":f.BackgroundClass,
|
|
2687
|
+
"attributors/class/color":p.ColorClass,
|
|
2688
|
+
"attributors/class/direction":i.DirectionClass,
|
|
2689
|
+
"attributors/class/font":d.FontClass,"attributors/class/size":h.SizeClass,
|
|
2690
|
+
"attributors/style/align":o.AlignStyle,
|
|
2691
|
+
"attributors/style/background":f.BackgroundStyle,
|
|
2692
|
+
"attributors/style/color":p.ColorStyle,
|
|
2693
|
+
"attributors/style/direction":i.DirectionStyle,
|
|
2694
|
+
"attributors/style/font":d.FontStyle,"attributors/style/size":h.SizeStyle
|
|
2695
|
+
},!0),r.default.register({"formats/align":o.AlignClass,
|
|
2696
|
+
"formats/direction":i.DirectionClass,"formats/indent":l.IndentClass,
|
|
2697
|
+
"formats/background":f.BackgroundStyle,"formats/color":p.ColorStyle,
|
|
2698
|
+
"formats/font":d.FontClass,"formats/size":h.SizeClass,
|
|
2699
|
+
"formats/blockquote":a.default,"formats/code-block":E.default,
|
|
2700
|
+
"formats/header":s.default,"formats/list":c.default,"formats/bold":y.default,
|
|
2701
|
+
"formats/code":w.Code,"formats/italic":v.default,"formats/link":b.default,
|
|
2702
|
+
"formats/script":g.default,"formats/strike":m.default,
|
|
2703
|
+
"formats/underline":_.default,"formats/image":O.default,
|
|
2704
|
+
"formats/video":x.default,"formats/list/item":u.ListItem,
|
|
2705
|
+
"modules/formula":k.default,"modules/syntax":N.default,
|
|
2706
|
+
"modules/toolbar":j.default,"themes/bubble":C.default,"themes/snow":L.default,
|
|
2707
|
+
"ui/icons":A.default,"ui/picker":q.default,"ui/icon-picker":S.default,
|
|
2708
|
+
"ui/color-picker":T.default,"ui/tooltip":P.default},!0),e.default=r.default
|
|
2709
|
+
},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0
|
|
2710
|
+
}),e.IndentClass=void 0;var r,o=function(){function t(t,e){
|
|
2711
|
+
for(var n=0;n<e.length;n++){var r=e[n]
|
|
2712
|
+
;r.enumerable=r.enumerable||!1,r.configurable=!0,
|
|
2713
|
+
"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}
|
|
2714
|
+
return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}
|
|
2715
|
+
}(),i=function t(e,n,r){null===e&&(e=Function.prototype)
|
|
2716
|
+
;var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){
|
|
2717
|
+
var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}
|
|
2718
|
+
if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0
|
|
2719
|
+
},l=n(0),a=(r=l)&&r.__esModule?r:{default:r},s=function(t){function e(){
|
|
2720
|
+
return function(t,e){
|
|
2721
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")
|
|
2722
|
+
}(this,e),function(t,e){
|
|
2723
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
2724
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e
|
|
2725
|
+
}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}
|
|
2726
|
+
return function(t,e){
|
|
2727
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
2728
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
2729
|
+
writable:!0,configurable:!0}
|
|
2730
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)
|
|
2731
|
+
}(e,t),o(e,[{key:"add",value:function(t,n){if("+1"===n||"-1"===n){
|
|
2732
|
+
var r=this.value(t)||0;n="+1"===n?r+1:r-1}
|
|
2733
|
+
return 0===n?(this.remove(t),!0):i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"add",this).call(this,t,n)
|
|
2734
|
+
}},{key:"canAdd",value:function(t,n){
|
|
2735
|
+
return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"canAdd",this).call(this,t,n)||i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"canAdd",this).call(this,t,parseInt(n))
|
|
2736
|
+
}},{key:"value",value:function(t){
|
|
2737
|
+
return parseInt(i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t))||void 0
|
|
2738
|
+
}}]),e}(a.default.Attributor.Class),u=new s("indent","ql-indent",{
|
|
2739
|
+
scope:a.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});e.IndentClass=u
|
|
2740
|
+
},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0})
|
|
2741
|
+
;var r,o=n(4),i=function(t){function e(){return function(t,e){
|
|
2742
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")
|
|
2743
|
+
}(this,e),function(t,e){
|
|
2744
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
2745
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e
|
|
2746
|
+
}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}
|
|
2747
|
+
return function(t,e){
|
|
2748
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
2749
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
2750
|
+
writable:!0,configurable:!0}
|
|
2751
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e
|
|
2752
|
+
}(((r=o)&&r.__esModule?r:{default:r}).default)
|
|
2753
|
+
;i.blotName="blockquote",i.tagName="blockquote",e.default=i},function(t,e,n){
|
|
2754
|
+
Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){
|
|
2755
|
+
function t(t,e){for(var n=0;n<e.length;n++){var r=e[n]
|
|
2756
|
+
;r.enumerable=r.enumerable||!1,
|
|
2757
|
+
r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}
|
|
2758
|
+
}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}
|
|
2759
|
+
}(),i=n(4),l=function(t){function e(){return function(t,e){
|
|
2760
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")
|
|
2761
|
+
}(this,e),function(t,e){
|
|
2762
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
2763
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e
|
|
2764
|
+
}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}
|
|
2765
|
+
return function(t,e){
|
|
2766
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
2767
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
2768
|
+
writable:!0,configurable:!0}
|
|
2769
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)
|
|
2770
|
+
}(e,t),o(e,null,[{key:"formats",value:function(t){
|
|
2771
|
+
return this.tagName.indexOf(t.tagName)+1}}]),e}(((r=i)&&r.__esModule?r:{
|
|
2772
|
+
default:r}).default)
|
|
2773
|
+
;l.blotName="header",l.tagName=["H1","H2","H3","H4","H5","H6"],e.default=l
|
|
2774
|
+
},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0
|
|
2775
|
+
}),e.default=e.ListItem=void 0;var r=function(){function t(t,e){
|
|
2776
|
+
for(var n=0;n<e.length;n++){var r=e[n]
|
|
2777
|
+
;r.enumerable=r.enumerable||!1,r.configurable=!0,
|
|
2778
|
+
"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}
|
|
2779
|
+
return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}
|
|
2780
|
+
}(),o=function t(e,n,r){null===e&&(e=Function.prototype)
|
|
2781
|
+
;var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){
|
|
2782
|
+
var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}
|
|
2783
|
+
if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0
|
|
2784
|
+
},i=s(n(0)),l=s(n(4)),a=s(n(25));function s(t){return t&&t.__esModule?t:{
|
|
2785
|
+
default:t}}function u(t,e){
|
|
2786
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}
|
|
2787
|
+
function c(t,e){
|
|
2788
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
2789
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function f(t,e){
|
|
2790
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
2791
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
2792
|
+
writable:!0,configurable:!0}
|
|
2793
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}
|
|
2794
|
+
var p=function(t){function e(){
|
|
2795
|
+
return u(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))
|
|
2796
|
+
}return f(e,t),r(e,[{key:"format",value:function(t,n){
|
|
2797
|
+
t!==d.blotName||n?o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n):this.replaceWith(i.default.create(this.statics.scope))
|
|
2798
|
+
}},{key:"remove",value:function(){
|
|
2799
|
+
null==this.prev&&null==this.next?this.parent.remove():o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"remove",this).call(this)
|
|
2800
|
+
}},{key:"replaceWith",value:function(t,n){
|
|
2801
|
+
return this.parent.isolate(this.offset(this.parent),this.length()),
|
|
2802
|
+
t===this.parent.statics.blotName?(this.parent.replaceWith(t,n),
|
|
2803
|
+
this):(this.parent.unwrap(),
|
|
2804
|
+
o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replaceWith",this).call(this,t,n))
|
|
2805
|
+
}}],[{key:"formats",value:function(t){
|
|
2806
|
+
return t.tagName===this.tagName?void 0:o(e.__proto__||Object.getPrototypeOf(e),"formats",this).call(this,t)
|
|
2807
|
+
}}]),e}(l.default);p.blotName="list-item",p.tagName="LI";var d=function(t){
|
|
2808
|
+
function e(t){u(this,e)
|
|
2809
|
+
;var n=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t)),r=function(e){
|
|
2810
|
+
if(e.target.parentNode===t){
|
|
2811
|
+
var r=n.statics.formats(t),o=i.default.find(e.target)
|
|
2812
|
+
;"checked"===r?o.format("list","unchecked"):"unchecked"===r&&o.format("list","checked")
|
|
2813
|
+
}};return t.addEventListener("touchstart",r),t.addEventListener("mousedown",r),n
|
|
2814
|
+
}return f(e,t),r(e,null,[{key:"create",value:function(t){
|
|
2815
|
+
var n="ordered"===t?"OL":"UL",r=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,n)
|
|
2816
|
+
;return"checked"!==t&&"unchecked"!==t||r.setAttribute("data-checked","checked"===t),
|
|
2817
|
+
r}},{key:"formats",value:function(t){
|
|
2818
|
+
return"OL"===t.tagName?"ordered":"UL"===t.tagName?t.hasAttribute("data-checked")?"true"===t.getAttribute("data-checked")?"checked":"unchecked":"bullet":void 0
|
|
2819
|
+
}}]),r(e,[{key:"format",value:function(t,e){
|
|
2820
|
+
this.children.length>0&&this.children.tail.format(t,e)}},{key:"formats",
|
|
2821
|
+
value:function(){
|
|
2822
|
+
return t={},e=this.statics.blotName,n=this.statics.formats(this.domNode),
|
|
2823
|
+
e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,
|
|
2824
|
+
writable:!0}):t[e]=n,t;var t,e,n}},{key:"insertBefore",value:function(t,n){
|
|
2825
|
+
if(t instanceof p)o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n);else{
|
|
2826
|
+
var r=null==n?this.length():n.offset(this),i=this.split(r)
|
|
2827
|
+
;i.parent.insertBefore(t,i)}}},{key:"optimize",value:function(t){
|
|
2828
|
+
o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t)
|
|
2829
|
+
;var n=this.next
|
|
2830
|
+
;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(n.moveChildren(this),
|
|
2831
|
+
n.remove())}},{key:"replace",value:function(t){
|
|
2832
|
+
if(t.statics.blotName!==this.statics.blotName){
|
|
2833
|
+
var n=i.default.create(this.statics.defaultChild)
|
|
2834
|
+
;t.moveChildren(n),this.appendChild(n)}
|
|
2835
|
+
o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t)
|
|
2836
|
+
}}]),e}(a.default)
|
|
2837
|
+
;d.blotName="list",d.scope=i.default.Scope.BLOCK_BLOT,d.tagName=["OL","UL"],
|
|
2838
|
+
d.defaultChild="list-item",d.allowedChildren=[p],e.ListItem=p,e.default=d
|
|
2839
|
+
},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0})
|
|
2840
|
+
;var r,o=n(56),i=function(t){function e(){return function(t,e){
|
|
2841
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")
|
|
2842
|
+
}(this,e),function(t,e){
|
|
2843
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
2844
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e
|
|
2845
|
+
}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}
|
|
2846
|
+
return function(t,e){
|
|
2847
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
2848
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
2849
|
+
writable:!0,configurable:!0}
|
|
2850
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e
|
|
2851
|
+
}(((r=o)&&r.__esModule?r:{default:r}).default)
|
|
2852
|
+
;i.blotName="italic",i.tagName=["EM","I"],e.default=i},function(t,e,n){
|
|
2853
|
+
Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){
|
|
2854
|
+
function t(t,e){for(var n=0;n<e.length;n++){var r=e[n]
|
|
2855
|
+
;r.enumerable=r.enumerable||!1,
|
|
2856
|
+
r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}
|
|
2857
|
+
}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}
|
|
2858
|
+
}(),i=function t(e,n,r){null===e&&(e=Function.prototype)
|
|
2859
|
+
;var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){
|
|
2860
|
+
var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}
|
|
2861
|
+
if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0
|
|
2862
|
+
},l=n(6),a=function(t){function e(){return function(t,e){
|
|
2863
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")
|
|
2864
|
+
}(this,e),function(t,e){
|
|
2865
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
2866
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e
|
|
2867
|
+
}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}
|
|
2868
|
+
return function(t,e){
|
|
2869
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
2870
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
2871
|
+
writable:!0,configurable:!0}
|
|
2872
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)
|
|
2873
|
+
}(e,t),o(e,null,[{key:"create",value:function(t){
|
|
2874
|
+
return"super"===t?document.createElement("sup"):"sub"===t?document.createElement("sub"):i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t)
|
|
2875
|
+
}},{key:"formats",value:function(t){
|
|
2876
|
+
return"SUB"===t.tagName?"sub":"SUP"===t.tagName?"super":void 0}}]),e
|
|
2877
|
+
}(((r=l)&&r.__esModule?r:{default:r}).default)
|
|
2878
|
+
;a.blotName="script",a.tagName=["SUB","SUP"],e.default=a},function(t,e,n){
|
|
2879
|
+
Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(6),i=function(t){
|
|
2880
|
+
function e(){return function(t,e){
|
|
2881
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")
|
|
2882
|
+
}(this,e),function(t,e){
|
|
2883
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
2884
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e
|
|
2885
|
+
}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}
|
|
2886
|
+
return function(t,e){
|
|
2887
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
2888
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
2889
|
+
writable:!0,configurable:!0}
|
|
2890
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e
|
|
2891
|
+
}(((r=o)&&r.__esModule?r:{default:r}).default)
|
|
2892
|
+
;i.blotName="strike",i.tagName="S",e.default=i},function(t,e,n){
|
|
2893
|
+
Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(6),i=function(t){
|
|
2894
|
+
function e(){return function(t,e){
|
|
2895
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")
|
|
2896
|
+
}(this,e),function(t,e){
|
|
2897
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
2898
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e
|
|
2899
|
+
}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}
|
|
2900
|
+
return function(t,e){
|
|
2901
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
2902
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
2903
|
+
writable:!0,configurable:!0}
|
|
2904
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e
|
|
2905
|
+
}(((r=o)&&r.__esModule?r:{default:r}).default)
|
|
2906
|
+
;i.blotName="underline",i.tagName="U",e.default=i},function(t,e,n){
|
|
2907
|
+
Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){
|
|
2908
|
+
function t(t,e){for(var n=0;n<e.length;n++){var r=e[n]
|
|
2909
|
+
;r.enumerable=r.enumerable||!1,
|
|
2910
|
+
r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}
|
|
2911
|
+
}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}
|
|
2912
|
+
}(),i=function t(e,n,r){null===e&&(e=Function.prototype)
|
|
2913
|
+
;var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){
|
|
2914
|
+
var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}
|
|
2915
|
+
if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0
|
|
2916
|
+
},l=n(0),a=(r=l)&&r.__esModule?r:{default:r
|
|
2917
|
+
},s=n(27),u=["alt","height","width"],c=function(t){function e(){
|
|
2918
|
+
return function(t,e){
|
|
2919
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")
|
|
2920
|
+
}(this,e),function(t,e){
|
|
2921
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
2922
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e
|
|
2923
|
+
}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}
|
|
2924
|
+
return function(t,e){
|
|
2925
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
2926
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
2927
|
+
writable:!0,configurable:!0}
|
|
2928
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)
|
|
2929
|
+
}(e,t),o(e,[{key:"format",value:function(t,n){
|
|
2930
|
+
u.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)
|
|
2931
|
+
}}],[{key:"create",value:function(t){
|
|
2932
|
+
var n=i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t)
|
|
2933
|
+
;return"string"==typeof t&&n.setAttribute("src",this.sanitize(t)),n}},{
|
|
2934
|
+
key:"formats",value:function(t){return u.reduce((function(e,n){
|
|
2935
|
+
return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"match",
|
|
2936
|
+
value:function(t){
|
|
2937
|
+
return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}},{
|
|
2938
|
+
key:"sanitize",value:function(t){
|
|
2939
|
+
return(0,s.sanitize)(t,["http","https","data"])?t:"//:0"}},{key:"value",
|
|
2940
|
+
value:function(t){return t.getAttribute("src")}}]),e}(a.default.Embed)
|
|
2941
|
+
;c.blotName="image",c.tagName="IMG",e.default=c},function(t,e,n){
|
|
2942
|
+
Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){
|
|
2943
|
+
function t(t,e){for(var n=0;n<e.length;n++){var r=e[n]
|
|
2944
|
+
;r.enumerable=r.enumerable||!1,
|
|
2945
|
+
r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}
|
|
2946
|
+
}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}
|
|
2947
|
+
}(),i=function t(e,n,r){null===e&&(e=Function.prototype)
|
|
2948
|
+
;var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){
|
|
2949
|
+
var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}
|
|
2950
|
+
if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0
|
|
2951
|
+
},l=n(4),a=n(27),s=(r=a)&&r.__esModule?r:{default:r
|
|
2952
|
+
},u=["height","width"],c=function(t){function e(){return function(t,e){
|
|
2953
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")
|
|
2954
|
+
}(this,e),function(t,e){
|
|
2955
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
2956
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e
|
|
2957
|
+
}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}
|
|
2958
|
+
return function(t,e){
|
|
2959
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
2960
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
2961
|
+
writable:!0,configurable:!0}
|
|
2962
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)
|
|
2963
|
+
}(e,t),o(e,[{key:"format",value:function(t,n){
|
|
2964
|
+
u.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)
|
|
2965
|
+
}}],[{key:"create",value:function(t){
|
|
2966
|
+
var n=i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t)
|
|
2967
|
+
;return n.setAttribute("frameborder","0"),
|
|
2968
|
+
n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(t)),n}
|
|
2969
|
+
},{key:"formats",value:function(t){return u.reduce((function(e,n){
|
|
2970
|
+
return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"sanitize",
|
|
2971
|
+
value:function(t){return s.default.sanitize(t)}},{key:"value",value:function(t){
|
|
2972
|
+
return t.getAttribute("src")}}]),e}(l.BlockEmbed)
|
|
2973
|
+
;c.blotName="video",c.className="ql-video",c.tagName="IFRAME",e.default=c
|
|
2974
|
+
},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0
|
|
2975
|
+
}),e.default=e.FormulaBlot=void 0;var r=function(){function t(t,e){
|
|
2976
|
+
for(var n=0;n<e.length;n++){var r=e[n]
|
|
2977
|
+
;r.enumerable=r.enumerable||!1,r.configurable=!0,
|
|
2978
|
+
"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}
|
|
2979
|
+
return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}
|
|
2980
|
+
}(),o=function t(e,n,r){null===e&&(e=Function.prototype)
|
|
2981
|
+
;var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){
|
|
2982
|
+
var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}
|
|
2983
|
+
if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0
|
|
2984
|
+
},i=s(n(35)),l=s(n(5)),a=s(n(9));function s(t){return t&&t.__esModule?t:{
|
|
2985
|
+
default:t}}function u(t,e){
|
|
2986
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}
|
|
2987
|
+
function c(t,e){
|
|
2988
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
2989
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function f(t,e){
|
|
2990
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
2991
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
2992
|
+
writable:!0,configurable:!0}
|
|
2993
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}
|
|
2994
|
+
var p=function(t){function e(){
|
|
2995
|
+
return u(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))
|
|
2996
|
+
}return f(e,t),r(e,null,[{key:"create",value:function(t){
|
|
2997
|
+
var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t)
|
|
2998
|
+
;return"string"==typeof t&&(window.katex.render(t,n,{throwOnError:!1,
|
|
2999
|
+
errorColor:"#f00"}),n.setAttribute("data-value",t)),n}},{key:"value",
|
|
3000
|
+
value:function(t){return t.getAttribute("data-value")}}]),e}(i.default)
|
|
3001
|
+
;p.blotName="formula",p.className="ql-formula",p.tagName="SPAN"
|
|
3002
|
+
;var d=function(t){function e(){u(this,e)
|
|
3003
|
+
;var t=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this))
|
|
3004
|
+
;if(null==window.katex)throw new Error("Formula module requires KaTeX.")
|
|
3005
|
+
;return t}return f(e,t),r(e,null,[{key:"register",value:function(){
|
|
3006
|
+
l.default.register(p,!0)}}]),e}(a.default);e.FormulaBlot=p,e.default=d
|
|
3007
|
+
},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0
|
|
3008
|
+
}),e.default=e.CodeToken=e.CodeBlock=void 0;var r=function(){function t(t,e){
|
|
3009
|
+
for(var n=0;n<e.length;n++){var r=e[n]
|
|
3010
|
+
;r.enumerable=r.enumerable||!1,r.configurable=!0,
|
|
3011
|
+
"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}
|
|
3012
|
+
return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}
|
|
3013
|
+
}(),o=function t(e,n,r){null===e&&(e=Function.prototype)
|
|
3014
|
+
;var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){
|
|
3015
|
+
var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}
|
|
3016
|
+
if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0
|
|
3017
|
+
},i=s(n(0)),l=s(n(5)),a=s(n(9));function s(t){return t&&t.__esModule?t:{
|
|
3018
|
+
default:t}}function u(t,e){
|
|
3019
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}
|
|
3020
|
+
function c(t,e){
|
|
3021
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
3022
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function f(t,e){
|
|
3023
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
3024
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
3025
|
+
writable:!0,configurable:!0}
|
|
3026
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}
|
|
3027
|
+
var p=function(t){function e(){
|
|
3028
|
+
return u(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))
|
|
3029
|
+
}return f(e,t),r(e,[{key:"replaceWith",value:function(t){
|
|
3030
|
+
this.domNode.textContent=this.domNode.textContent,
|
|
3031
|
+
this.attach(),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replaceWith",this).call(this,t)
|
|
3032
|
+
}},{key:"highlight",value:function(t){var e=this.domNode.textContent
|
|
3033
|
+
;this.cachedText!==e&&((e.trim().length>0||null==this.cachedText)&&(this.domNode.innerHTML=t(e),
|
|
3034
|
+
this.domNode.normalize(),this.attach()),this.cachedText=e)}}]),e
|
|
3035
|
+
}(s(n(13)).default);p.className="ql-syntax"
|
|
3036
|
+
;var d=new i.default.Attributor.Class("token","hljs",{
|
|
3037
|
+
scope:i.default.Scope.INLINE}),h=function(t){function e(t,n){u(this,e)
|
|
3038
|
+
;var r=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))
|
|
3039
|
+
;if("function"!=typeof r.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.")
|
|
3040
|
+
;var o=null;return r.quill.on(l.default.events.SCROLL_OPTIMIZE,(function(){
|
|
3041
|
+
clearTimeout(o),o=setTimeout((function(){r.highlight(),o=null
|
|
3042
|
+
}),r.options.interval)})),r.highlight(),r}return f(e,t),r(e,null,[{
|
|
3043
|
+
key:"register",value:function(){
|
|
3044
|
+
l.default.register(d,!0),l.default.register(p,!0)}}]),r(e,[{key:"highlight",
|
|
3045
|
+
value:function(){var t=this;if(!this.quill.selection.composing){
|
|
3046
|
+
this.quill.update(l.default.sources.USER);var e=this.quill.getSelection()
|
|
3047
|
+
;this.quill.scroll.descendants(p).forEach((function(e){
|
|
3048
|
+
e.highlight(t.options.highlight)})),this.quill.update(l.default.sources.SILENT),
|
|
3049
|
+
null!=e&&this.quill.setSelection(e,l.default.sources.SILENT)}}}]),e}(a.default)
|
|
3050
|
+
;h.DEFAULTS={highlight:null==window.hljs?null:function(t){
|
|
3051
|
+
return window.hljs.highlightAuto(t).value},interval:1e3
|
|
3052
|
+
},e.CodeBlock=p,e.CodeToken=d,e.default=h},function(t,e){
|
|
3053
|
+
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>'
|
|
3054
|
+
},function(t,e){
|
|
3055
|
+
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>'
|
|
3056
|
+
},function(t,e){
|
|
3057
|
+
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>'
|
|
3058
|
+
},function(t,e){
|
|
3059
|
+
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>'
|
|
3060
|
+
},function(t,e){
|
|
3061
|
+
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>'
|
|
3062
|
+
},function(t,e){
|
|
3063
|
+
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>'
|
|
3064
|
+
},function(t,e){
|
|
3065
|
+
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>'
|
|
3066
|
+
},function(t,e){
|
|
3067
|
+
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>'
|
|
3068
|
+
},function(t,e){
|
|
3069
|
+
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>'
|
|
3070
|
+
},function(t,e){
|
|
3071
|
+
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>'
|
|
3072
|
+
},function(t,e){
|
|
3073
|
+
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>'
|
|
3074
|
+
},function(t,e){
|
|
3075
|
+
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>'
|
|
3076
|
+
},function(t,e){
|
|
3077
|
+
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>'
|
|
3078
|
+
},function(t,e){
|
|
3079
|
+
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>'
|
|
3080
|
+
},function(t,e){
|
|
3081
|
+
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>'
|
|
3082
|
+
},function(t,e){
|
|
3083
|
+
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>'
|
|
3084
|
+
},function(t,e){
|
|
3085
|
+
t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'
|
|
3086
|
+
},function(t,e){
|
|
3087
|
+
t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'
|
|
3088
|
+
},function(t,e){
|
|
3089
|
+
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>'
|
|
3090
|
+
},function(t,e){
|
|
3091
|
+
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>'
|
|
3092
|
+
},function(t,e){
|
|
3093
|
+
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>'
|
|
3094
|
+
},function(t,e){
|
|
3095
|
+
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>'
|
|
3096
|
+
},function(t,e){
|
|
3097
|
+
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>'
|
|
3098
|
+
},function(t,e){
|
|
3099
|
+
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>'
|
|
3100
|
+
},function(t,e){
|
|
3101
|
+
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>'
|
|
3102
|
+
},function(t,e){
|
|
3103
|
+
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>'
|
|
3104
|
+
},function(t,e){
|
|
3105
|
+
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>'
|
|
3106
|
+
},function(t,e){
|
|
3107
|
+
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>'
|
|
3108
|
+
},function(t,e){
|
|
3109
|
+
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>'
|
|
3110
|
+
},function(t,e){
|
|
3111
|
+
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>'
|
|
3112
|
+
},function(t,e){
|
|
3113
|
+
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>'
|
|
3114
|
+
},function(t,e){
|
|
3115
|
+
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>'
|
|
3116
|
+
},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0
|
|
3117
|
+
}),e.default=e.BubbleTooltip=void 0;var r=function t(e,n,r){
|
|
3118
|
+
null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n)
|
|
3119
|
+
;if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}
|
|
3120
|
+
if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0
|
|
3121
|
+
},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n]
|
|
3122
|
+
;r.enumerable=r.enumerable||!1,
|
|
3123
|
+
r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}
|
|
3124
|
+
}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}
|
|
3125
|
+
}(),i=f(n(3)),l=f(n(8)),a=n(43),s=f(a),u=n(15),c=f(n(41));function f(t){
|
|
3126
|
+
return t&&t.__esModule?t:{default:t}}function p(t,e){
|
|
3127
|
+
if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}
|
|
3128
|
+
function d(t,e){
|
|
3129
|
+
if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
|
3130
|
+
;return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function h(t,e){
|
|
3131
|
+
if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e)
|
|
3132
|
+
;t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,
|
|
3133
|
+
writable:!0,configurable:!0}
|
|
3134
|
+
}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}
|
|
3135
|
+
var y=[["bold","italic","link"],[{header:1},{header:2
|
|
3136
|
+
},"blockquote"]],v=function(t){function e(t,n){
|
|
3137
|
+
p(this,e),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=y)
|
|
3138
|
+
;var r=d(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))
|
|
3139
|
+
;return r.quill.container.classList.add("ql-bubble"),r}return h(e,t),o(e,[{
|
|
3140
|
+
key:"extendToolbar",value:function(t){
|
|
3141
|
+
this.tooltip=new b(this.quill,this.options.bounds),
|
|
3142
|
+
this.tooltip.root.appendChild(t.container),
|
|
3143
|
+
this.buildButtons([].slice.call(t.container.querySelectorAll("button")),c.default),
|
|
3144
|
+
this.buildPickers([].slice.call(t.container.querySelectorAll("select")),c.default)
|
|
3145
|
+
}}]),e}(s.default);v.DEFAULTS=(0,i.default)(!0,{},s.default.DEFAULTS,{modules:{
|
|
3146
|
+
toolbar:{handlers:{link:function(t){
|
|
3147
|
+
t?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}})
|
|
3148
|
+
;var b=function(t){function e(t,n){p(this,e)
|
|
3149
|
+
;var r=d(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))
|
|
3150
|
+
;return r.quill.on(l.default.events.EDITOR_CHANGE,(function(t,e,n,o){
|
|
3151
|
+
if(t===l.default.events.SELECTION_CHANGE)if(null!=e&&e.length>0&&o===l.default.sources.USER){
|
|
3152
|
+
r.show(),
|
|
3153
|
+
r.root.style.left="0px",r.root.style.width="",r.root.style.width=r.root.offsetWidth+"px"
|
|
3154
|
+
;var i=r.quill.getLines(e.index,e.length)
|
|
3155
|
+
;if(1===i.length)r.position(r.quill.getBounds(e));else{
|
|
3156
|
+
var a=i[i.length-1],s=r.quill.getIndex(a),c=Math.min(a.length()-1,e.index+e.length-s),f=r.quill.getBounds(new u.Range(s,c))
|
|
3157
|
+
;r.position(f)}
|
|
3158
|
+
}else document.activeElement!==r.textbox&&r.quill.hasFocus()&&r.hide()})),r}
|
|
3159
|
+
return h(e,t),o(e,[{key:"listen",value:function(){var t=this
|
|
3160
|
+
;r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),
|
|
3161
|
+
this.root.querySelector(".ql-close").addEventListener("click",(function(){
|
|
3162
|
+
t.root.classList.remove("ql-editing")
|
|
3163
|
+
})),this.quill.on(l.default.events.SCROLL_OPTIMIZE,(function(){
|
|
3164
|
+
setTimeout((function(){if(!t.root.classList.contains("ql-hidden")){
|
|
3165
|
+
var e=t.quill.getSelection();null!=e&&t.position(t.quill.getBounds(e))}}),1)}))}
|
|
3166
|
+
},{key:"cancel",value:function(){this.show()}},{key:"position",
|
|
3167
|
+
value:function(t){
|
|
3168
|
+
var n=r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"position",this).call(this,t),o=this.root.querySelector(".ql-tooltip-arrow")
|
|
3169
|
+
;if(o.style.marginLeft="",0===n)return n
|
|
3170
|
+
;o.style.marginLeft=-1*n-o.offsetWidth/2+"px"}}]),e}(a.BaseTooltip)
|
|
3171
|
+
;b.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),
|
|
3172
|
+
e.BubbleTooltip=b,e.default=v},function(t,e,n){t.exports=n(63)}]).default}
|
|
3173
|
+
;var Vt,Zt=Kt.exports=Ht(),Wt=r&&r.__extends||(Vt=function(t,e){
|
|
3174
|
+
return Vt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){
|
|
3175
|
+
t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])
|
|
3176
|
+
},Vt(t,e)},function(t,e){function n(){this.constructor=t}
|
|
3177
|
+
Vt(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)
|
|
3178
|
+
}),Yt=r&&r.__assign||function(){return Yt=Object.assign||function(t){
|
|
3179
|
+
for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])
|
|
3180
|
+
;return t},Yt.apply(this,arguments)},Gt=r&&r.__spreadArrays||function(){
|
|
3181
|
+
for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length
|
|
3182
|
+
;var r=Array(t),o=0
|
|
3183
|
+
;for(e=0;e<n;e++)for(var i=arguments[e],l=0,a=i.length;l<a;l++,o++)r[o]=i[l]
|
|
3184
|
+
;return r},$t=r&&r.__importDefault||function(t){return t&&t.__esModule?t:{
|
|
3185
|
+
default:t}},Xt=$t(t),Qt=$t(i),Jt=$t(zt),te=$t(Zt);function ee(t){
|
|
3186
|
+
Promise.resolve().then(t)}var ne,re,oe,ie,le,ae,se,ue=function(t){function e(e){
|
|
3187
|
+
var n=t.call(this,e)||this
|
|
3188
|
+
;n.dirtyProps=["modules","formats","bounds","theme","children"],
|
|
3189
|
+
n.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],
|
|
3190
|
+
n.state={generation:0},n.selection=null,n.onEditorChange=function(t,e,r,o){
|
|
3191
|
+
var i,l,a,s
|
|
3192
|
+
;"text-change"===t?null===(l=(i=n).onEditorChangeText)||void 0===l||l.call(i,n.editor.root.innerHTML,e,o,n.unprivilegedEditor):"selection-change"===t&&(null===(s=(a=n).onEditorChangeSelection)||void 0===s||s.call(a,e,o,n.unprivilegedEditor))
|
|
3193
|
+
};var r=n.isControlled()?e.value:e.defaultValue;return n.value=null!=r?r:"",n}
|
|
3194
|
+
return Wt(e,t),e.prototype.validateProps=function(t){var e
|
|
3195
|
+
;if(Xt.default.Children.count(t.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.")
|
|
3196
|
+
;if(Xt.default.Children.count(t.children)&&"textarea"===(null===(e=Xt.default.Children.only(t.children))||void 0===e?void 0:e.type))throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.")
|
|
3197
|
+
;if(this.lastDeltaChangeSet&&t.value===this.lastDeltaChangeSet)throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas")
|
|
3198
|
+
},e.prototype.shouldComponentUpdate=function(t,e){var n,r=this
|
|
3199
|
+
;if(this.validateProps(t),
|
|
3200
|
+
!this.editor||this.state.generation!==e.generation)return!0;if("value"in t){
|
|
3201
|
+
var o=this.getEditorContents(),i=null!=(n=t.value)?n:""
|
|
3202
|
+
;this.isEqualValue(i,o)||this.setEditorContents(this.editor,i)}
|
|
3203
|
+
return t.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,t.readOnly),
|
|
3204
|
+
Gt(this.cleanProps,this.dirtyProps).some((function(e){
|
|
3205
|
+
return!Jt.default(t[e],r.props[e])}))
|
|
3206
|
+
},e.prototype.shouldComponentRegenerate=function(t){var e=this
|
|
3207
|
+
;return this.dirtyProps.some((function(n){return!Jt.default(t[n],e.props[n])}))
|
|
3208
|
+
},e.prototype.componentDidMount=function(){
|
|
3209
|
+
this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())
|
|
3210
|
+
},e.prototype.componentWillUnmount=function(){this.destroyEditor()
|
|
3211
|
+
},e.prototype.componentDidUpdate=function(t,e){var n=this
|
|
3212
|
+
;if(this.editor&&this.shouldComponentRegenerate(t)){
|
|
3213
|
+
var r=this.editor.getContents(),o=this.editor.getSelection()
|
|
3214
|
+
;this.regenerationSnapshot={delta:r,selection:o},this.setState({
|
|
3215
|
+
generation:this.state.generation+1}),this.destroyEditor()}
|
|
3216
|
+
if(this.state.generation!==e.generation){
|
|
3217
|
+
var i=this.regenerationSnapshot,l=(r=i.delta,i.selection)
|
|
3218
|
+
;delete this.regenerationSnapshot,this.instantiateEditor();var a=this.editor
|
|
3219
|
+
;a.setContents(r),ee((function(){return n.setEditorSelection(a,l)}))}
|
|
3220
|
+
},e.prototype.instantiateEditor=function(){
|
|
3221
|
+
this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())
|
|
3222
|
+
},e.prototype.destroyEditor=function(){
|
|
3223
|
+
this.editor&&this.unhookEditor(this.editor)
|
|
3224
|
+
},e.prototype.isControlled=function(){return"value"in this.props
|
|
3225
|
+
},e.prototype.getEditorConfig=function(){return{bounds:this.props.bounds,
|
|
3226
|
+
formats:this.props.formats,modules:this.props.modules,
|
|
3227
|
+
placeholder:this.props.placeholder,readOnly:this.props.readOnly,
|
|
3228
|
+
scrollingContainer:this.props.scrollingContainer,tabIndex:this.props.tabIndex,
|
|
3229
|
+
theme:this.props.theme}},e.prototype.getEditor=function(){
|
|
3230
|
+
if(!this.editor)throw new Error("Accessing non-instantiated editor")
|
|
3231
|
+
;return this.editor},e.prototype.createEditor=function(t,e){
|
|
3232
|
+
var n=new te.default(t,e)
|
|
3233
|
+
;return null!=e.tabIndex&&this.setEditorTabIndex(n,e.tabIndex),
|
|
3234
|
+
this.hookEditor(n),n},e.prototype.hookEditor=function(t){
|
|
3235
|
+
this.unprivilegedEditor=this.makeUnprivilegedEditor(t),
|
|
3236
|
+
t.on("editor-change",this.onEditorChange)},e.prototype.unhookEditor=function(t){
|
|
3237
|
+
t.off("editor-change",this.onEditorChange)
|
|
3238
|
+
},e.prototype.getEditorContents=function(){return this.value
|
|
3239
|
+
},e.prototype.getEditorSelection=function(){return this.selection
|
|
3240
|
+
},e.prototype.isDelta=function(t){return t&&t.ops
|
|
3241
|
+
},e.prototype.isEqualValue=function(t,e){
|
|
3242
|
+
return this.isDelta(t)&&this.isDelta(e)?Jt.default(t.ops,e.ops):Jt.default(t,e)
|
|
3243
|
+
},e.prototype.setEditorContents=function(t,e){var n=this;this.value=e
|
|
3244
|
+
;var r=this.getEditorSelection()
|
|
3245
|
+
;"string"==typeof e?t.setContents(t.clipboard.convert(e)):t.setContents(e),
|
|
3246
|
+
ee((function(){return n.setEditorSelection(t,r)}))
|
|
3247
|
+
},e.prototype.setEditorSelection=function(t,e){if(this.selection=e,e){
|
|
3248
|
+
var n=t.getLength()
|
|
3249
|
+
;e.index=Math.max(0,Math.min(e.index,n-1)),e.length=Math.max(0,Math.min(e.length,n-1-e.index)),
|
|
3250
|
+
t.setSelection(e)}},e.prototype.setEditorTabIndex=function(t,e){var n,r
|
|
3251
|
+
;(null===(r=null===(n=t)||void 0===n?void 0:n.scroll)||void 0===r?void 0:r.domNode)&&(t.scroll.domNode.tabIndex=e)
|
|
3252
|
+
},e.prototype.setEditorReadOnly=function(t,e){e?t.disable():t.enable()
|
|
3253
|
+
},e.prototype.makeUnprivilegedEditor=function(t){var e=t;return{
|
|
3254
|
+
getHTML:function(){return e.root.innerHTML},getLength:e.getLength.bind(e),
|
|
3255
|
+
getText:e.getText.bind(e),getContents:e.getContents.bind(e),
|
|
3256
|
+
getSelection:e.getSelection.bind(e),getBounds:e.getBounds.bind(e)}
|
|
3257
|
+
},e.prototype.getEditingArea=function(){
|
|
3258
|
+
if(!this.editingArea)throw new Error("Instantiating on missing editing area")
|
|
3259
|
+
;var t=Qt.default.findDOMNode(this.editingArea)
|
|
3260
|
+
;if(!t)throw new Error("Cannot find element for editing area")
|
|
3261
|
+
;if(3===t.nodeType)throw new Error("Editing area cannot be a text node")
|
|
3262
|
+
;return t},e.prototype.renderEditingArea=function(){
|
|
3263
|
+
var t=this,e=this.props,n=e.children,r=e.preserveWhitespace,o={
|
|
3264
|
+
key:this.state.generation,ref:function(e){t.editingArea=e}}
|
|
3265
|
+
;return Xt.default.Children.count(n)?Xt.default.cloneElement(Xt.default.Children.only(n),o):r?Xt.default.createElement("pre",Yt({},o)):Xt.default.createElement("div",Yt({},o))
|
|
3266
|
+
},e.prototype.render=function(){var t;return Xt.default.createElement("div",{
|
|
3267
|
+
id:this.props.id,style:this.props.style,key:this.state.generation,
|
|
3268
|
+
className:"quill "+(t=this.props.className,null!=t?t:""),
|
|
3269
|
+
onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,
|
|
3270
|
+
onKeyUp:this.props.onKeyUp},this.renderEditingArea())
|
|
3271
|
+
},e.prototype.onEditorChangeText=function(t,e,n,r){var o,i;if(this.editor){
|
|
3272
|
+
var l=this.isDelta(this.value)?r.getContents():r.getHTML()
|
|
3273
|
+
;l!==this.getEditorContents()&&(this.lastDeltaChangeSet=e,
|
|
3274
|
+
this.value=l,null===(i=(o=this.props).onChange)||void 0===i||i.call(o,t,e,n,r))}
|
|
3275
|
+
},e.prototype.onEditorChangeSelection=function(t,e,n){var r,o,i,l,a,s
|
|
3276
|
+
;if(this.editor){var u=this.getEditorSelection(),c=!u&&t,f=u&&!t
|
|
3277
|
+
;Jt.default(t,u)||(this.selection=t,
|
|
3278
|
+
null===(o=(r=this.props).onChangeSelection)||void 0===o||o.call(r,t,e,n),
|
|
3279
|
+
c?null===(l=(i=this.props).onFocus)||void 0===l||l.call(i,t,e,n):f&&(null===(s=(a=this.props).onBlur)||void 0===s||s.call(a,u,e,n)))
|
|
3280
|
+
}},e.prototype.focus=function(){this.editor&&this.editor.focus()
|
|
3281
|
+
},e.prototype.blur=function(){
|
|
3282
|
+
this.editor&&(this.selection=null,this.editor.blur())
|
|
3283
|
+
},e.displayName="React Quill",e.Quill=te.default,e.defaultProps={theme:"snow",
|
|
3284
|
+
modules:{},readOnly:!1},e
|
|
3285
|
+
}(Xt.default.Component),ce=o(ue),fe=_(ne||(ne=O(["\n transition:\n all 0.2s ease-in-out,\n padding 0s ease-in-out;\n height: auto;\n opacity: 1;\n pointer-events: inherit;\n transform: translateY(0px);\n &.ql-snow {\n padding: 8px;\n }\n"],["\n transition:\n all 0.2s ease-in-out,\n padding 0s ease-in-out;\n height: auto;\n opacity: 1;\n pointer-events: inherit;\n transform: translateY(0px);\n &.ql-snow {\n padding: 8px;\n }\n"]))),pe=_(re||(re=O(["\n transition:\n all 0.1s ease-in-out,\n padding 0s ease-in-out 0.1s;\n opacity: 0;\n height: 0;\n padding: 0;\n pointer-events: none;\n transform: translateY(-30px);\n &.ql-snow {\n padding: 0;\n }\n"],["\n transition:\n all 0.1s ease-in-out,\n padding 0s ease-in-out 0.1s;\n opacity: 0;\n height: 0;\n padding: 0;\n pointer-events: none;\n transform: translateY(-30px);\n &.ql-snow {\n padding: 0;\n }\n"]))),de=x.span(oe||(oe=O(["\n color: ",";\n &:hover {\n text-decoration: underline;\n }\n cursor: pointer;\n"],["\n color: ",";\n &:hover {\n text-decoration: underline;\n }\n cursor: pointer;\n"])),(function(t){
|
|
3286
|
+
return t.theme.colors.text.link
|
|
3287
|
+
})),he=x.div(ie||(ie=O(["\n border: 1px solid\n ",";\n background-color: ",";\n border-radius: 4px;\n transition: all 0.2s ease-in-out;\n &:hover {\n border-color: ",";\n }\n &:focus-within {\n box-shadow: ","\n 0px 0px 0px 1px;\n border-color: ",";\n }\n .quill {\n height: fit-content;\n display: flex;\n flex-direction: column-reverse;\n }\n\n .ql-hidden {\n display: none;\n }\n .ql-container {\n font-family: ",";\n font-size: ",";\n font-weight: ",";\n color: ",";\n position: relative;\n .ql-editor {\n min-height: 34px;\n max-height: 550px;\n line-height: 1.42;\n outline: none;\n overflow-y: auto;\n padding: 16px;\n tab-size: 4;\n -moz-tab-size: 4;\n text-align: left;\n white-space: pre-wrap;\n word-wrap: break-word;\n p {\n margin: 0;\n padding: 0;\n counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8\n list-9;\n }\n }\n .ql-blank::before {\n content: attr(data-placeholder);\n position: absolute;\n pointer-events: none;\n left: 15px;\n right: 15px;\n font-family: ",";\n font-size: ",";\n color: ",";\n }\n .ql-clipboard {\n left: -100000px;\n height: 1px;\n overflow-y: hidden;\n position: absolute;\n top: 50%;\n }\n .ql-tooltip[data-mode='link']::before {\n content: 'Enter link:';\n }\n .ql-tooltip {\n background-color: ",";\n border: 1px solid #ccc;\n box-shadow: 0px 0px 5px #ddd;\n color: #444;\n padding: 5px 12px;\n white-space: nowrap;\n position: absolute;\n transform: translateY(10px);\n .ql-preview {\n display: inline-block;\n max-width: 200px;\n overflow-x: hidden;\n text-overflow: ellipsis;\n vertical-align: top;\n }\n .ql-action {\n }\n .ql-remove {\n }\n &.ql-editing a.ql-action::after {\n border-right: 0px;\n padding-right: 0px;\n content: 'Save';\n }\n &.ql-editing input[type='text'] {\n display: inline-block !important;\n }\n input[type='text'] {\n display: none;\n border: 1px solid #ccc;\n font-size: ",";\n height: 26px;\n margin: 0px;\n padding: 3px 5px;\n width: 170px;\n }\n a {\n color: ",";\n }\n }\n }\n"],["\n border: 1px solid\n ",";\n background-color: ",";\n border-radius: 4px;\n transition: all 0.2s ease-in-out;\n &:hover {\n border-color: ",";\n }\n &:focus-within {\n box-shadow: ","\n 0px 0px 0px 1px;\n border-color: ",";\n }\n .quill {\n height: fit-content;\n display: flex;\n flex-direction: column-reverse;\n }\n\n .ql-hidden {\n display: none;\n }\n .ql-container {\n font-family: ",";\n font-size: ",";\n font-weight: ",";\n color: ",";\n position: relative;\n .ql-editor {\n min-height: 34px;\n max-height: 550px;\n line-height: 1.42;\n outline: none;\n overflow-y: auto;\n padding: 16px;\n tab-size: 4;\n -moz-tab-size: 4;\n text-align: left;\n white-space: pre-wrap;\n word-wrap: break-word;\n p {\n margin: 0;\n padding: 0;\n counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8\n list-9;\n }\n }\n .ql-blank::before {\n content: attr(data-placeholder);\n position: absolute;\n pointer-events: none;\n left: 15px;\n right: 15px;\n font-family: ",";\n font-size: ",";\n color: ",";\n }\n .ql-clipboard {\n left: -100000px;\n height: 1px;\n overflow-y: hidden;\n position: absolute;\n top: 50%;\n }\n .ql-tooltip[data-mode='link']::before {\n content: 'Enter link:';\n }\n .ql-tooltip {\n background-color: ",";\n border: 1px solid #ccc;\n box-shadow: 0px 0px 5px #ddd;\n color: #444;\n padding: 5px 12px;\n white-space: nowrap;\n position: absolute;\n transform: translateY(10px);\n .ql-preview {\n display: inline-block;\n max-width: 200px;\n overflow-x: hidden;\n text-overflow: ellipsis;\n vertical-align: top;\n }\n .ql-action {\n }\n .ql-remove {\n }\n &.ql-editing a.ql-action::after {\n border-right: 0px;\n padding-right: 0px;\n content: 'Save';\n }\n &.ql-editing input[type='text'] {\n display: inline-block !important;\n }\n input[type='text'] {\n display: none;\n border: 1px solid #ccc;\n font-size: ",";\n height: 26px;\n margin: 0px;\n padding: 3px 5px;\n width: 170px;\n }\n a {\n color: ",";\n }\n }\n }\n"])),(function(t){
|
|
3288
|
+
var e=t.theme;return t.$isErrored?e.colors.border.error:e.colors.border.normal
|
|
3289
|
+
}),(function(t){return t.theme.colors.fill.surface}),(function(t){
|
|
3290
|
+
var e=t.theme,n=t.disabled,r=t.$isErrored
|
|
3291
|
+
;return n?e.colors.border.normal:r?e.colors.border.error:e.colors.border.hover
|
|
3292
|
+
}),(function(t){var e=t.theme
|
|
3293
|
+
;return t.$isErrored?e.colors.border.error:e.colors.border.active
|
|
3294
|
+
}),(function(t){var e=t.theme
|
|
3295
|
+
;return t.$isErrored?e.colors.border.error:e.colors.border.active
|
|
3296
|
+
}),(function(t){return t.theme.typography.fontFamily}),(function(t){
|
|
3297
|
+
return t.theme.typography.primary.fontSize}),(function(t){
|
|
3298
|
+
return t.theme.typography.fontWeight["semi-bold"]}),(function(t){
|
|
3299
|
+
return t.theme.colors.text.primary}),(function(t){
|
|
3300
|
+
return t.theme.typography.fontFamily}),(function(t){
|
|
3301
|
+
return t.theme.typography.primary.fontSize}),(function(t){
|
|
3302
|
+
return t.theme.colors.text.placeholder}),(function(t){
|
|
3303
|
+
return t.theme.colors.common.white}),(function(t){
|
|
3304
|
+
return t.theme.typography.primary.fontSize}),(function(t){
|
|
3305
|
+
return t.theme.colors.text.link
|
|
3306
|
+
})),ye=x.div(le||(le=O(["\n padding: 12px;\n display: flex;\n gap: 8px;\n flex-wrap: wrap;\n"],["\n padding: 12px;\n display: flex;\n gap: 8px;\n flex-wrap: wrap;\n"]))),ve=x.div(ae||(ae=O(["\n display: flex;\n background-color: ",";\n flex-direction: column;\n gap: 10px;\n"],["\n display: flex;\n background-color: ",";\n flex-direction: column;\n gap: 10px;\n"])),(function(t){
|
|
3307
|
+
return t.theme.colors.fill.surface
|
|
3308
|
+
})),be=x.div(se||(se=O(["\n padding: 8px;\n display: flex;\n gap: 10px;\n align-items: center;\n border-top: 1px solid ",";\n button.mini-button {\n background: none;\n border: none;\n cursor: pointer;\n display: inline-block;\n height: 24px;\n padding: 3px 5px;\n width: 28px;\n &:hover {\n background: ",";\n }\n }\n .ql-spacer {\n flex: 1;\n }\n .ql-formats {\n display: inline-block;\n vertical-align: middle;\n .ql-stroke {\n stroke: ",";\n fill: none;\n stroke-linecap: round;\n stroke-linejoin: round;\n stroke-width: 2;\n }\n\n & .ql-active {\n color: ",";\n background: ",";\n border-radius: 2px;\n\n path,\n line {\n stroke: ",";\n }\n }\n }\n\n ","\n"],["\n padding: 8px;\n display: flex;\n gap: 10px;\n align-items: center;\n border-top: 1px solid ",";\n button.mini-button {\n background: none;\n border: none;\n cursor: pointer;\n display: inline-block;\n height: 24px;\n padding: 3px 5px;\n width: 28px;\n &:hover {\n background: ",";\n }\n }\n .ql-spacer {\n flex: 1;\n }\n .ql-formats {\n display: inline-block;\n vertical-align: middle;\n .ql-stroke {\n stroke: ",";\n fill: none;\n stroke-linecap: round;\n stroke-linejoin: round;\n stroke-width: 2;\n }\n\n & .ql-active {\n color: ",";\n background: ",";\n border-radius: 2px;\n\n path,\n line {\n stroke: ",";\n }\n }\n }\n\n ","\n"])),(function(t){
|
|
3309
|
+
return t.theme.colors.border.light}),(function(t){
|
|
3310
|
+
return t.theme.colors.border.light}),(function(t){
|
|
3311
|
+
return t.theme.colors.text.primary}),(function(t){
|
|
3312
|
+
return t.theme.colors.text.link}),(function(t){
|
|
3313
|
+
return t.theme.colors.border.light}),(function(t){
|
|
3314
|
+
return t.theme.colors.text.link}),(function(t){return t.showActions?fe:pe
|
|
3315
|
+
})),ge=t.forwardRef((function(e,n){return t.createElement("svg",w({width:"16",
|
|
3316
|
+
height:"16",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"
|
|
3317
|
+
},e,{ref:n}),t.createElement("g",{clipPath:"url(#clip0_3716_21092)"
|
|
3318
|
+
},t.createElement("path",{
|
|
3319
|
+
d:"M7.815 7.909C8.85214 6.85614 8.85214 5.15114 7.815 4.09042C6.77786 3.03757 5.08857 3.03757 4.04357 4.09042L1.27786 6.89542C0.240714 7.94828 0.240714 9.65328 1.27786 10.714C2.315 11.7669 4.00429 11.7669 5.04929 10.714L7.815 7.909Z",
|
|
3320
|
+
fill:"#459FFC"}),t.createElement("path",{
|
|
3321
|
+
d:"M10.7217 10.7062C11.7588 9.65333 11.7588 7.94833 10.7217 6.88761L7.95599 4.08261C6.91885 3.02975 5.22956 3.02975 4.18456 4.08261C4.02742 4.23975 3.9017 4.40475 3.7917 4.58547C3.16313 5.62261 3.2967 6.99761 4.18456 7.89333L6.95027 10.6983C7.98742 11.7512 9.6767 11.7512 10.7217 10.6983V10.7062Z",
|
|
3322
|
+
fill:"#459FFC"}),t.createElement("path",{
|
|
3323
|
+
d:"M8.58593 5.97718C8.58593 5.37218 8.38164 4.74361 7.97307 4.24075C7.93378 4.18575 7.87878 4.13075 7.83164 4.07575C7.32878 3.55718 6.66878 3.2979 6.00878 3.29004C5.34878 3.29004 4.68878 3.55718 4.18593 4.07575C4.13878 4.1229 4.08378 4.1779 4.0445 4.24075C3.62807 4.74361 3.43164 5.37218 3.43164 5.97718C3.43164 6.66075 3.68307 7.35218 4.18593 7.87075L6.00878 9.74861L7.83164 7.87075C8.3345 7.35218 8.58593 6.66075 8.58593 5.97718Z",
|
|
3324
|
+
fill:"#12344D"}),t.createElement("path",{
|
|
3325
|
+
d:"M2.64492 2.7C3.24992 2.7 3.74492 2.205 3.74492 1.6C3.74492 0.995 3.24992 0.5 2.64492 0.5C2.03992 0.5 1.54492 0.995 1.54492 1.6C1.54492 2.205 2.03992 2.7 2.64492 2.7Z",
|
|
3326
|
+
fill:"#12344D"}),t.createElement("path",{
|
|
3327
|
+
d:"M9.37148 2.7C9.97648 2.7 10.4715 2.205 10.4715 1.6C10.4715 0.995 9.97648 0.5 9.37148 0.5C8.76648 0.5 8.27148 0.995 8.27148 1.6C8.27148 2.205 8.76648 2.7 9.37148 2.7Z",
|
|
3328
|
+
fill:"#12344D"})),t.createElement("defs",null,t.createElement("clipPath",{
|
|
3329
|
+
id:"clip0_3716_21092"},t.createElement("rect",{width:"11",height:"11",
|
|
3330
|
+
fill:"white",transform:"translate(0.5 0.5)"}))))
|
|
3331
|
+
})),me=["bold","italic","underline","list","align","link"],_e={toolbar:{
|
|
3332
|
+
handlers:{},container:"#ql-toolbar"}
|
|
3333
|
+
},Oe=ue.Quill.import("attributors/style/align")
|
|
3334
|
+
;Oe.whitelist=["left","center","right"],ue.Quill.register(Oe,!0)
|
|
3335
|
+
;var xe=function(e){
|
|
3336
|
+
var n=e.quill,r=e.placeholders,o=e.showActions,i=e.freddyMenu
|
|
3337
|
+
;return t.createElement(be,{id:"ql-toolbar",showActions:o
|
|
3338
|
+
},t.createElement("span",{className:"ql-formats"},t.createElement("button",{
|
|
3339
|
+
className:"ql-bold mini-button"}),t.createElement("button",{
|
|
3340
|
+
className:"ql-italic mini-button"}),t.createElement("button",{
|
|
3341
|
+
className:"ql-underline mini-button"})),t.createElement("span",{
|
|
3342
|
+
className:"ql-formats"},t.createElement("button",{
|
|
3343
|
+
className:"ql-list mini-button",value:"bullet"})),t.createElement("span",{
|
|
3344
|
+
className:"ql-formats"},t.createElement("button",{
|
|
3345
|
+
className:"ql-align mini-button",value:""}),t.createElement("button",{
|
|
3346
|
+
className:"ql-align mini-button",value:"center"}),t.createElement("button",{
|
|
3347
|
+
className:"ql-align mini-button",value:"right"})),t.createElement("span",{
|
|
3348
|
+
className:"ql-formats"},t.createElement("button",{
|
|
3349
|
+
className:"ql-link mini-button"})),i&&t.createElement(N,{
|
|
3350
|
+
trigger:t.createElement(ge,null)},i),t.createElement("span",{
|
|
3351
|
+
className:"ql-spacer"}),t.createElement(N,{
|
|
3352
|
+
trigger:t.createElement(de,null,"Personalize"),side:"bottom",align:"end"
|
|
3353
|
+
},t.createElement(ve,{onClick:function(t){return t.stopPropagation()}
|
|
3354
|
+
},t.createElement(k,{style:{width:"256px"},options:r,renderContent:function(e){
|
|
3355
|
+
return t.createElement(ye,null,e.options.map((function(e){
|
|
3356
|
+
return t.createElement(j,{key:e.id,hideClose:!0,onClick:function(){!function(t){
|
|
3357
|
+
var e;if(!n)return null;var r=null==n?void 0:n.getEditor();if(r){
|
|
3358
|
+
var o=null!==(e=null==r?void 0:r.getSelection(!0))&&void 0!==e?e:{},i=o.index,l=void 0===i?0:i,a=o.length,s=void 0===a?0:a
|
|
3359
|
+
;console.log("insertPlaceholder",{placeholderText:t,quill:n,editor:r,
|
|
3360
|
+
cursorPosition:l
|
|
3361
|
+
}),s>0&&r.deleteText(l,s,"silent"),r.insertText(l,t,"silent"),r.setSelection(l+t.length,0,"silent")
|
|
3362
|
+
}}(e.placeholder)}},e.name)})))}}))))},we=function(r){
|
|
3363
|
+
var o=r.disabled,i=r.errorText,l=r.isErrored,a=r.placeholder,s=r.placeholders,u=r.freddyMenu,c=r.showActionsOnFocus,f=void 0!==c&&c,p=t.useRef(null),d=t.useState(""),h=d[0],y=d[1],v=e(!0),b=v[0],g=v[1]
|
|
3364
|
+
;return n((function(){}),[]),t.createElement(he,{disabled:o,$isErrored:l,
|
|
3365
|
+
onBlur:function(){return g(!1)},onFocus:function(){return g(!0)}
|
|
3366
|
+
},t.createElement(ce,{placeholder:a,theme:"snow",value:h,onChange:y,
|
|
3367
|
+
onFocus:function(t,e,n){},ref:p,modules:_e,formats:me,style:{minWidth:500}
|
|
3368
|
+
}),t.createElement(xe,{quill:p.current,placeholders:s,showActions:!f||b,
|
|
3369
|
+
freddyMenu:u}),l&&i&&t.createElement(E,null,i))};export{we as QuillEditor};
|