@mgdis/mg-components 6.4.0 → 6.6.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.
Files changed (224) hide show
  1. package/dist/cjs/{index-a3269bfc.js → index-019dd5c0.js} +3 -3
  2. package/dist/cjs/{index-a3269bfc.js.map → index-019dd5c0.js.map} +1 -1
  3. package/dist/cjs/{index-911898e4.js → index-1a5a1081.js} +270 -241
  4. package/dist/cjs/index-1a5a1081.js.map +1 -0
  5. package/dist/cjs/{index.es-325100d7.js → index.es-903492c5.js} +43 -44
  6. package/dist/cjs/index.es-903492c5.js.map +1 -0
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/cjs/mg-action-more_36.cjs.entry.js +2418 -1996
  9. package/dist/cjs/mg-action-more_36.cjs.entry.js.map +1 -1
  10. package/dist/cjs/mg-alert.cjs.entry.js +8 -8
  11. package/dist/cjs/mg-components.cjs.js +3 -3
  12. package/dist/cjs/mg-components.cjs.js.map +1 -1
  13. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +16790 -0
  14. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js.map +1 -0
  15. package/dist/cjs/mg-input.conf-5bbcea79.js +23 -0
  16. package/dist/cjs/mg-input.conf-5bbcea79.js.map +1 -0
  17. package/dist/cjs/mg-loader.cjs.entry.js +6 -6
  18. package/dist/cjs/mg-progress.cjs.entry.js +12 -12
  19. package/dist/collection/assets/icons/index.js +1 -1
  20. package/dist/collection/assets/icons/index.js.map +1 -1
  21. package/dist/collection/collection-manifest.json +2 -1
  22. package/dist/collection/components/atoms/mg-icon/mg-icon.js +1 -1
  23. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.conf.js +1 -0
  24. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.conf.js.map +1 -1
  25. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +68 -38
  26. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js.map +1 -1
  27. package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +1 -1
  28. package/dist/collection/components/molecules/inputs/mg-input/mg-input.js.map +1 -1
  29. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +1 -1
  30. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js.map +1 -1
  31. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +1 -1
  32. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js.map +1 -1
  33. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +2 -2
  34. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js.map +1 -1
  35. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +1 -1
  36. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js.map +1 -1
  37. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +1 -1
  38. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js.map +1 -1
  39. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/editor/index.js +110 -0
  40. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/editor/index.js.map +1 -0
  41. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +846 -0
  42. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js.map +1 -0
  43. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +1 -1
  44. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js.map +1 -1
  45. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +3 -5
  46. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js.map +1 -1
  47. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +1 -1
  48. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js.map +1 -1
  49. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +1 -1
  50. package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +4 -4
  51. package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js.map +1 -1
  52. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.conf.js +1 -1
  53. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.conf.js.map +1 -1
  54. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +16 -17
  55. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js.map +1 -1
  56. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +19 -9
  57. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js.map +1 -1
  58. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +3 -3
  59. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js.map +1 -1
  60. package/dist/collection/components/molecules/mg-alert/mg-alert.js +1 -1
  61. package/dist/collection/components/molecules/mg-details/mg-details.js +6 -1
  62. package/dist/collection/components/molecules/mg-details/mg-details.js.map +1 -1
  63. package/dist/collection/components/molecules/mg-form/mg-form.js +2 -2
  64. package/dist/collection/components/molecules/mg-form/mg-form.js.map +1 -1
  65. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.conf.js +5 -2
  66. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.conf.js.map +1 -1
  67. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +74 -17
  68. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js.map +1 -1
  69. package/dist/collection/components/molecules/mg-loader/mg-loader.js +1 -1
  70. package/dist/collection/components/molecules/mg-message/mg-message.js +2 -2
  71. package/dist/collection/components/molecules/mg-modal/mg-modal.js +2 -2
  72. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +3 -3
  73. package/dist/collection/components/molecules/mg-panel/mg-panel.js +1 -1
  74. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +1 -1
  75. package/dist/collection/components/molecules/mg-popover/mg-popover.conf.js +2 -0
  76. package/dist/collection/components/molecules/mg-popover/mg-popover.conf.js.map +1 -0
  77. package/dist/collection/components/molecules/mg-popover/mg-popover.js +90 -46
  78. package/dist/collection/components/molecules/mg-popover/mg-popover.js.map +1 -1
  79. package/dist/collection/components/molecules/mg-progress/mg-progress.js +1 -1
  80. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +1 -1
  81. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +1 -1
  82. package/dist/collection/types/index.js.map +1 -1
  83. package/dist/collection/utils/behaviors.utils.js +4 -1
  84. package/dist/collection/utils/behaviors.utils.js.map +1 -1
  85. package/dist/collection/utils/floating-ui.utils.js +28 -0
  86. package/dist/collection/utils/floating-ui.utils.js.map +1 -0
  87. package/dist/components/floating-ui.utils.js +2094 -0
  88. package/dist/components/floating-ui.utils.js.map +1 -0
  89. package/dist/components/index.es.js +37 -38
  90. package/dist/components/index.es.js.map +1 -1
  91. package/dist/components/index2.js +2 -2
  92. package/dist/components/mg-action-more.js +8 -8
  93. package/dist/components/mg-action-more.js.map +1 -1
  94. package/dist/components/mg-alert.js +6 -6
  95. package/dist/components/mg-badge2.js +6 -6
  96. package/dist/components/mg-button2.js +6 -6
  97. package/dist/components/mg-card2.js +1 -1
  98. package/dist/components/mg-card2.js.map +1 -1
  99. package/dist/components/mg-character-left2.js +4 -4
  100. package/dist/components/mg-details.js +8 -3
  101. package/dist/components/mg-details.js.map +1 -1
  102. package/dist/components/mg-form.js +9 -9
  103. package/dist/components/mg-form.js.map +1 -1
  104. package/dist/components/mg-icon2.js +7 -7
  105. package/dist/components/mg-icon2.js.map +1 -1
  106. package/dist/components/mg-illustrated-message.js +69 -16
  107. package/dist/components/mg-illustrated-message.js.map +1 -1
  108. package/dist/components/mg-input-checkbox.js +11 -11
  109. package/dist/components/mg-input-checkbox.js.map +1 -1
  110. package/dist/components/mg-input-date.js +13 -13
  111. package/dist/components/mg-input-date.js.map +1 -1
  112. package/dist/components/mg-input-numeric.js +14 -14
  113. package/dist/components/mg-input-numeric.js.map +1 -1
  114. package/dist/components/mg-input-password.js +4 -4
  115. package/dist/components/mg-input-password.js.map +1 -1
  116. package/dist/components/mg-input-radio.js +8 -8
  117. package/dist/components/mg-input-radio.js.map +1 -1
  118. package/dist/components/mg-input-rich-text-editor.d.ts +11 -0
  119. package/dist/components/mg-input-rich-text-editor.js +16866 -0
  120. package/dist/components/mg-input-rich-text-editor.js.map +1 -0
  121. package/dist/components/mg-input-select2.js +8 -8
  122. package/dist/components/mg-input-select2.js.map +1 -1
  123. package/dist/components/mg-input-text2.js +11 -13
  124. package/dist/components/mg-input-text2.js.map +1 -1
  125. package/dist/components/mg-input-textarea.js +8 -8
  126. package/dist/components/mg-input-textarea.js.map +1 -1
  127. package/dist/components/mg-input-title2.js +4 -4
  128. package/dist/components/mg-input-toggle.js +7 -7
  129. package/dist/components/mg-input2.js +9 -9
  130. package/dist/components/mg-input2.js.map +1 -1
  131. package/dist/components/mg-item-more2.js +24 -22
  132. package/dist/components/mg-item-more2.js.map +1 -1
  133. package/dist/components/mg-loader.js +4 -4
  134. package/dist/components/mg-menu-item2.js +30 -20
  135. package/dist/components/mg-menu-item2.js.map +1 -1
  136. package/dist/components/mg-message2.js +7 -7
  137. package/dist/components/mg-message2.js.map +1 -1
  138. package/dist/components/mg-modal.js +11 -11
  139. package/dist/components/mg-modal.js.map +1 -1
  140. package/dist/components/mg-pagination2.js +9 -9
  141. package/dist/components/mg-panel.js +11 -11
  142. package/dist/components/mg-panel.js.map +1 -1
  143. package/dist/components/mg-popover-content2.js +4 -4
  144. package/dist/components/mg-popover-content2.js.map +1 -1
  145. package/dist/components/mg-popover2.js +89 -47
  146. package/dist/components/mg-popover2.js.map +1 -1
  147. package/dist/components/mg-progress.js +11 -11
  148. package/dist/components/mg-skip-links.js +3 -3
  149. package/dist/components/mg-tabs.js +13 -13
  150. package/dist/components/mg-tag.js +4 -4
  151. package/dist/components/mg-tooltip-content2.js +1 -1
  152. package/dist/components/mg-tooltip-content2.js.map +1 -1
  153. package/dist/components/mg-tooltip2.js +70 -41
  154. package/dist/components/mg-tooltip2.js.map +1 -1
  155. package/dist/esm/{index-1f32332a.js → index-5059254f.js} +270 -241
  156. package/dist/esm/index-5059254f.js.map +1 -0
  157. package/dist/esm/{index-9bd10f5d.js → index-6b7bdd63.js} +3 -3
  158. package/dist/esm/{index-9bd10f5d.js.map → index-6b7bdd63.js.map} +1 -1
  159. package/dist/esm/{index.es-a2587b72.js → index.es-b80b758c.js} +38 -39
  160. package/dist/esm/index.es-b80b758c.js.map +1 -0
  161. package/dist/esm/loader.js +3 -3
  162. package/dist/esm/mg-action-more_36.entry.js +2370 -1948
  163. package/dist/esm/mg-action-more_36.entry.js.map +1 -1
  164. package/dist/esm/mg-alert.entry.js +8 -8
  165. package/dist/esm/mg-components.js +4 -4
  166. package/dist/esm/mg-components.js.map +1 -1
  167. package/dist/esm/mg-input-rich-text-editor.entry.js +16786 -0
  168. package/dist/esm/mg-input-rich-text-editor.entry.js.map +1 -0
  169. package/dist/esm/mg-input.conf-712c7bb6.js +16 -0
  170. package/dist/esm/mg-input.conf-712c7bb6.js.map +1 -0
  171. package/dist/esm/mg-loader.entry.js +6 -6
  172. package/dist/esm/mg-progress.entry.js +12 -12
  173. package/dist/mg-components/mg-components.esm.js +1 -1
  174. package/dist/mg-components/mg-components.esm.js.map +1 -1
  175. package/dist/mg-components/{p-f48d964f.entry.js → p-0ae49cc4.entry.js} +2 -2
  176. package/dist/mg-components/p-17f0b7eb.entry.js +2 -0
  177. package/dist/mg-components/p-17f0b7eb.entry.js.map +1 -0
  178. package/dist/mg-components/p-1c126a81.entry.js +2 -0
  179. package/dist/mg-components/p-1c126a81.entry.js.map +1 -0
  180. package/dist/mg-components/p-2884f369.js +2 -0
  181. package/dist/mg-components/p-2884f369.js.map +1 -0
  182. package/dist/mg-components/{p-3b052ac0.entry.js → p-361cc090.entry.js} +2 -2
  183. package/dist/mg-components/p-3c6710be.js +2 -0
  184. package/dist/mg-components/p-3c6710be.js.map +1 -0
  185. package/dist/mg-components/{p-dc436f3c.js → p-4049bd40.js} +2 -2
  186. package/dist/mg-components/{p-0ead5317.entry.js → p-c4f37d1f.entry.js} +2 -2
  187. package/dist/mg-components/p-e39791fa.js +3 -0
  188. package/dist/mg-components/p-e39791fa.js.map +1 -0
  189. package/dist/types/assets/icons/index.d.ts +1 -0
  190. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.conf.d.ts +6 -0
  191. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +7 -6
  192. package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/editor/index.d.ts +21 -0
  193. package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.d.ts +202 -0
  194. package/dist/types/components/molecules/menu/mg-menu/mg-menu.conf.d.ts +2 -6
  195. package/dist/types/components/molecules/menu/mg-menu/mg-menu.d.ts +3 -2
  196. package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.d.ts +14 -7
  197. package/dist/types/components/molecules/mg-details/mg-details.d.ts +4 -0
  198. package/dist/types/components/molecules/mg-illustrated-message/mg-illustrated-message.conf.d.ts +10 -3
  199. package/dist/types/components/molecules/mg-illustrated-message/mg-illustrated-message.d.ts +17 -3
  200. package/dist/types/components/molecules/mg-popover/mg-popover.conf.d.ts +6 -0
  201. package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +13 -8
  202. package/dist/types/components.d.ts +225 -14
  203. package/dist/types/types/index.d.ts +4 -0
  204. package/dist/types/utils/floating-ui.utils.d.ts +19 -0
  205. package/ide/intellij/web-types.json +374 -17
  206. package/ide/vscode/css-custom-data.json +4 -0
  207. package/ide/vscode/html-custom-data.json +289 -4
  208. package/package.json +25 -24
  209. package/dist/cjs/index-911898e4.js.map +0 -1
  210. package/dist/cjs/index.es-325100d7.js.map +0 -1
  211. package/dist/components/popper.js +0 -1794
  212. package/dist/components/popper.js.map +0 -1
  213. package/dist/esm/index-1f32332a.js.map +0 -1
  214. package/dist/esm/index.es-a2587b72.js.map +0 -1
  215. package/dist/mg-components/p-35898742.js +0 -3
  216. package/dist/mg-components/p-35898742.js.map +0 -1
  217. package/dist/mg-components/p-6810a565.entry.js +0 -2
  218. package/dist/mg-components/p-6810a565.entry.js.map +0 -1
  219. package/dist/mg-components/p-b986c107.js +0 -2
  220. package/dist/mg-components/p-b986c107.js.map +0 -1
  221. /package/dist/mg-components/{p-f48d964f.entry.js.map → p-0ae49cc4.entry.js.map} +0 -0
  222. /package/dist/mg-components/{p-3b052ac0.entry.js.map → p-361cc090.entry.js.map} +0 -0
  223. /package/dist/mg-components/{p-dc436f3c.js.map → p-4049bd40.js.map} +0 -0
  224. /package/dist/mg-components/{p-0ead5317.entry.js.map → p-c4f37d1f.entry.js.map} +0 -0
@@ -0,0 +1,2 @@
1
+ import{r as t,c as e,h as i,g as n}from"./p-e39791fa.js";import{m as r,Z as s,V as l}from"./p-3c6710be.js";import{a as o,b as a}from"./p-2884f369.js";import{i as c}from"./p-4049bd40.js";var u=typeof global=="object"&&global&&global.Object===Object&&global;const h=u;var f=typeof self=="object"&&self&&self.Object===Object&&self;var d=h||f||Function("return this")();const p=d;var b=p.Symbol;const q=b;var v=Object.prototype;var m=v.hasOwnProperty;var g=v.toString;var w=q?q.toStringTag:undefined;function y(t){var e=m.call(t,w),i=t[w];try{t[w]=undefined;var n=true}catch(t){}var r=g.call(t);if(n){if(e){t[w]=i}else{delete t[w]}}return r}var k=Object.prototype;var x=k.toString;function j(t){return x.call(t)}var A="[object Null]",O="[object Undefined]";var M=q?q.toStringTag:undefined;function E(t){if(t==null){return t===undefined?O:A}return M&&M in Object(t)?y(t):j(t)}function T(t){return t!=null&&typeof t=="object"}var _=Array.isArray;const N=_;function $(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function L(t){return t}var z="[object AsyncFunction]",S="[object Function]",C="[object GeneratorFunction]",B="[object Proxy]";function R(t){if(!$(t)){return false}var e=E(t);return e==S||e==C||e==z||e==B}var I=p["__core-js_shared__"];const H=I;var V=function(){var t=/[^.]+$/.exec(H&&H.keys&&H.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function D(t){return!!V&&V in t}var F=Function.prototype;var P=F.toString;function U(t){if(t!=null){try{return P.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var Z=/[\\^$.*+?()[\]{}|]/g;var K=/^\[object .+?Constructor\]$/;var W=Function.prototype,G=Object.prototype;var Q=W.toString;var Y=G.hasOwnProperty;var J=RegExp("^"+Q.call(Y).replace(Z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function X(t){if(!$(t)||D(t)){return false}var e=R(t)?J:K;return e.test(U(t))}function tt(t,e){return t==null?undefined:t[e]}function et(t,e){var i=tt(t,e);return X(i)?i:undefined}var it=et(p,"WeakMap");const nt=it;var rt=Object.create;var st=function(){function t(){}return function(e){if(!$(e)){return{}}if(rt){return rt(e)}t.prototype=e;var i=new t;t.prototype=undefined;return i}}();const lt=st;function ot(t,e,i){switch(i.length){case 0:return t.call(e);case 1:return t.call(e,i[0]);case 2:return t.call(e,i[0],i[1]);case 3:return t.call(e,i[0],i[1],i[2])}return t.apply(e,i)}function at(t,e){var i=-1,n=t.length;e||(e=Array(n));while(++i<n){e[i]=t[i]}return e}var ct=800,ut=16;var ht=Date.now;function ft(t){var e=0,i=0;return function(){var n=ht(),r=ut-(n-i);i=n;if(r>0){if(++e>=ct){return arguments[0]}}else{e=0}return t.apply(undefined,arguments)}}function dt(t){return function(){return t}}var pt=function(){try{var t=et(Object,"defineProperty");t({},"",{});return t}catch(t){}}();const bt=pt;var qt=!bt?L:function(t,e){return bt(t,"toString",{configurable:true,enumerable:false,value:dt(e),writable:true})};const vt=qt;var mt=ft(vt);const gt=mt;function wt(t,e){var i=-1,n=t==null?0:t.length;while(++i<n){if(e(t[i],i,t)===false){break}}return t}var yt=9007199254740991;var kt=/^(?:0|[1-9]\d*)$/;function xt(t,e){var i=typeof t;e=e==null?yt:e;return!!e&&(i=="number"||i!="symbol"&&kt.test(t))&&(t>-1&&t%1==0&&t<e)}function jt(t,e,i){if(e=="__proto__"&&bt){bt(t,e,{configurable:true,enumerable:true,value:i,writable:true})}else{t[e]=i}}function At(t,e){return t===e||t!==t&&e!==e}var Ot=Object.prototype;var Mt=Ot.hasOwnProperty;function Et(t,e,i){var n=t[e];if(!(Mt.call(t,e)&&At(n,i))||i===undefined&&!(e in t)){jt(t,e,i)}}function Tt(t,e,i,n){var r=!i;i||(i={});var s=-1,l=e.length;while(++s<l){var o=e[s];var a=n?n(i[o],t[o],o,i,t):undefined;if(a===undefined){a=t[o]}if(r){jt(i,o,a)}else{Et(i,o,a)}}return i}var _t=Math.max;function Nt(t,e,i){e=_t(e===undefined?t.length-1:e,0);return function(){var n=arguments,r=-1,s=_t(n.length-e,0),l=Array(s);while(++r<s){l[r]=n[e+r]}r=-1;var o=Array(e+1);while(++r<e){o[r]=n[r]}o[e]=i(l);return ot(t,this,o)}}function $t(t,e){return gt(Nt(t,e,L),t+"")}var Lt=9007199254740991;function zt(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Lt}function St(t){return t!=null&&zt(t.length)&&!R(t)}function Ct(t,e,i){if(!$(i)){return false}var n=typeof e;if(n=="number"?St(i)&&xt(e,i.length):n=="string"&&e in i){return At(i[e],t)}return false}function Bt(t){return $t((function(e,i){var n=-1,r=i.length,s=r>1?i[r-1]:undefined,l=r>2?i[2]:undefined;s=t.length>3&&typeof s=="function"?(r--,s):undefined;if(l&&Ct(i[0],i[1],l)){s=r<3?undefined:s;r=1}e=Object(e);while(++n<r){var o=i[n];if(o){t(e,o,n,s)}}return e}))}var Rt=Object.prototype;function It(t){var e=t&&t.constructor,i=typeof e=="function"&&e.prototype||Rt;return t===i}function Ht(t,e){var i=-1,n=Array(t);while(++i<t){n[i]=e(i)}return n}var Vt="[object Arguments]";function Dt(t){return T(t)&&E(t)==Vt}var Ft=Object.prototype;var Pt=Ft.hasOwnProperty;var Ut=Ft.propertyIsEnumerable;var Zt=Dt(function(){return arguments}())?Dt:function(t){return T(t)&&Pt.call(t,"callee")&&!Ut.call(t,"callee")};const Kt=Zt;function Wt(){return false}var Gt=typeof exports=="object"&&exports&&!exports.nodeType&&exports;var Qt=Gt&&typeof module=="object"&&module&&!module.nodeType&&module;var Yt=Qt&&Qt.exports===Gt;var Jt=Yt?p.Buffer:undefined;var Xt=Jt?Jt.isBuffer:undefined;var te=Xt||Wt;const ee=te;var ie="[object Arguments]",ne="[object Array]",re="[object Boolean]",se="[object Date]",le="[object Error]",oe="[object Function]",ae="[object Map]",ce="[object Number]",ue="[object Object]",he="[object RegExp]",fe="[object Set]",de="[object String]",pe="[object WeakMap]";var be="[object ArrayBuffer]",qe="[object DataView]",ve="[object Float32Array]",me="[object Float64Array]",ge="[object Int8Array]",we="[object Int16Array]",ye="[object Int32Array]",ke="[object Uint8Array]",xe="[object Uint8ClampedArray]",je="[object Uint16Array]",Ae="[object Uint32Array]";var Oe={};Oe[ve]=Oe[me]=Oe[ge]=Oe[we]=Oe[ye]=Oe[ke]=Oe[xe]=Oe[je]=Oe[Ae]=true;Oe[ie]=Oe[ne]=Oe[be]=Oe[re]=Oe[qe]=Oe[se]=Oe[le]=Oe[oe]=Oe[ae]=Oe[ce]=Oe[ue]=Oe[he]=Oe[fe]=Oe[de]=Oe[pe]=false;function Me(t){return T(t)&&zt(t.length)&&!!Oe[E(t)]}function Ee(t){return function(e){return t(e)}}var Te=typeof exports=="object"&&exports&&!exports.nodeType&&exports;var _e=Te&&typeof module=="object"&&module&&!module.nodeType&&module;var Ne=_e&&_e.exports===Te;var $e=Ne&&h.process;var Le=function(){try{var t=_e&&_e.require&&_e.require("util").types;if(t){return t}return $e&&$e.binding&&$e.binding("util")}catch(t){}}();const ze=Le;var Se=ze&&ze.isTypedArray;var Ce=Se?Ee(Se):Me;const Be=Ce;var Re=Object.prototype;var Ie=Re.hasOwnProperty;function He(t,e){var i=N(t),n=!i&&Kt(t),r=!i&&!n&&ee(t),s=!i&&!n&&!r&&Be(t),l=i||n||r||s,o=l?Ht(t.length,String):[],a=o.length;for(var c in t){if((e||Ie.call(t,c))&&!(l&&(c=="length"||r&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||xt(c,a)))){o.push(c)}}return o}function Ve(t,e){return function(i){return t(e(i))}}var De=Ve(Object.keys,Object);const Fe=De;var Pe=Object.prototype;var Ue=Pe.hasOwnProperty;function Ze(t){if(!It(t)){return Fe(t)}var e=[];for(var i in Object(t)){if(Ue.call(t,i)&&i!="constructor"){e.push(i)}}return e}function Ke(t){return St(t)?He(t):Ze(t)}function We(t){var e=[];if(t!=null){for(var i in Object(t)){e.push(i)}}return e}var Ge=Object.prototype;var Qe=Ge.hasOwnProperty;function Ye(t){if(!$(t)){return We(t)}var e=It(t),i=[];for(var n in t){if(!(n=="constructor"&&(e||!Qe.call(t,n)))){i.push(n)}}return i}function Je(t){return St(t)?He(t,true):Ye(t)}var Xe=et(Object,"create");const ti=Xe;function ei(){this.__data__=ti?ti(null):{};this.size=0}function ii(t){var e=this.has(t)&&delete this.__data__[t];this.size-=e?1:0;return e}var ni="__lodash_hash_undefined__";var ri=Object.prototype;var si=ri.hasOwnProperty;function li(t){var e=this.__data__;if(ti){var i=e[t];return i===ni?undefined:i}return si.call(e,t)?e[t]:undefined}var oi=Object.prototype;var ai=oi.hasOwnProperty;function ci(t){var e=this.__data__;return ti?e[t]!==undefined:ai.call(e,t)}var ui="__lodash_hash_undefined__";function hi(t,e){var i=this.__data__;this.size+=this.has(t)?0:1;i[t]=ti&&e===undefined?ui:e;return this}function fi(t){var e=-1,i=t==null?0:t.length;this.clear();while(++e<i){var n=t[e];this.set(n[0],n[1])}}fi.prototype.clear=ei;fi.prototype["delete"]=ii;fi.prototype.get=li;fi.prototype.has=ci;fi.prototype.set=hi;function di(){this.__data__=[];this.size=0}function pi(t,e){var i=t.length;while(i--){if(At(t[i][0],e)){return i}}return-1}var bi=Array.prototype;var qi=bi.splice;function vi(t){var e=this.__data__,i=pi(e,t);if(i<0){return false}var n=e.length-1;if(i==n){e.pop()}else{qi.call(e,i,1)}--this.size;return true}function mi(t){var e=this.__data__,i=pi(e,t);return i<0?undefined:e[i][1]}function gi(t){return pi(this.__data__,t)>-1}function wi(t,e){var i=this.__data__,n=pi(i,t);if(n<0){++this.size;i.push([t,e])}else{i[n][1]=e}return this}function yi(t){var e=-1,i=t==null?0:t.length;this.clear();while(++e<i){var n=t[e];this.set(n[0],n[1])}}yi.prototype.clear=di;yi.prototype["delete"]=vi;yi.prototype.get=mi;yi.prototype.has=gi;yi.prototype.set=wi;var ki=et(p,"Map");const xi=ki;function ji(){this.size=0;this.__data__={hash:new fi,map:new(xi||yi),string:new fi}}function Ai(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Oi(t,e){var i=t.__data__;return Ai(e)?i[typeof e=="string"?"string":"hash"]:i.map}function Mi(t){var e=Oi(this,t)["delete"](t);this.size-=e?1:0;return e}function Ei(t){return Oi(this,t).get(t)}function Ti(t){return Oi(this,t).has(t)}function _i(t,e){var i=Oi(this,t),n=i.size;i.set(t,e);this.size+=i.size==n?0:1;return this}function Ni(t){var e=-1,i=t==null?0:t.length;this.clear();while(++e<i){var n=t[e];this.set(n[0],n[1])}}Ni.prototype.clear=ji;Ni.prototype["delete"]=Mi;Ni.prototype.get=Ei;Ni.prototype.has=Ti;Ni.prototype.set=_i;function $i(t,e){var i=-1,n=e.length,r=t.length;while(++i<n){t[r+i]=e[i]}return t}var Li=Ve(Object.getPrototypeOf,Object);const zi=Li;var Si="[object Object]";var Ci=Function.prototype,Bi=Object.prototype;var Ri=Ci.toString;var Ii=Bi.hasOwnProperty;var Hi=Ri.call(Object);function Vi(t){if(!T(t)||E(t)!=Si){return false}var e=zi(t);if(e===null){return true}var i=Ii.call(e,"constructor")&&e.constructor;return typeof i=="function"&&i instanceof i&&Ri.call(i)==Hi}function Di(){this.__data__=new yi;this.size=0}function Fi(t){var e=this.__data__,i=e["delete"](t);this.size=e.size;return i}function Pi(t){return this.__data__.get(t)}function Ui(t){return this.__data__.has(t)}var Zi=200;function Ki(t,e){var i=this.__data__;if(i instanceof yi){var n=i.__data__;if(!xi||n.length<Zi-1){n.push([t,e]);this.size=++i.size;return this}i=this.__data__=new Ni(n)}i.set(t,e);this.size=i.size;return this}function Wi(t){var e=this.__data__=new yi(t);this.size=e.size}Wi.prototype.clear=Di;Wi.prototype["delete"]=Fi;Wi.prototype.get=Pi;Wi.prototype.has=Ui;Wi.prototype.set=Ki;function Gi(t,e){return t&&Tt(e,Ke(e),t)}function Qi(t,e){return t&&Tt(e,Je(e),t)}var Yi=typeof exports=="object"&&exports&&!exports.nodeType&&exports;var Ji=Yi&&typeof module=="object"&&module&&!module.nodeType&&module;var Xi=Ji&&Ji.exports===Yi;var tn=Xi?p.Buffer:undefined,en=tn?tn.allocUnsafe:undefined;function nn(t,e){if(e){return t.slice()}var i=t.length,n=en?en(i):new t.constructor(i);t.copy(n);return n}function rn(t,e){var i=-1,n=t==null?0:t.length,r=0,s=[];while(++i<n){var l=t[i];if(e(l,i,t)){s[r++]=l}}return s}function sn(){return[]}var ln=Object.prototype;var on=ln.propertyIsEnumerable;var an=Object.getOwnPropertySymbols;var cn=!an?sn:function(t){if(t==null){return[]}t=Object(t);return rn(an(t),(function(e){return on.call(t,e)}))};const un=cn;function hn(t,e){return Tt(t,un(t),e)}var fn=Object.getOwnPropertySymbols;var dn=!fn?sn:function(t){var e=[];while(t){$i(e,un(t));t=zi(t)}return e};const pn=dn;function bn(t,e){return Tt(t,pn(t),e)}function qn(t,e,i){var n=e(t);return N(t)?n:$i(n,i(t))}function vn(t){return qn(t,Ke,un)}function mn(t){return qn(t,Je,pn)}var gn=et(p,"DataView");const wn=gn;var yn=et(p,"Promise");const kn=yn;var xn=et(p,"Set");const jn=xn;var An="[object Map]",On="[object Object]",Mn="[object Promise]",En="[object Set]",Tn="[object WeakMap]";var _n="[object DataView]";var Nn=U(wn),$n=U(xi),Ln=U(kn),zn=U(jn),Sn=U(nt);var Cn=E;if(wn&&Cn(new wn(new ArrayBuffer(1)))!=_n||xi&&Cn(new xi)!=An||kn&&Cn(kn.resolve())!=Mn||jn&&Cn(new jn)!=En||nt&&Cn(new nt)!=Tn){Cn=function(t){var e=E(t),i=e==On?t.constructor:undefined,n=i?U(i):"";if(n){switch(n){case Nn:return _n;case $n:return An;case Ln:return Mn;case zn:return En;case Sn:return Tn}}return e}}const Bn=Cn;var Rn=Object.prototype;var In=Rn.hasOwnProperty;function Hn(t){var e=t.length,i=new t.constructor(e);if(e&&typeof t[0]=="string"&&In.call(t,"index")){i.index=t.index;i.input=t.input}return i}var Vn=p.Uint8Array;const Dn=Vn;function Fn(t){var e=new t.constructor(t.byteLength);new Dn(e).set(new Dn(t));return e}function Pn(t,e){var i=e?Fn(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.byteLength)}var Un=/\w*$/;function Zn(t){var e=new t.constructor(t.source,Un.exec(t));e.lastIndex=t.lastIndex;return e}var Kn=q?q.prototype:undefined,Wn=Kn?Kn.valueOf:undefined;function Gn(t){return Wn?Object(Wn.call(t)):{}}function Qn(t,e){var i=e?Fn(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}var Yn="[object Boolean]",Jn="[object Date]",Xn="[object Map]",tr="[object Number]",er="[object RegExp]",ir="[object Set]",nr="[object String]",rr="[object Symbol]";var sr="[object ArrayBuffer]",lr="[object DataView]",or="[object Float32Array]",ar="[object Float64Array]",cr="[object Int8Array]",ur="[object Int16Array]",hr="[object Int32Array]",fr="[object Uint8Array]",dr="[object Uint8ClampedArray]",pr="[object Uint16Array]",br="[object Uint32Array]";function qr(t,e,i){var n=t.constructor;switch(e){case sr:return Fn(t);case Yn:case Jn:return new n(+t);case lr:return Pn(t,i);case or:case ar:case cr:case ur:case hr:case fr:case dr:case pr:case br:return Qn(t,i);case Xn:return new n;case tr:case nr:return new n(t);case er:return Zn(t);case ir:return new n;case rr:return Gn(t)}}function vr(t){return typeof t.constructor=="function"&&!It(t)?lt(zi(t)):{}}var mr="[object Map]";function gr(t){return T(t)&&Bn(t)==mr}var wr=ze&&ze.isMap;var yr=wr?Ee(wr):gr;const kr=yr;var xr="[object Set]";function jr(t){return T(t)&&Bn(t)==xr}var Ar=ze&&ze.isSet;var Or=Ar?Ee(Ar):jr;const Mr=Or;var Er=1,Tr=2,_r=4;var Nr="[object Arguments]",$r="[object Array]",Lr="[object Boolean]",zr="[object Date]",Sr="[object Error]",Cr="[object Function]",Br="[object GeneratorFunction]",Rr="[object Map]",Ir="[object Number]",Hr="[object Object]",Vr="[object RegExp]",Dr="[object Set]",Fr="[object String]",Pr="[object Symbol]",Ur="[object WeakMap]";var Zr="[object ArrayBuffer]",Kr="[object DataView]",Wr="[object Float32Array]",Gr="[object Float64Array]",Qr="[object Int8Array]",Yr="[object Int16Array]",Jr="[object Int32Array]",Xr="[object Uint8Array]",ts="[object Uint8ClampedArray]",es="[object Uint16Array]",is="[object Uint32Array]";var ns={};ns[Nr]=ns[$r]=ns[Zr]=ns[Kr]=ns[Lr]=ns[zr]=ns[Wr]=ns[Gr]=ns[Qr]=ns[Yr]=ns[Jr]=ns[Rr]=ns[Ir]=ns[Hr]=ns[Vr]=ns[Dr]=ns[Fr]=ns[Pr]=ns[Xr]=ns[ts]=ns[es]=ns[is]=true;ns[Sr]=ns[Cr]=ns[Ur]=false;function rs(t,e,i,n,r,s){var l,o=e&Er,a=e&Tr,c=e&_r;if(i){l=r?i(t,n,r,s):i(t)}if(l!==undefined){return l}if(!$(t)){return t}var u=N(t);if(u){l=Hn(t);if(!o){return at(t,l)}}else{var h=Bn(t),f=h==Cr||h==Br;if(ee(t)){return nn(t,o)}if(h==Hr||h==Nr||f&&!r){l=a||f?{}:vr(t);if(!o){return a?bn(t,Qi(l,t)):hn(t,Gi(l,t))}}else{if(!ns[h]){return r?t:{}}l=qr(t,h,o)}}s||(s=new Wi);var d=s.get(t);if(d){return d}s.set(t,l);if(Mr(t)){t.forEach((function(n){l.add(rs(n,e,i,n,t,s))}))}else if(kr(t)){t.forEach((function(n,r){l.set(r,rs(n,e,i,r,t,s))}))}var p=c?a?mn:vn:a?Je:Ke;var b=u?undefined:p(t);wt(b||t,(function(n,r){if(b){r=n;n=t[r]}Et(l,r,rs(n,e,i,r,t,s))}));return l}var ss=1,ls=4;function os(t){return rs(t,ss|ls)}var as="__lodash_hash_undefined__";function cs(t){this.__data__.set(t,as);return this}function us(t){return this.__data__.has(t)}function hs(t){var e=-1,i=t==null?0:t.length;this.__data__=new Ni;while(++e<i){this.add(t[e])}}hs.prototype.add=hs.prototype.push=cs;hs.prototype.has=us;function fs(t,e){var i=-1,n=t==null?0:t.length;while(++i<n){if(e(t[i],i,t)){return true}}return false}function ds(t,e){return t.has(e)}var ps=1,bs=2;function qs(t,e,i,n,r,s){var l=i&ps,o=t.length,a=e.length;if(o!=a&&!(l&&a>o)){return false}var c=s.get(t);var u=s.get(e);if(c&&u){return c==e&&u==t}var h=-1,f=true,d=i&bs?new hs:undefined;s.set(t,e);s.set(e,t);while(++h<o){var p=t[h],b=e[h];if(n){var q=l?n(b,p,h,e,t,s):n(p,b,h,t,e,s)}if(q!==undefined){if(q){continue}f=false;break}if(d){if(!fs(e,(function(t,e){if(!ds(d,e)&&(p===t||r(p,t,i,n,s))){return d.push(e)}}))){f=false;break}}else if(!(p===b||r(p,b,i,n,s))){f=false;break}}s["delete"](t);s["delete"](e);return f}function vs(t){var e=-1,i=Array(t.size);t.forEach((function(t,n){i[++e]=[n,t]}));return i}function ms(t){var e=-1,i=Array(t.size);t.forEach((function(t){i[++e]=t}));return i}var gs=1,ws=2;var ys="[object Boolean]",ks="[object Date]",xs="[object Error]",js="[object Map]",As="[object Number]",Os="[object RegExp]",Ms="[object Set]",Es="[object String]",Ts="[object Symbol]";var _s="[object ArrayBuffer]",Ns="[object DataView]";var $s=q?q.prototype:undefined,Ls=$s?$s.valueOf:undefined;function zs(t,e,i,n,r,s,l){switch(i){case Ns:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset){return false}t=t.buffer;e=e.buffer;case _s:if(t.byteLength!=e.byteLength||!s(new Dn(t),new Dn(e))){return false}return true;case ys:case ks:case As:return At(+t,+e);case xs:return t.name==e.name&&t.message==e.message;case Os:case Es:return t==e+"";case js:var o=vs;case Ms:var a=n&gs;o||(o=ms);if(t.size!=e.size&&!a){return false}var c=l.get(t);if(c){return c==e}n|=ws;l.set(t,e);var u=qs(o(t),o(e),n,r,s,l);l["delete"](t);return u;case Ts:if(Ls){return Ls.call(t)==Ls.call(e)}}return false}var Ss=1;var Cs=Object.prototype;var Bs=Cs.hasOwnProperty;function Rs(t,e,i,n,r,s){var l=i&Ss,o=vn(t),a=o.length,c=vn(e),u=c.length;if(a!=u&&!l){return false}var h=a;while(h--){var f=o[h];if(!(l?f in e:Bs.call(e,f))){return false}}var d=s.get(t);var p=s.get(e);if(d&&p){return d==e&&p==t}var b=true;s.set(t,e);s.set(e,t);var q=l;while(++h<a){f=o[h];var v=t[f],m=e[f];if(n){var g=l?n(m,v,f,e,t,s):n(v,m,f,t,e,s)}if(!(g===undefined?v===m||r(v,m,i,n,s):g)){b=false;break}q||(q=f=="constructor")}if(b&&!q){var w=t.constructor,y=e.constructor;if(w!=y&&("constructor"in t&&"constructor"in e)&&!(typeof w=="function"&&w instanceof w&&typeof y=="function"&&y instanceof y)){b=false}}s["delete"](t);s["delete"](e);return b}var Is=1;var Hs="[object Arguments]",Vs="[object Array]",Ds="[object Object]";var Fs=Object.prototype;var Ps=Fs.hasOwnProperty;function Us(t,e,i,n,r,s){var l=N(t),o=N(e),a=l?Vs:Bn(t),c=o?Vs:Bn(e);a=a==Hs?Ds:a;c=c==Hs?Ds:c;var u=a==Ds,h=c==Ds,f=a==c;if(f&&ee(t)){if(!ee(e)){return false}l=true;u=false}if(f&&!u){s||(s=new Wi);return l||Be(t)?qs(t,e,i,n,r,s):zs(t,e,a,i,n,r,s)}if(!(i&Is)){var d=u&&Ps.call(t,"__wrapped__"),p=h&&Ps.call(e,"__wrapped__");if(d||p){var b=d?t.value():t,q=p?e.value():e;s||(s=new Wi);return r(b,q,i,n,s)}}if(!f){return false}s||(s=new Wi);return Rs(t,e,i,n,r,s)}function Zs(t,e,i,n,r){if(t===e){return true}if(t==null||e==null||!T(t)&&!T(e)){return t!==t&&e!==e}return Us(t,e,i,n,Zs,r)}function Ks(t){return function(e,i,n){var r=-1,s=Object(e),l=n(e),o=l.length;while(o--){var a=l[t?o:++r];if(i(s[a],a,s)===false){break}}return e}}var Ws=Ks();const Gs=Ws;function Qs(t,e,i){if(i!==undefined&&!At(t[e],i)||i===undefined&&!(e in t)){jt(t,e,i)}}function Ys(t){return T(t)&&St(t)}function Js(t,e){if(e==="constructor"&&typeof t[e]==="function"){return}if(e=="__proto__"){return}return t[e]}function Xs(t){return Tt(t,Je(t))}function tl(t,e,i,n,r,s,l){var o=Js(t,i),a=Js(e,i),c=l.get(a);if(c){Qs(t,i,c);return}var u=s?s(o,a,i+"",t,e,l):undefined;var h=u===undefined;if(h){var f=N(a),d=!f&&ee(a),p=!f&&!d&&Be(a);u=a;if(f||d||p){if(N(o)){u=o}else if(Ys(o)){u=at(o)}else if(d){h=false;u=nn(a,true)}else if(p){h=false;u=Qn(a,true)}else{u=[]}}else if(Vi(a)||Kt(a)){u=o;if(Kt(o)){u=Xs(o)}else if(!$(o)||R(o)){u=vr(a)}}else{h=false}}if(h){l.set(a,u);r(u,a,n,s,l);l["delete"](a)}Qs(t,i,u)}function el(t,e,i,n,r){if(t===e){return}Gs(e,(function(s,l){r||(r=new Wi);if($(s)){tl(t,e,l,i,el,n,r)}else{var o=n?n(Js(t,l),s,l+"",t,e,r):undefined;if(o===undefined){o=s}Qs(t,l,o)}}),Je)}function il(t,e){return Zs(t,e)}var nl=Bt((function(t,e,i){el(t,e,i)}));const rl=nl;var sl=(t=>(t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY",t))(sl||{});class ll{constructor(t,e,i={}){this.attrName=t,this.keyName=e;const n=sl.TYPE&sl.ATTRIBUTE;this.scope=i.scope!=null?i.scope&sl.LEVEL|n:sl.ATTRIBUTE,i.whitelist!=null&&(this.whitelist=i.whitelist)}static keys(t){return Array.from(t.attributes).map((t=>t.name))}add(t,e){return this.canAdd(t,e)?(t.setAttribute(this.keyName,e),!0):!1}canAdd(t,e){return this.whitelist==null?!0:typeof e=="string"?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1}remove(t){t.removeAttribute(this.keyName)}value(t){const e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""}}class ol extends Error{constructor(t){t="[Parchment] "+t,super(t),this.message=t,this.name=this.constructor.name}}const al=class t{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(t,e=!1){if(t==null)return null;if(this.blots.has(t))return this.blots.get(t)||null;if(e){let i=null;try{i=t.parentNode}catch{return null}return this.find(i,e)}return null}create(e,i,n){const r=this.query(i);if(r==null)throw new ol(`Unable to create ${i} blot`);const s=r,l=i instanceof Node||i.nodeType===Node.TEXT_NODE?i:s.create(n),o=new s(e,l,n);return t.blots.set(o.domNode,o),o}find(e,i=!1){return t.find(e,i)}query(t,e=sl.ANY){let i;return typeof t=="string"?i=this.types[t]||this.attributes[t]:t instanceof Text||t.nodeType===Node.TEXT_NODE?i=this.types.text:typeof t=="number"?t&sl.LEVEL&sl.BLOCK?i=this.types.block:t&sl.LEVEL&sl.INLINE&&(i=this.types.inline):t instanceof Element&&((t.getAttribute("class")||"").split(/\s+/).some((t=>(i=this.classes[t],!!i))),i=i||this.tags[t.tagName]),i==null?null:"scope"in i&&e&sl.LEVEL&i.scope&&e&sl.TYPE&i.scope?i:null}register(...t){return t.map((t=>{const e="blotName"in t,i="attrName"in t;if(!e&&!i)throw new ol("Invalid definition");if(e&&t.blotName==="abstract")throw new ol("Cannot register abstract class");const n=e?t.blotName:i?t.attrName:void 0;return this.types[n]=t,i?typeof t.keyName=="string"&&(this.attributes[t.keyName]=t):e&&(t.className&&(this.classes[t.className]=t),t.tagName&&(Array.isArray(t.tagName)?t.tagName=t.tagName.map((t=>t.toUpperCase())):t.tagName=t.tagName.toUpperCase(),(Array.isArray(t.tagName)?t.tagName:[t.tagName]).forEach((e=>{(this.tags[e]==null||t.className==null)&&(this.tags[e]=t)})))),t}))}};al.blots=new WeakMap;let cl=al;function ul(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter((t=>t.indexOf(`${e}-`)===0))}class hl extends ll{static keys(t){return(t.getAttribute("class")||"").split(/\s+/).map((t=>t.split("-").slice(0,-1).join("-")))}add(t,e){return this.canAdd(t,e)?(this.remove(t),t.classList.add(`${this.keyName}-${e}`),!0):!1}remove(t){ul(t,this.keyName).forEach((e=>{t.classList.remove(e)})),t.classList.length===0&&t.removeAttribute("class")}value(t){const e=(ul(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""}}const fl=hl;function dl(t){const e=t.split("-"),i=e.slice(1).map((t=>t[0].toUpperCase()+t.slice(1))).join("");return e[0]+i}class pl extends ll{static keys(t){return(t.getAttribute("style")||"").split(";").map((t=>t.split(":")[0].trim()))}add(t,e){return this.canAdd(t,e)?(t.style[dl(this.keyName)]=e,!0):!1}remove(t){t.style[dl(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")}value(t){const e=t.style[dl(this.keyName)];return this.canAdd(t,e)?e:""}}const bl=pl;class ql{constructor(t){this.attributes={},this.domNode=t,this.build()}attribute(t,e){e?t.add(this.domNode,e)&&(t.value(this.domNode)!=null?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])}build(){this.attributes={};const t=cl.find(this.domNode);if(t==null)return;const e=ll.keys(this.domNode),i=fl.keys(this.domNode),n=bl.keys(this.domNode);e.concat(i).concat(n).forEach((e=>{const i=t.scroll.query(e,sl.ATTRIBUTE);i instanceof ll&&(this.attributes[i.attrName]=i)}))}copy(t){Object.keys(this.attributes).forEach((e=>{const i=this.attributes[e].value(this.domNode);t.format(e,i)}))}move(t){this.copy(t),Object.keys(this.attributes).forEach((t=>{this.attributes[t].remove(this.domNode)})),this.attributes={}}values(){return Object.keys(this.attributes).reduce(((t,e)=>(t[e]=this.attributes[e].value(this.domNode),t)),{})}}const vl=ql,ml=class t{constructor(t,e){this.scroll=t,this.domNode=e,cl.blots.set(e,this),this.prev=null,this.next=null}static create(t){if(this.tagName==null)throw new ol("Blot definition missing tagName");let e,i;return Array.isArray(this.tagName)?(typeof t=="string"?(i=t.toUpperCase(),parseInt(i,10).toString()===i&&(i=parseInt(i,10))):typeof t=="number"&&(i=t),typeof i=="number"?e=document.createElement(this.tagName[i-1]):i&&this.tagName.indexOf(i)>-1?e=document.createElement(i):e=document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e}get statics(){return this.constructor}attach(){}clone(){const t=this.domNode.cloneNode(!1);return this.scroll.create(t)}detach(){this.parent!=null&&this.parent.removeChild(this),cl.blots.delete(this.domNode)}deleteAt(t,e){this.isolate(t,e).remove()}formatAt(t,e,i,n){const r=this.isolate(t,e);if(this.scroll.query(i,sl.BLOT)!=null&&n)r.wrap(i,n);else if(this.scroll.query(i,sl.ATTRIBUTE)!=null){const t=this.scroll.create(this.statics.scope);r.wrap(t),t.format(i,n)}}insertAt(t,e,i){const n=i==null?this.scroll.create("text",e):this.scroll.create(e,i),r=this.split(t);this.parent.insertBefore(n,r||void 0)}isolate(t,e){const i=this.split(t);if(i==null)throw new Error("Attempt to isolate at end");return i.split(e),i}length(){return 1}offset(t=this.parent){return this.parent==null||this===t?0:this.parent.children.offset(this)+this.parent.offset(t)}optimize(t){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(t,e){const i=typeof t=="string"?this.scroll.create(t,e):t;return this.parent!=null&&(this.parent.insertBefore(i,this.next||void 0),this.remove()),i}split(t,e){return t===0?this:this.next}update(t,e){}wrap(t,e){const i=typeof t=="string"?this.scroll.create(t,e):t;if(this.parent!=null&&this.parent.insertBefore(i,this.next||void 0),typeof i.appendChild!="function")throw new ol(`Cannot wrap ${t}`);return i.appendChild(this),i}};ml.blotName="abstract";let gl=ml;const wl=class t extends gl{static value(t){return!0}index(t,e){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(e,1):-1}position(t,e){let i=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return t>0&&(i+=1),[this.parent.domNode,i]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};wl.scope=sl.INLINE_BLOT;let yl=wl;const kl=yl;class xl{constructor(){this.head=null,this.tail=null,this.length=0}append(...t){if(this.insertBefore(t[0],null),t.length>1){const e=t.slice(1);this.append(...e)}}at(t){const e=this.iterator();let i=e();for(;i&&t>0;)t-=1,i=e();return i}contains(t){const e=this.iterator();let i=e();for(;i;){if(i===t)return!0;i=e()}return!1}indexOf(t){const e=this.iterator();let i=e(),n=0;for(;i;){if(i===t)return n;n+=1,i=e()}return-1}insertBefore(t,e){t!=null&&(this.remove(t),t.next=e,e!=null?(t.prev=e.prev,e.prev!=null&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):this.tail!=null?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)}offset(t){let e=0,i=this.head;for(;i!=null;){if(i===t)return e;e+=i.length(),i=i.next}return-1}remove(t){this.contains(t)&&(t.prev!=null&&(t.prev.next=t.next),t.next!=null&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)}iterator(t=this.head){return()=>{const e=t;return t!=null&&(t=t.next),e}}find(t,e=!1){const i=this.iterator();let n=i();for(;n;){const r=n.length();if(t<r||e&&t===r&&(n.next==null||n.next.length()!==0))return[n,t];t-=r,n=i()}return[null,0]}forEach(t){const e=this.iterator();let i=e();for(;i;)t(i),i=e()}forEachAt(t,e,i){if(e<=0)return;const[n,r]=this.find(t);let s=t-r;const l=this.iterator(n);let o=l();for(;o&&s<t+e;){const n=o.length();t>s?i(o,t-s,Math.min(e,s+n-t)):i(o,0,Math.min(n,t+e-s)),s+=n,o=l()}}map(t){return this.reduce(((e,i)=>(e.push(t(i)),e)),[])}reduce(t,e){const i=this.iterator();let n=i();for(;n;)e=t(e,n),n=i();return e}}function jl(t,e){const i=e.find(t);if(i)return i;try{return e.create(t)}catch{const i=e.create(sl.INLINE);return Array.from(t.childNodes).forEach((t=>{i.domNode.appendChild(t)})),t.parentNode&&t.parentNode.replaceChild(i.domNode,t),i.attach(),i}}const Al=class t extends gl{constructor(t,e){super(t,e),this.uiNode=null,this.build()}appendChild(t){this.insertBefore(t)}attach(){super.attach(),this.children.forEach((t=>{t.attach()}))}attachUI(e){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=e,t.uiClass&&this.uiNode.classList.add(t.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new xl,Array.from(this.domNode.childNodes).filter((t=>t!==this.uiNode)).reverse().forEach((t=>{try{const e=jl(t,this.scroll);this.insertBefore(e,this.children.head||void 0)}catch(t){if(t instanceof ol)return;throw t}}))}deleteAt(t,e){if(t===0&&e===this.length())return this.remove();this.children.forEachAt(t,e,((t,e,i)=>{t.deleteAt(e,i)}))}descendant(e,i=0){const[n,r]=this.children.find(i);return e.blotName==null&&e(n)||e.blotName!=null&&n instanceof e?[n,r]:n instanceof t?n.descendant(e,r):[null,-1]}descendants(e,i=0,n=Number.MAX_VALUE){let r=[],s=n;return this.children.forEachAt(i,n,((i,n,l)=>{(e.blotName==null&&e(i)||e.blotName!=null&&i instanceof e)&&r.push(i),i instanceof t&&(r=r.concat(i.descendants(e,n,s))),s-=l})),r}detach(){this.children.forEach((t=>{t.detach()})),super.detach()}enforceAllowedChildren(){let e=!1;this.children.forEach((i=>{e||this.statics.allowedChildren.some((t=>i instanceof t))||(i.statics.scope===sl.BLOCK_BLOT?(i.next!=null&&this.splitAfter(i),i.prev!=null&&this.splitAfter(i.prev),i.parent.unwrap(),e=!0):i instanceof t?i.unwrap():i.remove())}))}formatAt(t,e,i,n){this.children.forEachAt(t,e,((t,e,r)=>{t.formatAt(e,r,i,n)}))}insertAt(t,e,i){const[n,r]=this.children.find(t);if(n)n.insertAt(r,e,i);else{const t=i==null?this.scroll.create("text",e):this.scroll.create(e,i);this.appendChild(t)}}insertBefore(t,e){t.parent!=null&&t.parent.children.remove(t);let i=null;this.children.insertBefore(t,e||null),t.parent=this,e!=null&&(i=e.domNode),(this.domNode.parentNode!==t.domNode||this.domNode.nextSibling!==i)&&this.domNode.insertBefore(t.domNode,i),t.attach()}length(){return this.children.reduce(((t,e)=>t+e.length()),0)}moveChildren(t,e){this.children.forEach((i=>{t.insertBefore(i,e)}))}optimize(t){if(super.optimize(t),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){const t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t)}else this.remove()}path(e,i=!1){const[n,r]=this.children.find(e,i),s=[[this,e]];return n instanceof t?s.concat(n.path(r,i)):(n!=null&&s.push([n,r]),s)}removeChild(t){this.children.remove(t)}replaceWith(e,i){const n=typeof e=="string"?this.scroll.create(e,i):e;return n instanceof t&&this.moveChildren(n),super.replaceWith(n)}split(t,e=!1){if(!e){if(t===0)return this;if(t===this.length())return this.next}const i=this.clone();return this.parent&&this.parent.insertBefore(i,this.next||void 0),this.children.forEachAt(t,this.length(),((t,n,r)=>{const s=t.split(n,e);s!=null&&i.appendChild(s)})),i}splitAfter(t){const e=this.clone();for(;t.next!=null;)e.appendChild(t.next);return this.parent&&this.parent.insertBefore(e,this.next||void 0),e}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(t,e){const i=[],n=[];t.forEach((t=>{t.target===this.domNode&&t.type==="childList"&&(i.push(...t.addedNodes),n.push(...t.removedNodes))})),n.forEach((t=>{if(t.parentNode!=null&&t.tagName!=="IFRAME"&&document.body.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const e=this.scroll.find(t);e!=null&&(e.domNode.parentNode==null||e.domNode.parentNode===this.domNode)&&e.detach()})),i.filter((t=>t.parentNode===this.domNode&&t!==this.uiNode)).sort(((t,e)=>t===e?0:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1)).forEach((t=>{let e=null;t.nextSibling!=null&&(e=this.scroll.find(t.nextSibling));const i=jl(t,this.scroll);(i.next!==e||i.next==null)&&(i.parent!=null&&i.parent.removeChild(this),this.insertBefore(i,e||void 0))})),this.enforceAllowedChildren()}};Al.uiClass="";let Ol=Al;const Ml=Ol;function El(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const i in t)if(t[i]!==e[i])return!1;return!0}const Tl=class t extends Ml{static create(t){return super.create(t)}static formats(e,i){const n=i.query(t.blotName);if(!(n!=null&&e.tagName===n.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(t,e){super(t,e),this.attributes=new vl(this.domNode)}format(e,i){if(e===this.statics.blotName&&!i)this.children.forEach((e=>{e instanceof t||(e=e.wrap(t.blotName,!0)),this.attributes.copy(e)})),this.unwrap();else{const t=this.scroll.query(e,sl.INLINE);if(t==null)return;t instanceof ll?this.attributes.attribute(t,i):i&&(e!==this.statics.blotName||this.formats()[e]!==i)&&this.replaceWith(e,i)}}formats(){const t=this.attributes.values(),e=this.statics.formats(this.domNode,this.scroll);return e!=null&&(t[this.statics.blotName]=e),t}formatAt(t,e,i,n){this.formats()[i]!=null||this.scroll.query(i,sl.ATTRIBUTE)?this.isolate(t,e).format(i,n):super.formatAt(t,e,i,n)}optimize(e){super.optimize(e);const i=this.formats();if(Object.keys(i).length===0)return this.unwrap();const n=this.next;n instanceof t&&n.prev===this&&El(i,n.formats())&&(n.moveChildren(this),n.remove())}replaceWith(t,e){const i=super.replaceWith(t,e);return this.attributes.copy(i),i}update(t,e){super.update(t,e),t.some((t=>t.target===this.domNode&&t.type==="attributes"))&&this.attributes.build()}wrap(e,i){const n=super.wrap(e,i);return n instanceof t&&this.attributes.move(n),n}};Tl.allowedChildren=[Tl,kl],Tl.blotName="inline",Tl.scope=sl.INLINE_BLOT,Tl.tagName="SPAN";let _l=Tl;const Nl=_l,$l=class t extends Ml{static create(t){return super.create(t)}static formats(e,i){const n=i.query(t.blotName);if(!(n!=null&&e.tagName===n.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(t,e){super(t,e),this.attributes=new vl(this.domNode)}format(e,i){const n=this.scroll.query(e,sl.BLOCK);n!=null&&(n instanceof ll?this.attributes.attribute(n,i):e===this.statics.blotName&&!i?this.replaceWith(t.blotName):i&&(e!==this.statics.blotName||this.formats()[e]!==i)&&this.replaceWith(e,i))}formats(){const t=this.attributes.values(),e=this.statics.formats(this.domNode,this.scroll);return e!=null&&(t[this.statics.blotName]=e),t}formatAt(t,e,i,n){this.scroll.query(i,sl.BLOCK)!=null?this.format(i,n):super.formatAt(t,e,i,n)}insertAt(t,e,i){if(i==null||this.scroll.query(e,sl.INLINE)!=null)super.insertAt(t,e,i);else{const n=this.split(t);if(n!=null){const t=this.scroll.create(e,i);n.parent.insertBefore(t,n)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(t,e){const i=super.replaceWith(t,e);return this.attributes.copy(i),i}update(t,e){super.update(t,e),t.some((t=>t.target===this.domNode&&t.type==="attributes"))&&this.attributes.build()}};$l.blotName="block",$l.scope=sl.BLOCK_BLOT,$l.tagName="P",$l.allowedChildren=[Nl,$l,kl];let Ll=$l;const zl=Ll,Sl=class t extends Ml{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(t,e){super.deleteAt(t,e),this.enforceAllowedChildren()}formatAt(t,e,i,n){super.formatAt(t,e,i,n),this.enforceAllowedChildren()}insertAt(t,e,i){super.insertAt(t,e,i),this.enforceAllowedChildren()}optimize(t){super.optimize(t),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};Sl.blotName="container",Sl.scope=sl.BLOCK_BLOT;let Cl=Sl;const Bl=Cl;class Rl extends kl{static formats(t,e){}format(t,e){super.formatAt(0,this.length(),t,e)}formatAt(t,e,i,n){t===0&&e===this.length()?this.format(i,n):super.formatAt(t,e,i,n)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const Il=Rl,Hl={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},Vl=100,Dl=class t extends Ml{constructor(t,e){super(null,e),this.registry=t,this.scroll=this,this.build(),this.observer=new MutationObserver((t=>{this.update(t)})),this.observer.observe(this.domNode,Hl),this.attach()}create(t,e){return this.registry.create(this,t,e)}find(t,e=!1){const i=this.registry.find(t,e);return i?i.scroll===this?i:e?this.find(i.scroll.domNode.parentNode,!0):null:null}query(t,e=sl.ANY){return this.registry.query(t,e)}register(...t){return this.registry.register(...t)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(t,e){this.update(),t===0&&e===this.length()?this.children.forEach((t=>{t.remove()})):super.deleteAt(t,e)}formatAt(t,e,i,n){this.update(),super.formatAt(t,e,i,n)}insertAt(t,e,i){this.update(),super.insertAt(t,e,i)}optimize(t=[],e={}){super.optimize(e);const i=e.mutationsMap||new WeakMap;let n=Array.from(this.observer.takeRecords());for(;n.length>0;)t.push(n.pop());const r=(t,e=!0)=>{t==null||t===this||t.domNode.parentNode!=null&&(i.has(t.domNode)||i.set(t.domNode,[]),e&&r(t.parent))},s=t=>{i.has(t.domNode)&&(t instanceof Ml&&t.children.forEach(s),i.delete(t.domNode),t.optimize(e))};let l=t;for(let e=0;l.length>0;e+=1){if(e>=Vl)throw new Error("[Parchment] Maximum optimize iterations reached");for(l.forEach((t=>{const e=this.find(t.target,!0);e!=null&&(e.domNode===t.target&&(t.type==="childList"?(r(this.find(t.previousSibling,!1)),Array.from(t.addedNodes).forEach((t=>{const e=this.find(t,!1);r(e,!1),e instanceof Ml&&e.children.forEach((t=>{r(t,!1)}))}))):t.type==="attributes"&&r(e.prev)),r(e))})),this.children.forEach(s),l=Array.from(this.observer.takeRecords()),n=l.slice();n.length>0;)t.push(n.pop())}}update(t,e={}){t=t||this.observer.takeRecords();const i=new WeakMap;t.map((t=>{const e=this.find(t.target,!0);return e==null?null:i.has(e.domNode)?(i.get(e.domNode).push(t),null):(i.set(e.domNode,[t]),e)})).forEach((t=>{t!=null&&t!==this&&i.has(t.domNode)&&t.update(i.get(t.domNode)||[],e)})),e.mutationsMap=i,i.has(this.domNode)&&super.update(i.get(this.domNode),e),this.optimize(t,e)}};Dl.blotName="scroll",Dl.defaultChild=zl,Dl.allowedChildren=[zl,Bl],Dl.scope=sl.BLOCK_BLOT,Dl.tagName="DIV";let Fl=Dl;const Pl=Fl,Ul=class t extends kl{static create(t){return document.createTextNode(t)}static value(t){return t.data}constructor(t,e){super(t,e),this.text=this.statics.value(this.domNode)}deleteAt(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)}index(t,e){return this.domNode===t?e:-1}insertAt(t,e,i){i==null?(this.text=this.text.slice(0,t)+e+this.text.slice(t),this.domNode.data=this.text):super.insertAt(t,e,i)}length(){return this.text.length}optimize(e){super.optimize(e),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof t&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(t,e=!1){return[this.domNode,t]}split(t,e=!1){if(!e){if(t===0)return this;if(t===this.length())return this.next}const i=this.scroll.create(this.domNode.splitText(t));return this.parent.insertBefore(i,this.next||void 0),this.text=this.statics.value(this.domNode),i}update(t,e){t.some((t=>t.type==="characterData"&&t.target===this.domNode))&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};Ul.blotName="text",Ul.scope=sl.INLINE_BLOT;let Zl=Ul;const Kl=Zl;const Wl=Object.freeze({__proto__:null,Attributor:ll,AttributorStore:vl,BlockBlot:zl,ClassAttributor:fl,ContainerBlot:Bl,EmbedBlot:Il,InlineBlot:Nl,LeafBlot:kl,ParentBlot:Ml,Registry:cl,Scope:sl,ScrollBlot:Pl,StyleAttributor:bl,TextBlot:Kl});var Gl=typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function Ql(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t["default"]:t}var Yl={exports:{}};var Jl=-1;var Xl=1;var to=0;function eo(t,e,i,n,r){if(t===e){if(t){return[[to,t]]}return[]}if(i!=null){var s=jo(t,e,i);if(s){return s}}var l=so(t,e);var o=t.substring(0,l);t=t.substring(l);e=e.substring(l);l=oo(t,e);var a=t.substring(t.length-l);t=t.substring(0,t.length-l);e=e.substring(0,e.length-l);var c=io(t,e);if(o){c.unshift([to,o])}if(a){c.push([to,a])}vo(c,r);if(n){co(c)}return c}function io(t,e){var i;if(!t){return[[Xl,e]]}if(!e){return[[Jl,t]]}var n=t.length>e.length?t:e;var r=t.length>e.length?e:t;var s=n.indexOf(r);if(s!==-1){i=[[Xl,n.substring(0,s)],[to,r],[Xl,n.substring(s+r.length)]];if(t.length>e.length){i[0][0]=i[2][0]=Jl}return i}if(r.length===1){return[[Jl,t],[Xl,e]]}var l=ao(t,e);if(l){var o=l[0];var a=l[1];var c=l[2];var u=l[3];var h=l[4];var f=eo(o,c);var d=eo(a,u);return f.concat([[to,h]],d)}return no(t,e)}function no(t,e){var i=t.length;var n=e.length;var r=Math.ceil((i+n)/2);var s=r;var l=2*r;var o=new Array(l);var a=new Array(l);for(var c=0;c<l;c++){o[c]=-1;a[c]=-1}o[s+1]=0;a[s+1]=0;var u=i-n;var h=u%2!==0;var f=0;var d=0;var p=0;var b=0;for(var q=0;q<r;q++){for(var v=-q+f;v<=q-d;v+=2){var m=s+v;var g;if(v===-q||v!==q&&o[m-1]<o[m+1]){g=o[m+1]}else{g=o[m-1]+1}var w=g-v;while(g<i&&w<n&&t.charAt(g)===e.charAt(w)){g++;w++}o[m]=g;if(g>i){d+=2}else if(w>n){f+=2}else if(h){var y=s+u-v;if(y>=0&&y<l&&a[y]!==-1){var k=i-a[y];if(g>=k){return ro(t,e,g,w)}}}}for(var x=-q+p;x<=q-b;x+=2){var y=s+x;var k;if(x===-q||x!==q&&a[y-1]<a[y+1]){k=a[y+1]}else{k=a[y-1]+1}var j=k-x;while(k<i&&j<n&&t.charAt(i-k-1)===e.charAt(n-j-1)){k++;j++}a[y]=k;if(k>i){b+=2}else if(j>n){p+=2}else if(!h){var m=s+u-x;if(m>=0&&m<l&&o[m]!==-1){var g=o[m];var w=s+g-m;k=i-k;if(g>=k){return ro(t,e,g,w)}}}}}return[[Jl,t],[Xl,e]]}function ro(t,e,i,n){var r=t.substring(0,i);var s=e.substring(0,n);var l=t.substring(i);var o=e.substring(n);var a=eo(r,s);var c=eo(l,o);return a.concat(c)}function so(t,e){if(!t||!e||t.charAt(0)!==e.charAt(0)){return 0}var i=0;var n=Math.min(t.length,e.length);var r=n;var s=0;while(i<r){if(t.substring(s,r)==e.substring(s,r)){i=r;s=i}else{n=r}r=Math.floor((n-i)/2+i)}if(mo(t.charCodeAt(r-1))){r--}return r}function lo(t,e){var i=t.length;var n=e.length;if(i==0||n==0){return 0}if(i>n){t=t.substring(i-n)}else if(i<n){e=e.substring(0,i)}var r=Math.min(i,n);if(t==e){return r}var s=0;var l=1;while(true){var o=t.substring(r-l);var a=e.indexOf(o);if(a==-1){return s}l+=a;if(a==0||t.substring(r-l)==e.substring(0,l)){s=l;l++}}}function oo(t,e){if(!t||!e||t.slice(-1)!==e.slice(-1)){return 0}var i=0;var n=Math.min(t.length,e.length);var r=n;var s=0;while(i<r){if(t.substring(t.length-r,t.length-s)==e.substring(e.length-r,e.length-s)){i=r;s=i}else{n=r}r=Math.floor((n-i)/2+i)}if(go(t.charCodeAt(t.length-r))){r--}return r}function ao(t,e){var i=t.length>e.length?t:e;var n=t.length>e.length?e:t;if(i.length<4||n.length*2<i.length){return null}function r(t,e,i){var n=t.substring(i,i+Math.floor(t.length/4));var r=-1;var s="";var l,o,a,c;while((r=e.indexOf(n,r+1))!==-1){var u=so(t.substring(i),e.substring(r));var h=oo(t.substring(0,i),e.substring(0,r));if(s.length<h+u){s=e.substring(r-h,r)+e.substring(r,r+u);l=t.substring(0,i-h);o=t.substring(i+u);a=e.substring(0,r-h);c=e.substring(r+u)}}if(s.length*2>=t.length){return[l,o,a,c,s]}else{return null}}var s=r(i,n,Math.ceil(i.length/4));var l=r(i,n,Math.ceil(i.length/2));var o;if(!s&&!l){return null}else if(!l){o=s}else if(!s){o=l}else{o=s[4].length>l[4].length?s:l}var a,c,u,h;if(t.length>e.length){a=o[0];c=o[1];u=o[2];h=o[3]}else{u=o[0];h=o[1];a=o[2];c=o[3]}var f=o[4];return[a,c,u,h,f]}function co(t){var e=false;var i=[];var n=0;var r=null;var s=0;var l=0;var o=0;var a=0;var c=0;while(s<t.length){if(t[s][0]==to){i[n++]=s;l=a;o=c;a=0;c=0;r=t[s][1]}else{if(t[s][0]==Xl){a+=t[s][1].length}else{c+=t[s][1].length}if(r&&r.length<=Math.max(l,o)&&r.length<=Math.max(a,c)){t.splice(i[n-1],0,[Jl,r]);t[i[n-1]+1][0]=Xl;n--;n--;s=n>0?i[n-1]:-1;l=0;o=0;a=0;c=0;r=null;e=true}}s++}if(e){vo(t)}qo(t);s=1;while(s<t.length){if(t[s-1][0]==Jl&&t[s][0]==Xl){var u=t[s-1][1];var h=t[s][1];var f=lo(u,h);var d=lo(h,u);if(f>=d){if(f>=u.length/2||f>=h.length/2){t.splice(s,0,[to,h.substring(0,f)]);t[s-1][1]=u.substring(0,u.length-f);t[s+1][1]=h.substring(f);s++}}else{if(d>=u.length/2||d>=h.length/2){t.splice(s,0,[to,u.substring(0,d)]);t[s-1][0]=Xl;t[s-1][1]=h.substring(0,h.length-d);t[s+1][0]=Jl;t[s+1][1]=u.substring(d);s++}}s++}s++}}var uo=/[^a-zA-Z0-9]/;var ho=/\s/;var fo=/[\r\n]/;var po=/\n\r?\n$/;var bo=/^\r?\n\r?\n/;function qo(t){function e(t,e){if(!t||!e){return 6}var i=t.charAt(t.length-1);var n=e.charAt(0);var r=i.match(uo);var s=n.match(uo);var l=r&&i.match(ho);var o=s&&n.match(ho);var a=l&&i.match(fo);var c=o&&n.match(fo);var u=a&&t.match(po);var h=c&&e.match(bo);if(u||h){return 5}else if(a||c){return 4}else if(r&&!l&&o){return 3}else if(l||o){return 2}else if(r||s){return 1}return 0}var i=1;while(i<t.length-1){if(t[i-1][0]==to&&t[i+1][0]==to){var n=t[i-1][1];var r=t[i][1];var s=t[i+1][1];var l=oo(n,r);if(l){var o=r.substring(r.length-l);n=n.substring(0,n.length-l);r=o+r.substring(0,r.length-l);s=o+s}var a=n;var c=r;var u=s;var h=e(n,r)+e(r,s);while(r.charAt(0)===s.charAt(0)){n+=r.charAt(0);r=r.substring(1)+s.charAt(0);s=s.substring(1);var f=e(n,r)+e(r,s);if(f>=h){h=f;a=n;c=r;u=s}}if(t[i-1][1]!=a){if(a){t[i-1][1]=a}else{t.splice(i-1,1);i--}t[i][1]=c;if(u){t[i+1][1]=u}else{t.splice(i+1,1);i--}}}i++}}function vo(t,e){t.push([to,""]);var i=0;var n=0;var r=0;var s="";var l="";var o;while(i<t.length){if(i<t.length-1&&!t[i][1]){t.splice(i,1);continue}switch(t[i][0]){case Xl:r++;l+=t[i][1];i++;break;case Jl:n++;s+=t[i][1];i++;break;case to:var a=i-r-n-1;if(e){if(a>=0&&yo(t[a][1])){var c=t[a][1].slice(-1);t[a][1]=t[a][1].slice(0,-1);s=c+s;l=c+l;if(!t[a][1]){t.splice(a,1);i--;var u=a-1;if(t[u]&&t[u][0]===Xl){r++;l=t[u][1]+l;u--}if(t[u]&&t[u][0]===Jl){n++;s=t[u][1]+s;u--}a=u}}if(wo(t[i][1])){var c=t[i][1].charAt(0);t[i][1]=t[i][1].slice(1);s+=c;l+=c}}if(i<t.length-1&&!t[i][1]){t.splice(i,1);break}if(s.length>0||l.length>0){if(s.length>0&&l.length>0){o=so(l,s);if(o!==0){if(a>=0){t[a][1]+=l.substring(0,o)}else{t.splice(0,0,[to,l.substring(0,o)]);i++}l=l.substring(o);s=s.substring(o)}o=oo(l,s);if(o!==0){t[i][1]=l.substring(l.length-o)+t[i][1];l=l.substring(0,l.length-o);s=s.substring(0,s.length-o)}}var h=r+n;if(s.length===0&&l.length===0){t.splice(i-h,h);i=i-h}else if(s.length===0){t.splice(i-h,h,[Xl,l]);i=i-h+1}else if(l.length===0){t.splice(i-h,h,[Jl,s]);i=i-h+1}else{t.splice(i-h,h,[Jl,s],[Xl,l]);i=i-h+2}}if(i!==0&&t[i-1][0]===to){t[i-1][1]+=t[i][1];t.splice(i,1)}else{i++}r=0;n=0;s="";l="";break}}if(t[t.length-1][1]===""){t.pop()}var f=false;i=1;while(i<t.length-1){if(t[i-1][0]===to&&t[i+1][0]===to){if(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);t[i+1][1]=t[i-1][1]+t[i+1][1];t.splice(i-1,1);f=true}else if(t[i][1].substring(0,t[i+1][1].length)==t[i+1][1]){t[i-1][1]+=t[i+1][1];t[i][1]=t[i][1].substring(t[i+1][1].length)+t[i+1][1];t.splice(i+1,1);f=true}}i++}if(f){vo(t,e)}}function mo(t){return t>=55296&&t<=56319}function go(t){return t>=56320&&t<=57343}function wo(t){return go(t.charCodeAt(0))}function yo(t){return mo(t.charCodeAt(t.length-1))}function ko(t){var e=[];for(var i=0;i<t.length;i++){if(t[i][1].length>0){e.push(t[i])}}return e}function xo(t,e,i,n){if(yo(t)||wo(n)){return null}return ko([[to,t],[Jl,e],[Xl,i],[to,n]])}function jo(t,e,i){var n=typeof i==="number"?{index:i,length:0}:i.oldRange;var r=typeof i==="number"?null:i.newRange;var s=t.length;var l=e.length;if(n.length===0&&(r===null||r.length===0)){var o=n.index;var a=t.slice(0,o);var c=t.slice(o);var u=r?r.index:null;t:{var h=o+l-s;if(u!==null&&u!==h){break t}if(h<0||h>l){break t}var f=e.slice(0,h);var d=e.slice(h);if(d!==c){break t}var p=Math.min(o,h);var b=a.slice(0,p);var q=f.slice(0,p);if(b!==q){break t}var v=a.slice(p);var m=f.slice(p);return xo(b,v,m,c)}t:{if(u!==null&&u!==o){break t}var g=o;var f=e.slice(0,g);var d=e.slice(g);if(f!==a){break t}var w=Math.min(s-g,l-g);var y=c.slice(c.length-w);var k=d.slice(d.length-w);if(y!==k){break t}var v=c.slice(0,c.length-w);var m=d.slice(0,d.length-w);return xo(a,v,m,y)}}if(n.length>0&&r&&r.length===0){t:{var b=t.slice(0,n.index);var y=t.slice(n.index+n.length);var p=b.length;var w=y.length;if(l<p+w){break t}var q=e.slice(0,p);var k=e.slice(l-w);if(b!==q||y!==k){break t}var v=t.slice(p,s-w);var m=e.slice(p,l-w);return xo(b,v,m,y)}}return null}function Ao(t,e,i,n){return eo(t,e,i,n,true)}Ao.INSERT=Xl;Ao.DELETE=Jl;Ao.EQUAL=to;var Oo=Ao;var Mo={exports:{}};(function(t,e){var i=200;var n="__lodash_hash_undefined__";var r=9007199254740991;var s="[object Arguments]",l="[object Array]",o="[object Boolean]",a="[object Date]",c="[object Error]",u="[object Function]",h="[object GeneratorFunction]",f="[object Map]",d="[object Number]",p="[object Object]",b="[object Promise]",q="[object RegExp]",v="[object Set]",m="[object String]",g="[object Symbol]",w="[object WeakMap]";var y="[object ArrayBuffer]",k="[object DataView]",x="[object Float32Array]",j="[object Float64Array]",A="[object Int8Array]",O="[object Int16Array]",M="[object Int32Array]",E="[object Uint8Array]",T="[object Uint8ClampedArray]",_="[object Uint16Array]",N="[object Uint32Array]";var $=/[\\^$.*+?()[\]{}|]/g;var L=/\w*$/;var z=/^\[object .+?Constructor\]$/;var S=/^(?:0|[1-9]\d*)$/;var C={};C[s]=C[l]=C[y]=C[k]=C[o]=C[a]=C[x]=C[j]=C[A]=C[O]=C[M]=C[f]=C[d]=C[p]=C[q]=C[v]=C[m]=C[g]=C[E]=C[T]=C[_]=C[N]=true;C[c]=C[u]=C[w]=false;var B=typeof Gl=="object"&&Gl&&Gl.Object===Object&&Gl;var R=typeof self=="object"&&self&&self.Object===Object&&self;var I=B||R||Function("return this")();var H=e&&!e.nodeType&&e;var V=H&&"object"=="object"&&t&&!t.nodeType&&t;var D=V&&V.exports===H;function F(t,e){t.set(e[0],e[1]);return t}function P(t,e){t.add(e);return t}function U(t,e){var i=-1,n=t?t.length:0;while(++i<n){if(e(t[i],i,t)===false){break}}return t}function Z(t,e){var i=-1,n=e.length,r=t.length;while(++i<n){t[r+i]=e[i]}return t}function K(t,e,i,n){var r=-1,s=t?t.length:0;if(n&&s){i=t[++r]}while(++r<s){i=e(i,t[r],r,t)}return i}function W(t,e){var i=-1,n=Array(t);while(++i<t){n[i]=e(i)}return n}function G(t,e){return t==null?undefined:t[e]}function Q(t){var e=false;if(t!=null&&typeof t.toString!="function"){try{e=!!(t+"")}catch(t){}}return e}function Y(t){var e=-1,i=Array(t.size);t.forEach((function(t,n){i[++e]=[n,t]}));return i}function J(t,e){return function(i){return t(e(i))}}function X(t){var e=-1,i=Array(t.size);t.forEach((function(t){i[++e]=t}));return i}var tt=Array.prototype,et=Function.prototype,it=Object.prototype;var nt=I["__core-js_shared__"];var rt=function(){var t=/[^.]+$/.exec(nt&&nt.keys&&nt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();var st=et.toString;var lt=it.hasOwnProperty;var ot=it.toString;var at=RegExp("^"+st.call(lt).replace($,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var ct=D?I.Buffer:undefined,ut=I.Symbol,ht=I.Uint8Array,ft=J(Object.getPrototypeOf,Object),dt=Object.create,pt=it.propertyIsEnumerable,bt=tt.splice;var qt=Object.getOwnPropertySymbols,vt=ct?ct.isBuffer:undefined,mt=J(Object.keys,Object);var gt=Ae(I,"DataView"),wt=Ae(I,"Map"),yt=Ae(I,"Promise"),kt=Ae(I,"Set"),xt=Ae(I,"WeakMap"),jt=Ae(Object,"create");var At=Se(gt),Ot=Se(wt),Mt=Se(yt),Et=Se(kt),Tt=Se(xt);var _t=ut?ut.prototype:undefined,Nt=_t?_t.valueOf:undefined;function $t(t){var e=-1,i=t?t.length:0;this.clear();while(++e<i){var n=t[e];this.set(n[0],n[1])}}function Lt(){this.__data__=jt?jt(null):{}}function zt(t){return this.has(t)&&delete this.__data__[t]}function St(t){var e=this.__data__;if(jt){var i=e[t];return i===n?undefined:i}return lt.call(e,t)?e[t]:undefined}function Ct(t){var e=this.__data__;return jt?e[t]!==undefined:lt.call(e,t)}function Bt(t,e){var i=this.__data__;i[t]=jt&&e===undefined?n:e;return this}$t.prototype.clear=Lt;$t.prototype["delete"]=zt;$t.prototype.get=St;$t.prototype.has=Ct;$t.prototype.set=Bt;function Rt(t){var e=-1,i=t?t.length:0;this.clear();while(++e<i){var n=t[e];this.set(n[0],n[1])}}function It(){this.__data__=[]}function Ht(t){var e=this.__data__,i=re(e,t);if(i<0){return false}var n=e.length-1;if(i==n){e.pop()}else{bt.call(e,i,1)}return true}function Vt(t){var e=this.__data__,i=re(e,t);return i<0?undefined:e[i][1]}function Dt(t){return re(this.__data__,t)>-1}function Ft(t,e){var i=this.__data__,n=re(i,t);if(n<0){i.push([t,e])}else{i[n][1]=e}return this}Rt.prototype.clear=It;Rt.prototype["delete"]=Ht;Rt.prototype.get=Vt;Rt.prototype.has=Dt;Rt.prototype.set=Ft;function Pt(t){var e=-1,i=t?t.length:0;this.clear();while(++e<i){var n=t[e];this.set(n[0],n[1])}}function Ut(){this.__data__={hash:new $t,map:new(wt||Rt),string:new $t}}function Zt(t){return je(this,t)["delete"](t)}function Kt(t){return je(this,t).get(t)}function Wt(t){return je(this,t).has(t)}function Gt(t,e){je(this,t).set(t,e);return this}Pt.prototype.clear=Ut;Pt.prototype["delete"]=Zt;Pt.prototype.get=Kt;Pt.prototype.has=Wt;Pt.prototype.set=Gt;function Qt(t){this.__data__=new Rt(t)}function Yt(){this.__data__=new Rt}function Jt(t){return this.__data__["delete"](t)}function Xt(t){return this.__data__.get(t)}function te(t){return this.__data__.has(t)}function ee(t,e){var n=this.__data__;if(n instanceof Rt){var r=n.__data__;if(!wt||r.length<i-1){r.push([t,e]);return this}n=this.__data__=new Pt(r)}n.set(t,e);return this}Qt.prototype.clear=Yt;Qt.prototype["delete"]=Jt;Qt.prototype.get=Xt;Qt.prototype.has=te;Qt.prototype.set=ee;function ie(t,e){var i=Ie(t)||Re(t)?W(t.length,String):[];var n=i.length,r=!!n;for(var s in t){if((e||lt.call(t,s))&&!(r&&(s=="length"||Ne(s,n)))){i.push(s)}}return i}function ne(t,e,i){var n=t[e];if(!(lt.call(t,e)&&Be(n,i))||i===undefined&&!(e in t)){t[e]=i}}function re(t,e){var i=t.length;while(i--){if(Be(t[i][0],e)){return i}}return-1}function se(t,e){return t&&ye(e,Ke(e),t)}function le(t,e,i,n,r,l,o){var a;if(n){a=l?n(t,r,l,o):n(t)}if(a!==undefined){return a}if(!Ue(t)){return t}var c=Ie(t);if(c){a=Ee(t);if(!e){return we(t,a)}}else{var f=Me(t),d=f==u||f==h;if(De(t)){return fe(t,e)}if(f==p||f==s||d&&!l){if(Q(t)){return l?t:{}}a=Te(d?{}:t);if(!e){return ke(t,se(a,t))}}else{if(!C[f]){return l?t:{}}a=_e(t,f,le,e)}}o||(o=new Qt);var b=o.get(t);if(b){return b}o.set(t,a);if(!c){var q=i?xe(t):Ke(t)}U(q||t,(function(r,s){if(q){s=r;r=t[s]}ne(a,s,le(r,e,i,n,s,t,o))}));return a}function oe(t){return Ue(t)?dt(t):{}}function ae(t,e,i){var n=e(t);return Ie(t)?n:Z(n,i(t))}function ce(t){return ot.call(t)}function ue(t){if(!Ue(t)||Le(t)){return false}var e=Fe(t)||Q(t)?at:z;return e.test(Se(t))}function he(t){if(!ze(t)){return mt(t)}var e=[];for(var i in Object(t)){if(lt.call(t,i)&&i!="constructor"){e.push(i)}}return e}function fe(t,e){if(e){return t.slice()}var i=new t.constructor(t.length);t.copy(i);return i}function de(t){var e=new t.constructor(t.byteLength);new ht(e).set(new ht(t));return e}function pe(t,e){var i=e?de(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.byteLength)}function be(t,e,i){var n=e?i(Y(t),true):Y(t);return K(n,F,new t.constructor)}function qe(t){var e=new t.constructor(t.source,L.exec(t));e.lastIndex=t.lastIndex;return e}function ve(t,e,i){var n=e?i(X(t),true):X(t);return K(n,P,new t.constructor)}function me(t){return Nt?Object(Nt.call(t)):{}}function ge(t,e){var i=e?de(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}function we(t,e){var i=-1,n=t.length;e||(e=Array(n));while(++i<n){e[i]=t[i]}return e}function ye(t,e,i,n){i||(i={});var r=-1,s=e.length;while(++r<s){var l=e[r];var o=n?n(i[l],t[l],l,i,t):undefined;ne(i,l,o===undefined?t[l]:o)}return i}function ke(t,e){return ye(t,Oe(t),e)}function xe(t){return ae(t,Ke,Oe)}function je(t,e){var i=t.__data__;return $e(e)?i[typeof e=="string"?"string":"hash"]:i.map}function Ae(t,e){var i=G(t,e);return ue(i)?i:undefined}var Oe=qt?J(qt,Object):We;var Me=ce;if(gt&&Me(new gt(new ArrayBuffer(1)))!=k||wt&&Me(new wt)!=f||yt&&Me(yt.resolve())!=b||kt&&Me(new kt)!=v||xt&&Me(new xt)!=w){Me=function(t){var e=ot.call(t),i=e==p?t.constructor:undefined,n=i?Se(i):undefined;if(n){switch(n){case At:return k;case Ot:return f;case Mt:return b;case Et:return v;case Tt:return w}}return e}}function Ee(t){var e=t.length,i=t.constructor(e);if(e&&typeof t[0]=="string"&&lt.call(t,"index")){i.index=t.index;i.input=t.input}return i}function Te(t){return typeof t.constructor=="function"&&!ze(t)?oe(ft(t)):{}}function _e(t,e,i,n){var r=t.constructor;switch(e){case y:return de(t);case o:case a:return new r(+t);case k:return pe(t,n);case x:case j:case A:case O:case M:case E:case T:case _:case N:return ge(t,n);case f:return be(t,n,i);case d:case m:return new r(t);case q:return qe(t);case v:return ve(t,n,i);case g:return me(t)}}function Ne(t,e){e=e==null?r:e;return!!e&&(typeof t=="number"||S.test(t))&&(t>-1&&t%1==0&&t<e)}function $e(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Le(t){return!!rt&&rt in t}function ze(t){var e=t&&t.constructor,i=typeof e=="function"&&e.prototype||it;return t===i}function Se(t){if(t!=null){try{return st.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Ce(t){return le(t,true,true)}function Be(t,e){return t===e||t!==t&&e!==e}function Re(t){return Ve(t)&&lt.call(t,"callee")&&(!pt.call(t,"callee")||ot.call(t)==s)}var Ie=Array.isArray;function He(t){return t!=null&&Pe(t.length)&&!Fe(t)}function Ve(t){return Ze(t)&&He(t)}var De=vt||Ge;function Fe(t){var e=Ue(t)?ot.call(t):"";return e==u||e==h}function Pe(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=r}function Ue(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function Ze(t){return!!t&&typeof t=="object"}function Ke(t){return He(t)?ie(t):he(t)}function We(){return[]}function Ge(){return false}t.exports=Ce})(Mo,Mo.exports);var Eo={exports:{}};(function(t,e){var i=200;var n="__lodash_hash_undefined__";var r=1,s=2;var l=9007199254740991;var o="[object Arguments]",a="[object Array]",c="[object AsyncFunction]",u="[object Boolean]",h="[object Date]",f="[object Error]",d="[object Function]",p="[object GeneratorFunction]",b="[object Map]",q="[object Number]",v="[object Null]",m="[object Object]",g="[object Promise]",w="[object Proxy]",y="[object RegExp]",k="[object Set]",x="[object String]",j="[object Symbol]",A="[object Undefined]",O="[object WeakMap]";var M="[object ArrayBuffer]",E="[object DataView]",T="[object Float32Array]",_="[object Float64Array]",N="[object Int8Array]",$="[object Int16Array]",L="[object Int32Array]",z="[object Uint8Array]",S="[object Uint8ClampedArray]",C="[object Uint16Array]",B="[object Uint32Array]";var R=/[\\^$.*+?()[\]{}|]/g;var I=/^\[object .+?Constructor\]$/;var H=/^(?:0|[1-9]\d*)$/;var V={};V[T]=V[_]=V[N]=V[$]=V[L]=V[z]=V[S]=V[C]=V[B]=true;V[o]=V[a]=V[M]=V[u]=V[E]=V[h]=V[f]=V[d]=V[b]=V[q]=V[m]=V[y]=V[k]=V[x]=V[O]=false;var D=typeof Gl=="object"&&Gl&&Gl.Object===Object&&Gl;var F=typeof self=="object"&&self&&self.Object===Object&&self;var P=D||F||Function("return this")();var U=e&&!e.nodeType&&e;var Z=U&&"object"=="object"&&t&&!t.nodeType&&t;var K=Z&&Z.exports===U;var W=K&&D.process;var G=function(){try{return W&&W.binding&&W.binding("util")}catch(t){}}();var Q=G&&G.isTypedArray;function Y(t,e){var i=-1,n=t==null?0:t.length,r=0,s=[];while(++i<n){var l=t[i];if(e(l,i,t)){s[r++]=l}}return s}function J(t,e){var i=-1,n=e.length,r=t.length;while(++i<n){t[r+i]=e[i]}return t}function X(t,e){var i=-1,n=t==null?0:t.length;while(++i<n){if(e(t[i],i,t)){return true}}return false}function tt(t,e){var i=-1,n=Array(t);while(++i<t){n[i]=e(i)}return n}function et(t){return function(e){return t(e)}}function it(t,e){return t.has(e)}function nt(t,e){return t==null?undefined:t[e]}function rt(t){var e=-1,i=Array(t.size);t.forEach((function(t,n){i[++e]=[n,t]}));return i}function st(t,e){return function(i){return t(e(i))}}function lt(t){var e=-1,i=Array(t.size);t.forEach((function(t){i[++e]=t}));return i}var ot=Array.prototype,at=Function.prototype,ct=Object.prototype;var ut=P["__core-js_shared__"];var ht=at.toString;var ft=ct.hasOwnProperty;var dt=function(){var t=/[^.]+$/.exec(ut&&ut.keys&&ut.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();var pt=ct.toString;var bt=RegExp("^"+ht.call(ft).replace(R,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var qt=K?P.Buffer:undefined,vt=P.Symbol,mt=P.Uint8Array,gt=ct.propertyIsEnumerable,wt=ot.splice,yt=vt?vt.toStringTag:undefined;var kt=Object.getOwnPropertySymbols,xt=qt?qt.isBuffer:undefined,jt=st(Object.keys,Object);var At=Oe(P,"DataView"),Ot=Oe(P,"Map"),Mt=Oe(P,"Promise"),Et=Oe(P,"Set"),Tt=Oe(P,"WeakMap"),_t=Oe(Object,"create");var Nt=Se(At),$t=Se(Ot),Lt=Se(Mt),zt=Se(Et),St=Se(Tt);var Ct=vt?vt.prototype:undefined,Bt=Ct?Ct.valueOf:undefined;function Rt(t){var e=-1,i=t==null?0:t.length;this.clear();while(++e<i){var n=t[e];this.set(n[0],n[1])}}function It(){this.__data__=_t?_t(null):{};this.size=0}function Ht(t){var e=this.has(t)&&delete this.__data__[t];this.size-=e?1:0;return e}function Vt(t){var e=this.__data__;if(_t){var i=e[t];return i===n?undefined:i}return ft.call(e,t)?e[t]:undefined}function Dt(t){var e=this.__data__;return _t?e[t]!==undefined:ft.call(e,t)}function Ft(t,e){var i=this.__data__;this.size+=this.has(t)?0:1;i[t]=_t&&e===undefined?n:e;return this}Rt.prototype.clear=It;Rt.prototype["delete"]=Ht;Rt.prototype.get=Vt;Rt.prototype.has=Dt;Rt.prototype.set=Ft;function Pt(t){var e=-1,i=t==null?0:t.length;this.clear();while(++e<i){var n=t[e];this.set(n[0],n[1])}}function Ut(){this.__data__=[];this.size=0}function Zt(t){var e=this.__data__,i=fe(e,t);if(i<0){return false}var n=e.length-1;if(i==n){e.pop()}else{wt.call(e,i,1)}--this.size;return true}function Kt(t){var e=this.__data__,i=fe(e,t);return i<0?undefined:e[i][1]}function Wt(t){return fe(this.__data__,t)>-1}function Gt(t,e){var i=this.__data__,n=fe(i,t);if(n<0){++this.size;i.push([t,e])}else{i[n][1]=e}return this}Pt.prototype.clear=Ut;Pt.prototype["delete"]=Zt;Pt.prototype.get=Kt;Pt.prototype.has=Wt;Pt.prototype.set=Gt;function Qt(t){var e=-1,i=t==null?0:t.length;this.clear();while(++e<i){var n=t[e];this.set(n[0],n[1])}}function Yt(){this.size=0;this.__data__={hash:new Rt,map:new(Ot||Pt),string:new Rt}}function Jt(t){var e=Ae(this,t)["delete"](t);this.size-=e?1:0;return e}function Xt(t){return Ae(this,t).get(t)}function te(t){return Ae(this,t).has(t)}function ee(t,e){var i=Ae(this,t),n=i.size;i.set(t,e);this.size+=i.size==n?0:1;return this}Qt.prototype.clear=Yt;Qt.prototype["delete"]=Jt;Qt.prototype.get=Xt;Qt.prototype.has=te;Qt.prototype.set=ee;function ie(t){var e=-1,i=t==null?0:t.length;this.__data__=new Qt;while(++e<i){this.add(t[e])}}function ne(t){this.__data__.set(t,n);return this}function re(t){return this.__data__.has(t)}ie.prototype.add=ie.prototype.push=ne;ie.prototype.has=re;function se(t){var e=this.__data__=new Pt(t);this.size=e.size}function le(){this.__data__=new Pt;this.size=0}function oe(t){var e=this.__data__,i=e["delete"](t);this.size=e.size;return i}function ae(t){return this.__data__.get(t)}function ce(t){return this.__data__.has(t)}function ue(t,e){var n=this.__data__;if(n instanceof Pt){var r=n.__data__;if(!Ot||r.length<i-1){r.push([t,e]);this.size=++n.size;return this}n=this.__data__=new Qt(r)}n.set(t,e);this.size=n.size;return this}se.prototype.clear=le;se.prototype["delete"]=oe;se.prototype.get=ae;se.prototype.has=ce;se.prototype.set=ue;function he(t,e){var i=Re(t),n=!i&&Be(t),r=!i&&!n&&He(t),s=!i&&!n&&!r&&Ze(t),l=i||n||r||s,o=l?tt(t.length,String):[],a=o.length;for(var c in t){if((e||ft.call(t,c))&&!(l&&(c=="length"||r&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||_e(c,a)))){o.push(c)}}return o}function fe(t,e){var i=t.length;while(i--){if(Ce(t[i][0],e)){return i}}return-1}function de(t,e,i){var n=e(t);return Re(t)?n:J(n,i(t))}function pe(t){if(t==null){return t===undefined?A:v}return yt&&yt in Object(t)?Me(t):ze(t)}function be(t){return Ue(t)&&pe(t)==o}function qe(t,e,i,n,r){if(t===e){return true}if(t==null||e==null||!Ue(t)&&!Ue(e)){return t!==t&&e!==e}return ve(t,e,i,n,qe,r)}function ve(t,e,i,n,s,l){var c=Re(t),u=Re(e),h=c?a:Te(t),f=u?a:Te(e);h=h==o?m:h;f=f==o?m:f;var d=h==m,p=f==m,b=h==f;if(b&&He(t)){if(!He(e)){return false}c=true;d=false}if(b&&!d){l||(l=new se);return c||Ze(t)?ye(t,e,i,n,s,l):ke(t,e,h,i,n,s,l)}if(!(i&r)){var q=d&&ft.call(t,"__wrapped__"),v=p&&ft.call(e,"__wrapped__");if(q||v){var g=q?t.value():t,w=v?e.value():e;l||(l=new se);return s(g,w,i,n,l)}}if(!b){return false}l||(l=new se);return xe(t,e,i,n,s,l)}function me(t){if(!Pe(t)||$e(t)){return false}var e=De(t)?bt:I;return e.test(Se(t))}function ge(t){return Ue(t)&&Fe(t.length)&&!!V[pe(t)]}function we(t){if(!Le(t)){return jt(t)}var e=[];for(var i in Object(t)){if(ft.call(t,i)&&i!="constructor"){e.push(i)}}return e}function ye(t,e,i,n,l,o){var a=i&r,c=t.length,u=e.length;if(c!=u&&!(a&&u>c)){return false}var h=o.get(t);if(h&&o.get(e)){return h==e}var f=-1,d=true,p=i&s?new ie:undefined;o.set(t,e);o.set(e,t);while(++f<c){var b=t[f],q=e[f];if(n){var v=a?n(q,b,f,e,t,o):n(b,q,f,t,e,o)}if(v!==undefined){if(v){continue}d=false;break}if(p){if(!X(e,(function(t,e){if(!it(p,e)&&(b===t||l(b,t,i,n,o))){return p.push(e)}}))){d=false;break}}else if(!(b===q||l(b,q,i,n,o))){d=false;break}}o["delete"](t);o["delete"](e);return d}function ke(t,e,i,n,l,o,a){switch(i){case E:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset){return false}t=t.buffer;e=e.buffer;case M:if(t.byteLength!=e.byteLength||!o(new mt(t),new mt(e))){return false}return true;case u:case h:case q:return Ce(+t,+e);case f:return t.name==e.name&&t.message==e.message;case y:case x:return t==e+"";case b:var c=rt;case k:var d=n&r;c||(c=lt);if(t.size!=e.size&&!d){return false}var p=a.get(t);if(p){return p==e}n|=s;a.set(t,e);var v=ye(c(t),c(e),n,l,o,a);a["delete"](t);return v;case j:if(Bt){return Bt.call(t)==Bt.call(e)}}return false}function xe(t,e,i,n,s,l){var o=i&r,a=je(t),c=a.length,u=je(e),h=u.length;if(c!=h&&!o){return false}var f=c;while(f--){var d=a[f];if(!(o?d in e:ft.call(e,d))){return false}}var p=l.get(t);if(p&&l.get(e)){return p==e}var b=true;l.set(t,e);l.set(e,t);var q=o;while(++f<c){d=a[f];var v=t[d],m=e[d];if(n){var g=o?n(m,v,d,e,t,l):n(v,m,d,t,e,l)}if(!(g===undefined?v===m||s(v,m,i,n,l):g)){b=false;break}q||(q=d=="constructor")}if(b&&!q){var w=t.constructor,y=e.constructor;if(w!=y&&("constructor"in t&&"constructor"in e)&&!(typeof w=="function"&&w instanceof w&&typeof y=="function"&&y instanceof y)){b=false}}l["delete"](t);l["delete"](e);return b}function je(t){return de(t,Ke,Ee)}function Ae(t,e){var i=t.__data__;return Ne(e)?i[typeof e=="string"?"string":"hash"]:i.map}function Oe(t,e){var i=nt(t,e);return me(i)?i:undefined}function Me(t){var e=ft.call(t,yt),i=t[yt];try{t[yt]=undefined;var n=true}catch(t){}var r=pt.call(t);if(n){if(e){t[yt]=i}else{delete t[yt]}}return r}var Ee=!kt?We:function(t){if(t==null){return[]}t=Object(t);return Y(kt(t),(function(e){return gt.call(t,e)}))};var Te=pe;if(At&&Te(new At(new ArrayBuffer(1)))!=E||Ot&&Te(new Ot)!=b||Mt&&Te(Mt.resolve())!=g||Et&&Te(new Et)!=k||Tt&&Te(new Tt)!=O){Te=function(t){var e=pe(t),i=e==m?t.constructor:undefined,n=i?Se(i):"";if(n){switch(n){case Nt:return E;case $t:return b;case Lt:return g;case zt:return k;case St:return O}}return e}}function _e(t,e){e=e==null?l:e;return!!e&&(typeof t=="number"||H.test(t))&&(t>-1&&t%1==0&&t<e)}function Ne(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function $e(t){return!!dt&&dt in t}function Le(t){var e=t&&t.constructor,i=typeof e=="function"&&e.prototype||ct;return t===i}function ze(t){return pt.call(t)}function Se(t){if(t!=null){try{return ht.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Ce(t,e){return t===e||t!==t&&e!==e}var Be=be(function(){return arguments}())?be:function(t){return Ue(t)&&ft.call(t,"callee")&&!gt.call(t,"callee")};var Re=Array.isArray;function Ie(t){return t!=null&&Fe(t.length)&&!De(t)}var He=xt||Ge;function Ve(t,e){return qe(t,e)}function De(t){if(!Pe(t)){return false}var e=pe(t);return e==d||e==p||e==c||e==w}function Fe(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=l}function Pe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function Ue(t){return t!=null&&typeof t=="object"}var Ze=Q?et(Q):ge;function Ke(t){return Ie(t)?he(t):we(t)}function We(){return[]}function Ge(){return false}t.exports=Ve})(Eo,Eo.exports);var To={};Object.defineProperty(To,"__esModule",{value:true});const _o=Mo.exports;const No=Eo.exports;var $o;(function(t){function e(t={},e={},i=false){if(typeof t!=="object"){t={}}if(typeof e!=="object"){e={}}let n=_o(e);if(!i){n=Object.keys(n).reduce(((t,e)=>{if(n[e]!=null){t[e]=n[e]}return t}),{})}for(const i in t){if(t[i]!==undefined&&e[i]===undefined){n[i]=t[i]}}return Object.keys(n).length>0?n:undefined}t.compose=e;function i(t={},e={}){if(typeof t!=="object"){t={}}if(typeof e!=="object"){e={}}const i=Object.keys(t).concat(Object.keys(e)).reduce(((i,n)=>{if(!No(t[n],e[n])){i[n]=e[n]===undefined?null:e[n]}return i}),{});return Object.keys(i).length>0?i:undefined}t.diff=i;function n(t={},e={}){t=t||{};const i=Object.keys(e).reduce(((i,n)=>{if(e[n]!==t[n]&&t[n]!==undefined){i[n]=e[n]}return i}),{});return Object.keys(t).reduce(((i,n)=>{if(t[n]!==e[n]&&e[n]===undefined){i[n]=null}return i}),i)}t.invert=n;function r(t,e,i=false){if(typeof t!=="object"){return e}if(typeof e!=="object"){return undefined}if(!i){return e}const n=Object.keys(e).reduce(((i,n)=>{if(t[n]===undefined){i[n]=e[n]}return i}),{});return Object.keys(n).length>0?n:undefined}t.transform=r})($o||($o={}));To.default=$o;var Lo={};Object.defineProperty(Lo,"__esModule",{value:true});var zo;(function(t){function e(t){if(typeof t.delete==="number"){return t.delete}else if(typeof t.retain==="number"){return t.retain}else if(typeof t.retain==="object"&&t.retain!==null){return 1}else{return typeof t.insert==="string"?t.insert.length:1}}t.length=e})(zo||(zo={}));Lo.default=zo;var So={};Object.defineProperty(So,"__esModule",{value:true});const Co=Lo;class Bo{constructor(t){this.ops=t;this.index=0;this.offset=0}hasNext(){return this.peekLength()<Infinity}next(t){if(!t){t=Infinity}const e=this.ops[this.index];if(e){const i=this.offset;const n=Co.default.length(e);if(t>=n-i){t=n-i;this.index+=1;this.offset=0}else{this.offset+=t}if(typeof e.delete==="number"){return{delete:t}}else{const n={};if(e.attributes){n.attributes=e.attributes}if(typeof e.retain==="number"){n.retain=t}else if(typeof e.retain==="object"&&e.retain!==null){n.retain=e.retain}else if(typeof e.insert==="string"){n.insert=e.insert.substr(i,t)}else{n.insert=e.insert}return n}}else{return{retain:Infinity}}}peek(){return this.ops[this.index]}peekLength(){if(this.ops[this.index]){return Co.default.length(this.ops[this.index])-this.offset}else{return Infinity}}peekType(){const t=this.ops[this.index];if(t){if(typeof t.delete==="number"){return"delete"}else if(typeof t.retain==="number"||typeof t.retain==="object"&&t.retain!==null){return"retain"}else{return"insert"}}return"retain"}rest(){if(!this.hasNext()){return[]}else if(this.offset===0){return this.ops.slice(this.index)}else{const t=this.offset;const e=this.index;const i=this.next();const n=this.ops.slice(this.index);this.offset=t;this.index=e;return[i].concat(n)}}}So.default=Bo;(function(t,e){Object.defineProperty(e,"__esModule",{value:true});e.AttributeMap=e.OpIterator=e.Op=void 0;const i=Oo;const n=Mo.exports;const r=Eo.exports;const s=To;e.AttributeMap=s.default;const l=Lo;e.Op=l.default;const o=So;e.OpIterator=o.default;const a=String.fromCharCode(0);const c=(t,e)=>{if(typeof t!=="object"||t===null){throw new Error(`cannot retain a ${typeof t}`)}if(typeof e!=="object"||e===null){throw new Error(`cannot retain a ${typeof e}`)}const i=Object.keys(t)[0];if(!i||i!==Object.keys(e)[0]){throw new Error(`embed types not matched: ${i} != ${Object.keys(e)[0]}`)}return[i,t[i],e[i]]};class u{constructor(t){if(Array.isArray(t)){this.ops=t}else if(t!=null&&Array.isArray(t.ops)){this.ops=t.ops}else{this.ops=[]}}static registerEmbed(t,e){this.handlers[t]=e}static unregisterEmbed(t){delete this.handlers[t]}static getHandler(t){const e=this.handlers[t];if(!e){throw new Error(`no handlers for embed type "${t}"`)}return e}insert(t,e){const i={};if(typeof t==="string"&&t.length===0){return this}i.insert=t;if(e!=null&&typeof e==="object"&&Object.keys(e).length>0){i.attributes=e}return this.push(i)}delete(t){if(t<=0){return this}return this.push({delete:t})}retain(t,e){if(typeof t==="number"&&t<=0){return this}const i={retain:t};if(e!=null&&typeof e==="object"&&Object.keys(e).length>0){i.attributes=e}return this.push(i)}push(t){let e=this.ops.length;let i=this.ops[e-1];t=n(t);if(typeof i==="object"){if(typeof t.delete==="number"&&typeof i.delete==="number"){this.ops[e-1]={delete:i.delete+t.delete};return this}if(typeof i.delete==="number"&&t.insert!=null){e-=1;i=this.ops[e-1];if(typeof i!=="object"){this.ops.unshift(t);return this}}if(r(t.attributes,i.attributes)){if(typeof t.insert==="string"&&typeof i.insert==="string"){this.ops[e-1]={insert:i.insert+t.insert};if(typeof t.attributes==="object"){this.ops[e-1].attributes=t.attributes}return this}else if(typeof t.retain==="number"&&typeof i.retain==="number"){this.ops[e-1]={retain:i.retain+t.retain};if(typeof t.attributes==="object"){this.ops[e-1].attributes=t.attributes}return this}}}if(e===this.ops.length){this.ops.push(t)}else{this.ops.splice(e,0,t)}return this}chop(){const t=this.ops[this.ops.length-1];if(t&&typeof t.retain==="number"&&!t.attributes){this.ops.pop()}return this}filter(t){return this.ops.filter(t)}forEach(t){this.ops.forEach(t)}map(t){return this.ops.map(t)}partition(t){const e=[];const i=[];this.forEach((n=>{const r=t(n)?e:i;r.push(n)}));return[e,i]}reduce(t,e){return this.ops.reduce(t,e)}changeLength(){return this.reduce(((t,e)=>{if(e.insert){return t+l.default.length(e)}else if(e.delete){return t-e.delete}return t}),0)}length(){return this.reduce(((t,e)=>t+l.default.length(e)),0)}slice(t=0,e=Infinity){const i=[];const n=new o.default(this.ops);let r=0;while(r<e&&n.hasNext()){let s;if(r<t){s=n.next(t-r)}else{s=n.next(e-r);i.push(s)}r+=l.default.length(s)}return new u(i)}compose(t){const e=new o.default(this.ops);const i=new o.default(t.ops);const n=[];const l=i.peek();if(l!=null&&typeof l.retain==="number"&&l.attributes==null){let t=l.retain;while(e.peekType()==="insert"&&e.peekLength()<=t){t-=e.peekLength();n.push(e.next())}if(l.retain-t>0){i.next(l.retain-t)}}const a=new u(n);while(e.hasNext()||i.hasNext()){if(i.peekType()==="insert"){a.push(i.next())}else if(e.peekType()==="delete"){a.push(e.next())}else{const t=Math.min(e.peekLength(),i.peekLength());const n=e.next(t);const l=i.next(t);if(l.retain){const o={};if(typeof n.retain==="number"){o.retain=typeof l.retain==="number"?t:l.retain}else{if(typeof l.retain==="number"){if(n.retain==null){o.insert=n.insert}else{o.retain=n.retain}}else{const t=n.retain==null?"insert":"retain";const[e,i,r]=c(n[t],l.retain);const s=u.getHandler(e);o[t]={[e]:s.compose(i,r,t==="retain")}}}const h=s.default.compose(n.attributes,l.attributes,typeof n.retain==="number");if(h){o.attributes=h}a.push(o);if(!i.hasNext()&&r(a.ops[a.ops.length-1],o)){const t=new u(e.rest());return a.concat(t).chop()}}else if(typeof l.delete==="number"&&(typeof n.retain==="number"||typeof n.retain==="object"&&n.retain!==null)){a.push(l)}}}return a.chop()}concat(t){const e=new u(this.ops.slice());if(t.ops.length>0){e.push(t.ops[0]);e.ops=e.ops.concat(t.ops.slice(1))}return e}diff(t,e){if(this.ops===t.ops){return new u}const n=[this,t].map((e=>e.map((i=>{if(i.insert!=null){return typeof i.insert==="string"?i.insert:a}const n=e===t?"on":"with";throw new Error("diff() called "+n+" non-document")})).join("")));const l=new u;const c=i(n[0],n[1],e,true);const h=new o.default(this.ops);const f=new o.default(t.ops);c.forEach((t=>{let e=t[1].length;while(e>0){let n=0;switch(t[0]){case i.INSERT:n=Math.min(f.peekLength(),e);l.push(f.next(n));break;case i.DELETE:n=Math.min(e,h.peekLength());h.next(n);l.delete(n);break;case i.EQUAL:n=Math.min(h.peekLength(),f.peekLength(),e);const t=h.next(n);const o=f.next(n);if(r(t.insert,o.insert)){l.retain(n,s.default.diff(t.attributes,o.attributes))}else{l.push(o).delete(n)}break}e-=n}}));return l.chop()}eachLine(t,e="\n"){const i=new o.default(this.ops);let n=new u;let r=0;while(i.hasNext()){if(i.peekType()!=="insert"){return}const s=i.peek();const o=l.default.length(s)-i.peekLength();const a=typeof s.insert==="string"?s.insert.indexOf(e,o)-o:-1;if(a<0){n.push(i.next())}else if(a>0){n.push(i.next(a))}else{if(t(n,i.next(1).attributes||{},r)===false){return}r+=1;n=new u}}if(n.length()>0){t(n,{},r)}}invert(t){const e=new u;this.reduce(((i,n)=>{if(n.insert){e.delete(l.default.length(n))}else if(typeof n.retain==="number"&&n.attributes==null){e.retain(n.retain);return i+n.retain}else if(n.delete||typeof n.retain==="number"){const r=n.delete||n.retain;const o=t.slice(i,i+r);o.forEach((t=>{if(n.delete){e.push(t)}else if(n.retain&&n.attributes){e.retain(l.default.length(t),s.default.invert(n.attributes,t.attributes))}}));return i+r}else if(typeof n.retain==="object"&&n.retain!==null){const r=t.slice(i,i+1);const l=new o.default(r.ops).next();const[a,h,f]=c(n.retain,l.insert);const d=u.getHandler(a);e.retain({[a]:d.invert(h,f)},s.default.invert(n.attributes,l.attributes));return i+1}return i}),0);return e.chop()}transform(t,e=false){e=!!e;if(typeof t==="number"){return this.transformPosition(t,e)}const i=t;const n=new o.default(this.ops);const r=new o.default(i.ops);const a=new u;while(n.hasNext()||r.hasNext()){if(n.peekType()==="insert"&&(e||r.peekType()!=="insert")){a.retain(l.default.length(n.next()))}else if(r.peekType()==="insert"){a.push(r.next())}else{const t=Math.min(n.peekLength(),r.peekLength());const i=n.next(t);const l=r.next(t);if(i.delete){continue}else if(l.delete){a.push(l)}else{const n=i.retain;const r=l.retain;let o=typeof r==="object"&&r!==null?r:t;if(typeof n==="object"&&n!==null&&typeof r==="object"&&r!==null){const t=Object.keys(n)[0];if(t===Object.keys(r)[0]){const i=u.getHandler(t);if(i){o={[t]:i.transform(n[t],r[t],e)}}}}a.retain(o,s.default.transform(i.attributes,l.attributes,e))}}}return a.chop()}transformPosition(t,e=false){e=!!e;const i=new o.default(this.ops);let n=0;while(i.hasNext()&&n<=t){const r=i.peekLength();const s=i.peekType();i.next();if(s==="delete"){t-=Math.min(r,t-n);continue}else if(s==="insert"&&(n<t||!e)){t+=r}n+=r}return t}}u.Op=l.default;u.OpIterator=o.default;u.AttributeMap=s.default;u.handlers={};e.default=u;{t.exports=u;t.exports.default=u}})(Yl,Yl.exports);const Ro=Ql(Yl.exports);class Io extends Il{static value(){return undefined}optimize(){if(this.prev||this.next){this.remove()}}length(){return 0}value(){return""}}Io.blotName="break";Io.tagName="BR";class Ho extends Kl{}const Vo={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Do(t){return t.replace(/[&<>"']/g,(t=>Vo[t]))}class Fo extends Nl{static allowedChildren=[Fo,Io,Il,Ho];static order=["cursor","inline","link","underline","strike","italic","bold","script","code"];static compare(t,e){const i=Fo.order.indexOf(t);const n=Fo.order.indexOf(e);if(i>=0||n>=0){return i-n}if(t===e){return 0}if(t<e){return-1}return 1}formatAt(t,e,i,n){if(Fo.compare(this.statics.blotName,i)<0&&this.scroll.query(i,sl.BLOT)){const r=this.isolate(t,e);if(n){r.wrap(i,n)}}else{super.formatAt(t,e,i,n)}}optimize(t){super.optimize(t);if(this.parent instanceof Fo&&Fo.compare(this.statics.blotName,this.parent.statics.blotName)>0){const t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t);t.wrap(this)}}}const Po=1;class Uo extends zl{cache={};delta(){if(this.cache.delta==null){this.cache.delta=Ko(this)}return this.cache.delta}deleteAt(t,e){super.deleteAt(t,e);this.cache={}}formatAt(t,e,i,n){if(e<=0)return;if(this.scroll.query(i,sl.BLOCK)){if(t+e===this.length()){this.format(i,n)}}else{super.formatAt(t,Math.min(e,this.length()-t-1),i,n)}this.cache={}}insertAt(t,e,i){if(i!=null){super.insertAt(t,e,i);this.cache={};return}if(e.length===0)return;const n=e.split("\n");const r=n.shift();if(r.length>0){if(t<this.length()-1||this.children.tail==null){super.insertAt(Math.min(t,this.length()-1),r)}else{this.children.tail.insertAt(this.children.tail.length(),r)}this.cache={}}let s=this;n.reduce(((t,e)=>{s=s.split(t,true);s.insertAt(0,e);return e.length}),t+r.length)}insertBefore(t,e){const{head:i}=this.children;super.insertBefore(t,e);if(i instanceof Io){i.remove()}this.cache={}}length(){if(this.cache.length==null){this.cache.length=super.length()+Po}return this.cache.length}moveChildren(t,e){super.moveChildren(t,e);this.cache={}}optimize(t){super.optimize(t);this.cache={}}path(t){return super.path(t,true)}removeChild(t){super.removeChild(t);this.cache={}}split(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;if(e&&(t===0||t>=this.length()-Po)){const e=this.clone();if(t===0){this.parent.insertBefore(e,this);return this}this.parent.insertBefore(e,this.next);return e}const i=super.split(t,e);this.cache={};return i}}Uo.blotName="block";Uo.tagName="P";Uo.defaultChild=Io;Uo.allowedChildren=[Io,Fo,Il,Ho];class Zo extends Il{attach(){super.attach();this.attributes=new vl(this.domNode)}delta(){return(new Ro).insert(this.value(),{...this.formats(),...this.attributes.values()})}format(t,e){const i=this.scroll.query(t,sl.BLOCK_ATTRIBUTE);if(i!=null){this.attributes.attribute(i,e)}}formatAt(t,e,i,n){this.format(i,n)}insertAt(t,e,i){if(i!=null){super.insertAt(t,e,i);return}const n=e.split("\n");const r=n.pop();const s=n.map((t=>{const e=this.scroll.create(Uo.blotName);e.insertAt(0,t);return e}));const l=this.split(t);s.forEach((t=>{this.parent.insertBefore(t,l)}));if(r){this.parent.insertBefore(this.scroll.create("text",r),l)}}}Zo.scope=sl.BLOCK_BLOT;function Ko(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;return t.descendants(kl).reduce(((t,i)=>{if(i.length()===0){return t}return t.insert(i.value(),Wo(i,{},e))}),new Ro).insert("\n",Wo(t))}function Wo(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};let i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:true;if(t==null)return e;if("formats"in t&&typeof t.formats==="function"){e={...e,...t.formats()};if(i){delete e["code-token"]}}if(t.parent==null||t.parent.statics.blotName==="scroll"||t.parent.statics.scope!==t.statics.scope){return e}return Wo(t.parent,e,i)}class Go extends Il{static blotName="cursor";static className="ql-cursor";static tagName="span";static CONTENTS="\ufeff";static value(){return undefined}constructor(t,e,i){super(t,e);this.selection=i;this.textNode=document.createTextNode(Go.CONTENTS);this.domNode.appendChild(this.textNode);this.savedLength=0}detach(){if(this.parent!=null)this.parent.removeChild(this)}format(t,e){if(this.savedLength!==0){super.format(t,e);return}let i=this;let n=0;while(i!=null&&i.statics.scope!==sl.BLOCK_BLOT){n+=i.offset(i.parent);i=i.parent}if(i!=null){this.savedLength=Go.CONTENTS.length;i.optimize();i.formatAt(n,Go.CONTENTS.length,t,e);this.savedLength=0}}index(t,e){if(t===this.textNode)return 0;return super.index(t,e)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove();this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;const t=this.selection.getNativeRange();while(this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode){this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode)}const e=this.prev instanceof Ho?this.prev:null;const i=e?e.length():0;const n=this.next instanceof Ho?this.next:null;const r=n?n.text:"";const{textNode:s}=this;const l=s.data.split(Go.CONTENTS).join("");s.data=Go.CONTENTS;let o;if(e){o=e;if(l||n){e.insertAt(e.length(),l+r);if(n){n.remove()}}}else if(n){o=n;n.insertAt(0,l)}else{const t=document.createTextNode(l);o=this.scroll.create(t);this.parent.insertBefore(o,this)}this.remove();if(t){const r=(t,r)=>{if(e&&t===e.domNode){return r}if(t===s){return i+r-1}if(n&&t===n.domNode){return i+l.length+r}return null};const a=r(t.start.node,t.start.offset);const c=r(t.end.node,t.end.offset);if(a!==null&&c!==null){return{startNode:o.domNode,startOffset:a,endNode:o.domNode,endOffset:c}}}return null}update(t,e){if(t.some((t=>t.type==="characterData"&&t.target===this.textNode))){const t=this.restore();if(t)e.range=t}}optimize(t){super.optimize(t);let{parent:e}=this;while(e){if(e.domNode.tagName==="A"){this.savedLength=Go.CONTENTS.length;e.isolate(this.offset(e),this.length()).unwrap();this.savedLength=0;break}e=e.parent}}value(){return""}}var Qo={exports:{}};(function(t){var e=Object.prototype.hasOwnProperty,i="~";function n(){}if(Object.create){n.prototype=Object.create(null);if(!(new n).__proto__)i=false}function r(t,e,i){this.fn=t;this.context=e;this.once=i||false}function s(t,e,n,s,l){if(typeof n!=="function"){throw new TypeError("The listener must be a function")}var o=new r(n,s||t,l),a=i?i+e:e;if(!t._events[a])t._events[a]=o,t._eventsCount++;else if(!t._events[a].fn)t._events[a].push(o);else t._events[a]=[t._events[a],o];return t}function l(t,e){if(--t._eventsCount===0)t._events=new n;else delete t._events[e]}function o(){this._events=new n;this._eventsCount=0}o.prototype.eventNames=function t(){var n=[],r,s;if(this._eventsCount===0)return n;for(s in r=this._events){if(e.call(r,s))n.push(i?s.slice(1):s)}if(Object.getOwnPropertySymbols){return n.concat(Object.getOwnPropertySymbols(r))}return n};o.prototype.listeners=function t(e){var n=i?i+e:e,r=this._events[n];if(!r)return[];if(r.fn)return[r.fn];for(var s=0,l=r.length,o=new Array(l);s<l;s++){o[s]=r[s].fn}return o};o.prototype.listenerCount=function t(e){var n=i?i+e:e,r=this._events[n];if(!r)return 0;if(r.fn)return 1;return r.length};o.prototype.emit=function t(e,n,r,s,l,o){var a=i?i+e:e;if(!this._events[a])return false;var c=this._events[a],u=arguments.length,h,f;if(c.fn){if(c.once)this.removeListener(e,c.fn,undefined,true);switch(u){case 1:return c.fn.call(c.context),true;case 2:return c.fn.call(c.context,n),true;case 3:return c.fn.call(c.context,n,r),true;case 4:return c.fn.call(c.context,n,r,s),true;case 5:return c.fn.call(c.context,n,r,s,l),true;case 6:return c.fn.call(c.context,n,r,s,l,o),true}for(f=1,h=new Array(u-1);f<u;f++){h[f-1]=arguments[f]}c.fn.apply(c.context,h)}else{var d=c.length,p;for(f=0;f<d;f++){if(c[f].once)this.removeListener(e,c[f].fn,undefined,true);switch(u){case 1:c[f].fn.call(c[f].context);break;case 2:c[f].fn.call(c[f].context,n);break;case 3:c[f].fn.call(c[f].context,n,r);break;case 4:c[f].fn.call(c[f].context,n,r,s);break;default:if(!h)for(p=1,h=new Array(u-1);p<u;p++){h[p-1]=arguments[p]}c[f].fn.apply(c[f].context,h)}}}return true};o.prototype.on=function t(e,i,n){return s(this,e,i,n,false)};o.prototype.once=function t(e,i,n){return s(this,e,i,n,true)};o.prototype.removeListener=function t(e,n,r,s){var o=i?i+e:e;if(!this._events[o])return this;if(!n){l(this,o);return this}var a=this._events[o];if(a.fn){if(a.fn===n&&(!s||a.once)&&(!r||a.context===r)){l(this,o)}}else{for(var c=0,u=[],h=a.length;c<h;c++){if(a[c].fn!==n||s&&!a[c].once||r&&a[c].context!==r){u.push(a[c])}}if(u.length)this._events[o]=u.length===1?u[0]:u;else l(this,o)}return this};o.prototype.removeAllListeners=function t(e){var r;if(e){r=i?i+e:e;if(this._events[r])l(this,r)}else{this._events=new n;this._eventsCount=0}return this};o.prototype.off=o.prototype.removeListener;o.prototype.addListener=o.prototype.on;o.prefixed=i;o.EventEmitter=o;{t.exports=o}})(Qo);const Yo=new WeakMap;const Jo=["error","warn","log","info"];let Xo="warn";function ta(t){if(Xo){if(Jo.indexOf(t)<=Jo.indexOf(Xo)){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++){i[n-1]=arguments[n]}console[t](...i)}}}function ea(t){return Jo.reduce(((e,i)=>{e[i]=ta.bind(console,i,t);return e}),{})}ea.level=t=>{Xo=t};ta.level=ea.level;const ia=ea("quill:events");const na=["selectionchange","mousedown","mouseup","click"];na.forEach((t=>{document.addEventListener(t,(function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++){e[i]=arguments[i]}Array.from(document.querySelectorAll(".ql-container")).forEach((t=>{const i=Yo.get(t);if(i&&i.emitter){i.emitter.handleDOM(...e)}}))}))}));class ra extends Qo.exports.EventEmitter{static events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"};static sources={API:"api",SILENT:"silent",USER:"user"};constructor(){super();this.domListeners={};this.on("error",ia.error)}emit(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++){e[i]=arguments[i]}ia.log.call(ia,...e);return super.emit(...e)}handleDOM(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++){i[n-1]=arguments[n]}(this.domListeners[t.type]||[]).forEach((e=>{let{node:n,handler:r}=e;if(t.target===n||n.contains(t.target)){r(t,...i)}}))}listenDOM(t,e,i){if(!this.domListeners[t]){this.domListeners[t]=[]}this.domListeners[t].push({node:e,handler:i})}}const sa=ea("quill:selection");class la{constructor(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;this.index=t;this.length=e}}class oa{constructor(t,e){this.emitter=e;this.scroll=t;this.composing=false;this.mouseDown=false;this.root=this.scroll.domNode;this.cursor=this.scroll.create("cursor",this);this.savedRange=new la(0,0);this.lastRange=this.savedRange;this.lastNative=null;this.handleComposition();this.handleDragging();this.emitter.listenDOM("selectionchange",document,(()=>{if(!this.mouseDown&&!this.composing){setTimeout(this.update.bind(this,ra.sources.USER),1)}}));this.emitter.on(ra.events.SCROLL_BEFORE_UPDATE,(()=>{if(!this.hasFocus())return;const t=this.getNativeRange();if(t==null)return;if(t.start.node===this.cursor.textNode)return;this.emitter.once(ra.events.SCROLL_UPDATE,((e,i)=>{try{if(this.root.contains(t.start.node)&&this.root.contains(t.end.node)){this.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset)}const n=i.some((t=>t.type==="characterData"||t.type==="childList"||t.type==="attributes"&&t.target===this.root));this.update(n?ra.sources.SILENT:e)}catch(t){}}))}));this.emitter.on(ra.events.SCROLL_OPTIMIZE,((t,e)=>{if(e.range){const{startNode:t,startOffset:i,endNode:n,endOffset:r}=e.range;this.setNativeRange(t,i,n,r);this.update(ra.sources.SILENT)}}));this.update(ra.sources.SILENT)}handleComposition(){this.emitter.on(ra.events.COMPOSITION_BEFORE_START,(()=>{this.composing=true}));this.emitter.on(ra.events.COMPOSITION_END,(()=>{this.composing=false;if(this.cursor.parent){const t=this.cursor.restore();if(!t)return;setTimeout((()=>{this.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)}),1)}}))}handleDragging(){this.emitter.listenDOM("mousedown",document.body,(()=>{this.mouseDown=true}));this.emitter.listenDOM("mouseup",document.body,(()=>{this.mouseDown=false;this.update(ra.sources.USER)}))}focus(){if(this.hasFocus())return;this.root.focus({preventScroll:true});this.setRange(this.savedRange)}format(t,e){this.scroll.update();const i=this.getNativeRange();if(i==null||!i.native.collapsed||this.scroll.query(t,sl.BLOCK))return;if(i.start.node!==this.cursor.textNode){const t=this.scroll.find(i.start.node,false);if(t==null)return;if(t instanceof kl){const e=t.split(i.start.offset);t.parent.insertBefore(this.cursor,e)}else{t.insertBefore(this.cursor,i.start.node)}this.cursor.attach()}this.cursor.format(t,e);this.scroll.optimize();this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length);this.update()}getBounds(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;const i=this.scroll.length();t=Math.min(t,i-1);e=Math.min(t+e,i-1)-t;let n;let[r,s]=this.scroll.leaf(t);if(r==null)return null;if(e>0&&s===r.length()){const[e]=this.scroll.leaf(t+1);if(e){const[i]=this.scroll.line(t);const[n]=this.scroll.line(t+1);if(i===n){r=e;s=0}}}[n,s]=r.position(s,true);const l=document.createRange();if(e>0){l.setStart(n,s);[r,s]=this.scroll.leaf(t+e);if(r==null)return null;[n,s]=r.position(s,true);l.setEnd(n,s);return l.getBoundingClientRect()}let o="left";let a;if(n instanceof Text){if(!n.data.length){return null}if(s<n.data.length){l.setStart(n,s);l.setEnd(n,s+1)}else{l.setStart(n,s-1);l.setEnd(n,s);o="right"}a=l.getBoundingClientRect()}else{if(!(r.domNode instanceof Element))return null;a=r.domNode.getBoundingClientRect();if(s>0)o="right"}return{bottom:a.top+a.height,height:a.height,left:a[o],right:a[o],top:a.top,width:0}}getNativeRange(){const t=document.getSelection();if(t==null||t.rangeCount<=0)return null;const e=t.getRangeAt(0);if(e==null)return null;const i=this.normalizeNative(e);sa.info("getNativeRange",i);return i}getRange(){const t=this.scroll.domNode;if("isConnected"in t&&!t.isConnected){return[null,null]}const e=this.getNativeRange();if(e==null)return[null,null];const i=this.normalizedToRange(e);return[i,e]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&aa(this.root,document.activeElement)}normalizedToRange(t){const e=[[t.start.node,t.start.offset]];if(!t.native.collapsed){e.push([t.end.node,t.end.offset])}const i=e.map((t=>{const[e,i]=t;const n=this.scroll.find(e,true);const r=n.offset(this.scroll);if(i===0){return r}if(n instanceof kl){return r+n.index(e,i)}return r+n.length()}));const n=Math.min(Math.max(...i),this.scroll.length()-1);const r=Math.min(n,...i);return new la(r,n-r)}normalizeNative(t){if(!aa(this.root,t.startContainer)||!t.collapsed&&!aa(this.root,t.endContainer)){return null}const e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};[e.start,e.end].forEach((t=>{let{node:e,offset:i}=t;while(!(e instanceof Text)&&e.childNodes.length>0){if(e.childNodes.length>i){e=e.childNodes[i];i=0}else if(e.childNodes.length===i){e=e.lastChild;if(e instanceof Text){i=e.data.length}else if(e.childNodes.length>0){i=e.childNodes.length}else{i=e.childNodes.length+1}}else{break}}t.node=e;t.offset=i}));return e}rangeToNative(t){const e=this.scroll.length();const i=(t,i)=>{t=Math.min(e-1,t);const[n,r]=this.scroll.leaf(t);return n?n.position(r,i):[null,-1]};return[...i(t.index,false),...i(t.index+t.length,true)]}setNativeRange(t,e){let i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:t;let n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:e;let r=arguments.length>4&&arguments[4]!==undefined?arguments[4]:false;sa.info("setNativeRange",t,e,i,n);if(t!=null&&(this.root.parentNode==null||t.parentNode==null||i.parentNode==null)){return}const s=document.getSelection();if(s==null)return;if(t!=null){if(!this.hasFocus())this.root.focus({preventScroll:true});const{native:l}=this.getNativeRange()||{};if(l==null||r||t!==l.startContainer||e!==l.startOffset||i!==l.endContainer||n!==l.endOffset){if(t instanceof Element&&t.tagName==="BR"){e=Array.from(t.parentNode.childNodes).indexOf(t);t=t.parentNode}if(i instanceof Element&&i.tagName==="BR"){n=Array.from(i.parentNode.childNodes).indexOf(i);i=i.parentNode}const r=document.createRange();r.setStart(t,e);r.setEnd(i,n);s.removeAllRanges();s.addRange(r)}}else{s.removeAllRanges();this.root.blur()}}setRange(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;let i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:ra.sources.API;if(typeof e==="string"){i=e;e=false}sa.info("setRange",t);if(t!=null){const i=this.rangeToNative(t);this.setNativeRange(...i,e)}else{this.setNativeRange(null)}this.update(i)}update(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:ra.sources.USER;const e=this.lastRange;const[i,n]=this.getRange();this.lastRange=i;this.lastNative=n;if(this.lastRange!=null){this.savedRange=this.lastRange}if(!il(e,this.lastRange)){if(!this.composing&&n!=null&&n.native.collapsed&&n.start.node!==this.cursor.textNode){const t=this.cursor.restore();if(t){this.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)}}const i=[ra.events.SELECTION_CHANGE,os(this.lastRange),os(e),t];this.emitter.emit(ra.events.EDITOR_CHANGE,...i);if(t!==ra.sources.SILENT){this.emitter.emit(...i)}}}}function aa(t,e){return t.contains(e)}const ca=/^[ -~]*$/;class ua{constructor(t){this.scroll=t;this.delta=this.getDelta()}applyDelta(t){this.scroll.update();let e=this.scroll.length();this.scroll.batchStart();const i=ba(t);const n=new Ro;const r=va(i.ops.slice());r.reduce(((t,i)=>{const r=Yl.exports.Op.length(i);let s=i.attributes||{};let l=false;let o=false;if(i.insert!=null){n.retain(r);if(typeof i.insert==="string"){const n=i.insert;o=!n.endsWith("\n")&&(e<=t||!!this.scroll.descendant(Zo,t)[0]);this.scroll.insertAt(t,n);const[r,l]=this.scroll.line(t);let a=rl({},Wo(r));if(r instanceof Uo){const[t]=r.descendant(kl,l);if(t){a=rl(a,Wo(t))}}s=Yl.exports.AttributeMap.diff(a,s)||{}}else if(typeof i.insert==="object"){const n=Object.keys(i.insert)[0];if(n==null)return t;const r=this.scroll.query(n,sl.INLINE)!=null;if(r){if(e<=t||!!this.scroll.descendant(Zo,t)[0]){o=true}}else if(t>0){const[e,i]=this.scroll.descendant(kl,t-1);if(e instanceof Ho){const t=e.value();if(t[i]!=="\n"){l=true}}else if(e instanceof Il&&e.statics.scope===sl.INLINE_BLOT){l=true}}this.scroll.insertAt(t,n,i.insert[n]);if(r){const[e]=this.scroll.descendant(kl,t);if(e){const t=rl({},Wo(e));s=Yl.exports.AttributeMap.diff(t,s)||{}}}}e+=r}else{n.push(i);if(i.retain!==null&&typeof i.retain==="object"){const e=Object.keys(i.retain)[0];if(e==null)return t;this.scroll.updateEmbedAt(t,e,i.retain[e])}}Object.keys(s).forEach((e=>{this.scroll.formatAt(t,r,e,s[e])}));const a=l?1:0;const c=o?1:0;e+=a+c;n.retain(a);n.delete(c);return t+r+a+c}),0);n.reduce(((t,e)=>{if(typeof e.delete==="number"){this.scroll.deleteAt(t,e.delete);return t}return t+Yl.exports.Op.length(e)}),0);this.scroll.batchEnd();this.scroll.optimize();return this.update(i)}deleteText(t,e){this.scroll.deleteAt(t,e);return this.update((new Ro).retain(t).delete(e))}formatLine(t,e){let i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};this.scroll.update();Object.keys(i).forEach((n=>{this.scroll.lines(t,Math.max(e,1)).forEach((t=>{t.format(n,i[n])}))}));this.scroll.optimize();const n=(new Ro).retain(t).retain(e,os(i));return this.update(n)}formatText(t,e){let i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};Object.keys(i).forEach((n=>{this.scroll.formatAt(t,e,n,i[n])}));const n=(new Ro).retain(t).retain(e,os(i));return this.update(n)}getContents(t,e){return this.delta.slice(t,t+e)}getDelta(){return this.scroll.lines().reduce(((t,e)=>t.concat(e.delta())),new Ro)}getFormat(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;let i=[];let n=[];if(e===0){this.scroll.path(t).forEach((t=>{const[e]=t;if(e instanceof Uo){i.push(e)}else if(e instanceof kl){n.push(e)}}))}else{i=this.scroll.lines(t,e);n=this.scroll.descendants(kl,t,e)}const[r,s]=[i,n].map((t=>{const e=t.shift();if(e==null)return{};let i=Wo(e);while(Object.keys(i).length>0){const e=t.shift();if(e==null)return i;i=da(Wo(e),i)}return i}));return{...r,...s}}getHTML(t,e){const[i,n]=this.scroll.line(t);if(i){const r=i.length();const s=i.length()>=n+e;if(s&&!(n===0&&e===r)){return fa(i,n,e,true)}return fa(this.scroll,t,e,true)}return""}getText(t,e){return this.getContents(t,e).filter((t=>typeof t.insert==="string")).map((t=>t.insert)).join("")}insertContents(t,e){const i=ba(e);const n=(new Ro).retain(t).concat(i);this.scroll.insertContents(t,i);return this.update(n)}insertEmbed(t,e,i){this.scroll.insertAt(t,e,i);return this.update((new Ro).retain(t).insert({[e]:i}))}insertText(t,e){let i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n");this.scroll.insertAt(t,e);Object.keys(i).forEach((n=>{this.scroll.formatAt(t,e.length,n,i[n])}));return this.update((new Ro).retain(t).insert(e,os(i)))}isBlank(){if(this.scroll.children.length===0)return true;if(this.scroll.children.length>1)return false;const t=this.scroll.children.head;if(t?.statics.blotName!==Uo.blotName)return false;const e=t;if(e.children.length>1)return false;return e.children.head instanceof Io}removeFormat(t,e){const i=this.getText(t,e);const[n,r]=this.scroll.line(t+e);let s=0;let l=new Ro;if(n!=null){s=n.length()-r;l=n.delta().slice(r,r+s-1).insert("\n")}const o=this.getContents(t,e+s);const a=o.diff((new Ro).insert(i).concat(l));const c=(new Ro).retain(t).concat(a);return this.applyDelta(c)}update(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];let i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:undefined;const n=this.delta;if(e.length===1&&e[0].type==="characterData"&&e[0].target.data.match(ca)&&this.scroll.find(e[0].target)){const r=this.scroll.find(e[0].target);const s=Wo(r);const l=r.offset(this.scroll);const o=e[0].oldValue.replace(Go.CONTENTS,"");const a=(new Ro).insert(o);const c=(new Ro).insert(r.value());const u=i&&{oldRange:qa(i.oldRange,-l),newRange:qa(i.newRange,-l)};const h=(new Ro).retain(l).concat(a.diff(c,u));t=h.reduce(((t,e)=>{if(e.insert){return t.insert(e.insert,s)}return t.push(e)}),new Ro);this.delta=n.compose(t)}else{this.delta=this.getDelta();if(!t||!il(n.compose(t),this.delta)){t=n.diff(this.delta,i)}}return t}}function ha(t,e,i){if(t.length===0){const[t]=pa(i.pop());if(e<=0){return`</li></${t}>`}return`</li></${t}>${ha([],e-1,i)}`}const[{child:n,offset:r,length:s,indent:l,type:o},...a]=t;const[c,u]=pa(o);if(l>e){i.push(o);if(l===e+1){return`<${c}><li${u}>${fa(n,r,s)}${ha(a,l,i)}`}return`<${c}><li>${ha(t,e+1,i)}`}const h=i[i.length-1];if(l===e&&o===h){return`</li><li${u}>${fa(n,r,s)}${ha(a,l,i)}`}const[f]=pa(i.pop());return`</li></${f}>${ha(t,e-1,i)}`}function fa(t,e,i){let n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:false;if("html"in t&&typeof t.html==="function"){return t.html(e,i)}if(t instanceof Ho){const n=Do(t.value().slice(e,e+i));return n.replaceAll(" ","&nbsp;")}if(t instanceof Ml){if(t.statics.blotName==="list-container"){const n=[];t.children.forEachAt(e,i,((t,e,i)=>{const r="formats"in t&&typeof t.formats==="function"?t.formats():{};n.push({child:t,offset:e,length:i,indent:r.indent||0,type:r.list})}));return ha(n,-1,[])}const r=[];t.children.forEachAt(e,i,((t,e,i)=>{r.push(fa(t,e,i))}));if(n||t.statics.blotName==="list"){return r.join("")}const{outerHTML:s,innerHTML:l}=t.domNode;const[o,a]=s.split(`>${l}<`);if(o==="<table"){return`<table style="border: 1px solid #000;">${r.join("")}<${a}`}return`${o}>${r.join("")}<${a}`}return t.domNode instanceof Element?t.domNode.outerHTML:""}function da(t,e){return Object.keys(e).reduce(((i,n)=>{if(t[n]==null)return i;const r=e[n];if(r===t[n]){i[n]=r}else if(Array.isArray(r)){if(r.indexOf(t[n])<0){i[n]=r.concat([t[n]])}else{i[n]=r}}else{i[n]=[r,t[n]]}return i}),{})}function pa(t){const e=t==="ordered"?"ol":"ul";switch(t){case"checked":return[e,' data-list="checked"'];case"unchecked":return[e,' data-list="unchecked"'];default:return[e,""]}}function ba(t){return t.reduce(((t,e)=>{if(typeof e.insert==="string"){const i=e.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return t.insert(i,e.attributes)}return t.push(e)}),new Ro)}function qa(t,e){let{index:i,length:n}=t;return new la(i+e,n)}function va(t){const e=[];t.forEach((t=>{if(typeof t.insert==="string"){const i=t.insert.split("\n");i.forEach(((i,n)=>{if(n)e.push({insert:"\n",attributes:t.attributes});if(i)e.push({insert:i,attributes:t.attributes})}))}else{e.push(t)}}));return e}class ma{static DEFAULTS={};constructor(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this.quill=t;this.options=e}}const ga="\ufeff";class wa extends Il{constructor(t,e){super(t,e);this.contentNode=document.createElement("span");this.contentNode.setAttribute("contenteditable","false");Array.from(this.domNode.childNodes).forEach((t=>{this.contentNode.appendChild(t)}));this.leftGuard=document.createTextNode(ga);this.rightGuard=document.createTextNode(ga);this.domNode.appendChild(this.leftGuard);this.domNode.appendChild(this.contentNode);this.domNode.appendChild(this.rightGuard)}index(t,e){if(t===this.leftGuard)return 0;if(t===this.rightGuard)return 1;return super.index(t,e)}restore(t){let e=null;let i;const n=t.data.split(ga).join("");if(t===this.leftGuard){if(this.prev instanceof Ho){const t=this.prev.length();this.prev.insertAt(t,n);e={startNode:this.prev.domNode,startOffset:t+n.length}}else{i=document.createTextNode(n);this.parent.insertBefore(this.scroll.create(i),this);e={startNode:i,startOffset:n.length}}}else if(t===this.rightGuard){if(this.next instanceof Ho){this.next.insertAt(0,n);e={startNode:this.next.domNode,startOffset:n.length}}else{i=document.createTextNode(n);this.parent.insertBefore(this.scroll.create(i),this.next);e={startNode:i,startOffset:n.length}}}t.data=ga;return e}update(t,e){t.forEach((t=>{if(t.type==="characterData"&&(t.target===this.leftGuard||t.target===this.rightGuard)){const i=this.restore(t.target);if(i)e.range=i}}))}}class ya{isComposing=false;constructor(t,e){this.scroll=t;this.emitter=e;this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",(t=>{if(!this.isComposing){this.handleCompositionStart(t)}}));this.scroll.domNode.addEventListener("compositionend",(t=>{if(this.isComposing){queueMicrotask((()=>{this.handleCompositionEnd(t)}))}}))}handleCompositionStart(t){const e=t.target instanceof Node?this.scroll.find(t.target,true):null;if(e&&!(e instanceof wa)){this.emitter.emit(ra.events.COMPOSITION_BEFORE_START,t);this.scroll.batchStart();this.emitter.emit(ra.events.COMPOSITION_START,t);this.isComposing=true}}handleCompositionEnd(t){this.emitter.emit(ra.events.COMPOSITION_BEFORE_END,t);this.scroll.batchEnd();this.emitter.emit(ra.events.COMPOSITION_END,t);this.isComposing=false}}class ka{static DEFAULTS={modules:{}};static themes={default:ka};modules={};constructor(t,e){this.quill=t;this.options=e}init(){Object.keys(this.options.modules).forEach((t=>{if(this.modules[t]==null){this.addModule(t)}}))}addModule(t){const e=this.quill.constructor.import(`modules/${t}`);this.modules[t]=new e(this.quill,this.options.modules[t]||{});return this.modules[t]}}const xa=t=>t.parentElement||t.getRootNode().host||null;const ja=t=>{const e=t.getBoundingClientRect();const i="offsetWidth"in t&&Math.abs(e.width)/t.offsetWidth||1;const n="offsetHeight"in t&&Math.abs(e.height)/t.offsetHeight||1;return{top:e.top,right:e.left+t.clientWidth*i,bottom:e.top+t.clientHeight*n,left:e.left}};const Aa=t=>{const e=parseInt(t,10);return Number.isNaN(e)?0:e};const Oa=(t,e,i,n,r,s)=>{if(t<i&&e>n){return 0}if(t<i){return-(i-t+r)}if(e>n){return e-t>n-i?t+r-i:e-n+s}return 0};const Ma=(t,e)=>{const i=t.ownerDocument;let n=e;let r=t;while(r){const t=r===i.body;const e=t?{top:0,right:window.visualViewport?.width??i.documentElement.clientWidth,bottom:window.visualViewport?.height??i.documentElement.clientHeight,left:0}:ja(r);const s=getComputedStyle(r);const l=Oa(n.left,n.right,e.left,e.right,Aa(s.scrollPaddingLeft),Aa(s.scrollPaddingRight));const o=Oa(n.top,n.bottom,e.top,e.bottom,Aa(s.scrollPaddingTop),Aa(s.scrollPaddingBottom));if(l||o){if(t){i.defaultView?.scrollBy(l,o)}else{const{scrollLeft:t,scrollTop:e}=r;if(o){r.scrollTop+=o}if(l){r.scrollLeft+=l}const i=r.scrollLeft-t;const s=r.scrollTop-e;n={left:n.left-i,top:n.top-s,right:n.right-i,bottom:n.bottom-s}}}r=t||s.position==="fixed"?null:xa(r)}};const Ea=100;const Ta=["block","break","cursor","inline","scroll","text"];const _a=(t,e,i)=>{const n=new cl;Ta.forEach((t=>{const i=e.query(t);if(i)n.register(i)}));t.forEach((t=>{let r=e.query(t);if(!r){i.error(`Cannot register "${t}" specified in "formats" config. Are you sure it was registered?`)}let s=0;while(r){n.register(r);r="blotName"in r?r.requiredContainer??null:null;s+=1;if(s>Ea){i.error(`Cycle detected in registering blot requiredContainer: "${t}"`);break}}}));return n};const Na=ea("quill");const $a=new cl;Ml.uiClass="ql-ui";class La{static DEFAULTS={bounds:null,modules:{clipboard:true,keyboard:true,history:true,uploader:true},placeholder:"",readOnly:false,registry:$a,theme:"default"};static events=ra.events;static sources=ra.sources;static version="2.0.3";static imports={delta:Ro,parchment:Wl,"core/module":ma,"core/theme":ka};static debug(t){if(t===true){t="log"}ea.level(t)}static find(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;return Yo.get(t)||$a.find(t,e)}static import(t){if(this.imports[t]==null){Na.error(`Cannot import ${t}. Are you sure it was registered?`)}return this.imports[t]}static register(){if(typeof(arguments.length<=0?undefined:arguments[0])!=="string"){const t=arguments.length<=0?undefined:arguments[0];const e=!!(arguments.length<=1?undefined:arguments[1]);const i="attrName"in t?t.attrName:t.blotName;if(typeof i==="string"){this.register(`formats/${i}`,t,e)}else{Object.keys(t).forEach((i=>{this.register(i,t[i],e)}))}}else{const t=arguments.length<=0?undefined:arguments[0];const e=arguments.length<=1?undefined:arguments[1];const i=!!(arguments.length<=2?undefined:arguments[2]);if(this.imports[t]!=null&&!i){Na.warn(`Overwriting ${t} with`,e)}this.imports[t]=e;if((t.startsWith("blots/")||t.startsWith("formats/"))&&e&&typeof e!=="boolean"&&e.blotName!=="abstract"){$a.register(e)}if(typeof e.register==="function"){e.register($a)}}}constructor(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this.options=Ba(t,e);this.container=this.options.container;if(this.container==null){Na.error("Invalid Quill container",t);return}if(this.options.debug){La.debug(this.options.debug)}const i=this.container.innerHTML.trim();this.container.classList.add("ql-container");this.container.innerHTML="";Yo.set(this.container,this);this.root=this.addContainer("ql-editor");this.root.classList.add("ql-blank");this.emitter=new ra;const n=Pl.blotName;const r=this.options.registry.query(n);if(!r||!("blotName"in r)){throw new Error(`Cannot initialize Quill without "${n}" blot`)}this.scroll=new r(this.options.registry,this.root,{emitter:this.emitter});this.editor=new ua(this.scroll);this.selection=new oa(this.scroll,this.emitter);this.composition=new ya(this.scroll,this.emitter);this.theme=new this.options.theme(this,this.options);this.keyboard=this.theme.addModule("keyboard");this.clipboard=this.theme.addModule("clipboard");this.history=this.theme.addModule("history");this.uploader=this.theme.addModule("uploader");this.theme.addModule("input");this.theme.addModule("uiNode");this.theme.init();this.emitter.on(ra.events.EDITOR_CHANGE,(t=>{if(t===ra.events.TEXT_CHANGE){this.root.classList.toggle("ql-blank",this.editor.isBlank())}}));this.emitter.on(ra.events.SCROLL_UPDATE,((t,e)=>{const i=this.selection.lastRange;const[n]=this.selection.getRange();const r=i&&n?{oldRange:i,newRange:n}:undefined;Ra.call(this,(()=>this.editor.update(null,e,r)),t)}));this.emitter.on(ra.events.SCROLL_EMBED_UPDATE,((t,e)=>{const i=this.selection.lastRange;const[n]=this.selection.getRange();const r=i&&n?{oldRange:i,newRange:n}:undefined;Ra.call(this,(()=>{const i=(new Ro).retain(t.offset(this)).retain({[t.statics.blotName]:e});return this.editor.update(i,[],r)}),La.sources.USER)}));if(i){const t=this.clipboard.convert({html:`${i}<p><br></p>`,text:"\n"});this.setContents(t)}this.history.clear();if(this.options.placeholder){this.root.setAttribute("data-placeholder",this.options.placeholder)}if(this.options.readOnly){this.disable()}this.allowReadOnlyEdits=false}addContainer(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;if(typeof t==="string"){const e=t;t=document.createElement("div");t.classList.add(e)}this.container.insertBefore(t,e);return t}blur(){this.selection.setRange(null)}deleteText(t,e,i){[t,e,,i]=Ia(t,e,i);return Ra.call(this,(()=>this.editor.deleteText(t,e)),i,t,-1*e)}disable(){this.enable(false)}editReadOnly(t){this.allowReadOnlyEdits=true;const e=t();this.allowReadOnlyEdits=false;return e}enable(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;this.scroll.enable(t);this.container.classList.toggle("ql-disabled",!t)}focus(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};this.selection.focus();if(!t.preventScroll){this.scrollSelectionIntoView()}}format(t,e){let i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:ra.sources.API;return Ra.call(this,(()=>{const i=this.getSelection(true);let n=new Ro;if(i==null)return n;if(this.scroll.query(t,sl.BLOCK)){n=this.editor.formatLine(i.index,i.length,{[t]:e})}else if(i.length===0){this.selection.format(t,e);return n}else{n=this.editor.formatText(i.index,i.length,{[t]:e})}this.setSelection(i,ra.sources.SILENT);return n}),i)}formatLine(t,e,i,n,r){let s;[t,e,s,r]=Ia(t,e,i,n,r);return Ra.call(this,(()=>this.editor.formatLine(t,e,s)),r,t,0)}formatText(t,e,i,n,r){let s;[t,e,s,r]=Ia(t,e,i,n,r);return Ra.call(this,(()=>this.editor.formatText(t,e,s)),r,t,0)}getBounds(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;let i=null;if(typeof t==="number"){i=this.selection.getBounds(t,e)}else{i=this.selection.getBounds(t.index,t.length)}if(!i)return null;const n=this.container.getBoundingClientRect();return{bottom:i.bottom-n.top,height:i.height,left:i.left-n.left,right:i.right-n.left,top:i.top-n.top,width:i.width}}getContents(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.getLength()-t;[t,e]=Ia(t,e);return this.editor.getContents(t,e)}getFormat(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.getSelection(true);let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;if(typeof t==="number"){return this.editor.getFormat(t,e)}return this.editor.getFormat(t.index,t.length)}getIndex(t){return t.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(t){return this.scroll.leaf(t)}getLine(t){return this.scroll.line(t)}getLines(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:Number.MAX_VALUE;if(typeof t!=="number"){return this.scroll.lines(t.index,t.length)}return this.scroll.lines(t,e)}getModule(t){return this.theme.modules[t]}getSelection(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;if(t)this.focus();this.update();return this.selection.getRange()[0]}getSemanticHTML(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;let e=arguments.length>1?arguments[1]:undefined;if(typeof t==="number"){e=e??this.getLength()-t}[t,e]=Ia(t,e);return this.editor.getHTML(t,e)}getText(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;let e=arguments.length>1?arguments[1]:undefined;if(typeof t==="number"){e=e??this.getLength()-t}[t,e]=Ia(t,e);return this.editor.getText(t,e)}hasFocus(){return this.selection.hasFocus()}insertEmbed(t,e,i){let n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:La.sources.API;return Ra.call(this,(()=>this.editor.insertEmbed(t,e,i)),n,t)}insertText(t,e,i,n,r){let s;[t,,s,r]=Ia(t,0,i,n,r);return Ra.call(this,(()=>this.editor.insertText(t,e,s)),r,t,e.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(t,e,i){[t,e,,i]=Ia(t,e,i);return Ra.call(this,(()=>this.editor.removeFormat(t,e)),i,t)}scrollRectIntoView(t){Ma(this.root,t)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead.");this.scrollSelectionIntoView()}scrollSelectionIntoView(){const t=this.selection.lastRange;const e=t&&this.selection.getBounds(t.index,t.length);if(e){this.scrollRectIntoView(e)}}setContents(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:ra.sources.API;return Ra.call(this,(()=>{t=new Ro(t);const e=this.getLength();const i=this.editor.deleteText(0,e);const n=this.editor.insertContents(0,t);const r=this.editor.deleteText(this.getLength()-1,1);return i.compose(n).compose(r)}),e)}setSelection(t,e,i){if(t==null){this.selection.setRange(null,e||La.sources.API)}else{[t,e,,i]=Ia(t,e,i);this.selection.setRange(new la(Math.max(0,t),e),i);if(i!==ra.sources.SILENT){this.scrollSelectionIntoView()}}}setText(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:ra.sources.API;const i=(new Ro).insert(t);return this.setContents(i,e)}update(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:ra.sources.USER;const e=this.scroll.update(t);this.selection.update(t);return e}updateContents(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:ra.sources.API;return Ra.call(this,(()=>{t=new Ro(t);return this.editor.applyDelta(t)}),e,true)}}function za(t){return typeof t==="string"?document.querySelector(t):t}function Sa(t){return Object.entries(t??{}).reduce(((t,e)=>{let[i,n]=e;return{...t,[i]:n===true?{}:n}}),{})}function Ca(t){return Object.fromEntries(Object.entries(t).filter((t=>t[1]!==undefined)))}function Ba(t,e){const i=za(t);if(!i){throw new Error("Invalid Quill container")}const n=!e.theme||e.theme===La.DEFAULTS.theme;const r=n?ka:La.import(`themes/${e.theme}`);if(!r){throw new Error(`Invalid theme ${e.theme}. Did you register it?`)}const{modules:s,...l}=La.DEFAULTS;const{modules:o,...a}=r.DEFAULTS;let c=Sa(e.modules);if(c!=null&&c.toolbar&&c.toolbar.constructor!==Object){c={...c,toolbar:{container:c.toolbar}}}const u=rl({},Sa(s),Sa(o),c);const h={...l,...Ca(a),...Ca(e)};let f=e.registry;if(f){if(e.formats){Na.warn('Ignoring "formats" option because "registry" is specified')}}else{f=e.formats?_a(e.formats,h.registry,Na):h.registry}return{...h,registry:f,container:i,theme:r,modules:Object.entries(u).reduce(((t,e)=>{let[i,n]=e;if(!n)return t;const r=La.import(`modules/${i}`);if(r==null){Na.error(`Cannot load ${i} module. Are you sure you registered it?`);return t}return{...t,[i]:rl({},r.DEFAULTS||{},n)}}),{}),bounds:za(h.bounds)}}function Ra(t,e,i,n){if(!this.isEnabled()&&e===ra.sources.USER&&!this.allowReadOnlyEdits){return new Ro}let r=i==null?null:this.getSelection();const s=this.editor.delta;const l=t();if(r!=null){if(i===true){i=r.index}if(n==null){r=Ha(r,l,e)}else if(n!==0){r=Ha(r,i,n,e)}this.setSelection(r,ra.sources.SILENT)}if(l.length()>0){const t=[ra.events.TEXT_CHANGE,l,s,e];this.emitter.emit(ra.events.EDITOR_CHANGE,...t);if(e!==ra.sources.SILENT){this.emitter.emit(...t)}}return l}function Ia(t,e,i,n,r){let s={};if(typeof t.index==="number"&&typeof t.length==="number"){if(typeof e!=="number"){r=n;n=i;i=e;e=t.length;t=t.index}else{e=t.length;t=t.index}}else if(typeof e!=="number"){r=n;n=i;i=e;e=0}if(typeof i==="object"){s=i;r=n}else if(typeof i==="string"){if(n!=null){s[i]=n}else{r=i}}r=r||ra.sources.API;return[t,e,s,r]}function Ha(t,e,i,n){const r=typeof i==="number"?i:0;if(t==null)return null;let s;let l;if(e&&typeof e.transformPosition==="function"){[s,l]=[t.index,t.index+t.length].map((t=>e.transformPosition(t,n!==ra.sources.USER)))}else{[s,l]=[t.index,t.index+t.length].map((t=>{if(t<e||t===e&&n===ra.sources.USER)return t;if(r>=0){return t+r}return Math.max(e,t+r)}))}return new la(s,l-s)}class Va extends Bl{}function Da(t){return t instanceof Uo||t instanceof Zo}function Fa(t){return typeof t.updateContent==="function"}class Pa extends Pl{static blotName="scroll";static className="ql-editor";static tagName="DIV";static defaultChild=Uo;static allowedChildren=[Uo,Zo,Va];constructor(t,e,i){let{emitter:n}=i;super(t,e);this.emitter=n;this.batch=false;this.optimize();this.enable();this.domNode.addEventListener("dragstart",(t=>this.handleDragStart(t)))}batchStart(){if(!Array.isArray(this.batch)){this.batch=[]}}batchEnd(){if(!this.batch)return;const t=this.batch;this.batch=false;this.update(t)}emitMount(t){this.emitter.emit(ra.events.SCROLL_BLOT_MOUNT,t)}emitUnmount(t){this.emitter.emit(ra.events.SCROLL_BLOT_UNMOUNT,t)}emitEmbedUpdate(t,e){this.emitter.emit(ra.events.SCROLL_EMBED_UPDATE,t,e)}deleteAt(t,e){const[i,n]=this.line(t);const[r]=this.line(t+e);super.deleteAt(t,e);if(r!=null&&i!==r&&n>0){if(i instanceof Zo||r instanceof Zo){this.optimize();return}const t=r.children.head instanceof Io?null:r.children.head;i.moveChildren(r,t);i.remove()}this.optimize()}enable(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;this.domNode.setAttribute("contenteditable",t?"true":"false")}formatAt(t,e,i,n){super.formatAt(t,e,i,n);this.optimize()}insertAt(t,e,i){if(t>=this.length()){if(i==null||this.scroll.query(e,sl.BLOCK)==null){const t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t);if(i==null&&e.endsWith("\n")){t.insertAt(0,e.slice(0,-1),i)}else{t.insertAt(0,e,i)}}else{const t=this.scroll.create(e,i);this.appendChild(t)}}else{super.insertAt(t,e,i)}this.optimize()}insertBefore(t,e){if(t.statics.scope===sl.INLINE_BLOT){const i=this.scroll.create(this.statics.defaultChild.blotName);i.appendChild(t);super.insertBefore(i,e)}else{super.insertBefore(t,e)}}insertContents(t,e){const i=this.deltaToRenderBlocks(e.concat((new Ro).insert("\n")));const n=i.pop();if(n==null)return;this.batchStart();const r=i.shift();if(r){const e=r.type==="block"&&(r.delta.length()===0||!this.descendant(Zo,t)[0]&&t<this.length());const i=r.type==="block"?r.delta:(new Ro).insert({[r.key]:r.value});Ua(this,t,i);const n=r.type==="block"?1:0;const s=t+i.length()+n;if(e){this.insertAt(s-1,"\n")}const l=Wo(this.line(t)[0]);const o=Yl.exports.AttributeMap.diff(l,r.attributes)||{};Object.keys(o).forEach((t=>{this.formatAt(s-1,1,t,o[t])}));t=s}let[s,l]=this.children.find(t);if(i.length){if(s){s=s.split(l);l=0}i.forEach((t=>{if(t.type==="block"){const e=this.createBlock(t.attributes,s||undefined);Ua(e,0,t.delta)}else{const e=this.create(t.key,t.value);this.insertBefore(e,s||undefined);Object.keys(t.attributes).forEach((i=>{e.format(i,t.attributes[i])}))}}))}if(n.type==="block"&&n.delta.length()){const t=s?s.offset(s.scroll)+l:this.length();Ua(this,t,n.delta)}this.batchEnd();this.optimize()}isEnabled(){return this.domNode.getAttribute("contenteditable")==="true"}leaf(t){const e=this.path(t).pop();if(!e){return[null,-1]}const[i,n]=e;return i instanceof kl?[i,n]:[null,-1]}line(t){if(t===this.length()){return this.line(t-1)}return this.descendant(Da,t)}lines(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:Number.MAX_VALUE;const i=(t,e,n)=>{let r=[];let s=n;t.children.forEachAt(e,n,((t,e,n)=>{if(Da(t)){r.push(t)}else if(t instanceof Bl){r=r.concat(i(t,e,s))}s-=n}));return r};return i(this,t,e)}optimize(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(this.batch)return;super.optimize(t,e);if(t.length>0){this.emitter.emit(ra.events.SCROLL_OPTIMIZE,t,e)}}path(t){return super.path(t).slice(1)}remove(){}update(t){if(this.batch){if(Array.isArray(t)){this.batch=this.batch.concat(t)}return}let e=ra.sources.USER;if(typeof t==="string"){e=t}if(!Array.isArray(t)){t=this.observer.takeRecords()}t=t.filter((t=>{let{target:e}=t;const i=this.find(e,true);return i&&!Fa(i)}));if(t.length>0){this.emitter.emit(ra.events.SCROLL_BEFORE_UPDATE,e,t)}super.update(t.concat([]));if(t.length>0){this.emitter.emit(ra.events.SCROLL_UPDATE,e,t)}}updateEmbedAt(t,e,i){const[n]=this.descendant((t=>t instanceof Zo),t);if(n&&n.statics.blotName===e&&Fa(n)){n.updateContent(i)}}handleDragStart(t){t.preventDefault()}deltaToRenderBlocks(t){const e=[];let i=new Ro;t.forEach((t=>{const n=t?.insert;if(!n)return;if(typeof n==="string"){const r=n.split("\n");r.slice(0,-1).forEach((n=>{i.insert(n,t.attributes);e.push({type:"block",delta:i,attributes:t.attributes??{}});i=new Ro}));const s=r[r.length-1];if(s){i.insert(s,t.attributes)}}else{const r=Object.keys(n)[0];if(!r)return;if(this.query(r,sl.INLINE)){i.push(t)}else{if(i.length()){e.push({type:"block",delta:i,attributes:{}})}i=new Ro;e.push({type:"blockEmbed",key:r,value:n[r],attributes:t.attributes??{}})}}}));if(i.length()){e.push({type:"block",delta:i,attributes:{}})}return e}createBlock(t,e){let i;const n={};Object.entries(t).forEach((t=>{let[e,r]=t;const s=this.query(e,sl.BLOCK&sl.BLOT)!=null;if(s){i=e}else{n[e]=r}}));const r=this.create(i||this.statics.defaultChild.blotName,i?t[i]:undefined);this.insertBefore(r,e||undefined);const s=r.length();Object.entries(n).forEach((t=>{let[e,i]=t;r.formatAt(0,s,e,i)}));return r}}function Ua(t,e,i){i.reduce(((e,i)=>{const n=Yl.exports.Op.length(i);let r=i.attributes||{};if(i.insert!=null){if(typeof i.insert==="string"){const n=i.insert;t.insertAt(e,n);const[s]=t.descendant(kl,e);const l=Wo(s);r=Yl.exports.AttributeMap.diff(l,r)||{}}else if(typeof i.insert==="object"){const n=Object.keys(i.insert)[0];if(n==null)return e;t.insertAt(e,n,i.insert[n]);const s=t.scroll.query(n,sl.INLINE)!=null;if(s){const[i]=t.descendant(kl,e);const n=Wo(i);r=Yl.exports.AttributeMap.diff(n,r)||{}}}}Object.keys(r).forEach((i=>{t.formatAt(e,n,i,r[i])}));return e+n}),e)}const Za={scope:sl.BLOCK,whitelist:["right","center","justify"]};const Ka=new ll("align","align",Za);const Wa=new fl("align","ql-align",Za);const Ga=new bl("align","text-align",Za);class Qa extends bl{value(t){let e=super.value(t);if(!e.startsWith("rgb("))return e;e=e.replace(/^[^\d]+/,"").replace(/[^\d]+$/,"");const i=e.split(",").map((t=>`00${parseInt(t,10).toString(16)}`.slice(-2))).join("");return`#${i}`}}const Ya=new fl("color","ql-color",{scope:sl.INLINE});const Ja=new Qa("color","color",{scope:sl.INLINE});const Xa=new fl("background","ql-bg",{scope:sl.INLINE});const tc=new Qa("background","background-color",{scope:sl.INLINE});class ec extends Va{static create(t){const e=super.create(t);e.setAttribute("spellcheck","false");return e}code(t,e){return this.children.map((t=>t.length()<=1?"":t.domNode.innerText)).join("\n").slice(t,t+e)}html(t,e){return`<pre>\n${Do(this.code(t,e))}\n</pre>`}}class ic extends Uo{static TAB=" ";static register(){La.register(ec)}}class nc extends Fo{}nc.blotName="code";nc.tagName="CODE";ic.blotName="code-block";ic.className="ql-code-block";ic.tagName="DIV";ec.blotName="code-block-container";ec.className="ql-code-block-container";ec.tagName="DIV";ec.allowedChildren=[ic];ic.allowedChildren=[Ho,Io,Go];ic.requiredContainer=ec;const rc={scope:sl.BLOCK,whitelist:["rtl"]};const sc=new ll("direction","dir",rc);const lc=new fl("direction","ql-direction",rc);const oc=new bl("direction","direction",rc);const ac={scope:sl.INLINE,whitelist:["serif","monospace"]};const cc=new fl("font","ql-font",ac);class uc extends bl{value(t){return super.value(t).replace(/["']/g,"")}}const hc=new uc("font","font-family",ac);const fc=new fl("size","ql-size",{scope:sl.INLINE,whitelist:["small","large","huge"]});const dc=new bl("size","font-size",{scope:sl.INLINE,whitelist:["10px","18px","32px"]});const pc=ea("quill:keyboard");const bc=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class qc extends ma{static match(t,e){if(["altKey","ctrlKey","metaKey","shiftKey"].some((i=>!!e[i]!==t[i]&&e[i]!==null))){return false}return e.key===t.key||e.key===t.which}constructor(t,e){super(t,e);this.bindings={};Object.keys(this.options.bindings).forEach((t=>{if(this.options.bindings[t]){this.addBinding(this.options.bindings[t])}}));this.addBinding({key:"Enter",shiftKey:null},this.handleEnter);this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},(()=>{}));if(/Firefox/i.test(navigator.userAgent)){this.addBinding({key:"Backspace"},{collapsed:true},this.handleBackspace);this.addBinding({key:"Delete"},{collapsed:true},this.handleDelete)}else{this.addBinding({key:"Backspace"},{collapsed:true,prefix:/^.?$/},this.handleBackspace);this.addBinding({key:"Delete"},{collapsed:true,suffix:/^.?$/},this.handleDelete)}this.addBinding({key:"Backspace"},{collapsed:false},this.handleDeleteRange);this.addBinding({key:"Delete"},{collapsed:false},this.handleDeleteRange);this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:true,offset:0},this.handleBackspace);this.listen()}addBinding(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};let i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};const n=kc(t);if(n==null){pc.warn("Attempted to add invalid keyboard binding",n);return}if(typeof e==="function"){e={handler:e}}if(typeof i==="function"){i={handler:i}}const r=Array.isArray(n.key)?n.key:[n.key];r.forEach((t=>{const r={...n,key:t,...e,...i};this.bindings[r.key]=this.bindings[r.key]||[];this.bindings[r.key].push(r)}))}listen(){this.quill.root.addEventListener("keydown",(t=>{if(t.defaultPrevented||t.isComposing)return;const e=t.keyCode===229&&(t.key==="Enter"||t.key==="Backspace");if(e)return;const i=(this.bindings[t.key]||[]).concat(this.bindings[t.which]||[]);const n=i.filter((e=>qc.match(t,e)));if(n.length===0)return;const r=La.find(t.target,true);if(r&&r.scroll!==this.quill.scroll)return;const s=this.quill.getSelection();if(s==null||!this.quill.hasFocus())return;const[l,o]=this.quill.getLine(s.index);const[a,c]=this.quill.getLeaf(s.index);const[u,h]=s.length===0?[a,c]:this.quill.getLeaf(s.index+s.length);const f=a instanceof Kl?a.value().slice(0,c):"";const d=u instanceof Kl?u.value().slice(h):"";const p={collapsed:s.length===0,empty:s.length===0&&l.length()<=1,format:this.quill.getFormat(s),line:l,offset:o,prefix:f,suffix:d,event:t};const b=n.some((t=>{if(t.collapsed!=null&&t.collapsed!==p.collapsed){return false}if(t.empty!=null&&t.empty!==p.empty){return false}if(t.offset!=null&&t.offset!==p.offset){return false}if(Array.isArray(t.format)){if(t.format.every((t=>p.format[t]==null))){return false}}else if(typeof t.format==="object"){if(!Object.keys(t.format).every((e=>{if(t.format[e]===true)return p.format[e]!=null;if(t.format[e]===false)return p.format[e]==null;return il(t.format[e],p.format[e])}))){return false}}if(t.prefix!=null&&!t.prefix.test(p.prefix)){return false}if(t.suffix!=null&&!t.suffix.test(p.suffix)){return false}return t.handler.call(this,s,p,t)!==true}));if(b){t.preventDefault()}}))}handleBackspace(t,e){const i=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;if(t.index===0||this.quill.getLength()<=1)return;let n={};const[r]=this.quill.getLine(t.index);let s=(new Ro).retain(t.index-i).delete(i);if(e.offset===0){const[e]=this.quill.getLine(t.index-1);if(e){const i=e.statics.blotName==="block"&&e.length()<=1;if(!i){const e=r.formats();const i=this.quill.getFormat(t.index-1,1);n=Yl.exports.AttributeMap.diff(e,i)||{};if(Object.keys(n).length>0){const e=(new Ro).retain(t.index+r.length()-2).retain(1,n);s=s.compose(e)}}}}this.quill.updateContents(s,La.sources.USER);this.quill.focus()}handleDelete(t,e){const i=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(t.index>=this.quill.getLength()-i)return;let n={};const[r]=this.quill.getLine(t.index);let s=(new Ro).retain(t.index).delete(i);if(e.offset>=r.length()-1){const[e]=this.quill.getLine(t.index+1);if(e){const i=r.formats();const l=this.quill.getFormat(t.index,1);n=Yl.exports.AttributeMap.diff(i,l)||{};if(Object.keys(n).length>0){s=s.retain(e.length()-1).retain(1,n)}}}this.quill.updateContents(s,La.sources.USER);this.quill.focus()}handleDeleteRange(t){xc({range:t,quill:this.quill});this.quill.focus()}handleEnter(t,e){const i=Object.keys(e.format).reduce(((t,i)=>{if(this.quill.scroll.query(i,sl.BLOCK)&&!Array.isArray(e.format[i])){t[i]=e.format[i]}return t}),{});const n=(new Ro).retain(t.index).delete(t.length).insert("\n",i);this.quill.updateContents(n,La.sources.USER);this.quill.setSelection(t.index+1,La.sources.SILENT);this.quill.focus()}}const vc={bindings:{bold:wc("bold"),italic:wc("italic"),underline:wc("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(t,e){if(e.collapsed&&e.offset!==0)return true;this.quill.format("indent","+1",La.sources.USER);return false}},outdent:{key:"Tab",shiftKey:true,format:["blockquote","indent","list"],handler(t,e){if(e.collapsed&&e.offset!==0)return true;this.quill.format("indent","-1",La.sources.USER);return false}},"outdent backspace":{key:"Backspace",collapsed:true,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(t,e){if(e.format.indent!=null){this.quill.format("indent","-1",La.sources.USER)}else if(e.format.list!=null){this.quill.format("list",false,La.sources.USER)}}},"indent code-block":mc(true),"outdent code-block":mc(false),"remove tab":{key:"Tab",shiftKey:true,collapsed:true,prefix:/\t$/,handler(t){this.quill.deleteText(t.index-1,1,La.sources.USER)}},tab:{key:"Tab",handler(t,e){if(e.format.table)return true;this.quill.history.cutoff();const i=(new Ro).retain(t.index).delete(t.length).insert("\t");this.quill.updateContents(i,La.sources.USER);this.quill.history.cutoff();this.quill.setSelection(t.index+1,La.sources.SILENT);return false}},"blockquote empty enter":{key:"Enter",collapsed:true,format:["blockquote"],empty:true,handler(){this.quill.format("blockquote",false,La.sources.USER)}},"list empty enter":{key:"Enter",collapsed:true,format:["list"],empty:true,handler(t,e){const i={list:false};if(e.format.indent){i.indent=false}this.quill.formatLine(t.index,t.length,i,La.sources.USER)}},"checklist enter":{key:"Enter",collapsed:true,format:{list:"checked"},handler(t){const[e,i]=this.quill.getLine(t.index);const n={...e.formats(),list:"checked"};const r=(new Ro).retain(t.index).insert("\n",n).retain(e.length()-i-1).retain(1,{list:"unchecked"});this.quill.updateContents(r,La.sources.USER);this.quill.setSelection(t.index+1,La.sources.SILENT);this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:true,format:["header"],suffix:/^$/,handler(t,e){const[i,n]=this.quill.getLine(t.index);const r=(new Ro).retain(t.index).insert("\n",e.format).retain(i.length()-n-1).retain(1,{header:null});this.quill.updateContents(r,La.sources.USER);this.quill.setSelection(t.index+1,La.sources.SILENT);this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:true,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:true,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(t){const e=this.quill.getModule("table");if(e){const[i,n,r,s]=e.getTable(t);const l=jc(i,n,r,s);if(l==null)return;let o=i.offset();if(l<0){const e=(new Ro).retain(o).insert("\n");this.quill.updateContents(e,La.sources.USER);this.quill.setSelection(t.index+1,t.length,La.sources.SILENT)}else if(l>0){o+=i.length();const t=(new Ro).retain(o).insert("\n");this.quill.updateContents(t,La.sources.USER);this.quill.setSelection(o,La.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(t,e){const{event:i,line:n}=e;const r=n.offset(this.quill.scroll);if(i.shiftKey){this.quill.setSelection(r-1,La.sources.USER)}else{this.quill.setSelection(r+n.length(),La.sources.USER)}}},"list autofill":{key:" ",shiftKey:null,collapsed:true,format:{"code-block":false,blockquote:false,table:false},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(t,e){if(this.quill.scroll.query("list")==null)return true;const{length:i}=e.prefix;const[n,r]=this.quill.getLine(t.index);if(r>i)return true;let s;switch(e.prefix.trim()){case"[]":case"[ ]":s="unchecked";break;case"[x]":s="checked";break;case"-":case"*":s="bullet";break;default:s="ordered"}this.quill.insertText(t.index," ",La.sources.USER);this.quill.history.cutoff();const l=(new Ro).retain(t.index-r).delete(i+1).retain(n.length()-2-r).retain(1,{list:s});this.quill.updateContents(l,La.sources.USER);this.quill.history.cutoff();this.quill.setSelection(t.index-i,La.sources.SILENT);return false}},"code exit":{key:"Enter",collapsed:true,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(t){const[e,i]=this.quill.getLine(t.index);let n=2;let r=e;while(r!=null&&r.length()<=1&&r.formats()["code-block"]){r=r.prev;n-=1;if(n<=0){const n=(new Ro).retain(t.index+e.length()-i-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(n,La.sources.USER);this.quill.setSelection(t.index-1,La.sources.SILENT);return false}}return true}},"embed left":gc("ArrowLeft",false),"embed left shift":gc("ArrowLeft",true),"embed right":gc("ArrowRight",false),"embed right shift":gc("ArrowRight",true),"table down":yc(false),"table up":yc(true)}};qc.DEFAULTS=vc;function mc(t){return{key:"Tab",shiftKey:!t,format:{"code-block":true},handler(e,i){let{event:n}=i;const r=this.quill.scroll.query("code-block");const{TAB:s}=r;if(e.length===0&&!n.shiftKey){this.quill.insertText(e.index,s,La.sources.USER);this.quill.setSelection(e.index+s.length,La.sources.SILENT);return}const l=e.length===0?this.quill.getLines(e.index,1):this.quill.getLines(e);let{index:o,length:a}=e;l.forEach(((e,i)=>{if(t){e.insertAt(0,s);if(i===0){o+=s.length}else{a+=s.length}}else if(e.domNode.textContent.startsWith(s)){e.deleteAt(0,s.length);if(i===0){o-=s.length}else{a-=s.length}}}));this.quill.update(La.sources.USER);this.quill.setSelection(o,a,La.sources.SILENT)}}}function gc(t,e){const i=t==="ArrowLeft"?"prefix":"suffix";return{key:t,shiftKey:e,altKey:null,[i]:/^$/,handler(i){let{index:n}=i;if(t==="ArrowRight"){n+=i.length+1}const[r]=this.quill.getLeaf(n);if(!(r instanceof Il))return true;if(t==="ArrowLeft"){if(e){this.quill.setSelection(i.index-1,i.length+1,La.sources.USER)}else{this.quill.setSelection(i.index-1,La.sources.USER)}}else if(e){this.quill.setSelection(i.index,i.length+1,La.sources.USER)}else{this.quill.setSelection(i.index+i.length+1,La.sources.USER)}return false}}}function wc(t){return{key:t[0],shortKey:true,handler(e,i){this.quill.format(t,!i.format[t],La.sources.USER)}}}function yc(t){return{key:t?"ArrowUp":"ArrowDown",collapsed:true,format:["table"],handler(e,i){const n=t?"prev":"next";const r=i.line;const s=r.parent[n];if(s!=null){if(s.statics.blotName==="table-row"){let t=s.children.head;let e=r;while(e.prev!=null){e=e.prev;t=t.next}const n=t.offset(this.quill.scroll)+Math.min(i.offset,t.length()-1);this.quill.setSelection(n,0,La.sources.USER)}}else{const e=r.table()[n];if(e!=null){if(t){this.quill.setSelection(e.offset(this.quill.scroll)+e.length()-1,0,La.sources.USER)}else{this.quill.setSelection(e.offset(this.quill.scroll),0,La.sources.USER)}}}return false}}}function kc(t){if(typeof t==="string"||typeof t==="number"){t={key:t}}else if(typeof t==="object"){t=os(t)}else{return null}if(t.shortKey){t[bc]=t.shortKey;delete t.shortKey}return t}function xc(t){let{quill:e,range:i}=t;const n=e.getLines(i);let r={};if(n.length>1){const t=n[0].formats();const e=n[n.length-1].formats();r=Yl.exports.AttributeMap.diff(e,t)||{}}e.deleteText(i,La.sources.USER);if(Object.keys(r).length>0){e.formatLine(i.index,1,r,La.sources.USER)}e.setSelection(i.index,La.sources.SILENT)}function jc(t,e,i,n){if(e.prev==null&&e.next==null){if(i.prev==null&&i.next==null){return n===0?-1:1}return i.prev==null?-1:1}if(e.prev==null){return-1}if(e.next==null){return 1}return null}const Ac=/font-weight:\s*normal/;const Oc=["P","OL","UL"];const Mc=t=>t&&Oc.includes(t.tagName);const Ec=t=>{Array.from(t.querySelectorAll("br")).filter((t=>Mc(t.previousElementSibling)&&Mc(t.nextElementSibling))).forEach((t=>{t.parentNode?.removeChild(t)}))};const Tc=t=>{Array.from(t.querySelectorAll('b[style*="font-weight"]')).filter((t=>t.getAttribute("style")?.match(Ac))).forEach((e=>{const i=t.createDocumentFragment();i.append(...e.childNodes);e.parentNode?.replaceChild(i,e)}))};function _c(t){if(t.querySelector('[id^="docs-internal-guid-"]')){Tc(t);Ec(t)}}const Nc=/\bmso-list:[^;]*ignore/i;const $c=/\bmso-list:[^;]*\bl(\d+)/i;const Lc=/\bmso-list:[^;]*\blevel(\d+)/i;const zc=(t,e)=>{const i=t.getAttribute("style");const n=i?.match($c);if(!n){return null}const r=Number(n[1]);const s=i?.match(Lc);const l=s?Number(s[1]):1;const o=new RegExp(`@list l${r}:level${l}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i");const a=e.match(o);const c=a&&a[1]==="bullet"?"bullet":"ordered";return{id:r,indent:l,type:c,element:t}};const Sc=t=>{const e=Array.from(t.querySelectorAll("[style*=mso-list]"));const i=[];const n=[];e.forEach((t=>{const e=(t.getAttribute("style")||"").match(Nc);if(e){i.push(t)}else{n.push(t)}}));i.forEach((t=>t.parentNode?.removeChild(t)));const r=t.documentElement.innerHTML;const s=n.map((t=>zc(t,r))).filter((t=>t));while(s.length){const t=[];let e=s.shift();while(e){t.push(e);e=s.length&&s[0]?.element===e.element.nextElementSibling&&s[0].id===e.id?s.shift():null}const i=document.createElement("ul");t.forEach((t=>{const e=document.createElement("li");e.setAttribute("data-list",t.type);if(t.indent>1){e.setAttribute("class",`ql-indent-${t.indent-1}`)}e.innerHTML=t.element.innerHTML;i.appendChild(e)}));const n=t[0]?.element;const{parentNode:r}=n??{};if(n){r?.replaceChild(i,n)}t.slice(1).forEach((t=>{let{element:e}=t;r?.removeChild(e)}))}};function Cc(t){if(t.documentElement.getAttribute("xmlns:w")==="urn:schemas-microsoft-com:office:word"){Sc(t)}}const Bc=[Cc,_c];const Rc=t=>{if(t.documentElement){Bc.forEach((e=>{e(t)}))}};const Ic=ea("quill:clipboard");const Hc=[[Node.TEXT_NODE,au],[Node.TEXT_NODE,su],["br",tu],[Node.ELEMENT_NODE,su],[Node.ELEMENT_NODE,Xc],[Node.ELEMENT_NODE,Jc],[Node.ELEMENT_NODE,lu],["li",nu],["ol, ul",ru],["pre",eu],["tr",ou],["b",Yc("bold")],["i",Yc("italic")],["strike",Yc("strike")],["style",iu]];const Vc=[Ka,sc].reduce(((t,e)=>{t[e.keyName]=e;return t}),{});const Dc=[Ga,tc,Ja,oc,hc,dc].reduce(((t,e)=>{t[e.keyName]=e;return t}),{});class Fc extends ma{static DEFAULTS={matchers:[]};constructor(t,e){super(t,e);this.quill.root.addEventListener("copy",(t=>this.onCaptureCopy(t,false)));this.quill.root.addEventListener("cut",(t=>this.onCaptureCopy(t,true)));this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this));this.matchers=[];Hc.concat(this.options.matchers??[]).forEach((t=>{let[e,i]=t;this.addMatcher(e,i)}))}addMatcher(t,e){this.matchers.push([t,e])}convert(t){let{html:e,text:i}=t;let n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(n[ic.blotName]){return(new Ro).insert(i||"",{[ic.blotName]:n[ic.blotName]})}if(!e){return(new Ro).insert(i||"",n)}const r=this.convertHTML(e);if(Uc(r,"\n")&&(r.ops[r.ops.length-1].attributes==null||n.table)){return r.compose((new Ro).retain(r.length()-1).delete(1))}return r}normalizeHTML(t){Rc(t)}convertHTML(t){const e=(new DOMParser).parseFromString(t,"text/html");this.normalizeHTML(e);const i=e.body;const n=new WeakMap;const[r,s]=this.prepareMatching(i,n);return Qc(this.quill.scroll,i,r,s,n)}dangerouslyPasteHTML(t,e){let i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:La.sources.API;if(typeof t==="string"){const i=this.convert({html:t,text:""});this.quill.setContents(i,e);this.quill.setSelection(0,La.sources.SILENT)}else{const n=this.convert({html:e,text:""});this.quill.updateContents((new Ro).retain(t).concat(n),i);this.quill.setSelection(t+n.length(),La.sources.SILENT)}}onCaptureCopy(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;if(t.defaultPrevented)return;t.preventDefault();const[i]=this.quill.selection.getRange();if(i==null)return;const{html:n,text:r}=this.onCopy(i,e);t.clipboardData?.setData("text/plain",r);t.clipboardData?.setData("text/html",n);if(e){xc({range:i,quill:this.quill})}}normalizeURIList(t){return t.split(/\r?\n/).filter((t=>t[0]!=="#")).join("\n")}onCapturePaste(t){if(t.defaultPrevented||!this.quill.isEnabled())return;t.preventDefault();const e=this.quill.getSelection(true);if(e==null)return;const i=t.clipboardData?.getData("text/html");let n=t.clipboardData?.getData("text/plain");if(!i&&!n){const e=t.clipboardData?.getData("text/uri-list");if(e){n=this.normalizeURIList(e)}}const r=Array.from(t.clipboardData?.files||[]);if(!i&&r.length>0){this.quill.uploader.upload(e,r);return}if(i&&r.length>0){const t=(new DOMParser).parseFromString(i,"text/html");if(t.body.childElementCount===1&&t.body.firstElementChild?.tagName==="IMG"){this.quill.uploader.upload(e,r);return}}this.onPaste(e,{html:i,text:n})}onCopy(t){const e=this.quill.getText(t);const i=this.quill.getSemanticHTML(t);return{html:i,text:e}}onPaste(t,e){let{text:i,html:n}=e;const r=this.quill.getFormat(t.index);const s=this.convert({text:i,html:n},r);Ic.log("onPaste",s,{text:i,html:n});const l=(new Ro).retain(t.index).delete(t.length).concat(s);this.quill.updateContents(l,La.sources.USER);this.quill.setSelection(l.length()-t.length,La.sources.SILENT);this.quill.scrollSelectionIntoView()}prepareMatching(t,e){const i=[];const n=[];this.matchers.forEach((r=>{const[s,l]=r;switch(s){case Node.TEXT_NODE:n.push(l);break;case Node.ELEMENT_NODE:i.push(l);break;default:Array.from(t.querySelectorAll(s)).forEach((t=>{if(e.has(t)){const i=e.get(t);i?.push(l)}else{e.set(t,[l])}}));break}}));return[i,n]}}function Pc(t,e,i,n){if(!n.query(e)){return t}return t.reduce(((t,n)=>{if(!n.insert)return t;if(n.attributes&&n.attributes[e]){return t.push(n)}const r=i?{[e]:i}:{};return t.insert(n.insert,{...r,...n.attributes})}),new Ro)}function Uc(t,e){let i="";for(let n=t.ops.length-1;n>=0&&i.length<e.length;--n){const e=t.ops[n];if(typeof e.insert!=="string")break;i=e.insert+i}return i.slice(-1*e.length)===e}function Zc(t,e){if(!(t instanceof Element))return false;const i=e.query(t);if(i&&i.prototype instanceof Il)return false;return["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(t.tagName.toLowerCase())}function Kc(t,e){return t.previousElementSibling&&t.nextElementSibling&&!Zc(t.previousElementSibling,e)&&!Zc(t.nextElementSibling,e)}const Wc=new WeakMap;function Gc(t){if(t==null)return false;if(!Wc.has(t)){if(t.tagName==="PRE"){Wc.set(t,true)}else{Wc.set(t,Gc(t.parentNode))}}return Wc.get(t)}function Qc(t,e,i,n,r){if(e.nodeType===e.TEXT_NODE){return n.reduce(((i,n)=>n(e,i,t)),new Ro)}if(e.nodeType===e.ELEMENT_NODE){return Array.from(e.childNodes||[]).reduce(((s,l)=>{let o=Qc(t,l,i,n,r);if(l.nodeType===e.ELEMENT_NODE){o=i.reduce(((e,i)=>i(l,e,t)),o);o=(r.get(l)||[]).reduce(((e,i)=>i(l,e,t)),o)}return s.concat(o)}),new Ro)}return new Ro}function Yc(t){return(e,i,n)=>Pc(i,t,true,n)}function Jc(t,e,i){const n=ll.keys(t);const r=fl.keys(t);const s=bl.keys(t);const l={};n.concat(r).concat(s).forEach((e=>{let n=i.query(e,sl.ATTRIBUTE);if(n!=null){l[n.attrName]=n.value(t);if(l[n.attrName])return}n=Vc[e];if(n!=null&&(n.attrName===e||n.keyName===e)){l[n.attrName]=n.value(t)||undefined}n=Dc[e];if(n!=null&&(n.attrName===e||n.keyName===e)){n=Dc[e];l[n.attrName]=n.value(t)||undefined}}));return Object.entries(l).reduce(((t,e)=>{let[n,r]=e;return Pc(t,n,r,i)}),e)}function Xc(t,e,i){const n=i.query(t);if(n==null)return e;if(n.prototype instanceof Il){const e={};const r=n.value(t);if(r!=null){e[n.blotName]=r;return(new Ro).insert(e,n.formats(t,i))}}else{if(n.prototype instanceof zl&&!Uc(e,"\n")){e.insert("\n")}if("blotName"in n&&"formats"in n&&typeof n.formats==="function"){return Pc(e,n.blotName,n.formats(t,i),i)}}return e}function tu(t,e){if(!Uc(e,"\n")){e.insert("\n")}return e}function eu(t,e,i){const n=i.query("code-block");const r=n&&"formats"in n&&typeof n.formats==="function"?n.formats(t,i):true;return Pc(e,"code-block",r,i)}function iu(){return new Ro}function nu(t,e,i){const n=i.query(t);if(n==null||n.blotName!=="list"||!Uc(e,"\n")){return e}let r=-1;let s=t.parentNode;while(s!=null){if(["OL","UL"].includes(s.tagName)){r+=1}s=s.parentNode}if(r<=0)return e;return e.reduce(((t,e)=>{if(!e.insert)return t;if(e.attributes&&typeof e.attributes.indent==="number"){return t.push(e)}return t.insert(e.insert,{indent:r,...e.attributes||{}})}),new Ro)}function ru(t,e,i){const n=t;let r=n.tagName==="OL"?"ordered":"bullet";const s=n.getAttribute("data-checked");if(s){r=s==="true"?"checked":"unchecked"}return Pc(e,"list",r,i)}function su(t,e,i){if(!Uc(e,"\n")){if(Zc(t,i)&&(t.childNodes.length>0||t instanceof HTMLParagraphElement)){return e.insert("\n")}if(e.length()>0&&t.nextSibling){let n=t.nextSibling;while(n!=null){if(Zc(n,i)){return e.insert("\n")}const t=i.query(n);if(t&&t.prototype instanceof Zo){return e.insert("\n")}n=n.firstChild}}}return e}function lu(t,e,i){const n={};const r=t.style||{};if(r.fontStyle==="italic"){n.italic=true}if(r.textDecoration==="underline"){n.underline=true}if(r.textDecoration==="line-through"){n.strike=true}if(r.fontWeight?.startsWith("bold")||parseInt(r.fontWeight,10)>=700){n.bold=true}e=Object.entries(n).reduce(((t,e)=>{let[n,r]=e;return Pc(t,n,r,i)}),e);if(parseFloat(r.textIndent||0)>0){return(new Ro).insert("\t").concat(e)}return e}function ou(t,e,i){const n=t.parentElement?.tagName==="TABLE"?t.parentElement:t.parentElement?.parentElement;if(n!=null){const r=Array.from(n.querySelectorAll("tr"));const s=r.indexOf(t)+1;return Pc(e,"table",s,i)}return e}function au(t,e,i){let n=t.data;if(t.parentElement?.tagName==="O:P"){return e.insert(n.trim())}if(!Gc(t)){if(n.trim().length===0&&n.includes("\n")&&!Kc(t,i)){return e}n=n.replace(/[^\S\u00a0]/g," ");n=n.replace(/ {2,}/g," ");if(t.previousSibling==null&&t.parentElement!=null&&Zc(t.parentElement,i)||t.previousSibling instanceof Element&&Zc(t.previousSibling,i)){n=n.replace(/^ /,"")}if(t.nextSibling==null&&t.parentElement!=null&&Zc(t.parentElement,i)||t.nextSibling instanceof Element&&Zc(t.nextSibling,i)){n=n.replace(/ $/,"")}n=n.replaceAll(" "," ")}return e.insert(n)}class cu extends ma{static DEFAULTS={delay:1e3,maxStack:100,userOnly:false};lastRecorded=0;ignoreChange=false;stack={undo:[],redo:[]};currentRange=null;constructor(t,e){super(t,e);this.quill.on(La.events.EDITOR_CHANGE,((t,e,i,n)=>{if(t===La.events.SELECTION_CHANGE){if(e&&n!==La.sources.SILENT){this.currentRange=e}}else if(t===La.events.TEXT_CHANGE){if(!this.ignoreChange){if(!this.options.userOnly||n===La.sources.USER){this.record(e,i)}else{this.transform(e)}}this.currentRange=du(this.currentRange,e)}}));this.quill.keyboard.addBinding({key:"z",shortKey:true},this.undo.bind(this));this.quill.keyboard.addBinding({key:["z","Z"],shortKey:true,shiftKey:true},this.redo.bind(this));if(/Win/i.test(navigator.platform)){this.quill.keyboard.addBinding({key:"y",shortKey:true},this.redo.bind(this))}this.quill.root.addEventListener("beforeinput",(t=>{if(t.inputType==="historyUndo"){this.undo();t.preventDefault()}else if(t.inputType==="historyRedo"){this.redo();t.preventDefault()}}))}change(t,e){if(this.stack[t].length===0)return;const i=this.stack[t].pop();if(!i)return;const n=this.quill.getContents();const r=i.delta.invert(n);this.stack[e].push({delta:r,range:du(i.range,r)});this.lastRecorded=0;this.ignoreChange=true;this.quill.updateContents(i.delta,La.sources.USER);this.ignoreChange=false;this.restoreSelection(i)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(t,e){if(t.ops.length===0)return;this.stack.redo=[];let i=t.invert(e);let n=this.currentRange;const r=Date.now();if(this.lastRecorded+this.options.delay>r&&this.stack.undo.length>0){const t=this.stack.undo.pop();if(t){i=i.compose(t.delta);n=t.range}}else{this.lastRecorded=r}if(i.length()===0)return;this.stack.undo.push({delta:i,range:n});if(this.stack.undo.length>this.options.maxStack){this.stack.undo.shift()}}redo(){this.change("redo","undo")}transform(t){uu(this.stack.undo,t);uu(this.stack.redo,t)}undo(){this.change("undo","redo")}restoreSelection(t){if(t.range){this.quill.setSelection(t.range,La.sources.USER)}else{const e=fu(this.quill.scroll,t.delta);this.quill.setSelection(e,La.sources.USER)}}}function uu(t,e){let i=e;for(let e=t.length-1;e>=0;e-=1){const n=t[e];t[e]={delta:i.transform(n.delta,true),range:n.range&&du(n.range,i)};i=n.delta.transform(i);if(t[e].delta.length()===0){t.splice(e,1)}}}function hu(t,e){const i=e.ops[e.ops.length-1];if(i==null)return false;if(i.insert!=null){return typeof i.insert==="string"&&i.insert.endsWith("\n")}if(i.attributes!=null){return Object.keys(i.attributes).some((e=>t.query(e,sl.BLOCK)!=null))}return false}function fu(t,e){const i=e.reduce(((t,e)=>t+(e.delete||0)),0);let n=e.length()-i;if(hu(t,e)){n-=1}return n}function du(t,e){if(!t)return t;const i=e.transformPosition(t.index);const n=e.transformPosition(t.index+t.length);return{index:i,length:n-i}}class pu extends ma{constructor(t,e){super(t,e);t.root.addEventListener("drop",(e=>{e.preventDefault();let i=null;if(document.caretRangeFromPoint){i=document.caretRangeFromPoint(e.clientX,e.clientY)}else if(document.caretPositionFromPoint){const t=document.caretPositionFromPoint(e.clientX,e.clientY);i=document.createRange();i.setStart(t.offsetNode,t.offset);i.setEnd(t.offsetNode,t.offset)}const n=i&&t.selection.normalizeNative(i);if(n){const i=t.selection.normalizedToRange(n);if(e.dataTransfer?.files){this.upload(i,e.dataTransfer.files)}}}))}upload(t,e){const i=[];Array.from(e).forEach((t=>{if(t&&this.options.mimetypes?.includes(t.type)){i.push(t)}}));if(i.length>0){this.options.handler.call(this,t,i)}}}pu.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(t,e){if(!this.quill.scroll.query("image")){return}const i=e.map((t=>new Promise((e=>{const i=new FileReader;i.onload=()=>{e(i.result)};i.readAsDataURL(t)}))));Promise.all(i).then((e=>{const i=e.reduce(((t,e)=>t.insert({image:e})),(new Ro).retain(t.index).delete(t.length));this.quill.updateContents(i,ra.sources.USER);this.quill.setSelection(t.index+e.length,ra.sources.SILENT)}))}};const bu=["insertText","insertReplacementText"];class qu extends ma{constructor(t,e){super(t,e);t.root.addEventListener("beforeinput",(t=>{this.handleBeforeInput(t)}));if(!/Android/i.test(navigator.userAgent)){t.on(La.events.COMPOSITION_BEFORE_START,(()=>{this.handleCompositionStart()}))}}deleteRange(t){xc({range:t,quill:this.quill})}replaceText(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"";if(t.length===0)return false;if(e){const i=this.quill.getFormat(t.index,1);this.deleteRange(t);this.quill.updateContents((new Ro).retain(t.index).insert(e,i),La.sources.USER)}else{this.deleteRange(t)}this.quill.setSelection(t.index+e.length,0,La.sources.SILENT);return true}handleBeforeInput(t){if(this.quill.composition.isComposing||t.defaultPrevented||!bu.includes(t.inputType)){return}const e=t.getTargetRanges?t.getTargetRanges()[0]:null;if(!e||e.collapsed===true){return}const i=vu(t);if(i==null){return}const n=this.quill.selection.normalizeNative(e);const r=n?this.quill.selection.normalizedToRange(n):null;if(r&&this.replaceText(r,i)){t.preventDefault()}}handleCompositionStart(){const t=this.quill.getSelection();if(t){this.replaceText(t)}}}function vu(t){if(typeof t.data==="string"){return t.data}if(t.dataTransfer?.types.includes("text/plain")){return t.dataTransfer.getData("text/plain")}return null}const mu=/Mac/i.test(navigator.platform);const gu=100;const wu=t=>{if(t.key==="ArrowLeft"||t.key==="ArrowRight"||t.key==="ArrowUp"||t.key==="ArrowDown"||t.key==="Home"){return true}if(mu&&t.key==="a"&&t.ctrlKey===true){return true}return false};class yu extends ma{isListening=false;selectionChangeDeadline=0;constructor(t,e){super(t,e);this.handleArrowKeys();this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(t,e){let{line:i,event:n}=e;if(!(i instanceof Ml)||!i.uiNode){return true}const r=getComputedStyle(i.domNode)["direction"]==="rtl";if(r&&n.key!=="ArrowRight"||!r&&n.key!=="ArrowLeft"){return true}this.quill.setSelection(t.index-1,t.length+(n.shiftKey?1:0),La.sources.USER);return false}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",(t=>{if(!t.defaultPrevented&&wu(t)){this.ensureListeningToSelectionChange()}}))}ensureListeningToSelectionChange(){this.selectionChangeDeadline=Date.now()+gu;if(this.isListening)return;this.isListening=true;const t=()=>{this.isListening=false;if(Date.now()<=this.selectionChangeDeadline){this.handleSelectionChange()}};document.addEventListener("selectionchange",t,{once:true})}handleSelectionChange(){const t=document.getSelection();if(!t)return;const e=t.getRangeAt(0);if(e.collapsed!==true||e.startOffset!==0)return;const i=this.quill.scroll.find(e.startContainer);if(!(i instanceof Ml)||!i.uiNode)return;const n=document.createRange();n.setStartAfter(i.uiNode);n.setEndAfter(i.uiNode);t.removeAllRanges();t.addRange(n)}}La.register({"blots/block":Uo,"blots/block/embed":Zo,"blots/break":Io,"blots/container":Va,"blots/cursor":Go,"blots/embed":wa,"blots/inline":Fo,"blots/scroll":Pa,"blots/text":Ho,"modules/clipboard":Fc,"modules/history":cu,"modules/keyboard":qc,"modules/uploader":pu,"modules/input":qu,"modules/uiNode":yu});class ku extends fl{add(t,e){let i=0;if(e==="+1"||e==="-1"){const n=this.value(t)||0;i=e==="+1"?n+1:n-1}else if(typeof e==="number"){i=e}if(i===0){this.remove(t);return true}return super.add(t,i.toString())}canAdd(t,e){return super.canAdd(t,e)||super.canAdd(t,parseInt(e,10))}value(t){return parseInt(super.value(t),10)||undefined}}const xu=new ku("indent","ql-indent",{scope:sl.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});class ju extends Uo{static blotName="blockquote";static tagName="blockquote"}class Au extends Uo{static blotName="header";static tagName=["H1","H2","H3","H4","H5","H6"];static formats(t){return this.tagName.indexOf(t.tagName)+1}}class Ou extends Va{}Ou.blotName="list-container";Ou.tagName="OL";class Mu extends Uo{static create(t){const e=super.create();e.setAttribute("data-list",t);return e}static formats(t){return t.getAttribute("data-list")||undefined}static register(){La.register(Ou)}constructor(t,e){super(t,e);const i=e.ownerDocument.createElement("span");const n=i=>{if(!t.isEnabled())return;const n=this.statics.formats(e,t);if(n==="checked"){this.format("list","unchecked");i.preventDefault()}else if(n==="unchecked"){this.format("list","checked");i.preventDefault()}};i.addEventListener("mousedown",n);i.addEventListener("touchstart",n);this.attachUI(i)}format(t,e){if(t===this.statics.blotName&&e){this.domNode.setAttribute("data-list",e)}else{super.format(t,e)}}}Mu.blotName="list";Mu.tagName="LI";Ou.allowedChildren=[Mu];Mu.requiredContainer=Ou;class Eu extends Fo{static blotName="bold";static tagName=["STRONG","B"];static create(){return super.create()}static formats(){return true}optimize(t){super.optimize(t);if(this.domNode.tagName!==this.statics.tagName[0]){this.replaceWith(this.statics.blotName)}}}class Tu extends Eu{static blotName="italic";static tagName=["EM","I"]}class _u extends Fo{static blotName="link";static tagName="A";static SANITIZED_URL="about:blank";static PROTOCOL_WHITELIST=["http","https","mailto","tel","sms"];static create(t){const e=super.create(t);e.setAttribute("href",this.sanitize(t));e.setAttribute("rel","noopener noreferrer");e.setAttribute("target","_blank");return e}static formats(t){return t.getAttribute("href")}static sanitize(t){return Nu(t,this.PROTOCOL_WHITELIST)?t:this.SANITIZED_URL}format(t,e){if(t!==this.statics.blotName||!e){super.format(t,e)}else{this.domNode.setAttribute("href",this.constructor.sanitize(e))}}}function Nu(t,e){const i=document.createElement("a");i.href=t;const n=i.href.slice(0,i.href.indexOf(":"));return e.indexOf(n)>-1}class $u extends Fo{static blotName="script";static tagName=["SUB","SUP"];static create(t){if(t==="super"){return document.createElement("sup")}if(t==="sub"){return document.createElement("sub")}return super.create(t)}static formats(t){if(t.tagName==="SUB")return"sub";if(t.tagName==="SUP")return"super";return undefined}}class Lu extends Eu{static blotName="strike";static tagName=["S","STRIKE"]}class zu extends Fo{static blotName="underline";static tagName="U"}class Su extends wa{static blotName="formula";static className="ql-formula";static tagName="SPAN";static create(t){if(window.katex==null){throw new Error("Formula module requires KaTeX.")}const e=super.create(t);if(typeof t==="string"){window.katex.render(t,e,{throwOnError:false,errorColor:"#f00"});e.setAttribute("data-value",t)}return e}static value(t){return t.getAttribute("data-value")}html(){const{formula:t}=this.value();return`<span>${t}</span>`}}const Cu=["alt","height","width"];class Bu extends Il{static blotName="image";static tagName="IMG";static create(t){const e=super.create(t);if(typeof t==="string"){e.setAttribute("src",this.sanitize(t))}return e}static formats(t){return Cu.reduce(((e,i)=>{if(t.hasAttribute(i)){e[i]=t.getAttribute(i)}return e}),{})}static match(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}static sanitize(t){return Nu(t,["http","https","data"])?t:"//:0"}static value(t){return t.getAttribute("src")}format(t,e){if(Cu.indexOf(t)>-1){if(e){this.domNode.setAttribute(t,e)}else{this.domNode.removeAttribute(t)}}else{super.format(t,e)}}}const Ru=["height","width"];class Iu extends Zo{static blotName="video";static className="ql-video";static tagName="IFRAME";static create(t){const e=super.create(t);e.setAttribute("frameborder","0");e.setAttribute("allowfullscreen","true");e.setAttribute("src",this.sanitize(t));return e}static formats(t){return Ru.reduce(((e,i)=>{if(t.hasAttribute(i)){e[i]=t.getAttribute(i)}return e}),{})}static sanitize(t){return _u.sanitize(t)}static value(t){return t.getAttribute("src")}format(t,e){if(Ru.indexOf(t)>-1){if(e){this.domNode.setAttribute(t,e)}else{this.domNode.removeAttribute(t)}}else{super.format(t,e)}}html(){const{video:t}=this.value();return`<a href="${t}">${t}</a>`}}const Hu=new fl("code-token","hljs",{scope:sl.INLINE});class Vu extends Fo{static formats(t,e){while(t!=null&&t!==e.domNode){if(t.classList&&t.classList.contains(ic.className)){return super.formats(t,e)}t=t.parentNode}return undefined}constructor(t,e,i){super(t,e,i);Hu.add(this.domNode,i)}format(t,e){if(t!==Vu.blotName){super.format(t,e)}else if(e){Hu.add(this.domNode,e)}else{Hu.remove(this.domNode);this.domNode.classList.remove(this.statics.className)}}optimize(){super.optimize(...arguments);if(!Hu.value(this.domNode)){this.unwrap()}}}Vu.blotName="code-token";Vu.className="ql-token";class Du extends ic{static create(t){const e=super.create(t);if(typeof t==="string"){e.setAttribute("data-language",t)}return e}static formats(t){return t.getAttribute("data-language")||"plain"}static register(){}format(t,e){if(t===this.statics.blotName&&e){this.domNode.setAttribute("data-language",e)}else{super.format(t,e)}}replaceWith(t,e){this.formatAt(0,this.length(),Vu.blotName,false);return super.replaceWith(t,e)}}class Fu extends ec{attach(){super.attach();this.forceNext=false;this.scroll.emitMount(this)}format(t,e){if(t===Du.blotName){this.forceNext=true;this.children.forEach((i=>{i.format(t,e)}))}}formatAt(t,e,i,n){if(i===Du.blotName){this.forceNext=true}super.formatAt(t,e,i,n)}highlight(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;if(this.children.head==null)return;const i=Array.from(this.domNode.childNodes).filter((t=>t!==this.uiNode));const n=`${i.map((t=>t.textContent)).join("\n")}\n`;const r=Du.formats(this.children.head.domNode);if(e||this.forceNext||this.cachedText!==n){if(n.trim().length>0||this.cachedText==null){const e=this.children.reduce(((t,e)=>t.concat(Ko(e,false))),new Ro);const i=t(n,r);e.diff(i).reduce(((t,e)=>{let{retain:i,attributes:n}=e;if(!i)return t;if(n){Object.keys(n).forEach((e=>{if([Du.blotName,Vu.blotName].includes(e)){this.formatAt(t,i,e,n[e])}}))}return t+i}),0)}this.cachedText=n;this.forceNext=false}}html(t,e){const[i]=this.children.find(t);const n=i?Du.formats(i.domNode):"plain";return`<pre data-language="${n}">\n${Do(this.code(t,e))}\n</pre>`}optimize(t){super.optimize(t);if(this.parent!=null&&this.children.head!=null&&this.uiNode!=null){const t=Du.formats(this.children.head.domNode);if(t!==this.uiNode.value){this.uiNode.value=t}}}}Fu.allowedChildren=[Du];Du.requiredContainer=Fu;Du.allowedChildren=[Vu,Go,Ho,Io];const Pu=(t,e,i)=>{if(typeof t.versionString==="string"){const n=t.versionString.split(".")[0];if(parseInt(n,10)>=11){return t.highlight(i,{language:e}).value}}return t.highlight(e,i).value};class Uu extends ma{static register(){La.register(Vu,true);La.register(Du,true);La.register(Fu,true)}constructor(t,e){super(t,e);if(this.options.hljs==null){throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.")}this.languages=this.options.languages.reduce(((t,e)=>{let{key:i}=e;t[i]=true;return t}),{});this.highlightBlot=this.highlightBlot.bind(this);this.initListener();this.initTimer()}initListener(){this.quill.on(La.events.SCROLL_BLOT_MOUNT,(t=>{if(!(t instanceof Fu))return;const e=this.quill.root.ownerDocument.createElement("select");this.options.languages.forEach((t=>{let{key:i,label:n}=t;const r=e.ownerDocument.createElement("option");r.textContent=n;r.setAttribute("value",i);e.appendChild(r)}));e.addEventListener("change",(()=>{t.format(Du.blotName,e.value);this.quill.root.focus();this.highlight(t,true)}));if(t.uiNode==null){t.attachUI(e);if(t.children.head){e.value=Du.formats(t.children.head.domNode)}}}))}initTimer(){let t=null;this.quill.on(La.events.SCROLL_OPTIMIZE,(()=>{if(t){clearTimeout(t)}t=setTimeout((()=>{this.highlight();t=null}),this.options.interval)}))}highlight(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;if(this.quill.selection.composing)return;this.quill.update(La.sources.USER);const i=this.quill.getSelection();const n=t==null?this.quill.scroll.descendants(Fu):[t];n.forEach((t=>{t.highlight(this.highlightBlot,e)}));this.quill.update(La.sources.SILENT);if(i!=null){this.quill.setSelection(i,La.sources.SILENT)}}highlightBlot(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"plain";e=this.languages[e]?e:"plain";if(e==="plain"){return Do(t).split("\n").reduce(((t,i,n)=>{if(n!==0){t.insert("\n",{[ic.blotName]:e})}return t.insert(i)}),new Ro)}const i=this.quill.root.ownerDocument.createElement("div");i.classList.add(ic.className);i.innerHTML=Pu(this.options.hljs,e,t);return Qc(this.quill.scroll,i,[(t,e)=>{const i=Hu.value(t);if(i){return e.compose((new Ro).retain(e.length(),{[Vu.blotName]:i}))}return e}],[(t,i)=>t.data.split("\n").reduce(((t,i,n)=>{if(n!==0)t.insert("\n",{[ic.blotName]:e});return t.insert(i)}),i)],new WeakMap)}}Uu.DEFAULTS={hljs:(()=>window.hljs)(),interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};class Zu extends Uo{static blotName="table";static tagName="TD";static create(t){const e=super.create();if(t){e.setAttribute("data-row",t)}else{e.setAttribute("data-row",Qu())}return e}static formats(t){if(t.hasAttribute("data-row")){return t.getAttribute("data-row")}return undefined}cellOffset(){if(this.parent){return this.parent.children.indexOf(this)}return-1}format(t,e){if(t===Zu.blotName&&e){this.domNode.setAttribute("data-row",e)}else{super.format(t,e)}}row(){return this.parent}rowOffset(){if(this.row()){return this.row().rowOffset()}return-1}table(){return this.row()&&this.row().table()}}class Ku extends Va{static blotName="table-row";static tagName="TR";checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){const t=this.children.head.formats();const e=this.children.tail.formats();const i=this.next.children.head.formats();const n=this.next.children.tail.formats();return t.table===e.table&&t.table===i.table&&t.table===n.table}return false}optimize(t){super.optimize(t);this.children.forEach((t=>{if(t.next==null)return;const e=t.formats();const i=t.next.formats();if(e.table!==i.table){const e=this.splitAfter(t);if(e){e.optimize()}if(this.prev){this.prev.optimize()}}}))}rowOffset(){if(this.parent){return this.parent.children.indexOf(this)}return-1}table(){return this.parent&&this.parent.parent}}class Wu extends Va{static blotName="table-body";static tagName="TBODY"}class Gu extends Va{static blotName="table-container";static tagName="TABLE";balanceCells(){const t=this.descendants(Ku);const e=t.reduce(((t,e)=>Math.max(e.children.length,t)),0);t.forEach((t=>{new Array(e-t.children.length).fill(0).forEach((()=>{let e;if(t.children.head!=null){e=Zu.formats(t.children.head.domNode)}const i=this.scroll.create(Zu.blotName,e);t.appendChild(i);i.optimize()}))}))}cells(t){return this.rows().map((e=>e.children.at(t)))}deleteColumn(t){const[e]=this.descendant(Wu);if(e==null||e.children.head==null)return;e.children.forEach((e=>{const i=e.children.at(t);if(i!=null){i.remove()}}))}insertColumn(t){const[e]=this.descendant(Wu);if(e==null||e.children.head==null)return;e.children.forEach((e=>{const i=e.children.at(t);const n=Zu.formats(e.children.head.domNode);const r=this.scroll.create(Zu.blotName,n);e.insertBefore(r,i)}))}insertRow(t){const[e]=this.descendant(Wu);if(e==null||e.children.head==null)return;const i=Qu();const n=this.scroll.create(Ku.blotName);e.children.head.children.forEach((()=>{const t=this.scroll.create(Zu.blotName,i);n.appendChild(t)}));const r=e.children.at(t);e.insertBefore(n,r)}rows(){const t=this.children.head;if(t==null)return[];return t.children.map((t=>t))}}Gu.allowedChildren=[Wu];Wu.requiredContainer=Gu;Wu.allowedChildren=[Ku];Ku.requiredContainer=Wu;Ku.allowedChildren=[Zu];Zu.requiredContainer=Ku;function Qu(){const t=Math.random().toString(36).slice(2,6);return`row-${t}`}class Yu extends ma{static register(){La.register(Zu);La.register(Ku);La.register(Wu);La.register(Gu)}constructor(){super(...arguments);this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(Gu).forEach((t=>{t.balanceCells()}))}deleteColumn(){const[t,,e]=this.getTable();if(e==null)return;t.deleteColumn(e.cellOffset());this.quill.update(La.sources.USER)}deleteRow(){const[,t]=this.getTable();if(t==null)return;t.remove();this.quill.update(La.sources.USER)}deleteTable(){const[t]=this.getTable();if(t==null)return;const e=t.offset();t.remove();this.quill.update(La.sources.USER);this.quill.setSelection(e,La.sources.SILENT)}getTable(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.quill.getSelection();if(t==null)return[null,null,null,-1];const[e,i]=this.quill.getLine(t.index);if(e==null||e.statics.blotName!==Zu.blotName){return[null,null,null,-1]}const n=e.parent;const r=n.parent.parent;return[r,n,e,i]}insertColumn(t){const e=this.quill.getSelection();if(!e)return;const[i,n,r]=this.getTable(e);if(r==null)return;const s=r.cellOffset();i.insertColumn(s+t);this.quill.update(La.sources.USER);let l=n.rowOffset();if(t===0){l+=1}this.quill.setSelection(e.index+l,e.length,La.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(t){const e=this.quill.getSelection();if(!e)return;const[i,n,r]=this.getTable(e);if(r==null)return;const s=n.rowOffset();i.insertRow(s+t);this.quill.update(La.sources.USER);if(t>0){this.quill.setSelection(e,La.sources.SILENT)}else{this.quill.setSelection(e.index+n.children.length,e.length,La.sources.SILENT)}}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(t,e){const i=this.quill.getSelection();if(i==null)return;const n=new Array(t).fill(0).reduce((t=>{const i=new Array(e).fill("\n").join("");return t.insert(i,{table:Qu()})}),(new Ro).retain(i.index));this.quill.updateContents(n,La.sources.USER);this.quill.setSelection(i.index,La.sources.SILENT);this.balanceTables()}listenBalanceCells(){this.quill.on(La.events.SCROLL_OPTIMIZE,(t=>{t.some((t=>{if(["TD","TR","TBODY","TABLE"].includes(t.target.tagName)){this.quill.once(La.events.TEXT_CHANGE,((t,e,i)=>{if(i!==La.sources.USER)return;this.balanceTables()}));return true}return false}))}))}}const Ju=ea("quill:toolbar");class Xu extends ma{constructor(t,e){super(t,e);if(Array.isArray(this.options.container)){const e=document.createElement("div");e.setAttribute("role","toolbar");eh(e,this.options.container);t.container?.parentNode?.insertBefore(e,t.container);this.container=e}else if(typeof this.options.container==="string"){this.container=document.querySelector(this.options.container)}else{this.container=this.options.container}if(!(this.container instanceof HTMLElement)){Ju.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar");this.controls=[];this.handlers={};if(this.options.handlers){Object.keys(this.options.handlers).forEach((t=>{const e=this.options.handlers?.[t];if(e){this.addHandler(t,e)}}))}Array.from(this.container.querySelectorAll("button, select")).forEach((t=>{this.attach(t)}));this.quill.on(La.events.EDITOR_CHANGE,(()=>{const[t]=this.quill.selection.getRange();this.update(t)}))}addHandler(t,e){this.handlers[t]=e}attach(t){let e=Array.from(t.classList).find((t=>t.indexOf("ql-")===0));if(!e)return;e=e.slice("ql-".length);if(t.tagName==="BUTTON"){t.setAttribute("type","button")}if(this.handlers[e]==null&&this.quill.scroll.query(e)==null){Ju.warn("ignoring attaching to nonexistent format",e,t);return}const i=t.tagName==="SELECT"?"change":"click";t.addEventListener(i,(i=>{let n;if(t.tagName==="SELECT"){if(t.selectedIndex<0)return;const e=t.options[t.selectedIndex];if(e.hasAttribute("selected")){n=false}else{n=e.value||false}}else{if(t.classList.contains("ql-active")){n=false}else{n=t.value||!t.hasAttribute("value")}i.preventDefault()}this.quill.focus();const[r]=this.quill.selection.getRange();if(this.handlers[e]!=null){this.handlers[e].call(this,n)}else if(this.quill.scroll.query(e).prototype instanceof Il){n=prompt(`Enter ${e}`);if(!n)return;this.quill.updateContents((new Ro).retain(r.index).delete(r.length).insert({[e]:n}),La.sources.USER)}else{this.quill.format(e,n,La.sources.USER)}this.update(r)}));this.controls.push([e,t])}update(t){const e=t==null?{}:this.quill.getFormat(t);this.controls.forEach((i=>{const[n,r]=i;if(r.tagName==="SELECT"){let i=null;if(t==null){i=null}else if(e[n]==null){i=r.querySelector("option[selected]")}else if(!Array.isArray(e[n])){let t=e[n];if(typeof t==="string"){t=t.replace(/"/g,'\\"')}i=r.querySelector(`option[value="${t}"]`)}if(i==null){r.value="";r.selectedIndex=-1}else{i.selected=true}}else if(t==null){r.classList.remove("ql-active");r.setAttribute("aria-pressed","false")}else if(r.hasAttribute("value")){const t=e[n];const i=t===r.getAttribute("value")||t!=null&&t.toString()===r.getAttribute("value")||t==null&&!r.getAttribute("value");r.classList.toggle("ql-active",i);r.setAttribute("aria-pressed",i.toString())}else{const t=e[n]!=null;r.classList.toggle("ql-active",t);r.setAttribute("aria-pressed",t.toString())}}))}}Xu.DEFAULTS={};function th(t,e,i){const n=document.createElement("button");n.setAttribute("type","button");n.classList.add(`ql-${e}`);n.setAttribute("aria-pressed","false");if(i!=null){n.value=i;n.setAttribute("aria-label",`${e}: ${i}`)}else{n.setAttribute("aria-label",e)}t.appendChild(n)}function eh(t,e){if(!Array.isArray(e[0])){e=[e]}e.forEach((e=>{const i=document.createElement("span");i.classList.add("ql-formats");e.forEach((t=>{if(typeof t==="string"){th(i,t)}else{const e=Object.keys(t)[0];const n=t[e];if(Array.isArray(n)){ih(i,e,n)}else{th(i,e,n)}}}));t.appendChild(i)}))}function ih(t,e,i){const n=document.createElement("select");n.classList.add(`ql-${e}`);i.forEach((t=>{const e=document.createElement("option");if(t!==false){e.setAttribute("value",String(t))}else{e.setAttribute("selected","selected")}n.appendChild(e)}));t.appendChild(n)}Xu.DEFAULTS={container:null,handlers:{clean(){const t=this.quill.getSelection();if(t==null)return;if(t.length===0){const t=this.quill.getFormat();Object.keys(t).forEach((t=>{if(this.quill.scroll.query(t,sl.INLINE)!=null){this.quill.format(t,false,La.sources.USER)}}))}else{this.quill.removeFormat(t.index,t.length,La.sources.USER)}},direction(t){const{align:e}=this.quill.getFormat();if(t==="rtl"&&e==null){this.quill.format("align","right",La.sources.USER)}else if(!t&&e==="right"){this.quill.format("align",false,La.sources.USER)}this.quill.format("direction",t,La.sources.USER)},indent(t){const e=this.quill.getSelection();const i=this.quill.getFormat(e);const n=parseInt(i.indent||0,10);if(t==="+1"||t==="-1"){let e=t==="+1"?1:-1;if(i.direction==="rtl")e*=-1;this.quill.format("indent",n+e,La.sources.USER)}},link(t){if(t===true){t=prompt("Enter link URL:")}this.quill.format("link",t,La.sources.USER)},list(t){const e=this.quill.getSelection();const i=this.quill.getFormat(e);if(t==="check"){if(i.list==="checked"||i.list==="unchecked"){this.quill.format("list",false,La.sources.USER)}else{this.quill.format("list","unchecked",La.sources.USER)}}else{this.quill.format("list",t,La.sources.USER)}}}};const nh='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>';const rh='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>';const sh='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>';const lh='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>';const oh='<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"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><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"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>';const ah='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>';const ch='<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 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"/></svg>';const uh='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>';const hh='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>';const fh='<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>';const dh='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>';const ph='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>';const bh='<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"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><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"/></svg>';const qh='<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>';const vh='<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>';const mh='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,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>';const gh='<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,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>';const wh='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,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>';const yh='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>';const kh='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>';const xh='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>';const jh='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>';const Ah='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>';const Oh='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><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 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"/></svg>';const Mh='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>';const Eh='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>';const Th='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><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 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 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"/></svg>';const _h='<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>';const Nh='<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>';const $h='<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><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 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"/></svg>';const Lh='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>';const zh='<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"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>';const Sh='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>';const Ch={align:{"":nh,center:rh,right:sh,justify:lh},background:oh,blockquote:ah,bold:ch,clean:uh,code:hh,"code-block":hh,color:fh,direction:{"":dh,rtl:ph},formula:bh,header:{1:qh,2:vh,3:mh,4:gh,5:wh,6:yh},italic:kh,image:xh,indent:{"+1":jh,"-1":Ah},link:Oh,list:{bullet:Mh,check:Eh,ordered:Th},script:{sub:_h,super:Nh},strike:$h,table:Lh,underline:zh,video:Sh};const Bh='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>';let Rh=0;function Ih(t,e){t.setAttribute(e,`${!(t.getAttribute(e)==="true")}`)}class Hh{constructor(t){this.select=t;this.container=document.createElement("span");this.buildPicker();this.select.style.display="none";this.select.parentNode.insertBefore(this.container,this.select);this.label.addEventListener("mousedown",(()=>{this.togglePicker()}));this.label.addEventListener("keydown",(t=>{switch(t.key){case"Enter":this.togglePicker();break;case"Escape":this.escape();t.preventDefault();break}}));this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded");Ih(this.label,"aria-expanded");Ih(this.options,"aria-hidden")}buildItem(t){const e=document.createElement("span");e.tabIndex="0";e.setAttribute("role","button");e.classList.add("ql-picker-item");const i=t.getAttribute("value");if(i){e.setAttribute("data-value",i)}if(t.textContent){e.setAttribute("data-label",t.textContent)}e.addEventListener("click",(()=>{this.selectItem(e,true)}));e.addEventListener("keydown",(t=>{switch(t.key){case"Enter":this.selectItem(e,true);t.preventDefault();break;case"Escape":this.escape();t.preventDefault();break}}));return e}buildLabel(){const t=document.createElement("span");t.classList.add("ql-picker-label");t.innerHTML=Bh;t.tabIndex="0";t.setAttribute("role","button");t.setAttribute("aria-expanded","false");this.container.appendChild(t);return t}buildOptions(){const t=document.createElement("span");t.classList.add("ql-picker-options");t.setAttribute("aria-hidden","true");t.tabIndex="-1";t.id=`ql-picker-options-${Rh}`;Rh+=1;this.label.setAttribute("aria-controls",t.id);this.options=t;Array.from(this.select.options).forEach((e=>{const i=this.buildItem(e);t.appendChild(i);if(e.selected===true){this.selectItem(i)}}));this.container.appendChild(t)}buildPicker(){Array.from(this.select.attributes).forEach((t=>{this.container.setAttribute(t.name,t.value)}));this.container.classList.add("ql-picker");this.label=this.buildLabel();this.buildOptions()}escape(){this.close();setTimeout((()=>this.label.focus()),1)}close(){this.container.classList.remove("ql-expanded");this.label.setAttribute("aria-expanded","false");this.options.setAttribute("aria-hidden","true")}selectItem(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;const i=this.container.querySelector(".ql-selected");if(t===i)return;if(i!=null){i.classList.remove("ql-selected")}if(t==null)return;t.classList.add("ql-selected");this.select.selectedIndex=Array.from(t.parentNode.children).indexOf(t);if(t.hasAttribute("data-value")){this.label.setAttribute("data-value",t.getAttribute("data-value"))}else{this.label.removeAttribute("data-value")}if(t.hasAttribute("data-label")){this.label.setAttribute("data-label",t.getAttribute("data-label"))}else{this.label.removeAttribute("data-label")}if(e){this.select.dispatchEvent(new Event("change"));this.close()}}update(){let t;if(this.select.selectedIndex>-1){const e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex];this.selectItem(e)}else{this.selectItem(null)}const e=t!=null&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",e)}}class Vh extends Hh{constructor(t,e){super(t);this.label.innerHTML=e;this.container.classList.add("ql-color-picker");Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach((t=>{t.classList.add("ql-primary")}))}buildItem(t){const e=super.buildItem(t);e.style.backgroundColor=t.getAttribute("value")||"";return e}selectItem(t,e){super.selectItem(t,e);const i=this.label.querySelector(".ql-color-label");const n=t?t.getAttribute("data-value")||"":"";if(i){if(i.tagName==="line"){i.style.stroke=n}else{i.style.fill=n}}}}class Dh extends Hh{constructor(t,e){super(t);this.container.classList.add("ql-icon-picker");Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach((t=>{t.innerHTML=e[t.getAttribute("data-value")||""]}));this.defaultItem=this.container.querySelector(".ql-selected");this.selectItem(this.defaultItem)}selectItem(t,e){super.selectItem(t,e);const i=t||this.defaultItem;if(i!=null){if(this.label.innerHTML===i.innerHTML)return;this.label.innerHTML=i.innerHTML}}}const Fh=t=>{const{overflowY:e}=getComputedStyle(t,null);return e!=="visible"&&e!=="clip"};class Ph{constructor(t,e){this.quill=t;this.boundsContainer=e||document.body;this.root=t.addContainer("ql-tooltip");this.root.innerHTML=this.constructor.TEMPLATE;if(Fh(this.quill.root)){this.quill.root.addEventListener("scroll",(()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}))}this.hide()}hide(){this.root.classList.add("ql-hidden")}position(t){const e=t.left+t.width/2-this.root.offsetWidth/2;const i=t.bottom+this.quill.root.scrollTop;this.root.style.left=`${e}px`;this.root.style.top=`${i}px`;this.root.classList.remove("ql-flip");const n=this.boundsContainer.getBoundingClientRect();const r=this.root.getBoundingClientRect();let s=0;if(r.right>n.right){s=n.right-r.right;this.root.style.left=`${e+s}px`}if(r.left<n.left){s=n.left-r.left;this.root.style.left=`${e+s}px`}if(r.bottom>n.bottom){const e=r.bottom-r.top;const n=t.bottom-t.top+e;this.root.style.top=`${i-n}px`;this.root.classList.add("ql-flip")}return s}show(){this.root.classList.remove("ql-editing");this.root.classList.remove("ql-hidden")}}const Uh=[false,"center","right","justify"];const Zh=["#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"];const Kh=[false,"serif","monospace"];const Wh=["1","2","3",false];const Gh=["small",false,"large","huge"];class Qh extends ka{constructor(t,e){super(t,e);const i=e=>{if(!document.body.contains(t.root)){document.body.removeEventListener("click",i);return}if(this.tooltip!=null&&!this.tooltip.root.contains(e.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()){this.tooltip.hide()}if(this.pickers!=null){this.pickers.forEach((t=>{if(!t.container.contains(e.target)){t.close()}}))}};t.emitter.listenDOM("click",document.body,i)}addModule(t){const e=super.addModule(t);if(t==="toolbar"){this.extendToolbar(e)}return e}buildButtons(t,e){Array.from(t).forEach((t=>{const i=t.getAttribute("class")||"";i.split(/\s+/).forEach((i=>{if(!i.startsWith("ql-"))return;i=i.slice("ql-".length);if(e[i]==null)return;if(i==="direction"){t.innerHTML=e[i][""]+e[i].rtl}else if(typeof e[i]==="string"){t.innerHTML=e[i]}else{const n=t.value||"";if(n!=null&&e[i][n]){t.innerHTML=e[i][n]}}}))}))}buildPickers(t,e){this.pickers=Array.from(t).map((t=>{if(t.classList.contains("ql-align")){if(t.querySelector("option")==null){Xh(t,Uh)}if(typeof e.align==="object"){return new Dh(t,e.align)}}if(t.classList.contains("ql-background")||t.classList.contains("ql-color")){const i=t.classList.contains("ql-background")?"background":"color";if(t.querySelector("option")==null){Xh(t,Zh,i==="background"?"#ffffff":"#000000")}return new Vh(t,e[i])}if(t.querySelector("option")==null){if(t.classList.contains("ql-font")){Xh(t,Kh)}else if(t.classList.contains("ql-header")){Xh(t,Wh)}else if(t.classList.contains("ql-size")){Xh(t,Gh)}}return new Hh(t)}));const i=()=>{this.pickers.forEach((t=>{t.update()}))};this.quill.on(ra.events.EDITOR_CHANGE,i)}}Qh.DEFAULTS=rl({},ka.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let t=this.container.querySelector("input.ql-image[type=file]");if(t==null){t=document.createElement("input");t.setAttribute("type","file");t.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", "));t.classList.add("ql-image");t.addEventListener("change",(()=>{const e=this.quill.getSelection(true);this.quill.uploader.upload(e,t.files);t.value=""}));this.container.appendChild(t)}t.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class Yh extends Ph{constructor(t,e){super(t,e);this.textbox=this.root.querySelector('input[type="text"]');this.listen()}listen(){this.textbox.addEventListener("keydown",(t=>{if(t.key==="Enter"){this.save();t.preventDefault()}else if(t.key==="Escape"){this.cancel();t.preventDefault()}}))}cancel(){this.hide();this.restoreFocus()}edit(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"link";let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;this.root.classList.remove("ql-hidden");this.root.classList.add("ql-editing");if(this.textbox==null)return;if(e!=null){this.textbox.value=e}else if(t!==this.root.getAttribute("data-mode")){this.textbox.value=""}const i=this.quill.getBounds(this.quill.selection.savedRange);if(i!=null){this.position(i)}this.textbox.select();this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${t}`)||"");this.root.setAttribute("data-mode",t)}restoreFocus(){this.quill.focus({preventScroll:true})}save(){let{value:t}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:e}=this.quill.root;if(this.linkRange){this.quill.formatText(this.linkRange,"link",t,ra.sources.USER);delete this.linkRange}else{this.restoreFocus();this.quill.format("link",t,ra.sources.USER)}this.quill.root.scrollTop=e;break}case"video":{t=Jh(t)}case"formula":{if(!t)break;const e=this.quill.getSelection(true);if(e!=null){const i=e.index+e.length;this.quill.insertEmbed(i,this.root.getAttribute("data-mode"),t,ra.sources.USER);if(this.root.getAttribute("data-mode")==="formula"){this.quill.insertText(i+1," ",ra.sources.USER)}this.quill.setSelection(i+2,ra.sources.USER)}break}}this.textbox.value="";this.hide()}}function Jh(t){let e=t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);if(e){return`${e[1]||"https"}://www.youtube.com/embed/${e[2]}?showinfo=0`}if(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/)){return`${e[1]||"https"}://player.vimeo.com/video/${e[2]}/`}return t}function Xh(t,e){let i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;e.forEach((e=>{const n=document.createElement("option");if(e===i){n.setAttribute("selected","selected")}else{n.setAttribute("value",String(e))}t.appendChild(n)}))}const tf=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class ef extends Yh{static 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("");constructor(t,e){super(t,e);this.quill.on(ra.events.EDITOR_CHANGE,((t,e,i,n)=>{if(t!==ra.events.SELECTION_CHANGE)return;if(e!=null&&e.length>0&&n===ra.sources.USER){this.show();this.root.style.left="0px";this.root.style.width="";this.root.style.width=`${this.root.offsetWidth}px`;const t=this.quill.getLines(e.index,e.length);if(t.length===1){const t=this.quill.getBounds(e);if(t!=null){this.position(t)}}else{const i=t[t.length-1];const n=this.quill.getIndex(i);const r=Math.min(i.length()-1,e.index+e.length-n);const s=this.quill.getBounds(new la(n,r));if(s!=null){this.position(s)}}}else if(document.activeElement!==this.textbox&&this.quill.hasFocus()){this.hide()}}))}listen(){super.listen();this.root.querySelector(".ql-close").addEventListener("click",(()=>{this.root.classList.remove("ql-editing")}));this.quill.on(ra.events.SCROLL_OPTIMIZE,(()=>{setTimeout((()=>{if(this.root.classList.contains("ql-hidden"))return;const t=this.quill.getSelection();if(t!=null){const e=this.quill.getBounds(t);if(e!=null){this.position(e)}}}),1)}))}cancel(){this.show()}position(t){const e=super.position(t);const i=this.root.querySelector(".ql-tooltip-arrow");i.style.marginLeft="";if(e!==0){i.style.marginLeft=`${-1*e-i.offsetWidth/2}px`}return e}}class nf extends Qh{constructor(t,e){if(e.modules.toolbar!=null&&e.modules.toolbar.container==null){e.modules.toolbar.container=tf}super(t,e);this.quill.container.classList.add("ql-bubble")}extendToolbar(t){this.tooltip=new ef(this.quill,this.options.bounds);if(t.container!=null){this.tooltip.root.appendChild(t.container);this.buildButtons(t.container.querySelectorAll("button"),Ch);this.buildPickers(t.container.querySelectorAll("select"),Ch)}}}nf.DEFAULTS=rl({},Qh.DEFAULTS,{modules:{toolbar:{handlers:{link(t){if(!t){this.quill.format("link",false,La.sources.USER)}else{this.quill.theme.tooltip.edit()}}}}}});const rf=[[{header:["1","2","3",false]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class sf extends Yh{static 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("");preview=this.root.querySelector("a.ql-preview");listen(){super.listen();this.root.querySelector("a.ql-action").addEventListener("click",(t=>{if(this.root.classList.contains("ql-editing")){this.save()}else{this.edit("link",this.preview.textContent)}t.preventDefault()}));this.root.querySelector("a.ql-remove").addEventListener("click",(t=>{if(this.linkRange!=null){const t=this.linkRange;this.restoreFocus();this.quill.formatText(t,"link",false,ra.sources.USER);delete this.linkRange}t.preventDefault();this.hide()}));this.quill.on(ra.events.SELECTION_CHANGE,((t,e,i)=>{if(t==null)return;if(t.length===0&&i===ra.sources.USER){const[e,i]=this.quill.scroll.descendant(_u,t.index);if(e!=null){this.linkRange=new la(t.index-i,e.length());const n=_u.formats(e.domNode);this.preview.textContent=n;this.preview.setAttribute("href",n);this.show();const r=this.quill.getBounds(this.linkRange);if(r!=null){this.position(r)}return}}else{delete this.linkRange}this.hide()}))}show(){super.show();this.root.removeAttribute("data-mode")}}class lf extends Qh{constructor(t,e){if(e.modules.toolbar!=null&&e.modules.toolbar.container==null){e.modules.toolbar.container=rf}super(t,e);this.quill.container.classList.add("ql-snow")}extendToolbar(t){if(t.container!=null){t.container.classList.add("ql-snow");this.buildButtons(t.container.querySelectorAll("button"),Ch);this.buildPickers(t.container.querySelectorAll("select"),Ch);this.tooltip=new sf(this.quill,this.options.bounds);if(t.container.querySelector(".ql-link")){this.quill.keyboard.addBinding({key:"k",shortKey:true},((e,i)=>{t.handlers.link.call(t,!i.format.link)}))}}}}lf.DEFAULTS=rl({},Qh.DEFAULTS,{modules:{toolbar:{handlers:{link(t){if(t){const t=this.quill.getSelection();if(t==null||t.length===0)return;let e=this.quill.getText(t);if(/^\S+@\S+\.\S+$/.test(e)&&e.indexOf("mailto:")!==0){e=`mailto:${e}`}const{tooltip:i}=this.quill.theme;i.edit("link",e)}else{this.quill.format("link",false,La.sources.USER)}}}}}});La.register({"attributors/attribute/direction":sc,"attributors/class/align":Wa,"attributors/class/background":Xa,"attributors/class/color":Ya,"attributors/class/direction":lc,"attributors/class/font":cc,"attributors/class/size":fc,"attributors/style/align":Ga,"attributors/style/background":tc,"attributors/style/color":Ja,"attributors/style/direction":oc,"attributors/style/font":hc,"attributors/style/size":dc},true);La.register({"formats/align":Wa,"formats/direction":lc,"formats/indent":xu,"formats/background":tc,"formats/color":Ja,"formats/font":cc,"formats/size":fc,"formats/blockquote":ju,"formats/code-block":ic,"formats/header":Au,"formats/list":Mu,"formats/bold":Eu,"formats/code":nc,"formats/italic":Tu,"formats/link":_u,"formats/script":$u,"formats/strike":Lu,"formats/underline":zu,"formats/formula":Su,"formats/image":Bu,"formats/video":Iu,"modules/syntax":Uu,"modules/table":Yu,"modules/toolbar":Xu,"themes/bubble":nf,"themes/snow":lf,"ui/icons":Ch,"ui/picker":Hh,"ui/icon-picker":Dh,"ui/color-picker":Vh,"ui/tooltip":Ph},true);const of=t=>Boolean(t.tagName);const af=t=>{try{if(typeof document.createElement("div").attachShadow({mode:"open"}).getSelection==="function"){return t.getSelection().getRangeAt(0)}const e=window.getSelection();if(typeof e.getComposedRanges==="function"){return e.getComposedRanges(t)[0]}return e.getRangeAt(0)}catch(t){return null}};const cf=t=>{const e=()=>t.root.getRootNode();t.selection.hasFocus=()=>e().activeElement===t.root;t.selection.getNativeRange=()=>{const i=af(e());return Boolean(i)?t.selection.normalizeNative(i):null};t.selection.setNativeRange=(e,i,n=e,r=i,s=false)=>{if([e===null||e===void 0?void 0:e.parentNode,t.root.parentNode,n===null||n===void 0?void 0:n.parentNode].some((t=>t==null))){return}const l=window.getSelection();if(!t.selection.hasFocus())t.root.focus();const o=(t.selection.getNativeRange()||{}).native;if(!Boolean(o)||s||e!==o.startContainer||i!==o.startOffset||n!==o.endContainer||r!==o.endOffset){if(of(e)&&e.tagName==="BR"){i=[].indexOf.call(e.parentNode.childNodes,e);e=e.parentNode}if(of(n)&&n.tagName==="BR"){r=[].indexOf.call(n.parentNode.childNodes,n);n=n.parentNode}l.setBaseAndExtent(e,i,n,r)}};document.addEventListener("selectionchange",(()=>{t.selection.update()}))};const uf=(t,{value:e,modules:i,readOnly:n,placeholder:s,handleTextChange:l,handleFocus:o,handleBlur:a})=>{const c={toolbar:[["bold","italic","underline"],[{list:"ordered"},{list:"bullet"}],["link"],["clean"]]};const u=new La(t.querySelector("div"),{theme:"snow",modules:i||c,readOnly:n,placeholder:s});if(r(e)&&/<[a-z][\s\S]*>/i.test(e)){u.clipboard.dangerouslyPasteHTML(e)}else if(r(e)){u.setText(e)}const h=t.querySelector(".ql-editor");h.addEventListener("focus",o);h.addEventListener("blur",a);u.on("text-change",l);cf(u);return u};const hf="/*!\n * Quill Editor v2.0.3\n * https://quilljs.com\n * Copyright (c) 2017-2024, Slab\n * Copyright (c) 2014, Jason Chen\n * Copyright (c) 2013, salesforce.com\n */.ql-container{box-sizing:border-box;font-family:Helvetica,Arial,sans-serif;font-size:13px;height:100%;margin:0;position:relative}.ql-container.ql-disabled .ql-tooltip{visibility:hidden}.ql-container:not(.ql-disabled) li[data-list=checked]>.ql-ui,.ql-container:not(.ql-disabled) li[data-list=unchecked]>.ql-ui{cursor:pointer}.ql-clipboard{left:-100000px;height:1px;overflow-y:hidden;position:absolute;top:50%}.ql-clipboard p{margin:0;padding:0}.ql-editor{box-sizing:border-box;counter-reset:list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;line-height:1.42;height:100%;outline:none;overflow-y:auto;padding:12px 15px;tab-size:4;-moz-tab-size:4;text-align:left;white-space:pre-wrap;word-wrap:break-word}.ql-editor>*{cursor:text}.ql-editor p,.ql-editor ol,.ql-editor pre,.ql-editor blockquote,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{margin:0;padding:0}@supports (counter-set:none){.ql-editor p,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{counter-set:list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor p,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{counter-reset:list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor table{border-collapse:collapse}.ql-editor td{border:1px solid #000;padding:2px 5px}.ql-editor ol{padding-left:1.5em}.ql-editor li{list-style-type:none;padding-left:1.5em;position:relative}.ql-editor li>.ql-ui:before{display:inline-block;margin-left:-1.5em;margin-right:.3em;text-align:right;white-space:nowrap;width:1.2em}.ql-editor li[data-list=checked]>.ql-ui,.ql-editor li[data-list=unchecked]>.ql-ui{color:#777}.ql-editor li[data-list=bullet]>.ql-ui:before{content:'\\2022'}.ql-editor li[data-list=checked]>.ql-ui:before{content:'\\2611'}.ql-editor li[data-list=unchecked]>.ql-ui:before{content:'\\2610'}@supports (counter-set:none){.ql-editor li[data-list]{counter-set:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list]{counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered]{counter-increment:list-0}.ql-editor li[data-list=ordered]>.ql-ui:before{content:counter(list-0, decimal) '. '}.ql-editor li[data-list=ordered].ql-indent-1{counter-increment:list-1}.ql-editor li[data-list=ordered].ql-indent-1>.ql-ui:before{content:counter(list-1, lower-alpha) '. '}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-1{counter-set:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-2{counter-increment:list-2}.ql-editor li[data-list=ordered].ql-indent-2>.ql-ui:before{content:counter(list-2, lower-roman) '. '}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-2{counter-set:list-3 list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-3{counter-increment:list-3}.ql-editor li[data-list=ordered].ql-indent-3>.ql-ui:before{content:counter(list-3, decimal) '. '}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-3{counter-set:list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-4{counter-increment:list-4}.ql-editor li[data-list=ordered].ql-indent-4>.ql-ui:before{content:counter(list-4, lower-alpha) '. '}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-4{counter-set:list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-5{counter-increment:list-5}.ql-editor li[data-list=ordered].ql-indent-5>.ql-ui:before{content:counter(list-5, lower-roman) '. '}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-5{counter-set:list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-5{counter-reset:list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-6{counter-increment:list-6}.ql-editor li[data-list=ordered].ql-indent-6>.ql-ui:before{content:counter(list-6, decimal) '. '}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-6{counter-set:list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-6{counter-reset:list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-7{counter-increment:list-7}.ql-editor li[data-list=ordered].ql-indent-7>.ql-ui:before{content:counter(list-7, lower-alpha) '. '}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-7{counter-set:list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-7{counter-reset:list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-8{counter-increment:list-8}.ql-editor li[data-list=ordered].ql-indent-8>.ql-ui:before{content:counter(list-8, lower-roman) '. '}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-8{counter-set:list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-8{counter-reset:list-9}}.ql-editor li[data-list=ordered].ql-indent-9{counter-increment:list-9}.ql-editor li[data-list=ordered].ql-indent-9>.ql-ui:before{content:counter(list-9, decimal) '. '}.ql-editor .ql-indent-1:not(.ql-direction-rtl){padding-left:3em}.ql-editor li.ql-indent-1:not(.ql-direction-rtl){padding-left:4.5em}.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:3em}.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:4.5em}.ql-editor .ql-indent-2:not(.ql-direction-rtl){padding-left:6em}.ql-editor li.ql-indent-2:not(.ql-direction-rtl){padding-left:7.5em}.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:6em}.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:7.5em}.ql-editor .ql-indent-3:not(.ql-direction-rtl){padding-left:9em}.ql-editor li.ql-indent-3:not(.ql-direction-rtl){padding-left:10.5em}.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:9em}.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:10.5em}.ql-editor .ql-indent-4:not(.ql-direction-rtl){padding-left:12em}.ql-editor li.ql-indent-4:not(.ql-direction-rtl){padding-left:13.5em}.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:12em}.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:13.5em}.ql-editor .ql-indent-5:not(.ql-direction-rtl){padding-left:15em}.ql-editor li.ql-indent-5:not(.ql-direction-rtl){padding-left:16.5em}.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:15em}.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:16.5em}.ql-editor .ql-indent-6:not(.ql-direction-rtl){padding-left:18em}.ql-editor li.ql-indent-6:not(.ql-direction-rtl){padding-left:19.5em}.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:18em}.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:19.5em}.ql-editor .ql-indent-7:not(.ql-direction-rtl){padding-left:21em}.ql-editor li.ql-indent-7:not(.ql-direction-rtl){padding-left:22.5em}.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:21em}.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:22.5em}.ql-editor .ql-indent-8:not(.ql-direction-rtl){padding-left:24em}.ql-editor li.ql-indent-8:not(.ql-direction-rtl){padding-left:25.5em}.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:24em}.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:25.5em}.ql-editor .ql-indent-9:not(.ql-direction-rtl){padding-left:27em}.ql-editor li.ql-indent-9:not(.ql-direction-rtl){padding-left:28.5em}.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:27em}.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:28.5em}.ql-editor li.ql-direction-rtl{padding-right:1.5em}.ql-editor li.ql-direction-rtl>.ql-ui:before{margin-left:.3em;margin-right:-1.5em;text-align:left}.ql-editor table{table-layout:fixed;width:100%}.ql-editor table td{outline:none}.ql-editor .ql-code-block-container{font-family:monospace}.ql-editor .ql-video{display:block;max-width:100%}.ql-editor .ql-video.ql-align-center{margin:0 auto}.ql-editor .ql-video.ql-align-right{margin:0 0 0 auto}.ql-editor .ql-bg-black{background-color:#000}.ql-editor .ql-bg-red{background-color:#e60000}.ql-editor .ql-bg-orange{background-color:#f90}.ql-editor .ql-bg-yellow{background-color:#ff0}.ql-editor .ql-bg-green{background-color:#008a00}.ql-editor .ql-bg-blue{background-color:#06c}.ql-editor .ql-bg-purple{background-color:#93f}.ql-editor .ql-color-white{color:#fff}.ql-editor .ql-color-red{color:#e60000}.ql-editor .ql-color-orange{color:#f90}.ql-editor .ql-color-yellow{color:#ff0}.ql-editor .ql-color-green{color:#008a00}.ql-editor .ql-color-blue{color:#06c}.ql-editor .ql-color-purple{color:#93f}.ql-editor .ql-font-serif{font-family:Georgia,Times New Roman,serif}.ql-editor .ql-font-monospace{font-family:Monaco,Courier New,monospace}.ql-editor .ql-size-small{font-size:.75em}.ql-editor .ql-size-large{font-size:1.5em}.ql-editor .ql-size-huge{font-size:2.5em}.ql-editor .ql-direction-rtl{direction:rtl;text-align:inherit}.ql-editor .ql-align-center{text-align:center}.ql-editor .ql-align-justify{text-align:justify}.ql-editor .ql-align-right{text-align:right}.ql-editor .ql-ui{position:absolute}.ql-editor.ql-blank::before{color:rgba(0,0,0,0.6);content:attr(data-placeholder);font-style:italic;left:15px;pointer-events:none;position:absolute;right:15px}.ql-snow.ql-toolbar:after,.ql-snow .ql-toolbar:after{clear:both;content:'';display:table}.ql-snow.ql-toolbar button,.ql-snow .ql-toolbar button{background:none;border:none;cursor:pointer;display:inline-block;float:left;height:24px;padding:3px 5px;width:28px}.ql-snow.ql-toolbar button svg,.ql-snow .ql-toolbar button svg{float:left;height:100%}.ql-snow.ql-toolbar button:active:hover,.ql-snow .ql-toolbar button:active:hover{outline:none}.ql-snow.ql-toolbar input.ql-image[type=file],.ql-snow .ql-toolbar input.ql-image[type=file]{display:none}.ql-snow.ql-toolbar button:hover,.ql-snow .ql-toolbar button:hover,.ql-snow.ql-toolbar button:focus,.ql-snow .ql-toolbar button:focus,.ql-snow.ql-toolbar button.ql-active,.ql-snow .ql-toolbar button.ql-active,.ql-snow.ql-toolbar .ql-picker-label:hover,.ql-snow .ql-toolbar .ql-picker-label:hover,.ql-snow.ql-toolbar .ql-picker-label.ql-active,.ql-snow .ql-toolbar .ql-picker-label.ql-active,.ql-snow.ql-toolbar .ql-picker-item:hover,.ql-snow .ql-toolbar .ql-picker-item:hover,.ql-snow.ql-toolbar .ql-picker-item.ql-selected,.ql-snow .ql-toolbar .ql-picker-item.ql-selected{color:#06c}.ql-snow.ql-toolbar button:hover .ql-fill,.ql-snow .ql-toolbar button:hover .ql-fill,.ql-snow.ql-toolbar button:focus .ql-fill,.ql-snow .ql-toolbar button:focus .ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill{fill:#06c}.ql-snow.ql-toolbar button:hover .ql-stroke,.ql-snow .ql-toolbar button:hover .ql-stroke,.ql-snow.ql-toolbar button:focus .ql-stroke,.ql-snow .ql-toolbar button:focus .ql-stroke,.ql-snow.ql-toolbar button.ql-active .ql-stroke,.ql-snow .ql-toolbar button.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow.ql-toolbar button:hover .ql-stroke-miter,.ql-snow .ql-toolbar button:hover .ql-stroke-miter,.ql-snow.ql-toolbar button:focus .ql-stroke-miter,.ql-snow .ql-toolbar button:focus .ql-stroke-miter,.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter{stroke:#06c}@media (pointer:coarse){.ql-snow.ql-toolbar button:hover:not(.ql-active),.ql-snow .ql-toolbar button:hover:not(.ql-active){color:#444}.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill{fill:#444}.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter{stroke:#444}}.ql-snow{box-sizing:border-box}.ql-snow *{box-sizing:border-box}.ql-snow .ql-hidden{display:none}.ql-snow .ql-out-bottom,.ql-snow .ql-out-top{visibility:hidden}.ql-snow .ql-tooltip{position:absolute;transform:translateY(10px)}.ql-snow .ql-tooltip a{cursor:pointer;text-decoration:none}.ql-snow .ql-tooltip.ql-flip{transform:translateY(-10px)}.ql-snow .ql-formats{display:inline-block;vertical-align:middle}.ql-snow .ql-formats:after{clear:both;content:'';display:table}.ql-snow .ql-stroke{fill:none;stroke:#444;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}.ql-snow .ql-stroke-miter{fill:none;stroke:#444;stroke-miterlimit:10;stroke-width:2}.ql-snow .ql-fill,.ql-snow .ql-stroke.ql-fill{fill:#444}.ql-snow .ql-empty{fill:none}.ql-snow .ql-even{fill-rule:evenodd}.ql-snow .ql-thin,.ql-snow .ql-stroke.ql-thin{stroke-width:1}.ql-snow .ql-transparent{opacity:.4}.ql-snow .ql-direction svg:last-child{display:none}.ql-snow .ql-direction.ql-active svg:last-child{display:inline}.ql-snow .ql-direction.ql-active svg:first-child{display:none}.ql-snow .ql-editor h1{font-size:2em}.ql-snow .ql-editor h2{font-size:1.5em}.ql-snow .ql-editor h3{font-size:1.17em}.ql-snow .ql-editor h4{font-size:1em}.ql-snow .ql-editor h5{font-size:.83em}.ql-snow .ql-editor h6{font-size:.67em}.ql-snow .ql-editor a{text-decoration:underline}.ql-snow .ql-editor blockquote{border-left:4px solid #ccc;margin-bottom:5px;margin-top:5px;padding-left:16px}.ql-snow .ql-editor code,.ql-snow .ql-editor .ql-code-block-container{background-color:#f0f0f0;border-radius:3px}.ql-snow .ql-editor .ql-code-block-container{margin-bottom:5px;margin-top:5px;padding:5px 10px}.ql-snow .ql-editor code{font-size:85%;padding:2px 4px}.ql-snow .ql-editor .ql-code-block-container{background-color:#23241f;color:#f8f8f2;overflow:visible}.ql-snow .ql-editor img{max-width:100%}.ql-snow .ql-picker{color:#444;display:inline-block;float:left;font-size:14px;font-weight:500;height:24px;position:relative;vertical-align:middle}.ql-snow .ql-picker-label{cursor:pointer;display:inline-block;height:100%;padding-left:8px;padding-right:2px;position:relative;width:100%}.ql-snow .ql-picker-label::before{display:inline-block;line-height:22px}.ql-snow .ql-picker-options{background-color:#fff;display:none;min-width:100%;padding:4px 8px;position:absolute;white-space:nowrap}.ql-snow .ql-picker-options .ql-picker-item{cursor:pointer;display:block;padding-bottom:5px;padding-top:5px}.ql-snow .ql-picker.ql-expanded .ql-picker-label{color:#ccc;z-index:2}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill{fill:#ccc}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke{stroke:#ccc}.ql-snow .ql-picker.ql-expanded .ql-picker-options{display:block;margin-top:-1px;top:100%;z-index:1}.ql-snow .ql-color-picker,.ql-snow .ql-icon-picker{width:28px}.ql-snow .ql-color-picker .ql-picker-label,.ql-snow .ql-icon-picker .ql-picker-label{padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-label svg,.ql-snow .ql-icon-picker .ql-picker-label svg{right:4px}.ql-snow .ql-icon-picker .ql-picker-options{padding:4px 0}.ql-snow .ql-icon-picker .ql-picker-item{height:24px;width:24px;padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-options{padding:3px 5px;width:152px}.ql-snow .ql-color-picker .ql-picker-item{border:1px solid transparent;float:left;height:16px;margin:2px;padding:0;width:16px}.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg{position:absolute;margin-top:-9px;right:0;top:50%;width:18px}.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=''])::before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=''])::before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=''])::before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=''])::before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=''])::before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=''])::before{content:attr(data-label)}.ql-snow .ql-picker.ql-header{width:98px}.ql-snow .ql-picker.ql-header .ql-picker-label::before,.ql-snow .ql-picker.ql-header .ql-picker-item::before{content:'Normal'}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"1\"]::before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"1\"]::before{content:'Heading 1'}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"2\"]::before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"2\"]::before{content:'Heading 2'}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"3\"]::before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"3\"]::before{content:'Heading 3'}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"4\"]::before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"4\"]::before{content:'Heading 4'}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"5\"]::before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"5\"]::before{content:'Heading 5'}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"6\"]::before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"6\"]::before{content:'Heading 6'}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"1\"]::before{font-size:2em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"2\"]::before{font-size:1.5em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"3\"]::before{font-size:1.17em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"4\"]::before{font-size:1em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"5\"]::before{font-size:.83em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"6\"]::before{font-size:.67em}.ql-snow .ql-picker.ql-font{width:108px}.ql-snow .ql-picker.ql-font .ql-picker-label::before,.ql-snow .ql-picker.ql-font .ql-picker-item::before{content:'Sans Serif'}.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]::before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before{content:'Serif'}.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]::before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before{content:'Monospace'}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before{font-family:Georgia,Times New Roman,serif}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before{font-family:Monaco,Courier New,monospace}.ql-snow .ql-picker.ql-size{width:98px}.ql-snow .ql-picker.ql-size .ql-picker-label::before,.ql-snow .ql-picker.ql-size .ql-picker-item::before{content:'Normal'}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]::before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before{content:'Small'}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]::before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before{content:'Large'}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]::before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before{content:'Huge'}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before{font-size:10px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before{font-size:18px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before{font-size:32px}.ql-snow .ql-color-picker.ql-background .ql-picker-item{background-color:#fff}.ql-snow .ql-color-picker.ql-color .ql-picker-item{background-color:#000}.ql-code-block-container{position:relative}.ql-code-block-container .ql-ui{right:5px;top:5px}.ql-toolbar.ql-snow{border:1px solid #ccc;box-sizing:border-box;font-family:'Helvetica Neue','Helvetica','Arial',sans-serif;padding:8px}.ql-toolbar.ql-snow .ql-formats{margin-right:15px}.ql-toolbar.ql-snow .ql-picker-label{border:1px solid transparent}.ql-toolbar.ql-snow .ql-picker-options{border:1px solid transparent;box-shadow:rgba(0,0,0,0.2) 0 2px 8px}.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label{border-color:#ccc}.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options{border-color:#ccc}.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected,.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover{border-color:#000}.ql-toolbar.ql-snow+.ql-container.ql-snow{border-top:0}.ql-snow .ql-tooltip{background-color:#fff;border:1px solid #ccc;box-shadow:0 0 5px #ddd;color:#444;padding:5px 12px;white-space:nowrap}.ql-snow .ql-tooltip::before{content:\"Visit URL:\";line-height:26px;margin-right:8px}.ql-snow .ql-tooltip input[type=text]{display:none;border:1px solid #ccc;font-size:13px;height:26px;margin:0;padding:3px 5px;width:170px}.ql-snow .ql-tooltip a.ql-preview{display:inline-block;max-width:200px;overflow-x:hidden;text-overflow:ellipsis;vertical-align:top}.ql-snow .ql-tooltip a.ql-action::after{border-right:1px solid #ccc;content:'Edit';margin-left:16px;padding-right:8px}.ql-snow .ql-tooltip a.ql-remove::before{content:'Remove';margin-left:8px}.ql-snow .ql-tooltip a{line-height:26px}.ql-snow .ql-tooltip.ql-editing a.ql-preview,.ql-snow .ql-tooltip.ql-editing a.ql-remove{display:none}.ql-snow .ql-tooltip.ql-editing input[type=text]{display:inline-block}.ql-snow .ql-tooltip.ql-editing a.ql-action::after{border-right:0;content:'Save';padding-right:0}.ql-snow .ql-tooltip[data-mode=link]::before{content:\"Enter link:\"}.ql-snow .ql-tooltip[data-mode=formula]::before{content:\"Enter formula:\"}.ql-snow .ql-tooltip[data-mode=video]::before{content:\"Enter video:\"}.ql-snow a{color:#06c}.ql-container.ql-snow{border:1px solid #ccc}";const ff=hf;const df='.mg-c-input__readonly-value{min-height:var(--mg-b-font-size);align-self:flex-start;margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2);word-break:break-word}.mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}.mg-c-input__wrapper{display:flex;width:100%;flex-direction:column;border-width:var(--mg-c-input-border-width);border-style:solid;border-color:var(--mg-c-input-color-border);border-radius:var(--mg-c-input-border-radius);background-color:var(--mg-b-color-light)}.mg-c-input__wrapper:focus-within{box-shadow:0 0 var(--mg-b-size-4) var(--mg-c-input-color-box-shadow-focus);outline:Highlight auto .1rem;outline:-webkit-focus-ring-color auto .1rem}.mg-c-input--has-error .mg-c-input__wrapper{border-color:var(--mg-b-color-danger)}.mg-c-input--disabled .mg-c-input__wrapper{opacity:var(--mg-b-opacity-element-disabled)}.mg-c-input--rich-text-editor .mg-c-input__readonly-value p{margin:0}.mg-c-input--rich-text-editor .mg-c-input__readonly-value p:not(:first-child){margin-top:1em}.mg-c-input--rich-text-editor .ql-toolbar{display:flex;flex-wrap:wrap;padding:var(--mg-b-size-8);border:0;border-radius:var(--mg-c-input-border-radius) var(--mg-c-input-border-radius) 0 0;background:var(--mg-b-color-neutral-0);border-block-end-width:var(--mg-c-input-border-width);border-block-end-color:var(--mg-c-input-color-border);border-block-end-style:solid}.mg-c-input--rich-text-editor .ql-toolbar .ql-formats{display:inline-flex;margin:inherit;gap:.2rem}.mg-c-input--rich-text-editor .ql-toolbar .ql-formats:not(:last-child)::after{width:.1rem;height:var(--mg-b-size-16);background:var(--mg-c-input-color-border);content:"";margin-block:var(--mg-b-size-8);margin-inline:var(--mg-b-size-8)}.mg-c-input--rich-text-editor .ql-toolbar button{display:flex;min-width:var(--mg-b-size-32);height:var(--mg-b-size-32);align-items:center;justify-content:center;padding:var(--mg-b-size-4);border:.1rem solid rgba(0,0,0,0);border-radius:var(--mg-b-size-radius);color:var(--mg-b-color-dark);float:inherit;transition-duration:.2s;transition-property:background-color,border-color;transition-timing-function:ease-in-out}.mg-c-input--rich-text-editor .ql-toolbar button .ql-fill,.mg-c-input--rich-text-editor .ql-toolbar button:hover .ql-fill,.mg-c-input--rich-text-editor .ql-toolbar button:focus .ql-fill,.mg-c-input--rich-text-editor .ql-toolbar button.ql-active .ql-fill{fill:currentcolor}.mg-c-input--rich-text-editor .ql-toolbar button:hover .ql-stroke,.mg-c-input--rich-text-editor .ql-toolbar button:focus .ql-stroke,.mg-c-input--rich-text-editor .ql-toolbar button.ql-active .ql-stroke,.mg-c-input--rich-text-editor .ql-toolbar button .ql-stroke{stroke:currentcolor}.mg-c-input--rich-text-editor .ql-toolbar button svg{width:var(--mg-b-size-20);height:var(--mg-b-size-20)}.mg-c-input--rich-text-editor .ql-toolbar button:focus{color:var(--mg-b-color-dark)}.mg-c-input--rich-text-editor .ql-toolbar button:focus-visible,.mg-c-input--rich-text-editor .ql-toolbar button:hover,.mg-c-input--rich-text-editor .ql-toolbar button.ql-active{border-color:var(--mg-b-color-neutral-70);background:var(--mg-b-color-neutral-20);color:var(--mg-b-color-dark)}.mg-c-input--rich-text-editor .ql-toolbar button .ql-stroke{stroke-width:.12rem}.mg-c-input--rich-text-editor .ql-toolbar button .ql-stroke.ql-thin{stroke-width:.1rem}.mg-c-input--rich-text-editor .ql-toolbar button.ql-bold .ql-stroke{stroke-width:.2rem}.mg-c-input--rich-text-editor .ql-container{border:0;border-radius:0 0 var(--mg-c-input-border-radius) var(--mg-c-input-border-radius);margin:0 .1rem .1rem;background:var(--mg-b-color-neutral-0)}.mg-c-input--rich-text-editor .ql-editor{min-height:calc(calc(var(--mg-b-font-size) * var(--mg-b-line-height) * var(--mg-c-input-rich-text-editor-rows, 3)) + calc((var(--mg-b-size-min-height) - var(--mg-b-font-size) * var(--mg-b-line-height)) / 2));padding:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2) var(--mg-b-size-8);color:var(--mg-b-color-dark);font-size:var(--mg-b-font-size)}.mg-c-input--rich-text-editor .ql-editor.ql-blank::before{right:var(--mg-b-size-8);left:var(--mg-b-size-8)}.mg-c-input--rich-text-editor .ql-editor p:not(:first-child){margin-top:1em}.mg-c-input--rich-text-editor.mg-c-input--disabled .ql-toolbar{pointer-events:none}.mg-c-input--rich-text-editor.mg-c-input--has-error .ql-toolbar{border-color:var(--mg-b-color-danger)}';const pf=df;const bf=class{constructor(i){t(this,i);this.inputValid=e(this,"input-valid",7);this.valueChange=e(this,"value-change",7);this.hasDisplayedError=false;this.classFocus="mg-u-is-focused";this.value="";this.labelHide=false;this.rows=5;this.required=false;this.readonly=false;this.disabled=false;this.tooltipPosition="input";this.classCollection=new s(["mg-c-input--rich-text-editor"]);this.isEmpty=()=>{const t=this.getTextContent();return!(r(t)&&t!=="\n")};this.getTextContent=()=>this.value.replace(/<[^>]*>/g,"").trim();this.getPatternValidity=()=>this.pattern===undefined||new RegExp(`^${this.pattern}$`,"u").test(this.getTextContent());this.checkValidity=()=>{this.setValidity(this.readonly||this.disabled||(this.required?!this.isEmpty():true)&&this.getPatternValidity())};this.setErrorMessage=t=>{this.errorMessage=undefined;if(this.valid)return;else if(r(t)){this.errorMessage=t}else if(this.required&&this.isEmpty()){this.errorMessage=this.messages.errors.required}else if(!this.getPatternValidity()){this.errorMessage=this.patternErrorMessage}};this.handleFocus=()=>{this.classCollection.add(this.classFocus);this.classCollection=new s(this.classCollection.classes)};this.handleBlur=()=>{this.classCollection.delete(this.classFocus);this.classCollection=new s(this.classCollection.classes);if(!this.readonly){this.checkValidity();this.setErrorMessage();if(!this.valid){this.hasDisplayedError=true}}};this.handleTextChange=()=>{const t=this.editor.getSemanticHTML();this.value=t;this.valueChange.emit(t);this.checkValidity();if(this.hasDisplayedError){this.setErrorMessage()}}}watchReadonly(t){if(t)this.classCollection.add(o);else this.classCollection.delete(o)}watchDisabled(t){var e,i;if(t){this.classCollection.add(a);(e=this.editor)===null||e===void 0?void 0:e.disable()}else{this.classCollection.delete(a);(i=this.editor)===null||i===void 0?void 0:i.enable()}}handleValidityChange(){if(this.editor!==undefined&&this.editor!==null){this.checkValidity();if(this.hasDisplayedError){this.setErrorMessage();this.hasDisplayedError=false}}}validatePattern(t){if(t!==undefined&&!(r(this.pattern)&&r(this.patternErrorMessage))){throw new Error(`<mg-input-rich-text-editor> props "pattern" and "patternErrorMessage" must be non-empty string and paired. Passed value: "pattern='${l(this.pattern)}'" and "patternErrorMessage='${l(this.patternErrorMessage)}'".`)}}async getHTML(){return new Promise((t=>{requestAnimationFrame((()=>{t(this.editor.getSemanticHTML())}))}))}async getText(){return new Promise((t=>{requestAnimationFrame((()=>{t(this.editor.getText())}))}))}async displayError(){return new Promise((t=>{requestAnimationFrame((()=>{this.checkValidity();this.setErrorMessage();this.hasDisplayedError=this.invalid;t()}))}))}async setError(t,e){if(typeof t!=="boolean"){throw new Error('<mg-input-rich-text-editor> method "setError()" param "valid" must be a boolean.')}else if(!r(e)){throw new Error('<mg-input-rich-text-editor> method "setError()" param "errorMessage" must be a string.')}else{this.setValidity(t);this.setErrorMessage(t?undefined:e);this.hasDisplayedError=this.invalid}}async reset(){if(!this.readonly){this.value="";this.editor.setText("");this.checkValidity();this.errorMessage=undefined;this.hasDisplayedError=false}}setValidity(t){const e=this.valid;this.valid=t;this.invalid=!this.valid;if(this.valid!==e){this.inputValid.emit(this.valid)}}componentWillLoad(){this.messages=c(this.element).messages;this.element.style.setProperty("--mg-c-input-rich-text-editor-rows",this.rows.toString());this.validatePattern(this.pattern);this.validatePattern(this.patternErrorMessage);this.watchReadonly(this.readonly);this.watchDisabled(this.disabled);return setTimeout((()=>{this.checkValidity()}),0)}componentDidLoad(){if(this.readonly)return;this.editor=uf(this.wrapperElement,{theme:"snow",modules:this.modules,readOnly:this.readonly||this.disabled,placeholder:this.placeholder,value:this.value,handleTextChange:this.handleTextChange,handleBlur:this.handleBlur,handleFocus:this.handleFocus})}render(){return i("mg-input",{key:"4cc25a69bf7658bd1c487eb9cf22378f9cf0d473",identifier:this.identifier,class:this.classCollection.join(),label:this.label,labelOnTop:this.labelOnTop,labelHide:this.labelHide,required:this.required,tooltip:this.tooltip,tooltipPosition:this.tooltipPosition,helpText:this.helpText,errorMessage:this.hasDisplayedError?this.errorMessage:undefined},this.readonly?i("div",{class:"mg-c-input__readonly-value",innerHTML:this.value}):i("div",{ref:t=>{this.wrapperElement=t},id:this.identifier,class:"mg-c-input__wrapper"},i("div",null)))}get element(){return n(this)}static get watchers(){return{readonly:["watchReadonly","handleValidityChange"],disabled:["watchDisabled","handleValidityChange"],required:["handleValidityChange"],pattern:["validatePattern"],patternErrorMessage:["validatePattern"]}}};bf.style=ff+pf;export{bf as mg_input_rich_text_editor};
2
+ //# sourceMappingURL=p-17f0b7eb.entry.js.map