@startinblox/core 0.17.21-beta.9 → 0.17.22

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 (260) hide show
  1. package/package.json +2 -2
  2. package/dist/_snowpack/env.js +0 -3
  3. package/dist/_snowpack/pkg/autolinker.js +0 -4281
  4. package/dist/_snowpack/pkg/autolinker.js.map +0 -1
  5. package/dist/_snowpack/pkg/autolinker.js.map.proxy.js +0 -1
  6. package/dist/_snowpack/pkg/common/_baseUnary-217dffb2.js +0 -377
  7. package/dist/_snowpack/pkg/common/_baseUnary-217dffb2.js.map +0 -1
  8. package/dist/_snowpack/pkg/common/_baseUnary-217dffb2.js.map.proxy.js +0 -1
  9. package/dist/_snowpack/pkg/common/_commonjsHelpers-8c19dec8.js +0 -22
  10. package/dist/_snowpack/pkg/common/_commonjsHelpers-8c19dec8.js.map +0 -1
  11. package/dist/_snowpack/pkg/common/_commonjsHelpers-8c19dec8.js.map.proxy.js +0 -1
  12. package/dist/_snowpack/pkg/common/decode-a4c334cf.js +0 -216
  13. package/dist/_snowpack/pkg/common/decode-a4c334cf.js.map +0 -1
  14. package/dist/_snowpack/pkg/common/decode-a4c334cf.js.map.proxy.js +0 -1
  15. package/dist/_snowpack/pkg/common/lit-html-babd44cd.js +0 -1119
  16. package/dist/_snowpack/pkg/common/lit-html-babd44cd.js.map +0 -1
  17. package/dist/_snowpack/pkg/common/lit-html-babd44cd.js.map.proxy.js +0 -1
  18. package/dist/_snowpack/pkg/delta-markdown-for-quill.js +0 -25677
  19. package/dist/_snowpack/pkg/delta-markdown-for-quill.js.map +0 -1
  20. package/dist/_snowpack/pkg/delta-markdown-for-quill.js.map.proxy.js +0 -1
  21. package/dist/_snowpack/pkg/dialog-polyfill.js +0 -859
  22. package/dist/_snowpack/pkg/dialog-polyfill.js.map +0 -1
  23. package/dist/_snowpack/pkg/dialog-polyfill.js.map.proxy.js +0 -1
  24. package/dist/_snowpack/pkg/fusejs.js +0 -1783
  25. package/dist/_snowpack/pkg/fusejs.js.map +0 -1
  26. package/dist/_snowpack/pkg/fusejs.js.map.proxy.js +0 -1
  27. package/dist/_snowpack/pkg/import-map.json +0 -23
  28. package/dist/_snowpack/pkg/jsonld-context-parser.js +0 -804
  29. package/dist/_snowpack/pkg/jsonld-context-parser.js.map +0 -1
  30. package/dist/_snowpack/pkg/jsonld-context-parser.js.map.proxy.js +0 -1
  31. package/dist/_snowpack/pkg/leaflet/dist/leaflet.css +0 -640
  32. package/dist/_snowpack/pkg/leaflet/dist/leaflet.css.proxy.js +0 -10
  33. package/dist/_snowpack/pkg/leaflet.markercluster/dist/MarkerCluster.Default.css +0 -60
  34. package/dist/_snowpack/pkg/leaflet.markercluster/dist/MarkerCluster.Default.css.proxy.js +0 -10
  35. package/dist/_snowpack/pkg/leaflet.markercluster/dist/MarkerCluster.css +0 -14
  36. package/dist/_snowpack/pkg/leaflet.markercluster/dist/MarkerCluster.css.proxy.js +0 -10
  37. package/dist/_snowpack/pkg/lit-html/directives/if-defined.js +0 -40
  38. package/dist/_snowpack/pkg/lit-html/directives/if-defined.js.map +0 -1
  39. package/dist/_snowpack/pkg/lit-html/directives/if-defined.js.map.proxy.js +0 -1
  40. package/dist/_snowpack/pkg/lit-html/directives/unsafe-html.js +0 -46
  41. package/dist/_snowpack/pkg/lit-html/directives/unsafe-html.js.map +0 -1
  42. package/dist/_snowpack/pkg/lit-html/directives/unsafe-html.js.map.proxy.js +0 -1
  43. package/dist/_snowpack/pkg/lit-html/directives/until.js +0 -88
  44. package/dist/_snowpack/pkg/lit-html/directives/until.js.map +0 -1
  45. package/dist/_snowpack/pkg/lit-html/directives/until.js.map.proxy.js +0 -1
  46. package/dist/_snowpack/pkg/lit-html.js +0 -92
  47. package/dist/_snowpack/pkg/lit-html.js.map +0 -1
  48. package/dist/_snowpack/pkg/lit-html.js.map.proxy.js +0 -1
  49. package/dist/_snowpack/pkg/markdown-it.js +0 -11860
  50. package/dist/_snowpack/pkg/markdown-it.js.map +0 -1
  51. package/dist/_snowpack/pkg/markdown-it.js.map.proxy.js +0 -1
  52. package/dist/_snowpack/pkg/quill/dist/quill.snow.css +0 -945
  53. package/dist/_snowpack/pkg/quill/dist/quill.snow.css.proxy.js +0 -10
  54. package/dist/_snowpack/pkg/quill-delta-to-markdown.js +0 -1029
  55. package/dist/_snowpack/pkg/quill-delta-to-markdown.js.map +0 -1
  56. package/dist/_snowpack/pkg/quill-delta-to-markdown.js.map.proxy.js +0 -1
  57. package/dist/_snowpack/pkg/quill.js +0 -13382
  58. package/dist/_snowpack/pkg/quill.js.map +0 -1
  59. package/dist/_snowpack/pkg/quill.js.map.proxy.js +0 -1
  60. package/dist/_snowpack/pkg/slim-select.js +0 -4
  61. package/dist/_snowpack/pkg/slim-select.js.map +0 -1
  62. package/dist/_snowpack/pkg/slim-select.js.map.proxy.js +0 -1
  63. package/dist/_snowpack/pkg/tui-calendar/dist/tui-calendar.css +0 -1164
  64. package/dist/_snowpack/pkg/tui-calendar/dist/tui-calendar.css.proxy.js +0 -10
  65. package/dist/_snowpack/pkg/tui-calendar.js +0 -42285
  66. package/dist/_snowpack/pkg/tui-calendar.js.map +0 -1
  67. package/dist/_snowpack/pkg/tui-calendar.js.map.proxy.js +0 -1
  68. package/dist/components/solid-ac-checker.js +0 -51
  69. package/dist/components/solid-ac-checker.js.map +0 -1
  70. package/dist/components/solid-calendar.js +0 -87
  71. package/dist/components/solid-calendar.js.map +0 -1
  72. package/dist/components/solid-delete.js +0 -111
  73. package/dist/components/solid-delete.js.map +0 -1
  74. package/dist/components/solid-display.js +0 -194
  75. package/dist/components/solid-display.js.map +0 -1
  76. package/dist/components/solid-form-search.js +0 -226
  77. package/dist/components/solid-form-search.js.map +0 -1
  78. package/dist/components/solid-form.js +0 -354
  79. package/dist/components/solid-form.js.map +0 -1
  80. package/dist/components/solid-lang.js +0 -46
  81. package/dist/components/solid-lang.js.map +0 -1
  82. package/dist/components/solid-map.js +0 -242
  83. package/dist/components/solid-map.js.map +0 -1
  84. package/dist/components/solid-table.js +0 -263
  85. package/dist/components/solid-table.js.map +0 -1
  86. package/dist/components/solid-widget.js +0 -94
  87. package/dist/components/solid-widget.js.map +0 -1
  88. package/dist/import.css +0 -4
  89. package/dist/index.js +0 -43
  90. package/dist/index.js.map +0 -1
  91. package/dist/libs/Component.js +0 -19
  92. package/dist/libs/Component.js.map +0 -1
  93. package/dist/libs/ComponentFactory.js +0 -196
  94. package/dist/libs/ComponentFactory.js.map +0 -1
  95. package/dist/libs/Compositor.js +0 -103
  96. package/dist/libs/Compositor.js.map +0 -1
  97. package/dist/libs/Sib.js +0 -58
  98. package/dist/libs/Sib.js.map +0 -1
  99. package/dist/libs/filter.js +0 -214
  100. package/dist/libs/filter.js.map +0 -1
  101. package/dist/libs/helpers.js +0 -219
  102. package/dist/libs/helpers.js.map +0 -1
  103. package/dist/libs/interfaces.js +0 -6
  104. package/dist/libs/interfaces.js.map +0 -1
  105. package/dist/libs/lit-helpers.js +0 -169
  106. package/dist/libs/lit-helpers.js.map +0 -1
  107. package/dist/libs/polyfills.js +0 -40
  108. package/dist/libs/polyfills.js.map +0 -1
  109. package/dist/libs/store/store.js +0 -863
  110. package/dist/libs/store/store.js.map +0 -1
  111. package/dist/locales/en.json +0 -10
  112. package/dist/locales/en.json.proxy.js +0 -2
  113. package/dist/locales/fr.json +0 -10
  114. package/dist/locales/fr.json.proxy.js +0 -2
  115. package/dist/mixins/attributeBinderMixin.js +0 -124
  116. package/dist/mixins/attributeBinderMixin.js.map +0 -1
  117. package/dist/mixins/contextMixin.js +0 -28
  118. package/dist/mixins/contextMixin.js.map +0 -1
  119. package/dist/mixins/counterMixin.js +0 -75
  120. package/dist/mixins/counterMixin.js.map +0 -1
  121. package/dist/mixins/federationMixin.js +0 -63
  122. package/dist/mixins/federationMixin.js.map +0 -1
  123. package/dist/mixins/filterMixin.js +0 -136
  124. package/dist/mixins/filterMixin.js.map +0 -1
  125. package/dist/mixins/grouperMixin.js +0 -80
  126. package/dist/mixins/grouperMixin.js.map +0 -1
  127. package/dist/mixins/highlighterMixin.js +0 -42
  128. package/dist/mixins/highlighterMixin.js.map +0 -1
  129. package/dist/mixins/interfaces.js +0 -8
  130. package/dist/mixins/interfaces.js.map +0 -1
  131. package/dist/mixins/listMixin.js +0 -136
  132. package/dist/mixins/listMixin.js.map +0 -1
  133. package/dist/mixins/nextMixin.js +0 -26
  134. package/dist/mixins/nextMixin.js.map +0 -1
  135. package/dist/mixins/paginateMixin.js +0 -110
  136. package/dist/mixins/paginateMixin.js.map +0 -1
  137. package/dist/mixins/requiredMixin.js +0 -34
  138. package/dist/mixins/requiredMixin.js.map +0 -1
  139. package/dist/mixins/sorterMixin.js +0 -149
  140. package/dist/mixins/sorterMixin.js.map +0 -1
  141. package/dist/mixins/storeMixin.js +0 -102
  142. package/dist/mixins/storeMixin.js.map +0 -1
  143. package/dist/mixins/translationMixin.js +0 -68
  144. package/dist/mixins/translationMixin.js.map +0 -1
  145. package/dist/mixins/validationMixin.js +0 -113
  146. package/dist/mixins/validationMixin.js.map +0 -1
  147. package/dist/mixins/widgetMixin.js +0 -447
  148. package/dist/mixins/widgetMixin.js.map +0 -1
  149. package/dist/new-widgets/attributeMixins/actionMixin.js +0 -14
  150. package/dist/new-widgets/attributeMixins/actionMixin.js.map +0 -1
  151. package/dist/new-widgets/attributeMixins/blankMixin.js +0 -10
  152. package/dist/new-widgets/attributeMixins/blankMixin.js.map +0 -1
  153. package/dist/new-widgets/attributeMixins/booleanMixin.js +0 -10
  154. package/dist/new-widgets/attributeMixins/booleanMixin.js.map +0 -1
  155. package/dist/new-widgets/attributeMixins/index.js +0 -20
  156. package/dist/new-widgets/attributeMixins/index.js.map +0 -1
  157. package/dist/new-widgets/attributeMixins/mailtoMixin.js +0 -10
  158. package/dist/new-widgets/attributeMixins/mailtoMixin.js.map +0 -1
  159. package/dist/new-widgets/attributeMixins/multipleMixin.js +0 -28
  160. package/dist/new-widgets/attributeMixins/multipleMixin.js.map +0 -1
  161. package/dist/new-widgets/attributeMixins/numberMixin.js +0 -10
  162. package/dist/new-widgets/attributeMixins/numberMixin.js.map +0 -1
  163. package/dist/new-widgets/attributeMixins/placeholderMixin.js +0 -19
  164. package/dist/new-widgets/attributeMixins/placeholderMixin.js.map +0 -1
  165. package/dist/new-widgets/attributeMixins/telMixin.js +0 -10
  166. package/dist/new-widgets/attributeMixins/telMixin.js.map +0 -1
  167. package/dist/new-widgets/baseWidgetMixin.js +0 -122
  168. package/dist/new-widgets/baseWidgetMixin.js.map +0 -1
  169. package/dist/new-widgets/callbackMixins/autocompletionMixin.js +0 -104
  170. package/dist/new-widgets/callbackMixins/autocompletionMixin.js.map +0 -1
  171. package/dist/new-widgets/callbackMixins/index.js +0 -8
  172. package/dist/new-widgets/callbackMixins/index.js.map +0 -1
  173. package/dist/new-widgets/callbackMixins/richtextMixin.js +0 -42
  174. package/dist/new-widgets/callbackMixins/richtextMixin.js.map +0 -1
  175. package/dist/new-widgets/callbackMixins/slimselect.css +0 -2
  176. package/dist/new-widgets/callbackMixins/slimselect.css.proxy.js +0 -10
  177. package/dist/new-widgets/new-widget-factory.js +0 -96
  178. package/dist/new-widgets/new-widget-factory.js.map +0 -1
  179. package/dist/new-widgets/templateAdditionMixins/addableMixin.js +0 -41
  180. package/dist/new-widgets/templateAdditionMixins/addableMixin.js.map +0 -1
  181. package/dist/new-widgets/templateAdditionMixins/index.js +0 -14
  182. package/dist/new-widgets/templateAdditionMixins/index.js.map +0 -1
  183. package/dist/new-widgets/templateAdditionMixins/labelLastMixin.js +0 -29
  184. package/dist/new-widgets/templateAdditionMixins/labelLastMixin.js.map +0 -1
  185. package/dist/new-widgets/templateAdditionMixins/labelMixin.js +0 -31
  186. package/dist/new-widgets/templateAdditionMixins/labelMixin.js.map +0 -1
  187. package/dist/new-widgets/templates/defaultTemplatesDirectory.js +0 -36
  188. package/dist/new-widgets/templates/defaultTemplatesDirectory.js.map +0 -1
  189. package/dist/new-widgets/templates/displayTemplatesDirectory.js +0 -90
  190. package/dist/new-widgets/templates/displayTemplatesDirectory.js.map +0 -1
  191. package/dist/new-widgets/templates/formTemplatesDirectory.js +0 -397
  192. package/dist/new-widgets/templates/formTemplatesDirectory.js.map +0 -1
  193. package/dist/new-widgets/templates/groupTemplatesDirectory.js +0 -21
  194. package/dist/new-widgets/templates/groupTemplatesDirectory.js.map +0 -1
  195. package/dist/new-widgets/templates/index.js +0 -7
  196. package/dist/new-widgets/templates/index.js.map +0 -1
  197. package/dist/new-widgets/templates/setTemplatesDirectory.js +0 -49
  198. package/dist/new-widgets/templates/setTemplatesDirectory.js.map +0 -1
  199. package/dist/new-widgets/templatesDependencies/altMixin.js +0 -13
  200. package/dist/new-widgets/templatesDependencies/altMixin.js.map +0 -1
  201. package/dist/new-widgets/templatesDependencies/editableMixin.js +0 -77
  202. package/dist/new-widgets/templatesDependencies/editableMixin.js.map +0 -1
  203. package/dist/new-widgets/templatesDependencies/filterRangeFormMixin.js +0 -38
  204. package/dist/new-widgets/templatesDependencies/filterRangeFormMixin.js.map +0 -1
  205. package/dist/new-widgets/templatesDependencies/formCheckboxMixin.js +0 -14
  206. package/dist/new-widgets/templatesDependencies/formCheckboxMixin.js.map +0 -1
  207. package/dist/new-widgets/templatesDependencies/formCheckboxesMixin.js +0 -51
  208. package/dist/new-widgets/templatesDependencies/formCheckboxesMixin.js.map +0 -1
  209. package/dist/new-widgets/templatesDependencies/formDropdownMixin.js +0 -66
  210. package/dist/new-widgets/templatesDependencies/formDropdownMixin.js.map +0 -1
  211. package/dist/new-widgets/templatesDependencies/formFileMixin.js +0 -81
  212. package/dist/new-widgets/templatesDependencies/formFileMixin.js.map +0 -1
  213. package/dist/new-widgets/templatesDependencies/formLengthMixin.js +0 -19
  214. package/dist/new-widgets/templatesDependencies/formLengthMixin.js.map +0 -1
  215. package/dist/new-widgets/templatesDependencies/formMinMaxMixin.js +0 -19
  216. package/dist/new-widgets/templatesDependencies/formMinMaxMixin.js.map +0 -1
  217. package/dist/new-widgets/templatesDependencies/formMixin.js +0 -66
  218. package/dist/new-widgets/templatesDependencies/formMixin.js.map +0 -1
  219. package/dist/new-widgets/templatesDependencies/formNumberMixin.js +0 -14
  220. package/dist/new-widgets/templatesDependencies/formNumberMixin.js.map +0 -1
  221. package/dist/new-widgets/templatesDependencies/formRadioMixin.js +0 -16
  222. package/dist/new-widgets/templatesDependencies/formRadioMixin.js.map +0 -1
  223. package/dist/new-widgets/templatesDependencies/formStepMixin.js +0 -13
  224. package/dist/new-widgets/templatesDependencies/formStepMixin.js.map +0 -1
  225. package/dist/new-widgets/templatesDependencies/linkTextMixin.js +0 -14
  226. package/dist/new-widgets/templatesDependencies/linkTextMixin.js.map +0 -1
  227. package/dist/new-widgets/templatesDependencies/multipleFormMixin.js +0 -125
  228. package/dist/new-widgets/templatesDependencies/multipleFormMixin.js.map +0 -1
  229. package/dist/new-widgets/templatesDependencies/multipleselectFormMixin.js +0 -74
  230. package/dist/new-widgets/templatesDependencies/multipleselectFormMixin.js.map +0 -1
  231. package/dist/new-widgets/templatesDependencies/patternMixin.js +0 -19
  232. package/dist/new-widgets/templatesDependencies/patternMixin.js.map +0 -1
  233. package/dist/new-widgets/templatesDependencies/rangeMixin.js +0 -110
  234. package/dist/new-widgets/templatesDependencies/rangeMixin.js.map +0 -1
  235. package/dist/new-widgets/templatesDependencies/setMixin.js +0 -12
  236. package/dist/new-widgets/templatesDependencies/setMixin.js.map +0 -1
  237. package/dist/new-widgets/templatesDependencies/valueRichtextMixin.js +0 -12
  238. package/dist/new-widgets/templatesDependencies/valueRichtextMixin.js.map +0 -1
  239. package/dist/new-widgets/valueTransformationMixins/autolinkMixin.js +0 -18
  240. package/dist/new-widgets/valueTransformationMixins/autolinkMixin.js.map +0 -1
  241. package/dist/new-widgets/valueTransformationMixins/dateMixin.js +0 -35
  242. package/dist/new-widgets/valueTransformationMixins/dateMixin.js.map +0 -1
  243. package/dist/new-widgets/valueTransformationMixins/dateTimeMixin.js +0 -16
  244. package/dist/new-widgets/valueTransformationMixins/dateTimeMixin.js.map +0 -1
  245. package/dist/new-widgets/valueTransformationMixins/index.js +0 -16
  246. package/dist/new-widgets/valueTransformationMixins/index.js.map +0 -1
  247. package/dist/new-widgets/valueTransformationMixins/markdownMixin.js +0 -25
  248. package/dist/new-widgets/valueTransformationMixins/markdownMixin.js.map +0 -1
  249. package/dist/new-widgets/valueTransformationMixins/multilineMixin.js +0 -17
  250. package/dist/new-widgets/valueTransformationMixins/multilineMixin.js.map +0 -1
  251. package/dist/new-widgets/valueTransformationMixins/oembedMixin.js +0 -27
  252. package/dist/new-widgets/valueTransformationMixins/oembedMixin.js.map +0 -1
  253. package/dist/solid-template-element.js +0 -164
  254. package/dist/solid-template-element.js.map +0 -1
  255. package/dist/style/default-theme.css +0 -24
  256. package/dist/style/default-theme.css.proxy.js +0 -10
  257. package/dist/widgets/baseWidget.js +0 -332
  258. package/dist/widgets/baseWidget.js.map +0 -1
  259. package/dist/widgets/widget-factory.js +0 -24
  260. package/dist/widgets/widget-factory.js.map +0 -1
@@ -1,1029 +0,0 @@
1
- import { c as createCommonjsModule } from './common/_commonjsHelpers-8c19dec8.js';
2
- import { i as isObjectLike_1, c as _baseGetTag, h as _Symbol, g as isArray_1, _ as _getNative, f as _baseUnary, j as isObject_1 } from './common/_baseUnary-217dffb2.js';
3
-
4
- /**
5
- * A specialized version of `_.map` for arrays without support for iteratee
6
- * shorthands.
7
- *
8
- * @private
9
- * @param {Array} [array] The array to iterate over.
10
- * @param {Function} iteratee The function invoked per iteration.
11
- * @returns {Array} Returns the new mapped array.
12
- */
13
- function arrayMap(array, iteratee) {
14
- var index = -1,
15
- length = array == null ? 0 : array.length,
16
- result = Array(length);
17
-
18
- while (++index < length) {
19
- result[index] = iteratee(array[index], index, array);
20
- }
21
- return result;
22
- }
23
-
24
- var _arrayMap = arrayMap;
25
-
26
- /** `Object#toString` result references. */
27
- var symbolTag = '[object Symbol]';
28
-
29
- /**
30
- * Checks if `value` is classified as a `Symbol` primitive or object.
31
- *
32
- * @static
33
- * @memberOf _
34
- * @since 4.0.0
35
- * @category Lang
36
- * @param {*} value The value to check.
37
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
38
- * @example
39
- *
40
- * _.isSymbol(Symbol.iterator);
41
- * // => true
42
- *
43
- * _.isSymbol('abc');
44
- * // => false
45
- */
46
- function isSymbol(value) {
47
- return typeof value == 'symbol' ||
48
- (isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
49
- }
50
-
51
- var isSymbol_1 = isSymbol;
52
-
53
- /** Used as references for various `Number` constants. */
54
- var INFINITY = 1 / 0;
55
-
56
- /** Used to convert symbols to primitives and strings. */
57
- var symbolProto = _Symbol ? _Symbol.prototype : undefined,
58
- symbolToString = symbolProto ? symbolProto.toString : undefined;
59
-
60
- /**
61
- * The base implementation of `_.toString` which doesn't convert nullish
62
- * values to empty strings.
63
- *
64
- * @private
65
- * @param {*} value The value to process.
66
- * @returns {string} Returns the string.
67
- */
68
- function baseToString(value) {
69
- // Exit early for strings to avoid a performance hit in some environments.
70
- if (typeof value == 'string') {
71
- return value;
72
- }
73
- if (isArray_1(value)) {
74
- // Recursively convert values (susceptible to call stack limits).
75
- return _arrayMap(value, baseToString) + '';
76
- }
77
- if (isSymbol_1(value)) {
78
- return symbolToString ? symbolToString.call(value) : '';
79
- }
80
- var result = (value + '');
81
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
82
- }
83
-
84
- var _baseToString = baseToString;
85
-
86
- /**
87
- * The base implementation of `_.slice` without an iteratee call guard.
88
- *
89
- * @private
90
- * @param {Array} array The array to slice.
91
- * @param {number} [start=0] The start position.
92
- * @param {number} [end=array.length] The end position.
93
- * @returns {Array} Returns the slice of `array`.
94
- */
95
- function baseSlice(array, start, end) {
96
- var index = -1,
97
- length = array.length;
98
-
99
- if (start < 0) {
100
- start = -start > length ? 0 : (length + start);
101
- }
102
- end = end > length ? length : end;
103
- if (end < 0) {
104
- end += length;
105
- }
106
- length = start > end ? 0 : ((end - start) >>> 0);
107
- start >>>= 0;
108
-
109
- var result = Array(length);
110
- while (++index < length) {
111
- result[index] = array[index + start];
112
- }
113
- return result;
114
- }
115
-
116
- var _baseSlice = baseSlice;
117
-
118
- /**
119
- * Casts `array` to a slice if it's needed.
120
- *
121
- * @private
122
- * @param {Array} array The array to inspect.
123
- * @param {number} start The start position.
124
- * @param {number} [end=array.length] The end position.
125
- * @returns {Array} Returns the cast slice.
126
- */
127
- function castSlice(array, start, end) {
128
- var length = array.length;
129
- end = end === undefined ? length : end;
130
- return (!start && end >= length) ? array : _baseSlice(array, start, end);
131
- }
132
-
133
- var _castSlice = castSlice;
134
-
135
- /**
136
- * The base implementation of `_.findIndex` and `_.findLastIndex` without
137
- * support for iteratee shorthands.
138
- *
139
- * @private
140
- * @param {Array} array The array to inspect.
141
- * @param {Function} predicate The function invoked per iteration.
142
- * @param {number} fromIndex The index to search from.
143
- * @param {boolean} [fromRight] Specify iterating from right to left.
144
- * @returns {number} Returns the index of the matched value, else `-1`.
145
- */
146
- function baseFindIndex(array, predicate, fromIndex, fromRight) {
147
- var length = array.length,
148
- index = fromIndex + (fromRight ? 1 : -1);
149
-
150
- while ((fromRight ? index-- : ++index < length)) {
151
- if (predicate(array[index], index, array)) {
152
- return index;
153
- }
154
- }
155
- return -1;
156
- }
157
-
158
- var _baseFindIndex = baseFindIndex;
159
-
160
- /**
161
- * The base implementation of `_.isNaN` without support for number objects.
162
- *
163
- * @private
164
- * @param {*} value The value to check.
165
- * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
166
- */
167
- function baseIsNaN(value) {
168
- return value !== value;
169
- }
170
-
171
- var _baseIsNaN = baseIsNaN;
172
-
173
- /**
174
- * A specialized version of `_.indexOf` which performs strict equality
175
- * comparisons of values, i.e. `===`.
176
- *
177
- * @private
178
- * @param {Array} array The array to inspect.
179
- * @param {*} value The value to search for.
180
- * @param {number} fromIndex The index to search from.
181
- * @returns {number} Returns the index of the matched value, else `-1`.
182
- */
183
- function strictIndexOf(array, value, fromIndex) {
184
- var index = fromIndex - 1,
185
- length = array.length;
186
-
187
- while (++index < length) {
188
- if (array[index] === value) {
189
- return index;
190
- }
191
- }
192
- return -1;
193
- }
194
-
195
- var _strictIndexOf = strictIndexOf;
196
-
197
- /**
198
- * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
199
- *
200
- * @private
201
- * @param {Array} array The array to inspect.
202
- * @param {*} value The value to search for.
203
- * @param {number} fromIndex The index to search from.
204
- * @returns {number} Returns the index of the matched value, else `-1`.
205
- */
206
- function baseIndexOf(array, value, fromIndex) {
207
- return value === value
208
- ? _strictIndexOf(array, value, fromIndex)
209
- : _baseFindIndex(array, _baseIsNaN, fromIndex);
210
- }
211
-
212
- var _baseIndexOf = baseIndexOf;
213
-
214
- /**
215
- * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
216
- * that is not found in the character symbols.
217
- *
218
- * @private
219
- * @param {Array} strSymbols The string symbols to inspect.
220
- * @param {Array} chrSymbols The character symbols to find.
221
- * @returns {number} Returns the index of the last unmatched string symbol.
222
- */
223
- function charsEndIndex(strSymbols, chrSymbols) {
224
- var index = strSymbols.length;
225
-
226
- while (index-- && _baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
227
- return index;
228
- }
229
-
230
- var _charsEndIndex = charsEndIndex;
231
-
232
- /**
233
- * Converts an ASCII `string` to an array.
234
- *
235
- * @private
236
- * @param {string} string The string to convert.
237
- * @returns {Array} Returns the converted array.
238
- */
239
- function asciiToArray(string) {
240
- return string.split('');
241
- }
242
-
243
- var _asciiToArray = asciiToArray;
244
-
245
- /** Used to compose unicode character classes. */
246
- var rsAstralRange = '\\ud800-\\udfff',
247
- rsComboMarksRange = '\\u0300-\\u036f',
248
- reComboHalfMarksRange = '\\ufe20-\\ufe2f',
249
- rsComboSymbolsRange = '\\u20d0-\\u20ff',
250
- rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
251
- rsVarRange = '\\ufe0e\\ufe0f';
252
-
253
- /** Used to compose unicode capture groups. */
254
- var rsZWJ = '\\u200d';
255
-
256
- /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
257
- var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
258
-
259
- /**
260
- * Checks if `string` contains Unicode symbols.
261
- *
262
- * @private
263
- * @param {string} string The string to inspect.
264
- * @returns {boolean} Returns `true` if a symbol is found, else `false`.
265
- */
266
- function hasUnicode(string) {
267
- return reHasUnicode.test(string);
268
- }
269
-
270
- var _hasUnicode = hasUnicode;
271
-
272
- /** Used to compose unicode character classes. */
273
- var rsAstralRange$1 = '\\ud800-\\udfff',
274
- rsComboMarksRange$1 = '\\u0300-\\u036f',
275
- reComboHalfMarksRange$1 = '\\ufe20-\\ufe2f',
276
- rsComboSymbolsRange$1 = '\\u20d0-\\u20ff',
277
- rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1,
278
- rsVarRange$1 = '\\ufe0e\\ufe0f';
279
-
280
- /** Used to compose unicode capture groups. */
281
- var rsAstral = '[' + rsAstralRange$1 + ']',
282
- rsCombo = '[' + rsComboRange$1 + ']',
283
- rsFitz = '\\ud83c[\\udffb-\\udfff]',
284
- rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
285
- rsNonAstral = '[^' + rsAstralRange$1 + ']',
286
- rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
287
- rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
288
- rsZWJ$1 = '\\u200d';
289
-
290
- /** Used to compose unicode regexes. */
291
- var reOptMod = rsModifier + '?',
292
- rsOptVar = '[' + rsVarRange$1 + ']?',
293
- rsOptJoin = '(?:' + rsZWJ$1 + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
294
- rsSeq = rsOptVar + reOptMod + rsOptJoin,
295
- rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
296
-
297
- /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
298
- var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
299
-
300
- /**
301
- * Converts a Unicode `string` to an array.
302
- *
303
- * @private
304
- * @param {string} string The string to convert.
305
- * @returns {Array} Returns the converted array.
306
- */
307
- function unicodeToArray(string) {
308
- return string.match(reUnicode) || [];
309
- }
310
-
311
- var _unicodeToArray = unicodeToArray;
312
-
313
- /**
314
- * Converts `string` to an array.
315
- *
316
- * @private
317
- * @param {string} string The string to convert.
318
- * @returns {Array} Returns the converted array.
319
- */
320
- function stringToArray(string) {
321
- return _hasUnicode(string)
322
- ? _unicodeToArray(string)
323
- : _asciiToArray(string);
324
- }
325
-
326
- var _stringToArray = stringToArray;
327
-
328
- /**
329
- * Converts `value` to a string. An empty string is returned for `null`
330
- * and `undefined` values. The sign of `-0` is preserved.
331
- *
332
- * @static
333
- * @memberOf _
334
- * @since 4.0.0
335
- * @category Lang
336
- * @param {*} value The value to convert.
337
- * @returns {string} Returns the converted string.
338
- * @example
339
- *
340
- * _.toString(null);
341
- * // => ''
342
- *
343
- * _.toString(-0);
344
- * // => '-0'
345
- *
346
- * _.toString([1, 2, 3]);
347
- * // => '1,2,3'
348
- */
349
- function toString(value) {
350
- return value == null ? '' : _baseToString(value);
351
- }
352
-
353
- var toString_1 = toString;
354
-
355
- /** Used to match leading and trailing whitespace. */
356
- var reTrimEnd = /\s+$/;
357
-
358
- /**
359
- * Removes trailing whitespace or specified characters from `string`.
360
- *
361
- * @static
362
- * @memberOf _
363
- * @since 4.0.0
364
- * @category String
365
- * @param {string} [string=''] The string to trim.
366
- * @param {string} [chars=whitespace] The characters to trim.
367
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
368
- * @returns {string} Returns the trimmed string.
369
- * @example
370
- *
371
- * _.trimEnd(' abc ');
372
- * // => ' abc'
373
- *
374
- * _.trimEnd('-_-abc-_-', '_-');
375
- * // => '-_-abc'
376
- */
377
- function trimEnd(string, chars, guard) {
378
- string = toString_1(string);
379
- if (string && (guard || chars === undefined)) {
380
- return string.replace(reTrimEnd, '');
381
- }
382
- if (!string || !(chars = _baseToString(chars))) {
383
- return string;
384
- }
385
- var strSymbols = _stringToArray(string),
386
- end = _charsEndIndex(strSymbols, _stringToArray(chars)) + 1;
387
-
388
- return _castSlice(strSymbols, 0, end).join('');
389
- }
390
-
391
- var trimEnd_1 = trimEnd;
392
-
393
- /** `Object#toString` result references. */
394
- var stringTag = '[object String]';
395
-
396
- /**
397
- * Checks if `value` is classified as a `String` primitive or object.
398
- *
399
- * @static
400
- * @since 0.1.0
401
- * @memberOf _
402
- * @category Lang
403
- * @param {*} value The value to check.
404
- * @returns {boolean} Returns `true` if `value` is a string, else `false`.
405
- * @example
406
- *
407
- * _.isString('abc');
408
- * // => true
409
- *
410
- * _.isString(1);
411
- * // => false
412
- */
413
- function isString(value) {
414
- return typeof value == 'string' ||
415
- (!isArray_1(value) && isObjectLike_1(value) && _baseGetTag(value) == stringTag);
416
- }
417
-
418
- var isString_1 = isString;
419
-
420
- /**
421
- * This method returns the first argument it receives.
422
- *
423
- * @static
424
- * @since 0.1.0
425
- * @memberOf _
426
- * @category Util
427
- * @param {*} value Any value.
428
- * @returns {*} Returns `value`.
429
- * @example
430
- *
431
- * var object = { 'a': 1 };
432
- *
433
- * console.log(_.identity(object) === object);
434
- * // => true
435
- */
436
- function identity(value) {
437
- return value;
438
- }
439
-
440
- var identity_1 = identity;
441
-
442
- /**
443
- * A faster alternative to `Function#apply`, this function invokes `func`
444
- * with the `this` binding of `thisArg` and the arguments of `args`.
445
- *
446
- * @private
447
- * @param {Function} func The function to invoke.
448
- * @param {*} thisArg The `this` binding of `func`.
449
- * @param {Array} args The arguments to invoke `func` with.
450
- * @returns {*} Returns the result of `func`.
451
- */
452
- function apply(func, thisArg, args) {
453
- switch (args.length) {
454
- case 0: return func.call(thisArg);
455
- case 1: return func.call(thisArg, args[0]);
456
- case 2: return func.call(thisArg, args[0], args[1]);
457
- case 3: return func.call(thisArg, args[0], args[1], args[2]);
458
- }
459
- return func.apply(thisArg, args);
460
- }
461
-
462
- var _apply = apply;
463
-
464
- /* Built-in method references for those with the same name as other `lodash` methods. */
465
- var nativeMax = Math.max;
466
-
467
- /**
468
- * A specialized version of `baseRest` which transforms the rest array.
469
- *
470
- * @private
471
- * @param {Function} func The function to apply a rest parameter to.
472
- * @param {number} [start=func.length-1] The start position of the rest parameter.
473
- * @param {Function} transform The rest array transform.
474
- * @returns {Function} Returns the new function.
475
- */
476
- function overRest(func, start, transform) {
477
- start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
478
- return function() {
479
- var args = arguments,
480
- index = -1,
481
- length = nativeMax(args.length - start, 0),
482
- array = Array(length);
483
-
484
- while (++index < length) {
485
- array[index] = args[start + index];
486
- }
487
- index = -1;
488
- var otherArgs = Array(start + 1);
489
- while (++index < start) {
490
- otherArgs[index] = args[index];
491
- }
492
- otherArgs[start] = transform(array);
493
- return _apply(func, this, otherArgs);
494
- };
495
- }
496
-
497
- var _overRest = overRest;
498
-
499
- /**
500
- * Creates a function that returns `value`.
501
- *
502
- * @static
503
- * @memberOf _
504
- * @since 2.4.0
505
- * @category Util
506
- * @param {*} value The value to return from the new function.
507
- * @returns {Function} Returns the new constant function.
508
- * @example
509
- *
510
- * var objects = _.times(2, _.constant({ 'a': 1 }));
511
- *
512
- * console.log(objects);
513
- * // => [{ 'a': 1 }, { 'a': 1 }]
514
- *
515
- * console.log(objects[0] === objects[1]);
516
- * // => true
517
- */
518
- function constant(value) {
519
- return function() {
520
- return value;
521
- };
522
- }
523
-
524
- var constant_1 = constant;
525
-
526
- var defineProperty = (function() {
527
- try {
528
- var func = _getNative(Object, 'defineProperty');
529
- func({}, '', {});
530
- return func;
531
- } catch (e) {}
532
- }());
533
-
534
- var _defineProperty = defineProperty;
535
-
536
- /**
537
- * The base implementation of `setToString` without support for hot loop shorting.
538
- *
539
- * @private
540
- * @param {Function} func The function to modify.
541
- * @param {Function} string The `toString` result.
542
- * @returns {Function} Returns `func`.
543
- */
544
- var baseSetToString = !_defineProperty ? identity_1 : function(func, string) {
545
- return _defineProperty(func, 'toString', {
546
- 'configurable': true,
547
- 'enumerable': false,
548
- 'value': constant_1(string),
549
- 'writable': true
550
- });
551
- };
552
-
553
- var _baseSetToString = baseSetToString;
554
-
555
- /** Used to detect hot functions by number of calls within a span of milliseconds. */
556
- var HOT_COUNT = 800,
557
- HOT_SPAN = 16;
558
-
559
- /* Built-in method references for those with the same name as other `lodash` methods. */
560
- var nativeNow = Date.now;
561
-
562
- /**
563
- * Creates a function that'll short out and invoke `identity` instead
564
- * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
565
- * milliseconds.
566
- *
567
- * @private
568
- * @param {Function} func The function to restrict.
569
- * @returns {Function} Returns the new shortable function.
570
- */
571
- function shortOut(func) {
572
- var count = 0,
573
- lastCalled = 0;
574
-
575
- return function() {
576
- var stamp = nativeNow(),
577
- remaining = HOT_SPAN - (stamp - lastCalled);
578
-
579
- lastCalled = stamp;
580
- if (remaining > 0) {
581
- if (++count >= HOT_COUNT) {
582
- return arguments[0];
583
- }
584
- } else {
585
- count = 0;
586
- }
587
- return func.apply(undefined, arguments);
588
- };
589
- }
590
-
591
- var _shortOut = shortOut;
592
-
593
- /**
594
- * Sets the `toString` method of `func` to return `string`.
595
- *
596
- * @private
597
- * @param {Function} func The function to modify.
598
- * @param {Function} string The `toString` result.
599
- * @returns {Function} Returns `func`.
600
- */
601
- var setToString = _shortOut(_baseSetToString);
602
-
603
- var _setToString = setToString;
604
-
605
- /**
606
- * The base implementation of `_.rest` which doesn't validate or coerce arguments.
607
- *
608
- * @private
609
- * @param {Function} func The function to apply a rest parameter to.
610
- * @param {number} [start=func.length-1] The start position of the rest parameter.
611
- * @returns {Function} Returns the new function.
612
- */
613
- function baseRest(func, start) {
614
- return _setToString(_overRest(func, start, identity_1), func + '');
615
- }
616
-
617
- var _baseRest = baseRest;
618
-
619
- /**
620
- * This function is like `baseIndexOf` except that it accepts a comparator.
621
- *
622
- * @private
623
- * @param {Array} array The array to inspect.
624
- * @param {*} value The value to search for.
625
- * @param {number} fromIndex The index to search from.
626
- * @param {Function} comparator The comparator invoked per element.
627
- * @returns {number} Returns the index of the matched value, else `-1`.
628
- */
629
- function baseIndexOfWith(array, value, fromIndex, comparator) {
630
- var index = fromIndex - 1,
631
- length = array.length;
632
-
633
- while (++index < length) {
634
- if (comparator(array[index], value)) {
635
- return index;
636
- }
637
- }
638
- return -1;
639
- }
640
-
641
- var _baseIndexOfWith = baseIndexOfWith;
642
-
643
- /**
644
- * Copies the values of `source` to `array`.
645
- *
646
- * @private
647
- * @param {Array} source The array to copy values from.
648
- * @param {Array} [array=[]] The array to copy values to.
649
- * @returns {Array} Returns `array`.
650
- */
651
- function copyArray(source, array) {
652
- var index = -1,
653
- length = source.length;
654
-
655
- array || (array = Array(length));
656
- while (++index < length) {
657
- array[index] = source[index];
658
- }
659
- return array;
660
- }
661
-
662
- var _copyArray = copyArray;
663
-
664
- /** Used for built-in method references. */
665
- var arrayProto = Array.prototype;
666
-
667
- /** Built-in value references. */
668
- var splice = arrayProto.splice;
669
-
670
- /**
671
- * The base implementation of `_.pullAllBy` without support for iteratee
672
- * shorthands.
673
- *
674
- * @private
675
- * @param {Array} array The array to modify.
676
- * @param {Array} values The values to remove.
677
- * @param {Function} [iteratee] The iteratee invoked per element.
678
- * @param {Function} [comparator] The comparator invoked per element.
679
- * @returns {Array} Returns `array`.
680
- */
681
- function basePullAll(array, values, iteratee, comparator) {
682
- var indexOf = comparator ? _baseIndexOfWith : _baseIndexOf,
683
- index = -1,
684
- length = values.length,
685
- seen = array;
686
-
687
- if (array === values) {
688
- values = _copyArray(values);
689
- }
690
- if (iteratee) {
691
- seen = _arrayMap(array, _baseUnary(iteratee));
692
- }
693
- while (++index < length) {
694
- var fromIndex = 0,
695
- value = values[index],
696
- computed = iteratee ? iteratee(value) : value;
697
-
698
- while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
699
- if (seen !== array) {
700
- splice.call(seen, fromIndex, 1);
701
- }
702
- splice.call(array, fromIndex, 1);
703
- }
704
- }
705
- return array;
706
- }
707
-
708
- var _basePullAll = basePullAll;
709
-
710
- /**
711
- * This method is like `_.pull` except that it accepts an array of values to remove.
712
- *
713
- * **Note:** Unlike `_.difference`, this method mutates `array`.
714
- *
715
- * @static
716
- * @memberOf _
717
- * @since 4.0.0
718
- * @category Array
719
- * @param {Array} array The array to modify.
720
- * @param {Array} values The values to remove.
721
- * @returns {Array} Returns `array`.
722
- * @example
723
- *
724
- * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
725
- *
726
- * _.pullAll(array, ['a', 'c']);
727
- * console.log(array);
728
- * // => ['b', 'b']
729
- */
730
- function pullAll(array, values) {
731
- return (array && array.length && values && values.length)
732
- ? _basePullAll(array, values)
733
- : array;
734
- }
735
-
736
- var pullAll_1 = pullAll;
737
-
738
- /**
739
- * Removes all given values from `array` using
740
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
741
- * for equality comparisons.
742
- *
743
- * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
744
- * to remove elements from an array by predicate.
745
- *
746
- * @static
747
- * @memberOf _
748
- * @since 2.0.0
749
- * @category Array
750
- * @param {Array} array The array to modify.
751
- * @param {...*} [values] The values to remove.
752
- * @returns {Array} Returns `array`.
753
- * @example
754
- *
755
- * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
756
- *
757
- * _.pull(array, 'a', 'c');
758
- * console.log(array);
759
- * // => ['b', 'b']
760
- */
761
- var pull = _baseRest(pullAll_1);
762
-
763
- var pull_1 = pull;
764
-
765
- var id = 0;
766
-
767
- class Node {
768
- constructor(data) {
769
- this.id = ++id;
770
- if (isArray_1(data)) {
771
- this.open = data[0];
772
- this.close = data[1];
773
- } else if (isString_1(data)) {
774
- this.text = data;
775
- }
776
- this.children = [];
777
- }
778
-
779
- append(e) {
780
- if (!(e instanceof Node)) {
781
- e = new Node(e);
782
- }
783
- if (e._parent) {
784
- pull_1(e._parent.children, e);
785
- }
786
- e._parent = this;
787
- this.children = this.children.concat(e);
788
- }
789
-
790
- render() {
791
- var text = '';
792
- if (this.open) {
793
- text += this.open;
794
- }
795
- if (this.text) {
796
- text += this.text;
797
- }
798
- for (var i = 0; i < this.children.length; i++) {
799
- text += this.children[i].render();
800
- }
801
- if (this.close) {
802
- text += this.close;
803
- }
804
- return text
805
- }
806
-
807
- parent() {
808
- return this._parent
809
- }
810
- }
811
-
812
- var Node_1 = Node;
813
-
814
- const encodeLink = (link) =>
815
- encodeURI(link)
816
- .replace(/\(/i, "%28")
817
- .replace(/\)/i, "%29")
818
- .replace(/(\?|&)response-content-disposition=attachment.*$/, "");
819
-
820
- var URL = {
821
- encodeLink,
822
- };
823
-
824
- const { encodeLink: encodeLink$1 } = URL;
825
-
826
- var fromDelta_converters = {
827
- embed: {
828
- image: function(src) {
829
- this.append('![](' + encodeLink$1(src) + ')');
830
- },
831
- // Not a default Quill feature, converts custom divider embed blot added when
832
- // creating quill editor instance.
833
- // See https://quilljs.com/guides/cloning-medium-with-parchment/#dividers
834
- thematic_break: function() {
835
- this.open = '\n---\n' + this.open;
836
- },
837
- },
838
-
839
- inline: {
840
- italic: function() {
841
- return ['_', '_'];
842
- },
843
- bold: function() {
844
- return ['**', '**'];
845
- },
846
- link: function(url) {
847
- return ['[', '](' + url + ')'];
848
- },
849
- },
850
-
851
- block: {
852
- 'header': function({header}) {
853
- this.open = '#'.repeat(header) + ' ' + this.open;
854
- },
855
- blockquote: function() {
856
- this.open = '> ' + this.open;
857
- },
858
- 'list': {
859
- group: function() {
860
- return new Node_1(['', '\n']);
861
- },
862
- line: function(attrs, group) {
863
- if (attrs.list === 'bullet') {
864
- this.open = '- ' + this.open;
865
- } else if (attrs.list === "checked") {
866
- this.open = '- [x] ' + this.open;
867
- } else if (attrs.list === "unchecked") {
868
- this.open = '- [ ] ' + this.open;
869
- } else if (attrs.list === 'ordered') {
870
- group.count = group.count || 0;
871
- var count = ++group.count;
872
- this.open = count + '. ' + this.open;
873
- }
874
- },
875
- }
876
- },
877
- };
878
-
879
- var fromDelta = createCommonjsModule(function (module, exports) {
880
- module.exports = function(ops, converters = fromDelta_converters) {
881
- return trimEnd_1(convert(ops, converters).render()) + '\n';
882
- };
883
-
884
- function convert(ops, converters) {
885
- var group, line, el, activeInline, beginningOfLine;
886
- var root = new Node_1();
887
-
888
- function newLine() {
889
- el = line = new Node_1(['', '\n']);
890
- root.append(line);
891
- activeInline = {};
892
- }
893
- newLine();
894
-
895
- for (var i = 0; i < ops.length; i++) {
896
- var op = ops[i];
897
-
898
- if (isObject_1(op.insert)) {
899
- for (var k in op.insert) {
900
- if (converters.embed[k]) {
901
- applyInlineAttributes(op.attributes);
902
- converters.embed[k].call(el, op.insert[k], op.attributes);
903
- }
904
- }
905
- } else {
906
- var lines = op.insert.split('\n');
907
-
908
- if (hasBlockLevelAttribute(op.attributes, converters)) {
909
- // Some line-level styling (ie headings) is applied by inserting a \n
910
- // with the style; the style applies back to the previous \n.
911
- // There *should* only be one style in an insert operation.
912
-
913
- for (var j = 1; j < lines.length; j++) {
914
- for (var attr in op.attributes) {
915
- if (converters.block[attr]) {
916
- var fn = converters.block[attr];
917
- if (typeof fn === 'object') {
918
- if (group && group.type !== attr) {
919
- group = null;
920
- }
921
- if (!group && fn.group) {
922
- group = {
923
- el: fn.group(),
924
- type: attr,
925
- value: op.attributes[k],
926
- distance: 0,
927
- };
928
- root.append(group.el);
929
- }
930
-
931
- if (group) {
932
- group.el.append(line);
933
- group.distance = 0;
934
- }
935
- fn = fn.line;
936
- }
937
-
938
- fn.call(line, op.attributes, group);
939
- newLine();
940
- break
941
- }
942
- }
943
- }
944
- beginningOfLine = true;
945
- } else {
946
- for (var l = 0; l < lines.length; l++) {
947
- if ((l > 0 || beginningOfLine) && group && ++group.distance >= 2) {
948
- group = null;
949
- }
950
- applyInlineAttributes(op.attributes, ops[i + 1] && ops[i + 1].attributes);
951
- el.append(lines[l]);
952
- if (l < lines.length - 1) {
953
- newLine();
954
- }
955
- }
956
- beginningOfLine = false;
957
- }
958
- }
959
- }
960
-
961
- return root;
962
-
963
- function applyInlineAttributes(attrs, next) {
964
- var first = [],
965
- then = [];
966
- attrs = attrs || {};
967
-
968
- var tag = el,
969
- seen = {};
970
- while (tag._format) {
971
- seen[tag._format] = true;
972
- if (!attrs[tag._format]) {
973
- for (var k in seen) {
974
- delete activeInline[k];
975
- }
976
- el = tag.parent();
977
- }
978
-
979
- tag = tag.parent();
980
- }
981
-
982
- for (var attr in attrs) {
983
- if (converters.inline[attr]) {
984
- if (activeInline[attr]) {
985
- if (activeInline[attr] === attrs[attr]) {
986
- continue; // do nothing -- we should already be inside this style's tag
987
- }
988
- }
989
-
990
- if (next && attrs[attr] === next[attr]) {
991
- first.push(attr); // if the next operation has the same style, this should be the outermost tag
992
- } else {
993
- then.push(attr);
994
- }
995
- activeInline[attr] = attrs[attr];
996
- }
997
- }
998
-
999
- first.forEach(apply);
1000
- then.forEach(apply);
1001
-
1002
- function apply(fmt) {
1003
- var newEl = converters.inline[fmt].call(null, attrs[fmt]);
1004
- if (isArray_1(newEl)) {
1005
- newEl = new Node_1(newEl);
1006
- }
1007
- newEl._format = fmt;
1008
- el.append(newEl);
1009
- el = newEl;
1010
- }
1011
- }
1012
- }
1013
-
1014
- function hasBlockLevelAttribute(attrs, converters) {
1015
- for (var k in attrs) {
1016
- if (Object.keys(converters.block).includes(k)) {
1017
- return true
1018
- }
1019
- }
1020
- return false
1021
- }
1022
- });
1023
-
1024
- var quillDeltaToMarkdown = {
1025
- deltaToMarkdown: fromDelta
1026
- };
1027
-
1028
- export default quillDeltaToMarkdown;
1029
- //# sourceMappingURL=quill-delta-to-markdown.js.map